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