1import{aM as k,ba as N,b5 as T,bb as M,bs as O,aR as v,aS as B,bt as R,bH as V,aT as r,bG as u,b3 as m,a_ as g,bc as E,aU as j,aV as I,cH as U,cI as q,aY as _,b2 as D,bj as f}from"./2fQ-1PKw.js";function G(t,o=null){if(!t)return!1;const e=t.getBoundingClientRect(),n=o?o.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};return e.bottom>=n.top&&e.top<=n.bottom&&e.right>=n.left&&e.left<=n.right}async function W(t){return t?(await E(),t.value instanceof HTMLElement?t.value:t.value?document.querySelector(t.value):null):null}function Y(t){let o=`0px 0px ${t.distance}px 0px`;t.top&&(o=`${t.distance}px 0px 0px 0px`);const e=new IntersectionObserver(n=>{n[0].isIntersecting&&(t.firstload&&t.emit(),t.firstload=!0)},{root:t.parentEl,rootMargin:o});return t.infiniteLoading.value&&e.observe(t.infiniteLoading.value),e}async function x(t,o){if(await E(),!t.top)return;const e=t.parentEl||document.documentElement;e.scrollTop=e.scrollHeight-o}const L=(t,o)=>{const e=t.__vccOpts||t;for(const[n,l]of o)e[n]=l;return e},z={},A=t=>(U("data-v-d3e37633"),t=t(),q(),t),F={class:"container"},J=A(()=>r("div",{class:"spinner"},null,-1)),K=[J];function P(t,o){return v(),B("div",F,K)}const Q=L(z,[["render",P],["__scopeId","data-v-d3e37633"]]),X={class:"state-error"},Z=k({__name:"InfiniteLoading",props:{top:{type:Boolean,default:!1},target:{},distance:{default:0},identifier:{},firstload:{type:Boolean,default:!0},slots:{}},emits:["infinite"],setup(t,{emit:o}){const e=t;let n=null,l=0;const s=g(null),i=g(""),{top:p,firstload:S,distance:$}=e,{identifier:h,target:C}=N(e),a={infiniteLoading:s,top:p,firstload:S,distance:$,parentEl:null,emit(){l=(a.parentEl||document.documentElement).scrollHeight,b.loading(),o("infinite",b)}},b={loading(){i.value="loading"},async loaded(){i.value="loaded",await x(a,l),G(s.value,a.parentEl)&&a.emit()},async complete(){i.value="complete",await x(a,l),n?.disconnect()},error(){i.value="error"}};function y(){n?.disconnect(),n=Y(a)}return T(h,y),M(async()=>{a.parentEl=await W(C),y()}),O(()=>n?.disconnect()),(d,w)=>(v(),B("div",{ref_key:"infiniteLoading",ref:s,class:"v3-infinite-loading"},[R(r("div",null,[u(d.$slots,"spinner",{},()=>[j(Q)],!0)],512),[[V,i.value=="loading"]]),i.value=="complete"?u(d.$slots,"complete",{key:0},()=>{var c;return[r("span",null,I(((c=d.slots)==null?void 0:c.complete)||"No more results!"),1)]},!0):m("",!0),i.value=="error"?u(d.$slots,"error",{key:1,retry:a.emit},()=>{var c;return[r("span",X,[r("span",null,I(((c=d.slots)==null?void 0:c.error)||"Oops something went wrong!"),1),r("button",{class:"retry",onClick:w[0]||(w[0]=(...H)=>a.emit&&a.emit(...H))},"retry")])]},!0):m("",!0)],512))}}),tt=L(Z,[["__scopeId","data-v-4bdee133"]]),et=k({__name:"BaseInfiniteLoading.client",props:{target:{type:String,default:null},distance:{type:Number,default:1200},identifier:{type:Number,default:0}},emits:["infinite"],setup(t,{emit:o}){const e=t,n=o,l=g(!1);return setTimeout(()=>l.value=!0,350),(s,i)=>_(l)?(v(),D(_(tt),{key:0,target:e.target,distance:e.distance,identifier:e.identifier,onInfinite:i[0]||(i[0]=p=>n("infinite",p))},{spinner:f(()=>[u(s.$slots,"spinner",{},()=>[i[1]||(i[1]=r("span",null,null,-1))])]),complete:f(()=>[u(s.$slots,"complete",{}
1,()=>[i[2]||(i[2]=r("span",null,null,-1))])]),error:f(()=>[u(s.$slots,"error",{},()=>[i[3]||(i[3]=r("span",null,null,-1))])]),_:3},8,["target","distance","identifier"])):m("",!0)}}),it=Object.assign(et,{__name:"BaseInfiniteLoading"});export{it as _};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.