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