!function(){function e(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var t,i,o=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(t=r.next()).done)&&(o.push(t.value),!n||o.length!==n);a=!0);}catch(u){l=!0,i=u}finally{try{a||null==r.return||r.return()}finally{if(l)throw i}}return o}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return n(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}System.register(["./index-legacy.9e093f2b.js","./use-tab-status-legacy.390fa0d0.js"],(function(n){"use strict";var r,t,i,o,a,l,u,f,d,c,s,v,g,h,p,y,m,b,x;return{setters:[function(e){r=e.t,t=e.z,i=e.y,o=e.u,a=e.d,l=e.R,u=e.ap,f=e.Z,d=e.az,c=e.$,s=e.W,v=e.a0,g=e.c,h=e._,p=e.an,y=e.aA,m=e.L,b=e.x},function(e){x=e.u}],execute:function(){var S=e(r("list"),3),A=S[0],T=S[1],w=S[2],j={error:Boolean,offset:t(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:i("down"),loadingText:String,finishedText:String,immediateCheck:o},k=a({name:A,props:j,emits:["load","update:error","update:loading"],setup:function(e,n){var r=n.emit,t=n.slots,i=l(e.loading),o=l(),a=l(),b=x(),S=u(o),A=function(){h((function(){if(!(i.value||e.finished||e.disabled||e.error||!1===(null==b?void 0:b.value))){var n=e.offset,t=e.direction,l=p(S);if(l.height&&!y(o)){var u=p(a);("up"===t?l.top-u.top<=n:u.bottom-l.bottom<=n)&&(i.value=!0,r("update:loading",!0),r("load"))}}}))},j=function(){if(e.finished){var n=t.finished?t.finished():e.finishedText;if(n)return g("div",{class:T("finished-text")},[n])}},k=function(){r("update:error",!1),A()},B=function(){if(e.error){var n=t.error?t.error():e.errorText;if(n)return g("div",{role:"button",class:T("error-text"),tabindex:0,onClick:k},[n])}},C=function(){if(i.value&&!e.finished&&!e.disabled)return g("div",{class:T("loading")},[t.loading?t.loading():g(m,{class:T("loading-icon")},{default:function(){return[e.loadingText||w("loading")]}})])};return f((function(){return[e.loading,e.finished,e.error]}),A),b&&f(b,(function(e){e&&A()})),d((function(){i.value=e.loading})),c((function(){e.immediateCheck&&A()})),s({check:A}),v("scroll",A,{target:S,passive:!0}),function(){var n,r=null==(n=t.default)?void 0:n.call(t),l=g("div",{ref:a,class:T("placeholder")},null);return g("div",{ref:o,role:"feed",class:T(),"aria-busy":i.value},["down"===e.direction?r:l,C(),j(),B(),"up"===e.direction?r:l])}}});n("L",b(k))}}}))}();
