PageSourceSearch

https://mijnomgeving.parool.nl/_next/static/chunks/7579-d414eee54099a109.js

js parool.nl collected 2026-09-24 08:28:39 UTC 44,950 bytes, 3 lines download raw bytes

1!function(){try{var t="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[(new t.Error).stack]=function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];if(null!=s)for(var n in s)s.hasOwnProperty(n)&&(t[n]=s[n])}return t}({},t._sentryModuleMetadata[(new t.Error).stack],{"_sentryBundlerPluginAppKey:dpg-media-services-csa":!0});var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="04e333e2-0dd8-4d74-a8b5-affa0ad39d79",t._sentryDebugIdIdentifier="sentry-dbid-04e333e2-0dd8-4d74-a8b5-affa0ad39d79")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7579],{7203:(t,e,s)=>{s(65675)},13833:(t,e,s)=>{s.d(e,{a:()=>c,e:()=>y,l:()=>m,s:()=>d});var n,i=s(75953),r=s(15831);function o(t,e,s,n,{event:i}){return[e,{event:"function"==typeof i?i(s,n):i},void 0]}function a(t,{event:e}){t.defer(()=>t.emit(e))}function c(t){function e(t,e){}return e.type="xstate.emit",e.event=t,e.resolve=o,e.execute=a,e}let u=((n={}).Parent="#_parent",n.Internal="#_internal",n);function h(t,e,s,n,{to:i,event:r,id:o,delay:a},c){let l,f,d=e.machine.implementations.delays;if("string"==typeof r)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${r}" }) instead`);let p="function"==typeof r?r(s,n):r;if("string"==typeof a){let t=d&&d[a];l="function"==typeof t?t(s,n):t}else l="function"==typeof a?a(s,n):a;let y="function"==typeof i?i(s,n):i;if("string"==typeof y){if(!(f=y===u.Parent?t.self._parent:y===u.Internal?t.self:y.startsWith("#_")?e.children[y.slice(2)]:c.deferredActorIds?.includes(y)?y:e.children[y]))throw Error(`Unable to send event to actor '${y}' from machine '${e.machine.id}'.`)}else f=y||t.self;return[e,{to:f,targetId:"string"==typeof y?y:void 0,event:p,id:o,delay:l},void 0]}function l(t,e,s){"string"==typeof s.to&&(s.to=e.children[s.to])}function f(t,e){t.defer(()=>{let{to:s,event:n,delay:r,id:o}=e;"number"==typeof r?t.system.scheduler.schedule(t.self,s,n,r,o):t.system._relay(t.self,s,n.type===i.Z?(0,i._)(t.self.id,n.data):n)})}function d(t,e,s){function n(t,e){}return n.type="xstate.sendTo",n.to=t,n.event=e,n.id=s?.id,n.delay=s?.delay,n.resolve=h,n.retryResolve=l,n.execute=f,n}function p(t,e,s,n,{collect:o}){let a=[],h=function(t){a.push(t)};return h.assign=(...t)=>{a.push((0,r.a)(...t))},h.cancel=(...t)=>{a.push((0,i.b)(...t))},h.raise=(...t)=>{a.push((0,i.r)(...t))},h.sendTo=(...t)=>{a.push(d(...t))},h.sendParent=(...t)=>{a.push(function(t,e){return d(u.Parent,t,e)}(...t))},h.spawnChild=(...t)=>{a.push((0,i.d)(...t))},h.stopChild=(...t)=>{a.push((0,i.s)(...t))},h.emit=(...t)=>{a.push(c(...t))},o({context:s.context,event:s.event,enqueue:h,check:t=>(0,i.E)(t,e.context,s.event,e),self:t.self,system:t.system},n),[e,void 0,a]}function y(t){function e(t,e){}return e.type="xstate.enqueueActions",e.collect=t,e.resolve=p,e}function g(t,e,s,n,{value:i,label:r}){return[e,{value:"function"==typeof i?i(s,n):i,label:r},void 0]}function v({logger:t},{value:e,label:s}){s?t(s,e):t(e)}function m(t=({context:t,event:e})=>({context:t,event:e}),e){function s(t,e){}return s.type="xstate.log",s.value=t,s.label=e,s.resolve=g,s.execute=v,s}},15831:(t,e,s)=>{s.d(e,{a:()=>r});var n=s(75953);function i(t,e,s,r,{assignment:o}){if(!e.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let a={},c={context:e.context,event:s.event,spawn:function(t,{machine:e,context:s},i,r){return(o,a)=>{let c=((o,a)=>{if("string"!=typeof o)return(0,n.c)(o,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:a?.input,src:o,systemId:a?.systemId});{let c=(0,n.Y)(e,o);if(!c)throw Error(`Actor logic '${o}' not implemented in machine '${e.id}'`);let u=(0,n.c)(c,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:"function"==typeof a?.input?a.input({context:s,event:i,self:t.self}):a?.input,src:o,systemId:a?.systemId});return r[u.id]=u,u}})(o,a);return r[c.id]=c,t.defer(()=>{c._processingStatus!==n.a0.Stopped&&c.start()}),c}}(t,e,s.event,a),self:t.self,system:t.system},u={};if("function"==typeof o)u=o(c,r);else for(let t of Object.keys(o)){let e=o[t];u[t]="function"==typeof e?e(c,r):e}let h=Object.assign({},e.context,u);return[(0,n.R)(e,{context:h,children:Object.keys(a).length?{...e.children,...a}:e.children}),void 0,void 0]}function r(t){function e(t,e){}return e.type="xstate.assign",e.assignment=t,e.resolve=i,e}},16328:(t,e,s)=>{s.d(e,{zl:()=>c});var n=s(55729),i=s(68958),r=s(75953);s(7203);var o=s(27133);let a=(t,e)=>{e(t);let s=t.getSnapshot().children;
1s&&Object.values(s).forEach(t=>{a(t,e)})};function c(t,...[e]){return function(t,...[e]){let s=function(t,...[e]){let[[s,o],a]=(0,n.useState)(()=>{let s=(0,r.c)(t,e);return[t.config,s]});if(t.config!==s){let s=(0,r.c)(t,{...e,snapshot:o.getPersistedSnapshot({__unsafeAllowInlineActors:!0})});a([t.config,s]),o=s}return(0,i.A)(()=>{o.logic.implementations=t.implementations}),o}(t,e),c=(0,n.useCallback)(()=>s.getSnapshot(),[s]),u=(0,n.useCallback)(t=>{let{unsubscribe:e}=s.subscribe({next:t,error:t});return e},[s]),h=(0,o.useSyncExternalStore)(u,c,c),l="status"in h?h:void 0;if(l?.status==="error")throw l.error;return(0,n.useEffect)(()=>(s.start(),()=>{let t,e;t=[],a(s,e=>{t.push([e,e.getSnapshot()]),e.observers=new Set}),e=s.system.getSnapshot?.(),s.stop(),s.system._snapshot=e,t.forEach(([t,e])=>{t._processingStatus=0,t._snapshot=e})}),[s]),[h,s.send,s]}(t,e)}},17322:(t,e,s)=>{s.d(e,{P:()=>r});var n=s(49483),i=s(32523);function r(t,e,s){let r=(0,i.a)(t,s?.in);if(isNaN(e))return(0,n.w)(s?.in||t,NaN);if(!e)return r;let o=r.getDate(),a=(0,n.w)(s?.in||t,r.getTime());return(a.setMonth(r.getMonth()+e+1,0),o>=a.getDate())?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}},27133:(t,e,s)=>{t.exports=s(85596)},41535:(t,e,s)=>{s.d(e,{SP:()=>r,Sx:()=>u});var n=s(75953);let i=new WeakMap;function r(t){return{config:t,start:(e,s)=>{let{self:n,system:r,emit:o}=s,a={receivers:void 0,dispose:void 0};i.set(n,a),a.dispose=t({input:e.input,system:r,self:n,sendBack:t=>{"stopped"!==n.getSnapshot().status&&n._parent&&r._relay(n,n._parent,t)},receive:t=>{a.receivers??=new Set,a.receivers.add(t)},emit:o})},transition:(t,e,s)=>{let r=i.get(s.self);return e.type===n.X?(t={...t,status:"stopped",error:void 0},i.delete(s.self),r.receivers?.clear(),r.dispose?.()):r.receivers?.forEach(t=>t(e)),t},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}let o="xstate.promise.resolve",a="xstate.promise.reject",c=new WeakMap;function u(t){return{config:t,transition:(t,e,s)=>{if("active"!==t.status)return t;switch(e.type){case o:{let s=e.data;return{...t,status:"done",output:s,input:void 0}}case a:return{...t,status:"error",error:e.data,input:void 0};case n.X:return c.get(s.self)?.abort(),c.delete(s.self),{...t,status:"stopped",input:void 0};default:return t}},start:(e,{self:s,system:n,emit:i})=>{if("active"!==e.status)return;let r=new AbortController;c.set(s,r),Promise.resolve(t({input:e.input,system:n,self:s,signal:r.signal,emit:i})).then(t=>{"active"===s.getSnapshot().status&&(c.delete(s),n._relay(s,s,{type:o,data:t}))},t=>{"active"===s.getSnapshot().status&&(c.delete(s),n._relay(s,s,{type:a,data:t}))})},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}},46887:(t,e,s)=>{function n(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)"__proto__"!==n&&(t[n]=s[n])}return t}s.d(e,{A:()=>i});var i=function t(e,s){function i(t,i,r){if("u">typeof document){"number"==typeof(r=n({},s,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in r)r[a]&&(o+="; "+a,!0!==r[a]&&(o+="="+r[a].split(";")[0]));return document.cookie=t+"="+e.write(i,t)+o}}return Object.create({set:i,get:function(t){if("u">typeof document&&(!arguments.length||t)){for(var s=document.cookie?document.cookie.split("; "):[],n={},i=0;i<s.length;i++){var r=s[i].split("="),o=r.slice(1).join("=");try{var a=decodeURIComponent(r[0]);if(a in n||(n[a]=e.read(o,a)),t===a)break}catch(t){}}return t?n[t]:n}},remove:function(t,e){i(t,"",n({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,n({},this.attributes,e))},withConverter:function(e){return t(n({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decode
1URIComponent)}},{path:"/"})},49897:(t,e,s)=>{s.d(e,{W:()=>a});var n=s(37490),i=s(17322),r=s(49483),o=s(32523);function a(t,e,s){let{years:a=0,months:c=0,weeks:u=0,days:h=0,hours:l=0,minutes:f=0,seconds:d=0}=e,p=(0,o.a)(t,s?.in),y=c||a?(0,i.P)(p,c+12*a):p,g=h||u?(0,n.f)(y,h+7*u):y;return(0,r.w)(s?.in||t,+g+1e3*(d+60*(f+60*l)))}},65675:(t,e,s)=>{var n=s(55729);s(27133).useSyncExternalStore,n.useRef,n.useEffect,n.useMemo,n.useDebugValue},75953:(t,e,s)=>{var n;s.d(e,{$:()=>A,B:()=>tn,C:()=>b,D:()=>ts,E:()=>q,F:()=>E,G:()=>te,H:()=>tr,I:()=>tt,J:()=>ti,K:()=>tI,L:()=>K,M:()=>tT,N:()=>o,O:()=>Q,P:()=>function t(e,s,n,i){if("string"==typeof s){let t;return(t=th(e,s).next(n,i))&&t.length?t:e.next(n,i)}if(1===Object.keys(s).length){let r,o;return(o=t(th(e,(r=Object.keys(s))[0]),s[r[0]],n,i))&&o.length?o:e.next(n,i)}let r=[];for(let o of Object.keys(s)){let a=s[o];if(!a)continue;let c=t(th(e,o),a,n,i);c&&r.push(...c)}return r.length?r:e.next(n,i)},Q:()=>tx,R:()=>tC,S:()=>r,T:()=>y,U:()=>Z,V:()=>tl,W:()=>tN,X:()=>u,Y:()=>k,Z:()=>c,_:()=>l,a0:()=>M,b:()=>P,c:()=>N,d:()=>z,e:()=>tw,f:()=>f,g:()=>tm,m:()=>I,q:()=>tf,r:()=>tP,s:()=>L,t:()=>m,z:()=>v});class i{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){let e={value:t,next:null};if(this._current){this._last.next=e,this._last=e;return}this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){let t=this._current;this._process(t.value),this._current=t.next}this._last=null}}let r=".",o="",a="xstate.init",c="xstate.error",u="xstate.stop";function h(t,e){return{type:`xstate.done.state.${t}`,output:e}}function l(t,e){return{type:`xstate.error.actor.${t}`,error:e,actorId:t}}function f(t){return{type:a,input:t}}function d(t){setTimeout(()=>{throw t})}let p="function"==typeof Symbol&&Symbol.observable||"@@observable";function y(t){if(S(t))return t;let e=[],s="";for(let n=0;n<t.length;n++){switch(t.charCodeAt(n)){case 92:s+=t[n+1],n++;continue;case 46:e.push(s),s="";continue}s+=t[n]}return e.push(s),e}function g(t){var e;return(e=t)&&"object"==typeof e&&"machine"in e&&"value"in e?t.value:"string"!=typeof t?t:function(t){if(1===t.length)return t[0];let e={},s=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)s[t[e]]=t[e+1];else{let n=s;s={},n[t[e]]=s}return e}(y(t))}function v(t,e){let s={},n=Object.keys(t);for(let i=0;i<n.length;i++){let r=n[i];s[r]=e(t[r],r,t,i)}return s}function m(t){var e;return void 0===t?[]:S(e=t)?e:[e]}function _(t,e,s,n){return"function"==typeof t?t({context:e,event:s,self:n}):t}function S(t){return Array.isArray(t)}function b(t){var e;return(S(e=t)?e:[e]).map(t=>void 0===t||"string"==typeof t?{target:t}:t)}function x(t){if(void 0!==t&&""!==t)return m(t)}function w(t,e,s){let n="object"==typeof t,i=n?t:void 0;return{next:(n?t.next:t)?.bind(i),error:(n?t.error:e)?.bind(i),complete:(n?t.complete:s)?.bind(i)}}function E(t,e){return`${e}.${t}`}function k(t,e){let s=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!s)return t.implementations.actors[e];let[,n,i]=s,r=t.getStateNodeById(i).config.invoke;return(Array.isArray(r)?r[n]:r).src}function I(t,e){if(e===t||"*"===e)return!0;if(!e.endsWith(".*"))return!1;let s=e.split("."),n=t.split(".");for(let t=0;t<s.length;t++){let e=s[t],i=n[t];if("*"===e)return t===s.length-1;if(e!==i)return!1}return!0}function $(t,e){return`${t.sessionId}.${e}`}let j=0,O=!1,A=1,M=((n={})[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped",n),T={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class C{constructor(t,e){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new i(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 s={...T,...e},{clock:n,logger:r,parent:o,syncSnapshot:a,id:c,systemId:u,inspect:h}=s;this.system=o?o.system:function(t,e){let s=new Map,n=new Map,i=new WeakMap,r=new Set,o={},{clock:a,logger:c}=e,u={schedule:(t,e,s,n,i=Math.random().toString(36).slice(2))=>{let r={source:t,target:e,event:s,delay:n,id:i,startedAt:Date.now()},c=$(t,i);h._snapshot._scheduledEvents[c]=r;let u=a.setTimeout(()=>{delete o[c],delete h._snapshot._scheduledEvents[c],h._relay(t,e,s)},n);o[c]=u},cancel:(t,e)=>{let s=$(t,e),n=o[s];delete o[s],delete h._snapshot._scheduledEvents[s],void 0!==n&&a.clearTimeout(n)},cancelAll:t=>{for(let e in h._snapshot._scheduledEvents){let s=h._snapshot._scheduledEvents[e];s.source===t&&u.cancel(t,s.id)}}},h={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${j++}`,_register:(t,e)=>(s.set(t,e),t),_unregister:t=>{s.delete(t.sessionId);let e=i.get(t);void 0!==e&&(n.delete(e),i.delete(t))},get:t=>n.get(t),getAll:()=>Object.fromEntries(n.entries()),_set:(t,e)=>{let s=n.get(t);if(s&&s!==e)throw Error(`Actor with system ID '${t}' already exists.`);n.set(t,e),i.set(e,t)},inspect:t=>{let e=w(t);return r.add(e),{unsubscribe(){r.delete(e)}}},_sendInspectionEvent:e=>{if(!r.size)return;let s={...e,rootId:t.sessionId};r.forEach(t=>t.next?.(s))},_relay:(t,e,s)=>{h._sendInspectionEvent({type:"@xstate.event",sourceRef:t,actorRef:e,event:s}),e._send(s)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...h._snapshot._scheduledEvents}}),start:()=>{let t=h._snapshot._scheduledEvents;for(let e in h._snapshot._scheduledEvents={},t){let{source:s,target:n,event:i,delay:r,id:o}=t[e];u.schedule(s,n,i,r,o)}},_clock:a,_logger:c};return h}(this,{clock:n,logger:r}),h&&!o&&this.system.inspect(w(h)),this.sessionId=this.system._bookId(),this.id=c??this.sessionId,this.logger=e?.logger??this.system._logger,this.clock=e?.clock??this.system._clock,this._parent=o,this._syncSnapshot=a,this.options=s,this.src=s.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:t=>{this._deferred.push(t)},system:this.system,stopChild:t=>{if(t._parent!==this)throw Error(`Cannot stop child actor ${t.id} of ${this.id} because it is not a child`);t._stop()},emit:t=>{let e=this.eventListeners.get(t.type),s=this.eventListeners.get("*");if(e||s)for(let n of[...e?e.values():[],...s?s.values():[]])try{n(t)}catch(t){d(t)}},actionExecutor:t=>{let e=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:t.type,params:t.params}}),!t.exec)return;let e=O;try{O=!0,t.exec(t.info,t.params)}finally{O=e}};this._processingStatus===M.Running?e():this._deferred.push(e)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),u&&(this.systemId=u,this.system._set(u,this)),this._initState(e?.snapshot??e?.state),u&&"active"!==this._snapshot.status&&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(t){this._snapshot={status:"error",output:void 0,error:t}}}update(t,e){let s;for(this._snapshot=t;s=this._deferred.shift();)try{s()}catch(e){this._deferred.length=0,this._snapshot={...t,status:"error",error:e}}switch(this._snapshot.status){case"active":for(let e of this.observers)try{e.
1next?.(t)}catch(t){d(t)}break;case"done":var n;for(let e of this.observers)try{e.next?.(t)}catch(t){d(t)}this._stopProcedure(),this._complete(),this._doneEvent=(n=this.id,{type:`xstate.done.actor.${n}`,output:this._snapshot.output,actorId:n}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:e,snapshot:t})}subscribe(t,e,s){let n=w(t,e,s);if(this._processingStatus!==M.Stopped)this.observers.add(n);else switch(this._snapshot.status){case"done":try{n.complete?.()}catch(t){d(t)}break;case"error":{let t=this._snapshot.error;if(n.error)try{n.error(t)}catch(t){d(t)}else d(t)}}return{unsubscribe:()=>{this.observers.delete(n)}}}on(t,e){let s=this.eventListeners.get(t);s||(s=new Set,this.eventListeners.set(t,s));let n=e.bind(void 0);return s.add(n),{unsubscribe:()=>{s.delete(n)}}}select(t,e=Object.is){return{subscribe:s=>{let n=w(s),i=t(this.getSnapshot());return this.subscribe(s=>{let r=t(s);e(i,r)||(i=r,n.next?.(r))})},get:()=>t(this.getSnapshot())}}start(){if(this._processingStatus===M.Running)return this;this._syncSnapshot&&this.subscribe({next:t=>{"active"===t.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:t})},error:()=>{}}),this.system._register(this.sessionId,this),this.systemId&&this.system._set(this.systemId,this),this._processingStatus=M.Running;let t=f(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(t){return this._snapshot={...this._snapshot,status:"error",error:t},this._error(t),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let e,s;try{e=this.logic.transition(this._snapshot,t,this._actorScope)}catch(t){s={err:t}}if(s){let{err:t}=s;this._snapshot={...this._snapshot,status:"error",error:t},this._error(t);return}this.update(e,t),t.type===u&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===M.Stopped||((this.mailbox.clear(),this._processingStatus===M.NotStarted)?this._processingStatus=M.Stopped:this.mailbox.enqueue({type:u})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let t of this.observers)try{t.complete?.()}catch(t){d(t)}this.observers.clear(),this.eventListeners.clear()}_reportError(t){if(!this.observers.size){this._parent||d(t),this.eventListeners.clear();return}let e=!1;for(let s of this.observers){let n=s.error;e||=!n;try{n?.(t)}catch(t){d(t)}}this.observers.clear(),this.eventListeners.clear(),e&&d(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,l(this.id,t))}_stopProcedure(){return this._processingStatus!==M.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new i(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(){let{devTools:t}=this.options;t&&("function"==typeof t?t:t=>{if("u"<typeof window)return;let e=function(){let t="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:void 0!==s.g?s.g:void 0;if(t.__xstate__)return t.__xstate__}();e&&e.register(t)})(this)}toJSON(){return{xstate$$type:A,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[p](){return this}getSnapshot(){return this._snapshot}}function N(t,...[e]){return new C(t,e)}function R(t,e,s,n,{sendId:i}){return[e,{sendId:"function"==typeof i?i(s,n):i},void 0]}function D(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function P(t){function e(t,e){}return e.type="xstate.cancel",e.sendId=t,e.resolve=R,e.execute=D,e}function B(t,e,s,n,{id:i,systemId:r,src:o,input:a,syncSnapshot:c}){let u,h,l="string"==typeof o?k(e.machine,o):o,f="function"==typeof i?i(s):i;return l&&(h="function"==typeof a?a({context:e.context,event:s.event,self:t.self}
1):a,u=N(l,{id:f,src:o,parent:t.self,syncSnapshot:c,systemId:r,input:h})),[tC(e,{children:{...e.children,[f]:u}}),{id:i,systemId:r,actorRef:u,src:o,input:h},void 0]}function V(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==M.Stopped&&e.start()})}function z(...[t,{id:e,systemId:s,input:n,syncSnapshot:i=!1}={}]){function r(t,e){}return r.type="xstate.spawnChild",r.id=e,r.systemId=s,r.src=t,r.input=n,r.syncSnapshot=i,r.resolve=B,r.execute=V,r}function U(t,e,s,n,{actorRef:i}){let r="function"==typeof i?i(s,n):i,o="string"==typeof r?e.children[r]:r,a=e.children;return o&&(a={...a},delete a[o.id]),[tC(e,{children:a}),o,void 0]}function J(t,e){if(e){if(!function t(e,s){let n=s.getSnapshot();if(n&&"children"in n)for(let s of Object.values(n.children))t(e,s);e.system._unregister(s)}(t,e),e._processingStatus!==M.Running)return void t.stopChild(e);t.defer(()=>{t.stopChild(e)})}}function L(t){function e(t,e){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=U,e.execute=J,e}function W(t,{context:e,event:s},{guards:n}){return n.every(n=>q(n,e,s,t))}function q(t,e,s,n){let{machine:i}=n,r="function"==typeof t,o=r?t:i.implementations.guards["string"==typeof t?t:t.type];if(!r&&!o)throw Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof o)return q(o,e,s,n);let a={context:e,event:s},c=r||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:e,event:s}):t.params:void 0;return"check"in o?o.check(n,a,o):o(a,c)}function F(t){return"atomic"===t.type||"final"===t.type}function Y(t){return Object.values(t.states).filter(t=>"history"!==t.type)}function G(t,e){let s=[];if(e===t)return s;let n=t.parent;for(;n&&n!==e;)s.push(n),n=n.parent;return s}function K(t){let e=new Set(t),s=X(e);for(let t of e)if("compound"!==t.type||s.get(t)&&s.get(t).length){if("parallel"===t.type){for(let s of Y(t))if("history"!==s.type&&!e.has(s))for(let t of tc(s))e.add(t)}}else tc(t).forEach(t=>e.add(t));for(let t of e){let s=t.parent;for(;s;)e.add(s),s=s.parent}return e}function X(t){let e=new Map;for(let s of t)e.has(s)||e.set(s,[]),s.parent&&(e.has(s.parent)||e.set(s.parent,[]),e.get(s.parent).push(s));return e}function H(t,e){return function t(e,s){let n=s.get(e);if(!n)return{};if("compound"===e.type){let t=n[0];if(!t)return{};if(F(t))return t.key}let i={};for(let e of n)i[e.key]=t(e,s);return i}(t,X(K(e)))}function Q(t,e){return"compound"===e.type?Y(e).some(e=>"final"===e.type&&t.has(e)):"parallel"===e.type?Y(e).every(e=>Q(t,e)):"final"===e.type}let Z=t=>"#"===t[0];function tt(t,e){let s=t.transitions.get(e),n=[...t.transitions.keys()].filter(t=>t!==e&&I(e,t)).sort((t,e)=>e.length-t.length).flatMap(e=>t.transitions.get(e));return s?[...s,...n]:n}function te(t){let e=t.config.after;return e?Object.keys(e).flatMap(s=>{var n;let i,r,o=e[s],a=Number.isNaN(+s)?s:+s,c=(n=t.id,r=(i={type:`xstate.after.${a}.${n}`}).type,t.entry.push(tP(i,{id:r,delay:a})),t.exit.push(P(r)),r);return m("string"==typeof o?{target:o}:o).map(t=>({...t,event:c,delay:a}))}).map(e=>{let{delay:s}=e;return{...ts(t,e.event,e),delay:s}}):[]}function ts(t,e,s){let n=x(s.target),i=s.reenter??!1,o=function(t,e){if(void 0!==e)return e.map(e=>{if("string"!=typeof e)return e;if(Z(e))return t.machine.getStateNodeById(e);let s=e[0]===r;if(s&&!t.parent)return tl(t,e.slice(1));let n=s?t.key+e:e;if(t.parent)try{return tl(t.parent,n)}catch(e){throw Error(`Invalid transition definition for state node '${t.id}':
2${e.message}`)}throw Error(`Invalid target: "${e}" is not a valid target from the root node. Did you mean ".${e}"?`)})}(t,n),a={...s,actions:m(s.actions),guard:s.guard,target:o,source:t,reenter:i,eventType:e,toJSON:()=>({...a,source:`#${t.id}`,target:o?o.map(t=>`#${t.id}`):void 0})};return a}function tn(t){let e=new Map;if(t.config.on)for(let s of Object.keys(t.config.on)){if(s===o)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let n=t.config.on[s];e.set(s,b(n).map(e=>ts(t,s,e)))}if(t.config.onDone){let s=`xstate.done.state.${t.id}`;e.set(s,b(t.config.onDone).map(e=>ts(t,s,e)))}for(let s of t.invoke){if(s.onDone){let n=`xstate.done.actor.${s.id}`;e.set(n,b(s.onDone).map(e=>ts(t,n,e)))}if(s.onError){let n=`xstate.error.actor.${s.id}`;e.set(n,b(s.onError).map(e=>ts(t,n,e)))}if(s.onSnapshot){let n=`xstate.snapshot.${s.id}`;e.set(n,b(s.onSnapshot).map(e=>ts(t,n,e)))}}for(let s of t.after){let t=e.get(s.eventType);t||(t=[],e.set(s.eventType,t)),t.push(s)}return e}function ti(t){let e=[],s=n=>
2{Object.values(n).forEach(n=>{if(n.config.route&&n.config.id){let s=n.config.id,i=n.config.route.guard,r=({event:t})=>t.to===`#${s}`,o={...n.config.route,guard:i?function(t){function e(t,e){return!1}return e.check=W,e.guards=t,e}([r,i]):r,target:`#${s}`};e.push(ts(t,"xstate.route",o))}n.states&&s(n.states)})};s(t.states),e.length>0&&t.transitions.set("xstate.route",e)}function tr(t,e){let s="string"==typeof e?t.states[e]:e?t.states[e.target]:void 0;if(!s&&e)throw Error(`Initial state node "${e}" not found on parent state node #${t.id}`);let n={source:t,actions:e&&"string"!=typeof e?m(e.actions):[],eventType:null,reenter:!1,target:s?[s]:[],toJSON:()=>({...n,source:`#${t.id}`,target:s?[`#${s.id}`]:[]})};return n}function to(t){let e=x(t.config.target);return e?{target:e.map(e=>"string"==typeof e?tl(t.parent,e):e)}:"parallel"===t.parent.type?{target:[t.parent]}:t.parent.initial}function ta(t){return"history"===t.type}function tc(t){let e=tu(t);for(let s of e)for(let n of G(s,t))e.add(n);return e}function tu(t){let e=new Set;return!function t(s){if(!e.has(s)){if(e.add(s),"compound"===s.type)t(s.initial.target[0]);else if("parallel"===s.type)for(let e of Y(s))t(e)}}(t),e}function th(t,e){if(Z(e))return t.machine.getStateNodeById(e);if(!t.states)throw Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);let s=t.states[e];if(!s)throw Error(`Child state '${e}' does not exist on '${t.id}'`);return s}function tl(t,e){if("string"==typeof e&&Z(e))try{return t.machine.getStateNodeById(e)}catch{}let s=y(e).slice(),n=t;for(;s.length;){let t=s.shift();if(!t.length)break;n=th(n,t)}return n}function tf(t,e){if("string"==typeof e){let s=t.states[e];if(!s)throw Error(`State '${e}' does not exist on '${t.id}'`);return[t,s]}let s=Object.keys(e),n=s.map(e=>th(t,e)).filter(Boolean);return[t.machine.root,t].concat(n,s.reduce((s,n)=>{let i=th(t,n);if(!i)return s;let r=tf(i,e[n]);return s.concat(r)},[]))}function td(t,e){let s=t;for(;s.parent&&s.parent!==e;)s=s.parent;return s.parent===e}function tp(t,e,s){let n=new Set;for(let i of t){let t=!1,r=new Set;for(let o of n)if(function(t,e){let s=new Set(t),n=new Set(e);for(let t of s)if(n.has(t))return!0;for(let t of n)if(s.has(t))return!0;return!1}(tv([i],e,s),tv([o],e,s)))if(td(i.source,o.source))r.add(o);else{t=!0;break}if(!t){for(let t of r)n.delete(t);n.add(i)}}return Array.from(n)}function ty(t,e){if(!t.target)return[];let s=new Set;for(let n of t.target)if(ta(n))if(e[n.id])for(let t of e[n.id])s.add(t);else for(let t of ty(to(n),e))s.add(t);else s.add(n);return[...s]}function tg(t,e){let s=ty(t,e);if(!s)return;if(!t.reenter&&s.every(e=>e===t.source||td(e,t.source)))return t.source;let n=function(t){let[e,...s]=t;for(let t of G(e,void 0))if(s.every(e=>td(e,t)))return t}(s.concat(t.source));return n||(t.reenter?void 0:t.source.machine.root)}function tv(t,e,s){let n=new Set;for(let i of t)if(i.target?.length){let t=tg(i,s);for(let s of(i.reenter&&i.source===t&&n.add(t),e))td(s,t)&&n.add(s)}return[...n]}function tm(t,e,s,n,i){return t_([{target:[...tu(t)],source:t,reenter:!0,actions:[],eventType:null,toJSON:null}],e,s,n,!0,i)}function t_(t,e,s,n,i,r){let o=[];if(!t.length)return[e,o];let a=s.actionExecutor;s.actionExecutor=t=>{o.push(t),a(t)};try{let a=new Set(e._nodes),c=e.historyValue,u=tp(t,a,c),l=e;i||([l,c]=function(t,e,s,n,i,r,o,a){let c,u=t,h=tv(n,i,r);for(let t of(h.sort((t,e)=>e.order-t.order),h))for(let e of function(t){return Object.keys(t.states).map(e=>t.states[e]).filter(t=>"history"===t.type)}(t)){let s;s="deep"===e.history?e=>F(e)&&td(e,t):e=>e.parent===t,(c??={...r})[e.id]=Array.from(i).filter(s)}for(let t of h)u=tx(u,e,s,[...t.exit,...t.invoke.map(t=>L(t.id))],o,void 0),i.delete(t);return[u,c||r]}(l,n,s,u,a,c,r,s.actionExecutor)),l=tx(l,n,s,u.flatMap(t=>t.actions),r,void 0),l=function(t,e,s,n,i,r,o,a){let c=t,u=new Set,l=new Set;(function(t,e,s,n){for(let i of t){let t=tg(i,e);for(let r of i.target||[])!ta(r)&&(i.source!==r||i.source!==t||i.reenter)&&(n.add(r),s.add(r)),tS(r,e,s,n);for(let r of ty(i,e)){let o=G(r,t);t?.type==="parallel"&&o.push(t),tb(n,e,s,o,!i.source.parent&&i.reenter?void 0:t)}}})(n,o,l,u),a&&l.add(t.machine.root);let f=new Set;for(let t of[...u].sort((t,e)=>t.order-e.order)){i.add(t);let n=[];for(let e of(n.push(...t.entry),t.invoke))n.push(z(e.src,{...e,syncSnapshot:!!e.onSnapshot}));if(l.has(t)){let e=t.initial.actions;n.push(...e)}if(c=tx(c,e,s,n,r,t.invoke.map(t=>
2t.id)),"final"===t.type){let n=t.parent,o=n?.type==="parallel"?n:n?.parent,a=o||t;for(n?.type==="compound"&&r.push(h(n.id,void 0!==t.output?_(t.output,c.context,e,s.self):void 0));o?.type==="parallel"&&!f.has(o)&&Q(i,o);)f.add(o),r.push(h(o.id)),a=o,o=o.parent;if(o)continue;c=tC(c,{status:"done",output:function(t,e,s,n,i){if(void 0===n.output)return;let r=h(i.id,void 0!==i.output&&i.parent?_(i.output,t.context,e,s.self):void 0);return _(n.output,t.context,r,s.self)}(c,e,s,c.machine.root,a)})}}return c}(l,n,s,u,a,r,c,i);let f=[...a];"done"===l.status&&(l=tx(l,n,s,f.sort((t,e)=>e.order-t.order).flatMap(t=>t.exit),r,void 0));try{if(c===e.historyValue&&function(t,e){if(t.length!==e.size)return!1;for(let s of t)if(!e.has(s))return!1;return!0}(e._nodes,a))return[l,o];return[tC(l,{_nodes:f,historyValue:c}),o]}catch(t){throw t}}finally{s.actionExecutor=a}}function tS(t,e,s,n){var i,r,o,a;if(ta(t))if(e[t.id]){let o=e[t.id];for(let t of o)n.add(t),tS(t,e,s,n);for(let a of o){i=a,r=t.parent,tb(n,e,s,G(i,r))}}else{let i=to(t);for(let r of i.target)n.add(r),i===t.parent?.initial&&s.add(t.parent),tS(r,e,s,n);for(let r of i.target){o=r,a=t.parent,tb(n,e,s,G(o,a))}}else if("compound"===t.type){let[i]=t.initial.target;ta(i)||(n.add(i),s.add(i)),tS(i,e,s,n),tb(n,e,s,G(i,t))}else if("parallel"===t.type)for(let i of Y(t).filter(t=>!ta(t)))[...n].some(t=>td(t,i))||(ta(i)||(n.add(i),s.add(i)),tS(i,e,s,n))}function tb(t,e,s,n,i){for(let r of n)if((!i||td(r,i))&&t.add(r),"parallel"===r.type)for(let n of Y(r).filter(t=>!ta(t)))[...t].some(t=>td(t,n))||(t.add(n),tS(n,e,s,t))}function tx(t,e,s,n,i,r){let o=r?[]:void 0,a=function t(e,s,n,i,r,o){let{machine:a}=e,c=e;for(let e of i){var u;let i="function"==typeof e,h=i?e:(u="string"==typeof e?e:e.type,a.implementations.actions[u]),l={context:c.context,event:s,self:n.self,system:n.system},f=i||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:c.context,event:s}):e.params:void 0;if(!h||!("resolve"in h)){n.actionExecutor({type:"string"==typeof e?e:"object"==typeof e?e.type:e.name||"(anonymous)",info:l,params:f,exec:h});continue}let[d,p,y]=h.resolve(n,c,l,f,h,r);c=d,"retryResolve"in h&&o?.push([h,p]),"execute"in h&&n.actionExecutor({type:h.type,info:l,params:p,exec:h.execute.bind(null,n,p)}),y&&(c=t(c,s,n,y,r,o))}return c}(t,e,s,n,{internalQueue:i,deferredActorIds:r},o);return o?.forEach(([t,e])=>{t.retryResolve(s,a,e)}),a}function tw(t,e,s,n){let i=t,r=[];function o(t,e,n){s.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:s.self,event:e,snapshot:t[0],_transitions:n}),r.push(t)}if(e.type===u)return o([i=tC(tE(i,e,s),{status:"stopped"}),[]],e,[]),{snapshot:i,microsteps:r};let c=e;if(c.type!==a){let e=c,a=e.type.startsWith("xstate.error.actor"),u=tk(e,i);if(a&&!u.length)return o([i=tC(t,{status:"error",error:e.error}),[]],e,[]),{snapshot:i,microsteps:r};let h=t_(u,t,s,c,!1,n);i=h[0],o(h,e,u)}let h=!0,l=t.machine.options?.maxIterations??1/0,f=0;for(;"active"===i.status;){if(++f>l)throw Error(`Infinite loop detected: the machine has processed more than ${l} microsteps without reaching a stable state. This usually happens when there's a cycle of transitions (e.g., eventless transitions or raised events causing state A -> B -> C -> A).`);let t=h?function(t,e){let s=new Set;for(let n of t._nodes.filter(F))t:for(let i of[n].concat(G(n,void 0)))if(i.always){for(let n of i.always)if(void 0===n.guard||q(n.guard,t.context,e,t)){s.add(n);break t}}return tp(Array.from(s),new Set(t._nodes),t.historyValue)}(i,c):[],e=t.length?i:void 0;if(!t.length){if(!n.length)break;t=tk(c=n.shift(),i)}let r=t_(t,i,s,c,!1,n);h=(i=r[0])!==e,o(r,c,t)}return"active"!==i.status&&tE(i,c,s),{snapshot:i,microsteps:r}}function tE(t,e,s){return tx(t,e,s,Object.values(t.children).map(t=>L(t)),[],void 0)}function tk(t,e){return e.machine.getTransitionData(e,t)}function tI(t,e){let s=K(tf(t,e));return H(t,[...s])}let t$=function(t){return function t(e,s){let n=g(e),i=g(s);return"string"==typeof i?"string"==typeof n&&i===n:"string"==typeof n?n in i:Object.keys(n).every(e=>e in i&&t(n[e],i[e]))}(t,this.value)},tj=function(t){return this.tags.has(t)},tO=function(t){let e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some(t=>void 0!==t.target||t.actions.length)},tA=function(){let{_nodes:t,tags:e,machine:s,getMeta:n,toJSON:i,can:r,hasTag:o,matches:a,...c}=this;return{...c,tags:Array.from(e)}},tM=function(){return this._nodes.reduce((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t),{})};function tT(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:H(e.root,t._nodes),tags:new Set(t._nodes.flatMap(t=>t.tags)),children:t.children,historyValue:t.historyValue||{},matches:t$,hasTag:tj,can:tO,getMeta:tM,toJSON:tA}}function tC(t,e={}){return tT({...t,...e},t.machine)}function tN(t,e){let{_nodes:s,tags:n,machine:i,children:r,context:o,can:a,hasTag:c,matches:u,getMeta:h,toJSON:l,...f}=t,d={};for(let t in r){let s=r[t];d[t]={snapshot:s.getPersistedSnapshot(e),src:s.src,systemId:s.systemId,syncSnapshot:s._syncSnapshot}}return{...f,context:function t(e){let s;for(let n in e){let i=e[n];if(i&&"object"==typeof i)if("sessionId"in i&&"send"in i&&"ref"in i)(s??=Array.isArray(e)?e.slice():{...e})[n]={xstate$$type:A,id:i.id};else{let r=t(i);r!==i&&((s??=Array.isArray(e)?e.slice():{...e})[n]=r)}}return s??e}(o),children:d,historyValue:function(t){if("object"!=typeof t||null===t)return{};let e={};for(let s in t){let n=t[s];Array.isArray(n)&&(e[s]=n.map(t=>({id:t.id})))}return e}(f.historyValue)}}function tR(t,e,s,n,{event:i,id:r,delay:o},{internalQueue:a}){let c,u=e.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let h="function"==typeof i?i(s,n):i;
2if("string"==typeof o){let t=u&&u[o];c="function"==typeof t?t(s,n):t}else c="function"==typeof o?o(s,n):o;return"number"!=typeof c&&a.push(h),[e,{event:h,id:r,delay:c},void 0]}function tD(t,e){let{event:s,delay:n,id:i}=e;if("number"==typeof n)return void t.defer(()=>{let e=t.self;t.system.scheduler.schedule(e,e,s,n,i)})}function tP(t,e){function s(t,e){}return s.type="xstate.raise",s.event=t,s.id=e?.id,s.delay=e?.delay,s.resolve=tR,s.execute=tD,s}},84426:(t,e,s)=>{s.d(e,{DT:()=>f,mj:()=>function t({schemas:e,actors:s,actions:r,guards:o,delays:a}){return{assign:i.a,sendTo:l.s,raise:n.r,log:l.l,cancel:n.b,stopChild:n.s,enqueueActions:l.e,emit:l.a,spawnChild:n.d,createStateConfig:t=>t,createAction:t=>t,createMachine:t=>new h({...t,schemas:e},{actors:s,actions:r,guards:o,delays:a}),extend:n=>t({schemas:e,actors:s,actions:{...r,...n.actions},guards:{...o,...n.guards},delays:{...a,...n.delays}})}}});var n=s(75953),i=s(15831);let r=new WeakMap;function o(t,e,s){let n=r.get(t);return n?e in n||(n[e]=s()):(n={[e]:s()},r.set(t,n)),n[e]}let a={},c=t=>"string"==typeof t?{type:t}:"function"==typeof t?"resolve"in t?{type:t.type}:{type:t.name}:t;class u{constructor(t,e){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=e._parent,this.key=e._key,this.machine=e._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(n.S),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?(0,n.z)(this.config.states,(t,e)=>new u(t,{_parent:this,_key:e,_machine:this.machine})):a,"compound"===this.type&&!this.config.initial)throw 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=!0===this.config.history?"shallow":this.config.history||!1,this.entry=(0,n.t)(this.config.entry).slice(),this.exit=(0,n.t)(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=(0,n.t)(t.tags).slice()}_initialize(){this.transitions=(0,n.B)(this),this.config.always&&(this.always=(0,n.C)(this.config.always).map(t=>(0,n.D)(this,n.N,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.t
2ype,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(c),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(c),eventType:null})}:void 0,history:this.history,states:(0,n.z)(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(c)})),entry:this.entry.map(c),exit:this.exit.map(c),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 o(this,"invoke",()=>(0,n.t)(this.config.invoke).map((t,e)=>{let{src:s,systemId:i}=t,r=t.id??(0,n.F)(this.id,e),o="string"==typeof s?s:`xstate.invoke.${(0,n.F)(this.id,e)}`;return{...t,src:o,id:r,systemId:i,toJSON(){let{onDone:e,onError:s,...n}=t;return{...n,type:"xstate.invoke",src:o,id:r}}}}))}get on(){return o(this,"on",()=>[...this.transitions].flatMap(([t,e])=>e.map(e=>[t,e])).reduce((t,[e,s])=>(t[e]=t[e]||[],t[e].push(s),t),{}))}get after(){return o(this,"delayedTransitions",()=>(0,n.G)(this))}get initial(){return o(this,"initial",()=>(0,n.H)(this,this.config.initial))}next(t,e){let s,i=e.type,r=[];for(let a of o(this,`candidates-${i}`,()=>(0,n.I)(this,i))){let{guard:o}=a,c=t.context,u=!1;try{u=!o||(0,n.E)(o,c,e,t)}catch(e){let t="string"==typeof o?o:"object"==typeof o?o.type:void 0;throw Error(`Unable to evaluate guard ${t?`'${t}' `:""}in transition for event '${i}' in state node '${this.id}':
3${e.message}`)}if(u){r.push(...a.actions),s=a;break}}return s?[s]:void 0}get events(){return o(this,"events",()=>{let{states:t}=this,e=new Set(this.ownEvents);if(t)for(let s of Object.keys(t)){let n=t[s];if(n.states)for(let t of n.events)e.add(`${t}`)}return Array.from(e)})}get ownEvents(){return Array.from(new Set(Object.keys(Object.fromEntries(this.transitions)).filter(t=>this.transitions.get(t).some(t=>!(!t.target&&!t.actions.length&&!t.reenter)))))}}class h{constructor(t,e){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.options=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:e?.actors??{},actions:e?.actions??{},delays:e?.delays??{},guards:e?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.options={maxIterations:1/0,...this.config.options},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 u(t,{_key:this.id,_machine:this}),this.root._initialize(),(0,n.J)(this.root),this.states=this.root.states,this.events=this.root.events}provide(t){let{actions:e,guards:s,actors:n,delays:i}=this.implementations;return new h(this.config,{actions:{...e,...t.actions},guards:{...s,...t.guards},actors:{...n,...t.actors},delays:{...i,...t.delays}})}resolveState(t){let e=(0,n.K)(this.root,t.value),s=(0,n.L)((0,n.q)(this.root,e));return(0,n.M)({_nodes:[...s],context:t.context||{},children:{},status:(0,n.O)(s,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,e,s){return(0,n.e)(t,e,s,[]).snapshot}microstep(t,e,s){return(0,n.e)(t,e,s,[]).microsteps.map(([t])=>t)}getTransitionData(t,e){return(0,n.P)(this.root,t.value,t,e)||[]}_getPreInitialState(t,e,s){let{context:r}=this.config,o=(0,n.M)({context:"function"!=typeof r&&r?r:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof r?(0,n.Q)(o,e,t,[(0,i.a)(({spawn:t,event:e,self:s})=>r({spawn:t,input:e.input,self:s}))],s,void 0):o}getInitialSnapshot(t,e){let s=(0,n.f)(e),i=[],r=(0,n.M)({context:"function"!=typeof this.config.context&&this.config.context?this.config.context:{},_nodes:[this.root],children:{},status:"active"},this);try{r=this._getPreInitialState(t,s,i);let[e]=(0,n.g)(this.root,r,t,s,i),{snapshot:o}=(0,n.e)(e,s,t,i);return o}catch(t){return(0,n.R)(r,{status:"error",error:t})}}
3start(t){Object.values(t.children).forEach(t=>{"active"===t.getSnapshot().status&&t.start()})}getStateNodeById(t){let e=(0,n.T)(t),s=e.slice(1),i=(0,n.U)(e[0])?e[0].slice(1):e[0],r=this.idMap.get(i);if(!r)throw Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return(0,n.V)(r,s)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,e){return(0,n.W)(t,e)}restoreSnapshot(t,e){let s={},i=t.children;Object.keys(i).forEach(t=>{let r=i[t],o=r.snapshot,a=r.src,c="string"==typeof a?(0,n.Y)(this,a):a;if(!c)return;let u=(0,n.c)(c,{id:t,parent:e.self,syncSnapshot:r.syncSnapshot,snapshot:o,src:a,systemId:r.systemId});s[t]=u});let r=function(t,e){if(!e||"object"!=typeof e)return{};let s={};for(let n in e)for(let i of e[n]){let e=function(t,e){if(e instanceof u)return e;try{return t.machine.getStateNodeById(e.id)}catch{}}(t,i);e&&(s[n]??=[],s[n].push(e))}return s}(this.root,t.historyValue),o=(0,n.M)({...t,children:s,_nodes:Array.from((0,n.L)((0,n.q)(this.root,t.value))),historyValue:r},this),a=new Set;return!function t(e,s){if(!a.has(e))for(let i in a.add(e),e){let r=e[i];if(r&&"object"==typeof r){if("xstate$$type"in r&&r.xstate$$type===n.$){e[i]=s[r.id];continue}t(r,s)}}}(o.context,s),o}}var l=s(13833);function f(t,e){let s=(0,n.t)(e);if(!s.some(e=>(0,n.m)(t.type,e))){let e=1===s.length?`type matching "${s[0]}"`:`one of types matching "${s.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(t)} to have ${e}`)}}},85596:(t,e,s)=>{var n=s(55729),i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},r=n.useState,o=n.useEffect,a=n.useLayoutEffect,c=n.useDebugValue;function u(t){var e=t.getSnapshot;t=t.value;try{var s=e();return!i(t,s)}catch(t){return!0}}var h="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var s=e(),n=r({inst:{value:s,getSnapshot:e}}),i=n[0].inst,h=n[1];return a(function(){i.value=s,i.getSnapshot=e,u(i)&&h({inst:i})},[t,s,e]),o(function(){return u(i)&&h({inst:i}),t(function(){u(i)&&h({inst:i})})},[t]),c(s),s};e.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:h}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.