vue-hooks-plus
Version:
Vue hooks library
1 lines • 130 kB
JavaScript
var VueHooks_Plus=function(y,c){"use strict";var Fg=Object.defineProperty;var kg=(y,c,ee)=>c in y?Fg(y,c,{enumerable:!0,configurable:!0,writable:!0,value:ee}):y[c]=ee;var B=(y,c,ee)=>(kg(y,typeof c!="symbol"?c+"":c,ee),ee);const ee=(e,{manual:t,ready:n=!0,refreshDeps:r=[],refreshDepsAction:o})=>{const u=c.ref(!1);return c.watchEffect(()=>{!t&&e.options.refreshDeps!==!0&&(u.value=c.unref(n))}),r instanceof Array?c.watch([u,...r],([a])=>{!a||!t&&a&&(o?o():e.refresh())},{deep:!0,immediate:!1}):c.watch(u,a=>{!t&&a&&(o?o():e.refresh())}),{name:"autoRunPlugin",onBefore:()=>{if(!c.unref(n))return{stopNow:!0}}}};ee.onInit=({ready:e=!0,manual:t})=>({loading:!t&&c.unref(e)});const pe=new Map,Du=(e,t,n)=>{const r=pe.get(e);r!=null&&r.timer&&clearTimeout(r.timer);let o;t>-1&&(o=setTimeout(()=>{pe.delete(e)},t)),pe.set(e,{...n,timer:o})},Iu=e=>pe.get(e),Pu=e=>{e?(Array.isArray(e)?e:[e]).forEach(n=>pe.delete(n)):pe.clear()},We=new Map,Ru=e=>We.get(e),Fu=(e,t)=>{We.set(e,t),t.then(n=>(We.delete(e),n)).catch(n=>{throw We.delete(e),n})},oe={},ku=[],Lu=(e,t)=>{oe[e]&&(oe[e].forEach(n=>n(t)),ku.forEach(n=>n({type:e,data:t})))},ht=(e,t)=>(oe[e]||(oe[e]=[]),oe[e].push(t),function(){const r=oe[e].indexOf(t);oe[e].splice(r,1)}),Nu=(e,{cacheKey:t,cacheTime:n=5*60*1e3,staleTime:r=0,setCache:o,getCache:u})=>{const a=c.ref(),s=c.ref(),i=(f,l)=>{o?o(l):Du(f,n,l),Lu(f,l.data)},d=(f,l=[])=>u?u(l):Iu(f);return c.watchEffect(()=>{if(!t)return;const f=d(t);f&&Object.hasOwnProperty.call(f,"data")&&(e.state.data=f.data,e.state.params=f.params,(r===-1||new Date().getTime()-f.time<=r)&&(e.state.loading=!1)),a.value=ht(t,l=>{e.setState({data:l})})}),c.onScopeDispose(()=>{var f;(f=a.value)==null||f.call(a)}),t?{name:"cachePlugin",onBefore:f=>{const l=d(t,f);return!l||!Object.hasOwnProperty.call(l,"data")?{}:r===-1||new Date().getTime()-l.time<=r?{loading:!1,data:l==null?void 0:l.data,returnNow:!0}:{data:l==null?void 0:l.data}},onRequest:(f,l)=>{let h=Ru(t);return h&&h!==s.value?{servicePromise:h}:(h=f(...l),s.value=h,Fu(t,h),{servicePromise:h})},onSuccess:(f,l)=>{var h;t&&((h=a.value)==null||h.call(a),i(t,{data:f,params:l,time:new Date().getTime()}),a.value=ht(t,g=>{e.setState({data:g})}))},onMutate:f=>{var l;t&&((l=a.value)==null||l.call(a),i(t,{data:f,params:e.state.params,time:new Date().getTime()}),a.value=ht(t,h=>{e.setState({data:h})}))}}:{}};function j(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var xu=typeof global=="object"&&global&&global.Object===Object&&global;const pn=xu;var Uu=typeof self=="object"&&self&&self.Object===Object&&self,$u=pn||Uu||Function("return this")();const z=$u;var Bu=function(){return z.Date.now()};const _t=Bu;var Mu=/\s/;function Vu(e){for(var t=e.length;t--&&Mu.test(e.charAt(t)););return t}var ju=/^\s+/;function Hu(e){return e&&e.slice(0,Vu(e)+1).replace(ju,"")}var zu=z.Symbol;const te=zu;var mn=Object.prototype,Ku=mn.hasOwnProperty,qu=mn.toString,Ce=te?te.toStringTag:void 0;function Gu(e){var t=Ku.call(e,Ce),n=e[Ce];try{e[Ce]=void 0;var r=!0}catch{}var o=qu.call(e);return r&&(t?e[Ce]=n:delete e[Ce]),o}var Wu=Object.prototype,Yu=Wu.toString;function Xu(e){return Yu.call(e)}var Zu="[object Null]",Ju="[object Undefined]",En=te?te.toStringTag:void 0;function ue(e){return e==null?e===void 0?Ju:Zu:En&&En in Object(e)?Gu(e):Xu(e)}function q(e){return e!=null&&typeof e=="object"}var Qu="[object Symbol]";function ea(e){return typeof e=="symbol"||q(e)&&ue(e)==Qu}var vn=0/0,ta=/^[-+]0x[0-9a-f]+$/i,na=/^0b[01]+$/i,ra=/^0o[0-7]+$/i,oa=parseInt;function yn(e){if(typeof e=="number")return e;if(ea(e))return vn;if(j(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=j(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Hu(e);var n=na.test(e);return n||ra.test(e)?oa(e.slice(2),n?2:8):ta.test(e)?vn:+e}var ua="Expected a function",aa=Math.max,sa=Math.min;function pt(e,t,n){var r,o,u,a,s,i,d=0,f=!1,l=!1,h=!0;if(typeof e!="function")throw new TypeError(ua);t=yn(t)||0,j(n)&&(f=!!n.leading,l="maxWait"in n,u=l?aa(yn(n.maxWait)||0,t):u,h="trailing"in n?!!n.trailing:h);function g(O){var k=r,L=o;return r=o=void 0,d=O,a=e.apply(L,k),a}function m(O){return d=O,s=setTimeout(p,t),f?g(O):a}function E(O){var k=O-i,L=O-d,$=t-k;return l?sa($,u-L):$}function _(O){var k=O-i,L=O-d;return i===void 0||k>=t||k<0||l&&L>=u}function p(){var O=_t();if(_(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),d=0,r=i=o=s=void 0}function S(){return s===void 0?a:T(_t())}function w(){var O=_t(),k=_(O);if(r=arguments,o=this,i=O,k){if(s===void 0)return m(i);if(l)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 ia=(e,{debounceWait:t,debounceLeading:n,debounceTrailing:r,debounceMaxWait:o})=>{const u=c.ref(),a=c.computed(()=>{const s={},i=c.unref(n),d=c.unref(r),f=c.unref(o);return i!==void 0&&(s.leading=i),d!==void 0&&(s.trailing=d),f!==void 0&&(s.maxWait=f),s});return c.watchEffect(s=>{if(c.unref(t)){const i=e.runAsync.bind(e);u.value=pt(d=>{d()},c.unref(t),a.value),e.runAsync=(...d)=>new Promise((f,l)=>{var h;(h=u.value)==null||h.call(u,()=>{i(...d).then(f).catch(l)})}),s(()=>{var d;(d=u.value)==null||d.cancel(),e.runAsync=i})}}),c.unref(t)?{name:"debouncePlugin",onCancel:()=>{var s;(s=u.value)==null||s.cancel()}}:{}};function la(e){const n=e.toString().match(/^function\s+([^\s(]+)/);return n?n[1]:""}function ca(e){const t=e.toString(),n=/([a-zA-Z$_][a-zA-Z0-9$_]*)\s*\(/,r=t.match(n);return r?r[1].trim():""}function fa(e){return e==="pending"?16747520:e==="done"?6586111:e==="error"?16724736:e==="cancel"?10500409:e==="mutate"?27647:4873398}class da{constructor(){B(this,"requestInstances",new Map);B(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 da,ga=(e,{ready:t=!0,debugKey:n,...r})=>{const o=()=>{if(n&&!N.has(n)){const a=e.serviceRef.value.toString().includes("function")?la(e.serviceRef.value.toString()):ca(e.serviceRef.value.toString());N.insert(n,{instance:e,requestName:a,time:Date.now()})}},u=c.computed(()=>Object.fromEntries(Object.entries({ready:t,...r}).map(([a,s])=>[a,c.unref(s)])));return c.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"})}}},ha=(e,{loadingDelay:t})=>{const n=c.ref(),r=()=>{n.value&&(clearTimeout(c.unref(n.value)),n.value=void 0)};return{name:"loadingDelayPlugin",onFinally:()=>{r();const o=c.unref(t);o&&(e.setState({loading:!0}),n.value=setTimeout(()=>{e.setState({loading:!1})},o))},onError:()=>{r()}}};function mt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}const _a=!!(typeof window<"u"&&window.document&&window.document.createElement);function Et(){return mt()?document.visibilityState!=="hidden":!0}const De=[];function pa(e){return De.push(e),function(){const n=De.indexOf(e);De.splice(n,1)}}if(mt()){const e=()=>{if(!!Et())for(let t=0;t<De.length;t++){const n=De[t];n()}};window.addEventListener("visibilitychange",e,!1)}const ma=(e,{pollingInterval:t,pollingWhenHidden:n=!0,pollingErrorRetryCount:r=-1})=>{let o;const u=c.ref(),a=c.ref(0),s=()=>{var i;o&&clearTimeout(o),(i=u.value)==null||i.call(u)};return c.watchEffect(()=>{c.unref(t)||s()}),c.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&&!Et()?u.value=pa(()=>{e.refresh()}):e.refresh()},c.unref(t)):a.value=0},onCancel:()=>{s()}}:{}};function Ea(e,t){let n=!1;return(...r)=>{n||(n=!0,e(...r),setTimeout(()=>{n=!1},t))}}function va(){return mt()&&typeof navigator.onLine<"u"?navigator.onLine:!0}const Ie=[];function ya(e){return Ie.push(e),function(){const n=Ie.indexOf(e);n>-1&&Ie.splice(n,1)}}if(_a){const e=()=>{if(!(!Et()||!va()))for(let t=0;t<Ie.length;t++){const n=Ie[t];n()}};window.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",e,!1)}const ba=(e,{refreshOnWindowFocus:t,focusTimespan:n=5e3})=>{const r=c.ref(),o=()=>{var u;(u=r.value)==null||u.call(r)};return c.watchEffect(u=>{if(c.unref(t)){const a=Ea(e.refresh.bind(e),c.unref(n));r.value=ya(()=>{a()})}u(()=>{o()})}),c.onScopeDispose(()=>{o()}),{name:"refreshOnWindowFocusPlugin"}},Ta=(e,{retryInterval:t,retryCount:n})=>{const r=c.ref(),o=c.ref(0),u=c.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 Aa=Array.isArray;const ae=Aa;function bn(e){return e}var wa="[object AsyncFunction]",Oa="[object Function]",Sa="[object GeneratorFunction]",Ca="[object Proxy]";function vt(e){if(!j(e))return!1;var t=ue(e);return t==Oa||t==Sa||t==wa||t==Ca}var Da=z["__core-js_shared__"];const yt=Da;var Tn=function(){var e=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ia(e){return!!Tn&&Tn in e}var Pa=Function.prototype,Ra=Pa.toString;function se(e){if(e!=null){try{return Ra.call(e)}catch{}try{return e+""}catch{}}return""}var Fa=/[\\^$.*+?()[\]{}|]/g,ka=/^\[object .+?Constructor\]$/,La=Function.prototype,Na=Object.prototype,xa=La.toString,Ua=Na.hasOwnProperty,$a=RegExp("^"+xa.call(Ua).replace(Fa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ba(e){if(!j(e)||Ia(e))return!1;var t=vt(e)?$a:ka;return t.test(se(e))}function Ma(e,t){return e==null?void 0:e[t]}function ie(e,t){var n=Ma(e,t);return Ba(n)?n:void 0}var Va=ie(z,"WeakMap");const bt=Va;var An=Object.create,ja=function(){function e(){}return function(t){if(!j(t))return{};if(An)return An(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Ha=ja;function za(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 wn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Ka=800,qa=16,Ga=Date.now;function Wa(e){var t=0,n=0;return function(){var r=Ga(),o=qa-(r-n);if(n=r,o>0){if(++t>=Ka)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ya(e){return function(){return e}}var Xa=function(){try{var e=ie(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Ye=Xa;var Za=Ye?function(e,t){return Ye(e,"toString",{configurable:!0,enumerable:!1,value:Ya(t),writable:!0})}:bn,Ja=Wa(Za);const Qa=Ja;function es(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var ts=9007199254740991,ns=/^(?:0|[1-9]\d*)$/;function On(e,t){var n=typeof e;return t=t==null?ts:t,!!t&&(n=="number"||n!="symbol"&&ns.test(e))&&e>-1&&e%1==0&&e<t}function Tt(e,t,n){t=="__proto__"&&Ye?Ye(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Pe(e,t){return e===t||e!==e&&t!==t}var rs=Object.prototype,os=rs.hasOwnProperty;function Sn(e,t,n){var r=e[t];(!(os.call(e,t)&&Pe(r,n))||n===void 0&&!(t in e))&&Tt(e,t,n)}function Re(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?Tt(n,s,i):Sn(n,s,i)}return n}var Cn=Math.max;function us(e,t,n){return t=Cn(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,u=Cn(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),za(e,this,s)}}function as(e,t){return Qa(us(e,t,bn),e+"")}var ss=9007199254740991;function Dn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ss}function Xe(e){return e!=null&&Dn(e.length)&&!vt(e)}function is(e,t,n){if(!j(n))return!1;var r=typeof t;return(r=="number"?Xe(n)&&On(t,n.length):r=="string"&&t in n)?Pe(n[t],e):!1}function ls(e){return as(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&&is(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 cs=Object.prototype;function At(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cs;return e===n}function fs(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ds="[object Arguments]";function In(e){return q(e)&&ue(e)==ds}var Pn=Object.prototype,gs=Pn.hasOwnProperty,hs=Pn.propertyIsEnumerable,_s=In(function(){return arguments}())?In:function(e){return q(e)&&gs.call(e,"callee")&&!hs.call(e,"callee")};const wt=_s;function ps(){return!1}var Rn=typeof y=="object"&&y&&!y.nodeType&&y,Fn=Rn&&typeof module=="object"&&module&&!module.nodeType&&module,ms=Fn&&Fn.exports===Rn,kn=ms?z.Buffer:void 0,Es=kn?kn.isBuffer:void 0,vs=Es||ps;const Fe=vs;var ys="[object Arguments]",bs="[object Array]",Ts="[object Boolean]",As="[object Date]",ws="[object Error]",Os="[object Function]",Ss="[object Map]",Cs="[object Number]",Ds="[object Object]",Is="[object RegExp]",Ps="[object Set]",Rs="[object String]",Fs="[object WeakMap]",ks="[object ArrayBuffer]",Ls="[object DataView]",Ns="[object Float32Array]",xs="[object Float64Array]",Us="[object Int8Array]",$s="[object Int16Array]",Bs="[object Int32Array]",Ms="[object Uint8Array]",Vs="[object Uint8ClampedArray]",js="[object Uint16Array]",Hs="[object Uint32Array]",P={};P[Ns]=P[xs]=P[Us]=P[$s]=P[Bs]=P[Ms]=P[Vs]=P[js]=P[Hs]=!0,P[ys]=P[bs]=P[ks]=P[Ts]=P[Ls]=P[As]=P[ws]=P[Os]=P[Ss]=P[Cs]=P[Ds]=P[Is]=P[Ps]=P[Rs]=P[Fs]=!1;function zs(e){return q(e)&&Dn(e.length)&&!!P[ue(e)]}function Ot(e){return function(t){return e(t)}}var Ln=typeof y=="object"&&y&&!y.nodeType&&y,ke=Ln&&typeof module=="object"&&module&&!module.nodeType&&module,Ks=ke&&ke.exports===Ln,St=Ks&&pn.process,qs=function(){try{var e=ke&&ke.require&&ke.require("util").types;return e||St&&St.binding&&St.binding("util")}catch{}}();const me=qs;var Nn=me&&me.isTypedArray,Gs=Nn?Ot(Nn):zs;const Ct=Gs;var Ws=Object.prototype,Ys=Ws.hasOwnProperty;function xn(e,t){var n=ae(e),r=!n&&wt(e),o=!n&&!r&&Fe(e),u=!n&&!r&&!o&&Ct(e),a=n||r||o||u,s=a?fs(e.length,String):[],i=s.length;for(var d in e)(t||Ys.call(e,d))&&!(a&&(d=="length"||o&&(d=="offset"||d=="parent")||u&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||On(d,i)))&&s.push(d);return s}function Un(e,t){return function(n){return e(t(n))}}var Xs=Un(Object.keys,Object);const Zs=Xs;var Js=Object.prototype,Qs=Js.hasOwnProperty;function ei(e){if(!At(e))return Zs(e);var t=[];for(var n in Object(e))Qs.call(e,n)&&n!="constructor"&&t.push(n);return t}function Dt(e){return Xe(e)?xn(e):ei(e)}function ti(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ni=Object.prototype,ri=ni.hasOwnProperty;function oi(e){if(!j(e))return ti(e);var t=At(e),n=[];for(var r in e)r=="constructor"&&(t||!ri.call(e,r))||n.push(r);return n}function Le(e){return Xe(e)?xn(e,!0):oi(e)}var ui=ie(Object,"create");const Ne=ui;function ai(){this.__data__=Ne?Ne(null):{},this.size=0}function si(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ii="__lodash_hash_undefined__",li=Object.prototype,ci=li.hasOwnProperty;function fi(e){var t=this.__data__;if(Ne){var n=t[e];return n===ii?void 0:n}return ci.call(t,e)?t[e]:void 0}var di=Object.prototype,gi=di.hasOwnProperty;function hi(e){var t=this.__data__;return Ne?t[e]!==void 0:gi.call(t,e)}var _i="__lodash_hash_undefined__";function pi(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ne&&t===void 0?_i: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=ai,le.prototype.delete=si,le.prototype.get=fi,le.prototype.has=hi,le.prototype.set=pi;function mi(){this.__data__=[],this.size=0}function Ze(e,t){for(var n=e.length;n--;)if(Pe(e[n][0],t))return n;return-1}var Ei=Array.prototype,vi=Ei.splice;function yi(e){var t=this.__data__,n=Ze(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():vi.call(t,n,1),--this.size,!0}function bi(e){var t=this.__data__,n=Ze(t,e);return n<0?void 0:t[n][1]}function Ti(e){return Ze(this.__data__,e)>-1}function Ai(e,t){var n=this.__data__,r=Ze(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=mi,Z.prototype.delete=yi,Z.prototype.get=bi,Z.prototype.has=Ti,Z.prototype.set=Ai;var wi=ie(z,"Map");const xe=wi;function Oi(){this.size=0,this.__data__={hash:new le,map:new(xe||Z),string:new le}}function Si(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Je(e,t){var n=e.__data__;return Si(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ci(e){var t=Je(this,e).delete(e);return this.size-=t?1:0,t}function Di(e){return Je(this,e).get(e)}function Ii(e){return Je(this,e).has(e)}function Pi(e,t){var n=Je(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=Oi,ce.prototype.delete=Ci,ce.prototype.get=Di,ce.prototype.has=Ii,ce.prototype.set=Pi;function $n(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Ri=Un(Object.getPrototypeOf,Object);const It=Ri;var Fi="[object Object]",ki=Function.prototype,Li=Object.prototype,Bn=ki.toString,Ni=Li.hasOwnProperty,xi=Bn.call(Object);function Ui(e){if(!q(e)||ue(e)!=Fi)return!1;var t=It(e);if(t===null)return!0;var n=Ni.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Bn.call(n)==xi}function $i(){this.__data__=new Z,this.size=0}function Bi(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Mi(e){return this.__data__.get(e)}function Vi(e){return this.__data__.has(e)}var ji=200;function Hi(e,t){var n=this.__data__;if(n instanceof Z){var r=n.__data__;if(!xe||r.length<ji-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=$i,G.prototype.delete=Bi,G.prototype.get=Mi,G.prototype.has=Vi,G.prototype.set=Hi;function zi(e,t){return e&&Re(t,Dt(t),e)}function Ki(e,t){return e&&Re(t,Le(t),e)}var Mn=typeof y=="object"&&y&&!y.nodeType&&y,Vn=Mn&&typeof module=="object"&&module&&!module.nodeType&&module,qi=Vn&&Vn.exports===Mn,jn=qi?z.Buffer:void 0,Hn=jn?jn.allocUnsafe:void 0;function zn(e,t){if(t)return e.slice();var n=e.length,r=Hn?Hn(n):new e.constructor(n);return e.copy(r),r}function Gi(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 Kn(){return[]}var Wi=Object.prototype,Yi=Wi.propertyIsEnumerable,qn=Object.getOwnPropertySymbols,Xi=qn?function(e){return e==null?[]:(e=Object(e),Gi(qn(e),function(t){return Yi.call(e,t)}))}:Kn;const Pt=Xi;function Zi(e,t){return Re(e,Pt(e),t)}var Ji=Object.getOwnPropertySymbols,Qi=Ji?function(e){for(var t=[];e;)$n(t,Pt(e)),e=It(e);return t}:Kn;const Gn=Qi;function el(e,t){return Re(e,Gn(e),t)}function Wn(e,t,n){var r=t(e);return ae(e)?r:$n(r,n(e))}function Rt(e){return Wn(e,Dt,Pt)}function tl(e){return Wn(e,Le,Gn)}var nl=ie(z,"DataView");const Ft=nl;var rl=ie(z,"Promise");const kt=rl;var ol=ie(z,"Set");const Lt=ol;var Yn="[object Map]",ul="[object Object]",Xn="[object Promise]",Zn="[object Set]",Jn="[object WeakMap]",Qn="[object DataView]",al=se(Ft),sl=se(xe),il=se(kt),ll=se(Lt),cl=se(bt),fe=ue;(Ft&&fe(new Ft(new ArrayBuffer(1)))!=Qn||xe&&fe(new xe)!=Yn||kt&&fe(kt.resolve())!=Xn||Lt&&fe(new Lt)!=Zn||bt&&fe(new bt)!=Jn)&&(fe=function(e){var t=ue(e),n=t==ul?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case al:return Qn;case sl:return Yn;case il:return Xn;case ll:return Zn;case cl:return Jn}return t});const Ue=fe;var fl=Object.prototype,dl=fl.hasOwnProperty;function gl(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&dl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var hl=z.Uint8Array;const Qe=hl;function Nt(e){var t=new e.constructor(e.byteLength);return new Qe(t).set(new Qe(e)),t}function _l(e,t){var n=t?Nt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var pl=/\w*$/;function ml(e){var t=new e.constructor(e.source,pl.exec(e));return t.lastIndex=e.lastIndex,t}var er=te?te.prototype:void 0,tr=er?er.valueOf:void 0;function El(e){return tr?Object(tr.call(e)):{}}function nr(e,t){var n=t?Nt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var vl="[object Boolean]",yl="[object Date]",bl="[object Map]",Tl="[object Number]",Al="[object RegExp]",wl="[object Set]",Ol="[object String]",Sl="[object Symbol]",Cl="[object ArrayBuffer]",Dl="[object DataView]",Il="[object Float32Array]",Pl="[object Float64Array]",Rl="[object Int8Array]",Fl="[object Int16Array]",kl="[object Int32Array]",Ll="[object Uint8Array]",Nl="[object Uint8ClampedArray]",xl="[object Uint16Array]",Ul="[object Uint32Array]";function $l(e,t,n){var r=e.constructor;switch(t){case Cl:return Nt(e);case vl:case yl:return new r(+e);case Dl:return _l(e,n);case Il:case Pl:case Rl:case Fl:case kl:case Ll:case Nl:case xl:case Ul:return nr(e,n);case bl:return new r;case Tl:case Ol:return new r(e);case Al:return ml(e);case wl:return new r;case Sl:return El(e)}}function rr(e){return typeof e.constructor=="function"&&!At(e)?Ha(It(e)):{}}var Bl="[object Map]";function Ml(e){return q(e)&&Ue(e)==Bl}var or=me&&me.isMap,Vl=or?Ot(or):Ml;const jl=Vl;var Hl="[object Set]";function zl(e){return q(e)&&Ue(e)==Hl}var ur=me&&me.isSet,Kl=ur?Ot(ur):zl;const ql=Kl;var Gl=1,Wl=2,Yl=4,ar="[object Arguments]",Xl="[object Array]",Zl="[object Boolean]",Jl="[object Date]",Ql="[object Error]",sr="[object Function]",ec="[object GeneratorFunction]",tc="[object Map]",nc="[object Number]",ir="[object Object]",rc="[object RegExp]",oc="[object Set]",uc="[object String]",ac="[object Symbol]",sc="[object WeakMap]",ic="[object ArrayBuffer]",lc="[object DataView]",cc="[object Float32Array]",fc="[object Float64Array]",dc="[object Int8Array]",gc="[object Int16Array]",hc="[object Int32Array]",_c="[object Uint8Array]",pc="[object Uint8ClampedArray]",mc="[object Uint16Array]",Ec="[object Uint32Array]",D={};D[ar]=D[Xl]=D[ic]=D[lc]=D[Zl]=D[Jl]=D[cc]=D[fc]=D[dc]=D[gc]=D[hc]=D[tc]=D[nc]=D[ir]=D[rc]=D[oc]=D[uc]=D[ac]=D[_c]=D[pc]=D[mc]=D[Ec]=!0,D[Ql]=D[sr]=D[sc]=!1;function et(e,t,n,r,o,u){var a,s=t&Gl,i=t&Wl,d=t&Yl;if(n&&(a=o?n(e,r,o,u):n(e)),a!==void 0)return a;if(!j(e))return e;var f=ae(e);if(f){if(a=gl(e),!s)return wn(e,a)}else{var l=Ue(e),h=l==sr||l==ec;if(Fe(e))return zn(e,s);if(l==ir||l==ar||h&&!o){if(a=i||h?{}:rr(e),!s)return i?el(e,Ki(a,e)):Zi(e,zi(a,e))}else{if(!D[l])return o?e:{};a=$l(e,l,s)}}u||(u=new G);var g=u.get(e);if(g)return g;u.set(e,a),ql(e)?e.forEach(function(_){a.add(et(_,t,n,_,e,u))}):jl(e)&&e.forEach(function(_,p){a.set(p,et(_,t,n,p,e,u))});var m=d?i?tl:Rt:i?Le:Dt,E=f?void 0:m(e);return es(E||e,function(_,p){E&&(p=_,_=e[p]),Sn(a,p,et(_,t,n,p,e,u))}),a}var vc=1,yc=4;function lr(e){return et(e,vc|yc)}var bc="__lodash_hash_undefined__";function Tc(e){return this.__data__.set(e,bc),this}function Ac(e){return this.__data__.has(e)}function tt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ce;++t<n;)this.add(e[t])}tt.prototype.add=tt.prototype.push=Tc,tt.prototype.has=Ac;function wc(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 Oc(e,t){return e.has(t)}var Sc=1,Cc=2;function cr(e,t,n,r,o,u){var a=n&Sc,s=e.length,i=t.length;if(s!=i&&!(a&&i>s))return!1;var d=u.get(e),f=u.get(t);if(d&&f)return d==t&&f==e;var l=-1,h=!0,g=n&Cc?new tt:void 0;for(u.set(e,t),u.set(t,e);++l<s;){var m=e[l],E=t[l];if(r)var _=a?r(E,m,l,t,e,u):r(m,E,l,e,t,u);if(_!==void 0){if(_)continue;h=!1;break}if(g){if(!wc(t,function(p,T){if(!Oc(g,T)&&(m===p||o(m,p,n,r,u)))return g.push(T)})){h=!1;break}}else if(!(m===E||o(m,E,n,r,u))){h=!1;break}}return u.delete(e),u.delete(t),h}function Dc(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Ic(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Pc=1,Rc=2,Fc="[object Boolean]",kc="[object Date]",Lc="[object Error]",Nc="[object Map]",xc="[object Number]",Uc="[object RegExp]",$c="[object Set]",Bc="[object String]",Mc="[object Symbol]",Vc="[object ArrayBuffer]",jc="[object DataView]",fr=te?te.prototype:void 0,xt=fr?fr.valueOf:void 0;function Hc(e,t,n,r,o,u,a){switch(n){case jc:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vc:return!(e.byteLength!=t.byteLength||!u(new Qe(e),new Qe(t)));case Fc:case kc:case xc:return Pe(+e,+t);case Lc:return e.name==t.name&&e.message==t.message;case Uc:case Bc:return e==t+"";case Nc:var s=Dc;case $c:var i=r&Pc;if(s||(s=Ic),e.size!=t.size&&!i)return!1;var d=a.get(e);if(d)return d==t;r|=Rc,a.set(e,t);var f=cr(s(e),s(t),r,o,u,a);return a.delete(e),f;case Mc:if(xt)return xt.call(e)==xt.call(t)}return!1}var zc=1,Kc=Object.prototype,qc=Kc.hasOwnProperty;function Gc(e,t,n,r,o,u){var a=n&zc,s=Rt(e),i=s.length,d=Rt(t),f=d.length;if(i!=f&&!a)return!1;for(var l=i;l--;){var h=s[l];if(!(a?h in t:qc.call(t,h)))return!1}var g=u.get(e),m=u.get(t);if(g&&m)return g==t&&m==e;var E=!0;u.set(e,t),u.set(t,e);for(var _=a;++l<i;){h=s[l];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}_||(_=h=="constructor")}if(E&&!_){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 Wc=1,dr="[object Arguments]",gr="[object Array]",nt="[object Object]",Yc=Object.prototype,hr=Yc.hasOwnProperty;function Xc(e,t,n,r,o,u){var a=ae(e),s=ae(t),i=a?gr:Ue(e),d=s?gr:Ue(t);i=i==dr?nt:i,d=d==dr?nt:d;var f=i==nt,l=d==nt,h=i==d;if(h&&Fe(e)){if(!Fe(t))return!1;a=!0,f=!1}if(h&&!f)return u||(u=new G),a||Ct(e)?cr(e,t,n,r,o,u):Hc(e,t,i,n,r,o,u);if(!(n&Wc)){var g=f&&hr.call(e,"__wrapped__"),m=l&&hr.call(t,"__wrapped__");if(g||m){var E=g?e.value():e,_=m?t.value():t;return u||(u=new G),o(E,_,n,r,u)}}return h?(u||(u=new G),Gc(e,t,n,r,o,u)):!1}function _r(e,t,n,r,o){return e===t?!0:e==null||t==null||!q(e)&&!q(t)?e!==e&&t!==t:Xc(e,t,n,r,_r,o)}function Zc(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 Jc=Zc();const Qc=Jc;function Ut(e,t,n){(n!==void 0&&!Pe(e[t],n)||n===void 0&&!(t in e))&&Tt(e,t,n)}function ef(e){return q(e)&&Xe(e)}function $t(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function tf(e){return Re(e,Le(e))}function nf(e,t,n,r,o,u,a){var s=$t(e,n),i=$t(t,n),d=a.get(i);if(d){Ut(e,n,d);return}var f=u?u(s,i,n+"",e,t,a):void 0,l=f===void 0;if(l){var h=ae(i),g=!h&&Fe(i),m=!h&&!g&&Ct(i);f=i,h||g||m?ae(s)?f=s:ef(s)?f=wn(s):g?(l=!1,f=zn(i,!0)):m?(l=!1,f=nr(i,!0)):f=[]:Ui(i)||wt(i)?(f=s,wt(s)?f=tf(s):(!j(s)||vt(s))&&(f=rr(i))):l=!1}l&&(a.set(i,f),o(f,i,r,u,a),a.delete(i)),Ut(e,n,f)}function pr(e,t,n,r,o){e!==t&&Qc(t,function(u,a){if(o||(o=new G),j(u))nf(e,t,a,n,pr,r,o);else{var s=r?r($t(e,a),u,a+"",e,t,o):void 0;s===void 0&&(s=u),Ut(e,a,s)}},Le)}function rf(e,t){return _r(e,t)}var of=ls(function(e,t,n){pr(e,t,n)});const uf=of;var af="Expected a function";function mr(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(af);return j(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),pt(e,t,{leading:r,maxWait:t,trailing:o})}const sf=(e,{throttleWait:t,throttleLeading:n,throttleTrailing:r})=>{const o=c.computed(()=>{const a={};return c.unref(n)!==void 0&&(a.leading=c.unref(n)),c.unref(r)!==void 0&&(a.trailing=c.unref(r)),a}),u=c.computed(()=>mr(a=>{a()},c.unref(t),o.value));return c.watchEffect(a=>{if(c.unref(t)){const s=e.runAsync.bind(e);e.runAsync=(...i)=>new Promise((d,f)=>{var l;(l=u.value)==null||l.call(u,()=>{s(...i).then(d).catch(f)})}),a(()=>{var i;e.runAsync=s,(i=u.value)==null||i.cancel()})}}),c.unref(t)?{name:"throttlePlugin",onCancel:()=>{var a;(a=u.value)==null||a.cancel()}}:{}},Er=e=>typeof e=="function",lf=e=>typeof e=="boolean";class cf{constructor(t,n,r,o={}){B(this,"pluginImpls");B(this,"count",0);B(this,"state",{loading:!1,params:void 0,data:void 0,error:void 0});B(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,d,f,l,h,g,m,E,_;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}),(d=(i=this.options).onError)==null||d.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 O,k,L,$;if(n!==this.count)return new Promise(()=>{});const w=this.options.formatResult?this.options.formatResult(S):S;return this.setState({data:w,error:void 0,loading:!1}),(k=(O=this.options).onSuccess)==null||k.call(O,w,t),this.runPluginHandler("onSuccess",w,t),this.previousValidData=w,($=(L=this.options).onFinally)==null||$.call(L,t,w,void 0),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(n!==this.count)return new Promise(()=>{});throw this.setState({error:p,loading:!1}),(l=(f=this.options).onError)==null||l.call(f,p,t),this.runPluginHandler("onError",p,t),(Er((h=this.options)==null?void 0:h.rollbackOnError)&&((g=this.options)==null?void 0:g.rollbackOnError(t))||lf((m=this.options)==null?void 0:m.rollbackOnError)&&this.options.rollbackOnError)&&this.setState({data:this.previousValidData}),(_=(E=this.options).onFinally)==null||_.call(E,t,void 0,p),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=Er(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n})}}const vr=Symbol("USEREQUEST_GLOBAL_OPTIONS_PROVIDE_KEY");function ff(e){return Object.keys(e).filter(n=>["data","loading","params","error"].includes(n)).length===4}function df(e,t={},n=[]){const r=c.inject(vr,{}),{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},d=c.ref(e),f=c.reactive({data:o,loading:!1,params:void 0,error:void 0}),l=(E,_)=>{_?f[_]=E:ff(E)&&(f.data=E.data,f.loading=E.loading,f.error=E.error,f.params=E.params)},h=n.map(E=>{var _;return(_=E==null?void 0:E.onInit)==null?void 0:_.call(E,i)}).filter(Boolean),g=new cf(d,i,l,Object.assign({},...h,f));g.options=i,g.pluginImpls=n.map(E=>E(g,i));const m=c.computed(()=>c.isRef(a)?a.value:a);if(c.watchEffect(()=>{if(!u){const E=g.state.params||t.defaultParams||[];m.value&&g.options.refreshDeps===!0&&!!d.value&&g.run(...E)}}),!u&&g.options.refreshDeps!==!0){const E=g.state.params||t.defaultParams||[];c.unref(a)&&g.run(...E)}return c.onScopeDispose(()=>{g.cancel()}),{...c.toRefs(f),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 gf=(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 Bt(e,t,n){const r=[process.env.NODE_ENV==="development"?ga:null,ia,ha,ma,ba,sf,ee,Nu,Ta].filter(Boolean);return gf(df,t==null?void 0:t.use)(e,t,[...n||[],...r])}function hf(e){c.provide(vr,e)}var _f=Object.create,yr=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,Mt=Object.getOwnPropertyNames,mf=Object.getPrototypeOf,Ef=Object.prototype.hasOwnProperty,vf=(e,t)=>function(){return e&&(t=(0,e[Mt(e)[0]])(e=0)),t},yf=(e,t)=>function(){return t||(0,e[Mt(e)[0]])((t={exports:{}}).exports,t),t.exports},bf=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mt(t))!Ef.call(e,o)&&o!==n&&yr(e,o,{get:()=>t[o],enumerable:!(r=pf(t,o))||r.enumerable});return e},Tf=(e,t,n)=>(n=e!=null?_f(mf(e)):{},bf(t||!e||!e.__esModule?yr(n,"default",{value:e,enumerable:!0}):n,e)),$e=vf({"../../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"(){}}),Af=yf({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){$e(),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,l=>new Date(l)),a.set(Map,(l,h)=>new Map(i(Array.from(l),h))),a.set(Set,(l,h)=>new Set(i(Array.from(l),h))),u.constructorHandlers)for(const l of u.constructorHandlers)a.set(l[0],l[1]);let s=null;return u.proto?f:d;function i(l,h){const g=Object.keys(l),m=new Array(g.length);for(let E=0;E<g.length;E++){const _=g[E],p=l[_];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 m}function d(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return i(l,d);if(l.constructor!==Object&&(s=a.get(l.constructor)))return s(l,d);const h={};for(const g in l){if(Object.hasOwnProperty.call(l,g)===!1)continue;const m=l[g];typeof m!="object"||m===null?h[g]=m:m.constructor!==Object&&(s=a.get(m.constructor))?h[g]=s(m,d):ArrayBuffer.isView(m)?h[g]=n(m):h[g]=d(m)}return h}function f(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return i(l,f);if(l.constructor!==Object&&(s=a.get(l.constructor)))return s(l,f);const h={};for(const g in l){const m=l[g];typeof m!="object"||m===null?h[g]=m:m.constructor!==Object&&(s=a.get(m.constructor))?h[g]=s(m,f):ArrayBuffer.isView(m)?h[g]=n(m):h[g]=f(m)}return h}}function o(u){const a=[],s=[],i=new Map;if(i.set(Date,g=>new Date(g)),i.set(Map,(g,m)=>new Map(f(Array.from(g),m))),i.set(Set,(g,m)=>new Set(f(Array.from(g),m))),u.constructorHandlers)for(const g of u.constructorHandlers)i.set(g[0],g[1]);let d=null;return u.proto?h:l;function f(g,m){const E=Object.keys(g),_=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)_[T]=A;else if(A.constructor!==Object&&(d=i.get(A.constructor)))_[T]=d(A,m);else if(ArrayBuffer.isView(A))_[T]=n(A);else{const S=a.indexOf(A);S!==-1?_[T]=s[S]:_[T]=m(A)}}return _}function l(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return f(g,l);if(g.constructor!==Object&&(d=i.get(g.constructor)))return d(g,l);const m={};a.push(g),s.push(m);for(const E in g){if(Object.hasOwnProperty.call(g,E)===!1)continue;const _=g[E];if(typeof _!="object"||_===null)m[E]=_;else if(_.constructor!==Object&&(d=i.get(_.constructor)))m[E]=d(_,l);else if(ArrayBuffer.isView(_))m[E]=n(_);else{const p=a.indexOf(_);p!==-1?m[E]=s[p]:m[E]=l(_)}}return a.pop(),s.pop(),m}function h(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return f(g,h);if(g.constructor!==Object&&(d=i.get(g.constructor)))return d(g,h);const m={};a.push(g),s.push(m);for(const E in g){const _=g[E];if(typeof _!="object"||_===null)m[E]=_;else if(_.constructor!==Object&&(d=i.get(_.constructor)))m[E]=d(_,h);else if(ArrayBuffer.isView(_))m[E]=n(_);else{const p=a.indexOf(_);p!==-1?m[E]=s[p]:m[E]=h(_)}}return a.pop(),s.pop(),m}}}});$e(),$e(),$e();var br=typeof navigator<"u",b=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof b.chrome<"u"&&b.chrome.devtools,br&&(b.self,b.top);var Tr;typeof navigator<"u"&&((Tr=navigator.userAgent)==null||Tr.toLowerCase().includes("electron")),$e();var wf=Tf(Af(),1),Of=/(?:^|[-_/])(\w)/g;function Sf(e,t){return t?t.toUpperCase():""}function Cf(e){return e&&`${e}`.replace(Of,Sf)}function Df(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 Ar=(0,wf.default)({circles:!0});const If={trailing:!0};function Ee(e,t=25,n={}){if(n={...If,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,o,u=[],a,s;const i=(d,f)=>(a=Pf(e,d,f),a.finally(()=>{if(a=null,n.trailing&&s&&!o){const l=i(d,s);return s=null,l}}),a);return function(...d){return a?(n.trailing&&(s=d),a):new Promise(f=>{const l=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const h=n.leading?r:i(this,d);for(const g of u)g(h);u=[]},t),l?(r=i(this,d),f(r)):u.push(f)})}}async function Pf(e,t,n){return await e.apply(t,n)}function Vt(e,t={},n){for(const r in e){const o=e[r],u=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?Vt(o,t,u):typeof o=="function"&&(t[u]=o)}return t}const Rf={run:e=>e()},Ff=()=>Rf,wr=typeof console.createTask<"u"?console.createTask:Ff;function kf(e,t){const n=t.shift(),r=wr(n);return e.reduce((o,u)=>o.then(()=>r.run(()=>u(...t))),Promise.resolve())}function Lf(e,t){const n=t.shift(),r=wr(n);return Promise.all(e.map(o=>r.run(()=>o(...t))))}function jt(e,t){for(const n of[...e])n(t)}class Nf{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=Vt(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=Vt(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(kf,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(Lf,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&jt(this._before,o);const u=t(n in this._hooks?[...this._hooks[n]]:[],r);return u instanceof Promise?u.finally(()=>{this._after&&o&&jt(this._after,o)}):(this._after&&o&&jt(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 Or(){return new Nf}var xf=Object.create,Sr=Object.defineProperty,Uf=Object.getOwnPropertyDescriptor,Ht=Object.getOwnPropertyNames,$f=Object.getPrototypeOf,Bf=Object.prototype.hasOwnProperty,Mf=(e,t)=>function(){return e&&(t=(0,e[Ht(e)[0]])(e=0)),t},Cr=(e,t)=>function(){return t||(0,e[Ht(e)[0]])((t={exports:{}}).exports,t),t.exports},Vf=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ht(t))!Bf.call(e,o)&&o!==n&&Sr(e,o,{get:()=>t[o],enumerable:!(r=Uf(t,o))||r.enumerable});return e},jf=(e,t,n)=>(n=e!=null?xf($f(e)):{},Vf(t||!e||!e.__esModule?Sr(n,"default",{value:e,enumerable:!0}):n,e)),v=Mf({"../../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"(){}}),Hf=Cr({"../../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","\u24F7":"3","\u24F8":"4","\u24F9":"5","\u24FA":"6","\u24FB":"7","\u24FC":"8","\u24FD":"9","\u24FE":"10","\u24FF":"0","\u24EB":"11","\u24EC":"12","\u24ED":"13","\u24EE":"14","\u24EF":"15","\u24F0":"16","