tempest.games 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Od=Object.defineProperty;var Md=(e,t,n)=>t in e?Od(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var C=(e,t,n)=>Md(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Da={exports:{}},to={},Ba={exports:{}},j={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var Id=Object.defineProperty;var jd=(e,t,n)=>t in e?Id(e,t,{enumerable:!0,config
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Br=Symbol.for("react.element"),
|
|
9
|
+
*/var Br=Symbol.for("react.element"),Ad=Symbol.for("react.portal"),Pd=Symbol.for("react.fragment"),$d=Symbol.for("react.strict_mode"),Ld=Symbol.for("react.profiler"),Id=Symbol.for("react.provider"),jd=Symbol.for("react.context"),zd=Symbol.for("react.forward_ref"),Fd=Symbol.for("react.suspense"),Dd=Symbol.for("react.memo"),Bd=Symbol.for("react.lazy"),ku=Symbol.iterator;function Ud(e){return e===null||typeof e!="object"?null:(e=ku&&e[ku]||e["@@iterator"],typeof e=="function"?e:null)}var Ua={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ka=Object.assign,Va={};function Qn(e,t,n){this.props=e,this.context=t,this.refs=Va,this.updater=n||Ua}Qn.prototype.isReactComponent={};Qn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Qn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ba(){}ba.prototype=Qn.prototype;function sl(e,t,n){this.props=e,this.context=t,this.refs=Va,this.updater=n||Ua}var ll=sl.prototype=new ba;ll.constructor=sl;Ka(ll,Qn.prototype);ll.isPureReactComponent=!0;var Su=Array.isArray,Wa=Object.prototype.hasOwnProperty,ul={current:null},Ha={key:!0,ref:!0,__self:!0,__source:!0};function Ja(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Wa.call(t,r)&&!Ha.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var u=Array(l),a=0;a<l;a++)u[a]=arguments[a+2];i.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Br,type:e,key:o,ref:s,props:i,_owner:ul.current}}function Kd(e,t){return{$$typeof:Br,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function al(e){return typeof e=="object"&&e!==null&&e.$$typeof===Br}function Vd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _u=/\/+/g;function Co(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Vd(""+e.key):t.toString(36)}function pi(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Br:case Ad:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Co(s,0):r,Su(i)?(n="",e!=null&&(n=e.replace(_u,"$&/")+"/"),pi(i,t,n,"",function(a){return a})):i!=null&&(al(i)&&(i=Kd(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(_u,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",Su(e))for(var l=0;l<e.length;l++){o=e[l];var u=r+Co(o,l);s+=pi(o,t,n,u,i)}else if(u=Ud(e),typeof u=="function")for(e=u.call(e),l=0;!(o=e.next()).done;)o=o.value,u=r+Co(o,l++),s+=pi(o,t,n,u,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Jr(e,t,n){if(e==null)return e;var r=[],i=0;return pi(e,r,"","",function(o){return t.call(n,o,i++)}),r}function bd(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ee={current:null},yi={transition:null},Wd={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:yi,ReactCurrentOwner:ul};function Qa(){throw Error("act(...) is not supported in production builds of React.")}j.Children={map:Jr,forEach:function(e,t,n){Jr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Jr(e,function(){t++}),t},toArray:function(e){return Jr(e,function(t){return t})||[]},only:function(e){if(!al(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};j.Component=Qn;j.Fragment=Pd;j.Profiler=Ld;j.PureComponent=sl;j.StrictMode=$d;j.Suspense=Fd;j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wd;j.act=Qa;j.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ka({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=ul.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)Wa.call(t,u)&&!Ha.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var a=0;a<u;a++)l[a]=arguments[a+2];r.children=l}return{$$typeof:Br,type:e.type,key:i,ref:o,props:r,_owner:s}};j.createContext=function(e){return e={$$typeof:jd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Id,_context:e},e.Consumer=e};j.createElement=Ja;j.createFactory=function(e){var t=Ja.bind(null,e);return t.type=e,t};j.createRef=function(){return{current:null}};j.forwardRef=function(e){return{$$typeof:zd,render:e}};j.isValidElement=al;j.lazy=function(e){return{$$typeof:Bd,_payload:{_status:-1,_result:e},_init:bd}};j.memo=function(e,t){return{$$typeof:Dd,type:e,compare:t===void 0?null:t}};j.startTransition=function(e){var t=yi.transition;yi.transition={};try{e()}finally{yi.transition=t}};j.unstable_act=Qa;j.useCallback=function(e,t){return Ee.current.useCallback(e,t)};j.useContext=function(e){return Ee.current.useContext(e)};j.useDebugValue=function(){};j.useDeferredValue=function(e){return Ee.current.useDeferredValue(e)};j.useEffect=function(e,t){return Ee.current.useEffect(e,t)};j.useId=function(){return Ee.current.useId()};j.useImperativeHandle=function(e,t,n){return Ee.current.useImperativeHandle(e,t,n)};j.useInsertionEffect=function(e,t){return Ee.current.useInsertionEffect(e,t)};j.useLayoutEffect=function(e,t){return Ee.current.useLayoutEffect(e,t)};j.useMemo=function(e,t){return Ee.current.useMemo(e,t)};j.useReducer=function(e,t,n){return Ee.current.useReducer(e,t,n)};j.useRef=function(e){return Ee.current.useRef(e)};j.useState=function(e){return Ee.current.useState(e)};j.useSyncExternalStore=function(e,t,n){return Ee.current.useSyncExternalStore(e,t,n)};j.useTransition=function(){return Ee.current.useTransition()};j.version="18.3.1";Ba.exports=j;var fe=Ba.exports;/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -14,13 +14,13 @@ var Id=Object.defineProperty;var jd=(e,t,n)=>t in e?Id(e,t,{enumerable:!0,config
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Zd=fe,Gd=Symbol.for("react.element"),eh=Symbol.for("react.fragment"),th=Object.prototype.hasOwnProperty,nh=Zd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,rh={key:!0,ref:!0,__self:!0,__source:!0};function ec(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)th.call(t,r)&&!rh.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Gd,type:e,key:o,ref:s,props:i,_owner:nh.current}}no.Fragment=eh;no.jsx=ec;no.jsxs=ec;ba.exports=no;var K=ba.exports;function al(e=Math.random){return e().toString(36).slice(2)}class es extends Promise{constructor(n){let r,i;super((o,s)=>{r=o,i=s});C(this,"fate");C(this,"resolve");C(this,"reject");C(this,"done",!1);this.resolve=r,this.reject=i,this.use(n instanceof Promise?n:new Promise(n))}pass(n,r){n===this.fate&&(this.resolve(r),this.done=!0)}fail(n,r){n===this.fate&&(this.reject(r),this.done=!0)}use(n){if(n instanceof Promise){const r=n;this.fate=r,r.then(i=>{this.pass(r,i)},i=>{this.fail(r,i)})}else this.resolve(n),this.fate=void 0}}const ih=(e,t,n=_e.STORE)=>cc(n,{key:`${e.key}:JSON`,get:({get:r})=>t.toJson(r(e)),set:({set:r},i)=>{r(e,t.fromJson(i))}});function $(e){for(;e.child!==null;)e=e.child;return e}function oh(e){for(;e.parent!==null;)e=e.parent;return e}class Y{constructor(){C(this,"Subscriber");C(this,"subscribers",new Map)}subscribe(t,n){return this.subscribers.set(t,n),()=>{this.unsubscribe(t)}}unsubscribe(t){this.subscribers.delete(t)}next(t){const n=this.subscribers.values();for(const r of n)r(t)}}class sh extends Y{constructor(n){super();C(this,"state");this.state=n}next(n){this.state=n,super.next(n)}}function cl(e,t,n){const r={key:t.key,type:"atom_family"},i=e.families.get(t.key);i&&e.logger.error("❗","atom_family",t.key,`Overwriting an existing ${Fn(i)} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const o=new Y,l=Object.assign(u=>{const a=X(u),c={key:t.key,subKey:a},p=`${t.key}(${a})`,d=$(e),m=t.default,w={key:p,default:m instanceof Function?m(u):m};t.effects&&(w.effects=t.effects(u));const S=oo(d,w,c);return o.next({type:"state_creation",token:S}),S},r,{subject:o,install:u=>cl(u,t),internalRoles:n});return e.families.set(t.key,l),e.defaults.set(t.key,t.default),r}function vn(e,t,n){const r={key:t.key,type:"readonly_selector_family"},i=e.families.get(t.key);i&&e.logger.error("❗","readonly_selector_family",t.key,`Overwriting an existing ${Fn(i)} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const o=new Y,l=Object.assign(u=>{const a=X(u),c={key:t.key,subKey:a},p=`${t.key}(${a})`,d=$(e),m=gl(d,{key:p,get:t.get(u)},c);return o.next({type:"state_creation",token:m}),m},r,{internalRoles:n,subject:o,install:u=>vn(u,t),default:u=>t.get(u)({get:(...c)=>je(e,...c),find:(c,p)=>Oe(e,c,p),seek:(c,p)=>ke(e,c,p),json:c=>Kt(e,c)})});return e.families.set(t.key,l),r}function lh(e,t){return"set"in t?wl(e,t):vn(e,t)}const uh={atom_family:"atom",mutable_atom_family:"mutable_atom",selector_family:"selector",readonly_selector_family:"readonly_selector",molecule_family:"molecule"};function fl(e,t){const n=X(t),r=`${e.key}(${n})`,i=uh[e.type],o={key:r,type:i};return i==="molecule"?Object.assign(o,{key:t,family:e}):Object.assign(o,{family:{key:e.key,subKey:n}}),Object.assign(o,{counterfeit:!0}),o}function tn(e){const t={key:e.key,type:e.type};return"family"in e&&(t.family=e.family),t}function fn(e){return rp(_e.STORE,e)}const xo=e=>(t,n,r,i,...o)=>{console[e](`${t} ${n} "${r}" ${i}`,...o)},ah={error:xo("error"),info:xo("info"),warn:xo("warn")};class ch{constructor(t,n,r=ah){C(this,"error",(...t)=>{var n;(((n=this.filter)==null?void 0:n.call(this,...t))??!0)&&this.logLevel!==null&&this.logger.error(...t)});C(this,"info",(...t)=>{var n;(((n=this.filter)==null?void 0:n.call(this,...t))??!0)&&this.logLevel==="info"&&this.logger.info(...t)});C(this,"warn",(...t)=>{var n;(((n=this.filter)==null?void 0:n.call(this,...t))??!0)&&this.logLevel!=="error"&&this.logLevel!==null&&this.logger.warn(...t)});this.logLevel=t,this.filter=n,this.logger=r}}function fh(e){return cc(_e.STORE,e)}function dh(e){return lh(_e.STORE,e)}function hh(e){return lc(e,_e.STORE)}function ph(e,t=al()){return ro(e,t,_e.STORE)}class pt{constructor(t,n){C(this,"a");C(this,"b");C(this,"cardinality");C(this,"relations",new Map);C(this,"contents",new Map);C(this,"isContent");C(this,"makeContentKey",(t,n)=>`${t}:${n}`);C(this,"warn");var r;if(this.a=t.between[0],this.b=t.between[1],this.cardinality=t.cardinality,n!=null&&n.externalStore||(this.relations=new Map((r=t.relations)==null?void 0:r.map(([i,o])=>[i,new Set(o)])),this.contents=new Map(t.contents)),this.isContent=(n==null?void 0:n.isContent)??null,n!=null&&n.makeContentKey&&(this.makeContentKey=n.makeContentKey),n!=null&&n.externalStore){const i=n.externalStore;this.has=(o,s)=>i.has(o,s),this.addRelation=(o,s)=>{i.addRelation(o,s)},this.deleteRelation=(o,s)=>{i.deleteRelation(o,s)},this.replaceRelationsSafely=(o,s)=>{i.replaceRelationsSafely(o,s)},this.replaceRelationsUnsafely=(o,s)=>{i.replaceRelationsUnsafely(o,s)},this.getRelatedKeys=o=>i.getRelatedKeys(o),i.getContent&&(this.getContentInternal=o=>i.getContent(o),this.setContent=(o,s)=>{i.setContent(o,s)},this.deleteContent=o=>{i.deleteContent(o)});for(const[o,s]of t.relations??[])for(const l of s)this.addRelation(o,l);for(const[o,s]of t.contents??[])this.setContent(o,s)}n!=null&&n.warn&&(this.warn=n.warn)}getRelatedKeys(t){return this.relations.get(t)}addRelation(t,n){let r=this.relations.get(t),i=this.relations.get(n);r?r.add(n):(r=new Set([n]),this.relations.set(t,r)),i?i.add(t):(i=new Set([t]),this.relations.set(n,i))}deleteRelation(t,n){const r=this.relations.get(t);if(r){r.delete(n),r.size===0&&this.relations.delete(t);const i=this.relations.get(n);i&&(i.delete(t),i.size===0&&this.relations.delete(n))}}replaceRelationsUnsafely(t,n){this.relations.set(t,new Set(n));for(const r of n){const i=new Set([t]);this.relations.set(r,i)}}replaceRelationsSafely(t,n){const r=this.relations.get(t);if(r)for(const i of r){const o=this.relations.get(i);o&&(o.size===1?this.relations.delete(i):o.delete(t),this.contents.delete(this.makeContentKey(t,i)))}this.relations.set(t,new Set(n));for(const i of n){let o=this.relations.get(i);o?o.add(t):(o=new Set([t]),this.relations.set(i,o))}}getContentInternal(t){return this.contents.get(t)}setContent(t,n){this.contents.set(t,n)}deleteContent(t){this.contents.delete(t)}toJSON(){return{between:[this.a,this.b],cardinality:this.cardinality,relations:[...this.relations.entries()].map(([t,n])=>[t,[...n]]),contents:[...this.contents.entries()]}}set(t,...n){const r=typeof n[0]=="string"?n[0]:t[this.b],i=n[1]??typeof n[0]=="string"?void 0:n[0];switch(t=typeof t=="string"?t:t[this.a],this.cardinality){case"1:1":{const o=this.getRelatedKey(t);o&&o!==r&&this.delete(o,t)}case"1:n":{const o=this.getRelatedKey(r);o&&o!==t&&this.delete(o,r)}}if(i){const o=this.makeContentKey(t,r);this.setContent(o,i)}return this.addRelation(t,r),this}delete(t,n){n=typeof n=="string"?n:t[this.b];const r=typeof t=="string"?t:t[this.a];if(r===void 0&&typeof n=="string"){const i=this.getRelatedKeys(n);if(i)for(const o of i)this.delete(o,n)}if(typeof r=="string"&&n===void 0){const i=this.getRelatedKeys(r);if(i)for(const o of i)this.delete(r,o)}if(typeof r=="string"&&typeof n=="string"){this.deleteRelation(r,n);const i=this.makeContentKey(r,n);this.deleteContent(i)}return this}getRelatedKey(t){var r;const n=this.getRelatedKeys(t);if(n){n.size>1&&((r=this.warn)==null||r.call(this,`${n.size} related keys were found for key "${t}": (${[...n].map(i=>`"${i}"`).join(", ")}). Only one related key was expected.`));for(const i of n)return i}}replaceRelations(t,n,r){const i=!Array.isArray(n),o=i?Object.keys(n):n;if(r!=null&&r.reckless?this.replaceRelationsUnsafely(t,o):this.replaceRelationsSafely(t,o),i)for(const s of o){const l=this.makeContentKey(t,s),u=n[s];this.setContent(l,u)}return this}getContent(t,n){const r=this.makeContentKey(t,n);return this.getContentInternal(r)}getRelationEntries(t){const n=t[this.a],r=t[this.b];if(n!==void 0&&r===void 0){const i=this.getRelatedKeys(n);if(i)return[...i].map(o=>[o,this.getContent(n,o)??null])}if(n===void 0&&r!==void 0){const i=this.getRelatedKeys(r);if(i)return[...i].map(o=>[o,this.getContent(o,r)??null])}return[]}has(t,n){if(n){const r=this.getRelatedKeys(t);return(r==null?void 0:r.has(n))??!1}return this.relations.has(t)}}function Je(e){return"epoch"in e.transactionMeta}function ge(e){return"phase"in e.transactionMeta}const yh=e=>{const t=$(e);if(!ge(t)){e.logger.warn("🐞","transaction","???","abortTransaction called outside of a transaction. This is probably a bug in AtomIO.");return}e.logger.info("🪂","transaction",t.transactionMeta.update.key,"Aborting transaction"),t.parent.child=null},mh=e=>e[0].toUpperCase()+e.slice(1);function Fn(e){return e.type.split("_").map(mh).join(" ")}class Ft extends Error{constructor(...t){const n=t[0],r=t.length===2?t[1]:t[2];if(t.length===2)super(`${Fn(n)} ${X(n.key)} not found in store "${r.config.name}".`);else{const i=t[1];super(`${Fn(n)} "${n.key}" member ${X(i)} not found in store "${r.config.name}".`)}}}function ro(e,t,n){return(...r)=>{const i=D(e,n);if(i)return i.run(r,t);throw new Ft(e,n)}}const tc=e=>t=>e instanceof Function?e(t):e,io=(e,t)=>{if(t.valueMap.has(e.key))return t.logger.info("📖",e.type,e.key,"reading cached value"),Gh(e,t);if(e.type==="selector"||e.type==="readonly_selector")return t.logger.info("🧮",e.type,e.key,"computing value"),e.get();const n=e.default instanceof Function?e.default():e.default;return t.logger.info("💁","atom",e.key,"could not find cached value; using default",n),e.default instanceof Function?e.default():e.default},gh=(e,t)=>{if(e.operation.open){const n=performance.now();return e.logger.info("❗",t.type,t.key,`deferring setState at T-${n} until setState for "${e.operation.token.key}" is done`),n}e.operation={open:!0,done:new Set,prev:new Map,time:Date.now(),token:t},e.logger.info("⭕",t.type,t.key,`operation start in store "${e.config.name}"${ge(e)?` ${e.transactionMeta.phase} "${e.transactionMeta.update.key}"`:""}`)},vh=e=>{e.operation.open&&e.logger.info("🔴",e.operation.token.type,e.operation.token.key,`operation done in store "${e.config.name}"`),e.operation={open:!1},e.on.operationClose.next(e.operation)},wh=(e,t)=>e.operation.open?e.operation.done.has(t):(e.logger.error("🐞","unknown",t,"isDone called outside of an operation. This is probably a bug in AtomIO."),!0),dl=(e,t)=>{if(!e.operation.open){e.logger.error("🐞","unknown",t,"markDone called outside of an operation. This is probably a bug in AtomIO.");return}e.operation.done.add(t)},kh=(e,t,n)=>{switch(e.type){case"mutable_atom":n.logger.info("📢",e.type,e.key,"is now (",t.newValue,") subscribers:",e.subject.subscribers);break;default:n.logger.info("📢",e.type,e.key,"went (",t.oldValue,"->",t.newValue,") subscribers:",e.subject.subscribers)}e.subject.next(t)},Eu=(e,t)=>{const n=$(t),r=n.selectorAtoms.getRelatedKeys(e.key);if(n.logger.info("🧹",e.type,e.key,r?`evicting ${r.size} states downstream:`:"no downstream states",r??"to evict"),r){n.operation.open&&n.logger.info("🧹",e.type,e.key,`[ ${[...n.operation.done].join(", ")} ] already done`);for(const i of r)wh(n,i)||(ep(i,n),dl(n,i))}};function Sh(e,t){return!(Zh(t.newValue)||e.includes("🔍"))}const _h=(e,t,n)=>{const{key:r}=e,i=$(n);if(!ge(i)||i.transactionMeta.phase!=="building"){n.logger.error("🐞","atom",r,"stowUpdate called outside of a transaction. This is probably a bug.");return}if(!Sh(r,t))return;const s={type:"atom_update",key:r,...t};e.family&&(s.family=e.family),i.transactionMeta.update.updates.push(s),n.logger.info("📁","atom",r,"stowed (",t.oldValue,"->",t.newValue,")")},Eh=(e,t,n)=>{const r=io(e,n);let i=r;if(e.type==="mutable_atom"&&ge(n)){const{parent:s}=n;i=os(e,s,n)}i=tc(t)(i),n.logger.info("📝","atom",e.key,"set to",i),i=on(e.key,i,e.subject,n),tp(e.key,n)&&np(e.key,n),dl(n,e.key),Eu(e,n);const o={oldValue:r,newValue:i};if(Je(n))kh(e,o,n);else if(n.parent){if(n.on.transactionApplying.state===null)_h(e,o,n);else if(e.key.startsWith("*")){const s=e.key.slice(1),l=n.atoms.get(s);let u=n.valueMap.get(s);if(l.type==="mutable_atom"&&ge(n)){const{parent:c}=n;u=os(l,c,n)}u.do(o.newValue)===null&&Eu(l,n)}}},nc=(e,t,n)=>{switch(e.type){case"atom":case"mutable_atom":Eh(e,t,n);break;case"selector":e.set(t);break}};function rc(e,t){if(t.family){const n=e.families.get(t.family.key);if(n)return n}}function oe(e,...t){let n,r,i,o;if(t.length===2?(n=t[0],o=t[1],r=rc(e,n)??null,r&&(i=n.family?rn(n.family.subKey):null,n=Oe(e,r,i))):(r=t[0],i=t[1],o=t[2],n=Oe(e,r,i)),"counterfeit"in n){const u=e.disposalTraces.buffer.find(a=>(a==null?void 0:a.key)===n.key);e.logger.error("❌",n.type,n.key,`could not be set because it was not found in the store "${e.config.name}".`,u?`This state was previously disposed:
|
|
18
|
-
${u.trace}`:"No previous disposal trace was found.");return}const s=gh(e,n);if(s){const u=e.on.operationClose.subscribe(`waiting to set "${n.key}" at T-${s}`,()=>{u(),e.logger.info("🟢",n.type,n.key,`resuming deferred setState from T-${s}`),oe(e,n,o)});return}const l=D(n,e);nc(l,o,e),vh(e)}function Ch(e,t,n){const{key:r,newValue:i,oldValue:o}=t,s=e==="newValue"?i:o,l={key:r,type:"atom"};t.family&&Object.assign(l,{family:t.family}),oe(n,l,s)}function xh(e,t){const n=new Y,r={type:"molecule_family",key:t.key,dependsOn:t.dependsOn??"all"},i={...r,subject:n,new:t.new};return e.moleculeFamilies.set(t.key,i),r}function nn(e,t,n){const r=Bn(n,t,e.key);e.tokens.set(r.key,r);const i=ge(n)&&n.transactionMeta.phase==="building",o=n.moleculeInProgress===e.key;return!i&&!o&&e.subject.next({type:"state_creation",token:r}),r}class lt extends Set{constructor(n,r=0){super(n);C(this,"mode","record");C(this,"subject",new Y);C(this,"cacheLimit",0);C(this,"cache",[]);C(this,"cacheIdx",-1);C(this,"cacheUpdateNumber",-1);C(this,"parent");C(this,"child",null);C(this,"transactionUpdates",null);n instanceof lt&&(this.parent=n,this.cacheUpdateNumber=n.cacheUpdateNumber),r&&(this.cacheLimit=r,this.cache=new Array(r),this.subscribe("auto cache",i=>{this.cacheIdx++,this.cacheIdx%=this.cacheLimit,this.cache[this.cacheIdx]=i}))}toJSON(){return{members:[...this],cache:this.cache,cacheLimit:this.cacheLimit,cacheIdx:this.cacheIdx,cacheUpdateNumber:this.cacheUpdateNumber}}static fromJSON(n){const r=new lt(n.members,n.cacheLimit);return r.cache=n.cache,r.cacheIdx=n.cacheIdx,r.cacheUpdateNumber=n.cacheUpdateNumber,r}add(n){const r=super.add(n);return this.mode==="record"&&(this.cacheUpdateNumber++,this.emit(`add:${X(n)}`)),r}clear(){const n=this.mode==="record"?[...this]:null;super.clear(),n&&(this.cacheUpdateNumber++,this.emit(`clear:${JSON.stringify(n)}`))}delete(n){const r=super.delete(n);return this.mode==="record"&&(this.cacheUpdateNumber++,this.emit(`del:${X(n)}`)),r}transaction(n){this.mode="transaction",this.transactionUpdates=[],this.child=new lt(this);const r=this.child._subscribe("transaction",i=>{var o;(o=this.transactionUpdates)==null||o.push(i)});try{if(n(this.child)){for(const o of this.transactionUpdates)this.doStep(o);this.cacheUpdateNumber++,this.emit(`tx:${this.transactionUpdates.join(";")}`)}}catch(i){throw console.error("Failed to apply transaction to SetRTX:",i),i}finally{r(),this.child=null,this.transactionUpdates=null,this.mode="record"}}_subscribe(n,r){return this.subject.subscribe(n,r)}subscribe(n,r){return this.subject.subscribe(n,i=>{r(`${this.cacheUpdateNumber}=${i}`)})}emit(n){this.subject.next(n)}doStep(n){const r=n.indexOf(":"),i=n.substring(0,r),o=n.substring(r+1);switch(i){case"add":this.add(JSON.parse(o));break;case"clear":this.clear();break;case"del":this.delete(JSON.parse(o));break;case"tx":for(const s of o.split(";"))this.doStep(s)}}getUpdateNumber(n){const r=n.indexOf("=");return Number(n.substring(0,r))}do(n){const r=n.indexOf("="),i=Number(n.substring(0,r)),o=i-this.cacheUpdateNumber;if(o>0){if(o===1){this.mode="playback";const l=n.substring(r+1);return this.doStep(l),this.mode="record",this.cacheUpdateNumber=i,null}return this.cacheUpdateNumber+1}if(Math.abs(o)<this.cacheLimit){const l=this.cacheIdx+o;if(this.cache[l]===n)return null;this.mode="playback";let a=!1;for(;!a;){this.cacheIdx%=this.cacheLimit;const p=this.cache[this.cacheIdx];if(this.cacheIdx--,!p)return"OUT_OF_RANGE";this.undo(p),a=this.cacheIdx===l-1}const c=n.substring(r+1);return this.doStep(c),this.mode="record",this.cacheUpdateNumber=i,null}return"OUT_OF_RANGE"}undoStep(n){const r=n.indexOf(":"),i=n.substring(0,r),o=n.substring(r+1);switch(i){case"add":this.delete(JSON.parse(o));break;case"del":this.add(JSON.parse(o));break;case"clear":{const s=JSON.parse(o);for(const l of s)this.add(l);break}case"tx":{const s=o.split(";");for(let l=s.length-1;l>=0;l--)this.undoStep(s[l])}}}undo(n){const r=n.indexOf("=");if(Number(n.substring(0,r))===this.cacheUpdateNumber){this.mode="playback";const o=n.substring(r+1);return this.undoStep(o),this.mode="record",this.cacheUpdateNumber--,null}return this.cacheUpdateNumber}}function H(e){return e[0].toUpperCase()+e.slice(1)}class hl{constructor(t,n,r=_e.STORE){C(this,"options");C(this,"defaultContent");C(this,"toolkit");C(this,"retrieve");C(this,"molecules",new Map);C(this,"relations");C(this,"states");C(this,"core");C(this,"store");C(this,"alternates");this.store=r,this.options=t,this.defaultContent=n,this.alternates=new Map,this.alternates.set(r.config.name,this),this.store.miscResources.set(`join:${t.key}`,this),this.retrieve=(g,v)=>{const _=this.toolkit.seek(g,v);if(_)return _;const M=this.molecules.get(X(v));if(M){const x=D(g,r);return nn(M,x,r)}if(r.config.lifespan==="immortal")throw new Ft(g,v,r);return Bn(r,g,v)},this.toolkit={get:(...g)=>je(r,...g),set:(...g)=>{oe(r,...g)},find:this.retrieve,seek:(...g)=>ke(r,...g),json:g=>Kt(r,g),dispose:(...g)=>{Ut(r,...g)}};const i=t.between[0],o=t.between[1],s=fc(r,{key:`${t.key}/relatedKeys`,default:()=>new lt,mutable:!0,fromJson:g=>lt.fromJSON(g),toJson:g=>g.toJSON()},["join","relations"]);this.core={findRelatedKeysState:s};const l=({get:g},v)=>g(this.retrieve(s,v)),u=(g,v,_)=>{const{set:M}=g,x=this.retrieve(s,v),A=this.retrieve(s,_);M(x,I=>I.add(_)),M(A,I=>I.add(v))},a=(g,v,_)=>{const{set:M}=g,x=this.retrieve(s,v),A=this.retrieve(s,_);M(x,I=>(I.delete(_),I.size,I)),M(A,I=>(I.delete(v),I.size,I))},c=(g,v,_)=>{const{get:M,set:x}=g,A=this.retrieve(s,v),I=M(A);for(const U of I){if(_.includes(U))continue;const nt=this.retrieve(s,U);x(nt,Re=>(Re.delete(v),Re))}x(A,U=>(U.transaction(xe=>{xe.clear();for(const nt of _){const Re=l(g,nt),pn=Re.has(v);if(this.relations.cardinality==="1:n"){const N=[];for(const P of Re){if(P===v)continue;const L=l(g,P);L.delete(nt),L.size===0&&N.push(P)}!pn&&Re.size>0&&Re.clear();for(const P of N){const L=[nt,P].sort(),Q=`"${L[0]}:${L[1]}"`;this.molecules.delete(Q)}}pn||Re.add(v),xe.add(nt)}return!0}),U))},p=(g,v,_)=>{const{set:M}=g,x=this.retrieve(s,v);M(x,A=>(A.transaction(I=>{for(const U of _)I.add(U);return!0}),A));for(const A of _){const I=this.retrieve(s,A);M(I,U=>(U.add(v),U))}return!0},d=(g,v,_)=>{const M=l(g,v);return _?M.has(_):M.size>0},m={getRelatedKeys:g=>l(this.toolkit,g),addRelation:(g,v)=>{u(this.toolkit,g,v)},deleteRelation:(g,v)=>{a(this.toolkit,g,v)},replaceRelationsSafely:(g,v)=>{c(this.toolkit,g,v)},replaceRelationsUnsafely:(g,v)=>{p(this.toolkit,g,v)},has:(g,v)=>d(this.toolkit,g,v)};let w,S,R;if(n){S=cl(r,{key:`${t.key}/content`,default:n},["join","content"]),t.key,t.between[0],t.between[1],t.cardinality,R=xh(r,{key:`${t.key}/content-molecules`,new:class{constructor(A,I){this.key=I}}});const g=({get:x},A)=>x(this.retrieve(S,A)),v=({set:x},A,I)=>{x(this.retrieve(S,A),I)},_=(x,A)=>{const I=r.molecules.get(`"${A}"`);I&&(this.toolkit.dispose(I),this.molecules.delete(`"${A}"`))};w=Object.assign(m,{getContent:x=>g(this.toolkit,x),setContent:(x,A)=>{v(this.toolkit,x,A)},deleteContent:x=>{_(this.toolkit,x)}})}else w=m;const h=new pt(t,{externalStore:w,makeContentKey:(...g)=>{const v=g.sort(),_=`${v[0]}:${v[1]}`,[M,x]=v.map(A=>this.molecules.get(X(A)));if(r.config.lifespan==="immortal"&&M&&x){const A=$(r),I=Dn(A,[M,x],R,_);this.molecules.set(`"${_}"`,D(I,A))}return _}}),f=()=>vn(r,{key:`${t.key}/singleRelatedKey`,get:g=>({get:v})=>{const _=this.retrieve(s,g),M=v(_);for(const x of M)return x;return null}},["join","keys"]),y=()=>vn(r,{key:`${t.key}/multipleRelatedKeys`,get:g=>({get:v})=>{const _=Tu(s,r),M=this.retrieve(_,g);return v(M).members}},["join","keys"]),k=()=>vn(r,{key:`${t.key}/singleRelatedEntry`,get:g=>({get:v})=>{const _=this.retrieve(s,g),M=v(_);for(const x of M){const A=h.makeContentKey(g,x),I=this.retrieve(S,A),U=v(I);return[x,U]}return null}},["join","entries"]),T=()=>vn(r,{key:`${t.key}/multipleRelatedEntries`,get:g=>({get:v})=>{const _=Tu(s,r),M=this.retrieve(_,g);return v(M).members.map(A=>{const I=h.makeContentKey(g,A),U=this.retrieve(S,I),xe=v(U);return[A,xe]})}},["join","entries"]);switch(t.cardinality){case"1:1":{const g=f(),v=`${i}KeyOf${H(o)}`,_=`${o}KeyOf${H(i)}`,M={[v]:g,[_]:g};let x;if(n){const A=k(),I=`${i}EntryOf${H(o)}`,U=`${o}EntryOf${H(i)}`,xe={[I]:A,[U]:A};x=Object.assign(M,xe)}else x=M;this.relations=h,this.states=x;break}case"1:n":{const g=f(),v=y(),_=`${i}KeyOf${H(o)}`,M=`${o}KeysOf${H(i)}`,x={[_]:g,[M]:v};let A;if(n){const I=k(),U=T(),xe=`${i}EntryOf${H(o)}`,nt=`${o}EntriesOf${H(i)}`,Re={[xe]:I,[nt]:U};A=Object.assign(x,Re)}else A=x;this.relations=h,this.states=A;break}default:{const g=y(),v=`${i}KeysOf${H(o)}`,_=`${o}KeysOf${H(i)}`,M={[v]:g,[_]:g};let x;if(n){const A=T(),I=`${i}EntriesOf${H(o)}`,U=`${o}EntriesOf${H(i)}`,xe={[I]:A,[U]:A};x=Object.assign(M,xe)}else x=M;this.relations=h,this.states=x}}}transact(t,n){const r=this.toolkit;this.toolkit=t,n(this),this.toolkit=r}[Symbol.dispose](){this.alternates.delete(this.store.config.name)}in(t){const n=t.config.name,r=this.alternates.get(n);if(r)return r;const i=new hl(this.options,this.defaultContent,t);return this.alternates.set(n,i),i.alternates=this.alternates,i}}function Rh(e,t,n=_e.STORE){return ts(n).set(e.key,new hl(e,t,n)),{key:e.key,type:"join",a:e.between[0],b:e.between[1],cardinality:e.cardinality}}function ts(e){if("joins"in e&&e.joins instanceof Map)return e.joins;const t=new Map;return e.joins=t,t}function pl(e,t){var i;const n=ts(t);let r=n.get(e.key);if(r===void 0){if(r=(i=ts(_e.STORE).get(e.key))==null?void 0:i.in(t),r===void 0)throw new Error(`Join "${e.key}" not found in store "${t.config.name}"`);n.set(e.key,r)}return r}function Th(e,t,n){const r=pl(e,n);let i;switch(e.cardinality){case"1:1":{const o=`${e.a}KeyOf${H(e.b)}`,s=`${e.b}KeyOf${H(e.a)}`;i={get[o](){const u=r.states[o];return r.retrieve(u,t)},get[s](){const u=r.states[s];return r.retrieve(u,t)}};const l=`${e.a}EntryOf${H(e.b)}`;if(l in r.states){const u=`${e.b}EntryOf${H(e.a)}`;Object.assign(i,{get[l](){const a=r.states[l];return r.retrieve(a,t)},get[u](){const a=r.states[u];return r.retrieve(a,t)}})}break}case"1:n":{const o=`${e.a}KeyOf${H(e.b)}`,s=`${e.b}KeysOf${H(e.a)}`;i={get[o](){const u=r.states[o];return r.retrieve(u,t)},get[s](){const u=r.states[s];return r.retrieve(u,t)}};const l=`${e.a}EntryOf${H(e.b)}`;if(l in r.states){const u=`${e.b}EntriesOf${H(e.a)}`;Object.assign(i,{get[l](){const a=r.states[l];return r.retrieve(a,t)},get[u](){const a=r.states[u];return r.retrieve(a,t)}})}break}case"n:n":{const o=`${e.a}KeysOf${H(e.b)}`,s=`${e.b}KeysOf${H(e.a)}`;i={get[o](){const u=r.states[o];return r.retrieve(u,t)},get[s](){const u=r.states[s];return r.retrieve(u,t)}};const l=`${e.a}EntriesOf${H(e.b)}`;if(l in r.states){const u=`${e.b}EntriesOf${H(e.a)}`;Object.assign(i,{get[l](){const a=r.states[l];return r.retrieve(a,t)},get[u](){const a=r.states[u];return r.retrieve(a,t)}})}}}return i}function Nh(e,t){return Th(e,t,_e.STORE)}function Oh(e,t){return pl(e,t).core.findRelatedKeysState}function Mh(e){return Oh(e,_e.STORE)}function ic(e){return{store:e}}function je(e,...t){let n,r,i;if(t.length===1)n=t[0],n.type!=="molecule"&&(r=rc(e,n)??null,r&&(i=n.family?rn(n.family.subKey):null,n=Oe(e,r,i)));else{r=t[0],i=t[1];let o;r.type==="molecule_family"?o=ke(e,r,i)??fl(r,i):o=Oe(e,r,i),n=o}if("counterfeit"in n&&"family"in n){r=n.type==="molecule"?D(n.family,e):e.families.get(n.family.key);const o=n.type==="molecule"?n.key:n.family.subKey,s=e.disposalTraces.buffer.find(l=>(l==null?void 0:l.key)===n.key);switch(e.logger.error("❌",n.type,n.key,`could not be retrieved because it was not found in the store "${e.config.name}".`,s?`This state was previously disposed:
|
|
19
|
-
${s.trace}`:"No previous disposal trace was found."),r.type){case"atom_family":case"mutable_atom_family":return e.defaults.get(r.key);case"selector_family":case"readonly_selector_family":{if(e.defaults.has(r.key))return e.defaults.get(n.family.key);const l=D(r,e).default(o);return e.defaults.set(r.key,l),l}case"molecule_family":throw new Ft(r,o,e)}}switch(n.type){case"atom":case"mutable_atom":case"selector":case"readonly_selector":return io(D(n,e),e);case"molecule":return D(n,e).instance}}class Cu{constructor(t,n,r){C(this,"type","molecule");C(this,"stringKey");C(this,"family");C(this,"subject",new Y);C(this,"tokens",new Map);C(this,"above",new Map);C(this,"below",new Map);C(this,"joins",new Map);C(this,"instance");if(this.key=n,this.stringKey=X(n),r&&(this.family=r),t)if(Array.isArray(t))for(const i of t)this.above.set(i.stringKey,i);else this.above.set(t.stringKey,t)}}function xu(e){return e[0].toUpperCase()+e.slice(1)}function Dn(e,t,n,r,...i){const o=oh(e),s=$(e),l=X(r);s.moleculeInProgress=l;const u=Array.isArray(t)?t:[t],a=u.map(R=>{if(R instanceof Cu)return R;const h=X(R.key),f=e.molecules.get(h);if(!f)throw new Error(`Molecule ${h} not found in store "${e.config.name}"`);return f}),c=new Cu(a,r,n);s.molecules.set(l,c);for(const R of a)R.below.set(c.stringKey,c);const p={get:(...R)=>je($(o),...R),set:(...R)=>{oe($(o),...R)},seek:(R,h)=>ke($(o),R,h),json:R=>Kt($(o),R),run:(R,h=al())=>ro(R,h,$(e)),make:(R,h,f,...y)=>Dn($(o),R,h,f,...y),dispose:R=>{Ut($(o),R)},env:()=>ic($(o)),bond:(R,h)=>{if(R.type==="join"){const{as:f}=h,y=pl(R,o);y.molecules.set(l,c),c.joins.set(R.key,y);const k=d.subject.subscribe(`join:${R.key}-${l}`,x=>{x.type==="molecule_disposal"&&X(x.token.key)===l&&(k(),y.molecules.delete(l))});if(f===null)return;const T=R.a===f?R.b:R.a,g=Nh(R,r),v=g[`${T}KeysOf${xu(f)}`],_=g[`${T}EntriesOf${xu(f)}`];let M={relatedKeys:v};return _&&(M=Object.assign(M,{relatedEntries:_})),M}return nn(c,D(R,o),$(o))},claim:(R,h)=>{const{exclusive:f}=h,y=$(e).molecules.get(X(R.key));if(y)if(f){for(const k of y.above.values())k.below.delete(y.stringKey);y.above.clear(),y.above.set(c.stringKey,c),c.below.set(y.stringKey,y)}else y.above.set(c.stringKey,c),c.below.set(y.stringKey,y)},spawn:(R,h,...f)=>Dn($(e),[c],D(R,e),h,...f)},d=D(n,e),m=d.new;c.instance=new m(p,r,...i);const w={type:"molecule",key:r,family:n},S={type:"molecule_creation",token:w,family:n,context:u,params:i};return Je(s)?d.subject.next(S):ge(s)&&s.on.transactionApplying.state===null&&s.transactionMeta.update.updates.push(S),s.moleculeInProgress=null,w}function Ah(e,t,n){switch(t){case"newValue":{oc(e,n);break}case"oldValue":{Ut(n,e.token);break}}}function $h(e,t,n){switch(t){case"newValue":{Ut(n,e.token);break}case"oldValue":{oc(e,n),n.valueMap.set(e.token.key,e.value);break}}}function oc(e,t){const{family:n}=e.token;if(n){const r=t.families.get(n.key);r&&Oe(t,r,rn(n.subKey))}}function Ph(e,t,n){switch(t){case"newValue":Dn(n,e.context,e.family,e.token.key,...e.params);break;case"oldValue":Ut(n,e.token);break}}function Lh(e,t,n){switch(t){case"newValue":Ut(n,e.token);break;case"oldValue":{const r=Dn(n,e.context,e.family,e.token.key);for(const[i,o]of e.values){const s=`${i}(${X(r.key)})`,l=D(r,n),u=l.tokens.has(s),a=n.families.get(i);a&&!u&&nn(l,a,n),n.valueMap.set(s,o)}}break}}function wn(e,t,n){const r=e==="newValue"?t.updates:[...t.updates].reverse();for(const i of r)switch(i.type){case"atom_update":case"selector_update":Ch(e,i,n);break;case"state_creation":Ah(i,e,n);break;case"state_disposal":$h(i,e,n);break;case"molecule_creation":Ph(i,e,n);break;case"molecule_disposal":Lh(i,e,n);break;case"transaction_update":wn(e,i,n);break}}function ns(e,t,n){Je(n)&&e&&n.transactionMeta.epoch.set(e,t)}function Ih(e,t,n){if(!Je(n))return;const i=n.transactionMeta.actionContinuities.getRelatedKey(e);i!==void 0&&n.transactionMeta.epoch.set(i,t)}const jh=(e,t)=>{var o;const n=$(t),{parent:r}=n;if(r===null||!ge(n)||((o=n.transactionMeta)==null?void 0:o.phase)!=="building"){t.logger.warn("🐞","transaction","???","applyTransaction called outside of a transaction. This is probably a bug in AtomIO.");return}n.transactionMeta.phase="applying",n.transactionMeta.update.output=e,r.child=null,r.on.transactionApplying.next(n.transactionMeta);const{updates:i}=n.transactionMeta.update;if(t.logger.info("🛄","transaction",n.transactionMeta.update.key,`Applying transaction with ${i.length} updates:`,i),wn("newValue",n.transactionMeta.update,r),Je(r)){Ih(n.transactionMeta.update.key,n.transactionMeta.update.epoch,r);const s=D({key:n.transactionMeta.update.key,type:"transaction"},t);s==null||s.subject.next(n.transactionMeta.update),t.logger.info("🛬","transaction",n.transactionMeta.update.key,"Finished applying transaction.")}else ge(r)&&r.transactionMeta.update.updates.push(n.transactionMeta.update);r.on.transactionApplying.next(null)};function sc(e,t,n){if(!Je(n))return;const{epoch:i,actionContinuities:o}=n.transactionMeta;o.set(e,t),i.has(e)||i.set(e,-1)}class rt extends Map{constructor(n){super();C(this,"deleted",new Set);this.source=n}get(n){if(super.has(n))return super.get(n);if(!this.deleted.has(n)&&this.source.has(n))return this.source.get(n)}set(n,r){return this.deleted.delete(n),super.set(n,r)}hasOwn(n){return super.has(n)}has(n){return!this.deleted.has(n)&&(super.has(n)||this.source.has(n))}delete(n){return this.deleted.add(n),super.delete(n)}}const zh=(e,t,n,r)=>{const i=$(n),o={parent:i,child:null,on:i.on,loggers:i.loggers,logger:i.logger,config:i.config,atoms:new rt(i.atoms),atomsThatAreDefault:new Set(i.atomsThatAreDefault),families:new rt(i.families),operation:{open:!1},readonlySelectors:new rt(i.readonlySelectors),timelines:new rt(i.timelines),timelineTopics:new pt(i.timelineTopics.toJSON()),trackers:new Map,transactions:new rt(i.transactions),selectorAtoms:new pt(i.selectorAtoms.toJSON()),selectorGraph:new pt(i.selectorGraph.toJSON(),{makeContentKey:(...a)=>a.sort().join(":")}),selectors:new rt(i.selectors),valueMap:new rt(i.valueMap),defaults:i.defaults,disposalTraces:n.disposalTraces.copy(),molecules:new rt(i.molecules),moleculeFamilies:new rt(i.moleculeFamilies),moleculeInProgress:i.moleculeInProgress,miscResources:new rt(i.miscResources)},s=Dh(e,n),l={phase:"building",update:{type:"transaction_update",key:e,id:r,epoch:s===void 0?Number.NaN:s+1,updates:[],params:t,output:void 0},toolkit:{get:(...a)=>je(u,...a),set:(...a)=>{oe(u,...a)},run:(a,c=al())=>ro(a,c,u),find:(a,c)=>Oe(u,a,c),seek:(a,c)=>ke(u,a,c),json:a=>Kt(u,a),make:(a,c,p,...d)=>Dn(u,a,c,p,...d),dispose:(...a)=>{Ut(u,...a)},env:()=>ic(u)}},u=Object.assign(o,{transactionMeta:l});return i.child=u,n.logger.info("🛫","transaction",e,"Building transaction with params:",t),u};function lc(e,t){const n={key:e.key,type:"transaction",run:(o,s)=>{const l=zh(e.key,o,t,s);try{const u=$(t),{toolkit:a}=l.transactionMeta,c=e.do(a,...o);return jh(c,u),c}catch(u){throw yh(r),t.logger.warn("💥","transaction",e.key,"caught:",u),u}},install:o=>lc(e,o),subject:new Y},r=$(t);r.transactions.set(n.key,n);const i=tn(n);return t.on.transactionCreation.next(i),i}function Fh(e,t){return Je(t)&&e?t.transactionMeta.epoch.get(e):void 0}function Dh(e,t){const n=Je(t),r=n?t.transactionMeta.actionContinuities.getRelatedKey(e):void 0;return n&&r!==void 0?t.transactionMeta.epoch.get(r):void 0}class yl{constructor(t){C(this,"_buffer");C(this,"_index",0);let n;typeof t=="number"?n=t:n=t.length,this._buffer=Array.from({length:n})}get buffer(){return this._buffer}get index(){return this._index}add(t){this._buffer[this._index]=t,this._index=(this._index+1)%this._buffer.length}copy(){const t=new yl([...this._buffer]);return t._index=this._index,t}}class Bh{constructor(t,n=null){C(this,"parent",null);C(this,"child",null);C(this,"valueMap",new Map);C(this,"defaults",new Map);C(this,"atoms",new Map);C(this,"selectors",new Map);C(this,"readonlySelectors",new Map);C(this,"atomsThatAreDefault",new Set);C(this,"selectorAtoms",new pt({between:["selectorKey","atomKey"],cardinality:"n:n"}));C(this,"selectorGraph",new pt({between:["upstreamSelectorKey","downstreamSelectorKey"],cardinality:"n:n"},{makeContentKey:(...t)=>t.sort().join(":")}));C(this,"trackers",new Map);C(this,"families",new Map);C(this,"transactions",new Map);C(this,"transactionMeta",{epoch:new Map,actionContinuities:new pt({between:["continuity","action"],cardinality:"1:n"})});C(this,"timelines",new Map);C(this,"timelineTopics",new pt({between:["timelineKey","topicKey"],cardinality:"1:n"}));C(this,"disposalTraces",new yl(100));C(this,"molecules",new Map);C(this,"moleculeFamilies",new Map);C(this,"moleculeInProgress",null);C(this,"miscResources",new Map);C(this,"on",{atomCreation:new Y,atomDisposal:new Y,selectorCreation:new Y,selectorDisposal:new Y,timelineCreation:new Y,transactionCreation:new Y,transactionApplying:new sh(null),operationClose:new Y,moleculeCreationStart:new Y,moleculeCreationDone:new Y,moleculeDisposal:new Y});C(this,"operation",{open:!1});C(this,"config",{name:"IMPLICIT_STORE",lifespan:"ephemeral"});C(this,"loggers",[new ch("warn",(t,n,r)=>!r.includes("🔍"))]);C(this,"logger",{error:(...t)=>{for(const n of this.loggers)n.error(...t)},info:(...t)=>{for(const n of this.loggers)n.info(...t)},warn:(...t)=>{for(const n of this.loggers)n.warn(...t)}});var r,i;if(this.config={...n==null?void 0:n.config,...t},n!==null){this.valueMap=new Map(n==null?void 0:n.valueMap),this.operation={...n==null?void 0:n.operation},Je(n)&&(this.transactionMeta={epoch:new Map(n==null?void 0:n.transactionMeta.epoch),actionContinuities:new pt(n==null?void 0:n.transactionMeta.actionContinuities.toJSON())});for(const[,s]of n.families)(r=s.internalRoles)!=null&&r.includes("mutable")||(i=s.internalRoles)!=null&&i.includes("join")||s.install(this);const o=new Set;for(const[,s]of n.atoms)if(!o.has(s.key)&&(s.install(this),s.type==="mutable_atom")){const l=Kt(n,s),u=dc(s);o.add(l.key),o.add(u.key)}for(const[,s]of n.readonlySelectors)s.install(this);for(const[,s]of n.selectors)o.has(s.key)||s.install(this);for(const[,s]of n.transactions)s.install(this);for(const[,s]of n.timelines)s.install(this)}}}const _e={get STORE(){return globalThis.ATOM_IO_IMPLICIT_STORE||(globalThis.ATOM_IO_IMPLICIT_STORE=new Bh({name:"IMPLICIT_STORE",lifespan:"ephemeral"})),globalThis.ATOM_IO_IMPLICIT_STORE}};function D(e,t){let n,r=t;for(;r!==null;){switch(e.type){case"atom":case"mutable_atom":n=r.atoms.get(e.key);break;case"selector":n=r.selectors.get(e.key);break;case"readonly_selector":n=r.readonlySelectors.get(e.key);break;case"atom_family":case"mutable_atom_family":case"selector_family":case"readonly_selector_family":n=r.families.get(e.key);break;case"timeline":n=r.timelines.get(e.key);break;case"transaction":n=r.transactions.get(e.key);break;case"molecule":n=r.molecules.get(X(e.key));break;case"molecule_family":n=r.moleculeFamilies.get(e.key);break}if(n)return n;r=r.child}throw new Ft(e,t)}function rs(e,t){var s;let n;n=D(e,t);const{family:r}=e;for(const l of n.joins.values())l.relations.delete(n.key),l.molecules.delete(n.stringKey);const i=[];for(const l of n.above.values())i.push(tn(l));const o=[];for(const l of n.tokens.values()){const u=l.family;o.push([u.key,t.valueMap.get(l.key)])}if(r){const l=D(r,t),u={type:"molecule_disposal",token:e,family:r,context:i,values:o};e.family&&(u.family=e.family);for(const c of n.tokens.values())Ut(t,c);for(const c of n.below.values())((s=c.family)==null?void 0:s.dependsOn)==="all"?rs(c,t):(c.above.delete(n.stringKey),c.above.size===0&&rs(c,t));n.below.clear(),ge(t)&&t.transactionMeta.phase==="building"?t.transactionMeta.update.updates.push(u):l.subject.next(u),t.molecules.delete(n.stringKey)}for(const l of n.above.values())l.below.delete(n.stringKey)}function Bn(e,t,n){const r=e.families.get(t.key);if(r===void 0)throw new Ft(t,e);const i=r(n),o=$(e);if(i.family&&o.moleculeInProgress===null)if(Je(o))switch(i.type){case"atom":case"mutable_atom":e.on.atomCreation.next(i);break;case"selector":case"readonly_selector":e.on.selectorCreation.next(i);break}else ge(o)&&o.on.transactionApplying.state===null&&o.transactionMeta.update.updates.push({type:"state_creation",token:i});return i}function ke(e,t,n){const r=X(n),i=`${t.key}(${r})`,o=$(e);let s;switch(t.type){case"atom_family":case"mutable_atom_family":s=o.atoms.get(i);break;case"selector_family":s=o.selectors.get(i);break;case"readonly_selector_family":s=o.readonlySelectors.get(i);break;case"molecule_family":s=o.molecules.get(X(n))}return s&&tn(s)}function Oe(e,t,n){let r=ke(e,t,n);if(r)return r;const i=e.molecules.get(X(n));if(i)return nn(i,t,e);if(e.config.lifespan==="immortal"){const o=fl(t,n);return e.logger.error("❌",o.type,o.key,`was not found in store "${e.config.name}"; returned a counterfeit token.`),o}return r=Bn(e,t,n),r}function Ut(e,...t){var i,o;let n;if(t.length===1)n=t[0],n.key;else{const s=t[0],l=t[1];n=s.type==="molecule_family"?ke(e,s,l)??fl(s,l):Oe(e,s,l)}try{D(n,e)}catch{const l=e.disposalTraces.buffer.find(u=>(u==null?void 0:u.key)===n.key);e.logger.error("❌",n.type,n.key,`could not be disposed because it was not found in the store "${e.config.name}".`,l?`
|
|
17
|
+
*/var Hd=fe,Jd=Symbol.for("react.element"),Qd=Symbol.for("react.fragment"),Yd=Object.prototype.hasOwnProperty,qd=Hd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Xd={key:!0,ref:!0,__self:!0,__source:!0};function Ya(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Yd.call(t,r)&&!Xd.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Jd,type:e,key:o,ref:s,props:i,_owner:qd.current}}to.Fragment=Qd;to.jsx=Ya;to.jsxs=Ya;Da.exports=to;var K=Da.exports;function cl(e=Math.random){return e().toString(36).slice(2)}class ts extends Promise{constructor(n){let r,i;super((o,s)=>{r=o,i=s});C(this,"fate");C(this,"resolve");C(this,"reject");C(this,"done",!1);this.resolve=r,this.reject=i,this.use(n instanceof Promise?n:new Promise(n))}pass(n,r){n===this.fate&&(this.resolve(r),this.done=!0)}fail(n,r){n===this.fate&&(this.reject(r),this.done=!0)}use(n){if(n instanceof Promise){const r=n;this.fate=r,r.then(i=>{this.pass(r,i)},i=>{this.fail(r,i)})}else this.resolve(n),this.fate=void 0}}const Zd=(e,t,n=_e.STORE)=>oc(n,{key:`${e.key}:JSON`,get:({get:r})=>t.toJson(r(e)),set:({set:r},i)=>{r(e,t.fromJson(i))}});function P(e){for(;e.child!==null;)e=e.child;return e}function Gd(e){for(;e.parent!==null;)e=e.parent;return e}class Y{constructor(){C(this,"Subscriber");C(this,"subscribers",new Map)}subscribe(t,n){return this.subscribers.set(t,n),()=>{this.unsubscribe(t)}}unsubscribe(t){this.subscribers.delete(t)}next(t){const n=this.subscribers.values();for(const r of n)r(t)}}class eh extends Y{constructor(n){super();C(this,"state");this.state=n}next(n){this.state=n,super.next(n)}}function fl(e,t,n){const r={key:t.key,type:"atom_family"},i=e.families.get(t.key);i&&e.logger.error("❗","atom_family",t.key,`Overwriting an existing ${Fn(i)} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const o=new Y,l=Object.assign(u=>{const a=X(u),c={key:t.key,subKey:a},p=`${t.key}(${a})`,d=P(e),m=t.default,w={key:p,default:m instanceof Function?m(u):m};t.effects&&(w.effects=t.effects(u));const S=io(d,w,c);return o.next({type:"state_creation",token:S}),S},r,{subject:o,install:u=>fl(u,t),internalRoles:n});return e.families.set(t.key,l),e.defaults.set(t.key,t.default),r}function vn(e,t,n){const r={key:t.key,type:"readonly_selector_family"},i=e.families.get(t.key);i&&e.logger.error("❗","readonly_selector_family",t.key,`Overwriting an existing ${Fn(i)} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const o=new Y,l=Object.assign(u=>{const a=X(u),c={key:t.key,subKey:a},p=`${t.key}(${a})`,d=P(e),m=vl(d,{key:p,get:t.get(u)},c);return o.next({type:"state_creation",token:m}),m},r,{internalRoles:n,subject:o,install:u=>vn(u,t),default:u=>t.get(u)({get:(...c)=>je(e,...c),find:(c,p)=>Oe(e,c,p),seek:(c,p)=>ke(e,c,p),json:c=>Vt(e,c)})});return e.families.set(t.key,l),r}function th(e,t){return"set"in t?kl(e,t):vn(e,t)}const nh={atom_family:"atom",mutable_atom_family:"mutable_atom",selector_family:"selector",readonly_selector_family:"readonly_selector",molecule_family:"molecule"};function dl(e,t){const n=X(t),r=`${e.key}(${n})`,i=nh[e.type],o={key:r,type:i};return i==="molecule"?Object.assign(o,{key:t,family:e}):Object.assign(o,{family:{key:e.key,subKey:n}}),Object.assign(o,{counterfeit:!0}),o}function nn(e){const t={key:e.key,type:e.type};return"family"in e&&(t.family=e.family),t}function dn(e){return Xh(_e.STORE,e)}const xo=e=>(t,n,r,i,...o)=>{console[e](`${t} ${n} "${r}" ${i}`,...o)},rh={error:xo("error"),info:xo("info"),warn:xo("warn")};class ih{constructor(t,n,r=rh){C(this,"error",(...t)=>{var n;(((n=this.filter)==null?void 0:n.call(this,...t))??!0)&&this.logLevel!==null&&this.logger.error(...t)});C(this,"info",(...t)=>{var n;(((n=this.filter)==null?void 0:n.call(this,...t))??!0)&&this.logLevel==="info"&&this.logger.info(...t)});C(this,"warn",(...t)=>{var n;(((n=this.filter)==null?void 0:n.call(this,...t))??!0)&&this.logLevel!=="error"&&this.logLevel!==null&&this.logger.warn(...t)});this.logLevel=t,this.filter=n,this.logger=r}}function oh(e){return oc(_e.STORE,e)}function sh(e){return th(_e.STORE,e)}function lh(e){return nc(e,_e.STORE)}function uh(e,t=cl()){return no(e,t,_e.STORE)}class pt{constructor(t,n){C(this,"a");C(this,"b");C(this,"cardinality");C(this,"relations",new Map);C(this,"contents",new Map);C(this,"isContent");C(this,"makeContentKey",(t,n)=>`${t}:${n}`);C(this,"warn");var r;if(this.a=t.between[0],this.b=t.between[1],this.cardinality=t.cardinality,n!=null&&n.externalStore||(this.relations=new Map((r=t.relations)==null?void 0:r.map(([i,o])=>[i,new Set(o)])),this.contents=new Map(t.contents)),this.isContent=(n==null?void 0:n.isContent)??null,n!=null&&n.makeContentKey&&(this.makeContentKey=n.makeContentKey),n!=null&&n.externalStore){const i=n.externalStore;this.has=(o,s)=>i.has(o,s),this.addRelation=(o,s)=>{i.addRelation(o,s)},this.deleteRelation=(o,s)=>{i.deleteRelation(o,s)},this.replaceRelationsSafely=(o,s)=>{i.replaceRelationsSafely(o,s)},this.replaceRelationsUnsafely=(o,s)=>{i.replaceRelationsUnsafely(o,s)},this.getRelatedKeys=o=>i.getRelatedKeys(o),i.getContent&&(this.getContentInternal=o=>i.getContent(o),this.setContent=(o,s)=>{i.setContent(o,s)},this.deleteContent=o=>{i.deleteContent(o)});for(const[o,s]of t.relations??[])for(const l of s)this.addRelation(o,l);for(const[o,s]of t.contents??[])this.setContent(o,s)}n!=null&&n.warn&&(this.warn=n.warn)}getRelatedKeys(t){return this.relations.get(t)}addRelation(t,n){let r=this.relations.get(t),i=this.relations.get(n);r?r.add(n):(r=new Set([n]),this.relations.set(t,r)),i?i.add(t):(i=new Set([t]),this.relations.set(n,i))}deleteRelation(t,n){const r=this.relations.get(t);if(r){r.delete(n),r.size===0&&this.relations.delete(t);const i=this.relations.get(n);i&&(i.delete(t),i.size===0&&this.relations.delete(n))}}replaceRelationsUnsafely(t,n){this.relations.set(t,new Set(n));for(const r of n){const i=new Set([t]);this.relations.set(r,i)}}replaceRelationsSafely(t,n){const r=this.relations.get(t);if(r)for(const i of r){const o=this.relations.get(i);o&&(o.size===1?this.relations.delete(i):o.delete(t),this.contents.delete(this.makeContentKey(t,i)))}this.relations.set(t,new Set(n));for(const i of n){let o=this.relations.get(i);o?o.add(t):(o=new Set([t]),this.relations.set(i,o))}}getContentInternal(t){return this.contents.get(t)}setContent(t,n){this.contents.set(t,n)}deleteContent(t){this.contents.delete(t)}toJSON(){return{between:[this.a,this.b],cardinality:this.cardinality,relations:[...this.relations.entries()].map(([t,n])=>[t,[...n]]),contents:[...this.contents.entries()]}}set(t,...n){const r=typeof n[0]=="string"?n[0]:t[this.b],i=n[1]??typeof n[0]=="string"?void 0:n[0];switch(t=typeof t=="string"?t:t[this.a],this.cardinality){case"1:1":{const o=this.getRelatedKey(t);o&&o!==r&&this.delete(o,t)}case"1:n":{const o=this.getRelatedKey(r);o&&o!==t&&this.delete(o,r)}}if(i){const o=this.makeContentKey(t,r);this.setContent(o,i)}return this.addRelation(t,r),this}delete(t,n){n=typeof n=="string"?n:t[this.b];const r=typeof t=="string"?t:t[this.a];if(r===void 0&&typeof n=="string"){const i=this.getRelatedKeys(n);if(i)for(const o of i)this.delete(o,n)}if(typeof r=="string"&&n===void 0){const i=this.getRelatedKeys(r);if(i)for(const o of i)this.delete(r,o)}if(typeof r=="string"&&typeof n=="string"){this.deleteRelation(r,n);const i=this.makeContentKey(r,n);this.deleteContent(i)}return this}getRelatedKey(t){var r;const n=this.getRelatedKeys(t);if(n){n.size>1&&((r=this.warn)==null||r.call(this,`${n.size} related keys were found for key "${t}": (${[...n].map(i=>`"${i}"`).join(", ")}). Only one related key was expected.`));for(const i of n)return i}}replaceRelations(t,n,r){const i=!Array.isArray(n),o=i?Object.keys(n):n;if(r!=null&&r.reckless?this.replaceRelationsUnsafely(t,o):this.replaceRelationsSafely(t,o),i)for(const s of o){const l=this.makeContentKey(t,s),u=n[s];this.setContent(l,u)}return this}getContent(t,n){const r=this.makeContentKey(t,n);return this.getContentInternal(r)}getRelationEntries(t){const n=t[this.a],r=t[this.b];if(n!==void 0&&r===void 0){const i=this.getRelatedKeys(n);if(i)return[...i].map(o=>[o,this.getContent(n,o)??null])}if(n===void 0&&r!==void 0){const i=this.getRelatedKeys(r);if(i)return[...i].map(o=>[o,this.getContent(o,r)??null])}return[]}has(t,n){if(n){const r=this.getRelatedKeys(t);return(r==null?void 0:r.has(n))??!1}return this.relations.has(t)}}function Je(e){return"epoch"in e.transactionMeta}function ge(e){return"phase"in e.transactionMeta}const ah=e=>{const t=P(e);if(!ge(t)){e.logger.warn("🐞","transaction","???","abortTransaction called outside of a transaction. This is probably a bug in AtomIO.");return}e.logger.info("🪂","transaction",t.transactionMeta.update.key,"Aborting transaction"),t.parent.child=null},ch=e=>e[0].toUpperCase()+e.slice(1);function Fn(e){return e.type.split("_").map(ch).join(" ")}class Dt extends Error{constructor(...t){const n=t[0],r=t.length===2?t[1]:t[2];if(t.length===2)super(`${Fn(n)} ${X(n.key)} not found in store "${r.config.name}".`);else{const i=t[1];super(`${Fn(n)} "${n.key}" member ${X(i)} not found in store "${r.config.name}".`)}}}function no(e,t,n){return(...r)=>{const i=D(e,n);if(i)return i.run(r,t);throw new Dt(e,n)}}const qa=e=>t=>e instanceof Function?e(t):e,ro=(e,t)=>{if(t.valueMap.has(e.key))return t.logger.info("📖",e.type,e.key,"reading cached value"),Jh(e,t);if(e.type==="selector"||e.type==="readonly_selector")return t.logger.info("🧮",e.type,e.key,"computing value"),e.get();const n=e.default instanceof Function?e.default():e.default;return t.logger.info("💁","atom",e.key,"could not find cached value; using default",n),e.default instanceof Function?e.default():e.default},fh=(e,t)=>{if(e.operation.open){const n=performance.now();return e.logger.info("❗",t.type,t.key,`deferring setState at T-${n} until setState for "${e.operation.token.key}" is done`),n}e.operation={open:!0,done:new Set,prev:new Map,time:Date.now(),token:t},e.logger.info("⭕",t.type,t.key,`operation start in store "${e.config.name}"${ge(e)?` ${e.transactionMeta.phase} "${e.transactionMeta.update.key}"`:""}`)},dh=e=>{e.operation.open&&e.logger.info("🔴",e.operation.token.type,e.operation.token.key,`operation done in store "${e.config.name}"`),e.operation={open:!1},e.on.operationClose.next(e.operation)},hh=(e,t)=>e.operation.open?e.operation.done.has(t):(e.logger.error("🐞","unknown",t,"isDone called outside of an operation. This is probably a bug in AtomIO."),!0),hl=(e,t)=>{if(!e.operation.open){e.logger.error("🐞","unknown",t,"markDone called outside of an operation. This is probably a bug in AtomIO.");return}e.operation.done.add(t)},ph=(e,t,n)=>{switch(e.type){case"mutable_atom":n.logger.info("📢",e.type,e.key,"is now (",t.newValue,") subscribers:",e.subject.subscribers);break;default:n.logger.info("📢",e.type,e.key,"went (",t.oldValue,"->",t.newValue,") subscribers:",e.subject.subscribers)}e.subject.next(t)},Eu=(e,t)=>{const n=P(t),r=n.selectorAtoms.getRelatedKeys(e.key);if(n.logger.info("🧹",e.type,e.key,r?`evicting ${r.size} states downstream:`:"no downstream states",r??"to evict"),r){n.operation.open&&n.logger.info("🧹",e.type,e.key,`[ ${[...n.operation.done].join(", ")} ] already done`);for(const i of r)hh(n,i)||(Qh(i,n),hl(n,i))}};function yh(e,t){return!(Hh(t.newValue)||e.includes("🔍"))}const mh=(e,t,n)=>{const{key:r}=e,i=P(n);if(!ge(i)||i.transactionMeta.phase!=="building"){n.logger.error("🐞","atom",r,"stowUpdate called outside of a transaction. This is probably a bug.");return}if(!yh(r,t))return;const s={type:"atom_update",key:r,...t};e.family&&(s.family=e.family),i.transactionMeta.update.updates.push(s),n.logger.info("📁","atom",r,"stowed (",t.oldValue,"->",t.newValue,")")},gh=(e,t,n)=>{const r=ro(e,n);let i=r;if(e.type==="mutable_atom"&&ge(n)){const{parent:s}=n;i=ss(e,s,n)}i=qa(t)(i),n.logger.info("📝","atom",e.key,"set to",i),i=sn(e.key,i,e.subject,n),Yh(e.key,n)&&qh(e.key,n),hl(n,e.key),Eu(e,n);const o={oldValue:r,newValue:i};if(Je(n))ph(e,o,n);else if(n.parent){if(n.on.transactionApplying.state===null)mh(e,o,n);else if(e.key.startsWith("*")){const s=e.key.slice(1),l=n.atoms.get(s);let u=n.valueMap.get(s);if(l.type==="mutable_atom"&&ge(n)){const{parent:c}=n;u=ss(l,c,n)}u.do(o.newValue)===null&&Eu(l,n)}}},Xa=(e,t,n)=>{switch(e.type){case"atom":case"mutable_atom":gh(e,t,n);break;case"selector":e.set(t);break}};function Za(e,t){if(t.family){const n=e.families.get(t.family.key);if(n)return n}}function oe(e,...t){let n,r,i,o;if(t.length===2?(n=t[0],o=t[1],r=Za(e,n)??null,r&&(i=n.family?on(n.family.subKey):null,n=Oe(e,r,i))):(r=t[0],i=t[1],o=t[2],n=Oe(e,r,i)),"counterfeit"in n){const u=e.disposalTraces.buffer.find(a=>(a==null?void 0:a.key)===n.key);e.logger.error("❌",n.type,n.key,`could not be set because it was not found in the store "${e.config.name}".`,u?`This state was previously disposed:
|
|
18
|
+
${u.trace}`:"No previous disposal trace was found.");return}const s=fh(e,n);if(s){const u=e.on.operationClose.subscribe(`waiting to set "${n.key}" at T-${s}`,()=>{u(),e.logger.info("🟢",n.type,n.key,`resuming deferred setState from T-${s}`),oe(e,n,o)});return}const l=D(n,e);Xa(l,o,e),dh(e)}function vh(e,t,n){const{key:r,newValue:i,oldValue:o}=t,s=e==="newValue"?i:o,l={key:r,type:"atom"};t.family&&Object.assign(l,{family:t.family}),oe(n,l,s)}function wh(e,t){const n=new Y,r={type:"molecule_family",key:t.key,dependsOn:t.dependsOn??"all"},i={...r,subject:n,new:t.new};return e.moleculeFamilies.set(t.key,i),r}function rn(e,t,n){const r=Bn(n,t,e.key);e.tokens.set(r.key,r);const i=ge(n)&&n.transactionMeta.phase==="building",o=n.moleculeInProgress===e.key;return!i&&!o&&e.subject.next({type:"state_creation",token:r}),r}class lt extends Set{constructor(n,r=0){super(n);C(this,"mode","record");C(this,"subject",new Y);C(this,"cacheLimit",0);C(this,"cache",[]);C(this,"cacheIdx",-1);C(this,"cacheUpdateNumber",-1);C(this,"parent");C(this,"child",null);C(this,"transactionUpdates",null);n instanceof lt&&(this.parent=n,this.cacheUpdateNumber=n.cacheUpdateNumber),r&&(this.cacheLimit=r,this.cache=new Array(r),this.subscribe("auto cache",i=>{this.cacheIdx++,this.cacheIdx%=this.cacheLimit,this.cache[this.cacheIdx]=i}))}toJSON(){return{members:[...this],cache:this.cache,cacheLimit:this.cacheLimit,cacheIdx:this.cacheIdx,cacheUpdateNumber:this.cacheUpdateNumber}}static fromJSON(n){const r=new lt(n.members,n.cacheLimit);return r.cache=n.cache,r.cacheIdx=n.cacheIdx,r.cacheUpdateNumber=n.cacheUpdateNumber,r}add(n){const r=super.add(n);return this.mode==="record"&&(this.cacheUpdateNumber++,this.emit(`add:${X(n)}`)),r}clear(){const n=this.mode==="record"?[...this]:null;super.clear(),n&&(this.cacheUpdateNumber++,this.emit(`clear:${JSON.stringify(n)}`))}delete(n){const r=super.delete(n);return this.mode==="record"&&(this.cacheUpdateNumber++,this.emit(`del:${X(n)}`)),r}transaction(n){this.mode="transaction",this.transactionUpdates=[],this.child=new lt(this);const r=this.child._subscribe("transaction",i=>{var o;(o=this.transactionUpdates)==null||o.push(i)});try{if(n(this.child)){for(const o of this.transactionUpdates)this.doStep(o);this.cacheUpdateNumber++,this.emit(`tx:${this.transactionUpdates.join(";")}`)}}catch(i){throw console.error("Failed to apply transaction to SetRTX:",i),i}finally{r(),this.child=null,this.transactionUpdates=null,this.mode="record"}}_subscribe(n,r){return this.subject.subscribe(n,r)}subscribe(n,r){return this.subject.subscribe(n,i=>{r(`${this.cacheUpdateNumber}=${i}`)})}emit(n){this.subject.next(n)}doStep(n){const r=n.indexOf(":"),i=n.substring(0,r),o=n.substring(r+1);switch(i){case"add":this.add(JSON.parse(o));break;case"clear":this.clear();break;case"del":this.delete(JSON.parse(o));break;case"tx":for(const s of o.split(";"))this.doStep(s)}}getUpdateNumber(n){const r=n.indexOf("=");return Number(n.substring(0,r))}do(n){const r=n.indexOf("="),i=Number(n.substring(0,r)),o=i-this.cacheUpdateNumber;if(o>0){if(o===1){this.mode="playback";const l=n.substring(r+1);return this.doStep(l),this.mode="record",this.cacheUpdateNumber=i,null}return this.cacheUpdateNumber+1}if(Math.abs(o)<this.cacheLimit){const l=this.cacheIdx+o;if(this.cache[l]===n)return null;this.mode="playback";let a=!1;for(;!a;){this.cacheIdx%=this.cacheLimit;const p=this.cache[this.cacheIdx];if(this.cacheIdx--,!p)return"OUT_OF_RANGE";this.undo(p),a=this.cacheIdx===l-1}const c=n.substring(r+1);return this.doStep(c),this.mode="record",this.cacheUpdateNumber=i,null}return"OUT_OF_RANGE"}undoStep(n){const r=n.indexOf(":"),i=n.substring(0,r),o=n.substring(r+1);switch(i){case"add":this.delete(JSON.parse(o));break;case"del":this.add(JSON.parse(o));break;case"clear":{const s=JSON.parse(o);for(const l of s)this.add(l);break}case"tx":{const s=o.split(";");for(let l=s.length-1;l>=0;l--)this.undoStep(s[l])}}}undo(n){const r=n.indexOf("=");if(Number(n.substring(0,r))===this.cacheUpdateNumber){this.mode="playback";const o=n.substring(r+1);return this.undoStep(o),this.mode="record",this.cacheUpdateNumber--,null}return this.cacheUpdateNumber}}function H(e){return e[0].toUpperCase()+e.slice(1)}class pl{constructor(t,n,r=_e.STORE){C(this,"options");C(this,"defaultContent");C(this,"toolkit");C(this,"retrieve");C(this,"molecules",new Map);C(this,"relations");C(this,"states");C(this,"core");C(this,"store");C(this,"alternates");this.store=r,this.options=t,this.defaultContent=n,this.alternates=new Map,this.alternates.set(r.config.name,this),this.store.miscResources.set(`join:${t.key}`,this),this.retrieve=(g,v)=>{const _=this.toolkit.seek(g,v);if(_)return _;const M=this.molecules.get(X(v));if(M){const x=D(g,r);return rn(M,x,r)}if(r.config.lifespan==="immortal")throw new Dt(g,v,r);return Bn(r,g,v)},this.toolkit={get:(...g)=>je(r,...g),set:(...g)=>{oe(r,...g)},find:this.retrieve,seek:(...g)=>ke(r,...g),json:g=>Vt(r,g),dispose:(...g)=>{Kt(r,...g)}};const i=t.between[0],o=t.between[1],s=sc(r,{key:`${t.key}/relatedKeys`,default:()=>new lt,mutable:!0,fromJson:g=>lt.fromJSON(g),toJson:g=>g.toJSON()},["join","relations"]);this.core={findRelatedKeysState:s};const l=({get:g},v)=>g(this.retrieve(s,v)),u=(g,v,_)=>{const{set:M}=g,x=this.retrieve(s,v),A=this.retrieve(s,_);M(x,I=>I.add(_)),M(A,I=>I.add(v))},a=(g,v,_)=>{const{set:M}=g,x=this.retrieve(s,v),A=this.retrieve(s,_);M(x,I=>(I.delete(_),I.size,I)),M(A,I=>(I.delete(v),I.size,I))},c=(g,v,_)=>{const{get:M,set:x}=g,A=this.retrieve(s,v),I=M(A);for(const U of I){if(_.includes(U))continue;const nt=this.retrieve(s,U);x(nt,Re=>(Re.delete(v),Re))}x(A,U=>(U.transaction(xe=>{xe.clear();for(const nt of _){const Re=l(g,nt),yn=Re.has(v);if(this.relations.cardinality==="1:n"){const N=[];for(const $ of Re){if($===v)continue;const L=l(g,$);L.delete(nt),L.size===0&&N.push($)}!yn&&Re.size>0&&Re.clear();for(const $ of N){const L=[nt,$].sort(),Q=`"${L[0]}:${L[1]}"`;this.molecules.delete(Q)}}yn||Re.add(v),xe.add(nt)}return!0}),U))},p=(g,v,_)=>{const{set:M}=g,x=this.retrieve(s,v);M(x,A=>(A.transaction(I=>{for(const U of _)I.add(U);return!0}),A));for(const A of _){const I=this.retrieve(s,A);M(I,U=>(U.add(v),U))}return!0},d=(g,v,_)=>{const M=l(g,v);return _?M.has(_):M.size>0},m={getRelatedKeys:g=>l(this.toolkit,g),addRelation:(g,v)=>{u(this.toolkit,g,v)},deleteRelation:(g,v)=>{a(this.toolkit,g,v)},replaceRelationsSafely:(g,v)=>{c(this.toolkit,g,v)},replaceRelationsUnsafely:(g,v)=>{p(this.toolkit,g,v)},has:(g,v)=>d(this.toolkit,g,v)};let w,S,R;if(n){S=fl(r,{key:`${t.key}/content`,default:n},["join","content"]),t.key,t.between[0],t.between[1],t.cardinality,R=wh(r,{key:`${t.key}/content-molecules`,new:class{constructor(A,I){this.key=I}}});const g=({get:x},A)=>x(this.retrieve(S,A)),v=({set:x},A,I)=>{x(this.retrieve(S,A),I)},_=(x,A)=>{const I=r.molecules.get(`"${A}"`);I&&(this.toolkit.dispose(I),this.molecules.delete(`"${A}"`))};w=Object.assign(m,{getContent:x=>g(this.toolkit,x),setContent:(x,A)=>{v(this.toolkit,x,A)},deleteContent:x=>{_(this.toolkit,x)}})}else w=m;const h=new pt(t,{externalStore:w,makeContentKey:(...g)=>{const v=g.sort(),_=`${v[0]}:${v[1]}`,[M,x]=v.map(A=>this.molecules.get(X(A)));if(r.config.lifespan==="immortal"&&M&&x){const A=P(r),I=Dn(A,[M,x],R,_);this.molecules.set(`"${_}"`,D(I,A))}return _}}),f=()=>vn(r,{key:`${t.key}/singleRelatedKey`,get:g=>({get:v})=>{const _=this.retrieve(s,g),M=v(_);for(const x of M)return x;return null}},["join","keys"]),y=()=>vn(r,{key:`${t.key}/multipleRelatedKeys`,get:g=>({get:v})=>{const _=Tu(s,r),M=this.retrieve(_,g);return v(M).members}},["join","keys"]),k=()=>vn(r,{key:`${t.key}/singleRelatedEntry`,get:g=>({get:v})=>{const _=this.retrieve(s,g),M=v(_);for(const x of M){const A=h.makeContentKey(g,x),I=this.retrieve(S,A),U=v(I);return[x,U]}return null}},["join","entries"]),T=()=>vn(r,{key:`${t.key}/multipleRelatedEntries`,get:g=>({get:v})=>{const _=Tu(s,r),M=this.retrieve(_,g);return v(M).members.map(A=>{const I=h.makeContentKey(g,A),U=this.retrieve(S,I),xe=v(U);return[A,xe]})}},["join","entries"]);switch(t.cardinality){case"1:1":{const g=f(),v=`${i}KeyOf${H(o)}`,_=`${o}KeyOf${H(i)}`,M={[v]:g,[_]:g};let x;if(n){const A=k(),I=`${i}EntryOf${H(o)}`,U=`${o}EntryOf${H(i)}`,xe={[I]:A,[U]:A};x=Object.assign(M,xe)}else x=M;this.relations=h,this.states=x;break}case"1:n":{const g=f(),v=y(),_=`${i}KeyOf${H(o)}`,M=`${o}KeysOf${H(i)}`,x={[_]:g,[M]:v};let A;if(n){const I=k(),U=T(),xe=`${i}EntryOf${H(o)}`,nt=`${o}EntriesOf${H(i)}`,Re={[xe]:I,[nt]:U};A=Object.assign(x,Re)}else A=x;this.relations=h,this.states=A;break}default:{const g=y(),v=`${i}KeysOf${H(o)}`,_=`${o}KeysOf${H(i)}`,M={[v]:g,[_]:g};let x;if(n){const A=T(),I=`${i}EntriesOf${H(o)}`,U=`${o}EntriesOf${H(i)}`,xe={[I]:A,[U]:A};x=Object.assign(M,xe)}else x=M;this.relations=h,this.states=x}}}transact(t,n){const r=this.toolkit;this.toolkit=t,n(this),this.toolkit=r}[Symbol.dispose](){this.alternates.delete(this.store.config.name)}in(t){const n=t.config.name,r=this.alternates.get(n);if(r)return r;const i=new pl(this.options,this.defaultContent,t);return this.alternates.set(n,i),i.alternates=this.alternates,i}}function kh(e,t,n=_e.STORE){return ns(n).set(e.key,new pl(e,t,n)),{key:e.key,type:"join",a:e.between[0],b:e.between[1],cardinality:e.cardinality}}function ns(e){if("joins"in e&&e.joins instanceof Map)return e.joins;const t=new Map;return e.joins=t,t}function yl(e,t){var i;const n=ns(t);let r=n.get(e.key);if(r===void 0){if(r=(i=ns(_e.STORE).get(e.key))==null?void 0:i.in(t),r===void 0)throw new Error(`Join "${e.key}" not found in store "${t.config.name}"`);n.set(e.key,r)}return r}function Sh(e,t,n){const r=yl(e,n);let i;switch(e.cardinality){case"1:1":{const o=`${e.a}KeyOf${H(e.b)}`,s=`${e.b}KeyOf${H(e.a)}`;i={get[o](){const u=r.states[o];return r.retrieve(u,t)},get[s](){const u=r.states[s];return r.retrieve(u,t)}};const l=`${e.a}EntryOf${H(e.b)}`;if(l in r.states){const u=`${e.b}EntryOf${H(e.a)}`;Object.assign(i,{get[l](){const a=r.states[l];return r.retrieve(a,t)},get[u](){const a=r.states[u];return r.retrieve(a,t)}})}break}case"1:n":{const o=`${e.a}KeyOf${H(e.b)}`,s=`${e.b}KeysOf${H(e.a)}`;i={get[o](){const u=r.states[o];return r.retrieve(u,t)},get[s](){const u=r.states[s];return r.retrieve(u,t)}};const l=`${e.a}EntryOf${H(e.b)}`;if(l in r.states){const u=`${e.b}EntriesOf${H(e.a)}`;Object.assign(i,{get[l](){const a=r.states[l];return r.retrieve(a,t)},get[u](){const a=r.states[u];return r.retrieve(a,t)}})}break}case"n:n":{const o=`${e.a}KeysOf${H(e.b)}`,s=`${e.b}KeysOf${H(e.a)}`;i={get[o](){const u=r.states[o];return r.retrieve(u,t)},get[s](){const u=r.states[s];return r.retrieve(u,t)}};const l=`${e.a}EntriesOf${H(e.b)}`;if(l in r.states){const u=`${e.b}EntriesOf${H(e.a)}`;Object.assign(i,{get[l](){const a=r.states[l];return r.retrieve(a,t)},get[u](){const a=r.states[u];return r.retrieve(a,t)}})}}}return i}function _h(e,t){return Sh(e,t,_e.STORE)}function Eh(e,t){return yl(e,t).core.findRelatedKeysState}function Ch(e){return Eh(e,_e.STORE)}function Ga(e){return{store:e}}function je(e,...t){let n,r,i;if(t.length===1)n=t[0],n.type!=="molecule"&&(r=Za(e,n)??null,r&&(i=n.family?on(n.family.subKey):null,n=Oe(e,r,i)));else{r=t[0],i=t[1];let o;r.type==="molecule_family"?o=ke(e,r,i)??dl(r,i):o=Oe(e,r,i),n=o}if("counterfeit"in n&&"family"in n){r=n.type==="molecule"?D(n.family,e):e.families.get(n.family.key);const o=n.type==="molecule"?n.key:n.family.subKey,s=e.disposalTraces.buffer.find(l=>(l==null?void 0:l.key)===n.key);switch(e.logger.error("❌",n.type,n.key,`could not be retrieved because it was not found in the store "${e.config.name}".`,s?`This state was previously disposed:
|
|
19
|
+
${s.trace}`:"No previous disposal trace was found."),r.type){case"atom_family":case"mutable_atom_family":return e.defaults.get(r.key);case"selector_family":case"readonly_selector_family":{if(e.defaults.has(r.key))return e.defaults.get(n.family.key);const l=D(r,e).default(o);return e.defaults.set(r.key,l),l}case"molecule_family":throw new Dt(r,o,e)}}switch(n.type){case"atom":case"mutable_atom":case"selector":case"readonly_selector":return ro(D(n,e),e);case"molecule":return D(n,e).instance}}class Cu{constructor(t,n,r){C(this,"type","molecule");C(this,"stringKey");C(this,"family");C(this,"subject",new Y);C(this,"tokens",new Map);C(this,"above",new Map);C(this,"below",new Map);C(this,"joins",new Map);C(this,"instance");if(this.key=n,this.stringKey=X(n),r&&(this.family=r),t)if(Array.isArray(t))for(const i of t)this.above.set(i.stringKey,i);else this.above.set(t.stringKey,t)}}function xu(e){return e[0].toUpperCase()+e.slice(1)}function Dn(e,t,n,r,...i){const o=Gd(e),s=P(e),l=X(r);s.moleculeInProgress=l;const u=Array.isArray(t)?t:[t],a=u.map(R=>{if(R instanceof Cu)return R;const h=X(R.key),f=e.molecules.get(h);if(!f)throw new Error(`Molecule ${h} not found in store "${e.config.name}"`);return f}),c=new Cu(a,r,n);s.molecules.set(l,c);for(const R of a)R.below.set(c.stringKey,c);const p={get:(...R)=>je(P(o),...R),set:(...R)=>{oe(P(o),...R)},seek:(R,h)=>ke(P(o),R,h),json:R=>Vt(P(o),R),run:(R,h=cl())=>no(R,h,P(e)),make:(R,h,f,...y)=>Dn(P(o),R,h,f,...y),dispose:R=>{Kt(P(o),R)},env:()=>Ga(P(o)),bond:(R,h)=>{if(R.type==="join"){const{as:f}=h,y=yl(R,o);y.molecules.set(l,c),c.joins.set(R.key,y);const k=d.subject.subscribe(`join:${R.key}-${l}`,x=>{x.type==="molecule_disposal"&&X(x.token.key)===l&&(k(),y.molecules.delete(l))});if(f===null)return;const T=R.a===f?R.b:R.a,g=_h(R,r),v=g[`${T}KeysOf${xu(f)}`],_=g[`${T}EntriesOf${xu(f)}`];let M={relatedKeys:v};return _&&(M=Object.assign(M,{relatedEntries:_})),M}return rn(c,D(R,o),P(o))},claim:(R,h)=>{const{exclusive:f}=h,y=P(e).molecules.get(X(R.key));if(y)if(f){for(const k of y.above.values())k.below.delete(y.stringKey);y.above.clear(),y.above.set(c.stringKey,c),c.below.set(y.stringKey,y)}else y.above.set(c.stringKey,c),c.below.set(y.stringKey,y)},spawn:(R,h,...f)=>Dn(P(e),[c],D(R,e),h,...f)},d=D(n,e),m=d.new;c.instance=new m(p,r,...i);const w={type:"molecule",key:r,family:n},S={type:"molecule_creation",token:w,family:n,context:u,params:i};return Je(s)?d.subject.next(S):ge(s)&&s.on.transactionApplying.state===null&&s.transactionMeta.update.updates.push(S),s.moleculeInProgress=null,w}function xh(e,t,n){switch(t){case"newValue":{ec(e,n);break}case"oldValue":{Kt(n,e.token);break}}}function Rh(e,t,n){switch(t){case"newValue":{Kt(n,e.token);break}case"oldValue":{ec(e,n),n.valueMap.set(e.token.key,e.value);break}}}function ec(e,t){const{family:n}=e.token;if(n){const r=t.families.get(n.key);r&&Oe(t,r,on(n.subKey))}}function Th(e,t,n){switch(t){case"newValue":Dn(n,e.context,e.family,e.token.key,...e.params);break;case"oldValue":Kt(n,e.token);break}}function Nh(e,t,n){switch(t){case"newValue":Kt(n,e.token);break;case"oldValue":{const r=Dn(n,e.context,e.family,e.token.key);for(const[i,o]of e.values){const s=`${i}(${X(r.key)})`,l=D(r,n),u=l.tokens.has(s),a=n.families.get(i);a&&!u&&rn(l,a,n),n.valueMap.set(s,o)}}break}}function wn(e,t,n){const r=e==="newValue"?t.updates:[...t.updates].reverse();for(const i of r)switch(i.type){case"atom_update":case"selector_update":vh(e,i,n);break;case"state_creation":xh(i,e,n);break;case"state_disposal":Rh(i,e,n);break;case"molecule_creation":Th(i,e,n);break;case"molecule_disposal":Nh(i,e,n);break;case"transaction_update":wn(e,i,n);break}}function rs(e,t,n){Je(n)&&e&&n.transactionMeta.epoch.set(e,t)}function Oh(e,t,n){if(!Je(n))return;const i=n.transactionMeta.actionContinuities.getRelatedKey(e);i!==void 0&&n.transactionMeta.epoch.set(i,t)}const Mh=(e,t)=>{var o;const n=P(t),{parent:r}=n;if(r===null||!ge(n)||((o=n.transactionMeta)==null?void 0:o.phase)!=="building"){t.logger.warn("🐞","transaction","???","applyTransaction called outside of a transaction. This is probably a bug in AtomIO.");return}n.transactionMeta.phase="applying",n.transactionMeta.update.output=e,r.child=null,r.on.transactionApplying.next(n.transactionMeta);const{updates:i}=n.transactionMeta.update;if(t.logger.info("🛄","transaction",n.transactionMeta.update.key,`Applying transaction with ${i.length} updates:`,i),wn("newValue",n.transactionMeta.update,r),Je(r)){Oh(n.transactionMeta.update.key,n.transactionMeta.update.epoch,r);const s=D({key:n.transactionMeta.update.key,type:"transaction"},t);s==null||s.subject.next(n.transactionMeta.update),t.logger.info("🛬","transaction",n.transactionMeta.update.key,"Finished applying transaction.")}else ge(r)&&r.transactionMeta.update.updates.push(n.transactionMeta.update);r.on.transactionApplying.next(null)};function tc(e,t,n){if(!Je(n))return;const{epoch:i,actionContinuities:o}=n.transactionMeta;o.set(e,t),i.has(e)||i.set(e,-1)}class rt extends Map{constructor(n){super();C(this,"deleted",new Set);this.source=n}get(n){if(super.has(n))return super.get(n);if(!this.deleted.has(n)&&this.source.has(n))return this.source.get(n)}set(n,r){return this.deleted.delete(n),super.set(n,r)}hasOwn(n){return super.has(n)}has(n){return!this.deleted.has(n)&&(super.has(n)||this.source.has(n))}delete(n){return this.deleted.add(n),super.delete(n)}}const Ah=(e,t,n,r)=>{const i=P(n),o={parent:i,child:null,on:i.on,loggers:i.loggers,logger:i.logger,config:i.config,atoms:new rt(i.atoms),atomsThatAreDefault:new Set(i.atomsThatAreDefault),families:new rt(i.families),operation:{open:!1},readonlySelectors:new rt(i.readonlySelectors),timelines:new rt(i.timelines),timelineTopics:new pt(i.timelineTopics.toJSON()),trackers:new Map,transactions:new rt(i.transactions),selectorAtoms:new pt(i.selectorAtoms.toJSON()),selectorGraph:new pt(i.selectorGraph.toJSON(),{makeContentKey:(...a)=>a.sort().join(":")}),selectors:new rt(i.selectors),valueMap:new rt(i.valueMap),defaults:i.defaults,disposalTraces:n.disposalTraces.copy(),molecules:new rt(i.molecules),moleculeFamilies:new rt(i.moleculeFamilies),moleculeInProgress:i.moleculeInProgress,miscResources:new rt(i.miscResources)},s=$h(e,n),l={phase:"building",update:{type:"transaction_update",key:e,id:r,epoch:s===void 0?Number.NaN:s+1,updates:[],params:t,output:void 0},toolkit:{get:(...a)=>je(u,...a),set:(...a)=>{oe(u,...a)},run:(a,c=cl())=>no(a,c,u),find:(a,c)=>Oe(u,a,c),seek:(a,c)=>ke(u,a,c),json:a=>Vt(u,a),make:(a,c,p,...d)=>Dn(u,a,c,p,...d),dispose:(...a)=>{Kt(u,...a)},env:()=>Ga(u)}},u=Object.assign(o,{transactionMeta:l});return i.child=u,n.logger.info("🛫","transaction",e,"Building transaction with params:",t),u};function nc(e,t){const n={key:e.key,type:"transaction",run:(o,s)=>{const l=Ah(e.key,o,t,s);try{const u=P(t),{toolkit:a}=l.transactionMeta,c=e.do(a,...o);return Mh(c,u),c}catch(u){throw ah(r),t.logger.warn("💥","transaction",e.key,"caught:",u),u}},install:o=>nc(e,o),subject:new Y},r=P(t);r.transactions.set(n.key,n);const i=nn(n);return t.on.transactionCreation.next(i),i}function Ph(e,t){return Je(t)&&e?t.transactionMeta.epoch.get(e):void 0}function $h(e,t){const n=Je(t),r=n?t.transactionMeta.actionContinuities.getRelatedKey(e):void 0;return n&&r!==void 0?t.transactionMeta.epoch.get(r):void 0}class ml{constructor(t){C(this,"_buffer");C(this,"_index",0);let n;typeof t=="number"?n=t:n=t.length,this._buffer=Array.from({length:n})}get buffer(){return this._buffer}get index(){return this._index}add(t){this._buffer[this._index]=t,this._index=(this._index+1)%this._buffer.length}copy(){const t=new ml([...this._buffer]);return t._index=this._index,t}}class Lh{constructor(t,n=null){C(this,"parent",null);C(this,"child",null);C(this,"valueMap",new Map);C(this,"defaults",new Map);C(this,"atoms",new Map);C(this,"selectors",new Map);C(this,"readonlySelectors",new Map);C(this,"atomsThatAreDefault",new Set);C(this,"selectorAtoms",new pt({between:["selectorKey","atomKey"],cardinality:"n:n"}));C(this,"selectorGraph",new pt({between:["upstreamSelectorKey","downstreamSelectorKey"],cardinality:"n:n"},{makeContentKey:(...t)=>t.sort().join(":")}));C(this,"trackers",new Map);C(this,"families",new Map);C(this,"transactions",new Map);C(this,"transactionMeta",{epoch:new Map,actionContinuities:new pt({between:["continuity","action"],cardinality:"1:n"})});C(this,"timelines",new Map);C(this,"timelineTopics",new pt({between:["timelineKey","topicKey"],cardinality:"1:n"}));C(this,"disposalTraces",new ml(100));C(this,"molecules",new Map);C(this,"moleculeFamilies",new Map);C(this,"moleculeInProgress",null);C(this,"miscResources",new Map);C(this,"on",{atomCreation:new Y,atomDisposal:new Y,selectorCreation:new Y,selectorDisposal:new Y,timelineCreation:new Y,transactionCreation:new Y,transactionApplying:new eh(null),operationClose:new Y,moleculeCreationStart:new Y,moleculeCreationDone:new Y,moleculeDisposal:new Y});C(this,"operation",{open:!1});C(this,"config",{name:"IMPLICIT_STORE",lifespan:"ephemeral"});C(this,"loggers",[new ih("warn",(t,n,r)=>!r.includes("🔍"))]);C(this,"logger",{error:(...t)=>{for(const n of this.loggers)n.error(...t)},info:(...t)=>{for(const n of this.loggers)n.info(...t)},warn:(...t)=>{for(const n of this.loggers)n.warn(...t)}});var r,i;if(this.config={...n==null?void 0:n.config,...t},n!==null){this.valueMap=new Map(n==null?void 0:n.valueMap),this.operation={...n==null?void 0:n.operation},Je(n)&&(this.transactionMeta={epoch:new Map(n==null?void 0:n.transactionMeta.epoch),actionContinuities:new pt(n==null?void 0:n.transactionMeta.actionContinuities.toJSON())});for(const[,s]of n.families)(r=s.internalRoles)!=null&&r.includes("mutable")||(i=s.internalRoles)!=null&&i.includes("join")||s.install(this);const o=new Set;for(const[,s]of n.atoms)if(!o.has(s.key)&&(s.install(this),s.type==="mutable_atom")){const l=Vt(n,s),u=lc(s);o.add(l.key),o.add(u.key)}for(const[,s]of n.readonlySelectors)s.install(this);for(const[,s]of n.selectors)o.has(s.key)||s.install(this);for(const[,s]of n.transactions)s.install(this);for(const[,s]of n.timelines)s.install(this)}}}const _e={get STORE(){return globalThis.ATOM_IO_IMPLICIT_STORE||(globalThis.ATOM_IO_IMPLICIT_STORE=new Lh({name:"IMPLICIT_STORE",lifespan:"ephemeral"})),globalThis.ATOM_IO_IMPLICIT_STORE}};function D(e,t){let n,r=t;for(;r!==null;){switch(e.type){case"atom":case"mutable_atom":n=r.atoms.get(e.key);break;case"selector":n=r.selectors.get(e.key);break;case"readonly_selector":n=r.readonlySelectors.get(e.key);break;case"atom_family":case"mutable_atom_family":case"selector_family":case"readonly_selector_family":n=r.families.get(e.key);break;case"timeline":n=r.timelines.get(e.key);break;case"transaction":n=r.transactions.get(e.key);break;case"molecule":n=r.molecules.get(X(e.key));break;case"molecule_family":n=r.moleculeFamilies.get(e.key);break}if(n)return n;r=r.child}throw new Dt(e,t)}function is(e,t){var s;let n;n=D(e,t);const{family:r}=e;for(const l of n.joins.values())l.relations.delete(n.key),l.molecules.delete(n.stringKey);const i=[];for(const l of n.above.values())i.push(nn(l));const o=[];for(const l of n.tokens.values()){const u=l.family;o.push([u.key,t.valueMap.get(l.key)])}if(r){const l=D(r,t),u={type:"molecule_disposal",token:e,family:r,context:i,values:o};e.family&&(u.family=e.family);for(const c of n.tokens.values())Kt(t,c);for(const c of n.below.values())((s=c.family)==null?void 0:s.dependsOn)==="all"?is(c,t):(c.above.delete(n.stringKey),c.above.size===0&&is(c,t));n.below.clear(),ge(t)&&t.transactionMeta.phase==="building"?t.transactionMeta.update.updates.push(u):l.subject.next(u),t.molecules.delete(n.stringKey)}for(const l of n.above.values())l.below.delete(n.stringKey)}function Bn(e,t,n){const r=e.families.get(t.key);if(r===void 0)throw new Dt(t,e);const i=r(n),o=P(e);if(i.family&&o.moleculeInProgress===null)if(Je(o))switch(i.type){case"atom":case"mutable_atom":e.on.atomCreation.next(i);break;case"selector":case"readonly_selector":e.on.selectorCreation.next(i);break}else ge(o)&&o.on.transactionApplying.state===null&&o.transactionMeta.update.updates.push({type:"state_creation",token:i});return i}function ke(e,t,n){const r=X(n),i=`${t.key}(${r})`,o=P(e);let s;switch(t.type){case"atom_family":case"mutable_atom_family":s=o.atoms.get(i);break;case"selector_family":s=o.selectors.get(i);break;case"readonly_selector_family":s=o.readonlySelectors.get(i);break;case"molecule_family":s=o.molecules.get(X(n))}return s&&nn(s)}function Oe(e,t,n){let r=ke(e,t,n);if(r)return r;const i=e.molecules.get(X(n));if(i)return rn(i,t,e);if(e.config.lifespan==="immortal"){const o=dl(t,n);return e.logger.error("❌",o.type,o.key,`was not found in store "${e.config.name}"; returned a counterfeit token.`),o}return r=Bn(e,t,n),r}function Kt(e,...t){var i,o;let n;if(t.length===1)n=t[0],n.key;else{const s=t[0],l=t[1];n=s.type==="molecule_family"?ke(e,s,l)??dl(s,l):Oe(e,s,l)}try{D(n,e)}catch{const l=e.disposalTraces.buffer.find(u=>(u==null?void 0:u.key)===n.key);e.logger.error("❌",n.type,n.key,`could not be disposed because it was not found in the store "${e.config.name}".`,l?`
|
|
20
20
|
This state was most recently disposed
|
|
21
|
-
${l.trace}`:"No previous disposal trace was found.");return}switch(n.type){case"atom":case"mutable_atom":
|
|
21
|
+
${l.trace}`:"No previous disposal trace was found.");return}switch(n.type){case"atom":case"mutable_atom":_l(n,e);break;case"selector":case"readonly_selector":Bh(n,e);break;case"molecule":is(n,e);break}const{stack:r}=new Error;if(r){const s=(o=(i=r==null?void 0:r.split(`
|
|
22
22
|
`))==null?void 0:i.slice(3))==null?void 0:o.join(`
|
|
23
|
-
`);e.disposalTraces.add({key:n.key,trace:s})}}const ml=(e,t)=>$(t).atoms.has(e),Uh=(e,t)=>$(t).selectors.has(e),Kh=(e,t)=>$(t).readonlySelectors.has(e),Vh=(e,t)=>ml(e,t)||Uh(e,t)||Kh(e,t),is=(e,t)=>$(t).selectorGraph.getRelationEntries({downstreamSelectorKey:e}).filter(([r,{source:i}])=>i!==e).map(([r,{source:i}])=>i).filter(r=>Vh(r,t)),uc=(e,t,n)=>{const r=[],i=is(e,n);for(;i.length>0;){const o=i.shift();t.has(o)||(t.add(o),ml(o,n)?r.includes(o)||r.push(o):i.push(...is(o,n)))}return r},bh=(e,t)=>{const n=e.key,r=is(n,t),i=new Set;return r.flatMap(o=>ml(o,t)?o:uc(o,i,t))},Wh=(e,t,n,r)=>{const i=$(r);if(t.type==="atom"||t.type==="mutable_atom")i.selectorAtoms.set({selectorKey:e,atomKey:t.key}),r.logger.info("🔍","selector",e,`discovers root atom "${t.key}"`);else{const o=uc(t.key,n,r);r.logger.info("🔍","selector",e,`discovers root atoms: [ ${o.map(s=>`"${s}"`).join(", ")} ]`);for(const s of o)i.selectorAtoms=i.selectorAtoms.set({selectorKey:e,atomKey:s})}n.add(t.key)},ac=(e,t,n)=>({get:(...r)=>{const i=$(n);let o;if(r.length===2){const[u,a]=r;switch(u.type){case"molecule_family":return je(n,u,a);default:if(n.config.lifespan==="ephemeral")o=Oe(n,u,a);else{const c=ke(n,u,a);if(c)o=c;else throw new Ft(u,a,n)}}}else[o]=r;if(o.type==="molecule")return je(n,o);const s=D(o,n),l=io(s,n);return n.logger.info("🔌","selector",e,`registers dependency ( "${o.key}" =`,l,")"),i.selectorGraph.set({upstreamSelectorKey:o.key,downstreamSelectorKey:e},{source:o.key}),Wh(e,o,t,n),l},set:(...r)=>{let i,o;if(r.length===2)i=r[0],o=r[1];else{const u=r[0],a=r[1];o=r[2];const c=n.config.lifespan==="ephemeral"?Oe(n,u,a):ke(n,u,a);if(!c)throw new Ft(u,a,n);i=c}const s=$(n),l=D(i,s);nc(l,o,s)},find:(r,i)=>Oe(n,r,i),seek:(r,i)=>ke(n,r,i),json:r=>Kt(n,r)}),gl=(e,t,n)=>{const r=$(e),i=new Y,o=new Set,{get:s,find:l,seek:u,json:a}=ac(t.key,o,r),c=()=>{const w=t.get({get:s,find:l,seek:u,json:a});return on(t.key,w,i,$(e)),o.clear(),w},p={...t,subject:i,install:w=>gl(w,t,n),get:c,type:"readonly_selector",...n&&{family:n}};r.readonlySelectors.set(t.key,p);const d=c();e.logger.info("✨",p.type,p.key,"=",d);const m={key:t.key,type:"readonly_selector"};return n&&(m.family=n),m},vl=(e,t,n)=>{const r=$(e),i=new Y,o=new Set,s=ac(t.key,o,r),{find:l,get:u,seek:a,json:c}=s,p={find:l,get:u,seek:a,json:c},d=(h=t.get,f=$(e))=>{const y=h(p);return on(t.key,y,i,f),o.clear(),y},w={...t,subject:i,install:h=>vl(h,t,n),get:d,set:h=>{const f=$(e),y=d(t.get,f),k=tc(h)(y);e.logger.info("📝","selector",t.key,"set (",y,"->",k,")"),on(t.key,k,i,f),dl(f,t.key),Je(f)&&i.next({newValue:k,oldValue:y}),t.set(s,k)},type:"selector",...n&&{family:n}};r.selectors.set(t.key,w);const S=d();e.logger.info("✨",w.type,w.key,"=",S);const R={key:t.key,type:"selector"};return n&&(R.family=n),R};function cc(e,t){if("set"in t){const i=vl(e,t,void 0);return e.on.selectorCreation.next(i),i}const r=gl(e,t,void 0);return e.on.selectorCreation.next(r),r}function Hh(e,t){const n=$(t),{key:r}=e,i=D(e,n);if(!i.family)t.logger.error("❌","selector",r,"Standalone selectors cannot be disposed.");else{const o=n.molecules.get(i.family.subKey);switch(o&&o.tokens.delete(r),e.type){case"selector":n.selectors.delete(r),D({key:i.family.key,type:"selector_family"},t).subject.next({type:"state_disposal",token:e});break;case"readonly_selector":n.readonlySelectors.delete(r),D({key:i.family.key,type:"readonly_selector_family"},t).subject.next({type:"state_disposal",token:e});break}n.valueMap.delete(r),n.selectorAtoms.delete(r),n.selectorGraph.delete(r),t.logger.info("🔥",e.type,r,"deleted"),ge(n)&&n.transactionMeta.phase==="building"?n.transactionMeta.update.updates.push({type:"state_disposal",token:e}):t.on.selectorDisposal.next(e)}}function wl(e,t,n){const r={key:t.key,type:"selector_family"},i=e.families.get(t.key);i&&e.logger.error("❗","selector_family",t.key,`Overwriting an existing ${Fn(i)} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const o=new Y,l=Object.assign(u=>{const a=X(u),c={key:t.key,subKey:a},p=`${t.key}(${a})`,d=$(e),m=vl(d,{key:p,get:t.get(u),set:t.set(u)},c);return o.next({type:"state_creation",token:m}),m},r,{internalRoles:n,subject:o,install:u=>wl(u,t),default:u=>t.get(u)({get:(...c)=>je(e,...c),find:(c,p)=>Oe(e,c,p),seek:(c,p)=>ke(e,c,p),json:c=>Kt(e,c)})});return e.families.set(t.key,l),r}function Jh(e,t,n=_e.STORE){const r=wl(n,{key:`${e.key}:JSON`,get:o=>({seek:s,get:l})=>{const u=s(e,o);if(u)return t.toJson(l(u));const a=X(o),c=n.molecules.get(a);if(c){const d=nn(c,e,n);return t.toJson(l(d))}if(n.config.lifespan==="immortal")throw new Error(`No molecule found for key "${a}"`);const p=Bn(n,e,o);return t.toJson(l(p))},set:o=>({seek:s,set:l},u)=>{const a=s(e,o);if(a)l(a,t.fromJson(u));else{const c=X(o),p=n.molecules.get(c);if(p){const d=nn(p,e,n);l(d,t.fromJson(u))}else{if(n.config.lifespan==="immortal")throw new Error(`No molecule found for key "${c}"`);l(Bn(n,e,o),t.fromJson(u))}}}},["mutable","json"]);return D(e,n).subject.subscribe(`store=${n.config.name}::json-selector-family`,o=>{o.token.family&&ke(n,r,rn(o.token.family.subKey))}),r}const rn=e=>JSON.parse(e),X=e=>JSON.stringify(e),Qh=(e,t)=>{const n=$(t);return n.operation.open?n.operation.prev.get(e.key):n.valueMap.get(e.key)},Ru=(e,t)=>{const n=$(t);return bh(e,t).map(i=>{const o=n.atoms.get(i);if(o===void 0)throw new Error(`Atom "${i}", a dependency of selector "${e.key}", not found in store "${t.config.name}".`);return o.subject.subscribe(`${e.type}:${e.key}`,s=>{t.logger.info("📢",e.type,e.key,"root",i,"went",s.oldValue,"->",s.newValue);const l=Qh(e,n),u=io(e,n);t.logger.info("✨",e.type,e.key,"went",l,"->",u),e.subject.next({newValue:u,oldValue:l})})})};function _r(e,t,n,r){function i(p){if(r.operation.open){const d=r.on.operationClose.subscribe(`state subscription ${n}`,()=>{d(),t(p)})}else t(p)}const o=D(e,r);r.logger.info("👀",o.type,o.key,`Adding subscription "${n}"`);const s=o.type==="selector"||o.type==="readonly_selector";let l=null,u=i;s&&(l=Ru(o,r),u=p=>{l&&(l.length=0,l.push(...Ru(o,r))),i(p)});const a=o.subject.subscribe(n,u);return()=>{if(r.logger.info("🙈",o.type,o.key,`Removing subscription "${n}"`),a(),l)for(const p of l)p()}}const Yh=(e,t,n,r)=>{const i=D(e,r);r.logger.info("👀","timeline",e.key,`Adding subscription "${n}"`);const o=i.subject.subscribe(n,t);return()=>{r.logger.info("🙈","timeline",e.key,`Removing subscription "${n}" from timeline`),o()}},qh=(e,t,n,r)=>{const i=D(e,r);r.logger.info("👀","transaction",e.key,`Adding subscription "${n}"`);const o=i.subject.subscribe(n,t);return()=>{r.logger.info("🙈","transaction",e.key,`Removing subscription "${n}"`),o()}};class Ai{constructor(t,n){C(this,"Update");C(this,"unsubscribeFromInnerValue");C(this,"unsubscribeFromState");C(this,"mutableState");C(this,"latestUpdateState");C(this,"dispose");this.mutableState=t;const r=$(n);this.latestUpdateState=this.initializeState(t,r),this.observeCore(t,this.latestUpdateState,r),this.updateCore(t,this.latestUpdateState,r),r.trackers.set(t.key,this),this.dispose=()=>{this.unsubscribeFromInnerValue(),this.unsubscribeFromState(),r.trackers.delete(t.key)}}initializeState(t,n){var s;const r=`*${t.key}`;n.atoms.delete(r),n.valueMap.delete(r);const i=t.family?{key:`*${t.family.key}`,subKey:t.family.subKey}:void 0,o=oo(n,{key:r,default:null},i);if((s=n.parent)!=null&&s.valueMap.has(r)){const l=n.parent.valueMap.get(r);n.valueMap.set(r,l)}return o}observeCore(t,n,r){const i=`tracker:${r.config.name}:${ge(r)?r.transactionMeta.update.key:"main"}:${t.key}`,o=je(r,t);this.unsubscribeFromInnerValue=o.subscribe(i,s=>{oe(r,n,s)}),this.unsubscribeFromState=_r(t,s=>{s.newValue!==s.oldValue&&(this.unsubscribeFromInnerValue(),this.unsubscribeFromInnerValue=s.newValue.subscribe(i,l=>{oe(r,n,l)}))},i,r)}updateCore(t,n,r){const i=`tracker:${r.config.name}:${ge(r)?r.transactionMeta.update.key:"main"}:${t.key}`;_r(n,({newValue:o,oldValue:s})=>{const l=r.timelineTopics.getRelatedKey(n.key);if(l){const a=r.timelines.get(l);if(a!=null&&a.timeTraveling){const c=Yh({key:l,type:"timeline"},p=>{c(),oe(r,t,d=>(p==="redo"&&o?d.do(o):p==="undo"&&s&&d.undo(s),d))},i,r);return}}const u=r.on.operationClose.subscribe(i,()=>{u();const a=je(r,t),c=o===null?-1:a.getUpdateNumber(o),p=c-a.cacheUpdateNumber;o&&p===1?oe(r,t,d=>(d.do(o),d)):r.logger.info("❌","mutable_atom",t.key,`could not be updated. Expected update number ${a.cacheUpdateNumber+1}, but got ${c}`)})},i,r)}}function kl(e,t,n){e.logger.info("🔨","atom",t.key,`creating in store "${e.config.name}"`);const r=$(e),i=r.atoms.get(t.key);if(i&&i.type==="mutable_atom")return e.logger.error("❌","atom",t.key,"Tried to create atom, but it already exists in the store."),tn(i);const o=new Y,s={...t,type:"mutable_atom",install:a=>(a.logger.info("🛠️","atom",t.key,`installing in store "${a.config.name}"`),kl(a,t,n)),subject:o};n&&(s.family=n);const l=t.default();r.atoms.set(s.key,s),hc(t.key,e),on(t.key,l,o,r);const u=tn(s);if(t.effects){let a=0;const c=[];for(const p of t.effects){const d=p({setSelf:m=>{oe(e,u,m)},onSet:m=>_r(u,m,`effect[${a}]`,e)});d&&c.push(d),++a}s.cleanup=()=>{for(const p of c)p()}}return new Ai(u,e),n||ih(u,t,e),u}class Xh{constructor(t,n){C(this,"Update");C(this,"latestUpdateAtoms");C(this,"mutableAtoms");const r=cl(n,{key:`*${t.key}`,default:null},["mutable","updates"]);this.latestUpdateAtoms=D(r,n),this.mutableAtoms=t,this.mutableAtoms.subject.subscribe(`store=${n.config.name}::tracker-atom-family`,i=>{if(i.token.family){const o=rn(i.token.family.subKey);ke(n,this.latestUpdateAtoms,o),new Ai(i.token,n)}}),this.latestUpdateAtoms.subject.subscribe(`store=${n.config.name}::tracker-atom-family`,i=>{if(i.token.family){const o=rn(i.token.family.subKey),s=ke(n,this.mutableAtoms,o);s&&new Ai(s,n)}})}}function fc(e,t,n){const r={key:t.key,type:"mutable_atom_family"},i=e.families.get(t.key);i&&e.logger.error("❗","mutable_atom_family",t.key,`Overwriting an existing ${Fn(i)} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const o=new Y,l=Object.assign(u=>{const a=X(u),c={key:t.key,subKey:a},p=`${t.key}(${a})`,d=$(e),m={key:p,default:()=>t.default(u),toJson:t.toJson,fromJson:t.fromJson,mutable:!0};t.effects&&(m.effects=t.effects(u));const w=kl(d,m,c);return o.next({type:"state_creation",token:w}),w},r,{subject:o,install:u=>fc(u,t),toJson:t.toJson,fromJson:t.fromJson,internalRoles:n});return e.families.set(t.key,l),Jh(l,t,e),new Xh(l,e),r}const Tu=(e,t)=>{const n=$(t),r=`${e.key}:JSON`;return n.families.get(r)},Kt=(e,t)=>{if(t.family){const r=$(e),o={key:`${t.family.key}:JSON`,type:"selector_family"},s=D(o,r),l=JSON.parse(t.family.subKey);return Oe(e,s,l)}return{type:"selector",key:`${t.key}:JSON`}},dc=e=>{const n={type:"atom",key:`*${e.key}`};return e.family&&(n.family={key:`*${e.family.key}`,subKey:e.family.subKey}),n};function Zh(e){return typeof e=="object"&&e!==null&&"do"in e&&"undo"in e&&"subscribe"in e}function os(e,t,n){const r=t.valueMap.get(e.key),i=n.valueMap.get(e.key);if(r===i){if(r===void 0)return typeof e.default=="function"?e.default():e.default;t.logger.info("📃","atom",e.key,"copying");const o=e.toJson(r),s=e.fromJson(o);return n.valueMap.set(e.key,s),new Ai(e,t),s}return i}function on(e,t,n,r){const i=r.valueMap.get(e);if(i instanceof es&&i.use(t),t instanceof Promise){const o=new es(t);return r.valueMap.set(e,o),o.then(s=>{on(e,s,n,r),n.next({newValue:s,oldValue:o})}).catch(s=>{r.logger.error("💥","state",e,"rejected:",s)}),o}return r.valueMap.set(e,t),t}const Gh=(e,t)=>{let n=t.valueMap.get(e.key);if(e.type==="mutable_atom"&&ge(t)){const{parent:r}=t;n=os(e,r,t)}return n},ep=(e,t)=>{const n=t.valueMap.get(e);if(n instanceof es){const r=n,i=t.selectors.get(e)??t.readonlySelectors.get(e);i&&r.use(i.get());return}t.operation.open&&t.operation.prev.set(e,n),t.valueMap.delete(e),t.logger.info("🗑","state",e,"evicted")},tp=(e,t)=>$(t).atomsThatAreDefault.has(e),hc=(e,t)=>{const n=$(t);n.atomsThatAreDefault=new Set(n.atomsThatAreDefault).add(e)},np=(e,t)=>{const n=$(t);n.atomsThatAreDefault=new Set($(t).atomsThatAreDefault),n.atomsThatAreDefault.delete(e)};function oo(e,t,n){e.logger.info("🔨","atom",t.key,`creating in store "${e.config.name}"`);const r=$(e),i=r.atoms.get(t.key);if(i&&i.type==="atom")return e.logger.error("❌","atom",t.key,"Tried to create atom, but it already exists in the store."),tn(i);const o=new Y,s={...t,type:"atom",install:a=>(a.logger.info("🛠️","atom",t.key,`installing in store "${a.config.name}"`),oo(a,t,n)),subject:o};n&&(s.family=n);let l=t.default;t.default instanceof Function&&(l=t.default()),r.atoms.set(s.key,s),hc(t.key,e),on(t.key,l,o,r);const u=tn(s);if(t.effects){let a=0;const c=[];for(const p of t.effects){const d=p({setSelf:m=>{oe(e,u,m)},onSet:m=>_r(u,m,`effect[${a}]`,e)});d&&c.push(d),++a}s.cleanup=()=>{for(const p of c)p()}}return u}function rp(e,t){if("mutable"in t){const i=kl(e,t,void 0);return e.on.atomCreation.next(i),i}const r=oo(e,t,void 0);return e.on.atomCreation.next(r),r}function Sl(e,t){var o;const n=$(t),{key:r}=e,i=D(e,n);if(!i.family)t.logger.error("❌","atom",r,"Standalone atoms cannot be disposed.");else{(o=i.cleanup)==null||o.call(i);const s=t.valueMap.get(i.key);D({key:i.family.key,type:"atom_family"},t).subject.next({type:"state_disposal",token:e,value:s});const u=n.molecules.get(i.family.subKey);if(u&&u.tokens.delete(r),n.atoms.delete(r),n.valueMap.delete(r),n.selectorAtoms.delete(r),n.atomsThatAreDefault.delete(r),n.timelineTopics.delete(r),e.type==="mutable_atom"){const a=dc(e);Sl(a,t),t.trackers.delete(r)}t.logger.info("🔥","atom",r,"deleted"),ge(n)&&n.transactionMeta.phase==="building"?n.transactionMeta.update.updates.push({type:"state_disposal",token:e}):t.on.atomDisposal.next(e)}}const _l=fe.createContext(_e.STORE);function pc(e,...t){let n;if(t.length===2){const r=t[0],i=t[1];if(e.config.lifespan==="immortal"){const o=ke(e,r,i);if(!o)throw new Ft(r,i,e);n=o}else n=Oe(e,r,i)}else n=t[0];return n}function ip(...e){const t=fe.useContext(_l),n=pc(t,...e),r=fe.useRef(null);return r.current===null&&(r.current=i=>{oe(t,n,i)}),r.current}function op(...e){const t=fe.useContext(_l),n=pc(t,...e),r=fe.useId();return fe.useSyncExternalStore(i=>_r(n,i,`use-o:${r}`,t),()=>je(t,n),()=>je(t,n))}const sp=(e,{stringify:t,parse:n},r)=>({setSelf:i,onSet:o})=>{const s=e.getItem(r);s!=null&&i(n(s)),o(({newValue:l})=>{if(l==null){e.removeItem(r);return}e.setItem(r,t(l))})},yc=fn({key:"mySocketId__INTERNAL",default:void 0});fh({key:"mySocketId",get:({get:e})=>e(yc)});fn({key:"myName",default:null,effects:typeof window>"u"?[]:[sp(window.localStorage,JSON,"myUsername")]});const Qr=fn({key:"updateQueue",default:[]}),Ro=fn({key:"serverConfirmedUpdateQueue",default:[]});function lp(e,t,n){const r=e.key,i=je(n,Qr),o=je(n,Ro),s=(a,c)=>{t.off(`continuity-init:${r}`,s);let p=0,d,m;for(const w of c)p%2===0?d=w:(m=w,"type"in d&&d.type==="mutable_atom"&&(d=Kt(n,d)),oe(n,d,m)),p++;ns(r,a,n)};t.off(`continuity-init:${r}`),t.on(`continuity-init:${r}`,s);const l=a=>{function c(d,m){if(n.logger.info("🧑⚖️","continuity",r,"reconciling updates"),oe(n,Qr,S=>(S.shift(),S)),d.id===m.id){const S=JSON.stringify(d.updates),R=JSON.stringify(m.updates);if(S===R){n.logger.info("✅","continuity",r,`results for ${d.id} match between client and server`),t.emit(`ack:${r}`,m.epoch);return}}else n.logger.info("❌","continuity",r,`thought update #${m.epoch} was ${d.key}:${d.id}, but it was actually ${m.key}:${m.id}`);n.logger.info("🧑⚖️","continuity",r,"updates do not match",d,m);const w=i.toReversed();for(const S of w)wn("oldValue",S,n);n.logger.info("⏪","continuity",r,"undid optimistic updates:",w),wn("oldValue",d,n),n.logger.info("⏪","continuity",r,"undid zeroth optimistic update",d),wn("newValue",m,n),n.logger.info("⏩","continuity",r,"applied confirmed update",m),t.emit(`ack:${r}`,m.epoch);for(const S of i){const R={type:"transaction",key:S.key},{id:h,params:f}=S;ro(R,h,n)(...f)}n.logger.info("⏩","continuity",r,"reapplied subsequent optimistic updates:",i)}n.logger.info("🧑⚖️","continuity",r,"integrating confirmed update",{confirmedUpdate:a,confirmedUpdates:o,optimisticUpdates:i});const p=i[0];if(p)if(n.logger.info("🧑⚖️","continuity",r,"has optimistic updates to reconcile"),a.epoch===p.epoch){n.logger.info("🧑⚖️","continuity",r,`epoch of confirmed update #${a.epoch} matches zeroth optimistic update`),c(p,a);for(const d of o){const m=i[0];if(d.epoch===(m==null?void 0:m.epoch))c(m,d);else break}}else n.logger.info("🧑⚖️","continuity",r,`epoch of confirmed update #${a.epoch} does not match zeroth optimistic update #${p.epoch}`),o.some(m=>m.epoch===a.epoch)||(n.logger.info("👈","continuity",r,"pushing confirmed update to queue",a),oe(n,Ro,m=>(m.push(a),m.sort((w,S)=>w.epoch-S.epoch),m)));else{n.logger.info("🧑⚖️","continuity",r,"has no optimistic updates to deal with");const d=Fh(r,n),m=Je(n);m&&d===a.epoch-1?(n.logger.info("✅","continuity",r,`integrating update #${a.epoch} (${a.key} ${a.id})`),wn("newValue",a,n),t.emit(`ack:${r}`,a.epoch),ns(r,a.epoch,n)):m&&d!==void 0&&(n.logger.info("🧑⚖️","continuity",r,`received update #${a.epoch} but still waiting for update #${d+1}`,{clientEpoch:d,serverEpoch:a.epoch}),o.some(S=>S.epoch===a.epoch)?n.logger.info("👍","continuity",r,`confirmed update #${a.epoch} is already enqueued`):(n.logger.info("👈","continuity",r,`pushing confirmed update #${a.epoch} to queue`),oe(n,Ro,S=>(S.push(a),S.sort((R,h)=>R.epoch-h.epoch),S))))}};t.off(`tx-new:${r}`),t.on(`tx-new:${r}`,l);const u=e.actions.map(a=>(sc(r,a.key,n),qh(a,p=>{n.logger.info("🤞","continuity",r,"enqueuing optimistic update");const d=i.findIndex(m=>m.id===p.id);d===-1?(n.logger.info("🤞","continuity",r,"enqueuing new optimistic update"),oe(n,Qr,m=>(m.push(p),m.sort((w,S)=>w.epoch-S.epoch),m))):(n.logger.info("🤞","continuity",r,`replacing existing optimistic update at index ${d}`),oe(n,Qr,m=>(m[d]=p,m))),t.emit(`tx-run:${r}`,{id:p.id,key:a.key,params:p.params})},`tx-run:${r}`,n)));return t.on(`reveal:${r}`,a=>{let c=0,p,d;for(const m of a)c%2===0?p=m:(d=m,up(p,d,n)),c++}),t.on(`conceal:${r}`,a=>{for(const c of a)Sl(c,n)}),t.emit(`get:${r}`),()=>{t.off(`continuity-init:${r}`),t.off(`tx-new:${r}`);for(const a of u)a()}}function up(e,t,n){if(t.family){const r=e.families.get(t.family.key);if(r){const i=e.molecules.get(t.family.subKey);if(i)nn(i,r,e);else if(e.config.lifespan==="immortal")throw new Error(`No molecule found for key "${t.family.subKey}"`);Bn(e,r,rn(t.family.subKey))}}oe(e,t,n)}const mc=fe.createContext({socket:null,services:null}),ap=({children:e,socket:t})=>{const n=fe.useRef(new Map).current,r=ip(yc);return fe.useEffect(()=>{r(t==null?void 0:t.id),t==null||t.on("connect",()=>{r(t.id)}),t==null||t.on("disconnect",()=>{r(void 0)})},[t,r]),K.jsx(mc.Provider,{value:{socket:t,services:n},children:e})},{NODE_ENV:cp}=globalThis.env??{},fp=cp==="development";function Yr(){}function dp(e,t){if(fp){const n=fe.useRef(Yr);fe.useEffect(()=>{let r=n.current;if(r===Yr)r=e()??Yr,n.current=r;else return()=>{r(),n.current=Yr}},t)}else fe.useEffect(e,t)}function hp(e){dp(e,[])}function pp(e,t){const{socket:n,services:r}=fe.useContext(mc);hp(()=>{let i=r==null?void 0:r.get(e);return i?i[0]++:(i=[1,n?t(n):void 0],r==null||r.set(e,i)),()=>{var o;i&&(i[0]--,i[0]===0&&((o=i[1])==null||o.call(i),r==null||r.delete(e)))}})}function yp(e){const t=fe.useContext(_l);pp(`tx-sync:${e.key}`,n=>lp(e,n,t))}var gc={exports:{}},Fe={},vc={exports:{}},wc={};/**
|
|
23
|
+
`);e.disposalTraces.add({key:n.key,trace:s})}}const gl=(e,t)=>P(t).atoms.has(e),Ih=(e,t)=>P(t).selectors.has(e),jh=(e,t)=>P(t).readonlySelectors.has(e),zh=(e,t)=>gl(e,t)||Ih(e,t)||jh(e,t),os=(e,t)=>P(t).selectorGraph.getRelationEntries({downstreamSelectorKey:e}).filter(([r,{source:i}])=>i!==e).map(([r,{source:i}])=>i).filter(r=>zh(r,t)),rc=(e,t,n)=>{const r=[],i=os(e,n);for(;i.length>0;){const o=i.shift();t.has(o)||(t.add(o),gl(o,n)?r.includes(o)||r.push(o):i.push(...os(o,n)))}return r},Fh=(e,t)=>{const n=e.key,r=os(n,t),i=new Set;return r.flatMap(o=>gl(o,t)?o:rc(o,i,t))},Dh=(e,t,n,r)=>{const i=P(r);if(t.type==="atom"||t.type==="mutable_atom")i.selectorAtoms.set({selectorKey:e,atomKey:t.key}),r.logger.info("🔍","selector",e,`discovers root atom "${t.key}"`);else{const o=rc(t.key,n,r);r.logger.info("🔍","selector",e,`discovers root atoms: [ ${o.map(s=>`"${s}"`).join(", ")} ]`);for(const s of o)i.selectorAtoms=i.selectorAtoms.set({selectorKey:e,atomKey:s})}n.add(t.key)},ic=(e,t,n)=>({get:(...r)=>{const i=P(n);let o;if(r.length===2){const[u,a]=r;switch(u.type){case"molecule_family":return je(n,u,a);default:if(n.config.lifespan==="ephemeral")o=Oe(n,u,a);else{const c=ke(n,u,a);if(c)o=c;else throw new Dt(u,a,n)}}}else[o]=r;if(o.type==="molecule")return je(n,o);const s=D(o,n),l=ro(s,n);return n.logger.info("🔌","selector",e,`registers dependency ( "${o.key}" =`,l,")"),i.selectorGraph.set({upstreamSelectorKey:o.key,downstreamSelectorKey:e},{source:o.key}),Dh(e,o,t,n),l},set:(...r)=>{let i,o;if(r.length===2)i=r[0],o=r[1];else{const u=r[0],a=r[1];o=r[2];const c=n.config.lifespan==="ephemeral"?Oe(n,u,a):ke(n,u,a);if(!c)throw new Dt(u,a,n);i=c}const s=P(n),l=D(i,s);Xa(l,o,s)},find:(r,i)=>Oe(n,r,i),seek:(r,i)=>ke(n,r,i),json:r=>Vt(n,r)}),vl=(e,t,n)=>{const r=P(e),i=new Y,o=new Set,{get:s,find:l,seek:u,json:a}=ic(t.key,o,r),c=()=>{const w=t.get({get:s,find:l,seek:u,json:a});return sn(t.key,w,i,P(e)),o.clear(),w},p={...t,subject:i,install:w=>vl(w,t,n),get:c,type:"readonly_selector",...n&&{family:n}};r.readonlySelectors.set(t.key,p);const d=c();e.logger.info("✨",p.type,p.key,"=",d);const m={key:t.key,type:"readonly_selector"};return n&&(m.family=n),m},wl=(e,t,n)=>{const r=P(e),i=new Y,o=new Set,s=ic(t.key,o,r),{find:l,get:u,seek:a,json:c}=s,p={find:l,get:u,seek:a,json:c},d=(h=t.get,f=P(e))=>{const y=h(p);return sn(t.key,y,i,f),o.clear(),y},w={...t,subject:i,install:h=>wl(h,t,n),get:d,set:h=>{const f=P(e),y=d(t.get,f),k=qa(h)(y);e.logger.info("📝","selector",t.key,"set (",y,"->",k,")"),sn(t.key,k,i,f),hl(f,t.key),Je(f)&&i.next({newValue:k,oldValue:y}),t.set(s,k)},type:"selector",...n&&{family:n}};r.selectors.set(t.key,w);const S=d();e.logger.info("✨",w.type,w.key,"=",S);const R={key:t.key,type:"selector"};return n&&(R.family=n),R};function oc(e,t){if("set"in t){const i=wl(e,t,void 0);return e.on.selectorCreation.next(i),i}const r=vl(e,t,void 0);return e.on.selectorCreation.next(r),r}function Bh(e,t){const n=P(t),{key:r}=e,i=D(e,n);if(!i.family)t.logger.error("❌","selector",r,"Standalone selectors cannot be disposed.");else{const o=n.molecules.get(i.family.subKey);switch(o&&o.tokens.delete(r),e.type){case"selector":n.selectors.delete(r),D({key:i.family.key,type:"selector_family"},t).subject.next({type:"state_disposal",token:e});break;case"readonly_selector":n.readonlySelectors.delete(r),D({key:i.family.key,type:"readonly_selector_family"},t).subject.next({type:"state_disposal",token:e});break}n.valueMap.delete(r),n.selectorAtoms.delete(r),n.selectorGraph.delete(r),t.logger.info("🔥",e.type,r,"deleted"),ge(n)&&n.transactionMeta.phase==="building"?n.transactionMeta.update.updates.push({type:"state_disposal",token:e}):t.on.selectorDisposal.next(e)}}function kl(e,t,n){const r={key:t.key,type:"selector_family"},i=e.families.get(t.key);i&&e.logger.error("❗","selector_family",t.key,`Overwriting an existing ${Fn(i)} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const o=new Y,l=Object.assign(u=>{const a=X(u),c={key:t.key,subKey:a},p=`${t.key}(${a})`,d=P(e),m=wl(d,{key:p,get:t.get(u),set:t.set(u)},c);return o.next({type:"state_creation",token:m}),m},r,{internalRoles:n,subject:o,install:u=>kl(u,t),default:u=>t.get(u)({get:(...c)=>je(e,...c),find:(c,p)=>Oe(e,c,p),seek:(c,p)=>ke(e,c,p),json:c=>Vt(e,c)})});return e.families.set(t.key,l),r}function Uh(e,t,n=_e.STORE){const r=kl(n,{key:`${e.key}:JSON`,get:o=>({seek:s,get:l})=>{const u=s(e,o);if(u)return t.toJson(l(u));const a=X(o),c=n.molecules.get(a);if(c){const d=rn(c,e,n);return t.toJson(l(d))}if(n.config.lifespan==="immortal")throw new Error(`No molecule found for key "${a}"`);const p=Bn(n,e,o);return t.toJson(l(p))},set:o=>({seek:s,set:l},u)=>{const a=s(e,o);if(a)l(a,t.fromJson(u));else{const c=X(o),p=n.molecules.get(c);if(p){const d=rn(p,e,n);l(d,t.fromJson(u))}else{if(n.config.lifespan==="immortal")throw new Error(`No molecule found for key "${c}"`);l(Bn(n,e,o),t.fromJson(u))}}}},["mutable","json"]);return D(e,n).subject.subscribe(`store=${n.config.name}::json-selector-family`,o=>{o.token.family&&ke(n,r,on(o.token.family.subKey))}),r}const on=e=>JSON.parse(e),X=e=>JSON.stringify(e),Kh=(e,t)=>{const n=P(t);return n.operation.open?n.operation.prev.get(e.key):n.valueMap.get(e.key)},Ru=(e,t)=>{const n=P(t);return Fh(e,t).map(i=>{const o=n.atoms.get(i);if(o===void 0)throw new Error(`Atom "${i}", a dependency of selector "${e.key}", not found in store "${t.config.name}".`);return o.subject.subscribe(`${e.type}:${e.key}`,s=>{t.logger.info("📢",e.type,e.key,"root",i,"went",s.oldValue,"->",s.newValue);const l=Kh(e,n),u=ro(e,n);t.logger.info("✨",e.type,e.key,"went",l,"->",u),e.subject.next({newValue:u,oldValue:l})})})};function _r(e,t,n,r){function i(p){if(r.operation.open){const d=r.on.operationClose.subscribe(`state subscription ${n}`,()=>{d(),t(p)})}else t(p)}const o=D(e,r);r.logger.info("👀",o.type,o.key,`Adding subscription "${n}"`);const s=o.type==="selector"||o.type==="readonly_selector";let l=null,u=i;s&&(l=Ru(o,r),u=p=>{l&&(l.length=0,l.push(...Ru(o,r))),i(p)});const a=o.subject.subscribe(n,u);return()=>{if(r.logger.info("🙈",o.type,o.key,`Removing subscription "${n}"`),a(),l)for(const p of l)p()}}const Vh=(e,t,n,r)=>{const i=D(e,r);r.logger.info("👀","timeline",e.key,`Adding subscription "${n}"`);const o=i.subject.subscribe(n,t);return()=>{r.logger.info("🙈","timeline",e.key,`Removing subscription "${n}" from timeline`),o()}},bh=(e,t,n,r)=>{const i=D(e,r);r.logger.info("👀","transaction",e.key,`Adding subscription "${n}"`);const o=i.subject.subscribe(n,t);return()=>{r.logger.info("🙈","transaction",e.key,`Removing subscription "${n}"`),o()}};class Mi{constructor(t,n){C(this,"Update");C(this,"unsubscribeFromInnerValue");C(this,"unsubscribeFromState");C(this,"mutableState");C(this,"latestUpdateState");C(this,"dispose");this.mutableState=t;const r=P(n);this.latestUpdateState=this.initializeState(t,r),this.observeCore(t,this.latestUpdateState,r),this.updateCore(t,this.latestUpdateState,r),r.trackers.set(t.key,this),this.dispose=()=>{this.unsubscribeFromInnerValue(),this.unsubscribeFromState(),r.trackers.delete(t.key)}}initializeState(t,n){var s;const r=`*${t.key}`;n.atoms.delete(r),n.valueMap.delete(r);const i=t.family?{key:`*${t.family.key}`,subKey:t.family.subKey}:void 0,o=io(n,{key:r,default:null},i);if((s=n.parent)!=null&&s.valueMap.has(r)){const l=n.parent.valueMap.get(r);n.valueMap.set(r,l)}return o}observeCore(t,n,r){const i=`tracker:${r.config.name}:${ge(r)?r.transactionMeta.update.key:"main"}:${t.key}`,o=je(r,t);this.unsubscribeFromInnerValue=o.subscribe(i,s=>{oe(r,n,s)}),this.unsubscribeFromState=_r(t,s=>{s.newValue!==s.oldValue&&(this.unsubscribeFromInnerValue(),this.unsubscribeFromInnerValue=s.newValue.subscribe(i,l=>{oe(r,n,l)}))},i,r)}updateCore(t,n,r){const i=`tracker:${r.config.name}:${ge(r)?r.transactionMeta.update.key:"main"}:${t.key}`;_r(n,({newValue:o,oldValue:s})=>{const l=r.timelineTopics.getRelatedKey(n.key);if(l){const a=r.timelines.get(l);if(a!=null&&a.timeTraveling){const c=Vh({key:l,type:"timeline"},p=>{c(),oe(r,t,d=>(p==="redo"&&o?d.do(o):p==="undo"&&s&&d.undo(s),d))},i,r);return}}const u=r.on.operationClose.subscribe(i,()=>{u();const a=je(r,t),c=o===null?-1:a.getUpdateNumber(o),p=c-a.cacheUpdateNumber;o&&p===1?oe(r,t,d=>(d.do(o),d)):r.logger.info("❌","mutable_atom",t.key,`could not be updated. Expected update number ${a.cacheUpdateNumber+1}, but got ${c}`)})},i,r)}}function Sl(e,t,n){e.logger.info("🔨","atom",t.key,`creating in store "${e.config.name}"`);const r=P(e),i=r.atoms.get(t.key);if(i&&i.type==="mutable_atom")return e.logger.error("❌","atom",t.key,"Tried to create atom, but it already exists in the store."),nn(i);const o=new Y,s={...t,type:"mutable_atom",install:a=>(a.logger.info("🛠️","atom",t.key,`installing in store "${a.config.name}"`),Sl(a,t,n)),subject:o};n&&(s.family=n);const l=t.default();r.atoms.set(s.key,s),uc(t.key,e),sn(t.key,l,o,r);const u=nn(s);if(t.effects){let a=0;const c=[];for(const p of t.effects){const d=p({setSelf:m=>{oe(e,u,m)},onSet:m=>_r(u,m,`effect[${a}]`,e)});d&&c.push(d),++a}s.cleanup=()=>{for(const p of c)p()}}return new Mi(u,e),n||Zd(u,t,e),u}class Wh{constructor(t,n){C(this,"Update");C(this,"latestUpdateAtoms");C(this,"mutableAtoms");const r=fl(n,{key:`*${t.key}`,default:null},["mutable","updates"]);this.latestUpdateAtoms=D(r,n),this.mutableAtoms=t,this.mutableAtoms.subject.subscribe(`store=${n.config.name}::tracker-atom-family`,i=>{if(i.token.family){const o=on(i.token.family.subKey);ke(n,this.latestUpdateAtoms,o),new Mi(i.token,n)}}),this.latestUpdateAtoms.subject.subscribe(`store=${n.config.name}::tracker-atom-family`,i=>{if(i.token.family){const o=on(i.token.family.subKey),s=ke(n,this.mutableAtoms,o);s&&new Mi(s,n)}})}}function sc(e,t,n){const r={key:t.key,type:"mutable_atom_family"},i=e.families.get(t.key);i&&e.logger.error("❗","mutable_atom_family",t.key,`Overwriting an existing ${Fn(i)} "${i.key}" in store "${e.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const o=new Y,l=Object.assign(u=>{const a=X(u),c={key:t.key,subKey:a},p=`${t.key}(${a})`,d=P(e),m={key:p,default:()=>t.default(u),toJson:t.toJson,fromJson:t.fromJson,mutable:!0};t.effects&&(m.effects=t.effects(u));const w=Sl(d,m,c);return o.next({type:"state_creation",token:w}),w},r,{subject:o,install:u=>sc(u,t),toJson:t.toJson,fromJson:t.fromJson,internalRoles:n});return e.families.set(t.key,l),Uh(l,t,e),new Wh(l,e),r}const Tu=(e,t)=>{const n=P(t),r=`${e.key}:JSON`;return n.families.get(r)},Vt=(e,t)=>{if(t.family){const r=P(e),o={key:`${t.family.key}:JSON`,type:"selector_family"},s=D(o,r),l=JSON.parse(t.family.subKey);return Oe(e,s,l)}return{type:"selector",key:`${t.key}:JSON`}},lc=e=>{const n={type:"atom",key:`*${e.key}`};return e.family&&(n.family={key:`*${e.family.key}`,subKey:e.family.subKey}),n};function Hh(e){return typeof e=="object"&&e!==null&&"do"in e&&"undo"in e&&"subscribe"in e}function ss(e,t,n){const r=t.valueMap.get(e.key),i=n.valueMap.get(e.key);if(r===i){if(r===void 0)return typeof e.default=="function"?e.default():e.default;t.logger.info("📃","atom",e.key,"copying");const o=e.toJson(r),s=e.fromJson(o);return n.valueMap.set(e.key,s),new Mi(e,t),s}return i}function sn(e,t,n,r){const i=r.valueMap.get(e);if(i instanceof ts&&i.use(t),t instanceof Promise){const o=new ts(t);return r.valueMap.set(e,o),o.then(s=>{sn(e,s,n,r),n.next({newValue:s,oldValue:o})}).catch(s=>{r.logger.error("💥","state",e,"rejected:",s)}),o}return r.valueMap.set(e,t),t}const Jh=(e,t)=>{let n=t.valueMap.get(e.key);if(e.type==="mutable_atom"&&ge(t)){const{parent:r}=t;n=ss(e,r,t)}return n},Qh=(e,t)=>{const n=t.valueMap.get(e);if(n instanceof ts){const r=n,i=t.selectors.get(e)??t.readonlySelectors.get(e);i&&r.use(i.get());return}t.operation.open&&t.operation.prev.set(e,n),t.valueMap.delete(e),t.logger.info("🗑","state",e,"evicted")},Yh=(e,t)=>P(t).atomsThatAreDefault.has(e),uc=(e,t)=>{const n=P(t);n.atomsThatAreDefault=new Set(n.atomsThatAreDefault).add(e)},qh=(e,t)=>{const n=P(t);n.atomsThatAreDefault=new Set(P(t).atomsThatAreDefault),n.atomsThatAreDefault.delete(e)};function io(e,t,n){e.logger.info("🔨","atom",t.key,`creating in store "${e.config.name}"`);const r=P(e),i=r.atoms.get(t.key);if(i&&i.type==="atom")return e.logger.error("❌","atom",t.key,"Tried to create atom, but it already exists in the store."),nn(i);const o=new Y,s={...t,type:"atom",install:a=>(a.logger.info("🛠️","atom",t.key,`installing in store "${a.config.name}"`),io(a,t,n)),subject:o};n&&(s.family=n);let l=t.default;t.default instanceof Function&&(l=t.default()),r.atoms.set(s.key,s),uc(t.key,e),sn(t.key,l,o,r);const u=nn(s);if(t.effects){let a=0;const c=[];for(const p of t.effects){const d=p({setSelf:m=>{oe(e,u,m)},onSet:m=>_r(u,m,`effect[${a}]`,e)});d&&c.push(d),++a}s.cleanup=()=>{for(const p of c)p()}}return u}function Xh(e,t){if("mutable"in t){const i=Sl(e,t,void 0);return e.on.atomCreation.next(i),i}const r=io(e,t,void 0);return e.on.atomCreation.next(r),r}function _l(e,t){var o;const n=P(t),{key:r}=e,i=D(e,n);if(!i.family)t.logger.error("❌","atom",r,"Standalone atoms cannot be disposed.");else{(o=i.cleanup)==null||o.call(i);const s=t.valueMap.get(i.key);D({key:i.family.key,type:"atom_family"},t).subject.next({type:"state_disposal",token:e,value:s});const u=n.molecules.get(i.family.subKey);if(u&&u.tokens.delete(r),n.atoms.delete(r),n.valueMap.delete(r),n.selectorAtoms.delete(r),n.atomsThatAreDefault.delete(r),n.timelineTopics.delete(r),e.type==="mutable_atom"){const a=lc(e);_l(a,t),t.trackers.delete(r)}t.logger.info("🔥","atom",r,"deleted"),ge(n)&&n.transactionMeta.phase==="building"?n.transactionMeta.update.updates.push({type:"state_disposal",token:e}):t.on.atomDisposal.next(e)}}const El=fe.createContext(_e.STORE);function ac(e,...t){let n;if(t.length===2){const r=t[0],i=t[1];if(e.config.lifespan==="immortal"){const o=ke(e,r,i);if(!o)throw new Dt(r,i,e);n=o}else n=Oe(e,r,i)}else n=t[0];return n}function Zh(...e){const t=fe.useContext(El),n=ac(t,...e),r=fe.useRef(null);return r.current===null&&(r.current=i=>{oe(t,n,i)}),r.current}function Gh(...e){const t=fe.useContext(El),n=ac(t,...e),r=fe.useId();return fe.useSyncExternalStore(i=>_r(n,i,`use-o:${r}`,t),()=>je(t,n),()=>je(t,n))}const ep=(e,{stringify:t,parse:n},r)=>({setSelf:i,onSet:o})=>{const s=e.getItem(r);s!=null&&i(n(s)),o(({newValue:l})=>{if(l==null){e.removeItem(r);return}e.setItem(r,t(l))})},cc=dn({key:"mySocketId__INTERNAL",default:void 0});oh({key:"mySocketId",get:({get:e})=>e(cc)});dn({key:"myName",default:null,effects:typeof window>"u"?[]:[ep(window.localStorage,JSON,"myUsername")]});const Qr=dn({key:"updateQueue",default:[]}),Ro=dn({key:"serverConfirmedUpdateQueue",default:[]});function tp(e,t,n){const r=e.key,i=je(n,Qr),o=je(n,Ro),s=(a,c)=>{t.off(`continuity-init:${r}`,s);let p=0,d,m;for(const w of c)p%2===0?d=w:(m=w,"type"in d&&d.type==="mutable_atom"&&(d=Vt(n,d)),oe(n,d,m)),p++;rs(r,a,n)};t.off(`continuity-init:${r}`),t.on(`continuity-init:${r}`,s);const l=a=>{function c(d,m){if(n.logger.info("🧑⚖️","continuity",r,"reconciling updates"),oe(n,Qr,S=>(S.shift(),S)),d.id===m.id){const S=JSON.stringify(d.updates),R=JSON.stringify(m.updates);if(S===R){n.logger.info("✅","continuity",r,`results for ${d.id} match between client and server`),t.emit(`ack:${r}`,m.epoch);return}}else n.logger.info("❌","continuity",r,`thought update #${m.epoch} was ${d.key}:${d.id}, but it was actually ${m.key}:${m.id}`);n.logger.info("🧑⚖️","continuity",r,"updates do not match",d,m);const w=i.toReversed();for(const S of w)wn("oldValue",S,n);n.logger.info("⏪","continuity",r,"undid optimistic updates:",w),wn("oldValue",d,n),n.logger.info("⏪","continuity",r,"undid zeroth optimistic update",d),wn("newValue",m,n),n.logger.info("⏩","continuity",r,"applied confirmed update",m),t.emit(`ack:${r}`,m.epoch);for(const S of i){const R={type:"transaction",key:S.key},{id:h,params:f}=S;no(R,h,n)(...f)}n.logger.info("⏩","continuity",r,"reapplied subsequent optimistic updates:",i)}n.logger.info("🧑⚖️","continuity",r,"integrating confirmed update",{confirmedUpdate:a,confirmedUpdates:o,optimisticUpdates:i});const p=i[0];if(p)if(n.logger.info("🧑⚖️","continuity",r,"has optimistic updates to reconcile"),a.epoch===p.epoch){n.logger.info("🧑⚖️","continuity",r,`epoch of confirmed update #${a.epoch} matches zeroth optimistic update`),c(p,a);for(const d of o){const m=i[0];if(d.epoch===(m==null?void 0:m.epoch))c(m,d);else break}}else n.logger.info("🧑⚖️","continuity",r,`epoch of confirmed update #${a.epoch} does not match zeroth optimistic update #${p.epoch}`),o.some(m=>m.epoch===a.epoch)||(n.logger.info("👈","continuity",r,"pushing confirmed update to queue",a),oe(n,Ro,m=>(m.push(a),m.sort((w,S)=>w.epoch-S.epoch),m)));else{n.logger.info("🧑⚖️","continuity",r,"has no optimistic updates to deal with");const d=Ph(r,n),m=Je(n);m&&d===a.epoch-1?(n.logger.info("✅","continuity",r,`integrating update #${a.epoch} (${a.key} ${a.id})`),wn("newValue",a,n),t.emit(`ack:${r}`,a.epoch),rs(r,a.epoch,n)):m&&d!==void 0&&(n.logger.info("🧑⚖️","continuity",r,`received update #${a.epoch} but still waiting for update #${d+1}`,{clientEpoch:d,serverEpoch:a.epoch}),o.some(S=>S.epoch===a.epoch)?n.logger.info("👍","continuity",r,`confirmed update #${a.epoch} is already enqueued`):(n.logger.info("👈","continuity",r,`pushing confirmed update #${a.epoch} to queue`),oe(n,Ro,S=>(S.push(a),S.sort((R,h)=>R.epoch-h.epoch),S))))}};t.off(`tx-new:${r}`),t.on(`tx-new:${r}`,l);const u=e.actions.map(a=>(tc(r,a.key,n),bh(a,p=>{n.logger.info("🤞","continuity",r,"enqueuing optimistic update");const d=i.findIndex(m=>m.id===p.id);d===-1?(n.logger.info("🤞","continuity",r,"enqueuing new optimistic update"),oe(n,Qr,m=>(m.push(p),m.sort((w,S)=>w.epoch-S.epoch),m))):(n.logger.info("🤞","continuity",r,`replacing existing optimistic update at index ${d}`),oe(n,Qr,m=>(m[d]=p,m))),t.emit(`tx-run:${r}`,{id:p.id,key:a.key,params:p.params})},`tx-run:${r}`,n)));return t.on(`reveal:${r}`,a=>{let c=0,p,d;for(const m of a)c%2===0?p=m:(d=m,np(p,d,n)),c++}),t.on(`conceal:${r}`,a=>{for(const c of a)_l(c,n)}),t.emit(`get:${r}`),()=>{t.off(`continuity-init:${r}`),t.off(`tx-new:${r}`);for(const a of u)a()}}function np(e,t,n){if(t.family){const r=e.families.get(t.family.key);if(r){const i=e.molecules.get(t.family.subKey);if(i)rn(i,r,e);else if(e.config.lifespan==="immortal")throw new Error(`No molecule found for key "${t.family.subKey}"`);Bn(e,r,on(t.family.subKey))}}oe(e,t,n)}const fc=fe.createContext({socket:null,services:null}),rp=({children:e,socket:t})=>{const n=fe.useRef(new Map).current,r=Zh(cc);return fe.useEffect(()=>{r(t==null?void 0:t.id),t==null||t.on("connect",()=>{r(t.id)}),t==null||t.on("disconnect",()=>{r(void 0)})},[t,r]),K.jsx(fc.Provider,{value:{socket:t,services:n},children:e})},{NODE_ENV:ip}=globalThis.env??{},op=ip==="development";function Yr(){}function sp(e,t){if(op){const n=fe.useRef(Yr);fe.useEffect(()=>{let r=n.current;if(r===Yr)r=e()??Yr,n.current=r;else return()=>{r(),n.current=Yr}},t)}else fe.useEffect(e,t)}function lp(e){sp(e,[])}function up(e,t){const{socket:n,services:r}=fe.useContext(fc);lp(()=>{let i=r==null?void 0:r.get(e);return i?i[0]++:(i=[1,n?t(n):void 0],r==null||r.set(e,i)),()=>{var o;i&&(i[0]--,i[0]===0&&((o=i[1])==null||o.call(i),r==null||r.delete(e)))}})}function ap(e){const t=fe.useContext(El);up(`tx-sync:${e.key}`,n=>tp(e,n,t))}var dc={exports:{}},Fe={},hc={exports:{}},pc={};/**
|
|
24
24
|
* @license React
|
|
25
25
|
* scheduler.production.min.js
|
|
26
26
|
*
|
|
@@ -28,7 +28,7 @@ ${l.trace}`:"No previous disposal trace was found.");return}switch(n.type){case"
|
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the MIT license found in the
|
|
30
30
|
* LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/(function(e){function t(N
|
|
31
|
+
*/(function(e){function t(N,$){var L=N.length;N.push($);e:for(;0<L;){var Q=L-1>>>1,le=N[Q];if(0<i(le,$))N[Q]=$,N[L]=le,L=Q;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var $=N[0],L=N.pop();if(L!==$){N[0]=L;e:for(var Q=0,le=N.length,Wr=le>>>1;Q<Wr;){var Jt=2*(Q+1)-1,Eo=N[Jt],Qt=Jt+1,Hr=N[Qt];if(0>i(Eo,L))Qt<le&&0>i(Hr,Eo)?(N[Q]=Hr,N[Qt]=L,Q=Qt):(N[Q]=Eo,N[Jt]=L,Q=Jt);else if(Qt<le&&0>i(Hr,L))N[Q]=Hr,N[Qt]=L,Q=Qt;else break e}}return $}function i(N,$){var L=N.sortIndex-$.sortIndex;return L!==0?L:N.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],a=[],c=1,p=null,d=3,m=!1,w=!1,S=!1,R=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(N){for(var $=n(a);$!==null;){if($.callback===null)r(a);else if($.startTime<=N)r(a),$.sortIndex=$.expirationTime,t(u,$);else break;$=n(a)}}function k(N){if(S=!1,y(N),!w)if(n(u)!==null)w=!0,Re(T);else{var $=n(a);$!==null&&yn(k,$.startTime-N)}}function T(N,$){w=!1,S&&(S=!1,h(_),_=-1),m=!0;var L=d;try{for(y($),p=n(u);p!==null&&(!(p.expirationTime>$)||N&&!A());){var Q=p.callback;if(typeof Q=="function"){p.callback=null,d=p.priorityLevel;var le=Q(p.expirationTime<=$);$=e.unstable_now(),typeof le=="function"?p.callback=le:p===n(u)&&r(u),y($)}else r(u);p=n(u)}if(p!==null)var Wr=!0;else{var Jt=n(a);Jt!==null&&yn(k,Jt.startTime-$),Wr=!1}return Wr}finally{p=null,d=L,m=!1}}var g=!1,v=null,_=-1,M=5,x=-1;function A(){return!(e.unstable_now()-x<M)}function I(){if(v!==null){var N=e.unstable_now();x=N;var $=!0;try{$=v(!0,N)}finally{$?U():(g=!1,v=null)}}else g=!1}var U;if(typeof f=="function")U=function(){f(I)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,nt=xe.port2;xe.port1.onmessage=I,U=function(){nt.postMessage(null)}}else U=function(){R(I,0)};function Re(N){v=N,g||(g=!0,U())}function yn(N,$){_=R(function(){N(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){w||m||(w=!0,Re(T))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(N){switch(d){case 1:case 2:case 3:var $=3;break;default:$=d}var L=d;d=$;try{return N()}finally{d=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,$){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var L=d;d=N;try{return $()}finally{d=L}},e.unstable_scheduleCallback=function(N,$,L){var Q=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?Q+L:Q):L=Q,N){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=L+le,N={id:c++,callback:$,priorityLevel:N,startTime:L,expirationTime:le,sortIndex:-1},L>Q?(N.sortIndex=L,t(a,N),n(u)===null&&N===n(a)&&(S?(h(_),_=-1):S=!0,yn(k,L-Q))):(N.sortIndex=le,t(u,N),w||m||(w=!0,Re(T))),N},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(N){var $=d;return function(){var L=d;d=$;try{return N.apply(this,arguments)}finally{d=L}}}})(pc);hc.exports=pc;var cp=hc.exports;/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-dom.production.min.js
|
|
34
34
|
*
|
|
@@ -36,11 +36,11 @@ ${l.trace}`:"No previous disposal trace was found.");return}switch(n.type){case"
|
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/var
|
|
39
|
+
*/var fp=fe,ze=cp;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var yc=new Set,Er={};function hn(e,t){Un(e,t),Un(e+"Capture",t)}function Un(e,t){for(Er[e]=t,e=0;e<t.length;e++)yc.add(t[e])}var vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ls=Object.prototype.hasOwnProperty,dp=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Nu={},Ou={};function hp(e){return ls.call(Ou,e)?!0:ls.call(Nu,e)?!1:dp.test(e)?Ou[e]=!0:(Nu[e]=!0,!1)}function pp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yp(e,t,n,r){if(t===null||typeof t>"u"||pp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var he={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){he[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];he[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){he[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){he[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){he[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){he[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){he[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){he[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){he[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var Cl=/[\-:]([a-z])/g;function xl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Cl,xl);he[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Cl,xl);he[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Cl,xl);he[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){he[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});he.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){he[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rl(e,t,n,r){var i=he.hasOwnProperty(t)?he[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(yp(t,n,i,r)&&(n=null),r||i===null?hp(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var _t=fp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,qr=Symbol.for("react.element"),kn=Symbol.for("react.portal"),Sn=Symbol.for("react.fragment"),Tl=Symbol.for("react.strict_mode"),us=Symbol.for("react.profiler"),mc=Symbol.for("react.provider"),gc=Symbol.for("react.context"),Nl=Symbol.for("react.forward_ref"),as=Symbol.for("react.suspense"),cs=Symbol.for("react.suspense_list"),Ol=Symbol.for("react.memo"),Ct=Symbol.for("react.lazy"),vc=Symbol.for("react.offscreen"),Mu=Symbol.iterator;function Zn(e){return e===null||typeof e!="object"?null:(e=Mu&&e[Mu]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,To;function lr(e){if(To===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);To=t&&t[1]||""}return`
|
|
40
40
|
`+To+e}var No=!1;function Oo(e,t){if(!e||No)return"";No=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(a){var r=a}Reflect.construct(e,[],t)}else{try{t.call()}catch(a){r=a}e.call(t.prototype)}else{try{throw Error()}catch(a){r=a}e()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var i=a.stack.split(`
|
|
41
41
|
`),o=r.stack.split(`
|
|
42
42
|
`),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var u=`
|
|
43
|
-
`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{No=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lr(e):""}function _p(e){switch(e.tag){case 5:return lr(e.type);case 16:return lr("Lazy");case 13:return lr("Suspense");case 19:return lr("SuspenseList");case 0:case 2:case 15:return e=Oo(e.type,!1),e;case 11:return e=Oo(e.type.render,!1),e;case 1:return e=Oo(e.type,!0),e;default:return""}}function cs(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sn:return"Fragment";case kn:return"Portal";case ls:return"Profiler";case Rl:return"StrictMode";case us:return"Suspense";case as:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _c:return(e.displayName||"Context")+".Consumer";case Sc:return(e._context.displayName||"Context")+".Provider";case Tl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nl:return t=e.displayName||null,t!==null?t:cs(e.type)||"Memo";case Ct:t=e._payload,e=e._init;try{return cs(e(t))}catch{}}return null}function Ep(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cs(t);case 8:return t===Rl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Dt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Cp(e){var t=Cc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xr(e){e._valueTracker||(e._valueTracker=Cp(e))}function xc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Cc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $i(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function fs(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Au(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Rc(e,t){t=t.checked,t!=null&&xl(e,"checked",t,!1)}function ds(e,t){Rc(e,t);var n=Dt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hs(e,t.type,n):t.hasOwnProperty("defaultValue")&&hs(e,t.type,Dt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $u(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function hs(e,t,n){(t!=="number"||$i(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function $n(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Dt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ps(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(ur(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Dt(n)}}function Tc(e,t){var n=Dt(t.value),r=Dt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Lu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Nc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ys(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Nc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zr,Oc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Zr=Zr||document.createElement("div"),Zr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xp=["Webkit","ms","Moz","O"];Object.keys(dr).forEach(function(e){xp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dr[t]=dr[e]})});function Mc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dr.hasOwnProperty(e)&&dr[e]?(""+t).trim():t+"px"}function Ac(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Mc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Rp=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ms(e,t){if(t){if(Rp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function gs(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vs=null;function Ol(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ws=null,Pn=null,Ln=null;function Iu(e){if(e=Vr(e)){if(typeof ws!="function")throw Error(E(280));var t=e.stateNode;t&&(t=co(t),ws(e.stateNode,e.type,t))}}function $c(e){Pn?Ln?Ln.push(e):Ln=[e]:Pn=e}function Pc(){if(Pn){var e=Pn,t=Ln;if(Ln=Pn=null,Iu(e),t)for(e=0;e<t.length;e++)Iu(t[e])}}function Lc(e,t){return e(t)}function Ic(){}var Mo=!1;function jc(e,t,n){if(Mo)return e(t,n);Mo=!0;try{return Lc(e,t,n)}finally{Mo=!1,(Pn!==null||Ln!==null)&&(Ic(),Pc())}}function xr(e,t){var n=e.stateNode;if(n===null)return null;var r=co(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var ks=!1;if(vt)try{var Gn={};Object.defineProperty(Gn,"passive",{get:function(){ks=!0}}),window.addEventListener("test",Gn,Gn),window.removeEventListener("test",Gn,Gn)}catch{ks=!1}function Tp(e,t,n,r,i,o,s,l,u){var a=Array.prototype.slice.call(arguments,3);try{t.apply(n,a)}catch(c){this.onError(c)}}var hr=!1,Pi=null,Li=!1,Ss=null,Np={onError:function(e){hr=!0,Pi=e}};function Op(e,t,n,r,i,o,s,l,u){hr=!1,Pi=null,Tp.apply(Np,arguments)}function Mp(e,t,n,r,i,o,s,l,u){if(Op.apply(this,arguments),hr){if(hr){var a=Pi;hr=!1,Pi=null}else throw Error(E(198));Li||(Li=!0,Ss=a)}}function hn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function zc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ju(e){if(hn(e)!==e)throw Error(E(188))}function Ap(e){var t=e.alternate;if(!t){if(t=hn(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ju(i),e;if(o===r)return ju(i),t;o=o.sibling}throw Error(E(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(E(189))}}if(n.alternate!==r)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function Fc(e){return e=Ap(e),e!==null?Dc(e):null}function Dc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Dc(e);if(t!==null)return t;e=e.sibling}return null}var Bc=ze.unstable_scheduleCallback,zu=ze.unstable_cancelCallback,$p=ze.unstable_shouldYield,Pp=ze.unstable_requestPaint,te=ze.unstable_now,Lp=ze.unstable_getCurrentPriorityLevel,Ml=ze.unstable_ImmediatePriority,Uc=ze.unstable_UserBlockingPriority,Ii=ze.unstable_NormalPriority,Ip=ze.unstable_LowPriority,Kc=ze.unstable_IdlePriority,so=null,ut=null;function jp(e){if(ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(so,e,void 0,(e.current.flags&128)===128)}catch{}}var Ge=Math.clz32?Math.clz32:Dp,zp=Math.log,Fp=Math.LN2;function Dp(e){return e>>>=0,e===0?32:31-(zp(e)/Fp|0)|0}var Gr=64,ei=4194304;function ar(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ji(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=ar(l):(o&=s,o!==0&&(r=ar(o)))}else s=n&~i,s!==0?r=ar(s):o!==0&&(r=ar(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ge(t),i=1<<n,r|=e[n],t&=~i;return r}function Bp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Up(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Ge(o),l=1<<s,u=i[s];u===-1?(!(l&n)||l&r)&&(i[s]=Bp(l,t)):u<=t&&(e.expiredLanes|=l),o&=~l}}function _s(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Vc(){var e=Gr;return Gr<<=1,!(Gr&4194240)&&(Gr=64),e}function Ao(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ur(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ge(t),e[t]=n}function Kp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ge(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Al(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var B=0;function bc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Wc,$l,Hc,Jc,Qc,Es=!1,ti=[],Mt=null,At=null,$t=null,Rr=new Map,Tr=new Map,Rt=[],Vp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Fu(e,t){switch(e){case"focusin":case"focusout":Mt=null;break;case"dragenter":case"dragleave":At=null;break;case"mouseover":case"mouseout":$t=null;break;case"pointerover":case"pointerout":Rr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tr.delete(t.pointerId)}}function er(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Vr(t),t!==null&&$l(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function bp(e,t,n,r,i){switch(t){case"focusin":return Mt=er(Mt,e,t,n,r,i),!0;case"dragenter":return At=er(At,e,t,n,r,i),!0;case"mouseover":return $t=er($t,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Rr.set(o,er(Rr.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Tr.set(o,er(Tr.get(o)||null,e,t,n,r,i)),!0}return!1}function Yc(e){var t=qt(e.target);if(t!==null){var n=hn(t);if(n!==null){if(t=n.tag,t===13){if(t=zc(n),t!==null){e.blockedOn=t,Qc(e.priority,function(){Hc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function vi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vs=r,n.target.dispatchEvent(r),vs=null}else return t=Vr(n),t!==null&&$l(t),e.blockedOn=n,!1;t.shift()}return!0}function Du(e,t,n){vi(e)&&n.delete(t)}function Wp(){Es=!1,Mt!==null&&vi(Mt)&&(Mt=null),At!==null&&vi(At)&&(At=null),$t!==null&&vi($t)&&($t=null),Rr.forEach(Du),Tr.forEach(Du)}function tr(e,t){e.blockedOn===t&&(e.blockedOn=null,Es||(Es=!0,ze.unstable_scheduleCallback(ze.unstable_NormalPriority,Wp)))}function Nr(e){function t(i){return tr(i,e)}if(0<ti.length){tr(ti[0],e);for(var n=1;n<ti.length;n++){var r=ti[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Mt!==null&&tr(Mt,e),At!==null&&tr(At,e),$t!==null&&tr($t,e),Rr.forEach(t),Tr.forEach(t),n=0;n<Rt.length;n++)r=Rt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&(n=Rt[0],n.blockedOn===null);)Yc(n),n.blockedOn===null&&Rt.shift()}var In=_t.ReactCurrentBatchConfig,zi=!0;function Hp(e,t,n,r){var i=B,o=In.transition;In.transition=null;try{B=1,Pl(e,t,n,r)}finally{B=i,In.transition=o}}function Jp(e,t,n,r){var i=B,o=In.transition;In.transition=null;try{B=4,Pl(e,t,n,r)}finally{B=i,In.transition=o}}function Pl(e,t,n,r){if(zi){var i=Cs(e,t,n,r);if(i===null)Uo(e,t,r,Fi,n),Fu(e,r);else if(bp(i,e,t,n,r))r.stopPropagation();else if(Fu(e,r),t&4&&-1<Vp.indexOf(e)){for(;i!==null;){var o=Vr(i);if(o!==null&&Wc(o),o=Cs(e,t,n,r),o===null&&Uo(e,t,r,Fi,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Uo(e,t,r,null,n)}}var Fi=null;function Cs(e,t,n,r){if(Fi=null,e=Ol(r),e=qt(e),e!==null)if(t=hn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=zc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Fi=e,null}function qc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Lp()){case Ml:return 1;case Uc:return 4;case Ii:case Ip:return 16;case Kc:return 536870912;default:return 16}default:return 16}}var Nt=null,Ll=null,wi=null;function Xc(){if(wi)return wi;var e,t=Ll,n=t.length,r,i="value"in Nt?Nt.value:Nt.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return wi=i.slice(e,1<r?1-r:void 0)}function ki(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ni(){return!0}function Bu(){return!1}function De(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ni:Bu,this.isPropagationStopped=Bu,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ni)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ni)},persist:function(){},isPersistent:ni}),t}var Yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Il=De(Yn),Kr=G({},Yn,{view:0,detail:0}),Qp=De(Kr),$o,Po,nr,lo=G({},Kr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nr&&(nr&&e.type==="mousemove"?($o=e.screenX-nr.screenX,Po=e.screenY-nr.screenY):Po=$o=0,nr=e),$o)},movementY:function(e){return"movementY"in e?e.movementY:Po}}),Uu=De(lo),Yp=G({},lo,{dataTransfer:0}),qp=De(Yp),Xp=G({},Kr,{relatedTarget:0}),Lo=De(Xp),Zp=G({},Yn,{animationName:0,elapsedTime:0,pseudoElement:0}),Gp=De(Zp),ey=G({},Yn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ty=De(ey),ny=G({},Yn,{data:0}),Ku=De(ny),ry={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iy={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},oy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oy[e])?!!t[e]:!1}function jl(){return sy}var ly=G({},Kr,{key:function(e){if(e.key){var t=ry[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ki(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?iy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jl,charCode:function(e){return e.type==="keypress"?ki(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ki(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uy=De(ly),ay=G({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vu=De(ay),cy=G({},Kr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jl}),fy=De(cy),dy=G({},Yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),hy=De(dy),py=G({},lo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),yy=De(py),my=[9,13,27,32],zl=vt&&"CompositionEvent"in window,pr=null;vt&&"documentMode"in document&&(pr=document.documentMode);var gy=vt&&"TextEvent"in window&&!pr,Zc=vt&&(!zl||pr&&8<pr&&11>=pr),bu=" ",Wu=!1;function Gc(e,t){switch(e){case"keyup":return my.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ef(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _n=!1;function vy(e,t){switch(e){case"compositionend":return ef(t);case"keypress":return t.which!==32?null:(Wu=!0,bu);case"textInput":return e=t.data,e===bu&&Wu?null:e;default:return null}}function wy(e,t){if(_n)return e==="compositionend"||!zl&&Gc(e,t)?(e=Xc(),wi=Ll=Nt=null,_n=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zc&&t.locale!=="ko"?null:t.data;default:return null}}var ky={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ky[e.type]:t==="textarea"}function tf(e,t,n,r){$c(r),t=Di(t,"onChange"),0<t.length&&(n=new Il("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var yr=null,Or=null;function Sy(e){hf(e,0)}function uo(e){var t=xn(e);if(xc(t))return e}function _y(e,t){if(e==="change")return t}var nf=!1;if(vt){var Io;if(vt){var jo="oninput"in document;if(!jo){var Ju=document.createElement("div");Ju.setAttribute("oninput","return;"),jo=typeof Ju.oninput=="function"}Io=jo}else Io=!1;nf=Io&&(!document.documentMode||9<document.documentMode)}function Qu(){yr&&(yr.detachEvent("onpropertychange",rf),Or=yr=null)}function rf(e){if(e.propertyName==="value"&&uo(Or)){var t=[];tf(t,Or,e,Ol(e)),jc(Sy,t)}}function Ey(e,t,n){e==="focusin"?(Qu(),yr=t,Or=n,yr.attachEvent("onpropertychange",rf)):e==="focusout"&&Qu()}function Cy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(Or)}function xy(e,t){if(e==="click")return uo(t)}function Ry(e,t){if(e==="input"||e==="change")return uo(t)}function Ty(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tt=typeof Object.is=="function"?Object.is:Ty;function Mr(e,t){if(tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ss.call(t,i)||!tt(e[i],t[i]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qu(e,t){var n=Yu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yu(n)}}function of(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?of(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sf(){for(var e=window,t=$i();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$i(e.document)}return t}function Fl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ny(e){var t=sf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&of(n.ownerDocument.documentElement,n)){if(r!==null&&Fl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=qu(n,o);var s=qu(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Oy=vt&&"documentMode"in document&&11>=document.documentMode,En=null,xs=null,mr=null,Rs=!1;function Xu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rs||En==null||En!==$i(r)||(r=En,"selectionStart"in r&&Fl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mr&&Mr(mr,r)||(mr=r,r=Di(xs,"onSelect"),0<r.length&&(t=new Il("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=En)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Cn={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionend:ri("Transition","TransitionEnd")},zo={},lf={};vt&&(lf=document.createElement("div").style,"AnimationEvent"in window||(delete Cn.animationend.animation,delete Cn.animationiteration.animation,delete Cn.animationstart.animation),"TransitionEvent"in window||delete Cn.transitionend.transition);function ao(e){if(zo[e])return zo[e];if(!Cn[e])return e;var t=Cn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in lf)return zo[e]=t[n];return e}var uf=ao("animationend"),af=ao("animationiteration"),cf=ao("animationstart"),ff=ao("transitionend"),df=new Map,Zu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Vt(e,t){df.set(e,t),dn(t,[e])}for(var Fo=0;Fo<Zu.length;Fo++){var Do=Zu[Fo],My=Do.toLowerCase(),Ay=Do[0].toUpperCase()+Do.slice(1);Vt(My,"on"+Ay)}Vt(uf,"onAnimationEnd");Vt(af,"onAnimationIteration");Vt(cf,"onAnimationStart");Vt("dblclick","onDoubleClick");Vt("focusin","onFocus");Vt("focusout","onBlur");Vt(ff,"onTransitionEnd");Un("onMouseEnter",["mouseout","mouseover"]);Un("onMouseLeave",["mouseout","mouseover"]);Un("onPointerEnter",["pointerout","pointerover"]);Un("onPointerLeave",["pointerout","pointerover"]);dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));dn("onBeforeInput",["compositionend","keypress","textInput","paste"]);dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),$y=new Set("cancel close invalid load scroll toggle".split(" ").concat(cr));function Gu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Mp(r,t,void 0,e),e.currentTarget=null}function hf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],u=l.instance,a=l.currentTarget;if(l=l.listener,u!==o&&i.isPropagationStopped())break e;Gu(i,l,a),o=u}else for(s=0;s<r.length;s++){if(l=r[s],u=l.instance,a=l.currentTarget,l=l.listener,u!==o&&i.isPropagationStopped())break e;Gu(i,l,a),o=u}}}if(Li)throw e=Ss,Li=!1,Ss=null,e}function b(e,t){var n=t[As];n===void 0&&(n=t[As]=new Set);var r=e+"__bubble";n.has(r)||(pf(t,e,2,!1),n.add(r))}function Bo(e,t,n){var r=0;t&&(r|=4),pf(n,e,r,t)}var ii="_reactListening"+Math.random().toString(36).slice(2);function Ar(e){if(!e[ii]){e[ii]=!0,kc.forEach(function(n){n!=="selectionchange"&&($y.has(n)||Bo(n,!1,e),Bo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ii]||(t[ii]=!0,Bo("selectionchange",!1,t))}}function pf(e,t,n,r){switch(qc(t)){case 1:var i=Hp;break;case 4:i=Jp;break;default:i=Pl}n=i.bind(null,t,n,e),i=void 0,!ks||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Uo(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;l!==null;){if(s=qt(l),s===null)return;if(u=s.tag,u===5||u===6){r=o=s;continue e}l=l.parentNode}}r=r.return}jc(function(){var a=o,c=Ol(n),p=[];e:{var d=df.get(e);if(d!==void 0){var m=Il,w=e;switch(e){case"keypress":if(ki(n)===0)break e;case"keydown":case"keyup":m=uy;break;case"focusin":w="focus",m=Lo;break;case"focusout":w="blur",m=Lo;break;case"beforeblur":case"afterblur":m=Lo;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Uu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=qp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=fy;break;case uf:case af:case cf:m=Gp;break;case ff:m=hy;break;case"scroll":m=Qp;break;case"wheel":m=yy;break;case"copy":case"cut":case"paste":m=ty;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Vu}var S=(t&4)!==0,R=!S&&e==="scroll",h=S?d!==null?d+"Capture":null:d;S=[];for(var f=a,y;f!==null;){y=f;var k=y.stateNode;if(y.tag===5&&k!==null&&(y=k,h!==null&&(k=xr(f,h),k!=null&&S.push($r(f,k,y)))),R)break;f=f.return}0<S.length&&(d=new m(d,w,null,n,c),p.push({event:d,listeners:S}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",d&&n!==vs&&(w=n.relatedTarget||n.fromElement)&&(qt(w)||w[wt]))break e;if((m||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,m?(w=n.relatedTarget||n.toElement,m=a,w=w?qt(w):null,w!==null&&(R=hn(w),w!==R||w.tag!==5&&w.tag!==6)&&(w=null)):(m=null,w=a),m!==w)){if(S=Uu,k="onMouseLeave",h="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(S=Vu,k="onPointerLeave",h="onPointerEnter",f="pointer"),R=m==null?d:xn(m),y=w==null?d:xn(w),d=new S(k,f+"leave",m,n,c),d.target=R,d.relatedTarget=y,k=null,qt(c)===a&&(S=new S(h,f+"enter",w,n,c),S.target=y,S.relatedTarget=R,k=S),R=k,m&&w)t:{for(S=m,h=w,f=0,y=S;y;y=yn(y))f++;for(y=0,k=h;k;k=yn(k))y++;for(;0<f-y;)S=yn(S),f--;for(;0<y-f;)h=yn(h),y--;for(;f--;){if(S===h||h!==null&&S===h.alternate)break t;S=yn(S),h=yn(h)}S=null}else S=null;m!==null&&ea(p,d,m,S,!1),w!==null&&R!==null&&ea(p,R,w,S,!0)}}e:{if(d=a?xn(a):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var T=_y;else if(Hu(d))if(nf)T=Ry;else{T=Cy;var g=Ey}else(m=d.nodeName)&&m.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=xy);if(T&&(T=T(e,a))){tf(p,T,n,c);break e}g&&g(e,d,a),e==="focusout"&&(g=d._wrapperState)&&g.controlled&&d.type==="number"&&hs(d,"number",d.value)}switch(g=a?xn(a):window,e){case"focusin":(Hu(g)||g.contentEditable==="true")&&(En=g,xs=a,mr=null);break;case"focusout":mr=xs=En=null;break;case"mousedown":Rs=!0;break;case"contextmenu":case"mouseup":case"dragend":Rs=!1,Xu(p,n,c);break;case"selectionchange":if(Oy)break;case"keydown":case"keyup":Xu(p,n,c)}var v;if(zl)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else _n?Gc(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Zc&&n.locale!=="ko"&&(_n||_!=="onCompositionStart"?_==="onCompositionEnd"&&_n&&(v=Xc()):(Nt=c,Ll="value"in Nt?Nt.value:Nt.textContent,_n=!0)),g=Di(a,_),0<g.length&&(_=new Ku(_,e,null,n,c),p.push({event:_,listeners:g}),v?_.data=v:(v=ef(n),v!==null&&(_.data=v)))),(v=gy?vy(e,n):wy(e,n))&&(a=Di(a,"onBeforeInput"),0<a.length&&(c=new Ku("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:a}),c.data=v))}hf(p,t)})}function $r(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Di(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=xr(e,n),o!=null&&r.unshift($r(e,o,i)),o=xr(e,t),o!=null&&r.push($r(e,o,i))),e=e.return}return r}function yn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ea(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,u=l.alternate,a=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&a!==null&&(l=a,i?(u=xr(n,o),u!=null&&s.unshift($r(n,u,l))):i||(u=xr(n,o),u!=null&&s.push($r(n,u,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Py=/\r\n?/g,Ly=/\u0000|\uFFFD/g;function ta(e){return(typeof e=="string"?e:""+e).replace(Py,`
|
|
44
|
-
`).replace(Ly,"")}function oi(e,t,n){if(t=ta(t),ta(e)!==t&&n)throw Error(E(425))}function Bi(){}var Ts=null,Ns=null;function Os(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ms=typeof setTimeout=="function"?setTimeout:void 0,Iy=typeof clearTimeout=="function"?clearTimeout:void 0,na=typeof Promise=="function"?Promise:void 0,jy=typeof queueMicrotask=="function"?queueMicrotask:typeof na<"u"?function(e){return na.resolve(null).then(e).catch(zy)}:Ms;function zy(e){setTimeout(function(){throw e})}function Ko(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Nr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Nr(t)}function Pt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ra(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qn=Math.random().toString(36).slice(2),st="__reactFiber$"+qn,Pr="__reactProps$"+qn,wt="__reactContainer$"+qn,As="__reactEvents$"+qn,Fy="__reactListeners$"+qn,Dy="__reactHandles$"+qn;function qt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ra(e);e!==null;){if(n=e[st])return n;e=ra(e)}return t}e=n,n=e.parentNode}return null}function Vr(e){return e=e[st]||e[wt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function xn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function co(e){return e[Pr]||null}var $s=[],Rn=-1;function bt(e){return{current:e}}function W(e){0>Rn||(e.current=$s[Rn],$s[Rn]=null,Rn--)}function V(e,t){Rn++,$s[Rn]=e.current,e.current=t}var Bt={},ve=bt(Bt),Me=bt(!1),sn=Bt;function Kn(e,t){var n=e.type.contextTypes;if(!n)return Bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ae(e){return e=e.childContextTypes,e!=null}function Ui(){W(Me),W(ve)}function ia(e,t,n){if(ve.current!==Bt)throw Error(E(168));V(ve,t),V(Me,n)}function yf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(E(108,Ep(e)||"Unknown",i));return G({},n,r)}function Ki(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bt,sn=ve.current,V(ve,e),V(Me,Me.current),!0}function oa(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=yf(e,t,sn),r.__reactInternalMemoizedMergedChildContext=e,W(Me),W(ve),V(ve,e)):W(Me),V(Me,n)}var ht=null,fo=!1,Vo=!1;function mf(e){ht===null?ht=[e]:ht.push(e)}function By(e){fo=!0,mf(e)}function Wt(){if(!Vo&&ht!==null){Vo=!0;var e=0,t=B;try{var n=ht;for(B=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ht=null,fo=!1}catch(i){throw ht!==null&&(ht=ht.slice(e+1)),Bc(Ml,Wt),i}finally{B=t,Vo=!1}}return null}var Tn=[],Nn=0,Vi=null,bi=0,Be=[],Ue=0,ln=null,yt=1,mt="";function Qt(e,t){Tn[Nn++]=bi,Tn[Nn++]=Vi,Vi=e,bi=t}function gf(e,t,n){Be[Ue++]=yt,Be[Ue++]=mt,Be[Ue++]=ln,ln=e;var r=yt;e=mt;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var o=32-Ge(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,yt=1<<32-Ge(t)+i|n<<i|r,mt=o+e}else yt=1<<o|n<<i|r,mt=e}function Dl(e){e.return!==null&&(Qt(e,1),gf(e,1,0))}function Bl(e){for(;e===Vi;)Vi=Tn[--Nn],Tn[Nn]=null,bi=Tn[--Nn],Tn[Nn]=null;for(;e===ln;)ln=Be[--Ue],Be[Ue]=null,mt=Be[--Ue],Be[Ue]=null,yt=Be[--Ue],Be[Ue]=null}var Ie=null,Le=null,J=!1,Ze=null;function vf(e,t){var n=Ve(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ie=e,Le=Pt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ie=e,Le=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ln!==null?{id:yt,overflow:mt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ve(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ie=e,Le=null,!0):!1;default:return!1}}function Ps(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ls(e){if(J){var t=Le;if(t){var n=t;if(!sa(e,t)){if(Ps(e))throw Error(E(418));t=Pt(n.nextSibling);var r=Ie;t&&sa(e,t)?vf(r,n):(e.flags=e.flags&-4097|2,J=!1,Ie=e)}}else{if(Ps(e))throw Error(E(418));e.flags=e.flags&-4097|2,J=!1,Ie=e}}}function la(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ie=e}function si(e){if(e!==Ie)return!1;if(!J)return la(e),J=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Os(e.type,e.memoizedProps)),t&&(t=Le)){if(Ps(e))throw wf(),Error(E(418));for(;t;)vf(e,t),t=Pt(t.nextSibling)}if(la(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Le=Pt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Le=null}}else Le=Ie?Pt(e.stateNode.nextSibling):null;return!0}function wf(){for(var e=Le;e;)e=Pt(e.nextSibling)}function Vn(){Le=Ie=null,J=!1}function Ul(e){Ze===null?Ze=[e]:Ze.push(e)}var Uy=_t.ReactCurrentBatchConfig;function rr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(E(309));var r=n.stateNode}if(!r)throw Error(E(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function li(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ua(e){var t=e._init;return t(e._payload)}function kf(e){function t(h,f){if(e){var y=h.deletions;y===null?(h.deletions=[f],h.flags|=16):y.push(f)}}function n(h,f){if(!e)return null;for(;f!==null;)t(h,f),f=f.sibling;return null}function r(h,f){for(h=new Map;f!==null;)f.key!==null?h.set(f.key,f):h.set(f.index,f),f=f.sibling;return h}function i(h,f){return h=zt(h,f),h.index=0,h.sibling=null,h}function o(h,f,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<f?(h.flags|=2,f):y):(h.flags|=2,f)):(h.flags|=1048576,f)}function s(h){return e&&h.alternate===null&&(h.flags|=2),h}function l(h,f,y,k){return f===null||f.tag!==6?(f=qo(y,h.mode,k),f.return=h,f):(f=i(f,y),f.return=h,f)}function u(h,f,y,k){var T=y.type;return T===Sn?c(h,f,y.props.children,k,y.key):f!==null&&(f.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ct&&ua(T)===f.type)?(k=i(f,y.props),k.ref=rr(h,f,y),k.return=h,k):(k=Ti(y.type,y.key,y.props,null,h.mode,k),k.ref=rr(h,f,y),k.return=h,k)}function a(h,f,y,k){return f===null||f.tag!==4||f.stateNode.containerInfo!==y.containerInfo||f.stateNode.implementation!==y.implementation?(f=Xo(y,h.mode,k),f.return=h,f):(f=i(f,y.children||[]),f.return=h,f)}function c(h,f,y,k,T){return f===null||f.tag!==7?(f=en(y,h.mode,k,T),f.return=h,f):(f=i(f,y),f.return=h,f)}function p(h,f,y){if(typeof f=="string"&&f!==""||typeof f=="number")return f=qo(""+f,h.mode,y),f.return=h,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case qr:return y=Ti(f.type,f.key,f.props,null,h.mode,y),y.ref=rr(h,null,f),y.return=h,y;case kn:return f=Xo(f,h.mode,y),f.return=h,f;case Ct:var k=f._init;return p(h,k(f._payload),y)}if(ur(f)||Zn(f))return f=en(f,h.mode,y,null),f.return=h,f;li(h,f)}return null}function d(h,f,y,k){var T=f!==null?f.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return T!==null?null:l(h,f,""+y,k);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case qr:return y.key===T?u(h,f,y,k):null;case kn:return y.key===T?a(h,f,y,k):null;case Ct:return T=y._init,d(h,f,T(y._payload),k)}if(ur(y)||Zn(y))return T!==null?null:c(h,f,y,k,null);li(h,y)}return null}function m(h,f,y,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return h=h.get(y)||null,l(f,h,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case qr:return h=h.get(k.key===null?y:k.key)||null,u(f,h,k,T);case kn:return h=h.get(k.key===null?y:k.key)||null,a(f,h,k,T);case Ct:var g=k._init;return m(h,f,y,g(k._payload),T)}if(ur(k)||Zn(k))return h=h.get(y)||null,c(f,h,k,T,null);li(f,k)}return null}function w(h,f,y,k){for(var T=null,g=null,v=f,_=f=0,M=null;v!==null&&_<y.length;_++){v.index>_?(M=v,v=null):M=v.sibling;var x=d(h,v,y[_],k);if(x===null){v===null&&(v=M);break}e&&v&&x.alternate===null&&t(h,v),f=o(x,f,_),g===null?T=x:g.sibling=x,g=x,v=M}if(_===y.length)return n(h,v),J&&Qt(h,_),T;if(v===null){for(;_<y.length;_++)v=p(h,y[_],k),v!==null&&(f=o(v,f,_),g===null?T=v:g.sibling=v,g=v);return J&&Qt(h,_),T}for(v=r(h,v);_<y.length;_++)M=m(v,h,_,y[_],k),M!==null&&(e&&M.alternate!==null&&v.delete(M.key===null?_:M.key),f=o(M,f,_),g===null?T=M:g.sibling=M,g=M);return e&&v.forEach(function(A){return t(h,A)}),J&&Qt(h,_),T}function S(h,f,y,k){var T=Zn(y);if(typeof T!="function")throw Error(E(150));if(y=T.call(y),y==null)throw Error(E(151));for(var g=T=null,v=f,_=f=0,M=null,x=y.next();v!==null&&!x.done;_++,x=y.next()){v.index>_?(M=v,v=null):M=v.sibling;var A=d(h,v,x.value,k);if(A===null){v===null&&(v=M);break}e&&v&&A.alternate===null&&t(h,v),f=o(A,f,_),g===null?T=A:g.sibling=A,g=A,v=M}if(x.done)return n(h,v),J&&Qt(h,_),T;if(v===null){for(;!x.done;_++,x=y.next())x=p(h,x.value,k),x!==null&&(f=o(x,f,_),g===null?T=x:g.sibling=x,g=x);return J&&Qt(h,_),T}for(v=r(h,v);!x.done;_++,x=y.next())x=m(v,h,_,x.value,k),x!==null&&(e&&x.alternate!==null&&v.delete(x.key===null?_:x.key),f=o(x,f,_),g===null?T=x:g.sibling=x,g=x);return e&&v.forEach(function(I){return t(h,I)}),J&&Qt(h,_),T}function R(h,f,y,k){if(typeof y=="object"&&y!==null&&y.type===Sn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case qr:e:{for(var T=y.key,g=f;g!==null;){if(g.key===T){if(T=y.type,T===Sn){if(g.tag===7){n(h,g.sibling),f=i(g,y.props.children),f.return=h,h=f;break e}}else if(g.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ct&&ua(T)===g.type){n(h,g.sibling),f=i(g,y.props),f.ref=rr(h,g,y),f.return=h,h=f;break e}n(h,g);break}else t(h,g);g=g.sibling}y.type===Sn?(f=en(y.props.children,h.mode,k,y.key),f.return=h,h=f):(k=Ti(y.type,y.key,y.props,null,h.mode,k),k.ref=rr(h,f,y),k.return=h,h=k)}return s(h);case kn:e:{for(g=y.key;f!==null;){if(f.key===g)if(f.tag===4&&f.stateNode.containerInfo===y.containerInfo&&f.stateNode.implementation===y.implementation){n(h,f.sibling),f=i(f,y.children||[]),f.return=h,h=f;break e}else{n(h,f);break}else t(h,f);f=f.sibling}f=Xo(y,h.mode,k),f.return=h,h=f}return s(h);case Ct:return g=y._init,R(h,f,g(y._payload),k)}if(ur(y))return w(h,f,y,k);if(Zn(y))return S(h,f,y,k);li(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,f!==null&&f.tag===6?(n(h,f.sibling),f=i(f,y),f.return=h,h=f):(n(h,f),f=qo(y,h.mode,k),f.return=h,h=f),s(h)):n(h,f)}return R}var bn=kf(!0),Sf=kf(!1),Wi=bt(null),Hi=null,On=null,Kl=null;function Vl(){Kl=On=Hi=null}function bl(e){var t=Wi.current;W(Wi),e._currentValue=t}function Is(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jn(e,t){Hi=e,Kl=On=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ne=!0),e.firstContext=null)}function We(e){var t=e._currentValue;if(Kl!==e)if(e={context:e,memoizedValue:t,next:null},On===null){if(Hi===null)throw Error(E(308));On=e,Hi.dependencies={lanes:0,firstContext:e}}else On=On.next=e;return t}var Xt=null;function Wl(e){Xt===null?Xt=[e]:Xt.push(e)}function _f(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Wl(t)):(n.next=i.next,i.next=n),t.interleaved=n,kt(e,r)}function kt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var xt=!1;function Hl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ef(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Lt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,F&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,kt(e,n)}return i=r.interleaved,i===null?(t.next=t,Wl(r)):(t.next=i.next,i.next=t),r.interleaved=t,kt(e,n)}function Si(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Al(e,n)}}function aa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ji(e,t,n,r){var i=e.updateQueue;xt=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,a=u.next;u.next=null,s===null?o=a:s.next=a,s=u;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=a:l.next=a,c.lastBaseUpdate=u))}if(o!==null){var p=i.baseState;s=0,c=a=u=null,l=o;do{var d=l.lane,m=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var w=e,S=l;switch(d=t,m=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){p=w.call(m,p,d);break e}p=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,d=typeof w=="function"?w.call(m,p,d):w,d==null)break e;p=G({},p,d);break e;case 2:xt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else m={eventTime:m,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(a=c=m,u=p):c=c.next=m,s|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(u=p),i.baseState=u,i.firstBaseUpdate=a,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);an|=s,e.lanes=s,e.memoizedState=p}}function ca(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(E(191,i));i.call(r)}}}var br={},at=bt(br),Lr=bt(br),Ir=bt(br);function Zt(e){if(e===br)throw Error(E(174));return e}function Jl(e,t){switch(V(Ir,t),V(Lr,e),V(at,br),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ys(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ys(t,e)}W(at),V(at,t)}function Wn(){W(at),W(Lr),W(Ir)}function Cf(e){Zt(Ir.current);var t=Zt(at.current),n=ys(t,e.type);t!==n&&(V(Lr,e),V(at,n))}function Ql(e){Lr.current===e&&(W(at),W(Lr))}var q=bt(0);function Qi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bo=[];function Yl(){for(var e=0;e<bo.length;e++)bo[e]._workInProgressVersionPrimary=null;bo.length=0}var _i=_t.ReactCurrentDispatcher,Wo=_t.ReactCurrentBatchConfig,un=0,Z=null,ie=null,ue=null,Yi=!1,gr=!1,jr=0,Ky=0;function pe(){throw Error(E(321))}function ql(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tt(e[n],t[n]))return!1;return!0}function Xl(e,t,n,r,i,o){if(un=o,Z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_i.current=e===null||e.memoizedState===null?Hy:Jy,e=n(r,i),gr){o=0;do{if(gr=!1,jr=0,25<=o)throw Error(E(301));o+=1,ue=ie=null,t.updateQueue=null,_i.current=Qy,e=n(r,i)}while(gr)}if(_i.current=qi,t=ie!==null&&ie.next!==null,un=0,ue=ie=Z=null,Yi=!1,t)throw Error(E(300));return e}function Zl(){var e=jr!==0;return jr=0,e}function ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ue===null?Z.memoizedState=ue=e:ue=ue.next=e,ue}function He(){if(ie===null){var e=Z.alternate;e=e!==null?e.memoizedState:null}else e=ie.next;var t=ue===null?Z.memoizedState:ue.next;if(t!==null)ue=t,ie=e;else{if(e===null)throw Error(E(310));ie=e,e={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},ue===null?Z.memoizedState=ue=e:ue=ue.next=e}return ue}function zr(e,t){return typeof t=="function"?t(e):t}function Ho(e){var t=He(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=ie,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,u=null,a=o;do{var c=a.lane;if((un&c)===c)u!==null&&(u=u.next={lane:0,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null}),r=a.hasEagerState?a.eagerState:e(r,a.action);else{var p={lane:c,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};u===null?(l=u=p,s=r):u=u.next=p,Z.lanes|=c,an|=c}a=a.next}while(a!==null&&a!==o);u===null?s=r:u.next=l,tt(r,t.memoizedState)||(Ne=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Z.lanes|=o,an|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Jo(e){var t=He(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);tt(o,t.memoizedState)||(Ne=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function xf(){}function Rf(e,t){var n=Z,r=He(),i=t(),o=!tt(r.memoizedState,i);if(o&&(r.memoizedState=i,Ne=!0),r=r.queue,Gl(Of.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ue!==null&&ue.memoizedState.tag&1){if(n.flags|=2048,Fr(9,Nf.bind(null,n,r,i,t),void 0,null),ae===null)throw Error(E(349));un&30||Tf(n,t,i)}return i}function Tf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Z.updateQueue,t===null?(t={lastEffect:null,stores:null},Z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Nf(e,t,n,r){t.value=n,t.getSnapshot=r,Mf(t)&&Af(e)}function Of(e,t,n){return n(function(){Mf(t)&&Af(e)})}function Mf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tt(e,n)}catch{return!0}}function Af(e){var t=kt(e,1);t!==null&&et(t,e,1,-1)}function fa(e){var t=ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:e},t.queue=e,e=e.dispatch=Wy.bind(null,Z,e),[t.memoizedState,e]}function Fr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Z.updateQueue,t===null?(t={lastEffect:null,stores:null},Z.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function $f(){return He().memoizedState}function Ei(e,t,n,r){var i=ot();Z.flags|=e,i.memoizedState=Fr(1|t,n,void 0,r===void 0?null:r)}function ho(e,t,n,r){var i=He();r=r===void 0?null:r;var o=void 0;if(ie!==null){var s=ie.memoizedState;if(o=s.destroy,r!==null&&ql(r,s.deps)){i.memoizedState=Fr(t,n,o,r);return}}Z.flags|=e,i.memoizedState=Fr(1|t,n,o,r)}function da(e,t){return Ei(8390656,8,e,t)}function Gl(e,t){return ho(2048,8,e,t)}function Pf(e,t){return ho(4,2,e,t)}function Lf(e,t){return ho(4,4,e,t)}function If(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function jf(e,t,n){return n=n!=null?n.concat([e]):null,ho(4,4,If.bind(null,t,e),n)}function eu(){}function zf(e,t){var n=He();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ql(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ff(e,t){var n=He();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ql(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Df(e,t,n){return un&21?(tt(n,t)||(n=Vc(),Z.lanes|=n,an|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ne=!0),e.memoizedState=n)}function Vy(e,t){var n=B;B=n!==0&&4>n?n:4,e(!0);var r=Wo.transition;Wo.transition={};try{e(!1),t()}finally{B=n,Wo.transition=r}}function Bf(){return He().memoizedState}function by(e,t,n){var r=jt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Uf(e))Kf(t,n);else if(n=_f(e,t,n,r),n!==null){var i=Se();et(n,e,r,i),Vf(n,t,r)}}function Wy(e,t,n){var r=jt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Uf(e))Kf(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,tt(l,s)){var u=t.interleaved;u===null?(i.next=i,Wl(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=_f(e,t,i,r),n!==null&&(i=Se(),et(n,e,r,i),Vf(n,t,r))}}function Uf(e){var t=e.alternate;return e===Z||t!==null&&t===Z}function Kf(e,t){gr=Yi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Al(e,n)}}var qi={readContext:We,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Hy={readContext:We,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:da,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ei(4194308,4,If.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ei(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ei(4,2,e,t)},useMemo:function(e,t){var n=ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ot();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=by.bind(null,Z,e),[r.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:fa,useDebugValue:eu,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=fa(!1),t=e[0];return e=Vy.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Z,i=ot();if(J){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),ae===null)throw Error(E(349));un&30||Tf(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,da(Of.bind(null,r,o,e),[e]),r.flags|=2048,Fr(9,Nf.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ot(),t=ae.identifierPrefix;if(J){var n=mt,r=yt;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ky++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Jy={readContext:We,useCallback:zf,useContext:We,useEffect:Gl,useImperativeHandle:jf,useInsertionEffect:Pf,useLayoutEffect:Lf,useMemo:Ff,useReducer:Ho,useRef:$f,useState:function(){return Ho(zr)},useDebugValue:eu,useDeferredValue:function(e){var t=He();return Df(t,ie.memoizedState,e)},useTransition:function(){var e=Ho(zr)[0],t=He().memoizedState;return[e,t]},useMutableSource:xf,useSyncExternalStore:Rf,useId:Bf,unstable_isNewReconciler:!1},Qy={readContext:We,useCallback:zf,useContext:We,useEffect:Gl,useImperativeHandle:jf,useInsertionEffect:Pf,useLayoutEffect:Lf,useMemo:Ff,useReducer:Jo,useRef:$f,useState:function(){return Jo(zr)},useDebugValue:eu,useDeferredValue:function(e){var t=He();return ie===null?t.memoizedState=e:Df(t,ie.memoizedState,e)},useTransition:function(){var e=Jo(zr)[0],t=He().memoizedState;return[e,t]},useMutableSource:xf,useSyncExternalStore:Rf,useId:Bf,unstable_isNewReconciler:!1};function Ye(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function js(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var po={isMounted:function(e){return(e=e._reactInternals)?hn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Se(),i=jt(e),o=gt(r,i);o.payload=t,n!=null&&(o.callback=n),t=Lt(e,o,i),t!==null&&(et(t,e,i,r),Si(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Se(),i=jt(e),o=gt(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Lt(e,o,i),t!==null&&(et(t,e,i,r),Si(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Se(),r=jt(e),i=gt(n,r);i.tag=2,t!=null&&(i.callback=t),t=Lt(e,i,r),t!==null&&(et(t,e,r,n),Si(t,e,r))}};function ha(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Mr(n,r)||!Mr(i,o):!0}function bf(e,t,n){var r=!1,i=Bt,o=t.contextType;return typeof o=="object"&&o!==null?o=We(o):(i=Ae(t)?sn:ve.current,r=t.contextTypes,o=(r=r!=null)?Kn(e,i):Bt),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=po,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function pa(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&po.enqueueReplaceState(t,t.state,null)}function zs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Hl(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=We(o):(o=Ae(t)?sn:ve.current,i.context=Kn(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(js(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&po.enqueueReplaceState(i,i.state,null),Ji(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Hn(e,t){try{var n="",r=t;do n+=_p(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
43
|
+
`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{No=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lr(e):""}function mp(e){switch(e.tag){case 5:return lr(e.type);case 16:return lr("Lazy");case 13:return lr("Suspense");case 19:return lr("SuspenseList");case 0:case 2:case 15:return e=Oo(e.type,!1),e;case 11:return e=Oo(e.type.render,!1),e;case 1:return e=Oo(e.type,!0),e;default:return""}}function fs(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sn:return"Fragment";case kn:return"Portal";case us:return"Profiler";case Tl:return"StrictMode";case as:return"Suspense";case cs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gc:return(e.displayName||"Context")+".Consumer";case mc:return(e._context.displayName||"Context")+".Provider";case Nl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ol:return t=e.displayName||null,t!==null?t:fs(e.type)||"Memo";case Ct:t=e._payload,e=e._init;try{return fs(e(t))}catch{}}return null}function gp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fs(t);case 8:return t===Tl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Bt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vp(e){var t=wc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xr(e){e._valueTracker||(e._valueTracker=vp(e))}function kc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ai(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ds(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Au(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Bt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Sc(e,t){t=t.checked,t!=null&&Rl(e,"checked",t,!1)}function hs(e,t){Sc(e,t);var n=Bt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ps(e,t.type,n):t.hasOwnProperty("defaultValue")&&ps(e,t.type,Bt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Pu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ps(e,t,n){(t!=="number"||Ai(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function Pn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Bt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ys(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $u(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(ur(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Bt(n)}}function _c(e,t){var n=Bt(t.value),r=Bt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Lu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ec(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ms(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ec(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zr,Cc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Zr=Zr||document.createElement("div"),Zr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wp=["Webkit","ms","Moz","O"];Object.keys(dr).forEach(function(e){wp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dr[t]=dr[e]})});function xc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dr.hasOwnProperty(e)&&dr[e]?(""+t).trim():t+"px"}function Rc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=xc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var kp=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gs(e,t){if(t){if(kp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function vs(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ws=null;function Ml(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ks=null,$n=null,Ln=null;function Iu(e){if(e=Vr(e)){if(typeof ks!="function")throw Error(E(280));var t=e.stateNode;t&&(t=ao(t),ks(e.stateNode,e.type,t))}}function Tc(e){$n?Ln?Ln.push(e):Ln=[e]:$n=e}function Nc(){if($n){var e=$n,t=Ln;if(Ln=$n=null,Iu(e),t)for(e=0;e<t.length;e++)Iu(t[e])}}function Oc(e,t){return e(t)}function Mc(){}var Mo=!1;function Ac(e,t,n){if(Mo)return e(t,n);Mo=!0;try{return Oc(e,t,n)}finally{Mo=!1,($n!==null||Ln!==null)&&(Mc(),Nc())}}function xr(e,t){var n=e.stateNode;if(n===null)return null;var r=ao(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var Ss=!1;if(vt)try{var Gn={};Object.defineProperty(Gn,"passive",{get:function(){Ss=!0}}),window.addEventListener("test",Gn,Gn),window.removeEventListener("test",Gn,Gn)}catch{Ss=!1}function Sp(e,t,n,r,i,o,s,l,u){var a=Array.prototype.slice.call(arguments,3);try{t.apply(n,a)}catch(c){this.onError(c)}}var hr=!1,Pi=null,$i=!1,_s=null,_p={onError:function(e){hr=!0,Pi=e}};function Ep(e,t,n,r,i,o,s,l,u){hr=!1,Pi=null,Sp.apply(_p,arguments)}function Cp(e,t,n,r,i,o,s,l,u){if(Ep.apply(this,arguments),hr){if(hr){var a=Pi;hr=!1,Pi=null}else throw Error(E(198));$i||($i=!0,_s=a)}}function pn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Pc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ju(e){if(pn(e)!==e)throw Error(E(188))}function xp(e){var t=e.alternate;if(!t){if(t=pn(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ju(i),e;if(o===r)return ju(i),t;o=o.sibling}throw Error(E(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(E(189))}}if(n.alternate!==r)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function $c(e){return e=xp(e),e!==null?Lc(e):null}function Lc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Lc(e);if(t!==null)return t;e=e.sibling}return null}var Ic=ze.unstable_scheduleCallback,zu=ze.unstable_cancelCallback,Rp=ze.unstable_shouldYield,Tp=ze.unstable_requestPaint,te=ze.unstable_now,Np=ze.unstable_getCurrentPriorityLevel,Al=ze.unstable_ImmediatePriority,jc=ze.unstable_UserBlockingPriority,Li=ze.unstable_NormalPriority,Op=ze.unstable_LowPriority,zc=ze.unstable_IdlePriority,oo=null,ut=null;function Mp(e){if(ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(oo,e,void 0,(e.current.flags&128)===128)}catch{}}var Ge=Math.clz32?Math.clz32:$p,Ap=Math.log,Pp=Math.LN2;function $p(e){return e>>>=0,e===0?32:31-(Ap(e)/Pp|0)|0}var Gr=64,ei=4194304;function ar(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ii(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=ar(l):(o&=s,o!==0&&(r=ar(o)))}else s=n&~i,s!==0?r=ar(s):o!==0&&(r=ar(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ge(t),i=1<<n,r|=e[n],t&=~i;return r}function Lp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ip(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Ge(o),l=1<<s,u=i[s];u===-1?(!(l&n)||l&r)&&(i[s]=Lp(l,t)):u<=t&&(e.expiredLanes|=l),o&=~l}}function Es(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Fc(){var e=Gr;return Gr<<=1,!(Gr&4194240)&&(Gr=64),e}function Ao(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ur(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ge(t),e[t]=n}function jp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ge(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Pl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var B=0;function Dc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Bc,$l,Uc,Kc,Vc,Cs=!1,ti=[],Mt=null,At=null,Pt=null,Rr=new Map,Tr=new Map,Rt=[],zp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Fu(e,t){switch(e){case"focusin":case"focusout":Mt=null;break;case"dragenter":case"dragleave":At=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Rr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tr.delete(t.pointerId)}}function er(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Vr(t),t!==null&&$l(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fp(e,t,n,r,i){switch(t){case"focusin":return Mt=er(Mt,e,t,n,r,i),!0;case"dragenter":return At=er(At,e,t,n,r,i),!0;case"mouseover":return Pt=er(Pt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Rr.set(o,er(Rr.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Tr.set(o,er(Tr.get(o)||null,e,t,n,r,i)),!0}return!1}function bc(e){var t=Xt(e.target);if(t!==null){var n=pn(t);if(n!==null){if(t=n.tag,t===13){if(t=Pc(n),t!==null){e.blockedOn=t,Vc(e.priority,function(){Uc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ws=r,n.target.dispatchEvent(r),ws=null}else return t=Vr(n),t!==null&&$l(t),e.blockedOn=n,!1;t.shift()}return!0}function Du(e,t,n){mi(e)&&n.delete(t)}function Dp(){Cs=!1,Mt!==null&&mi(Mt)&&(Mt=null),At!==null&&mi(At)&&(At=null),Pt!==null&&mi(Pt)&&(Pt=null),Rr.forEach(Du),Tr.forEach(Du)}function tr(e,t){e.blockedOn===t&&(e.blockedOn=null,Cs||(Cs=!0,ze.unstable_scheduleCallback(ze.unstable_NormalPriority,Dp)))}function Nr(e){function t(i){return tr(i,e)}if(0<ti.length){tr(ti[0],e);for(var n=1;n<ti.length;n++){var r=ti[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Mt!==null&&tr(Mt,e),At!==null&&tr(At,e),Pt!==null&&tr(Pt,e),Rr.forEach(t),Tr.forEach(t),n=0;n<Rt.length;n++)r=Rt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&(n=Rt[0],n.blockedOn===null);)bc(n),n.blockedOn===null&&Rt.shift()}var In=_t.ReactCurrentBatchConfig,ji=!0;function Bp(e,t,n,r){var i=B,o=In.transition;In.transition=null;try{B=1,Ll(e,t,n,r)}finally{B=i,In.transition=o}}function Up(e,t,n,r){var i=B,o=In.transition;In.transition=null;try{B=4,Ll(e,t,n,r)}finally{B=i,In.transition=o}}function Ll(e,t,n,r){if(ji){var i=xs(e,t,n,r);if(i===null)Uo(e,t,r,zi,n),Fu(e,r);else if(Fp(i,e,t,n,r))r.stopPropagation();else if(Fu(e,r),t&4&&-1<zp.indexOf(e)){for(;i!==null;){var o=Vr(i);if(o!==null&&Bc(o),o=xs(e,t,n,r),o===null&&Uo(e,t,r,zi,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Uo(e,t,r,null,n)}}var zi=null;function xs(e,t,n,r){if(zi=null,e=Ml(r),e=Xt(e),e!==null)if(t=pn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Pc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return zi=e,null}function Wc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Np()){case Al:return 1;case jc:return 4;case Li:case Op:return 16;case zc:return 536870912;default:return 16}default:return 16}}var Nt=null,Il=null,gi=null;function Hc(){if(gi)return gi;var e,t=Il,n=t.length,r,i="value"in Nt?Nt.value:Nt.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return gi=i.slice(e,1<r?1-r:void 0)}function vi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ni(){return!0}function Bu(){return!1}function De(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ni:Bu,this.isPropagationStopped=Bu,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ni)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ni)},persist:function(){},isPersistent:ni}),t}var Yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jl=De(Yn),Kr=G({},Yn,{view:0,detail:0}),Kp=De(Kr),Po,$o,nr,so=G({},Kr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nr&&(nr&&e.type==="mousemove"?(Po=e.screenX-nr.screenX,$o=e.screenY-nr.screenY):$o=Po=0,nr=e),Po)},movementY:function(e){return"movementY"in e?e.movementY:$o}}),Uu=De(so),Vp=G({},so,{dataTransfer:0}),bp=De(Vp),Wp=G({},Kr,{relatedTarget:0}),Lo=De(Wp),Hp=G({},Yn,{animationName:0,elapsedTime:0,pseudoElement:0}),Jp=De(Hp),Qp=G({},Yn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yp=De(Qp),qp=G({},Yn,{data:0}),Ku=De(qp),Xp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zp={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Gp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ey(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gp[e])?!!t[e]:!1}function zl(){return ey}var ty=G({},Kr,{key:function(e){if(e.key){var t=Xp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zl,charCode:function(e){return e.type==="keypress"?vi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ny=De(ty),ry=G({},so,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vu=De(ry),iy=G({},Kr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zl}),oy=De(iy),sy=G({},Yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),ly=De(sy),uy=G({},so,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ay=De(uy),cy=[9,13,27,32],Fl=vt&&"CompositionEvent"in window,pr=null;vt&&"documentMode"in document&&(pr=document.documentMode);var fy=vt&&"TextEvent"in window&&!pr,Jc=vt&&(!Fl||pr&&8<pr&&11>=pr),bu=" ",Wu=!1;function Qc(e,t){switch(e){case"keyup":return cy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _n=!1;function dy(e,t){switch(e){case"compositionend":return Yc(t);case"keypress":return t.which!==32?null:(Wu=!0,bu);case"textInput":return e=t.data,e===bu&&Wu?null:e;default:return null}}function hy(e,t){if(_n)return e==="compositionend"||!Fl&&Qc(e,t)?(e=Hc(),gi=Il=Nt=null,_n=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Jc&&t.locale!=="ko"?null:t.data;default:return null}}var py={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!py[e.type]:t==="textarea"}function qc(e,t,n,r){Tc(r),t=Fi(t,"onChange"),0<t.length&&(n=new jl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var yr=null,Or=null;function yy(e){uf(e,0)}function lo(e){var t=xn(e);if(kc(t))return e}function my(e,t){if(e==="change")return t}var Xc=!1;if(vt){var Io;if(vt){var jo="oninput"in document;if(!jo){var Ju=document.createElement("div");Ju.setAttribute("oninput","return;"),jo=typeof Ju.oninput=="function"}Io=jo}else Io=!1;Xc=Io&&(!document.documentMode||9<document.documentMode)}function Qu(){yr&&(yr.detachEvent("onpropertychange",Zc),Or=yr=null)}function Zc(e){if(e.propertyName==="value"&&lo(Or)){var t=[];qc(t,Or,e,Ml(e)),Ac(yy,t)}}function gy(e,t,n){e==="focusin"?(Qu(),yr=t,Or=n,yr.attachEvent("onpropertychange",Zc)):e==="focusout"&&Qu()}function vy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lo(Or)}function wy(e,t){if(e==="click")return lo(t)}function ky(e,t){if(e==="input"||e==="change")return lo(t)}function Sy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tt=typeof Object.is=="function"?Object.is:Sy;function Mr(e,t){if(tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ls.call(t,i)||!tt(e[i],t[i]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qu(e,t){var n=Yu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yu(n)}}function Gc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ef(){for(var e=window,t=Ai();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ai(e.document)}return t}function Dl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _y(e){var t=ef(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gc(n.ownerDocument.documentElement,n)){if(r!==null&&Dl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=qu(n,o);var s=qu(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ey=vt&&"documentMode"in document&&11>=document.documentMode,En=null,Rs=null,mr=null,Ts=!1;function Xu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ts||En==null||En!==Ai(r)||(r=En,"selectionStart"in r&&Dl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mr&&Mr(mr,r)||(mr=r,r=Fi(Rs,"onSelect"),0<r.length&&(t=new jl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=En)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Cn={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionend:ri("Transition","TransitionEnd")},zo={},tf={};vt&&(tf=document.createElement("div").style,"AnimationEvent"in window||(delete Cn.animationend.animation,delete Cn.animationiteration.animation,delete Cn.animationstart.animation),"TransitionEvent"in window||delete Cn.transitionend.transition);function uo(e){if(zo[e])return zo[e];if(!Cn[e])return e;var t=Cn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in tf)return zo[e]=t[n];return e}var nf=uo("animationend"),rf=uo("animationiteration"),of=uo("animationstart"),sf=uo("transitionend"),lf=new Map,Zu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function bt(e,t){lf.set(e,t),hn(t,[e])}for(var Fo=0;Fo<Zu.length;Fo++){var Do=Zu[Fo],Cy=Do.toLowerCase(),xy=Do[0].toUpperCase()+Do.slice(1);bt(Cy,"on"+xy)}bt(nf,"onAnimationEnd");bt(rf,"onAnimationIteration");bt(of,"onAnimationStart");bt("dblclick","onDoubleClick");bt("focusin","onFocus");bt("focusout","onBlur");bt(sf,"onTransitionEnd");Un("onMouseEnter",["mouseout","mouseover"]);Un("onMouseLeave",["mouseout","mouseover"]);Un("onPointerEnter",["pointerout","pointerover"]);Un("onPointerLeave",["pointerout","pointerover"]);hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hn("onBeforeInput",["compositionend","keypress","textInput","paste"]);hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ry=new Set("cancel close invalid load scroll toggle".split(" ").concat(cr));function Gu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Cp(r,t,void 0,e),e.currentTarget=null}function uf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],u=l.instance,a=l.currentTarget;if(l=l.listener,u!==o&&i.isPropagationStopped())break e;Gu(i,l,a),o=u}else for(s=0;s<r.length;s++){if(l=r[s],u=l.instance,a=l.currentTarget,l=l.listener,u!==o&&i.isPropagationStopped())break e;Gu(i,l,a),o=u}}}if($i)throw e=_s,$i=!1,_s=null,e}function b(e,t){var n=t[Ps];n===void 0&&(n=t[Ps]=new Set);var r=e+"__bubble";n.has(r)||(af(t,e,2,!1),n.add(r))}function Bo(e,t,n){var r=0;t&&(r|=4),af(n,e,r,t)}var ii="_reactListening"+Math.random().toString(36).slice(2);function Ar(e){if(!e[ii]){e[ii]=!0,yc.forEach(function(n){n!=="selectionchange"&&(Ry.has(n)||Bo(n,!1,e),Bo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ii]||(t[ii]=!0,Bo("selectionchange",!1,t))}}function af(e,t,n,r){switch(Wc(t)){case 1:var i=Bp;break;case 4:i=Up;break;default:i=Ll}n=i.bind(null,t,n,e),i=void 0,!Ss||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Uo(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;l!==null;){if(s=Xt(l),s===null)return;if(u=s.tag,u===5||u===6){r=o=s;continue e}l=l.parentNode}}r=r.return}Ac(function(){var a=o,c=Ml(n),p=[];e:{var d=lf.get(e);if(d!==void 0){var m=jl,w=e;switch(e){case"keypress":if(vi(n)===0)break e;case"keydown":case"keyup":m=ny;break;case"focusin":w="focus",m=Lo;break;case"focusout":w="blur",m=Lo;break;case"beforeblur":case"afterblur":m=Lo;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Uu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=bp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=oy;break;case nf:case rf:case of:m=Jp;break;case sf:m=ly;break;case"scroll":m=Kp;break;case"wheel":m=ay;break;case"copy":case"cut":case"paste":m=Yp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Vu}var S=(t&4)!==0,R=!S&&e==="scroll",h=S?d!==null?d+"Capture":null:d;S=[];for(var f=a,y;f!==null;){y=f;var k=y.stateNode;if(y.tag===5&&k!==null&&(y=k,h!==null&&(k=xr(f,h),k!=null&&S.push(Pr(f,k,y)))),R)break;f=f.return}0<S.length&&(d=new m(d,w,null,n,c),p.push({event:d,listeners:S}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",d&&n!==ws&&(w=n.relatedTarget||n.fromElement)&&(Xt(w)||w[wt]))break e;if((m||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,m?(w=n.relatedTarget||n.toElement,m=a,w=w?Xt(w):null,w!==null&&(R=pn(w),w!==R||w.tag!==5&&w.tag!==6)&&(w=null)):(m=null,w=a),m!==w)){if(S=Uu,k="onMouseLeave",h="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(S=Vu,k="onPointerLeave",h="onPointerEnter",f="pointer"),R=m==null?d:xn(m),y=w==null?d:xn(w),d=new S(k,f+"leave",m,n,c),d.target=R,d.relatedTarget=y,k=null,Xt(c)===a&&(S=new S(h,f+"enter",w,n,c),S.target=y,S.relatedTarget=R,k=S),R=k,m&&w)t:{for(S=m,h=w,f=0,y=S;y;y=mn(y))f++;for(y=0,k=h;k;k=mn(k))y++;for(;0<f-y;)S=mn(S),f--;for(;0<y-f;)h=mn(h),y--;for(;f--;){if(S===h||h!==null&&S===h.alternate)break t;S=mn(S),h=mn(h)}S=null}else S=null;m!==null&&ea(p,d,m,S,!1),w!==null&&R!==null&&ea(p,R,w,S,!0)}}e:{if(d=a?xn(a):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var T=my;else if(Hu(d))if(Xc)T=ky;else{T=vy;var g=gy}else(m=d.nodeName)&&m.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=wy);if(T&&(T=T(e,a))){qc(p,T,n,c);break e}g&&g(e,d,a),e==="focusout"&&(g=d._wrapperState)&&g.controlled&&d.type==="number"&&ps(d,"number",d.value)}switch(g=a?xn(a):window,e){case"focusin":(Hu(g)||g.contentEditable==="true")&&(En=g,Rs=a,mr=null);break;case"focusout":mr=Rs=En=null;break;case"mousedown":Ts=!0;break;case"contextmenu":case"mouseup":case"dragend":Ts=!1,Xu(p,n,c);break;case"selectionchange":if(Ey)break;case"keydown":case"keyup":Xu(p,n,c)}var v;if(Fl)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else _n?Qc(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Jc&&n.locale!=="ko"&&(_n||_!=="onCompositionStart"?_==="onCompositionEnd"&&_n&&(v=Hc()):(Nt=c,Il="value"in Nt?Nt.value:Nt.textContent,_n=!0)),g=Fi(a,_),0<g.length&&(_=new Ku(_,e,null,n,c),p.push({event:_,listeners:g}),v?_.data=v:(v=Yc(n),v!==null&&(_.data=v)))),(v=fy?dy(e,n):hy(e,n))&&(a=Fi(a,"onBeforeInput"),0<a.length&&(c=new Ku("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:a}),c.data=v))}uf(p,t)})}function Pr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fi(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=xr(e,n),o!=null&&r.unshift(Pr(e,o,i)),o=xr(e,t),o!=null&&r.push(Pr(e,o,i))),e=e.return}return r}function mn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ea(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,u=l.alternate,a=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&a!==null&&(l=a,i?(u=xr(n,o),u!=null&&s.unshift(Pr(n,u,l))):i||(u=xr(n,o),u!=null&&s.push(Pr(n,u,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Ty=/\r\n?/g,Ny=/\u0000|\uFFFD/g;function ta(e){return(typeof e=="string"?e:""+e).replace(Ty,`
|
|
44
|
+
`).replace(Ny,"")}function oi(e,t,n){if(t=ta(t),ta(e)!==t&&n)throw Error(E(425))}function Di(){}var Ns=null,Os=null;function Ms(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var As=typeof setTimeout=="function"?setTimeout:void 0,Oy=typeof clearTimeout=="function"?clearTimeout:void 0,na=typeof Promise=="function"?Promise:void 0,My=typeof queueMicrotask=="function"?queueMicrotask:typeof na<"u"?function(e){return na.resolve(null).then(e).catch(Ay)}:As;function Ay(e){setTimeout(function(){throw e})}function Ko(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Nr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Nr(t)}function $t(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ra(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qn=Math.random().toString(36).slice(2),st="__reactFiber$"+qn,$r="__reactProps$"+qn,wt="__reactContainer$"+qn,Ps="__reactEvents$"+qn,Py="__reactListeners$"+qn,$y="__reactHandles$"+qn;function Xt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ra(e);e!==null;){if(n=e[st])return n;e=ra(e)}return t}e=n,n=e.parentNode}return null}function Vr(e){return e=e[st]||e[wt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function xn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function ao(e){return e[$r]||null}var $s=[],Rn=-1;function Wt(e){return{current:e}}function W(e){0>Rn||(e.current=$s[Rn],$s[Rn]=null,Rn--)}function V(e,t){Rn++,$s[Rn]=e.current,e.current=t}var Ut={},ve=Wt(Ut),Me=Wt(!1),ln=Ut;function Kn(e,t){var n=e.type.contextTypes;if(!n)return Ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ae(e){return e=e.childContextTypes,e!=null}function Bi(){W(Me),W(ve)}function ia(e,t,n){if(ve.current!==Ut)throw Error(E(168));V(ve,t),V(Me,n)}function cf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(E(108,gp(e)||"Unknown",i));return G({},n,r)}function Ui(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,ln=ve.current,V(ve,e),V(Me,Me.current),!0}function oa(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=cf(e,t,ln),r.__reactInternalMemoizedMergedChildContext=e,W(Me),W(ve),V(ve,e)):W(Me),V(Me,n)}var ht=null,co=!1,Vo=!1;function ff(e){ht===null?ht=[e]:ht.push(e)}function Ly(e){co=!0,ff(e)}function Ht(){if(!Vo&&ht!==null){Vo=!0;var e=0,t=B;try{var n=ht;for(B=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ht=null,co=!1}catch(i){throw ht!==null&&(ht=ht.slice(e+1)),Ic(Al,Ht),i}finally{B=t,Vo=!1}}return null}var Tn=[],Nn=0,Ki=null,Vi=0,Be=[],Ue=0,un=null,yt=1,mt="";function Yt(e,t){Tn[Nn++]=Vi,Tn[Nn++]=Ki,Ki=e,Vi=t}function df(e,t,n){Be[Ue++]=yt,Be[Ue++]=mt,Be[Ue++]=un,un=e;var r=yt;e=mt;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var o=32-Ge(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,yt=1<<32-Ge(t)+i|n<<i|r,mt=o+e}else yt=1<<o|n<<i|r,mt=e}function Bl(e){e.return!==null&&(Yt(e,1),df(e,1,0))}function Ul(e){for(;e===Ki;)Ki=Tn[--Nn],Tn[Nn]=null,Vi=Tn[--Nn],Tn[Nn]=null;for(;e===un;)un=Be[--Ue],Be[Ue]=null,mt=Be[--Ue],Be[Ue]=null,yt=Be[--Ue],Be[Ue]=null}var Ie=null,Le=null,J=!1,Ze=null;function hf(e,t){var n=Ve(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ie=e,Le=$t(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ie=e,Le=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=un!==null?{id:yt,overflow:mt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ve(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ie=e,Le=null,!0):!1;default:return!1}}function Ls(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Is(e){if(J){var t=Le;if(t){var n=t;if(!sa(e,t)){if(Ls(e))throw Error(E(418));t=$t(n.nextSibling);var r=Ie;t&&sa(e,t)?hf(r,n):(e.flags=e.flags&-4097|2,J=!1,Ie=e)}}else{if(Ls(e))throw Error(E(418));e.flags=e.flags&-4097|2,J=!1,Ie=e}}}function la(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ie=e}function si(e){if(e!==Ie)return!1;if(!J)return la(e),J=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ms(e.type,e.memoizedProps)),t&&(t=Le)){if(Ls(e))throw pf(),Error(E(418));for(;t;)hf(e,t),t=$t(t.nextSibling)}if(la(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Le=$t(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Le=null}}else Le=Ie?$t(e.stateNode.nextSibling):null;return!0}function pf(){for(var e=Le;e;)e=$t(e.nextSibling)}function Vn(){Le=Ie=null,J=!1}function Kl(e){Ze===null?Ze=[e]:Ze.push(e)}var Iy=_t.ReactCurrentBatchConfig;function rr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(E(309));var r=n.stateNode}if(!r)throw Error(E(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function li(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ua(e){var t=e._init;return t(e._payload)}function yf(e){function t(h,f){if(e){var y=h.deletions;y===null?(h.deletions=[f],h.flags|=16):y.push(f)}}function n(h,f){if(!e)return null;for(;f!==null;)t(h,f),f=f.sibling;return null}function r(h,f){for(h=new Map;f!==null;)f.key!==null?h.set(f.key,f):h.set(f.index,f),f=f.sibling;return h}function i(h,f){return h=zt(h,f),h.index=0,h.sibling=null,h}function o(h,f,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<f?(h.flags|=2,f):y):(h.flags|=2,f)):(h.flags|=1048576,f)}function s(h){return e&&h.alternate===null&&(h.flags|=2),h}function l(h,f,y,k){return f===null||f.tag!==6?(f=qo(y,h.mode,k),f.return=h,f):(f=i(f,y),f.return=h,f)}function u(h,f,y,k){var T=y.type;return T===Sn?c(h,f,y.props.children,k,y.key):f!==null&&(f.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ct&&ua(T)===f.type)?(k=i(f,y.props),k.ref=rr(h,f,y),k.return=h,k):(k=xi(y.type,y.key,y.props,null,h.mode,k),k.ref=rr(h,f,y),k.return=h,k)}function a(h,f,y,k){return f===null||f.tag!==4||f.stateNode.containerInfo!==y.containerInfo||f.stateNode.implementation!==y.implementation?(f=Xo(y,h.mode,k),f.return=h,f):(f=i(f,y.children||[]),f.return=h,f)}function c(h,f,y,k,T){return f===null||f.tag!==7?(f=tn(y,h.mode,k,T),f.return=h,f):(f=i(f,y),f.return=h,f)}function p(h,f,y){if(typeof f=="string"&&f!==""||typeof f=="number")return f=qo(""+f,h.mode,y),f.return=h,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case qr:return y=xi(f.type,f.key,f.props,null,h.mode,y),y.ref=rr(h,null,f),y.return=h,y;case kn:return f=Xo(f,h.mode,y),f.return=h,f;case Ct:var k=f._init;return p(h,k(f._payload),y)}if(ur(f)||Zn(f))return f=tn(f,h.mode,y,null),f.return=h,f;li(h,f)}return null}function d(h,f,y,k){var T=f!==null?f.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return T!==null?null:l(h,f,""+y,k);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case qr:return y.key===T?u(h,f,y,k):null;case kn:return y.key===T?a(h,f,y,k):null;case Ct:return T=y._init,d(h,f,T(y._payload),k)}if(ur(y)||Zn(y))return T!==null?null:c(h,f,y,k,null);li(h,y)}return null}function m(h,f,y,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return h=h.get(y)||null,l(f,h,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case qr:return h=h.get(k.key===null?y:k.key)||null,u(f,h,k,T);case kn:return h=h.get(k.key===null?y:k.key)||null,a(f,h,k,T);case Ct:var g=k._init;return m(h,f,y,g(k._payload),T)}if(ur(k)||Zn(k))return h=h.get(y)||null,c(f,h,k,T,null);li(f,k)}return null}function w(h,f,y,k){for(var T=null,g=null,v=f,_=f=0,M=null;v!==null&&_<y.length;_++){v.index>_?(M=v,v=null):M=v.sibling;var x=d(h,v,y[_],k);if(x===null){v===null&&(v=M);break}e&&v&&x.alternate===null&&t(h,v),f=o(x,f,_),g===null?T=x:g.sibling=x,g=x,v=M}if(_===y.length)return n(h,v),J&&Yt(h,_),T;if(v===null){for(;_<y.length;_++)v=p(h,y[_],k),v!==null&&(f=o(v,f,_),g===null?T=v:g.sibling=v,g=v);return J&&Yt(h,_),T}for(v=r(h,v);_<y.length;_++)M=m(v,h,_,y[_],k),M!==null&&(e&&M.alternate!==null&&v.delete(M.key===null?_:M.key),f=o(M,f,_),g===null?T=M:g.sibling=M,g=M);return e&&v.forEach(function(A){return t(h,A)}),J&&Yt(h,_),T}function S(h,f,y,k){var T=Zn(y);if(typeof T!="function")throw Error(E(150));if(y=T.call(y),y==null)throw Error(E(151));for(var g=T=null,v=f,_=f=0,M=null,x=y.next();v!==null&&!x.done;_++,x=y.next()){v.index>_?(M=v,v=null):M=v.sibling;var A=d(h,v,x.value,k);if(A===null){v===null&&(v=M);break}e&&v&&A.alternate===null&&t(h,v),f=o(A,f,_),g===null?T=A:g.sibling=A,g=A,v=M}if(x.done)return n(h,v),J&&Yt(h,_),T;if(v===null){for(;!x.done;_++,x=y.next())x=p(h,x.value,k),x!==null&&(f=o(x,f,_),g===null?T=x:g.sibling=x,g=x);return J&&Yt(h,_),T}for(v=r(h,v);!x.done;_++,x=y.next())x=m(v,h,_,x.value,k),x!==null&&(e&&x.alternate!==null&&v.delete(x.key===null?_:x.key),f=o(x,f,_),g===null?T=x:g.sibling=x,g=x);return e&&v.forEach(function(I){return t(h,I)}),J&&Yt(h,_),T}function R(h,f,y,k){if(typeof y=="object"&&y!==null&&y.type===Sn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case qr:e:{for(var T=y.key,g=f;g!==null;){if(g.key===T){if(T=y.type,T===Sn){if(g.tag===7){n(h,g.sibling),f=i(g,y.props.children),f.return=h,h=f;break e}}else if(g.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ct&&ua(T)===g.type){n(h,g.sibling),f=i(g,y.props),f.ref=rr(h,g,y),f.return=h,h=f;break e}n(h,g);break}else t(h,g);g=g.sibling}y.type===Sn?(f=tn(y.props.children,h.mode,k,y.key),f.return=h,h=f):(k=xi(y.type,y.key,y.props,null,h.mode,k),k.ref=rr(h,f,y),k.return=h,h=k)}return s(h);case kn:e:{for(g=y.key;f!==null;){if(f.key===g)if(f.tag===4&&f.stateNode.containerInfo===y.containerInfo&&f.stateNode.implementation===y.implementation){n(h,f.sibling),f=i(f,y.children||[]),f.return=h,h=f;break e}else{n(h,f);break}else t(h,f);f=f.sibling}f=Xo(y,h.mode,k),f.return=h,h=f}return s(h);case Ct:return g=y._init,R(h,f,g(y._payload),k)}if(ur(y))return w(h,f,y,k);if(Zn(y))return S(h,f,y,k);li(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,f!==null&&f.tag===6?(n(h,f.sibling),f=i(f,y),f.return=h,h=f):(n(h,f),f=qo(y,h.mode,k),f.return=h,h=f),s(h)):n(h,f)}return R}var bn=yf(!0),mf=yf(!1),bi=Wt(null),Wi=null,On=null,Vl=null;function bl(){Vl=On=Wi=null}function Wl(e){var t=bi.current;W(bi),e._currentValue=t}function js(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jn(e,t){Wi=e,Vl=On=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ne=!0),e.firstContext=null)}function We(e){var t=e._currentValue;if(Vl!==e)if(e={context:e,memoizedValue:t,next:null},On===null){if(Wi===null)throw Error(E(308));On=e,Wi.dependencies={lanes:0,firstContext:e}}else On=On.next=e;return t}var Zt=null;function Hl(e){Zt===null?Zt=[e]:Zt.push(e)}function gf(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Hl(t)):(n.next=i.next,i.next=n),t.interleaved=n,kt(e,r)}function kt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var xt=!1;function Jl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Lt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,F&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,kt(e,n)}return i=r.interleaved,i===null?(t.next=t,Hl(r)):(t.next=i.next,i.next=t),r.interleaved=t,kt(e,n)}function wi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Pl(e,n)}}function aa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hi(e,t,n,r){var i=e.updateQueue;xt=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,a=u.next;u.next=null,s===null?o=a:s.next=a,s=u;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=a:l.next=a,c.lastBaseUpdate=u))}if(o!==null){var p=i.baseState;s=0,c=a=u=null,l=o;do{var d=l.lane,m=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var w=e,S=l;switch(d=t,m=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){p=w.call(m,p,d);break e}p=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,d=typeof w=="function"?w.call(m,p,d):w,d==null)break e;p=G({},p,d);break e;case 2:xt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else m={eventTime:m,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(a=c=m,u=p):c=c.next=m,s|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(u=p),i.baseState=u,i.firstBaseUpdate=a,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);cn|=s,e.lanes=s,e.memoizedState=p}}function ca(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(E(191,i));i.call(r)}}}var br={},at=Wt(br),Lr=Wt(br),Ir=Wt(br);function Gt(e){if(e===br)throw Error(E(174));return e}function Ql(e,t){switch(V(Ir,t),V(Lr,e),V(at,br),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ms(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ms(t,e)}W(at),V(at,t)}function Wn(){W(at),W(Lr),W(Ir)}function wf(e){Gt(Ir.current);var t=Gt(at.current),n=ms(t,e.type);t!==n&&(V(Lr,e),V(at,n))}function Yl(e){Lr.current===e&&(W(at),W(Lr))}var q=Wt(0);function Ji(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bo=[];function ql(){for(var e=0;e<bo.length;e++)bo[e]._workInProgressVersionPrimary=null;bo.length=0}var ki=_t.ReactCurrentDispatcher,Wo=_t.ReactCurrentBatchConfig,an=0,Z=null,ie=null,ue=null,Qi=!1,gr=!1,jr=0,jy=0;function pe(){throw Error(E(321))}function Xl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tt(e[n],t[n]))return!1;return!0}function Zl(e,t,n,r,i,o){if(an=o,Z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ki.current=e===null||e.memoizedState===null?By:Uy,e=n(r,i),gr){o=0;do{if(gr=!1,jr=0,25<=o)throw Error(E(301));o+=1,ue=ie=null,t.updateQueue=null,ki.current=Ky,e=n(r,i)}while(gr)}if(ki.current=Yi,t=ie!==null&&ie.next!==null,an=0,ue=ie=Z=null,Qi=!1,t)throw Error(E(300));return e}function Gl(){var e=jr!==0;return jr=0,e}function ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ue===null?Z.memoizedState=ue=e:ue=ue.next=e,ue}function He(){if(ie===null){var e=Z.alternate;e=e!==null?e.memoizedState:null}else e=ie.next;var t=ue===null?Z.memoizedState:ue.next;if(t!==null)ue=t,ie=e;else{if(e===null)throw Error(E(310));ie=e,e={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},ue===null?Z.memoizedState=ue=e:ue=ue.next=e}return ue}function zr(e,t){return typeof t=="function"?t(e):t}function Ho(e){var t=He(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=ie,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,u=null,a=o;do{var c=a.lane;if((an&c)===c)u!==null&&(u=u.next={lane:0,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null}),r=a.hasEagerState?a.eagerState:e(r,a.action);else{var p={lane:c,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};u===null?(l=u=p,s=r):u=u.next=p,Z.lanes|=c,cn|=c}a=a.next}while(a!==null&&a!==o);u===null?s=r:u.next=l,tt(r,t.memoizedState)||(Ne=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Z.lanes|=o,cn|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Jo(e){var t=He(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);tt(o,t.memoizedState)||(Ne=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function kf(){}function Sf(e,t){var n=Z,r=He(),i=t(),o=!tt(r.memoizedState,i);if(o&&(r.memoizedState=i,Ne=!0),r=r.queue,eu(Cf.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ue!==null&&ue.memoizedState.tag&1){if(n.flags|=2048,Fr(9,Ef.bind(null,n,r,i,t),void 0,null),ae===null)throw Error(E(349));an&30||_f(n,t,i)}return i}function _f(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Z.updateQueue,t===null?(t={lastEffect:null,stores:null},Z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ef(e,t,n,r){t.value=n,t.getSnapshot=r,xf(t)&&Rf(e)}function Cf(e,t,n){return n(function(){xf(t)&&Rf(e)})}function xf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tt(e,n)}catch{return!0}}function Rf(e){var t=kt(e,1);t!==null&&et(t,e,1,-1)}function fa(e){var t=ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:e},t.queue=e,e=e.dispatch=Dy.bind(null,Z,e),[t.memoizedState,e]}function Fr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Z.updateQueue,t===null?(t={lastEffect:null,stores:null},Z.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Tf(){return He().memoizedState}function Si(e,t,n,r){var i=ot();Z.flags|=e,i.memoizedState=Fr(1|t,n,void 0,r===void 0?null:r)}function fo(e,t,n,r){var i=He();r=r===void 0?null:r;var o=void 0;if(ie!==null){var s=ie.memoizedState;if(o=s.destroy,r!==null&&Xl(r,s.deps)){i.memoizedState=Fr(t,n,o,r);return}}Z.flags|=e,i.memoizedState=Fr(1|t,n,o,r)}function da(e,t){return Si(8390656,8,e,t)}function eu(e,t){return fo(2048,8,e,t)}function Nf(e,t){return fo(4,2,e,t)}function Of(e,t){return fo(4,4,e,t)}function Mf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Af(e,t,n){return n=n!=null?n.concat([e]):null,fo(4,4,Mf.bind(null,t,e),n)}function tu(){}function Pf(e,t){var n=He();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $f(e,t){var n=He();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Lf(e,t,n){return an&21?(tt(n,t)||(n=Fc(),Z.lanes|=n,cn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ne=!0),e.memoizedState=n)}function zy(e,t){var n=B;B=n!==0&&4>n?n:4,e(!0);var r=Wo.transition;Wo.transition={};try{e(!1),t()}finally{B=n,Wo.transition=r}}function If(){return He().memoizedState}function Fy(e,t,n){var r=jt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jf(e))zf(t,n);else if(n=gf(e,t,n,r),n!==null){var i=Se();et(n,e,r,i),Ff(n,t,r)}}function Dy(e,t,n){var r=jt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jf(e))zf(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,tt(l,s)){var u=t.interleaved;u===null?(i.next=i,Hl(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=gf(e,t,i,r),n!==null&&(i=Se(),et(n,e,r,i),Ff(n,t,r))}}function jf(e){var t=e.alternate;return e===Z||t!==null&&t===Z}function zf(e,t){gr=Qi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ff(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Pl(e,n)}}var Yi={readContext:We,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},By={readContext:We,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:da,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Si(4194308,4,Mf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Si(4194308,4,e,t)},useInsertionEffect:function(e,t){return Si(4,2,e,t)},useMemo:function(e,t){var n=ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ot();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Fy.bind(null,Z,e),[r.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:fa,useDebugValue:tu,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=fa(!1),t=e[0];return e=zy.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Z,i=ot();if(J){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),ae===null)throw Error(E(349));an&30||_f(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,da(Cf.bind(null,r,o,e),[e]),r.flags|=2048,Fr(9,Ef.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ot(),t=ae.identifierPrefix;if(J){var n=mt,r=yt;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=jy++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Uy={readContext:We,useCallback:Pf,useContext:We,useEffect:eu,useImperativeHandle:Af,useInsertionEffect:Nf,useLayoutEffect:Of,useMemo:$f,useReducer:Ho,useRef:Tf,useState:function(){return Ho(zr)},useDebugValue:tu,useDeferredValue:function(e){var t=He();return Lf(t,ie.memoizedState,e)},useTransition:function(){var e=Ho(zr)[0],t=He().memoizedState;return[e,t]},useMutableSource:kf,useSyncExternalStore:Sf,useId:If,unstable_isNewReconciler:!1},Ky={readContext:We,useCallback:Pf,useContext:We,useEffect:eu,useImperativeHandle:Af,useInsertionEffect:Nf,useLayoutEffect:Of,useMemo:$f,useReducer:Jo,useRef:Tf,useState:function(){return Jo(zr)},useDebugValue:tu,useDeferredValue:function(e){var t=He();return ie===null?t.memoizedState=e:Lf(t,ie.memoizedState,e)},useTransition:function(){var e=Jo(zr)[0],t=He().memoizedState;return[e,t]},useMutableSource:kf,useSyncExternalStore:Sf,useId:If,unstable_isNewReconciler:!1};function Ye(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ho={isMounted:function(e){return(e=e._reactInternals)?pn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Se(),i=jt(e),o=gt(r,i);o.payload=t,n!=null&&(o.callback=n),t=Lt(e,o,i),t!==null&&(et(t,e,i,r),wi(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Se(),i=jt(e),o=gt(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Lt(e,o,i),t!==null&&(et(t,e,i,r),wi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Se(),r=jt(e),i=gt(n,r);i.tag=2,t!=null&&(i.callback=t),t=Lt(e,i,r),t!==null&&(et(t,e,r,n),wi(t,e,r))}};function ha(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Mr(n,r)||!Mr(i,o):!0}function Df(e,t,n){var r=!1,i=Ut,o=t.contextType;return typeof o=="object"&&o!==null?o=We(o):(i=Ae(t)?ln:ve.current,r=t.contextTypes,o=(r=r!=null)?Kn(e,i):Ut),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ho,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function pa(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ho.enqueueReplaceState(t,t.state,null)}function Fs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Jl(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=We(o):(o=Ae(t)?ln:ve.current,i.context=Kn(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(zs(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ho.enqueueReplaceState(i,i.state,null),Hi(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Hn(e,t){try{var n="",r=t;do n+=mp(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
45
45
|
Error generating stack: `+o.message+`
|
|
46
|
-
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Qo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Fs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Yy=typeof WeakMap=="function"?WeakMap:Map;function Wf(e,t,n){n=gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zi||(Zi=!0,Qs=r),Fs(e,t)},n}function Hf(e,t,n){n=gt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Fs(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Fs(e,t),typeof r!="function"&&(It===null?It=new Set([this]):It.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ya(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yy;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=am.bind(null,e,t,n),t.then(e,e))}function ma(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ga(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=gt(-1,1),t.tag=2,Lt(n,t,1))),n.lanes|=1),e)}var qy=_t.ReactCurrentOwner,Ne=!1;function we(e,t,n,r){t.child=e===null?Sf(t,null,n,r):bn(t,e.child,n,r)}function va(e,t,n,r,i){n=n.render;var o=t.ref;return jn(t,i),r=Xl(e,t,n,r,o,i),n=Zl(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,St(e,t,i)):(J&&n&&Dl(t),t.flags|=1,we(e,t,r,i),t.child)}function wa(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!uu(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Jf(e,t,o,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Mr,n(s,r)&&e.ref===t.ref)return St(e,t,i)}return t.flags|=1,e=zt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Jf(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Mr(o,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,St(e,t,i)}return Ds(e,t,n,r,i)}function Qf(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},V(An,Pe),Pe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,V(An,Pe),Pe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,V(An,Pe),Pe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,V(An,Pe),Pe|=r;return we(e,t,i,n),t.child}function Yf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ds(e,t,n,r,i){var o=Ae(n)?sn:ve.current;return o=Kn(t,o),jn(t,i),n=Xl(e,t,n,r,o,i),r=Zl(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,St(e,t,i)):(J&&r&&Dl(t),t.flags|=1,we(e,t,n,i),t.child)}function ka(e,t,n,r,i){if(Ae(n)){var o=!0;Ki(t)}else o=!1;if(jn(t,i),t.stateNode===null)Ci(e,t),bf(t,n,r),zs(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var u=s.context,a=n.contextType;typeof a=="object"&&a!==null?a=We(a):(a=Ae(n)?sn:ve.current,a=Kn(t,a));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||u!==a)&&pa(t,s,r,a),xt=!1;var d=t.memoizedState;s.state=d,Ji(t,r,s,i),u=t.memoizedState,l!==r||d!==u||Me.current||xt?(typeof c=="function"&&(js(t,n,c,r),u=t.memoizedState),(l=xt||ha(t,n,l,r,d,u,a))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=a,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Ef(e,t),l=t.memoizedProps,a=t.type===t.elementType?l:Ye(t.type,l),s.props=a,p=t.pendingProps,d=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=We(u):(u=Ae(n)?sn:ve.current,u=Kn(t,u));var m=n.getDerivedStateFromProps;(c=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==p||d!==u)&&pa(t,s,r,u),xt=!1,d=t.memoizedState,s.state=d,Ji(t,r,s,i);var w=t.memoizedState;l!==p||d!==w||Me.current||xt?(typeof m=="function"&&(js(t,n,m,r),w=t.memoizedState),(a=xt||ha(t,n,a,r,d,w,u)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,w,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,w,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),s.props=r,s.state=w,s.context=u,r=a):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Bs(e,t,n,r,o,i)}function Bs(e,t,n,r,i,o){Yf(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&oa(t,n,!1),St(e,t,o);r=t.stateNode,qy.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=bn(t,e.child,null,o),t.child=bn(t,null,l,o)):we(e,t,l,o),t.memoizedState=r.state,i&&oa(t,n,!0),t.child}function qf(e){var t=e.stateNode;t.pendingContext?ia(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ia(e,t.context,!1),Jl(e,t.containerInfo)}function Sa(e,t,n,r,i){return Vn(),Ul(i),t.flags|=256,we(e,t,n,r),t.child}var Us={dehydrated:null,treeContext:null,retryLane:0};function Ks(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xf(e,t,n){var r=t.pendingProps,i=q.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),V(q,i&1),e===null)return Ls(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=go(s,r,0,null),e=en(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ks(n),t.memoizedState=Us,e):tu(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Xy(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=zt(i,u),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=zt(l,o):(o=en(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Ks(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Us,r}return o=e.child,e=o.sibling,r=zt(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function tu(e,t){return t=go({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ui(e,t,n,r){return r!==null&&Ul(r),bn(t,e.child,null,n),e=tu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xy(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Qo(Error(E(422))),ui(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=go({mode:"visible",children:r.children},i,0,null),o=en(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&bn(t,e.child,null,s),t.child.memoizedState=Ks(s),t.memoizedState=Us,o);if(!(t.mode&1))return ui(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(E(419)),r=Qo(o,r,void 0),ui(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ne||l){if(r=ae,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,kt(e,i),et(r,e,i,-1))}return lu(),r=Qo(Error(E(421))),ui(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=cm.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Le=Pt(i.nextSibling),Ie=t,J=!0,Ze=null,e!==null&&(Be[Ue++]=yt,Be[Ue++]=mt,Be[Ue++]=ln,yt=e.id,mt=e.overflow,ln=t),t=tu(t,r.children),t.flags|=4096,t)}function _a(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Is(e.return,t,n)}function Yo(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Zf(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(we(e,t,r.children,n),r=q.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_a(e,n,t);else if(e.tag===19)_a(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(V(q,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Qi(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Yo(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qi(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Yo(t,!0,n,null,o);break;case"together":Yo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ci(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function St(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),an|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=zt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Zy(e,t,n){switch(t.tag){case 3:qf(t),Vn();break;case 5:Cf(t);break;case 1:Ae(t.type)&&Ki(t);break;case 4:Jl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;V(Wi,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(V(q,q.current&1),t.flags|=128,null):n&t.child.childLanes?Xf(e,t,n):(V(q,q.current&1),e=St(e,t,n),e!==null?e.sibling:null);V(q,q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Zf(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(q,q.current),r)break;return null;case 22:case 23:return t.lanes=0,Qf(e,t,n)}return St(e,t,n)}var Gf,Vs,ed,td;Gf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Vs=function(){};ed=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Zt(at.current);var o=null;switch(n){case"input":i=fs(e,i),r=fs(e,r),o=[];break;case"select":i=G({},i,{value:void 0}),r=G({},r,{value:void 0}),o=[];break;case"textarea":i=ps(e,i),r=ps(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bi)}ms(n,r);var s;n=null;for(a in i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&i[a]!=null)if(a==="style"){var l=i[a];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Er.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var u=r[a];if(l=i!=null?i[a]:void 0,r.hasOwnProperty(a)&&u!==l&&(u!=null||l!=null))if(a==="style")if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(a,n)),n=u;else a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(o=o||[]).push(a,u)):a==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(a,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(Er.hasOwnProperty(a)?(u!=null&&a==="onScroll"&&b("scroll",e),o||l===u||(o=[])):(o=o||[]).push(a,u))}n&&(o=o||[]).push("style",n);var a=o;(t.updateQueue=a)&&(t.flags|=4)}};td=function(e,t,n,r){n!==r&&(t.flags|=4)};function ir(e,t){if(!J)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gy(e,t,n){var r=t.pendingProps;switch(Bl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ye(t),null;case 1:return Ae(t.type)&&Ui(),ye(t),null;case 3:return r=t.stateNode,Wn(),W(Me),W(ve),Yl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(si(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ze!==null&&(Xs(Ze),Ze=null))),Vs(e,t),ye(t),null;case 5:Ql(t);var i=Zt(Ir.current);if(n=t.type,e!==null&&t.stateNode!=null)ed(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return ye(t),null}if(e=Zt(at.current),si(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[st]=t,r[Pr]=o,e=(t.mode&1)!==0,n){case"dialog":b("cancel",r),b("close",r);break;case"iframe":case"object":case"embed":b("load",r);break;case"video":case"audio":for(i=0;i<cr.length;i++)b(cr[i],r);break;case"source":b("error",r);break;case"img":case"image":case"link":b("error",r),b("load",r);break;case"details":b("toggle",r);break;case"input":Au(r,o),b("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},b("invalid",r);break;case"textarea":Pu(r,o),b("invalid",r)}ms(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&oi(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&oi(r.textContent,l,e),i=["children",""+l]):Er.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&b("scroll",r)}switch(n){case"input":Xr(r),$u(r,o,!0);break;case"textarea":Xr(r),Lu(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Bi)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Nc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[st]=t,e[Pr]=r,Gf(e,t,!1,!1),t.stateNode=e;e:{switch(s=gs(n,r),n){case"dialog":b("cancel",e),b("close",e),i=r;break;case"iframe":case"object":case"embed":b("load",e),i=r;break;case"video":case"audio":for(i=0;i<cr.length;i++)b(cr[i],e);i=r;break;case"source":b("error",e),i=r;break;case"img":case"image":case"link":b("error",e),b("load",e),i=r;break;case"details":b("toggle",e),i=r;break;case"input":Au(e,r),i=fs(e,r),b("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=G({},r,{value:void 0}),b("invalid",e);break;case"textarea":Pu(e,r),i=ps(e,r),b("invalid",e);break;default:i=r}ms(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var u=l[o];o==="style"?Ac(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Oc(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Cr(e,u):typeof u=="number"&&Cr(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Er.hasOwnProperty(o)?u!=null&&o==="onScroll"&&b("scroll",e):u!=null&&xl(e,o,u,s))}switch(n){case"input":Xr(e),$u(e,r,!1);break;case"textarea":Xr(e),Lu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Dt(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?$n(e,!!r.multiple,o,!1):r.defaultValue!=null&&$n(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Bi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ye(t),null;case 6:if(e&&t.stateNode!=null)td(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(E(166));if(n=Zt(Ir.current),Zt(at.current),si(t)){if(r=t.stateNode,n=t.memoizedProps,r[st]=t,(o=r.nodeValue!==n)&&(e=Ie,e!==null))switch(e.tag){case 3:oi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&oi(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[st]=t,t.stateNode=r}return ye(t),null;case 13:if(W(q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(J&&Le!==null&&t.mode&1&&!(t.flags&128))wf(),Vn(),t.flags|=98560,o=!1;else if(o=si(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(E(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(E(317));o[st]=t}else Vn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ye(t),o=!1}else Ze!==null&&(Xs(Ze),Ze=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||q.current&1?se===0&&(se=3):lu())),t.updateQueue!==null&&(t.flags|=4),ye(t),null);case 4:return Wn(),Vs(e,t),e===null&&Ar(t.stateNode.containerInfo),ye(t),null;case 10:return bl(t.type._context),ye(t),null;case 17:return Ae(t.type)&&Ui(),ye(t),null;case 19:if(W(q),o=t.memoizedState,o===null)return ye(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)ir(o,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Qi(e),s!==null){for(t.flags|=128,ir(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return V(q,q.current&1|2),t.child}e=e.sibling}o.tail!==null&&te()>Jn&&(t.flags|=128,r=!0,ir(o,!1),t.lanes=4194304)}else{if(!r)if(e=Qi(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ir(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!J)return ye(t),null}else 2*te()-o.renderingStartTime>Jn&&n!==1073741824&&(t.flags|=128,r=!0,ir(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=te(),t.sibling=null,n=q.current,V(q,r?n&1|2:n&1),t):(ye(t),null);case 22:case 23:return su(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Pe&1073741824&&(ye(t),t.subtreeFlags&6&&(t.flags|=8192)):ye(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function em(e,t){switch(Bl(t),t.tag){case 1:return Ae(t.type)&&Ui(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),W(Me),W(ve),Yl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ql(t),null;case 13:if(W(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(q),null;case 4:return Wn(),null;case 10:return bl(t.type._context),null;case 22:case 23:return su(),null;case 24:return null;default:return null}}var ai=!1,me=!1,tm=typeof WeakSet=="function"?WeakSet:Set,O=null;function Mn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ee(e,t,r)}else n.current=null}function bs(e,t,n){try{n()}catch(r){ee(e,t,r)}}var Ea=!1;function nm(e,t){if(Ts=zi,e=sf(),Fl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,a=0,c=0,p=e,d=null;t:for(;;){for(var m;p!==n||i!==0&&p.nodeType!==3||(l=s+i),p!==o||r!==0&&p.nodeType!==3||(u=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(m=p.firstChild)!==null;)d=p,p=m;for(;;){if(p===e)break t;if(d===n&&++a===i&&(l=s),d===o&&++c===r&&(u=s),(m=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=m}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ns={focusedElem:e,selectionRange:n},zi=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,R=w.memoizedState,h=t.stateNode,f=h.getSnapshotBeforeUpdate(t.elementType===t.type?S:Ye(t.type,S),R);h.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(k){ee(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return w=Ea,Ea=!1,w}function vr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bs(t,n,o)}i=i.next}while(i!==r)}}function yo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ws(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function nd(e){var t=e.alternate;t!==null&&(e.alternate=null,nd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[st],delete t[Pr],delete t[As],delete t[Fy],delete t[Dy])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rd(e){return e.tag===5||e.tag===3||e.tag===4}function Ca(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Bi));else if(r!==4&&(e=e.child,e!==null))for(Hs(e,t,n),e=e.sibling;e!==null;)Hs(e,t,n),e=e.sibling}function Js(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Js(e,t,n),e=e.sibling;e!==null;)Js(e,t,n),e=e.sibling}var ce=null,qe=!1;function Et(e,t,n){for(n=n.child;n!==null;)id(e,t,n),n=n.sibling}function id(e,t,n){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(so,n)}catch{}switch(n.tag){case 5:me||Mn(n,t);case 6:var r=ce,i=qe;ce=null,Et(e,t,n),ce=r,qe=i,ce!==null&&(qe?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(qe?(e=ce,n=n.stateNode,e.nodeType===8?Ko(e.parentNode,n):e.nodeType===1&&Ko(e,n),Nr(e)):Ko(ce,n.stateNode));break;case 4:r=ce,i=qe,ce=n.stateNode.containerInfo,qe=!0,Et(e,t,n),ce=r,qe=i;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&bs(n,t,s),i=i.next}while(i!==r)}Et(e,t,n);break;case 1:if(!me&&(Mn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ee(n,t,l)}Et(e,t,n);break;case 21:Et(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,Et(e,t,n),me=r):Et(e,t,n);break;default:Et(e,t,n)}}function xa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tm),t.forEach(function(r){var i=fm.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Qe(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:ce=l.stateNode,qe=!1;break e;case 3:ce=l.stateNode.containerInfo,qe=!0;break e;case 4:ce=l.stateNode.containerInfo,qe=!0;break e}l=l.return}if(ce===null)throw Error(E(160));id(o,s,i),ce=null,qe=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(a){ee(i,t,a)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)od(t,e),t=t.sibling}function od(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qe(t,e),it(e),r&4){try{vr(3,e,e.return),yo(3,e)}catch(S){ee(e,e.return,S)}try{vr(5,e,e.return)}catch(S){ee(e,e.return,S)}}break;case 1:Qe(t,e),it(e),r&512&&n!==null&&Mn(n,n.return);break;case 5:if(Qe(t,e),it(e),r&512&&n!==null&&Mn(n,n.return),e.flags&32){var i=e.stateNode;try{Cr(i,"")}catch(S){ee(e,e.return,S)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Rc(i,o),gs(l,s);var a=gs(l,o);for(s=0;s<u.length;s+=2){var c=u[s],p=u[s+1];c==="style"?Ac(i,p):c==="dangerouslySetInnerHTML"?Oc(i,p):c==="children"?Cr(i,p):xl(i,c,p,a)}switch(l){case"input":ds(i,o);break;case"textarea":Tc(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?$n(i,!!o.multiple,m,!1):d!==!!o.multiple&&(o.defaultValue!=null?$n(i,!!o.multiple,o.defaultValue,!0):$n(i,!!o.multiple,o.multiple?[]:"",!1))}i[Pr]=o}catch(S){ee(e,e.return,S)}}break;case 6:if(Qe(t,e),it(e),r&4){if(e.stateNode===null)throw Error(E(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(S){ee(e,e.return,S)}}break;case 3:if(Qe(t,e),it(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Nr(t.containerInfo)}catch(S){ee(e,e.return,S)}break;case 4:Qe(t,e),it(e);break;case 13:Qe(t,e),it(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(iu=te())),r&4&&xa(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(me=(a=me)||c,Qe(t,e),me=a):Qe(t,e),it(e),r&8192){if(a=e.memoizedState!==null,(e.stateNode.isHidden=a)&&!c&&e.mode&1)for(O=e,c=e.child;c!==null;){for(p=O=c;O!==null;){switch(d=O,m=d.child,d.tag){case 0:case 11:case 14:case 15:vr(4,d,d.return);break;case 1:Mn(d,d.return);var w=d.stateNode;if(typeof w.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(S){ee(r,n,S)}}break;case 5:Mn(d,d.return);break;case 22:if(d.memoizedState!==null){Ta(p);continue}}m!==null?(m.return=d,O=m):Ta(p)}c=c.sibling}e:for(c=null,p=e;;){if(p.tag===5){if(c===null){c=p;try{i=p.stateNode,a?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=p.stateNode,u=p.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=Mc("display",s))}catch(S){ee(e,e.return,S)}}}else if(p.tag===6){if(c===null)try{p.stateNode.nodeValue=a?"":p.memoizedProps}catch(S){ee(e,e.return,S)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;c===p&&(c=null),p=p.return}c===p&&(c=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Qe(t,e),it(e),r&4&&xa(e);break;case 21:break;default:Qe(t,e),it(e)}}function it(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(rd(n)){var r=n;break e}n=n.return}throw Error(E(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Cr(i,""),r.flags&=-33);var o=Ca(e);Js(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=Ca(e);Hs(e,l,s);break;default:throw Error(E(161))}}catch(u){ee(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rm(e,t,n){O=e,sd(e)}function sd(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var i=O,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||ai;if(!s){var l=i.alternate,u=l!==null&&l.memoizedState!==null||me;l=ai;var a=me;if(ai=s,(me=u)&&!a)for(O=i;O!==null;)s=O,u=s.child,s.tag===22&&s.memoizedState!==null?Na(i):u!==null?(u.return=s,O=u):Na(i);for(;o!==null;)O=o,sd(o),o=o.sibling;O=i,ai=l,me=a}Ra(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,O=o):Ra(e)}}function Ra(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:me||yo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!me)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ye(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ca(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ca(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var a=t.alternate;if(a!==null){var c=a.memoizedState;if(c!==null){var p=c.dehydrated;p!==null&&Nr(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}me||t.flags&512&&Ws(t)}catch(d){ee(t,t.return,d)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function Ta(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function Na(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{yo(4,t)}catch(u){ee(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){ee(t,i,u)}}var o=t.return;try{Ws(t)}catch(u){ee(t,o,u)}break;case 5:var s=t.return;try{Ws(t)}catch(u){ee(t,s,u)}}}catch(u){ee(t,t.return,u)}if(t===e){O=null;break}var l=t.sibling;if(l!==null){l.return=t.return,O=l;break}O=t.return}}var im=Math.ceil,Xi=_t.ReactCurrentDispatcher,nu=_t.ReactCurrentOwner,be=_t.ReactCurrentBatchConfig,F=0,ae=null,ne=null,de=0,Pe=0,An=bt(0),se=0,Dr=null,an=0,mo=0,ru=0,wr=null,Te=null,iu=0,Jn=1/0,dt=null,Zi=!1,Qs=null,It=null,ci=!1,Ot=null,Gi=0,kr=0,Ys=null,xi=-1,Ri=0;function Se(){return F&6?te():xi!==-1?xi:xi=te()}function jt(e){return e.mode&1?F&2&&de!==0?de&-de:Uy.transition!==null?(Ri===0&&(Ri=Vc()),Ri):(e=B,e!==0||(e=window.event,e=e===void 0?16:qc(e.type)),e):1}function et(e,t,n,r){if(50<kr)throw kr=0,Ys=null,Error(E(185));Ur(e,n,r),(!(F&2)||e!==ae)&&(e===ae&&(!(F&2)&&(mo|=n),se===4&&Tt(e,de)),$e(e,r),n===1&&F===0&&!(t.mode&1)&&(Jn=te()+500,fo&&Wt()))}function $e(e,t){var n=e.callbackNode;Up(e,t);var r=ji(e,e===ae?de:0);if(r===0)n!==null&&zu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zu(n),t===1)e.tag===0?By(Oa.bind(null,e)):mf(Oa.bind(null,e)),jy(function(){!(F&6)&&Wt()}),n=null;else{switch(bc(r)){case 1:n=Ml;break;case 4:n=Uc;break;case 16:n=Ii;break;case 536870912:n=Kc;break;default:n=Ii}n=pd(n,ld.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ld(e,t){if(xi=-1,Ri=0,F&6)throw Error(E(327));var n=e.callbackNode;if(zn()&&e.callbackNode!==n)return null;var r=ji(e,e===ae?de:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=eo(e,r);else{t=r;var i=F;F|=2;var o=ad();(ae!==e||de!==t)&&(dt=null,Jn=te()+500,Gt(e,t));do try{lm();break}catch(l){ud(e,l)}while(!0);Vl(),Xi.current=o,F=i,ne!==null?t=0:(ae=null,de=0,t=se)}if(t!==0){if(t===2&&(i=_s(e),i!==0&&(r=i,t=qs(e,i))),t===1)throw n=Dr,Gt(e,0),Tt(e,r),$e(e,te()),n;if(t===6)Tt(e,r);else{if(i=e.current.alternate,!(r&30)&&!om(i)&&(t=eo(e,r),t===2&&(o=_s(e),o!==0&&(r=o,t=qs(e,o))),t===1))throw n=Dr,Gt(e,0),Tt(e,r),$e(e,te()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(E(345));case 2:Yt(e,Te,dt);break;case 3:if(Tt(e,r),(r&130023424)===r&&(t=iu+500-te(),10<t)){if(ji(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Se(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ms(Yt.bind(null,e,Te,dt),t);break}Yt(e,Te,dt);break;case 4:if(Tt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Ge(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*im(r/1960))-r,10<r){e.timeoutHandle=Ms(Yt.bind(null,e,Te,dt),r);break}Yt(e,Te,dt);break;case 5:Yt(e,Te,dt);break;default:throw Error(E(329))}}}return $e(e,te()),e.callbackNode===n?ld.bind(null,e):null}function qs(e,t){var n=wr;return e.current.memoizedState.isDehydrated&&(Gt(e,t).flags|=256),e=eo(e,t),e!==2&&(t=Te,Te=n,t!==null&&Xs(t)),e}function Xs(e){Te===null?Te=e:Te.push.apply(Te,e)}function om(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!tt(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tt(e,t){for(t&=~ru,t&=~mo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ge(t),r=1<<n;e[n]=-1,t&=~r}}function Oa(e){if(F&6)throw Error(E(327));zn();var t=ji(e,0);if(!(t&1))return $e(e,te()),null;var n=eo(e,t);if(e.tag!==0&&n===2){var r=_s(e);r!==0&&(t=r,n=qs(e,r))}if(n===1)throw n=Dr,Gt(e,0),Tt(e,t),$e(e,te()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Yt(e,Te,dt),$e(e,te()),null}function ou(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(Jn=te()+500,fo&&Wt())}}function cn(e){Ot!==null&&Ot.tag===0&&!(F&6)&&zn();var t=F;F|=1;var n=be.transition,r=B;try{if(be.transition=null,B=1,e)return e()}finally{B=r,be.transition=n,F=t,!(F&6)&&Wt()}}function su(){Pe=An.current,W(An)}function Gt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Iy(n)),ne!==null)for(n=ne.return;n!==null;){var r=n;switch(Bl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ui();break;case 3:Wn(),W(Me),W(ve),Yl();break;case 5:Ql(r);break;case 4:Wn();break;case 13:W(q);break;case 19:W(q);break;case 10:bl(r.type._context);break;case 22:case 23:su()}n=n.return}if(ae=e,ne=e=zt(e.current,null),de=Pe=t,se=0,Dr=null,ru=mo=an=0,Te=wr=null,Xt!==null){for(t=0;t<Xt.length;t++)if(n=Xt[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Xt=null}return e}function ud(e,t){do{var n=ne;try{if(Vl(),_i.current=qi,Yi){for(var r=Z.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Yi=!1}if(un=0,ue=ie=Z=null,gr=!1,jr=0,nu.current=null,n===null||n.return===null){se=1,Dr=t,ne=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=de,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var a=u,c=l,p=c.tag;if(!(c.mode&1)&&(p===0||p===11||p===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var m=ma(s);if(m!==null){m.flags&=-257,ga(m,s,l,o,t),m.mode&1&&ya(o,a,t),t=m,u=a;var w=t.updateQueue;if(w===null){var S=new Set;S.add(u),t.updateQueue=S}else w.add(u);break e}else{if(!(t&1)){ya(o,a,t),lu();break e}u=Error(E(426))}}else if(J&&l.mode&1){var R=ma(s);if(R!==null){!(R.flags&65536)&&(R.flags|=256),ga(R,s,l,o,t),Ul(Hn(u,l));break e}}o=u=Hn(u,l),se!==4&&(se=2),wr===null?wr=[o]:wr.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var h=Wf(o,u,t);aa(o,h);break e;case 1:l=u;var f=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof f.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(It===null||!It.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=Hf(o,l,t);aa(o,k);break e}}o=o.return}while(o!==null)}fd(n)}catch(T){t=T,ne===n&&n!==null&&(ne=n=n.return);continue}break}while(!0)}function ad(){var e=Xi.current;return Xi.current=qi,e===null?qi:e}function lu(){(se===0||se===3||se===2)&&(se=4),ae===null||!(an&268435455)&&!(mo&268435455)||Tt(ae,de)}function eo(e,t){var n=F;F|=2;var r=ad();(ae!==e||de!==t)&&(dt=null,Gt(e,t));do try{sm();break}catch(i){ud(e,i)}while(!0);if(Vl(),F=n,Xi.current=r,ne!==null)throw Error(E(261));return ae=null,de=0,se}function sm(){for(;ne!==null;)cd(ne)}function lm(){for(;ne!==null&&!$p();)cd(ne)}function cd(e){var t=hd(e.alternate,e,Pe);e.memoizedProps=e.pendingProps,t===null?fd(e):ne=t,nu.current=null}function fd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=em(n,t),n!==null){n.flags&=32767,ne=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,ne=null;return}}else if(n=Gy(n,t,Pe),n!==null){ne=n;return}if(t=t.sibling,t!==null){ne=t;return}ne=t=e}while(t!==null);se===0&&(se=5)}function Yt(e,t,n){var r=B,i=be.transition;try{be.transition=null,B=1,um(e,t,n,r)}finally{be.transition=i,B=r}return null}function um(e,t,n,r){do zn();while(Ot!==null);if(F&6)throw Error(E(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(E(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Kp(e,o),e===ae&&(ne=ae=null,de=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ci||(ci=!0,pd(Ii,function(){return zn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=be.transition,be.transition=null;var s=B;B=1;var l=F;F|=4,nu.current=null,nm(e,n),od(n,e),Ny(Ns),zi=!!Ts,Ns=Ts=null,e.current=n,rm(n),Pp(),F=l,B=s,be.transition=o}else e.current=n;if(ci&&(ci=!1,Ot=e,Gi=i),o=e.pendingLanes,o===0&&(It=null),jp(n.stateNode),$e(e,te()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Zi)throw Zi=!1,e=Qs,Qs=null,e;return Gi&1&&e.tag!==0&&zn(),o=e.pendingLanes,o&1?e===Ys?kr++:(kr=0,Ys=e):kr=0,Wt(),null}function zn(){if(Ot!==null){var e=bc(Gi),t=be.transition,n=B;try{if(be.transition=null,B=16>e?16:e,Ot===null)var r=!1;else{if(e=Ot,Ot=null,Gi=0,F&6)throw Error(E(331));var i=F;for(F|=4,O=e.current;O!==null;){var o=O,s=o.child;if(O.flags&16){var l=o.deletions;if(l!==null){for(var u=0;u<l.length;u++){var a=l[u];for(O=a;O!==null;){var c=O;switch(c.tag){case 0:case 11:case 15:vr(8,c,o)}var p=c.child;if(p!==null)p.return=c,O=p;else for(;O!==null;){c=O;var d=c.sibling,m=c.return;if(nd(c),c===a){O=null;break}if(d!==null){d.return=m,O=d;break}O=m}}}var w=o.alternate;if(w!==null){var S=w.child;if(S!==null){w.child=null;do{var R=S.sibling;S.sibling=null,S=R}while(S!==null)}}O=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,O=s;else e:for(;O!==null;){if(o=O,o.flags&2048)switch(o.tag){case 0:case 11:case 15:vr(9,o,o.return)}var h=o.sibling;if(h!==null){h.return=o.return,O=h;break e}O=o.return}}var f=e.current;for(O=f;O!==null;){s=O;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,O=y;else e:for(s=f;O!==null;){if(l=O,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:yo(9,l)}}catch(T){ee(l,l.return,T)}if(l===s){O=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,O=k;break e}O=l.return}}if(F=i,Wt(),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(so,e)}catch{}r=!0}return r}finally{B=n,be.transition=t}}return!1}function Ma(e,t,n){t=Hn(n,t),t=Wf(e,t,1),e=Lt(e,t,1),t=Se(),e!==null&&(Ur(e,1,t),$e(e,t))}function ee(e,t,n){if(e.tag===3)Ma(e,e,n);else for(;t!==null;){if(t.tag===3){Ma(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(It===null||!It.has(r))){e=Hn(n,e),e=Hf(t,e,1),t=Lt(t,e,1),e=Se(),t!==null&&(Ur(t,1,e),$e(t,e));break}}t=t.return}}function am(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Se(),e.pingedLanes|=e.suspendedLanes&n,ae===e&&(de&n)===n&&(se===4||se===3&&(de&130023424)===de&&500>te()-iu?Gt(e,0):ru|=n),$e(e,t)}function dd(e,t){t===0&&(e.mode&1?(t=ei,ei<<=1,!(ei&130023424)&&(ei=4194304)):t=1);var n=Se();e=kt(e,t),e!==null&&(Ur(e,t,n),$e(e,n))}function cm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dd(e,n)}function fm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),dd(e,n)}var hd;hd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,Zy(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,J&&t.flags&1048576&&gf(t,bi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ci(e,t),e=t.pendingProps;var i=Kn(t,ve.current);jn(t,n),i=Xl(null,t,r,e,i,n);var o=Zl();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(r)?(o=!0,Ki(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Hl(t),i.updater=po,t.stateNode=i,i._reactInternals=t,zs(t,r,e,n),t=Bs(null,t,r,!0,o,n)):(t.tag=0,J&&o&&Dl(t),we(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ci(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=hm(r),e=Ye(r,e),i){case 0:t=Ds(null,t,r,e,n);break e;case 1:t=ka(null,t,r,e,n);break e;case 11:t=va(null,t,r,e,n);break e;case 14:t=wa(null,t,r,Ye(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Ds(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),ka(e,t,r,i,n);case 3:e:{if(qf(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Ef(e,t),Ji(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Hn(Error(E(423)),t),t=Sa(e,t,r,n,i);break e}else if(r!==i){i=Hn(Error(E(424)),t),t=Sa(e,t,r,n,i);break e}else for(Le=Pt(t.stateNode.containerInfo.firstChild),Ie=t,J=!0,Ze=null,n=Sf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===i){t=St(e,t,n);break e}we(e,t,r,n)}t=t.child}return t;case 5:return Cf(t),e===null&&Ls(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Os(r,i)?s=null:o!==null&&Os(r,o)&&(t.flags|=32),Yf(e,t),we(e,t,s,n),t.child;case 6:return e===null&&Ls(t),null;case 13:return Xf(e,t,n);case 4:return Jl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bn(t,null,r,n):we(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),va(e,t,r,i,n);case 7:return we(e,t,t.pendingProps,n),t.child;case 8:return we(e,t,t.pendingProps.children,n),t.child;case 12:return we(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,V(Wi,r._currentValue),r._currentValue=s,o!==null)if(tt(o.value,s)){if(o.children===i.children&&!Me.current){t=St(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=gt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?u.next=u:(u.next=c.next,c.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Is(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(E(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Is(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}we(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,jn(t,n),i=We(i),r=r(i),t.flags|=1,we(e,t,r,n),t.child;case 14:return r=t.type,i=Ye(r,t.pendingProps),i=Ye(r.type,i),wa(e,t,r,i,n);case 15:return Jf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Ci(e,t),t.tag=1,Ae(r)?(e=!0,Ki(t)):e=!1,jn(t,n),bf(t,r,i),zs(t,r,i,n),Bs(null,t,r,!0,e,n);case 19:return Zf(e,t,n);case 22:return Qf(e,t,n)}throw Error(E(156,t.tag))};function pd(e,t){return Bc(e,t)}function dm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ve(e,t,n,r){return new dm(e,t,n,r)}function uu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hm(e){if(typeof e=="function")return uu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Tl)return 11;if(e===Nl)return 14}return 2}function zt(e,t){var n=e.alternate;return n===null?(n=Ve(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ti(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")uu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Sn:return en(n.children,i,o,t);case Rl:s=8,i|=8;break;case ls:return e=Ve(12,n,t,i|2),e.elementType=ls,e.lanes=o,e;case us:return e=Ve(13,n,t,i),e.elementType=us,e.lanes=o,e;case as:return e=Ve(19,n,t,i),e.elementType=as,e.lanes=o,e;case Ec:return go(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Sc:s=10;break e;case _c:s=9;break e;case Tl:s=11;break e;case Nl:s=14;break e;case Ct:s=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Ve(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function en(e,t,n,r){return e=Ve(7,e,r,t),e.lanes=n,e}function go(e,t,n,r){return e=Ve(22,e,r,t),e.elementType=Ec,e.lanes=n,e.stateNode={isHidden:!1},e}function qo(e,t,n){return e=Ve(6,e,null,t),e.lanes=n,e}function Xo(e,t,n){return t=Ve(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pm(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ao(0),this.expirationTimes=Ao(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ao(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function au(e,t,n,r,i,o,s,l,u){return e=new pm(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ve(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hl(o),e}function ym(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:kn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function yd(e){if(!e)return Bt;e=e._reactInternals;e:{if(hn(e)!==e||e.tag!==1)throw Error(E(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ae(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(E(171))}if(e.tag===1){var n=e.type;if(Ae(n))return yf(e,n,t)}return t}function md(e,t,n,r,i,o,s,l,u){return e=au(n,r,!0,e,i,o,s,l,u),e.context=yd(null),n=e.current,r=Se(),i=jt(n),o=gt(r,i),o.callback=t??null,Lt(n,o,i),e.current.lanes=i,Ur(e,i,r),$e(e,r),e}function vo(e,t,n,r){var i=t.current,o=Se(),s=jt(i);return n=yd(n),t.context===null?t.context=n:t.pendingContext=n,t=gt(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Lt(i,t,s),e!==null&&(et(e,i,s,o),Si(e,i,s)),s}function to(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Aa(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cu(e,t){Aa(e,t),(e=e.alternate)&&Aa(e,t)}function mm(){return null}var gd=typeof reportError=="function"?reportError:function(e){console.error(e)};function fu(e){this._internalRoot=e}wo.prototype.render=fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));vo(e,t,null,null)};wo.prototype.unmount=fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cn(function(){vo(null,e,null,null)}),t[wt]=null}};function wo(e){this._internalRoot=e}wo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&t!==0&&t<Rt[n].priority;n++);Rt.splice(n,0,e),n===0&&Yc(e)}};function du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ko(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $a(){}function gm(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var a=to(s);o.call(a)}}var s=md(t,r,e,0,null,!1,!1,"",$a);return e._reactRootContainer=s,e[wt]=s.current,Ar(e.nodeType===8?e.parentNode:e),cn(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var a=to(u);l.call(a)}}var u=au(e,0,!1,null,null,!1,!1,"",$a);return e._reactRootContainer=u,e[wt]=u.current,Ar(e.nodeType===8?e.parentNode:e),cn(function(){vo(t,u,n,r)}),u}function So(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var u=to(s);l.call(u)}}vo(t,s,e,i)}else s=gm(n,t,e,i,r);return to(s)}Wc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ar(t.pendingLanes);n!==0&&(Al(t,n|1),$e(t,te()),!(F&6)&&(Jn=te()+500,Wt()))}break;case 13:cn(function(){var r=kt(e,1);if(r!==null){var i=Se();et(r,e,1,i)}}),cu(e,1)}};$l=function(e){if(e.tag===13){var t=kt(e,134217728);if(t!==null){var n=Se();et(t,e,134217728,n)}cu(e,134217728)}};Hc=function(e){if(e.tag===13){var t=jt(e),n=kt(e,t);if(n!==null){var r=Se();et(n,e,t,r)}cu(e,t)}};Jc=function(){return B};Qc=function(e,t){var n=B;try{return B=e,t()}finally{B=n}};ws=function(e,t,n){switch(t){case"input":if(ds(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=co(r);if(!i)throw Error(E(90));xc(r),ds(r,i)}}}break;case"textarea":Tc(e,n);break;case"select":t=n.value,t!=null&&$n(e,!!n.multiple,t,!1)}};Lc=ou;Ic=cn;var vm={usingClientEntryPoint:!1,Events:[Vr,xn,co,$c,Pc,ou]},or={findFiberByHostInstance:qt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wm={bundleType:or.bundleType,version:or.version,rendererPackageName:or.rendererPackageName,rendererConfig:or.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_t.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Fc(e),e===null?null:e.stateNode},findFiberByHostInstance:or.findFiberByHostInstance||mm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fi.isDisabled&&fi.supportsFiber)try{so=fi.inject(wm),ut=fi}catch{}}Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vm;Fe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!du(t))throw Error(E(200));return ym(e,t,null,n)};Fe.createRoot=function(e,t){if(!du(e))throw Error(E(299));var n=!1,r="",i=gd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=au(e,1,!1,null,null,n,!1,r,i),e[wt]=t.current,Ar(e.nodeType===8?e.parentNode:e),new fu(t)};Fe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=Fc(t),e=e===null?null:e.stateNode,e};Fe.flushSync=function(e){return cn(e)};Fe.hydrate=function(e,t,n){if(!ko(t))throw Error(E(200));return So(null,e,t,!0,n)};Fe.hydrateRoot=function(e,t,n){if(!du(e))throw Error(E(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=gd;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=md(t,null,e,1,n??null,i,!1,o,s),e[wt]=t.current,Ar(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new wo(t)};Fe.render=function(e,t,n){if(!ko(t))throw Error(E(200));return So(null,e,t,!1,n)};Fe.unmountComponentAtNode=function(e){if(!ko(e))throw Error(E(40));return e._reactRootContainer?(cn(function(){So(null,null,e,!1,function(){e._reactRootContainer=null,e[wt]=null})}),!0):!1};Fe.unstable_batchedUpdates=ou;Fe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ko(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return So(e,t,n,!1,r)};Fe.version="18.3.1-next-f1338f8080-20240426";function vd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vd)}catch(e){console.error(e)}}vd(),gc.exports=Fe;var km=gc.exports,wd,Pa=km;wd=Pa.createRoot,Pa.hydrateRoot;const ft=Object.create(null);ft.open="0";ft.close="1";ft.ping="2";ft.pong="3";ft.message="4";ft.upgrade="5";ft.noop="6";const Ni=Object.create(null);Object.keys(ft).forEach(e=>{Ni[ft[e]]=e});const Zs={type:"error",data:"parser error"},kd=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Sd=typeof ArrayBuffer=="function",_d=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hu=({type:e,data:t},n,r)=>kd&&t instanceof Blob?n?r(t):La(t,r):Sd&&(t instanceof ArrayBuffer||_d(t))?n?r(t):La(new Blob([t]),r):r(ft[e]+(t||"")),La=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Ia(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Zo;function Sm(e,t){if(kd&&e.data instanceof Blob)return e.data.arrayBuffer().then(Ia).then(t);if(Sd&&(e.data instanceof ArrayBuffer||_d(e.data)))return t(Ia(e.data));hu(e,!1,n=>{Zo||(Zo=new TextEncoder),t(Zo.encode(n))})}const ja="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<ja.length;e++)fr[ja.charCodeAt(e)]=e;const _m=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const a=new ArrayBuffer(t),c=new Uint8Array(a);for(r=0;r<n;r+=4)o=fr[e.charCodeAt(r)],s=fr[e.charCodeAt(r+1)],l=fr[e.charCodeAt(r+2)],u=fr[e.charCodeAt(r+3)],c[i++]=o<<2|s>>4,c[i++]=(s&15)<<4|l>>2,c[i++]=(l&3)<<6|u&63;return a},Em=typeof ArrayBuffer=="function",pu=(e,t)=>{if(typeof e!="string")return{type:"message",data:Ed(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Cm(e.substring(1),t)}:Ni[n]?e.length>1?{type:Ni[n],data:e.substring(1)}:{type:Ni[n]}:Zs},Cm=(e,t)=>{if(Em){const n=_m(e);return Ed(n,t)}else return{base64:!0,data:e}},Ed=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Cd="",xm=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{hu(o,!1,l=>{r[s]=l,++i===n&&t(r.join(Cd))})})},Rm=(e,t)=>{const n=e.split(Cd),r=[];for(let i=0;i<n.length;i++){const o=pu(n[i],t);if(r.push(o),o.type==="error")break}return r};function Tm(){return new TransformStream({transform(e,t){Sm(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Go;function di(e){return e.reduce((t,n)=>t+n.length,0)}function hi(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Nm(e,t){Go||(Go=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(r===0){if(di(n)<1)break;const u=hi(n,1);o=(u[0]&128)===128,i=u[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(di(n)<2)break;const u=hi(n,2);i=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(di(n)<8)break;const u=hi(n,8),a=new DataView(u.buffer,u.byteOffset,u.length),c=a.getUint32(0);if(c>Math.pow(2,21)-1){l.enqueue(Zs);break}i=c*Math.pow(2,32)+a.getUint32(4),r=3}else{if(di(n)<i)break;const u=hi(n,i);l.enqueue(pu(o?u:Go.decode(u),t)),r=0}if(i===0||i>e){l.enqueue(Zs);break}}}})}const xd=4;function re(e){if(e)return Om(e)}function Om(e){for(var t in re.prototype)e[t]=re.prototype[t];return e}re.prototype.on=re.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};re.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};re.prototype.off=re.prototype.removeListener=re.prototype.removeAllListeners=re.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};re.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};re.prototype.emitReserved=re.prototype.emit;re.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};re.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ke=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Rd(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Mm=Ke.setTimeout,Am=Ke.clearTimeout;function _o(e,t){t.useNativeTimers?(e.setTimeoutFn=Mm.bind(Ke),e.clearTimeoutFn=Am.bind(Ke)):(e.setTimeoutFn=Ke.setTimeout.bind(Ke),e.clearTimeoutFn=Ke.clearTimeout.bind(Ke))}const $m=1.33;function Pm(e){return typeof e=="string"?Lm(e):Math.ceil((e.byteLength||e.size)*$m)}function Lm(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Im(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function jm(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class zm extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class yu extends re{constructor(t){super(),this.writable=!1,_o(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new zm(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pu(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Im(t);return n.length?"?"+n:""}}const Td="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Gs=64,Fm={};let za=0,pi=0,Fa;function Da(e){let t="";do t=Td[e%Gs]+t,e=Math.floor(e/Gs);while(e>0);return t}function Nd(){const e=Da(+new Date);return e!==Fa?(za=0,Fa=e):e+"."+Da(za++)}for(;pi<Gs;pi++)Fm[Td[pi]]=pi;let Od=!1;try{Od=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Dm=Od;function Md(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Dm))return new XMLHttpRequest}catch{}if(!t)try{return new Ke[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Bm(){}const Um=function(){return new Md({xdomain:!1}).responseType!=null}();class Km extends yu{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}const n=t&&t.forceBase64;this.supportsBinary=Um&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Rm(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,xm(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Nd()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ct(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ct extends re{constructor(t,n){super(),_o(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=Rd(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Md(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=ct.requestsCount++,ct.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Bm,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ct.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ct.requestsCount=0;ct.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ba);else if(typeof addEventListener=="function"){const e="onpagehide"in Ke?"pagehide":"unload";addEventListener(e,Ba,!1)}}function Ba(){for(let e in ct.requests)ct.requests.hasOwnProperty(e)&&ct.requests[e].abort()}const mu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),yi=Ke.WebSocket||Ke.MozWebSocket,Ua=!0,Vm="arraybuffer",Ka=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class bm extends yu{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=Ka?{}:Rd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Ua&&!Ka?n?new yi(t,n):new yi(t):new yi(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;hu(r,this.supportsBinary,o=>{const s={};try{Ua&&this.ws.send(o)}catch{}i&&mu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Nd()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!yi}}class Wm extends yu{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=Nm(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Tm();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:u})=>{l||(this.onPacket(u),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this.writer.write(r).then(()=>{i&&mu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const Hm={websocket:bm,webtransport:Wm,polling:Km},Jm=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Qm=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function el(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Jm.exec(e||""),o={},s=14;for(;s--;)o[Qm[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Ym(o,o.path),o.queryKey=qm(o,o.query),o}function Ym(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function qm(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Ad=class mn extends re{constructor(t,n={}){super(),this.binaryType=Vm,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=el(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=el(n.host).host),_o(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=jm(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=xd,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new Hm[t](r)}open(){let t;if(this.opts.rememberUpgrade&&mn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;mn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;mn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=p=>{const d=new Error("probe error: "+p);d.transport=n.name,o(),this.emitReserved("upgradeError",d)};function l(){s("transport closed")}function u(){s("socket closed")}function a(p){n&&p.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",u),this.off("upgrading",a)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",u),this.once("upgrading",a),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",mn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Pm(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){mn.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};Ad.protocol=xd;function Xm(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=el(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const Zm=typeof ArrayBuffer=="function",Gm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,$d=Object.prototype.toString,eg=typeof Blob=="function"||typeof Blob<"u"&&$d.call(Blob)==="[object BlobConstructor]",tg=typeof File=="function"||typeof File<"u"&&$d.call(File)==="[object FileConstructor]";function gu(e){return Zm&&(e instanceof ArrayBuffer||Gm(e))||eg&&e instanceof Blob||tg&&e instanceof File}function Oi(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Oi(e[n]))return!0;return!1}if(gu(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Oi(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Oi(e[n]))return!0;return!1}function ng(e){const t=[],n=e.data,r=e;return r.data=tl(n,t),r.attachments=t.length,{packet:r,buffers:t}}function tl(e,t){if(!e)return e;if(gu(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=tl(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=tl(e[r],t));return n}return e}function rg(e,t){return e.data=nl(e.data,t),delete e.attachments,e}function nl(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=nl(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=nl(e[n],t));return e}const ig=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],og=5;var z;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(z||(z={}));class sg{constructor(t){this.replacer=t}encode(t){return(t.type===z.EVENT||t.type===z.ACK)&&Oi(t)?this.encodeAsBinary({type:t.type===z.EVENT?z.BINARY_EVENT:z.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===z.BINARY_EVENT||t.type===z.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=ng(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Va(e){return Object.prototype.toString.call(e)==="[object Object]"}class vu extends re{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===z.BINARY_EVENT;r||n.type===z.BINARY_ACK?(n.type=r?z.EVENT:z.ACK,this.reconstructor=new lg(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(gu(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(z[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===z.BINARY_EVENT||r.type===z.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(vu.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case z.CONNECT:return Va(n);case z.DISCONNECT:return n===void 0;case z.CONNECT_ERROR:return typeof n=="string"||Va(n);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&ig.indexOf(n[0])===-1);case z.ACK:case z.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class lg{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=rg(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ug=Object.freeze(Object.defineProperty({__proto__:null,Decoder:vu,Encoder:sg,get PacketType(){return z},protocol:og},Symbol.toStringTag,{value:"Module"}));function Xe(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const ag=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Pd extends re{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Xe(t,"open",this.onopen.bind(this)),Xe(t,"packet",this.onpacket.bind(this)),Xe(t,"error",this.onerror.bind(this)),Xe(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(ag.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:z.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,l=n.pop();this._registerAckCallback(s,l),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),s=(...l)=>{this.io.clearTimeoutFn(o),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,l)=>s?i(s):r(l);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case z.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case z.EVENT:case z.BINARY_EVENT:this.onevent(t);break;case z.ACK:case z.BINARY_ACK:this.onack(t);break;case z.DISCONNECT:this.ondisconnect();break;case z.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:z.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Xn(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Xn.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Xn.prototype.reset=function(){this.attempts=0};Xn.prototype.setMin=function(e){this.ms=e};Xn.prototype.setMax=function(e){this.max=e};Xn.prototype.setJitter=function(e){this.jitter=e};class rl extends re{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,_o(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Xn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||ug;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ad(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Xe(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=Xe(n,"error",o);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Xe(t,"ping",this.onping.bind(this)),Xe(t,"data",this.ondata.bind(this)),Xe(t,"error",this.onerror.bind(this)),Xe(t,"close",this.onclose.bind(this)),Xe(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){mu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Pd(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const sr={};function Mi(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Xm(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=sr[i]&&o in sr[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let u;return l?u=new rl(r,t):(sr[i]||(sr[i]=new rl(r,t)),u=sr[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(Mi,{Manager:rl,Socket:Pd,io:Mi,connect:Mi});class cg extends Map{set(t,n){return this.has(t)?(console.warn("Tried to set a key that already exists in an InvariantMap",{key:t,value:n}),this):super.set(t,n)}clear(){throw new Error("Cannot clear an InvariantMap")}}const Sr=class Sr{constructor(t){C(this,"type","continuity");C(this,"globals",[]);C(this,"actions",[]);C(this,"perspectives",[]);this.key=t}static create(t,n){const r=new Sr(t),{type:i,globals:o,actions:s,perspectives:l}=n(r),u={type:i,key:t,globals:o,actions:s,perspectives:l};return Sr.existing.set(t,u),u}add(...t){switch(t[0].type){case"atom":case"mutable_atom":this.globals.push(...t);break;case"transaction":this.actions.push(...t);break;case"atom_family":{const[r,i]=t;this.perspectives.push({type:"realtime_perspective",resourceAtoms:r,viewAtoms:i})}break}return this}};C(Sr,"existing",new cg);let il=Sr;function fg(e){const{key:t,config:n}=e,r=il.create(t,n),{actions:i}=r;for(const o of i)sc(t,o.key,_e.STORE);return ns(t,-1,_e.STORE),r}fn({key:"usersInRoomIndex",mutable:!0,default:()=>new lt,toJson:e=>e.toJSON(),fromJson:e=>lt.fromJSON(e)});fn({key:"roomIndex",default:()=>new lt,mutable:!0,toJson:e=>e.toJSON(),fromJson:e=>lt.fromJSON(e)});const dg={enteredAtEpoch:0},hg=Rh({key:"usersInRooms",between:["room","user"],cardinality:"1:n"},dg);dh({key:"usersInMyRoomView",get:e=>({find:t})=>{const n=Mh(hg);return[t(n,e)]}});const wu=fn({key:"count",default:0}),Ld=hh({key:"incrementTX",do:({set:e})=>{e(wu,t=>t+1)}}),pg=fg({key:"countContinuity",config:e=>e.add(wu).add(Ld)});function yg(){return K.jsxs("svg",{id:"uuid-3d2d6be6-f179-42a3-9511-1e9ddeb8575f",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 101",children:[K.jsx("title",{children:"Tempest Games Logo"}),K.jsx("path",{d:"M155.76.93v59.89h-17.11V7.78h-13.69V.93h30.8Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M202.91,7.86h-13.18v17.03h13.18v6.84h-13.18v22.24h13.18v6.84h-30.29V.93h30.29v6.93Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M289.49.93v59.89h-17.11V7.78h-.43c-8.21,0-11.21,5.82-11.21,17.03v36.02h-16.25V24.8c0-11.21-2.99-17.03-11.21-17.03h-.43v53.04h-17.11V.93h18.74c9.92,0,15.31,4.96,18.14,11.21,2.82-6.25,8.21-11.21,18.14-11.21h18.73Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M352.82,29.68c0,11.72-6.42,19.16-24.55,19.16h-4.53v11.98h-17.11V1.1l46.2-.17v28.75ZM323.73,7.78v34.22h2.48c7.36,0,9.5-4.11,9.5-12.15V7.78h-11.98Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M396.8,7.86h-13.17v17.03h13.17v6.84h-13.17v22.24h13.17v6.84h-30.28V.93h30.28v6.93Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M425.9,12.57v14.03h27.89v16.94c0,12.75-1.71,18.13-16.43,18.13h-14.54c-9.58,0-14.03-2.74-14.03-11.97v-5.99h15.4v5.13c0,4.53.77,5.99,4.62,5.99h1.71c5.05,0,6.16-1.46,6.16-6.84v-14.54h-27.89v-16.68c0-13.52,3.85-16.68,18.82-16.68h12.83c8.81,0,13.17,1.54,13.17,10.78v7.19h-15.4v-6.5c0-3.42-1.03-4.62-4.45-4.62h-1.45c-4.28,0-6.42,1.46-6.42,5.65Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M500,7.78h-13.69v53.04h-17.11V.93h30.8v6.84Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M155.96,93.78v-3.57h-5.58v-7.14h13.39v17.85h-24.76v-28.56h24.76v7.14h-16.96v14.28h9.15Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M224.26,100.92h-8.25v-10.71h-8.25v3.57h4.68v7.14h-12.94v-17.85h16.51v-3.57h-16.51v-7.14h24.76v28.56Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M259.99,72.36h30.57v28.56h-7.81v-21.42h-3.57v21.42h-7.81v-21.42h-3.57v21.42h-7.81v-28.56Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M343.24,83.08v-3.57h-9.14v14.28h16.96v7.14h-24.76v-28.56h24.76v17.85h-13.38v-7.14h5.57Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M394.59,79.5v3.57h16.96v17.85h-24.76v-7.14h16.96v-3.57h-16.96v-17.85h24.76v7.14h-16.96Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M0,63.42v-20.84h20.83L0,63.42ZM100,.92v32.29h-35.42v8.33h-8.33V14.46h-22.92l1.04,7.29h9.38v19.79h-8.33v-8.33H0V.92h100ZM0,100.92v-26.04l6.25-1.04,25-26.04,1.04,1.05-10.42,18.75-4.16,7.29h13.54l3.13-3.12,8.33-22.92h1.04v41.66h3.12l9.38-8.33v-33.33h1.04l8.33,22.92,3.12,3.12h13.54l-4.17-7.29-10.42-19.8,1.04-1.04,25,27.09,6.25,1.04v26.04H0ZM100,42.59v20.84l-20.83-20.84h20.83Z",style:{fill:"#fff200",strokeWidth:0}})]})}function mg(){const e=op(wu),t=ph(Ld);return yp(pg),K.jsxs(K.Fragment,{children:[K.jsx("div",{children:K.jsx(yg,{})}),K.jsxs("div",{className:"card",children:[K.jsxs("button",{type:"button",onClick:()=>{t()},children:["count is ",e]}),K.jsx("p",{children:"Let's see how high we can count!"})]})]})}let gn;try{const e=localStorage.getItem("myId");e?gn=JSON.parse(e):(gn=Math.random().toString(),localStorage.setItem("myId",JSON.stringify(gn)))}catch{gn=Math.random().toString(),localStorage.setItem("myId",JSON.stringify(gn))}const gg=Mi("https://realtime.tempest.games/",{auth:{token:"test",username:gn}});wd(document.getElementById("root")).render(K.jsx(fe.StrictMode,{children:K.jsx(ap,{socket:gg,children:K.jsx(mg,{})})}));
|
|
46
|
+
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Qo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ds(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Vy=typeof WeakMap=="function"?WeakMap:Map;function Bf(e,t,n){n=gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xi||(Xi=!0,Ys=r),Ds(e,t)},n}function Uf(e,t,n){n=gt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ds(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Ds(e,t),typeof r!="function"&&(It===null?It=new Set([this]):It.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ya(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vy;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=rm.bind(null,e,t,n),t.then(e,e))}function ma(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ga(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=gt(-1,1),t.tag=2,Lt(n,t,1))),n.lanes|=1),e)}var by=_t.ReactCurrentOwner,Ne=!1;function we(e,t,n,r){t.child=e===null?mf(t,null,n,r):bn(t,e.child,n,r)}function va(e,t,n,r,i){n=n.render;var o=t.ref;return jn(t,i),r=Zl(e,t,n,r,o,i),n=Gl(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,St(e,t,i)):(J&&n&&Bl(t),t.flags|=1,we(e,t,r,i),t.child)}function wa(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!au(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Kf(e,t,o,r,i)):(e=xi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Mr,n(s,r)&&e.ref===t.ref)return St(e,t,i)}return t.flags|=1,e=zt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Kf(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Mr(o,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,St(e,t,i)}return Bs(e,t,n,r,i)}function Vf(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},V(An,$e),$e|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,V(An,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,V(An,$e),$e|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,V(An,$e),$e|=r;return we(e,t,i,n),t.child}function bf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bs(e,t,n,r,i){var o=Ae(n)?ln:ve.current;return o=Kn(t,o),jn(t,i),n=Zl(e,t,n,r,o,i),r=Gl(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,St(e,t,i)):(J&&r&&Bl(t),t.flags|=1,we(e,t,n,i),t.child)}function ka(e,t,n,r,i){if(Ae(n)){var o=!0;Ui(t)}else o=!1;if(jn(t,i),t.stateNode===null)_i(e,t),Df(t,n,r),Fs(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var u=s.context,a=n.contextType;typeof a=="object"&&a!==null?a=We(a):(a=Ae(n)?ln:ve.current,a=Kn(t,a));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||u!==a)&&pa(t,s,r,a),xt=!1;var d=t.memoizedState;s.state=d,Hi(t,r,s,i),u=t.memoizedState,l!==r||d!==u||Me.current||xt?(typeof c=="function"&&(zs(t,n,c,r),u=t.memoizedState),(l=xt||ha(t,n,l,r,d,u,a))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=a,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,vf(e,t),l=t.memoizedProps,a=t.type===t.elementType?l:Ye(t.type,l),s.props=a,p=t.pendingProps,d=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=We(u):(u=Ae(n)?ln:ve.current,u=Kn(t,u));var m=n.getDerivedStateFromProps;(c=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==p||d!==u)&&pa(t,s,r,u),xt=!1,d=t.memoizedState,s.state=d,Hi(t,r,s,i);var w=t.memoizedState;l!==p||d!==w||Me.current||xt?(typeof m=="function"&&(zs(t,n,m,r),w=t.memoizedState),(a=xt||ha(t,n,a,r,d,w,u)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,w,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,w,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),s.props=r,s.state=w,s.context=u,r=a):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Us(e,t,n,r,o,i)}function Us(e,t,n,r,i,o){bf(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&oa(t,n,!1),St(e,t,o);r=t.stateNode,by.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=bn(t,e.child,null,o),t.child=bn(t,null,l,o)):we(e,t,l,o),t.memoizedState=r.state,i&&oa(t,n,!0),t.child}function Wf(e){var t=e.stateNode;t.pendingContext?ia(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ia(e,t.context,!1),Ql(e,t.containerInfo)}function Sa(e,t,n,r,i){return Vn(),Kl(i),t.flags|=256,we(e,t,n,r),t.child}var Ks={dehydrated:null,treeContext:null,retryLane:0};function Vs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hf(e,t,n){var r=t.pendingProps,i=q.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),V(q,i&1),e===null)return Is(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=mo(s,r,0,null),e=tn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Vs(n),t.memoizedState=Ks,e):nu(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Wy(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=zt(i,u),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=zt(l,o):(o=tn(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Vs(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Ks,r}return o=e.child,e=o.sibling,r=zt(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function nu(e,t){return t=mo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ui(e,t,n,r){return r!==null&&Kl(r),bn(t,e.child,null,n),e=nu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wy(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Qo(Error(E(422))),ui(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=mo({mode:"visible",children:r.children},i,0,null),o=tn(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&bn(t,e.child,null,s),t.child.memoizedState=Vs(s),t.memoizedState=Ks,o);if(!(t.mode&1))return ui(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(E(419)),r=Qo(o,r,void 0),ui(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ne||l){if(r=ae,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,kt(e,i),et(r,e,i,-1))}return uu(),r=Qo(Error(E(421))),ui(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=im.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Le=$t(i.nextSibling),Ie=t,J=!0,Ze=null,e!==null&&(Be[Ue++]=yt,Be[Ue++]=mt,Be[Ue++]=un,yt=e.id,mt=e.overflow,un=t),t=nu(t,r.children),t.flags|=4096,t)}function _a(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),js(e.return,t,n)}function Yo(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Jf(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(we(e,t,r.children,n),r=q.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_a(e,n,t);else if(e.tag===19)_a(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(V(q,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ji(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Yo(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ji(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Yo(t,!0,n,null,o);break;case"together":Yo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _i(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function St(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=zt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Hy(e,t,n){switch(t.tag){case 3:Wf(t),Vn();break;case 5:wf(t);break;case 1:Ae(t.type)&&Ui(t);break;case 4:Ql(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;V(bi,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(V(q,q.current&1),t.flags|=128,null):n&t.child.childLanes?Hf(e,t,n):(V(q,q.current&1),e=St(e,t,n),e!==null?e.sibling:null);V(q,q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Jf(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(q,q.current),r)break;return null;case 22:case 23:return t.lanes=0,Vf(e,t,n)}return St(e,t,n)}var Qf,bs,Yf,qf;Qf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bs=function(){};Yf=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Gt(at.current);var o=null;switch(n){case"input":i=ds(e,i),r=ds(e,r),o=[];break;case"select":i=G({},i,{value:void 0}),r=G({},r,{value:void 0}),o=[];break;case"textarea":i=ys(e,i),r=ys(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Di)}gs(n,r);var s;n=null;for(a in i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&i[a]!=null)if(a==="style"){var l=i[a];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Er.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var u=r[a];if(l=i!=null?i[a]:void 0,r.hasOwnProperty(a)&&u!==l&&(u!=null||l!=null))if(a==="style")if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(a,n)),n=u;else a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(o=o||[]).push(a,u)):a==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(a,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(Er.hasOwnProperty(a)?(u!=null&&a==="onScroll"&&b("scroll",e),o||l===u||(o=[])):(o=o||[]).push(a,u))}n&&(o=o||[]).push("style",n);var a=o;(t.updateQueue=a)&&(t.flags|=4)}};qf=function(e,t,n,r){n!==r&&(t.flags|=4)};function ir(e,t){if(!J)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Jy(e,t,n){var r=t.pendingProps;switch(Ul(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ye(t),null;case 1:return Ae(t.type)&&Bi(),ye(t),null;case 3:return r=t.stateNode,Wn(),W(Me),W(ve),ql(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(si(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ze!==null&&(Zs(Ze),Ze=null))),bs(e,t),ye(t),null;case 5:Yl(t);var i=Gt(Ir.current);if(n=t.type,e!==null&&t.stateNode!=null)Yf(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return ye(t),null}if(e=Gt(at.current),si(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[st]=t,r[$r]=o,e=(t.mode&1)!==0,n){case"dialog":b("cancel",r),b("close",r);break;case"iframe":case"object":case"embed":b("load",r);break;case"video":case"audio":for(i=0;i<cr.length;i++)b(cr[i],r);break;case"source":b("error",r);break;case"img":case"image":case"link":b("error",r),b("load",r);break;case"details":b("toggle",r);break;case"input":Au(r,o),b("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},b("invalid",r);break;case"textarea":$u(r,o),b("invalid",r)}gs(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&oi(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&oi(r.textContent,l,e),i=["children",""+l]):Er.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&b("scroll",r)}switch(n){case"input":Xr(r),Pu(r,o,!0);break;case"textarea":Xr(r),Lu(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Di)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ec(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[st]=t,e[$r]=r,Qf(e,t,!1,!1),t.stateNode=e;e:{switch(s=vs(n,r),n){case"dialog":b("cancel",e),b("close",e),i=r;break;case"iframe":case"object":case"embed":b("load",e),i=r;break;case"video":case"audio":for(i=0;i<cr.length;i++)b(cr[i],e);i=r;break;case"source":b("error",e),i=r;break;case"img":case"image":case"link":b("error",e),b("load",e),i=r;break;case"details":b("toggle",e),i=r;break;case"input":Au(e,r),i=ds(e,r),b("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=G({},r,{value:void 0}),b("invalid",e);break;case"textarea":$u(e,r),i=ys(e,r),b("invalid",e);break;default:i=r}gs(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var u=l[o];o==="style"?Rc(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Cc(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Cr(e,u):typeof u=="number"&&Cr(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Er.hasOwnProperty(o)?u!=null&&o==="onScroll"&&b("scroll",e):u!=null&&Rl(e,o,u,s))}switch(n){case"input":Xr(e),Pu(e,r,!1);break;case"textarea":Xr(e),Lu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Bt(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Pn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Pn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Di)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ye(t),null;case 6:if(e&&t.stateNode!=null)qf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(E(166));if(n=Gt(Ir.current),Gt(at.current),si(t)){if(r=t.stateNode,n=t.memoizedProps,r[st]=t,(o=r.nodeValue!==n)&&(e=Ie,e!==null))switch(e.tag){case 3:oi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&oi(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[st]=t,t.stateNode=r}return ye(t),null;case 13:if(W(q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(J&&Le!==null&&t.mode&1&&!(t.flags&128))pf(),Vn(),t.flags|=98560,o=!1;else if(o=si(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(E(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(E(317));o[st]=t}else Vn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ye(t),o=!1}else Ze!==null&&(Zs(Ze),Ze=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||q.current&1?se===0&&(se=3):uu())),t.updateQueue!==null&&(t.flags|=4),ye(t),null);case 4:return Wn(),bs(e,t),e===null&&Ar(t.stateNode.containerInfo),ye(t),null;case 10:return Wl(t.type._context),ye(t),null;case 17:return Ae(t.type)&&Bi(),ye(t),null;case 19:if(W(q),o=t.memoizedState,o===null)return ye(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)ir(o,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ji(e),s!==null){for(t.flags|=128,ir(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return V(q,q.current&1|2),t.child}e=e.sibling}o.tail!==null&&te()>Jn&&(t.flags|=128,r=!0,ir(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ji(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ir(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!J)return ye(t),null}else 2*te()-o.renderingStartTime>Jn&&n!==1073741824&&(t.flags|=128,r=!0,ir(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=te(),t.sibling=null,n=q.current,V(q,r?n&1|2:n&1),t):(ye(t),null);case 22:case 23:return lu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(ye(t),t.subtreeFlags&6&&(t.flags|=8192)):ye(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Qy(e,t){switch(Ul(t),t.tag){case 1:return Ae(t.type)&&Bi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),W(Me),W(ve),ql(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yl(t),null;case 13:if(W(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(q),null;case 4:return Wn(),null;case 10:return Wl(t.type._context),null;case 22:case 23:return lu(),null;case 24:return null;default:return null}}var ai=!1,me=!1,Yy=typeof WeakSet=="function"?WeakSet:Set,O=null;function Mn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ee(e,t,r)}else n.current=null}function Ws(e,t,n){try{n()}catch(r){ee(e,t,r)}}var Ea=!1;function qy(e,t){if(Ns=ji,e=ef(),Dl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,a=0,c=0,p=e,d=null;t:for(;;){for(var m;p!==n||i!==0&&p.nodeType!==3||(l=s+i),p!==o||r!==0&&p.nodeType!==3||(u=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(m=p.firstChild)!==null;)d=p,p=m;for(;;){if(p===e)break t;if(d===n&&++a===i&&(l=s),d===o&&++c===r&&(u=s),(m=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=m}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Os={focusedElem:e,selectionRange:n},ji=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,R=w.memoizedState,h=t.stateNode,f=h.getSnapshotBeforeUpdate(t.elementType===t.type?S:Ye(t.type,S),R);h.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(k){ee(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return w=Ea,Ea=!1,w}function vr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ws(t,n,o)}i=i.next}while(i!==r)}}function po(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Hs(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Xf(e){var t=e.alternate;t!==null&&(e.alternate=null,Xf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[st],delete t[$r],delete t[Ps],delete t[Py],delete t[$y])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Zf(e){return e.tag===5||e.tag===3||e.tag===4}function Ca(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Js(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(Js(e,t,n),e=e.sibling;e!==null;)Js(e,t,n),e=e.sibling}function Qs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Qs(e,t,n),e=e.sibling;e!==null;)Qs(e,t,n),e=e.sibling}var ce=null,qe=!1;function Et(e,t,n){for(n=n.child;n!==null;)Gf(e,t,n),n=n.sibling}function Gf(e,t,n){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(oo,n)}catch{}switch(n.tag){case 5:me||Mn(n,t);case 6:var r=ce,i=qe;ce=null,Et(e,t,n),ce=r,qe=i,ce!==null&&(qe?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(qe?(e=ce,n=n.stateNode,e.nodeType===8?Ko(e.parentNode,n):e.nodeType===1&&Ko(e,n),Nr(e)):Ko(ce,n.stateNode));break;case 4:r=ce,i=qe,ce=n.stateNode.containerInfo,qe=!0,Et(e,t,n),ce=r,qe=i;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Ws(n,t,s),i=i.next}while(i!==r)}Et(e,t,n);break;case 1:if(!me&&(Mn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ee(n,t,l)}Et(e,t,n);break;case 21:Et(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,Et(e,t,n),me=r):Et(e,t,n);break;default:Et(e,t,n)}}function xa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Yy),t.forEach(function(r){var i=om.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Qe(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:ce=l.stateNode,qe=!1;break e;case 3:ce=l.stateNode.containerInfo,qe=!0;break e;case 4:ce=l.stateNode.containerInfo,qe=!0;break e}l=l.return}if(ce===null)throw Error(E(160));Gf(o,s,i),ce=null,qe=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(a){ee(i,t,a)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ed(t,e),t=t.sibling}function ed(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qe(t,e),it(e),r&4){try{vr(3,e,e.return),po(3,e)}catch(S){ee(e,e.return,S)}try{vr(5,e,e.return)}catch(S){ee(e,e.return,S)}}break;case 1:Qe(t,e),it(e),r&512&&n!==null&&Mn(n,n.return);break;case 5:if(Qe(t,e),it(e),r&512&&n!==null&&Mn(n,n.return),e.flags&32){var i=e.stateNode;try{Cr(i,"")}catch(S){ee(e,e.return,S)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Sc(i,o),vs(l,s);var a=vs(l,o);for(s=0;s<u.length;s+=2){var c=u[s],p=u[s+1];c==="style"?Rc(i,p):c==="dangerouslySetInnerHTML"?Cc(i,p):c==="children"?Cr(i,p):Rl(i,c,p,a)}switch(l){case"input":hs(i,o);break;case"textarea":_c(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?Pn(i,!!o.multiple,m,!1):d!==!!o.multiple&&(o.defaultValue!=null?Pn(i,!!o.multiple,o.defaultValue,!0):Pn(i,!!o.multiple,o.multiple?[]:"",!1))}i[$r]=o}catch(S){ee(e,e.return,S)}}break;case 6:if(Qe(t,e),it(e),r&4){if(e.stateNode===null)throw Error(E(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(S){ee(e,e.return,S)}}break;case 3:if(Qe(t,e),it(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Nr(t.containerInfo)}catch(S){ee(e,e.return,S)}break;case 4:Qe(t,e),it(e);break;case 13:Qe(t,e),it(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(ou=te())),r&4&&xa(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(me=(a=me)||c,Qe(t,e),me=a):Qe(t,e),it(e),r&8192){if(a=e.memoizedState!==null,(e.stateNode.isHidden=a)&&!c&&e.mode&1)for(O=e,c=e.child;c!==null;){for(p=O=c;O!==null;){switch(d=O,m=d.child,d.tag){case 0:case 11:case 14:case 15:vr(4,d,d.return);break;case 1:Mn(d,d.return);var w=d.stateNode;if(typeof w.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(S){ee(r,n,S)}}break;case 5:Mn(d,d.return);break;case 22:if(d.memoizedState!==null){Ta(p);continue}}m!==null?(m.return=d,O=m):Ta(p)}c=c.sibling}e:for(c=null,p=e;;){if(p.tag===5){if(c===null){c=p;try{i=p.stateNode,a?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=p.stateNode,u=p.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=xc("display",s))}catch(S){ee(e,e.return,S)}}}else if(p.tag===6){if(c===null)try{p.stateNode.nodeValue=a?"":p.memoizedProps}catch(S){ee(e,e.return,S)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;c===p&&(c=null),p=p.return}c===p&&(c=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Qe(t,e),it(e),r&4&&xa(e);break;case 21:break;default:Qe(t,e),it(e)}}function it(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Zf(n)){var r=n;break e}n=n.return}throw Error(E(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Cr(i,""),r.flags&=-33);var o=Ca(e);Qs(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=Ca(e);Js(e,l,s);break;default:throw Error(E(161))}}catch(u){ee(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xy(e,t,n){O=e,td(e)}function td(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var i=O,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||ai;if(!s){var l=i.alternate,u=l!==null&&l.memoizedState!==null||me;l=ai;var a=me;if(ai=s,(me=u)&&!a)for(O=i;O!==null;)s=O,u=s.child,s.tag===22&&s.memoizedState!==null?Na(i):u!==null?(u.return=s,O=u):Na(i);for(;o!==null;)O=o,td(o),o=o.sibling;O=i,ai=l,me=a}Ra(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,O=o):Ra(e)}}function Ra(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:me||po(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!me)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ye(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ca(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ca(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var a=t.alternate;if(a!==null){var c=a.memoizedState;if(c!==null){var p=c.dehydrated;p!==null&&Nr(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}me||t.flags&512&&Hs(t)}catch(d){ee(t,t.return,d)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function Ta(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function Na(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{po(4,t)}catch(u){ee(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){ee(t,i,u)}}var o=t.return;try{Hs(t)}catch(u){ee(t,o,u)}break;case 5:var s=t.return;try{Hs(t)}catch(u){ee(t,s,u)}}}catch(u){ee(t,t.return,u)}if(t===e){O=null;break}var l=t.sibling;if(l!==null){l.return=t.return,O=l;break}O=t.return}}var Zy=Math.ceil,qi=_t.ReactCurrentDispatcher,ru=_t.ReactCurrentOwner,be=_t.ReactCurrentBatchConfig,F=0,ae=null,ne=null,de=0,$e=0,An=Wt(0),se=0,Dr=null,cn=0,yo=0,iu=0,wr=null,Te=null,ou=0,Jn=1/0,dt=null,Xi=!1,Ys=null,It=null,ci=!1,Ot=null,Zi=0,kr=0,qs=null,Ei=-1,Ci=0;function Se(){return F&6?te():Ei!==-1?Ei:Ei=te()}function jt(e){return e.mode&1?F&2&&de!==0?de&-de:Iy.transition!==null?(Ci===0&&(Ci=Fc()),Ci):(e=B,e!==0||(e=window.event,e=e===void 0?16:Wc(e.type)),e):1}function et(e,t,n,r){if(50<kr)throw kr=0,qs=null,Error(E(185));Ur(e,n,r),(!(F&2)||e!==ae)&&(e===ae&&(!(F&2)&&(yo|=n),se===4&&Tt(e,de)),Pe(e,r),n===1&&F===0&&!(t.mode&1)&&(Jn=te()+500,co&&Ht()))}function Pe(e,t){var n=e.callbackNode;Ip(e,t);var r=Ii(e,e===ae?de:0);if(r===0)n!==null&&zu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zu(n),t===1)e.tag===0?Ly(Oa.bind(null,e)):ff(Oa.bind(null,e)),My(function(){!(F&6)&&Ht()}),n=null;else{switch(Dc(r)){case 1:n=Al;break;case 4:n=jc;break;case 16:n=Li;break;case 536870912:n=zc;break;default:n=Li}n=ad(n,nd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nd(e,t){if(Ei=-1,Ci=0,F&6)throw Error(E(327));var n=e.callbackNode;if(zn()&&e.callbackNode!==n)return null;var r=Ii(e,e===ae?de:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Gi(e,r);else{t=r;var i=F;F|=2;var o=id();(ae!==e||de!==t)&&(dt=null,Jn=te()+500,en(e,t));do try{tm();break}catch(l){rd(e,l)}while(!0);bl(),qi.current=o,F=i,ne!==null?t=0:(ae=null,de=0,t=se)}if(t!==0){if(t===2&&(i=Es(e),i!==0&&(r=i,t=Xs(e,i))),t===1)throw n=Dr,en(e,0),Tt(e,r),Pe(e,te()),n;if(t===6)Tt(e,r);else{if(i=e.current.alternate,!(r&30)&&!Gy(i)&&(t=Gi(e,r),t===2&&(o=Es(e),o!==0&&(r=o,t=Xs(e,o))),t===1))throw n=Dr,en(e,0),Tt(e,r),Pe(e,te()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(E(345));case 2:qt(e,Te,dt);break;case 3:if(Tt(e,r),(r&130023424)===r&&(t=ou+500-te(),10<t)){if(Ii(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Se(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=As(qt.bind(null,e,Te,dt),t);break}qt(e,Te,dt);break;case 4:if(Tt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Ge(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Zy(r/1960))-r,10<r){e.timeoutHandle=As(qt.bind(null,e,Te,dt),r);break}qt(e,Te,dt);break;case 5:qt(e,Te,dt);break;default:throw Error(E(329))}}}return Pe(e,te()),e.callbackNode===n?nd.bind(null,e):null}function Xs(e,t){var n=wr;return e.current.memoizedState.isDehydrated&&(en(e,t).flags|=256),e=Gi(e,t),e!==2&&(t=Te,Te=n,t!==null&&Zs(t)),e}function Zs(e){Te===null?Te=e:Te.push.apply(Te,e)}function Gy(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!tt(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tt(e,t){for(t&=~iu,t&=~yo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ge(t),r=1<<n;e[n]=-1,t&=~r}}function Oa(e){if(F&6)throw Error(E(327));zn();var t=Ii(e,0);if(!(t&1))return Pe(e,te()),null;var n=Gi(e,t);if(e.tag!==0&&n===2){var r=Es(e);r!==0&&(t=r,n=Xs(e,r))}if(n===1)throw n=Dr,en(e,0),Tt(e,t),Pe(e,te()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,qt(e,Te,dt),Pe(e,te()),null}function su(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(Jn=te()+500,co&&Ht())}}function fn(e){Ot!==null&&Ot.tag===0&&!(F&6)&&zn();var t=F;F|=1;var n=be.transition,r=B;try{if(be.transition=null,B=1,e)return e()}finally{B=r,be.transition=n,F=t,!(F&6)&&Ht()}}function lu(){$e=An.current,W(An)}function en(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Oy(n)),ne!==null)for(n=ne.return;n!==null;){var r=n;switch(Ul(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Bi();break;case 3:Wn(),W(Me),W(ve),ql();break;case 5:Yl(r);break;case 4:Wn();break;case 13:W(q);break;case 19:W(q);break;case 10:Wl(r.type._context);break;case 22:case 23:lu()}n=n.return}if(ae=e,ne=e=zt(e.current,null),de=$e=t,se=0,Dr=null,iu=yo=cn=0,Te=wr=null,Zt!==null){for(t=0;t<Zt.length;t++)if(n=Zt[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Zt=null}return e}function rd(e,t){do{var n=ne;try{if(bl(),ki.current=Yi,Qi){for(var r=Z.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Qi=!1}if(an=0,ue=ie=Z=null,gr=!1,jr=0,ru.current=null,n===null||n.return===null){se=1,Dr=t,ne=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=de,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var a=u,c=l,p=c.tag;if(!(c.mode&1)&&(p===0||p===11||p===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var m=ma(s);if(m!==null){m.flags&=-257,ga(m,s,l,o,t),m.mode&1&&ya(o,a,t),t=m,u=a;var w=t.updateQueue;if(w===null){var S=new Set;S.add(u),t.updateQueue=S}else w.add(u);break e}else{if(!(t&1)){ya(o,a,t),uu();break e}u=Error(E(426))}}else if(J&&l.mode&1){var R=ma(s);if(R!==null){!(R.flags&65536)&&(R.flags|=256),ga(R,s,l,o,t),Kl(Hn(u,l));break e}}o=u=Hn(u,l),se!==4&&(se=2),wr===null?wr=[o]:wr.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var h=Bf(o,u,t);aa(o,h);break e;case 1:l=u;var f=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof f.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(It===null||!It.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=Uf(o,l,t);aa(o,k);break e}}o=o.return}while(o!==null)}sd(n)}catch(T){t=T,ne===n&&n!==null&&(ne=n=n.return);continue}break}while(!0)}function id(){var e=qi.current;return qi.current=Yi,e===null?Yi:e}function uu(){(se===0||se===3||se===2)&&(se=4),ae===null||!(cn&268435455)&&!(yo&268435455)||Tt(ae,de)}function Gi(e,t){var n=F;F|=2;var r=id();(ae!==e||de!==t)&&(dt=null,en(e,t));do try{em();break}catch(i){rd(e,i)}while(!0);if(bl(),F=n,qi.current=r,ne!==null)throw Error(E(261));return ae=null,de=0,se}function em(){for(;ne!==null;)od(ne)}function tm(){for(;ne!==null&&!Rp();)od(ne)}function od(e){var t=ud(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?sd(e):ne=t,ru.current=null}function sd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Qy(n,t),n!==null){n.flags&=32767,ne=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,ne=null;return}}else if(n=Jy(n,t,$e),n!==null){ne=n;return}if(t=t.sibling,t!==null){ne=t;return}ne=t=e}while(t!==null);se===0&&(se=5)}function qt(e,t,n){var r=B,i=be.transition;try{be.transition=null,B=1,nm(e,t,n,r)}finally{be.transition=i,B=r}return null}function nm(e,t,n,r){do zn();while(Ot!==null);if(F&6)throw Error(E(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(E(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(jp(e,o),e===ae&&(ne=ae=null,de=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ci||(ci=!0,ad(Li,function(){return zn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=be.transition,be.transition=null;var s=B;B=1;var l=F;F|=4,ru.current=null,qy(e,n),ed(n,e),_y(Os),ji=!!Ns,Os=Ns=null,e.current=n,Xy(n),Tp(),F=l,B=s,be.transition=o}else e.current=n;if(ci&&(ci=!1,Ot=e,Zi=i),o=e.pendingLanes,o===0&&(It=null),Mp(n.stateNode),Pe(e,te()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Xi)throw Xi=!1,e=Ys,Ys=null,e;return Zi&1&&e.tag!==0&&zn(),o=e.pendingLanes,o&1?e===qs?kr++:(kr=0,qs=e):kr=0,Ht(),null}function zn(){if(Ot!==null){var e=Dc(Zi),t=be.transition,n=B;try{if(be.transition=null,B=16>e?16:e,Ot===null)var r=!1;else{if(e=Ot,Ot=null,Zi=0,F&6)throw Error(E(331));var i=F;for(F|=4,O=e.current;O!==null;){var o=O,s=o.child;if(O.flags&16){var l=o.deletions;if(l!==null){for(var u=0;u<l.length;u++){var a=l[u];for(O=a;O!==null;){var c=O;switch(c.tag){case 0:case 11:case 15:vr(8,c,o)}var p=c.child;if(p!==null)p.return=c,O=p;else for(;O!==null;){c=O;var d=c.sibling,m=c.return;if(Xf(c),c===a){O=null;break}if(d!==null){d.return=m,O=d;break}O=m}}}var w=o.alternate;if(w!==null){var S=w.child;if(S!==null){w.child=null;do{var R=S.sibling;S.sibling=null,S=R}while(S!==null)}}O=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,O=s;else e:for(;O!==null;){if(o=O,o.flags&2048)switch(o.tag){case 0:case 11:case 15:vr(9,o,o.return)}var h=o.sibling;if(h!==null){h.return=o.return,O=h;break e}O=o.return}}var f=e.current;for(O=f;O!==null;){s=O;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,O=y;else e:for(s=f;O!==null;){if(l=O,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:po(9,l)}}catch(T){ee(l,l.return,T)}if(l===s){O=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,O=k;break e}O=l.return}}if(F=i,Ht(),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(oo,e)}catch{}r=!0}return r}finally{B=n,be.transition=t}}return!1}function Ma(e,t,n){t=Hn(n,t),t=Bf(e,t,1),e=Lt(e,t,1),t=Se(),e!==null&&(Ur(e,1,t),Pe(e,t))}function ee(e,t,n){if(e.tag===3)Ma(e,e,n);else for(;t!==null;){if(t.tag===3){Ma(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(It===null||!It.has(r))){e=Hn(n,e),e=Uf(t,e,1),t=Lt(t,e,1),e=Se(),t!==null&&(Ur(t,1,e),Pe(t,e));break}}t=t.return}}function rm(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Se(),e.pingedLanes|=e.suspendedLanes&n,ae===e&&(de&n)===n&&(se===4||se===3&&(de&130023424)===de&&500>te()-ou?en(e,0):iu|=n),Pe(e,t)}function ld(e,t){t===0&&(e.mode&1?(t=ei,ei<<=1,!(ei&130023424)&&(ei=4194304)):t=1);var n=Se();e=kt(e,t),e!==null&&(Ur(e,t,n),Pe(e,n))}function im(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ld(e,n)}function om(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),ld(e,n)}var ud;ud=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,Hy(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,J&&t.flags&1048576&&df(t,Vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_i(e,t),e=t.pendingProps;var i=Kn(t,ve.current);jn(t,n),i=Zl(null,t,r,e,i,n);var o=Gl();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(r)?(o=!0,Ui(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Jl(t),i.updater=ho,t.stateNode=i,i._reactInternals=t,Fs(t,r,e,n),t=Us(null,t,r,!0,o,n)):(t.tag=0,J&&o&&Bl(t),we(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_i(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lm(r),e=Ye(r,e),i){case 0:t=Bs(null,t,r,e,n);break e;case 1:t=ka(null,t,r,e,n);break e;case 11:t=va(null,t,r,e,n);break e;case 14:t=wa(null,t,r,Ye(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Bs(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),ka(e,t,r,i,n);case 3:e:{if(Wf(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,i=o.element,vf(e,t),Hi(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Hn(Error(E(423)),t),t=Sa(e,t,r,n,i);break e}else if(r!==i){i=Hn(Error(E(424)),t),t=Sa(e,t,r,n,i);break e}else for(Le=$t(t.stateNode.containerInfo.firstChild),Ie=t,J=!0,Ze=null,n=mf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===i){t=St(e,t,n);break e}we(e,t,r,n)}t=t.child}return t;case 5:return wf(t),e===null&&Is(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Ms(r,i)?s=null:o!==null&&Ms(r,o)&&(t.flags|=32),bf(e,t),we(e,t,s,n),t.child;case 6:return e===null&&Is(t),null;case 13:return Hf(e,t,n);case 4:return Ql(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bn(t,null,r,n):we(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),va(e,t,r,i,n);case 7:return we(e,t,t.pendingProps,n),t.child;case 8:return we(e,t,t.pendingProps.children,n),t.child;case 12:return we(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,V(bi,r._currentValue),r._currentValue=s,o!==null)if(tt(o.value,s)){if(o.children===i.children&&!Me.current){t=St(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=gt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?u.next=u:(u.next=c.next,c.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),js(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(E(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),js(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}we(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,jn(t,n),i=We(i),r=r(i),t.flags|=1,we(e,t,r,n),t.child;case 14:return r=t.type,i=Ye(r,t.pendingProps),i=Ye(r.type,i),wa(e,t,r,i,n);case 15:return Kf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),_i(e,t),t.tag=1,Ae(r)?(e=!0,Ui(t)):e=!1,jn(t,n),Df(t,r,i),Fs(t,r,i,n),Us(null,t,r,!0,e,n);case 19:return Jf(e,t,n);case 22:return Vf(e,t,n)}throw Error(E(156,t.tag))};function ad(e,t){return Ic(e,t)}function sm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ve(e,t,n,r){return new sm(e,t,n,r)}function au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lm(e){if(typeof e=="function")return au(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Nl)return 11;if(e===Ol)return 14}return 2}function zt(e,t){var n=e.alternate;return n===null?(n=Ve(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xi(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")au(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Sn:return tn(n.children,i,o,t);case Tl:s=8,i|=8;break;case us:return e=Ve(12,n,t,i|2),e.elementType=us,e.lanes=o,e;case as:return e=Ve(13,n,t,i),e.elementType=as,e.lanes=o,e;case cs:return e=Ve(19,n,t,i),e.elementType=cs,e.lanes=o,e;case vc:return mo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mc:s=10;break e;case gc:s=9;break e;case Nl:s=11;break e;case Ol:s=14;break e;case Ct:s=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Ve(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function tn(e,t,n,r){return e=Ve(7,e,r,t),e.lanes=n,e}function mo(e,t,n,r){return e=Ve(22,e,r,t),e.elementType=vc,e.lanes=n,e.stateNode={isHidden:!1},e}function qo(e,t,n){return e=Ve(6,e,null,t),e.lanes=n,e}function Xo(e,t,n){return t=Ve(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function um(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ao(0),this.expirationTimes=Ao(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ao(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function cu(e,t,n,r,i,o,s,l,u){return e=new um(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ve(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jl(o),e}function am(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:kn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cd(e){if(!e)return Ut;e=e._reactInternals;e:{if(pn(e)!==e||e.tag!==1)throw Error(E(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ae(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(E(171))}if(e.tag===1){var n=e.type;if(Ae(n))return cf(e,n,t)}return t}function fd(e,t,n,r,i,o,s,l,u){return e=cu(n,r,!0,e,i,o,s,l,u),e.context=cd(null),n=e.current,r=Se(),i=jt(n),o=gt(r,i),o.callback=t??null,Lt(n,o,i),e.current.lanes=i,Ur(e,i,r),Pe(e,r),e}function go(e,t,n,r){var i=t.current,o=Se(),s=jt(i);return n=cd(n),t.context===null?t.context=n:t.pendingContext=n,t=gt(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Lt(i,t,s),e!==null&&(et(e,i,s,o),wi(e,i,s)),s}function eo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Aa(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fu(e,t){Aa(e,t),(e=e.alternate)&&Aa(e,t)}function cm(){return null}var dd=typeof reportError=="function"?reportError:function(e){console.error(e)};function du(e){this._internalRoot=e}vo.prototype.render=du.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));go(e,t,null,null)};vo.prototype.unmount=du.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fn(function(){go(null,e,null,null)}),t[wt]=null}};function vo(e){this._internalRoot=e}vo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&t!==0&&t<Rt[n].priority;n++);Rt.splice(n,0,e),n===0&&bc(e)}};function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function wo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Pa(){}function fm(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var a=eo(s);o.call(a)}}var s=fd(t,r,e,0,null,!1,!1,"",Pa);return e._reactRootContainer=s,e[wt]=s.current,Ar(e.nodeType===8?e.parentNode:e),fn(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var a=eo(u);l.call(a)}}var u=cu(e,0,!1,null,null,!1,!1,"",Pa);return e._reactRootContainer=u,e[wt]=u.current,Ar(e.nodeType===8?e.parentNode:e),fn(function(){go(t,u,n,r)}),u}function ko(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var u=eo(s);l.call(u)}}go(t,s,e,i)}else s=fm(n,t,e,i,r);return eo(s)}Bc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ar(t.pendingLanes);n!==0&&(Pl(t,n|1),Pe(t,te()),!(F&6)&&(Jn=te()+500,Ht()))}break;case 13:fn(function(){var r=kt(e,1);if(r!==null){var i=Se();et(r,e,1,i)}}),fu(e,1)}};$l=function(e){if(e.tag===13){var t=kt(e,134217728);if(t!==null){var n=Se();et(t,e,134217728,n)}fu(e,134217728)}};Uc=function(e){if(e.tag===13){var t=jt(e),n=kt(e,t);if(n!==null){var r=Se();et(n,e,t,r)}fu(e,t)}};Kc=function(){return B};Vc=function(e,t){var n=B;try{return B=e,t()}finally{B=n}};ks=function(e,t,n){switch(t){case"input":if(hs(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ao(r);if(!i)throw Error(E(90));kc(r),hs(r,i)}}}break;case"textarea":_c(e,n);break;case"select":t=n.value,t!=null&&Pn(e,!!n.multiple,t,!1)}};Oc=su;Mc=fn;var dm={usingClientEntryPoint:!1,Events:[Vr,xn,ao,Tc,Nc,su]},or={findFiberByHostInstance:Xt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hm={bundleType:or.bundleType,version:or.version,rendererPackageName:or.rendererPackageName,rendererConfig:or.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_t.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=$c(e),e===null?null:e.stateNode},findFiberByHostInstance:or.findFiberByHostInstance||cm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fi.isDisabled&&fi.supportsFiber)try{oo=fi.inject(hm),ut=fi}catch{}}Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dm;Fe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hu(t))throw Error(E(200));return am(e,t,null,n)};Fe.createRoot=function(e,t){if(!hu(e))throw Error(E(299));var n=!1,r="",i=dd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=cu(e,1,!1,null,null,n,!1,r,i),e[wt]=t.current,Ar(e.nodeType===8?e.parentNode:e),new du(t)};Fe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=$c(t),e=e===null?null:e.stateNode,e};Fe.flushSync=function(e){return fn(e)};Fe.hydrate=function(e,t,n){if(!wo(t))throw Error(E(200));return ko(null,e,t,!0,n)};Fe.hydrateRoot=function(e,t,n){if(!hu(e))throw Error(E(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=dd;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=fd(t,null,e,1,n??null,i,!1,o,s),e[wt]=t.current,Ar(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new vo(t)};Fe.render=function(e,t,n){if(!wo(t))throw Error(E(200));return ko(null,e,t,!1,n)};Fe.unmountComponentAtNode=function(e){if(!wo(e))throw Error(E(40));return e._reactRootContainer?(fn(function(){ko(null,null,e,!1,function(){e._reactRootContainer=null,e[wt]=null})}),!0):!1};Fe.unstable_batchedUpdates=su;Fe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!wo(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return ko(e,t,n,!1,r)};Fe.version="18.3.1-next-f1338f8080-20240426";function hd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hd)}catch(e){console.error(e)}}hd(),dc.exports=Fe;var pm=dc.exports,pd,$a=pm;pd=$a.createRoot,$a.hydrateRoot;const ft=Object.create(null);ft.open="0";ft.close="1";ft.ping="2";ft.pong="3";ft.message="4";ft.upgrade="5";ft.noop="6";const Ri=Object.create(null);Object.keys(ft).forEach(e=>{Ri[ft[e]]=e});const Gs={type:"error",data:"parser error"},yd=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",md=typeof ArrayBuffer=="function",gd=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pu=({type:e,data:t},n,r)=>yd&&t instanceof Blob?n?r(t):La(t,r):md&&(t instanceof ArrayBuffer||gd(t))?n?r(t):La(new Blob([t]),r):r(ft[e]+(t||"")),La=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Ia(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Zo;function ym(e,t){if(yd&&e.data instanceof Blob)return e.data.arrayBuffer().then(Ia).then(t);if(md&&(e.data instanceof ArrayBuffer||gd(e.data)))return t(Ia(e.data));pu(e,!1,n=>{Zo||(Zo=new TextEncoder),t(Zo.encode(n))})}const ja="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<ja.length;e++)fr[ja.charCodeAt(e)]=e;const mm=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const a=new ArrayBuffer(t),c=new Uint8Array(a);for(r=0;r<n;r+=4)o=fr[e.charCodeAt(r)],s=fr[e.charCodeAt(r+1)],l=fr[e.charCodeAt(r+2)],u=fr[e.charCodeAt(r+3)],c[i++]=o<<2|s>>4,c[i++]=(s&15)<<4|l>>2,c[i++]=(l&3)<<6|u&63;return a},gm=typeof ArrayBuffer=="function",yu=(e,t)=>{if(typeof e!="string")return{type:"message",data:vd(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:vm(e.substring(1),t)}:Ri[n]?e.length>1?{type:Ri[n],data:e.substring(1)}:{type:Ri[n]}:Gs},vm=(e,t)=>{if(gm){const n=mm(e);return vd(n,t)}else return{base64:!0,data:e}},vd=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},wd="",wm=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{pu(o,!1,l=>{r[s]=l,++i===n&&t(r.join(wd))})})},km=(e,t)=>{const n=e.split(wd),r=[];for(let i=0;i<n.length;i++){const o=yu(n[i],t);if(r.push(o),o.type==="error")break}return r};function Sm(){return new TransformStream({transform(e,t){ym(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Go;function di(e){return e.reduce((t,n)=>t+n.length,0)}function hi(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function _m(e,t){Go||(Go=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(r===0){if(di(n)<1)break;const u=hi(n,1);o=(u[0]&128)===128,i=u[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(di(n)<2)break;const u=hi(n,2);i=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(di(n)<8)break;const u=hi(n,8),a=new DataView(u.buffer,u.byteOffset,u.length),c=a.getUint32(0);if(c>Math.pow(2,21)-1){l.enqueue(Gs);break}i=c*Math.pow(2,32)+a.getUint32(4),r=3}else{if(di(n)<i)break;const u=hi(n,i);l.enqueue(yu(o?u:Go.decode(u),t)),r=0}if(i===0||i>e){l.enqueue(Gs);break}}}})}const kd=4;function re(e){if(e)return Em(e)}function Em(e){for(var t in re.prototype)e[t]=re.prototype[t];return e}re.prototype.on=re.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};re.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};re.prototype.off=re.prototype.removeListener=re.prototype.removeAllListeners=re.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};re.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};re.prototype.emitReserved=re.prototype.emit;re.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};re.prototype.hasListeners=function(e){return!!this.listeners(e).length};const So=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ke=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Cm="arraybuffer";function Sd(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const xm=Ke.setTimeout,Rm=Ke.clearTimeout;function _o(e,t){t.useNativeTimers?(e.setTimeoutFn=xm.bind(Ke),e.clearTimeoutFn=Rm.bind(Ke)):(e.setTimeoutFn=Ke.setTimeout.bind(Ke),e.clearTimeoutFn=Ke.clearTimeout.bind(Ke))}const Tm=1.33;function Nm(e){return typeof e=="string"?Om(e):Math.ceil((e.byteLength||e.size)*Tm)}function Om(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function _d(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Mm(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Am(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class Pm extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class mu extends re{constructor(t){super(),this.writable=!1,_o(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Pm(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=yu(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Mm(t);return n.length?"?"+n:""}}class $m extends mu{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};km(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,wm(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=_d()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Ed=!1;try{Ed=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Lm=Ed;function Im(){}class jm extends $m{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ct extends re{constructor(t,n,r){super(),this.createRequest=t,_o(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Sd(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=ct.requestsCount++,ct.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Im,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ct.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}ct.requestsCount=0;ct.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",za);else if(typeof addEventListener=="function"){const e="onpagehide"in Ke?"pagehide":"unload";addEventListener(e,za,!1)}}function za(){for(let e in ct.requests)ct.requests.hasOwnProperty(e)&&ct.requests[e].abort()}const zm=function(){const e=Cd({xdomain:!1});return e&&e.responseType!==null}();class Fm extends jm{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=zm&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ct(Cd,this.uri(),t)}}function Cd(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Lm))return new XMLHttpRequest}catch{}if(!t)try{return new Ke[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const xd=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Dm extends mu{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=xd?{}:Sd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;pu(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&So(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=_d()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const es=Ke.WebSocket||Ke.MozWebSocket;class Bm extends Dm{createSocket(t,n,r){return xd?new es(t,n,r):n?new es(t,n):new es(t)}doWrite(t,n){this.ws.send(n)}}class Um extends mu{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=_m(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Sm();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:u})=>{l||(this.onPacket(u),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&So(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Km={websocket:Bm,webtransport:Um,polling:Fm},Vm=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bm=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function el(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Vm.exec(e||""),o={},s=14;for(;s--;)o[bm[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Wm(o,o.path),o.queryKey=Hm(o,o.query),o}function Wm(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Hm(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const tl=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ti=[];tl&&addEventListener("offline",()=>{Ti.forEach(e=>e())},!1);class Ft extends re{constructor(t,n){if(super(),this.binaryType=Cm,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=el(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=el(n.host).host);_o(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Am(this.opts.query)),tl&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ti.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=kd,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ft.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ft.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Nm(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,So(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ft.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),tl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ti.indexOf(this._offlineEventListener);r!==-1&&Ti.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ft.protocol=kd;class Jm extends Ft{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ft.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ft.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=p=>{const d=new Error("probe error: "+p);d.transport=n.name,o(),this.emitReserved("upgradeError",d)};function l(){s("transport closed")}function u(){s("socket closed")}function a(p){n&&p.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",u),this.off("upgrading",a)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",u),this.once("upgrading",a),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Qm=class extends Jm{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Km[i]).filter(i=>!!i)),super(t,r)}};function Ym(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=el(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const qm=typeof ArrayBuffer=="function",Xm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Rd=Object.prototype.toString,Zm=typeof Blob=="function"||typeof Blob<"u"&&Rd.call(Blob)==="[object BlobConstructor]",Gm=typeof File=="function"||typeof File<"u"&&Rd.call(File)==="[object FileConstructor]";function gu(e){return qm&&(e instanceof ArrayBuffer||Xm(e))||Zm&&e instanceof Blob||Gm&&e instanceof File}function Ni(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ni(e[n]))return!0;return!1}if(gu(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ni(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ni(e[n]))return!0;return!1}function eg(e){const t=[],n=e.data,r=e;return r.data=nl(n,t),r.attachments=t.length,{packet:r,buffers:t}}function nl(e,t){if(!e)return e;if(gu(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=nl(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=nl(e[r],t));return n}return e}function tg(e,t){return e.data=rl(e.data,t),delete e.attachments,e}function rl(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=rl(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=rl(e[n],t));return e}const ng=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],rg=5;var z;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(z||(z={}));class ig{constructor(t){this.replacer=t}encode(t){return(t.type===z.EVENT||t.type===z.ACK)&&Ni(t)?this.encodeAsBinary({type:t.type===z.EVENT?z.BINARY_EVENT:z.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===z.BINARY_EVENT||t.type===z.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=eg(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Fa(e){return Object.prototype.toString.call(e)==="[object Object]"}class vu extends re{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===z.BINARY_EVENT;r||n.type===z.BINARY_ACK?(n.type=r?z.EVENT:z.ACK,this.reconstructor=new og(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(gu(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(z[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===z.BINARY_EVENT||r.type===z.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(vu.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case z.CONNECT:return Fa(n);case z.DISCONNECT:return n===void 0;case z.CONNECT_ERROR:return typeof n=="string"||Fa(n);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&ng.indexOf(n[0])===-1);case z.ACK:case z.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class og{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=tg(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const sg=Object.freeze(Object.defineProperty({__proto__:null,Decoder:vu,Encoder:ig,get PacketType(){return z},protocol:rg},Symbol.toStringTag,{value:"Module"}));function Xe(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const lg=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Td extends re{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Xe(t,"open",this.onopen.bind(this)),Xe(t,"packet",this.onpacket.bind(this)),Xe(t,"error",this.onerror.bind(this)),Xe(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(lg.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:z.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,p=n.pop();this._registerAckCallback(c,p),s.id=c}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,u=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),s=(...l)=>{this.io.clearTimeoutFn(o),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,l)=>s?i(s):r(l);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case z.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case z.EVENT:case z.BINARY_EVENT:this.onevent(t);break;case z.ACK:case z.BINARY_ACK:this.onack(t);break;case z.DISCONNECT:this.ondisconnect();break;case z.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:z.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Xn(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Xn.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Xn.prototype.reset=function(){this.attempts=0};Xn.prototype.setMin=function(e){this.ms=e};Xn.prototype.setMax=function(e){this.max=e};Xn.prototype.setJitter=function(e){this.jitter=e};class il extends re{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,_o(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Xn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||sg;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Qm(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Xe(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=Xe(n,"error",o);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Xe(t,"ping",this.onping.bind(this)),Xe(t,"data",this.ondata.bind(this)),Xe(t,"error",this.onerror.bind(this)),Xe(t,"close",this.onclose.bind(this)),Xe(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){So(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Td(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const sr={};function Oi(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Ym(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=sr[i]&&o in sr[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let u;return l?u=new il(r,t):(sr[i]||(sr[i]=new il(r,t)),u=sr[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(Oi,{Manager:il,Socket:Td,io:Oi,connect:Oi});class ug extends Map{set(t,n){return this.has(t)?(console.warn("Tried to set a key that already exists in an InvariantMap",{key:t,value:n}),this):super.set(t,n)}clear(){throw new Error("Cannot clear an InvariantMap")}}const Sr=class Sr{constructor(t){C(this,"type","continuity");C(this,"globals",[]);C(this,"actions",[]);C(this,"perspectives",[]);this.key=t}static create(t,n){const r=new Sr(t),{type:i,globals:o,actions:s,perspectives:l}=n(r),u={type:i,key:t,globals:o,actions:s,perspectives:l};return Sr.existing.set(t,u),u}add(...t){switch(t[0].type){case"atom":case"mutable_atom":this.globals.push(...t);break;case"transaction":this.actions.push(...t);break;case"atom_family":{const[r,i]=t;this.perspectives.push({type:"realtime_perspective",resourceAtoms:r,viewAtoms:i})}break}return this}};C(Sr,"existing",new ug);let ol=Sr;function ag(e){const{key:t,config:n}=e,r=ol.create(t,n),{actions:i}=r;for(const o of i)tc(t,o.key,_e.STORE);return rs(t,-1,_e.STORE),r}dn({key:"usersInRoomIndex",mutable:!0,default:()=>new lt,toJson:e=>e.toJSON(),fromJson:e=>lt.fromJSON(e)});dn({key:"roomIndex",default:()=>new lt,mutable:!0,toJson:e=>e.toJSON(),fromJson:e=>lt.fromJSON(e)});const cg={enteredAtEpoch:0},fg=kh({key:"usersInRooms",between:["room","user"],cardinality:"1:n"},cg);sh({key:"usersInMyRoomView",get:e=>({find:t})=>{const n=Ch(fg);return[t(n,e)]}});const wu=dn({key:"count",default:0}),Nd=lh({key:"incrementTX",do:({set:e})=>{e(wu,t=>t+1)}}),dg=ag({key:"countContinuity",config:e=>e.add(wu).add(Nd)});function hg(){return K.jsxs("svg",{id:"uuid-3d2d6be6-f179-42a3-9511-1e9ddeb8575f",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 101",children:[K.jsx("title",{children:"Tempest Games Logo"}),K.jsx("path",{d:"M155.76.93v59.89h-17.11V7.78h-13.69V.93h30.8Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M202.91,7.86h-13.18v17.03h13.18v6.84h-13.18v22.24h13.18v6.84h-30.29V.93h30.29v6.93Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M289.49.93v59.89h-17.11V7.78h-.43c-8.21,0-11.21,5.82-11.21,17.03v36.02h-16.25V24.8c0-11.21-2.99-17.03-11.21-17.03h-.43v53.04h-17.11V.93h18.74c9.92,0,15.31,4.96,18.14,11.21,2.82-6.25,8.21-11.21,18.14-11.21h18.73Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M352.82,29.68c0,11.72-6.42,19.16-24.55,19.16h-4.53v11.98h-17.11V1.1l46.2-.17v28.75ZM323.73,7.78v34.22h2.48c7.36,0,9.5-4.11,9.5-12.15V7.78h-11.98Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M396.8,7.86h-13.17v17.03h13.17v6.84h-13.17v22.24h13.17v6.84h-30.28V.93h30.28v6.93Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M425.9,12.57v14.03h27.89v16.94c0,12.75-1.71,18.13-16.43,18.13h-14.54c-9.58,0-14.03-2.74-14.03-11.97v-5.99h15.4v5.13c0,4.53.77,5.99,4.62,5.99h1.71c5.05,0,6.16-1.46,6.16-6.84v-14.54h-27.89v-16.68c0-13.52,3.85-16.68,18.82-16.68h12.83c8.81,0,13.17,1.54,13.17,10.78v7.19h-15.4v-6.5c0-3.42-1.03-4.62-4.45-4.62h-1.45c-4.28,0-6.42,1.46-6.42,5.65Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M500,7.78h-13.69v53.04h-17.11V.93h30.8v6.84Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M155.96,93.78v-3.57h-5.58v-7.14h13.39v17.85h-24.76v-28.56h24.76v7.14h-16.96v14.28h9.15Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M224.26,100.92h-8.25v-10.71h-8.25v3.57h4.68v7.14h-12.94v-17.85h16.51v-3.57h-16.51v-7.14h24.76v28.56Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M259.99,72.36h30.57v28.56h-7.81v-21.42h-3.57v21.42h-7.81v-21.42h-3.57v21.42h-7.81v-28.56Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M343.24,83.08v-3.57h-9.14v14.28h16.96v7.14h-24.76v-28.56h24.76v17.85h-13.38v-7.14h5.57Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M394.59,79.5v3.57h16.96v17.85h-24.76v-7.14h16.96v-3.57h-16.96v-17.85h24.76v7.14h-16.96Z",style:{fill:"#fff200",strokeWidth:0}}),K.jsx("path",{d:"M0,63.42v-20.84h20.83L0,63.42ZM100,.92v32.29h-35.42v8.33h-8.33V14.46h-22.92l1.04,7.29h9.38v19.79h-8.33v-8.33H0V.92h100ZM0,100.92v-26.04l6.25-1.04,25-26.04,1.04,1.05-10.42,18.75-4.16,7.29h13.54l3.13-3.12,8.33-22.92h1.04v41.66h3.12l9.38-8.33v-33.33h1.04l8.33,22.92,3.12,3.12h13.54l-4.17-7.29-10.42-19.8,1.04-1.04,25,27.09,6.25,1.04v26.04H0ZM100,42.59v20.84l-20.83-20.84h20.83Z",style:{fill:"#fff200",strokeWidth:0}})]})}function pg(){const e=Gh(wu),t=uh(Nd);return ap(dg),K.jsxs(K.Fragment,{children:[K.jsx("div",{children:K.jsx(hg,{})}),K.jsxs("div",{className:"card",children:[K.jsxs("button",{type:"button",onClick:()=>{t()},children:["count is ",e]}),K.jsx("p",{children:"Let's see how high we can count!"})]})]})}let gn;try{const e=localStorage.getItem("myId");e?gn=JSON.parse(e):(gn=Math.random().toString(),localStorage.setItem("myId",JSON.stringify(gn)))}catch{gn=Math.random().toString(),localStorage.setItem("myId",JSON.stringify(gn))}const yg=Oi("https://realtime.tempest.games/",{auth:{token:"test",username:gn}});pd(document.getElementById("root")).render(K.jsx(fe.StrictMode,{children:K.jsx(rp,{socket:yg,children:K.jsx(pg,{})})}));
|