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