UNPKG

vue-hooks-plus

Version:
1 lines 132 kB
var VueHooks_Plus=function(y,l){"use strict";var Lg=Object.defineProperty;var kg=(y,l,ee)=>l in y?Lg(y,l,{enumerable:!0,configurable:!0,writable:!0,value:ee}):y[l]=ee;var K=(y,l,ee)=>(kg(y,typeof l!="symbol"?l+"":l,ee),ee);const ee=(e,{manual:t,ready:n=!0,refreshDeps:r=[],refreshDepsAction:o})=>{const u=l.ref(!1);return l.watchEffect(()=>{!t&&e.options.refreshDeps!==!0&&(u.value=l.unref(n))}),r instanceof Array?l.watch([u,...r],([a])=>{!a||!t&&a&&(o?o():e.refresh())},{deep:!0,immediate:!1}):l.watch(u,a=>{!t&&a&&(o?o():e.refresh())}),{name:"autoRunPlugin",onBefore:()=>{if(!l.unref(n))return{stopNow:!0}}}};ee.onInit=({ready:e=!0,manual:t})=>({loading:!t&&l.unref(e)});const me=new Map,Ru=(e,t,n)=>{const r=me.get(e);r!=null&&r.timer&&clearTimeout(r.timer);let o;t>-1&&(o=setTimeout(()=>{me.delete(e)},t)),me.set(e,{...n,timer:o})},Fu=e=>me.get(e),Lu=e=>{e?(Array.isArray(e)?e:[e]).forEach(n=>me.delete(n)):me.clear()},Xe=new Map,ku=e=>Xe.get(e),Nu=(e,t)=>{Xe.set(e,t),t.then(n=>(Xe.delete(e),n)).catch(n=>{throw Xe.delete(e),n})},oe={},xu=[],Uu=(e,t)=>{oe[e]&&(oe[e].forEach(n=>n(t)),xu.forEach(n=>n({type:e,data:t})))},pt=(e,t)=>(oe[e]||(oe[e]=[]),oe[e].push(t),function(){const r=oe[e].indexOf(t);oe[e].splice(r,1)}),$u=(e,{cacheKey:t,cacheTime:n=5*60*1e3,staleTime:r=0,setCache:o,getCache:u})=>{const a=l.ref(),s=l.ref(),i=(d,c)=>{o?o(c):Ru(d,n,c),Uu(d,c.data)},f=(d,c=[])=>u?u(c):Fu(d);return l.watchEffect(()=>{if(!t)return;const d=f(t);d&&Object.hasOwnProperty.call(d,"data")&&(e.state.data=d.data,e.state.params=d.params,(r===-1||new Date().getTime()-d.time<=r)&&(e.state.loading=!1)),a.value=pt(t,c=>{e.setState({data:c})})}),l.onScopeDispose(()=>{var d;(d=a.value)==null||d.call(a)}),t?{name:"cachePlugin",onBefore:d=>{const c=f(t,d);return!c||!Object.hasOwnProperty.call(c,"data")?{}:r===-1||new Date().getTime()-c.time<=r?{loading:!1,data:c==null?void 0:c.data,returnNow:!0}:{data:c==null?void 0:c.data}},onRequest:(d,c)=>{let h=ku(t);return h&&h!==s.value?{servicePromise:h}:(h=d(...c),s.value=h,Nu(t,h),{servicePromise:h})},onSuccess:(d,c)=>{var h;t&&((h=a.value)==null||h.call(a),i(t,{data:d,params:c,time:new Date().getTime()}),a.value=pt(t,g=>{e.setState({data:g})}))},onMutate:d=>{var c;t&&((c=a.value)==null||c.call(a),i(t,{data:d,params:e.state.params,time:new Date().getTime()}),a.value=pt(t,h=>{e.setState({data:h})}))}}:{}};function M(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Bu=typeof global=="object"&&global&&global.Object===Object&&global;const En=Bu;var Vu=typeof self=="object"&&self&&self.Object===Object&&self,Mu=En||Vu||Function("return this")();const H=Mu;var ju=function(){return H.Date.now()};const Et=ju;var Hu=/\s/;function zu(e){for(var t=e.length;t--&&Hu.test(e.charAt(t)););return t}var Ku=/^\s+/;function qu(e){return e&&e.slice(0,zu(e)+1).replace(Ku,"")}var Gu=H.Symbol;const te=Gu;var vn=Object.prototype,Wu=vn.hasOwnProperty,Yu=vn.toString,De=te?te.toStringTag:void 0;function Xu(e){var t=Wu.call(e,De),n=e[De];try{e[De]=void 0;var r=!0}catch{}var o=Yu.call(e);return r&&(t?e[De]=n:delete e[De]),o}var Zu=Object.prototype,Ju=Zu.toString;function Qu(e){return Ju.call(e)}var ea="[object Null]",ta="[object Undefined]",yn=te?te.toStringTag:void 0;function ue(e){return e==null?e===void 0?ta:ea:yn&&yn in Object(e)?Xu(e):Qu(e)}function q(e){return e!=null&&typeof e=="object"}var na="[object Symbol]";function ra(e){return typeof e=="symbol"||q(e)&&ue(e)==na}var bn=0/0,oa=/^[-+]0x[0-9a-f]+$/i,ua=/^0b[01]+$/i,aa=/^0o[0-7]+$/i,sa=parseInt;function Tn(e){if(typeof e=="number")return e;if(ra(e))return bn;if(M(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=M(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qu(e);var n=ua.test(e);return n||aa.test(e)?sa(e.slice(2),n?2:8):oa.test(e)?bn:+e}var ia="Expected a function",la=Math.max,ca=Math.min;function vt(e,t,n){var r,o,u,a,s,i,f=0,d=!1,c=!1,h=!0;if(typeof e!="function")throw new TypeError(ia);t=Tn(t)||0,M(n)&&(d=!!n.leading,c="maxWait"in n,u=c?la(Tn(n.maxWait)||0,t):u,h="trailing"in n?!!n.trailing:h);function g(O){var L=r,k=o;return r=o=void 0,f=O,a=e.apply(k,L),a}function _(O){return f=O,s=setTimeout(p,t),d?g(O):a}function E(O){var L=O-i,k=O-f,$=t-L;return c?ca($,u-k):$}function m(O){var L=O-i,k=O-f;return i===void 0||L>=t||L<0||c&&k>=u}function p(){var O=Et();if(m(O))return T(O);s=setTimeout(p,E(O))}function T(O){return s=void 0,h&&r?g(O):(r=o=void 0,a)}function A(){s!==void 0&&clearTimeout(s),f=0,r=i=o=s=void 0}function S(){return s===void 0?a:T(Et())}function w(){var O=Et(),L=m(O);if(r=arguments,o=this,i=O,L){if(s===void 0)return _(i);if(c)return clearTimeout(s),s=setTimeout(p,t),g(i)}return s===void 0&&(s=setTimeout(p,t)),a}return w.cancel=A,w.flush=S,w}const fa=(e,{debounceWait:t,debounceLeading:n,debounceTrailing:r,debounceMaxWait:o})=>{const u=l.ref(),a=l.computed(()=>{const s={},i=l.unref(n),f=l.unref(r),d=l.unref(o);return i!==void 0&&(s.leading=i),f!==void 0&&(s.trailing=f),d!==void 0&&(s.maxWait=d),s});return l.watchEffect(s=>{if(l.unref(t)){const i=e.runAsync.bind(e);u.value=vt(f=>{f()},l.unref(t),a.value),e.runAsync=(...f)=>new Promise((d,c)=>{var h;(h=u.value)==null||h.call(u,()=>{i(...f).then(d).catch(c)})}),s(()=>{var f;(f=u.value)==null||f.cancel(),e.runAsync=i})}}),l.unref(t)?{name:"debouncePlugin",onCancel:()=>{var s;(s=u.value)==null||s.cancel()}}:{}};function da(e){const n=e.toString().match(/^function\s+([^\s(]+)/);return n?n[1]:""}function ga(e){const t=e.toString(),n=/([a-zA-Z$_][a-zA-Z0-9$_]*)\s*\(/,r=t.match(n);return r?r[1].trim():""}function ha(e){return e==="pending"?16747520:e==="done"?6586111:e==="error"?16724736:e==="cancel"?10500409:e==="mutate"?27647:4873398}class _a{constructor(){K(this,"requestInstances",new Map);K(this,"listeners",[])}emit(t){this.listeners.forEach(n=>n(t))}subscribe(t){return this.listeners.push(t),()=>{const n=this.listeners.indexOf(t);this.listeners.splice(n,1)}}insert(t,n){this.requestInstances.set(t,{...n}),this.emit({key:t,...n})}update(t,n){this.has(t)&&this.requestInstances.set(t,{...this.requestInstances.get(t),...n})}has(t){return this.requestInstances.has(t)}reset(t){if(this.requestInstances.has(t)){const n=this.requestInstances.get(t);this.requestInstances.clear(),this.insert(t,n)}else this.requestInstances.clear()}getAll(){return this.requestInstances}}const N=new _a,ma=(e,{ready:t=!0,debugKey:n,...r})=>{const o=()=>{if(n&&!N.has(n)){const a=e.serviceRef.value.toString().includes("function")?da(e.serviceRef.value.toString()):ga(e.serviceRef.value.toString());N.insert(n,{instance:e,requestName:a,time:Date.now()})}},u=l.computed(()=>Object.fromEntries(Object.entries({ready:t,...r}).map(([a,s])=>[a,l.unref(s)])));return l.watchEffect(()=>{n&&N.has(n)&&N.emit({...e,options:{...e.options,...u.value}})}),{name:"devtoolsPlugin",onBefore:a=>{o(),n&&N.has(n)&&N.emit({...e.state,key:n,params:a,loading:!0,time:Date.now(),type:"pending"})},onSuccess(a,s){o(),n&&N.has(n)&&N.emit({...e.state,key:n,data:a,params:s,loading:!1,time:Date.now(),type:"done"})},onCancel(){o(),n&&N.has(n)&&N.emit({...e.state,key:n,loading:!1,time:Date.now(),type:"cancel"})},onError(a,s){o(),n&&N.has(n)&&N.emit({...e.state,key:n,params:s,loading:!1,error:a,time:Date.now(),type:"error"})},onMutate(a){o(),n&&N.has(n)&&N.emit({...e.state,key:n,data:a,loading:!1,time:Date.now(),type:"mutate"})}}},pa=(e,{loadingDelay:t})=>{const n=l.ref(),r=()=>{n.value&&(clearTimeout(l.unref(n.value)),n.value=void 0)};return{name:"loadingDelayPlugin",onFinally:()=>{r();const o=l.unref(t);o&&(e.setState({loading:!0}),n.value=setTimeout(()=>{e.setState({loading:!1})},o))},onError:()=>{r()}}};function yt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}const Ea=!!(typeof window<"u"&&window.document&&window.document.createElement);function bt(){return yt()?document.visibilityState!=="hidden":!0}const Ie=[];function va(e){return Ie.push(e),function(){const n=Ie.indexOf(e);Ie.splice(n,1)}}if(yt()){const e=()=>{if(!!bt())for(let t=0;t<Ie.length;t++){const n=Ie[t];n()}};window.addEventListener("visibilitychange",e,!1)}const ya=(e,{pollingInterval:t,pollingWhenHidden:n=!0,pollingErrorRetryCount:r=-1})=>{let o;const u=l.ref(),a=l.ref(0),s=()=>{var i;o&&clearTimeout(o),(i=u.value)==null||i.call(u)};return l.watchEffect(()=>{l.unref(t)||s()}),l.unref(t)?{name:"pollingPlugin",onBefore:()=>{s()},onError:()=>{a.value+=1},onSuccess:()=>{a.value=0},onFinally:()=>{r===-1||r!==-1&&a.value<=r?o=setTimeout(()=>{!n&&!bt()?u.value=va(()=>{e.refresh()}):e.refresh()},l.unref(t)):a.value=0},onCancel:()=>{s()}}:{}};function ba(e,t){let n=!1;return(...r)=>{n||(n=!0,e(...r),setTimeout(()=>{n=!1},t))}}function Ta(){return yt()&&typeof navigator.onLine<"u"?navigator.onLine:!0}const Pe=[];function Aa(e){return Pe.push(e),function(){const n=Pe.indexOf(e);n>-1&&Pe.splice(n,1)}}if(Ea){const e=()=>{if(!(!bt()||!Ta()))for(let t=0;t<Pe.length;t++){const n=Pe[t];n()}};window.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",e,!1)}const wa=(e,{refreshOnWindowFocus:t,focusTimespan:n=5e3})=>{const r=l.ref(),o=()=>{var u;(u=r.value)==null||u.call(r)};return l.watchEffect(u=>{if(l.unref(t)){const a=ba(e.refresh.bind(e),l.unref(n));r.value=Aa(()=>{a()})}u(()=>{o()})}),l.onScopeDispose(()=>{o()}),{name:"refreshOnWindowFocusPlugin"}},Oa=(e,{retryInterval:t,retryCount:n})=>{const r=l.ref(),o=l.ref(0),u=l.ref(!1);return n?{name:"retryPlugin",onBefore:()=>{u.value||(o.value=0),u.value=!1,r.value&&clearTimeout(r.value)},onSuccess:()=>{o.value=0},onError:()=>{if(o.value+=1,n===-1||o.value<=n){const a=t!=null?t:Math.min(1e3*2**o.value,3e4);r.value=setTimeout(()=>{u.value=!0,e.refresh()},a)}else o.value=0},onCancel:()=>{o.value=0,r.value&&clearTimeout(r.value)}}:{}};var Sa=Array.isArray;const ae=Sa;function An(e){return e}var Ca="[object AsyncFunction]",Da="[object Function]",Ia="[object GeneratorFunction]",Pa="[object Proxy]";function Tt(e){if(!M(e))return!1;var t=ue(e);return t==Da||t==Ia||t==Ca||t==Pa}var Ra=H["__core-js_shared__"];const At=Ra;var wn=function(){var e=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Fa(e){return!!wn&&wn in e}var La=Function.prototype,ka=La.toString;function se(e){if(e!=null){try{return ka.call(e)}catch{}try{return e+""}catch{}}return""}var Na=/[\\^$.*+?()[\]{}|]/g,xa=/^\[object .+?Constructor\]$/,Ua=Function.prototype,$a=Object.prototype,Ba=Ua.toString,Va=$a.hasOwnProperty,Ma=RegExp("^"+Ba.call(Va).replace(Na,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ja(e){if(!M(e)||Fa(e))return!1;var t=Tt(e)?Ma:xa;return t.test(se(e))}function Ha(e,t){return e==null?void 0:e[t]}function ie(e,t){var n=Ha(e,t);return ja(n)?n:void 0}var za=ie(H,"WeakMap");const wt=za;var On=Object.create,Ka=function(){function e(){}return function(t){if(!M(t))return{};if(On)return On(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const qa=Ka;function Ga(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Sn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Wa=800,Ya=16,Xa=Date.now;function Za(e){var t=0,n=0;return function(){var r=Xa(),o=Ya-(r-n);if(n=r,o>0){if(++t>=Wa)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ja(e){return function(){return e}}var Qa=function(){try{var e=ie(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Ze=Qa;var es=Ze?function(e,t){return Ze(e,"toString",{configurable:!0,enumerable:!1,value:Ja(t),writable:!0})}:An,ts=Za(es);const ns=ts;function rs(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var os=9007199254740991,us=/^(?:0|[1-9]\d*)$/;function Cn(e,t){var n=typeof e;return t=t==null?os:t,!!t&&(n=="number"||n!="symbol"&&us.test(e))&&e>-1&&e%1==0&&e<t}function Ot(e,t,n){t=="__proto__"&&Ze?Ze(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Re(e,t){return e===t||e!==e&&t!==t}var as=Object.prototype,ss=as.hasOwnProperty;function Dn(e,t,n){var r=e[t];(!(ss.call(e,t)&&Re(r,n))||n===void 0&&!(t in e))&&Ot(e,t,n)}function Fe(e,t,n,r){var o=!n;n||(n={});for(var u=-1,a=t.length;++u<a;){var s=t[u],i=r?r(n[s],e[s],s,n,e):void 0;i===void 0&&(i=e[s]),o?Ot(n,s,i):Dn(n,s,i)}return n}var In=Math.max;function is(e,t,n){return t=In(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,u=In(r.length-t,0),a=Array(u);++o<u;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),Ga(e,this,s)}}function ls(e,t){return ns(is(e,t,An),e+"")}var cs=9007199254740991;function Pn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cs}function Je(e){return e!=null&&Pn(e.length)&&!Tt(e)}function fs(e,t,n){if(!M(n))return!1;var r=typeof t;return(r=="number"?Je(n)&&Cn(t,n.length):r=="string"&&t in n)?Re(n[t],e):!1}function ds(e){return ls(function(t,n){var r=-1,o=n.length,u=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(u=e.length>3&&typeof u=="function"?(o--,u):void 0,a&&fs(n[0],n[1],a)&&(u=o<3?void 0:u,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,u)}return t})}var gs=Object.prototype;function St(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gs;return e===n}function hs(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var _s="[object Arguments]";function Rn(e){return q(e)&&ue(e)==_s}var Fn=Object.prototype,ms=Fn.hasOwnProperty,ps=Fn.propertyIsEnumerable,Es=Rn(function(){return arguments}())?Rn:function(e){return q(e)&&ms.call(e,"callee")&&!ps.call(e,"callee")};const Ct=Es;function vs(){return!1}var Ln=typeof y=="object"&&y&&!y.nodeType&&y,kn=Ln&&typeof module=="object"&&module&&!module.nodeType&&module,ys=kn&&kn.exports===Ln,Nn=ys?H.Buffer:void 0,bs=Nn?Nn.isBuffer:void 0,Ts=bs||vs;const Le=Ts;var As="[object Arguments]",ws="[object Array]",Os="[object Boolean]",Ss="[object Date]",Cs="[object Error]",Ds="[object Function]",Is="[object Map]",Ps="[object Number]",Rs="[object Object]",Fs="[object RegExp]",Ls="[object Set]",ks="[object String]",Ns="[object WeakMap]",xs="[object ArrayBuffer]",Us="[object DataView]",$s="[object Float32Array]",Bs="[object Float64Array]",Vs="[object Int8Array]",Ms="[object Int16Array]",js="[object Int32Array]",Hs="[object Uint8Array]",zs="[object Uint8ClampedArray]",Ks="[object Uint16Array]",qs="[object Uint32Array]",P={};P[$s]=P[Bs]=P[Vs]=P[Ms]=P[js]=P[Hs]=P[zs]=P[Ks]=P[qs]=!0,P[As]=P[ws]=P[xs]=P[Os]=P[Us]=P[Ss]=P[Cs]=P[Ds]=P[Is]=P[Ps]=P[Rs]=P[Fs]=P[Ls]=P[ks]=P[Ns]=!1;function Gs(e){return q(e)&&Pn(e.length)&&!!P[ue(e)]}function Dt(e){return function(t){return e(t)}}var xn=typeof y=="object"&&y&&!y.nodeType&&y,ke=xn&&typeof module=="object"&&module&&!module.nodeType&&module,Ws=ke&&ke.exports===xn,It=Ws&&En.process,Ys=function(){try{var e=ke&&ke.require&&ke.require("util").types;return e||It&&It.binding&&It.binding("util")}catch{}}();const pe=Ys;var Un=pe&&pe.isTypedArray,Xs=Un?Dt(Un):Gs;const Pt=Xs;var Zs=Object.prototype,Js=Zs.hasOwnProperty;function $n(e,t){var n=ae(e),r=!n&&Ct(e),o=!n&&!r&&Le(e),u=!n&&!r&&!o&&Pt(e),a=n||r||o||u,s=a?hs(e.length,String):[],i=s.length;for(var f in e)(t||Js.call(e,f))&&!(a&&(f=="length"||o&&(f=="offset"||f=="parent")||u&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Cn(f,i)))&&s.push(f);return s}function Bn(e,t){return function(n){return e(t(n))}}var Qs=Bn(Object.keys,Object);const ei=Qs;var ti=Object.prototype,ni=ti.hasOwnProperty;function ri(e){if(!St(e))return ei(e);var t=[];for(var n in Object(e))ni.call(e,n)&&n!="constructor"&&t.push(n);return t}function Rt(e){return Je(e)?$n(e):ri(e)}function oi(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ui=Object.prototype,ai=ui.hasOwnProperty;function si(e){if(!M(e))return oi(e);var t=St(e),n=[];for(var r in e)r=="constructor"&&(t||!ai.call(e,r))||n.push(r);return n}function Ne(e){return Je(e)?$n(e,!0):si(e)}var ii=ie(Object,"create");const xe=ii;function li(){this.__data__=xe?xe(null):{},this.size=0}function ci(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fi="__lodash_hash_undefined__",di=Object.prototype,gi=di.hasOwnProperty;function hi(e){var t=this.__data__;if(xe){var n=t[e];return n===fi?void 0:n}return gi.call(t,e)?t[e]:void 0}var _i=Object.prototype,mi=_i.hasOwnProperty;function pi(e){var t=this.__data__;return xe?t[e]!==void 0:mi.call(t,e)}var Ei="__lodash_hash_undefined__";function vi(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xe&&t===void 0?Ei:t,this}function le(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}le.prototype.clear=li,le.prototype.delete=ci,le.prototype.get=hi,le.prototype.has=pi,le.prototype.set=vi;function yi(){this.__data__=[],this.size=0}function Qe(e,t){for(var n=e.length;n--;)if(Re(e[n][0],t))return n;return-1}var bi=Array.prototype,Ti=bi.splice;function Ai(e){var t=this.__data__,n=Qe(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ti.call(t,n,1),--this.size,!0}function wi(e){var t=this.__data__,n=Qe(t,e);return n<0?void 0:t[n][1]}function Oi(e){return Qe(this.__data__,e)>-1}function Si(e,t){var n=this.__data__,r=Qe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Z(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Z.prototype.clear=yi,Z.prototype.delete=Ai,Z.prototype.get=wi,Z.prototype.has=Oi,Z.prototype.set=Si;var Ci=ie(H,"Map");const Ue=Ci;function Di(){this.size=0,this.__data__={hash:new le,map:new(Ue||Z),string:new le}}function Ii(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function et(e,t){var n=e.__data__;return Ii(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Pi(e){var t=et(this,e).delete(e);return this.size-=t?1:0,t}function Ri(e){return et(this,e).get(e)}function Fi(e){return et(this,e).has(e)}function Li(e,t){var n=et(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ce(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ce.prototype.clear=Di,ce.prototype.delete=Pi,ce.prototype.get=Ri,ce.prototype.has=Fi,ce.prototype.set=Li;function Vn(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var ki=Bn(Object.getPrototypeOf,Object);const Ft=ki;var Ni="[object Object]",xi=Function.prototype,Ui=Object.prototype,Mn=xi.toString,$i=Ui.hasOwnProperty,Bi=Mn.call(Object);function Vi(e){if(!q(e)||ue(e)!=Ni)return!1;var t=Ft(e);if(t===null)return!0;var n=$i.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Mn.call(n)==Bi}function Mi(){this.__data__=new Z,this.size=0}function ji(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Hi(e){return this.__data__.get(e)}function zi(e){return this.__data__.has(e)}var Ki=200;function qi(e,t){var n=this.__data__;if(n instanceof Z){var r=n.__data__;if(!Ue||r.length<Ki-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ce(r)}return n.set(e,t),this.size=n.size,this}function G(e){var t=this.__data__=new Z(e);this.size=t.size}G.prototype.clear=Mi,G.prototype.delete=ji,G.prototype.get=Hi,G.prototype.has=zi,G.prototype.set=qi;function Gi(e,t){return e&&Fe(t,Rt(t),e)}function Wi(e,t){return e&&Fe(t,Ne(t),e)}var jn=typeof y=="object"&&y&&!y.nodeType&&y,Hn=jn&&typeof module=="object"&&module&&!module.nodeType&&module,Yi=Hn&&Hn.exports===jn,zn=Yi?H.Buffer:void 0,Kn=zn?zn.allocUnsafe:void 0;function qn(e,t){if(t)return e.slice();var n=e.length,r=Kn?Kn(n):new e.constructor(n);return e.copy(r),r}function Xi(e,t){for(var n=-1,r=e==null?0:e.length,o=0,u=[];++n<r;){var a=e[n];t(a,n,e)&&(u[o++]=a)}return u}function Gn(){return[]}var Zi=Object.prototype,Ji=Zi.propertyIsEnumerable,Wn=Object.getOwnPropertySymbols,Qi=Wn?function(e){return e==null?[]:(e=Object(e),Xi(Wn(e),function(t){return Ji.call(e,t)}))}:Gn;const Lt=Qi;function el(e,t){return Fe(e,Lt(e),t)}var tl=Object.getOwnPropertySymbols,nl=tl?function(e){for(var t=[];e;)Vn(t,Lt(e)),e=Ft(e);return t}:Gn;const Yn=nl;function rl(e,t){return Fe(e,Yn(e),t)}function Xn(e,t,n){var r=t(e);return ae(e)?r:Vn(r,n(e))}function kt(e){return Xn(e,Rt,Lt)}function ol(e){return Xn(e,Ne,Yn)}var ul=ie(H,"DataView");const Nt=ul;var al=ie(H,"Promise");const xt=al;var sl=ie(H,"Set");const Ut=sl;var Zn="[object Map]",il="[object Object]",Jn="[object Promise]",Qn="[object Set]",er="[object WeakMap]",tr="[object DataView]",ll=se(Nt),cl=se(Ue),fl=se(xt),dl=se(Ut),gl=se(wt),fe=ue;(Nt&&fe(new Nt(new ArrayBuffer(1)))!=tr||Ue&&fe(new Ue)!=Zn||xt&&fe(xt.resolve())!=Jn||Ut&&fe(new Ut)!=Qn||wt&&fe(new wt)!=er)&&(fe=function(e){var t=ue(e),n=t==il?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case ll:return tr;case cl:return Zn;case fl:return Jn;case dl:return Qn;case gl:return er}return t});const $e=fe;var hl=Object.prototype,_l=hl.hasOwnProperty;function ml(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&_l.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var pl=H.Uint8Array;const tt=pl;function $t(e){var t=new e.constructor(e.byteLength);return new tt(t).set(new tt(e)),t}function El(e,t){var n=t?$t(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var vl=/\w*$/;function yl(e){var t=new e.constructor(e.source,vl.exec(e));return t.lastIndex=e.lastIndex,t}var nr=te?te.prototype:void 0,rr=nr?nr.valueOf:void 0;function bl(e){return rr?Object(rr.call(e)):{}}function or(e,t){var n=t?$t(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Tl="[object Boolean]",Al="[object Date]",wl="[object Map]",Ol="[object Number]",Sl="[object RegExp]",Cl="[object Set]",Dl="[object String]",Il="[object Symbol]",Pl="[object ArrayBuffer]",Rl="[object DataView]",Fl="[object Float32Array]",Ll="[object Float64Array]",kl="[object Int8Array]",Nl="[object Int16Array]",xl="[object Int32Array]",Ul="[object Uint8Array]",$l="[object Uint8ClampedArray]",Bl="[object Uint16Array]",Vl="[object Uint32Array]";function Ml(e,t,n){var r=e.constructor;switch(t){case Pl:return $t(e);case Tl:case Al:return new r(+e);case Rl:return El(e,n);case Fl:case Ll:case kl:case Nl:case xl:case Ul:case $l:case Bl:case Vl:return or(e,n);case wl:return new r;case Ol:case Dl:return new r(e);case Sl:return yl(e);case Cl:return new r;case Il:return bl(e)}}function ur(e){return typeof e.constructor=="function"&&!St(e)?qa(Ft(e)):{}}var jl="[object Map]";function Hl(e){return q(e)&&$e(e)==jl}var ar=pe&&pe.isMap,zl=ar?Dt(ar):Hl;const Kl=zl;var ql="[object Set]";function Gl(e){return q(e)&&$e(e)==ql}var sr=pe&&pe.isSet,Wl=sr?Dt(sr):Gl;const Yl=Wl;var Xl=1,Zl=2,Jl=4,ir="[object Arguments]",Ql="[object Array]",ec="[object Boolean]",tc="[object Date]",nc="[object Error]",lr="[object Function]",rc="[object GeneratorFunction]",oc="[object Map]",uc="[object Number]",cr="[object Object]",ac="[object RegExp]",sc="[object Set]",ic="[object String]",lc="[object Symbol]",cc="[object WeakMap]",fc="[object ArrayBuffer]",dc="[object DataView]",gc="[object Float32Array]",hc="[object Float64Array]",_c="[object Int8Array]",mc="[object Int16Array]",pc="[object Int32Array]",Ec="[object Uint8Array]",vc="[object Uint8ClampedArray]",yc="[object Uint16Array]",bc="[object Uint32Array]",D={};D[ir]=D[Ql]=D[fc]=D[dc]=D[ec]=D[tc]=D[gc]=D[hc]=D[_c]=D[mc]=D[pc]=D[oc]=D[uc]=D[cr]=D[ac]=D[sc]=D[ic]=D[lc]=D[Ec]=D[vc]=D[yc]=D[bc]=!0,D[nc]=D[lr]=D[cc]=!1;function nt(e,t,n,r,o,u){var a,s=t&Xl,i=t&Zl,f=t&Jl;if(n&&(a=o?n(e,r,o,u):n(e)),a!==void 0)return a;if(!M(e))return e;var d=ae(e);if(d){if(a=ml(e),!s)return Sn(e,a)}else{var c=$e(e),h=c==lr||c==rc;if(Le(e))return qn(e,s);if(c==cr||c==ir||h&&!o){if(a=i||h?{}:ur(e),!s)return i?rl(e,Wi(a,e)):el(e,Gi(a,e))}else{if(!D[c])return o?e:{};a=Ml(e,c,s)}}u||(u=new G);var g=u.get(e);if(g)return g;u.set(e,a),Yl(e)?e.forEach(function(m){a.add(nt(m,t,n,m,e,u))}):Kl(e)&&e.forEach(function(m,p){a.set(p,nt(m,t,n,p,e,u))});var _=f?i?ol:kt:i?Ne:Rt,E=d?void 0:_(e);return rs(E||e,function(m,p){E&&(p=m,m=e[p]),Dn(a,p,nt(m,t,n,p,e,u))}),a}var Tc=1,Ac=4;function fr(e){return nt(e,Tc|Ac)}var wc="__lodash_hash_undefined__";function Oc(e){return this.__data__.set(e,wc),this}function Sc(e){return this.__data__.has(e)}function rt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ce;++t<n;)this.add(e[t])}rt.prototype.add=rt.prototype.push=Oc,rt.prototype.has=Sc;function Cc(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Dc(e,t){return e.has(t)}var Ic=1,Pc=2;function dr(e,t,n,r,o,u){var a=n&Ic,s=e.length,i=t.length;if(s!=i&&!(a&&i>s))return!1;var f=u.get(e),d=u.get(t);if(f&&d)return f==t&&d==e;var c=-1,h=!0,g=n&Pc?new rt:void 0;for(u.set(e,t),u.set(t,e);++c<s;){var _=e[c],E=t[c];if(r)var m=a?r(E,_,c,t,e,u):r(_,E,c,e,t,u);if(m!==void 0){if(m)continue;h=!1;break}if(g){if(!Cc(t,function(p,T){if(!Dc(g,T)&&(_===p||o(_,p,n,r,u)))return g.push(T)})){h=!1;break}}else if(!(_===E||o(_,E,n,r,u))){h=!1;break}}return u.delete(e),u.delete(t),h}function Rc(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Fc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Lc=1,kc=2,Nc="[object Boolean]",xc="[object Date]",Uc="[object Error]",$c="[object Map]",Bc="[object Number]",Vc="[object RegExp]",Mc="[object Set]",jc="[object String]",Hc="[object Symbol]",zc="[object ArrayBuffer]",Kc="[object DataView]",gr=te?te.prototype:void 0,Bt=gr?gr.valueOf:void 0;function qc(e,t,n,r,o,u,a){switch(n){case Kc:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zc:return!(e.byteLength!=t.byteLength||!u(new tt(e),new tt(t)));case Nc:case xc:case Bc:return Re(+e,+t);case Uc:return e.name==t.name&&e.message==t.message;case Vc:case jc:return e==t+"";case $c:var s=Rc;case Mc:var i=r&Lc;if(s||(s=Fc),e.size!=t.size&&!i)return!1;var f=a.get(e);if(f)return f==t;r|=kc,a.set(e,t);var d=dr(s(e),s(t),r,o,u,a);return a.delete(e),d;case Hc:if(Bt)return Bt.call(e)==Bt.call(t)}return!1}var Gc=1,Wc=Object.prototype,Yc=Wc.hasOwnProperty;function Xc(e,t,n,r,o,u){var a=n&Gc,s=kt(e),i=s.length,f=kt(t),d=f.length;if(i!=d&&!a)return!1;for(var c=i;c--;){var h=s[c];if(!(a?h in t:Yc.call(t,h)))return!1}var g=u.get(e),_=u.get(t);if(g&&_)return g==t&&_==e;var E=!0;u.set(e,t),u.set(t,e);for(var m=a;++c<i;){h=s[c];var p=e[h],T=t[h];if(r)var A=a?r(T,p,h,t,e,u):r(p,T,h,e,t,u);if(!(A===void 0?p===T||o(p,T,n,r,u):A)){E=!1;break}m||(m=h=="constructor")}if(E&&!m){var S=e.constructor,w=t.constructor;S!=w&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof w=="function"&&w instanceof w)&&(E=!1)}return u.delete(e),u.delete(t),E}var Zc=1,hr="[object Arguments]",_r="[object Array]",ot="[object Object]",Jc=Object.prototype,mr=Jc.hasOwnProperty;function Qc(e,t,n,r,o,u){var a=ae(e),s=ae(t),i=a?_r:$e(e),f=s?_r:$e(t);i=i==hr?ot:i,f=f==hr?ot:f;var d=i==ot,c=f==ot,h=i==f;if(h&&Le(e)){if(!Le(t))return!1;a=!0,d=!1}if(h&&!d)return u||(u=new G),a||Pt(e)?dr(e,t,n,r,o,u):qc(e,t,i,n,r,o,u);if(!(n&Zc)){var g=d&&mr.call(e,"__wrapped__"),_=c&&mr.call(t,"__wrapped__");if(g||_){var E=g?e.value():e,m=_?t.value():t;return u||(u=new G),o(E,m,n,r,u)}}return h?(u||(u=new G),Xc(e,t,n,r,o,u)):!1}function pr(e,t,n,r,o){return e===t?!0:e==null||t==null||!q(e)&&!q(t)?e!==e&&t!==t:Qc(e,t,n,r,pr,o)}function ef(e){return function(t,n,r){for(var o=-1,u=Object(t),a=r(t),s=a.length;s--;){var i=a[e?s:++o];if(n(u[i],i,u)===!1)break}return t}}var tf=ef();const nf=tf;function Vt(e,t,n){(n!==void 0&&!Re(e[t],n)||n===void 0&&!(t in e))&&Ot(e,t,n)}function rf(e){return q(e)&&Je(e)}function Mt(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function of(e){return Fe(e,Ne(e))}function uf(e,t,n,r,o,u,a){var s=Mt(e,n),i=Mt(t,n),f=a.get(i);if(f){Vt(e,n,f);return}var d=u?u(s,i,n+"",e,t,a):void 0,c=d===void 0;if(c){var h=ae(i),g=!h&&Le(i),_=!h&&!g&&Pt(i);d=i,h||g||_?ae(s)?d=s:rf(s)?d=Sn(s):g?(c=!1,d=qn(i,!0)):_?(c=!1,d=or(i,!0)):d=[]:Vi(i)||Ct(i)?(d=s,Ct(s)?d=of(s):(!M(s)||Tt(s))&&(d=ur(i))):c=!1}c&&(a.set(i,d),o(d,i,r,u,a),a.delete(i)),Vt(e,n,d)}function Er(e,t,n,r,o){e!==t&&nf(t,function(u,a){if(o||(o=new G),M(u))uf(e,t,a,n,Er,r,o);else{var s=r?r(Mt(e,a),u,a+"",e,t,o):void 0;s===void 0&&(s=u),Vt(e,a,s)}},Ne)}function vr(e,t){return pr(e,t)}var af=ds(function(e,t,n){Er(e,t,n)});const sf=af;var lf="Expected a function";function yr(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(lf);return M(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),vt(e,t,{leading:r,maxWait:t,trailing:o})}const cf=(e,{throttleWait:t,throttleLeading:n,throttleTrailing:r})=>{let o=null;const u=l.computed(()=>{const f={};return l.unref(n)!==void 0&&(f.leading=l.unref(n)),l.unref(r)!==void 0&&(f.trailing=l.unref(r)),f}),a=e.runAsync.bind(e),s=l.ref(),i=l.computed(()=>l.unref(t));return l.watch([i,u],f=>{o&&(o.cancel(),e.runAsync=a);const[d,c]=f,h=yr(g=>{g()},l.unref(d),c);o=h,s.value=h,e.runAsync=(...g)=>new Promise((_,E)=>{var m;(m=s.value)==null||m.call(s,()=>{a(...g).then(_).catch(E)})})},{immediate:!0}),l.unref(t)?(l.onUnmounted(()=>{var f;(f=s.value)==null||f.cancel()}),{name:"throttlePlugin",onCancel:()=>{var f;(f=s.value)==null||f.cancel()}}):{}},br=e=>typeof e=="function",ff=e=>typeof e=="boolean";class df{constructor(t,n,r,o={}){K(this,"pluginImpls");K(this,"count",0);K(this,"state",{loading:!1,params:void 0,data:void 0,error:void 0});K(this,"previousValidData");this.serviceRef=t,this.options=n,this.setUpdateData=r,this.initState=o,this.state={...this.state,loading:!n.manual,...o}}setState(t={}){this.state={...this.state,...t},this.setUpdateData(this.state)}setData(t,n){console.warn("Please use 'setFetchState' instead of 'setData'"),n instanceof Array?n.forEach(r=>{this.state[r]=t,this.setUpdateData(t,r)}):(this.state[n]=t,this.setUpdateData(t,n))}setFetchState(t,n){n instanceof Array?n.forEach(r=>{this.state[r]=t,this.setUpdateData(t,r)}):(this.state[n]=t,this.setUpdateData(t,n))}runPluginHandler(t,...n){var o,u,a;const r=(a=(u=(o=this.pluginImpls)==null?void 0:o.map(s=>{var i;return(i=s[t])==null?void 0:i.call(s,...n)}))!=null?u:[])==null?void 0:a.filter(Boolean);return Object.assign({},...r)}async runAsync(...t){var a,s,i,f,d,c,h,g,_,E,m;this.count+=1;const n=this.count,{stopNow:r=!1,returnNow:o=!1,...u}=this.runPluginHandler("onBefore",t);if(r)return new Promise(()=>{});if(this.setState({loading:!0,params:t,...u}),o)return Promise.resolve(u.data);try{(s=(a=this.options).onBefore)==null||s.call(a,t)}catch(p){return this.setState({error:p,loading:!1}),(f=(i=this.options).onError)==null||f.call(i,p,t),this.runPluginHandler("onError",p,t),new Promise(()=>{})}try{let{servicePromise:p}=this.runPluginHandler("onRequest",this.serviceRef.value,t);const T=S=>{var L,k,$,R;if(!this.options.concurrent&&n!==this.count)return new Promise(()=>{});const w=this.options.formatResult?this.options.formatResult(S):S,O={data:S};return this.setState({data:w,error:void 0,loading:!1}),(k=(L=this.options).onSuccess)==null||k.call(L,w,t),this.runPluginHandler("onSuccess",w,t,O),this.previousValidData=w,(R=($=this.options).onFinally)==null||R.call($,t,w,void 0),(this.options.concurrent||n===this.count)&&this.runPluginHandler("onFinally",t,w,void 0),w};p||(p=this.serviceRef.value(...t));const A=await p;return T(A)}catch(p){if(!this.options.concurrent&&n!==this.count)return new Promise(()=>{});throw this.setState({error:p,loading:!1}),(c=(d=this.options).onError)==null||c.call(d,p,t),this.runPluginHandler("onError",p,t),(br((h=this.options)==null?void 0:h.rollbackOnError)&&((g=this.options)==null?void 0:g.rollbackOnError(t))||ff((_=this.options)==null?void 0:_.rollbackOnError)&&this.options.rollbackOnError)&&this.setState({data:this.previousValidData}),(m=(E=this.options).onFinally)==null||m.call(E,t,void 0,p),(this.options.concurrent||n===this.count)&&this.runPluginHandler("onFinally",t,void 0,p),p}}run(...t){this.runAsync(...t).catch(n=>{this.options.onError||console.error(n)})}cancel(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")}refresh(){this.run(...this.state.params||[])}refreshAsync(){return this.runAsync(...this.state.params||[])}mutate(t){const n=br(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n})}}const Tr=Symbol("USEREQUEST_GLOBAL_OPTIONS_PROVIDE_KEY");function gf(e){return Object.keys(e).filter(n=>["data","loading","params","error"].includes(n)).length===4}function hf(e,t={},n=[]){const r=l.inject(Tr,{}),{initialData:o=void 0,manual:u=!1,ready:a=!0,...s}={...r!=null?r:{},...t!=null?t:{}},i={manual:u,ready:a,initialData:o,...s},f=l.ref(e),d=l.reactive({data:o,loading:!1,params:void 0,error:void 0}),c=(E,m)=>{m?d[m]=E:gf(E)&&(d.data=E.data,d.loading=E.loading,d.error=E.error,d.params=E.params)},h=n.map(E=>{var m;return(m=E==null?void 0:E.onInit)==null?void 0:m.call(E,i)}).filter(Boolean),g=new df(f,i,c,Object.assign({},...h,d));g.options=i,g.pluginImpls=n.map(E=>E(g,i));const _=l.computed(()=>l.isRef(a)?a.value:a);if(l.watchEffect(()=>{if(!u){const E=g.state.params||t.defaultParams||[];_.value&&g.options.refreshDeps===!0&&!!f.value&&g.run(...E)}}),!u&&g.options.refreshDeps!==!0){const E=g.state.params||t.defaultParams||[];l.unref(a)&&g.run(...E)}return l.onScopeDispose(()=>{g.cancel()}),{...l.toRefs(d),cancel:g.cancel.bind(g),refresh:g.refresh.bind(g),refreshAsync:g.refreshAsync.bind(g),run:g.run.bind(g),runAsync:g.runAsync.bind(g),mutate:g.mutate.bind(g)}}const _f=(e,t)=>function(r,o={},u=[]){let a=e;const s=t||[];for(let i=s.length;i--;)a=s[i](a);return a(r,o,u)};function ut(e,t,n){const r=[process.env.NODE_ENV==="development"?ma:null,fa,pa,ya,wa,cf,ee,$u,Oa].filter(Boolean);return _f(hf,t==null?void 0:t.use)(e,t,[...n||[],...r])}function mf(e){l.provide(Tr,e)}var pf=Object.create,Ar=Object.defineProperty,Ef=Object.getOwnPropertyDescriptor,jt=Object.getOwnPropertyNames,vf=Object.getPrototypeOf,yf=Object.prototype.hasOwnProperty,bf=(e,t)=>function(){return e&&(t=(0,e[jt(e)[0]])(e=0)),t},Tf=(e,t)=>function(){return t||(0,e[jt(e)[0]])((t={exports:{}}).exports,t),t.exports},Af=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of jt(t))!yf.call(e,o)&&o!==n&&Ar(e,o,{get:()=>t[o],enumerable:!(r=Ef(t,o))||r.enumerable});return e},wf=(e,t,n)=>(n=e!=null?pf(vf(e)):{},Af(t||!e||!e.__esModule?Ar(n,"default",{value:e,enumerable:!0}):n,e)),Be=bf({"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@22.10.5__jiti@2.4.2_postcss@8.4.49_tsx_s7k37zks4wtn7x2grzma6lrsfa/node_modules/tsup/assets/esm_shims.js"(){}}),Of=Tf({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){Be(),t.exports=r;function n(u){return u instanceof Buffer?Buffer.from(u):new u.constructor(u.buffer.slice(),u.byteOffset,u.length)}function r(u){if(u=u||{},u.circles)return o(u);const a=new Map;if(a.set(Date,c=>new Date(c)),a.set(Map,(c,h)=>new Map(i(Array.from(c),h))),a.set(Set,(c,h)=>new Set(i(Array.from(c),h))),u.constructorHandlers)for(const c of u.constructorHandlers)a.set(c[0],c[1]);let s=null;return u.proto?d:f;function i(c,h){const g=Object.keys(c),_=new Array(g.length);for(let E=0;E<g.length;E++){const m=g[E],p=c[m];typeof p!="object"||p===null?_[m]=p:p.constructor!==Object&&(s=a.get(p.constructor))?_[m]=s(p,h):ArrayBuffer.isView(p)?_[m]=n(p):_[m]=h(p)}return _}function f(c){if(typeof c!="object"||c===null)return c;if(Array.isArray(c))return i(c,f);if(c.constructor!==Object&&(s=a.get(c.constructor)))return s(c,f);const h={};for(const g in c){if(Object.hasOwnProperty.call(c,g)===!1)continue;const _=c[g];typeof _!="object"||_===null?h[g]=_:_.constructor!==Object&&(s=a.get(_.constructor))?h[g]=s(_,f):ArrayBuffer.isView(_)?h[g]=n(_):h[g]=f(_)}return h}function d(c){if(typeof c!="object"||c===null)return c;if(Array.isArray(c))return i(c,d);if(c.constructor!==Object&&(s=a.get(c.constructor)))return s(c,d);const h={};for(const g in c){const _=c[g];typeof _!="object"||_===null?h[g]=_:_.constructor!==Object&&(s=a.get(_.constructor))?h[g]=s(_,d):ArrayBuffer.isView(_)?h[g]=n(_):h[g]=d(_)}return h}}function o(u){const a=[],s=[],i=new Map;if(i.set(Date,g=>new Date(g)),i.set(Map,(g,_)=>new Map(d(Array.from(g),_))),i.set(Set,(g,_)=>new Set(d(Array.from(g),_))),u.constructorHandlers)for(const g of u.constructorHandlers)i.set(g[0],g[1]);let f=null;return u.proto?h:c;function d(g,_){const E=Object.keys(g),m=new Array(E.length);for(let p=0;p<E.length;p++){const T=E[p],A=g[T];if(typeof A!="object"||A===null)m[T]=A;else if(A.constructor!==Object&&(f=i.get(A.constructor)))m[T]=f(A,_);else if(ArrayBuffer.isView(A))m[T]=n(A);else{const S=a.indexOf(A);S!==-1?m[T]=s[S]:m[T]=_(A)}}return m}function c(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return d(g,c);if(g.constructor!==Object&&(f=i.get(g.constructor)))return f(g,c);const _={};a.push(g),s.push(_);for(const E in g){if(Object.hasOwnProperty.call(g,E)===!1)continue;const m=g[E];if(typeof m!="object"||m===null)_[E]=m;else if(m.constructor!==Object&&(f=i.get(m.constructor)))_[E]=f(m,c);else if(ArrayBuffer.isView(m))_[E]=n(m);else{const p=a.indexOf(m);p!==-1?_[E]=s[p]:_[E]=c(m)}}return a.pop(),s.pop(),_}function h(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return d(g,h);if(g.constructor!==Object&&(f=i.get(g.constructor)))return f(g,h);const _={};a.push(g),s.push(_);for(const E in g){const m=g[E];if(typeof m!="object"||m===null)_[E]=m;else if(m.constructor!==Object&&(f=i.get(m.constructor)))_[E]=f(m,h);else if(ArrayBuffer.isView(m))_[E]=n(m);else{const p=a.indexOf(m);p!==-1?_[E]=s[p]:_[E]=h(m)}}return a.pop(),s.pop(),_}}}});Be(),Be(),Be();var wr=typeof navigator<"u",b=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof b.chrome<"u"&&b.chrome.devtools,wr&&(b.self,b.top);var Or;typeof navigator<"u"&&((Or=navigator.userAgent)==null||Or.toLowerCase().includes("electron")),Be();var Sf=wf(Of(),1),Cf=/(?:^|[-_/])(\w)/g;function Df(e,t){return t?t.toUpperCase():""}function If(e){return e&&`${e}`.replace(Cf,Df)}function Pf(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const r=n.lastIndexOf("/"),o=n.substring(r+1);if(t){const u=o.lastIndexOf(t);return o.substring(0,u)}return""}var Sr=(0,Sf.default)({circles:!0});const Rf={trailing:!0};function Ee(e,t=25,n={}){if(n={...Rf,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,o,u=[],a,s;const i=(f,d)=>(a=Ff(e,f,d),a.finally(()=>{if(a=null,n.trailing&&s&&!o){const c=i(f,s);return s=null,c}}),a);return function(...f){return a?(n.trailing&&(s=f),a):new Promise(d=>{const c=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const h=n.leading?r:i(this,f);for(const g of u)g(h);u=[]},t),c?(r=i(this,f),d(r)):u.push(d)})}}async function Ff(e,t,n){return await e.apply(t,n)}function Ht(e,t={},n){for(const r in e){const o=e[r],u=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?Ht(o,t,u):typeof o=="function"&&(t[u]=o)}return t}const Lf={run:e=>e()},kf=()=>Lf,Cr=typeof console.createTask<"u"?console.createTask:kf;function Nf(e,t){const n=t.shift(),r=Cr(n);return e.reduce((o,u)=>o.then(()=>r.run(()=>u(...t))),Promise.resolve())}function xf(e,t){const n=t.shift(),r=Cr(n);return Promise.all(e.map(o=>r.run(()=>o(...t))))}function zt(e,t){for(const n of[...e])n(t)}class Uf{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const o=t;let u;for(;this._deprecatedHooks[t];)u=this._deprecatedHooks[t],t=u.to;if(u&&!r.allowDeprecated){let a=u.message;a||(a=`${o} hook has been deprecated`+(u.to?`, please use ${u.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(a)||(console.warn(a),this._deprecatedMessages.add(a))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,o=(...u)=>(typeof r=="function"&&r(),r=void 0,o=void 0,n(...u));return r=this.hook(t,o),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const o of r)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Ht(t),r=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of r.splice(0,r.length))o()}}removeHooks(t){const n=Ht(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(Nf,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(xf,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&zt(this._before,o);const u=t(n in this._hooks?[...this._hooks[n]]:[],r);return u instanceof Promise?u.finally(()=>{this._after&&o&&zt(this._after,o)}):(this._after&&o&&zt(this._after,o),u)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function Dr(){return new Uf}var $f=Object.create,Ir=Object.defineProperty,Bf=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyNames,Vf=Object.getPrototypeOf,Mf=Object.prototype.hasOwnProperty,jf=(e,t)=>function(){return e&&(t=(0,e[Kt(e)[0]])(e=0)),t},Pr=(e,t)=>function(){return t||(0,e[Kt(e)[0]])((t={exports:{}}).exports,t),t.exports},Hf=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Kt(t))!Mf.call(e,o)&&o!==n&&Ir(e,o,{get:()=>t[o],enumerable:!(r=Bf(t,o))||r.enumerable});return e},zf=(e,t,n)=>(n=e!=null?$f(Vf(e)):{},Hf(t||!e||!e.__esModule?Ir(n,"default",{value:e,enumerable:!0}):n,e)),v=jf({"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@22.10.5__jiti@2.4.2_postcss@8.4.49_tsx_s7k37zks4wtn7x2grzma6lrsfa/node_modules/tsup/assets/esm_shims.js"(){}}),Kf=Pr({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){v(),function(n){var r={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"Ae",\u00C5:"A",\u00C6:"AE",\u00C7:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"Oe",\u0150:"O",\u00D8:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"Ue",\u0170:"U",\u00DD:"Y",\u00DE:"TH",\u00DF:"ss",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"ae",\u00E5:"a",\u00E6:"ae",\u00E7:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"oe",\u0151:"o",\u00F8:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"ue",\u0171:"u",\u00FD:"y",\u00FE:"th",\u00FF:"y","\u1E9E":"SS",\u0627:"a",\u0623:"a",\u0625:"i",\u0622:"aa",\u0624:"u",\u0626:"e",\u0621:"a",\u0628:"b",\u062A:"t",\u062B:"th",\u062C:"j",\u062D:"h",\u062E:"kh",\u062F:"d",\u0630:"th",\u0631:"r",\u0632:"z",\u0633:"s",\u0634:"sh",\u0635:"s",\u0636:"dh",\u0637:"t",\u0638:"z",\u0639:"a",\u063A:"gh",\u0641:"f",\u0642:"q",\u0643:"k",\u0644:"l",\u0645:"m",\u0646:"n",\u0647:"h",\u0648:"w",\u064A:"y",\u0649:"a",\u0629:"h",\uFEFB:"la",\uFEF7:"laa",\uFEF9:"lai",\uFEF5:"laa",\u06AF:"g",\u0686:"ch",\u067E:"p",\u0698:"zh",\u06A9:"k",\u06CC:"y","\u064E":"a","\u064B":"an","\u0650":"e","\u064D":"en","\u064F":"u","\u064C":"on","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9",\u1000:"k",\u1001:"kh",\u1002:"g",\u1003:"ga",\u1004:"ng",\u1005:"s",\u1006:"sa",\u1007:"z","\u1005\u103B":"za",\u100A:"ny",\u100B:"t",\u100C:"ta",\u100D:"d",\u100E:"da",\u100F:"na",\u1010:"t",\u1011:"ta",\u1012:"d",\u1013:"da",\u1014:"n",\u1015:"p",\u1016:"pa",\u1017:"b",\u1018:"ba",\u1019:"m",\u101A:"y",\u101B:"ya",\u101C:"l",\u101D:"w",\u101E:"th",\u101F:"h",\u1020:"la",\u1021:"a","\u103C":"y","\u103B":"ya","\u103D":"w","\u103C\u103D":"yw","\u103B\u103D":"ywa","\u103E":"h",\u1027:"e","\u104F":"-e",\u1023:"i",\u1024:"-i",\u1009:"u",\u1026:"-u",\u1029:"aw","\u101E\u103C\u1031\u102C":"aw",\u102A:"aw","\u1040":"0","\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1039":"","\u1037":"","\u1038":"",\u010D:"c",\u010F:"d",\u011B:"e",\u0148:"n",\u0159:"r",\u0161:"s",\u0165:"t",\u016F:"u",\u017E:"z",\u010C:"C",\u010E:"D",\u011A:"E",\u0147:"N",\u0158:"R",\u0160:"S",\u0164:"T",\u016E:"U",\u017D:"Z",\u0780:"h",\u0781:"sh",\u0782:"n",\u0783:"r",\u0784:"b",\u0785:"lh",\u0786:"k",\u0787:"a",\u0788:"v",\u0789:"m",\u078A:"f",\u078B:"dh",\u078C:"th",\u078D:"l",\u078E:"g",\u078F:"gn",\u0790:"s",\u0791:"d",\u0792:"z",\u0793:"t",\u0794:"y",\u0795:"p",\u0796:"j",\u0797:"ch",\u0798:"tt",\u0799:"hh",\u079A:"kh",\u079B:"th",\u079C:"z",\u079D:"sh",\u079E:"s",\u079F:"d",\u07A0:"t",\u07A1:"z",\u07A2:"a",\u07A3:"gh",\u07A4:"q",\u07A5:"w","\u07A6":"a","\u07A7":"aa","\u07A8":"i","\u07A9":"ee","\u07AA":"u","\u07AB":"oo","\u07AC":"e","\u07AD":"ey","\u07AE":"o","\u07AF":"oa","\u07B0":"",\u10D0:"a",\u10D1:"b",\u10D2:"g",\u10D3:"d",\u10D4:"e",\u10D5:"v",\u10D6:"z",\u10D7:"t",\u10D8:"i",\u10D9:"k",\u10DA:"l",\u10DB:"m",\u10DC:"n",\u10DD:"o",\u10DE:"p",\u10DF:"zh",\u10E0:"r",\u10E1:"s",\u10E2:"t",\u10E3:"u",\u10E4:"p",\u10E5:"k",\u10E6:"gh",\u10E7:"q",\u10E8:"sh",\u10E9:"ch",\u10EA:"ts",\u10EB:"dz",\u10EC:"ts",\u10ED:"ch",\u10EE:"kh",\u10EF:"j",\u10F0:"h",\u03B1:"a",\u03B2:"v",\u03B3:"g",\u03B4:"d",\u03B5:"e",\u03B6:"z",\u03B7:"i",\u03B8:"th",\u03B9:"i",\u03BA:"k",\u03BB:"l",\u03BC:"m",\u03BD:"n",\u03BE:"ks",\u03BF:"o",\u03C0:"p",\u03C1:"r",\u03C3:"s",\u03C4:"t",\u03C5:"y",\u03C6:"f",\u03C7:"x",\u03C8:"ps",\u03C9:"o",\u03AC:"a",\u03AD:"e",\u03AF:"i",\u03CC:"o",\u03CD:"y",\u03AE:"i",\u03CE:"o",\u03C2:"s",\u03CA:"i",\u03B0:"y",\u03CB:"y",\u0390:"i",\u0391:"A",\u0392:"B",\u0393:"G",\u0394:"D",\u0395:"E",\u0396:"Z",\u0397:"I",\u0398:"TH",\u0399:"I",\u039A:"K",\u039B:"L",\u039C:"M",\u039D:"N",\u039E:"KS",\u039F:"O",\u03A0:"P",\u03A1:"R",\u03A3:"S",\u03A4:"T",\u03A5:"Y",\u03A6:"F",\u03A7:"X",\u03A8:"PS",\u03A9:"O",\u0386:"A",\u0388:"E",\u038A:"I",\u038C:"O",\u038E:"Y",\u0389:"I",\u038F:"O",\u03AA:"I",\u03AB:"Y",\u0101:"a",\u0113:"e",\u0123:"g",\u012B:"i",\u0137:"k",\u013C:"l",\u0146:"n",\u016B:"u",\u0100:"A",\u0112:"E",\u0122:"G",\u012A:"I",\u0136:"k",\u013B:"L",\u0145:"N",\u016A:"U",\u040C:"Kj",\u045C:"kj",\u0409:"Lj",\u0459:"lj",\u040A:"Nj",\u045A:"nj",\u0422\u0441:"Ts",\u0442\u0441:"ts",\u0105:"a",\u0107:"c",\u0119:"e",\u0142:"l",\u0144:"n",\u015B:"s",\u017A:"z",\u017C:"z",\u0104:"A",\u0106:"C",\u0118:"E",\u0141:"L",\u0143:"N",\u015A:"S",\u0179:"Z",\u017B:"Z",\u0404:"Ye",\u0406:"I",\u0407:"Yi",\u0490:"G",\u0454:"ye",\u0456:"i",\u0457:"yi",\u0491:"g",\u0103:"a",\u0102:"A",\u0219:"s",\u0218:"S",\u021B:"t",\u021A:"T",\u0163:"t",\u0162:"T",\u0430:"a",\u0431:"b",\u0432:"v",\u0433:"g",\u0434:"d",\u0435:"e",\u0451:"yo",\u0436:"zh",\u0437:"z",\u0438:"i",\u0439:"i",\u043A:"k",\u043B:"l",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"p",\u0440:"r",\u0441:"s",\u0442:"t",\u0443:"u",\u0444:"f",\u0445:"kh",\u0446:"c",\u0447:"ch",\u0448:"sh",\u0449:"sh",\u044A:"",\u044B:"y",\u044C:"",\u044D:"e",\u044E:"yu",\u044F:"ya",\u0410:"A",\u0411:"B",\u0412:"V",\u0413:"G",\u0414:"D",\u0415:"E",\u0401:"Yo",\u0416:"Zh",\u0417:"Z",\u0418:"I",\u0419:"I",\u041A:"K",\u041B:"L",\u041C:"M",\u041D:"N",\u041E:"O",\u041F:"P",\u0420:"R",\u0421:"S",\u0422:"T",\u0423:"U",\u0424:"F",\u0425:"Kh",\u0426:"C",\u0427:"Ch",\u0428:"Sh",\u0429:"Sh",\u042A:"",\u042B:"Y",\u042C:"",\u042D:"E",\u042E:"Yu",\u042F:"Ya",\u0452:"dj",\u0458:"j",\u045B:"c",\u045F:"dz",\u0402:"Dj",\u0408:"j",\u040B:"C",\u040F:"Dz",\u013E:"l",\u013A:"l",\u0155:"r",\u013D:"L",\u0139:"L",\u0154:"R",\u015F:"s",\u015E:"S",\u0131:"i",\u0130:"I",\u011F:"g",\u011E:"G",\u1EA3:"a",\u1EA2:"A",\u1EB3:"a",\u1EB2:"A",\u1EA9:"a",\u1EA8:"A",\u0111:"d",\u0110:"D",\u1EB9:"e",\u1EB8:"E",\u1EBD:"e",\u1EBC:"E",\u1EBB:"e",\u1EBA:"E",\u1EBF:"e",\u1EBE:"E",\u1EC1:"e",\u1EC0:"E",\u1EC7:"e",\u1EC6:"E",\u1EC5:"e",\u1EC4:"E",\u1EC3:"e",\u1EC2:"E",\u1ECF:"o",\u1ECD:"o",\u1ECC:"o",\u1ED1:"o",\u1ED0:"O",\u1ED3:"o",\u1ED2:"O",\u1ED5:"o",\u1ED4:"O",\u1ED9:"o",\u1ED8:"O",\u1ED7:"o",\u1ED6:"O",\u01A1:"o",\u01A0:"O",\u1EDB:"o",\u1EDA:"O",\u1EDD:"o",\u1EDC:"O",\u1EE3:"o",\u1EE2:"O",\u1EE1:"o",\u1EE0:"O",\u1EDE:"o",\u1EDF:"o",\u1ECB:"i",\u1ECA:"I",\u0129:"i",\u0128:"I",\u1EC9:"i",\u1EC8:"i",\u1EE7:"u",\u1EE6:"U",\u1EE5:"u",\u1EE4:"U",\u0169:"u",\u0168:"U",\u01B0:"u",\u01AF:"U",\u1EE9:"u",\u1EE8:"U",\u1EEB:"u",\u1EEA:"U",\u1EF1:"u",\u1EF0:"U",\u1EEF:"u",\u1EEE:"U",\u1EED:"u",\u1EEC:"\u01B0",\u1EF7:"y",\u1EF6:"y",\u1EF3:"y",\u1EF2:"Y",\u1EF5:"y",\u1EF4:"Y",\u1EF9:"y",\u1EF8:"Y",\u1EA1:"a",\u1EA0:"A",\u1EA5:"a",\u1EA4:"A",\u1EA7:"a",\u1EA6:"A",\u1EAD:"a",\u1EAC:"A",\u1EAB:"a",\u1EAA:"A",\u1EAF:"a",\u1EAE:"A",\u1EB1:"a",\u1EB0:"A",\u1EB7:"a",\u1EB6:"A",\u1EB5:"a",\u1EB4:"A","\u24EA":"0","\u2460":"1","\u2461":"2","\u2462":"3","\u2463":"4","\u2464":"5","\u2465":"6","\u2466":"7","\u2467":"8","\u2468":"9","\u2469":"10","\u246A":"11","\u246B":"12","\u246C":"13","\u246D":"14","\u246E":"15","\u246F":"16","\u2470":"17","\u2471":"18","\u2472":"18","\u2473":"18","\u24F5":"1","\u24F6":"2","\u24F