PageSourceSearch

https://customer.io/_next/static/chunks/1621-b28c62f7f96ed256.js

js customer.io collected 2026-09-24 07:29:55 UTC 163,444 bytes, 15 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e3410f46-8ee5-49b0-adfd-c247733b3bc8",t._sentryDebugIdIdentifier="sentry-dbid-e3410f46-8ee5-49b0-adfd-c247733b3bc8")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1621],{8286:(t,e,r)=>{"use strict";r.d(e,{Tg:()=>y});var n=r(71450),i=r(82241),s=r(73694),o=r(45037),a=r(99455),u=r(74073),c=r(50933),l=r(45907),h=r(31590),f=r(39097),p=r(55180),d=r(60488);function y(t){if(t instanceof o.c)return t;if(null!=t){var e,r,y,v,m;if((0,a.l)(t)){return e=t,new o.c(function(t){var r=e[d.s]();if((0,f.T)(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if((0,i.X)(t)){return r=t,new o.c(function(t){for(var e=0;e<r.length&&!t.closed;e++)t.next(r[e]);t.complete()})}if((0,s.y)(t)){return y=t,new o.c(function(t){y.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,p.m)})}if((0,u.T)(t))return g(t);if((0,l.x)(t)){return v=t,new o.c(function(t){var e,r;try{for(var i=(0,n.Ju)(v),s=i.next();!s.done;s=i.next()){var o=s.value;if(t.next(o),t.closed)return}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}t.complete()})}if((0,h.U)(t)){return m=t,g((0,h.C)(m))}}throw(0,c.L)(t)}function g(t){return new o.c(function(e){(function(t,e){var r,i,s,o;return(0,n.sH)(this,void 0,void 0,function(){var a;return(0,n.YH)(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),r=(0,n.xN)(t),u.label=1;case 1:return[4,r.next()];case 2:if((i=u.sent()).done)return[3,4];if(a=i.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s={error:u.sent()},[3,11];
1case 6:if(u.trys.push([6,,9,10]),!(i&&!i.done&&(o=r.return)))return[3,8];return[4,o.call(r)];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})})(t,e).catch(function(t){return e.error(t)})})}},10899:(t,e,r)=>{"use strict";function n(t){var e=t(function(t){Error.call(t),t.stack=Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}r.d(e,{L:()=>n})},12668:(t,e,r)=>{"use strict";function n(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}r.d(e,{o:()=>n})},12718:(t,e,r)=>{"use strict";r.d(e,{E:()=>i,b:()=>s});var n=r(33421),i=new(r(44289)).q(n.R),s=i},14192:(t,e,r)=>{"use strict";r.d(e,{f:()=>i});var n=r(71450),i={setTimeout:function(t,e){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];var o=i.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,(0,n.fX)([t,e],(0,n.zs)(r))):setTimeout.apply(void 0,(0,n.fX)([t,e],(0,n.zs)(r)))},clearTimeout:function(t){var e=i.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0}},16433:(t,e,r)=>{"use strict";r.d(e,{s:()=>o});var n=r(47211),i=r(96948),s=r(28400);function o(t){return t<=0?function(){return n.w}:(0,i.N)(function(e,r){var n=0;e.subscribe((0,s._)(r,function(e){++n<=t&&(r.next(e),t<=n&&r.complete())}))})}},20437:(t,e,r)=>{"use strict";function n(t,e,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var s=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(s),!i)return s}r.d(e,{N:()=>n})},20981:(t,e,r)=>{"use strict";r.d(e,{s:()=>i});var n=r(47948);function i(t,e){var r="object"==typeof e;return new Promise(function(i,s){var o,a=!1;t.subscribe({next:function(t){o=t,a=!0},error:s,complete:function(){a?i(o):r?i(e.defaultValue):s(new n.G)}})})}},24933:(t,e,r)=>{"use strict";r.d(e,{$:()=>$,B:()=>w,C:()=>ti,D:()=>J,E:()=>x,F:()=>tn,G:()=>ta,H:()=>tr,I:()=>to,J:()=>tR,K:()=>Q,L:()=>tk,M:()=>tt,N:()=>s,O:()=>function t(e,r,n,i){if("string"==typeof r){let t=tf(e,r).next(n,i);return t&&t.length?t:e.next(n,i)}if(1===Object.keys(r).length){let s=Object.keys(r),o=t(tf(e,s[0]),r[s[0]],n,i);return o&&o.length?o:e.next(n,i)}let s=[];for(let o of Object.keys(r)){let a=r[o];if(!a)continue;let u=t(tf(e,o),a,n,i);u&&s.push(...u)}return s.length?s:e.next(n,i)},P:()=>tS,Q:()=>d,R:()=>te,S:()=>i,T:()=>tp,U:()=>tU,V:()=>S,W:()=>a,X:()=>u,Y:()=>l,Z:()=>A,_:()=>tP,a:()=>U,b:()=>N,c:()=>j,d:()=>tC,e:()=>h,i:()=>tw,j:()=>W,m:()=>C,n:()=>V,p:()=>td,r:()=>tN,s:()=>F,t:()=>v,w:()=>E,y:()=>g,z:()=>ts});class n{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 i=".",s="",o="xstate.init",a="xstate.error",u="xstate.stop";function c(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 h(t){return{type:o,input:t}}function f(t){setTimeout(()=>{throw t})}let p="function"==typeof Symbol&&Symbol.observable||"@@observable";function d(t){if(b(t))return t;let e=[],r="";for(let n=0;n<t.length;n++){switch(t.charCodeAt(n)){case 92:r+=t[n+1],n++;continue;case 46:e.push(r),r="";
1continue}r+=t[n]}return e.push(r),e}function y(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={},r=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)r[t[e]]=t[e+1];else{let n=r;r={},n[t[e]]=r}return e}(d(t))}function g(t,e){let r={},n=Object.keys(t);for(let i=0;i<n.length;i++){let s=n[i];r[s]=e(t[s],s,t,i)}return r}function v(t){var e;return void 0===t?[]:b(e=t)?e:[e]}function m(t,e,r,n){return"function"==typeof t?t({context:e,event:r,self:n}):t}function b(t){return Array.isArray(t)}function w(t){var e;return(b(e=t)?e:[e]).map(t=>void 0===t||"string"==typeof t?{target:t}:t)}function _(t){if(void 0!==t&&""!==t)return v(t)}function E(t,e,r){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:r)?.bind(i)}}function x(t,e){return`${e}.${t}`}function S(t,e){let r=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!r)return t.implementations.actors[e];let[,n,i]=r,s=t.getStateNodeById(i).config.invoke;return(Array.isArray(s)?s[n]:s).src}function C(t,e){if(e===t||"*"===e)return!0;if(!e.endsWith(".*"))return!1;let r=e.split("."),n=t.split(".");for(let t=0;t<r.length;t++){let e=r[t],i=n[t];if("*"===e)return t===r.length-1;if(e!==i)return!1}return!0}function I(t,e){return`${t.sessionId}.${e}`}let T=0,R=!1,$=1,A=function(t){return t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",t}({}),O={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class q{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 n(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=A.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=[];let r={...O,...e},{clock:i,logger:s,parent:o,syncSnapshot:a,id:u,systemId:c,inspect:l}=r;this.system=o?o.system:function(t,e){let r=new Map,n=new Map,i=new WeakMap,s=new Set,o={},{clock:a,logger:u}=e,c={schedule:(t,e,r,n,i=Math.random().toString(36).slice(2))=>{let s={source:t,target:e,event:r,delay:n,id:i,startedAt:Date.now()},u=I(t,i);l._snapshot._scheduledEvents[u]=s;let c=a.setTimeout(()=>{delete o[u],delete l._snapshot._scheduledEvents[u],l._relay(t,e,r)},n);o[u]=c},cancel:(t,e)=>{let r=I(t,e),n=o[r];delete o[r],delete l._snapshot._scheduledEvents[r],void 0!==n&&a.clearTimeout(n)},cancelAll:t=>{for(let e in l._snapshot._scheduledEvents){let r=l._snapshot._scheduledEvents[e];r.source===t&&c.cancel(t,r.id)}}},l={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${T++}`,_register:(t,e)=>(r.set(t,e),t),_unregister:t=>{r.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 r=n.get(t);if(r&&r!==e)throw Error(`Actor with system ID '${t}' already exists.`);n.set(t,e),i.set(e,t)},inspect:t=>{let e=E(t);return s.add(e),{unsubscribe(){s.delete(e)}}},_sendInspectionEvent:e=>{if(!s.size)return;let r={...e,rootId:t.sessionId};s.forEach(t=>t.next?.(r))},_relay:(t,e,r)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:t,actorRef:e,event:r}),e._send(r)},scheduler:c,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{let t=l._snapshot._scheduledEvents;for(let e in l._snapshot._scheduledEvents={},t){let{source:r,target:n,event:i,delay:s,id:o}=t[e];c.schedule(r,n,i,s,o)}},_clock:a,_logger:u};return l}(this,{clock:i,logger:s}),l&&!o&&this.system.inspect(E(l)),this.sessionId=this.system._bookId(),this.id=u??this.sessionId,this.logger=e?.logger??this.system._logger,this.clock=e?.clock??this.system._clock,this._parent=o,this._syncSnapshot=a,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: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),r=this.eventListeners.get("*");if(e||r)for(let n of[...e?e.values():[],...r?r.values():[]])try{n(t)}catch(t){f(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=R;try{R=!0,t.exec(t.info,t.params)}finally{R=e}};this._processingStatus===A.Running?e():this._deferred.push(e)}},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(e?.snapshot??e?.state),c&&"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 r;for(this._snapshot=t;r=this._deferred.shift();)try{r()}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){f(t)}break;case"done":var n;for(let e of this.observers)try{e.next?.(t)}catch(t){f(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,r){let n=E(t,e,r);if(this._processingStatus!==A.Stopped)this.observers.add(n);else switch(this._snapshot.status){case"done":try{n.complete?.()}catch(t){f(t)}break;case"error":{let t=this._snapshot.error;if(n.error)try{n.error(t)}catch(t){f(t)}else f(t)}}return{unsubscribe:()=>{this.observers.delete(n)}}}on(t,e){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));let n=e.bind(void 0);return r.add(n),{unsubscribe:()=>{r.delete(n)}}}start(){if(this._processingStatus===A.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=A.Running;let t=h(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,r;try{e=this.logic.transition(this._snapshot,t,this._actorScope)}catch(t){r={err:t}}if(r){let{err:t}=r;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===A.Stopped||((this.mailbox.clear(),this._processingStatus===A.NotStarted)?this._processingStatus=A.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){f(t)}this.observers.clear(),this.eventListeners.clear()}_reportError(t){if(!this.observers.size){this._parent||f(t),this.eventListeners.clear();return}let e=!1;for(let r of this.observers){let n=r.error;e||=!n;try{n?.(t)}catch(t){f(t)}}this.observers.clear(),this.eventListeners.clear(),e&&f(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,l(this.id,t))}_stopProcedure(){return this._processingStatus!==A.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new n(this._process.bind(this)),this._processingStatus=A.Stopped,this.system._unregister(this)),this}_send(t){this._processingStatus!==A.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("undefined"==typeof window)return;let e=function(){let t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:void 0;if(t.__xstate__)return t.__xstate__}();e&&e.register(t)})(this)}toJSON(){return{xstate$$type:$,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[p](){return this}getSnapshot(){return this._snapshot}}function j(t,...[e]){return new q(t,e)}function k(t,e,r,n,{sendId:i}){return[e,{sendId:"function"==typeof i?i(r,n):i},void 0]}function P(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function U(t){function e(t,e){}return e.type="xstate.cancel",e.sendId=t,e.resolve=k,e.execute=P,e}function M(t,e,r,n,{id:i,systemId:s,src:o,input:a,syncSnapshot:u}){let c,l,h="string"==typeof o?S(e.machine,o):o,f="function"==typeof i?i(r):i;return h&&(l="function"==typeof a?a({context:e.context,event:r.event,self:t.self}):a,c=j(h,{id:f,src:o,parent:t.self,syncSnapshot:u,systemId:s,input:l})),[tP(e,{children:{...e.children,[f]:c}}),{id:i,systemId:s,actorRef:c,src:o,input:l},void 0]}function D(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==A.Stopped&&e.start()})}function N(...[t,{id:e,systemId:r,input:n,syncSnapshot:i=!1}={}]){function s(t,e){}return s.type="xstate.spawnChild",s.id=e,s.systemId=r,s.src=t,s.input=n,s.syncSnapshot=i,s.resolve=M,s.execute=D,s}function L(t,e,r,n,{actorRef:i}){let s="function"==typeof i?i(r,n):i,o="string"==typeof s?e.children[s]:s,a=e.children;return o&&(a={...a},delete a[o.id]),[tP(e,{children:a}),o,void 0]}function B(t,e){if(e){if(!function t(e,r){let n=r.getSnapshot();if(n&&"children"in n)for(let r of Object.values(n.children))t(e,r);e.system._unregister(r)}(t,e),e._processingStatus!==A.Running)return void t.stopChild(e);t.defer(()=>{t.stopChild(e)})}}function F(t){function e(t,e){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=L,e.execute=B,e}function z(t,{context:e,event:r},{guards:n}){return!J(n[0],e,r,t)}function V(t){function e(t,e){return!1}return e.check=z,e.guards=[t],e}function H(t,{context:e,event:r},{guards:n}){return n.every(n=>J(n,e,r,t))}function W(t){function e(t,e){return!1}return e.check=H,e.guards=t,e}function J(t,e,r,n){let{machine:i}=n,s="function"==typeof t,o=s?t:i.implementations.guards["string"==typeof t?t:t.type];if(!s&&!o)throw Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof o)return J(o,e,r,n);let a={context:e,event:r},u=s||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:e,event:r}):t.params:void 0;return"check"in o?o.check(n,a,o):o(a,u)}function G(t){return"atomic"===t.type||"final"===t.type}function X(t){return Object.values(t.states).filter(t=>"history"!==t.type)}function Y(t,e){let r=[];if(e===t)return r;let n=t.parent;for(;n&&n!==e;)r.push(n),n=n.parent;return r}function Q(t){let e=new Set(t),r=Z(e);for(let t of e)if("compound"!==t.type||r.get(t)&&r.get(t).length){if("parallel"===t.type){for(let r of X(t))if("history"!==r.type&&!e.has(r))for(let t of tl(r))e.add(t)}}else tl(t).forEach(t=>e.add(t));for(let t of e){let r=t.parent;for(;r;)e.add(r),r=r.parent}return e}function Z(t){let e=new Map;for(let r of t)e.has(r)||e.set(r,[]),r.parent&&(e.has(r.parent)||e.set(r.parent,[]),e.get(r.parent).push(r));return e}function K(t,e){return function t(e,r){let n=r.get(e);if(!n)return{};if("compound"===e.type){let t=n[0];if(!t)return{};if(G(t))return t.key}let i={};for(let e of n)i[e.key]=t(e,r);return i}(t,Z(Q(e)))}function tt(t,e){return"compound"===e.type?X(e).some(e=>"final"===e.type&&t.has(e)):"parallel"===e.type?X(e).every(e=>tt(t,e)):"final"===e.type}let te=t=>"#"===t[0];function tr(t,e){return t.transitions.get(e)||[...t.transitions.keys()].filter(t=>C(e,t)).sort((t,e)=>e.length-t.length).flatMap(e=>t.transitions.get(e))}function tn(t){let e=t.config.after;return e?Object.keys(e).flatMap(r=>{let n=e[r],i=Number.isNaN(+r)?r:+r,s=(e=>{var r;let n=(r=t.id,{type:`xstate.after.${e}.${r}`}),i=n.type;return t.entry.push(tN(n,{id:i,delay:e})),t.exit.push(U(i)),i})(i);return v("string"==typeof n?{target:n}:n).map(t=>({...t,event:s,delay:i}))}).map(e=>{let{delay:r}=e;return{...ti(t,e.event,e),delay:r}}):[]}function ti(t,e,r){let n=_(r.target),s=r.reenter??!1,o=function(t,e){if(void 0!==e)return e.map(e=>{if("string"!=typeof e)return e;if(te(e))return t.machine.getStateNodeById(e);let r=e[0]===i;if(r&&!t.parent)return tp(t,e.slice(1));let n=r?t.key+e:e;if(t.parent)try{return tp(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={...r,actions:v(r.actions),guard:r.guard,target:o,source:t,reenter
2:s,eventType:e,toJSON:()=>({...a,source:`#${t.id}`,target:o?o.map(t=>`#${t.id}`):void 0})};return a}function ts(t){let e=new Map;if(t.config.on)for(let r of Object.keys(t.config.on)){if(r===s)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let n=t.config.on[r];e.set(r,w(n).map(e=>ti(t,r,e)))}if(t.config.onDone){let r=`xstate.done.state.${t.id}`;e.set(r,w(t.config.onDone).map(e=>ti(t,r,e)))}for(let r of t.invoke){if(r.onDone){let n=`xstate.done.actor.${r.id}`;e.set(n,w(r.onDone).map(e=>ti(t,n,e)))}if(r.onError){let n=`xstate.error.actor.${r.id}`;e.set(n,w(r.onError).map(e=>ti(t,n,e)))}if(r.onSnapshot){let n=`xstate.snapshot.${r.id}`;e.set(n,w(r.onSnapshot).map(e=>ti(t,n,e)))}}for(let r of t.after){let t=e.get(r.eventType);t||(t=[],e.set(r.eventType,t)),t.push(r)}return e}function to(t){let e=[],r=n=>{Object.values(n).forEach(n=>{if(n.config.route&&n.config.id){let r=n.config.id,i=n.config.route.guard,s={...n.config.route,guard:(t,e)=>t.event.to===`#${r}`&&(!i||"function"!=typeof i||i(t,e)),target:`#${r}`};e.push(ti(t,"xstate.route",s))}n.states&&r(n.states)})};r(t.states),e.length>0&&t.transitions.set("xstate.route",e)}function ta(t,e){let r="string"==typeof e?t.states[e]:e?t.states[e.target]:void 0;if(!r&&e)throw Error(`Initial state node "${e}" not found on parent state node #${t.id}`);let n={source:t,actions:e&&"string"!=typeof e?v(e.actions):[],eventType:null,reenter:!1,target:r?[r]:[],toJSON:()=>({...n,source:`#${t.id}`,target:r?[`#${r.id}`]:[]})};return n}function tu(t){let e=_(t.config.target);return e?{target:e.map(e=>"string"==typeof e?tp(t.parent,e):e)}:t.parent.initial}function tc(t){return"history"===t.type}function tl(t){let e=th(t);for(let r of e)for(let n of Y(r,t))e.add(n);return e}function th(t){let e=new Set;return!function t(r){if(!e.has(r)){if(e.add(r),"compound"===r.type)t(r.initial.target[0]);else if("parallel"===r.type)for(let e of X(r))t(e)}}(t),e}function tf(t,e){if(te(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 r=t.states[e];if(!r)throw Error(`Child state '${e}' does not exist on '${t.id}'`);return r}function tp(t,e){if("string"==typeof e&&te(e))try{return t.machine.getStateNodeById(e)}catch{}let r=d(e).slice(),n=t;for(;r.length;){let t=r.shift();if(!t.length)break;n=tf(n,t)}return n}function td(t,e){if("string"==typeof e){let r=t.states[e];if(!r)throw Error(`State '${e}' does not exist on '${t.id}'`);return[t,r]}let r=Object.keys(e),n=r.map(e=>tf(t,e)).filter(Boolean);return[t.machine.root,t].concat(n,r.reduce((r,n)=>{let i=tf(t,n);if(!i)return r;let s=td(i,e[n]);return r.concat(s)},[]))}function ty(t,e){let r=t;for(;r.parent&&r.parent!==e;)r=r.parent;return r.parent===e}function tg(t,e,r){let n=new Set;for(let i of t){let t=!1,s=new Set;for(let o of n)if(function(t,e){let r=new Set(t),n=new Set(e);for(let t of r)if(n.has(t))return!0;for(let t of n)if(r.has(t))return!0;return!1}(tb([i],e,r),tb([o],e,r)))if(ty(i.source,o.source))s.add(o);else{t=!0;break}if(!t){for(let t of s)n.delete(t);n.add(i)}}return Array.from(n)}function tv(t,e){if(!t.target)return[];let r=new Set;for(let n of t.target)if(tc(n))if(e[n.id])for(let t of e[n.id])r.add(t);else for(let t of tv(tu(n),e))r.add(t);else r.add(n);return[...r]}function tm(t,e){let r=tv(t,e);if(!r)return;if(!t.reenter&&r.every(e=>e===t.source||ty(e,t.source)))return t.source;let n=function(t){let[e,...r]=t;for(let t of Y(e,void 0))if(r.every(e=>ty(e,t)))return t}(r.concat(t.source));return n||(t.reenter?void 0:t.source.machine.root)}function tb(t,e,r){let n=new Set;for(let i of t)if(i.target?.length){let t=tm(i,r);for(let r of(i.reenter&&i.source===t&&n.add(t),e))ty(r,t)&&n.add(r)}return[...n]}function tw(t,e,r,n,i){return t_([{target:[...th(t)],source:t,reenter:!0,actions:[],eventType:null,toJSON:null}],e,r,n,!0,i)}function t_(t,e,r,n,i,s){let o=[];if(!t.length)return[e,o];let a=r.actionExecutor;r.actionExecutor=t=>{o.push(t),a(t)};try{let a=new Set(e._nodes),u=e.historyValue,l=tg(t,a,u),h=e;i||([h,u]=function(t,e,r,n,i,s,o,a){let u,c=t,l=tb(n,i,s);for(let t of(l.sort((t,e)=>e.order-t.order),l))for(let e of function(t){return Object.keys(t.states).map(e=>t.states[e]).filter(t=>"history"===t.type)}(t)){let r;r="deep"===e.history?e=>G(e)&&ty(e,t):e=>e.parent===t,(u??={...s})[e.id]=Array.from(i).filter(r)}for(let t of l)c=tS(c,e,r,[...t.exit,...t.invoke.map(t=>F(t.id))],o,void 0),i.delete(t);return[c,u||s]}(h,n,r,l,a,u,s,r.actionExecutor)),h=tS(h,n,r,l.flatMap(t=>t.actions),s,void 0),h=function(t,e,r,n,i,s,o,a){let u=t,l=new Set,h=new Set;(function(t,e,r,n){for(let i of t){let t=tm(i,e);for(let s of i.target||[])!tc(s)&&(i.source!==s||i.source!==t||i.reenter)&&(n.add(s),r.add(s)),tE(s,e,r,n);for(let s of tv(i,e)){let o=Y(s,t);t?.type==="parallel"&&o.push(t),tx(n,e,r,o,!i.source.parent&&i.reenter?void 0:t)}}})(n,o,h,l),a&&h.add(t.machine.root);let f=new Set;for(let t of[...l].sort((t,e)=>t.order-e.order)){i.add(t);let n=[];for(let e of(n.push(...t.entry),t.invoke))n.push(N(e.src,{...e,syncSnapshot:!!e.onSnapshot}));if(h.has(t)){let e=t.initial.actions;n.push(...e)}if(u=tS(u,e,r,n,s,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"&&s.push(c(n.id,void 0!==t.output?m(t.output,u.context,e,r.self):void 0));o?.type==="parallel"&&!f.has(o)&&tt(i,o);)f.add(o),s.push(c(o.id)),a=o,o=o.parent;if(o)continue;u=tP(u,{status:"done",output:function(t,e,r,n,i){if(void 0===n.output)return;let s=c(i.id,void 0!==i.output&&i.parent?m(i.output,t.context,e,r.self):void 0);return m(n.output,t.context,s,r.self)}(u,e,r,u.machine.root,a)})}}return u}(h,n,r,l,a,s,u,i);let f=[...a];"done"===h.status&&(h=tS(h,n,r,f.sort((t,e)=>e.order-t.order).flatMap(t=>t.exit),s,void 0));try{if(u===e.historyValue&&function(t,e){if(t.length!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}(e._nodes,a))return[h,o];return[tP(h,{_nodes:f,historyValue:u}),o]}catch(t){throw t}}finally{r.actionExecutor=a}}function tE(t,e,r,n){var i,s,o,a;if(tc(t))if(e[t.id]){let o=e[t.id];for(let t of o)n.add(t),tE(t,e,r,n);for(let a of o){i=a,s=t.parent,tx(n,e,r,Y(i,s))}}else{let i=tu(t);for(let s of i.target)n.add(s),i===t.parent?.initial&&r.add(t.parent),tE(s,e,r,n);for(let s of i.target){o=s,a=t.parent,tx(n,e,r,Y(o,a))}}else if("compound"===t.type){let[i]=t.initial.target;tc(i)||(n.add(i),r.add(i)),tE(i,e,r,n),tx(n,e,r,Y(i,t))}else if("parallel"===t.type)for(let i of X(t).filter(t=>!tc(t)))[...n].some(t=>ty(t,i))||(tc(i)||(n.add(i),r.add(i)),tE(i,e,r,n))}function tx(t,e,r,n,i){for(let s of n)if((!i||ty(s,i))&&t.add(s),"parallel"===s.type)for(let n of X(s).filter(t=>!tc(t)))[...t].some(t=>ty(t,n))||(t.add(n),tE(n,e,r,t))}function tS(t,e,r,n,i,s){let o=s?[]:void 0,a=function t(e,r,n,i,s,o){let{machine:a}=e,u=e;for(let e of i){var c;let i="function"==typeof e,l=i?e:(c="string"==typeof e?e:e.type,a.implementations.actions[c]),h={context:u.context,event:r,self:n.self,system:n.system},f=i||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:u.context,event:r}):e.params:void 0;if(!l||!("resolve"in l)){n.actionExecutor({type:"string"==typeof e?e:"object"==typeof e?e.type:e.name||"(anonymous)",info:h,params:f,exec:l});continue}let[p,d,y]=l.resolve(n,u,h,f,l,s);u=p,"retryResolve"in l&&o?.push([l,d]),"execute"in l&&n.actionExecutor({type:l.type,info:h,params:d,exec:l.execute.bind(null,n,d)}),y&&(u=t(u,r,n,y,s,o))}return u}(t,e,r,n,{internalQueue:i,deferredActorIds:s},o);return o?.forEach(([t,e])=>{t.retryResolve(r,a,e)}),a}function tC(t,e,r,n){let i=t,s=[];function a(t,e,n){r.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:r.self,event:e,snapshot:t[0],_transitions:n}),s.push(t)}if(e.type===u)return a([i=tP(tI(i,e,r),{status:"stopped"}),[]],e,[]),{snapshot:i,microsteps:s};let c=e;if(c.type!==o){let e=c,o=e.type.startsWith("xstate.error.actor"),u=tT(e,i);if(o&&!u.length)return a([i=tP(t,{status:"error",error:e.error}),[]],e,[]),{snapshot:i,microsteps:s};let l=t_(u,t,r,c,!1,n);i=l[0],a(l,e,u)}let l=!0;for(;"active"===i.status;){let t=l?function(t,e){let r=new Set;for(let n of t._nodes.filter(G))t:for(let i of[n].concat(Y(n,void 0)))if(i.always){for(let n of i.always)if(void 0===n.guard||J(n.guard,t.context,e,t)){r.add(n);break t}}return tg(Array.from(r),new Set(t._nodes),t.historyValue)}(i,c):[],e=t.length?i:void 0;if(!t.length){if(!n.length)break;t=tT(c=n.shift(),i)}let s=t_(t,i,r,c,!1,n);l=(i=s[0])!==e,a(s,c,t)}return"active"!==i.status&&tI(i,c,r),{snapshot:i,microsteps:s}}function tI(t,e,r){return tS(t,e,r,Object.values(t.children).map(t=>F(t)),[],void 0)}function tT(t,e){return e.machine.getTransitionData(e,t)}function tR(t,e){let r=Q(td(t,e));return K(t,[...r])}let t$=function(t){return function t(e,r){let n=y(e),i=y(r);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)},tA=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)},tq=function(){let{_nodes:t,tags:e,machine:r,getMeta:n,toJSON:i,can:s,hasTag:o,matches:a,...u}=this;return{...u,tags:Array.from(e)}},tj=function(){return this._nodes.reduce((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t),{})};function tk(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:K(e.root,t._nodes),tags:new Set(t._nodes.flatMap(t=>t.tags)),children:t.children,historyValue:t.historyValue||{},matches:t$,hasTag:tA,can:tO,getMeta:tj,toJSON:tq}}function tP(t,e={}){return tk({...t,...e},t.machine)}function tU(t,e){let{_nodes:r,tags:n,machine:i,children:s,context:o,can:a,hasTag:u,matches:c,getMeta:l,toJSON:h,...f}=t,p={};for(let t in s){let r=s[t];p[t]={snapshot:r.getPersistedSnapshot(e),src:r.src,systemId:r.systemId,syncSnapshot:r._syncSnapshot}}return{...f,context:function t(e){let r;for(let n in e){let i=e[n];if(i&&"object"==typeof i)if("sessionId"in i&&"send"in i&&"ref"in i)(r??=Array.isArray(e)?e.slice():{...e})[n]={xstate$$type:$,id:i.id};else{let s=t(i);s!==i&&((r??=Array.isArray(e)?e.slice():{...e})[n]=s)}}return r??e}(o),children:p,historyValue:function(t){if("object"!=typeof t||null===t)return{};let e={};for(let r in t){let n=t[r];Array.isArray(n)&&(e[r]=n.map(t=>({id:t.id})))}return e}(f.historyValue)}}function tM(t,e,r,n,{event:i,id:s,delay:o},{internalQueue:a}){let u,c=e.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let l="function"==typeof i?i(r,n):i;if("string"==typeof o){let t=c&&c[o];u="function"==typeof t?t(r,n):t}else u="function"==typeof o?o(r,n):o;return"number"!=typeof u&&a.push(l),[e,{event:l,id:s,delay:u},void 0]}function tD(t,e){let{event:r,delay:n,id:i}=e;if("number"==typeof n)return void t.defer(()=>{let e=t.self;t.system.scheduler.schedule(e,e,r,n,i)})}function tN(t,e){function r(t,e){}return r.type="xstate.raise",r.event=t,r.id=e?.id,r.delay=e?.delay,r.resolve=tM,r.execute=tD,r}},25259:(t,e,r)=>{"use strict";r.d(e,{O:()=>a});var n=r(45037),i=r(12718),s=r(89526),o=r(42421);function a(t,e,r){void 0===t&&(t=0),void 0===r&&(r=i.b);var a=-1;return null!=e&&((0,s.m)(e)?r=e:a=e),new n.c(function(e){var n=(0,o.v)(t)?t-r.now():t;n<0&&(n=0);var i=0;return r.schedule(function(){e.closed||(e.next(i++),0<=a?this.schedule(void 0,a):e.complete())},n)})}},26035:(t,e,r)=>{"use strict";r.d(e,{a:()=>a,e:()=>d,l:()=>v,s:()=>f});var n=r(24933),i=r(46674);function s(t,e,r,n,{event:i}){return[e,{event:"function"==typeof i?i(r,n):i},void 0]}function o(t,{event:e}){t.defer(()=>t.emit(e))}function a(t){function e(t,e){}return e.type="xstate.emit",e.event=t,e.resolve=s,e.execute=o,e}let u=function(t){return t.Parent="#_parent",t.Internal="#_internal",t}({});function c(t,e,r,n,{to:i,event:s,id:o,delay:a}
2,c){let l,h,f=e.machine.implementations.delays;if("string"==typeof s)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${s}" }) instead`);let p="function"==typeof s?s(r,n):s;if("string"==typeof a){let t=f&&f[a];l="function"==typeof t?t(r,n):t}else l="function"==typeof a?a(r,n):a;let d="function"==typeof i?i(r,n):i;if("string"==typeof d){if(!(h=d===u.Parent?t.self._parent:d===u.Internal?t.self:d.startsWith("#_")?e.children[d.slice(2)]:c.deferredActorIds?.includes(d)?d:e.children[d]))throw Error(`Unable to send event to actor '${d}' from machine '${e.machine.id}'.`)}else h=d||t.self;return[e,{to:h,targetId:"string"==typeof d?d:void 0,event:p,id:o,delay:l},void 0]}function l(t,e,r){"string"==typeof r.to&&(r.to=e.children[r.to])}function h(t,e){t.defer(()=>{let{to:r,event:i,delay:s,id:o}=e;if("number"==typeof s)return void t.system.scheduler.schedule(t.self,r,i,s,o);t.system._relay(t.self,r,i.type===n.W?(0,n.Y)(t.self.id,i.data):i)})}function f(t,e,r){function n(t,e){}return n.type="xstate.sendTo",n.to=t,n.event=e,n.id=r?.id,n.delay=r?.delay,n.resolve=c,n.retryResolve=l,n.execute=h,n}function p(t,e,r,s,{collect:o}){let c=[],l=function(t){c.push(t)};return l.assign=(...t)=>{c.push((0,i.a)(...t))},l.cancel=(...t)=>{c.push((0,n.a)(...t))},l.raise=(...t)=>{c.push((0,n.r)(...t))},l.sendTo=(...t)=>{c.push(f(...t))},l.sendParent=(...t)=>{c.push(function(t,e){return f(u.Parent,t,e)}(...t))},l.spawnChild=(...t)=>{c.push((0,n.b)(...t))},l.stopChild=(...t)=>{c.push((0,n.s)(...t))},l.emit=(...t)=>{c.push(a(...t))},o({context:r.context,event:r.event,enqueue:l,check:t=>(0,n.D)(t,e.context,r.event,e),self:t.self,system:t.system},s),[e,void 0,c]}function d(t){function e(t,e){}return e.type="xstate.enqueueActions",e.collect=t,e.resolve=p,e}function y(t,e,r,n,{value:i,label:s}){return[e,{value:"function"==typeof i?i(r,n):i,label:s},void 0]}function g({logger:t},{value:e,label:r}){r?t(r,e):t(e)}function v(t=({context:t,event:e})=>({context:t,event:e}),e){function r(t,e){}return r.type="xstate.log",r.value=t,r.label=e,r.resolve=y,r.execute=g,r}},28400:(t,e,r)=>{"use strict";r.d(e,{H:()=>s,_:()=>i});var n=r(71450);function i(t,e,r,n,i){return new s(t,e,r,n,i)}var s=function(t){function e(e,r,n,i,s,o){var a=t.call(this,e)||this;return a.onFinalize=s,a.shouldUnsubscribe=o,a._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return(0,n.C6)(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),r||null==(e=this.onFinalize)||e.call(this)}},e}(r(28786).vU)},28775:(t,e,r)=>{"use strict";r.d(e,{_:()=>s});var n=r(47948),i=r(28786);function s(t,e){var r="object"==typeof e;return new Promise(function(s,o){var a=new i.Ms({next:function(t){s(t),a.unsubscribe()},error:o,complete:function(){r?s(e.defaultValue):o(new n.G)}});t.subscribe(a)})}},28786:(t,e,r)=>{"use strict";r.d(e,{Ms:()=>v,vU:()=>p});var n=r(71450),i=r(39097),s=r(41449),o=r(29846),a=r(55180),u=r(34793),c=l("C",void 0,void 0);function l(t,e,r){return{kind:t,value:e,error:r}}var h=r(14192),f=r(75968),p=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,(0,s.Uv)(e)&&e.add(r)):r.destination=w,r}return(0,n.C6)(e,t),e.create=function(t,e,r){return new v(t,e,r)},e.prototype.next=function(t){this.isStopped?b(l("N",t,void 0),this):this._next(t)},e.prototype.error=function(t){this.isStopped?b(l("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?b(c,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(s.yU),d=Function.prototype.bind;function y(t,e){return d.call(t,e)}var g=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){m(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){m(t)}else m(t)}
2,t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){m(t)}},t}(),v=function(t){function e(e,r,n){var s,a,u=t.call(this)||this;return(0,i.T)(e)||!e?s={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&o.$.useDeprecatedNextContext?((a=Object.create(e)).unsubscribe=function(){return u.unsubscribe()},s={next:e.next&&y(e.next,a),error:e.error&&y(e.error,a),complete:e.complete&&y(e.complete,a)}):s=e,u.destination=new g(s),u}return(0,n.C6)(e,t),e}(p);function m(t){o.$.useDeprecatedSynchronousErrorHandling?(0,f.l)(t):(0,a.m)(t)}function b(t,e){var r=o.$.onStoppedNotification;r&&h.f.setTimeout(function(){return r(t,e)})}var w={closed:!0,next:u.l,error:function(t){throw t},complete:u.l}},29279:(t,e,r)=>{"use strict";r.d(e,{M:()=>a});var n=r(39097),i=r(96948),s=r(28400),o=r(77163);function a(t,e,r){var a=(0,n.T)(t)||e||r?{next:t,error:e,complete:r}:t;return a?(0,i.N)(function(t,e){null==(r=a.subscribe)||r.call(a);var r,n=!0;t.subscribe((0,s._)(e,function(t){var r;null==(r=a.next)||r.call(a,t),e.next(t)},function(){var t;n=!1,null==(t=a.complete)||t.call(a),e.complete()},function(t){var r;n=!1,null==(r=a.error)||r.call(a,t),e.error(t)},function(){var t,e;n&&(null==(t=a.unsubscribe)||t.call(a)),null==(e=a.finalize)||e.call(a)}))}):o.D}},29396:(t,e,r)=>{"use strict";r.d(e,{j:()=>i});var n=r(96948);function i(t){return(0,n.N)(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})}},29846:(t,e,r)=>{"use strict";r.d(e,{$:()=>n});var n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},31536:(t,e,r)=>{"use strict";r.d(e,{B:()=>c});var n=r(71450),i=r(45037),s=r(41449),o=(0,r(10899).L)(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),a=r(12668),u=r(75968),c=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return(0,n.C6)(e,t),e.prototype.lift=function(t){var e=new l(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new o},e.prototype.next=function(t){var e=this;(0,u.Y)(function(){var r,i;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var s=(0,n.Ju)(e.currentObservers),o=s.next();!o.done;o=s.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}})},e.prototype.error=function(t){var e=this;(0,u.Y)(function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}})},e.prototype.complete=function(){var t=this;(0,u.Y)(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null==(t=this.observers)?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?s.Kn:(this.currentObservers=null,i.push(t),new s.yU(function(){e.currentObservers=null,(0,a.o)(i,t)}))},e.prototype._checkFinalizedStatuses=function(t){var e=this.hasError,r=this.thrownError,n=this.isStopped;e?t.error(r):n&&t.complete()},e.prototype.asObservable=function(){var t=new i.c;return t.source=this,t},e.create=function(t,e){return new l(t,e)},e}(i.c),l=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return(0,n.C6)(e,t),e.prototype.next=function(t){var e,r;null==(r=null==(e=this.destination)?void 0:e.next)||r.call(e,t)},e.prototype.error=function(t){var e,r;null==(r=null==(e=this.destination)?void 0:e.error)||r.call(e,t)},e.prototype.complete=function(){var t,e;null==(e=null==(t=this.destination)?void 0:t.complete)||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!=(r=null==(e=this.source)?void 0:e.subscribe(t))?r:s.Kn},e}(c)},31590:(t,e,r)=>{"use strict";r.d(e,{C:()=>s,U:()=>o});var n=r(71450),i=r(39097);function s(t){return(0,n.AQ)(this,arguments,function(){var e,r,i;return(0,n.YH)(this,function(s){switch(s.label){case 0:e=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,(0,n.N3)(e.read())];case 3:if(i=(r=s.sent()).value,!r.done)return[3,5];return[4,(0,n.N3)(void 0)];case 4:return[2,s.sent()];case 5:return[4,(0,n.N3)(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function o(t){return(0,i.T)(null==t?void 0:t.getReader)}},32466:(t,e,r)=>{"use strict";r.d(e,{h:()=>u});var n=r(81933),i=r(8286),s=r(47211),o=r(95868),a=r(86238);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(0,o.lI)(t),u=(0,o.R0)(t,1/0);return t.length?1===t.length?(0,i.Tg)(t[0]):(0,n.U)(u)((0,a.H)(t,r)):s.w}},33421:(t,e,r)=>{"use strict";r.d(e,{R:()=>a});var n=r(71450),i=function(t){function e(e,r){return t.call(this)||this}return(0,n.C6)(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(r(41449).yU),s={setInterval:function(t,e){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=s.delegate;return(null==o?void 0:o.setInterval)?o.setInterval.apply(o,(0,n.fX)([t,e],(0,n.zs)(r))):setInterval.apply(void 0,(0,n.fX)([t,e],(0,n.zs)(r)))},clearInterval:function(t){var e=s.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},o=r(12668),a=function(t){function e(e,r){var n=t.call(this,e,r)||this;
2return n.scheduler=e,n.work=r,n.pending=!1,n}return(0,n.C6)(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=null!=(r=this.id)?r:this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),s.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return e;null!=e&&s.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r,n=!1;try{this.work(t)}catch(t){n=!0,r=t||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,o.o)(n,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(i)},34098:(t,e,r)=>{"use strict";r.d(e,{t:()=>s});var n=r(37305),i=r(77241);function s(t,e,r){var s,o,a,u,c=!1;return t&&"object"==typeof t?(u=void 0===(s=t.bufferSize)?1/0:s,e=void 0===(o=t.windowTime)?1/0:o,c=void 0!==(a=t.refCount)&&a,r=t.scheduler):u=null!=t?t:1/0,(0,i.u)({connector:function(){return new n.m(u,e,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},34438:(t,e,r)=>{"use strict";r.d(e,{R:()=>function t(e,r,d,y){if((0,u.T)(d)&&(y=d,d=void 0),y)return t(e,r,d).pipe((0,c.I)(y));var g,v,m,b=(0,n.zs)((g=e,(0,u.T)(g.addEventListener)&&(0,u.T)(g.removeEventListener))?h.map(function(t){return function(n){return e[t](r,n,d)}}):(v=e,(0,u.T)(v.addListener)&&(0,u.T)(v.removeListener))?l.map(p(e,r)):(m=e,(0,u.T)(m.on)&&(0,u.T)(m.off))?f.map(p(e,r)):[],2),w=b[0],_=b[1];if(!w&&(0,a.X)(e))return(0,o.Z)(function(e){return t(e,r,d)})((0,i.Tg)(e));if(!w)throw TypeError("Invalid event target");return new s.c(function(t){var e=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.next(1<e.length?e:e[0])};return w(e),function(){return _(e)}})}});var n=r(71450),i=r(8286),s=r(45037),o=r(60732),a=r(82241),u=r(39097),c=r(59728),l=["addListener","removeListener"],h=["addEventListener","removeEventListener"],f=["on","off"];function p(t,e){return function(r){return function(n){return t[r](e,n)}}}},34793:(t,e,r)=>{"use strict";function n(){}r.d(e,{l:()=>n})},37305:(t,e,r)=>{"use strict";r.d(e,{m:()=>o});var n=r(71450),i=r(31536),s=r(91239),o=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.U);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return(0,n.C6)(e,t),e.prototype.next=function(e){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,s=this._timestampProvider,o=this._windowTime;!r&&(n.push(e),i||n.push(s.now()+o)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this._bufferSize,e=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var s=e.now(),o=0,a=1;a<r.length&&r[a]<=s;a+=2)o=a;o&&r.splice(0,o+1)}},e}(i.B)},39097:(t,e,r)=>{"use strict";function n(t){return"function"==typeof t}r.d(e,{T:()=>n})},40609:(t,e,r)=>{"use strict";r.d(e,{OX:()=>l,SP:()=>a});var n,i,s=r(24933);let o=new WeakMap;function a(t){return{config:t,start:(e,r)=>{let{self:n,system:i,emit:s}=r,a={receivers:void 0,dispose:void 0};o.set(n,a),a.dispose=t({input:e.input,system:i,self:n,sendBack:t=>
2{"stopped"!==n.getSnapshot().status&&n._parent&&i._relay(n,n._parent,t)},receive:t=>{a.receivers??=new Set,a.receivers.add(t)},emit:s})},transition:(t,e,r)=>{let n=o.get(r.self);return e.type===s.X?(t={...t,status:"stopped",error:void 0},o.delete(r.self),n.receivers?.clear(),n.dispose?.()):n.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 u="xstate.observable.error",c="xstate.observable.complete";function l(t){return{config:t,transition:(t,e)=>{if("active"!==t.status)return t;switch(e.type){case u:return{...t,status:"error",error:e.data,input:void 0,_subscription:void 0};case c:return{...t,status:"done",input:void 0,_subscription:void 0};case s.X:return t._subscription.unsubscribe(),{...t,status:"stopped",input:void 0,_subscription:void 0};default:return t}},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,context:void 0,input:e,_subscription:void 0}),start:(e,{self:r,system:n,emit:i})=>{"done"!==e.status&&(e._subscription=t({input:e.input,system:n,self:r,emit:i}).subscribe({next:t=>{r._parent&&n._relay(r,r._parent,t)},error:t=>{n._relay(r,r,{type:u,data:t})},complete:()=>{n._relay(r,r,{type:c})}}))},getPersistedSnapshot:({_subscription:t,...e})=>e,restoreSnapshot:t=>({...t,_subscription:void 0})}}new WeakMap,n=t=>void 0,i=0},40712:(t,e,r)=>{"use strict";r.d(e,{$:()=>s});var n=r(45037),i=r(39097);function s(t,e){var r=(0,i.T)(t)?t:function(){return t},s=function(t){return t.error(r())};return new n.c(e?function(t){return e.schedule(s,0,t)}:s)}},41423:(t,e,r)=>{"use strict";r.d(e,{Q:()=>o});var n=r(20437),i=r(96948),s=r(28400);function o(t,e){return void 0===e&&(e=0),(0,i.N)(function(r,i){r.subscribe((0,s._)(i,function(r){return(0,n.N)(i,t,function(){return i.next(r)},e)},function(){return(0,n.N)(i,t,function(){return i.complete()},e)},function(r){return(0,n.N)(i,t,function(){return i.error(r)},e)}))})}},41449:(t,e,r)=>{"use strict";r.d(e,{Kn:()=>u,yU:()=>a,Uv:()=>c});var n=r(71450),i=r(39097),s=(0,r(10899).L)(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=e}}),o=r(12668),a=function(){var t;function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t,e,r,o,a,u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var c=(0,n.Ju)(u),h=c.next();!h.done;h=c.next())h.value.remove(this)}catch(e){t={error:e}}finally{try{h&&!h.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}else u.remove(this);var f=this.initialTeardown;if((0,i.T)(f))try{f()}catch(t){a=t instanceof s?t.errors:[t]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=(0,n.Ju)(p),y=d.next();!y.done;y=d.next()){var g=y.value;try{l(g)}catch(t){a=null!=a?a:[],t instanceof s?a=(0,n.fX)((0,n.fX)([],(0,n.zs)(a)),(0,n.zs)(t.errors)):a.push(t)}}}catch(t){r={error:t}}finally{try{y&&!y.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}}if(a)throw new s(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(t)}},e.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},e.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},e.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&(0,o.o)(e,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&(0,o.o)(r,t),t instanceof e&&t._removeParent(this)},(t=new e).closed=!0,e.EMPTY=t,e}(),u=a.EMPTY;function c(t){return t instanceof a||t&&"closed"in t&&(0,i.T)(t.remove)&&(0,i.T)(t.add)&&(0,i.T)(t.unsubscribe)}function l(t){(0,i.T)(t)?t():t.unsubscribe()}},42421:(t,e,r)=>{"use strict";function n(t){return t instanceof Date&&!isNaN(t)}r.d(e,{v:()=>n})},42764:(t,e,r)=>{"use strict";r.d(e,{p:()=>s});var n=r(96948),i=r(28400);function s(t,e){return(0,n.N)(function(r,n){var s=0;r.subscribe((0,i._)(n,function(r){return t.call(e,r,s++)&&n.next(r)}))})}},43279:(t,e,r)=>{"use strict";r.d(e,{Q:()=>a});var n=r(96948),i=r(28400),s=r(8286),o=r(34793);function a(t){return(0,n.N)(function(e,r){(0,s.Tg)(t).subscribe((0,i._)(r,function(){return r.complete()},o.l)),r.closed||e.subscribe(r)})}},44289:(t,e,r)=>{"use strict";r.d(e,{q:()=>o});var n=r(71450),i=r(91239),s=function(){function t(e,r){void 0===r&&(r=t.
2now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},t.now=i.U.now,t}(),o=function(t){function e(e,r){void 0===r&&(r=s.now);var n=t.call(this,e,r)||this;return n.actions=[],n._active=!1,n}return(0,n.C6)(e,t),e.prototype.flush=function(t){var e,r=this.actions;if(this._active)return void r.push(t);this._active=!0;do if(e=t.execute(t.state,t.delay))break;while(t=r.shift());if(this._active=!1,e){for(;t=r.shift();)t.unsubscribe();throw e}},e}(s)},45037:(t,e,r)=>{"use strict";r.d(e,{c:()=>l});var n=r(28786),i=r(41449),s=r(60488),o=r(89577),a=r(29846),u=r(39097),c=r(75968),l=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var s=this,o=!function(t){return t&&t instanceof n.vU||t&&(0,u.T)(t.next)&&(0,u.T)(t.error)&&(0,u.T)(t.complete)&&(0,i.Uv)(t)}(t)?new n.Ms(t,e,r):t;return(0,c.Y)(function(){var t=s.operator,e=s.source;o.add(t?t.call(o,e):e?s._subscribe(o):s._trySubscribe(o))}),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=h(e))(function(e,i){var s=new n.Ms({next:function(e){try{t(e)}catch(t){i(t),s.unsubscribe()}},error:i,complete:e});r.subscribe(s)})},t.prototype._subscribe=function(t){var e;return null==(e=this.source)?void 0:e.subscribe(t)},t.prototype[s.s]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,o.m)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=h(t))(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();function h(t){var e;return null!=(e=null!=t?t:a.$.Promise)?e:Promise}},45907:(t,e,r)=>{"use strict";r.d(e,{x:()=>s});var n=r(69899),i=r(39097);function s(t){return(0,i.T)(null==t?void 0:t[n.l])}},46674:(t,e,r)=>{"use strict";r.d(e,{a:()=>s});var n=r(24933);function i(t,e,r,i,{assignment:s}){if(!e.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let o={},a={context:e.context,event:r.event,spawn:function(t,{machine:e,context:r},i,s){return(o,a)=>{let u=((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 u=(0,n.V)(e,o);if(!u)throw Error(`Actor logic '${o}' not implemented in machine '${e.id}'`);let c=(0,n.c)(u,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:"function"==typeof a?.input?a.input({context:r,event:i,self:t.self}):a?.input,src:o,systemId:a?.systemId});return s[c.id]=c,c}})(o,a);return s[u.id]=u,t.defer(()=>{u._processingStatus!==n.Z.Stopped&&u.start()}),u}}(t,e,r.event,o),self:t.self,system:t.system},u={};if("function"==typeof s)u=s(a,i);else for(let t of Object.keys(s)){let e=s[t];u[t]="function"==typeof e?e(a,i):e}let c=Object.assign({},e.context,u);return[(0,n._)(e,{context:c,children:Object.keys(o).length?{...e.children,...o}:e.children}),void 0,void 0]}function s(t){function e(t,e){}return e.type="xstate.assign",e.assignment=t,e.resolve=i,e}},47211:(t,e,r)=>{"use strict";r.d(e,{I:()=>s,w:()=>i});var n=r(45037),i=new n.c(function(t){return t.complete()});function s(t){var e;return t?(e=t,new n.c(function(t){return e.schedule(function(){return t.complete()})})):i}},47948:(t,e,r)=>{"use strict";r.d(e,{G:()=>n});var n=(0,r(10899).L)(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})},50384:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(45037),i=r(39097);function s(t){return!!t&&(t instanceof n.c||(0,i.T)(t.lift)&&(0,i.T)(t.subscribe))}},50729:(t,e,r)=>{"use strict";r.d(e,{K:()=>i});var n=r(81933);function i(){return(0,n.U)(1)}},50933:(t,e,r)=>{"use strict";function n(t){return TypeError("You provided "+(null!==t&&"object"==typeof t?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}r.d(e,{L:()=>n})},51746:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,s=u(t),o=s[0],a=s[1],c=new i((o+a)*3/4-a),l=0,h=a>0?o-4:o;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,s=[],o=0,a=n-i;o<a;o+=16383)s.push(function(t,e,n){for(var i,s=[],o=e;o<n;o+=3)i=(t[o]<<16&0xff0000)+(t[o+1]<<8&65280)+(255&t[o+2]),s.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}(t,o,o+16383>a?a:o+16383));return 1===i?s.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&s.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/",o=0,a=s.length;o<a;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},54152:(t,e,r)=>{"use strict";r.d(e,{Ak:()=>s,d_:()=>i});let n=t=>crypto.getRandomValues(new Uint8Array(t)),i=(t,e=21)=>((t,e,r)=>{let n=(2<<Math.log(t.length-1)/Math.LN2)-1,i=-~(1.6*n*e/t.length);return (s=e)=>{if(s<=0)return"";let o="";for(;;){let e=r(i),a=0|i;for(;a--;)if((o+=t[e[a]&n]||"").length===s)return o}}})(t,e,n),s=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((t,e)=>((e&=63)<36?t+=e.toString(36):e<62?t+=(e-26).toString(36).toUpperCase():e>62?t+="-":t+="_",t),"")},54560:(t,e,r)=>{"use strict";r.d(e,{H:()=>s});var n=r(60732),i=r(39097);function s(t,e){return(0,i.T)(e)?(0,n.Z)(t,e,1):(0,n.Z)(t,1)}},55180:(t,e,r)=>{"use strict";r.d(e,{m:()=>s});var n=r(29846),i=r(14192);function s(t){i.f.setTimeout(function(){var e=n.$.onUnhandledError;if(e)e(t);else throw t})}},55459:(t,e)=>{e.read=function(t,e,r,n,i){var s,o,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,s=p&(1<<-l)-1,p>>=-l,l+=a;l>0;s=256*s+t[e+h],h+=f,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=256*o+t[e+h],h+=f,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),s-=c}return(p?-1:1)*o*Math.pow(2,s-n)},e.write=function(t,e,r,n,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,h=l>>1,f=5960464477539062e-23*(23===i),p=n?0:s-1,d=n?1:-1,y=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(a=+!!isNaN(e),o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+h>=1?e+=f/u:e+=f*Math.pow(2,1-h),e*u>=2&&(o++,u/=2),o+h>
2=l?(a=0,o=l):o+h>=1?(a=(e*u-1)*Math.pow(2,i),o+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*y}},59728:(t,e,r)=>{"use strict";r.d(e,{I:()=>o});var n=r(71450),i=r(63704),s=Array.isArray;function o(t){return(0,i.T)(function(e){return s(e)?t.apply(void 0,(0,n.fX)([],(0,n.zs)(e))):t(e)})}},60488:(t,e,r)=>{"use strict";r.d(e,{s:()=>n});var n="function"==typeof Symbol&&Symbol.observable||"@@observable"},60732:(t,e,r)=>{"use strict";r.d(e,{Z:()=>function t(e,r,u){return(void 0===u&&(u=1/0),(0,a.T)(r))?t(function(t,s){return(0,n.T)(function(e,n){return r(t,e,s,n)})((0,i.Tg)(e(t,s)))},u):("number"==typeof r&&(u=r),(0,s.N)(function(t,r){return(0,o.h)(t,r,e,u)}))}});var n=r(63704),i=r(8286),s=r(96948),o=r(63820),a=r(39097)},61270:(t,e,r)=>{"use strict";r.d(e,{x:()=>o});var n=r(50729),i=r(95868),s=r(86238);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.K)()((0,s.H)(t,(0,i.lI)(t)))}},63704:(t,e,r)=>{"use strict";r.d(e,{T:()=>s});var n=r(96948),i=r(28400);function s(t,e){return(0,n.N)(function(r,n){var s=0;r.subscribe((0,i._)(n,function(r){n.next(t.call(e,r,s++))}))})}},63820:(t,e,r)=>{"use strict";r.d(e,{h:()=>o});var n=r(8286),i=r(20437),s=r(28400);function o(t,e,r,o,a,u,c,l){var h=[],f=0,p=0,d=!1,y=function(){!d||h.length||f||e.complete()},g=function(t){return f<o?v(t):h.push(t)},v=function(t){u&&e.next(t),f++;var l=!1;(0,n.Tg)(r(t,p++)).subscribe((0,s._)(e,function(t){null==a||a(t),u?g(t):e.next(t)},function(){l=!0},void 0,function(){if(l)try{for(f--;h.length&&f<o;)!function(){var t=h.shift();c?(0,i.N)(e,c,function(){return v(t)}):v(t)}();y()}catch(t){e.error(t)}}))};return t.subscribe((0,s._)(e,g,function(){d=!0,y()})),function(){null==l||l()}}},69530:(t,e,r)=>{"use strict";function n(t,e){return t.reduce(function(t,r,n){return t[r]=e[n],t},{})}r.d(e,{e:()=>n})},69675:(t,e,r)=>{"use strict";r.d(e,{D:()=>a});var n=Array.isArray,i=Object.getPrototypeOf,s=Object.prototype,o=Object.keys;function a(t){if(1===t.length){var e,r=t[0];if(n(r))return{args:r,keys:null};if((e=r)&&"object"==typeof e&&i(e)===s){var a=o(r);return{args:a.map(function(t){return r[t]}),keys:a}}}return{args:t,keys:null}}},69899:(t,e,r)=>{"use strict";r.d(e,{l:()=>n});var n="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},71203:(t,e,r)=>{"use strict";r.d(e,{_:()=>i});var n=r(96948);function i(t,e){return void 0===e&&(e=0),(0,n.N)(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}},71450:(t,e,r)=>{"use strict";r.d(e,{AQ:()=>d,C6:()=>i,Cl:()=>s,Ju:()=>c,N3:()=>p,Tt:()=>o,YH:()=>u,fX:()=>f,gz:()=>h,sH:()=>a,xN:()=>y,zs:()=>l});var n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var s=function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function o(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)0>e.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function a(t,e,r,n){return new(r||(r=Promise))(function(i,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(o,a)}u((n=n.apply(t,e||[])).next())})}function u(t,e){var r,n,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){var c=[a,u];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,n=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){s.label=c[1];break}if(6===c[0]&&s.label<i[1]){s.label=i[1],i=c;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(c);break}i[2]&&s.ops.pop(),s.trys.pop();continue}c=e.call(t,s)}catch(t){c=[6,t],n=0}
2finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function c(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function h(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(l(arguments[e]));return t}function f(t,e,r){if(r||2==arguments.length)for(var n,i=0,s=e.length;i<s;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function p(t){return this instanceof p?(this.v=t,this):new p(t)}function d(t,e,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),s=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(t){return function(e){return Promise.resolve(e).then(t,c)}}),n[Symbol.asyncIterator]=function(){return this},n;function o(t,e){i[t]&&(n[t]=function(e){return new Promise(function(r,n){
2s.push([t,e,r,n])>1||a(t,e)})},e&&(n[t]=e(n[t])))}function a(t,e){try{var r;(r=i[t](e)).value instanceof p?Promise.resolve(r.value.v).then(u,c):l(s[0][2],r)}catch(t){l(s[0][3],t)}}function u(t){a("next",t)}function c(t){a("throw",t)}function l(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}}function y(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=c(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,i){var s,o,a;s=n,o=i,a=(e=t[r](e)).done,Promise.resolve(e.value).then(function(t){s({value:t,done:a})},o)})}}}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},73694:(t,e,r)=>{"use strict";r.d(e,{y:()=>i});var n=r(39097);function i(t){return(0,n.T)(null==t?void 0:t.then)}},74073:(t,e,r)=>{"use strict";r.d(e,{T:()=>i});var n=r(39097);function i(t){return Symbol.asyncIterator&&(0,n.T)(null==t?void 0:t[Symbol.asyncIterator])}},75968:(t,e,r)=>{"use strict";r.d(e,{Y:()=>s,l:()=>o});var n=r(29846),i=null;function s(t){if(n.$.useDeprecatedSynchronousErrorHandling){var e=!i;if(e&&(i={errorThrown:!1,error:null}),t(),e){var r=i,s=r.errorThrown,o=r.error;if(i=null,s)throw o}}else t()}function o(t){n.$.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=t)}},76096:(t,e,r)=>{"use strict";r.d(e,{Q6:()=>tK,MZ:()=>ty,u_:()=>t_,gP:()=>tg,UU:()=>rr});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,i={timeout:n?6e4:12e4},s=function(t){let e={...i,..."string"==typeof t?{url:t}:t};if(e.timeout=function t(e){if(!1===e||0===e)return!1;if(e.connect||e.socket)return e;let r=Number(e);return isNaN(r)?t(i.timeout):{connect:r,socket:r}}(e.timeout),e.query){let{url:t,searchParams:r}=function(t){let e=t.indexOf("?");if(-1===e)return{url:t,searchParams:new URLSearchParams};let r=t.slice(0,e),i=t.slice(e+1);if(!n)return{url:r,searchParams:new URLSearchParams(i)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let s=new URLSearchParams;for(let t of i.split("&")){let[e,r]=t.split("=");e&&s.append(o(e),o(r||""))}return{url:r,searchParams:s}}(e.url);for(let[n,i]of Object.entries(e.query)){if(void 0!==i)if(Array.isArray(i))for(let t of i)r.append(n,t);else r.append(n,i);let s=r.toString();s&&(e.url=`${t}?${s}`)}}return e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e};function o(t){return decodeURIComponent(t.replace(/\+/g," "))}let a=/^https?:\/\//i,u=function(t){if(!a.test(t.url))throw Error(`"${t.url}" is not a valid URL`)},c=["request","response","progress","error","abort"],l=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var h,f,p=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(function(){if(f)return h;f=1;var t=function(t){return t.replace(/^\s+|\s+$/g,"")};return h=function(e){if(!e)return{};for(var r=Object.create(null),n=t(e).split("\n"),i=0;i<n.length;i++){var s,o=n[i],a=o.indexOf(":"),u=t(o.slice(0,a)).toLowerCase(),c=t(o.slice(a+1));typeof r[u]>"u"?r[u]=c:(s=r[u],"[object Array]"===Object.prototype.toString.call(s))?r[u].push(c):r[u]=[r[u],c]}return r}}());class d{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#t;#e;#r;#n={};#i;#s={};#o;open(t,e,r){this.#t=t,this.#e=e,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(t,e){this.#n[t]=e}setInit(t,e=!0){this.#s=t,this.#o=e}send(t){let e="arraybuffer"!==this.responseType,r={...this.#s,method:this.#t,headers:this.#n,body:t};"function"==typeof AbortController&&this.#o&&(this.#i=new AbortController,"u">typeof EventTarget&&this.#i.signal instanceof EventTarget&&(r.signal=this.#i.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#e,r).then(t=>
2(t.headers.forEach((t,e)=>{this.#r+=`${e}: ${t}\r
3`}),this.status=t.status,this.statusText=t.statusText,this.readyState=3,this.onreadystatechange?.(),e?t.text():t.arrayBuffer())).then(t=>{"string"==typeof t?this.responseText=t:this.response=t,this.readyState=4,this.onreadystatechange?.()}).catch(t=>{"AbortError"!==t.name?this.onerror?.(t):this.onabort?.()})}}let y="function"==typeof XMLHttpRequest?"xhr":"fetch",g="xhr"===y?XMLHttpRequest:d,v=(t,e)=>{let r=t.options,n=t.applyMiddleware("finalizeOptions",r),i={},s=t.applyMiddleware("interceptRequest",void 0,{adapter:y,context:t});if(s){let t=setTimeout(e,0,null,s);return{abort:()=>clearTimeout(t)}}let o=new g;o instanceof d&&"object"==typeof n.fetch&&o.setInit(n.fetch,n.useAbortSignal??!0);let a=n.headers,u=n.timeout,c=!1,l=!1,h=!1;if(o.onerror=t=>{m(o instanceof d?t instanceof Error?t:Error(`Request error while attempting to reach is ${n.url}`,{cause:t}):Error(`Request error while attempting to reach is ${n.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},o.ontimeout=t=>{m(Error(`Request timeout while attempting to reach ${n.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},o.onabort=()=>{v(!0),c=!0},o.onreadystatechange=function(){u&&(v(),i.socket=setTimeout(()=>f("ESOCKETTIMEDOUT"),u.socket)),!c&&o&&4===o.readyState&&0!==o.status&&function(){if(!(c||l||h)){if(0===o.status)return m(Error("Unknown XHR error"));v(),l=!0,e(null,{body:o.response||(""===o.responseType||"text"===o.responseType?o.responseText:""),url:n.url,method:n.method,headers:p(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(n.method,n.url,!0),o.withCredentials=!!n.withCredentials,a&&o.setRequestHeader)for(let t in a)a.hasOwnProperty(t)&&o.setRequestHeader(t,a[t]);return n.rawBody&&(o.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:n,adapter:y,request:o,context:t}),o.send(n.body||null),u&&(i.connect=setTimeout(()=>f("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,o&&o.abort()}};function f(e){h=!0,o.abort();let r=Error("ESOCKETTIMEDOUT"===e?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=e,t.channels.error.publish(r)}function v(t){(t||c||o&&o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function m(t){if(l)return;v(!0),l=!0,o=null;let r=t||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,e(r)}};var m,b,w,_,E,x=r(87358),S=r(81029).hp,C={exports:{}};E||(E=1,function(t,e){let r;e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(i=n))}),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}},e.load=function(){let t;try{t=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!t&&"u">typeof x&&"env"in x&&(t=x.env.DEBUG),t},e.useColors=function(){let t;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch{}}(),r=!1,e.destroy=()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33
3CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=(_?w:(_=1,w=function(t){function e(t){let n,i,s,o=null;function a(...t){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(n||r),a.prev=n,a.curr=r,n=r,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let i=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;let s=e.formatters[n];if("function"==typeof s){let e=t[i];r=s.call(a,e),t.splice(i,1),i--}return r}),e.formatArgs.call(a,t),(a.log||e.log).apply(a,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,s=e.enabled(t)),s),set
3:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,r){let n=e(this.namespace+(typeof r>"u"?":":r)+t);return n.log=this.log,n}function n(t,e){let r=0,n=0,i=-1,s=0;for(;r<t.length;)if(n<e.length&&(e[n]===t[r]||"*"===e[n]))"*"===e[n]?(i=n,s=r):r++,n++;else{if(-1===i)return!1;n=i+1,r=++s}for(;n<e.length&&"*"===e[n];)n++;return n===e.length}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){let t=[...e.names,...e.skips.map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){for(let r of(e.save(t),e.namespaces=t,e.names=[],e.skips=[],("string"==typeof t?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?e.skips.push(r.slice(1)):e.names.push(r)},e.enabled=function(t){for(let r of e.skips)if(n(t,r))return!1;for(let r of e.names)if(n(t,r))return!0;return!1},e.humanize=function(){if(b)return m;b=1;function t(t,e,r,n){return Math.round(t/r)+" "+n+(e>=1.5*r?"s":"")}return m=function(e,r){r=r||{};var n,i,s=typeof e;if("string"===s&&e.length>0){var o=e;if(!((o=String(o)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(a){var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u}}}return}if("number"===s&&isFinite(e))return r.long?(i=Math.abs(e))>=864e5?t(e,i,864e5,"day"):i>=36e5?t(e,i,36e5,"hour"):i>=6e4?t(e,i,6e4,"minute"):i>=1e3?t(e,i,1e3,"second"):e+" ms":(n=Math.abs(e))>=864e5?Math.round(e/864e5)+"d":n>=36e5?Math.round(e/36e5)+"h":n>=6e4?Math.round(e/6e4)+"m":n>=1e3?Math.round(e/1e3)+"s":e+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}(),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(r=>{e[r]=t[r]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e)|0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}))(e);let{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}(C,C.exports)),C.exports,Object.prototype.hasOwnProperty;let I=typeof S>"u"?()=>!1:t=>S.isBuffer(t);function T(t){return"[object Object]"===Object.prototype.toString.call(t)}let R=["boolean","string","number"],$={};"u">typeof globalThis?$=globalThis:"u">typeof window?$=window:"u">typeof global?$=global:"u">typeof self&&($=self);var A=$;let O=(t={})=>{let e=t.implementation||Promise;if(!e)throw Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:(r,n)=>new e((e,i)=>{let s=n.options.cancelToken;s&&s.promise.then(t=>{r.abort.publish(t),i(t)}),r.error.subscribe(i),r.response.subscribe(r=>{e(t.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(t){i(t)}},0)})}};class q{__CANCEL__=!0;message;constructor(t){this.message=t}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class j{promise;reason;constructor(t){if("function"!=typeof t)throw TypeError("executor must be a function.");let e=null;this.promise=new Promise(t=>{e=t}),t(t=>{this.reason||(this.reason=new q(t),e(this.reason))})}static source=()=>{let t;return{token:new j(e=>{t=e}),cancel:t}}}O.Cancel=q,O.CancelToken=j,O.isCancel=t=>!(!t||!t?.__CANCEL__);var k=(t,e,r)=>("GET"===r.method||"HEAD"===r.method)&&(t.isNetworkError||!1);function P(t){return 100*Math.pow(2,t)+100*Math.random()}let U=(t={})=>(t=>{let e=t.maxRetries||5,r=t.retryDelay||P,n=t.shouldRetry;return{onError:(t,i)=>{var s;let o=i.options,a=o.maxRetries||e,u=o.retryDelay||r,c=o.shouldRetry||n,l=o.attemptNumber||0;if(null!==(s=o.body)&&"object"==typeof s&&"function"==typeof s.pipe||!c(t,l,o)||l>=a)return t;let h=Object.assign({},i,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>i.channels.request.publish(h),u(l)),null}}})({shouldRetry:k,...t});U.shouldRetry=k;var M=r(45037),D=r(78242),N=r(50384),L=r(85755),B=r(60732),F=r(86238),z=r(20981),V=r(34098),H=r(77133),W=r(61270),J=r(25259),G=r(40712),X=r(29279),Y=r(29396),Q=r(77241),Z=r(32466),K=r(63704),tt=r(28775),te=r(83572),tr=r(71450),tn=r(99148),ti=r(96948),ts=r(76656),to=r(59728),ta=r(89577),tu=r(95868);function tc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(0,tu.ms)(t);return r?(0,ta.F)(tc.apply(void 0,(0,tr.fX)([],(0,tr.zs)(t))),(0,to.I)(r)):(0,ti.N)(function(e,r){(0,tn.P)((0,tr.fX)([e],(0,tr.zs)((0,ts.K)(t))))(r)})}var tl=r(42764),th=r(93261),tf=r(54152);let tp=/\r\n|[\n\r\u2028\u2029]/;function td(t,e){let r=0;for(let n=0;n<e.length;n++){let i=e[n].length+1;if(r+i>t)return{line:n+1,column:t-r};r+=i}return{line:e.length,column:e[e.length-1]?.length??0}}
3class ty extends Error{response;statusCode=400;responseBody;details;constructor(t,e){let r=tv(t,e);super(r.message),Object.assign(this,r)}}class tg extends Error{response;statusCode=500;responseBody;details;constructor(t){let e=tv(t);super(e.message),Object.assign(this,e)}}function tv(t,e){var r,n,i;let s=t.body,o={response:t,statusCode:t.statusCode,responseBody:(r=s,-1!==(t.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),message:"",details:void 0};if(!(0,te.u4)(s))return o.message=tw(t,s),o;let a=s.error;if("string"==typeof a&&"string"==typeof s.message)return o.message=`${a} - ${s.message}`,o;if("object"!=typeof a||null===a)return"string"==typeof a?o.message=a:"string"==typeof s.message?o.message=s.message:o.message=tw(t,s),o;if("type"in(n=a)&&"mutationError"===n.type&&"description"in n&&"string"==typeof n.description||"type"in(i=a)&&"actionError"===i.type&&"description"in i&&"string"==typeof i.description){let t=a.items||[],e=t.slice(0,5).map(t=>t.error?.description).filter(Boolean),r=e.length?`:
4- ${e.join(`
5- `)}`:"";return t.length>5&&(r+=`
6...and ${t.length-5} more`),o.message=`${a.description}${r}`,o.details=s.error,o}return tm(a)?(o.message=tb(a,e?.options?.query?.tag),o.details=s.error):"description"in a&&"string"==typeof a.description?(o.message=a.description,o.details=a):o.message=tw(t,s),o}function tm(t){return(0,te.u4)(t)&&"queryParseError"===t.type&&"string"==typeof t.query&&"number"==typeof t.start&&"number"==typeof t.end}function tb(t,e){let{query:r,start:n,end:i,description:s}=t;if(!r||typeof n>"u")return`GROQ query parse error: ${s}`;let o=e?`
7
8Tag: ${e}`:"";return`GROQ query parse error:
9${function(t,e,r){let n=t.split(tp),{start:i,end:s,markerLines:o}=function(t,e){let r={...t.start},n={...r,...t.end},i=r.line??-1,s=r.column??0,o=n.line,a=n.column,u=Math.max(i-3,0),c=Math.min(e.length,o+3);-1===i&&(u=0),-1===o&&(c=e.length);let l=o-i,h={};if(l)for(let t=0;t<=l;t++){let r=t+i;if(s)if(0===t){let t=e[r-1].length;h[r]=[s,t-s+1]}else if(t===l)h[r]=[0,a];else{let n=e[r-t].length;h[r]=[0,n]}else h[r]=!0}else s===a?s?h[i]=[s,0]:h[i]=!0:h[i]=[s,a-s];return{start:u,end:c,markerLines:h}}({start:td(e.start,n),end:e.end?td(e.end,n):void 0},n),a=`${s}`.length;return t.split(tp,s).slice(i,s).map((t,e)=>{let n=i+1+e,s=` ${` ${n}`.slice(-a)} |`,u=o[n],c=!o[n+1];if(!u)return` ${s}${t.length>0?` ${t}`:""}`;let l="";if(Array.isArray(u)){let e=t.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),n=u[1]||1;l=`
10 `+s.replace(/\d/g," ")+" "+e+"^".repeat(n),c&&r&&(l+=" "+r)}return">"+s+(t.length>0?` ${t}`:"")+l}).join(`
11`)}(r,{start:n,end:i},s)}${o}`}function tw(t,e){var r,n;let i="string"==typeof e?` (${n=100,(r=e).length>100?`${r.slice(0,n)}\u2026`:r})`:"",s=t.statusMessage?` ${t.statusMessage}`:"";return`${t.method}-request to ${t.url} resulted in HTTP ${t.statusCode}${s}${i}`}class t_ extends Error{projectId;addOriginUrl;constructor({projectId:t}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=t;let e=new URL(`https://sanity.io/manage/project/${t}/api`);if("u">typeof location){let{origin:t}=location;e.searchParams.set("cors","add"),e.searchParams.set("origin",t),this.addOriginUrl=e,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${e}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${e}`}}let tE={onResponse:(t,e)=>{if(t.statusCode>=500)throw new tg(t);if(t.statusCode>=400)throw new ty(t,e);return t}};function tx(t,e={}){return((t=[],e=v)=>(function t(e,r){let n=[],i=l.reduce((t,e)=>(t[e]=t[e]||[],t),{processOptions:[s],validateOptions:[u]});function o(t){let e,n=c.reduce((t,e)=>(t[e]=function(){let t=Object.create(null),e=0;return{publish:function(e){for(let r in t)t[r](e)},subscribe:function(r){let n=e++;return t[n]=r,function(){delete t[n]}}}}(),t),{}),s=function(t,e,...r){let n="onError"===t,s=e;for(let e=0;e<i[t].length&&(s=(0,i[t][e])(s,...r),!n||s);e++);return s},o=s("processOptions",t);s("validateOptions",o);let a={options:o,channels:n,applyMiddleware:s},u=n.request.subscribe(t=>{e=r(t,(e,r)=>((t,e,r)=>{let i=t,o=e;if(!i)try{o=s("onResponse",e,r)}catch(t){o=null,i=t}(i=i&&s("onError",i,r))?n.error.publish(i):o&&n.response.publish(o)})(e,r,t))});n.abort.subscribe(()=>{u(),e&&e.abort()});let l=s("onReturn",n,a);return l===n&&n.request.publish(a),l}return o.use=function(t){if(!t)throw Error("Tried to add middleware that resolved to fal
11sey value");if("function"==typeof t)throw Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(t.onReturn&&i.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return l.forEach(e=>{t[e]&&i[e].push(t[e])}),n.push(t),o},o.clone=()=>t(n,r),e.forEach(o.use),o})(t,e))([U({shouldRetry:tS}),...t,function(t={}){let e={},r=e=>void 0!==t.ignoreWarnings&&(Array.isArray(t.ignoreWarnings)?t.ignoreWarnings:[t.ignoreWarnings]).some(t=>"string"==typeof t?e.includes(t):t instanceof RegExp&&t.test(e));return{onResponse:t=>{let n=t.headers["x-sanity-warning"];for(let t of Array.isArray(n)?n:[n])!t||e[t]||r(t)||(e[t]=!0,console.warn(t));return t}}}(e),{processOptions:t=>{let e=t.body;return!e||"function"==typeof e.pipe||I(e)||-1===R.indexOf(typeof e)&&!Array.isArray(e)&&!function(t){if(!1===T(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!1!==T(r)&&!1!==r.hasOwnProperty("isPrototypeOf")}(e)?t:Object.assign({},t,{body:JSON.stringify(t.body),headers:Object.assign({},t.headers,{"Content-Type":"application/json"})})}},{onResponse:t=>{let e=t.headers["content-type"]||"",r=-1!==e.indexOf("application/json");return t.body&&e&&r?Object.assign({},t,{body:function(t){try{return JSON.parse(t)}catch(t){throw t.message=`Failed to parsed response body as JSON: ${t.message}`,t}}(t.body)}):t},processOptions:t=>Object.assign({},t,{headers:Object.assign({Accept:"application/json"},t.headers)})},{onRequest:t=>{if("xhr"!==t.adapter)return;let e=t.request,r=t.context;function n(t){return e=>{let n=e.lengthComputable?e.loaded/e.total*100:-1;r.channels.progress.publish({stage:t,percent:n,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=n("upload")),"onprogress"in e&&(e.onprogress=n("download"))}},tE,function(t={}){let e=t.implementation||A.Observable;if(!e)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(t,r)=>new e(e=>(t.error.subscribe(t=>e.error(t)),t.progress.subscribe(t=>e.next(Object.assign({type:"progress"},t))),t.response.subscribe(t=>{e.next(Object.assign({type:"response"},t)),e.complete()}),t.request.publish(r),()=>t.abort.publish()))}}({implementation:M.c})])}function tS(t,e,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,i=(r.uri||r.url).startsWith("/data/query"),s=t.response&&(429===t.response.statusCode||502===t.response.statusCode||503===t.response.statusCode);return(!!n||!!i)&&!!s||U.shouldRetry(t,e,r)}function tC(t){return"https://www.sanity.io/help/"+t}let tI=["image","file"],tT=["before","after","replace"],tR=t=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(t))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},t$=(t,e)=>{if(null===e||"object"!=typeof e||Array.isArray(e))throw Error(`${t}() takes an object of properties`)},tA=(t,e)=>{if("string"!=typeof e||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(e)||e.includes(".."))throw Error(`${t}(): "${e}" is not a valid document ID`)},tO=(t,e)=>{if(!e._id)throw Error(`${t}() requires that the document contains an ID ("_id" property)`);tA(t,e._id)},tq=(t,e)=>{if(!e._type)throw Error(`\`${t}()\` requires that the document contains a type (\`_type\` property)`);((t,e)=>{if("string"!=typeof e)throw Error(`\`${t}()\`: \`${e}\` is not a valid document type`)})(t,e._type)},tj=t=>{if(t.dataset)return t.dataset;let e=t.resource;if(e&&"dataset"===e.type){let t=e.id.split(".");if(2!==t.length)throw Error('Dataset resource ID must be in the format "project.dataset"');return t[1]}throw Error("`dataset` must be provided to perform queries")},tk=t=>{if("string"!=typeof t||!/^[a-z0-9._-]{1,75}$/i.test(t))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return t},tP=t=>{let e=t.resource;if(!e)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=e;switch(r){case"dataset":if(2!==n.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${r.toString()}`)}},tU=(t,e)=>{if(e.resource)throw Error(`\`${t}\` does not support resource-based operations`)},tM=t=>(function(t){let e=!1,r;return(...n)=>(e||(r=t(...n),e=!0),r)})((...e)=>console.warn(t.join(" "),...e)),tD=tM(["Because you set `withCredentials` to true, we will override your `useCdn`","setting to be false since (cookie-based) credentials are never set on the CDN"]),tN=tM(["Since you haven't set a value for `useCdn`, we will deliver content using our","global, edge-cached API-CDN. If you wish to have content delivered faster, set","`useCdn: false` to use the Live API. Note: You may incur higher costs using the live API."]),tL=tM(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),tB=tM(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),tF=tM(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${tC("js-client-browser-token")} for more information and how to hide this warning.`]),tz=tM(["You have configured Sanity client to use a token, but also provided `withCredentials: true`.","This is no longer supported - only token will be used - remove `withCredentials: true`."]),tV=tM(["Using the Sanity client without specifying an API version is deprecated.",`See ${tC("js-client-api-version")}`]),tH=(tM(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),tM(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),tW=tM(["The `~experimental_resource` configuration property has been renamed to `resource`.","Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version."]),tJ={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},tG=["localhost","127.0.0.1","0.0.0.0"];function tX(t){if(Array.isArray(t)&&t.length>1&&t.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let tY=(t,e)=>{let r,n={...e,...t,stega:{..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||tJ.stega,..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||{}}};n.apiVersion||tV();let i={...tJ,...n};i["~experimental_resource"]&&!i.resource&&(tW(),i.resource=i["~experimental_resource"]);let s=i.resource,o=i.useProjectHostname&&!s;if(typeof Promise>"u"){let t=tC("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${t}`)}if(o&&!i.projectId)throw Error("Configuration must contain `projectId`");if(s&&tP(i),"u">typeof i.perspective&&tX(i.perspective),"encodeSourceMap"in i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?");if("encodeSourceMapAtPath"in i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");
11if("boolean"!=typeof i.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${i.stega.enabled}`);if(i.stega.enabled&&void 0===i.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(i.stega.enabled&&"string"!=typeof i.stega.studioUrl&&"function"!=typeof i.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${i.stega.studioUrl}`);let a="u">typeof window&&window.location&&window.location.hostname,u=a&&(r=window.location.hostname,-1!==tG.indexOf(r)),c=!!i.token;i.withCredentials&&c&&(tz(),i.withCredentials=!1),a&&u&&c&&!0!==i.ignoreBrowserTokenWarning?tF():typeof i.useCdn>"u"&&tN(),o&&(t=>{if(!/^[-a-z0-9]+$/i.test(t))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(i.projectId),i.dataset&&tR(i.dataset),"requestTagPrefix"in i&&(i.requestTagPrefix=i.requestTagPrefix?tk(i.requestTagPrefix).replace(/\.+$/,""):void 0),i.apiVersion=`${i.apiVersion}`.replace(/^v/,""),i.isDefaultApi=i.apiHost===tJ.apiHost,!0===i.useCdn&&i.withCredentials&&tD(),i.useCdn=!1!==i.useCdn&&!i.withCredentials,function(t){if("1"===t||"X"===t)return;let e=new Date(t);if(!(/^\d{4}-\d{2}-\d{2}$/.test(t)&&e instanceof Date&&e.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(i.apiVersion);let l=i.apiHost.split("://",2),h=l[0],f=l[1],p=i.isDefaultApi?"apicdn.sanity.io":f;return o?(i.url=`${h}://${i.projectId}.${f}/v${i.apiVersion}`,i.cdnUrl=`${h}://${i.projectId}.${p}/v${i.apiVersion}
11`):(i.url=`${i.apiHost}/v${i.apiVersion}`,i.cdnUrl=i.url),i};class tQ extends Error{name="ConnectionFailedError"}class tZ extends Error{name="DisconnectError";reason;constructor(t,e,r={}){super(t,r),this.reason=e}}class tK extends Error{name="ChannelError";data;constructor(t,e){super(t),this.data=e}}class t0 extends Error{name="MessageError";data;constructor(t,e,r={}){super(t,r),this.data=e}}class t1 extends Error{name="MessageParseError"}let t2=["channelError","disconnect"];function t3(t,e){return(0,D.v)(()=>{let e=t();return(0,N.A)(e)?e:(0,L.of)(e)}).pipe((0,B.Z)(t=>{var r,n;return r=t,n=e,new M.c(t=>{let e=n.includes("open"),i=n.includes("reconnect");function s(e){if("data"in e){let[r,n]=t6(e);t.error(r?new t1("Unable to parse EventSource error message",{cause:n}):new t0((n?.data).message,n));return}r.readyState===r.CLOSED?t.error(new tQ("EventSource connection failed")):i&&t.next({type:"reconnect"})}function o(){t.next({type:"open"})}function a(e){let[n,i]=t6(e);if(n)return void t.error(new t1("Unable to parse EventSource message",{cause:n}));if("channelError"===e.type){let e=new URL(r.url).searchParams.get("tag");t.error(new tK(function(t,e){let r=t.error;return r?tm(r)?tb(r,e):r.description?r.description:"string"==typeof r?r:JSON.stringify(r,null,2):t.message||"Unknown listener error"}(i?.data,e),i.data));return}if("disconnect"===e.type)return void t.error(new tZ(`Server disconnected client: ${i.data?.reason||"unknown error"}`));t.next({type:e.type,id:e.lastEventId,...i.data?{data:i.data}:{}})}r.addEventListener("error",s),e&&r.addEventListener("open",o);let u=[...new Set([...t2,...n])].filter(t=>"error"!==t&&"open"!==t&&"reconnect"!==t);return u.forEach(t=>r.addEventListener(t,a)),()=>{r.removeEventListener("error",s),e&&r.removeEventListener("open",o),u.forEach(t=>r.removeEventListener(t,a)),r.close()}})}))}function t6(t){try{let e="string"==typeof t.data&&JSON.parse(t.data);return[null,{type:t.type,id:t.lastEventId,...!function(t){for(let e in t)return!1;return!0}(e)?{data:e}:{}}]}catch(t){return[t,null]}}function t8(t){if("string"==typeof t)return{id:t};if(Array.isArray(t))return{query:"*[_id in $ids]",params:{ids:t}};if("object"==typeof t&&null!==t&&"query"in t&&"string"==typeof t.query)return"params"in t&&"object"==typeof t.params&&null!==t.params?{query:t.query,params:t.params}:{query:t.query};let e=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(`
12`);throw Error(`Unknown selection - must be one of:
13
14${e}`)}class t9{selection;operations;constructor(t,e={}){this.selection=t,this.operations=e}set(t){return this._assign("set",t)}setIfMissing(t){return this._assign("setIfMissing",t)}diffMatchPatch(t){return t$("diffMatchPatch",t),this._assign("diffMatchPatch",t)}unset(t){if(!Array.isArray(t))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:t}),this}inc(t){return this._assign("inc",t)}dec(t){return this._assign("dec",t)}insert(t,e,r){return((t,e,r)=>{let n="insert(at, selector, items)";if(-1===tT.indexOf(t)){let t=tT.map(t=>`"${t}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${t}`)}if("string"!=typeof e)throw Error(`${n} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${n} takes an "items"-argument which must be an array`)})(t,e,r),this._assign("insert",{[t]:e,items:r})}append(t,e){return this.insert("after",`${t}[-1]`,e)}prepend(t,e){return this.insert("before",`${t}[0]`,e)}splice(t,e,r,n){let i=e<0?e-1:e,s=typeof r>"u"||-1===r?-1:Math.max(0,e+r),o=`${t}[${i}:${i<0&&s>=0?"":s}]`;return this.insert("replace",o,n||[])}ifRevisionId(t){return this.operations.ifRevisionID=t,this}serialize(){return{...t8(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(t,e,r=!0){return t$(t,e),this.operations=Object.assign({},this.operations,{[t]:Object.assign({},r&&this.operations[t]||{},e)}),this}_set(t,e){return this._assign(t,e,!1)}}class t4 extends t9{#a;constructor(t,e,r){super(t,e),this.#a=r}clone(){return new t4(this.selection,{...this.operations},this.#a)}commit(t){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let e=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},t);return this.#a.mutate({patch:this.serialize()},e)}}class t5 extends t9{#a;constructor(t,e,r){super(t,e),this.#a=r}clone(){return new t5(this.selection,{...this.operations},this.#a)}commit(t){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let e=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},t);return this.#a.mutate({patch:this.serialize()},e)}}let t7={returnDocuments:!1};class et{operations;trxId;constructor(t=[],e){this.operations=t,this.trxId=e}create(t){return t$("create",t),this._add({create:t})}createIfNotExists(t){let e="createIfNotExists";return t$(e,t),tO(e,t),this._add({[e]:t})}createOrReplace(t){let e="createOrReplace";return t$(e,t),tO(e,t),this._add({[e]:t})}delete(t){return tA("delete",t),this._add({delete:{id:t}})}transactionId(t){return t?(this.trxId=t,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(t){return this.operations.push(t),this}}class ee extends et{#a;constructor(t,e,r){super(t,r),this.#a=e}clone(){return new ee([...this.operations],this.#a,this.trxId)}commit(t){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},t7,t||{}))}patch(t,e){let r="function"==typeof e,n="string"!=typeof t&&t instanceof t5,i="object"==typeof t&&("query"in t||"id"in t);if(n)return this._add({patch:t.serialize()});if(r){let r=e(new t5(t,{},this.#a));if(!(r instanceof t5))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new t5(t,e||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}}class er extends et{#a;constructor(t,e,r){super(t,r),this.#a=e}clone(){return new er([...this.operations],this.#a,this.trxId)}commit(t){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},t7,t||{}))}patch(t,e){let r="function"==typeof e;if("string"!=typeof t&&t instanceof t4)return this._add({patch:t.serialize()});if(r){let r=e(new t4(t,{},this.#a));if(!(r instanceof t4))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}}let en=({query:t,params:e={},options:r={}})=>{let n=new URLSearchParams,{tag:i,includeMutations:s,returnQuery:o,...a}=r;for(let[r,s]of(i&&n.append("tag",i),n.append("query",t),Object.entries(e)))void 0!==s&&n.append(`$${r}`,JSON.stringify(s));for(let[t,e]of Object.entries(a))e&&n.append(t,`${e}`);return!1===o&&n.append("returnQuery","false"),!1===s&&n.append("includeMutations","fal
14se"),`?${n}`},ei=t=>"response"===t.type,es=t=>t.body;function eo(t,e,n,i,s={},o={}){let a="stega"in o?{...n||{},..."boolean"==typeof o.stega?{enabled:o.stega}:o.stega||{}}:n,u=a.enabled?(0,te.Q)(s):s,c=!1===o.filterResponse?t=>t:t=>t.result,{cache:l,next:h,...f}={useAbortSignal:"u">typeof o.signal,resultSourceMap:a.enabled?"withKeyArraySelector":o.resultSourceMap,...o,returnQuery:!1===o.filterResponse&&!1!==o.returnQuery},p=ew(t,e,"query",{query:i,params:u},"u">typeof l||"u">typeof h?{...f,fetch:{cache:l,next:h}}:f);return a.enabled?p.pipe(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tc.apply(void 0,(0,tr.fX)([],(0,tr.zs)(t)))}((0,F.H)(r.e(1214).then(r.bind(r,71214)).then(function(t){return t.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:t})=>t))),(0,K.T)(([t,e])=>{let r=e(t.result,t.resultSourceMap,a);return c({...t,result:r})})):p.pipe((0,K.T)(c))}function ea(t,e,r,n={}){let i={uri:eI(t,"doc",(()=>{if(!n.releaseId)return r;let t=(0,th._S)(r);if(!t){if((0,th.R8)(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return(0,th.ct)(r,n.releaseId)}if(t!==n.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${t}\` release, but this does not match the provided \`options.releaseId\` (\`${n.releaseId}\`)`);return r})()),json:!0,tag:n.tag,signal:n.signal,query:void 0!==n.includeAllVersions?{includeAllVersions:n.includeAllVersions}:void 0};return eS(t,e,i).pipe((0,tl.p)(ei),(0,K.T)(t=>{let e=t.body.documents;return e?n.includeAllVersions?e:e[0]:n.includeAllVersions?[]:void 0}))}function eu(t,e,r,n={}){let i={uri:eI(t,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return eS(t,e,i).pipe((0,tl.p)(ei),(0,K.T)(t=>{let e,n,i=(e=t.body.documents||[],n=t=>t._id,e.reduce((t,e)=>(t[n(e)]=e,t),Object.create(null)));return r.map(t=>i[t]||null)}))}function ec(t,e,r,n={}){return ew(t,e,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function el(t,e,r,n){return tO("createIfNotExists",r),e_(t,e,r,"createIfNotExists",n)}function eh(t,e,r,n){return tO("createOrReplace",r),e_(t,e,r,"createOrReplace",n)}function ef(t,e,r,n,i){return tO("createVersion",r),tq("createVersion",r),tH(),eb(t,e,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function ep(t,e,r,n,i,s,o){if(!n)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return tA("createVersion",n),tA("createVersion",r),eb(t,e,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?(0,th.ct)(r,i):(0,th.T4)(r),ifBaseRevisionId:s},o)}function ed(t,e,r,n){return ew(t,e,"mutate",{mutations:[{delete:t8(r)}]},n)}function ey(t,e,r,n=!1,i){return eb(t,e,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function eg(t,e,r,n){return tO("replaceVersion",r),tq("replaceVersion",r),eb(t,e,{actionType:"sanity.action.document.version.replace",document:r},n)}function ev(t,e,r,n,i){return eb(t,e,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function em(t,e,r,n){let i;return ew(t,e,"mutate",{mutations:Array.isArray(i=r instanceof t5||r instanceof t4?{patch:r.serialize()}:r instanceof ee||r instanceof er?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function eb(t,e,r,n){let i=Array.isArray(r)?r:[r],s=n&&n.transactionId||void 0;return ew(t,e,"actions",{actions:i,transactionId:s,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function ew(t,e,r,n,i={}){let s="mutate"===r,o="actions"===r,a=s||o?"":en(n),u=!s&&!o&&a.length<11264,c=u?a:"",l=i.returnFirst,{timeout:h,token:f,tag:p,headers:d,returnQuery:y,lastLiveEventId:g,cacheMode:v}=i,m={method:u?"GET":"POST",uri:eI(t,r,c),json:!0,body:u?void 0:n,query:s&&((t={})=>{let e,r;return{dryRun:t.dryRun,returnIds:!0,returnDocuments:(e=t.returnDocuments,r=!0,!1===e?void 0:typeof e>"u"?r:e),visibility:t.visibility||"sync",autoGenerateArrayKeys:t.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:t.skipCrossDatasetReferenceValidation}})(i),timeout:h,headers:d,token:f,tag:p,returnQuery:y,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(g)?g[0]:g,cacheMode:v,canUseCdn:"query"===r,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn};return eS(t,e,m).pipe((0,tl.p)(ei),(0,K.T)(es),(0,K.T)(t=>{if(!s)return t;let e=t.results||[];if(i.returnDocuments)return l?e[0]&&e[0].document:e.map(t=>t.document);let r=l?e[0]&&e[0].id:e.map(t=>
14t.id);return{transactionId:t.transactionId,results:e,[l?"documentId":"documentIds"]:r}}))}function e_(t,e,r,n,i={}){return ew(t,e,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let eE=t=>{let e=t.config();return void 0!==e.dataset&&void 0!==e.projectId||void 0!==e.resource},ex=(t,e)=>eE(t)&&e.startsWith(eI(t,"query"));function eS(t,e,r){var n;let i=r.url||r.uri,s=t.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(i.startsWith("/data/")||ex(t,i)||eE(t)&&i.startsWith(eI(t,"mutate"))||eE(t)&&i.startsWith(eI(t,"doc",""))||eE(t)&&i.startsWith(eI(t,"listen"))||eE(t)&&i.startsWith(eI(t,"history",""))):r.canUseCdn,a=(r.useCdn??s.useCdn)&&o,u=r.tag&&s.requestTagPrefix?[s.requestTagPrefix,r.tag].join("."):r.tag||s.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:tk(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&ex(t,i)){let t=r.resultSourceMap??s.resultSourceMap;void 0!==t&&!1!==t&&(r.query={resultSourceMap:t,...r.query});let e=r.perspective||s.perspective;"u">typeof e&&("previewDrafts"===e&&tB(),tX(e),r.query={perspective:Array.isArray(e)?e.join(","):e,...r.query},(Array.isArray(e)&&e.length>0||"previewDrafts"===e||"drafts"===e)&&a&&(a=!1,tL())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),a&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let c=function(t,e={}){let r={};t.headers&&Object.assign(r,t.headers);let n=e.token||t.token;n&&(r.Authorization=`Bearer ${n}`),e.useGlobalApi||t.useProjectHostname||!t.projectId||(r["X-Sanity-Project-ID"]=t.projectId);let i=!!(typeof e.withCredentials>"u"?t.withCredentials:e.withCredentials),s=typeof e.timeout>"u"?t.timeout:e.timeout;return Object.assign({},e,{headers:Object.assign({},r,e.headers||{}),timeout:typeof s>"u"?3e5:s,proxy:e.proxy||t.proxy,json:!0,withCredentials:i,fetch:"object"==typeof e.fetch&&"object"==typeof t.fetch?{...t.fetch,...e.fetch}:e.fetch||t.fetch})}(s,Object.assign({},r,{url:eT(t,i,a)})),l=new M.c(t=>e(c,s.requester).subscribe(t));return r.signal?l.pipe((n=r.signal,t=>new M.c(e=>{let r=()=>e.error(function(t){if(eR)return new DOMException(t?.reason??"The operation was aborted.","AbortError");let e=Error(t?.reason??"The operation was aborted.");return e.name="AbortError",e}(n));if(n&&n.aborted)return void r();let i=t.subscribe(e);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),i.unsubscribe()}}))):l}function eC(t,e,r){return eS(t,e,r).pipe((0,tl.p)(t=>"response"===t.type),(0,K.T)(t=>t.body))}function eI(t,e,r){let n=t.config();if(n.resource){tP(n);let t=e$(n),i=void 0!==r?`${e}/${r}`:e;return`${t}/${i}`.replace(/\/($|\?)/,"$1")}let i=tj(n),s=`/${e}/${i}`;return`/data${void 0!==r?`${s}/${r}`:s}`.replace(/\/($|\?)/,"$1")}function eT(t,e,r=!1){let{url:n,cdnUrl:i}=t.config();return`${r?i:n}/${e.replace(/^\//,"")}`}let eR=!!globalThis.DOMException,e$=t=>{let e=t.resource;if(!e)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=e;switch(r){case"dataset":{let t=n.split(".");if(2!==t.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${t[0]}/datasets/${t[1]}`}case"canvas":return`/canvases/${n}`;case"media-library":return`/media-libraries/${n}`;case"dashboard":return`/dashboards/${n}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function eA(t,e,r){let n=tj(t.config());return eC(t,e,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function eO(t,e,r){let n=tj(t.config());return eC(t,e,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function eq(t,e,r){let n=tj(t.config());return eC(t,e,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class ej{#a;#u;constructor(t,e){this.#a=t,this.#u=e}generate(t){return eA(this.#a,this.#u,t)}transform(t){return eO(this.#a,this.#u,t)}translate(t){return eq(this.#a,this.#u,t)}}class ek{#a;#u;constructor(t,e){this.#a=t,this.#u=e}generate(t){return(0,z.s)(eA(this.#a,this.#u,t))}transform(t){return(0,z.s)(eO(this.#a,this.#u,t))}translate(t){return(0,z.s)(eq(this.#a,this.#u,t))}prompt(t){return(0,z.s)(function(t,e,r){let n=tj(t.config());return eC(t,e,{method:"POST",uri:`/agent/action/prompt/${n}`,body:r})}(this.#a,this.#u,t))}patch(t){return(0,z.s)(function(t,e,r){let n=tj(t.config());return eC(t,e,{method:"POST",uri:`/agent/action/patch/${n}`,body:r})}(this.#a,this.#u,t))}}class eP{#a;#u;constructor(t,e){this.#a=t,this.#u=e}upload(t,e,r){return eM(this.#a,this.#u,t,e,r)}}class eU{#a;#u;
14constructor(t,e){this.#a=t,this.#u=e}upload(t,e,r){let n=eM(this.#a,this.#u,t,e,r);return(0,z.s)(n.pipe((0,tl.p)(t=>"response"===t.type),(0,K.T)(t=>t.body.document)))}}function eM(t,e,r,n,i={}){var s,o;if(-1===tI.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${tI.join(", ")}`);let a=i.extract||void 0;a&&!a.length&&(a=["none"]);let u=t.config(),c=(s=i,o=n,!(typeof File>"u")&&o instanceof File?Object.assign({filename:!1===s.preserveFilename?void 0:o.name,contentType:o.type},s):s),{tag:l,label:h,title:f,description:p,creditLine:d,filename:y,source:g}=c,v=u.resource?.type==="media-library",m=v?{title:f,filename:y}:{label:h,title:f,description:p,filename:y,meta:a,creditLine:d};return g&&!v&&(m.sourceId=g.id,m.sourceName=g.name,m.sourceUrl=g.url),eS(t,e,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(t,e){let r="image"===e?"images":"files",n=t.resource;if(n){let{type:t,id:e}=n;switch(t){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${e}/assets/${r}`;case"media-library":return`/media-libraries/${e}/upload`;case"dashboard":return`/dashboards/${e}/assets/${r}`;default:throw Error(`Unsupported resource type: ${t.toString()}`)}}let i=tj(t);return`assets/${r}/${i}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:m,body:n})}let eD=(0,D.v)(()=>r.e(8679).then(r.t.bind(r,88679,19))).pipe((0,K.T)(({default:t})=>t),(0,V.t)(1));function eN(){return function(t){return t.pipe((0,H.W)((t,e)=>t instanceof tQ?(0,W.x)((0,L.of)({type:"reconnect"}),(0,J.O)(1e3).pipe((0,B.Z)(()=>e))):(0,G.$)(()=>t)))}}let eL=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],eB={includeResult:!0};function eF(t,e,r={}){let{url:n,token:i,withCredentials:s,requestTagPrefix:o,headers:a}=this.config(),u=r.tag&&o?[o,r.tag].join("."):r.tag,c={...Object.keys(eB).concat(Object.keys(r)).reduce((t,e)=>(t[e]=typeof r[e]>"u"?eB[e]:r[e],t),{}),tag:u},l=en({query:t,params:e,options:{tag:u,...eL.reduce((t,e)=>(typeof c[e]>"u"||(t[e]=c[e]),t),{})}}),h=`${n}${eI(this,"listen",l)}`;if(h.length>14800)return(0,G.$)(()=>Error("Query too large for listener"));let f=c.events?c.events:["mutation"],p={};return s&&(p.withCredentials=!0),(i||a)&&(p.headers={},i&&(p.headers.Authorization=`Bearer ${i}`),a&&Object.assign(p.headers,a)),t3(()=>(typeof EventSource>"u"||p.headers?eD:(0,L.of)(EventSource)).pipe((0,K.T)(t=>new t(h,p))),f).pipe(eN(),(0,tl.p)(t=>f.includes(t.type)),(0,K.T)(t=>({type:t.type,..."data"in t?t.data:{}})))}let ez="2021-03-25";class eV{#a;constructor(t){this.#a=t}events({includeDrafts:t=!1,tag:e}={}){var r,n,i,s;let{projectId:o,apiVersion:a,token:u,withCredentials:c,requestTagPrefix:l,headers:h}=this.#a.config(),f=a.replace(/^v/,"");if("X"!==f&&f<ez)throw Error(`The live events API requires API version ${ez} or later. The current API version is ${f}. Please update your API version to use this feature.`);if(t&&!u&&!c)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let p=eI(this.#a,"live/events"),d=new URL(this.#a.getUrl(p,!1)),y=e&&l?[l,e].join("."):e;y&&d.searchParams.set("tag",y),t&&d.searchParams.set("includeDrafts","true");let g={};t&&c&&(g.withCredentials=!0),(t&&u||h)&&(g.headers={},t&&u&&(g.headers.Authorization=`Bearer ${u}`),h&&Object.assign(g.headers,h));let v=`${d.href}::${JSON.stringify(g)}`,m=eH.get(v);if(m)return m;let b=t3(()=>(typeof EventSource>"u"||g.headers?eD:(0,L.of)(EventSource)).pipe((0,K.T)(t=>new t(d.href,g))),["message","restart","welcome","reconnect","goaway"]),w=(n=d,i={method:"OPTIONS",mode:"cors",credentials:g.withCredentials?"include":"omit",headers:g.headers},new M.c(t=>{let e=new AbortController,r=e.signal;return fetch(n,{...i,signal:e.signal}).then(e=>{t.next(e),t.complete()},e=>{r.aborted||t.error(e)}),()=>e.abort()})).pipe((0,H.W)(()=>{throw new t_({projectId:o})})),_=b.pipe(eN(),(0,B.Z)(t=>"reconnect"===t.type?w.pipe((0,B.Z)(()=>(0,L.of)(t))):(0,L.of)(t)),(0,H.W)(t=>w.pipe((0,B.Z)(()=>{throw t}))),(0,K.T)(t=>{if("message"===t.type){let{data:e,...r}=t;return{...r,tags:e.tags}}return t})).pipe((0,Y.j)(()=>eH.delete(v)),(s="function"==typeof(r={predicate:t=>"welcome"===t.type})?{predicate:r,...void 0}:r,t=>{let e,r=!1,{predicate:n,...i}=s,o=t.pipe((0,X.M)(t=>{s.predicate(t)&&(r=!0,e=t)}),(0,Y.j)(()=>{r=!1,e=void 0}),(0,Q.u)(i)),a=new M.c(t=>{r&&t.next(e),t.complete()});return(0,Z.h)(o,a)}));return eH.set(v,_),_}}let eH=new Map;class eW{#a;#u;constructor(t,e){this.#a=t,this.#u=e}create(t,e){return eX(this.#a,this.#u,"PUT",t,e)}edit(t,e){return eX(this.#a,this.#u,"PATCH",t,e)}delete(t){return eX(this.#a,this.#u,"DELETE",t)}list(){tU("dataset",this.#a.config());let t=this.#a.config(),e=t.projectId,r="/datasets";return!1===t.useProjectHostname&&(r=`/projects/${e}/datasets`),eC(this.#a,this.#u,{uri:r,tag:null})}getEmbeddingsSettings(t){return tU("dataset",this.#a.config()),tR(t),eC(this.#a,this.#u,{uri:eG(this.#a,t),tag:null})}editEmbeddingsSettings(t,e){return tU("dataset",this.#a.config()),tR(t),eC(this.#a,this.#u,{method:"PUT",uri:eG(this.#a,t),body:e,tag:null})}}class eJ{#a;#u;constructor(t,e){this.#a=t,this.#u=e}create(t,e){return tU("dataset",this.#a.config()),(0,z.s)(eX(this.#a,this.#u,"PUT",t,e))}edit(t,e){return tU("dataset",this.#a.config()),(0,z.s)(eX(this.#a,this.#u,"PATCH",t,e))}delete(t){return tU("dataset",this.#a.config()),(0,z.s)(eX(this.#a,this.#u,"DELETE",t))}list(){tU("dataset",this.#a.config());let t=this.#a.config(),e=t.projectId,r="/datasets";return!1===t.useProjectHostname&&(r=`/projects/${e}/datasets`),(0,z.s)(eC(this.#a,this.#u,{uri:r,tag:null}))}getEmbeddingsSettings(t){return tU("dataset",this.#a.config()),tR(t),(0,z.s)(eC(this.#a,this.#u,{uri:eG(this.#a,t),tag:null}))}editEmbeddingsSettings(t,e){return tU("dataset",this.#a.config()),tR(t),(0,z.s)(eC(this.#a,this.#u,{method:"PUT",uri:eG(this.#a,t),body:e,tag:null}))}}function eG(t,e){let r=t.config();return!1===r.useProjectHostname?`/projects/${r.projectId}/datasets/${e}/settings/embeddings`:`/datasets/${e}/settings/embeddings`}function eX(t,e,r,n,i){return tU("dataset",t.config()),tR(n),eC(t,e,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class eY{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getPlaybackInfo(t,e={}){var r,n;let i=this.#a.config(),s=(i.resource||i["~experimental_resource"])?.id,{instanceId:o,library
14Id:a}=function(t){let e="object"==typeof t&&"_ref"in t?t._ref:t,r=eZ.exec(e);if(r){let[,t,e]=r;return{libraryId:t,instanceId:e}}if("string"==typeof t&&t.startsWith("video-"))return{instanceId:t};throw Error(`Invalid video asset instance identifier "${e}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}(t),u=a||s;if(!u)throw Error("Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR");let c=(r=o,n=u,`/media-libraries/${n}/video/${r}/playback-info`),l=function(t){let e={};if(t.transformations){let{thumbnail:r,animated:n,storyboard:i}=t.transformations;r&&(r.width&&(e.thumbnailWidth=r.width),r.height&&(e.thumbnailHeight=r.height),void 0!==r.time&&(e.thumbnailTime=r.time),r.fit&&(e.thumbnailFit=r.fit),r.format&&(e.thumbnailFormat=r.format)),n&&(n.width&&(e.animatedWidth=n.width),n.height&&(e.animatedHeight=n.height),void 0!==n.start&&(e.animatedStart=n.start),void 0!==n.end&&(e.animatedEnd=n.end),n.fps&&(e.animatedFps=n.fps),n.format&&(e.animatedFormat=n.format)),i&&i.format&&(e.storyboardFormat=i.format)}return t.expiration&&(e.expiration=t.expiration),e}(e);return eC(this.#a,this.#u,{method:"GET",uri:c,query:l})}}class eQ{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getPlaybackInfo(t,e={}){return(0,z.s)(new eY(this.#a.observable,this.#u).getPlaybackInfo(t,e))}}let eZ=/^media-library:(ml[^:]+):([^:]+)$/;class eK{#a;#u;constructor(t,e){this.#a=t,this.#u=e}list(t){let e={};return t?.includeMembers===!1&&(e.includeMembers="false"),t?.organizationId&&(e.organizationId=t.organizationId),t?.onlyExplicitMembership===!0&&(e.onlyExplicitMembership="true"),eC(this.#a,this.#u,{uri:"/projects",query:e})}getById(t){return eC(this.#a,this.#u,{uri:`/projects/${t}`})}}class e0{#a;#u;constructor(t,e){this.#a=t,this.#u=e}list(t){let e={};return t?.includeMembers===!1&&(e.includeMembers="false"),t?.organizationId&&(e.organizationId=t.organizationId),t?.onlyExplicitMembership===!0&&(e.onlyExplicitMembership="true"),(0,z.s)(eC(this.#a,this.#u,{uri:"/projects",query:e}))}getById(t){return(0,z.s)(eC(this.#a,this.#u,{uri:`/projects/${t}`}))}}let e1=(0,tf.d_)("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),e2=(t,e)=>e?(0,th.ct)(t,e):(0,th.T4)(t);function e3(t,{releaseId:e,publishedId:r,document:n}){if(r&&n._id){let t=e2(r,e);return((t,e)=>{if(e._id&&e._id!==t)throw Error(`The provided document ID (\`${e._id}\`) does not match the generated version ID (\`${t}\`)`)})(t,n),t}if(n._id){let r=(0,th.R8)(n._id),i=(0,th.A_)(n._id);if(!r&&!i)throw Error(`\`${t}()\` requires a document with an \`_id\` that is a version or draft ID`);if(e){if(r)throw Error(`\`${t}()\` was called with a document ID (\`${n._id}\`) that is a draft ID, but a release ID (\`${e}\`) was also provided.`);let i=(0,th._S)(n._id);if(i!==e)throw Error(`\`${t}()\` was called with a document ID (\`${n._id}\`) that is a version ID, but the release ID (\`${e}\`) does not match the document's version ID (\`${i}\`).`)}return n._id}if(r)return e2(r,e);throw Error(`\`${t}()\` requires either a publishedId or a document with an \`_id\``)}let e6=(t,e)=>{let[r,n,i]=((t,e)=>{if("object"==typeof t&&null!==t&&("releaseId"in t||"metadata"in t)){let{releaseId:r=e1(),metadata:n={}}=t;return[r,n,e]}return[e1(),{},t]})(t,e);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class e8{#a;#u;constructor(t,e){this.#a=t,this.#u=e}get({releaseId:t},e){return ea(this.#a,this.#u,`_.releases.${t}`,e)}create(t,e){let{action:r,options:n}=e6(t,e),{releaseId:i,metadata:s}=r;return eb(this.#a,this.#u,r,n).pipe((0,K.T)(t=>({...t,releaseId:i,metadata:s})))}edit({releaseId:t,patch:e},r){return eb(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:t,patch:e},r)}publish({releaseId:t},e){return eb(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:t},e)}archive({releaseId:t},e){return eb(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:t},e)}unarchive({releaseId:t},e){return eb(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:t},e)}schedule({releaseId:t,publishAt:e},r){return eb(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:t,publishAt:e},r)}unschedule({releaseId:t},e){return eb(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:t},e)}delete({releaseId:t},e){return eb(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:t},e)}fetchDocuments({releaseId:t},e){return ec(this.#a,this.#u,t,e)}}class e9{#a;#u;constructor(t,e){this.#a=t,this.#u=e}get({releaseId:t},e){return(0,z.s)(ea(this.#a,this.#u,`_.releases.${t}`,e))}async create(t,e){let{action:r,options:n}=e6(t,e),{releaseId:i,metadata:s}=r;return{...await (0,z.s)(eb(this.#a,this.#u,r,n)),releaseId:i,metadata:s}}edit({releaseId:t,patch:e},r){return(0,z.s)(eb(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:t,patch:e},r))}publish({releaseId:t},e){return(0,z.s)(eb(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:t},e))}archive({releaseId:t},e){return(0,z.s)(eb(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:t},e))}unarchive({releaseId:t},e){return(0,z.s)(eb(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:t},e))}schedule({releaseId:t,publishAt:e},r){return(0,z.s)(eb(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:t,publishAt:e},r))}unschedule({releaseId:t},e){return(0,z.s)(eb(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:t},e))}delete({releaseId:t},e){return(0,z.s)(eb(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:t},e))}fetchDocuments({releaseId:t},e){return(0,z.s)(ec(this.#a,this.#u,t,e))}}class e4{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getById(t){return eC(this.#a,this.#u,{uri:`/users/${t}`})}}class e5{#a;#u;
14constructor(t,e){this.#a=t,this.#u=e}getById(t){return(0,z.s)(eC(this.#a,this.#u,{uri:`/users/${t}`}))}}class e7{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#u;listen=eF;constructor(t,e=tJ){this.config(e),this.#u=t,this.assets=new eP(this,this.#u),this.datasets=new eW(this,this.#u),this.live=new eV(this),this.mediaLibrary={video:new eY(this,this.#u)},this.projects=new eK(this,this.#u),this.users=new e4(this,this.#u),this.agent={action:new ej(this,this.#u)},this.releases=new e8(this,this.#u)}clone(){return new e7(this.#u,this.config())}config(t){if(void 0===t)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#c=tY(t,this.#c||{}),this}withConfig(t){let e=this.config();return new e7(this.#u,{...e,...t,stega:{...e.stega||{},..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(t,e,r){return eo(this,this.#u,this.#c.stega,t,e,r)}getDocument(t,e){if(e?.includeAllVersions===!0)return ea(this,this.#u,t,{...e,includeAllVersions:!0});let r={signal:e?.signal,tag:e?.tag,releaseId:e?.releaseId,...e&&"includeAllVersions"in e?{includeAllVersions:!1}:{}};return ea(this,this.#u,t,r)}getDocuments(t,e){return eu(this,this.#u,t,e)}create(t,e){return e_(this,this.#u,t,"create",e)}createIfNotExists(t,e){return el(this,this.#u,t,e)}createOrReplace(t,e){return eh(this,this.#u,t,e)}createVersion({document:t,publishedId:e,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!t)return ep(this,this.#u,e,n,r,i,s);let o=e3("createVersion",{document:t,publishedId:e,releaseId:r}),a={...t,_id:o},u=e||(0,th.IM)(t._id);return ef(this,this.#u,a,u,s)}delete(t,e){return ed(this,this.#u,t,e)}discardVersion({releaseId:t,publishedId:e},r,n){let i=e2(e,t);return ey(this,this.#u,i,r,n)}replaceVersion({document:t,publishedId:e,releaseId:r},n){let i=e3("replaceVersion",{document:t,publishedId:e,releaseId:r}),s={...t,_id:i};return eg(this,this.#u,s,n)}unpublishVersion({releaseId:t,publishedId:e},r){let n=(0,th.ct)(e,t);return ev(this,this.#u,n,e,r)}mutate(t,e){return em(this,this.#u,t,e)}patch(t,e){return new t4(t,e,this)}transaction(t){return new er(t,this)}action(t,e){return eb(this,this.#u,t,e)}request(t){return eC(this,this.#u,t)}getUrl(t,e){return eT(this,t,e)}getDataUrl(t,e){return eI(this,t,e)}}class rt{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#u;listen=eF;constructor(t,e=tJ){this.config(e),this.#u=t,this.assets=new eU(this,this.#u),this.datasets=new eJ(this,this.#u),this.live=new eV(this),this.mediaLibrary={video:new eQ(this,this.#u)},this.projects=new e0(this,this.#u),this.users=new e5(this,this.#u),this.agent={action:new ek(this,this.#u)},this.releases=new e9(this,this.#u),this.observable=new e7(t,e)}clone(){return new rt(this.#u,this.config())}config(t){if(void 0===t)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(t),this.#c=tY(t,this.#c||{}),this}withConfig(t){let e=this.config();return new rt(this.#u,{...e,...t,stega:{...e.stega||{},..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(t,e,r){return(0,z.s)(eo(this,this.#u,this.#c.stega,t,e,r))}getDocument(t,e){if(e?.includeAllVersions===!0)return(0,z.s)(ea(this,this.#u,t,{...e,includeAllVersions:!0}));let r={signal:e?.signal,tag:e?.tag,releaseId:e?.releaseId,...e&&"includeAllVersions"in e?{includeAllVersions:!1}:{}};return(0,z.s)(ea(this,this.#u,t,r))}getDocuments(t,e){return(0,z.s)(eu(this,this.#u,t,e))}create(t,e){return(0,z.s)(e_(this,this.#u,t,"create",e))}createIfNotExists(t,e){return(0,z.s)(el(this,this.#u,t,e))}createOrReplace(t,e){return(0,z.s)(eh(this,this.#u,t,e))}createVersion({document:t,publishedId:e,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!t)return(0,tt._)(ep(this,this.#u,e,n,r,i,s));let o=e3("createVersion",{document:t,publishedId:e,releaseId:r}),a={...t,_id:o},u=e||(0,th.IM)(t._id);return(0,tt._)(ef(this,this.#u,a,u,s))}delete(t,e){return(0,z.s)(ed(this,this.#u,t,e))}discardVersion({releaseId:t,publishedId:e},r,n){let i=e2(e,t);return(0,z.s)(ey(this,this.#u,i,r,n))}replaceVersion({document:t,publishedId:e,releaseId:r},n){let i=e3("replaceVersion",{document:t,publishedId:e,releaseId:r}),s={...t,_id:i};return(0,tt._)(eg(this,this.#u,s,n))}unpublishVersion({releaseId:t,publishedId:e},r){let n=(0,th.ct)(e,t);return(0,z.s)(ev(this,this.#u,n,e,r))}mutate(t,e){return(0,z.s)(em(this,this.#u,t,e))}patch(t,e){return new t5(t,e,this)}transaction(t){return new ee(t,this)}action(t,e){return(0,z.s)(eb(this,this.#u,t,e))}request(t){return(0,z.s)(eC(this,this.#u,t))}dataRequest(t,e,r){return(0,z.s)(ew(this,this.#u,t,e,r))}getUrl(t,e){return eT(this,t,e)}getDataUrl(t,e){return eI(this,t,e)}}let re=function(t,e){return{requester:tx(t),createClient:r=>{let n=tx(t,{ignoreWarnings:r.ignoreWarnings});return new e((t,e)=>(e||n)({maxRedirects:0,maxRetries:r.maxRetries,retryDelay:r.retryDelay,lineage:r.lineage,...t}),r)}}}([],rt),rr=(re.requester,re.createClient)},76656:(t,e,r)=>{"use strict";r.d(e,{K:()=>i});var n=Array.isArray;function i(t){return 1===t.length&&n(t[0])?t[0]:t}},77133:(t,e,r)=>{"use strict";r.d(e,{W:()=>function t(e){return(0,s.N)(function(r,s){var o,a=null,u=!1;a=r.subscribe((0,i._)(s,void 0,void 0,function(i){o=(0,n.Tg)(e(i,t(e)(r))),a?(a.unsubscribe(),a=null,o.subscribe(s)):u=!0})),u&&(a.unsubscribe(),a=null,o.subscribe(s))})}});var n=r(8286),i=r(28400),s=r(96948)},77163:(t,e,r)=>{"use strict";function n(t){return t}r.d(e,{D:()=>n})},77241:(t,e,r)=>{"use strict";r.d(e,{u:()=>u});var n=r(71450),i=r(8286),s=r(31536),o=r(28786),a=r(96948);function u(t){void 0===t&&(t={});var e=t.connector,r=void 0===e?function(){return new s.B}:e,n=t.resetOnError,u=void 0===n||n,l=t.resetOnComplete,h=void 0===l||l,f=t.resetOnRefCountZero,p=void 0===f||f;return function(t){var e,n,s,l=0,f=!1,d=!1,y=function(){null==n||n.unsubscribe(),n=void 0},g=function(){y(),e=s=void 0,f=d=!1},v=function(){var t=e;g(),null==t||t.unsubscribe()};return(0,a.N)(function(t,a){l++,d||f||y();var m=s=null!=s?s:r();a.add(function(){0!=--l||d||f||(n=c(v,p))}),m.subscribe(a),!e&&l>0&&(e=new o.Ms({next:function(t){return m.next(t)},error:function(t){d=!0,y(),n=c(g,u,t),m.error(t)},complete:function(){f=!0,y(),n=c(g,h),m.complete()}}),(0,i.Tg)(t).subscribe(e))})(t)}}function c(t,e){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(!0===e)return void t();if(!1!==e){var a=new o.Ms({next:function(){a.unsubscribe(),t()}});return(0,i.Tg)(e.apply(void 0,(0,n.fX)([],(0,n.zs)(r)))).subscribe(a)}}},78242:(t,e,r)=>{"use strict";r.d(e,{v:()=>s});var n=r(45037),i=r(8286);function s(t){return new n.c(function(e){(0,i.Tg)(t()).subscribe(e)})}},81029:(t,e,r)=>{"use strict";var n=r(51746),i=r(55459),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(t){if(t>
vendor: 18,928 bytes, line 14
140x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t){var n=t,i=e;if(("string"!=typeof i||""===i)&&(i="utf8"),!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);var s=0|d(n,i),u=o(s),c=u.write(n,i);return c!==s&&(u=u.slice(0,c)),u}if(ArrayBuffer.isView(t)){var l=t;if($(l,Uint8Array)){var y=new Uint8Array(l);return f(y.buffer,y.byteOffset,y.byteLength)}return h(l)}if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&($(t,SharedArrayBuffer)||t&&$(t.buffer,SharedArrayBuffer)))return f(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var g=t.valueOf&&t.valueOf();if(null!=g&&g!==t)return a.from(g,e,r);var v=function(t){if(a.isBuffer(t)){var e=0|p(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?o(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(v)return v;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),o(t<0?0:0|p(t))}function h(t){for(var e=t.length<0?0:0|p(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function f(t,e,r){var n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),a.prototype),n}function p(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return T(t).length;default:if(i)return n?-1:I(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){var i,s,o,a=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=A[t[s]];return i}(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":return i=this,s=e,o=r,0===s&&o===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(s,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}(this,e,r);default:if(a)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){var s;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(s=r*=1)!=s&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length)if(i)return -1;else r=t.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e){if(e&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(t,e,r);else return Uint8Array.prototype.lastIndexOf.call(t,e,r);return m(t,[e],r,n,i)}throw TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var s,o=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;o=2,a/=2,u/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var l=-1;for(s=r;s<a;s++)if(c(t,s)===c(e,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===u)return l*o}else -1!==l&&(s-=s-l),l=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){for(var h=!0,f=0;f<u;f++)if(c(t,s+f)!==c(e,f)){h=!1;break}if(h)return s}return -1}function b(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s,o,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:(192&(s=t[i+1]))==128&&(u=(31&c)<<6|63&s)>127&&(l=u);break;case 3:s=t[i+1],o=t[i+2],(192&s)==128&&(192&o)==128&&(u=(15&c)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:s=t[i+1],o=t[i+2],a=t[i+3],(192&s)==128&&(192&o)==128&&(192&a)==128&&(u=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}var f=n,p=f.length;if(p<=4096)return String.fromCharCode.apply(String,f);for(var d="",y=0;y<p;)d+=String.fromCharCode.apply(String,f.slice(y,y+=4096));return d}function w(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function _(t,e,r,n,i,s){if(!a.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function E(t,e,r,n,i,s){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function x(t,e,r,n,s){return e*=1,r>>>=0,s||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function S(t,e,r,n,s){return e*=1,r>>>=0,s||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.hp=a,e.IS=50,a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return(c(t),t<=0)?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if($(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),$(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:+(n<r)},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;var r,n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if($(s,Uint8Array))i+s.length>n.length?a.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else if(a.isBuffer(s))s.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=s.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):y.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},s&&(a.prototype[s]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,i){if($(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var s=i-n,o=r-e,u=Math.min(s,o),c=this.slice(n,i),l=t.slice(e,r),h=0;h<u;++h)if(c[h]!==l[h]){s=c[h],o=l[h];break}return s<o?-1:+(o<s)},a.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,s,o,a,u,c,l,h,f=this.length-e;if((void 0===r||r>f)&&(r=f),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=e.length;n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a,u=parseInt(e.substr(2*o,2),16);if((a=u)!=a)break;t[r+o]=u}return o}(this,t,e,r);case"utf8":case"utf-8":return i=e,s=r,R(I(t,this.length-i),this,i,s);case"ascii":case"latin1":case"binary":return o=e,a=r,R(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,o,a);case"base64":return u=e,c=r,R(T(t),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,h=r,R(function(t,e){for(var r,n,i=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,h);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||w(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=e,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*e)),s},a.prototype.readInt8=function(t,e){return(t>>>=0,e||w(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||w(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||w(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||w(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||w(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||w(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||w(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,t,e,r,i,0)}var s=1,o=0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=t/s&255;return e+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,t,e,r,i,0)}var s=r-1,o=1;for(this[e+s]=255&t;--s>=0&&(o*=256);)this[e+s]=t/o&255;return e+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,t,e,r,i-1,-i)}var s=0,o=1,a=0;for(this[e]=255&t;++s<r&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o|0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,t,e,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o|0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t*=1,e>>>=0,r||_(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return x(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return x(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return S(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return S(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var i,s=t.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(t=s)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var o=a.isBuffer(t)?t:a.from(t,n),u=o.length;
14if(0===u)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%u]}return this};var C=/[^+/0-9A-Za-z-_]/g;function I(t,e){e=e||1/0;for(var r,n=t.length,i=null,s=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319||o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function T(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function R(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var A=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},81933:(t,e,r)=>{"use strict";r.d(e,{U:()=>s});var n=r(60732),i=r(77163);function s(t){return void 0===t&&(t=1/0),(0,n.Z)(i.D,t)}},82241:(t,e,r)=>{"use strict";r.d(e,{X:()=>n});var n=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},82323:(t,e,r)=>{"use strict";r.d(e,{S:()=>a});var n=r(71450),i=r(96948),s=r(28400),o=r(12668);function a(t,e){return void 0===e&&(e=null),e=null!=e?e:t,(0,i.N)(function(r,i){var a=[],u=0;r.subscribe((0,s._)(i,function(r){var s,c,l,h,f=null;u++%e==0&&a.push([]);try{for(var p=(0,n.Ju)(a),d=p.next();!d.done;d=p.next()){var y=d.value;y.push(r),t<=y.length&&(f=null!=f?f:[]).push(y)}}catch(t){s={error:t}}finally{try{d&&!d.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}if(f)try{for(var g=(0,n.Ju)(f),v=g.next();!v.done;v=g.next()){var y=v.value;(0,o.o)(a,y),i.next(y)}}catch(t){l={error:t}}finally{try{v&&!v.done&&(h=g.return)&&h.call(g)}finally{if(l)throw l.error}}},function(){var t,e;try{for(var r=(0,n.Ju)(a),s=r.next();!s.done;s=r.next()){var o=s.value;i.next(o)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}i.complete()},void 0,function(){a=null}))})}},83572:(t,e,r)=>{"use strict";function n(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}r.d(e,{Q:()=>u,u4:()=>n});var i={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},s={0:8203,1:8204,2:8205,3:65279};[,,,,].fill(String.fromCodePoint(s[0])).join(""),Object.fromEntries(Object.entries(s).map(t=>t.reverse())),Object.fromEntries(Object.entries(i).map(t=>t.reverse()));var o=`${Object.values(i).map(t=>`\\u{${t.toString(16)}}`).join("")}`,a=RegExp(`[${o}]{4,}`,"gu");function u(t){var e,r;return t&&JSON.parse({cleaned:(e=JSON.stringify(t)).replace(a,""),encoded:(null==(r=e.match(a))?void 0:r[0])||""}.cleaned)}},85755:(t,e,r)=>{"use strict";r.d(e,{of:()=>s});var n=r(95868),i=r(86238);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(0,n.lI)(t);return(0,i.H)(t,r)}},86238:(t,e,r)=>{"use strict";r.d(e,{H:()=>s});var n=r(96904),i=r(8286);function s(t,e){return e?(0,n.c)(t,e):(0,i.Tg)(t)}},88106:(t,e,r)=>{"use strict";r.d(e,{J:()=>o});var n=r(33670);let i=n.createContext(!0);function s(){throw Error("A function wrapped in useEffectEvent can't be called during rendering.")}function o(t){let e=n.useRef(s);n.useInsertionEffect(()=>{e.current=t},[t]);let[r]=n.useState(()=>(...t)=>((()=>{try{return n.use(i)}catch{return!1}})()&&s(),(0,e.current)(...t)));return r}},89526:(t,e,r)=>{"use strict";r.d(e,{m:()=>i});var n=r(39097);function i(t){return t&&(0,n.T)(t.schedule)}},89577:(t,e,r)=>{"use strict";r.d(e,{F:()=>i,m:()=>s});var n=r(77163);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return s(t)}function s(t){return 0===t.length?n.D:1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}}},90848:(t,e,r)=>{"use strict";r.d(e,{DT:()=>f,mj:()=>function t({schemas:e,actors:r,actions:s,guards:o,delays:a}){return{assign:i.a,sendTo:h.s,raise:n.r,log:h.l,cancel:n.a,stopChild:n.s,enqueueActions:h.e,emit:h.a,spawnChild:n.b,createStateConfig:t=>t,createAction:t=>t,createMachine:t=>new l({...t,schemas:e},{actors:r,actions:s,guards:o,delays:a}),extend:n=>t({schemas:e,actors:r,actions:{...s,...n.actions},guards:{...o,...n.guards},delays:{...a,...n.delays}})}}}),r(40609);var n=r(24933),i=r(46674);let s=new WeakMap;function o(t,e,r){let n=s.get(t);return n?e in n||(n[e]=r()):(n={[e]:r()},s.set(t,n)),n[e]}let a={},u=t=>"string"==typeof t?{type:t}:"function"==typeof t?"resolve"in t?{type:t.type}:{type:t.name}:t;class c{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.y)(this.config.states,(t,e)=>new c(t,{_parent:this,_key:e,_machine:this.machine})):a,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for c
14ompound 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.z)(this),this.config.always&&(this.always=(0,n.B)(this.config.always).map(t=>(0,n.C)(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.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(u),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(u),eventType:null})}:void 0,history:this.history,states:(0,n.y)(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(u)})),entry:this.entry.map(u),exit:this.exit.map(u),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:r,systemId:i}=t,s=t.id??(0,n.E)(this.id,e),o="string"==typeof r?r:`xstate.invoke.${(0,n.E)(this.id,e)}`;return{...t,src:o,id:s,systemId:i,toJSON(){let{onDone:e,onError:r,...n}=t;return{...n,type:"xstate.invoke",src:o,id:s}}}}))}get on(){return o(this,"on",()=>[...this.transitions].flatMap(([t,e])=>e.map(e=>[t,e])).reduce((t,[e,r])=>(t[e]=t[e]||[],t[e].push(r),t),{}))}get after(){return o(this,"delayedTransitions",()=>(0,n.F)(this))}get initial(){return o(this,"initial",()=>(0,n.G)(this,this.config.initial))}next(t,e){let r,i=e.type,s=[];for(let a of o(this,`candidates-${i}`,()=>(0,n.H)(this,i))){let{guard:o}=a,u=t.context,c=!1;try{c=!o||(0,n.D)(o,u,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}':
15${e.message}`)}if(c){s.push(...a.actions),r=a;break}}return r?[r]:void 0}get events(){return o(this,"events",()=>{let{states:t}=this,e=new Set(this.ownEvents);if(t)for(let r of Object.keys(t)){let n=t[r];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 l{constructor(t,e){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:e?.actors??{},actions:e?.actions??{},delays:e?.delays??{},guards:e?.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 c(t,{_key:this.id,_machine:this}),this.root._initialize(),(0,n.I)(this.root),this.states=this.root.states,this.events=this.root.events}provide(t){let{actions:e,guards:r,actors:n,delays:i}=this.implementations;return new l(this.config,{actions:{...e,...t.actions},guards:{...r,...t.guards},actors:{...n,...t.actors},delays:{...i,...t.delays}})}resolveState(t){let e=(0,n.J)(this.root,t.value),r=(0,n.K)((0,n.p)(this.root,e));return(0,n.L)({_nodes:[...r],context:t.context||{},children:{},status:(0,n.M)(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,e,r){return(0,n.d)(t,e,r,[]).snapshot}microstep(t,e,r){return(0,n.d)(t,e,r,[]).microsteps.map(([t])=>t)}getTransitionData(t,e){return(0,n.O)(this.root,t.value,t,e)||[]}
15_getPreInitialState(t,e,r){let{context:s}=this.config,o=(0,n.L)({context:"function"!=typeof s&&s?s:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof s?(0,n.P)(o,e,t,[(0,i.a)(({spawn:t,event:e,self:r})=>s({spawn:t,input:e.input,self:r}))],r,void 0):o}getInitialSnapshot(t,e){let r=(0,n.e)(e),i=[],s=this._getPreInitialState(t,r,i),[o]=(0,n.i)(this.root,s,t,r,i),{snapshot:a}=(0,n.d)(o,r,t,i);return a}start(t){Object.values(t.children).forEach(t=>{"active"===t.getSnapshot().status&&t.start()})}getStateNodeById(t){let e=(0,n.Q)(t),r=e.slice(1),i=(0,n.R)(e[0])?e[0].slice(1):e[0],s=this.idMap.get(i);if(!s)throw Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return(0,n.T)(s,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,e){return(0,n.U)(t,e)}restoreSnapshot(t,e){let r={},i=t.children;Object.keys(i).forEach(t=>{let s=i[t],o=s.snapshot,a=s.src,u="string"==typeof a?(0,n.V)(this,a):a;if(!u)return;let c=(0,n.c)(u,{id:t,parent:e.self,syncSnapshot:s.syncSnapshot,snapshot:o,src:a,systemId:s.systemId});r[t]=c});let s=function(t,e){if(!e||"object"!=typeof e)return{};let r={};for(let n in e)for(let i of e[n]){let e=function(t,e){if(e instanceof c)return e;try{return t.machine.getStateNodeById(e.id)}catch{}}(t,i);e&&(r[n]??=[],r[n].push(e))}return r}(this.root,t.historyValue),o=(0,n.L)({...t,children:r,_nodes:Array.from((0,n.K)((0,n.p)(this.root,t.value))),historyValue:s},this),a=new Set;return!function t(e,r){if(!a.has(e))for(let i in a.add(e),e){let s=e[i];if(s&&"object"==typeof s){if("xstate$$type"in s&&s.xstate$$type===n.$){e[i]=r[s.id];continue}t(s,r)}}}(o.context,r),o}}var h=r(26035);function f(t,e){let r=(0,n.t)(e);if(!r.some(e=>(0,n.m)(t.type,e))){let e=1===r.length?`type matching "${r[0]}
15"`:`one of types matching "${r.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(t)} to have ${e}`)}}},91239:(t,e,r)=>{"use strict";r.d(e,{U:()=>n});var n={now:function(){return(n.delegate||Date).now()},delegate:void 0}},93261:(t,e,r)=>{"use strict";r.d(e,{A_:()=>o,IM:()=>h,R8:()=>s,T4:()=>u,_4:()=>a,_S:()=>l,ct:()=>c});let n="drafts.",i="versions.";function s(t){return t.startsWith(n)}function o(t){return t.startsWith(i)}function a(t){return!s(t)&&!o(t)}function u(t){return o(t)?n+h(t):s(t)?t:n+t}function c(t,e){if("drafts"===e||"published"===e)throw Error('Version can not be "published" or "drafts"');return`${i}${e}.${h(t)}`}function l(t){if(!o(t))return;let[e,r]=t.split(".");return r}function h(t){return o(t)?t.split(".").slice(2).join("."):s(t)?t.slice(n.length):t}},95868:(t,e,r)=>{"use strict";r.d(e,{R0:()=>u,lI:()=>a,ms:()=>o});var n=r(39097),i=r(89526);function s(t){return t[t.length-1]}function o(t){return(0,n.T)(s(t))?t.pop():void 0}function a(t){return(0,i.m)(s(t))?t.pop():void 0}function u(t,e){return"number"==typeof s(t)?t.pop():e}},96904:(t,e,r)=>{"use strict";r.d(e,{c:()=>m});var n=r(8286),i=r(41423),s=r(71203),o=r(45037),a=r(69899),u=r(39097),c=r(20437);function l(t,e){if(!t)throw Error("Iterable cannot be null");return new o.c(function(r){(0,c.N)(r,e,function(){var n=t[Symbol.asyncIterator]();(0,c.N)(r,e,function(){n.next().then(function(t){t.done?r.complete():r.next(t.value)})},0,!0)})})}var h=r(99455),f=r(73694),p=r(82241),d=r(45907),y=r(74073),g=r(50933),v=r(31590);function m(t,e){if(null!=t){if((0,h.l)(t))return(0,n.Tg)(t).pipe((0,s._)(e),(0,i.Q)(e));if((0,p.X)(t))return new o.c(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})});if((0,f.y)(t))return(0,n.Tg)(t).pipe((0,s._)(e),(0,i.Q)(e));if((0,y.T)(t))return l(t,e);if((0,d.x)(t))return new o.c(function(r){var n;return(0,c.N)(r,e,function(){n=t[a.l](),(0,c.N)(r,e,function(){var t,e,i;try{e=(t=n.next()).value,i=t.done}catch(t){r.error(t);return}i?r.complete():r.next(e)},0,!0)}),function(){return(0,u.T)(null==n?void 0:n.return)&&n.return()}});if((0,v.U)(t))return l((0,v.C)(t),e)}throw(0,g.L)(t)}},96948:(t,e,r)=>{"use strict";r.d(e,{N:()=>s,S:()=>i});var n=r(39097);function i(t){return(0,n.T)(null==t?void 0:t.lift)}function s(t){return function(e){if(i(e))return e.lift(function(e){try{return t(e,this)}catch(t){this.error(t)}});throw TypeError("Unable to lift unknown Observable type")}}},99148:(t,e,r)=>{"use strict";r.d(e,{P:()=>p,z:()=>f});var n=r(45037),i=r(69675),s=r(86238),o=r(77163),a=r(59728),u=r(95868),c=r(69530),l=r(28400),h=r(20437);function f(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(0,u.lI)(t),l=(0,u.ms)(t),h=(0,i.D)(t),f=h.args,d=h.keys;if(0===f.length)return(0,s.H)([],r);var y=new n.c(p(f,r,d?function(t){return(0,c.e)(d,t)}:o.D));return l?y.pipe((0,a.I)(l)):y}function p(t,e,r){return void 0===r&&(r=o.D),function(n){d(e,function(){for(var i=t.length,o=Array(i),a=i,u=i,c=function(i){d(e,function(){var c=(0,s.H)(t[i],e),h=!1;c.subscribe((0,l._)(n,function(t){o[i]=t,!h&&(h=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},h=0;h<i;h++)c(h)},n)}}function d(t,e,r){t?(0,h.N)(r,t,e):e()}},99455:(t,e,r)=>{"use strict";r.d(e,{l:()=>s});var n=r(60488),i=r(39097);function s(t){return(0,i.T)(t[n.s])}}}]);

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.