varPinia=function(t,e){"use strict";letn;consti=t=>n=t,s=Symbol();functiono(t){returnt&&"object"==typeoft&&"[object Object]"===Object.prototype.toString.call(t)&&"function"!=typeoft.toJSON}varr;t.MutationType=void0,(r=t.MutationType||(t.MutationType={})).direct="direct",r.patchObject="patch object",r.patchFunction="patch function";consta="undefined"!=typeofwindow;constc=()=>{};functionu(t,n,i,s=c){t.push(n);consto=()=>{conste=t.indexOf(n);e>-1&&(t.splice(e,1),s())};return!i&&e.getCurrentInstance()&&e.onUnmounted(o),o}functionp(t,...e){t.slice().forEach((t=>{t(...e)}))}functionf(t,n){for(constiinn){if(!n.hasOwnProperty(i))continue;consts=n[i],r=t[i];t[i]=o(r)&&o(s)&&t.hasOwnProperty(i)&&!e.isRef(s)&&!e.isReactive(s)?f(r,s):s}returnt}constd=Symbol(),h=newWeakMap;const{assign:l}=Object;functiony(n,s,r={},a,y,$){letv;constb=l({actions:{}},r),_={deep:!0};letg,m,j,O=e.markRaw([]),R=e.markRaw([]);constP=a.state.value[n];letw;functionS(i){lets;g=m=!1,"function"==typeofi?(i(a.state.value[n]),s={type:t.MutationType.patchFunction,storeId:n,events:j}):(f(a.state.value[n],i),s={type:t.MutationType.patchObject,payload:i,storeId:n,events:j});consto=w=Symbol();e.nextTick().then((()=>{w===o&&(g=!0)})),m=!0,p(O,s,a.state.value[n])}$||P||(e.isVue2?e.set(a.state.value,n,{}):a.state.value[n]={}),e.ref({});constV=c;functionk(t,e){returnfunction(){i(a);consts=Array.from(arguments),o=[],r=[];functionc(t){o.push(t)}functionu(t){r.push(t)}letf;p(R,{args:s,name:t,store:M,after:c,onError:u});try{f=e.apply(this&&this.$id===n?this:M,s)}catch(t){throwp(r,t),t}returnfinstanceofPromise?f.then((t=>(p(o,t),t))).catch((t=>(p(r,t),Promise.reject(t)))):(p(o,f),f)}}constA={_p:a,$id:n,$onAction:u.bind(null,R),$patch:S,$reset:V,$subscribe(i,s={}){consto=u(O,i,s.detached,(()=>r())),r=v.run((()=>e.watch((()=>a.state.value[n]),(e=>{("sync"===s.flush?m:g)&&i({storeId:n,type:t.MutationType.direct,events:j},e)}),l({},_,s))));returno},$dispose:function(){v.stop(),O=[],R=[],a._s.delete(n)}};e.isVue2&&(A._r=!1);constM=e.reactive(l({},A));a._s.set(n,M);constT=a._e.run((()=>(v=e.effectScope(),v.run((()=>s())))));for(consttinT){consti=T[t];if(e.isRef(i)&&(!e.isRef(x=i)||!x.effect)||e.isReactive(i))$||(!P||(I=i,e.isVue2?h.has(I):o(I)&&I.hasOwnProperty(d))||(e.isRef(i)?i.value=P[t]:f(i,P[t])),e.isVue2?e.set(a.state.value[n],t,i):a.state.value[n][t]=i);elseif("function"==typeofi){constn=k(t,i);e.isVue2?e.set(T,t,n):T[t]=n,b.actions[t]=i}}varI,x;returne.isVue2?Object.keys(T).forEach((t=>{e.set(M,t,T[t])})):(l(M,T),l(e.toRaw(M),T)),Object.defineProperty(M,"$state",{get:()=>a.state.value[n],set:t=>{S((e=>{l(e,t)}))}}),e.isVue2&&(M._r=!0),a._p.forEach((t=>{l(M,v.run((()=>t({store:M,app:a._a,pinia:a,options:b}))))})),P&&$&&r.hydrate&&r.hydrate(M.$state,P),g=!0,m=!0,M}let$="Store";functionv(t,e){returnArray.isArray(e)?e.reduce(((e,n)=>(e[n]=function(){returnt(this.$pinia)[n]},e)),{}):Object.keys(e).reduce(((n,i)=>(n[i]=function(){constn=t(this.$pinia),s=e[i];return"function"==typeofs?s.call(this,n):n[s]},n)),{})}constb=v;returnt.PiniaVuePlugin=function(t){t.mixin({beforeCreate(){constt=this.$options;if(t.pinia){conste=t.pinia;if(!this._provided){constt={};Object.defineProperty(this,"_provided",{get:()=>t,set:e=>Object.assign(t,e)})}this._provided[s]=e,this.$pinia||(this.$pinia=e),e._a=this,a&&i(e)}else!this.$pinia&&t.parent&&t.parent.$pinia&&(this.$pinia=t.parent.$pinia)},destroyed(){deletethis._pStores}})},t.acceptHMRUpdate=function(t,e){returnn=>{consti=e.data.pinia||t._pinia;if(i){e.data.pinia=i;for(constoinn){constr=n[o];if("function"==typeof(s=r)&&"string"==typeofs.$id&&i._s.has(r.$id)){constn=r.$id;if(n!==t.$id)returnconsole.warn(`The id of the store changed from "${t.$id}" to "${n}". Reloading.`),e.invalidate();consts=i._s.get(n);if(!s)returnvoidconsole.log("[Pinia]: skipping hmr because store doesn't exist yet");r(i,s)}}vars}}},t.createPinia=function(){constt=e.effectScope(!0),n=t.run((()=>e.ref({})));leto=[],r=[];consta=e.markRaw({install(t){i(a),e.isVue2||(a._a=t,t.provide(s,a),t.config.globalProperties.$pinia=a,r.forEach((t=>o.push(t))),r=[])},use(t){returnthis._a||e.isVue2?o.push(t):r.push(t),this},_p:o,_a:null,_e:t,_s:newMap,state:n});returna},t.defineStore=function(t,o,r){leta,c;constu="function"==typeofo;functionp(t,r){constp=e.getCurrentInstance();(t=t||p&&e.inject(s))&&i(t),(t=n)._s.has(a)||(u?y(a,o,c,t):function(t,n,s,o){const{state:r,actions:a,getters:c}=n,u=s.state.value[t];letp;p=y(t,(function(){u||(e.isVue2?e.set(s.state.value,t,r?r():{}):s.state.value[t]=r?r():{});constn=e.toRefs(s.state.value[t]);returnl(n,a,Object.keys(c||{}).reduce(((n,o)=>(n[o]=e.markRaw(e.computed((()=>{i(s);constn=s._s.get(t);if(!e.isVue2||n._r)returnc[o].call(n,n)}))),n)),{}))}),n,s,0,!0),p.$reset=function(){constt=r?r():{};this.$patch((e=>{l(e,t)}))}}(a,c,t));returnt._s.get(a)}return"string"==typeoft?(a=t,c=u?r:o):(c=t,a=t.id),p.$id=a,p},t.getActivePinia=()=>e.getCurrentInstance()&&e.inject(s)||n,t.mapActions=function(t,e){returnArray.isArray(e)?e.reduce(((e,n)=>(e[n]=function(...e){returnt(this.$pinia)[n](...e)},e)),{}):Object.keys(e).reduce(((n,i)=>(n[i]=function(...n){returnt(this.$pinia)[e[i]](...n)},n)),{})},t.mapGetters=b,t.mapState=v,t.mapStores=function(...t){returnt.reduce(((t,e)=>(t[e.$id+$]=function(){returne(this.$pinia)},t)),{})},t.mapWritableState=function(t,e){returnArray.isArray(e)?e.reduce(((e,n)=>(e[n]={get(){returnt(this.$pinia)[n]},set(e){returnt(this.$pinia)[n]=e}},e)),{}):Object.keys(e).reduce(((n,i)=>(n[i]={get(){returnt(this.$pinia)[e[i]]},set(n){returnt(this.$pinia)[e[i]]=n}},n)),{})},t.setActivePinia=i,t.setMapStoreSuffix=function(t){$=t},t.skipHydrate=function(t){returne.isVue2?h.set(t,1)&&t:Object.defineProperty(t,d,{})},t.storeToRefs=function(t){if(e.isVue2)returne.toRefs(t);{t=e.toRaw(t);constn={};for(constiint){consts=t[i];(e.isRef(s)||e.isReactive(s))&&(n[i]=e.toRef(t,i))}returnn}},Object.defineProperty(t,"__esModule",{value:!0}),t}({},VueDemi);