@stonecrop/stonecrop 0.4.30 → 0.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/tsdoc-metadata.json +1 -1
- package/dist/stonecrop.js +2102 -2120
- package/dist/stonecrop.js.map +1 -1
- package/dist/stonecrop.umd.cjs +7 -7
- package/dist/stonecrop.umd.cjs.map +1 -1
- package/package.json +9 -10
package/dist/stonecrop.umd.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(N,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],S):(N=typeof globalThis<"u"?globalThis:N||self,S(N["@stonecrop/stonecrop"]={},N.Vue))})(this,function(N,S){"use strict";var Yc=Object.defineProperty;var qc=(N,S,pe)=>S in N?Yc(N,S,{enumerable:!0,configurable:!0,writable:!0,value:pe}):N[S]=pe;var P=(N,S,pe)=>qc(N,typeof S!="symbol"?S+"":S,pe);function pe(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function fo(){const e=pe();if(e.__xstate__)return e.__xstate__}const ho=e=>{if(typeof window>"u")return;const t=fo();t&&t.register(e)};class gn{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){const n={value:t,next:null};if(this._current){this._last.next=n,this._last=n;return}this._current=n,this._last=n,this._active&&this.flush()}flush(){for(;this._current;){const t=this._current;this._process(t.value),this._current=t.next}this._last=null}}const mn=".",po="",En="",_o="#",go="*",yn="xstate.init",_t="xstate.stop";function mo(e,t){return{type:`xstate.after.${e}.${t}`}}function gt(e,t){return{type:`xstate.done.state.${e}`,output:t}}function Eo(e,t){return{type:`xstate.done.actor.${e}`,output:t,actorId:e}}function yo(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function vn(e){return{type:yn,input:e}}function J(e){setTimeout(()=>{throw e})}const vo=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Sn(e,t){const n=bn(e),r=bn(t);return typeof r=="string"?typeof n=="string"?r===n:!1:typeof n=="string"?n in r:Object.keys(n).every(s=>s in r?Sn(n[s],r[s]):!1)}function mt(e){if(On(e))return e;const t=[];let n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r]}return t.push(n),t}function bn(e){if(ei(e))return e.value;if(typeof e!="string")return e;const t=mt(e);return So(t)}function So(e){if(e.length===1)return e[0];const t={};let n=t;for(let r=0;r<e.length-1;r++)if(r===e.length-2)n[e[r]]=e[r+1];else{const s=n;n={},s[e[r]]=n}return t}function An(e,t){const n={},r=Object.keys(e);for(let s=0;s<r.length;s++){const o=r[s];n[o]=t(e[o],o,e,s)}return n}function wn(e){return On(e)?e:[e]}function Q(e){return e===void 0?[]:wn(e)}function Et(e,t,n,r){return typeof e=="function"?e({context:t,event:n,self:r}):e}function On(e){return Array.isArray(e)}function bo(e){return e.type.startsWith("xstate.error.actor")}function _e(e){return wn(e).map(t=>typeof t>"u"||typeof t=="string"?{target:t}:t)}function Tn(e){if(!(e===void 0||e===po))return Q(e)}function yt(e,t,n){var o,i,u;const r=typeof e=="object",s=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(s),error:(i=r?e.error:t)==null?void 0:i.bind(s),complete:(u=r?e.complete:n)==null?void 0:u.bind(s)}}function In(e,t){return`${t}.${e}`}function vt(e,t){const n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];const[,r,s]=n,i=e.getStateNodeById(s).config.invoke;return(Array.isArray(i)?i[r]:i).src}function kn(e,t){return`${e.sessionId}.${t}`}let Ao=0;function wo(e,t){const n=new Map,r=new Map,s=new WeakMap,o=new Set,i={},{clock:u,logger:a}=t,c={schedule:(f,h,d,m,g=Math.random().toString(36).slice(2))=>{const E={source:f,target:h,event:d,delay:m,id:g,startedAt:Date.now()},w=kn(f,g);l._snapshot._scheduledEvents[w]=E;const T=u.setTimeout(()=>{delete i[w],delete l._snapshot._scheduledEvents[w],l._relay(f,h,d)},m);i[w]=T},cancel:(f,h)=>{const d=kn(f,h),m=i[d];delete i[d],delete l._snapshot._scheduledEvents[d],m!==void 0&&u.clearTimeout(m)},cancelAll:f=>{for(const h in l._snapshot._scheduledEvents){const d=l._snapshot._scheduledEvents[h];d.source===f&&c.cancel(f,d.id)}}},p=f=>{if(!o.size)return;const h={...f,rootId:e.sessionId};o.forEach(d=>{var m;return(m=d.next)==null?void 0:m.call(d,h)})},l={_snapshot:{_scheduledEvents:((t==null?void 0:t.snapshot)&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${Ao++}`,_register:(f,h)=>(n.set(f,h),f),_unregister:f=>{n.delete(f.sessionId);const h=s.get(f);h!==void 0&&(r.delete(h),s.delete(f))},get:f=>r.get(f),_set:(f,h)=>{const d=r.get(f);if(d&&d!==h)throw new Error(`Actor with system ID '${f}' already exists.`);r.set(f,h),s.set(h,f)},inspect:f=>{const h=yt(f);return o.add(h),{unsubscribe(){o.delete(h)}}},_sendInspectionEvent:p,_relay:(f,h,d)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:f,actorRef:h,event:d}),h._send(d)},scheduler:c,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{const f=l._snapshot._scheduledEvents;l._snapshot._scheduledEvents={};for(const h in f){const{source:d,target:m,event:g,delay:E,id:w}=f[h];c.schedule(d,m,g,E,w)}},_clock:u,_logger:a};return l}let St=!1;const bt=1;let M=function(e){return e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped",e}({});const Oo={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class To{constructor(t,n){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new gn(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=M.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const r={...Oo,...n},{clock:s,logger:o,parent:i,syncSnapshot:u,id:a,systemId:c,inspect:p}=r;this.system=i?i.system:wo(this,{clock:s,logger:o}),p&&!i&&this.system.inspect(yt(p)),this.sessionId=this.system._bookId(),this.id=a??this.sessionId,this.logger=(n==null?void 0:n.logger)??this.system._logger,this.clock=(n==null?void 0:n.clock)??this.system._clock,this._parent=i,this._syncSnapshot=u,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:l=>{this._deferred.push(l)},system:this.system,stopChild:l=>{if(l._parent!==this)throw new Error(`Cannot stop child actor ${l.id} of ${this.id} because it is not a child`);l._stop()},emit:l=>{const f=this.eventListeners.get(l.type),h=this.eventListeners.get("*");if(!f&&!h)return;const d=[...f?f.values():[],...h?h.values():[]];for(const m of d)m(l)},actionExecutor:l=>{const f=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:l.type,params:l.params}}),!l.exec)return;const h=St;try{St=!0,l.exec(l.info,l.params)}finally{St=h}};this._processingStatus===M.Running?f():this._deferred.push(f)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),c&&(this._systemId=c,this.system._set(c,this)),this._initState((n==null?void 0:n.snapshot)??(n==null?void 0:n.state)),c&&this._snapshot.status!=="active"&&this.system._unregister(this)}_initState(t){var n;try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,(n=this.options)==null?void 0:n.input)}catch(r){this._snapshot={status:"error",output:void 0,error:r}}}update(t,n){var s,o;this._snapshot=t;let r;for(;r=this._deferred.shift();)try{r()}catch(i){this._deferred.length=0,this._snapshot={...t,status:"error",error:i}}switch(this._snapshot.status){case"active":for(const i of this.observers)try{(s=i.next)==null||s.call(i,t)}catch(u){J(u)}break;case"done":for(const i of this.observers)try{(o=i.next)==null||o.call(i,t)}catch(u){J(u)}this._stopProcedure(),this._complete(),this._doneEvent=Eo(this.id,this._snapshot.output),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error);break}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:n,snapshot:t})}subscribe(t,n,r){var o;const s=yt(t,n,r);if(this._processingStatus!==M.Stopped)this.observers.add(s);else switch(this._snapshot.status){case"done":try{(o=s.complete)==null||o.call(s)}catch(i){J(i)}break;case"error":{const i=this._snapshot.error;if(!s.error)J(i);else try{s.error(i)}catch(u){J(u)}break}}return{unsubscribe:()=>{this.observers.delete(s)}}}on(t,n){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));const s=n.bind(void 0);return r.add(s),{unsubscribe:()=>{r.delete(s)}}}start(){if(this._processingStatus===M.Running)return this;this._syncSnapshot&&this.subscribe({next:r=>{r.status==="active"&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:r})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=M.Running;const t=vn(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(r){return this._snapshot={...this._snapshot,status:"error",error:r},this._error(r),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let n,r;try{n=this.logic.transition(this._snapshot,t,this._actorScope)}catch(s){r={err:s}}if(r){const{err:s}=r;this._snapshot={...this._snapshot,status:"error",error:s},this._error(s);return}this.update(n,t),t.type===_t&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===M.Stopped?this:(this.mailbox.clear(),this._processingStatus===M.NotStarted?(this._processingStatus=M.Stopped,this):(this.mailbox.enqueue({type:_t}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){var t;for(const n of this.observers)try{(t=n.complete)==null||t.call(n)}catch(r){J(r)}this.observers.clear()}_reportError(t){if(!this.observers.size){this._parent||J(t);return}let n=!1;for(const r of this.observers){const s=r.error;n||(n=!s);try{s==null||s(t)}catch(o){J(o)}}this.observers.clear(),n&&J(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,yo(this.id,t))}_stopProcedure(){return this._processingStatus!==M.Running?this:(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new gn(this._process.bind(this)),this._processingStatus=M.Stopped,this.system._unregister(this),this)}_send(t){this._processingStatus!==M.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){const{devTools:t}=this.options;t&&(typeof t=="function"?t:ho)(this)}toJSON(){return{xstate$$type:bt,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[vo](){return this}getSnapshot(){return this._snapshot}}function Pe(e,...[t]){return new To(e,t)}function Io(e,t,n,r,{sendId:s}){const o=typeof s=="function"?s(n,r):s;return[t,{sendId:o},void 0]}function ko(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId)})}function Co(e){function t(n,r){}return t.type="xstate.cancel",t.sendId=e,t.resolve=Io,t.execute=ko,t}function Do(e,t,n,r,{id:s,systemId:o,src:i,input:u,syncSnapshot:a}){const c=typeof i=="string"?vt(t.machine,i):i,p=typeof s=="function"?s(n):s;let l,f;return c&&(f=typeof u=="function"?u({context:t.context,event:n.event,self:e.self}):u,l=Pe(c,{id:p,src:i,parent:e.self,syncSnapshot:a,systemId:o,input:f})),[ae(t,{children:{...t.children,[p]:l}}),{id:s,systemId:o,actorRef:l,src:i,input:f},void 0]}function xo(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==M.Stopped&&t.start()})}function Ro(...[e,{id:t,systemId:n,input:r,syncSnapshot:s=!1}={}]){function o(i,u){}return o.type="xstate.spawnChild",o.id=t,o.systemId=n,o.src=e,o.input=r,o.syncSnapshot=s,o.resolve=Do,o.execute=xo,o}function Po(e,t,n,r,{actorRef:s}){const o=typeof s=="function"?s(n,r):s,i=typeof o=="string"?t.children[o]:o;let u=t.children;return i&&(u={...u},delete u[i.id]),[ae(t,{children:u}),i,void 0]}function No(e,t){if(t){if(e.system._unregister(t),t._processingStatus!==M.Running){e.stopChild(t);return}e.defer(()=>{e.stopChild(t)})}}function Cn(e){function t(n,r){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=Po,t.execute=No,t}function At(e,t,n,r){const{machine:s}=r,o=typeof e=="function",i=o?e:s.implementations.guards[typeof e=="string"?e:e.type];if(!o&&!i)throw new Error(`Guard '${typeof e=="string"?e:e.type}' is not implemented.'.`);if(typeof i!="function")return At(i,t,n,r);const u={context:t,event:n},a=o||typeof e=="string"?void 0:"params"in e?typeof e.params=="function"?e.params({context:t,event:n}):e.params:void 0;return"check"in i?i.check(r,u,i):i(u,a)}const wt=e=>e.type==="atomic"||e.type==="final";function ge(e){return Object.values(e.states).filter(t=>t.type!=="history")}function Ne(e,t){const n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function Ye(e){const t=new Set(e),n=xn(t);for(const r of t)if(r.type==="compound"&&(!n.get(r)||!n.get(r).length))Nn(r).forEach(s=>t.add(s));else if(r.type==="parallel"){for(const s of ge(r))if(s.type!=="history"&&!t.has(s)){const o=Nn(s);for(const i of o)t.add(i)}}for(const r of t){let s=r.parent;for(;s;)t.add(s),s=s.parent}return t}function Dn(e,t){const n=t.get(e);if(!n)return{};if(e.type==="compound"){const s=n[0];if(s){if(wt(s))return s.key}else return{}}const r={};for(const s of n)r[s.key]=Dn(s,t);return r}function xn(e){const t=new Map;for(const n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function Rn(e,t){const n=Ye(t);return Dn(e,xn(n))}function Ot(e,t){return t.type==="compound"?ge(t).some(n=>n.type==="final"&&e.has(n)):t.type==="parallel"?ge(t).every(n=>Ot(e,n)):t.type==="final"}const qe=e=>e[0]===_o;function Vo(e,t){return e.transitions.get(t)||[...e.transitions.keys()].filter(r=>{if(r===go)return!0;if(!r.endsWith(".*"))return!1;const s=r.split("."),o=t.split(".");for(let i=0;i<s.length;i++){const u=s[i],a=o[i];if(u==="*")return i===s.length-1;if(u!==a)return!1}return!0}).sort((r,s)=>s.length-r.length).flatMap(r=>e.transitions.get(r))}function Lo(e){const t=e.config.after;if(!t)return[];const n=s=>{const o=mo(s,e.id),i=o.type;return e.entry.push(li(o,{id:i,delay:s})),e.exit.push(Co(i)),i};return Object.keys(t).flatMap(s=>{const o=t[s],i=typeof o=="string"?{target:o}:o,u=Number.isNaN(+s)?s:+s,a=n(u);return Q(i).map(c=>({...c,event:a,delay:u}))}).map(s=>{const{delay:o}=s;return{...ie(e,s.event,s),delay:o}})}function ie(e,t,n){const r=Tn(n.target),s=n.reenter??!1,o=$o(e,r),i={...n,actions:Q(n.actions),guard:n.guard,target:o,source:e,reenter:s,eventType:t,toJSON:()=>({...i,source:`#${e.id}`,target:o?o.map(u=>`#${u.id}`):void 0})};return i}function Mo(e){const t=new Map;if(e.config.on)for(const n of Object.keys(e.config.on)){if(n===En)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');const r=e.config.on[n];t.set(n,_e(r).map(s=>ie(e,n,s)))}if(e.config.onDone){const n=`xstate.done.state.${e.id}`;t.set(n,_e(e.config.onDone).map(r=>ie(e,n,r)))}for(const n of e.invoke){if(n.onDone){const r=`xstate.done.actor.${n.id}`;t.set(r,_e(n.onDone).map(s=>ie(e,r,s)))}if(n.onError){const r=`xstate.error.actor.${n.id}`;t.set(r,_e(n.onError).map(s=>ie(e,r,s)))}if(n.onSnapshot){const r=`xstate.snapshot.${n.id}`;t.set(r,_e(n.onSnapshot).map(s=>ie(e,r,s)))}}for(const n of e.after){let r=t.get(n.eventType);r||(r=[],t.set(n.eventType,r)),r.push(n)}return t}function Bo(e,t){const n=typeof t=="string"?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw new Error(`Initial state node "${t}" not found on parent state node #${e.id}`);const r={source:e,actions:!t||typeof t=="string"?[]:Q(t.actions),eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r}function $o(e,t){if(t!==void 0)return t.map(n=>{if(typeof n!="string")return n;if(qe(n))return e.machine.getStateNodeById(n);const r=n[0]===mn;if(r&&!e.parent)return Je(e,n.slice(1));const s=r?e.key+n:n;if(e.parent)try{return Je(e.parent,s)}catch(o){throw new Error(`Invalid transition definition for state node '${e.id}':
|
|
2
|
-
${o.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function Pn(e){const t=Tn(e.config.target);return t?{target:t.map(n=>typeof n=="string"?Je(e.parent,n):n)}:e.parent.initial}function ue(e){return e.type==="history"}function Nn(e){const t=Vn(e);for(const n of t)for(const r of Ne(n,e))t.add(r);return t}function Vn(e){const t=new Set;function n(r){if(!t.has(r)){if(t.add(r),r.type==="compound")n(r.initial.target[0]);else if(r.type==="parallel")for(const s of ge(r))n(s)}}return n(e),t}function me(e,t){if(qe(t))return e.machine.getStateNodeById(t);if(!e.states)throw new Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);const n=e.states[t];if(!n)throw new Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function Je(e,t){if(typeof t=="string"&&qe(t))try{return e.machine.getStateNodeById(t)}catch{}const n=mt(t).slice();let r=e;for(;n.length;){const s=n.shift();if(!s.length)break;r=me(r,s)}return r}function Xe(e,t){if(typeof t=="string"){const s=e.states[t];if(!s)throw new Error(`State '${t}' does not exist on '${e.id}'`);return[e,s]}const n=Object.keys(t),r=n.map(s=>me(e,s)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((s,o)=>{const i=me(e,o);if(!i)return s;const u=Xe(i,t[o]);return s.concat(u)},[]))}function Uo(e,t,n,r){const o=me(e,t).next(n,r);return!o||!o.length?e.next(n,r):o}function Fo(e,t,n,r){const s=Object.keys(t),o=me(e,s[0]),i=Tt(o,t[s[0]],n,r);return!i||!i.length?e.next(n,r):i}function jo(e,t,n,r){const s=[];for(const o of Object.keys(t)){const i=t[o];if(!i)continue;const u=me(e,o),a=Tt(u,i,n,r);a&&s.push(...a)}return s.length?s:e.next(n,r)}function Tt(e,t,n,r){return typeof t=="string"?Uo(e,t,n,r):Object.keys(t).length===1?Fo(e,t,n,r):jo(e,t,n,r)}function Ho(e){return Object.keys(e.states).map(t=>e.states[t]).filter(t=>t.type==="history")}function ee(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function zo(e,t){const n=new Set(e),r=new Set(t);for(const s of n)if(r.has(s))return!0;for(const s of r)if(n.has(s))return!0;return!1}function Ln(e,t,n){const r=new Set;for(const s of e){let o=!1;const i=new Set;for(const u of r)if(zo(kt([s],t,n),kt([u],t,n)))if(ee(s.source,u.source))i.add(u);else{o=!0;break}if(!o){for(const u of i)r.delete(u);r.add(s)}}return Array.from(r)}function Ko(e){const[t,...n]=e;for(const r of Ne(t,void 0))if(n.every(s=>ee(s,r)))return r}function It(e,t){if(!e.target)return[];const n=new Set;for(const r of e.target)if(ue(r))if(t[r.id])for(const s of t[r.id])n.add(s);else for(const s of It(Pn(r),t))n.add(s);else n.add(r);return[...n]}function Mn(e,t){const n=It(e,t);if(!n)return;if(!e.reenter&&n.every(s=>s===e.source||ee(s,e.source)))return e.source;const r=Ko(n.concat(e.source));if(r)return r;if(!e.reenter)return e.source.machine.root}function kt(e,t,n){var s;const r=new Set;for(const o of e)if((s=o.target)!=null&&s.length){const i=Mn(o,n);o.reenter&&o.source===i&&r.add(i);for(const u of t)ee(u,i)&&r.add(u)}return[...r]}function Go(e,t){if(e.length!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Ct(e,t,n,r,s,o){if(!e.length)return t;const i=new Set(t._nodes);let u=t.historyValue;const a=Ln(e,i,u);let c=t;s||([c,u]=Jo(c,r,n,a,i,u,o,n.actionExecutor)),c=ye(c,r,n,a.flatMap(l=>l.actions),o,void 0),c=Yo(c,r,n,a,i,o,u,s);const p=[...i];c.status==="done"&&(c=ye(c,r,n,p.sort((l,f)=>f.order-l.order).flatMap(l=>l.exit),o,void 0));try{return u===t.historyValue&&Go(t._nodes,i)?c:ae(c,{_nodes:p,historyValue:u})}catch(l){throw l}}function Wo(e,t,n,r,s){if(r.output===void 0)return;const o=gt(s.id,s.output!==void 0&&s.parent?Et(s.output,e.context,t,n.self):void 0);return Et(r.output,e.context,o,n.self)}function Yo(e,t,n,r,s,o,i,u){let a=e;const c=new Set,p=new Set;qo(r,i,p,c),u&&p.add(e.machine.root);const l=new Set;for(const f of[...c].sort((h,d)=>h.order-d.order)){s.add(f);const h=[];h.push(...f.entry);for(const d of f.invoke)h.push(Ro(d.src,{...d,syncSnapshot:!!d.onSnapshot}));if(p.has(f)){const d=f.initial.actions;h.push(...d)}if(a=ye(a,t,n,h,o,f.invoke.map(d=>d.id)),f.type==="final"){const d=f.parent;let m=(d==null?void 0:d.type)==="parallel"?d:d==null?void 0:d.parent,g=m||f;for((d==null?void 0:d.type)==="compound"&&o.push(gt(d.id,f.output!==void 0?Et(f.output,a.context,t,n.self):void 0));(m==null?void 0:m.type)==="parallel"&&!l.has(m)&&Ot(s,m);)l.add(m),o.push(gt(m.id)),g=m,m=m.parent;if(m)continue;a=ae(a,{status:"done",output:Wo(a,t,n,a.machine.root,g)})}}return a}function qo(e,t,n,r){for(const s of e){const o=Mn(s,t);for(const u of s.target||[])!ue(u)&&(s.source!==u||s.source!==o||s.reenter)&&(r.add(u),n.add(u)),Ee(u,t,n,r);const i=It(s,t);for(const u of i){const a=Ne(u,o);(o==null?void 0:o.type)==="parallel"&&a.push(o),Bn(r,t,n,a,!s.source.parent&&s.reenter?void 0:o)}}}function Ee(e,t,n,r){var s;if(ue(e))if(t[e.id]){const o=t[e.id];for(const i of o)r.add(i),Ee(i,t,n,r);for(const i of o)Dt(i,e.parent,r,t,n)}else{const o=Pn(e);for(const i of o.target)r.add(i),o===((s=e.parent)==null?void 0:s.initial)&&n.add(e.parent),Ee(i,t,n,r);for(const i of o.target)Dt(i,e.parent,r,t,n)}else if(e.type==="compound"){const[o]=e.initial.target;ue(o)||(r.add(o),n.add(o)),Ee(o,t,n,r),Dt(o,e,r,t,n)}else if(e.type==="parallel")for(const o of ge(e).filter(i=>!ue(i)))[...r].some(i=>ee(i,o))||(ue(o)||(r.add(o),n.add(o)),Ee(o,t,n,r))}function Bn(e,t,n,r,s){for(const o of r)if((!s||ee(o,s))&&e.add(o),o.type==="parallel")for(const i of ge(o).filter(u=>!ue(u)))[...e].some(u=>ee(u,i))||(e.add(i),Ee(i,t,n,e))}function Dt(e,t,n,r,s){Bn(n,r,s,Ne(e,t))}function Jo(e,t,n,r,s,o,i,u){let a=e;const c=kt(r,s,o);c.sort((l,f)=>f.order-l.order);let p;for(const l of c)for(const f of Ho(l)){let h;f.history==="deep"?h=d=>wt(d)&&ee(d,l):h=d=>d.parent===l,p??(p={...o}),p[f.id]=Array.from(s).filter(h)}for(const l of c)a=ye(a,t,n,[...l.exit,...l.invoke.map(f=>Cn(f.id))],i,void 0),s.delete(l);return[a,p||o]}function Xo(e,t){return e.implementations.actions[t]}function $n(e,t,n,r,s,o){const{machine:i}=e;let u=e;for(const a of r){const c=typeof a=="function",p=c?a:Xo(i,typeof a=="string"?a:a.type),l={context:u.context,event:t,self:n.self,system:n.system},f=c||typeof a=="string"?void 0:"params"in a?typeof a.params=="function"?a.params({context:u.context,event:t}):a.params:void 0;if(!p||!("resolve"in p)){n.actionExecutor({type:typeof a=="string"?a:typeof a=="object"?a.type:a.name||"(anonymous)",info:l,params:f,exec:p});continue}const h=p,[d,m,g]=h.resolve(n,u,l,f,p,s);u=d,"retryResolve"in h&&(o==null||o.push([h,m])),"execute"in h&&n.actionExecutor({type:h.type,info:l,params:m,exec:h.execute.bind(null,n,m)}),g&&(u=$n(u,t,n,g,s,o))}return u}function ye(e,t,n,r,s,o){const i=o?[]:void 0,u=$n(e,t,n,r,{internalQueue:s,deferredActorIds:o},i);return i==null||i.forEach(([a,c])=>{a.retryResolve(n,u,c)}),u}function xt(e,t,n,r){let s=e;const o=[];function i(c,p,l){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:p,snapshot:c,_transitions:l}),o.push(c)}if(t.type===_t)return s=ae(Un(s,t,n),{status:"stopped"}),i(s,t,[]),{snapshot:s,microstates:o};let u=t;if(u.type!==yn){const c=u,p=bo(c),l=Fn(c,s);if(p&&!l.length)return s=ae(e,{status:"error",error:c.error}),i(s,c,[]),{snapshot:s,microstates:o};s=Ct(l,e,n,u,!1,r),i(s,c,l)}let a=!0;for(;s.status==="active";){let c=a?Zo(s,u):[];const p=c.length?s:void 0;if(!c.length){if(!r.length)break;u=r.shift(),c=Fn(u,s)}s=Ct(c,s,n,u,!1,r),a=s!==p,i(s,u,c)}return s.status!=="active"&&Un(s,u,n),{snapshot:s,microstates:o}}function Un(e,t,n){return ye(e,t,n,Object.values(e.children).map(r=>Cn(r)),[],void 0)}function Fn(e,t){return t.machine.getTransitionData(t,e)}function Zo(e,t){const n=new Set,r=e._nodes.filter(wt);for(const s of r)e:for(const o of[s].concat(Ne(s,void 0)))if(o.always){for(const i of o.always)if(i.guard===void 0||At(i.guard,e.context,t,e)){n.add(i);break e}}return Ln(Array.from(n),new Set(e._nodes),e.historyValue)}function Qo(e,t){const n=Ye(Xe(e,t));return Rn(e,[...n])}function ei(e){return!!e&&typeof e=="object"&&"machine"in e&&"value"in e}const ti=function(t){return Sn(t,this.value)},ni=function(t){return this.tags.has(t)},ri=function(t){const n=this.machine.getTransitionData(this,t);return!!(n!=null&&n.length)&&n.some(r=>r.target!==void 0||r.actions.length)},si=function(){const{_nodes:t,tags:n,machine:r,getMeta:s,toJSON:o,can:i,hasTag:u,matches:a,...c}=this;return{...c,tags:Array.from(n)}},oi=function(){return this._nodes.reduce((t,n)=>(n.meta!==void 0&&(t[n.id]=n.meta),t),{})};function Ze(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:Rn(t.root,e._nodes),tags:new Set(e._nodes.flatMap(n=>n.tags)),children:e.children,historyValue:e.historyValue||{},matches:ti,hasTag:ni,can:ri,getMeta:oi,toJSON:si}}function ae(e,t={}){return Ze({...e,...t},e.machine)}function ii(e){if(typeof e!="object"||e===null)return{};const t={};for(const n in e){const r=e[n];Array.isArray(r)&&(t[n]=r.map(s=>({id:s.id})))}return t}function ui(e,t){const{_nodes:n,tags:r,machine:s,children:o,context:i,can:u,hasTag:a,matches:c,getMeta:p,toJSON:l,...f}=e,h={};for(const m in o){const g=o[m];h[m]={snapshot:g.getPersistedSnapshot(t),src:g.src,systemId:g._systemId,syncSnapshot:g._syncSnapshot}}return{...f,context:jn(i),children:h,historyValue:ii(f.historyValue)}}function jn(e){let t;for(const n in e){const r=e[n];if(r&&typeof r=="object")if("sessionId"in r&&"send"in r&&"ref"in r)t??(t=Array.isArray(e)?e.slice():{...e}),t[n]={xstate$$type:bt,id:r.id};else{const s=jn(r);s!==r&&(t??(t=Array.isArray(e)?e.slice():{...e}),t[n]=s)}}return t??e}function ai(e,t,n,r,{event:s,id:o,delay:i},{internalQueue:u}){const a=t.machine.implementations.delays;if(typeof s=="string")throw new Error(`Only event objects may be used with raise; use raise({ type: "${s}" }) instead`);const c=typeof s=="function"?s(n,r):s;let p;if(typeof i=="string"){const l=a&&a[i];p=typeof l=="function"?l(n,r):l}else p=typeof i=="function"?i(n,r):i;return typeof p!="number"&&u.push(c),[t,{event:c,id:o,delay:p},void 0]}function ci(e,t){const{event:n,delay:r,id:s}=t;if(typeof r=="number"){e.defer(()=>{const o=e.self;e.system.scheduler.schedule(o,o,n,r,s)});return}}function li(e,t){function n(r,s){}return n.type="xstate.raise",n.event=e,n.id=t==null?void 0:t.id,n.delay=t==null?void 0:t.delay,n.resolve=ai,n.execute=ci,n}function fi(e,{machine:t,context:n},r,s){const o=(i,u)=>{if(typeof i=="string"){const a=vt(t,i);if(!a)throw new Error(`Actor logic '${i}' not implemented in machine '${t.id}'`);const c=Pe(a,{id:u==null?void 0:u.id,parent:e.self,syncSnapshot:u==null?void 0:u.syncSnapshot,input:typeof(u==null?void 0:u.input)=="function"?u.input({context:n,event:r,self:e.self}):u==null?void 0:u.input,src:i,systemId:u==null?void 0:u.systemId});return s[c.id]=c,c}else return Pe(i,{id:u==null?void 0:u.id,parent:e.self,syncSnapshot:u==null?void 0:u.syncSnapshot,input:u==null?void 0:u.input,src:i,systemId:u==null?void 0:u.systemId})};return(i,u)=>{const a=o(i,u);return s[a.id]=a,e.defer(()=>{a._processingStatus!==M.Stopped&&a.start()}),a}}function di(e,t,n,r,{assignment:s}){if(!t.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const o={},i={context:t.context,event:n.event,spawn:fi(e,t,n.event,o),self:e.self,system:e.system};let u={};if(typeof s=="function")u=s(i,r);else for(const c of Object.keys(s)){const p=s[c];u[c]=typeof p=="function"?p(i,r):p}const a=Object.assign({},t.context,u);return[ae(t,{context:a,children:Object.keys(o).length?{...t.children,...o}:t.children}),void 0,void 0]}function hi(e){function t(n,r){}return t.type="xstate.assign",t.assignment=e,t.resolve=di,t}const Hn=new WeakMap;function ve(e,t,n){let r=Hn.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},Hn.set(e,r)),r[t]}const pi={},Ve=e=>typeof e=="string"?{type:e}:typeof e=="function"?"resolve"in e?{type:e.type}:{type:e.name}:e;class Qe{constructor(t,n){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=n._parent,this.key=n._key,this.machine=n._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(mn),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?An(this.config.states,(r,s)=>new Qe(r,{_parent:this,_key:s,_machine:this.machine})):pi,this.type==="compound"&&!this.config.initial)throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=this.config.history===!0?"shallow":this.config.history||!1,this.entry=Q(this.config.entry).slice(),this.exit=Q(this.config.exit).slice(),this.meta=this.config.meta,this.output=this.type==="final"||!this.parent?this.config.output:void 0,this.tags=Q(t.tags).slice()}_initialize(){this.transitions=Mo(this),this.config.always&&(this.always=_e(this.config.always).map(t=>ie(this,En,t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(Ve),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(Ve),eventType:null})}:void 0,history:this.history,states:An(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(Ve)})),entry:this.entry.map(Ve),exit:this.exit.map(Ve),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return ve(this,"invoke",()=>Q(this.config.invoke).map((t,n)=>{const{src:r,systemId:s}=t,o=t.id??In(this.id,n),i=typeof r=="string"?r:`xstate.invoke.${In(this.id,n)}`;return{...t,src:i,id:o,systemId:s,toJSON(){const{onDone:u,onError:a,...c}=t;return{...c,type:"xstate.invoke",src:i,id:o}}}}))}get on(){return ve(this,"on",()=>[...this.transitions].flatMap(([n,r])=>r.map(s=>[n,s])).reduce((n,[r,s])=>(n[r]=n[r]||[],n[r].push(s),n),{}))}get after(){return ve(this,"delayedTransitions",()=>Lo(this))}get initial(){return ve(this,"initial",()=>Bo(this,this.config.initial))}next(t,n){const r=n.type,s=[];let o;const i=ve(this,`candidates-${r}`,()=>Vo(this,r));for(const u of i){const{guard:a}=u,c=t.context;let p=!1;try{p=!a||At(a,c,n,t)}catch(l){const f=typeof a=="string"?a:typeof a=="object"?a.type:void 0;throw new Error(`Unable to evaluate guard ${f?`'${f}' `:""}in transition for event '${r}' in state node '${this.id}':
|
|
3
|
-
${l.message}`)}if(p){s.push(...u.actions),o=u;break}}return o?[o]:void 0}get events(){return ve(this,"events",()=>{const{states:t}=this,n=new Set(this.ownEvents);if(t)for(const r of Object.keys(t)){const s=t[r];if(s.states)for(const o of s.events)n.add(`${o}`)}return Array.from(n)})}get ownEvents(){const t=new Set([...this.transitions.keys()].filter(n=>this.transitions.get(n).some(r=>!(!r.target&&!r.actions.length&&!r.reenter))));return Array.from(t)}}const _i="#";class Rt{constructor(t,n){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:(n==null?void 0:n.actors)??{},actions:(n==null?void 0:n.actions)??{},delays:(n==null?void 0:n.delays)??{},guards:(n==null?void 0:n.guards)??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new Qe(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){const{actions:n,guards:r,actors:s,delays:o}=this.implementations;return new Rt(this.config,{actions:{...n,...t.actions},guards:{...r,...t.guards},actors:{...s,...t.actors},delays:{...o,...t.delays}})}resolveState(t){const n=Qo(this.root,t.value),r=Ye(Xe(this.root,n));return Ze({_nodes:[...r],context:t.context||{},children:{},status:Ot(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,n,r){return xt(t,n,r,[]).snapshot}microstep(t,n,r){return xt(t,n,r,[]).microstates}getTransitionData(t,n){return Tt(this.root,t.value,t,n)||[]}getPreInitialState(t,n,r){const{context:s}=this.config,o=Ze({context:typeof s!="function"&&s?s:{},_nodes:[this.root],children:{},status:"active"},this);return typeof s=="function"?ye(o,n,t,[hi(({spawn:u,event:a,self:c})=>s({spawn:u,input:a.input,self:c}))],r,void 0):o}getInitialSnapshot(t,n){const r=vn(n),s=[],o=this.getPreInitialState(t,r,s),i=Ct([{target:[...Vn(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],o,t,r,!0,s),{snapshot:u}=xt(i,r,t,s);return u}start(t){Object.values(t.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start()})}getStateNodeById(t){const n=mt(t),r=n.slice(1),s=qe(n[0])?n[0].slice(_i.length):n[0],o=this.idMap.get(s);if(!o)throw new Error(`Child state node '#${s}' does not exist on machine '${this.id}'`);return Je(o,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,n){return ui(t,n)}restoreSnapshot(t,n){const r={},s=t.children;Object.keys(s).forEach(l=>{const f=s[l],h=f.snapshot,d=f.src,m=typeof d=="string"?vt(this,d):d;if(!m)return;const g=Pe(m,{id:l,parent:n.self,syncSnapshot:f.syncSnapshot,snapshot:h,src:d,systemId:f.systemId});r[l]=g});function o(l,f){if(f instanceof Qe)return f;try{return l.machine.getStateNodeById(f.id)}catch{}}function i(l,f){if(!f||typeof f!="object")return{};const h={};for(const d in f){const m=f[d];for(const g of m){const E=o(l,g);E&&(h[d]??(h[d]=[]),h[d].push(E))}}return h}const u=i(this.root,t.historyValue),a=Ze({...t,children:r,_nodes:Array.from(Ye(Xe(this.root,t.value))),historyValue:u},this),c=new Set;function p(l,f){if(!c.has(l)){c.add(l);for(const h in l){const d=l[h];if(d&&typeof d=="object"){if("xstate$$type"in d&&d.xstate$$type===bt){l[h]=f[d.id];continue}p(d,f)}}}}return p(a.context,r),a}}function gi(e,t){return new Rt(e,t)}function Pt(e){this.message=e||""}Pt.prototype=Object.create(Error.prototype,{constructor:{value:Pt},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const Ce=class Ce{constructor(t,n){P(this,"name","Stonecrop");P(this,"registry");P(this,"store");if(Ce._root)return Ce._root;Ce._root=this,this.registry=t,this.store=n}setup(t){this.getMeta(t.doctype)}async getMeta(t){if(!this.registry.getMeta)throw new Pt(`getMeta function is not implemented for ${t} in the registry`);return await this.registry.getMeta(t)}async getRecords(t,n){this.store.$patch({records:[]});const s=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:s})}async getRecord(t,n){this.store.$patch({record:{}});const s=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:s})}runAction(t,n,r){var u;const s=this.registry.registry[t.slug],o=(u=s.actions)==null?void 0:u.get(n),i=s.workflow;if(i){const a=gi(i),c=Pe(a);c.start(),c.send({type:n,id:r}),o&&o.length>0&&o.forEach(p=>{new Function(p)(r)})}}};P(Ce,"_root");let et=Ce;var mi=Object.create,zn=Object.defineProperty,Ei=Object.getOwnPropertyDescriptor,Nt=Object.getOwnPropertyNames,yi=Object.getPrototypeOf,vi=Object.prototype.hasOwnProperty,Si=(e,t)=>function(){return e&&(t=(0,e[Nt(e)[0]])(e=0)),t},bi=(e,t)=>function(){return t||(0,e[Nt(e)[0]])((t={exports:{}}).exports,t),t.exports},Ai=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Nt(t))!vi.call(e,s)&&s!==n&&zn(e,s,{get:()=>t[s],enumerable:!(r=Ei(t,s))||r.enumerable});return e},wi=(e,t,n)=>(n=e!=null?mi(yi(e)):{},Ai(zn(n,"default",{value:e,enumerable:!0}),e)),Le=Si({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),Oi=bi({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){Le(),t.exports=r;function n(o){return o instanceof Buffer?Buffer.from(o):new o.constructor(o.buffer.slice(),o.byteOffset,o.length)}function r(o){if(o=o||{},o.circles)return s(o);const i=new Map;if(i.set(Date,l=>new Date(l)),i.set(Map,(l,f)=>new Map(a(Array.from(l),f))),i.set(Set,(l,f)=>new Set(a(Array.from(l),f))),o.constructorHandlers)for(const l of o.constructorHandlers)i.set(l[0],l[1]);let u=null;return o.proto?p:c;function a(l,f){const h=Object.keys(l),d=new Array(h.length);for(let m=0;m<h.length;m++){const g=h[m],E=l[g];typeof E!="object"||E===null?d[g]=E:E.constructor!==Object&&(u=i.get(E.constructor))?d[g]=u(E,f):ArrayBuffer.isView(E)?d[g]=n(E):d[g]=f(E)}return d}function c(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return a(l,c);if(l.constructor!==Object&&(u=i.get(l.constructor)))return u(l,c);const f={};for(const h in l){if(Object.hasOwnProperty.call(l,h)===!1)continue;const d=l[h];typeof d!="object"||d===null?f[h]=d:d.constructor!==Object&&(u=i.get(d.constructor))?f[h]=u(d,c):ArrayBuffer.isView(d)?f[h]=n(d):f[h]=c(d)}return f}function p(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return a(l,p);if(l.constructor!==Object&&(u=i.get(l.constructor)))return u(l,p);const f={};for(const h in l){const d=l[h];typeof d!="object"||d===null?f[h]=d:d.constructor!==Object&&(u=i.get(d.constructor))?f[h]=u(d,p):ArrayBuffer.isView(d)?f[h]=n(d):f[h]=p(d)}return f}}function s(o){const i=[],u=[],a=new Map;if(a.set(Date,h=>new Date(h)),a.set(Map,(h,d)=>new Map(p(Array.from(h),d))),a.set(Set,(h,d)=>new Set(p(Array.from(h),d))),o.constructorHandlers)for(const h of o.constructorHandlers)a.set(h[0],h[1]);let c=null;return o.proto?f:l;function p(h,d){const m=Object.keys(h),g=new Array(m.length);for(let E=0;E<m.length;E++){const w=m[E],T=h[w];if(typeof T!="object"||T===null)g[w]=T;else if(T.constructor!==Object&&(c=a.get(T.constructor)))g[w]=c(T,d);else if(ArrayBuffer.isView(T))g[w]=n(T);else{const B=i.indexOf(T);B!==-1?g[w]=u[B]:g[w]=d(T)}}return g}function l(h){if(typeof h!="object"||h===null)return h;if(Array.isArray(h))return p(h,l);if(h.constructor!==Object&&(c=a.get(h.constructor)))return c(h,l);const d={};i.push(h),u.push(d);for(const m in h){if(Object.hasOwnProperty.call(h,m)===!1)continue;const g=h[m];if(typeof g!="object"||g===null)d[m]=g;else if(g.constructor!==Object&&(c=a.get(g.constructor)))d[m]=c(g,l);else if(ArrayBuffer.isView(g))d[m]=n(g);else{const E=i.indexOf(g);E!==-1?d[m]=u[E]:d[m]=l(g)}}return i.pop(),u.pop(),d}function f(h){if(typeof h!="object"||h===null)return h;if(Array.isArray(h))return p(h,f);if(h.constructor!==Object&&(c=a.get(h.constructor)))return c(h,f);const d={};i.push(h),u.push(d);for(const m in h){const g=h[m];if(typeof g!="object"||g===null)d[m]=g;else if(g.constructor!==Object&&(c=a.get(g.constructor)))d[m]=c(g,f);else if(ArrayBuffer.isView(g))d[m]=n(g);else{const E=i.indexOf(g);E!==-1?d[m]=u[E]:d[m]=f(g)}}return i.pop(),u.pop(),d}}}});Le(),Le(),Le();var Kn=typeof navigator<"u",y=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof y.chrome<"u"&&y.chrome.devtools,Kn&&(y.self,y.top);var Gn;typeof navigator<"u"&&((Gn=navigator.userAgent)==null||Gn.toLowerCase().includes("electron")),Le();var Ti=wi(Oi()),Ii=/(?:^|[-_/])(\w)/g;function ki(e,t){return t?t.toUpperCase():""}function Ci(e){return e&&`${e}`.replace(Ii,ki)}function Di(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const r=n.lastIndexOf("/"),s=n.substring(r+1);{const o=s.lastIndexOf(t);return s.substring(0,o)}}var Wn=(0,Ti.default)({circles:!0});const xi={trailing:!0};function Se(e,t=25,n={}){if(n={...xi,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,s,o=[],i,u;const a=(c,p)=>(i=Ri(e,c,p),i.finally(()=>{if(i=null,n.trailing&&u&&!s){const l=a(c,u);return u=null,l}}),i);return function(...c){return i?(n.trailing&&(u=c),i):new Promise(p=>{const l=!s&&n.leading;clearTimeout(s),s=setTimeout(()=>{s=null;const f=n.leading?r:a(this,c);for(const h of o)h(f);o=[]},t),l?(r=a(this,c),p(r)):o.push(p)})}}async function Ri(e,t,n){return await e.apply(t,n)}function Vt(e,t={},n){for(const r in e){const s=e[r],o=n?`${n}:${r}`:r;typeof s=="object"&&s!==null?Vt(s,t,o):typeof s=="function"&&(t[o]=s)}return t}const Pi={run:e=>e()},Ni=()=>Pi,Yn=typeof console.createTask<"u"?console.createTask:Ni;function Vi(e,t){const n=t.shift(),r=Yn(n);return e.reduce((s,o)=>s.then(()=>r.run(()=>o(...t))),Promise.resolve())}function Li(e,t){const n=t.shift(),r=Yn(n);return Promise.all(e.map(s=>r.run(()=>s(...t))))}function Lt(e,t){for(const n of[...e])n(t)}class Mi{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const s=t;let o;for(;this._deprecatedHooks[t];)o=this._deprecatedHooks[t],t=o.to;if(o&&!r.allowDeprecated){let i=o.message;i||(i=`${s} hook has been deprecated`+(o.to?`, please use ${o.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,s=(...o)=>(typeof r=="function"&&r(),r=void 0,s=void 0,n(...o));return r=this.hook(t,s),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const s of r)this.hook(t,s)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Vt(t),r=Object.keys(n).map(s=>this.hook(s,n[s]));return()=>{for(const s of r.splice(0,r.length))s()}}removeHooks(t){const n=Vt(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(Vi,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(Li,t,...n)}callHookWith(t,n,...r){const s=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&Lt(this._before,s);const o=t(n in this._hooks?[...this._hooks[n]]:[],r);return o instanceof Promise?o.finally(()=>{this._after&&s&&Lt(this._after,s)}):(this._after&&s&&Lt(this._after,s),o)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function qn(){return new Mi}var Bi=Object.create,Jn=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,Mt=Object.getOwnPropertyNames,Ui=Object.getPrototypeOf,Fi=Object.prototype.hasOwnProperty,ji=(e,t)=>function(){return e&&(t=(0,e[Mt(e)[0]])(e=0)),t},Xn=(e,t)=>function(){return t||(0,e[Mt(e)[0]])((t={exports:{}}).exports,t),t.exports},Hi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Mt(t))!Fi.call(e,s)&&s!==n&&Jn(e,s,{get:()=>t[s],enumerable:!(r=$i(t,s))||r.enumerable});return e},zi=(e,t,n)=>(n=e!=null?Bi(Ui(e)):{},Hi(Jn(n,"default",{value:e,enumerable:!0}),e)),_=ji({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),Ki=Xn({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){_(),function(n){var r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},s=["်","ް"],o={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},i={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},u={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},a=[";","?",":","@","&","=","+","$",",","/"].join(""),c=[";","?",":","@","&","=","+","$",","].join(""),p=[".","!","~","*","'","(",")"].join(""),l=function(g,E){var w="-",T="",B="",se=!0,j={},A,Ge,$,b,v,I,R,H,xe,K,O,q,C,Re,oe="";if(typeof g!="string")return"";if(typeof E=="string"&&(w=E),R=u.en,H=i.en,typeof E=="object"){A=E.maintainCase||!1,j=E.custom&&typeof E.custom=="object"?E.custom:j,$=+E.truncate>1&&E.truncate||!1,b=E.uric||!1,v=E.uricNoSlash||!1,I=E.mark||!1,se=!(E.symbols===!1||E.lang===!1),w=E.separator||w,b&&(oe+=a),v&&(oe+=c),I&&(oe+=p),R=E.lang&&u[E.lang]&&se?u[E.lang]:se?u.en:{},H=E.lang&&i[E.lang]?i[E.lang]:E.lang===!1||E.lang===!0?{}:i.en,E.titleCase&&typeof E.titleCase.length=="number"&&Array.prototype.toString.call(E.titleCase)?(E.titleCase.forEach(function(G){j[G+""]=G+""}),Ge=!0):Ge=!!E.titleCase,E.custom&&typeof E.custom.length=="number"&&Array.prototype.toString.call(E.custom)&&E.custom.forEach(function(G){j[G+""]=G+""}),Object.keys(j).forEach(function(G){var We;G.length>1?We=new RegExp("\\b"+h(G)+"\\b","gi"):We=new RegExp(h(G),"gi"),g=g.replace(We,j[G])});for(O in j)oe+=O}for(oe+=w,oe=h(oe),g=g.replace(/(^\s+|\s+$)/g,""),C=!1,Re=!1,K=0,q=g.length;K<q;K++)O=g[K],d(O,j)?C=!1:H[O]?(O=C&&H[O].match(/[A-Za-z0-9]/)?" "+H[O]:H[O],C=!1):O in r?(K+1<q&&s.indexOf(g[K+1])>=0?(B+=O,O=""):Re===!0?(O=o[B]+r[O],B=""):O=C&&r[O].match(/[A-Za-z0-9]/)?" "+r[O]:r[O],C=!1,Re=!1):O in o?(B+=O,O="",K===q-1&&(O=o[B]),Re=!0):R[O]&&!(b&&a.indexOf(O)!==-1)&&!(v&&c.indexOf(O)!==-1)?(O=C||T.substr(-1).match(/[A-Za-z0-9]/)?w+R[O]:R[O],O+=g[K+1]!==void 0&&g[K+1].match(/[A-Za-z0-9]/)?w:"",C=!0):(Re===!0?(O=o[B]+O,B="",Re=!1):C&&(/[A-Za-z0-9]/.test(O)||T.substr(-1).match(/A-Za-z0-9]/))&&(O=" "+O),C=!1),T+=O.replace(new RegExp("[^\\w\\s"+oe+"_-]","g"),w);return Ge&&(T=T.replace(/(\w)(\S*)/g,function(G,We,lo){var _n=We.toUpperCase()+(lo!==null?lo:"");return Object.keys(j).indexOf(_n.toLowerCase())<0?_n:_n.toLowerCase()})),T=T.replace(/\s+/g,w).replace(new RegExp("\\"+w+"+","g"),w).replace(new RegExp("(^\\"+w+"+|\\"+w+"+$)","g"),""),$&&T.length>$&&(xe=T.charAt($)===w,T=T.slice(0,$),xe||(T=T.slice(0,T.lastIndexOf(w)))),!A&&!Ge&&(T=T.toLowerCase()),T},f=function(g){return function(w){return l(w,g)}},h=function(g){return g.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},d=function(m,g){for(var E in g)if(g[E]===m)return!0};if(typeof t<"u"&&t.exports)t.exports=l,t.exports.createSlug=f;else if(typeof define<"u"&&define.amd)define([],function(){return l});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=l,n.createSlug=f}catch{}}(e)}}),Gi=Xn({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){_(),t.exports=Ki()}});_(),_(),_(),_(),_(),_(),_(),_();function Wi(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function Yi(e){const t=e.__file;if(t)return Ci(Di(t,".vue"))}function Zn(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function Bt(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function Qn(e){var t,n;const r=(t=e.subTree)==null?void 0:t.type,s=Bt(e);return s?((n=s==null?void 0:s.types)==null?void 0:n.Fragment)===r:!1}function tt(e){var t,n,r;const s=Wi((e==null?void 0:e.type)||{});if(s)return s;if((e==null?void 0:e.root)===e)return"Root";for(const i in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[i]===(e==null?void 0:e.type))return Zn(e,i);for(const i in(r=e.appContext)==null?void 0:r.components)if(e.appContext.components[i]===(e==null?void 0:e.type))return Zn(e,i);const o=Yi((e==null?void 0:e.type)||{});return o||"Anonymous Component"}function qi(e){var t,n,r;const s=(r=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?r:0,o=e===(e==null?void 0:e.root)?"root":e.uid;return`${s}:${o}`}function $t(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function Ji(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var nt;function Xi(e){return nt||(nt=document.createRange()),nt.selectNode(e),nt.getBoundingClientRect()}function Zi(e){const t=Ji();if(!e.children)return t;for(let n=0,r=e.children.length;n<r;n++){const s=e.children[n];let o;if(s.component)o=ce(s.component);else if(s.el){const i=s.el;i.nodeType===1||i.getBoundingClientRect?o=i.getBoundingClientRect():i.nodeType===3&&i.data.trim()&&(o=Xi(i))}o&&Qi(t,o)}return t}function Qi(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var er={top:0,left:0,right:0,bottom:0,width:0,height:0};function ce(e){const t=e.subTree.el;return typeof window>"u"?er:Qn(e)?Zi(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ce(e.subTree.component):er}_();function Ut(e){return Qn(e)?eu(e.subTree):e.subTree?[e.subTree.el]:[]}function eu(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...Ut(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var tr="__vue-devtools-component-inspector__",nr="__vue-devtools-component-inspector__card__",rr="__vue-devtools-component-inspector__name__",sr="__vue-devtools-component-inspector__indicator__",or={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},tu={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},nu={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function be(){return document.getElementById(tr)}function ru(){return document.getElementById(nr)}function su(){return document.getElementById(sr)}function ou(){return document.getElementById(rr)}function Ft(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function jt(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:tr,Object.assign(n.style,{...or,...Ft(e.bounds),...e.style});const r=document.createElement("span");r.id=nr,Object.assign(r.style,{...tu,top:e.bounds.top<35?0:"-35px"});const s=document.createElement("span");s.id=rr,s.innerHTML=`<${e.name}> `;const o=document.createElement("i");return o.id=sr,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(o.style,nu),r.appendChild(s),r.appendChild(o),n.appendChild(r),document.body.appendChild(n),n}function Ht(e){const t=be(),n=ru(),r=ou(),s=su();t&&(Object.assign(t.style,{...or,...Ft(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),r.innerHTML=`<${e.name}> `,s.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function iu(e){const t=ce(e);if(!t.width&&!t.height)return;const n=tt(e);be()?Ht({bounds:t,name:n}):jt({bounds:t,name:n})}function ir(){const e=be();e&&(e.style.display="none")}var zt=null;function Kt(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(zt=n,n.vnode.el)){const s=ce(n),o=tt(n);be()?Ht({bounds:s,name:o}):jt({bounds:s,name:o})}}}function uu(e,t){if(e.preventDefault(),e.stopPropagation(),zt){const n=qi(zt);t(n)}}var rt=null;function au(){ir(),window.removeEventListener("mouseover",Kt),window.removeEventListener("click",rt,!0),rt=null}function cu(){return window.addEventListener("mouseover",Kt),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),uu(n,r=>{window.removeEventListener("click",t,!0),rt=null,window.removeEventListener("mouseover",Kt);const s=be();s&&(s.style.display="none"),e(JSON.stringify({id:r}))})}rt=t,window.addEventListener("click",t,!0)})}function lu(e){const t=$t(L.value,e.id);if(t){const[n]=Ut(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const r=ce(t),s=document.createElement("div"),o={...Ft(r),position:"absolute"};Object.assign(s.style,o),document.body.appendChild(s),s.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(s)},2e3)}setTimeout(()=>{const r=ce(t);if(r.width||r.height){const s=tt(t),o=be();o?Ht({...e,name:s,bounds:r}):jt({...e,name:s,bounds:r}),setTimeout(()=>{o&&(o.style.display="none")},1500)}},1200)}}_();var ur,ar;(ar=(ur=y).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(ur.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function fu(e){let t=0;const n=setInterval(()=>{y.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function du(){const e=y.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function hu(){return new Promise(e=>{function t(){du(),e(y.__VUE_INSPECTOR__)}y.__VUE_INSPECTOR__?t():fu(()=>{t()})})}_(),_();function pu(e){return!!(e&&e.__v_isReadonly)}function cr(e){return pu(e)?cr(e.__v_raw):!!(e&&e.__v_isReactive)}function Gt(e){return!!(e&&e.__v_isRef===!0)}function Me(e){const t=e&&e.__v_raw;return t?Me(t):e}var _u=class{constructor(){this.refEditor=new gu}set(e,t,n,r){const s=Array.isArray(t)?t:t.split(".");for(;s.length>1;){const u=s.shift();e instanceof Map?e=e.get(u):e instanceof Set?e=Array.from(e.values())[u]:e=e[u],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const o=s[0],i=this.refEditor.get(e)[o];r?r(e,o,n):this.refEditor.isRef(i)?this.refEditor.set(i,n):e[o]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let r=0;r<n.length;r++)if(e instanceof Map?e=e.get(n[r]):e=e[n[r]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const r=Array.isArray(t)?t.slice():t.split("."),s=n?2:1;for(;e&&r.length>s;){const o=r.shift();e=e[o],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,r[0])}createDefaultSetCallback(e){return(t,n,r)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Me(t)instanceof Map?t.delete(n):Me(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const s=t[e.newKey||n];this.refEditor.isRef(s)?this.refEditor.set(s,r):Me(t)instanceof Map?t.set(e.newKey||n,r):Me(t)instanceof Set?t.add(r):t[e.newKey||n]=r}}}},gu=class{set(e,t){if(Gt(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(s=>e.add(s));return}const n=Object.keys(t);if(e instanceof Map){const s=new Set(e.keys());n.forEach(o=>{e.set(o,Reflect.get(t,o)),s.delete(o)}),s.forEach(o=>e.delete(o));return}const r=new Set(Object.keys(e));n.forEach(s=>{Reflect.set(e,s,Reflect.get(t,s)),r.delete(s)}),r.forEach(s=>Reflect.deleteProperty(e,s))}}get(e){return Gt(e)?e.value:e}isRef(e){return Gt(e)||cr(e)}};_(),_(),_();var mu="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function Eu(){if(!Kn||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=localStorage.getItem(mu);return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}_(),_(),_();var lr,fr;(fr=(lr=y).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(lr.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var yu=new Proxy(y.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function vu(e,t){D.timelineLayersState[t.id]=!1,yu.push({...e,descriptorId:t.id,appRecord:Bt(t.app)})}var dr,hr;(hr=(dr=y).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(dr.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Wt=new Proxy(y.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),pr=Se(()=>{we.hooks.callHook("sendInspectorToClient",_r())});function Su(e,t){var n,r;Wt.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(r=e.stateFilterPlaceholder)!=null?r:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:Bt(t.app)}),pr()}function _r(){return Wt.filter(e=>e.descriptor.app===L.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,r=e.options;return{id:r.id,label:r.label,logo:n.logo,icon:`custom-ic-baseline-${(t=r==null?void 0:r.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function st(e,t){return Wt.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function bu(){const e=qn();e.hook("addInspector",({inspector:r,plugin:s})=>{Su(r,s.descriptor)});const t=Se(async({inspectorId:r,plugin:s})=>{var o;if(!r||!((o=s==null?void 0:s.descriptor)!=null&&o.app)||D.highPerfModeEnabled)return;const i=st(r,s.descriptor.app),u={app:s.descriptor.app,inspectorId:r,filter:(i==null?void 0:i.treeFilter)||"",rootNodes:[]};await new Promise(a=>{e.callHookWith(async c=>{await Promise.all(c.map(p=>p(u))),a()},"getInspectorTree")}),e.callHookWith(async a=>{await Promise.all(a.map(c=>c({inspectorId:r,rootNodes:u.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=Se(async({inspectorId:r,plugin:s})=>{var o;if(!r||!((o=s==null?void 0:s.descriptor)!=null&&o.app)||D.highPerfModeEnabled)return;const i=st(r,s.descriptor.app),u={app:s.descriptor.app,inspectorId:r,nodeId:(i==null?void 0:i.selectedNodeId)||"",state:null},a={currentTab:`custom-inspector:${r}`};u.nodeId&&await new Promise(c=>{e.callHookWith(async p=>{await Promise.all(p.map(l=>l(u,a))),c()},"getInspectorState")}),e.callHookWith(async c=>{await Promise.all(c.map(p=>p({inspectorId:r,nodeId:u.nodeId,state:u.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:r,nodeId:s,plugin:o})=>{const i=st(r,o.descriptor.app);i&&(i.selectedNodeId=s)}),e.hook("timelineLayerAdded",({options:r,plugin:s})=>{vu(r,s.descriptor)}),e.hook("timelineEventAdded",({options:r,plugin:s})=>{var o;const i=["performance","component-event","keyboard","mouse"];D.highPerfModeEnabled||!((o=D.timelineLayersState)!=null&&o[s.descriptor.id])&&!i.includes(r.layerId)||e.callHookWith(async u=>{await Promise.all(u.map(a=>a(r)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:r})=>{const s=r.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!s)return null;const o=s.id.toString();return[...s.instanceMap].filter(([u])=>u.split(":")[0]===o).map(([,u])=>u)}),e.hook("getComponentBounds",async({instance:r})=>ce(r)),e.hook("getComponentName",({instance:r})=>tt(r)),e.hook("componentHighlight",({uid:r})=>{const s=L.value.instanceMap.get(r);s&&iu(s)}),e.hook("componentUnhighlight",()=>{ir()}),e}var gr,mr;(mr=(gr=y).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(gr.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var Er,yr;(yr=(Er=y).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(Er.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var vr,Sr;(Sr=(vr=y).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(vr.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var br,Ar;(Ar=(br=y).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(br.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var wr,Or;(Or=(wr=y).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(wr.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var le="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function Au(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:Eu()}}var Tr,Ir;(Ir=(Tr=y)[le])!=null||(Tr[le]=Au());var wu=Se(e=>{we.hooks.callHook("devtoolsStateUpdated",{state:e})});Se((e,t)=>{we.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var ot=new Proxy(y.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?y.__VUE_DEVTOOLS_KIT_APP_RECORDS__:y.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),L=new Proxy(y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function kr(){wu({...y[le],appRecords:ot.value,activeAppRecordId:L.id,tabs:y.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:y.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function Ou(e){y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,kr()}function Tu(e){y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,kr()}var D=new Proxy(y[le],{get(e,t){return t==="appRecords"?ot:t==="activeAppRecordId"?L.id:t==="tabs"?y.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?y.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:y[le][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...y[le]},e[t]=n,y[le][t]=n,!0}});function Iu(e={}){var t,n,r;const{file:s,host:o,baseUrl:i=window.location.origin,line:u=0,column:a=0}=e;if(s){if(o==="chrome-extension"){const c=s.replace(/\\/g,"\\\\"),p=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${p}__open-in-editor?file=${encodeURI(s)}`).then(l=>{if(!l.ok){const f=`Opening component ${c} failed`;console.log(`%c${f}`,"color:red")}})}else if(D.vitePluginDetected){const c=(r=y.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?r:i;y.__VUE_INSPECTOR__.openInEditor(c,s,u,a)}}}_(),_(),_(),_(),_();var Cr,Dr;(Dr=(Cr=y).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(Cr.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Yt=new Proxy(y.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function qt(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function Jt(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function ku(e){var t,n,r;const s=(n=(t=Yt.find(o=>{var i;return o[0].id===e&&!!((i=o[0])!=null&&i.settings)}))==null?void 0:t[0])!=null?n:null;return(r=s==null?void 0:s.settings)!=null?r:null}function xr(e,t){var n,r,s;const o=Jt(e);if(o){const i=localStorage.getItem(o);if(i)return JSON.parse(i)}if(e){const i=(r=(n=Yt.find(u=>u[0].id===e))==null?void 0:n[0])!=null?r:null;return qt((s=i==null?void 0:i.settings)!=null?s:{})}return qt(t)}function Cu(e,t){const n=Jt(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(qt(t)))}function Du(e,t,n){const r=Jt(e),s=localStorage.getItem(r),o=JSON.parse(s||"{}"),i={...o,[t]:n};localStorage.setItem(r,JSON.stringify(i)),we.hooks.callHookWith(u=>{u.forEach(a=>a({pluginId:e,key:t,oldValue:o[t],newValue:n,settings:i}))},"setPluginSettings")}_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_();var Rr,Pr,U=(Pr=(Rr=y).__VUE_DEVTOOLS_HOOK)!=null?Pr:Rr.__VUE_DEVTOOLS_HOOK=qn(),xu={vueAppInit(e){U.hook("app:init",e)},vueAppUnmount(e){U.hook("app:unmount",e)},vueAppConnected(e){U.hook("app:connected",e)},componentAdded(e){return U.hook("component:added",e)},componentEmit(e){return U.hook("component:emit",e)},componentUpdated(e){return U.hook("component:updated",e)},componentRemoved(e){return U.hook("component:removed",e)},setupDevtoolsPlugin(e){U.hook("devtools-plugin:setup",e)},perfStart(e){return U.hook("perf:start",e)},perfEnd(e){return U.hook("perf:end",e)}},Nr={on:xu,setupDevToolsPlugin(e,t){return U.callHook("devtools-plugin:setup",e,t)}},Ru=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(D.highPerfModeEnabled)return;const n=_r().find(r=>r.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const r=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];U.callHook("component:updated",...r)}else U.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&Cu(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){D.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){D.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return D.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){D.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return xr(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},Pu=Ru;_(),_(),_(),_();var Nu="__vue_devtool_undefined__",Vu="__vue_devtool_infinity__",Lu="__vue_devtool_negative_infinity__",Mu="__vue_devtool_nan__";_(),_();var Bu={[Nu]:"undefined",[Mu]:"NaN",[Vu]:"Infinity",[Lu]:"-Infinity"};Object.entries(Bu).reduce((e,[t,n])=>(e[n]=t,e),{}),_(),_(),_(),_(),_();var Vr,Lr;(Lr=(Vr=y).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(Vr.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function Mr(e,t){return Nr.setupDevToolsPlugin(e,t)}function $u(e,t){const[n,r]=e;if(n.app!==t)return;const s=new Pu({plugin:{setupFn:r,descriptor:n},ctx:we});n.packageName==="vuex"&&s.on.editInspectorState(o=>{s.sendInspectorState(o.inspectorId)}),r(s)}function Br(e,t){y.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||D.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(y.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Yt.forEach(n=>{$u(n,e)}))}_(),_();var Be="__VUE_DEVTOOLS_ROUTER__",Ae="__VUE_DEVTOOLS_ROUTER_INFO__",$r,Ur;(Ur=($r=y)[Ae])!=null||($r[Ae]={currentRoute:null,routes:[]});var Fr,jr;(jr=(Fr=y)[Be])!=null||(Fr[Be]={}),new Proxy(y[Ae],{get(e,t){return y[Ae][t]}}),new Proxy(y[Be],{get(e,t){if(t==="value")return y[Be]}});function Uu(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function Xt(e){return e.map(t=>{let{path:n,name:r,children:s,meta:o}=t;return s!=null&&s.length&&(s=Xt(s)),{path:n,name:r,children:s,meta:o}})}function Fu(e){if(e){const{fullPath:t,hash:n,href:r,path:s,name:o,matched:i,params:u,query:a}=e;return{fullPath:t,hash:n,href:r,path:s,name:o,params:u,query:a,matched:Xt(i)}}return e}function ju(e,t){function n(){var r;const s=(r=e.app)==null?void 0:r.config.globalProperties.$router,o=Fu(s==null?void 0:s.currentRoute.value),i=Xt(Uu(s)),u=console.warn;console.warn=()=>{},y[Ae]={currentRoute:o?Wn(o):{},routes:Wn(i)},y[Be]=s,console.warn=u}n(),Nr.on.componentUpdated(Se(()=>{var r;((r=t.value)==null?void 0:r.app)===e.app&&(n(),!D.highPerfModeEnabled&&we.hooks.callHook("routerInfoUpdated",{state:y[Ae]}))},200))}function Hu(e){return{async getInspectorTree(t){const n={...t,app:L.value.app,rootNodes:[]};return await new Promise(r=>{e.callHookWith(async s=>{await Promise.all(s.map(o=>o(n))),r()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:L.value.app,state:null},r={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(s=>{e.callHookWith(async o=>{await Promise.all(o.map(i=>i(n,r))),s()},"getInspectorState")}),n.state},editInspectorState(t){const n=new _u,r={...t,app:L.value.app,set:(s,o=t.path,i=t.state.value,u)=>{n.set(s,o,i,u||n.createDefaultSetCallback(t.state))}};e.callHookWith(s=>{s.forEach(o=>o(r))},"editInspectorState")},sendInspectorState(t){const n=st(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return cu()},cancelInspectComponentInspector(){return au()},getComponentRenderCode(t){const n=$t(L.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return lu({id:t})},openInEditor:Iu,getVueInspector:hu,toggleApp(t,n){const r=ot.value.find(s=>s.id===t);r&&(Tu(t),Ou(r),ju(r,L),pr(),Br(r.app,n))},inspectDOM(t){const n=$t(L.value,t);if(n){const[r]=Ut(n);r&&(y.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=r)}},updatePluginSettings(t,n,r){Du(t,n,r)},getPluginSettings(t){return{options:ku(t),values:xr(t)}}}}_();var Hr,zr;(zr=(Hr=y).__VUE_DEVTOOLS_ENV__)!=null||(Hr.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var Kr=bu(),Gr,Wr;(Wr=(Gr=y).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(Gr.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:Kr,get state(){return{...D,activeAppRecordId:L.id,activeAppRecord:L.value,appRecords:ot.value}},api:Hu(Kr)});var we=y.__VUE_DEVTOOLS_KIT_CONTEXT__;_(),zi(Gi());var Yr,qr;(qr=(Yr=y).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(Yr.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),_(),_();function zu(e){D.highPerfModeEnabled=e??!D.highPerfModeEnabled,!e&&L.value&&Br(L.value.app)}_(),_(),_();function Ku(e){D.devtoolsClientDetected={...D.devtoolsClientDetected,...e};const t=Object.values(D.devtoolsClientDetected).some(Boolean);zu(!t)}var Jr,Xr;(Xr=(Jr=y).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(Jr.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=Ku),_(),_(),_(),_(),_(),_(),_();var Gu=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Zr=class{constructor(t){this.generateIdentifier=t,this.kv=new Gu}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},Wu=class extends Zr{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};_(),_();function Yu(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function qu(e,t){const n=Yu(e);if("find"in n)return n.find(t);const r=n;for(let s=0;s<r.length;s++){const o=r[s];if(t(o))return o}}function Oe(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function it(e,t){return e.indexOf(t)!==-1}function Qr(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var Ju=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return qu(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};_(),_();var Xu=e=>Object.prototype.toString.call(e).slice(8,-1),es=e=>typeof e>"u",Zu=e=>e===null,$e=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Zt=e=>$e(e)&&Object.keys(e).length===0,te=e=>Array.isArray(e),Qu=e=>typeof e=="string",ea=e=>typeof e=="number"&&!isNaN(e),ta=e=>typeof e=="boolean",na=e=>e instanceof RegExp,Ue=e=>e instanceof Map,Fe=e=>e instanceof Set,ts=e=>Xu(e)==="Symbol",ra=e=>e instanceof Date&&!isNaN(e.valueOf()),sa=e=>e instanceof Error,ns=e=>typeof e=="number"&&isNaN(e),oa=e=>ta(e)||Zu(e)||es(e)||ea(e)||Qu(e)||ts(e),ia=e=>typeof e=="bigint",ua=e=>e===1/0||e===-1/0,aa=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),ca=e=>e instanceof URL;_();var rs=e=>e.replace(/\./g,"\\."),Qt=e=>e.map(String).map(rs).join("."),je=e=>{const t=[];let n="";for(let s=0;s<e.length;s++){let o=e.charAt(s);if(o==="\\"&&e.charAt(s+1)==="."){n+=".",s++;continue}if(o==="."){t.push(n),n="";continue}n+=o}const r=n;return t.push(r),t};_();function W(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var ss=[W(es,"undefined",()=>null,()=>{}),W(ia,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),W(ra,"Date",e=>e.toISOString(),e=>new Date(e)),W(sa,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),W(na,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),W(Fe,"set",e=>[...e.values()],e=>new Set(e)),W(Ue,"map",e=>[...e.entries()],e=>new Map(e)),W(e=>ns(e)||ua(e),"number",e=>ns(e)?"NaN":e>0?"Infinity":"-Infinity",Number),W(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),W(ca,"URL",e=>e.toString(),e=>new URL(e))];function ut(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var os=ut((e,t)=>ts(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),la=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),is=ut(aa,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=la[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function us(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var as=ut(us,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(s=>{r[s]=e[s]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),cs=ut((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),fa=[as,os,cs,is],ls=(e,t)=>{const n=Qr(fa,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=Qr(ss,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},fs={};ss.forEach(e=>{fs[e.annotation]=e});var da=(e,t,n)=>{if(te(t))switch(t[0]){case"symbol":return os.untransform(e,t,n);case"class":return as.untransform(e,t,n);case"custom":return cs.untransform(e,t,n);case"typed-array":return is.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=fs[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}};_();var Te=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function ds(e){if(it(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(it(e,"prototype"))throw new Error("prototype is not allowed as a property");if(it(e,"constructor"))throw new Error("constructor is not allowed as a property")}var ha=(e,t)=>{ds(t);for(let n=0;n<t.length;n++){const r=t[n];if(Fe(e))e=Te(e,+r);else if(Ue(e)){const s=+r,o=+t[++n]==0?"key":"value",i=Te(e,s);switch(o){case"key":e=i;break;case"value":e=e.get(i);break}}else e=e[r]}return e},en=(e,t,n)=>{if(ds(t),t.length===0)return n(e);let r=e;for(let o=0;o<t.length-1;o++){const i=t[o];if(te(r)){const u=+i;r=r[u]}else if($e(r))r=r[i];else if(Fe(r)){const u=+i;r=Te(r,u)}else if(Ue(r)){if(o===t.length-2)break;const a=+i,c=+t[++o]==0?"key":"value",p=Te(r,a);switch(c){case"key":r=p;break;case"value":r=r.get(p);break}}}const s=t[t.length-1];if(te(r)?r[+s]=n(r[+s]):$e(r)&&(r[s]=n(r[s])),Fe(r)){const o=Te(r,+s),i=n(o);o!==i&&(r.delete(o),r.add(i))}if(Ue(r)){const o=+t[t.length-2],i=Te(r,o);switch(+s==0?"key":"value"){case"key":{const a=n(i);r.set(a,r.get(i)),a!==i&&r.delete(i);break}case"value":{r.set(i,n(r.get(i)));break}}}return e};function tn(e,t,n=[]){if(!e)return;if(!te(e)){Oe(e,(o,i)=>tn(o,t,[...n,...je(i)]));return}const[r,s]=e;s&&Oe(s,(o,i)=>{tn(o,t,[...n,...je(i)])}),t(r,n)}function pa(e,t,n){return tn(t,(r,s)=>{e=en(e,s,o=>da(o,r,n))}),e}function _a(e,t){function n(r,s){const o=ha(e,je(s));r.map(je).forEach(i=>{e=en(e,i,()=>o)})}if(te(t)){const[r,s]=t;r.forEach(o=>{e=en(e,je(o),()=>e)}),s&&Oe(s,n)}else Oe(t,n);return e}var ga=(e,t)=>$e(e)||te(e)||Ue(e)||Fe(e)||us(e,t);function ma(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function Ea(e,t){const n={};let r;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(u=>u.map(String)).sort((u,a)=>u.length-a.length));const[o,...i]=s;o.length===0?r=i.map(Qt):n[Qt(o)]=i.map(Qt)}),r?Zt(n)?[r]:[r,n]:Zt(n)?void 0:n}var hs=(e,t,n,r,s=[],o=[],i=new Map)=>{var u;const a=oa(e);if(!a){ma(e,s,t);const d=i.get(e);if(d)return r?{transformedValue:null}:d}if(!ga(e,n)){const d=ls(e,n),m=d?{transformedValue:d.value,annotations:[d.type]}:{transformedValue:e};return a||i.set(e,m),m}if(it(o,e))return{transformedValue:null};const c=ls(e,n),p=(u=c==null?void 0:c.value)!=null?u:e,l=te(p)?[]:{},f={};Oe(p,(d,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const g=hs(d,t,n,r,[...s,m],[...o,e],i);l[m]=g.transformedValue,te(g.annotations)?f[m]=g.annotations:$e(g.annotations)&&Oe(g.annotations,(E,w)=>{f[rs(m)+"."+w]=E})});const h=Zt(f)?{transformedValue:l,annotations:c?[c.type]:void 0}:{transformedValue:l,annotations:c?[c.type,f]:f};return a||i.set(e,h),h};_(),_();function ps(e){return Object.prototype.toString.call(e).slice(8,-1)}function _s(e){return ps(e)==="Array"}function ya(e){if(ps(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function va(e,t,n,r,s){const o={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=n),s&&o==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function nn(e,t={}){if(_s(e))return e.map(s=>nn(s,t));if(!ya(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((s,o)=>{if(_s(t.props)&&!t.props.includes(o))return s;const i=e[o],u=nn(i,t);return va(s,o,u,e,t.nonenumerable),s},{})}var k=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Wu,this.symbolRegistry=new Zr(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new Ju,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=hs(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const s=Ea(t,this.dedupe);return s&&(r.meta={...r.meta,referentialEqualities:s}),r}deserialize(e){const{json:t,meta:n}=e;let r=nn(t);return n!=null&&n.values&&(r=pa(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=_a(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};k.defaultInstance=new k,k.serialize=k.defaultInstance.serialize.bind(k.defaultInstance),k.deserialize=k.defaultInstance.deserialize.bind(k.defaultInstance),k.stringify=k.defaultInstance.stringify.bind(k.defaultInstance),k.parse=k.defaultInstance.parse.bind(k.defaultInstance),k.registerClass=k.defaultInstance.registerClass.bind(k.defaultInstance),k.registerSymbol=k.defaultInstance.registerSymbol.bind(k.defaultInstance),k.registerCustom=k.defaultInstance.registerCustom.bind(k.defaultInstance),k.allowErrorProps=k.defaultInstance.allowErrorProps.bind(k.defaultInstance),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_();var gs,ms;(ms=(gs=y).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(gs.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var Es,ys;(ys=(Es=y).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(Es.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var vs,Ss;(Ss=(vs=y).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(vs.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var bs,As;(As=(bs=y).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(bs.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var ws,Os;(Os=(ws=y).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(ws.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var Ts,Is;(Is=(Ts=y).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(Ts.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),_(),_(),_(),_(),_(),_(),_();/*!
|
|
1
|
+
(function(j,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],b):(j=typeof globalThis<"u"?globalThis:j||self,b(j["@stonecrop/stonecrop"]={},j.Vue))})(this,function(j,b){"use strict";function as(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function cs(){const e=as();if(e.__xstate__)return e.__xstate__}const ls=e=>{if(typeof window>"u")return;const t=cs();t&&t.register(e)};class dn{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){const n={value:t,next:null};if(this._current){this._last.next=n,this._last=n;return}this._current=n,this._last=n,this._active&&this.flush()}flush(){for(;this._current;){const t=this._current;this._process(t.value),this._current=t.next}this._last=null}}const hn=".",fs="",pn="",ds="#",hs="*",_n="xstate.init",ft="xstate.stop";function ps(e,t){return{type:`xstate.after.${e}.${t}`}}function dt(e,t){return{type:`xstate.done.state.${e}`,output:t}}function _s(e,t){return{type:`xstate.done.actor.${e}`,output:t,actorId:e}}function gs(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function gn(e){return{type:_n,input:e}}function q(e){setTimeout(()=>{throw e})}const ms=typeof Symbol=="function"&&Symbol.observable||"@@observable";function mn(e,t){const n=En(e),r=En(t);return typeof r=="string"?typeof n=="string"?r===n:!1:typeof n=="string"?n in r:Object.keys(n).every(o=>o in r?mn(n[o],r[o]):!1)}function ht(e){if(Sn(e))return e;const t=[];let n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r]}return t.push(n),t}function En(e){if(Xs(e))return e.value;if(typeof e!="string")return e;const t=ht(e);return Es(t)}function Es(e){if(e.length===1)return e[0];const t={};let n=t;for(let r=0;r<e.length-1;r++)if(r===e.length-2)n[e[r]]=e[r+1];else{const o=n;n={},o[e[r]]=n}return t}function yn(e,t){const n={},r=Object.keys(e);for(let o=0;o<r.length;o++){const s=r[o];n[s]=t(e[s],s,e,o)}return n}function vn(e){return Sn(e)?e:[e]}function Z(e){return e===void 0?[]:vn(e)}function pt(e,t,n,r){return typeof e=="function"?e({context:t,event:n,self:r}):e}function Sn(e){return Array.isArray(e)}function ys(e){return e.type.startsWith("xstate.error.actor")}function he(e){return vn(e).map(t=>typeof t>"u"||typeof t=="string"?{target:t}:t)}function bn(e){if(!(e===void 0||e===fs))return Z(e)}function _t(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}function An(e,t){return`${t}.${e}`}function gt(e,t){const n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];const[,r,o]=n,i=e.getStateNodeById(o).config.invoke;return(Array.isArray(i)?i[r]:i).src}function wn(e,t){return`${e.sessionId}.${t}`}let vs=0;function Ss(e,t){const n=new Map,r=new Map,o=new WeakMap,s=new Set,i={},{clock:u,logger:a}=t,c={schedule:(f,d,h,m,g=Math.random().toString(36).slice(2))=>{const E={source:f,target:d,event:h,delay:m,id:g,startedAt:Date.now()},O=wn(f,g);l._snapshot._scheduledEvents[O]=E;const T=u.setTimeout(()=>{delete i[O],delete l._snapshot._scheduledEvents[O],l._relay(f,d,h)},m);i[O]=T},cancel:(f,d)=>{const h=wn(f,d),m=i[h];delete i[h],delete l._snapshot._scheduledEvents[h],m!==void 0&&u.clearTimeout(m)},cancelAll:f=>{for(const d in l._snapshot._scheduledEvents){const h=l._snapshot._scheduledEvents[d];h.source===f&&c.cancel(f,h.id)}}},p=f=>{if(!s.size)return;const d={...f,rootId:e.sessionId};s.forEach(h=>h.next?.(d))},l={_snapshot:{_scheduledEvents:(t?.snapshot&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${vs++}`,_register:(f,d)=>(n.set(f,d),f),_unregister:f=>{n.delete(f.sessionId);const d=o.get(f);d!==void 0&&(r.delete(d),o.delete(f))},get:f=>r.get(f),_set:(f,d)=>{const h=r.get(f);if(h&&h!==d)throw new Error(`Actor with system ID '${f}' already exists.`);r.set(f,d),o.set(d,f)},inspect:f=>{const d=_t(f);return s.add(d),{unsubscribe(){s.delete(d)}}},_sendInspectionEvent:p,_relay:(f,d,h)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:f,actorRef:d,event:h}),d._send(h)},scheduler:c,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{const f=l._snapshot._scheduledEvents;l._snapshot._scheduledEvents={};for(const d in f){const{source:h,target:m,event:g,delay:E,id:O}=f[d];c.schedule(h,m,g,E,O)}},_clock:u,_logger:a};return l}let mt=!1;const Et=1;let V=function(e){return e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped",e}({});const bs={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class As{constructor(t,n){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new dn(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=V.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const r={...bs,...n},{clock:o,logger:s,parent:i,syncSnapshot:u,id:a,systemId:c,inspect:p}=r;this.system=i?i.system:Ss(this,{clock:o,logger:s}),p&&!i&&this.system.inspect(_t(p)),this.sessionId=this.system._bookId(),this.id=a??this.sessionId,this.logger=n?.logger??this.system._logger,this.clock=n?.clock??this.system._clock,this._parent=i,this._syncSnapshot=u,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:l=>{this._deferred.push(l)},system:this.system,stopChild:l=>{if(l._parent!==this)throw new Error(`Cannot stop child actor ${l.id} of ${this.id} because it is not a child`);l._stop()},emit:l=>{const f=this.eventListeners.get(l.type),d=this.eventListeners.get("*");if(!f&&!d)return;const h=[...f?f.values():[],...d?d.values():[]];for(const m of h)m(l)},actionExecutor:l=>{const f=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:l.type,params:l.params}}),!l.exec)return;const d=mt;try{mt=!0,l.exec(l.info,l.params)}finally{mt=d}};this._processingStatus===V.Running?f():this._deferred.push(f)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),c&&(this._systemId=c,this.system._set(c,this)),this._initState(n?.snapshot??n?.state),c&&this._snapshot.status!=="active"&&this.system._unregister(this)}_initState(t){try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(n){this._snapshot={status:"error",output:void 0,error:n}}}update(t,n){this._snapshot=t;let r;for(;r=this._deferred.shift();)try{r()}catch(o){this._deferred.length=0,this._snapshot={...t,status:"error",error:o}}switch(this._snapshot.status){case"active":for(const o of this.observers)try{o.next?.(t)}catch(s){q(s)}break;case"done":for(const o of this.observers)try{o.next?.(t)}catch(s){q(s)}this._stopProcedure(),this._complete(),this._doneEvent=_s(this.id,this._snapshot.output),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error);break}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:n,snapshot:t})}subscribe(t,n,r){const o=_t(t,n,r);if(this._processingStatus!==V.Stopped)this.observers.add(o);else switch(this._snapshot.status){case"done":try{o.complete?.()}catch(s){q(s)}break;case"error":{const s=this._snapshot.error;if(!o.error)q(s);else try{o.error(s)}catch(i){q(i)}break}}return{unsubscribe:()=>{this.observers.delete(o)}}}on(t,n){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));const o=n.bind(void 0);return r.add(o),{unsubscribe:()=>{r.delete(o)}}}start(){if(this._processingStatus===V.Running)return this;this._syncSnapshot&&this.subscribe({next:r=>{r.status==="active"&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:r})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=V.Running;const t=gn(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(r){return this._snapshot={...this._snapshot,status:"error",error:r},this._error(r),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let n,r;try{n=this.logic.transition(this._snapshot,t,this._actorScope)}catch(o){r={err:o}}if(r){const{err:o}=r;this._snapshot={...this._snapshot,status:"error",error:o},this._error(o);return}this.update(n,t),t.type===ft&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===V.Stopped?this:(this.mailbox.clear(),this._processingStatus===V.NotStarted?(this._processingStatus=V.Stopped,this):(this.mailbox.enqueue({type:ft}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(const t of this.observers)try{t.complete?.()}catch(n){q(n)}this.observers.clear()}_reportError(t){if(!this.observers.size){this._parent||q(t);return}let n=!1;for(const r of this.observers){const o=r.error;n||=!o;try{o?.(t)}catch(s){q(s)}}this.observers.clear(),n&&q(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,gs(this.id,t))}_stopProcedure(){return this._processingStatus!==V.Running?this:(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new dn(this._process.bind(this)),this._processingStatus=V.Stopped,this.system._unregister(this),this)}_send(t){this._processingStatus!==V.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){const{devTools:t}=this.options;t&&(typeof t=="function"?t:ls)(this)}toJSON(){return{xstate$$type:Et,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[ms](){return this}getSnapshot(){return this._snapshot}}function xe(e,...[t]){return new As(e,t)}function ws(e,t,n,r,{sendId:o}){const s=typeof o=="function"?o(n,r):o;return[t,{sendId:s},void 0]}function Os(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId)})}function Ts(e){function t(n,r){}return t.type="xstate.cancel",t.sendId=e,t.resolve=ws,t.execute=Os,t}function Is(e,t,n,r,{id:o,systemId:s,src:i,input:u,syncSnapshot:a}){const c=typeof i=="string"?gt(t.machine,i):i,p=typeof o=="function"?o(n):o;let l,f;return c&&(f=typeof u=="function"?u({context:t.context,event:n.event,self:e.self}):u,l=xe(c,{id:p,src:i,parent:e.self,syncSnapshot:a,systemId:s,input:f})),[ue(t,{children:{...t.children,[p]:l}}),{id:o,systemId:s,actorRef:l,src:i,input:f},void 0]}function ks(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==V.Stopped&&t.start()})}function Cs(...[e,{id:t,systemId:n,input:r,syncSnapshot:o=!1}={}]){function s(i,u){}return s.type="xstate.spawnChild",s.id=t,s.systemId=n,s.src=e,s.input=r,s.syncSnapshot=o,s.resolve=Is,s.execute=ks,s}function Ds(e,t,n,r,{actorRef:o}){const s=typeof o=="function"?o(n,r):o,i=typeof s=="string"?t.children[s]:s;let u=t.children;return i&&(u={...u},delete u[i.id]),[ue(t,{children:u}),i,void 0]}function xs(e,t){if(t){if(e.system._unregister(t),t._processingStatus!==V.Running){e.stopChild(t);return}e.defer(()=>{e.stopChild(t)})}}function On(e){function t(n,r){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=Ds,t.execute=xs,t}function yt(e,t,n,r){const{machine:o}=r,s=typeof e=="function",i=s?e:o.implementations.guards[typeof e=="string"?e:e.type];if(!s&&!i)throw new Error(`Guard '${typeof e=="string"?e:e.type}' is not implemented.'.`);if(typeof i!="function")return yt(i,t,n,r);const u={context:t,event:n},a=s||typeof e=="string"?void 0:"params"in e?typeof e.params=="function"?e.params({context:t,event:n}):e.params:void 0;return"check"in i?i.check(r,u,i):i(u,a)}const vt=e=>e.type==="atomic"||e.type==="final";function pe(e){return Object.values(e.states).filter(t=>t.type!=="history")}function Re(e,t){const n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function Ge(e){const t=new Set(e),n=In(t);for(const r of t)if(r.type==="compound"&&(!n.get(r)||!n.get(r).length))Dn(r).forEach(o=>t.add(o));else if(r.type==="parallel"){for(const o of pe(r))if(o.type!=="history"&&!t.has(o)){const s=Dn(o);for(const i of s)t.add(i)}}for(const r of t){let o=r.parent;for(;o;)t.add(o),o=o.parent}return t}function Tn(e,t){const n=t.get(e);if(!n)return{};if(e.type==="compound"){const o=n[0];if(o){if(vt(o))return o.key}else return{}}const r={};for(const o of n)r[o.key]=Tn(o,t);return r}function In(e){const t=new Map;for(const n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function kn(e,t){const n=Ge(t);return Tn(e,In(n))}function St(e,t){return t.type==="compound"?pe(t).some(n=>n.type==="final"&&e.has(n)):t.type==="parallel"?pe(t).every(n=>St(e,n)):t.type==="final"}const We=e=>e[0]===ds;function Rs(e,t){return e.transitions.get(t)||[...e.transitions.keys()].filter(r=>{if(r===hs)return!0;if(!r.endsWith(".*"))return!1;const o=r.split("."),s=t.split(".");for(let i=0;i<o.length;i++){const u=o[i],a=s[i];if(u==="*")return i===o.length-1;if(u!==a)return!1}return!0}).sort((r,o)=>o.length-r.length).flatMap(r=>e.transitions.get(r))}function Ps(e){const t=e.config.after;if(!t)return[];const n=o=>{const s=ps(o,e.id),i=s.type;return e.entry.push(ui(s,{id:i,delay:o})),e.exit.push(Ts(i)),i};return Object.keys(t).flatMap(o=>{const s=t[o],i=typeof s=="string"?{target:s}:s,u=Number.isNaN(+o)?o:+o,a=n(u);return Z(i).map(c=>({...c,event:a,delay:u}))}).map(o=>{const{delay:s}=o;return{...se(e,o.event,o),delay:s}})}function se(e,t,n){const r=bn(n.target),o=n.reenter??!1,s=Ls(e,r),i={...n,actions:Z(n.actions),guard:n.guard,target:s,source:e,reenter:o,eventType:t,toJSON:()=>({...i,source:`#${e.id}`,target:s?s.map(u=>`#${u.id}`):void 0})};return i}function Ns(e){const t=new Map;if(e.config.on)for(const n of Object.keys(e.config.on)){if(n===pn)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');const r=e.config.on[n];t.set(n,he(r).map(o=>se(e,n,o)))}if(e.config.onDone){const n=`xstate.done.state.${e.id}`;t.set(n,he(e.config.onDone).map(r=>se(e,n,r)))}for(const n of e.invoke){if(n.onDone){const r=`xstate.done.actor.${n.id}`;t.set(r,he(n.onDone).map(o=>se(e,r,o)))}if(n.onError){const r=`xstate.error.actor.${n.id}`;t.set(r,he(n.onError).map(o=>se(e,r,o)))}if(n.onSnapshot){const r=`xstate.snapshot.${n.id}`;t.set(r,he(n.onSnapshot).map(o=>se(e,r,o)))}}for(const n of e.after){let r=t.get(n.eventType);r||(r=[],t.set(n.eventType,r)),r.push(n)}return t}function Vs(e,t){const n=typeof t=="string"?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw new Error(`Initial state node "${t}" not found on parent state node #${e.id}`);const r={source:e,actions:!t||typeof t=="string"?[]:Z(t.actions),eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r}function Ls(e,t){if(t!==void 0)return t.map(n=>{if(typeof n!="string")return n;if(We(n))return e.machine.getStateNodeById(n);const r=n[0]===hn;if(r&&!e.parent)return Ye(e,n.slice(1));const o=r?e.key+n:n;if(e.parent)try{return Ye(e.parent,o)}catch(s){throw new Error(`Invalid transition definition for state node '${e.id}':
|
|
2
|
+
${s.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function Cn(e){const t=bn(e.config.target);return t?{target:t.map(n=>typeof n=="string"?Ye(e.parent,n):n)}:e.parent.initial}function ie(e){return e.type==="history"}function Dn(e){const t=xn(e);for(const n of t)for(const r of Re(n,e))t.add(r);return t}function xn(e){const t=new Set;function n(r){if(!t.has(r)){if(t.add(r),r.type==="compound")n(r.initial.target[0]);else if(r.type==="parallel")for(const o of pe(r))n(o)}}return n(e),t}function _e(e,t){if(We(t))return e.machine.getStateNodeById(t);if(!e.states)throw new Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);const n=e.states[t];if(!n)throw new Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function Ye(e,t){if(typeof t=="string"&&We(t))try{return e.machine.getStateNodeById(t)}catch{}const n=ht(t).slice();let r=e;for(;n.length;){const o=n.shift();if(!o.length)break;r=_e(r,o)}return r}function qe(e,t){if(typeof t=="string"){const o=e.states[t];if(!o)throw new Error(`State '${t}' does not exist on '${e.id}'`);return[e,o]}const n=Object.keys(t),r=n.map(o=>_e(e,o)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((o,s)=>{const i=_e(e,s);if(!i)return o;const u=qe(i,t[s]);return o.concat(u)},[]))}function Ms(e,t,n,r){const s=_e(e,t).next(n,r);return!s||!s.length?e.next(n,r):s}function Bs(e,t,n,r){const o=Object.keys(t),s=_e(e,o[0]),i=bt(s,t[o[0]],n,r);return!i||!i.length?e.next(n,r):i}function $s(e,t,n,r){const o=[];for(const s of Object.keys(t)){const i=t[s];if(!i)continue;const u=_e(e,s),a=bt(u,i,n,r);a&&o.push(...a)}return o.length?o:e.next(n,r)}function bt(e,t,n,r){return typeof t=="string"?Ms(e,t,n,r):Object.keys(t).length===1?Bs(e,t,n,r):$s(e,t,n,r)}function Us(e){return Object.keys(e.states).map(t=>e.states[t]).filter(t=>t.type==="history")}function Q(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function Fs(e,t){const n=new Set(e),r=new Set(t);for(const o of n)if(r.has(o))return!0;for(const o of r)if(n.has(o))return!0;return!1}function Rn(e,t,n){const r=new Set;for(const o of e){let s=!1;const i=new Set;for(const u of r)if(Fs(wt([o],t,n),wt([u],t,n)))if(Q(o.source,u.source))i.add(u);else{s=!0;break}if(!s){for(const u of i)r.delete(u);r.add(o)}}return Array.from(r)}function js(e){const[t,...n]=e;for(const r of Re(t,void 0))if(n.every(o=>Q(o,r)))return r}function At(e,t){if(!e.target)return[];const n=new Set;for(const r of e.target)if(ie(r))if(t[r.id])for(const o of t[r.id])n.add(o);else for(const o of At(Cn(r),t))n.add(o);else n.add(r);return[...n]}function Pn(e,t){const n=At(e,t);if(!n)return;if(!e.reenter&&n.every(o=>o===e.source||Q(o,e.source)))return e.source;const r=js(n.concat(e.source));if(r)return r;if(!e.reenter)return e.source.machine.root}function wt(e,t,n){const r=new Set;for(const o of e)if(o.target?.length){const s=Pn(o,n);o.reenter&&o.source===s&&r.add(s);for(const i of t)Q(i,s)&&r.add(i)}return[...r]}function Hs(e,t){if(e.length!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Ot(e,t,n,r,o,s){if(!e.length)return t;const i=new Set(t._nodes);let u=t.historyValue;const a=Rn(e,i,u);let c=t;o||([c,u]=Ws(c,r,n,a,i,u,s,n.actionExecutor)),c=me(c,r,n,a.flatMap(l=>l.actions),s,void 0),c=Ks(c,r,n,a,i,s,u,o);const p=[...i];c.status==="done"&&(c=me(c,r,n,p.sort((l,f)=>f.order-l.order).flatMap(l=>l.exit),s,void 0));try{return u===t.historyValue&&Hs(t._nodes,i)?c:ue(c,{_nodes:p,historyValue:u})}catch(l){throw l}}function zs(e,t,n,r,o){if(r.output===void 0)return;const s=dt(o.id,o.output!==void 0&&o.parent?pt(o.output,e.context,t,n.self):void 0);return pt(r.output,e.context,s,n.self)}function Ks(e,t,n,r,o,s,i,u){let a=e;const c=new Set,p=new Set;Gs(r,i,p,c),u&&p.add(e.machine.root);const l=new Set;for(const f of[...c].sort((d,h)=>d.order-h.order)){o.add(f);const d=[];d.push(...f.entry);for(const h of f.invoke)d.push(Cs(h.src,{...h,syncSnapshot:!!h.onSnapshot}));if(p.has(f)){const h=f.initial.actions;d.push(...h)}if(a=me(a,t,n,d,s,f.invoke.map(h=>h.id)),f.type==="final"){const h=f.parent;let m=h?.type==="parallel"?h:h?.parent,g=m||f;for(h?.type==="compound"&&s.push(dt(h.id,f.output!==void 0?pt(f.output,a.context,t,n.self):void 0));m?.type==="parallel"&&!l.has(m)&&St(o,m);)l.add(m),s.push(dt(m.id)),g=m,m=m.parent;if(m)continue;a=ue(a,{status:"done",output:zs(a,t,n,a.machine.root,g)})}}return a}function Gs(e,t,n,r){for(const o of e){const s=Pn(o,t);for(const u of o.target||[])!ie(u)&&(o.source!==u||o.source!==s||o.reenter)&&(r.add(u),n.add(u)),ge(u,t,n,r);const i=At(o,t);for(const u of i){const a=Re(u,s);s?.type==="parallel"&&a.push(s),Nn(r,t,n,a,!o.source.parent&&o.reenter?void 0:s)}}}function ge(e,t,n,r){if(ie(e))if(t[e.id]){const o=t[e.id];for(const s of o)r.add(s),ge(s,t,n,r);for(const s of o)Tt(s,e.parent,r,t,n)}else{const o=Cn(e);for(const s of o.target)r.add(s),o===e.parent?.initial&&n.add(e.parent),ge(s,t,n,r);for(const s of o.target)Tt(s,e.parent,r,t,n)}else if(e.type==="compound"){const[o]=e.initial.target;ie(o)||(r.add(o),n.add(o)),ge(o,t,n,r),Tt(o,e,r,t,n)}else if(e.type==="parallel")for(const o of pe(e).filter(s=>!ie(s)))[...r].some(s=>Q(s,o))||(ie(o)||(r.add(o),n.add(o)),ge(o,t,n,r))}function Nn(e,t,n,r,o){for(const s of r)if((!o||Q(s,o))&&e.add(s),s.type==="parallel")for(const i of pe(s).filter(u=>!ie(u)))[...e].some(u=>Q(u,i))||(e.add(i),ge(i,t,n,e))}function Tt(e,t,n,r,o){Nn(n,r,o,Re(e,t))}function Ws(e,t,n,r,o,s,i,u){let a=e;const c=wt(r,o,s);c.sort((l,f)=>f.order-l.order);let p;for(const l of c)for(const f of Us(l)){let d;f.history==="deep"?d=h=>vt(h)&&Q(h,l):d=h=>h.parent===l,p??={...s},p[f.id]=Array.from(o).filter(d)}for(const l of c)a=me(a,t,n,[...l.exit,...l.invoke.map(f=>On(f.id))],i,void 0),o.delete(l);return[a,p||s]}function Ys(e,t){return e.implementations.actions[t]}function Vn(e,t,n,r,o,s){const{machine:i}=e;let u=e;for(const a of r){const c=typeof a=="function",p=c?a:Ys(i,typeof a=="string"?a:a.type),l={context:u.context,event:t,self:n.self,system:n.system},f=c||typeof a=="string"?void 0:"params"in a?typeof a.params=="function"?a.params({context:u.context,event:t}):a.params:void 0;if(!p||!("resolve"in p)){n.actionExecutor({type:typeof a=="string"?a:typeof a=="object"?a.type:a.name||"(anonymous)",info:l,params:f,exec:p});continue}const d=p,[h,m,g]=d.resolve(n,u,l,f,p,o);u=h,"retryResolve"in d&&s?.push([d,m]),"execute"in d&&n.actionExecutor({type:d.type,info:l,params:m,exec:d.execute.bind(null,n,m)}),g&&(u=Vn(u,t,n,g,o,s))}return u}function me(e,t,n,r,o,s){const i=s?[]:void 0,u=Vn(e,t,n,r,{internalQueue:o,deferredActorIds:s},i);return i?.forEach(([a,c])=>{a.retryResolve(n,u,c)}),u}function It(e,t,n,r){let o=e;const s=[];function i(c,p,l){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:p,snapshot:c,_transitions:l}),s.push(c)}if(t.type===ft)return o=ue(Ln(o,t,n),{status:"stopped"}),i(o,t,[]),{snapshot:o,microstates:s};let u=t;if(u.type!==_n){const c=u,p=ys(c),l=Mn(c,o);if(p&&!l.length)return o=ue(e,{status:"error",error:c.error}),i(o,c,[]),{snapshot:o,microstates:s};o=Ot(l,e,n,u,!1,r),i(o,c,l)}let a=!0;for(;o.status==="active";){let c=a?qs(o,u):[];const p=c.length?o:void 0;if(!c.length){if(!r.length)break;u=r.shift(),c=Mn(u,o)}o=Ot(c,o,n,u,!1,r),a=o!==p,i(o,u,c)}return o.status!=="active"&&Ln(o,u,n),{snapshot:o,microstates:s}}function Ln(e,t,n){return me(e,t,n,Object.values(e.children).map(r=>On(r)),[],void 0)}function Mn(e,t){return t.machine.getTransitionData(t,e)}function qs(e,t){const n=new Set,r=e._nodes.filter(vt);for(const o of r)e:for(const s of[o].concat(Re(o,void 0)))if(s.always){for(const i of s.always)if(i.guard===void 0||yt(i.guard,e.context,t,e)){n.add(i);break e}}return Rn(Array.from(n),new Set(e._nodes),e.historyValue)}function Js(e,t){const n=Ge(qe(e,t));return kn(e,[...n])}function Xs(e){return!!e&&typeof e=="object"&&"machine"in e&&"value"in e}const Zs=function(t){return mn(t,this.value)},Qs=function(t){return this.tags.has(t)},ei=function(t){const n=this.machine.getTransitionData(this,t);return!!n?.length&&n.some(r=>r.target!==void 0||r.actions.length)},ti=function(){const{_nodes:t,tags:n,machine:r,getMeta:o,toJSON:s,can:i,hasTag:u,matches:a,...c}=this;return{...c,tags:Array.from(n)}},ni=function(){return this._nodes.reduce((t,n)=>(n.meta!==void 0&&(t[n.id]=n.meta),t),{})};function Je(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:kn(t.root,e._nodes),tags:new Set(e._nodes.flatMap(n=>n.tags)),children:e.children,historyValue:e.historyValue||{},matches:Zs,hasTag:Qs,can:ei,getMeta:ni,toJSON:ti}}function ue(e,t={}){return Je({...e,...t},e.machine)}function ri(e){if(typeof e!="object"||e===null)return{};const t={};for(const n in e){const r=e[n];Array.isArray(r)&&(t[n]=r.map(o=>({id:o.id})))}return t}function oi(e,t){const{_nodes:n,tags:r,machine:o,children:s,context:i,can:u,hasTag:a,matches:c,getMeta:p,toJSON:l,...f}=e,d={};for(const m in s){const g=s[m];d[m]={snapshot:g.getPersistedSnapshot(t),src:g.src,systemId:g._systemId,syncSnapshot:g._syncSnapshot}}return{...f,context:Bn(i),children:d,historyValue:ri(f.historyValue)}}function Bn(e){let t;for(const n in e){const r=e[n];if(r&&typeof r=="object")if("sessionId"in r&&"send"in r&&"ref"in r)t??=Array.isArray(e)?e.slice():{...e},t[n]={xstate$$type:Et,id:r.id};else{const o=Bn(r);o!==r&&(t??=Array.isArray(e)?e.slice():{...e},t[n]=o)}}return t??e}function si(e,t,n,r,{event:o,id:s,delay:i},{internalQueue:u}){const a=t.machine.implementations.delays;if(typeof o=="string")throw new Error(`Only event objects may be used with raise; use raise({ type: "${o}" }) instead`);const c=typeof o=="function"?o(n,r):o;let p;if(typeof i=="string"){const l=a&&a[i];p=typeof l=="function"?l(n,r):l}else p=typeof i=="function"?i(n,r):i;return typeof p!="number"&&u.push(c),[t,{event:c,id:s,delay:p},void 0]}function ii(e,t){const{event:n,delay:r,id:o}=t;if(typeof r=="number"){e.defer(()=>{const s=e.self;e.system.scheduler.schedule(s,s,n,r,o)});return}}function ui(e,t){function n(r,o){}return n.type="xstate.raise",n.event=e,n.id=t?.id,n.delay=t?.delay,n.resolve=si,n.execute=ii,n}function ai(e,{machine:t,context:n},r,o){const s=(i,u)=>{if(typeof i=="string"){const a=gt(t,i);if(!a)throw new Error(`Actor logic '${i}' not implemented in machine '${t.id}'`);const c=xe(a,{id:u?.id,parent:e.self,syncSnapshot:u?.syncSnapshot,input:typeof u?.input=="function"?u.input({context:n,event:r,self:e.self}):u?.input,src:i,systemId:u?.systemId});return o[c.id]=c,c}else return xe(i,{id:u?.id,parent:e.self,syncSnapshot:u?.syncSnapshot,input:u?.input,src:i,systemId:u?.systemId})};return(i,u)=>{const a=s(i,u);return o[a.id]=a,e.defer(()=>{a._processingStatus!==V.Stopped&&a.start()}),a}}function ci(e,t,n,r,{assignment:o}){if(!t.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const s={},i={context:t.context,event:n.event,spawn:ai(e,t,n.event,s),self:e.self,system:e.system};let u={};if(typeof o=="function")u=o(i,r);else for(const c of Object.keys(o)){const p=o[c];u[c]=typeof p=="function"?p(i,r):p}const a=Object.assign({},t.context,u);return[ue(t,{context:a,children:Object.keys(s).length?{...t.children,...s}:t.children}),void 0,void 0]}function li(e){function t(n,r){}return t.type="xstate.assign",t.assignment=e,t.resolve=ci,t}const $n=new WeakMap;function Ee(e,t,n){let r=$n.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},$n.set(e,r)),r[t]}const fi={},Pe=e=>typeof e=="string"?{type:e}:typeof e=="function"?"resolve"in e?{type:e.type}:{type:e.name}:e;class Xe{constructor(t,n){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=n._parent,this.key=n._key,this.machine=n._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(hn),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?yn(this.config.states,(r,o)=>new Xe(r,{_parent:this,_key:o,_machine:this.machine})):fi,this.type==="compound"&&!this.config.initial)throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=this.config.history===!0?"shallow":this.config.history||!1,this.entry=Z(this.config.entry).slice(),this.exit=Z(this.config.exit).slice(),this.meta=this.config.meta,this.output=this.type==="final"||!this.parent?this.config.output:void 0,this.tags=Z(t.tags).slice()}_initialize(){this.transitions=Ns(this),this.config.always&&(this.always=he(this.config.always).map(t=>se(this,pn,t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(Pe),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(Pe),eventType:null})}:void 0,history:this.history,states:yn(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(Pe)})),entry:this.entry.map(Pe),exit:this.exit.map(Pe),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return Ee(this,"invoke",()=>Z(this.config.invoke).map((t,n)=>{const{src:r,systemId:o}=t,s=t.id??An(this.id,n),i=typeof r=="string"?r:`xstate.invoke.${An(this.id,n)}`;return{...t,src:i,id:s,systemId:o,toJSON(){const{onDone:u,onError:a,...c}=t;return{...c,type:"xstate.invoke",src:i,id:s}}}}))}get on(){return Ee(this,"on",()=>[...this.transitions].flatMap(([n,r])=>r.map(o=>[n,o])).reduce((n,[r,o])=>(n[r]=n[r]||[],n[r].push(o),n),{}))}get after(){return Ee(this,"delayedTransitions",()=>Ps(this))}get initial(){return Ee(this,"initial",()=>Vs(this,this.config.initial))}next(t,n){const r=n.type,o=[];let s;const i=Ee(this,`candidates-${r}`,()=>Rs(this,r));for(const u of i){const{guard:a}=u,c=t.context;let p=!1;try{p=!a||yt(a,c,n,t)}catch(l){const f=typeof a=="string"?a:typeof a=="object"?a.type:void 0;throw new Error(`Unable to evaluate guard ${f?`'${f}' `:""}in transition for event '${r}' in state node '${this.id}':
|
|
3
|
+
${l.message}`)}if(p){o.push(...u.actions),s=u;break}}return s?[s]:void 0}get events(){return Ee(this,"events",()=>{const{states:t}=this,n=new Set(this.ownEvents);if(t)for(const r of Object.keys(t)){const o=t[r];if(o.states)for(const s of o.events)n.add(`${s}`)}return Array.from(n)})}get ownEvents(){const t=new Set([...this.transitions.keys()].filter(n=>this.transitions.get(n).some(r=>!(!r.target&&!r.actions.length&&!r.reenter))));return Array.from(t)}}const di="#";class kt{constructor(t,n){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:n?.actors??{},actions:n?.actions??{},delays:n?.delays??{},guards:n?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new Xe(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){const{actions:n,guards:r,actors:o,delays:s}=this.implementations;return new kt(this.config,{actions:{...n,...t.actions},guards:{...r,...t.guards},actors:{...o,...t.actors},delays:{...s,...t.delays}})}resolveState(t){const n=Js(this.root,t.value),r=Ge(qe(this.root,n));return Je({_nodes:[...r],context:t.context||{},children:{},status:St(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,n,r){return It(t,n,r,[]).snapshot}microstep(t,n,r){return It(t,n,r,[]).microstates}getTransitionData(t,n){return bt(this.root,t.value,t,n)||[]}getPreInitialState(t,n,r){const{context:o}=this.config,s=Je({context:typeof o!="function"&&o?o:{},_nodes:[this.root],children:{},status:"active"},this);return typeof o=="function"?me(s,n,t,[li(({spawn:u,event:a,self:c})=>o({spawn:u,input:a.input,self:c}))],r,void 0):s}getInitialSnapshot(t,n){const r=gn(n),o=[],s=this.getPreInitialState(t,r,o),i=Ot([{target:[...xn(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],s,t,r,!0,o),{snapshot:u}=It(i,r,t,o);return u}start(t){Object.values(t.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start()})}getStateNodeById(t){const n=ht(t),r=n.slice(1),o=We(n[0])?n[0].slice(di.length):n[0],s=this.idMap.get(o);if(!s)throw new Error(`Child state node '#${o}' does not exist on machine '${this.id}'`);return Ye(s,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,n){return oi(t,n)}restoreSnapshot(t,n){const r={},o=t.children;Object.keys(o).forEach(l=>{const f=o[l],d=f.snapshot,h=f.src,m=typeof h=="string"?gt(this,h):h;if(!m)return;const g=xe(m,{id:l,parent:n.self,syncSnapshot:f.syncSnapshot,snapshot:d,src:h,systemId:f.systemId});r[l]=g});function s(l,f){if(f instanceof Xe)return f;try{return l.machine.getStateNodeById(f.id)}catch{}}function i(l,f){if(!f||typeof f!="object")return{};const d={};for(const h in f){const m=f[h];for(const g of m){const E=s(l,g);E&&(d[h]??=[],d[h].push(E))}}return d}const u=i(this.root,t.historyValue),a=Je({...t,children:r,_nodes:Array.from(Ge(qe(this.root,t.value))),historyValue:u},this),c=new Set;function p(l,f){if(!c.has(l)){c.add(l);for(const d in l){const h=l[d];if(h&&typeof h=="object"){if("xstate$$type"in h&&h.xstate$$type===Et){l[d]=f[h.id];continue}p(h,f)}}}}return p(a.context,r),a}}function hi(e,t){return new kt(e,t)}function Ct(e){this.message=e||""}Ct.prototype=Object.create(Error.prototype,{constructor:{value:Ct},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});class ye{static _root;name="Stonecrop";registry;store;constructor(t,n){if(ye._root)return ye._root;ye._root=this,this.registry=t,this.store=n}setup(t){this.getMeta(t.doctype)}async getMeta(t){if(!this.registry.getMeta)throw new Ct(`getMeta function is not implemented for ${t} in the registry`);return await this.registry.getMeta(t)}async getRecords(t,n){this.store.$patch({records:[]});const o=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:o})}async getRecord(t,n){this.store.$patch({record:{}});const o=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:o})}runAction(t,n,r){const o=this.registry.registry[t.slug],s=o.actions?.get(n),i=o.workflow;if(i){const u=hi(i),a=xe(u);a.start(),a.send({type:n,id:r}),s&&s.length>0&&s.forEach(c=>{new Function(c)(r)})}}}var pi=Object.create,Un=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,Dt=Object.getOwnPropertyNames,gi=Object.getPrototypeOf,mi=Object.prototype.hasOwnProperty,Ei=(e,t)=>function(){return e&&(t=(0,e[Dt(e)[0]])(e=0)),t},yi=(e,t)=>function(){return t||(0,e[Dt(e)[0]])((t={exports:{}}).exports,t),t.exports},vi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Dt(t))!mi.call(e,o)&&o!==n&&Un(e,o,{get:()=>t[o],enumerable:!(r=_i(t,o))||r.enumerable});return e},Si=(e,t,n)=>(n=e!=null?pi(gi(e)):{},vi(Un(n,"default",{value:e,enumerable:!0}),e)),Ne=Ei({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),bi=yi({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){Ne(),t.exports=r;function n(s){return s instanceof Buffer?Buffer.from(s):new s.constructor(s.buffer.slice(),s.byteOffset,s.length)}function r(s){if(s=s||{},s.circles)return o(s);const i=new Map;if(i.set(Date,l=>new Date(l)),i.set(Map,(l,f)=>new Map(a(Array.from(l),f))),i.set(Set,(l,f)=>new Set(a(Array.from(l),f))),s.constructorHandlers)for(const l of s.constructorHandlers)i.set(l[0],l[1]);let u=null;return s.proto?p:c;function a(l,f){const d=Object.keys(l),h=new Array(d.length);for(let m=0;m<d.length;m++){const g=d[m],E=l[g];typeof E!="object"||E===null?h[g]=E:E.constructor!==Object&&(u=i.get(E.constructor))?h[g]=u(E,f):ArrayBuffer.isView(E)?h[g]=n(E):h[g]=f(E)}return h}function c(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return a(l,c);if(l.constructor!==Object&&(u=i.get(l.constructor)))return u(l,c);const f={};for(const d in l){if(Object.hasOwnProperty.call(l,d)===!1)continue;const h=l[d];typeof h!="object"||h===null?f[d]=h:h.constructor!==Object&&(u=i.get(h.constructor))?f[d]=u(h,c):ArrayBuffer.isView(h)?f[d]=n(h):f[d]=c(h)}return f}function p(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return a(l,p);if(l.constructor!==Object&&(u=i.get(l.constructor)))return u(l,p);const f={};for(const d in l){const h=l[d];typeof h!="object"||h===null?f[d]=h:h.constructor!==Object&&(u=i.get(h.constructor))?f[d]=u(h,p):ArrayBuffer.isView(h)?f[d]=n(h):f[d]=p(h)}return f}}function o(s){const i=[],u=[],a=new Map;if(a.set(Date,d=>new Date(d)),a.set(Map,(d,h)=>new Map(p(Array.from(d),h))),a.set(Set,(d,h)=>new Set(p(Array.from(d),h))),s.constructorHandlers)for(const d of s.constructorHandlers)a.set(d[0],d[1]);let c=null;return s.proto?f:l;function p(d,h){const m=Object.keys(d),g=new Array(m.length);for(let E=0;E<m.length;E++){const O=m[E],T=d[O];if(typeof T!="object"||T===null)g[O]=T;else if(T.constructor!==Object&&(c=a.get(T.constructor)))g[O]=c(T,h);else if(ArrayBuffer.isView(T))g[O]=n(T);else{const L=i.indexOf(T);L!==-1?g[O]=u[L]:g[O]=h(T)}}return g}function l(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return p(d,l);if(d.constructor!==Object&&(c=a.get(d.constructor)))return c(d,l);const h={};i.push(d),u.push(h);for(const m in d){if(Object.hasOwnProperty.call(d,m)===!1)continue;const g=d[m];if(typeof g!="object"||g===null)h[m]=g;else if(g.constructor!==Object&&(c=a.get(g.constructor)))h[m]=c(g,l);else if(ArrayBuffer.isView(g))h[m]=n(g);else{const E=i.indexOf(g);E!==-1?h[m]=u[E]:h[m]=l(g)}}return i.pop(),u.pop(),h}function f(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return p(d,f);if(d.constructor!==Object&&(c=a.get(d.constructor)))return c(d,f);const h={};i.push(d),u.push(h);for(const m in d){const g=d[m];if(typeof g!="object"||g===null)h[m]=g;else if(g.constructor!==Object&&(c=a.get(g.constructor)))h[m]=c(g,f);else if(ArrayBuffer.isView(g))h[m]=n(g);else{const E=i.indexOf(g);E!==-1?h[m]=u[E]:h[m]=f(g)}}return i.pop(),u.pop(),h}}}});Ne(),Ne(),Ne();var Fn=typeof navigator<"u",y=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof y.chrome<"u"&&y.chrome.devtools,Fn&&(y.self,y.top);var jn;typeof navigator<"u"&&((jn=navigator.userAgent)==null||jn.toLowerCase().includes("electron")),Ne();var Ai=Si(bi()),wi=/(?:^|[-_/])(\w)/g;function Oi(e,t){return t?t.toUpperCase():""}function Ti(e){return e&&`${e}`.replace(wi,Oi)}function Ii(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const r=n.lastIndexOf("/"),o=n.substring(r+1);{const s=o.lastIndexOf(t);return o.substring(0,s)}}var Hn=(0,Ai.default)({circles:!0});const ki={trailing:!0};function ve(e,t=25,n={}){if(n={...ki,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,o,s=[],i,u;const a=(c,p)=>(i=Ci(e,c,p),i.finally(()=>{if(i=null,n.trailing&&u&&!o){const l=a(c,u);return u=null,l}}),i);return function(...c){return i?(n.trailing&&(u=c),i):new Promise(p=>{const l=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const f=n.leading?r:a(this,c);for(const d of s)d(f);s=[]},t),l?(r=a(this,c),p(r)):s.push(p)})}}async function Ci(e,t,n){return await e.apply(t,n)}function xt(e,t={},n){for(const r in e){const o=e[r],s=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?xt(o,t,s):typeof o=="function"&&(t[s]=o)}return t}const Di={run:e=>e()},xi=()=>Di,zn=typeof console.createTask<"u"?console.createTask:xi;function Ri(e,t){const n=t.shift(),r=zn(n);return e.reduce((o,s)=>o.then(()=>r.run(()=>s(...t))),Promise.resolve())}function Pi(e,t){const n=t.shift(),r=zn(n);return Promise.all(e.map(o=>r.run(()=>o(...t))))}function Rt(e,t){for(const n of[...e])n(t)}class Ni{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const o=t;let s;for(;this._deprecatedHooks[t];)s=this._deprecatedHooks[t],t=s.to;if(s&&!r.allowDeprecated){let i=s.message;i||(i=`${o} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,o=(...s)=>(typeof r=="function"&&r(),r=void 0,o=void 0,n(...s));return r=this.hook(t,o),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const o of r)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=xt(t),r=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of r.splice(0,r.length))o()}}removeHooks(t){const n=xt(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(Ri,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(Pi,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&Rt(this._before,o);const s=t(n in this._hooks?[...this._hooks[n]]:[],r);return s instanceof Promise?s.finally(()=>{this._after&&o&&Rt(this._after,o)}):(this._after&&o&&Rt(this._after,o),s)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function Kn(){return new Ni}var Vi=Object.create,Gn=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,Pt=Object.getOwnPropertyNames,Mi=Object.getPrototypeOf,Bi=Object.prototype.hasOwnProperty,$i=(e,t)=>function(){return e&&(t=(0,e[Pt(e)[0]])(e=0)),t},Wn=(e,t)=>function(){return t||(0,e[Pt(e)[0]])((t={exports:{}}).exports,t),t.exports},Ui=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pt(t))!Bi.call(e,o)&&o!==n&&Gn(e,o,{get:()=>t[o],enumerable:!(r=Li(t,o))||r.enumerable});return e},Fi=(e,t,n)=>(n=e!=null?Vi(Mi(e)):{},Ui(Gn(n,"default",{value:e,enumerable:!0}),e)),_=$i({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),ji=Wn({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){_(),function(n){var r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},o=["်","ް"],s={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},i={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},u={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},a=[";","?",":","@","&","=","+","$",",","/"].join(""),c=[";","?",":","@","&","=","+","$",","].join(""),p=[".","!","~","*","'","(",")"].join(""),l=function(g,E){var O="-",T="",L="",re=!0,U={},A,ze,M,S,v,I,R,F,Ce,z,w,Y,C,De,oe="";if(typeof g!="string")return"";if(typeof E=="string"&&(O=E),R=u.en,F=i.en,typeof E=="object"){A=E.maintainCase||!1,U=E.custom&&typeof E.custom=="object"?E.custom:U,M=+E.truncate>1&&E.truncate||!1,S=E.uric||!1,v=E.uricNoSlash||!1,I=E.mark||!1,re=!(E.symbols===!1||E.lang===!1),O=E.separator||O,S&&(oe+=a),v&&(oe+=c),I&&(oe+=p),R=E.lang&&u[E.lang]&&re?u[E.lang]:re?u.en:{},F=E.lang&&i[E.lang]?i[E.lang]:E.lang===!1||E.lang===!0?{}:i.en,E.titleCase&&typeof E.titleCase.length=="number"&&Array.prototype.toString.call(E.titleCase)?(E.titleCase.forEach(function(K){U[K+""]=K+""}),ze=!0):ze=!!E.titleCase,E.custom&&typeof E.custom.length=="number"&&Array.prototype.toString.call(E.custom)&&E.custom.forEach(function(K){U[K+""]=K+""}),Object.keys(U).forEach(function(K){var Ke;K.length>1?Ke=new RegExp("\\b"+d(K)+"\\b","gi"):Ke=new RegExp(d(K),"gi"),g=g.replace(Ke,U[K])});for(w in U)oe+=w}for(oe+=O,oe=d(oe),g=g.replace(/(^\s+|\s+$)/g,""),C=!1,De=!1,z=0,Y=g.length;z<Y;z++)w=g[z],h(w,U)?C=!1:F[w]?(w=C&&F[w].match(/[A-Za-z0-9]/)?" "+F[w]:F[w],C=!1):w in r?(z+1<Y&&o.indexOf(g[z+1])>=0?(L+=w,w=""):De===!0?(w=s[L]+r[w],L=""):w=C&&r[w].match(/[A-Za-z0-9]/)?" "+r[w]:r[w],C=!1,De=!1):w in s?(L+=w,w="",z===Y-1&&(w=s[L]),De=!0):R[w]&&!(S&&a.indexOf(w)!==-1)&&!(v&&c.indexOf(w)!==-1)?(w=C||T.substr(-1).match(/[A-Za-z0-9]/)?O+R[w]:R[w],w+=g[z+1]!==void 0&&g[z+1].match(/[A-Za-z0-9]/)?O:"",C=!0):(De===!0?(w=s[L]+w,L="",De=!1):C&&(/[A-Za-z0-9]/.test(w)||T.substr(-1).match(/A-Za-z0-9]/))&&(w=" "+w),C=!1),T+=w.replace(new RegExp("[^\\w\\s"+oe+"_-]","g"),O);return ze&&(T=T.replace(/(\w)(\S*)/g,function(K,Ke,us){var fn=Ke.toUpperCase()+(us!==null?us:"");return Object.keys(U).indexOf(fn.toLowerCase())<0?fn:fn.toLowerCase()})),T=T.replace(/\s+/g,O).replace(new RegExp("\\"+O+"+","g"),O).replace(new RegExp("(^\\"+O+"+|\\"+O+"+$)","g"),""),M&&T.length>M&&(Ce=T.charAt(M)===O,T=T.slice(0,M),Ce||(T=T.slice(0,T.lastIndexOf(O)))),!A&&!ze&&(T=T.toLowerCase()),T},f=function(g){return function(O){return l(O,g)}},d=function(g){return g.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},h=function(m,g){for(var E in g)if(g[E]===m)return!0};if(typeof t<"u"&&t.exports)t.exports=l,t.exports.createSlug=f;else if(typeof define<"u"&&define.amd)define([],function(){return l});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=l,n.createSlug=f}catch{}}(e)}}),Hi=Wn({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){_(),t.exports=ji()}});_(),_(),_(),_(),_(),_(),_(),_();function zi(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function Ki(e){const t=e.__file;if(t)return Ti(Ii(t,".vue"))}function Yn(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function Nt(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function qn(e){var t,n;const r=(t=e.subTree)==null?void 0:t.type,o=Nt(e);return o?((n=o?.types)==null?void 0:n.Fragment)===r:!1}function Ze(e){var t,n,r;const o=zi(e?.type||{});if(o)return o;if(e?.root===e)return"Root";for(const i in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[i]===e?.type)return Yn(e,i);for(const i in(r=e.appContext)==null?void 0:r.components)if(e.appContext.components[i]===e?.type)return Yn(e,i);const s=Ki(e?.type||{});return s||"Anonymous Component"}function Gi(e){var t,n,r;const o=(r=(n=(t=e?.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?r:0,s=e===e?.root?"root":e.uid;return`${o}:${s}`}function Vt(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function Wi(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var Qe;function Yi(e){return Qe||(Qe=document.createRange()),Qe.selectNode(e),Qe.getBoundingClientRect()}function qi(e){const t=Wi();if(!e.children)return t;for(let n=0,r=e.children.length;n<r;n++){const o=e.children[n];let s;if(o.component)s=ae(o.component);else if(o.el){const i=o.el;i.nodeType===1||i.getBoundingClientRect?s=i.getBoundingClientRect():i.nodeType===3&&i.data.trim()&&(s=Yi(i))}s&&Ji(t,s)}return t}function Ji(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var Jn={top:0,left:0,right:0,bottom:0,width:0,height:0};function ae(e){const t=e.subTree.el;return typeof window>"u"?Jn:qn(e)?qi(e.subTree):t?.nodeType===1?t?.getBoundingClientRect():e.subTree.component?ae(e.subTree.component):Jn}_();function Lt(e){return qn(e)?Xi(e.subTree):e.subTree?[e.subTree.el]:[]}function Xi(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...Lt(n.component)):n?.el&&t.push(n.el)}),t}var Xn="__vue-devtools-component-inspector__",Zn="__vue-devtools-component-inspector__card__",Qn="__vue-devtools-component-inspector__name__",er="__vue-devtools-component-inspector__indicator__",tr={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},Zi={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},Qi={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Se(){return document.getElementById(Xn)}function eu(){return document.getElementById(Zn)}function tu(){return document.getElementById(er)}function nu(){return document.getElementById(Qn)}function Mt(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function Bt(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:Xn,Object.assign(n.style,{...tr,...Mt(e.bounds),...e.style});const r=document.createElement("span");r.id=Zn,Object.assign(r.style,{...Zi,top:e.bounds.top<35?0:"-35px"});const o=document.createElement("span");o.id=Qn,o.innerHTML=`<${e.name}> `;const s=document.createElement("i");return s.id=er,s.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(s.style,Qi),r.appendChild(o),r.appendChild(s),n.appendChild(r),document.body.appendChild(n),n}function $t(e){const t=Se(),n=eu(),r=nu(),o=tu();t&&(Object.assign(t.style,{...tr,...Mt(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),r.innerHTML=`<${e.name}> `,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function ru(e){const t=ae(e);if(!t.width&&!t.height)return;const n=Ze(e);Se()?$t({bounds:t,name:n}):Bt({bounds:t,name:n})}function nr(){const e=Se();e&&(e.style.display="none")}var Ut=null;function Ft(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(Ut=n,n.vnode.el)){const o=ae(n),s=Ze(n);Se()?$t({bounds:o,name:s}):Bt({bounds:o,name:s})}}}function ou(e,t){if(e.preventDefault(),e.stopPropagation(),Ut){const n=Gi(Ut);t(n)}}var et=null;function su(){nr(),window.removeEventListener("mouseover",Ft),window.removeEventListener("click",et,!0),et=null}function iu(){return window.addEventListener("mouseover",Ft),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),ou(n,r=>{window.removeEventListener("click",t,!0),et=null,window.removeEventListener("mouseover",Ft);const o=Se();o&&(o.style.display="none"),e(JSON.stringify({id:r}))})}et=t,window.addEventListener("click",t,!0)})}function uu(e){const t=Vt(N.value,e.id);if(t){const[n]=Lt(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const r=ae(t),o=document.createElement("div"),s={...Mt(r),position:"absolute"};Object.assign(o.style,s),document.body.appendChild(o),o.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(o)},2e3)}setTimeout(()=>{const r=ae(t);if(r.width||r.height){const o=Ze(t),s=Se();s?$t({...e,name:o,bounds:r}):Bt({...e,name:o,bounds:r}),setTimeout(()=>{s&&(s.style.display="none")},1500)}},1200)}}_();var rr,or;(or=(rr=y).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(rr.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function au(e){let t=0;const n=setInterval(()=>{y.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function cu(){const e=y.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function lu(){return new Promise(e=>{function t(){cu(),e(y.__VUE_INSPECTOR__)}y.__VUE_INSPECTOR__?t():au(()=>{t()})})}_(),_();function fu(e){return!!(e&&e.__v_isReadonly)}function sr(e){return fu(e)?sr(e.__v_raw):!!(e&&e.__v_isReactive)}function jt(e){return!!(e&&e.__v_isRef===!0)}function Ve(e){const t=e&&e.__v_raw;return t?Ve(t):e}var du=class{constructor(){this.refEditor=new hu}set(e,t,n,r){const o=Array.isArray(t)?t:t.split(".");for(;o.length>1;){const u=o.shift();e instanceof Map?e=e.get(u):e instanceof Set?e=Array.from(e.values())[u]:e=e[u],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const s=o[0],i=this.refEditor.get(e)[s];r?r(e,s,n):this.refEditor.isRef(i)?this.refEditor.set(i,n):e[s]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let r=0;r<n.length;r++)if(e instanceof Map?e=e.get(n[r]):e=e[n[r]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const r=Array.isArray(t)?t.slice():t.split("."),o=n?2:1;for(;e&&r.length>o;){const s=r.shift();e=e[s],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,r[0])}createDefaultSetCallback(e){return(t,n,r)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Ve(t)instanceof Map?t.delete(n):Ve(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const o=t[e.newKey||n];this.refEditor.isRef(o)?this.refEditor.set(o,r):Ve(t)instanceof Map?t.set(e.newKey||n,r):Ve(t)instanceof Set?t.add(r):t[e.newKey||n]=r}}}},hu=class{set(e,t){if(jt(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(o=>e.add(o));return}const n=Object.keys(t);if(e instanceof Map){const o=new Set(e.keys());n.forEach(s=>{e.set(s,Reflect.get(t,s)),o.delete(s)}),o.forEach(s=>e.delete(s));return}const r=new Set(Object.keys(e));n.forEach(o=>{Reflect.set(e,o,Reflect.get(t,o)),r.delete(o)}),r.forEach(o=>Reflect.deleteProperty(e,o))}}get(e){return jt(e)?e.value:e}isRef(e){return jt(e)||sr(e)}};_(),_(),_();var pu="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function _u(){if(!Fn||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=localStorage.getItem(pu);return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}_(),_(),_();var ir,ur;(ur=(ir=y).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(ir.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var gu=new Proxy(y.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function mu(e,t){D.timelineLayersState[t.id]=!1,gu.push({...e,descriptorId:t.id,appRecord:Nt(t.app)})}var ar,cr;(cr=(ar=y).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(ar.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Ht=new Proxy(y.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),lr=ve(()=>{Ae.hooks.callHook("sendInspectorToClient",fr())});function Eu(e,t){var n,r;Ht.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(r=e.stateFilterPlaceholder)!=null?r:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:Nt(t.app)}),lr()}function fr(){return Ht.filter(e=>e.descriptor.app===N.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,r=e.options;return{id:r.id,label:r.label,logo:n.logo,icon:`custom-ic-baseline-${(t=r?.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function tt(e,t){return Ht.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function yu(){const e=Kn();e.hook("addInspector",({inspector:r,plugin:o})=>{Eu(r,o.descriptor)});const t=ve(async({inspectorId:r,plugin:o})=>{var s;if(!r||!((s=o?.descriptor)!=null&&s.app)||D.highPerfModeEnabled)return;const i=tt(r,o.descriptor.app),u={app:o.descriptor.app,inspectorId:r,filter:i?.treeFilter||"",rootNodes:[]};await new Promise(a=>{e.callHookWith(async c=>{await Promise.all(c.map(p=>p(u))),a()},"getInspectorTree")}),e.callHookWith(async a=>{await Promise.all(a.map(c=>c({inspectorId:r,rootNodes:u.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=ve(async({inspectorId:r,plugin:o})=>{var s;if(!r||!((s=o?.descriptor)!=null&&s.app)||D.highPerfModeEnabled)return;const i=tt(r,o.descriptor.app),u={app:o.descriptor.app,inspectorId:r,nodeId:i?.selectedNodeId||"",state:null},a={currentTab:`custom-inspector:${r}`};u.nodeId&&await new Promise(c=>{e.callHookWith(async p=>{await Promise.all(p.map(l=>l(u,a))),c()},"getInspectorState")}),e.callHookWith(async c=>{await Promise.all(c.map(p=>p({inspectorId:r,nodeId:u.nodeId,state:u.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:r,nodeId:o,plugin:s})=>{const i=tt(r,s.descriptor.app);i&&(i.selectedNodeId=o)}),e.hook("timelineLayerAdded",({options:r,plugin:o})=>{mu(r,o.descriptor)}),e.hook("timelineEventAdded",({options:r,plugin:o})=>{var s;const i=["performance","component-event","keyboard","mouse"];D.highPerfModeEnabled||!((s=D.timelineLayersState)!=null&&s[o.descriptor.id])&&!i.includes(r.layerId)||e.callHookWith(async u=>{await Promise.all(u.map(a=>a(r)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:r})=>{const o=r.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!o)return null;const s=o.id.toString();return[...o.instanceMap].filter(([u])=>u.split(":")[0]===s).map(([,u])=>u)}),e.hook("getComponentBounds",async({instance:r})=>ae(r)),e.hook("getComponentName",({instance:r})=>Ze(r)),e.hook("componentHighlight",({uid:r})=>{const o=N.value.instanceMap.get(r);o&&ru(o)}),e.hook("componentUnhighlight",()=>{nr()}),e}var dr,hr;(hr=(dr=y).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(dr.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var pr,_r;(_r=(pr=y).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(pr.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var gr,mr;(mr=(gr=y).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(gr.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var Er,yr;(yr=(Er=y).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(Er.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var vr,Sr;(Sr=(vr=y).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(vr.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var ce="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function vu(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:_u()}}var br,Ar;(Ar=(br=y)[ce])!=null||(br[ce]=vu());var Su=ve(e=>{Ae.hooks.callHook("devtoolsStateUpdated",{state:e})});ve((e,t)=>{Ae.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var nt=new Proxy(y.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?y.__VUE_DEVTOOLS_KIT_APP_RECORDS__:y.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),N=new Proxy(y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function wr(){Su({...y[ce],appRecords:nt.value,activeAppRecordId:N.id,tabs:y.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:y.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function bu(e){y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,wr()}function Au(e){y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,wr()}var D=new Proxy(y[ce],{get(e,t){return t==="appRecords"?nt:t==="activeAppRecordId"?N.id:t==="tabs"?y.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?y.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:y[ce][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...y[ce]},e[t]=n,y[ce][t]=n,!0}});function wu(e={}){var t,n,r;const{file:o,host:s,baseUrl:i=window.location.origin,line:u=0,column:a=0}=e;if(o){if(s==="chrome-extension"){const c=o.replace(/\\/g,"\\\\"),p=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${p}__open-in-editor?file=${encodeURI(o)}`).then(l=>{if(!l.ok){const f=`Opening component ${c} failed`;console.log(`%c${f}`,"color:red")}})}else if(D.vitePluginDetected){const c=(r=y.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?r:i;y.__VUE_INSPECTOR__.openInEditor(c,o,u,a)}}}_(),_(),_(),_(),_();var Or,Tr;(Tr=(Or=y).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(Or.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var zt=new Proxy(y.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function Kt(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function Gt(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function Ou(e){var t,n,r;const o=(n=(t=zt.find(s=>{var i;return s[0].id===e&&!!((i=s[0])!=null&&i.settings)}))==null?void 0:t[0])!=null?n:null;return(r=o?.settings)!=null?r:null}function Ir(e,t){var n,r,o;const s=Gt(e);if(s){const i=localStorage.getItem(s);if(i)return JSON.parse(i)}if(e){const i=(r=(n=zt.find(u=>u[0].id===e))==null?void 0:n[0])!=null?r:null;return Kt((o=i?.settings)!=null?o:{})}return Kt(t)}function Tu(e,t){const n=Gt(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(Kt(t)))}function Iu(e,t,n){const r=Gt(e),o=localStorage.getItem(r),s=JSON.parse(o||"{}"),i={...s,[t]:n};localStorage.setItem(r,JSON.stringify(i)),Ae.hooks.callHookWith(u=>{u.forEach(a=>a({pluginId:e,key:t,oldValue:s[t],newValue:n,settings:i}))},"setPluginSettings")}_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_();var kr,Cr,B=(Cr=(kr=y).__VUE_DEVTOOLS_HOOK)!=null?Cr:kr.__VUE_DEVTOOLS_HOOK=Kn(),ku={vueAppInit(e){B.hook("app:init",e)},vueAppUnmount(e){B.hook("app:unmount",e)},vueAppConnected(e){B.hook("app:connected",e)},componentAdded(e){return B.hook("component:added",e)},componentEmit(e){return B.hook("component:emit",e)},componentUpdated(e){return B.hook("component:updated",e)},componentRemoved(e){return B.hook("component:removed",e)},setupDevtoolsPlugin(e){B.hook("devtools-plugin:setup",e)},perfStart(e){return B.hook("perf:start",e)},perfEnd(e){return B.hook("perf:end",e)}},Dr={on:ku,setupDevToolsPlugin(e,t){return B.callHook("devtools-plugin:setup",e,t)}},Cu=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(D.highPerfModeEnabled)return;const n=fr().find(r=>r.packageName===this.plugin.descriptor.packageName);if(n?.id){if(e){const r=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];B.callHook("component:updated",...r)}else B.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&Tu(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){D.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){D.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return D.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){D.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return Ir(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},Du=Cu;_(),_(),_(),_();var xu="__vue_devtool_undefined__",Ru="__vue_devtool_infinity__",Pu="__vue_devtool_negative_infinity__",Nu="__vue_devtool_nan__";_(),_();var Vu={[xu]:"undefined",[Nu]:"NaN",[Ru]:"Infinity",[Pu]:"-Infinity"};Object.entries(Vu).reduce((e,[t,n])=>(e[n]=t,e),{}),_(),_(),_(),_(),_();var xr,Rr;(Rr=(xr=y).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(xr.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function Pr(e,t){return Dr.setupDevToolsPlugin(e,t)}function Lu(e,t){const[n,r]=e;if(n.app!==t)return;const o=new Du({plugin:{setupFn:r,descriptor:n},ctx:Ae});n.packageName==="vuex"&&o.on.editInspectorState(s=>{o.sendInspectorState(s.inspectorId)}),r(o)}function Nr(e,t){y.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||D.highPerfModeEnabled&&!t?.inspectingComponent||(y.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),zt.forEach(n=>{Lu(n,e)}))}_(),_();var Le="__VUE_DEVTOOLS_ROUTER__",be="__VUE_DEVTOOLS_ROUTER_INFO__",Vr,Lr;(Lr=(Vr=y)[be])!=null||(Vr[be]={currentRoute:null,routes:[]});var Mr,Br;(Br=(Mr=y)[Le])!=null||(Mr[Le]={}),new Proxy(y[be],{get(e,t){return y[be][t]}}),new Proxy(y[Le],{get(e,t){if(t==="value")return y[Le]}});function Mu(e){const t=new Map;return(e?.getRoutes()||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function Wt(e){return e.map(t=>{let{path:n,name:r,children:o,meta:s}=t;return o?.length&&(o=Wt(o)),{path:n,name:r,children:o,meta:s}})}function Bu(e){if(e){const{fullPath:t,hash:n,href:r,path:o,name:s,matched:i,params:u,query:a}=e;return{fullPath:t,hash:n,href:r,path:o,name:s,params:u,query:a,matched:Wt(i)}}return e}function $u(e,t){function n(){var r;const o=(r=e.app)==null?void 0:r.config.globalProperties.$router,s=Bu(o?.currentRoute.value),i=Wt(Mu(o)),u=console.warn;console.warn=()=>{},y[be]={currentRoute:s?Hn(s):{},routes:Hn(i)},y[Le]=o,console.warn=u}n(),Dr.on.componentUpdated(ve(()=>{var r;((r=t.value)==null?void 0:r.app)===e.app&&(n(),!D.highPerfModeEnabled&&Ae.hooks.callHook("routerInfoUpdated",{state:y[be]}))},200))}function Uu(e){return{async getInspectorTree(t){const n={...t,app:N.value.app,rootNodes:[]};return await new Promise(r=>{e.callHookWith(async o=>{await Promise.all(o.map(s=>s(n))),r()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:N.value.app,state:null},r={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(o=>{e.callHookWith(async s=>{await Promise.all(s.map(i=>i(n,r))),o()},"getInspectorState")}),n.state},editInspectorState(t){const n=new du,r={...t,app:N.value.app,set:(o,s=t.path,i=t.state.value,u)=>{n.set(o,s,i,u||n.createDefaultSetCallback(t.state))}};e.callHookWith(o=>{o.forEach(s=>s(r))},"editInspectorState")},sendInspectorState(t){const n=tt(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return iu()},cancelInspectComponentInspector(){return su()},getComponentRenderCode(t){const n=Vt(N.value,t);if(n)return typeof n?.type!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return uu({id:t})},openInEditor:wu,getVueInspector:lu,toggleApp(t,n){const r=nt.value.find(o=>o.id===t);r&&(Au(t),bu(r),$u(r,N),lr(),Nr(r.app,n))},inspectDOM(t){const n=Vt(N.value,t);if(n){const[r]=Lt(n);r&&(y.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=r)}},updatePluginSettings(t,n,r){Iu(t,n,r)},getPluginSettings(t){return{options:Ou(t),values:Ir(t)}}}}_();var $r,Ur;(Ur=($r=y).__VUE_DEVTOOLS_ENV__)!=null||($r.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var Fr=yu(),jr,Hr;(Hr=(jr=y).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(jr.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:Fr,get state(){return{...D,activeAppRecordId:N.id,activeAppRecord:N.value,appRecords:nt.value}},api:Uu(Fr)});var Ae=y.__VUE_DEVTOOLS_KIT_CONTEXT__;_(),Fi(Hi());var zr,Kr;(Kr=(zr=y).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(zr.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),_(),_();function Fu(e){D.highPerfModeEnabled=e??!D.highPerfModeEnabled,!e&&N.value&&Nr(N.value.app)}_(),_(),_();function ju(e){D.devtoolsClientDetected={...D.devtoolsClientDetected,...e};const t=Object.values(D.devtoolsClientDetected).some(Boolean);Fu(!t)}var Gr,Wr;(Wr=(Gr=y).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(Gr.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=ju),_(),_(),_(),_(),_(),_(),_();var Hu=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Yr=class{constructor(t){this.generateIdentifier=t,this.kv=new Hu}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},zu=class extends Yr{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};_(),_();function Ku(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Gu(e,t){const n=Ku(e);if("find"in n)return n.find(t);const r=n;for(let o=0;o<r.length;o++){const s=r[o];if(t(s))return s}}function we(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function rt(e,t){return e.indexOf(t)!==-1}function qr(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var Wu=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Gu(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};_(),_();var Yu=e=>Object.prototype.toString.call(e).slice(8,-1),Jr=e=>typeof e>"u",qu=e=>e===null,Me=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Yt=e=>Me(e)&&Object.keys(e).length===0,ee=e=>Array.isArray(e),Ju=e=>typeof e=="string",Xu=e=>typeof e=="number"&&!isNaN(e),Zu=e=>typeof e=="boolean",Qu=e=>e instanceof RegExp,Be=e=>e instanceof Map,$e=e=>e instanceof Set,Xr=e=>Yu(e)==="Symbol",ea=e=>e instanceof Date&&!isNaN(e.valueOf()),ta=e=>e instanceof Error,Zr=e=>typeof e=="number"&&isNaN(e),na=e=>Zu(e)||qu(e)||Jr(e)||Xu(e)||Ju(e)||Xr(e),ra=e=>typeof e=="bigint",oa=e=>e===1/0||e===-1/0,sa=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),ia=e=>e instanceof URL;_();var Qr=e=>e.replace(/\./g,"\\."),qt=e=>e.map(String).map(Qr).join("."),Ue=e=>{const t=[];let n="";for(let o=0;o<e.length;o++){let s=e.charAt(o);if(s==="\\"&&e.charAt(o+1)==="."){n+=".",o++;continue}if(s==="."){t.push(n),n="";continue}n+=s}const r=n;return t.push(r),t};_();function G(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var eo=[G(Jr,"undefined",()=>null,()=>{}),G(ra,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),G(ea,"Date",e=>e.toISOString(),e=>new Date(e)),G(ta,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),G(Qu,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),G($e,"set",e=>[...e.values()],e=>new Set(e)),G(Be,"map",e=>[...e.entries()],e=>new Map(e)),G(e=>Zr(e)||oa(e),"number",e=>Zr(e)?"NaN":e>0?"Infinity":"-Infinity",Number),G(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),G(ia,"URL",e=>e.toString(),e=>new URL(e))];function ot(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var to=ot((e,t)=>Xr(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),ua=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),no=ot(sa,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=ua[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function ro(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var oo=ot(ro,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(o=>{r[o]=e[o]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),so=ot((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),aa=[oo,to,so,no],io=(e,t)=>{const n=qr(aa,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=qr(eo,o=>o.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},uo={};eo.forEach(e=>{uo[e.annotation]=e});var ca=(e,t,n)=>{if(ee(t))switch(t[0]){case"symbol":return to.untransform(e,t,n);case"class":return oo.untransform(e,t,n);case"custom":return so.untransform(e,t,n);case"typed-array":return no.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=uo[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}};_();var Oe=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function ao(e){if(rt(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(rt(e,"prototype"))throw new Error("prototype is not allowed as a property");if(rt(e,"constructor"))throw new Error("constructor is not allowed as a property")}var la=(e,t)=>{ao(t);for(let n=0;n<t.length;n++){const r=t[n];if($e(e))e=Oe(e,+r);else if(Be(e)){const o=+r,s=+t[++n]==0?"key":"value",i=Oe(e,o);switch(s){case"key":e=i;break;case"value":e=e.get(i);break}}else e=e[r]}return e},Jt=(e,t,n)=>{if(ao(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const i=t[s];if(ee(r)){const u=+i;r=r[u]}else if(Me(r))r=r[i];else if($e(r)){const u=+i;r=Oe(r,u)}else if(Be(r)){if(s===t.length-2)break;const a=+i,c=+t[++s]==0?"key":"value",p=Oe(r,a);switch(c){case"key":r=p;break;case"value":r=r.get(p);break}}}const o=t[t.length-1];if(ee(r)?r[+o]=n(r[+o]):Me(r)&&(r[o]=n(r[o])),$e(r)){const s=Oe(r,+o),i=n(s);s!==i&&(r.delete(s),r.add(i))}if(Be(r)){const s=+t[t.length-2],i=Oe(r,s);switch(+o==0?"key":"value"){case"key":{const a=n(i);r.set(a,r.get(i)),a!==i&&r.delete(i);break}case"value":{r.set(i,n(r.get(i)));break}}}return e};function Xt(e,t,n=[]){if(!e)return;if(!ee(e)){we(e,(s,i)=>Xt(s,t,[...n,...Ue(i)]));return}const[r,o]=e;o&&we(o,(s,i)=>{Xt(s,t,[...n,...Ue(i)])}),t(r,n)}function fa(e,t,n){return Xt(t,(r,o)=>{e=Jt(e,o,s=>ca(s,r,n))}),e}function da(e,t){function n(r,o){const s=la(e,Ue(o));r.map(Ue).forEach(i=>{e=Jt(e,i,()=>s)})}if(ee(t)){const[r,o]=t;r.forEach(s=>{e=Jt(e,Ue(s),()=>e)}),o&&we(o,n)}else we(t,n);return e}var ha=(e,t)=>Me(e)||ee(e)||Be(e)||$e(e)||ro(e,t);function pa(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function _a(e,t){const n={};let r;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(u=>u.map(String)).sort((u,a)=>u.length-a.length));const[s,...i]=o;s.length===0?r=i.map(qt):n[qt(s)]=i.map(qt)}),r?Yt(n)?[r]:[r,n]:Yt(n)?void 0:n}var co=(e,t,n,r,o=[],s=[],i=new Map)=>{var u;const a=na(e);if(!a){pa(e,o,t);const h=i.get(e);if(h)return r?{transformedValue:null}:h}if(!ha(e,n)){const h=io(e,n),m=h?{transformedValue:h.value,annotations:[h.type]}:{transformedValue:e};return a||i.set(e,m),m}if(rt(s,e))return{transformedValue:null};const c=io(e,n),p=(u=c?.value)!=null?u:e,l=ee(p)?[]:{},f={};we(p,(h,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const g=co(h,t,n,r,[...o,m],[...s,e],i);l[m]=g.transformedValue,ee(g.annotations)?f[m]=g.annotations:Me(g.annotations)&&we(g.annotations,(E,O)=>{f[Qr(m)+"."+O]=E})});const d=Yt(f)?{transformedValue:l,annotations:c?[c.type]:void 0}:{transformedValue:l,annotations:c?[c.type,f]:f};return a||i.set(e,d),d};_(),_();function lo(e){return Object.prototype.toString.call(e).slice(8,-1)}function fo(e){return lo(e)==="Array"}function ga(e){if(lo(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function ma(e,t,n,r,o){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),o&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Zt(e,t={}){if(fo(e))return e.map(o=>Zt(o,t));if(!ga(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((o,s)=>{if(fo(t.props)&&!t.props.includes(s))return o;const i=e[s],u=Zt(i,t);return ma(o,s,u,e,t.nonenumerable),o},{})}var k=class{constructor({dedupe:e=!1}={}){this.classRegistry=new zu,this.symbolRegistry=new Yr(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new Wu,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=co(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const o=_a(t,this.dedupe);return o&&(r.meta={...r.meta,referentialEqualities:o}),r}deserialize(e){const{json:t,meta:n}=e;let r=Zt(t);return n?.values&&(r=fa(r,n.values,this)),n?.referentialEqualities&&(r=da(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};k.defaultInstance=new k,k.serialize=k.defaultInstance.serialize.bind(k.defaultInstance),k.deserialize=k.defaultInstance.deserialize.bind(k.defaultInstance),k.stringify=k.defaultInstance.stringify.bind(k.defaultInstance),k.parse=k.defaultInstance.parse.bind(k.defaultInstance),k.registerClass=k.defaultInstance.registerClass.bind(k.defaultInstance),k.registerSymbol=k.defaultInstance.registerSymbol.bind(k.defaultInstance),k.registerCustom=k.defaultInstance.registerCustom.bind(k.defaultInstance),k.allowErrorProps=k.defaultInstance.allowErrorProps.bind(k.defaultInstance),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_();var ho,po;(po=(ho=y).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(ho.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var _o,go;(go=(_o=y).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(_o.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var mo,Eo;(Eo=(mo=y).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(mo.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var yo,vo;(vo=(yo=y).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(yo.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var So,bo;(bo=(So=y).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(So.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var Ao,wo;(wo=(Ao=y).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(Ao.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),_(),_(),_(),_(),_(),_(),_();/*!
|
|
4
4
|
* pinia v3.0.3
|
|
5
5
|
* (c) 2025 Eduardo San Martin Morote
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/let
|
|
7
|
+
*/let Fe;const je=e=>Fe=e,Oo=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function le(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var W;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(W||(W={}));const te=typeof window<"u",To=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Ea(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Qt(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Co(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Io(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function st(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(n)}}const it=typeof navigator=="object"?navigator:{userAgent:""},ko=/Macintosh/.test(it.userAgent)&&/AppleWebKit/.test(it.userAgent)&&!/Safari/.test(it.userAgent),Co=te?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!ko?ya:"msSaveOrOpenBlob"in it?va:Sa:()=>{};function ya(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Io(r.href)?Qt(e,t,n):(r.target="_blank",st(r)):st(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){st(r)},0))}function va(e,t="download",n){if(typeof e=="string")if(Io(e))Qt(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){st(r)})}else navigator.msSaveOrOpenBlob(Ea(e,n),t)}function Sa(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Qt(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(To.HTMLElement))||"safari"in To,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||ko)&&typeof FileReader<"u"){const u=new FileReader;u.onloadend=function(){let a=u.result;if(typeof a!="string")throw r=null,new Error("Wrong reader.result type");a=i?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=a:location.assign(a),r=null},u.readAsDataURL(e)}else{const u=URL.createObjectURL(e);r?r.location.assign(u):location.href=u,r=null,setTimeout(function(){URL.revokeObjectURL(u)},4e4)}}function x(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function en(e){return"_a"in e&&"install"in e}function Do(){if(!("clipboard"in navigator))return x("Your browser doesn't support the Clipboard API","error"),!0}function xo(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(x('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function ba(e){if(!Do())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),x("Global state copied to clipboard.")}catch(t){if(xo(t))return;x("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function Aa(e){if(!Do())try{Ro(e,JSON.parse(await navigator.clipboard.readText())),x("Global state pasted from clipboard.")}catch(t){if(xo(t))return;x("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function wa(e){try{Co(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){x("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let J;function Oa(){J||(J=document.createElement("input"),J.type="file",J.accept=".json");function e(){return new Promise((t,n)=>{J.onchange=async()=>{const r=J.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},J.oncancel=()=>t(null),J.onerror=n,J.click()})}return e}async function Ta(e){try{const n=await Oa()();if(!n)return;const{text:r,file:o}=n;Ro(e,JSON.parse(r)),x(`Global state imported from "${o.name}".`)}catch(t){x("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Ro(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function H(e){return{_custom:{display:e}}}const Po="🍍 Pinia (root)",ut="_root";function Ia(e){return en(e)?{id:ut,label:Po}:{id:e.$id,label:e.$id}}function ka(e){if(en(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((u,a)=>(u[a]=i[a],u),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Ca(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:H(e.type),key:H(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Da(e){switch(e){case W.direct:return"mutation";case W.patchFunction:return"$patch";case W.patchObject:return"$patch";default:return"unknown"}}let Te=!0;const at=[],fe="pinia:mutations",P="pinia",{assign:xa}=Object,ct=e=>"🍍 "+e;function Ra(e,t){Pr({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:at,app:e},n=>{typeof n.now!="function"&&x("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:fe,label:"Pinia 🍍",color:15064968}),n.addInspector({id:P,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{ba(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Aa(t),n.sendInspectorTree(P),n.sendInspectorState(P)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{wa(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Ta(t),n.sendInspectorTree(P),n.sendInspectorState(P)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?x(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),x(`Store "${r}" reset.`)):x(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent(r=>{const o=r.componentInstance&&r.componentInstance.proxy;if(o&&o._pStores){const s=r.componentInstance.proxy._pStores;Object.values(s).forEach(i=>{r.instanceData.state.push({type:ct(i.$id),key:"state",editable:!0,value:i._isOptionsAPI?{_custom:{value:b.toRaw(i.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>i.$reset()}]}}:Object.keys(i.$state).reduce((u,a)=>(u[a]=i.$state[a],u),{})}),i._getters&&i._getters.length&&r.instanceData.state.push({type:ct(i.$id),key:"getters",editable:!1,value:i._getters.reduce((u,a)=>{try{u[a]=i[a]}catch(c){u[a]=c}return u},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===P){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Po.toLowerCase().includes(r.filter.toLowerCase())):o).map(Ia)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===P){const o=r.nodeId===ut?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==ut&&(globalThis.$store=b.toRaw(o)),r.state=ka(o))}}),n.on.editInspectorState(r=>{if(r.app===e&&r.inspectorId===P){const o=r.nodeId===ut?t:t._s.get(r.nodeId);if(!o)return x(`store "${r.nodeId}" not found`,"error");const{path:s}=r;en(o)?s.unshift("state"):(s.length!==1||!o._customProperties.has(s[0])||s[0]in o.$state)&&s.unshift("$state"),Te=!1,r.set(o,s,r.state.value),Te=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return x(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return x(`Invalid path for store "${o}":
|
|
8
8
|
${i}
|
|
9
|
-
Only state can be modified.`);i[0]="$state",
|
|
9
|
+
Only state can be modified.`);i[0]="$state",Te=!1,r.set(s,i,r.state.value),Te=!0}})})}function Pa(e,t){at.includes(ct(t.$id))||at.push(ct(t.$id)),Pr({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:at,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:u,name:a,args:c})=>{const p=No++;n.addTimelineEvent({layerId:fe,event:{time:r(),title:"🛫 "+a,subtitle:"start",data:{store:H(t.$id),action:H(a),args:c},groupId:p}}),i(l=>{ne=void 0,n.addTimelineEvent({layerId:fe,event:{time:r(),title:"🛬 "+a,subtitle:"end",data:{store:H(t.$id),action:H(a),args:c,result:l},groupId:p}})}),u(l=>{ne=void 0,n.addTimelineEvent({layerId:fe,event:{time:r(),logType:"error",title:"💥 "+a,subtitle:"end",data:{store:H(t.$id),action:H(a),args:c,error:l},groupId:p}})})},!0),t._customProperties.forEach(i=>{b.watch(()=>b.unref(t[i]),(u,a)=>{n.notifyComponentUpdate(),n.sendInspectorState(P),Te&&n.addTimelineEvent({layerId:fe,event:{time:r(),title:"Change",subtitle:i,data:{newValue:u,oldValue:a},groupId:ne}})},{deep:!0})}),t.$subscribe(({events:i,type:u},a)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(P),!Te)return;const c={time:r(),title:Da(u),data:xa({store:H(t.$id)},Ca(i)),groupId:ne};u===W.patchFunction?c.subtitle="⤵️":u===W.patchObject?c.subtitle="🧩":i&&!Array.isArray(i)&&(c.subtitle=i.type),i&&(c.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:fe,event:c})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=b.markRaw(i=>{o(i),n.addTimelineEvent({layerId:fe,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:H(t.$id),info:H("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(P),n.sendInspectorState(P)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(P),n.sendInspectorState(P),n.getSettings().logStoreChanges&&x(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(P),n.sendInspectorState(P),n.getSettings().logStoreChanges&&x(`"${t.$id}" store installed 🆕`)})}let No=0,ne;function Vo(e,t,n){const r=t.reduce((o,s)=>(o[s]=b.toRaw(e)[s],o),{});for(const o in r)e[o]=function(){const s=No,i=n?new Proxy(e,{get(...a){return ne=s,Reflect.get(...a)},set(...a){return ne=s,Reflect.set(...a)}}):e;ne=s;const u=r[o].apply(i,arguments);return ne=void 0,u}}function Na({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Vo(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;b.toRaw(t)._hotUpdate=function(o){r.apply(this,arguments),Vo(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}Pa(e,t)}}function Va(){const e=b.effectScope(!0),t=e.run(()=>b.ref({}));let n=[],r=[];const o=b.markRaw({install(s){je(o),o._a=s,s.provide(Oo,o),s.config.globalProperties.$pinia=o,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&te&&Ra(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return this._a?n.push(s):r.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&te&&typeof Proxy<"u"&&o.use(Na),o}function Lo(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];le(o)&&le(r)&&!b.isRef(r)&&!b.isReactive(r)?e[n]=Lo(o,r):e[n]=r}return e}const Mo=()=>{};function Bo(e,t,n,r=Mo){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&b.getCurrentScope()&&b.onScopeDispose(o),o}function Ie(e,...t){e.slice().forEach(n=>{n(...t)})}const La=e=>e(),$o=Symbol(),tn=Symbol();function nn(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];le(o)&&le(r)&&e.hasOwnProperty(n)&&!b.isRef(r)&&!b.isReactive(r)?e[n]=nn(o,r):e[n]=r}return e}const Ma=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Ba(e){return!le(e)||!Object.prototype.hasOwnProperty.call(e,Ma)}const{assign:$}=Object;function Uo(e){return!!(b.isRef(e)&&e.effect)}function Fo(e,t,n,r){const{state:o,actions:s,getters:i}=t,u=n.state.value[e];let a;function c(){!u&&(process.env.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const p=process.env.NODE_ENV!=="production"&&r?b.toRefs(b.ref(o?o():{}).value):b.toRefs(n.state.value[e]);return $(p,s,Object.keys(i||{}).reduce((l,f)=>(process.env.NODE_ENV!=="production"&&f in p&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),l[f]=b.markRaw(b.computed(()=>{je(n);const d=n._s.get(e);return i[f].call(d,d)})),l),{}))}return a=rn(e,c,t,n,r,!0),a}function rn(e,t,n={},r,o,s){let i;const u=$({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const a={deep:!0};process.env.NODE_ENV!=="production"&&(a.onTrigger=S=>{c?d=S:c==!1&&!A._hotUpdating&&(Array.isArray(d)?d.push(S):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let c,p,l=[],f=[],d;const h=r.state.value[e];!s&&!h&&(process.env.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const m=b.ref({});let g;function E(S){let v;c=p=!1,process.env.NODE_ENV!=="production"&&(d=[]),typeof S=="function"?(S(r.state.value[e]),v={type:W.patchFunction,storeId:e,events:d}):(nn(r.state.value[e],S),v={type:W.patchObject,payload:S,storeId:e,events:d});const I=g=Symbol();b.nextTick().then(()=>{g===I&&(c=!0)}),p=!0,Ie(l,v,r.state.value[e])}const O=s?function(){const{state:v}=n,I=v?v():{};this.$patch(R=>{$(R,I)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Mo;function T(){i.stop(),l=[],f=[],r._s.delete(e)}const L=(S,v="")=>{if($o in S)return S[tn]=v,S;const I=function(){je(r);const R=Array.from(arguments),F=[],Ce=[];function z(C){F.push(C)}function w(C){Ce.push(C)}Ie(f,{args:R,name:I[tn],store:A,after:z,onError:w});let Y;try{Y=S.apply(this&&this.$id===e?this:A,R)}catch(C){throw Ie(Ce,C),C}return Y instanceof Promise?Y.then(C=>(Ie(F,C),C)).catch(C=>(Ie(Ce,C),Promise.reject(C))):(Ie(F,Y),Y)};return I[$o]=!0,I[tn]=v,I},re=b.markRaw({actions:{},getters:{},state:[],hotState:m}),U={_p:r,$id:e,$onAction:Bo.bind(null,f),$patch:E,$reset:O,$subscribe(S,v={}){const I=Bo(l,S,v.detached,()=>R()),R=i.run(()=>b.watch(()=>r.state.value[e],F=>{(v.flush==="sync"?p:c)&&S({storeId:e,type:W.direct,events:d},F)},$({},a,v)));return I},$dispose:T},A=b.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&te?$({_hmrPayload:re,_customProperties:b.markRaw(new Set)},U):U);r._s.set(e,A);const M=(r._a&&r._a.runWithContext||La)(()=>r._e.run(()=>(i=b.effectScope()).run(()=>t({action:L}))));for(const S in M){const v=M[S];if(b.isRef(v)&&!Uo(v)||b.isReactive(v))process.env.NODE_ENV!=="production"&&o?m.value[S]=b.toRef(M,S):s||(h&&Ba(v)&&(b.isRef(v)?v.value=h[S]:nn(v,h[S])),r.state.value[e][S]=v),process.env.NODE_ENV!=="production"&&re.state.push(S);else if(typeof v=="function"){const I=process.env.NODE_ENV!=="production"&&o?v:L(v,S);M[S]=I,process.env.NODE_ENV!=="production"&&(re.actions[S]=v),u.actions[S]=v}else process.env.NODE_ENV!=="production"&&Uo(v)&&(re.getters[S]=s?n.getters[S]:v,te&&(M._getters||(M._getters=b.markRaw([]))).push(S))}if($(A,M),$(b.toRaw(A),M),Object.defineProperty(A,"$state",{get:()=>process.env.NODE_ENV!=="production"&&o?m.value:r.state.value[e],set:S=>{if(process.env.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");E(v=>{$(v,S)})}}),process.env.NODE_ENV!=="production"&&(A._hotUpdate=b.markRaw(S=>{A._hotUpdating=!0,S._hmrPayload.state.forEach(v=>{if(v in A.$state){const I=S.$state[v],R=A.$state[v];typeof I=="object"&&le(I)&&le(R)?Lo(I,R):S.$state[v]=R}A[v]=b.toRef(S.$state,v)}),Object.keys(A.$state).forEach(v=>{v in S.$state||delete A[v]}),c=!1,p=!1,r.state.value[e]=b.toRef(S._hmrPayload,"hotState"),p=!0,b.nextTick().then(()=>{c=!0});for(const v in S._hmrPayload.actions){const I=S[v];A[v]=L(I,v)}for(const v in S._hmrPayload.getters){const I=S._hmrPayload.getters[v],R=s?b.computed(()=>(je(r),I.call(A,A))):I;A[v]=R}Object.keys(A._hmrPayload.getters).forEach(v=>{v in S._hmrPayload.getters||delete A[v]}),Object.keys(A._hmrPayload.actions).forEach(v=>{v in S._hmrPayload.actions||delete A[v]}),A._hmrPayload=S._hmrPayload,A._getters=S._getters,A._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&te){const S={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(v=>{Object.defineProperty(A,v,$({value:A[v]},S))})}return r._p.forEach(S=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&te){const v=i.run(()=>S({store:A,app:r._a,pinia:r,options:u}));Object.keys(v||{}).forEach(I=>A._customProperties.add(I)),$(A,v)}else $(A,i.run(()=>S({store:A,app:r._a,pinia:r,options:u})))}),process.env.NODE_ENV!=="production"&&A.$state&&typeof A.$state=="object"&&typeof A.$state.constructor=="function"&&!A.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
10
10
|
state: () => new MyClass()
|
|
11
|
-
Found in store "${A.$id}".`),
|
|
11
|
+
Found in store "${A.$id}".`),h&&s&&n.hydrate&&n.hydrate(A.$state,h),c=!0,p=!0,A}/*! #__NO_SIDE_EFFECTS__ */function $a(e,t,n){let r;const o=typeof t=="function";r=o?n:t;function s(i,u){const a=b.hasInjectionContext();if(i=(process.env.NODE_ENV==="test"&&Fe&&Fe._testing?null:i)||(a?b.inject(Oo,null):null),i&&je(i),process.env.NODE_ENV!=="production"&&!Fe)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
12
12
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
13
|
-
This will fail in production.`);i=He,i._s.has(e)||(s?an(e,t,r,i):zs(e,r,i),process.env.NODE_ENV!=="production"&&(o._pinia=i));const c=i._s.get(e);if(process.env.NODE_ENV!=="production"&&u){const p="__hot:"+e,l=s?an(p,t,r,i,!0):zs(p,F({},r),i,!0);u._hotUpdate(l),delete i.state.value[p],i._s.delete(p)}if(process.env.NODE_ENV!=="production"&&ne){const p=S.getCurrentInstance();if(p&&p.proxy&&!u){const l=p.proxy,f="_pStores"in l?l._pStores:l._pStores={};f[e]=c}}return c}return o.$id=e,o}const Ha=ja("data",()=>{const e=S.ref([]),t=S.ref({});return{records:e,record:t}});function za(e){const t=S.ref();return S.onMounted(async()=>{var u,a,c;if(e||(e=S.inject("$registry")),!e||!e.router)return;let n;try{n=Ha()}catch{throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable")}t.value=new et(e,n);const r=e.router.currentRoute.value,s=(u=r.params.records)==null?void 0:u.toString().toLowerCase(),o=(a=r.params.record)==null?void 0:a.toString().toLowerCase();if(!s&&!o)return;const i=await((c=e.getMeta)==null?void 0:c.call(e,s));i&&(e.addDoctype(i),t.value.setup(i),s&&(o?await t.value.getRecord(i,o):await t.value.getRecords(i)),t.value.runAction(i,"load",o?[o]:void 0))}),{stonecrop:t}}class Ka{constructor(t,n,r,s,o){P(this,"doctype");P(this,"schema");P(this,"workflow");P(this,"actions");P(this,"component");this.doctype=t,this.schema=n,this.workflow=r,this.actions=s,this.component=o}get slug(){return this.doctype.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}}const De=class De{constructor(t,n){P(this,"name");P(this,"registry");P(this,"router");P(this,"getMeta");if(De._root)return De._root;De._root=this,this.name="Registry",this.registry={},this.router=t,this.getMeta=n}addDoctype(t){t.doctype in Object.keys(this.registry)||(this.registry[t.slug]=t),t.component&&this.router&&!this.router.hasRoute(t.doctype)&&this.router.addRoute({path:`/${t.slug}`,name:t.slug,component:t.component})}};P(De,"_root");let ht=De;function Ga(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var he=Promise.resolve();function Ks(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function Wa(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function cn(){return Math.random().toString(36).substring(2)}var ln=0;function Ke(){var e=Date.now()*1e3;return e<=ln&&(e=ln+1),ln=e,e}var Ya=Ke,qa="native";function Ja(e){var t={time:Ke(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function Xa(e){e.bc.close(),e.subFns=[]}function Za(e,t){try{return e.bc.postMessage(t,!1),he}catch(n){return Promise.reject(n)}}function Qa(e,t){e.messagesCallback=t}function ec(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function tc(){return 150}var nc={create:Ja,close:Xa,onMessage:Qa,postMessage:Za,canBeUsed:ec,type:qa,averageResponseTime:tc,microSeconds:Ya};class Gs{constructor(t){P(this,"ttl");P(this,"map",new Map);P(this,"_to",!1);this.ttl=t}has(t){return this.map.has(t)}add(t){this.map.set(t,Ws()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,rc(this)},0))}clear(){this.map.clear()}}function rc(e){const t=Ws()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const s=r[0];if(r[1]<t)e.map.delete(s);else return}}function Ws(){return Date.now()}function fn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var sc=Ke,oc="pubkey.broadcast-channel-0-",Z="messages",pt={durability:"relaxed"},ic="idb";function Ys(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function dn(e){e.commit&&e.commit()}function uc(e){var t=Ys(),n=oc+e,r=t.open(n);return r.onupgradeneeded=function(s){var o=s.target.result;o.createObjectStore(Z,{keyPath:"id",autoIncrement:!0})},new Promise(function(s,o){r.onerror=function(i){return o(i)},r.onsuccess=function(){s(r.result)}})}function ac(e,t,n){var r=Date.now(),s={uuid:t,time:r,data:n},o=e.transaction([Z],"readwrite",pt);return new Promise(function(i,u){o.oncomplete=function(){return i()},o.onerror=function(c){return u(c)};var a=o.objectStore(Z);a.add(s),dn(o)})}function cc(e,t){var n=e.transaction(Z,"readonly",pt),r=n.objectStore(Z),s=[],o=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var i=r.getAll(o);return new Promise(function(a,c){i.onerror=function(p){return c(p)},i.onsuccess=function(p){a(p.target.result)}})}function u(){try{return o=IDBKeyRange.bound(t+1,1/0),r.openCursor(o)}catch{return r.openCursor()}}return new Promise(function(a,c){var p=u();p.onerror=function(l){return c(l)},p.onsuccess=function(l){var f=l.target.result;f?f.value.id<t+1?f.continue(t+1):(s.push(f.value),f.continue()):(dn(n),a(s))}})}function lc(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(Z,"readwrite",pt),r=n.objectStore(Z);return Promise.all(t.map(function(s){var o=r.delete(s);return new Promise(function(i){o.onsuccess=function(){return i()}})}))}function fc(e,t){var n=Date.now()-t,r=e.transaction(Z,"readonly",pt),s=r.objectStore(Z),o=[];return new Promise(function(i){s.openCursor().onsuccess=function(u){var a=u.target.result;if(a){var c=a.value;c.time<n?(o.push(c),a.continue()):(dn(r),i(o))}else i(o)}})}function dc(e){return fc(e.db,e.options.idb.ttl).then(function(t){return lc(e,t.map(function(n){return n.id}))})}function hc(e,t){return t=fn(t),uc(e).then(function(n){var r={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:cn(),eMIs:new Gs(t.idb.ttl*2),writeBlockPromise:he,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,t.idb.onclose&&t.idb.onclose()},qs(r),r})}function qs(e){e.closed||Js(e).then(function(){return Ks(e.options.idb.fallbackInterval)}).then(function(){return qs(e)})}function pc(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function Js(e){return e.closed||!e.messagesCallback?he:cc(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(r){return!!r}).map(function(r){return r.id>e.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return pc(r,e)}).sort(function(r,s){return r.time-s.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),he})}function _c(e){e.closed=!0,e.db.close()}function gc(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return ac(e.db,e.uuid,t)}).then(function(){Wa(0,10)===0&&dc(e)}),e.writeBlockPromise}function mc(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Js(e)}function Ec(){return!!Ys()}function yc(e){return e.idb.fallbackInterval*2}var vc={create:hc,close:_c,onMessage:mc,postMessage:gc,canBeUsed:Ec,type:ic,averageResponseTime:yc,microSeconds:sc},Sc=Ke,bc="pubkey.broadcastChannel-",Ac="localstorage";function Xs(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Zs(e){return bc+e}function wc(e,t){return new Promise(function(n){Ks().then(function(){var r=Zs(e.channelName),s={token:cn(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(s);Xs().setItem(r,o);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=r,i.newValue=o,window.dispatchEvent(i),n()})})}function Oc(e,t){var n=Zs(e),r=function(o){o.key===n&&t(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function Tc(e){window.removeEventListener("storage",e)}function Ic(e,t){if(t=fn(t),!Qs())throw new Error("BroadcastChannel: localstorage cannot be used");var n=cn(),r=new Gs(t.localstorage.removeTimeout),s={channelName:e,uuid:n,eMIs:r};return s.listener=Oc(e,function(o){s.messagesCallback&&o.uuid!==n&&(!o.token||r.has(o.token)||o.data.time&&o.data.time<s.messagesCallbackTime||(r.add(o.token),s.messagesCallback(o.data)))}),s}function kc(e){Tc(e.listener)}function Cc(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function Qs(){var e=Xs();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function Dc(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var xc={create:Ic,close:kc,onMessage:Cc,postMessage:wc,canBeUsed:Qs,type:Ac,averageResponseTime:Dc,microSeconds:Sc},eo=Ke,Rc="simulate",hn=new Set;function Pc(e){var t={time:eo(),name:e,messagesCallback:null};return hn.add(t),t}function Nc(e){hn.delete(e)}var to=5;function Vc(e,t){return new Promise(function(n){return setTimeout(function(){var r=Array.from(hn);r.forEach(function(s){s.name===e.name&&s!==e&&s.messagesCallback&&s.time<t.time&&s.messagesCallback(t)}),n()},to)})}function Lc(e,t){e.messagesCallback=t}function Mc(){return!0}function Bc(){return to}var $c={create:Pc,close:Nc,onMessage:Lc,postMessage:Vc,canBeUsed:Mc,type:Rc,averageResponseTime:Bc,microSeconds:eo},no=[nc,vc,xc];function Uc(e){var t=[].concat(e.methods,no).filter(Boolean);if(e.type){if(e.type==="simulate")return $c;var n=t.find(function(s){return s.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(s){return s.type!=="idb"}));var r=t.find(function(s){return s.canBeUsed()});if(r)return r;throw new Error("No usable method found in "+JSON.stringify(no.map(function(s){return s.type})))}var ro=new Set,Fc=0,pn=function(t,n){this.id=Fc++,ro.add(this),this.name=t,this.options=fn(n),this.method=Uc(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,jc(this)};pn._pubkey=!0,pn.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return so(this,"message",t)},postInternal:function(t){return so(this,"internal",t)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};uo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,io(this,"message",n)):this._onML=null},addEventListener:function(t,n){var r=this.method.microSeconds(),s={time:r,fn:n};io(this,t,s)},removeEventListener:function(t,n){var r=this._addEL[t].find(function(s){return s.fn===n});uo(this,t,r)},close:function(){var t=this;if(!this.closed){ro.delete(this),this.closed=!0;var n=this._prepP?this._prepP:he;return this._onML=null,this._addEL.message=[],n.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(r){return r()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function so(e,t,n){var r=e.method.microSeconds(),s={time:r,type:t,data:n},o=e._prepP?e._prepP:he;return o.then(function(){var i=e.method.postMessage(e._state,s);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function jc(e){var t=e.method.create(e.name,e.options);Ga(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function oo(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function io(e,t,n){e._addEL[t].push(n),Hc(e)}function uo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),zc(e)}function Hc(e){if(!e._iL&&oo(e)){var t=function(s){e._addEL[s.type].forEach(function(o){s.time>=o.time&&o.fn(s.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function zc(e){if(e._iL&&!oo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function ao(e,t={serialize:JSON.stringify,deserialize:JSON.parse}){return t.deserialize(t.serialize(e))}function Kc(e,t){return Object.keys(t).includes(e)}function Gc({enable:e=!0,initialize:t=!0,type:n,serializer:r}){return({store:s,options:o})=>{var h,d,m;const i=((h=o==null?void 0:o.share)==null?void 0:h.enable)??e,u=((d=o==null?void 0:o.share)==null?void 0:d.omit)??[];if(!i)return;const a=new pn(s.$id,{type:n});let c=0,p=!1;const l=Object.keys(s.$state).filter(g=>!u.includes(g)&&Kc(g,s.$state));a.onmessage=g=>{if(g===void 0){a.postMessage({timestamp:c,state:ao(s.$state,r)});return}g.timestamp<=c||(p=!0,c=g.timestamp,s.$patch(E=>{l.forEach(w=>{E[w]=g.state[w]})}))},(((m=o==null?void 0:o.share)==null?void 0:m.initialize)??t)&&a.postMessage(void 0),s.$subscribe((g,E)=>{p||(c=Date.now(),a.postMessage({timestamp:c,state:ao(E,r)})),p=!1})}}const co=Ba();co.use(Gc({enable:!0,initialize:!0}));const Wc={install:(e,t)=>{const n=e.config.globalProperties.$router,r=n||(t==null?void 0:t.router),s=new ht(r,t==null?void 0:t.getMeta);if(!n&&r&&e.use(r),e.use(co),e.provide("$registry",s),t!=null&&t.components)for(const[o,i]of Object.entries(t.components))e.component(o,i)}};N.DoctypeMeta=Ka,N.Registry=ht,N.Stonecrop=Wc,N.StonecropClass=et,N.useStonecrop=za,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
13
|
+
This will fail in production.`);i=Fe,i._s.has(e)||(o?rn(e,t,r,i):Fo(e,r,i),process.env.NODE_ENV!=="production"&&(s._pinia=i));const c=i._s.get(e);if(process.env.NODE_ENV!=="production"&&u){const p="__hot:"+e,l=o?rn(p,t,r,i,!0):Fo(p,$({},r),i,!0);u._hotUpdate(l),delete i.state.value[p],i._s.delete(p)}if(process.env.NODE_ENV!=="production"&&te){const p=b.getCurrentInstance();if(p&&p.proxy&&!u){const l=p.proxy,f="_pStores"in l?l._pStores:l._pStores={};f[e]=c}}return c}return s.$id=e,s}const Ua=$a("data",()=>{const e=b.ref([]),t=b.ref({});return{records:e,record:t}});function Fa(e){const t=b.ref();return b.onMounted(async()=>{if(e||(e=b.inject("$registry")),!e||!e.router)return;let n;try{n=Ua()}catch{throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable")}t.value=new ye(e,n);const r=e.router.currentRoute.value,o=r.params.records?.toString().toLowerCase(),s=r.params.record?.toString().toLowerCase();if(!o&&!s)return;const i=await e.getMeta?.(o);i&&(e.addDoctype(i),t.value.setup(i),o&&(s?await t.value.getRecord(i,s):await t.value.getRecords(i)),t.value.runAction(i,"load",s?[s]:void 0))}),{stonecrop:t}}class ja{doctype;schema;workflow;actions;component;constructor(t,n,r,o,s){this.doctype=t,this.schema=n,this.workflow=r,this.actions=o,this.component=s}get slug(){return this.doctype.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}}class ke{static _root;name;registry;router;constructor(t,n){if(ke._root)return ke._root;ke._root=this,this.name="Registry",this.registry={},this.router=t,this.getMeta=n}getMeta;addDoctype(t){t.doctype in Object.keys(this.registry)||(this.registry[t.slug]=t),t.component&&this.router&&!this.router.hasRoute(t.doctype)&&this.router.addRoute({path:`/${t.slug}`,name:t.slug,component:t.component})}}function Ha(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var de=Promise.resolve();function jo(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function za(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function on(){return Math.random().toString(36).substring(2)}var sn=0;function He(){var e=Date.now()*1e3;return e<=sn&&(e=sn+1),sn=e,e}var Ka=He,Ga="native";function Wa(e){var t={time:He(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function Ya(e){e.bc.close(),e.subFns=[]}function qa(e,t){try{return e.bc.postMessage(t,!1),de}catch(n){return Promise.reject(n)}}function Ja(e,t){e.messagesCallback=t}function Xa(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function Za(){return 150}var Qa={create:Wa,close:Ya,onMessage:Ja,postMessage:qa,canBeUsed:Xa,type:Ga,averageResponseTime:Za,microSeconds:Ka};class Ho{ttl;map=new Map;_to=!1;constructor(t){this.ttl=t}has(t){return this.map.has(t)}add(t){this.map.set(t,zo()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,ec(this)},0))}clear(){this.map.clear()}}function ec(e){const t=zo()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const o=r[0];if(r[1]<t)e.map.delete(o);else return}}function zo(){return Date.now()}function un(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var tc=He,nc="pubkey.broadcast-channel-0-",X="messages",lt={durability:"relaxed"},rc="idb";function Ko(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function an(e){e.commit&&e.commit()}function oc(e){var t=Ko(),n=nc+e,r=t.open(n);return r.onupgradeneeded=function(o){var s=o.target.result;s.createObjectStore(X,{keyPath:"id",autoIncrement:!0})},new Promise(function(o,s){r.onerror=function(i){return s(i)},r.onsuccess=function(){o(r.result)}})}function sc(e,t,n){var r=Date.now(),o={uuid:t,time:r,data:n},s=e.transaction([X],"readwrite",lt);return new Promise(function(i,u){s.oncomplete=function(){return i()},s.onerror=function(c){return u(c)};var a=s.objectStore(X);a.add(o),an(s)})}function ic(e,t){var n=e.transaction(X,"readonly",lt),r=n.objectStore(X),o=[],s=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var i=r.getAll(s);return new Promise(function(a,c){i.onerror=function(p){return c(p)},i.onsuccess=function(p){a(p.target.result)}})}function u(){try{return s=IDBKeyRange.bound(t+1,1/0),r.openCursor(s)}catch{return r.openCursor()}}return new Promise(function(a,c){var p=u();p.onerror=function(l){return c(l)},p.onsuccess=function(l){var f=l.target.result;f?f.value.id<t+1?f.continue(t+1):(o.push(f.value),f.continue()):(an(n),a(o))}})}function uc(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(X,"readwrite",lt),r=n.objectStore(X);return Promise.all(t.map(function(o){var s=r.delete(o);return new Promise(function(i){s.onsuccess=function(){return i()}})}))}function ac(e,t){var n=Date.now()-t,r=e.transaction(X,"readonly",lt),o=r.objectStore(X),s=[];return new Promise(function(i){o.openCursor().onsuccess=function(u){var a=u.target.result;if(a){var c=a.value;c.time<n?(s.push(c),a.continue()):(an(r),i(s))}else i(s)}})}function cc(e){return ac(e.db,e.options.idb.ttl).then(function(t){return uc(e,t.map(function(n){return n.id}))})}function lc(e,t){return t=un(t),oc(e).then(function(n){var r={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:on(),eMIs:new Ho(t.idb.ttl*2),writeBlockPromise:de,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,t.idb.onclose&&t.idb.onclose()},Go(r),r})}function Go(e){e.closed||Wo(e).then(function(){return jo(e.options.idb.fallbackInterval)}).then(function(){return Go(e)})}function fc(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function Wo(e){return e.closed||!e.messagesCallback?de:ic(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(r){return!!r}).map(function(r){return r.id>e.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return fc(r,e)}).sort(function(r,o){return r.time-o.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),de})}function dc(e){e.closed=!0,e.db.close()}function hc(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return sc(e.db,e.uuid,t)}).then(function(){za(0,10)===0&&cc(e)}),e.writeBlockPromise}function pc(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Wo(e)}function _c(){return!!Ko()}function gc(e){return e.idb.fallbackInterval*2}var mc={create:lc,close:dc,onMessage:pc,postMessage:hc,canBeUsed:_c,type:rc,averageResponseTime:gc,microSeconds:tc},Ec=He,yc="pubkey.broadcastChannel-",vc="localstorage";function Yo(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function qo(e){return yc+e}function Sc(e,t){return new Promise(function(n){jo().then(function(){var r=qo(e.channelName),o={token:on(),time:Date.now(),data:t,uuid:e.uuid},s=JSON.stringify(o);Yo().setItem(r,s);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=r,i.newValue=s,window.dispatchEvent(i),n()})})}function bc(e,t){var n=qo(e),r=function(s){s.key===n&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",r),r}function Ac(e){window.removeEventListener("storage",e)}function wc(e,t){if(t=un(t),!Jo())throw new Error("BroadcastChannel: localstorage cannot be used");var n=on(),r=new Ho(t.localstorage.removeTimeout),o={channelName:e,uuid:n,eMIs:r};return o.listener=bc(e,function(s){o.messagesCallback&&s.uuid!==n&&(!s.token||r.has(s.token)||s.data.time&&s.data.time<o.messagesCallbackTime||(r.add(s.token),o.messagesCallback(s.data)))}),o}function Oc(e){Ac(e.listener)}function Tc(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function Jo(){var e=Yo();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function Ic(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var kc={create:wc,close:Oc,onMessage:Tc,postMessage:Sc,canBeUsed:Jo,type:vc,averageResponseTime:Ic,microSeconds:Ec},Xo=He,Cc="simulate",cn=new Set;function Dc(e){var t={time:Xo(),name:e,messagesCallback:null};return cn.add(t),t}function xc(e){cn.delete(e)}var Zo=5;function Rc(e,t){return new Promise(function(n){return setTimeout(function(){var r=Array.from(cn);r.forEach(function(o){o.name===e.name&&o!==e&&o.messagesCallback&&o.time<t.time&&o.messagesCallback(t)}),n()},Zo)})}function Pc(e,t){e.messagesCallback=t}function Nc(){return!0}function Vc(){return Zo}var Lc={create:Dc,close:xc,onMessage:Pc,postMessage:Rc,canBeUsed:Nc,type:Cc,averageResponseTime:Vc,microSeconds:Xo},Qo=[Qa,mc,kc];function Mc(e){var t=[].concat(e.methods,Qo).filter(Boolean);if(e.type){if(e.type==="simulate")return Lc;var n=t.find(function(o){return o.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(o){return o.type!=="idb"}));var r=t.find(function(o){return o.canBeUsed()});if(r)return r;throw new Error("No usable method found in "+JSON.stringify(Qo.map(function(o){return o.type})))}var es=new Set,Bc=0,ln=function(t,n){this.id=Bc++,es.add(this),this.name=t,this.options=un(n),this.method=Mc(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,$c(this)};ln._pubkey=!0,ln.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return ts(this,"message",t)},postInternal:function(t){return ts(this,"internal",t)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};os(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,rs(this,"message",n)):this._onML=null},addEventListener:function(t,n){var r=this.method.microSeconds(),o={time:r,fn:n};rs(this,t,o)},removeEventListener:function(t,n){var r=this._addEL[t].find(function(o){return o.fn===n});os(this,t,r)},close:function(){var t=this;if(!this.closed){es.delete(this),this.closed=!0;var n=this._prepP?this._prepP:de;return this._onML=null,this._addEL.message=[],n.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(r){return r()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function ts(e,t,n){var r=e.method.microSeconds(),o={time:r,type:t,data:n},s=e._prepP?e._prepP:de;return s.then(function(){var i=e.method.postMessage(e._state,o);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function $c(e){var t=e.method.create(e.name,e.options);Ha(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function ns(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function rs(e,t,n){e._addEL[t].push(n),Uc(e)}function os(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),Fc(e)}function Uc(e){if(!e._iL&&ns(e)){var t=function(o){e._addEL[o.type].forEach(function(s){o.time>=s.time&&s.fn(o.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function Fc(e){if(e._iL&&!ns(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function ss(e,t={serialize:JSON.stringify,deserialize:JSON.parse}){return t.deserialize(t.serialize(e))}function jc(e,t){return Object.keys(t).includes(e)}function Hc({enable:e=!0,initialize:t=!0,type:n,serializer:r}){return({store:o,options:s})=>{const i=s?.share?.enable??e,u=s?.share?.omit??[];if(!i)return;const a=new ln(o.$id,{type:n});let c=0,p=!1;const l=Object.keys(o.$state).filter(d=>!u.includes(d)&&jc(d,o.$state));a.onmessage=d=>{if(d===void 0){a.postMessage({timestamp:c,state:ss(o.$state,r)});return}d.timestamp<=c||(p=!0,c=d.timestamp,o.$patch(h=>{l.forEach(m=>{h[m]=d.state[m]})}))},(s?.share?.initialize??t)&&a.postMessage(void 0),o.$subscribe((d,h)=>{p||(c=Date.now(),a.postMessage({timestamp:c,state:ss(h,r)})),p=!1})}}const is=Va();is.use(Hc({enable:!0,initialize:!0}));const zc={install:(e,t)=>{const n=e.config.globalProperties.$router,r=n||t?.router,o=new ke(r,t?.getMeta);if(!n&&r&&e.use(r),e.use(is),e.provide("$registry",o),t?.components)for(const[s,i]of Object.entries(t.components))e.component(s,i)}};j.DoctypeMeta=ja,j.Registry=ke,j.Stonecrop=zc,j.StonecropClass=ye,j.useStonecrop=Fa,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
|
|
14
14
|
//# sourceMappingURL=stonecrop.umd.cjs.map
|