import{ao as V,e as B,an as H,ad as D,B as R,aw as L,Y as $,ax as A,A as G,f as T,_ as tt,g as et,d as nt,n as st,$ as ot,j as ct}from"./@vue-6dabbe94.js";var rt=!1;/*!
  * pinia v2.1.3
  * (c) 2023 Eduardo San Martin Morote
  * @license MIT
  */let J;const k=t=>J=t,N=Symbol();function E(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var C;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(C||(C={}));function bt(){const t=V(!0),s=t.run(()=>B({}));let n=[],e=[];const r=H({install(u){k(r),r._a=u,u.provide(N,r),u.config.globalProperties.$pinia=r,e.forEach(f=>n.push(f)),e=[]},use(u){return!this._a&&!rt?e.push(u):n.push(u),this},_p:n,_a:null,_e:t,_s:new Map,state:s});return r}const Y=()=>{};function F(t,s,n,e=Y){t.push(s);const r=()=>{const u=t.indexOf(s);u>-1&&(t.splice(u,1),e())};return!n&&et()&&nt(r),r}function P(t,...s){t.slice().forEach(n=>{n(...s)})}const ut=t=>t();function I(t,s){t instanceof Map&&s instanceof Map&&s.forEach((n,e)=>t.set(e,n)),t instanceof Set&&s instanceof Set&&s.forEach(t.add,t);for(const n in s){if(!s.hasOwnProperty(n))continue;const e=s[n],r=t[n];E(r)&&E(e)&&t.hasOwnProperty(n)&&!R(e)&&!L(e)?t[n]=I(r,e):t[n]=e}return t}const at=Symbol();function ft(t){return!E(t)||!t.hasOwnProperty(at)}const{assign:v}=Object;function it(t){return!!(R(t)&&t.effect)}function lt(t,s,n,e){const{state:r,actions:u,getters:f}=s,a=n.state.value[t];let g;function b(){a||(n.state.value[t]=r?r():{});const y=ot(n.state.value[t]);return v(y,u,Object.keys(f||{}).reduce((d,_)=>(d[_]=H(ct(()=>{k(n);const m=n._s.get(t);return f[_].call(m,m)})),d),{}))}return g=q(t,b,s,n,e,!0),g}function q(t,s,n={},e,r,u){let f;const a=v({actions:{}},n),g={deep:!0};let b,y,d=[],_=[],m;const j=e.state.value[t];!u&&!j&&(e.state.value[t]={}),B({});let O;function W(c){let o;b=y=!1,typeof c=="function"?(c(e.state.value[t]),o={type:C.patchFunction,storeId:t,events:m}):(I(e.state.value[t],c),o={type:C.patchObject,payload:c,storeId:t,events:m});const h=O=Symbol();st().then(()=>{O===h&&(b=!0)}),y=!0,P(d,o,e.state.value[t])}const z=u?function(){const{state:o}=n,h=o?o():{};this.$patch(S=>{v(S,h)})}:Y;function K(){f.stop(),d=[],_=[],e._s.delete(t)}function M(c,o){return function(){k(e);const h=Array.from(arguments),S=[],w=[];function X(i){S.push(i)}function Z(i){w.push(i)}P(_,{args:h,name:c,store:l,after:X,onError:Z});let x;try{x=o.apply(this&&this.$id===t?this:l,h)}catch(i){throw P(w,i),i}return x instanceof Promise?x.then(i=>(P(S,i),i)).catch(i=>(P(w,i),Promise.reject(i))):(P(S,x),x)}}const Q={_p:e,$id:t,$onAction:F.bind(null,_),$patch:W,$reset:z,$subscribe(c,o={}){const h=F(d,c,o.detached,()=>S()),S=f.run(()=>T(()=>e.state.value[t],w=>{(o.flush==="sync"?y:b)&&c({storeId:t,type:C.direct,events:m},w)},v({},g,o)));return h},$dispose:K},l=tt(Q);e._s.set(t,l);const U=e._a&&e._a.runWithContext||ut,p=e._e.run(()=>(f=V(),U(()=>f.run(s))));for(const c in p){const o=p[c];if(R(o)&&!it(o)||L(o))u||(j&&ft(o)&&(R(o)?o.value=j[c]:I(o,j[c])),e.state.value[t][c]=o);else if(typeof o=="function"){const h=M(c,o);p[c]=h,a.actions[c]=o}}return v(l,p),v(D(l),p),Object.defineProperty(l,"$state",{get:()=>e.state.value[t],set:c=>{W(o=>{v(o,c)})}}),e._p.forEach(c=>{v(l,f.run(()=>c({store:l,app:e._a,pinia:e,options:a})))}),j&&u&&n.hydrate&&n.hydrate(l.$state,j),b=!0,y=!0,l}function vt(t,s,n){let e,r;const u=typeof s=="function";typeof t=="string"?(e=t,r=u?n:s):(r=t,e=t.id);function f(a,g){const b=A();return a=a||(b?G(N,null):null),a&&k(a),a=J,a._s.has(e)||(u?q(e,s,r,a):lt(e,r,a)),a._s.get(e)}return f.$id=e,f}function yt(t){{t=D(t);const s={};for(const n in t){const e=t[n];(R(e)||L(e))&&(s[n]=$(t,n))}return s}}export{bt as c,vt as d,yt as s};
