!function(){function e(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,i,o,a,l=[],u=!0,f=!1;try{if(o=(n=n.call(e)).next,0===r){if(Object(n)!==n)return;u=!1}else for(;!(u=(t=o.call(n)).done)&&(l.push(t.value),l.length!==r);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return l}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return r(e,n);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 r(e,n)}(e,n)||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 n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}System.register(["./index-legacy-734a0e5f.js","./use-tab-status-legacy-f84b3f1b.js"],(function(r,n){"use strict";var t,i,o,a,l,u,f,d,c,s,v,g,h,p,y,b,m,x,S;return{setters:[function(e){t=e.j,i=e.ao,o=e.n,a=e.v,l=e.d,u=e.i,f=e.aD,d=e.w,c=e._,s=e.o,v=e.ak,g=e.g,h=e.y,p=e.Y,y=e.aE,b=e.a7,m=e.ap,x=e.D},function(e){S=e.u}],execute:function(){var n=e(t("list"),3),j=n[0],w=n[1],T=n[2],A={error:Boolean,offset:i(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:o("down"),loadingText:String,finishedText:String,immediateCheck:a},k=l({name:j,props:A,emits:["load","update:error","update:loading"],setup:function(e,r){var n=r.emit,t=r.slots,i=u(e.loading),o=u(),a=u(),l=S(),x=f(o),j=function(){h((function(){if(!(i.value||e.finished||e.disabled||e.error||!1===(null==l?void 0:l.value))){var r=e.direction,t=+e.offset,u=p(x);if(u.height&&!y(o)){var f=p(a);("up"===r?u.top-f.top<=t:f.bottom-u.bottom<=t)&&(i.value=!0,n("update:loading",!0),n("load"))}}}))},A=function(){if(e.finished){var r=t.finished?t.finished():e.finishedText;if(r)return g("div",{class:w("finished-text")},[r])}},k=function(){n("update:error",!1),j()},B=function(){if(e.error){var r=t.error?t.error():e.errorText;if(r)return g("div",{role:"button",class:w("error-text"),tabindex:0,onClick:k},[r])}},C=function(){if(i.value&&!e.finished&&!e.disabled)return g("div",{class:w("loading")},[t.loading?t.loading():g(b,{class:w("loading-icon")},{default:function(){return[e.loadingText||T("loading")]}})])};return d((function(){return[e.loading,e.finished,e.error]}),j),l&&d(l,(function(e){e&&j()})),c((function(){i.value=e.loading})),s((function(){e.immediateCheck&&j()})),m({check:j}),v("scroll",j,{target:x,passive:!0}),function(){var r,n=null==(r=t.default)?void 0:r.call(t),l=g("div",{ref:a,class:w("placeholder")},null);return g("div",{ref:o,role:"feed",class:w(),"aria-busy":i.value},["down"===e.direction?n:l,C(),A(),B(),"up"===e.direction?n:l])}}});r("L",x(k))}}}))}();
