<<<<<<<< HEAD:dist/assets/index-41df7efd.js
import{c as C,b as E,m as L,t as w,d as B,r as h,bC as R,w as x,bD as N,y,a2 as _,a3 as z,a as r,z as D,a4 as b,bE as F,L as H,k as I}from"./index-4228b913.js";import{u as M}from"./use-tab-status-27781a46.js";const[U,o,V]=C("list"),j={error:Boolean,offset:E(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:L("down"),loadingText:String,finishedText:String,immediateCheck:w};var q=B({name:U,props:j,emits:["load","update:error","update:loading"],setup(e,{emit:c,slots:a}){const d=h(e.loading),u=h(),g=h(),s=M(),m=R(u),n=()=>{D(()=>{if(d.value||e.finished||e.disabled||e.error||(s==null?void 0:s.value)===!1)return;const{direction:t}=e,l=+e.offset,i=b(m);if(!i.height||F(u))return;let f=!1;const v=b(g);t==="up"?f=i.top-v.top<=l:f=v.bottom-i.bottom<=l,f&&(d.value=!0,c("update:loading",!0),c("load"))})},T=()=>{if(e.finished){const t=a.finished?a.finished():e.finishedText;if(t)return r("div",{class:o("finished-text")},[t])}},k=()=>{c("update:error",!1),n()},P=()=>{if(e.error){const t=a.error?a.error():e.errorText;if(t)return r("div",{role:"button",class:o("error-text"),tabindex:0,onClick:k},[t])}},S=()=>{if(d.value&&!e.finished&&!e.disabled)return r("div",{class:o("loading")},[a.loading?a.loading():r(H,{class:o("loading-icon")},{default:()=>[e.loadingText||V("loading")]})])};return x(()=>[e.loading,e.finished,e.error],n),s&&x(s,t=>{t&&n()}),N(()=>{d.value=e.loading}),y(()=>{e.immediateCheck&&n()}),_({check:n}),z("scroll",n,{target:m,passive:!0}),()=>{var t;const l=(t=a.default)==null?void 0:t.call(a),i=r("div",{ref:g,class:o("placeholder")},null);return r("div",{ref:u,role:"feed",class:o(),"aria-busy":d.value},[e.direction==="down"?l:i,S(),T(),P(),e.direction==="up"?l:i])}}});const J=I(q);export{J as L};
========
import{c as C,b as E,m as L,t as w,d as B,r as h,bC as R,w as x,bD as N,y,a2 as _,a3 as z,a as r,z as D,a4 as b,bE as F,L as H,k as I}from"./index-c4313132.js";import{u as M}from"./use-tab-status-73e76d4f.js";const[U,o,V]=C("list"),j={error:Boolean,offset:E(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:L("down"),loadingText:String,finishedText:String,immediateCheck:w};var q=B({name:U,props:j,emits:["load","update:error","update:loading"],setup(e,{emit:c,slots:a}){const d=h(e.loading),u=h(),g=h(),s=M(),m=R(u),n=()=>{D(()=>{if(d.value||e.finished||e.disabled||e.error||(s==null?void 0:s.value)===!1)return;const{direction:t}=e,l=+e.offset,i=b(m);if(!i.height||F(u))return;let f=!1;const v=b(g);t==="up"?f=i.top-v.top<=l:f=v.bottom-i.bottom<=l,f&&(d.value=!0,c("update:loading",!0),c("load"))})},T=()=>{if(e.finished){const t=a.finished?a.finished():e.finishedText;if(t)return r("div",{class:o("finished-text")},[t])}},k=()=>{c("update:error",!1),n()},P=()=>{if(e.error){const t=a.error?a.error():e.errorText;if(t)return r("div",{role:"button",class:o("error-text"),tabindex:0,onClick:k},[t])}},S=()=>{if(d.value&&!e.finished&&!e.disabled)return r("div",{class:o("loading")},[a.loading?a.loading():r(H,{class:o("loading-icon")},{default:()=>[e.loadingText||V("loading")]})])};return x(()=>[e.loading,e.finished,e.error],n),s&&x(s,t=>{t&&n()}),N(()=>{d.value=e.loading}),y(()=>{e.immediateCheck&&n()}),_({check:n}),z("scroll",n,{target:m,passive:!0}),()=>{var t;const l=(t=a.default)==null?void 0:t.call(a),i=r("div",{ref:g,class:o("placeholder")},null);return r("div",{ref:u,role:"feed",class:o(),"aria-busy":d.value},[e.direction==="down"?l:i,S(),T(),P(),e.direction==="up"?l:i])}}});const J=I(q);export{J as L};
>>>>>>>> 0f2588f61580675e1c866dc0769d4ceb917efcec:dist/assets/index-a4e8010c.js
