!function(){function e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var n,i,o=[],a=!0,l=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(o.push(n.value),!r||o.length!==r);a=!0);}catch(u){l=!0,i=u}finally{try{a||null==t.return||t.return()}finally{if(l)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||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 r(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}System.register(["./index-legacy.3d6bb858.js","./use-tab-status-legacy.77218878.js"],(function(r){"use strict";var t,n,i,o,a,l,u,d,f,c,s,v,g,h,p,y,b,m,x;return{setters:[function(e){t=e.t,n=e.z,i=e.y,o=e.u,a=e.d,l=e.R,u=e.ao,d=e.Z,f=e.az,c=e.$,s=e.W,v=e.a0,g=e.c,h=e._,p=e.at,y=e.aA,b=e.L,m=e.x},function(e){x=e.u}],execute:function(){var S=e(t("list"),3),A=S[0],T=S[1],w=S[2],j={error:Boolean,offset:n(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,r){var t=r.emit,n=r.slots,i=l(e.loading),o=l(),a=l(),m=x(),S=u(o),A=function(){h((function(){if(!(i.value||e.finished||e.disabled||e.error||!1===(null==m?void 0:m.value))){var r=e.offset,n=e.direction,l=p(S);if(l.height&&!y(o)){var u=p(a);("up"===n?l.top-u.top<=r:u.bottom-l.bottom<=r)&&(i.value=!0,t("update:loading",!0),t("load"))}}}))},j=function(){if(e.finished){var r=n.finished?n.finished():e.finishedText;if(r)return g("div",{class:T("finished-text")},[r])}},k=function(){t("update:error",!1),A()},B=function(){if(e.error){var r=n.error?n.error():e.errorText;if(r)return g("div",{role:"button",class:T("error-text"),tabindex:0,onClick:k},[r])}},C=function(){if(i.value&&!e.finished&&!e.disabled)return g("div",{class:T("loading")},[n.loading?n.loading():g(b,{class:T("loading-icon")},{default:function(){return[e.loadingText||w("loading")]}})])};return d((function(){return[e.loading,e.finished,e.error]}),A),m&&d(m,(function(e){e&&A()})),f((function(){i.value=e.loading})),c((function(){e.immediateCheck&&A()})),s({check:A}),v("scroll",A,{target:S,passive:!0}),function(){var r,t=null==(r=n.default)?void 0:r.call(n),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?t:l,C(),j(),B(),"up"===e.direction?t:l])}}});r("L",m(k))}}}))}();
