tempest.games 0.1.35 → 0.1.37

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.
@@ -0,0 +1,62 @@
1
+ var $v=Object.defineProperty;var Jv=(s,n,i)=>n in s?$v(s,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[n]=i;var j=(s,n,i)=>Jv(s,typeof n!="symbol"?n+"":n,i);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&u(h)}).observe(document,{childList:!0,subtree:!0});function i(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(c){if(c.ep)return;c.ep=!0;const f=i(c);fetch(c.href,f)}})();var so={exports:{}},Ul={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var am;function Wv(){if(am)return Ul;am=1;var s=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(u,c,f){var h=null;if(f!==void 0&&(h=""+f),c.key!==void 0&&(h=""+c.key),"key"in c){f={};for(var y in c)y!=="key"&&(f[y]=c[y])}else f=c;return c=f.ref,{$$typeof:s,type:u,key:h,ref:c!==void 0?c:null,props:f}}return Ul.Fragment=n,Ul.jsx=i,Ul.jsxs=i,Ul}var im;function Fv(){return im||(im=1,so.exports=Wv()),so.exports}var q=Fv();function wm(s=Math.random){return s().toString(36).slice(2)}class bo extends Promise{constructor(i){let u,c;super((f,h)=>{u=f,c=h});j(this,"fate");j(this,"resolve");j(this,"reject");j(this,"done",!1);this.resolve=u,this.reject=c,this.use(i instanceof Promise?i:new Promise(i))}pass(i,u){i===this.fate&&(this.resolve(u),this.done=!0)}fail(i,u){i===this.fate&&(this.reject(u),this.done=!0)}use(i){if(i instanceof Promise){const u=i;this.fate=u,u.then(c=>{this.pass(u,c)},c=>{this.fail(u,c)})}else this.resolve(i),this.fate=void 0}}function Rm(s){return Object.entries(s)}const Iv=(s,n,i=Pe.STORE)=>qm(i,{key:`${s.key}:JSON`,get:({get:u})=>n.toJson(u(s)),set:({set:u},c)=>{u(s,n.fromJson(c))}});function ce(s){for(;s.child!==null;)s=s.child;return s}class We{constructor(){j(this,"Subscriber");j(this,"subscribers",new Map)}subscribe(n,i){return this.subscribers.set(n,i),()=>{this.unsubscribe(n)}}unsubscribe(n){this.subscribers.delete(n)}next(n){const i=this.subscribers.values();for(const u of i)u(n)}}class Pv extends We{constructor(i){super();j(this,"state");this.state=i}next(i){this.state=i,super.next(i)}}function Bo(s,n,i){const u={key:n.key,type:"atom_family"},c=s.families.get(n.key);c&&s.logger.error("❗","atom_family",n.key,`Overwriting an existing ${as(c)} "${c.key}" in store "${s.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const f=new We,y=Object.assign(p=>{const g=Ge(p),b={key:n.key,subKey:g},w=`${n.key}(${g})`,z=ce(s),B=n.default,Q={key:w,default:B instanceof Function?B(p):B};n.effects&&(Q.effects=n.effects(p));const K=Vu(z,Q,b);return f.next({type:"state_creation",token:K}),K},u,{subject:f,install:p=>Bo(p,n),internalRoles:i});return s.families.set(n.key,y),s.defaults.set(n.key,n.default),u}function Oi(s,n,i){const u={key:n.key,type:"readonly_selector_family"},c=s.families.get(n.key);c&&s.logger.error("❗","readonly_selector_family",n.key,`Overwriting an existing ${as(c)} "${c.key}" in store "${s.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const f=new We,y=Object.assign(p=>{const g=Ge(p),b={key:n.key,subKey:g},w=`${n.key}(${g})`,z=ce(s),B=Go(z,{key:w,get:n.get(p)},b);return f.next({type:"state_creation",token:B}),B},u,{internalRoles:i,subject:f,install:p=>Oi(p,n),default:p=>n.get(p)({get:(...b)=>Ft(s,...b),find:(...b)=>pt(s,...b),json:b=>Za(s,b)})});return s.families.set(n.key,y),u}function e0(s,n){return"set"in n?Qo(s,n):Oi(s,n)}class qo{constructor(n){j(this,"_buffer");j(this,"_index",0);let i;typeof n=="number"?i=n:i=n.length,this._buffer=Array.from({length:i})}get buffer(){return this._buffer}get index(){return this._index}add(n){this._buffer[this._index]=n,this._index=(this._index+1)%this._buffer.length}copy(){const n=new qo([...this._buffer]);return n._index=this._index,n}}const t0={atom_family:"atom",mutable_atom_family:"mutable_atom",selector_family:"selector",readonly_selector_family:"readonly_selector",molecule_family:"molecule"};function n0(s,n){const i=Ge(n),u=`${s.key}(${i})`,c=t0[s.type],f={key:u,type:c};return Object.assign(f,{family:{key:s.key,subKey:i}}),Object.assign(f,{counterfeit:!0}),f}function Mi(s){const n={key:s.key,type:s.type};return"family"in s&&(n.family=s.family),n}function Vt(s){return I0(Pe.STORE,s)}function _o(...s){return s.length===2?Ft(Pe.STORE,...s):Ft(Pe.STORE,...s)}function a0(s,n,i=Pe.STORE){return i.joins.set(s.key,new Lm(s,n,i)),{key:s.key,type:"join",a:s.between[0],b:s.between[1],cardinality:s.cardinality}}function i0(s){return eb(s,Pe.STORE)}const uo=s=>(n,i,u,c,...f)=>{console[s](`${n} ${i} "${u}" ${c}`,...f)},l0={error:uo("error"),info:uo("info"),warn:uo("warn")};class s0{constructor(n,i,u=l0){j(this,"logLevel");j(this,"filter");j(this,"logger");j(this,"error",(...n)=>{var i;(((i=this.filter)==null?void 0:i.call(this,...n))??!0)&&this.logLevel!==null&&this.logger.error(...n)});j(this,"info",(...n)=>{var i;(((i=this.filter)==null?void 0:i.call(this,...n))??!0)&&this.logLevel==="info"&&this.logger.info(...n)});j(this,"warn",(...n)=>{var i;(((i=this.filter)==null?void 0:i.call(this,...n))??!0)&&this.logLevel!=="error"&&this.logLevel!==null&&this.logger.warn(...n)});this.logLevel=n,this.filter=i,this.logger=u}}class u0{constructor(n=Pe.STORE){j(this,"store");this.store=n,b0("root",n)}allocate(n,i,u){return is(this.store,n,i,u)}fuse(n,i,u){return _0(this.store,n,i,u)}deallocate(n){ls(this.store,n)}claim(n,i,u){return Mu(this.store,n,i,u)}}class r0{constructor(n=Pe.STORE){j(this,"store");j(this,"realm");this.store=n,this.realm=new u0(n)}allocate(n,i,u){is(this.store,n,i,u)}deallocate(n){ls(this.store,n)}claim(n,i,u){Mu(this.store,n,i,u)}}function qa(s){return qm(Pe.STORE,s)}function c0(s){return e0(Pe.STORE,s)}function Zo(...s){s.length===2?Fe(Pe.STORE,...s):Fe(Pe.STORE,...s)}function Bn(s){return"epoch"in s.transactionMeta}function mt(s){return"phase"in s.transactionMeta}const o0=s=>{const n=ce(s);if(!mt(n)){s.logger.warn("🐞","transaction","???","abortTransaction called outside of a transaction. This is probably a bug in AtomIO.");return}s.logger.info("🪂","transaction",n.transactionMeta.update.key,"Aborting transaction"),n.parent.child=null};function Bt(s){return s[0].toUpperCase()+s.slice(1)}function as(s){return s.type.split("_").map(Bt).join(" ")}class Vo extends Error{constructor(n,i){super(`${as(n)} ${Ge(n.key)} not found in store "${i.config.name}".`)}}function Ho(s,n,i){return(...u)=>{const c=st(s,n);if(c)return c.run(u,i);throw new Vo(n,s)}}const km=s=>n=>s instanceof Function?s(n):s,qu=(s,n)=>{if(s.valueMap.has(n.key))return s.logger.info("📖",n.type,n.key,"reading cached value"),$0(n,s);switch(n.type){case"selector":case"readonly_selector":return s.logger.info("🧮",n.type,n.key,"computing value"),n.get();case"atom":case"mutable_atom":{const i=n.default;let u;return i instanceof Function?u=i():u=i,s.logger.info("💁","atom",n.key,"could not find cached value; using default",u),u}}},f0=(s,n)=>{if(s.operation.open){const i=performance.now();return s.logger.info("❗",n.type,n.key,`deferring setState at T-${i} until setState for "${s.operation.token.key}" is done`),i}s.operation={open:!0,done:new Set,prev:new Map,time:Date.now(),token:n},s.logger.info("⭕",n.type,n.key,`operation start in store "${s.config.name}"${mt(s)?` ${s.transactionMeta.phase} "${s.transactionMeta.update.key}"`:""}`)},d0=s=>{s.operation.open&&s.logger.info("🔴",s.operation.token.type,s.operation.token.key,`operation done in store "${s.config.name}"`),s.operation={open:!1},s.on.operationClose.next(s.operation)},h0=(s,n)=>s.operation.open?s.operation.done.has(n):(s.logger.error("🐞","unknown",n,"isDone called outside of an operation. This is probably a bug in AtomIO."),!0),Lo=(s,n)=>{if(!s.operation.open){s.logger.error("🐞","unknown",n,"markDone called outside of an operation. This is probably a bug in AtomIO.");return}s.operation.done.add(n)},y0=(s,n,i)=>{switch(n.type){case"mutable_atom":s.logger.info("📢",n.type,n.key,"is now (",i.newValue,") subscribers:",n.subject.subscribers);break;case"atom":case"selector":case"readonly_selector":s.logger.info("📢",n.type,n.key,"went (",i.oldValue,"->",i.newValue,") subscribers:",n.subject.subscribers)}n.subject.next(i)},lm=(s,n)=>{const i=ce(s),u=i.selectorAtoms.getRelatedKeys(n.key);if(i.logger.info("🧹",n.type,n.key,u?`evicting ${u.size} states downstream:`:"no downstream states",u??"to evict"),u){i.operation.open&&i.logger.info("🧹",n.type,n.key,`[ ${[...i.operation.done].join(", ")} ] already done`);for(const c of u)h0(i,c)||(J0(c,i),Lo(i,c))}},m0=(s,n,i)=>{const u=qu(s,n);let c=u;if(n.type==="mutable_atom"&&mt(s)){const{parent:h}=s;c=To(s,n,h)}c=km(i)(c),s.logger.info("📝","atom",n.key,"set to",c),c=za(s,n.key,c,n.subject),W0(s,n.key)&&F0(s,n.key),Lo(s,n.key),lm(s,n);const f={oldValue:u,newValue:c};if(!mt(s)){y0(s,n,f);return}if(s.on.transactionApplying.state===null){const{key:h}=n;if(Q0(f.newValue))return;const y={type:"atom_update",key:h,...f};n.family&&(y.family=n.family),s.transactionMeta.update.updates.push(y),s.logger.info("📁","atom",h,"stowed (",f.oldValue,"->",f.newValue,")")}else if(n.key.startsWith("*")){const h=n.key.slice(1),y=s.atoms.get(h);let p=s.valueMap.get(h);if(y.type==="mutable_atom"&&mt(s)){const{parent:b}=s;p=To(s,y,b)}p.do(f.newValue)===null&&lm(s,y)}},Mm=(s,n,i)=>{switch(n.type){case"atom":case"mutable_atom":m0(s,n,i);break;case"selector":n.set(i);break}};function p0(s,n){if(n.family){const i=s.families.get(n.family.key);if(i)return i}}function Fe(s,...n){let i,u,c,f;if(n.length===2?(i=n[0],f=n[1],u=p0(s,i)??null,u&&(c=i.family?ji(i.family.subKey):null,i=pt(s,u,c))):(u=n[0],c=n[1],f=n[2],i=pt(s,u,c)),"counterfeit"in i&&"family"in i){const p=i.family.subKey,g=s.disposalTraces.buffer.find(b=>(b==null?void 0:b.key)===p);s.logger.error("❌",i.type,i.key,`could not be set because it was not found in the store "${s.config.name}".`,g?`This state was previously disposed:
10
+ ${g.trace}`:"No previous disposal trace was found.");return}const h=f0(s,i);if(h){const p=s.on.operationClose.subscribe(`waiting to set "${i.key}" at T-${h}`,()=>{p(),s.logger.info("🟢",i.type,i.key,`resuming deferred setState from T-${h}`),Fe(s,i,f)});return}const y=st(s,i);Mm(s,y,f),d0(s)}function g0(s,n,i){const{key:u,newValue:c,oldValue:f}=n,h=s==="newValue"?c:f,y={key:u,type:"atom"};n.family&&Object.assign(y,{family:n.family}),Fe(i,y,h)}function v0(s){var i,u;const{stack:n}=s;return n?`
11
+ `+((u=(i=n.split(`
12
+ `))==null?void 0:i.slice(1))==null?void 0:u.join(`
13
+ `)):""}function b0(s,n=Pe.STORE){const i={key:s,stringKey:Ge(s),dependsOn:"any"};return n.molecules.set(Ge(s),i),s}function is(s,n,i,u="any"){const c=n,f=Ge(i),h=[],y=ce(s);if(Array.isArray(c))for(const b of c){const w=Ge(b);y.molecules.get(w)?s.moleculeGraph.set(w,f,{source:w}):h.push(w)}else{const b=Ge(c);y.molecules.get(b)?s.moleculeGraph.set(b,f,{source:b}):h.push(b)}h.length===0&&y.molecules.set(f,{key:i,stringKey:f,dependsOn:u});const p={type:"molecule_creation",key:i,provenance:c};mt(y)&&y.transactionMeta.phase==="building"?y.transactionMeta.update.updates.push(p):y.on.moleculeCreation.next(p);for(const b of h){const w=s.disposalTraces.buffer.find(z=>(z==null?void 0:z.key)===b);s.logger.error("❌","molecule",i,"allocation failed:",`Could not allocate to ${b} in store "${s.config.name}".`,w?`
14
+ ${b} was most recently disposed
15
+ ${w.trace}`:`No previous disposal trace for ${b} was found.`)}return i}function _0(s,n,i,u){const c=`T$--${n}==${i}++${u}`;return is(s,[i,u],c,"all"),c}function ls(s,n){const i=Ge(n),u=s.molecules.get(i);if(!u){const B=s.disposalTraces.buffer.find(Q=>(Q==null?void 0:Q.key)===i);s.logger.error("❌","molecule",n,"deallocation failed:",`Could not find allocation for ${i} in store "${s.config.name}".`,B?`
16
+ This state was most recently deallocated
17
+ ${B.trace}`:`No previous disposal trace for ${i} was found.`);return}const c=s.moleculeJoins.getRelatedKeys(u.key);if(c)for(const B of c){const Q=s.joins.get(B);Q&&(Q.relations.delete(u.key),Q.molecules.delete(u.stringKey))}s.moleculeJoins.delete(u.stringKey);const f=[],h=[],y={type:"molecule_disposal",key:u.key,values:h,provenance:f},p=ce(s);p.molecules.delete(i);const g=mt(p)&&p.transactionMeta.phase==="building";g&&p.transactionMeta.update.updates.push(y);const b=s.moleculeGraph.getRelationEntries({downstreamMoleculeKey:u.stringKey});if(b)for(const[B,{source:Q}]of b)if(Q===u.stringKey){const K=ji(B);ls(s,K)}else f.push(Q);const w=p.moleculeData.getRelatedKeys(u.stringKey);if(w)for(const B of w){const Q=p.families.get(B),K=pt(s,Q,u.key);h.push([Q.key,K]),Zu(s,K)}p.moleculeGraph.delete(u.stringKey),p.moleculeJoins.delete(u.stringKey),p.moleculeData.delete(u.stringKey),g||p.on.moleculeDisposal.next(y),p.molecules.delete(u.stringKey);const z=v0(new Error);s.disposalTraces.add({key:i,trace:z})}function Mu(s,n,i,u){const c=Ge(i),f=ce(s),h=f.molecules.get(c);if(!h){const z=s.disposalTraces.buffer.find(B=>(B==null?void 0:B.key)===c);return s.logger.error("❌","molecule",i,"claim failed:",`Could not allocate to ${c} in store "${s.config.name}".`,z?`
18
+ ${c} was most recently disposed
19
+ ${z.trace}`:`No previous disposal trace for ${c} was found.`),i}const y=Ge(n),p=f.molecules.get(y);if(!p){const z=s.disposalTraces.buffer.find(B=>(B==null?void 0:B.key)===y);return s.logger.error("❌","molecule",i,"claim failed:",`Could not allocate to ${y} in store "${s.config.name}".`,z?`
20
+ ${y} was most recently disposed
21
+ ${z.trace}`:`No previous disposal trace for ${y} was found.`),i}const g=s.moleculeGraph.getRelationEntries({downstreamMoleculeKey:h.stringKey}).filter(([,{source:z}])=>z!==c).map(([z])=>ji(z));u&&f.moleculeGraph.delete(c),f.moleculeGraph.set({upstreamMoleculeKey:p.stringKey,downstreamMoleculeKey:h.stringKey},{source:p.stringKey});const b={type:"molecule_transfer",key:h.key,from:g,to:[p.key]};return mt(f)&&f.transactionMeta.phase==="building"&&f.transactionMeta.update.updates.push(b),i}function S0(s,n,i){switch(n){case"newValue":{Nm(s,i);break}case"oldValue":{Zu(i,s.token);break}}}function T0(s,n,i){switch(n){case"newValue":{Zu(i,s.token);break}case"oldValue":{Nm(s,i),s.subType==="atom"&&i.valueMap.set(s.token.key,s.value);break}}}function Nm(s,n){const{family:i}=s.token;if(i){const u=n.families.get(i.key);u&&pt(n,u,ji(i.subKey))}}function E0(s,n,i){switch(n){case"newValue":is(i,s.provenance,s.key);break;case"oldValue":ls(i,s.key);break}}function A0(s,n,i){switch(n){case"newValue":ls(i,s.key);break;case"oldValue":{const u=s.provenance.map(ji);is(i,u,s.key);for(const[c,f]of s.values){const h=i.families.get(c);if(h){pt(i,h,s.key);const y=`${c}(${Ge(s.key)})`;i.valueMap.set(y,f)}}}break}}function x0(s,n,i){switch(n){case"newValue":{const u=s.to.length===1?s.to[0]:s.to;Mu(i,u,s.key,"exclusive")}break;case"oldValue":{const u=s.from.length===1?s.from[0]:s.from;Mu(i,u,s.key,"exclusive")}break}}function wi(s,n,i){const u=s==="newValue"?n.updates:[...n.updates].reverse();for(const c of u)switch(c.type){case"atom_update":case"selector_update":g0(s,c,i);break;case"state_creation":S0(c,s,i);break;case"state_disposal":T0(c,s,i);break;case"molecule_creation":E0(c,s,i);break;case"molecule_disposal":A0(c,s,i);break;case"molecule_transfer":x0(c,s,i);break;case"transaction_update":wi(s,c,i);break}}function Cm(s,n){return s.transactionMeta.actionContinuities.getRelatedKey(n)}function Dm(s,n){return s.transactionMeta.epoch.get(n)}function O0(s,n){if(!Bn(s))return;const u=Cm(s,n);if(u!==void 0)return Dm(s,u)}function Ko(s,n,i){Bn(s)&&n&&s.transactionMeta.epoch.set(n,i)}function w0(s,n,i){if(!Bn(s))return;const c=Cm(s,n);c!==void 0&&s.transactionMeta.epoch.set(c,i)}const R0=(s,n)=>{var f;const i=ce(n),{parent:u}=i;if(u===null||!mt(i)||((f=i.transactionMeta)==null?void 0:f.phase)!=="building"){n.logger.warn("🐞","transaction","???","applyTransaction called outside of a transaction. This is probably a bug in AtomIO.");return}i.transactionMeta.phase="applying",i.transactionMeta.update.output=s,u.child=null,u.on.transactionApplying.next(i.transactionMeta);const{updates:c}=i.transactionMeta.update;if(n.logger.info("🛄","transaction",i.transactionMeta.update.key,`Applying transaction with ${c.length} updates:`,c),wi("newValue",i.transactionMeta.update,u),Bn(u)){w0(u,i.transactionMeta.update.key,i.transactionMeta.update.epoch);const h=st(n,{key:i.transactionMeta.update.key,type:"transaction"});h==null||h.subject.next(i.transactionMeta.update),n.logger.info("🛬","transaction",i.transactionMeta.update.key,"Finished applying transaction.")}else mt(u)&&u.transactionMeta.update.updates.push(i.transactionMeta.update);u.on.transactionApplying.next(null)};function zm(s,n,i){if(!Bn(s))return;const{epoch:c,actionContinuities:f}=s.transactionMeta;f.set(n,i),c.has(n)||c.set(n,-1)}function k0(s){return{store:s}}function Ft(s,...n){let i,u,c;if(n.length===1?i=n[0]:(u=n[0],c=n[1],i=pt(s,u,c)),"counterfeit"in i&&"family"in i){u=s.families.get(i.family.key);const f=i.family.subKey,h=s.disposalTraces.buffer.find(y=>(y==null?void 0:y.key)===f);switch(s.logger.error("❌",i.type,i.key,`could not be retrieved because it was not found in the store "${s.config.name}".`,h?`This state was previously disposed:
22
+ ${h.trace}`:"No previous disposal trace was found."),u.type){case"atom_family":case"mutable_atom_family":return s.defaults.get(u.key);case"selector_family":case"readonly_selector_family":{if(s.defaults.has(u.key))return s.defaults.get(i.family.key);const y=st(s,u).default(f);return s.defaults.set(u.key,y),y}}}return qu(s,st(s,i))}class bt{constructor(n,i){j(this,"a");j(this,"b");j(this,"cardinality");j(this,"relations",new Map);j(this,"contents",new Map);j(this,"isAType");j(this,"isBType");j(this,"isContent");j(this,"makeContentKey",(n,i)=>`${n}:${i}`);j(this,"warn");var u,c;if(this.a=n.between[0],this.b=n.between[1],this.cardinality=n.cardinality,i!=null&&i.externalStore||(this.relations=new Map((u=n.relations)==null?void 0:u.map(([f,h])=>[f,new Set(h)])),this.contents=new Map(n.contents)),this.isAType=(i==null?void 0:i.isAType)??null,this.isBType=(i==null?void 0:i.isBType)??null,this.isContent=(i==null?void 0:i.isContent)??null,i!=null&&i.makeContentKey&&(this.makeContentKey=i.makeContentKey),i!=null&&i.externalStore){const f=i.externalStore;this.has=(h,y)=>f.has(h,y),this.addRelation=(h,y)=>{f.addRelation(h,y)},this.deleteRelation=(h,y)=>{f.deleteRelation(h,y)},this.replaceRelationsSafely=(h,y)=>{f.replaceRelationsSafely(h,y)},this.replaceRelationsUnsafely=(h,y)=>{f.replaceRelationsUnsafely(h,y)},this.getRelatedKeys=h=>f.getRelatedKeys(h),f.getContent&&(this.getContentInternal=h=>f.getContent(h),this.setContent=(h,y)=>{f.setContent(h,y)},this.deleteContent=h=>{f.deleteContent(h)});for(const[h,y]of n.relations??[]){let p=(c=this.isAType)!=null&&c.call(this,h)?h:void 0,g=p===void 0?h:void 0;for(const b of y)p??(p=b),g??(g=b),this.addRelation(p,g)}for(const[h,y]of n.contents??[])this.setContent(h,y)}i!=null&&i.warn&&(this.warn=i.warn)}getRelatedKeys(n){return this.relations.get(n)}addRelation(n,i){let u=this.relations.get(n),c=this.relations.get(i);u?u.add(i):(u=new Set([i]),this.relations.set(n,u)),c?c.add(n):(c=new Set([n]),this.relations.set(i,c))}deleteRelation(n,i){const u=this.relations.get(n);if(u){u.delete(i),u.size===0&&this.relations.delete(n);const c=this.relations.get(i);c&&(c.delete(n),c.size===0&&this.relations.delete(i))}}replaceRelationsUnsafely(n,i){this.relations.set(n,new Set(i));for(const u of i){const c=new Set().add(n);this.relations.set(u,c)}}replaceRelationsSafely(n,i){var h;const u=this.relations.get(n);let c=(h=this.isAType)!=null&&h.call(this,n)?n:void 0,f=c===void 0?n:void 0;if(u)for(const y of u){c??(c=y),f??(f=y);const p=this.relations.get(y);p&&(p.size===1?this.relations.delete(y):p.delete(n),this.contents.delete(this.makeContentKey(c,f)))}this.relations.set(n,new Set(i));for(const y of i){let p=this.relations.get(y);p?p.add(n):(p=new Set().add(n),this.relations.set(y,p))}}getContentInternal(n){return this.contents.get(n)}setContent(n,i){this.contents.set(n,i)}deleteContent(n){this.contents.delete(n)}toJSON(){return{between:[this.a,this.b],cardinality:this.cardinality,relations:[...this.relations.entries()].map(([n,i])=>[n,[...i]]),contents:[...this.contents.entries()]}}set(...n){let i,u,c;switch(n.length){case 1:{const f=n[0];i=f[this.a],u=f[this.b],c=void 0;break}case 2:{const f=n[0];typeof f=="string"?[i,u]=n:(i=f[this.a],u=f[this.b],c=n[1]);break}default:{i=n[0],u=n[1],c=n[2];break}}switch(this.cardinality){case"1:1":{const f=this.getRelatedKey(i);f&&f!==u&&this.delete(i,f)}case"1:n":{const f=this.getRelatedKey(u);f&&f!==i&&this.delete(f,u)}break}if(c){const f=this.makeContentKey(i,u);this.setContent(f,c)}return this.addRelation(i,u),this}delete(n,i){i=typeof i=="string"?i:n[this.b];const u=typeof n=="string"?n:n[this.a];if(u===void 0&&typeof i=="string"){const c=this.getRelatedKeys(i);if(c)for(const f of c)this.delete(f,i)}if(typeof u=="string"&&i===void 0){const c=this.getRelatedKeys(u);if(c)for(const f of c)this.delete(u,f)}if(typeof u=="string"&&typeof i=="string"){this.deleteRelation(u,i);const c=this.makeContentKey(u,i);this.deleteContent(c)}return this}getRelatedKey(n){var u;const i=this.getRelatedKeys(n);if(i){i.size>1&&((u=this.warn)==null||u.call(this,`${i.size} related keys were found for key "${n}": (${[...i].map(f=>`"${f}"`).join(", ")}). Only one related key was expected.`));let c;for(const f of i){c=f;break}return c}}replaceRelations(n,i,u){const c=!Array.isArray(i),f=c?Object.keys(i):i;if(u!=null&&u.reckless?this.replaceRelationsUnsafely(n,f):this.replaceRelationsSafely(n,f),c)for(const h of f){const y=this.makeContentKey(n,h),p=i[h];this.setContent(y,p)}return this}getContent(n,i){const u=this.makeContentKey(n,i);return this.getContentInternal(u)}getRelationEntries(n){const i=n[this.a],u=n[this.b];if(i!==void 0&&u===void 0){const c=this.getRelatedKeys(i);if(c)return[...c].map(f=>[f,this.getContent(i,f)])}if(i===void 0&&u!==void 0){const c=this.getRelatedKeys(u);if(c)return[...c].map(f=>[f,this.getContent(f,u)])}return[]}has(n,i){if(i){const u=this.getRelatedKeys(n);return(u==null?void 0:u.has(i))??!1}return this.relations.has(n)}}class dn extends Map{constructor(i){super();j(this,"deleted",new Set);j(this,"source");this.source=i}get(i){if(super.has(i))return super.get(i);if(!this.deleted.has(i)&&this.source.has(i))return this.source.get(i)}set(i,u){return this.deleted.delete(i),super.set(i,u)}hasOwn(i){return super.has(i)}has(i){return!this.deleted.has(i)&&(super.has(i)||this.source.has(i))}delete(i){return this.deleted.add(i),super.delete(i)}}const M0=(s,n,i,u)=>{const c=ce(s),f={parent:c,child:null,on:c.on,loggers:c.loggers,logger:c.logger,config:c.config,atoms:new dn(c.atoms),atomsThatAreDefault:new Set(c.atomsThatAreDefault),families:new dn(c.families),joins:new dn(c.joins),operation:{open:!1},readonlySelectors:new dn(c.readonlySelectors),timelines:new dn(c.timelines),timelineTopics:new bt(c.timelineTopics.toJSON()),trackers:new Map,transactions:new dn(c.transactions),selectorAtoms:new bt(c.selectorAtoms.toJSON()),selectorGraph:new bt(c.selectorGraph.toJSON(),{makeContentKey:(...g)=>g.sort().join(":")}),selectors:new dn(c.selectors),valueMap:new dn(c.valueMap),defaults:c.defaults,disposalTraces:s.disposalTraces.copy(),molecules:new dn(c.molecules),moleculeGraph:new bt(c.moleculeGraph.toJSON(),{makeContentKey:c.moleculeGraph.makeContentKey}),moleculeData:new bt(c.moleculeData.toJSON(),{makeContentKey:c.moleculeData.makeContentKey}),moleculeJoins:new bt(c.moleculeJoins.toJSON(),{makeContentKey:c.moleculeJoins.makeContentKey}),miscResources:new dn(c.miscResources)},h=O0(s,n),y={phase:"building",update:{type:"transaction_update",key:n,id:u,epoch:h===void 0?Number.NaN:h+1,updates:[],params:i,output:void 0},toolkit:{get:(...g)=>Ft(p,...g),set:(...g)=>{Fe(p,...g)},run:(g,b=wm())=>Ho(p,g,b),find:(g,b)=>pt(p,g,b),json:g=>Za(p,g),dispose:(...g)=>{Zu(p,...g)},env:()=>k0(p)}},p=Object.assign(f,{transactionMeta:y});return c.child=p,s.logger.info("🛫","transaction",n,"Building transaction with params:",i),p};function Um(s,n){const i={key:n.key,type:"transaction",run:(f,h)=>{const y=M0(s,n.key,f,h);try{const p=ce(s),{toolkit:g}=y.transactionMeta,b=n.do(g,...f);return R0(b,p),b}catch(p){throw o0(u),s.logger.warn("💥","transaction",n.key,"caught:",p),p}},install:f=>Um(f,n),subject:new We},u=ce(s);u.transactions.set(i.key,i);const c=Mi(i);return s.on.transactionCreation.next(c),c}function N0(s){return Um(Pe.STORE,s)}function C0(s,n=wm()){return Ho(Pe.STORE,s,n)}class D0{constructor(n,i=null){j(this,"parent",null);j(this,"child",null);j(this,"valueMap",new Map);j(this,"defaults",new Map);j(this,"atoms",new Map);j(this,"selectors",new Map);j(this,"readonlySelectors",new Map);j(this,"atomsThatAreDefault",new Set);j(this,"selectorAtoms",new bt({between:["selectorKey","atomKey"],cardinality:"n:n"}));j(this,"selectorGraph",new bt({between:["upstreamSelectorKey","downstreamSelectorKey"],cardinality:"n:n"},{makeContentKey:(...n)=>n.sort().join(":")}));j(this,"trackers",new Map);j(this,"families",new Map);j(this,"joins",new Map);j(this,"transactions",new Map);j(this,"transactionMeta",{epoch:new Map,actionContinuities:new bt({between:["continuity","action"],cardinality:"1:n"})});j(this,"timelines",new Map);j(this,"timelineTopics",new bt({between:["timelineKey","topicKey"],cardinality:"1:n"}));j(this,"disposalTraces",new qo(100));j(this,"molecules",new Map);j(this,"moleculeJoins",new bt({between:["moleculeKey","joinKey"],cardinality:"n:n"},{makeContentKey:(...n)=>n.sort().join(":")}));j(this,"moleculeGraph",new bt({between:["upstreamMoleculeKey","downstreamMoleculeKey"],cardinality:"n:n"},{makeContentKey:(...n)=>n.sort().join(":")}));j(this,"moleculeData",new bt({between:["moleculeKey","stateFamilyKey"],cardinality:"n:n"},{makeContentKey:(...n)=>n.sort().join(":")}));j(this,"miscResources",new Map);j(this,"on",{atomCreation:new We,atomDisposal:new We,selectorCreation:new We,selectorDisposal:new We,timelineCreation:new We,transactionCreation:new We,transactionApplying:new Pv(null),operationClose:new We,moleculeCreation:new We,moleculeDisposal:new We});j(this,"operation",{open:!1});j(this,"config",{name:"IMPLICIT_STORE",lifespan:"ephemeral"});j(this,"loggers",[new s0("warn",(n,i,u)=>!tb(u))]);j(this,"logger",{error:(...n)=>{for(const i of this.loggers)i.error(...n)},info:(...n)=>{for(const i of this.loggers)i.info(...n)},warn:(...n)=>{for(const i of this.loggers)i.warn(...n)}});var u,c;if(this.config={...i==null?void 0:i.config,...n},i!==null){this.valueMap=new Map(i==null?void 0:i.valueMap),this.operation={...i==null?void 0:i.operation},Bn(i)&&(this.transactionMeta={epoch:new Map(i==null?void 0:i.transactionMeta.epoch),actionContinuities:new bt(i==null?void 0:i.transactionMeta.actionContinuities.toJSON())});for(const[,h]of i.families)(u=h.internalRoles)!=null&&u.includes("mutable")||(c=h.internalRoles)!=null&&c.includes("join")||h.install(this);const f=new Set;for(const[,h]of i.atoms)if(!f.has(h.key)&&(h.install(this),h.type==="mutable_atom")){const y=Za(i,h),p=Vm(h);f.add(y.key),f.add(p.key)}for(const[,h]of i.readonlySelectors)h.install(this);for(const[,h]of i.selectors)f.has(h.key)||h.install(this);for(const[,h]of i.transactions)h.install(this);for(const[,h]of i.timelines)h.install(this)}}}const Pe={get STORE(){return globalThis.ATOM_IO_IMPLICIT_STORE??(globalThis.ATOM_IO_IMPLICIT_STORE=new D0({name:"IMPLICIT_STORE",lifespan:"ephemeral"})),globalThis.ATOM_IO_IMPLICIT_STORE}};function st(s,n){let i,u=s;for(;u!==null;){switch(n.type){case"atom":case"mutable_atom":i=u.atoms.get(n.key);break;case"selector":i=u.selectors.get(n.key);break;case"readonly_selector":i=u.readonlySelectors.get(n.key);break;case"atom_family":case"mutable_atom_family":case"selector_family":case"readonly_selector_family":i=u.families.get(n.key);break;case"timeline":i=u.timelines.get(n.key);break;case"transaction":i=u.transactions.get(n.key);break}if(i)return i;u=u.child}throw new Vo(n,s)}function z0(s,n,i){const u=s.families.get(n.key);if(u===void 0)throw new Vo(n,s);const c=u(i),f=ce(s);if(c.family)if(Bn(f))switch(c.type){case"atom":case"mutable_atom":s.on.atomCreation.next(c);break;case"selector":case"readonly_selector":s.on.selectorCreation.next(c);break}else mt(f)&&f.on.transactionApplying.state===null&&f.transactionMeta.update.updates.push({type:"state_creation",token:c});return c}function U0(s,n,i){const u=Ge(i),c=`${n.key}(${u})`,f=ce(s);let h;switch(n.type){case"atom_family":case"mutable_atom_family":h=f.atoms.get(c);break;case"selector_family":h=f.selectors.get(c);break;case"readonly_selector_family":h=f.readonlySelectors.get(c);break}return h&&Mi(h)}function pt(s,n,i){let u=U0(s,n,i);if(u)return u;const c=Ge(i),f=s.molecules.get(c);if(!f&&s.config.lifespan==="immortal"){const h=n0(n,i);return s.logger.error("❌",h.type,h.key,`was not found in store "${s.config.name}"; returned a counterfeit token.`),h}return u=z0(s,n,i),f&&ce(s).moleculeData.set(c,n.key),u}function Zu(s,...n){let i;if(n.length===1)i=n[0];else{const u=n[0],c=n[1];i=pt(s,u,c)}try{st(s,i)}catch{s.logger.error("❌",i.type,i.key,`could not be disposed because it was not found in the store "${s.config.name}".`);return}switch(i.type){case"atom":case"mutable_atom":Wo(s,i);break;case"selector":case"readonly_selector":H0(s,i);break}}const Yo=(s,n)=>ce(s).atoms.has(n),j0=(s,n)=>ce(s).selectors.has(n),B0=(s,n)=>ce(s).readonlySelectors.has(n),q0=(s,n)=>Yo(s,n)||j0(s,n)||B0(s,n),So=(s,n)=>ce(n).selectorGraph.getRelationEntries({downstreamSelectorKey:s}).filter(([u,{source:c}])=>c!==s).map(([u,{source:c}])=>c).filter(u=>q0(n,u)),jm=(s,n,i)=>{const u=[],c=So(s,i);for(;c.length>0;){const f=c.shift();n.has(f)||(n.add(f),Yo(i,f)?u.includes(f)||u.push(f):c.push(...So(f,i)))}return u},Z0=(s,n)=>{const i=s.key,u=So(i,n),c=new Set;return u.flatMap(f=>Yo(n,f)?f:jm(f,c,n))},V0=(s,n,i,u)=>{const c=ce(u);if(n.type==="atom"||n.type==="mutable_atom")c.selectorAtoms.set({selectorKey:s,atomKey:n.key}),u.logger.info("🔍","selector",s,`discovers root atom "${n.key}"`);else{const f=jm(n.key,i,u);u.logger.info("🔍","selector",s,`discovers root atoms: [ ${f.map(h=>`"${h}"`).join(", ")} ]`);for(const h of f)c.selectorAtoms=c.selectorAtoms.set({selectorKey:s,atomKey:h})}i.add(n.key)},Bm=(s,n,i)=>({get:(...u)=>{const c=ce(i);let f;if(u.length===2){const[p,g]=u;f=pt(i,p,g)}else[f]=u;const h=st(i,f),y=qu(i,h);return i.logger.info("🔌","selector",s,`registers dependency ( "${f.key}" =`,y,")"),c.selectorGraph.set({upstreamSelectorKey:f.key,downstreamSelectorKey:s},{source:f.key}),V0(s,f,n,i),y},set:(...u)=>{let c,f;if(u.length===2)c=u[0],f=u[1];else{const p=u[0],g=u[1];f=u[2],c=pt(i,p,g)}const h=ce(i),y=st(h,c);Mm(h,y,f)},find:(u,c)=>pt(i,u,c),json:u=>Za(i,u)}),Go=(s,n,i)=>{const u=ce(s),c=new We,f=new Set,{get:h,find:y,json:p}=Bm(n.key,f,u),g=()=>{const B=n.get({get:h,find:y,json:p});return za(ce(s),n.key,B,c),f.clear(),B},b={...n,subject:c,install:B=>Go(B,n,i),get:g,type:"readonly_selector",...i&&{family:i}};u.readonlySelectors.set(n.key,b);const w=g();s.logger.info("✨",b.type,b.key,"=",w);const z={key:n.key,type:"readonly_selector"};return i&&(z.family=i),z},Xo=(s,n,i)=>{const u=ce(s),c=new We,f=new Set,h=Bm(n.key,f,u),{find:y,get:p,json:g}=h,b={find:y,get:p,json:g},w=(oe=n.get,ye=ce(s))=>{const Se=oe(b);return za(ye,n.key,Se,c),f.clear(),Se},B={...n,subject:c,install:oe=>Xo(oe,n,i),get:w,set:oe=>{const ye=ce(s),Se=w(n.get,ye),Ue=km(oe)(Se);s.logger.info("📝","selector",n.key,"set (",Se,"->",Ue,")"),za(ye,n.key,Ue,c),Lo(ye,n.key),Bn(ye)&&c.next({newValue:Ue,oldValue:Se}),n.set(h,Ue)},type:"selector",...i&&{family:i}};u.selectors.set(n.key,B);const Q=w();s.logger.info("✨",B.type,B.key,"=",Q);const K={key:n.key,type:"selector"};return i&&(K.family=i),K};function qm(s,n){if("set"in n){const c=Xo(s,n,void 0);return s.on.selectorCreation.next(c),c}const u=Go(s,n,void 0);return s.on.selectorCreation.next(u),u}function H0(s,n){const i=ce(s),{key:u}=n,c=st(i,n);if(!c.family)s.logger.error("❌","selector",u,"Standalone selectors cannot be disposed.");else{i.molecules.get(c.family.subKey)&&i.moleculeData.delete(c.family.subKey,c.family.key);let h;switch(n.type){case"selector":i.selectors.delete(u),h={key:c.family.key,type:"selector_family"},st(s,h).subject.next({type:"state_disposal",subType:"selector",token:n});break;case"readonly_selector":i.readonlySelectors.delete(u),h={key:c.family.key,type:"readonly_selector_family"},st(s,h).subject.next({type:"state_disposal",subType:"selector",token:n});break}i.valueMap.delete(u),i.selectorAtoms.delete(u),i.selectorGraph.delete(u),s.logger.info("🔥",n.type,u,"deleted"),mt(i)&&i.transactionMeta.phase==="building"?i.transactionMeta.update.updates.push({type:"state_disposal",subType:"selector",token:n}):s.on.selectorDisposal.next(n)}}function Qo(s,n,i){const u={key:n.key,type:"selector_family"},c=s.families.get(n.key);c&&s.logger.error("❗","selector_family",n.key,`Overwriting an existing ${as(c)} "${c.key}" in store "${s.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const f=new We,y=Object.assign(p=>{const g=Ge(p),b={key:n.key,subKey:g},w=`${n.key}(${g})`,z=ce(s),B=Xo(z,{key:w,get:n.get(p),set:n.set(p)},b);return f.next({type:"state_creation",token:B}),B},u,{internalRoles:i,subject:f,install:p=>Qo(p,n),default:p=>n.get(p)({get:(...b)=>Ft(s,...b),find:(b,w)=>pt(s,b,w),json:b=>Za(s,b)})});return s.families.set(n.key,y),u}function L0(s,n,i){return Qo(s,{key:`${n.key}:JSON`,get:c=>({get:f})=>{const h=f(n,c);return i.toJson(h)},set:c=>({set:f},h)=>{f(n,c,i.fromJson(h))}},["mutable","json"])}const ji=s=>JSON.parse(s),Ge=s=>JSON.stringify(s),K0=(s,n)=>{const i=ce(s);return i.operation.open?i.operation.prev.get(n.key):i.valueMap.get(n.key)},sm=(s,n)=>{const i=ce(s);return Z0(n,s).map(c=>{const f=i.atoms.get(c);if(f===void 0)throw new Error(`Atom "${c}", a dependency of selector "${n.key}", not found in store "${s.config.name}".`);return f.subject.subscribe(`${n.type}:${n.key}`,h=>{s.logger.info("📢",n.type,n.key,"root",c,"went",h.oldValue,"->",h.newValue);const y=K0(i,n),p=qu(i,n);s.logger.info("✨",n.type,n.key,"went",y,"->",p),n.subject.next({newValue:p,oldValue:y})})})};function Ll(s,n,i,u){function c(w){if(s.operation.open){const z=s.on.operationClose.subscribe(`state subscription ${i}`,()=>{z(),u(w)})}else u(w)}const f=st(s,n);s.logger.info("👀",f.type,f.key,`Adding subscription "${i}"`);const h=f.type==="selector"||f.type==="readonly_selector";let y=null,p=c;h&&(y=sm(s,f),p=w=>{y&&(y.length=0,y.push(...sm(s,f))),c(w)});const g=f.subject.subscribe(i,p);return()=>{if(s.logger.info("🙈",f.type,f.key,`Removing subscription "${i}"`),g(),y)for(const w of y)w()}}const Y0=(s,n,i,u)=>{const c=st(s,n);s.logger.info("👀","timeline",n.key,`Adding subscription "${i}"`);const f=c.subject.subscribe(i,u);return()=>{s.logger.info("🙈","timeline",n.key,`Removing subscription "${i}" from timeline`),f()}},G0=(s,n,i,u)=>{const c=st(s,n);s.logger.info("👀","transaction",n.key,`Adding subscription "${i}"`);const f=c.subject.subscribe(i,u);return()=>{s.logger.info("🙈","transaction",n.key,`Removing subscription "${i}"`),f()}};var Om;Om=Symbol.dispose;class $o{constructor(n,i){j(this,"Update");j(this,"unsubscribeFromInnerValue");j(this,"unsubscribeFromState");j(this,"mutableState");j(this,"latestUpdateState");j(this,Om);this.mutableState=n;const u=ce(i);this.latestUpdateState=this.initializeState(n,u),this.observeCore(n,this.latestUpdateState,u),this.updateCore(n,this.latestUpdateState,u),u.trackers.set(n.key,this),this[Symbol.dispose]=()=>{this.unsubscribeFromInnerValue(),this.unsubscribeFromState(),u.trackers.delete(n.key)}}initializeState(n,i){var h;const u=`*${n.key}`;i.atoms.delete(u),i.valueMap.delete(u);const c=n.family?{key:`*${n.family.key}`,subKey:n.family.subKey}:void 0,f=Vu(i,{key:u,default:null},c);if((h=i.parent)!=null&&h.valueMap.has(u)){const y=i.parent.valueMap.get(u);i.valueMap.set(u,y)}return f}observeCore(n,i,u){const c=`tracker:${u.config.name}:${mt(u)?u.transactionMeta.update.key:"main"}:${n.key}`,f=Ft(u,n);this.unsubscribeFromInnerValue=f.subscribe(c,h=>{Fe(u,i,h)}),this.unsubscribeFromState=Ll(u,n,c,h=>{h.newValue!==h.oldValue&&(this.unsubscribeFromInnerValue(),this.unsubscribeFromInnerValue=h.newValue.subscribe(c,y=>{Fe(u,i,y)}))})}updateCore(n,i,u){const c=`tracker:${u.config.name}:${mt(u)?u.transactionMeta.update.key:"main"}:${n.key}`;Ll(u,i,c,({newValue:f,oldValue:h})=>{const y=u.timelineTopics.getRelatedKey(i.key);if(y){const g=u.timelines.get(y);if(g!=null&&g.timeTraveling){const b=Y0(u,{key:y,type:"timeline"},c,w=>{b(),Fe(u,n,z=>(w==="redo"&&f?z.do(f):w==="undo"&&h&&z.undo(h),z))});return}}const p=u.on.operationClose.subscribe(c,()=>{p();const g=Ft(u,n),b=f===null?-1:g.getUpdateNumber(f),w=b-g.cacheUpdateNumber;f&&w===1?Fe(u,n,z=>(z.do(f),z)):u.logger.info("❌","mutable_atom",n.key,`could not be updated. Expected update number ${g.cacheUpdateNumber+1}, but got ${b}`)})})}}function Jo(s,n,i){s.logger.info("🔨","atom",n.key,`creating in store "${s.config.name}"`);const u=ce(s),c=u.atoms.get(n.key);if(c&&c.type==="mutable_atom")return s.logger.error("❌","atom",n.key,"Tried to create atom, but it already exists in the store."),Mi(c);const f=new We,h={...n,type:"mutable_atom",install:g=>(g.logger.info("🛠️","atom",n.key,`installing in store "${g.config.name}"`),Jo(g,n,i)),subject:f};i&&(h.family=i);const y=n.default();u.atoms.set(h.key,h),Hm(s,n.key),za(u,n.key,y,f);const p=Mi(h);if(n.effects){let g=0;const b=[];for(const w of n.effects){const z=w({setSelf:B=>{Fe(s,p,B)},onSet:B=>Ll(s,p,`effect[${g}]`,B)});z&&b.push(z),++g}h.cleanup=()=>{for(const w of b)w()}}return new $o(p,s),i||Iv(p,n,s),p}class X0{constructor(n,i){j(this,"trackers",new Map);j(this,"Update");j(this,"latestUpdateAtoms");j(this,"mutableAtoms");const u=Bo(i,{key:`*${n.key}`,default:null},["mutable","updates"]);this.latestUpdateAtoms=st(i,u),this.mutableAtoms=n,this.mutableAtoms.subject.subscribe(`store=${i.config.name}::tracker-atom-family`,c=>{const{type:f,token:h}=c;if(h.family){const y=ji(h.family.subKey);switch(f){case"state_creation":this.trackers.set(y,new $o(h,i));break;case"state_disposal":{const p=this.trackers.get(y);p&&(p[Symbol.dispose](),this.trackers.delete(y))}break}}})}}function Zm(s,n,i){const u={key:n.key,type:"mutable_atom_family"},c=s.families.get(n.key);c&&s.logger.error("❗","mutable_atom_family",n.key,`Overwriting an existing ${as(c)} "${c.key}" in store "${s.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);const f=new We,y=Object.assign(p=>{const g=Ge(p),b={key:n.key,subKey:g},w=`${n.key}(${g})`,z=ce(s),B={key:w,default:()=>n.default(p),toJson:n.toJson,fromJson:n.fromJson,mutable:!0};n.effects&&(B.effects=n.effects(p));const Q=Jo(z,B,b);return f.next({type:"state_creation",token:Q}),Q},u,{subject:f,install:p=>Zm(p,n),toJson:n.toJson,fromJson:n.fromJson,internalRoles:i});return s.families.set(n.key,y),L0(s,y,n),new X0(y,s),u}const um=(s,n)=>{const i=ce(n),u=`${s.key}:JSON`;return i.families.get(u)},Za=(s,n)=>{if(n.family){const u=ce(s),f={key:`${n.family.key}:JSON`,type:"selector_family"},h=st(u,f),y=JSON.parse(n.family.subKey);return pt(s,h,y)}return{type:"selector",key:`${n.key}:JSON`}},Vm=s=>{const i={type:"atom",key:`*${s.key}`};return s.family&&(i.family={key:`*${s.family.key}`,subKey:s.family.subKey}),i};function Q0(s){return typeof s=="object"&&s!==null&&"do"in s&&"undo"in s&&"subscribe"in s}function To(s,n,i){const u=i.valueMap.get(n.key),c=s.valueMap.get(n.key);if(u!==c)return c;if(u===void 0)return n.default();i.logger.info("📃","atom",n.key,"copying");const f=n.toJson(u),h=n.fromJson(f);return s.valueMap.set(n.key,h),new $o(n,i),h}function za(s,n,i,u){const c=s.valueMap.get(n);if(c instanceof bo&&c.use(i),i instanceof Promise){const f=new bo(i);return s.valueMap.set(n,f),f.then(h=>{za(s,n,h,u),u.next({newValue:h,oldValue:f})}).catch(h=>{s.logger.error("💥","state",n,"rejected:",h)}),f}return s.valueMap.set(n,i),i}const $0=(s,n)=>{let i=n.valueMap.get(s.key);if(s.type==="mutable_atom"&&mt(n)){const{parent:u}=n;i=To(n,s,u)}return i},J0=(s,n)=>{const i=n.valueMap.get(s);if(i instanceof bo){const u=i,c=n.selectors.get(s)??n.readonlySelectors.get(s);c&&u.use(c.get());return}n.operation.open&&n.operation.prev.set(s,i),n.valueMap.delete(s),n.logger.info("🗑","state",s,"evicted")},W0=(s,n)=>ce(s).atomsThatAreDefault.has(n),Hm=(s,n)=>{const i=ce(s);i.atomsThatAreDefault=new Set(i.atomsThatAreDefault).add(n)},F0=(s,n)=>{const i=ce(s);i.atomsThatAreDefault=new Set(ce(s).atomsThatAreDefault),i.atomsThatAreDefault.delete(n)};function Vu(s,n,i){s.logger.info("🔨","atom",n.key,`creating in store "${s.config.name}"`);const u=ce(s),c=u.atoms.get(n.key);if(c&&c.type==="atom")return s.logger.error("❌","atom",n.key,"Tried to create atom, but it already exists in the store."),Mi(c);const f=new We,h={...n,type:"atom",install:g=>(g.logger.info("🛠️","atom",n.key,`installing in store "${g.config.name}"`),Vu(g,n,i)),subject:f};i&&(h.family=i);let y=n.default;n.default instanceof Function&&(y=n.default()),u.atoms.set(h.key,h),Hm(s,n.key),za(u,n.key,y,f);const p=Mi(h);if(n.effects){let g=0;const b=[];for(const w of n.effects){const z=w({setSelf:B=>{Fe(s,p,B)},onSet:B=>Ll(s,p,`effect[${g}]`,B)});z&&b.push(z),++g}h.cleanup=()=>{for(const w of b)w()}}return p}function I0(s,n){if("mutable"in n){const c=Jo(s,n,void 0);return s.on.atomCreation.next(c),c}const u=Vu(s,n,void 0);return s.on.atomCreation.next(u),u}function Wo(s,n){var h;const i=ce(s),{key:u,family:c}=n,f=st(i,n);if(!c)s.logger.error("❌","atom",u,"Standalone atoms cannot be disposed.");else{(h=f.cleanup)==null||h.call(f);const y=s.valueMap.get(f.key),p=st(s,{key:c.key,type:"atom_family"}),g={type:"state_disposal",subType:"atom",token:n,value:y};p.subject.next(g);const b=mt(i);if(i.atoms.delete(u),i.valueMap.delete(u),i.selectorAtoms.delete(u),i.atomsThatAreDefault.delete(u),s.timelineTopics.delete(u),n.type==="mutable_atom"){const w=Vm(n);Wo(s,w),s.trackers.delete(u)}if(s.logger.info("🔥","atom",u,"deleted"),b&&i.transactionMeta.phase==="building"){const w=i.transactionMeta.update.updates.at(-1);(w==null?void 0:w.type)==="molecule_disposal"&&w.values.some(([Q])=>{var K;return Q===((K=f.family)==null?void 0:K.key)})||i.transactionMeta.update.updates.push(g)}else s.on.atomDisposal.next(n)}}class hn extends Set{constructor(i,u=0){super(i);j(this,"mode","record");j(this,"subject",new We);j(this,"cacheLimit",0);j(this,"cache",[]);j(this,"cacheIdx",-1);j(this,"cacheUpdateNumber",-1);j(this,"parent");j(this,"child",null);j(this,"transactionUpdates",null);i instanceof hn&&(this.parent=i,this.cacheUpdateNumber=i.cacheUpdateNumber),u&&(this.cacheLimit=u,this.cache=new Array(u),this.subscribe("auto cache",c=>{this.cacheIdx++,this.cacheIdx%=this.cacheLimit,this.cache[this.cacheIdx]=c}))}toJSON(){return{members:[...this],cache:this.cache,cacheLimit:this.cacheLimit,cacheIdx:this.cacheIdx,cacheUpdateNumber:this.cacheUpdateNumber}}static fromJSON(i){const u=new hn(i.members,i.cacheLimit);return u.cache=i.cache,u.cacheIdx=i.cacheIdx,u.cacheUpdateNumber=i.cacheUpdateNumber,u}add(i){const u=super.add(i);return this.mode==="record"&&(this.cacheUpdateNumber++,this.emit(`add:${Ge(i)}`)),u}clear(){const i=this.mode==="record"?[...this]:null;super.clear(),i&&(this.cacheUpdateNumber++,this.emit(`clear:${JSON.stringify(i)}`))}delete(i){const u=super.delete(i);return this.mode==="record"&&(this.cacheUpdateNumber++,this.emit(`del:${Ge(i)}`)),u}transaction(i){this.mode="transaction",this.transactionUpdates=[],this.child=new hn(this);const u=this.child._subscribe("transaction",c=>{var f;(f=this.transactionUpdates)==null||f.push(c)});try{if(i(this.child)){for(const f of this.transactionUpdates)this.doStep(f);this.cacheUpdateNumber++,this.emit(`tx:${this.transactionUpdates.join(";")}`)}}catch(c){throw console.warn("Did not apply transaction to SetRTX; this error was thrown:",c),c}finally{u(),this.child=null,this.transactionUpdates=null,this.mode="record"}}_subscribe(i,u){return this.subject.subscribe(i,u)}subscribe(i,u){return this.subject.subscribe(i,c=>{u(`${this.cacheUpdateNumber}=${c}`)})}emit(i){this.subject.next(i)}doStep(i){const u=i.indexOf(":"),c=i.substring(0,u),f=i.substring(u+1);switch(c){case"add":this.add(JSON.parse(f));break;case"clear":this.clear();break;case"del":this.delete(JSON.parse(f));break;case"tx":for(const h of f.split(";"))this.doStep(h)}}getUpdateNumber(i){const u=i.indexOf("=");return Number(i.substring(0,u))}do(i){const u=i.indexOf("="),c=Number(i.substring(0,u)),f=c-this.cacheUpdateNumber;if(f>0){if(f===1){this.mode="playback";const y=i.substring(u+1);return this.doStep(y),this.mode="record",this.cacheUpdateNumber=c,null}return this.cacheUpdateNumber+1}if(Math.abs(f)<this.cacheLimit){const y=this.cacheIdx+f;if(this.cache[y]===i)return null;this.mode="playback";let g=!1;for(;!g;){this.cacheIdx%=this.cacheLimit;const w=this.cache[this.cacheIdx];if(this.cacheIdx--,!w)return"OUT_OF_RANGE";this.undo(w),g=this.cacheIdx===y-1}const b=i.substring(u+1);return this.doStep(b),this.mode="record",this.cacheUpdateNumber=c,null}return"OUT_OF_RANGE"}undoStep(i){const u=i.indexOf(":"),c=i.substring(0,u),f=i.substring(u+1);switch(c){case"add":this.delete(JSON.parse(f));break;case"del":this.add(JSON.parse(f));break;case"clear":{const h=JSON.parse(f);for(const y of h)this.add(y);break}case"tx":{const h=f.split(";");for(let y=h.length-1;y>=0;y--)this.undoStep(h[y])}}}undo(i){const u=i.indexOf("=");if(Number(i.substring(0,u))===this.cacheUpdateNumber){this.mode="playback";const f=i.substring(u+1);return this.undoStep(f),this.mode="record",this.cacheUpdateNumber--,null}return this.cacheUpdateNumber}}class Lm{constructor(n,i,u=Pe.STORE){j(this,"toolkit");j(this,"options");j(this,"defaultContent");j(this,"molecules",new Map);j(this,"relations");j(this,"states");j(this,"core");j(this,"store");j(this,"realm");this.store=u,this.realm=new r0(u),this.options=n,this.defaultContent=i,this.store.miscResources.set(`join:${n.key}`,this),this.realm.allocate("root",n.key),this.toolkit={get:(...D)=>Ft(u,...D),set:(...D)=>{Fe(u,...D)},find:(...D)=>pt(u,...D),json:D=>Za(u,D)};const c=n.between[0],f=n.between[1],h=Zm(u,{key:`${n.key}/relatedKeys`,default:()=>new hn,mutable:!0,fromJson:D=>hn.fromJSON(D),toJson:D=>D.toJSON()},["join","relations"]);this.core={relatedKeysAtoms:h};const y=({get:D},Y)=>D(h,Y),p=({set:D},Y,le)=>{this.store.molecules.has(Ge(Y))||this.realm.allocate(n.key,Y),D(h,Y,J=>J.add(le)),D(h,le,J=>J.add(Y))},g=({set:D},Y,le)=>{D(h,Y,J=>(J.delete(le),J)),D(h,le,J=>(J.delete(Y),J))},b=(D,Y,le)=>{const{find:J,get:ne,set:ge}=D,ke=J(h,Y),Me=ne(ke);for(const Ve of Me)le.includes(Ve)||ge(h,Ve,je=>(je.delete(Y),je));ge(ke,Ve=>(Ve.transaction(ft=>{ft.clear();for(const je of le){const R=y(D,je),V=R.has(Y);if(this.relations.cardinality==="1:n"){const F=[];for(const Te of R){if(Te===Y)continue;const _=y(D,Te);_.delete(je),_.size===0&&F.push(Te)}!V&&R.size>0&&R.clear();for(const Te of F){const _=[je,Te].sort(),C=`"${_[0]}:${_[1]}"`;this.molecules.delete(C)}}V||R.add(Y),ft.add(je)}return!0}),Ve))},w=(D,Y,le)=>{const{set:J}=D;J(h,Y,ne=>(ne.transaction(ge=>{for(const ke of le)ge.add(ke);return!0}),ne));for(const ne of le)J(h,ne,ge=>(ge.add(Y),ge));return!0},z=(D,Y,le)=>{const J=y(D,Y);return le?J.has(le):J.size>0},B={getRelatedKeys:D=>y(this.toolkit,D),addRelation:(D,Y)=>{this.store.moleculeJoins.set(D,n.key),this.store.moleculeJoins.set(Y,n.key),p(this.toolkit,D,Y)},deleteRelation:(D,Y)=>{g(this.toolkit,D,Y)},replaceRelationsSafely:(D,Y)=>{b(this.toolkit,D,Y)},replaceRelationsUnsafely:(D,Y)=>{w(this.toolkit,D,Y)},has:(D,Y)=>z(this.toolkit,D,Y)};let Q,K;if(i){K=Bo(u,{key:`${n.key}/content`,default:i},["join","content"]);const D=({get:J},ne)=>J(K,ne),Y=({set:J},ne,ge)=>{J(K,ne,ge)};Q=Object.assign(B,{getContent:J=>D(this.toolkit,J),setContent:(J,ne)=>{Y(this.toolkit,J,ne)},deleteContent:J=>{this.realm.deallocate(J)}})}else Q=B;const oe=new bt(n,{externalStore:Q,isAType:n.isAType,isBType:n.isBType,makeContentKey:(...D)=>{const[Y,le]=D,J=D.sort(),ne=`${J[0]}:${J[1]}`,ge=u.molecules.get(Ge(Y)),ke=u.molecules.get(Ge(le));return ge||this.realm.allocate(n.key,Y),ke||this.realm.allocate(n.key,le),this.realm.allocate(Y,ne,"all"),this.realm.claim(le,ne),this.store.moleculeJoins.set(ne,n.key),ne}}),ye=()=>Oi(u,{key:`${n.key}/singleRelatedKey`,get:D=>({get:Y})=>{const le=Y(h,D);for(const J of le)return J;return null}},["join","keys"]),Se=()=>Oi(u,{key:`${n.key}/multipleRelatedKeys`,get:D=>({get:Y})=>{const le=um(h,u);return Y(le,D).members}},["join","keys"]),Ue=()=>Oi(u,{key:`${n.key}/singleRelatedEntry`,get:D=>({get:Y})=>{var J;const le=Y(h,D);for(const ne of le){let ge=(J=oe.isAType)!=null&&J.call(oe,D)?D:void 0,ke=ge===void 0?D:void 0;ge??(ge=ne),ke??(ke=ne);const Me=oe.makeContentKey(ge,ke),Ve=Y(K,Me);return[ne,Ve]}return null}},["join","entries"]),St=()=>Oi(u,{key:`${n.key}/multipleRelatedEntries`,get:D=>({get:Y})=>{const le=um(h,u);return Y(le,D).members.map(ne=>{var ft;let ge=(ft=oe.isAType)!=null&&ft.call(oe,D)?D:void 0,ke=ge===void 0?D:void 0;ge??(ge=ne),ke??(ke=ne);const Me=oe.makeContentKey(ge,ke),Ve=Y(K,Me);return[ne,Ve]})}},["join","entries"]);switch(n.cardinality){case"1:1":{const D=ye(),Y=`${c}KeyOf${Bt(f)}`,le=`${f}KeyOf${Bt(c)}`,J={[Y]:D,[le]:D};let ne;if(i){const ge=Ue(),ke=`${c}EntryOf${Bt(f)}`,Me=`${f}EntryOf${Bt(c)}`,Ve={[ke]:ge,[Me]:ge};ne=Object.assign(J,Ve)}else ne=J;this.relations=oe,this.states=ne;break}case"1:n":{const D=ye(),Y=Se(),le=`${c}KeyOf${Bt(f)}`,J=`${f}KeysOf${Bt(c)}`,ne={[le]:D,[J]:Y};let ge;if(i){const ke=Ue(),Me=St(),Ve=`${c}EntryOf${Bt(f)}`,ft=`${f}EntriesOf${Bt(c)}`,je={[Ve]:ke,[ft]:Me};ge=Object.assign(ne,je)}else ge=ne;this.relations=oe,this.states=ge;break}case"n:n":{const D=Se(),Y=`${c}KeysOf${Bt(f)}`,le=`${f}KeysOf${Bt(c)}`,J={[Y]:D,[le]:D};let ne;if(i){const ge=St(),ke=`${c}EntriesOf${Bt(f)}`,Me=`${f}EntriesOf${Bt(c)}`,Ve={[ke]:ge,[Me]:ge};ne=Object.assign(J,Ve)}else ne=J;this.relations=oe,this.states=ne}}}transact(n,i){const u=this.toolkit;this.toolkit=n,i(this),this.toolkit=u}[Symbol.dispose](){}}function P0(s,n){let i=n.joins.get(s.key);if(i===void 0){const c=Pe.STORE.joins.get(s.key);if(c===void 0)throw new Error(`Join "${s.key}" not found in store "${n.config.name}"`);i=new Lm(c.options,c.defaultContent,n),n.joins.set(s.key,i)}return i}function eb(s,n){return P0(s,n).core.relatedKeysAtoms}function tb(s){return s.startsWith("🔍 ")}var ro={exports:{}},re={};/**
23
+ * @license React
24
+ * react.production.js
25
+ *
26
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE file in the root directory of this source tree.
30
+ */var rm;function nb(){if(rm)return re;rm=1;var s=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),w=Symbol.iterator;function z(_){return _===null||typeof _!="object"?null:(_=w&&_[w]||_["@@iterator"],typeof _=="function"?_:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,K={};function oe(_,C,G){this.props=_,this.context=C,this.refs=K,this.updater=G||B}oe.prototype.isReactComponent={},oe.prototype.setState=function(_,C){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,C,"setState")},oe.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function ye(){}ye.prototype=oe.prototype;function Se(_,C,G){this.props=_,this.context=C,this.refs=K,this.updater=G||B}var Ue=Se.prototype=new ye;Ue.constructor=Se,Q(Ue,oe.prototype),Ue.isPureReactComponent=!0;var St=Array.isArray,D={H:null,A:null,T:null,S:null,V:null},Y=Object.prototype.hasOwnProperty;function le(_,C,G,H,I,Ee){return G=Ee.ref,{$$typeof:s,type:_,key:C,ref:G!==void 0?G:null,props:Ee}}function J(_,C){return le(_.type,C,void 0,void 0,void 0,_.props)}function ne(_){return typeof _=="object"&&_!==null&&_.$$typeof===s}function ge(_){var C={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(G){return C[G]})}var ke=/\/+/g;function Me(_,C){return typeof _=="object"&&_!==null&&_.key!=null?ge(""+_.key):C.toString(36)}function Ve(){}function ft(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(Ve,Ve):(_.status="pending",_.then(function(C){_.status==="pending"&&(_.status="fulfilled",_.value=C)},function(C){_.status==="pending"&&(_.status="rejected",_.reason=C)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function je(_,C,G,H,I){var Ee=typeof _;(Ee==="undefined"||Ee==="boolean")&&(_=null);var se=!1;if(_===null)se=!0;else switch(Ee){case"bigint":case"string":case"number":se=!0;break;case"object":switch(_.$$typeof){case s:case n:se=!0;break;case b:return se=_._init,je(se(_._payload),C,G,H,I)}}if(se)return I=I(_),se=H===""?"."+Me(_,0):H,St(I)?(G="",se!=null&&(G=se.replace(ke,"$&/")+"/"),je(I,C,G,"",function(qn){return qn})):I!=null&&(ne(I)&&(I=J(I,G+(I.key==null||_&&_.key===I.key?"":(""+I.key).replace(ke,"$&/")+"/")+se)),C.push(I)),1;se=0;var wt=H===""?".":H+":";if(St(_))for(var qe=0;qe<_.length;qe++)H=_[qe],Ee=wt+Me(H,qe),se+=je(H,C,G,Ee,I);else if(qe=z(_),typeof qe=="function")for(_=qe.call(_),qe=0;!(H=_.next()).done;)H=H.value,Ee=wt+Me(H,qe++),se+=je(H,C,G,Ee,I);else if(Ee==="object"){if(typeof _.then=="function")return je(ft(_),C,G,H,I);throw C=String(_),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return se}function R(_,C,G){if(_==null)return _;var H=[],I=0;return je(_,H,"","",function(Ee){return C.call(G,Ee,I++)}),H}function V(_){if(_._status===-1){var C=_._result;C=C(),C.then(function(G){(_._status===0||_._status===-1)&&(_._status=1,_._result=G)},function(G){(_._status===0||_._status===-1)&&(_._status=2,_._result=G)}),_._status===-1&&(_._status=0,_._result=C)}if(_._status===1)return _._result.default;throw _._result}var F=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)};function Te(){}return re.Children={map:R,forEach:function(_,C,G){R(_,function(){C.apply(this,arguments)},G)},count:function(_){var C=0;return R(_,function(){C++}),C},toArray:function(_){return R(_,function(C){return C})||[]},only:function(_){if(!ne(_))throw Error("React.Children.only expected to receive a single React element child.");return _}},re.Component=oe,re.Fragment=i,re.Profiler=c,re.PureComponent=Se,re.StrictMode=u,re.Suspense=p,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,re.__COMPILER_RUNTIME={__proto__:null,c:function(_){return D.H.useMemoCache(_)}},re.cache=function(_){return function(){return _.apply(null,arguments)}},re.cloneElement=function(_,C,G){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var H=Q({},_.props),I=_.key,Ee=void 0;if(C!=null)for(se in C.ref!==void 0&&(Ee=void 0),C.key!==void 0&&(I=""+C.key),C)!Y.call(C,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&C.ref===void 0||(H[se]=C[se]);var se=arguments.length-2;if(se===1)H.children=G;else if(1<se){for(var wt=Array(se),qe=0;qe<se;qe++)wt[qe]=arguments[qe+2];H.children=wt}return le(_.type,I,void 0,void 0,Ee,H)},re.createContext=function(_){return _={$$typeof:h,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},re.createElement=function(_,C,G){var H,I={},Ee=null;if(C!=null)for(H in C.key!==void 0&&(Ee=""+C.key),C)Y.call(C,H)&&H!=="key"&&H!=="__self"&&H!=="__source"&&(I[H]=C[H]);var se=arguments.length-2;if(se===1)I.children=G;else if(1<se){for(var wt=Array(se),qe=0;qe<se;qe++)wt[qe]=arguments[qe+2];I.children=wt}if(_&&_.defaultProps)for(H in se=_.defaultProps,se)I[H]===void 0&&(I[H]=se[H]);return le(_,Ee,void 0,void 0,null,I)},re.createRef=function(){return{current:null}},re.forwardRef=function(_){return{$$typeof:y,render:_}},re.isValidElement=ne,re.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:V}},re.memo=function(_,C){return{$$typeof:g,type:_,compare:C===void 0?null:C}},re.startTransition=function(_){var C=D.T,G={};D.T=G;try{var H=_(),I=D.S;I!==null&&I(G,H),typeof H=="object"&&H!==null&&typeof H.then=="function"&&H.then(Te,F)}catch(Ee){F(Ee)}finally{D.T=C}},re.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},re.use=function(_){return D.H.use(_)},re.useActionState=function(_,C,G){return D.H.useActionState(_,C,G)},re.useCallback=function(_,C){return D.H.useCallback(_,C)},re.useContext=function(_){return D.H.useContext(_)},re.useDebugValue=function(){},re.useDeferredValue=function(_,C){return D.H.useDeferredValue(_,C)},re.useEffect=function(_,C,G){var H=D.H;if(typeof G=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return H.useEffect(_,C)},re.useId=function(){return D.H.useId()},re.useImperativeHandle=function(_,C,G){return D.H.useImperativeHandle(_,C,G)},re.useInsertionEffect=function(_,C){return D.H.useInsertionEffect(_,C)},re.useLayoutEffect=function(_,C){return D.H.useLayoutEffect(_,C)},re.useMemo=function(_,C){return D.H.useMemo(_,C)},re.useOptimistic=function(_,C){return D.H.useOptimistic(_,C)},re.useReducer=function(_,C,G){return D.H.useReducer(_,C,G)},re.useRef=function(_){return D.H.useRef(_)},re.useState=function(_){return D.H.useState(_)},re.useSyncExternalStore=function(_,C,G){return D.H.useSyncExternalStore(_,C,G)},re.useTransition=function(){return D.H.useTransition()},re.version="19.1.0",re}var cm;function Fo(){return cm||(cm=1,ro.exports=nb()),ro.exports}var ot=Fo();const Io=ot.createContext(Pe.STORE);function Km(s,...n){let i;if(n.length===2){const u=n[0],c=n[1];i=pt(s,u,c)}else i=n[0];return i}function Ca(...s){const n=ot.useContext(Io),i=Km(n,...s),u=ot.useRef(null);return u.current??(u.current=c=>{Fe(n,i,c)}),u.current}function qt(...s){const n=ot.useContext(Io),i=Km(n,...s),u=ot.useId();return ot.useSyncExternalStore(c=>Ll(n,i,`use-o:${u}`,c),()=>Ft(n,i),()=>Ft(n,i))}const ab=(s,n,i,u,c)=>f=>{function h(p,g){if(s.logger.info("🧑‍⚖️","continuity",n,"reconciling updates"),Fe(s,xu,w=>(w.shift(),w)),p.id===g.id){const w=JSON.stringify(p.updates),z=JSON.stringify(g.updates);if(w===z){s.logger.info("✅","continuity",n,`results for ${p.id} match between client and server`),i.emit(`ack:${n}`,g.epoch);return}}else s.logger.info("❌","continuity",n,`thought update #${g.epoch} was ${p.key}:${p.id}, but it was actually ${g.key}:${g.id}`);s.logger.info("🧑‍⚖️","continuity",n,"updates do not match",p,g);const b=u.toReversed();for(const w of b)wi("oldValue",w,s);s.logger.info("⏪","continuity",n,"undid optimistic updates:",b),wi("oldValue",p,s),s.logger.info("⏪","continuity",n,"undid zeroth optimistic update",p),wi("newValue",g,s),s.logger.info("⏩","continuity",n,"applied confirmed update",g),i.emit(`ack:${n}`,g.epoch);for(const w of u){const z={type:"transaction",key:w.key},{id:B,params:Q}=w;Ho(s,z,B)(...Q)}s.logger.info("⏩","continuity",n,"reapplied subsequent optimistic updates:",u)}s.logger.info("🧑‍⚖️","continuity",n,"integrating confirmed update",{confirmedUpdate:f,confirmedUpdates:c,optimisticUpdates:u});const y=u[0];if(y)if(s.logger.info("🧑‍⚖️","continuity",n,"has optimistic updates to reconcile"),f.epoch===y.epoch){s.logger.info("🧑‍⚖️","continuity",n,`epoch of confirmed update #${f.epoch} matches zeroth optimistic update`),h(y,f);for(const p of c){const g=u[0];if(p.epoch===(g==null?void 0:g.epoch))h(g,p);else break}}else s.logger.info("🧑‍⚖️","continuity",n,`epoch of confirmed update #${f.epoch} does not match zeroth optimistic update #${y.epoch}`),c.some(g=>g.epoch===f.epoch)||(s.logger.info("👈","continuity",n,"pushing confirmed update to queue",f),Fe(s,Eo,g=>(g.push(f),g.sort((b,w)=>b.epoch-w.epoch),g)));else{s.logger.info("🧑‍⚖️","continuity",n,"has no optimistic updates to deal with");const p=Bn(s);let g;p&&(g=Dm(s,n)),g===f.epoch-1?(s.logger.info("✅","continuity",n,`integrating update #${f.epoch} (${f.key} ${f.id})`),wi("newValue",f,s),i.emit(`ack:${n}`,f.epoch),Ko(s,n,f.epoch)):p&&g!==void 0&&(s.logger.info("🧑‍⚖️","continuity",n,`received update #${f.epoch} but still waiting for update #${g+1}`,{clientEpoch:g,serverEpoch:f.epoch}),c.some(w=>w.epoch===f.epoch)?s.logger.info("👍","continuity",n,`confirmed update #${f.epoch} is already enqueued`):(s.logger.info("👈","continuity",n,`pushing confirmed update #${f.epoch} to queue`),Fe(s,Eo,w=>(w.push(f),w.sort((z,B)=>z.epoch-B.epoch),w))))}};function ib(s){return n=>{for(const i of n)Wo(s,i)}}function lb(s){return n=>{let i=0,u,c;for(const f of n)i%2===0?u=f:(c=f,Fe(s,u,c)),i++}}const sb=(s,{stringify:n,parse:i},u)=>({setSelf:c,onSet:f})=>{const h=s.getItem(u);h!=null&&c(i(h)),f(({newValue:y})=>{if(y==null){s.removeItem(u);return}s.setItem(u,n(y))})},Ym=Vt({key:"mySocketId__INTERNAL",default:void 0});qa({key:"mySocketId",get:({get:s})=>s(Ym)});Vt({key:"myName",default:null,effects:typeof window>"u"?[]:[sb(window.localStorage,JSON,"myUsername")]});const xu=Vt({key:"updateQueue",default:[]}),Eo=Vt({key:"serverConfirmedUpdateQueue",default:[]});function ub(s,n,i){const u=i.key,c=Ft(s,xu),f=Ft(s,Eo),h=(w,z)=>{n.off(`continuity-init:${u}`,h);let B=0,Q,K;for(const oe of z)B%2===0?Q=oe:(K=oe,"type"in Q&&Q.type==="mutable_atom"&&(Q=Za(s,Q)),Fe(s,Q,K)),B++;Ko(s,u,w)};n.off(`continuity-init:${u}`),n.on(`continuity-init:${u}`,h);const y=ab(s,u,n,c,f);n.off(`tx-new:${u}`),n.on(`tx-new:${u}`,y);const p=i.actions.map(w=>(zm(s,u,w.key),G0(s,w,`tx-run:${u}`,B=>{s.logger.info("🤞","continuity",u,"enqueuing optimistic update");const Q=c.findIndex(K=>K.id===B.id);Q===-1?(s.logger.info("🤞","continuity",u,"enqueuing new optimistic update"),Fe(s,xu,K=>(K.push(B),K.sort((oe,ye)=>oe.epoch-ye.epoch),K))):(s.logger.info("🤞","continuity",u,`replacing existing optimistic update at index ${Q}`),Fe(s,xu,K=>(K[Q]=B,K))),n.emit(`tx-run:${u}`,{id:B.id,key:w.key,params:B.params})}))),g=lb(s),b=ib(s);return n.on(`reveal:${u}`,g),n.on(`conceal:${u}`,b),n.emit(`get:${u}`),()=>{n.off(`continuity-init:${u}`),n.off(`tx-new:${u}`);for(const w of p)w()}}const Gm=ot.createContext({socket:null,services:null}),rb=({children:s,socket:n})=>{const i=ot.useRef(new Map).current,u=Ca(Ym);return ot.useEffect(()=>{u(n==null?void 0:n.id),n==null||n.on("connect",()=>{u(n.id)}),n==null||n.on("disconnect",()=>{u(void 0)})},[n,u]),q.jsx(Gm.Provider,{value:{socket:n,services:i},children:s})},{NODE_ENV:cb}=globalThis.env??{},ob=cb==="development";function Tu(){}function fb(s,n){if(ob){const i=ot.useRef(Tu);ot.useEffect(()=>{let u=i.current;if(u===Tu)u=s()??Tu,i.current=u;else return()=>{u(),i.current=Tu}},n)}else ot.useEffect(s,n)}function db(s){fb(s,[])}function hb(s,n){const{socket:i,services:u}=ot.useContext(Gm);db(()=>{let c=u==null?void 0:u.get(s);return c?c[0]++:(c=[1,i?n(i):void 0],u==null||u.set(s,c)),()=>{var f;c&&(c[0]--,c[0]===0&&((f=c[1])==null||f.call(c),u==null||u.delete(s)))}})}function yb(s){const n=ot.useContext(Io);hb(`tx-sync:${s.key}`,i=>ub(n,i,s))}var co={exports:{}},jl={},oo={exports:{}},fo={};/**
31
+ * @license React
32
+ * scheduler.production.js
33
+ *
34
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
35
+ *
36
+ * This source code is licensed under the MIT license found in the
37
+ * LICENSE file in the root directory of this source tree.
38
+ */var om;function mb(){return om||(om=1,function(s){function n(R,V){var F=R.length;R.push(V);e:for(;0<F;){var Te=F-1>>>1,_=R[Te];if(0<c(_,V))R[Te]=V,R[F]=_,F=Te;else break e}}function i(R){return R.length===0?null:R[0]}function u(R){if(R.length===0)return null;var V=R[0],F=R.pop();if(F!==V){R[0]=F;e:for(var Te=0,_=R.length,C=_>>>1;Te<C;){var G=2*(Te+1)-1,H=R[G],I=G+1,Ee=R[I];if(0>c(H,F))I<_&&0>c(Ee,H)?(R[Te]=Ee,R[I]=F,Te=I):(R[Te]=H,R[G]=F,Te=G);else if(I<_&&0>c(Ee,F))R[Te]=Ee,R[I]=F,Te=I;else break e}}return V}function c(R,V){var F=R.sortIndex-V.sortIndex;return F!==0?F:R.id-V.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var h=Date,y=h.now();s.unstable_now=function(){return h.now()-y}}var p=[],g=[],b=1,w=null,z=3,B=!1,Q=!1,K=!1,oe=!1,ye=typeof setTimeout=="function"?setTimeout:null,Se=typeof clearTimeout=="function"?clearTimeout:null,Ue=typeof setImmediate<"u"?setImmediate:null;function St(R){for(var V=i(g);V!==null;){if(V.callback===null)u(g);else if(V.startTime<=R)u(g),V.sortIndex=V.expirationTime,n(p,V);else break;V=i(g)}}function D(R){if(K=!1,St(R),!Q)if(i(p)!==null)Q=!0,Y||(Y=!0,Me());else{var V=i(g);V!==null&&je(D,V.startTime-R)}}var Y=!1,le=-1,J=5,ne=-1;function ge(){return oe?!0:!(s.unstable_now()-ne<J)}function ke(){if(oe=!1,Y){var R=s.unstable_now();ne=R;var V=!0;try{e:{Q=!1,K&&(K=!1,Se(le),le=-1),B=!0;var F=z;try{t:{for(St(R),w=i(p);w!==null&&!(w.expirationTime>R&&ge());){var Te=w.callback;if(typeof Te=="function"){w.callback=null,z=w.priorityLevel;var _=Te(w.expirationTime<=R);if(R=s.unstable_now(),typeof _=="function"){w.callback=_,St(R),V=!0;break t}w===i(p)&&u(p),St(R)}else u(p);w=i(p)}if(w!==null)V=!0;else{var C=i(g);C!==null&&je(D,C.startTime-R),V=!1}}break e}finally{w=null,z=F,B=!1}V=void 0}}finally{V?Me():Y=!1}}}var Me;if(typeof Ue=="function")Me=function(){Ue(ke)};else if(typeof MessageChannel<"u"){var Ve=new MessageChannel,ft=Ve.port2;Ve.port1.onmessage=ke,Me=function(){ft.postMessage(null)}}else Me=function(){ye(ke,0)};function je(R,V){le=ye(function(){R(s.unstable_now())},V)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(R){R.callback=null},s.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<R?Math.floor(1e3/R):5},s.unstable_getCurrentPriorityLevel=function(){return z},s.unstable_next=function(R){switch(z){case 1:case 2:case 3:var V=3;break;default:V=z}var F=z;z=V;try{return R()}finally{z=F}},s.unstable_requestPaint=function(){oe=!0},s.unstable_runWithPriority=function(R,V){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var F=z;z=R;try{return V()}finally{z=F}},s.unstable_scheduleCallback=function(R,V,F){var Te=s.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?Te+F:Te):F=Te,R){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=F+_,R={id:b++,callback:V,priorityLevel:R,startTime:F,expirationTime:_,sortIndex:-1},F>Te?(R.sortIndex=F,n(g,R),i(p)===null&&R===i(g)&&(K?(Se(le),le=-1):K=!0,je(D,F-Te))):(R.sortIndex=_,n(p,R),Q||B||(Q=!0,Y||(Y=!0,Me()))),R},s.unstable_shouldYield=ge,s.unstable_wrapCallback=function(R){var V=z;return function(){var F=z;z=V;try{return R.apply(this,arguments)}finally{z=F}}}}(fo)),fo}var fm;function pb(){return fm||(fm=1,oo.exports=mb()),oo.exports}var ho={exports:{}},yt={};/**
39
+ * @license React
40
+ * react-dom.production.js
41
+ *
42
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
43
+ *
44
+ * This source code is licensed under the MIT license found in the
45
+ * LICENSE file in the root directory of this source tree.
46
+ */var dm;function gb(){if(dm)return yt;dm=1;var s=Fo();function n(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(p,g,b){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:w==null?null:""+w,children:p,containerInfo:g,implementation:b}}var h=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,yt.createPortal=function(p,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(n(299));return f(p,g,null,b)},yt.flushSync=function(p){var g=h.T,b=u.p;try{if(h.T=null,u.p=2,p)return p()}finally{h.T=g,u.p=b,u.d.f()}},yt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(p,g))},yt.prefetchDNS=function(p){typeof p=="string"&&u.d.D(p)},yt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var b=g.as,w=y(b,g.crossOrigin),z=typeof g.integrity=="string"?g.integrity:void 0,B=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?u.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:w,integrity:z,fetchPriority:B}):b==="script"&&u.d.X(p,{crossOrigin:w,integrity:z,fetchPriority:B,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},yt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=y(g.as,g.crossOrigin);u.d.M(p,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(p)},yt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,w=y(b,g.crossOrigin);u.d.L(p,b,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},yt.preloadModule=function(p,g){if(typeof p=="string")if(g){var b=y(g.as,g.crossOrigin);u.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(p)},yt.requestFormReset=function(p){u.d.r(p)},yt.unstable_batchedUpdates=function(p,g){return p(g)},yt.useFormState=function(p,g,b){return h.H.useFormState(p,g,b)},yt.useFormStatus=function(){return h.H.useHostTransitionStatus()},yt.version="19.1.0",yt}var hm;function vb(){if(hm)return ho.exports;hm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(n){console.error(n)}}return s(),ho.exports=gb(),ho.exports}/**
47
+ * @license React
48
+ * react-dom-client.production.js
49
+ *
50
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
51
+ *
52
+ * This source code is licensed under the MIT license found in the
53
+ * LICENSE file in the root directory of this source tree.
54
+ */var ym;function bb(){if(ym)return jl;ym=1;var s=pb(),n=Fo(),i=vb();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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 y(e){if(f(e)!==e)throw Error(u(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(l=r.return,l!==null){a=l;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return y(r),e;if(o===l)return y(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==l.return)a=r,l=o;else{for(var d=!1,m=r.child;m;){if(m===a){d=!0,a=r,l=o;break}if(m===l){d=!0,l=r,a=o;break}m=m.sibling}if(!d){for(m=o.child;m;){if(m===a){d=!0,a=o,l=r;break}if(m===l){d=!0,l=o,a=r;break}m=m.sibling}if(!d)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,w=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),ye=Symbol.for("react.provider"),Se=Symbol.for("react.consumer"),Ue=Symbol.for("react.context"),St=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),ke=Symbol.iterator;function Me(e){return e===null||typeof e!="object"?null:(e=ke&&e[ke]||e["@@iterator"],typeof e=="function"?e:null)}var Ve=Symbol.for("react.client.reference");function ft(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ve?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Q:return"Fragment";case oe:return"Profiler";case K:return"StrictMode";case D:return"Suspense";case Y:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case B:return"Portal";case Ue:return(e.displayName||"Context")+".Provider";case Se:return(e._context.displayName||"Context")+".Consumer";case St:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case le:return t=e.displayName||null,t!==null?t:ft(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return ft(e(t))}catch{}}return null}var je=Array.isArray,R=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},Te=[],_=-1;function C(e){return{current:e}}function G(e){0>_||(e.current=Te[_],Te[_]=null,_--)}function H(e,t){_++,Te[_]=e.current,e.current=t}var I=C(null),Ee=C(null),se=C(null),wt=C(null);function qe(e,t){switch(H(se,t),H(Ee,e),H(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ny(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ny(t),e=Cy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(I),H(I,e)}function qn(){G(I),G(Ee),G(se)}function Gu(e){e.memoizedState!==null&&H(wt,e);var t=I.current,a=Cy(t,e.type);t!==a&&(H(Ee,e),H(I,a))}function us(e){Ee.current===e&&(G(I),G(Ee)),wt.current===e&&(G(wt),Ml._currentValue=F)}var Xu=Object.prototype.hasOwnProperty,Qu=s.unstable_scheduleCallback,$u=s.unstable_cancelCallback,Op=s.unstable_shouldYield,wp=s.unstable_requestPaint,sn=s.unstable_now,Rp=s.unstable_getCurrentPriorityLevel,ff=s.unstable_ImmediatePriority,df=s.unstable_UserBlockingPriority,rs=s.unstable_NormalPriority,kp=s.unstable_LowPriority,hf=s.unstable_IdlePriority,Mp=s.log,Np=s.unstable_setDisableYieldValue,qi=null,Rt=null;function Zn(e){if(typeof Mp=="function"&&Np(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(qi,e)}catch{}}var kt=Math.clz32?Math.clz32:zp,Cp=Math.log,Dp=Math.LN2;function zp(e){return e>>>=0,e===0?32:31-(Cp(e)/Dp|0)|0}var cs=256,os=4194304;function ya(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function fs(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var r=0,o=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~o,l!==0?r=ya(l):(d&=m,d!==0?r=ya(d):a||(a=m&~e,a!==0&&(r=ya(a))))):(m=l&~o,m!==0?r=ya(m):d!==0?r=ya(d):a||(a=l&~e,a!==0&&(r=ya(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function Zi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Up(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yf(){var e=cs;return cs<<=1,(cs&4194048)===0&&(cs=256),e}function mf(){var e=os;return os<<=1,(os&62914560)===0&&(os=4194304),e}function Ju(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Vi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function jp(e,t,a,l,r,o){var d=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var m=e.entanglements,v=e.expirationTimes,A=e.hiddenUpdates;for(a=d&~a;0<a;){var k=31-kt(a),N=1<<k;m[k]=0,v[k]=-1;var x=A[k];if(x!==null)for(A[k]=null,k=0;k<x.length;k++){var O=x[k];O!==null&&(O.lane&=-536870913)}a&=~N}l!==0&&pf(e,l,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(d&~t))}function pf(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-kt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&4194090}function gf(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-kt(a),r=1<<l;r&t|e[l]&t&&(e[l]|=t),a&=~r}}function Wu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Fu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vf(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:Fy(e.type))}function Bp(e,t){var a=V.p;try{return V.p=e,t()}finally{V.p=a}}var Vn=Math.random().toString(36).slice(2),dt="__reactFiber$"+Vn,Tt="__reactProps$"+Vn,Va="__reactContainer$"+Vn,Iu="__reactEvents$"+Vn,qp="__reactListeners$"+Vn,Zp="__reactHandles$"+Vn,bf="__reactResources$"+Vn,Hi="__reactMarker$"+Vn;function Pu(e){delete e[dt],delete e[Tt],delete e[Iu],delete e[qp],delete e[Zp]}function Ha(e){var t=e[dt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Va]||a[dt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=jy(e);e!==null;){if(a=e[dt])return a;e=jy(e)}return t}e=a,a=e.parentNode}return null}function La(e){if(e=e[dt]||e[Va]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Li(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ka(e){var t=e[bf];return t||(t=e[bf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[Hi]=!0}var _f=new Set,Sf={};function ma(e,t){Ya(e,t),Ya(e+"Capture",t)}function Ya(e,t){for(Sf[e]=t,e=0;e<t.length;e++)_f.add(t[e])}var Vp=RegExp("^[: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]*$"),Tf={},Ef={};function Hp(e){return Xu.call(Ef,e)?!0:Xu.call(Tf,e)?!1:Vp.test(e)?Ef[e]=!0:(Tf[e]=!0,!1)}function ds(e,t,a){if(Hp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function hs(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function bn(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}var er,Af;function Ga(e){if(er===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);er=t&&t[1]||"",Af=-1<a.stack.indexOf(`
55
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
56
+ `+er+e+Af}var tr=!1;function nr(e,t){if(!e||tr)return"";tr=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(O){var x=O}Reflect.construct(e,[],N)}else{try{N.call()}catch(O){x=O}e.call(N.prototype)}}else{try{throw Error()}catch(O){x=O}(N=e())&&typeof N.catch=="function"&&N.catch(function(){})}}catch(O){if(O&&x&&typeof O.stack=="string")return[O.stack,x.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=l.DetermineComponentFrameRoot(),d=o[0],m=o[1];if(d&&m){var v=d.split(`
57
+ `),A=m.split(`
58
+ `);for(r=l=0;l<v.length&&!v[l].includes("DetermineComponentFrameRoot");)l++;for(;r<A.length&&!A[r].includes("DetermineComponentFrameRoot");)r++;if(l===v.length||r===A.length)for(l=v.length-1,r=A.length-1;1<=l&&0<=r&&v[l]!==A[r];)r--;for(;1<=l&&0<=r;l--,r--)if(v[l]!==A[r]){if(l!==1||r!==1)do if(l--,r--,0>r||v[l]!==A[r]){var k=`
59
+ `+v[l].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=l&&0<=r);break}}}finally{tr=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ga(a):""}function Lp(e){switch(e.tag){case 26:case 27:case 5:return Ga(e.type);case 16:return Ga("Lazy");case 13:return Ga("Suspense");case 19:return Ga("SuspenseList");case 0:case 15:return nr(e.type,!1);case 11:return nr(e.type.render,!1);case 1:return nr(e.type,!0);case 31:return Ga("Activity");default:return""}}function xf(e){try{var t="";do t+=Lp(e),e=e.return;while(e);return t}catch(a){return`
60
+ Error generating stack: `+a.message+`
61
+ `+a.stack}}function Ht(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Of(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kp(e){var t=Of(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var r=a.get,o=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(d){l=""+d,o.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ys(e){e._valueTracker||(e._valueTracker=Kp(e))}function wf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Of(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ms(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}}var Yp=/[\n"\\]/g;function Lt(e){return e.replace(Yp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ar(e,t,a,l,r,o,d,m){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ht(t)):e.value!==""+Ht(t)&&(e.value=""+Ht(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?ir(e,d,Ht(t)):a!=null?ir(e,d,Ht(a)):l!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Ht(m):e.removeAttribute("name")}function Rf(e,t,a,l,r,o,d,m){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null))return;a=a!=null?""+Ht(a):"",t=t!=null?""+Ht(t):a,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d)}function ir(e,t,a){t==="number"&&ms(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Xa(e,t,a,l){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Ht(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function kf(e,t,a){if(t!=null&&(t=""+Ht(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ht(a):""}function Mf(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(je(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ht(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l)}function Qa(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Gp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Nf(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Gp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Cf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var r in t)l=t[r],t.hasOwnProperty(r)&&a[r]!==l&&Nf(e,r,l)}else for(var o in t)t.hasOwnProperty(o)&&Nf(e,o,t[o])}function lr(e){if(e.indexOf("-")===-1)return!1;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 Xp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Qp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ps(e){return Qp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var sr=null;function ur(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $a=null,Ja=null;function Df(e){var t=La(e);if(t&&(e=t.stateNode)){var a=e[Tt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ar(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Lt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var r=l[Tt]||null;if(!r)throw Error(u(90));ar(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&wf(l)}break e;case"textarea":kf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Xa(e,!!a.multiple,t,!1)}}}var rr=!1;function zf(e,t,a){if(rr)return e(t,a);rr=!0;try{var l=e(t);return l}finally{if(rr=!1,($a!==null||Ja!==null)&&(tu(),$a&&(t=$a,e=Ja,Ja=$a=null,Df(t),e)))for(t=0;t<e.length;t++)Df(e[t])}}function Ki(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Tt]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var _n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cr=!1;if(_n)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){cr=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{cr=!1}var Hn=null,or=null,gs=null;function Uf(){if(gs)return gs;var e,t=or,a=t.length,l,r="value"in Hn?Hn.value:Hn.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var d=a-e;for(l=1;l<=d&&t[a-l]===r[o-l];l++);return gs=r.slice(e,1<l?1-l:void 0)}function vs(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 bs(){return!0}function jf(){return!1}function Et(e){function t(a,l,r,o,d){this._reactName=a,this._targetInst=r,this.type=l,this.nativeEvent=o,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(a=e[m],this[m]=a?a(o):o[m]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?bs:jf,this.isPropagationStopped=jf,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=bs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=bs)},persist:function(){},isPersistent:bs}),t}var pa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_s=Et(pa),Gi=b({},pa,{view:0,detail:0}),$p=Et(Gi),fr,dr,Xi,Ss=b({},Gi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yr,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!==Xi&&(Xi&&e.type==="mousemove"?(fr=e.screenX-Xi.screenX,dr=e.screenY-Xi.screenY):dr=fr=0,Xi=e),fr)},movementY:function(e){return"movementY"in e?e.movementY:dr}}),Bf=Et(Ss),Jp=b({},Ss,{dataTransfer:0}),Wp=Et(Jp),Fp=b({},Gi,{relatedTarget:0}),hr=Et(Fp),Ip=b({},pa,{animationName:0,elapsedTime:0,pseudoElement:0}),Pp=Et(Ip),eg=b({},pa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tg=Et(eg),ng=b({},pa,{data:0}),qf=Et(ng),ag={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ig={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"},lg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lg[e])?!!t[e]:!1}function yr(){return sg}var ug=b({},Gi,{key:function(e){if(e.key){var t=ag[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ig[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yr,charCode:function(e){return e.type==="keypress"?vs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rg=Et(ug),cg=b({},Ss,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zf=Et(cg),og=b({},Gi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yr}),fg=Et(og),dg=b({},pa,{propertyName:0,elapsedTime:0,pseudoElement:0}),hg=Et(dg),yg=b({},Ss,{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}),mg=Et(yg),pg=b({},pa,{newState:0,oldState:0}),gg=Et(pg),vg=[9,13,27,32],mr=_n&&"CompositionEvent"in window,Qi=null;_n&&"documentMode"in document&&(Qi=document.documentMode);var bg=_n&&"TextEvent"in window&&!Qi,Vf=_n&&(!mr||Qi&&8<Qi&&11>=Qi),Hf=" ",Lf=!1;function Kf(e,t){switch(e){case"keyup":return vg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wa=!1;function _g(e,t){switch(e){case"compositionend":return Yf(t);case"keypress":return t.which!==32?null:(Lf=!0,Hf);case"textInput":return e=t.data,e===Hf&&Lf?null:e;default:return null}}function Sg(e,t){if(Wa)return e==="compositionend"||!mr&&Kf(e,t)?(e=Uf(),gs=or=Hn=null,Wa=!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 Vf&&t.locale!=="ko"?null:t.data;default:return null}}var Tg={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 Gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Tg[e.type]:t==="textarea"}function Xf(e,t,a,l){$a?Ja?Ja.push(l):Ja=[l]:$a=l,t=uu(t,"onChange"),0<t.length&&(a=new _s("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var $i=null,Ji=null;function Eg(e){Oy(e,0)}function Ts(e){var t=Li(e);if(wf(t))return e}function Qf(e,t){if(e==="change")return t}var $f=!1;if(_n){var pr;if(_n){var gr="oninput"in document;if(!gr){var Jf=document.createElement("div");Jf.setAttribute("oninput","return;"),gr=typeof Jf.oninput=="function"}pr=gr}else pr=!1;$f=pr&&(!document.documentMode||9<document.documentMode)}function Wf(){$i&&($i.detachEvent("onpropertychange",Ff),Ji=$i=null)}function Ff(e){if(e.propertyName==="value"&&Ts(Ji)){var t=[];Xf(t,Ji,e,ur(e)),zf(Eg,t)}}function Ag(e,t,a){e==="focusin"?(Wf(),$i=t,Ji=a,$i.attachEvent("onpropertychange",Ff)):e==="focusout"&&Wf()}function xg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ts(Ji)}function Og(e,t){if(e==="click")return Ts(t)}function wg(e,t){if(e==="input"||e==="change")return Ts(t)}function Rg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:Rg;function Wi(e,t){if(Mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var r=a[l];if(!Xu.call(t,r)||!Mt(e[r],t[r]))return!1}return!0}function If(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pf(e,t){var a=If(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=If(a)}}function ed(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ed(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function td(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ms(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ms(e.document)}return t}function vr(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")}var kg=_n&&"documentMode"in document&&11>=document.documentMode,Fa=null,br=null,Fi=null,_r=!1;function nd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;_r||Fa==null||Fa!==ms(l)||(l=Fa,"selectionStart"in l&&vr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Fi&&Wi(Fi,l)||(Fi=l,l=uu(br,"onSelect"),0<l.length&&(t=new _s("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Fa)))}function ga(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ia={animationend:ga("Animation","AnimationEnd"),animationiteration:ga("Animation","AnimationIteration"),animationstart:ga("Animation","AnimationStart"),transitionrun:ga("Transition","TransitionRun"),transitionstart:ga("Transition","TransitionStart"),transitioncancel:ga("Transition","TransitionCancel"),transitionend:ga("Transition","TransitionEnd")},Sr={},ad={};_n&&(ad=document.createElement("div").style,"AnimationEvent"in window||(delete Ia.animationend.animation,delete Ia.animationiteration.animation,delete Ia.animationstart.animation),"TransitionEvent"in window||delete Ia.transitionend.transition);function va(e){if(Sr[e])return Sr[e];if(!Ia[e])return e;var t=Ia[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in ad)return Sr[e]=t[a];return e}var id=va("animationend"),ld=va("animationiteration"),sd=va("animationstart"),Mg=va("transitionrun"),Ng=va("transitionstart"),Cg=va("transitioncancel"),ud=va("transitionend"),rd=new Map,Tr="abort auxClick beforeToggle 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(" ");Tr.push("scrollEnd");function It(e,t){rd.set(e,t),ma(t,[e])}var cd=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var a=cd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:xf(t)},cd.set(e,t),t)}return{value:e,source:t,stack:xf(t)}}var Yt=[],Pa=0,Er=0;function Es(){for(var e=Pa,t=Er=Pa=0;t<e;){var a=Yt[t];Yt[t++]=null;var l=Yt[t];Yt[t++]=null;var r=Yt[t];Yt[t++]=null;var o=Yt[t];if(Yt[t++]=null,l!==null&&r!==null){var d=l.pending;d===null?r.next=r:(r.next=d.next,d.next=r),l.pending=r}o!==0&&od(a,r,o)}}function As(e,t,a,l){Yt[Pa++]=e,Yt[Pa++]=t,Yt[Pa++]=a,Yt[Pa++]=l,Er|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ar(e,t,a,l){return As(e,t,a,l),xs(e)}function ei(e,t){return As(e,null,null,t),xs(e)}function od(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,l=o.alternate,l!==null&&(l.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-kt(a),e=o.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=a|536870912),o):null}function xs(e){if(50<Tl)throw Tl=0,Mc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ti={};function Dg(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,t,a,l){return new Dg(e,t,a,l)}function xr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Sn(e,t){var a=e.alternate;return a===null?(a=Nt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function fd(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Os(e,t,a,l,r,o){var d=0;if(l=e,typeof e=="function")xr(e)&&(d=1);else if(typeof e=="string")d=Uv(e,a,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=Nt(31,a,t,r),e.elementType=ne,e.lanes=o,e;case Q:return ba(a.children,r,o,t);case K:d=8,r|=24;break;case oe:return e=Nt(12,a,t,r|2),e.elementType=oe,e.lanes=o,e;case D:return e=Nt(13,a,t,r),e.elementType=D,e.lanes=o,e;case Y:return e=Nt(19,a,t,r),e.elementType=Y,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ye:case Ue:d=10;break e;case Se:d=9;break e;case St:d=11;break e;case le:d=14;break e;case J:d=16,l=null;break e}d=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Nt(d,a,t,r),t.elementType=e,t.type=l,t.lanes=o,t}function ba(e,t,a,l){return e=Nt(7,e,l,t),e.lanes=a,e}function Or(e,t,a){return e=Nt(6,e,null,t),e.lanes=a,e}function wr(e,t,a){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ni=[],ai=0,ws=null,Rs=0,Gt=[],Xt=0,_a=null,Tn=1,En="";function Sa(e,t){ni[ai++]=Rs,ni[ai++]=ws,ws=e,Rs=t}function dd(e,t,a){Gt[Xt++]=Tn,Gt[Xt++]=En,Gt[Xt++]=_a,_a=e;var l=Tn;e=En;var r=32-kt(l)-1;l&=~(1<<r),a+=1;var o=32-kt(t)+r;if(30<o){var d=r-r%5;o=(l&(1<<d)-1).toString(32),l>>=d,r-=d,Tn=1<<32-kt(t)+r|a<<r|l,En=o+e}else Tn=1<<o|a<<r|l,En=e}function Rr(e){e.return!==null&&(Sa(e,1),dd(e,1,0))}function kr(e){for(;e===ws;)ws=ni[--ai],ni[ai]=null,Rs=ni[--ai],ni[ai]=null;for(;e===_a;)_a=Gt[--Xt],Gt[Xt]=null,En=Gt[--Xt],Gt[Xt]=null,Tn=Gt[--Xt],Gt[Xt]=null}var vt=null,Ke=null,xe=!1,Ta=null,un=!1,Mr=Error(u(519));function Ea(e){var t=Error(u(418,""));throw el(Kt(t,e)),Mr}function hd(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[dt]=e,t[Tt]=l,a){case"dialog":pe("cancel",t),pe("close",t);break;case"iframe":case"object":case"embed":pe("load",t);break;case"video":case"audio":for(a=0;a<Al.length;a++)pe(Al[a],t);break;case"source":pe("error",t);break;case"img":case"image":case"link":pe("error",t),pe("load",t);break;case"details":pe("toggle",t);break;case"input":pe("invalid",t),Rf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),ys(t);break;case"select":pe("invalid",t);break;case"textarea":pe("invalid",t),Mf(t,l.value,l.defaultValue,l.children),ys(t)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||My(t.textContent,a)?(l.popover!=null&&(pe("beforetoggle",t),pe("toggle",t)),l.onScroll!=null&&pe("scroll",t),l.onScrollEnd!=null&&pe("scrollend",t),l.onClick!=null&&(t.onclick=ru),t=!0):t=!1,t||Ea(e)}function yd(e){for(vt=e.return;vt;)switch(vt.tag){case 5:case 13:un=!1;return;case 27:case 3:un=!0;return;default:vt=vt.return}}function Ii(e){if(e!==vt)return!1;if(!xe)return yd(e),xe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Xc(e.type,e.memoizedProps)),a=!a),a&&Ke&&Ea(e),yd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Ke=en(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Ke=null}}else t===27?(t=Ke,aa(e.type)?(e=Wc,Wc=null,Ke=e):Ke=t):Ke=vt?en(e.stateNode.nextSibling):null;return!0}function Pi(){Ke=vt=null,xe=!1}function md(){var e=Ta;return e!==null&&(Ot===null?Ot=e:Ot.push.apply(Ot,e),Ta=null),e}function el(e){Ta===null?Ta=[e]:Ta.push(e)}var Nr=C(null),Aa=null,An=null;function Ln(e,t,a){H(Nr,t._currentValue),t._currentValue=a}function xn(e){e._currentValue=Nr.current,G(Nr)}function Cr(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Dr(e,t,a,l){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var d=r.child;o=o.firstContext;e:for(;o!==null;){var m=o;o=r;for(var v=0;v<t.length;v++)if(m.context===t[v]){o.lanes|=a,m=o.alternate,m!==null&&(m.lanes|=a),Cr(o.return,a,e),l||(d=null);break e}o=m.next}}else if(r.tag===18){if(d=r.return,d===null)throw Error(u(341));d.lanes|=a,o=d.alternate,o!==null&&(o.lanes|=a),Cr(d,a,e),d=null}else d=r.child;if(d!==null)d.return=r;else for(d=r;d!==null;){if(d===e){d=null;break}if(r=d.sibling,r!==null){r.return=d.return,d=r;break}d=d.return}r=d}}function tl(e,t,a,l){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var d=r.alternate;if(d===null)throw Error(u(387));if(d=d.memoizedProps,d!==null){var m=r.type;Mt(r.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(r===wt.current){if(d=r.alternate,d===null)throw Error(u(387));d.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Ml):e=[Ml])}r=r.return}e!==null&&Dr(t,e,a,l),t.flags|=262144}function ks(e){for(e=e.firstContext;e!==null;){if(!Mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xa(e){Aa=e,An=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ht(e){return pd(Aa,e)}function Ms(e,t){return Aa===null&&xa(e),pd(e,t)}function pd(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},An===null){if(e===null)throw Error(u(308));An=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else An=An.next=t;return a}var zg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ug=s.unstable_scheduleCallback,jg=s.unstable_NormalPriority,et={$$typeof:Ue,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zr(){return{controller:new zg,data:new Map,refCount:0}}function nl(e){e.refCount--,e.refCount===0&&Ug(jg,function(){e.controller.abort()})}var al=null,Ur=0,ii=0,li=null;function Bg(e,t){if(al===null){var a=al=[];Ur=0,ii=Bc(),li={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ur++,t.then(gd,gd),t}function gd(){if(--Ur===0&&al!==null){li!==null&&(li.status="fulfilled");var e=al;al=null,ii=0,li=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qg(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),l}var vd=R.S;R.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bg(e,t),vd!==null&&vd(e,t)};var Oa=C(null);function jr(){var e=Oa.current;return e!==null?e:Be.pooledCache}function Ns(e,t){t===null?H(Oa,Oa.current):H(Oa,t.pool)}function bd(){var e=jr();return e===null?null:{parent:et._currentValue,pool:e}}var il=Error(u(460)),_d=Error(u(474)),Cs=Error(u(542)),Br={then:function(){}};function Sd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ds(){}function Td(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ds,Ds),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ad(e),e;default:if(typeof t.status=="string")t.then(Ds,Ds);else{if(e=Be,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ad(e),e}throw ll=t,il}}var ll=null;function Ed(){if(ll===null)throw Error(u(459));var e=ll;return ll=null,e}function Ad(e){if(e===il||e===Cs)throw Error(u(483))}var Kn=!1;function qr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Yn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Gn(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Oe&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=xs(e),od(e,null,a),t}return As(e,l,t,a),xs(e)}function sl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,gf(e,a)}}function Vr(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=d:o=o.next=d,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Hr=!1;function ul(){if(Hr){var e=li;if(e!==null)throw e}}function rl(e,t,a,l){Hr=!1;var r=e.updateQueue;Kn=!1;var o=r.firstBaseUpdate,d=r.lastBaseUpdate,m=r.shared.pending;if(m!==null){r.shared.pending=null;var v=m,A=v.next;v.next=null,d===null?o=A:d.next=A,d=v;var k=e.alternate;k!==null&&(k=k.updateQueue,m=k.lastBaseUpdate,m!==d&&(m===null?k.firstBaseUpdate=A:m.next=A,k.lastBaseUpdate=v))}if(o!==null){var N=r.baseState;d=0,k=A=v=null,m=o;do{var x=m.lane&-536870913,O=x!==m.lane;if(O?(be&x)===x:(l&x)===x){x!==0&&x===ii&&(Hr=!0),k!==null&&(k=k.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var ae=e,P=m;x=t;var De=a;switch(P.tag){case 1:if(ae=P.payload,typeof ae=="function"){N=ae.call(De,N,x);break e}N=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=P.payload,x=typeof ae=="function"?ae.call(De,N,x):ae,x==null)break e;N=b({},N,x);break e;case 2:Kn=!0}}x=m.callback,x!==null&&(e.flags|=64,O&&(e.flags|=8192),O=r.callbacks,O===null?r.callbacks=[x]:O.push(x))}else O={lane:x,tag:m.tag,payload:m.payload,callback:m.callback,next:null},k===null?(A=k=O,v=N):k=k.next=O,d|=x;if(m=m.next,m===null){if(m=r.shared.pending,m===null)break;O=m,m=O.next,O.next=null,r.lastBaseUpdate=O,r.shared.pending=null}}while(!0);k===null&&(v=N),r.baseState=v,r.firstBaseUpdate=A,r.lastBaseUpdate=k,o===null&&(r.shared.lanes=0),Pn|=d,e.lanes=d,e.memoizedState=N}}function xd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Od(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)xd(a[e],t)}var si=C(null),zs=C(0);function wd(e,t){e=Cn,H(zs,e),H(si,t),Cn=e|t.baseLanes}function Lr(){H(zs,Cn),H(si,si.current)}function Kr(){Cn=zs.current,G(si),G(zs)}var Xn=0,de=null,Ne=null,$e=null,Us=!1,ui=!1,wa=!1,js=0,cl=0,ri=null,Zg=0;function Xe(){throw Error(u(321))}function Yr(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Mt(e[a],t[a]))return!1;return!0}function Gr(e,t,a,l,r,o){return Xn=o,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=e===null||e.memoizedState===null?oh:fh,wa=!1,o=a(l,r),wa=!1,ui&&(o=kd(t,a,l,r)),Rd(e),o}function Rd(e){R.H=Ls;var t=Ne!==null&&Ne.next!==null;if(Xn=0,$e=Ne=de=null,Us=!1,cl=0,ri=null,t)throw Error(u(300));e===null||at||(e=e.dependencies,e!==null&&ks(e)&&(at=!0))}function kd(e,t,a,l){de=e;var r=0;do{if(ui&&(ri=null),cl=0,ui=!1,25<=r)throw Error(u(301));if(r+=1,$e=Ne=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}R.H=Xg,o=t(a,l)}while(ui);return o}function Vg(){var e=R.H,t=e.useState()[0];return t=typeof t.then=="function"?ol(t):t,e=e.useState()[0],(Ne!==null?Ne.memoizedState:null)!==e&&(de.flags|=1024),t}function Xr(){var e=js!==0;return js=0,e}function Qr(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function $r(e){if(Us){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Us=!1}Xn=0,$e=Ne=de=null,ui=!1,cl=js=0,ri=null}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?de.memoizedState=$e=e:$e=$e.next=e,$e}function Je(){if(Ne===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=$e===null?de.memoizedState:$e.next;if(t!==null)$e=t,Ne=e;else{if(e===null)throw de.alternate===null?Error(u(467)):Error(u(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},$e===null?de.memoizedState=$e=e:$e=$e.next=e}return $e}function Jr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ol(e){var t=cl;return cl+=1,ri===null&&(ri=[]),e=Td(ri,e,t),t=de,($e===null?t.memoizedState:$e.next)===null&&(t=t.alternate,R.H=t===null||t.memoizedState===null?oh:fh),e}function Bs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ol(e);if(e.$$typeof===Ue)return ht(e)}throw Error(u(438,String(e)))}function Wr(e){var t=null,a=de.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=de.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Jr(),de.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=ge;return t.index++,a}function On(e,t){return typeof t=="function"?t(e):t}function qs(e){var t=Je();return Fr(t,Ne,e)}function Fr(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var r=e.baseQueue,o=l.pending;if(o!==null){if(r!==null){var d=r.next;r.next=o.next,o.next=d}t.baseQueue=r=o,l.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var m=d=null,v=null,A=t,k=!1;do{var N=A.lane&-536870913;if(N!==A.lane?(be&N)===N:(Xn&N)===N){var x=A.revertLane;if(x===0)v!==null&&(v=v.next={lane:0,revertLane:0,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),N===ii&&(k=!0);else if((Xn&x)===x){A=A.next,x===ii&&(k=!0);continue}else N={lane:0,revertLane:A.revertLane,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(m=v=N,d=o):v=v.next=N,de.lanes|=x,Pn|=x;N=A.action,wa&&a(o,N),o=A.hasEagerState?A.eagerState:a(o,N)}else x={lane:N,revertLane:A.revertLane,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(m=v=x,d=o):v=v.next=x,de.lanes|=N,Pn|=N;A=A.next}while(A!==null&&A!==t);if(v===null?d=o:v.next=m,!Mt(o,e.memoizedState)&&(at=!0,k&&(a=li,a!==null)))throw a;e.memoizedState=o,e.baseState=d,e.baseQueue=v,l.lastRenderedState=o}return r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ir(e){var t=Je(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var d=r=r.next;do o=e(o,d.action),d=d.next;while(d!==r);Mt(o,t.memoizedState)||(at=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,l]}function Md(e,t,a){var l=de,r=Je(),o=xe;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var d=!Mt((Ne||r).memoizedState,a);d&&(r.memoizedState=a,at=!0),r=r.queue;var m=Dd.bind(null,l,r,e);if(fl(2048,8,m,[e]),r.getSnapshot!==t||d||$e!==null&&$e.memoizedState.tag&1){if(l.flags|=2048,ci(9,Zs(),Cd.bind(null,l,r,a,t),null),Be===null)throw Error(u(349));o||(Xn&124)!==0||Nd(l,t,a)}return a}function Nd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=de.updateQueue,t===null?(t=Jr(),de.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Cd(e,t,a,l){t.value=a,t.getSnapshot=l,zd(t)&&Ud(e)}function Dd(e,t,a){return a(function(){zd(t)&&Ud(e)})}function zd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Mt(e,a)}catch{return!0}}function Ud(e){var t=ei(e,2);t!==null&&jt(t,e,2)}function Pr(e){var t=At();if(typeof e=="function"){var a=e;if(e=a(),wa){Zn(!0);try{a()}finally{Zn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:e},t}function jd(e,t,a,l){return e.baseState=a,Fr(e,Ne,typeof l=="function"?l:On)}function Hg(e,t,a,l,r){if(Hs(e))throw Error(u(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){o.listeners.push(d)}};R.T!==null?a(!0):o.isTransition=!1,l(o),a=t.pending,a===null?(o.next=t.pending=o,Bd(t,o)):(o.next=a.next,t.pending=a.next=o)}}function Bd(e,t){var a=t.action,l=t.payload,r=e.state;if(t.isTransition){var o=R.T,d={};R.T=d;try{var m=a(r,l),v=R.S;v!==null&&v(d,m),qd(e,t,m)}catch(A){ec(e,t,A)}finally{R.T=o}}else try{o=a(r,l),qd(e,t,o)}catch(A){ec(e,t,A)}}function qd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Zd(e,t,l)},function(l){return ec(e,t,l)}):Zd(e,t,a)}function Zd(e,t,a){t.status="fulfilled",t.value=a,Vd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Bd(e,a)))}function ec(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Vd(t),t=t.next;while(t!==l)}e.action=null}function Vd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hd(e,t){return t}function Ld(e,t){if(xe){var a=Be.formState;if(a!==null){e:{var l=de;if(xe){if(Ke){t:{for(var r=Ke,o=un;r.nodeType!==8;){if(!o){r=null;break t}if(r=en(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){Ke=en(r.nextSibling),l=r.data==="F!";break e}}Ea(l)}l=!1}l&&(t=a[0])}}return a=At(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hd,lastRenderedState:t},a.queue=l,a=uh.bind(null,de,l),l.dispatch=a,l=Pr(!1),o=lc.bind(null,de,!1,l.queue),l=At(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,a=Hg.bind(null,de,r,o,a),r.dispatch=a,l.memoizedState=e,[t,a,!1]}function Kd(e){var t=Je();return Yd(t,Ne,e)}function Yd(e,t,a){if(t=Fr(e,t,Hd)[0],e=qs(On)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ol(t)}catch(d){throw d===il?Cs:d}else l=t;t=Je();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(de.flags|=2048,ci(9,Zs(),Lg.bind(null,r,a),null)),[l,o,e]}function Lg(e,t){e.action=t}function Gd(e){var t=Je(),a=Ne;if(a!==null)return Yd(t,a,e);Je(),t=t.memoizedState,a=Je();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function ci(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=de.updateQueue,t===null&&(t=Jr(),de.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Zs(){return{destroy:void 0,resource:void 0}}function Xd(){return Je().memoizedState}function Vs(e,t,a,l){var r=At();l=l===void 0?null:l,de.flags|=e,r.memoizedState=ci(1|t,Zs(),a,l)}function fl(e,t,a,l){var r=Je();l=l===void 0?null:l;var o=r.memoizedState.inst;Ne!==null&&l!==null&&Yr(l,Ne.memoizedState.deps)?r.memoizedState=ci(t,o,a,l):(de.flags|=e,r.memoizedState=ci(1|t,o,a,l))}function Qd(e,t){Vs(8390656,8,e,t)}function $d(e,t){fl(2048,8,e,t)}function Jd(e,t){return fl(4,2,e,t)}function Wd(e,t){return fl(4,4,e,t)}function Fd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Id(e,t,a){a=a!=null?a.concat([e]):null,fl(4,4,Fd.bind(null,t,e),a)}function tc(){}function Pd(e,t){var a=Je();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Yr(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function eh(e,t){var a=Je();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Yr(t,l[1]))return l[0];if(l=e(),wa){Zn(!0);try{e()}finally{Zn(!1)}}return a.memoizedState=[l,t],l}function nc(e,t,a){return a===void 0||(Xn&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=ay(),de.lanes|=e,Pn|=e,a)}function th(e,t,a,l){return Mt(a,t)?a:si.current!==null?(e=nc(e,a,l),Mt(e,t)||(at=!0),e):(Xn&42)===0?(at=!0,e.memoizedState=a):(e=ay(),de.lanes|=e,Pn|=e,t)}function nh(e,t,a,l,r){var o=V.p;V.p=o!==0&&8>o?o:8;var d=R.T,m={};R.T=m,lc(e,!1,t,a);try{var v=r(),A=R.S;if(A!==null&&A(m,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var k=qg(v,l);dl(e,t,k,Ut(e))}else dl(e,t,l,Ut(e))}catch(N){dl(e,t,{then:function(){},status:"rejected",reason:N},Ut())}finally{V.p=o,R.T=d}}function Kg(){}function ac(e,t,a,l){if(e.tag!==5)throw Error(u(476));var r=ah(e).queue;nh(e,r,t,F,a===null?Kg:function(){return ih(e),a(l)})}function ah(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:F},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ih(e){var t=ah(e).next.queue;dl(e,t,{},Ut())}function ic(){return ht(Ml)}function lh(){return Je().memoizedState}function sh(){return Je().memoizedState}function Yg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ut();e=Yn(a);var l=Gn(t,e,a);l!==null&&(jt(l,t,a),sl(l,t,a)),t={cache:zr()},e.payload=t;return}t=t.return}}function Gg(e,t,a){var l=Ut();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Hs(e)?rh(t,a):(a=Ar(e,t,a,l),a!==null&&(jt(a,e,l),ch(a,t,l)))}function uh(e,t,a){var l=Ut();dl(e,t,a,l)}function dl(e,t,a,l){var r={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hs(e))rh(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var d=t.lastRenderedState,m=o(d,a);if(r.hasEagerState=!0,r.eagerState=m,Mt(m,d))return As(e,t,r,0),Be===null&&Es(),!1}catch{}finally{}if(a=Ar(e,t,r,l),a!==null)return jt(a,e,l),ch(a,t,l),!0}return!1}function lc(e,t,a,l){if(l={lane:2,revertLane:Bc(),action:l,hasEagerState:!1,eagerState:null,next:null},Hs(e)){if(t)throw Error(u(479))}else t=Ar(e,a,l,2),t!==null&&jt(t,e,2)}function Hs(e){var t=e.alternate;return e===de||t!==null&&t===de}function rh(e,t){ui=Us=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function ch(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,gf(e,a)}}var Ls={readContext:ht,use:Bs,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe},oh={readContext:ht,use:Bs,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:Qd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Vs(4194308,4,Fd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Vs(4194308,4,e,t)},useInsertionEffect:function(e,t){Vs(4,2,e,t)},useMemo:function(e,t){var a=At();t=t===void 0?null:t;var l=e();if(wa){Zn(!0);try{e()}finally{Zn(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=At();if(a!==void 0){var r=a(t);if(wa){Zn(!0);try{a(t)}finally{Zn(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=Gg.bind(null,de,e),[l.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:function(e){e=Pr(e);var t=e.queue,a=uh.bind(null,de,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:tc,useDeferredValue:function(e,t){var a=At();return nc(a,e,t)},useTransition:function(){var e=Pr(!1);return e=nh.bind(null,de,e.queue,!0,!1),At().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=de,r=At();if(xe){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Be===null)throw Error(u(349));(be&124)!==0||Nd(l,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,Qd(Dd.bind(null,l,o,e),[e]),l.flags|=2048,ci(9,Zs(),Cd.bind(null,l,o,a,t),null),a},useId:function(){var e=At(),t=Be.identifierPrefix;if(xe){var a=En,l=Tn;a=(l&~(1<<32-kt(l)-1)).toString(32)+a,t="«"+t+"R"+a,a=js++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=Zg++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:ic,useFormState:Ld,useActionState:Ld,useOptimistic:function(e){var t=At();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=lc.bind(null,de,!0,a),a.dispatch=t,[e,t]},useMemoCache:Wr,useCacheRefresh:function(){return At().memoizedState=Yg.bind(null,de)}},fh={readContext:ht,use:Bs,useCallback:Pd,useContext:ht,useEffect:$d,useImperativeHandle:Id,useInsertionEffect:Jd,useLayoutEffect:Wd,useMemo:eh,useReducer:qs,useRef:Xd,useState:function(){return qs(On)},useDebugValue:tc,useDeferredValue:function(e,t){var a=Je();return th(a,Ne.memoizedState,e,t)},useTransition:function(){var e=qs(On)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ol(e),t]},useSyncExternalStore:Md,useId:lh,useHostTransitionStatus:ic,useFormState:Kd,useActionState:Kd,useOptimistic:function(e,t){var a=Je();return jd(a,Ne,e,t)},useMemoCache:Wr,useCacheRefresh:sh},Xg={readContext:ht,use:Bs,useCallback:Pd,useContext:ht,useEffect:$d,useImperativeHandle:Id,useInsertionEffect:Jd,useLayoutEffect:Wd,useMemo:eh,useReducer:Ir,useRef:Xd,useState:function(){return Ir(On)},useDebugValue:tc,useDeferredValue:function(e,t){var a=Je();return Ne===null?nc(a,e,t):th(a,Ne.memoizedState,e,t)},useTransition:function(){var e=Ir(On)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ol(e),t]},useSyncExternalStore:Md,useId:lh,useHostTransitionStatus:ic,useFormState:Gd,useActionState:Gd,useOptimistic:function(e,t){var a=Je();return Ne!==null?jd(a,Ne,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Wr,useCacheRefresh:sh},oi=null,hl=0;function Ks(e){var t=hl;return hl+=1,oi===null&&(oi=[]),Td(oi,e,t)}function yl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ys(e,t){throw t.$$typeof===w?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function dh(e){var t=e._init;return t(e._payload)}function hh(e){function t(T,S){if(e){var E=T.deletions;E===null?(T.deletions=[S],T.flags|=16):E.push(S)}}function a(T,S){if(!e)return null;for(;S!==null;)t(T,S),S=S.sibling;return null}function l(T){for(var S=new Map;T!==null;)T.key!==null?S.set(T.key,T):S.set(T.index,T),T=T.sibling;return S}function r(T,S){return T=Sn(T,S),T.index=0,T.sibling=null,T}function o(T,S,E){return T.index=E,e?(E=T.alternate,E!==null?(E=E.index,E<S?(T.flags|=67108866,S):E):(T.flags|=67108866,S)):(T.flags|=1048576,S)}function d(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function m(T,S,E,M){return S===null||S.tag!==6?(S=Or(E,T.mode,M),S.return=T,S):(S=r(S,E),S.return=T,S)}function v(T,S,E,M){var X=E.type;return X===Q?k(T,S,E.props.children,M,E.key):S!==null&&(S.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===J&&dh(X)===S.type)?(S=r(S,E.props),yl(S,E),S.return=T,S):(S=Os(E.type,E.key,E.props,null,T.mode,M),yl(S,E),S.return=T,S)}function A(T,S,E,M){return S===null||S.tag!==4||S.stateNode.containerInfo!==E.containerInfo||S.stateNode.implementation!==E.implementation?(S=wr(E,T.mode,M),S.return=T,S):(S=r(S,E.children||[]),S.return=T,S)}function k(T,S,E,M,X){return S===null||S.tag!==7?(S=ba(E,T.mode,M,X),S.return=T,S):(S=r(S,E),S.return=T,S)}function N(T,S,E){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Or(""+S,T.mode,E),S.return=T,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case z:return E=Os(S.type,S.key,S.props,null,T.mode,E),yl(E,S),E.return=T,E;case B:return S=wr(S,T.mode,E),S.return=T,S;case J:var M=S._init;return S=M(S._payload),N(T,S,E)}if(je(S)||Me(S))return S=ba(S,T.mode,E,null),S.return=T,S;if(typeof S.then=="function")return N(T,Ks(S),E);if(S.$$typeof===Ue)return N(T,Ms(T,S),E);Ys(T,S)}return null}function x(T,S,E,M){var X=S!==null?S.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return X!==null?null:m(T,S,""+E,M);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case z:return E.key===X?v(T,S,E,M):null;case B:return E.key===X?A(T,S,E,M):null;case J:return X=E._init,E=X(E._payload),x(T,S,E,M)}if(je(E)||Me(E))return X!==null?null:k(T,S,E,M,null);if(typeof E.then=="function")return x(T,S,Ks(E),M);if(E.$$typeof===Ue)return x(T,S,Ms(T,E),M);Ys(T,E)}return null}function O(T,S,E,M,X){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return T=T.get(E)||null,m(S,T,""+M,X);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case z:return T=T.get(M.key===null?E:M.key)||null,v(S,T,M,X);case B:return T=T.get(M.key===null?E:M.key)||null,A(S,T,M,X);case J:var he=M._init;return M=he(M._payload),O(T,S,E,M,X)}if(je(M)||Me(M))return T=T.get(E)||null,k(S,T,M,X,null);if(typeof M.then=="function")return O(T,S,E,Ks(M),X);if(M.$$typeof===Ue)return O(T,S,E,Ms(S,M),X);Ys(S,M)}return null}function ae(T,S,E,M){for(var X=null,he=null,W=S,ee=S=0,lt=null;W!==null&&ee<E.length;ee++){W.index>ee?(lt=W,W=null):lt=W.sibling;var Ae=x(T,W,E[ee],M);if(Ae===null){W===null&&(W=lt);break}e&&W&&Ae.alternate===null&&t(T,W),S=o(Ae,S,ee),he===null?X=Ae:he.sibling=Ae,he=Ae,W=lt}if(ee===E.length)return a(T,W),xe&&Sa(T,ee),X;if(W===null){for(;ee<E.length;ee++)W=N(T,E[ee],M),W!==null&&(S=o(W,S,ee),he===null?X=W:he.sibling=W,he=W);return xe&&Sa(T,ee),X}for(W=l(W);ee<E.length;ee++)lt=O(W,T,ee,E[ee],M),lt!==null&&(e&&lt.alternate!==null&&W.delete(lt.key===null?ee:lt.key),S=o(lt,S,ee),he===null?X=lt:he.sibling=lt,he=lt);return e&&W.forEach(function(ra){return t(T,ra)}),xe&&Sa(T,ee),X}function P(T,S,E,M){if(E==null)throw Error(u(151));for(var X=null,he=null,W=S,ee=S=0,lt=null,Ae=E.next();W!==null&&!Ae.done;ee++,Ae=E.next()){W.index>ee?(lt=W,W=null):lt=W.sibling;var ra=x(T,W,Ae.value,M);if(ra===null){W===null&&(W=lt);break}e&&W&&ra.alternate===null&&t(T,W),S=o(ra,S,ee),he===null?X=ra:he.sibling=ra,he=ra,W=lt}if(Ae.done)return a(T,W),xe&&Sa(T,ee),X;if(W===null){for(;!Ae.done;ee++,Ae=E.next())Ae=N(T,Ae.value,M),Ae!==null&&(S=o(Ae,S,ee),he===null?X=Ae:he.sibling=Ae,he=Ae);return xe&&Sa(T,ee),X}for(W=l(W);!Ae.done;ee++,Ae=E.next())Ae=O(W,T,ee,Ae.value,M),Ae!==null&&(e&&Ae.alternate!==null&&W.delete(Ae.key===null?ee:Ae.key),S=o(Ae,S,ee),he===null?X=Ae:he.sibling=Ae,he=Ae);return e&&W.forEach(function(Qv){return t(T,Qv)}),xe&&Sa(T,ee),X}function De(T,S,E,M){if(typeof E=="object"&&E!==null&&E.type===Q&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case z:e:{for(var X=E.key;S!==null;){if(S.key===X){if(X=E.type,X===Q){if(S.tag===7){a(T,S.sibling),M=r(S,E.props.children),M.return=T,T=M;break e}}else if(S.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===J&&dh(X)===S.type){a(T,S.sibling),M=r(S,E.props),yl(M,E),M.return=T,T=M;break e}a(T,S);break}else t(T,S);S=S.sibling}E.type===Q?(M=ba(E.props.children,T.mode,M,E.key),M.return=T,T=M):(M=Os(E.type,E.key,E.props,null,T.mode,M),yl(M,E),M.return=T,T=M)}return d(T);case B:e:{for(X=E.key;S!==null;){if(S.key===X)if(S.tag===4&&S.stateNode.containerInfo===E.containerInfo&&S.stateNode.implementation===E.implementation){a(T,S.sibling),M=r(S,E.children||[]),M.return=T,T=M;break e}else{a(T,S);break}else t(T,S);S=S.sibling}M=wr(E,T.mode,M),M.return=T,T=M}return d(T);case J:return X=E._init,E=X(E._payload),De(T,S,E,M)}if(je(E))return ae(T,S,E,M);if(Me(E)){if(X=Me(E),typeof X!="function")throw Error(u(150));return E=X.call(E),P(T,S,E,M)}if(typeof E.then=="function")return De(T,S,Ks(E),M);if(E.$$typeof===Ue)return De(T,S,Ms(T,E),M);Ys(T,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,S!==null&&S.tag===6?(a(T,S.sibling),M=r(S,E),M.return=T,T=M):(a(T,S),M=Or(E,T.mode,M),M.return=T,T=M),d(T)):a(T,S)}return function(T,S,E,M){try{hl=0;var X=De(T,S,E,M);return oi=null,X}catch(W){if(W===il||W===Cs)throw W;var he=Nt(29,W,null,T.mode);return he.lanes=M,he.return=T,he}finally{}}}var fi=hh(!0),yh=hh(!1),Qt=C(null),rn=null;function Qn(e){var t=e.alternate;H(tt,tt.current&1),H(Qt,e),rn===null&&(t===null||si.current!==null||t.memoizedState!==null)&&(rn=e)}function mh(e){if(e.tag===22){if(H(tt,tt.current),H(Qt,e),rn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(rn=e)}}else $n()}function $n(){H(tt,tt.current),H(Qt,Qt.current)}function wn(e){G(Qt),rn===e&&(rn=null),G(tt)}var tt=C(0);function Gs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Jc(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)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}function sc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var uc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Ut(),r=Yn(l);r.payload=t,a!=null&&(r.callback=a),t=Gn(e,r,l),t!==null&&(jt(t,e,l),sl(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Ut(),r=Yn(l);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Gn(e,r,l),t!==null&&(jt(t,e,l),sl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ut(),l=Yn(a);l.tag=2,t!=null&&(l.callback=t),t=Gn(e,l,a),t!==null&&(jt(t,e,a),sl(t,e,a))}};function ph(e,t,a,l,r,o,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,o,d):t.prototype&&t.prototype.isPureReactComponent?!Wi(a,l)||!Wi(r,o):!0}function gh(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&uc.enqueueReplaceState(t,t.state,null)}function Ra(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}var Xs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function vh(e){Xs(e)}function bh(e){console.error(e)}function _h(e){Xs(e)}function Qs(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Sh(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function rc(e,t,a){return a=Yn(a),a.tag=3,a.payload={element:null},a.callback=function(){Qs(e,t)},a}function Th(e){return e=Yn(e),e.tag=3,e}function Eh(e,t,a,l){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=l.value;e.payload=function(){return r(o)},e.callback=function(){Sh(t,a,l)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Sh(t,a,l),typeof r!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function Qg(e,t,a,l,r){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&tl(t,a,r,!0),a=Qt.current,a!==null){switch(a.tag){case 13:return rn===null?Cc():a.alternate===null&&Ye===0&&(Ye=3),a.flags&=-257,a.flags|=65536,a.lanes=r,l===Br?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),zc(e,l,r)),!1;case 22:return a.flags|=65536,l===Br?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),zc(e,l,r)),!1}throw Error(u(435,a.tag))}return zc(e,l,r),Cc(),!1}if(xe)return t=Qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==Mr&&(e=Error(u(422),{cause:l}),el(Kt(e,a)))):(l!==Mr&&(t=Error(u(423),{cause:l}),el(Kt(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=Kt(l,a),r=rc(e.stateNode,l,r),Vr(e,r),Ye!==4&&(Ye=2)),!1;var o=Error(u(520),{cause:l});if(o=Kt(o,a),Sl===null?Sl=[o]:Sl.push(o),Ye!==4&&(Ye=2),t===null)return!0;l=Kt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=rc(a.stateNode,l,e),Vr(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(ea===null||!ea.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Th(r),Eh(r,e,a,l),Vr(a,r),!1}a=a.return}while(a!==null);return!1}var Ah=Error(u(461)),at=!1;function ut(e,t,a,l){t.child=e===null?yh(t,null,a,l):fi(t,e.child,a,l)}function xh(e,t,a,l,r){a=a.render;var o=t.ref;if("ref"in l){var d={};for(var m in l)m!=="ref"&&(d[m]=l[m])}else d=l;return xa(t),l=Gr(e,t,a,d,o,r),m=Xr(),e!==null&&!at?(Qr(e,t,r),Rn(e,t,r)):(xe&&m&&Rr(t),t.flags|=1,ut(e,t,l,r),t.child)}function Oh(e,t,a,l,r){if(e===null){var o=a.type;return typeof o=="function"&&!xr(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,wh(e,t,o,l,r)):(e=Os(a.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!pc(e,r)){var d=o.memoizedProps;if(a=a.compare,a=a!==null?a:Wi,a(d,l)&&e.ref===t.ref)return Rn(e,t,r)}return t.flags|=1,e=Sn(o,l),e.ref=t.ref,e.return=t,t.child=e}function wh(e,t,a,l,r){if(e!==null){var o=e.memoizedProps;if(Wi(o,l)&&e.ref===t.ref)if(at=!1,t.pendingProps=l=o,pc(e,r))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Rn(e,t,r)}return cc(e,t,a,l,r)}function Rh(e,t,a){var l=t.pendingProps,r=l.children,o=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((t.flags&128)!==0){if(l=o!==null?o.baseLanes|a:a,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;t.childLanes=o&~l}else t.childLanes=0,t.child=null;return kh(e,t,l,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ns(t,o!==null?o.cachePool:null),o!==null?wd(t,o):Lr(),mh(t);else return t.lanes=t.childLanes=536870912,kh(e,t,o!==null?o.baseLanes|a:a,a)}else o!==null?(Ns(t,o.cachePool),wd(t,o),$n(),t.memoizedState=null):(e!==null&&Ns(t,null),Lr(),$n());return ut(e,t,r,a),t.child}function kh(e,t,a,l){var r=jr();return r=r===null?null:{parent:et._currentValue,pool:r},t.memoizedState={baseLanes:a,cachePool:r},e!==null&&Ns(t,null),Lr(),mh(t),e!==null&&tl(e,t,l,!0),null}function $s(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function cc(e,t,a,l,r){return xa(t),a=Gr(e,t,a,l,void 0,r),l=Xr(),e!==null&&!at?(Qr(e,t,r),Rn(e,t,r)):(xe&&l&&Rr(t),t.flags|=1,ut(e,t,a,r),t.child)}function Mh(e,t,a,l,r,o){return xa(t),t.updateQueue=null,a=kd(t,l,a,r),Rd(e),l=Xr(),e!==null&&!at?(Qr(e,t,o),Rn(e,t,o)):(xe&&l&&Rr(t),t.flags|=1,ut(e,t,a,o),t.child)}function Nh(e,t,a,l,r){if(xa(t),t.stateNode===null){var o=ti,d=a.contextType;typeof d=="object"&&d!==null&&(o=ht(d)),o=new a(l,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=uc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=l,o.state=t.memoizedState,o.refs={},qr(t),d=a.contextType,o.context=typeof d=="object"&&d!==null?ht(d):ti,o.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(sc(t,a,d,l),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(d=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),d!==o.state&&uc.enqueueReplaceState(o,o.state,null),rl(t,l,o,r),ul(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){o=t.stateNode;var m=t.memoizedProps,v=Ra(a,m);o.props=v;var A=o.context,k=a.contextType;d=ti,typeof k=="object"&&k!==null&&(d=ht(k));var N=a.getDerivedStateFromProps;k=typeof N=="function"||typeof o.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,k||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(m||A!==d)&&gh(t,o,l,d),Kn=!1;var x=t.memoizedState;o.state=x,rl(t,l,o,r),ul(),A=t.memoizedState,m||x!==A||Kn?(typeof N=="function"&&(sc(t,a,N,l),A=t.memoizedState),(v=Kn||ph(t,a,v,l,x,A,d))?(k||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=A),o.props=l,o.state=A,o.context=d,l=v):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{o=t.stateNode,Zr(e,t),d=t.memoizedProps,k=Ra(a,d),o.props=k,N=t.pendingProps,x=o.context,A=a.contextType,v=ti,typeof A=="object"&&A!==null&&(v=ht(A)),m=a.getDerivedStateFromProps,(A=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(d!==N||x!==v)&&gh(t,o,l,v),Kn=!1,x=t.memoizedState,o.state=x,rl(t,l,o,r),ul();var O=t.memoizedState;d!==N||x!==O||Kn||e!==null&&e.dependencies!==null&&ks(e.dependencies)?(typeof m=="function"&&(sc(t,a,m,l),O=t.memoizedState),(k=Kn||ph(t,a,k,l,x,O,v)||e!==null&&e.dependencies!==null&&ks(e.dependencies))?(A||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(l,O,v),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(l,O,v)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||d===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=O),o.props=l,o.state=O,o.context=v,l=k):(typeof o.componentDidUpdate!="function"||d===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),l=!1)}return o=l,$s(e,t),l=(t.flags&128)!==0,o||l?(o=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&l?(t.child=fi(t,e.child,null,r),t.child=fi(t,null,a,r)):ut(e,t,a,r),t.memoizedState=o.state,e=t.child):e=Rn(e,t,r),e}function Ch(e,t,a,l){return Pi(),t.flags|=256,ut(e,t,a,l),t.child}var oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fc(e){return{baseLanes:e,cachePool:bd()}}function dc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=$t),e}function Dh(e,t,a){var l=t.pendingProps,r=!1,o=(t.flags&128)!==0,d;if((d=o)||(d=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),d&&(r=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(r?Qn(t):$n(),xe){var m=Ke,v;if(v=m){e:{for(v=m,m=un;v.nodeType!==8;){if(!m){m=null;break e}if(v=en(v.nextSibling),v===null){m=null;break e}}m=v}m!==null?(t.memoizedState={dehydrated:m,treeContext:_a!==null?{id:Tn,overflow:En}:null,retryLane:536870912,hydrationErrors:null},v=Nt(18,null,null,0),v.stateNode=m,v.return=t,t.child=v,vt=t,Ke=null,v=!0):v=!1}v||Ea(t)}if(m=t.memoizedState,m!==null&&(m=m.dehydrated,m!==null))return Jc(m)?t.lanes=32:t.lanes=536870912,null;wn(t)}return m=l.children,l=l.fallback,r?($n(),r=t.mode,m=Js({mode:"hidden",children:m},r),l=ba(l,r,a,null),m.return=t,l.return=t,m.sibling=l,t.child=m,r=t.child,r.memoizedState=fc(a),r.childLanes=dc(e,d,a),t.memoizedState=oc,l):(Qn(t),hc(t,m))}if(v=e.memoizedState,v!==null&&(m=v.dehydrated,m!==null)){if(o)t.flags&256?(Qn(t),t.flags&=-257,t=yc(e,t,a)):t.memoizedState!==null?($n(),t.child=e.child,t.flags|=128,t=null):($n(),r=l.fallback,m=t.mode,l=Js({mode:"visible",children:l.children},m),r=ba(r,m,a,null),r.flags|=2,l.return=t,r.return=t,l.sibling=r,t.child=l,fi(t,e.child,null,a),l=t.child,l.memoizedState=fc(a),l.childLanes=dc(e,d,a),t.memoizedState=oc,t=r);else if(Qn(t),Jc(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var A=d.dgst;d=A,l=Error(u(419)),l.stack="",l.digest=d,el({value:l,source:null,stack:null}),t=yc(e,t,a)}else if(at||tl(e,t,a,!1),d=(a&e.childLanes)!==0,at||d){if(d=Be,d!==null&&(l=a&-a,l=(l&42)!==0?1:Wu(l),l=(l&(d.suspendedLanes|a))!==0?0:l,l!==0&&l!==v.retryLane))throw v.retryLane=l,ei(e,l),jt(d,e,l),Ah;m.data==="$?"||Cc(),t=yc(e,t,a)}else m.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,Ke=en(m.nextSibling),vt=t,xe=!0,Ta=null,un=!1,e!==null&&(Gt[Xt++]=Tn,Gt[Xt++]=En,Gt[Xt++]=_a,Tn=e.id,En=e.overflow,_a=t),t=hc(t,l.children),t.flags|=4096);return t}return r?($n(),r=l.fallback,m=t.mode,v=e.child,A=v.sibling,l=Sn(v,{mode:"hidden",children:l.children}),l.subtreeFlags=v.subtreeFlags&65011712,A!==null?r=Sn(A,r):(r=ba(r,m,a,null),r.flags|=2),r.return=t,l.return=t,l.sibling=r,t.child=l,l=r,r=t.child,m=e.child.memoizedState,m===null?m=fc(a):(v=m.cachePool,v!==null?(A=et._currentValue,v=v.parent!==A?{parent:A,pool:A}:v):v=bd(),m={baseLanes:m.baseLanes|a,cachePool:v}),r.memoizedState=m,r.childLanes=dc(e,d,a),t.memoizedState=oc,l):(Qn(t),a=e.child,e=a.sibling,a=Sn(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=a,t.memoizedState=null,a)}function hc(e,t){return t=Js({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Js(e,t){return e=Nt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function yc(e,t,a){return fi(t,e.child,null,a),e=hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zh(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Cr(e.return,t,a)}function mc(e,t,a,l,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=a,o.tailMode=r)}function Uh(e,t,a){var l=t.pendingProps,r=l.revealOrder,o=l.tail;if(ut(e,t,l.children,a),l=tt.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zh(e,a,t);else if(e.tag===19)zh(e,a,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}l&=1}switch(H(tt,l),r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Gs(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),mc(t,!1,r,a,o);break;case"backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Gs(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}mc(t,!0,a,null,o);break;case"together":mc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Rn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Pn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(tl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Sn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Sn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ks(e)))}function $g(e,t,a){switch(t.tag){case 3:qe(t,t.stateNode.containerInfo),Ln(t,et,e.memoizedState.cache),Pi();break;case 27:case 5:Gu(t);break;case 4:qe(t,t.stateNode.containerInfo);break;case 10:Ln(t,t.type,t.memoizedProps.value);break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Qn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Dh(e,t,a):(Qn(t),e=Rn(e,t,a),e!==null?e.sibling:null);Qn(t);break;case 19:var r=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(tl(e,t,a,!1),l=(a&t.childLanes)!==0),r){if(l)return Uh(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),H(tt,tt.current),l)break;return null;case 22:case 23:return t.lanes=0,Rh(e,t,a);case 24:Ln(t,et,e.memoizedState.cache)}return Rn(e,t,a)}function jh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!pc(e,a)&&(t.flags&128)===0)return at=!1,$g(e,t,a);at=(e.flags&131072)!==0}else at=!1,xe&&(t.flags&1048576)!==0&&dd(t,Rs,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var l=t.elementType,r=l._init;if(l=r(l._payload),t.type=l,typeof l=="function")xr(l)?(e=Ra(l,e),t.tag=1,t=Nh(null,t,l,e,a)):(t.tag=0,t=cc(null,t,l,e,a));else{if(l!=null){if(r=l.$$typeof,r===St){t.tag=11,t=xh(null,t,l,e,a);break e}else if(r===le){t.tag=14,t=Oh(null,t,l,e,a);break e}}throw t=ft(l)||l,Error(u(306,t,""))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,r=Ra(l,t.pendingProps),Nh(e,t,l,r,a);case 3:e:{if(qe(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var o=t.memoizedState;r=o.element,Zr(e,t),rl(t,l,null,a);var d=t.memoizedState;if(l=d.cache,Ln(t,et,l),l!==o.cache&&Dr(t,[et],a,!0),ul(),l=d.element,o.isDehydrated)if(o={element:l,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Ch(e,t,l,a);break e}else if(l!==r){r=Kt(Error(u(424)),t),el(r),t=Ch(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ke=en(e.firstChild),vt=t,xe=!0,Ta=null,un=!0,a=yh(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Pi(),l===r){t=Rn(e,t,a);break e}ut(e,t,l,a)}t=t.child}return t;case 26:return $s(e,t),e===null?(a=Vy(t.type,null,t.pendingProps,null))?t.memoizedState=a:xe||(a=t.type,e=t.pendingProps,l=cu(se.current).createElement(a),l[dt]=t,l[Tt]=e,ct(l,a,e),nt(l),t.stateNode=l):t.memoizedState=Vy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Gu(t),e===null&&xe&&(l=t.stateNode=By(t.type,t.pendingProps,se.current),vt=t,un=!0,r=Ke,aa(t.type)?(Wc=r,Ke=en(l.firstChild)):Ke=r),ut(e,t,t.pendingProps.children,a),$s(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((r=l=Ke)&&(l=Tv(l,t.type,t.pendingProps,un),l!==null?(t.stateNode=l,vt=t,Ke=en(l.firstChild),un=!1,r=!0):r=!1),r||Ea(t)),Gu(t),r=t.type,o=t.pendingProps,d=e!==null?e.memoizedProps:null,l=o.children,Xc(r,o)?l=null:d!==null&&Xc(r,d)&&(t.flags|=32),t.memoizedState!==null&&(r=Gr(e,t,Vg,null,null,a),Ml._currentValue=r),$s(e,t),ut(e,t,l,a),t.child;case 6:return e===null&&xe&&((e=a=Ke)&&(a=Ev(a,t.pendingProps,un),a!==null?(t.stateNode=a,vt=t,Ke=null,e=!0):e=!1),e||Ea(t)),null;case 13:return Dh(e,t,a);case 4:return qe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=fi(t,null,l,a):ut(e,t,l,a),t.child;case 11:return xh(e,t,t.type,t.pendingProps,a);case 7:return ut(e,t,t.pendingProps,a),t.child;case 8:return ut(e,t,t.pendingProps.children,a),t.child;case 12:return ut(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Ln(t,t.type,l.value),ut(e,t,l.children,a),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,xa(t),r=ht(r),l=l(r),t.flags|=1,ut(e,t,l,a),t.child;case 14:return Oh(e,t,t.type,t.pendingProps,a);case 15:return wh(e,t,t.type,t.pendingProps,a);case 19:return Uh(e,t,a);case 31:return l=t.pendingProps,a=t.mode,l={mode:l.mode,children:l.children},e===null?(a=Js(l,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=Sn(e.child,l),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return Rh(e,t,a);case 24:return xa(t),l=ht(et),e===null?(r=jr(),r===null&&(r=Be,o=zr(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:l,cache:r},qr(t),Ln(t,et,r)):((e.lanes&a)!==0&&(Zr(e,t),rl(t,null,null,a),ul()),r=e.memoizedState,o=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Ln(t,et,l)):(l=o.cache,Ln(t,et,l),l!==r.cache&&Dr(t,[et],a,!0))),ut(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function kn(e){e.flags|=4}function Bh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Gy(t)){if(t=Qt.current,t!==null&&((be&4194048)===be?rn!==null:(be&62914560)!==be&&(be&536870912)===0||t!==rn))throw ll=Br,_d;e.flags|=8192}}function Ws(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mf():536870912,e.lanes|=t,mi|=t)}function ml(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function He(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Jg(e,t,a){var l=t.pendingProps;switch(kr(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(t),null;case 1:return He(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),xn(et),qn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ii(t)?kn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,md())),He(t),null;case 26:return a=t.memoizedState,e===null?(kn(t),a!==null?(He(t),Bh(t,a)):(He(t),t.flags&=-16777217)):a?a!==e.memoizedState?(kn(t),He(t),Bh(t,a)):(He(t),t.flags&=-16777217):(e.memoizedProps!==l&&kn(t),He(t),t.flags&=-16777217),null;case 27:us(t),a=se.current;var r=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==l&&kn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return He(t),null}e=I.current,Ii(t)?hd(t):(e=By(r,l,a),t.stateNode=e,kn(t))}return He(t),null;case 5:if(us(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&kn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return He(t),null}if(e=I.current,Ii(t))hd(t);else{switch(r=cu(se.current),e){case 1:e=r.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=r.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=r.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?r.createElement(a,{is:l.is}):r.createElement(a)}}e[dt]=t,e[Tt]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=e;e:switch(ct(e,a,l),a){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&kn(t)}}return He(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&kn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=se.current,Ii(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,r=vt,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[dt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||My(e.nodeValue,a)),e||Ea(t)}else e=cu(e).createTextNode(l),e[dt]=t,t.stateNode=e}return He(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ii(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[dt]=t}else Pi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),r=!1}else r=md(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(wn(t),t):(wn(t),null)}if(wn(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=l!==null,e=e!==null&&e.memoizedState!==null,a){l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool);var o=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==r&&(l.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Ws(t,t.updateQueue),He(t),null;case 4:return qn(),e===null&&Hc(t.stateNode.containerInfo),He(t),null;case 10:return xn(t.type),He(t),null;case 19:if(G(tt),r=t.memoizedState,r===null)return He(t),null;if(l=(t.flags&128)!==0,o=r.rendering,o===null)if(l)ml(r,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Gs(e),o!==null){for(t.flags|=128,ml(r,!1),e=o.updateQueue,t.updateQueue=e,Ws(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)fd(a,e),a=a.sibling;return H(tt,tt.current&1|2),t.child}e=e.sibling}r.tail!==null&&sn()>Ps&&(t.flags|=128,l=!0,ml(r,!1),t.lanes=4194304)}else{if(!l)if(e=Gs(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Ws(t,e),ml(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!xe)return He(t),null}else 2*sn()-r.renderingStartTime>Ps&&a!==536870912&&(t.flags|=128,l=!0,ml(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e!==null?e.sibling=o:t.child=o,r.last=o)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=sn(),t.sibling=null,e=tt.current,H(tt,l?e&1|2:e&1),t):(He(t),null);case 22:case 23:return wn(t),Kr(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),a=t.updateQueue,a!==null&&Ws(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&G(Oa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xn(et),He(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Wg(e,t){switch(kr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xn(et),qn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return us(t),null;case 13:if(wn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(tt),null;case 4:return qn(),null;case 10:return xn(t.type),null;case 22:case 23:return wn(t),Kr(),e!==null&&G(Oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xn(et),null;case 25:return null;default:return null}}function qh(e,t){switch(kr(t),t.tag){case 3:xn(et),qn();break;case 26:case 27:case 5:us(t);break;case 4:qn();break;case 13:wn(t);break;case 19:G(tt);break;case 10:xn(t.type);break;case 22:case 23:wn(t),Kr(),e!==null&&G(Oa);break;case 24:xn(et)}}function pl(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var r=l.next;a=r;do{if((a.tag&e)===e){l=void 0;var o=a.create,d=a.inst;l=o(),d.destroy=l}a=a.next}while(a!==r)}}catch(m){ze(t,t.return,m)}}function Jn(e,t,a){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var o=r.next;l=o;do{if((l.tag&e)===e){var d=l.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,r=t;var v=a,A=m;try{A()}catch(k){ze(r,v,k)}}}l=l.next}while(l!==o)}}catch(k){ze(t,t.return,k)}}function Zh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Od(t,a)}catch(l){ze(e,e.return,l)}}}function Vh(e,t,a){a.props=Ra(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){ze(e,t,l)}}function gl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(r){ze(e,t,r)}}function cn(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(r){ze(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){ze(e,t,r)}else a.current=null}function Hh(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(r){ze(e,e.return,r)}}function gc(e,t,a){try{var l=e.stateNode;gv(l,e.type,a,t),l[Tt]=t}catch(r){ze(e,e.return,r)}}function Lh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&aa(e.type)||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lh(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.tag===27&&aa(e.type)||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 bc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ru));else if(l!==4&&(l===27&&aa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(bc(e,t,a),e=e.sibling;e!==null;)bc(e,t,a),e=e.sibling}function Fs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&aa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Fs(e,t,a),e=e.sibling;e!==null;)Fs(e,t,a),e=e.sibling}function Kh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ct(t,l,a),t[dt]=e,t[Tt]=a}catch(o){ze(e,e.return,o)}}var Mn=!1,Qe=!1,_c=!1,Yh=typeof WeakSet=="function"?WeakSet:Set,it=null;function Fg(e,t){if(e=e.containerInfo,Yc=mu,e=td(e),vr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var r=l.anchorOffset,o=l.focusNode;l=l.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var d=0,m=-1,v=-1,A=0,k=0,N=e,x=null;t:for(;;){for(var O;N!==a||r!==0&&N.nodeType!==3||(m=d+r),N!==o||l!==0&&N.nodeType!==3||(v=d+l),N.nodeType===3&&(d+=N.nodeValue.length),(O=N.firstChild)!==null;)x=N,N=O;for(;;){if(N===e)break t;if(x===a&&++A===r&&(m=d),x===o&&++k===l&&(v=d),(O=N.nextSibling)!==null)break;N=x,x=N.parentNode}N=O}a=m===-1||v===-1?null:{start:m,end:v}}else a=null}a=a||{start:0,end:0}}else a=null;for(Gc={focusedElem:e,selectionRange:a},mu=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){switch(t=it,o=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,l=a.stateNode;try{var ae=Ra(a.type,r,a.elementType===a.type);e=l.getSnapshotBeforeUpdate(ae,o),l.__reactInternalSnapshotBeforeUpdate=e}catch(P){ze(a,a.return,P)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)$c(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":$c(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}}function Gh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Wn(e,a),l&4&&pl(5,a);break;case 1:if(Wn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){ze(a,a.return,d)}else{var r=Ra(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){ze(a,a.return,d)}}l&64&&Zh(a),l&512&&gl(a,a.return);break;case 3:if(Wn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Od(e,t)}catch(d){ze(a,a.return,d)}}break;case 27:t===null&&l&4&&Kh(a);case 26:case 5:Wn(e,a),t===null&&l&4&&Hh(a),l&512&&gl(a,a.return);break;case 12:Wn(e,a);break;case 13:Wn(e,a),l&4&&$h(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=sv.bind(null,a),Av(e,a))));break;case 22:if(l=a.memoizedState!==null||Mn,!l){t=t!==null&&t.memoizedState!==null||Qe,r=Mn;var o=Qe;Mn=l,(Qe=t)&&!o?Fn(e,a,(a.subtreeFlags&8772)!==0):Wn(e,a),Mn=r,Qe=o}break;case 30:break;default:Wn(e,a)}}function Xh(e){var t=e.alternate;t!==null&&(e.alternate=null,Xh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ze=null,xt=!1;function Nn(e,t,a){for(a=a.child;a!==null;)Qh(e,t,a),a=a.sibling}function Qh(e,t,a){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(qi,a)}catch{}switch(a.tag){case 26:Qe||cn(a,t),Nn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Qe||cn(a,t);var l=Ze,r=xt;aa(a.type)&&(Ze=a.stateNode,xt=!1),Nn(e,t,a),Ol(a.stateNode),Ze=l,xt=r;break;case 5:Qe||cn(a,t);case 6:if(l=Ze,r=xt,Ze=null,Nn(e,t,a),Ze=l,xt=r,Ze!==null)if(xt)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(a.stateNode)}catch(o){ze(a,t,o)}else try{Ze.removeChild(a.stateNode)}catch(o){ze(a,t,o)}break;case 18:Ze!==null&&(xt?(e=Ze,Uy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),zl(e)):Uy(Ze,a.stateNode));break;case 4:l=Ze,r=xt,Ze=a.stateNode.containerInfo,xt=!0,Nn(e,t,a),Ze=l,xt=r;break;case 0:case 11:case 14:case 15:Qe||Jn(2,a,t),Qe||Jn(4,a,t),Nn(e,t,a);break;case 1:Qe||(cn(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Vh(a,t,l)),Nn(e,t,a);break;case 21:Nn(e,t,a);break;case 22:Qe=(l=Qe)||a.memoizedState!==null,Nn(e,t,a),Qe=l;break;default:Nn(e,t,a)}}function $h(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{zl(e)}catch(a){ze(t,t.return,a)}}function Ig(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yh),t;default:throw Error(u(435,e.tag))}}function Sc(e,t){var a=Ig(e);t.forEach(function(l){var r=uv.bind(null,e,l);a.has(l)||(a.add(l),l.then(r,r))})}function Ct(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var r=a[l],o=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(aa(m.type)){Ze=m.stateNode,xt=!1;break e}break;case 5:Ze=m.stateNode,xt=!1;break e;case 3:case 4:Ze=m.stateNode.containerInfo,xt=!0;break e}m=m.return}if(Ze===null)throw Error(u(160));Qh(o,d,r),Ze=null,xt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Jh(t,e),t=t.sibling}var Pt=null;function Jh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ct(t,e),Dt(e),l&4&&(Jn(3,e,e.return),pl(3,e),Jn(5,e,e.return));break;case 1:Ct(t,e),Dt(e),l&512&&(Qe||a===null||cn(a,a.return)),l&64&&Mn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var r=Pt;if(Ct(t,e),Dt(e),l&512&&(Qe||a===null||cn(a,a.return)),l&4){var o=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(l){case"title":o=r.getElementsByTagName("title")[0],(!o||o[Hi]||o[dt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(l),r.head.insertBefore(o,r.querySelector("head > title"))),ct(o,l,a),o[dt]=e,nt(o),l=o;break e;case"link":var d=Ky("link","href",r).get(l+(a.href||""));if(d){for(var m=0;m<d.length;m++)if(o=d[m],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){d.splice(m,1);break t}}o=r.createElement(l),ct(o,l,a),r.head.appendChild(o);break;case"meta":if(d=Ky("meta","content",r).get(l+(a.content||""))){for(m=0;m<d.length;m++)if(o=d[m],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){d.splice(m,1);break t}}o=r.createElement(l),ct(o,l,a),r.head.appendChild(o);break;default:throw Error(u(468,l))}o[dt]=e,nt(o),l=o}e.stateNode=l}else Yy(r,e.type,e.stateNode);else e.stateNode=Ly(r,l,e.memoizedProps);else o!==l?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,l===null?Yy(r,e.type,e.stateNode):Ly(r,l,e.memoizedProps)):l===null&&e.stateNode!==null&&gc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ct(t,e),Dt(e),l&512&&(Qe||a===null||cn(a,a.return)),a!==null&&l&4&&gc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ct(t,e),Dt(e),l&512&&(Qe||a===null||cn(a,a.return)),e.flags&32){r=e.stateNode;try{Qa(r,"")}catch(O){ze(e,e.return,O)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,gc(e,r,a!==null?a.memoizedProps:r)),l&1024&&(_c=!0);break;case 6:if(Ct(t,e),Dt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(O){ze(e,e.return,O)}}break;case 3:if(du=null,r=Pt,Pt=ou(t.containerInfo),Ct(t,e),Pt=r,Dt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{zl(t.containerInfo)}catch(O){ze(e,e.return,O)}_c&&(_c=!1,Wh(e));break;case 4:l=Pt,Pt=ou(e.stateNode.containerInfo),Ct(t,e),Dt(e),Pt=l;break;case 12:Ct(t,e),Dt(e);break;case 13:Ct(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(wc=sn()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sc(e,l)));break;case 22:r=e.memoizedState!==null;var v=a!==null&&a.memoizedState!==null,A=Mn,k=Qe;if(Mn=A||r,Qe=k||v,Ct(t,e),Qe=k,Mn=A,Dt(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||v||Mn||Qe||ka(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){v=a=t;try{if(o=v.stateNode,r)d=o.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=v.stateNode;var N=v.memoizedProps.style,x=N!=null&&N.hasOwnProperty("display")?N.display:null;m.style.display=x==null||typeof x=="boolean"?"":(""+x).trim()}}catch(O){ze(v,v.return,O)}}}else if(t.tag===6){if(a===null){v=t;try{v.stateNode.nodeValue=r?"":v.memoizedProps}catch(O){ze(v,v.return,O)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Sc(e,a))));break;case 19:Ct(t,e),Dt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sc(e,l)));break;case 30:break;case 21:break;default:Ct(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Lh(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var r=a.stateNode,o=vc(e);Fs(e,o,r);break;case 5:var d=a.stateNode;a.flags&32&&(Qa(d,""),a.flags&=-33);var m=vc(e);Fs(e,m,d);break;case 3:case 4:var v=a.stateNode.containerInfo,A=vc(e);bc(e,A,v);break;default:throw Error(u(161))}}catch(k){ze(e,e.return,k)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Wh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Gh(e,t.alternate,t),t=t.sibling}function ka(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jn(4,t,t.return),ka(t);break;case 1:cn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Vh(t,t.return,a),ka(t);break;case 27:Ol(t.stateNode);case 26:case 5:cn(t,t.return),ka(t);break;case 22:t.memoizedState===null&&ka(t);break;case 30:ka(t);break;default:ka(t)}e=e.sibling}}function Fn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,r=e,o=t,d=o.flags;switch(o.tag){case 0:case 11:case 15:Fn(r,o,a),pl(4,o);break;case 1:if(Fn(r,o,a),l=o,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(A){ze(l,l.return,A)}if(l=o,r=l.updateQueue,r!==null){var m=l.stateNode;try{var v=r.shared.hiddenCallbacks;if(v!==null)for(r.shared.hiddenCallbacks=null,r=0;r<v.length;r++)xd(v[r],m)}catch(A){ze(l,l.return,A)}}a&&d&64&&Zh(o),gl(o,o.return);break;case 27:Kh(o);case 26:case 5:Fn(r,o,a),a&&l===null&&d&4&&Hh(o),gl(o,o.return);break;case 12:Fn(r,o,a);break;case 13:Fn(r,o,a),a&&d&4&&$h(r,o);break;case 22:o.memoizedState===null&&Fn(r,o,a),gl(o,o.return);break;case 30:break;default:Fn(r,o,a)}t=t.sibling}}function Tc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&nl(a))}function Ec(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e))}function on(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fh(e,t,a,l),t=t.sibling}function Fh(e,t,a,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:on(e,t,a,l),r&2048&&pl(9,t);break;case 1:on(e,t,a,l);break;case 3:on(e,t,a,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e)));break;case 12:if(r&2048){on(e,t,a,l),e=t.stateNode;try{var o=t.memoizedProps,d=o.id,m=o.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){ze(t,t.return,v)}}else on(e,t,a,l);break;case 13:on(e,t,a,l);break;case 23:break;case 22:o=t.stateNode,d=t.alternate,t.memoizedState!==null?o._visibility&2?on(e,t,a,l):vl(e,t):o._visibility&2?on(e,t,a,l):(o._visibility|=2,di(e,t,a,l,(t.subtreeFlags&10256)!==0)),r&2048&&Tc(d,t);break;case 24:on(e,t,a,l),r&2048&&Ec(t.alternate,t);break;default:on(e,t,a,l)}}function di(e,t,a,l,r){for(r=r&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var o=e,d=t,m=a,v=l,A=d.flags;switch(d.tag){case 0:case 11:case 15:di(o,d,m,v,r),pl(8,d);break;case 23:break;case 22:var k=d.stateNode;d.memoizedState!==null?k._visibility&2?di(o,d,m,v,r):vl(o,d):(k._visibility|=2,di(o,d,m,v,r)),r&&A&2048&&Tc(d.alternate,d);break;case 24:di(o,d,m,v,r),r&&A&2048&&Ec(d.alternate,d);break;default:di(o,d,m,v,r)}t=t.sibling}}function vl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,r=l.flags;switch(l.tag){case 22:vl(a,l),r&2048&&Tc(l.alternate,l);break;case 24:vl(a,l),r&2048&&Ec(l.alternate,l);break;default:vl(a,l)}t=t.sibling}}var bl=8192;function hi(e){if(e.subtreeFlags&bl)for(e=e.child;e!==null;)Ih(e),e=e.sibling}function Ih(e){switch(e.tag){case 26:hi(e),e.flags&bl&&e.memoizedState!==null&&Bv(Pt,e.memoizedState,e.memoizedProps);break;case 5:hi(e);break;case 3:case 4:var t=Pt;Pt=ou(e.stateNode.containerInfo),hi(e),Pt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=bl,bl=16777216,hi(e),bl=t):hi(e));break;default:hi(e)}}function Ph(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function _l(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];it=l,ty(l,e)}Ph(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ey(e),e=e.sibling}function ey(e){switch(e.tag){case 0:case 11:case 15:_l(e),e.flags&2048&&Jn(9,e,e.return);break;case 3:_l(e);break;case 12:_l(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Is(e)):_l(e);break;default:_l(e)}}function Is(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];it=l,ty(l,e)}Ph(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jn(8,t,t.return),Is(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Is(t));break;default:Is(t)}e=e.sibling}}function ty(e,t){for(;it!==null;){var a=it;switch(a.tag){case 0:case 11:case 15:Jn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:nl(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,it=l;else e:for(a=e;it!==null;){l=it;var r=l.sibling,o=l.return;if(Xh(l),l===a){it=null;break e}if(r!==null){r.return=o,it=r;break e}it=o}}}var Pg={getCacheForType:function(e){var t=ht(et),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},ev=typeof WeakMap=="function"?WeakMap:Map,Oe=0,Be=null,me=null,be=0,we=0,zt=null,In=!1,yi=!1,Ac=!1,Cn=0,Ye=0,Pn=0,Ma=0,xc=0,$t=0,mi=0,Sl=null,Ot=null,Oc=!1,wc=0,Ps=1/0,eu=null,ea=null,rt=0,ta=null,pi=null,gi=0,Rc=0,kc=null,ny=null,Tl=0,Mc=null;function Ut(){if((Oe&2)!==0&&be!==0)return be&-be;if(R.T!==null){var e=ii;return e!==0?e:Bc()}return vf()}function ay(){$t===0&&($t=(be&536870912)===0||xe?yf():536870912);var e=Qt.current;return e!==null&&(e.flags|=32),$t}function jt(e,t,a){(e===Be&&(we===2||we===9)||e.cancelPendingCommit!==null)&&(vi(e,0),na(e,be,$t,!1)),Vi(e,a),((Oe&2)===0||e!==Be)&&(e===Be&&((Oe&2)===0&&(Ma|=a),Ye===4&&na(e,be,$t,!1)),fn(e))}function iy(e,t,a){if((Oe&6)!==0)throw Error(u(327));var l=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Zi(e,t),r=l?av(e,t):Dc(e,t,!0),o=l;do{if(r===0){yi&&!l&&na(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!tv(a)){r=Dc(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var m=e;r=Sl;var v=m.current.memoizedState.isDehydrated;if(v&&(vi(m,d).flags|=256),d=Dc(m,d,!1),d!==2){if(Ac&&!v){m.errorRecoveryDisabledLanes|=o,Ma|=o,r=4;break e}o=Ot,Ot=r,o!==null&&(Ot===null?Ot=o:Ot.push.apply(Ot,o))}r=d}if(o=!1,r!==2)continue}}if(r===1){vi(e,0),na(e,t,0,!0);break}e:{switch(l=e,o=r,o){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:na(l,t,$t,!In);break e;case 2:Ot=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=wc+300-sn(),10<r)){if(na(l,t,$t,!In),fs(l,0,!0)!==0)break e;l.timeoutHandle=Dy(ly.bind(null,l,a,Ot,eu,Oc,t,$t,Ma,mi,In,o,2,-0,0),r);break e}ly(l,a,Ot,eu,Oc,t,$t,Ma,mi,In,o,0,-0,0)}}break}while(!0);fn(e)}function ly(e,t,a,l,r,o,d,m,v,A,k,N,x,O){if(e.timeoutHandle=-1,N=t.subtreeFlags,(N&8192||(N&16785408)===16785408)&&(kl={stylesheets:null,count:0,unsuspend:jv},Ih(t),N=qv(),N!==null)){e.cancelPendingCommit=N(dy.bind(null,e,t,o,a,l,r,d,m,v,k,1,x,O)),na(e,o,d,!A);return}dy(e,t,o,a,l,r,d,m,v)}function tv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var r=a[l],o=r.getSnapshot;r=r.value;try{if(!Mt(o(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 na(e,t,a,l){t&=~xc,t&=~Ma,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var r=t;0<r;){var o=31-kt(r),d=1<<o;l[o]=-1,r&=~d}a!==0&&pf(e,a,t)}function tu(){return(Oe&6)===0?(El(0),!1):!0}function Nc(){if(me!==null){if(we===0)var e=me.return;else e=me,An=Aa=null,$r(e),oi=null,hl=0,e=me;for(;e!==null;)qh(e.alternate,e),e=e.return;me=null}}function vi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,bv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Nc(),Be=e,me=a=Sn(e.current,null),be=t,we=0,zt=null,In=!1,yi=Zi(e,t),Ac=!1,mi=$t=xc=Ma=Pn=Ye=0,Ot=Sl=null,Oc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-kt(l),o=1<<r;t|=e[r],l&=~o}return Cn=t,Es(),a}function sy(e,t){de=null,R.H=Ls,t===il||t===Cs?(t=Ed(),we=3):t===_d?(t=Ed(),we=4):we=t===Ah?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,zt=t,me===null&&(Ye=1,Qs(e,Kt(t,e.current)))}function uy(){var e=R.H;return R.H=Ls,e===null?Ls:e}function ry(){var e=R.A;return R.A=Pg,e}function Cc(){Ye=4,In||(be&4194048)!==be&&Qt.current!==null||(yi=!0),(Pn&134217727)===0&&(Ma&134217727)===0||Be===null||na(Be,be,$t,!1)}function Dc(e,t,a){var l=Oe;Oe|=2;var r=uy(),o=ry();(Be!==e||be!==t)&&(eu=null,vi(e,t)),t=!1;var d=Ye;e:do try{if(we!==0&&me!==null){var m=me,v=zt;switch(we){case 8:Nc(),d=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(t=!0);var A=we;if(we=0,zt=null,bi(e,m,v,A),a&&yi){d=0;break e}break;default:A=we,we=0,zt=null,bi(e,m,v,A)}}nv(),d=Ye;break}catch(k){sy(e,k)}while(!0);return t&&e.shellSuspendCounter++,An=Aa=null,Oe=l,R.H=r,R.A=o,me===null&&(Be=null,be=0,Es()),d}function nv(){for(;me!==null;)cy(me)}function av(e,t){var a=Oe;Oe|=2;var l=uy(),r=ry();Be!==e||be!==t?(eu=null,Ps=sn()+500,vi(e,t)):yi=Zi(e,t);e:do try{if(we!==0&&me!==null){t=me;var o=zt;t:switch(we){case 1:we=0,zt=null,bi(e,t,o,1);break;case 2:case 9:if(Sd(o)){we=0,zt=null,oy(t);break}t=function(){we!==2&&we!==9||Be!==e||(we=7),fn(e)},o.then(t,t);break e;case 3:we=7;break e;case 4:we=5;break e;case 7:Sd(o)?(we=0,zt=null,oy(t)):(we=0,zt=null,bi(e,t,o,7));break;case 5:var d=null;switch(me.tag){case 26:d=me.memoizedState;case 5:case 27:var m=me;if(!d||Gy(d)){we=0,zt=null;var v=m.sibling;if(v!==null)me=v;else{var A=m.return;A!==null?(me=A,nu(A)):me=null}break t}}we=0,zt=null,bi(e,t,o,5);break;case 6:we=0,zt=null,bi(e,t,o,6);break;case 8:Nc(),Ye=6;break e;default:throw Error(u(462))}}iv();break}catch(k){sy(e,k)}while(!0);return An=Aa=null,R.H=l,R.A=r,Oe=a,me!==null?0:(Be=null,be=0,Es(),Ye)}function iv(){for(;me!==null&&!Op();)cy(me)}function cy(e){var t=jh(e.alternate,e,Cn);e.memoizedProps=e.pendingProps,t===null?nu(e):me=t}function oy(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Mh(a,t,t.pendingProps,t.type,void 0,be);break;case 11:t=Mh(a,t,t.pendingProps,t.type.render,t.ref,be);break;case 5:$r(t);default:qh(a,t),t=me=fd(t,Cn),t=jh(a,t,Cn)}e.memoizedProps=e.pendingProps,t===null?nu(e):me=t}function bi(e,t,a,l){An=Aa=null,$r(t),oi=null,hl=0;var r=t.return;try{if(Qg(e,r,t,a,be)){Ye=1,Qs(e,Kt(a,e.current)),me=null;return}}catch(o){if(r!==null)throw me=r,o;Ye=1,Qs(e,Kt(a,e.current)),me=null;return}t.flags&32768?(xe||l===1?e=!0:yi||(be&536870912)!==0?e=!1:(In=e=!0,(l===2||l===9||l===3||l===6)&&(l=Qt.current,l!==null&&l.tag===13&&(l.flags|=16384))),fy(t,e)):nu(t)}function nu(e){var t=e;do{if((t.flags&32768)!==0){fy(t,In);return}e=t.return;var a=Jg(t.alternate,t,Cn);if(a!==null){me=a;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);Ye===0&&(Ye=5)}function fy(e,t){do{var a=Wg(e.alternate,e);if(a!==null){a.flags&=32767,me=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=a}while(e!==null);Ye=6,me=null}function dy(e,t,a,l,r,o,d,m,v){e.cancelPendingCommit=null;do au();while(rt!==0);if((Oe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(o=t.lanes|t.childLanes,o|=Er,jp(e,a,o,d,m,v),e===Be&&(me=Be=null,be=0),pi=t,ta=e,gi=a,Rc=o,kc=r,ny=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,rv(rs,function(){return gy(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=R.T,R.T=null,r=V.p,V.p=2,d=Oe,Oe|=4;try{Fg(e,t,a)}finally{Oe=d,V.p=r,R.T=l}}rt=1,hy(),yy(),my()}}function hy(){if(rt===1){rt=0;var e=ta,t=pi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=R.T,R.T=null;var l=V.p;V.p=2;var r=Oe;Oe|=4;try{Jh(t,e);var o=Gc,d=td(e.containerInfo),m=o.focusedElem,v=o.selectionRange;if(d!==m&&m&&m.ownerDocument&&ed(m.ownerDocument.documentElement,m)){if(v!==null&&vr(m)){var A=v.start,k=v.end;if(k===void 0&&(k=A),"selectionStart"in m)m.selectionStart=A,m.selectionEnd=Math.min(k,m.value.length);else{var N=m.ownerDocument||document,x=N&&N.defaultView||window;if(x.getSelection){var O=x.getSelection(),ae=m.textContent.length,P=Math.min(v.start,ae),De=v.end===void 0?P:Math.min(v.end,ae);!O.extend&&P>De&&(d=De,De=P,P=d);var T=Pf(m,P),S=Pf(m,De);if(T&&S&&(O.rangeCount!==1||O.anchorNode!==T.node||O.anchorOffset!==T.offset||O.focusNode!==S.node||O.focusOffset!==S.offset)){var E=N.createRange();E.setStart(T.node,T.offset),O.removeAllRanges(),P>De?(O.addRange(E),O.extend(S.node,S.offset)):(E.setEnd(S.node,S.offset),O.addRange(E))}}}}for(N=[],O=m;O=O.parentNode;)O.nodeType===1&&N.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<N.length;m++){var M=N[m];M.element.scrollLeft=M.left,M.element.scrollTop=M.top}}mu=!!Yc,Gc=Yc=null}finally{Oe=r,V.p=l,R.T=a}}e.current=t,rt=2}}function yy(){if(rt===2){rt=0;var e=ta,t=pi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=R.T,R.T=null;var l=V.p;V.p=2;var r=Oe;Oe|=4;try{Gh(e,t.alternate,t)}finally{Oe=r,V.p=l,R.T=a}}rt=3}}function my(){if(rt===4||rt===3){rt=0,wp();var e=ta,t=pi,a=gi,l=ny;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?rt=5:(rt=0,pi=ta=null,py(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ea=null),Fu(a),t=t.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(qi,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=R.T,r=V.p,V.p=2,R.T=null;try{for(var o=e.onRecoverableError,d=0;d<l.length;d++){var m=l[d];o(m.value,{componentStack:m.stack})}}finally{R.T=t,V.p=r}}(gi&3)!==0&&au(),fn(e),r=e.pendingLanes,(a&4194090)!==0&&(r&42)!==0?e===Mc?Tl++:(Tl=0,Mc=e):Tl=0,El(0)}}function py(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,nl(t)))}function au(e){return hy(),yy(),my(),gy()}function gy(){if(rt!==5)return!1;var e=ta,t=Rc;Rc=0;var a=Fu(gi),l=R.T,r=V.p;try{V.p=32>a?32:a,R.T=null,a=kc,kc=null;var o=ta,d=gi;if(rt=0,pi=ta=null,gi=0,(Oe&6)!==0)throw Error(u(331));var m=Oe;if(Oe|=4,ey(o.current),Fh(o,o.current,d,a),Oe=m,El(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(qi,o)}catch{}return!0}finally{V.p=r,R.T=l,py(e,t)}}function vy(e,t,a){t=Kt(a,t),t=rc(e.stateNode,t,2),e=Gn(e,t,2),e!==null&&(Vi(e,2),fn(e))}function ze(e,t,a){if(e.tag===3)vy(e,e,a);else for(;t!==null;){if(t.tag===3){vy(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ea===null||!ea.has(l))){e=Kt(a,e),a=Th(2),l=Gn(t,a,2),l!==null&&(Eh(a,l,t,e),Vi(l,2),fn(l));break}}t=t.return}}function zc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new ev;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(a)||(Ac=!0,r.add(a),e=lv.bind(null,e,t,a),t.then(e,e))}function lv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Be===e&&(be&a)===a&&(Ye===4||Ye===3&&(be&62914560)===be&&300>sn()-wc?(Oe&2)===0&&vi(e,0):xc|=a,mi===be&&(mi=0)),fn(e)}function by(e,t){t===0&&(t=mf()),e=ei(e,t),e!==null&&(Vi(e,t),fn(e))}function sv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),by(e,a)}function uv(e,t){var a=0;switch(e.tag){case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),by(e,a)}function rv(e,t){return Qu(e,t)}var iu=null,_i=null,Uc=!1,lu=!1,jc=!1,Na=0;function fn(e){e!==_i&&e.next===null&&(_i===null?iu=_i=e:_i=_i.next=e),lu=!0,Uc||(Uc=!0,ov())}function El(e,t){if(!jc&&lu){jc=!0;do for(var a=!1,l=iu;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var o=0;else{var d=l.suspendedLanes,m=l.pingedLanes;o=(1<<31-kt(42|e)+1)-1,o&=r&~(d&~m),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,Ey(l,o))}else o=be,o=fs(l,l===Be?o:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(o&3)===0||Zi(l,o)||(a=!0,Ey(l,o));l=l.next}while(a);jc=!1}}function cv(){_y()}function _y(){lu=Uc=!1;var e=0;Na!==0&&(vv()&&(e=Na),Na=0);for(var t=sn(),a=null,l=iu;l!==null;){var r=l.next,o=Sy(l,t);o===0?(l.next=null,a===null?iu=r:a.next=r,r===null&&(_i=a)):(a=l,(e!==0||(o&3)!==0)&&(lu=!0)),l=r}El(e)}function Sy(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var d=31-kt(o),m=1<<d,v=r[d];v===-1?((m&a)===0||(m&l)!==0)&&(r[d]=Up(m,t)):v<=t&&(e.expiredLanes|=m),o&=~m}if(t=Be,a=be,a=fs(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(we===2||we===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&$u(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Zi(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&$u(l),Fu(a)){case 2:case 8:a=df;break;case 32:a=rs;break;case 268435456:a=hf;break;default:a=rs}return l=Ty.bind(null,e),a=Qu(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&$u(l),e.callbackPriority=2,e.callbackNode=null,2}function Ty(e,t){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(au()&&e.callbackNode!==a)return null;var l=be;return l=fs(e,e===Be?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(iy(e,l,t),Sy(e,sn()),e.callbackNode!=null&&e.callbackNode===a?Ty.bind(null,e):null)}function Ey(e,t){if(au())return null;iy(e,t,!0)}function ov(){_v(function(){(Oe&6)!==0?Qu(ff,cv):_y()})}function Bc(){return Na===0&&(Na=yf()),Na}function Ay(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ps(""+e)}function xy(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function fv(e,t,a,l,r){if(t==="submit"&&a&&a.stateNode===r){var o=Ay((r[Tt]||null).action),d=l.submitter;d&&(t=(t=d[Tt]||null)?Ay(t.formAction):d.getAttribute("formAction"),t!==null&&(o=t,d=null));var m=new _s("action","action",null,l,r);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Na!==0){var v=d?xy(r,d):new FormData(r);ac(a,{pending:!0,data:v,method:r.method,action:o},null,v)}}else typeof o=="function"&&(m.preventDefault(),v=d?xy(r,d):new FormData(r),ac(a,{pending:!0,data:v,method:r.method,action:o},o,v))},currentTarget:r}]})}}for(var qc=0;qc<Tr.length;qc++){var Zc=Tr[qc],dv=Zc.toLowerCase(),hv=Zc[0].toUpperCase()+Zc.slice(1);It(dv,"on"+hv)}It(id,"onAnimationEnd"),It(ld,"onAnimationIteration"),It(sd,"onAnimationStart"),It("dblclick","onDoubleClick"),It("focusin","onFocus"),It("focusout","onBlur"),It(Mg,"onTransitionRun"),It(Ng,"onTransitionStart"),It(Cg,"onTransitionCancel"),It(ud,"onTransitionEnd"),Ya("onMouseEnter",["mouseout","mouseover"]),Ya("onMouseLeave",["mouseout","mouseover"]),Ya("onPointerEnter",["pointerout","pointerover"]),Ya("onPointerLeave",["pointerout","pointerover"]),ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ma("onBeforeInput",["compositionend","keypress","textInput","paste"]),ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Al="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(" "),yv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Al));function Oy(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],r=l.event;l=l.listeners;e:{var o=void 0;if(t)for(var d=l.length-1;0<=d;d--){var m=l[d],v=m.instance,A=m.currentTarget;if(m=m.listener,v!==o&&r.isPropagationStopped())break e;o=m,r.currentTarget=A;try{o(r)}catch(k){Xs(k)}r.currentTarget=null,o=v}else for(d=0;d<l.length;d++){if(m=l[d],v=m.instance,A=m.currentTarget,m=m.listener,v!==o&&r.isPropagationStopped())break e;o=m,r.currentTarget=A;try{o(r)}catch(k){Xs(k)}r.currentTarget=null,o=v}}}}function pe(e,t){var a=t[Iu];a===void 0&&(a=t[Iu]=new Set);var l=e+"__bubble";a.has(l)||(wy(t,e,2,!1),a.add(l))}function Vc(e,t,a){var l=0;t&&(l|=4),wy(a,e,l,t)}var su="_reactListening"+Math.random().toString(36).slice(2);function Hc(e){if(!e[su]){e[su]=!0,_f.forEach(function(a){a!=="selectionchange"&&(yv.has(a)||Vc(a,!1,e),Vc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[su]||(t[su]=!0,Vc("selectionchange",!1,t))}}function wy(e,t,a,l){switch(Fy(t)){case 2:var r=Hv;break;case 8:r=Lv;break;default:r=to}a=r.bind(null,t,a,e),r=void 0,!cr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function Lc(e,t,a,l,r){var o=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var d=l.tag;if(d===3||d===4){var m=l.stateNode.containerInfo;if(m===r)break;if(d===4)for(d=l.return;d!==null;){var v=d.tag;if((v===3||v===4)&&d.stateNode.containerInfo===r)return;d=d.return}for(;m!==null;){if(d=Ha(m),d===null)return;if(v=d.tag,v===5||v===6||v===26||v===27){l=o=d;continue e}m=m.parentNode}}l=l.return}zf(function(){var A=o,k=ur(a),N=[];e:{var x=rd.get(e);if(x!==void 0){var O=_s,ae=e;switch(e){case"keypress":if(vs(a)===0)break e;case"keydown":case"keyup":O=rg;break;case"focusin":ae="focus",O=hr;break;case"focusout":ae="blur",O=hr;break;case"beforeblur":case"afterblur":O=hr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Bf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Wp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=fg;break;case id:case ld:case sd:O=Pp;break;case ud:O=hg;break;case"scroll":case"scrollend":O=$p;break;case"wheel":O=mg;break;case"copy":case"cut":case"paste":O=tg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Zf;break;case"toggle":case"beforetoggle":O=gg}var P=(t&4)!==0,De=!P&&(e==="scroll"||e==="scrollend"),T=P?x!==null?x+"Capture":null:x;P=[];for(var S=A,E;S!==null;){var M=S;if(E=M.stateNode,M=M.tag,M!==5&&M!==26&&M!==27||E===null||T===null||(M=Ki(S,T),M!=null&&P.push(xl(S,M,E))),De)break;S=S.return}0<P.length&&(x=new O(x,ae,null,a,k),N.push({event:x,listeners:P}))}}if((t&7)===0){e:{if(x=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",x&&a!==sr&&(ae=a.relatedTarget||a.fromElement)&&(Ha(ae)||ae[Va]))break e;if((O||x)&&(x=k.window===k?k:(x=k.ownerDocument)?x.defaultView||x.parentWindow:window,O?(ae=a.relatedTarget||a.toElement,O=A,ae=ae?Ha(ae):null,ae!==null&&(De=f(ae),P=ae.tag,ae!==De||P!==5&&P!==27&&P!==6)&&(ae=null)):(O=null,ae=A),O!==ae)){if(P=Bf,M="onMouseLeave",T="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(P=Zf,M="onPointerLeave",T="onPointerEnter",S="pointer"),De=O==null?x:Li(O),E=ae==null?x:Li(ae),x=new P(M,S+"leave",O,a,k),x.target=De,x.relatedTarget=E,M=null,Ha(k)===A&&(P=new P(T,S+"enter",ae,a,k),P.target=E,P.relatedTarget=De,M=P),De=M,O&&ae)t:{for(P=O,T=ae,S=0,E=P;E;E=Si(E))S++;for(E=0,M=T;M;M=Si(M))E++;for(;0<S-E;)P=Si(P),S--;for(;0<E-S;)T=Si(T),E--;for(;S--;){if(P===T||T!==null&&P===T.alternate)break t;P=Si(P),T=Si(T)}P=null}else P=null;O!==null&&Ry(N,x,O,P,!1),ae!==null&&De!==null&&Ry(N,De,ae,P,!0)}}e:{if(x=A?Li(A):window,O=x.nodeName&&x.nodeName.toLowerCase(),O==="select"||O==="input"&&x.type==="file")var X=Qf;else if(Gf(x))if($f)X=wg;else{X=xg;var he=Ag}else O=x.nodeName,!O||O.toLowerCase()!=="input"||x.type!=="checkbox"&&x.type!=="radio"?A&&lr(A.elementType)&&(X=Qf):X=Og;if(X&&(X=X(e,A))){Xf(N,X,a,k);break e}he&&he(e,x,A),e==="focusout"&&A&&x.type==="number"&&A.memoizedProps.value!=null&&ir(x,"number",x.value)}switch(he=A?Li(A):window,e){case"focusin":(Gf(he)||he.contentEditable==="true")&&(Fa=he,br=A,Fi=null);break;case"focusout":Fi=br=Fa=null;break;case"mousedown":_r=!0;break;case"contextmenu":case"mouseup":case"dragend":_r=!1,nd(N,a,k);break;case"selectionchange":if(kg)break;case"keydown":case"keyup":nd(N,a,k)}var W;if(mr)e:{switch(e){case"compositionstart":var ee="onCompositionStart";break e;case"compositionend":ee="onCompositionEnd";break e;case"compositionupdate":ee="onCompositionUpdate";break e}ee=void 0}else Wa?Kf(e,a)&&(ee="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ee="onCompositionStart");ee&&(Vf&&a.locale!=="ko"&&(Wa||ee!=="onCompositionStart"?ee==="onCompositionEnd"&&Wa&&(W=Uf()):(Hn=k,or="value"in Hn?Hn.value:Hn.textContent,Wa=!0)),he=uu(A,ee),0<he.length&&(ee=new qf(ee,e,null,a,k),N.push({event:ee,listeners:he}),W?ee.data=W:(W=Yf(a),W!==null&&(ee.data=W)))),(W=bg?_g(e,a):Sg(e,a))&&(ee=uu(A,"onBeforeInput"),0<ee.length&&(he=new qf("onBeforeInput","beforeinput",null,a,k),N.push({event:he,listeners:ee}),he.data=W)),fv(N,e,A,a,k)}Oy(N,t)})}function xl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function uu(e,t){for(var a=t+"Capture",l=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=Ki(e,a),r!=null&&l.unshift(xl(e,r,o)),r=Ki(e,t),r!=null&&l.push(xl(e,r,o))),e.tag===3)return l;e=e.return}return[]}function Si(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ry(e,t,a,l,r){for(var o=t._reactName,d=[];a!==null&&a!==l;){var m=a,v=m.alternate,A=m.stateNode;if(m=m.tag,v!==null&&v===l)break;m!==5&&m!==26&&m!==27||A===null||(v=A,r?(A=Ki(a,o),A!=null&&d.unshift(xl(a,A,v))):r||(A=Ki(a,o),A!=null&&d.push(xl(a,A,v)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var mv=/\r\n?/g,pv=/\u0000|\uFFFD/g;function ky(e){return(typeof e=="string"?e:""+e).replace(mv,`
62
+ `).replace(pv,"")}function My(e,t){return t=ky(t),ky(e)===t}function ru(){}function Ce(e,t,a,l,r,o){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Qa(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Qa(e,""+l);break;case"className":hs(e,"class",l);break;case"tabIndex":hs(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":hs(e,a,l);break;case"style":Cf(e,l,o);break;case"data":if(t!=="object"){hs(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ps(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(t!=="input"&&Ce(e,t,"name",r.name,r,null),Ce(e,t,"formEncType",r.formEncType,r,null),Ce(e,t,"formMethod",r.formMethod,r,null),Ce(e,t,"formTarget",r.formTarget,r,null)):(Ce(e,t,"encType",r.encType,r,null),Ce(e,t,"method",r.method,r,null),Ce(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ps(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=ru);break;case"onScroll":l!=null&&pe("scroll",e);break;case"onScrollEnd":l!=null&&pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=ps(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":pe("beforetoggle",e),pe("toggle",e),ds(e,"popover",l);break;case"xlinkActuate":bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":bn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":bn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":bn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":bn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ds(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Xp.get(a)||a,ds(e,a,l))}}function Kc(e,t,a,l,r,o){switch(a){case"style":Cf(e,l,o);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Qa(e,l):(typeof l=="number"||typeof l=="bigint")&&Qa(e,""+l);break;case"onScroll":l!=null&&pe("scroll",e);break;case"onScrollEnd":l!=null&&pe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ru);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[Tt]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof l=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,r);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ds(e,a,l)}}}function ct(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",e),pe("load",e);var l=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var d=a[o];if(d!=null)switch(o){case"src":l=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ce(e,t,o,d,a,null)}}r&&Ce(e,t,"srcSet",a.srcSet,a,null),l&&Ce(e,t,"src",a.src,a,null);return;case"input":pe("invalid",e);var m=o=d=r=null,v=null,A=null;for(l in a)if(a.hasOwnProperty(l)){var k=a[l];if(k!=null)switch(l){case"name":r=k;break;case"type":d=k;break;case"checked":v=k;break;case"defaultChecked":A=k;break;case"value":o=k;break;case"defaultValue":m=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(137,t));break;default:Ce(e,t,l,k,a,null)}}Rf(e,o,m,v,A,d,r,!1),ys(e);return;case"select":pe("invalid",e),l=d=o=null;for(r in a)if(a.hasOwnProperty(r)&&(m=a[r],m!=null))switch(r){case"value":o=m;break;case"defaultValue":d=m;break;case"multiple":l=m;default:Ce(e,t,r,m,a,null)}t=o,a=d,e.multiple=!!l,t!=null?Xa(e,!!l,t,!1):a!=null&&Xa(e,!!l,a,!0);return;case"textarea":pe("invalid",e),o=r=l=null;for(d in a)if(a.hasOwnProperty(d)&&(m=a[d],m!=null))switch(d){case"value":l=m;break;case"defaultValue":r=m;break;case"children":o=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(u(91));break;default:Ce(e,t,d,m,a,null)}Mf(e,l,r,o),ys(e);return;case"option":for(v in a)if(a.hasOwnProperty(v)&&(l=a[v],l!=null))switch(v){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ce(e,t,v,l,a,null)}return;case"dialog":pe("beforetoggle",e),pe("toggle",e),pe("cancel",e),pe("close",e);break;case"iframe":case"object":pe("load",e);break;case"video":case"audio":for(l=0;l<Al.length;l++)pe(Al[l],e);break;case"image":pe("error",e),pe("load",e);break;case"details":pe("toggle",e);break;case"embed":case"source":case"link":pe("error",e),pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in a)if(a.hasOwnProperty(A)&&(l=a[A],l!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ce(e,t,A,l,a,null)}return;default:if(lr(t)){for(k in a)a.hasOwnProperty(k)&&(l=a[k],l!==void 0&&Kc(e,t,k,l,a,void 0));return}}for(m in a)a.hasOwnProperty(m)&&(l=a[m],l!=null&&Ce(e,t,m,l,a,null))}function gv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,d=null,m=null,v=null,A=null,k=null;for(O in a){var N=a[O];if(a.hasOwnProperty(O)&&N!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":v=N;default:l.hasOwnProperty(O)||Ce(e,t,O,null,l,N)}}for(var x in l){var O=l[x];if(N=a[x],l.hasOwnProperty(x)&&(O!=null||N!=null))switch(x){case"type":o=O;break;case"name":r=O;break;case"checked":A=O;break;case"defaultChecked":k=O;break;case"value":d=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:O!==N&&Ce(e,t,x,O,l,N)}}ar(e,d,m,v,A,k,o,r);return;case"select":O=d=m=x=null;for(o in a)if(v=a[o],a.hasOwnProperty(o)&&v!=null)switch(o){case"value":break;case"multiple":O=v;default:l.hasOwnProperty(o)||Ce(e,t,o,null,l,v)}for(r in l)if(o=l[r],v=a[r],l.hasOwnProperty(r)&&(o!=null||v!=null))switch(r){case"value":x=o;break;case"defaultValue":m=o;break;case"multiple":d=o;default:o!==v&&Ce(e,t,r,o,l,v)}t=m,a=d,l=O,x!=null?Xa(e,!!a,x,!1):!!l!=!!a&&(t!=null?Xa(e,!!a,t,!0):Xa(e,!!a,a?[]:"",!1));return;case"textarea":O=x=null;for(m in a)if(r=a[m],a.hasOwnProperty(m)&&r!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Ce(e,t,m,null,l,r)}for(d in l)if(r=l[d],o=a[d],l.hasOwnProperty(d)&&(r!=null||o!=null))switch(d){case"value":x=r;break;case"defaultValue":O=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==o&&Ce(e,t,d,r,l,o)}kf(e,x,O);return;case"option":for(var ae in a)if(x=a[ae],a.hasOwnProperty(ae)&&x!=null&&!l.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:Ce(e,t,ae,null,l,x)}for(v in l)if(x=l[v],O=a[v],l.hasOwnProperty(v)&&x!==O&&(x!=null||O!=null))switch(v){case"selected":e.selected=x&&typeof x!="function"&&typeof x!="symbol";break;default:Ce(e,t,v,x,l,O)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var P in a)x=a[P],a.hasOwnProperty(P)&&x!=null&&!l.hasOwnProperty(P)&&Ce(e,t,P,null,l,x);for(A in l)if(x=l[A],O=a[A],l.hasOwnProperty(A)&&x!==O&&(x!=null||O!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(u(137,t));break;default:Ce(e,t,A,x,l,O)}return;default:if(lr(t)){for(var De in a)x=a[De],a.hasOwnProperty(De)&&x!==void 0&&!l.hasOwnProperty(De)&&Kc(e,t,De,void 0,l,x);for(k in l)x=l[k],O=a[k],!l.hasOwnProperty(k)||x===O||x===void 0&&O===void 0||Kc(e,t,k,x,l,O);return}}for(var T in a)x=a[T],a.hasOwnProperty(T)&&x!=null&&!l.hasOwnProperty(T)&&Ce(e,t,T,null,l,x);for(N in l)x=l[N],O=a[N],!l.hasOwnProperty(N)||x===O||x==null&&O==null||Ce(e,t,N,x,l,O)}var Yc=null,Gc=null;function cu(e){return e.nodeType===9?e:e.ownerDocument}function Ny(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Cy(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Xc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qc=null;function vv(){var e=window.event;return e&&e.type==="popstate"?e===Qc?!1:(Qc=e,!0):(Qc=null,!1)}var Dy=typeof setTimeout=="function"?setTimeout:void 0,bv=typeof clearTimeout=="function"?clearTimeout:void 0,zy=typeof Promise=="function"?Promise:void 0,_v=typeof queueMicrotask=="function"?queueMicrotask:typeof zy<"u"?function(e){return zy.resolve(null).then(e).catch(Sv)}:Dy;function Sv(e){setTimeout(function(){throw e})}function aa(e){return e==="head"}function Uy(e,t){var a=t,l=0,r=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(0<l&&8>l){a=l;var d=e.ownerDocument;if(a&1&&Ol(d.documentElement),a&2&&Ol(d.body),a&4)for(a=d.head,Ol(a),d=a.firstChild;d;){var m=d.nextSibling,v=d.nodeName;d[Hi]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=m}}if(r===0){e.removeChild(o),zl(t);return}r--}else a==="$"||a==="$?"||a==="$!"?r++:l=a.charCodeAt(0)-48;else l=0;a=o}while(a);zl(t)}function $c(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":$c(a),Pu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Tv(e,t,a,l){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Hi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=en(e.nextSibling),e===null)break}return null}function Ev(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=en(e.nextSibling),e===null))return null;return e}function Jc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Av(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function en(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Wc=null;function jy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function By(e,t,a){switch(t=cu(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pu(e)}var Jt=new Map,qy=new Set;function ou(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Dn=V.d;V.d={f:xv,r:Ov,D:wv,C:Rv,L:kv,m:Mv,X:Cv,S:Nv,M:Dv};function xv(){var e=Dn.f(),t=tu();return e||t}function Ov(e){var t=La(e);t!==null&&t.tag===5&&t.type==="form"?ih(t):Dn.r(e)}var Ti=typeof document>"u"?null:document;function Zy(e,t,a){var l=Ti;if(l&&typeof t=="string"&&t){var r=Lt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),qy.has(r)||(qy.add(r),e={rel:e,crossOrigin:a,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),ct(t,"link",e),nt(t),l.head.appendChild(t)))}}function wv(e){Dn.D(e),Zy("dns-prefetch",e,null)}function Rv(e,t){Dn.C(e,t),Zy("preconnect",e,t)}function kv(e,t,a){Dn.L(e,t,a);var l=Ti;if(l&&e&&t){var r='link[rel="preload"][as="'+Lt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+Lt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+Lt(a.imageSizes)+'"]')):r+='[href="'+Lt(e)+'"]';var o=r;switch(t){case"style":o=Ei(e);break;case"script":o=Ai(e)}Jt.has(o)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Jt.set(o,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(wl(o))||t==="script"&&l.querySelector(Rl(o))||(t=l.createElement("link"),ct(t,"link",e),nt(t),l.head.appendChild(t)))}}function Mv(e,t){Dn.m(e,t);var a=Ti;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Lt(l)+'"][href="'+Lt(e)+'"]',o=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Ai(e)}if(!Jt.has(o)&&(e=b({rel:"modulepreload",href:e},t),Jt.set(o,e),a.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Rl(o)))return}l=a.createElement("link"),ct(l,"link",e),nt(l),a.head.appendChild(l)}}}function Nv(e,t,a){Dn.S(e,t,a);var l=Ti;if(l&&e){var r=Ka(l).hoistableStyles,o=Ei(e);t=t||"default";var d=r.get(o);if(!d){var m={loading:0,preload:null};if(d=l.querySelector(wl(o)))m.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Jt.get(o))&&Fc(e,a);var v=d=l.createElement("link");nt(v),ct(v,"link",e),v._p=new Promise(function(A,k){v.onload=A,v.onerror=k}),v.addEventListener("load",function(){m.loading|=1}),v.addEventListener("error",function(){m.loading|=2}),m.loading|=4,fu(d,t,l)}d={type:"stylesheet",instance:d,count:1,state:m},r.set(o,d)}}}function Cv(e,t){Dn.X(e,t);var a=Ti;if(a&&e){var l=Ka(a).hoistableScripts,r=Ai(e),o=l.get(r);o||(o=a.querySelector(Rl(r)),o||(e=b({src:e,async:!0},t),(t=Jt.get(r))&&Ic(e,t),o=a.createElement("script"),nt(o),ct(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function Dv(e,t){Dn.M(e,t);var a=Ti;if(a&&e){var l=Ka(a).hoistableScripts,r=Ai(e),o=l.get(r);o||(o=a.querySelector(Rl(r)),o||(e=b({src:e,async:!0,type:"module"},t),(t=Jt.get(r))&&Ic(e,t),o=a.createElement("script"),nt(o),ct(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function Vy(e,t,a,l){var r=(r=se.current)?ou(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ei(a.href),a=Ka(r).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ei(a.href);var o=Ka(r).hoistableStyles,d=o.get(e);if(d||(r=r.ownerDocument||r,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,d),(o=r.querySelector(wl(e)))&&!o._p&&(d.instance=o,d.state.loading=5),Jt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Jt.set(e,a),o||zv(r,e,a,d.state))),t&&l===null)throw Error(u(528,""));return d}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ai(a),a=Ka(r).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ei(e){return'href="'+Lt(e)+'"'}function wl(e){return'link[rel="stylesheet"]['+e+"]"}function Hy(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function zv(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),ct(t,"link",a),nt(t),e.head.appendChild(t))}function Ai(e){return'[src="'+Lt(e)+'"]'}function Rl(e){return"script[async]"+e}function Ly(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Lt(a.href)+'"]');if(l)return t.instance=l,nt(l),l;var r=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),nt(l),ct(l,"style",r),fu(l,a.precedence,e),t.instance=l;case"stylesheet":r=Ei(a.href);var o=e.querySelector(wl(r));if(o)return t.state.loading|=4,t.instance=o,nt(o),o;l=Hy(a),(r=Jt.get(r))&&Fc(l,r),o=(e.ownerDocument||e).createElement("link"),nt(o);var d=o;return d._p=new Promise(function(m,v){d.onload=m,d.onerror=v}),ct(o,"link",l),t.state.loading|=4,fu(o,a.precedence,e),t.instance=o;case"script":return o=Ai(a.src),(r=e.querySelector(Rl(o)))?(t.instance=r,nt(r),r):(l=a,(r=Jt.get(o))&&(l=b({},a),Ic(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),nt(r),ct(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,fu(l,a.precedence,e));return t.instance}function fu(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,o=r,d=0;d<l.length;d++){var m=l[d];if(m.dataset.precedence===t)o=m;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ic(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var du=null;function Ky(e,t,a){if(du===null){var l=new Map,r=du=new Map;r.set(a,l)}else r=du,l=r.get(a),l||(l=new Map,r.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[Hi]||o[dt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var d=o.getAttribute(t)||"";d=e+d;var m=l.get(d);m?m.push(o):l.set(d,[o])}}return l}function Yy(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Uv(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Gy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var kl=null;function jv(){}function Bv(e,t,a){if(kl===null)throw Error(u(475));var l=kl;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var r=Ei(a.href),o=e.querySelector(wl(r));if(o){e=o._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=hu.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=o,nt(o);return}o=e.ownerDocument||e,a=Hy(a),(r=Jt.get(r))&&Fc(a,r),o=o.createElement("link"),nt(o);var d=o;d._p=new Promise(function(m,v){d.onload=m,d.onerror=v}),ct(o,"link",a),t.instance=o}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=hu.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function qv(){if(kl===null)throw Error(u(475));var e=kl;return e.stylesheets&&e.count===0&&Pc(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&Pc(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function hu(){if(this.count--,this.count===0){if(this.stylesheets)Pc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var yu=null;function Pc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,yu=new Map,t.forEach(Zv,e),yu=null,hu.call(e))}function Zv(e,t){if(!(t.state.loading&4)){var a=yu.get(e);if(a)var l=a.get(null);else{a=new Map,yu.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var d=r[o];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),l=d)}l&&a.set(null,l)}r=t.instance,d=r.getAttribute("data-precedence"),o=a.get(d)||l,o===l&&a.set(null,r),a.set(d,r),this.count++,l=hu.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Ml={$$typeof:Ue,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Vv(e,t,a,l,r,o,d,m){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ju(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ju(0),this.hiddenUpdates=Ju(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function Xy(e,t,a,l,r,o,d,m,v,A,k,N){return e=new Vv(e,t,a,d,m,v,A,N),t=1,o===!0&&(t|=24),o=Nt(3,null,null,t),e.current=o,o.stateNode=e,t=zr(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:l,isDehydrated:a,cache:t},qr(o),e}function Qy(e){return e?(e=ti,e):ti}function $y(e,t,a,l,r,o){r=Qy(r),l.context===null?l.context=r:l.pendingContext=r,l=Yn(t),l.payload={element:a},o=o===void 0?null:o,o!==null&&(l.callback=o),a=Gn(e,l,t),a!==null&&(jt(a,e,t),sl(a,e,t))}function Jy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function eo(e,t){Jy(e,t),(e=e.alternate)&&Jy(e,t)}function Wy(e){if(e.tag===13){var t=ei(e,67108864);t!==null&&jt(t,e,67108864),eo(e,67108864)}}var mu=!0;function Hv(e,t,a,l){var r=R.T;R.T=null;var o=V.p;try{V.p=2,to(e,t,a,l)}finally{V.p=o,R.T=r}}function Lv(e,t,a,l){var r=R.T;R.T=null;var o=V.p;try{V.p=8,to(e,t,a,l)}finally{V.p=o,R.T=r}}function to(e,t,a,l){if(mu){var r=no(l);if(r===null)Lc(e,t,l,pu,a),Iy(e,l);else if(Yv(r,e,t,a,l))l.stopPropagation();else if(Iy(e,l),t&4&&-1<Kv.indexOf(e)){for(;r!==null;){var o=La(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var d=ya(o.pendingLanes);if(d!==0){var m=o;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var v=1<<31-kt(d);m.entanglements[1]|=v,d&=~v}fn(o),(Oe&6)===0&&(Ps=sn()+500,El(0))}}break;case 13:m=ei(o,2),m!==null&&jt(m,o,2),tu(),eo(o,2)}if(o=no(l),o===null&&Lc(e,t,l,pu,a),o===r)break;r=o}r!==null&&l.stopPropagation()}else Lc(e,t,l,null,a)}}function no(e){return e=ur(e),ao(e)}var pu=null;function ao(e){if(pu=null,e=Ha(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pu=e,null}function Fy(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Rp()){case ff:return 2;case df:return 8;case rs:case kp:return 32;case hf:return 268435456;default:return 32}default:return 32}}var io=!1,ia=null,la=null,sa=null,Nl=new Map,Cl=new Map,ua=[],Kv="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".split(" ");function Iy(e,t){switch(e){case"focusin":case"focusout":ia=null;break;case"dragenter":case"dragleave":la=null;break;case"mouseover":case"mouseout":sa=null;break;case"pointerover":case"pointerout":Nl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cl.delete(t.pointerId)}}function Dl(e,t,a,l,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:o,targetContainers:[r]},t!==null&&(t=La(t),t!==null&&Wy(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Yv(e,t,a,l,r){switch(t){case"focusin":return ia=Dl(ia,e,t,a,l,r),!0;case"dragenter":return la=Dl(la,e,t,a,l,r),!0;case"mouseover":return sa=Dl(sa,e,t,a,l,r),!0;case"pointerover":var o=r.pointerId;return Nl.set(o,Dl(Nl.get(o)||null,e,t,a,l,r)),!0;case"gotpointercapture":return o=r.pointerId,Cl.set(o,Dl(Cl.get(o)||null,e,t,a,l,r)),!0}return!1}function Py(e){var t=Ha(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Bp(e.priority,function(){if(a.tag===13){var l=Ut();l=Wu(l);var r=ei(a,l);r!==null&&jt(r,a,l),eo(a,l)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=no(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);sr=l,a.target.dispatchEvent(l),sr=null}else return t=La(a),t!==null&&Wy(t),e.blockedOn=a,!1;t.shift()}return!0}function em(e,t,a){gu(e)&&a.delete(t)}function Gv(){io=!1,ia!==null&&gu(ia)&&(ia=null),la!==null&&gu(la)&&(la=null),sa!==null&&gu(sa)&&(sa=null),Nl.forEach(em),Cl.forEach(em)}function vu(e,t){e.blockedOn===t&&(e.blockedOn=null,io||(io=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Gv)))}var bu=null;function tm(e){bu!==e&&(bu=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){bu===e&&(bu=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],r=e[t+2];if(typeof l!="function"){if(ao(l||a)===null)continue;break}var o=La(a);o!==null&&(e.splice(t,3),t-=3,ac(o,{pending:!0,data:r,method:a.method,action:l},l,r))}}))}function zl(e){function t(v){return vu(v,e)}ia!==null&&vu(ia,e),la!==null&&vu(la,e),sa!==null&&vu(sa,e),Nl.forEach(t),Cl.forEach(t);for(var a=0;a<ua.length;a++){var l=ua[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ua.length&&(a=ua[0],a.blockedOn===null);)Py(a),a.blockedOn===null&&ua.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var r=a[l],o=a[l+1],d=r[Tt]||null;if(typeof o=="function")d||tm(a);else if(d){var m=null;if(o&&o.hasAttribute("formAction")){if(r=o,d=o[Tt]||null)m=d.formAction;else if(ao(r)!==null)continue}else m=d.action;typeof m=="function"?a[l+1]=m:(a.splice(l,3),l-=3),tm(a)}}}function lo(e){this._internalRoot=e}_u.prototype.render=lo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=Ut();$y(a,l,e,t,null,null)},_u.prototype.unmount=lo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$y(e.current,2,null,e,null,null),tu(),t[Va]=null}};function _u(e){this._internalRoot=e}_u.prototype.unstable_scheduleHydration=function(e){if(e){var t=vf();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ua.length&&t!==0&&t<ua[a].priority;a++);ua.splice(a,0,e),a===0&&Py(e)}};var nm=n.version;if(nm!=="19.1.0")throw Error(u(527,nm,"19.1.0"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=p(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Xv={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{qi=Su.inject(Xv),Rt=Su}catch{}}return jl.createRoot=function(e,t){if(!c(e))throw Error(u(299));var a=!1,l="",r=vh,o=bh,d=_h,m=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(m=t.unstable_transitionCallbacks)),t=Xy(e,1,!1,null,null,a,l,r,o,d,m,null),e[Va]=t.current,Hc(e),new lo(t)},jl.hydrateRoot=function(e,t,a){if(!c(e))throw Error(u(299));var l=!1,r="",o=vh,d=bh,m=_h,v=null,A=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(m=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(v=a.unstable_transitionCallbacks),a.formState!==void 0&&(A=a.formState)),t=Xy(e,1,!0,t,a??null,l,r,o,d,m,v,A),t.context=Qy(null),a=t.current,l=Ut(),l=Wu(l),r=Yn(l),r.callback=null,Gn(a,r,l),a=l,t.current.lanes=a,Vi(t,a),fn(t),e[Va]=t.current,Hc(e),new _u(t)},jl.version="19.1.0",jl}var mm;function _b(){if(mm)return co.exports;mm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(n){console.error(n)}}return s(),co.exports=bb(),co.exports}var Sb=_b(),_e;(function(s){s.assertEqual=c=>c;function n(c){}s.assertIs=n;function i(c){throw new Error}s.assertNever=i,s.arrayToEnum=c=>{const f={};for(const h of c)f[h]=h;return f},s.getValidEnumValues=c=>{const f=s.objectKeys(c).filter(y=>typeof c[c[y]]!="number"),h={};for(const y of f)h[y]=c[y];return s.objectValues(h)},s.objectValues=c=>s.objectKeys(c).map(function(f){return c[f]}),s.objectKeys=typeof Object.keys=="function"?c=>Object.keys(c):c=>{const f=[];for(const h in c)Object.prototype.hasOwnProperty.call(c,h)&&f.push(h);return f},s.find=(c,f)=>{for(const h of c)if(f(h))return h},s.isInteger=typeof Number.isInteger=="function"?c=>Number.isInteger(c):c=>typeof c=="number"&&isFinite(c)&&Math.floor(c)===c;function u(c,f=" | "){return c.map(h=>typeof h=="string"?`'${h}'`:h).join(f)}s.joinValues=u,s.jsonStringifyReplacer=(c,f)=>typeof f=="bigint"?f.toString():f})(_e||(_e={}));var Ao;(function(s){s.mergeShapes=(n,i)=>({...n,...i})})(Ao||(Ao={}));const L=_e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Un=s=>{switch(typeof s){case"undefined":return L.undefined;case"string":return L.string;case"number":return isNaN(s)?L.nan:L.number;case"boolean":return L.boolean;case"function":return L.function;case"bigint":return L.bigint;case"symbol":return L.symbol;case"object":return Array.isArray(s)?L.array:s===null?L.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?L.promise:typeof Map<"u"&&s instanceof Map?L.map:typeof Set<"u"&&s instanceof Set?L.set:typeof Date<"u"&&s instanceof Date?L.date:L.object;default:return L.unknown}},U=_e.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Tb=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class Zt extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=u=>{this.issues=[...this.issues,u]},this.addIssues=(u=[])=>{this.issues=[...this.issues,...u]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=n}format(n){const i=n||function(f){return f.message},u={_errors:[]},c=f=>{for(const h of f.issues)if(h.code==="invalid_union")h.unionErrors.map(c);else if(h.code==="invalid_return_type")c(h.returnTypeError);else if(h.code==="invalid_arguments")c(h.argumentsError);else if(h.path.length===0)u._errors.push(i(h));else{let y=u,p=0;for(;p<h.path.length;){const g=h.path[p];p===h.path.length-1?(y[g]=y[g]||{_errors:[]},y[g]._errors.push(i(h))):y[g]=y[g]||{_errors:[]},y=y[g],p++}}};return c(this),u}static assert(n){if(!(n instanceof Zt))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=i=>i.message){const i={},u=[];for(const c of this.issues)c.path.length>0?(i[c.path[0]]=i[c.path[0]]||[],i[c.path[0]].push(n(c))):u.push(n(c));return{formErrors:u,fieldErrors:i}}get formErrors(){return this.flatten()}}Zt.create=s=>new Zt(s);const Ni=(s,n)=>{let i;switch(s.code){case U.invalid_type:s.received===L.undefined?i="Required":i=`Expected ${s.expected}, received ${s.received}`;break;case U.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(s.expected,_e.jsonStringifyReplacer)}`;break;case U.unrecognized_keys:i=`Unrecognized key(s) in object: ${_e.joinValues(s.keys,", ")}`;break;case U.invalid_union:i="Invalid input";break;case U.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${_e.joinValues(s.options)}`;break;case U.invalid_enum_value:i=`Invalid enum value. Expected ${_e.joinValues(s.options)}, received '${s.received}'`;break;case U.invalid_arguments:i="Invalid function arguments";break;case U.invalid_return_type:i="Invalid function return type";break;case U.invalid_date:i="Invalid date";break;case U.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(i=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?i=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?i=`Invalid input: must end with "${s.validation.endsWith}"`:_e.assertNever(s.validation):s.validation!=="regex"?i=`Invalid ${s.validation}`:i="Invalid";break;case U.too_small:s.type==="array"?i=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?i=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?i=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?i=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:i="Invalid input";break;case U.too_big:s.type==="array"?i=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?i=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?i=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?i=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?i=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:i="Invalid input";break;case U.custom:i="Invalid input";break;case U.invalid_intersection_types:i="Intersection results could not be merged";break;case U.not_multiple_of:i=`Number must be a multiple of ${s.multipleOf}`;break;case U.not_finite:i="Number must be finite";break;default:i=n.defaultError,_e.assertNever(s)}return{message:i}};let Xm=Ni;function Eb(s){Xm=s}function Nu(){return Xm}const Cu=s=>{const{data:n,path:i,errorMaps:u,issueData:c}=s,f=[...i,...c.path||[]],h={...c,path:f};if(c.message!==void 0)return{...c,path:f,message:c.message};let y="";const p=u.filter(g=>!!g).slice().reverse();for(const g of p)y=g(h,{data:n,defaultError:y}).message;return{...c,path:f,message:y}},Ab=[];function Z(s,n){const i=Nu(),u=Cu({issueData:n,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,i,i===Ni?void 0:Ni].filter(c=>!!c)});s.common.issues.push(u)}class gt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(n,i){const u=[];for(const c of i){if(c.status==="aborted")return ie;c.status==="dirty"&&n.dirty(),u.push(c.value)}return{status:n.value,value:u}}static async mergeObjectAsync(n,i){const u=[];for(const c of i){const f=await c.key,h=await c.value;u.push({key:f,value:h})}return gt.mergeObjectSync(n,u)}static mergeObjectSync(n,i){const u={};for(const c of i){const{key:f,value:h}=c;if(f.status==="aborted"||h.status==="aborted")return ie;f.status==="dirty"&&n.dirty(),h.status==="dirty"&&n.dirty(),f.value!=="__proto__"&&(typeof h.value<"u"||c.alwaysSet)&&(u[f.value]=h.value)}return{status:n.value,value:u}}}const ie=Object.freeze({status:"aborted"}),Ri=s=>({status:"dirty",value:s}),_t=s=>({status:"valid",value:s}),xo=s=>s.status==="aborted",Oo=s=>s.status==="dirty",Ua=s=>s.status==="valid",Kl=s=>typeof Promise<"u"&&s instanceof Promise;function Du(s,n,i,u){if(typeof n=="function"?s!==n||!0:!n.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n.get(s)}function Qm(s,n,i,u,c){if(typeof n=="function"?s!==n||!0:!n.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n.set(s,i),i}var $;(function(s){s.errToObj=n=>typeof n=="string"?{message:n}:n||{},s.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})($||($={}));var ql,Zl;class pn{constructor(n,i,u,c){this._cachedPath=[],this.parent=n,this.data=i,this._path=u,this._key=c}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const pm=(s,n)=>{if(Ua(n))return{success:!0,data:n.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new Zt(s.common.issues);return this._error=i,this._error}}};function ue(s){if(!s)return{};const{errorMap:n,invalid_type_error:i,required_error:u,description:c}=s;if(n&&(i||u))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return n?{errorMap:n,description:c}:{errorMap:(h,y)=>{var p,g;const{message:b}=s;return h.code==="invalid_enum_value"?{message:b??y.defaultError}:typeof y.data>"u"?{message:(p=b??u)!==null&&p!==void 0?p:y.defaultError}:h.code!=="invalid_type"?{message:y.defaultError}:{message:(g=b??i)!==null&&g!==void 0?g:y.defaultError}},description:c}}class fe{get description(){return this._def.description}_getType(n){return Un(n.data)}_getOrReturnCtx(n,i){return i||{common:n.parent.common,data:n.data,parsedType:Un(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new gt,ctx:{common:n.parent.common,data:n.data,parsedType:Un(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const i=this._parse(n);if(Kl(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(n){const i=this._parse(n);return Promise.resolve(i)}parse(n,i){const u=this.safeParse(n,i);if(u.success)return u.data;throw u.error}safeParse(n,i){var u;const c={common:{issues:[],async:(u=i==null?void 0:i.async)!==null&&u!==void 0?u:!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Un(n)},f=this._parseSync({data:n,path:c.path,parent:c});return pm(c,f)}"~validate"(n){var i,u;const c={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Un(n)};if(!this["~standard"].async)try{const f=this._parseSync({data:n,path:[],parent:c});return Ua(f)?{value:f.value}:{issues:c.common.issues}}catch(f){!((u=(i=f==null?void 0:f.message)===null||i===void 0?void 0:i.toLowerCase())===null||u===void 0)&&u.includes("encountered")&&(this["~standard"].async=!0),c.common={issues:[],async:!0}}return this._parseAsync({data:n,path:[],parent:c}).then(f=>Ua(f)?{value:f.value}:{issues:c.common.issues})}async parseAsync(n,i){const u=await this.safeParseAsync(n,i);if(u.success)return u.data;throw u.error}async safeParseAsync(n,i){const u={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Un(n)},c=this._parse({data:n,path:u.path,parent:u}),f=await(Kl(c)?c:Promise.resolve(c));return pm(u,f)}refine(n,i){const u=c=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(c):i;return this._refinement((c,f)=>{const h=n(c),y=()=>f.addIssue({code:U.custom,...u(c)});return typeof Promise<"u"&&h instanceof Promise?h.then(p=>p?!0:(y(),!1)):h?!0:(y(),!1)})}refinement(n,i){return this._refinement((u,c)=>n(u)?!0:(c.addIssue(typeof i=="function"?i(u,c):i),!1))}_refinement(n){return new ln({schema:this,typeName:te.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:i=>this["~validate"](i)}}optional(){return yn.create(this,this._def)}nullable(){return ha.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return an.create(this)}promise(){return Di.create(this,this._def)}or(n){return Ql.create([this,n],this._def)}and(n){return $l.create(this,n,this._def)}transform(n){return new ln({...ue(this._def),schema:this,typeName:te.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const i=typeof n=="function"?n:()=>n;return new Pl({...ue(this._def),innerType:this,defaultValue:i,typeName:te.ZodDefault})}brand(){return new Po({typeName:te.ZodBranded,type:this,...ue(this._def)})}catch(n){const i=typeof n=="function"?n:()=>n;return new es({...ue(this._def),innerType:this,catchValue:i,typeName:te.ZodCatch})}describe(n){const i=this.constructor;return new i({...this._def,description:n})}pipe(n){return ss.create(this,n)}readonly(){return ts.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xb=/^c[^\s-]{8,}$/i,Ob=/^[0-9a-z]+$/,wb=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Rb=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kb=/^[a-z0-9_-]{21}$/i,Mb=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Nb=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Cb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Db="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yo;const zb=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ub=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,jb=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Bb=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Zb=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$m="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Vb=new RegExp(`^${$m}$`);function Jm(s){let n="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return s.precision?n=`${n}\\.\\d{${s.precision}}`:s.precision==null&&(n=`${n}(\\.\\d+)?`),n}function Hb(s){return new RegExp(`^${Jm(s)}$`)}function Wm(s){let n=`${$m}T${Jm(s)}`;const i=[];return i.push(s.local?"Z?":"Z"),s.offset&&i.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${i.join("|")})`,new RegExp(`^${n}$`)}function Lb(s,n){return!!((n==="v4"||!n)&&zb.test(s)||(n==="v6"||!n)&&jb.test(s))}function Kb(s,n){if(!Mb.test(s))return!1;try{const[i]=s.split("."),u=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),c=JSON.parse(atob(u));return!(typeof c!="object"||c===null||!c.typ||!c.alg||n&&c.alg!==n)}catch{return!1}}function Yb(s,n){return!!((n==="v4"||!n)&&Ub.test(s)||(n==="v6"||!n)&&Bb.test(s))}class nn extends fe{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==L.string){const f=this._getOrReturnCtx(n);return Z(f,{code:U.invalid_type,expected:L.string,received:f.parsedType}),ie}const u=new gt;let c;for(const f of this._def.checks)if(f.kind==="min")n.data.length<f.value&&(c=this._getOrReturnCtx(n,c),Z(c,{code:U.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="max")n.data.length>f.value&&(c=this._getOrReturnCtx(n,c),Z(c,{code:U.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="length"){const h=n.data.length>f.value,y=n.data.length<f.value;(h||y)&&(c=this._getOrReturnCtx(n,c),h?Z(c,{code:U.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):y&&Z(c,{code:U.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")Cb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"email",code:U.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")yo||(yo=new RegExp(Db,"u")),yo.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"emoji",code:U.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")Rb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"uuid",code:U.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")kb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"nanoid",code:U.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")xb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"cuid",code:U.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")Ob.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"cuid2",code:U.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")wb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"ulid",code:U.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(n.data)}catch{c=this._getOrReturnCtx(n,c),Z(c,{validation:"url",code:U.invalid_string,message:f.message}),u.dirty()}else f.kind==="regex"?(f.regex.lastIndex=0,f.regex.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"regex",code:U.invalid_string,message:f.message}),u.dirty())):f.kind==="trim"?n.data=n.data.trim():f.kind==="includes"?n.data.includes(f.value,f.position)||(c=this._getOrReturnCtx(n,c),Z(c,{code:U.invalid_string,validation:{includes:f.value,position:f.position},message:f.message}),u.dirty()):f.kind==="toLowerCase"?n.data=n.data.toLowerCase():f.kind==="toUpperCase"?n.data=n.data.toUpperCase():f.kind==="startsWith"?n.data.startsWith(f.value)||(c=this._getOrReturnCtx(n,c),Z(c,{code:U.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?n.data.endsWith(f.value)||(c=this._getOrReturnCtx(n,c),Z(c,{code:U.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?Wm(f).test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{code:U.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?Vb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{code:U.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?Hb(f).test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{code:U.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?Nb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"duration",code:U.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?Lb(n.data,f.version)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"ip",code:U.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?Kb(n.data,f.alg)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"jwt",code:U.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?Yb(n.data,f.version)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"cidr",code:U.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?qb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"base64",code:U.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?Zb.test(n.data)||(c=this._getOrReturnCtx(n,c),Z(c,{validation:"base64url",code:U.invalid_string,message:f.message}),u.dirty()):_e.assertNever(f);return{status:u.value,value:n.data}}_regex(n,i,u){return this.refinement(c=>n.test(c),{validation:i,code:U.invalid_string,...$.errToObj(u)})}_addCheck(n){return new nn({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...$.errToObj(n)})}url(n){return this._addCheck({kind:"url",...$.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...$.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...$.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...$.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...$.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...$.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...$.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...$.errToObj(n)})}base64url(n){return this._addCheck({kind:"base64url",...$.errToObj(n)})}jwt(n){return this._addCheck({kind:"jwt",...$.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...$.errToObj(n)})}cidr(n){return this._addCheck({kind:"cidr",...$.errToObj(n)})}datetime(n){var i,u;return typeof n=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,offset:(i=n==null?void 0:n.offset)!==null&&i!==void 0?i:!1,local:(u=n==null?void 0:n.local)!==null&&u!==void 0?u:!1,...$.errToObj(n==null?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return typeof n=="string"?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,...$.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...$.errToObj(n)})}regex(n,i){return this._addCheck({kind:"regex",regex:n,...$.errToObj(i)})}includes(n,i){return this._addCheck({kind:"includes",value:n,position:i==null?void 0:i.position,...$.errToObj(i==null?void 0:i.message)})}startsWith(n,i){return this._addCheck({kind:"startsWith",value:n,...$.errToObj(i)})}endsWith(n,i){return this._addCheck({kind:"endsWith",value:n,...$.errToObj(i)})}min(n,i){return this._addCheck({kind:"min",value:n,...$.errToObj(i)})}max(n,i){return this._addCheck({kind:"max",value:n,...$.errToObj(i)})}length(n,i){return this._addCheck({kind:"length",value:n,...$.errToObj(i)})}nonempty(n){return this.min(1,$.errToObj(n))}trim(){return new nn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new nn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new nn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>n.kind==="datetime")}get isDate(){return!!this._def.checks.find(n=>n.kind==="date")}get isTime(){return!!this._def.checks.find(n=>n.kind==="time")}get isDuration(){return!!this._def.checks.find(n=>n.kind==="duration")}get isEmail(){return!!this._def.checks.find(n=>n.kind==="email")}get isURL(){return!!this._def.checks.find(n=>n.kind==="url")}get isEmoji(){return!!this._def.checks.find(n=>n.kind==="emoji")}get isUUID(){return!!this._def.checks.find(n=>n.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(n=>n.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(n=>n.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(n=>n.kind==="cuid2")}get isULID(){return!!this._def.checks.find(n=>n.kind==="ulid")}get isIP(){return!!this._def.checks.find(n=>n.kind==="ip")}get isCIDR(){return!!this._def.checks.find(n=>n.kind==="cidr")}get isBase64(){return!!this._def.checks.find(n=>n.kind==="base64")}get isBase64url(){return!!this._def.checks.find(n=>n.kind==="base64url")}get minLength(){let n=null;for(const i of this._def.checks)i.kind==="min"&&(n===null||i.value>n)&&(n=i.value);return n}get maxLength(){let n=null;for(const i of this._def.checks)i.kind==="max"&&(n===null||i.value<n)&&(n=i.value);return n}}nn.create=s=>{var n;return new nn({checks:[],typeName:te.ZodString,coerce:(n=s==null?void 0:s.coerce)!==null&&n!==void 0?n:!1,...ue(s)})};function Gb(s,n){const i=(s.toString().split(".")[1]||"").length,u=(n.toString().split(".")[1]||"").length,c=i>u?i:u,f=parseInt(s.toFixed(c).replace(".","")),h=parseInt(n.toFixed(c).replace(".",""));return f%h/Math.pow(10,c)}class oa extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){if(this._def.coerce&&(n.data=Number(n.data)),this._getType(n)!==L.number){const f=this._getOrReturnCtx(n);return Z(f,{code:U.invalid_type,expected:L.number,received:f.parsedType}),ie}let u;const c=new gt;for(const f of this._def.checks)f.kind==="int"?_e.isInteger(n.data)||(u=this._getOrReturnCtx(n,u),Z(u,{code:U.invalid_type,expected:"integer",received:"float",message:f.message}),c.dirty()):f.kind==="min"?(f.inclusive?n.data<f.value:n.data<=f.value)&&(u=this._getOrReturnCtx(n,u),Z(u,{code:U.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),c.dirty()):f.kind==="max"?(f.inclusive?n.data>f.value:n.data>=f.value)&&(u=this._getOrReturnCtx(n,u),Z(u,{code:U.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),c.dirty()):f.kind==="multipleOf"?Gb(n.data,f.value)!==0&&(u=this._getOrReturnCtx(n,u),Z(u,{code:U.not_multiple_of,multipleOf:f.value,message:f.message}),c.dirty()):f.kind==="finite"?Number.isFinite(n.data)||(u=this._getOrReturnCtx(n,u),Z(u,{code:U.not_finite,message:f.message}),c.dirty()):_e.assertNever(f);return{status:c.value,value:n.data}}gte(n,i){return this.setLimit("min",n,!0,$.toString(i))}gt(n,i){return this.setLimit("min",n,!1,$.toString(i))}lte(n,i){return this.setLimit("max",n,!0,$.toString(i))}lt(n,i){return this.setLimit("max",n,!1,$.toString(i))}setLimit(n,i,u,c){return new oa({...this._def,checks:[...this._def.checks,{kind:n,value:i,inclusive:u,message:$.toString(c)}]})}_addCheck(n){return new oa({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:$.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$.toString(n)})}multipleOf(n,i){return this._addCheck({kind:"multipleOf",value:n,message:$.toString(i)})}finite(n){return this._addCheck({kind:"finite",message:$.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$.toString(n)})}get minValue(){let n=null;for(const i of this._def.checks)i.kind==="min"&&(n===null||i.value>n)&&(n=i.value);return n}get maxValue(){let n=null;for(const i of this._def.checks)i.kind==="max"&&(n===null||i.value<n)&&(n=i.value);return n}get isInt(){return!!this._def.checks.find(n=>n.kind==="int"||n.kind==="multipleOf"&&_e.isInteger(n.value))}get isFinite(){let n=null,i=null;for(const u of this._def.checks){if(u.kind==="finite"||u.kind==="int"||u.kind==="multipleOf")return!0;u.kind==="min"?(i===null||u.value>i)&&(i=u.value):u.kind==="max"&&(n===null||u.value<n)&&(n=u.value)}return Number.isFinite(i)&&Number.isFinite(n)}}oa.create=s=>new oa({checks:[],typeName:te.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...ue(s)});class fa extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){if(this._def.coerce)try{n.data=BigInt(n.data)}catch{return this._getInvalidInput(n)}if(this._getType(n)!==L.bigint)return this._getInvalidInput(n);let u;const c=new gt;for(const f of this._def.checks)f.kind==="min"?(f.inclusive?n.data<f.value:n.data<=f.value)&&(u=this._getOrReturnCtx(n,u),Z(u,{code:U.too_small,type:"bigint",minimum:f.value,inclusive:f.inclusive,message:f.message}),c.dirty()):f.kind==="max"?(f.inclusive?n.data>f.value:n.data>=f.value)&&(u=this._getOrReturnCtx(n,u),Z(u,{code:U.too_big,type:"bigint",maximum:f.value,inclusive:f.inclusive,message:f.message}),c.dirty()):f.kind==="multipleOf"?n.data%f.value!==BigInt(0)&&(u=this._getOrReturnCtx(n,u),Z(u,{code:U.not_multiple_of,multipleOf:f.value,message:f.message}),c.dirty()):_e.assertNever(f);return{status:c.value,value:n.data}}_getInvalidInput(n){const i=this._getOrReturnCtx(n);return Z(i,{code:U.invalid_type,expected:L.bigint,received:i.parsedType}),ie}gte(n,i){return this.setLimit("min",n,!0,$.toString(i))}gt(n,i){return this.setLimit("min",n,!1,$.toString(i))}lte(n,i){return this.setLimit("max",n,!0,$.toString(i))}lt(n,i){return this.setLimit("max",n,!1,$.toString(i))}setLimit(n,i,u,c){return new fa({...this._def,checks:[...this._def.checks,{kind:n,value:i,inclusive:u,message:$.toString(c)}]})}_addCheck(n){return new fa({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$.toString(n)})}multipleOf(n,i){return this._addCheck({kind:"multipleOf",value:n,message:$.toString(i)})}get minValue(){let n=null;for(const i of this._def.checks)i.kind==="min"&&(n===null||i.value>n)&&(n=i.value);return n}get maxValue(){let n=null;for(const i of this._def.checks)i.kind==="max"&&(n===null||i.value<n)&&(n=i.value);return n}}fa.create=s=>{var n;return new fa({checks:[],typeName:te.ZodBigInt,coerce:(n=s==null?void 0:s.coerce)!==null&&n!==void 0?n:!1,...ue(s)})};class Yl extends fe{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==L.boolean){const u=this._getOrReturnCtx(n);return Z(u,{code:U.invalid_type,expected:L.boolean,received:u.parsedType}),ie}return _t(n.data)}}Yl.create=s=>new Yl({typeName:te.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...ue(s)});class ja extends fe{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==L.date){const f=this._getOrReturnCtx(n);return Z(f,{code:U.invalid_type,expected:L.date,received:f.parsedType}),ie}if(isNaN(n.data.getTime())){const f=this._getOrReturnCtx(n);return Z(f,{code:U.invalid_date}),ie}const u=new gt;let c;for(const f of this._def.checks)f.kind==="min"?n.data.getTime()<f.value&&(c=this._getOrReturnCtx(n,c),Z(c,{code:U.too_small,message:f.message,inclusive:!0,exact:!1,minimum:f.value,type:"date"}),u.dirty()):f.kind==="max"?n.data.getTime()>f.value&&(c=this._getOrReturnCtx(n,c),Z(c,{code:U.too_big,message:f.message,inclusive:!0,exact:!1,maximum:f.value,type:"date"}),u.dirty()):_e.assertNever(f);return{status:u.value,value:new Date(n.data.getTime())}}_addCheck(n){return new ja({...this._def,checks:[...this._def.checks,n]})}min(n,i){return this._addCheck({kind:"min",value:n.getTime(),message:$.toString(i)})}max(n,i){return this._addCheck({kind:"max",value:n.getTime(),message:$.toString(i)})}get minDate(){let n=null;for(const i of this._def.checks)i.kind==="min"&&(n===null||i.value>n)&&(n=i.value);return n!=null?new Date(n):null}get maxDate(){let n=null;for(const i of this._def.checks)i.kind==="max"&&(n===null||i.value<n)&&(n=i.value);return n!=null?new Date(n):null}}ja.create=s=>new ja({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:te.ZodDate,...ue(s)});class zu extends fe{_parse(n){if(this._getType(n)!==L.symbol){const u=this._getOrReturnCtx(n);return Z(u,{code:U.invalid_type,expected:L.symbol,received:u.parsedType}),ie}return _t(n.data)}}zu.create=s=>new zu({typeName:te.ZodSymbol,...ue(s)});class Gl extends fe{_parse(n){if(this._getType(n)!==L.undefined){const u=this._getOrReturnCtx(n);return Z(u,{code:U.invalid_type,expected:L.undefined,received:u.parsedType}),ie}return _t(n.data)}}Gl.create=s=>new Gl({typeName:te.ZodUndefined,...ue(s)});class Xl extends fe{_parse(n){if(this._getType(n)!==L.null){const u=this._getOrReturnCtx(n);return Z(u,{code:U.invalid_type,expected:L.null,received:u.parsedType}),ie}return _t(n.data)}}Xl.create=s=>new Xl({typeName:te.ZodNull,...ue(s)});class Ci extends fe{constructor(){super(...arguments),this._any=!0}_parse(n){return _t(n.data)}}Ci.create=s=>new Ci({typeName:te.ZodAny,...ue(s)});class Da extends fe{constructor(){super(...arguments),this._unknown=!0}_parse(n){return _t(n.data)}}Da.create=s=>new Da({typeName:te.ZodUnknown,...ue(s)});class jn extends fe{_parse(n){const i=this._getOrReturnCtx(n);return Z(i,{code:U.invalid_type,expected:L.never,received:i.parsedType}),ie}}jn.create=s=>new jn({typeName:te.ZodNever,...ue(s)});class Uu extends fe{_parse(n){if(this._getType(n)!==L.undefined){const u=this._getOrReturnCtx(n);return Z(u,{code:U.invalid_type,expected:L.void,received:u.parsedType}),ie}return _t(n.data)}}Uu.create=s=>new Uu({typeName:te.ZodVoid,...ue(s)});class an extends fe{_parse(n){const{ctx:i,status:u}=this._processInputParams(n),c=this._def;if(i.parsedType!==L.array)return Z(i,{code:U.invalid_type,expected:L.array,received:i.parsedType}),ie;if(c.exactLength!==null){const h=i.data.length>c.exactLength.value,y=i.data.length<c.exactLength.value;(h||y)&&(Z(i,{code:h?U.too_big:U.too_small,minimum:y?c.exactLength.value:void 0,maximum:h?c.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:c.exactLength.message}),u.dirty())}if(c.minLength!==null&&i.data.length<c.minLength.value&&(Z(i,{code:U.too_small,minimum:c.minLength.value,type:"array",inclusive:!0,exact:!1,message:c.minLength.message}),u.dirty()),c.maxLength!==null&&i.data.length>c.maxLength.value&&(Z(i,{code:U.too_big,maximum:c.maxLength.value,type:"array",inclusive:!0,exact:!1,message:c.maxLength.message}),u.dirty()),i.common.async)return Promise.all([...i.data].map((h,y)=>c.type._parseAsync(new pn(i,h,i.path,y)))).then(h=>gt.mergeArray(u,h));const f=[...i.data].map((h,y)=>c.type._parseSync(new pn(i,h,i.path,y)));return gt.mergeArray(u,f)}get element(){return this._def.type}min(n,i){return new an({...this._def,minLength:{value:n,message:$.toString(i)}})}max(n,i){return new an({...this._def,maxLength:{value:n,message:$.toString(i)}})}length(n,i){return new an({...this._def,exactLength:{value:n,message:$.toString(i)}})}nonempty(n){return this.min(1,n)}}an.create=(s,n)=>new an({type:s,minLength:null,maxLength:null,exactLength:null,typeName:te.ZodArray,...ue(n)});function xi(s){if(s instanceof Le){const n={};for(const i in s.shape){const u=s.shape[i];n[i]=yn.create(xi(u))}return new Le({...s._def,shape:()=>n})}else return s instanceof an?new an({...s._def,type:xi(s.element)}):s instanceof yn?yn.create(xi(s.unwrap())):s instanceof ha?ha.create(xi(s.unwrap())):s instanceof gn?gn.create(s.items.map(n=>xi(n))):s}class Le extends fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const n=this._def.shape(),i=_e.objectKeys(n);return this._cached={shape:n,keys:i}}_parse(n){if(this._getType(n)!==L.object){const g=this._getOrReturnCtx(n);return Z(g,{code:U.invalid_type,expected:L.object,received:g.parsedType}),ie}const{status:u,ctx:c}=this._processInputParams(n),{shape:f,keys:h}=this._getCached(),y=[];if(!(this._def.catchall instanceof jn&&this._def.unknownKeys==="strip"))for(const g in c.data)h.includes(g)||y.push(g);const p=[];for(const g of h){const b=f[g],w=c.data[g];p.push({key:{status:"valid",value:g},value:b._parse(new pn(c,w,c.path,g)),alwaysSet:g in c.data})}if(this._def.catchall instanceof jn){const g=this._def.unknownKeys;if(g==="passthrough")for(const b of y)p.push({key:{status:"valid",value:b},value:{status:"valid",value:c.data[b]}});else if(g==="strict")y.length>0&&(Z(c,{code:U.unrecognized_keys,keys:y}),u.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const b of y){const w=c.data[b];p.push({key:{status:"valid",value:b},value:g._parse(new pn(c,w,c.path,b)),alwaysSet:b in c.data})}}return c.common.async?Promise.resolve().then(async()=>{const g=[];for(const b of p){const w=await b.key,z=await b.value;g.push({key:w,value:z,alwaysSet:b.alwaysSet})}return g}).then(g=>gt.mergeObjectSync(u,g)):gt.mergeObjectSync(u,p)}get shape(){return this._def.shape()}strict(n){return $.errToObj,new Le({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(i,u)=>{var c,f,h,y;const p=(h=(f=(c=this._def).errorMap)===null||f===void 0?void 0:f.call(c,i,u).message)!==null&&h!==void 0?h:u.defaultError;return i.code==="unrecognized_keys"?{message:(y=$.errToObj(n).message)!==null&&y!==void 0?y:p}:{message:p}}}:{}})}strip(){return new Le({...this._def,unknownKeys:"strip"})}passthrough(){return new Le({...this._def,unknownKeys:"passthrough"})}extend(n){return new Le({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new Le({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:te.ZodObject})}setKey(n,i){return this.augment({[n]:i})}catchall(n){return new Le({...this._def,catchall:n})}pick(n){const i={};return _e.objectKeys(n).forEach(u=>{n[u]&&this.shape[u]&&(i[u]=this.shape[u])}),new Le({...this._def,shape:()=>i})}omit(n){const i={};return _e.objectKeys(this.shape).forEach(u=>{n[u]||(i[u]=this.shape[u])}),new Le({...this._def,shape:()=>i})}deepPartial(){return xi(this)}partial(n){const i={};return _e.objectKeys(this.shape).forEach(u=>{const c=this.shape[u];n&&!n[u]?i[u]=c:i[u]=c.optional()}),new Le({...this._def,shape:()=>i})}required(n){const i={};return _e.objectKeys(this.shape).forEach(u=>{if(n&&!n[u])i[u]=this.shape[u];else{let f=this.shape[u];for(;f instanceof yn;)f=f._def.innerType;i[u]=f}}),new Le({...this._def,shape:()=>i})}keyof(){return Fm(_e.objectKeys(this.shape))}}Le.create=(s,n)=>new Le({shape:()=>s,unknownKeys:"strip",catchall:jn.create(),typeName:te.ZodObject,...ue(n)});Le.strictCreate=(s,n)=>new Le({shape:()=>s,unknownKeys:"strict",catchall:jn.create(),typeName:te.ZodObject,...ue(n)});Le.lazycreate=(s,n)=>new Le({shape:s,unknownKeys:"strip",catchall:jn.create(),typeName:te.ZodObject,...ue(n)});class Ql extends fe{_parse(n){const{ctx:i}=this._processInputParams(n),u=this._def.options;function c(f){for(const y of f)if(y.result.status==="valid")return y.result;for(const y of f)if(y.result.status==="dirty")return i.common.issues.push(...y.ctx.common.issues),y.result;const h=f.map(y=>new Zt(y.ctx.common.issues));return Z(i,{code:U.invalid_union,unionErrors:h}),ie}if(i.common.async)return Promise.all(u.map(async f=>{const h={...i,common:{...i.common,issues:[]},parent:null};return{result:await f._parseAsync({data:i.data,path:i.path,parent:h}),ctx:h}})).then(c);{let f;const h=[];for(const p of u){const g={...i,common:{...i.common,issues:[]},parent:null},b=p._parseSync({data:i.data,path:i.path,parent:g});if(b.status==="valid")return b;b.status==="dirty"&&!f&&(f={result:b,ctx:g}),g.common.issues.length&&h.push(g.common.issues)}if(f)return i.common.issues.push(...f.ctx.common.issues),f.result;const y=h.map(p=>new Zt(p));return Z(i,{code:U.invalid_union,unionErrors:y}),ie}}get options(){return this._def.options}}Ql.create=(s,n)=>new Ql({options:s,typeName:te.ZodUnion,...ue(n)});const zn=s=>s instanceof Wl?zn(s.schema):s instanceof ln?zn(s.innerType()):s instanceof Fl?[s.value]:s instanceof da?s.options:s instanceof Il?_e.objectValues(s.enum):s instanceof Pl?zn(s._def.innerType):s instanceof Gl?[void 0]:s instanceof Xl?[null]:s instanceof yn?[void 0,...zn(s.unwrap())]:s instanceof ha?[null,...zn(s.unwrap())]:s instanceof Po||s instanceof ts?zn(s.unwrap()):s instanceof es?zn(s._def.innerType):[];class Hu extends fe{_parse(n){const{ctx:i}=this._processInputParams(n);if(i.parsedType!==L.object)return Z(i,{code:U.invalid_type,expected:L.object,received:i.parsedType}),ie;const u=this.discriminator,c=i.data[u],f=this.optionsMap.get(c);return f?i.common.async?f._parseAsync({data:i.data,path:i.path,parent:i}):f._parseSync({data:i.data,path:i.path,parent:i}):(Z(i,{code:U.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,i,u){const c=new Map;for(const f of i){const h=zn(f.shape[n]);if(!h.length)throw new Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(const y of h){if(c.has(y))throw new Error(`Discriminator property ${String(n)} has duplicate value ${String(y)}`);c.set(y,f)}}return new Hu({typeName:te.ZodDiscriminatedUnion,discriminator:n,options:i,optionsMap:c,...ue(u)})}}function wo(s,n){const i=Un(s),u=Un(n);if(s===n)return{valid:!0,data:s};if(i===L.object&&u===L.object){const c=_e.objectKeys(n),f=_e.objectKeys(s).filter(y=>c.indexOf(y)!==-1),h={...s,...n};for(const y of f){const p=wo(s[y],n[y]);if(!p.valid)return{valid:!1};h[y]=p.data}return{valid:!0,data:h}}else if(i===L.array&&u===L.array){if(s.length!==n.length)return{valid:!1};const c=[];for(let f=0;f<s.length;f++){const h=s[f],y=n[f],p=wo(h,y);if(!p.valid)return{valid:!1};c.push(p.data)}return{valid:!0,data:c}}else return i===L.date&&u===L.date&&+s==+n?{valid:!0,data:s}:{valid:!1}}class $l extends fe{_parse(n){const{status:i,ctx:u}=this._processInputParams(n),c=(f,h)=>{if(xo(f)||xo(h))return ie;const y=wo(f.value,h.value);return y.valid?((Oo(f)||Oo(h))&&i.dirty(),{status:i.value,value:y.data}):(Z(u,{code:U.invalid_intersection_types}),ie)};return u.common.async?Promise.all([this._def.left._parseAsync({data:u.data,path:u.path,parent:u}),this._def.right._parseAsync({data:u.data,path:u.path,parent:u})]).then(([f,h])=>c(f,h)):c(this._def.left._parseSync({data:u.data,path:u.path,parent:u}),this._def.right._parseSync({data:u.data,path:u.path,parent:u}))}}$l.create=(s,n,i)=>new $l({left:s,right:n,typeName:te.ZodIntersection,...ue(i)});class gn extends fe{_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.parsedType!==L.array)return Z(u,{code:U.invalid_type,expected:L.array,received:u.parsedType}),ie;if(u.data.length<this._def.items.length)return Z(u,{code:U.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ie;!this._def.rest&&u.data.length>this._def.items.length&&(Z(u,{code:U.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const f=[...u.data].map((h,y)=>{const p=this._def.items[y]||this._def.rest;return p?p._parse(new pn(u,h,u.path,y)):null}).filter(h=>!!h);return u.common.async?Promise.all(f).then(h=>gt.mergeArray(i,h)):gt.mergeArray(i,f)}get items(){return this._def.items}rest(n){return new gn({...this._def,rest:n})}}gn.create=(s,n)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gn({items:s,typeName:te.ZodTuple,rest:null,...ue(n)})};class Jl extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.parsedType!==L.object)return Z(u,{code:U.invalid_type,expected:L.object,received:u.parsedType}),ie;const c=[],f=this._def.keyType,h=this._def.valueType;for(const y in u.data)c.push({key:f._parse(new pn(u,y,u.path,y)),value:h._parse(new pn(u,u.data[y],u.path,y)),alwaysSet:y in u.data});return u.common.async?gt.mergeObjectAsync(i,c):gt.mergeObjectSync(i,c)}get element(){return this._def.valueType}static create(n,i,u){return i instanceof fe?new Jl({keyType:n,valueType:i,typeName:te.ZodRecord,...ue(u)}):new Jl({keyType:nn.create(),valueType:n,typeName:te.ZodRecord,...ue(i)})}}class ju extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.parsedType!==L.map)return Z(u,{code:U.invalid_type,expected:L.map,received:u.parsedType}),ie;const c=this._def.keyType,f=this._def.valueType,h=[...u.data.entries()].map(([y,p],g)=>({key:c._parse(new pn(u,y,u.path,[g,"key"])),value:f._parse(new pn(u,p,u.path,[g,"value"]))}));if(u.common.async){const y=new Map;return Promise.resolve().then(async()=>{for(const p of h){const g=await p.key,b=await p.value;if(g.status==="aborted"||b.status==="aborted")return ie;(g.status==="dirty"||b.status==="dirty")&&i.dirty(),y.set(g.value,b.value)}return{status:i.value,value:y}})}else{const y=new Map;for(const p of h){const g=p.key,b=p.value;if(g.status==="aborted"||b.status==="aborted")return ie;(g.status==="dirty"||b.status==="dirty")&&i.dirty(),y.set(g.value,b.value)}return{status:i.value,value:y}}}}ju.create=(s,n,i)=>new ju({valueType:n,keyType:s,typeName:te.ZodMap,...ue(i)});class Ba extends fe{_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.parsedType!==L.set)return Z(u,{code:U.invalid_type,expected:L.set,received:u.parsedType}),ie;const c=this._def;c.minSize!==null&&u.data.size<c.minSize.value&&(Z(u,{code:U.too_small,minimum:c.minSize.value,type:"set",inclusive:!0,exact:!1,message:c.minSize.message}),i.dirty()),c.maxSize!==null&&u.data.size>c.maxSize.value&&(Z(u,{code:U.too_big,maximum:c.maxSize.value,type:"set",inclusive:!0,exact:!1,message:c.maxSize.message}),i.dirty());const f=this._def.valueType;function h(p){const g=new Set;for(const b of p){if(b.status==="aborted")return ie;b.status==="dirty"&&i.dirty(),g.add(b.value)}return{status:i.value,value:g}}const y=[...u.data.values()].map((p,g)=>f._parse(new pn(u,p,u.path,g)));return u.common.async?Promise.all(y).then(p=>h(p)):h(y)}min(n,i){return new Ba({...this._def,minSize:{value:n,message:$.toString(i)}})}max(n,i){return new Ba({...this._def,maxSize:{value:n,message:$.toString(i)}})}size(n,i){return this.min(n,i).max(n,i)}nonempty(n){return this.min(1,n)}}Ba.create=(s,n)=>new Ba({valueType:s,minSize:null,maxSize:null,typeName:te.ZodSet,...ue(n)});class ki extends fe{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:i}=this._processInputParams(n);if(i.parsedType!==L.function)return Z(i,{code:U.invalid_type,expected:L.function,received:i.parsedType}),ie;function u(y,p){return Cu({data:y,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,Nu(),Ni].filter(g=>!!g),issueData:{code:U.invalid_arguments,argumentsError:p}})}function c(y,p){return Cu({data:y,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,Nu(),Ni].filter(g=>!!g),issueData:{code:U.invalid_return_type,returnTypeError:p}})}const f={errorMap:i.common.contextualErrorMap},h=i.data;if(this._def.returns instanceof Di){const y=this;return _t(async function(...p){const g=new Zt([]),b=await y._def.args.parseAsync(p,f).catch(B=>{throw g.addIssue(u(p,B)),g}),w=await Reflect.apply(h,this,b);return await y._def.returns._def.type.parseAsync(w,f).catch(B=>{throw g.addIssue(c(w,B)),g})})}else{const y=this;return _t(function(...p){const g=y._def.args.safeParse(p,f);if(!g.success)throw new Zt([u(p,g.error)]);const b=Reflect.apply(h,this,g.data),w=y._def.returns.safeParse(b,f);if(!w.success)throw new Zt([c(b,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new ki({...this._def,args:gn.create(n).rest(Da.create())})}returns(n){return new ki({...this._def,returns:n})}implement(n){return this.parse(n)}strictImplement(n){return this.parse(n)}static create(n,i,u){return new ki({args:n||gn.create([]).rest(Da.create()),returns:i||Da.create(),typeName:te.ZodFunction,...ue(u)})}}class Wl extends fe{get schema(){return this._def.getter()}_parse(n){const{ctx:i}=this._processInputParams(n);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}Wl.create=(s,n)=>new Wl({getter:s,typeName:te.ZodLazy,...ue(n)});class Fl extends fe{_parse(n){if(n.data!==this._def.value){const i=this._getOrReturnCtx(n);return Z(i,{received:i.data,code:U.invalid_literal,expected:this._def.value}),ie}return{status:"valid",value:n.data}}get value(){return this._def.value}}Fl.create=(s,n)=>new Fl({value:s,typeName:te.ZodLiteral,...ue(n)});function Fm(s,n){return new da({values:s,typeName:te.ZodEnum,...ue(n)})}class da extends fe{constructor(){super(...arguments),ql.set(this,void 0)}_parse(n){if(typeof n.data!="string"){const i=this._getOrReturnCtx(n),u=this._def.values;return Z(i,{expected:_e.joinValues(u),received:i.parsedType,code:U.invalid_type}),ie}if(Du(this,ql)||Qm(this,ql,new Set(this._def.values)),!Du(this,ql).has(n.data)){const i=this._getOrReturnCtx(n),u=this._def.values;return Z(i,{received:i.data,code:U.invalid_enum_value,options:u}),ie}return _t(n.data)}get options(){return this._def.values}get enum(){const n={};for(const i of this._def.values)n[i]=i;return n}get Values(){const n={};for(const i of this._def.values)n[i]=i;return n}get Enum(){const n={};for(const i of this._def.values)n[i]=i;return n}extract(n,i=this._def){return da.create(n,{...this._def,...i})}exclude(n,i=this._def){return da.create(this.options.filter(u=>!n.includes(u)),{...this._def,...i})}}ql=new WeakMap;da.create=Fm;class Il extends fe{constructor(){super(...arguments),Zl.set(this,void 0)}_parse(n){const i=_e.getValidEnumValues(this._def.values),u=this._getOrReturnCtx(n);if(u.parsedType!==L.string&&u.parsedType!==L.number){const c=_e.objectValues(i);return Z(u,{expected:_e.joinValues(c),received:u.parsedType,code:U.invalid_type}),ie}if(Du(this,Zl)||Qm(this,Zl,new Set(_e.getValidEnumValues(this._def.values))),!Du(this,Zl).has(n.data)){const c=_e.objectValues(i);return Z(u,{received:u.data,code:U.invalid_enum_value,options:c}),ie}return _t(n.data)}get enum(){return this._def.values}}Zl=new WeakMap;Il.create=(s,n)=>new Il({values:s,typeName:te.ZodNativeEnum,...ue(n)});class Di extends fe{unwrap(){return this._def.type}_parse(n){const{ctx:i}=this._processInputParams(n);if(i.parsedType!==L.promise&&i.common.async===!1)return Z(i,{code:U.invalid_type,expected:L.promise,received:i.parsedType}),ie;const u=i.parsedType===L.promise?i.data:Promise.resolve(i.data);return _t(u.then(c=>this._def.type.parseAsync(c,{path:i.path,errorMap:i.common.contextualErrorMap})))}}Di.create=(s,n)=>new Di({type:s,typeName:te.ZodPromise,...ue(n)});class ln extends fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){const{status:i,ctx:u}=this._processInputParams(n),c=this._def.effect||null,f={addIssue:h=>{Z(u,h),h.fatal?i.abort():i.dirty()},get path(){return u.path}};if(f.addIssue=f.addIssue.bind(f),c.type==="preprocess"){const h=c.transform(u.data,f);if(u.common.async)return Promise.resolve(h).then(async y=>{if(i.value==="aborted")return ie;const p=await this._def.schema._parseAsync({data:y,path:u.path,parent:u});return p.status==="aborted"?ie:p.status==="dirty"||i.value==="dirty"?Ri(p.value):p});{if(i.value==="aborted")return ie;const y=this._def.schema._parseSync({data:h,path:u.path,parent:u});return y.status==="aborted"?ie:y.status==="dirty"||i.value==="dirty"?Ri(y.value):y}}if(c.type==="refinement"){const h=y=>{const p=c.refinement(y,f);if(u.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return y};if(u.common.async===!1){const y=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return y.status==="aborted"?ie:(y.status==="dirty"&&i.dirty(),h(y.value),{status:i.value,value:y.value})}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(y=>y.status==="aborted"?ie:(y.status==="dirty"&&i.dirty(),h(y.value).then(()=>({status:i.value,value:y.value}))))}if(c.type==="transform")if(u.common.async===!1){const h=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!Ua(h))return h;const y=c.transform(h.value,f);if(y instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:y}}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(h=>Ua(h)?Promise.resolve(c.transform(h.value,f)).then(y=>({status:i.value,value:y})):h);_e.assertNever(c)}}ln.create=(s,n,i)=>new ln({schema:s,typeName:te.ZodEffects,effect:n,...ue(i)});ln.createWithPreprocess=(s,n,i)=>new ln({schema:n,effect:{type:"preprocess",transform:s},typeName:te.ZodEffects,...ue(i)});class yn extends fe{_parse(n){return this._getType(n)===L.undefined?_t(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}yn.create=(s,n)=>new yn({innerType:s,typeName:te.ZodOptional,...ue(n)});class ha extends fe{_parse(n){return this._getType(n)===L.null?_t(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}ha.create=(s,n)=>new ha({innerType:s,typeName:te.ZodNullable,...ue(n)});class Pl extends fe{_parse(n){const{ctx:i}=this._processInputParams(n);let u=i.data;return i.parsedType===L.undefined&&(u=this._def.defaultValue()),this._def.innerType._parse({data:u,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}Pl.create=(s,n)=>new Pl({innerType:s,typeName:te.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...ue(n)});class es extends fe{_parse(n){const{ctx:i}=this._processInputParams(n),u={...i,common:{...i.common,issues:[]}},c=this._def.innerType._parse({data:u.data,path:u.path,parent:{...u}});return Kl(c)?c.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new Zt(u.common.issues)},input:u.data})})):{status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Zt(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}es.create=(s,n)=>new es({innerType:s,typeName:te.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...ue(n)});class Bu extends fe{_parse(n){if(this._getType(n)!==L.nan){const u=this._getOrReturnCtx(n);return Z(u,{code:U.invalid_type,expected:L.nan,received:u.parsedType}),ie}return{status:"valid",value:n.data}}}Bu.create=s=>new Bu({typeName:te.ZodNaN,...ue(s)});const Xb=Symbol("zod_brand");class Po extends fe{_parse(n){const{ctx:i}=this._processInputParams(n),u=i.data;return this._def.type._parse({data:u,path:i.path,parent:i})}unwrap(){return this._def.type}}class ss extends fe{_parse(n){const{status:i,ctx:u}=this._processInputParams(n);if(u.common.async)return(async()=>{const f=await this._def.in._parseAsync({data:u.data,path:u.path,parent:u});return f.status==="aborted"?ie:f.status==="dirty"?(i.dirty(),Ri(f.value)):this._def.out._parseAsync({data:f.value,path:u.path,parent:u})})();{const c=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return c.status==="aborted"?ie:c.status==="dirty"?(i.dirty(),{status:"dirty",value:c.value}):this._def.out._parseSync({data:c.value,path:u.path,parent:u})}}static create(n,i){return new ss({in:n,out:i,typeName:te.ZodPipeline})}}class ts extends fe{_parse(n){const i=this._def.innerType._parse(n),u=c=>(Ua(c)&&(c.value=Object.freeze(c.value)),c);return Kl(i)?i.then(c=>u(c)):u(i)}unwrap(){return this._def.innerType}}ts.create=(s,n)=>new ts({innerType:s,typeName:te.ZodReadonly,...ue(n)});function gm(s,n){const i=typeof s=="function"?s(n):typeof s=="string"?{message:s}:s;return typeof i=="string"?{message:i}:i}function Im(s,n={},i){return s?Ci.create().superRefine((u,c)=>{var f,h;const y=s(u);if(y instanceof Promise)return y.then(p=>{var g,b;if(!p){const w=gm(n,u),z=(b=(g=w.fatal)!==null&&g!==void 0?g:i)!==null&&b!==void 0?b:!0;c.addIssue({code:"custom",...w,fatal:z})}});if(!y){const p=gm(n,u),g=(h=(f=p.fatal)!==null&&f!==void 0?f:i)!==null&&h!==void 0?h:!0;c.addIssue({code:"custom",...p,fatal:g})}}):Ci.create()}const Qb={object:Le.lazycreate};var te;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(te||(te={}));const $b=(s,n={message:`Input not instance of ${s.name}`})=>Im(i=>i instanceof s,n),Pm=nn.create,ep=oa.create,Jb=Bu.create,Wb=fa.create,tp=Yl.create,Fb=ja.create,Ib=zu.create,Pb=Gl.create,e_=Xl.create,t_=Ci.create,n_=Da.create,a_=jn.create,i_=Uu.create,l_=an.create,s_=Le.create,u_=Le.strictCreate,r_=Ql.create,c_=Hu.create,o_=$l.create,f_=gn.create,d_=Jl.create,h_=ju.create,y_=Ba.create,m_=ki.create,p_=Wl.create,g_=Fl.create,v_=da.create,b_=Il.create,__=Di.create,vm=ln.create,S_=yn.create,T_=ha.create,E_=ln.createWithPreprocess,A_=ss.create,x_=()=>Pm().optional(),O_=()=>ep().optional(),w_=()=>tp().optional(),R_={string:s=>nn.create({...s,coerce:!0}),number:s=>oa.create({...s,coerce:!0}),boolean:s=>Yl.create({...s,coerce:!0}),bigint:s=>fa.create({...s,coerce:!0}),date:s=>ja.create({...s,coerce:!0})},k_=ie;var Re=Object.freeze({__proto__:null,defaultErrorMap:Ni,setErrorMap:Eb,getErrorMap:Nu,makeIssue:Cu,EMPTY_PATH:Ab,addIssueToContext:Z,ParseStatus:gt,INVALID:ie,DIRTY:Ri,OK:_t,isAborted:xo,isDirty:Oo,isValid:Ua,isAsync:Kl,get util(){return _e},get objectUtil(){return Ao},ZodParsedType:L,getParsedType:Un,ZodType:fe,datetimeRegex:Wm,ZodString:nn,ZodNumber:oa,ZodBigInt:fa,ZodBoolean:Yl,ZodDate:ja,ZodSymbol:zu,ZodUndefined:Gl,ZodNull:Xl,ZodAny:Ci,ZodUnknown:Da,ZodNever:jn,ZodVoid:Uu,ZodArray:an,ZodObject:Le,ZodUnion:Ql,ZodDiscriminatedUnion:Hu,ZodIntersection:$l,ZodTuple:gn,ZodRecord:Jl,ZodMap:ju,ZodSet:Ba,ZodFunction:ki,ZodLazy:Wl,ZodLiteral:Fl,ZodEnum:da,ZodNativeEnum:Il,ZodPromise:Di,ZodEffects:ln,ZodTransformer:ln,ZodOptional:yn,ZodNullable:ha,ZodDefault:Pl,ZodCatch:es,ZodNaN:Bu,BRAND:Xb,ZodBranded:Po,ZodPipeline:ss,ZodReadonly:ts,custom:Im,Schema:fe,ZodSchema:fe,late:Qb,get ZodFirstPartyTypeKind(){return te},coerce:R_,any:t_,array:l_,bigint:Wb,boolean:tp,date:Fb,discriminatedUnion:c_,effect:vm,enum:v_,function:m_,instanceof:$b,intersection:o_,lazy:p_,literal:g_,map:h_,nan:Jb,nativeEnum:b_,never:a_,null:e_,nullable:T_,number:ep,object:s_,oboolean:w_,onumber:O_,optional:S_,ostring:x_,pipeline:A_,preprocess:E_,promise:__,record:d_,set:y_,strictObject:u_,string:Pm,symbol:Ib,transformer:vm,tuple:f_,undefined:Pb,union:r_,unknown:n_,void:i_,NEVER:k_,ZodIssueCode:U,quotelessJson:Tb,ZodError:Zt});const np={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Switch Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},mo=Rm(np).map(([s])=>Re.literal(Number(s))),M_=Re.union([mo[0],mo[1],...mo]);Re.tuple([M_,Re.string()]);function N_(){return q.jsxs("svg",{id:"uuid-3d2d6be6-f179-42a3-9511-1e9ddeb8575f",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 101",children:[q.jsx("title",{children:"Tempest Games Logo"}),q.jsx("path",{d:"M155.76.93v59.89h-17.11V7.78h-13.69V.93h30.8Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),q.jsx("path",{d:"M202.91,7.86h-13.18v17.03h13.18v6.84h-13.18v22.24h13.18v6.84h-30.29V.93h30.29v6.93Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}}),q.jsx("path",{d:"M396.8,7.86h-13.17v17.03h13.17v6.84h-13.17v22.24h13.17v6.84h-30.28V.93h30.28v6.93Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}}),q.jsx("path",{d:"M500,7.78h-13.69v53.04h-17.11V.93h30.8v6.84Z",style:{fill:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}}),q.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:"var(--logo-color)",strokeWidth:0}})]})}function Lu(s){return q.jsx("a",{...s})}const C_={class:"_class_wtkls_1"};function D_(s){return["required",s]}function z_(s){return["optional",s]}function U_(s,n){let i=[s];for(const u of n){if(typeof u!="string")return!1;i=i.flatMap(c=>{if(c===null)return[];const f=[],h=c[1],y=h[u];y!==void 0&&f.push(y);const p=Object.keys(h).find(g=>g.startsWith("$"));if(p){const g=h[p];g&&f.push(g)}return f})}for(const u of i)if(u===null||u[0]==="optional")return!0;return!1}const vn=Object.create(null);vn.open="0";vn.close="1";vn.ping="2";vn.pong="3";vn.message="4";vn.upgrade="5";vn.noop="6";const Ou=Object.create(null);Object.keys(vn).forEach(s=>{Ou[vn[s]]=s});const Ro={type:"error",data:"parser error"},ap=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ip=typeof ArrayBuffer=="function",lp=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,ef=({type:s,data:n},i,u)=>ap&&n instanceof Blob?i?u(n):bm(n,u):ip&&(n instanceof ArrayBuffer||lp(n))?i?u(n):bm(new Blob([n]),u):u(vn[s]+(n||"")),bm=(s,n)=>{const i=new FileReader;return i.onload=function(){const u=i.result.split(",")[1];n("b"+(u||""))},i.readAsDataURL(s)};function _m(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}let po;function j_(s,n){if(ap&&s.data instanceof Blob)return s.data.arrayBuffer().then(_m).then(n);if(ip&&(s.data instanceof ArrayBuffer||lp(s.data)))return n(_m(s.data));ef(s,!1,i=>{po||(po=new TextEncoder),n(po.encode(i))})}const Sm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<Sm.length;s++)Vl[Sm.charCodeAt(s)]=s;const B_=s=>{let n=s.length*.75,i=s.length,u,c=0,f,h,y,p;s[s.length-1]==="="&&(n--,s[s.length-2]==="="&&n--);const g=new ArrayBuffer(n),b=new Uint8Array(g);for(u=0;u<i;u+=4)f=Vl[s.charCodeAt(u)],h=Vl[s.charCodeAt(u+1)],y=Vl[s.charCodeAt(u+2)],p=Vl[s.charCodeAt(u+3)],b[c++]=f<<2|h>>4,b[c++]=(h&15)<<4|y>>2,b[c++]=(y&3)<<6|p&63;return g},q_=typeof ArrayBuffer=="function",tf=(s,n)=>{if(typeof s!="string")return{type:"message",data:sp(s,n)};const i=s.charAt(0);return i==="b"?{type:"message",data:Z_(s.substring(1),n)}:Ou[i]?s.length>1?{type:Ou[i],data:s.substring(1)}:{type:Ou[i]}:Ro},Z_=(s,n)=>{if(q_){const i=B_(s);return sp(i,n)}else return{base64:!0,data:s}},sp=(s,n)=>{switch(n){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}},up="",V_=(s,n)=>{const i=s.length,u=new Array(i);let c=0;s.forEach((f,h)=>{ef(f,!1,y=>{u[h]=y,++c===i&&n(u.join(up))})})},H_=(s,n)=>{const i=s.split(up),u=[];for(let c=0;c<i.length;c++){const f=tf(i[c],n);if(u.push(f),f.type==="error")break}return u};function L_(){return new TransformStream({transform(s,n){j_(s,i=>{const u=i.length;let c;if(u<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,u);else if(u<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,u)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(u))}s.data&&typeof s.data!="string"&&(c[0]|=128),n.enqueue(c),n.enqueue(i)})}})}let go;function Eu(s){return s.reduce((n,i)=>n+i.length,0)}function Au(s,n){if(s[0].length===n)return s.shift();const i=new Uint8Array(n);let u=0;for(let c=0;c<n;c++)i[c]=s[0][u++],u===s[0].length&&(s.shift(),u=0);return s.length&&u<s[0].length&&(s[0]=s[0].slice(u)),i}function K_(s,n){go||(go=new TextDecoder);const i=[];let u=0,c=-1,f=!1;return new TransformStream({transform(h,y){for(i.push(h);;){if(u===0){if(Eu(i)<1)break;const p=Au(i,1);f=(p[0]&128)===128,c=p[0]&127,c<126?u=3:c===126?u=1:u=2}else if(u===1){if(Eu(i)<2)break;const p=Au(i,2);c=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),u=3}else if(u===2){if(Eu(i)<8)break;const p=Au(i,8),g=new DataView(p.buffer,p.byteOffset,p.length),b=g.getUint32(0);if(b>Math.pow(2,21)-1){y.enqueue(Ro);break}c=b*Math.pow(2,32)+g.getUint32(4),u=3}else{if(Eu(i)<c)break;const p=Au(i,c);y.enqueue(tf(f?p:go.decode(p),n)),u=0}if(c===0||c>s){y.enqueue(Ro);break}}}})}const rp=4;function Ie(s){if(s)return Y_(s)}function Y_(s){for(var n in Ie.prototype)s[n]=Ie.prototype[n];return s}Ie.prototype.on=Ie.prototype.addEventListener=function(s,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(n),this};Ie.prototype.once=function(s,n){function i(){this.off(s,i),n.apply(this,arguments)}return i.fn=n,this.on(s,i),this};Ie.prototype.off=Ie.prototype.removeListener=Ie.prototype.removeAllListeners=Ie.prototype.removeEventListener=function(s,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+s];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var u,c=0;c<i.length;c++)if(u=i[c],u===n||u.fn===n){i.splice(c,1);break}return i.length===0&&delete this._callbacks["$"+s],this};Ie.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),i=this._callbacks["$"+s],u=1;u<arguments.length;u++)n[u-1]=arguments[u];if(i){i=i.slice(0);for(var u=0,c=i.length;u<c;++u)i[u].apply(this,n)}return this};Ie.prototype.emitReserved=Ie.prototype.emit;Ie.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};Ie.prototype.hasListeners=function(s){return!!this.listeners(s).length};const Ku=typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,i)=>i(n,0),Wt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),G_="arraybuffer";function cp(s,...n){return n.reduce((i,u)=>(s.hasOwnProperty(u)&&(i[u]=s[u]),i),{})}const X_=Wt.setTimeout,Q_=Wt.clearTimeout;function Yu(s,n){n.useNativeTimers?(s.setTimeoutFn=X_.bind(Wt),s.clearTimeoutFn=Q_.bind(Wt)):(s.setTimeoutFn=Wt.setTimeout.bind(Wt),s.clearTimeoutFn=Wt.clearTimeout.bind(Wt))}const $_=1.33;function J_(s){return typeof s=="string"?W_(s):Math.ceil((s.byteLength||s.size)*$_)}function W_(s){let n=0,i=0;for(let u=0,c=s.length;u<c;u++)n=s.charCodeAt(u),n<128?i+=1:n<2048?i+=2:n<55296||n>=57344?i+=3:(u++,i+=4);return i}function op(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function F_(s){let n="";for(let i in s)s.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(s[i]));return n}function I_(s){let n={},i=s.split("&");for(let u=0,c=i.length;u<c;u++){let f=i[u].split("=");n[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return n}class P_ extends Error{constructor(n,i,u){super(n),this.description=i,this.context=u,this.type="TransportError"}}class nf extends Ie{constructor(n){super(),this.writable=!1,Yu(this,n),this.opts=n,this.query=n.query,this.socket=n.socket,this.supportsBinary=!n.forceBase64}onError(n,i,u){return super.emitReserved("error",new P_(n,i,u)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(n){this.readyState==="open"&&this.write(n)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(n){const i=tf(n,this.socket.binaryType);this.onPacket(i)}onPacket(n){super.emitReserved("packet",n)}onClose(n){this.readyState="closed",super.emitReserved("close",n)}pause(n){}createUri(n,i={}){return n+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const n=this.opts.hostname;return n.indexOf(":")===-1?n:"["+n+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(n){const i=F_(n);return i.length?"?"+i:""}}class e1 extends nf{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(n){this.readyState="pausing";const i=()=>{this.readyState="paused",n()};if(this._polling||!this.writable){let u=0;this._polling&&(u++,this.once("pollComplete",function(){--u||i()})),this.writable||(u++,this.once("drain",function(){--u||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(n){const i=u=>{if(this.readyState==="opening"&&u.type==="open"&&this.onOpen(),u.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(u)};H_(n,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const n=()=>{this.write([{type:"close"}])};this.readyState==="open"?n():this.once("open",n)}write(n){this.writable=!1,V_(n,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const n=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=op()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(n,i)}}let fp=!1;try{fp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const t1=fp;function n1(){}class a1 extends e1{constructor(n){if(super(n),typeof location<"u"){const i=location.protocol==="https:";let u=location.port;u||(u=i?"443":"80"),this.xd=typeof location<"u"&&n.hostname!==location.hostname||u!==n.port}}doWrite(n,i){const u=this.request({method:"POST",data:n});u.on("success",i),u.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(i,u)=>{this.onError("xhr poll error",i,u)}),this.pollXhr=n}}class mn extends Ie{constructor(n,i,u){super(),this.createRequest=n,Yu(this,u),this._opts=u,this._method=u.method||"GET",this._uri=i,this._data=u.data!==void 0?u.data:null,this._create()}_create(){var n;const i=cp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const u=this._xhr=this.createRequest(i);try{u.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){u.setDisableHeaderCheck&&u.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&u.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{u.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{u.setRequestHeader("Accept","*/*")}catch{}(n=this._opts.cookieJar)===null||n===void 0||n.addCookies(u),"withCredentials"in u&&(u.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(u.timeout=this._opts.requestTimeout),u.onreadystatechange=()=>{var c;u.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(u.getResponseHeader("set-cookie"))),u.readyState===4&&(u.status===200||u.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof u.status=="number"?u.status:0)},0))},u.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=mn.requestsCount++,mn.requests[this._index]=this)}_onError(n){this.emitReserved("error",n,this._xhr),this._cleanup(!0)}_cleanup(n){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=n1,n)try{this._xhr.abort()}catch{}typeof document<"u"&&delete mn.requests[this._index],this._xhr=null}}_onLoad(){const n=this._xhr.responseText;n!==null&&(this.emitReserved("data",n),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}mn.requestsCount=0;mn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Tm);else if(typeof addEventListener=="function"){const s="onpagehide"in Wt?"pagehide":"unload";addEventListener(s,Tm,!1)}}function Tm(){for(let s in mn.requests)mn.requests.hasOwnProperty(s)&&mn.requests[s].abort()}const i1=function(){const s=dp({xdomain:!1});return s&&s.responseType!==null}();class l1 extends a1{constructor(n){super(n);const i=n&&n.forceBase64;this.supportsBinary=i1&&!i}request(n={}){return Object.assign(n,{xd:this.xd},this.opts),new mn(dp,this.uri(),n)}}function dp(s){const n=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!n||t1))return new XMLHttpRequest}catch{}if(!n)try{return new Wt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const hp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class s1 extends nf{get name(){return"websocket"}doOpen(){const n=this.uri(),i=this.opts.protocols,u=hp?{}:cp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(u.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(n,i,u)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=n=>this.onClose({description:"websocket connection closed",context:n}),this.ws.onmessage=n=>this.onData(n.data),this.ws.onerror=n=>this.onError("websocket error",n)}write(n){this.writable=!1;for(let i=0;i<n.length;i++){const u=n[i],c=i===n.length-1;ef(u,this.supportsBinary,f=>{try{this.doWrite(u,f)}catch{}c&&Ku(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const n=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=op()),this.supportsBinary||(i.b64=1),this.createUri(n,i)}}const vo=Wt.WebSocket||Wt.MozWebSocket;class u1 extends s1{createSocket(n,i,u){return hp?new vo(n,i,u):i?new vo(n,i):new vo(n)}doWrite(n,i){this.ws.send(i)}}class r1 extends nf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(n){return this.emitReserved("error",n)}this._transport.closed.then(()=>{this.onClose()}).catch(n=>{this.onError("webtransport error",n)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(n=>{const i=K_(Number.MAX_SAFE_INTEGER,this.socket.binaryType),u=n.readable.pipeThrough(i).getReader(),c=L_();c.readable.pipeTo(n.writable),this._writer=c.writable.getWriter();const f=()=>{u.read().then(({done:y,value:p})=>{y||(this.onPacket(p),f())}).catch(y=>{})};f();const h={type:"open"};this.query.sid&&(h.data=`{"sid":"${this.query.sid}"}`),this._writer.write(h).then(()=>this.onOpen())})})}write(n){this.writable=!1;for(let i=0;i<n.length;i++){const u=n[i],c=i===n.length-1;this._writer.write(u).then(()=>{c&&Ku(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var n;(n=this._transport)===null||n===void 0||n.close()}}const c1={websocket:u1,webtransport:r1,polling:l1},o1=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,f1=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ko(s){if(s.length>8e3)throw"URI too long";const n=s,i=s.indexOf("["),u=s.indexOf("]");i!=-1&&u!=-1&&(s=s.substring(0,i)+s.substring(i,u).replace(/:/g,";")+s.substring(u,s.length));let c=o1.exec(s||""),f={},h=14;for(;h--;)f[f1[h]]=c[h]||"";return i!=-1&&u!=-1&&(f.source=n,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=d1(f,f.path),f.queryKey=h1(f,f.query),f}function d1(s,n){const i=/\/{2,9}/g,u=n.replace(i,"/").split("/");return(n.slice(0,1)=="/"||n.length===0)&&u.splice(0,1),n.slice(-1)=="/"&&u.splice(u.length-1,1),u}function h1(s,n){const i={};return n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,c,f){c&&(i[c]=f)}),i}const Mo=typeof addEventListener=="function"&&typeof removeEventListener=="function",wu=[];Mo&&addEventListener("offline",()=>{wu.forEach(s=>s())},!1);class ca extends Ie{constructor(n,i){if(super(),this.binaryType=G_,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,n&&typeof n=="object"&&(i=n,n=null),n){const u=ko(n);i.hostname=u.host,i.secure=u.protocol==="https"||u.protocol==="wss",i.port=u.port,u.query&&(i.query=u.query)}else i.host&&(i.hostname=ko(i.host).host);Yu(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(u=>{const c=u.prototype.name;this.transports.push(c),this._transportsByName[c]=u}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=I_(this.opts.query)),Mo&&(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"})},wu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(n){const i=Object.assign({},this.opts.query);i.EIO=rp,i.transport=n,this.id&&(i.sid=this.id);const u=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[n]);return new this._transportsByName[n](u)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const n=this.opts.rememberUpgrade&&ca.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(n);i.open(),this.setTransport(i)}setTransport(n){this.transport&&this.transport.removeAllListeners(),this.transport=n,n.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",ca.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",n),this.emitReserved("heartbeat"),n.type){case"open":this.onHandshake(JSON.parse(n.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=n.data,this._onError(i);break;case"message":this.emitReserved("data",n.data),this.emitReserved("message",n.data);break}}onHandshake(n){this.emitReserved("handshake",n),this.id=n.sid,this.transport.query.sid=n.sid,this._pingInterval=n.pingInterval,this._pingTimeout=n.pingTimeout,this._maxPayload=n.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const n=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+n,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},n),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 n=this._getWritablePackets();this.transport.send(n),this._prevBufferLen=n.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let u=0;u<this.writeBuffer.length;u++){const c=this.writeBuffer[u].data;if(c&&(i+=J_(c)),u>0&&i>this._maxPayload)return this.writeBuffer.slice(0,u);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const n=Date.now()>this._pingTimeoutTime;return n&&(this._pingTimeoutTime=0,Ku(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),n}write(n,i,u){return this._sendPacket("message",n,i,u),this}send(n,i,u){return this._sendPacket("message",n,i,u),this}_sendPacket(n,i,u,c){if(typeof i=="function"&&(c=i,i=void 0),typeof u=="function"&&(c=u,u=null),this.readyState==="closing"||this.readyState==="closed")return;u=u||{},u.compress=u.compress!==!1;const f={type:n,data:i,options:u};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const n=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),n()},u=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?u():n()}):this.upgrading?u():n()),this}_onError(n){if(ca.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",n),this._onClose("transport error",n)}_onClose(n,i){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(),Mo&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const u=wu.indexOf(this._offlineEventListener);u!==-1&&wu.splice(u,1)}this.readyState="closed",this.id=null,this.emitReserved("close",n,i),this.writeBuffer=[],this._prevBufferLen=0}}}ca.protocol=rp;class y1 extends ca{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let n=0;n<this._upgrades.length;n++)this._probe(this._upgrades[n])}_probe(n){let i=this.createTransport(n),u=!1;ca.priorWebsocketSuccess=!1;const c=()=>{u||(i.send([{type:"ping",data:"probe"}]),i.once("packet",w=>{if(!u)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;ca.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{u||this.readyState!=="closed"&&(b(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const z=new Error("probe error");z.transport=i.name,this.emitReserved("upgradeError",z)}}))};function f(){u||(u=!0,b(),i.close(),i=null)}const h=w=>{const z=new Error("probe error: "+w);z.transport=i.name,f(),this.emitReserved("upgradeError",z)};function y(){h("transport closed")}function p(){h("socket closed")}function g(w){i&&w.name!==i.name&&f()}const b=()=>{i.removeListener("open",c),i.removeListener("error",h),i.removeListener("close",y),this.off("close",p),this.off("upgrading",g)};i.once("open",c),i.once("error",h),i.once("close",y),this.once("close",p),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&n!=="webtransport"?this.setTimeoutFn(()=>{u||i.open()},200):i.open()}onHandshake(n){this._upgrades=this._filterUpgrades(n.upgrades),super.onHandshake(n)}_filterUpgrades(n){const i=[];for(let u=0;u<n.length;u++)~this.transports.indexOf(n[u])&&i.push(n[u]);return i}}let m1=class extends y1{constructor(n,i={}){const u=typeof n=="object"?n:i;(!u.transports||u.transports&&typeof u.transports[0]=="string")&&(u.transports=(u.transports||["polling","websocket","webtransport"]).map(c=>c1[c]).filter(c=>!!c)),super(n,u)}};function p1(s,n="",i){let u=s;i=i||typeof location<"u"&&location,s==null&&(s=i.protocol+"//"+i.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=i.protocol+s:s=i.host+s),/^(https?|wss?):\/\//.test(s)||(typeof i<"u"?s=i.protocol+"//"+s:s="https://"+s),u=ko(s)),u.port||(/^(http|ws)$/.test(u.protocol)?u.port="80":/^(http|ws)s$/.test(u.protocol)&&(u.port="443")),u.path=u.path||"/";const f=u.host.indexOf(":")!==-1?"["+u.host+"]":u.host;return u.id=u.protocol+"://"+f+":"+u.port+n,u.href=u.protocol+"://"+f+(i&&i.port===u.port?"":":"+u.port),u}const g1=typeof ArrayBuffer=="function",v1=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,yp=Object.prototype.toString,b1=typeof Blob=="function"||typeof Blob<"u"&&yp.call(Blob)==="[object BlobConstructor]",_1=typeof File=="function"||typeof File<"u"&&yp.call(File)==="[object FileConstructor]";function af(s){return g1&&(s instanceof ArrayBuffer||v1(s))||b1&&s instanceof Blob||_1&&s instanceof File}function Ru(s,n){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let i=0,u=s.length;i<u;i++)if(Ru(s[i]))return!0;return!1}if(af(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return Ru(s.toJSON(),!0);for(const i in s)if(Object.prototype.hasOwnProperty.call(s,i)&&Ru(s[i]))return!0;return!1}function S1(s){const n=[],i=s.data,u=s;return u.data=No(i,n),u.attachments=n.length,{packet:u,buffers:n}}function No(s,n){if(!s)return s;if(af(s)){const i={_placeholder:!0,num:n.length};return n.push(s),i}else if(Array.isArray(s)){const i=new Array(s.length);for(let u=0;u<s.length;u++)i[u]=No(s[u],n);return i}else if(typeof s=="object"&&!(s instanceof Date)){const i={};for(const u in s)Object.prototype.hasOwnProperty.call(s,u)&&(i[u]=No(s[u],n));return i}return s}function T1(s,n){return s.data=Co(s.data,n),delete s.attachments,s}function Co(s,n){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<n.length)return n[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let i=0;i<s.length;i++)s[i]=Co(s[i],n);else if(typeof s=="object")for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&(s[i]=Co(s[i],n));return s}const E1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],A1=5;var ve;(function(s){s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK"})(ve||(ve={}));class x1{constructor(n){this.replacer=n}encode(n){return(n.type===ve.EVENT||n.type===ve.ACK)&&Ru(n)?this.encodeAsBinary({type:n.type===ve.EVENT?ve.BINARY_EVENT:ve.BINARY_ACK,nsp:n.nsp,data:n.data,id:n.id}):[this.encodeAsString(n)]}encodeAsString(n){let i=""+n.type;return(n.type===ve.BINARY_EVENT||n.type===ve.BINARY_ACK)&&(i+=n.attachments+"-"),n.nsp&&n.nsp!=="/"&&(i+=n.nsp+","),n.id!=null&&(i+=n.id),n.data!=null&&(i+=JSON.stringify(n.data,this.replacer)),i}encodeAsBinary(n){const i=S1(n),u=this.encodeAsString(i.packet),c=i.buffers;return c.unshift(u),c}}function Em(s){return Object.prototype.toString.call(s)==="[object Object]"}class lf extends Ie{constructor(n){super(),this.reviver=n}add(n){let i;if(typeof n=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(n);const u=i.type===ve.BINARY_EVENT;u||i.type===ve.BINARY_ACK?(i.type=u?ve.EVENT:ve.ACK,this.reconstructor=new O1(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(af(n)||n.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(n),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+n)}decodeString(n){let i=0;const u={type:Number(n.charAt(0))};if(ve[u.type]===void 0)throw new Error("unknown packet type "+u.type);if(u.type===ve.BINARY_EVENT||u.type===ve.BINARY_ACK){const f=i+1;for(;n.charAt(++i)!=="-"&&i!=n.length;);const h=n.substring(f,i);if(h!=Number(h)||n.charAt(i)!=="-")throw new Error("Illegal attachments");u.attachments=Number(h)}if(n.charAt(i+1)==="/"){const f=i+1;for(;++i&&!(n.charAt(i)===","||i===n.length););u.nsp=n.substring(f,i)}else u.nsp="/";const c=n.charAt(i+1);if(c!==""&&Number(c)==c){const f=i+1;for(;++i;){const h=n.charAt(i);if(h==null||Number(h)!=h){--i;break}if(i===n.length)break}u.id=Number(n.substring(f,i+1))}if(n.charAt(++i)){const f=this.tryParse(n.substr(i));if(lf.isPayloadValid(u.type,f))u.data=f;else throw new Error("invalid payload")}return u}tryParse(n){try{return JSON.parse(n,this.reviver)}catch{return!1}}static isPayloadValid(n,i){switch(n){case ve.CONNECT:return Em(i);case ve.DISCONNECT:return i===void 0;case ve.CONNECT_ERROR:return typeof i=="string"||Em(i);case ve.EVENT:case ve.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&E1.indexOf(i[0])===-1);case ve.ACK:case ve.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class O1{constructor(n){this.packet=n,this.buffers=[],this.reconPack=n}takeBinaryData(n){if(this.buffers.push(n),this.buffers.length===this.reconPack.attachments){const i=T1(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const w1=Object.freeze(Object.defineProperty({__proto__:null,Decoder:lf,Encoder:x1,get PacketType(){return ve},protocol:A1},Symbol.toStringTag,{value:"Module"}));function tn(s,n,i){return s.on(n,i),function(){s.off(n,i)}}const R1=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class mp extends Ie{constructor(n,i,u){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=n,this.nsp=i,u&&u.auth&&(this.auth=u.auth),this._opts=Object.assign({},u),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const n=this.io;this.subs=[tn(n,"open",this.onopen.bind(this)),tn(n,"packet",this.onpacket.bind(this)),tn(n,"error",this.onerror.bind(this)),tn(n,"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(...n){return n.unshift("message"),this.emit.apply(this,n),this}emit(n,...i){var u,c,f;if(R1.hasOwnProperty(n))throw new Error('"'+n.toString()+'" is a reserved event name');if(i.unshift(n),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const h={type:ve.EVENT,data:i};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const b=this.ids++,w=i.pop();this._registerAckCallback(b,w),h.id=b}const y=(c=(u=this.io.engine)===null||u===void 0?void 0:u.transport)===null||c===void 0?void 0:c.writable,p=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!y||(p?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h)),this.flags={},this}_registerAckCallback(n,i){var u;const c=(u=this.flags.timeout)!==null&&u!==void 0?u:this._opts.ackTimeout;if(c===void 0){this.acks[n]=i;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[n];for(let y=0;y<this.sendBuffer.length;y++)this.sendBuffer[y].id===n&&this.sendBuffer.splice(y,1);i.call(this,new Error("operation has timed out"))},c),h=(...y)=>{this.io.clearTimeoutFn(f),i.apply(this,y)};h.withError=!0,this.acks[n]=h}emitWithAck(n,...i){return new Promise((u,c)=>{const f=(h,y)=>h?c(h):u(y);f.withError=!0,i.push(f),this.emit(n,...i)})}_addToQueue(n){let i;typeof n[n.length-1]=="function"&&(i=n.pop());const u={id:this._queueSeq++,tryCount:0,pending:!1,args:n,flags:Object.assign({fromQueue:!0},this.flags)};n.push((c,...f)=>u!==this._queue[0]?void 0:(c!==null?u.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(c)):(this._queue.shift(),i&&i(null,...f)),u.pending=!1,this._drainQueue())),this._queue.push(u),this._drainQueue()}_drainQueue(n=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!n||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(n){n.nsp=this.nsp,this.io._packet(n)}onopen(){typeof this.auth=="function"?this.auth(n=>{this._sendConnectPacket(n)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(n){this.packet({type:ve.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},n):n})}onerror(n){this.connected||this.emitReserved("connect_error",n)}onclose(n,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",n,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(n=>{if(!this.sendBuffer.some(u=>String(u.id)===n)){const u=this.acks[n];delete this.acks[n],u.withError&&u.call(this,new Error("socket has been disconnected"))}})}onpacket(n){if(n.nsp===this.nsp)switch(n.type){case ve.CONNECT:n.data&&n.data.sid?this.onconnect(n.data.sid,n.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 ve.EVENT:case ve.BINARY_EVENT:this.onevent(n);break;case ve.ACK:case ve.BINARY_ACK:this.onack(n);break;case ve.DISCONNECT:this.ondisconnect();break;case ve.CONNECT_ERROR:this.destroy();const u=new Error(n.data.message);u.data=n.data.data,this.emitReserved("connect_error",u);break}}onevent(n){const i=n.data||[];n.id!=null&&i.push(this.ack(n.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(n){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const u of i)u.apply(this,n)}super.emit.apply(this,n),this._pid&&n.length&&typeof n[n.length-1]=="string"&&(this._lastOffset=n[n.length-1])}ack(n){const i=this;let u=!1;return function(...c){u||(u=!0,i.packet({type:ve.ACK,id:n,data:c}))}}onack(n){const i=this.acks[n.id];typeof i=="function"&&(delete this.acks[n.id],i.withError&&n.data.unshift(null),i.apply(this,n.data))}onconnect(n,i){this.id=n,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(n=>this.emitEvent(n)),this.receiveBuffer=[],this.sendBuffer.forEach(n=>{this.notifyOutgoingListeners(n),this.packet(n)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(n=>n()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ve.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(n){return this.flags.compress=n,this}get volatile(){return this.flags.volatile=!0,this}timeout(n){return this.flags.timeout=n,this}onAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(n),this}prependAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(n),this}offAny(n){if(!this._anyListeners)return this;if(n){const i=this._anyListeners;for(let u=0;u<i.length;u++)if(n===i[u])return i.splice(u,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(n),this}prependAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(n),this}offAnyOutgoing(n){if(!this._anyOutgoingListeners)return this;if(n){const i=this._anyOutgoingListeners;for(let u=0;u<i.length;u++)if(n===i[u])return i.splice(u,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(n){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const u of i)u.apply(this,n.data)}}}function Bi(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}Bi.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),i=Math.floor(n*this.jitter*s);s=(Math.floor(n*10)&1)==0?s-i:s+i}return Math.min(s,this.max)|0};Bi.prototype.reset=function(){this.attempts=0};Bi.prototype.setMin=function(s){this.ms=s};Bi.prototype.setMax=function(s){this.max=s};Bi.prototype.setJitter=function(s){this.jitter=s};class Do extends Ie{constructor(n,i){var u;super(),this.nsps={},this.subs=[],n&&typeof n=="object"&&(i=n,n=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Yu(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((u=i.randomizationFactor)!==null&&u!==void 0?u:.5),this.backoff=new Bi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=n;const c=i.parser||w1;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(n){return arguments.length?(this._reconnection=!!n,n||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(n){return n===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=n,this)}reconnectionDelay(n){var i;return n===void 0?this._reconnectionDelay:(this._reconnectionDelay=n,(i=this.backoff)===null||i===void 0||i.setMin(n),this)}randomizationFactor(n){var i;return n===void 0?this._randomizationFactor:(this._randomizationFactor=n,(i=this.backoff)===null||i===void 0||i.setJitter(n),this)}reconnectionDelayMax(n){var i;return n===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=n,(i=this.backoff)===null||i===void 0||i.setMax(n),this)}timeout(n){return arguments.length?(this._timeout=n,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(n){if(~this._readyState.indexOf("open"))return this;this.engine=new m1(this.uri,this.opts);const i=this.engine,u=this;this._readyState="opening",this.skipReconnect=!1;const c=tn(i,"open",function(){u.onopen(),n&&n()}),f=y=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",y),n?n(y):this.maybeReconnectOnOpen()},h=tn(i,"error",f);if(this._timeout!==!1){const y=this._timeout,p=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),i.close()},y);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(c),this.subs.push(h),this}connect(n){return this.open(n)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const n=this.engine;this.subs.push(tn(n,"ping",this.onping.bind(this)),tn(n,"data",this.ondata.bind(this)),tn(n,"error",this.onerror.bind(this)),tn(n,"close",this.onclose.bind(this)),tn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(n){try{this.decoder.add(n)}catch(i){this.onclose("parse error",i)}}ondecoded(n){Ku(()=>{this.emitReserved("packet",n)},this.setTimeoutFn)}onerror(n){this.emitReserved("error",n)}socket(n,i){let u=this.nsps[n];return u?this._autoConnect&&!u.active&&u.connect():(u=new mp(this,n,i),this.nsps[n]=u),u}_destroy(n){const i=Object.keys(this.nsps);for(const u of i)if(this.nsps[u].active)return;this._close()}_packet(n){const i=this.encoder.encode(n);for(let u=0;u<i.length;u++)this.engine.write(i[u],n.options)}cleanup(){this.subs.forEach(n=>n()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(n,i){var u;this.cleanup(),(u=this.engine)===null||u===void 0||u.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",n,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const n=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const u=this.setTimeoutFn(()=>{n.skipReconnect||(this.emitReserved("reconnect_attempt",n.backoff.attempts),!n.skipReconnect&&n.open(c=>{c?(n._reconnecting=!1,n.reconnect(),this.emitReserved("reconnect_error",c)):n.onreconnect()}))},i);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}}onreconnect(){const n=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",n)}}const Bl={};function ku(s,n){typeof s=="object"&&(n=s,s=void 0),n=n||{};const i=p1(s,n.path||"/socket.io"),u=i.source,c=i.id,f=i.path,h=Bl[c]&&f in Bl[c].nsps,y=n.forceNew||n["force new connection"]||n.multiplex===!1||h;let p;return y?p=new Do(u,n):(Bl[c]||(Bl[c]=new Do(u,n)),p=Bl[c]),i.query&&!n.query&&(n.query=i.queryKey),p.socket(i.path,n)}Object.assign(ku,{Manager:Do,Socket:mp,io:ku,connect:ku});const k1=["123","321","abc","admin","adobe","alexander","amanda","andrea","andrew","angel","apple","asdf","ashley","baby","banana","baseball","batman","bear","biteme","blazer","blonde","boston","buster","butterfly","cameron","charlie","cheese","chelsea","chicken","chocolate","chris","compaq","computer","cookie","corvette","cowboys","dakota","dallas","daniel","david","diamond","dolphin","donald","dragon","eagle","flower","football","frank","freedom","friend","gateway","george","ginger","god","golf","hannah","hardcore","harley","heather","hello","hottie","hunter","internet","jasmine","jennifer","jessica","jesus","johnny","jordan","joshua","justin","justme","killer","knight","lakers","letmein","liverpool","login","london","love","lucky","mackenzie","maggie","master","matrix","matthew","maverick","melissa","mercedes","michael","michelle","mickey","miller","money","monkey","morgan","mother","muffin","mustang","natasha","nathan","nicole","ninja","orange","pass","password","patrick","peanut","pepper","phoenix","photoshop","pokemon","princess","purple","qazwsx","qwerty","rainbow","ranger","root","samantha","samsung","scooter","secret","shadow","simpson","smile","soccer","sparkle","starwars","summer","sunflower","sunshine","superman","taylor","temp","test","thomas","tigers","tigger","tinkerbell","trust","turtle","victoria","welcome","whatever","william","winter","yellow","zaq12wsx","zxcvbn"],M1=3,N1=15,C1=/^[a-zA-Z0-9_-]+$/,sf=Re.string().min(M1).max(N1).regex(C1),Am=20,xm={0:"o",1:"l",3:"e",4:"a",5:"s",7:"t","@":"a",$:"s","!":"i"};function D1(s){let n="";for(const i of s)i in xm?n+=xm[i]:n+=i;return n}function z1(s){const n=s.toLocaleLowerCase(),i=D1(n);for(const u of k1)if(i.includes(u)||n.includes(u))return!0;return!1}function U1(s){const n=new Set(s).size;return s.length*Math.log2(n)}function j1(s){let n=0;return z1(s)&&(n-=100),n+=U1(s)*.5,Math.max(n,0)}const uf=Re.string().refine(s=>j1(s)>=Am,{message:`Password does not meet the minimum complexity of ${Am}.`}).brand("password");Re.object({username:sf,password:uf}).strict();const pp=Re.string().email().brand("email");Re.object({username:sf,password:uf,email:pp}).strict();var B1={};function q1(s,n){const i={},u=[];for(const c in s){const f=s[c],h=n[c],y=f["~standard"].validate(h);if(y instanceof Promise)throw new Error(`Validation must be synchronous, but ${c} returned a Promise.`);if(y.issues){u.push(...y.issues.map(p=>({...p,path:[c,...p.path??[]]})));continue}i[c]=y.value}return u.length?{issues:u}:{value:i}}function Z1(s){const n=s.runtimeEnvStrict??s.runtimeEnv??B1;for(const[ye,Se]of Object.entries(n))Se===""&&delete n[ye];if(!!s.skipValidation)return n;const u=typeof s.client=="object"?s.client:{},c=typeof s.server=="object"?s.server:{},f=typeof s.shared=="object"?s.shared:{},h=s.isServer??(typeof window>"u"||"Deno"in window),y=h?{...c,...f,...u}:{...u,...f},p=q1(y,n),g=s.onValidationError??(ye=>{throw console.error("❌ Invalid environment variables:",ye),new Error("Invalid environment variables")}),b=s.onInvalidAccess??(()=>{throw new Error("❌ Attempted to access a server-side environment variable on the client")});if(p.issues)return g(p.issues);const w=ye=>s.clientPrefix?!ye.startsWith(s.clientPrefix)&&!(ye in f):!0,z=ye=>h||!w(ye),B=ye=>ye==="__esModule"||ye==="$$typeof",Q=(s.extends??[]).reduce((ye,Se)=>Object.assign(ye,Se),{}),K=Object.assign(p.value,Q);return new Proxy(K,{get(ye,Se){if(typeof Se=="string"&&!B(Se))return z(Se)?Reflect.get(ye,Se):b(Se)}})}const V1={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BACKEND_ORIGIN:"https://realtime.tempest.games"},H1="__vite_start_time"in globalThis,L1=typeof window<"u",rf=Z1({isServer:!H1&&!L1,server:{CI:Re.string().transform(s=>!0).optional(),POSTGRES_USER:Re.string(),POSTGRES_PASSWORD:Re.string(),POSTGRES_DATABASE:Re.string(),POSTGRES_HOST:Re.string(),POSTGRES_PORT:Re.string().transform(s=>Number.parseInt(s,10)),BACKEND_PORT:Re.string().transform(s=>Number.parseInt(s,10)),RUN_WORKERS_FROM_SOURCE:Re.union([Re.literal("true"),Re.literal("false")]).optional().transform(s=>s==="true"),FRONTEND_PORT:Re.string().transform(s=>Number.parseInt(s,10)),FRONTEND_ORIGINS:Re.string().transform(s=>JSON.parse(s)).pipe(Re.array(Re.string())),OPENAI_API_KEY:Re.string().optional()},clientPrefix:"VITE_",client:{VITE_BACKEND_ORIGIN:Re.string(),VITE_USE_SELF_SIGNED_CERTIFICATE:Re.union([Re.literal("true"),Re.literal("false")]).optional().transform(s=>s==="true")},runtimeEnv:V1}),cf=ku(rf.VITE_BACKEND_ORIGIN,{auth:s=>{const n=_o(zi);n&&s(n)},autoConnect:!1}).on("connect",()=>{console.log("connected")}).on("connect_error",()=>{console.log("connect_error"),Zo(zi,null)}),zi=Vt({key:"auth",default:null,effects:[({onSet:s})=>{s(({newValue:n})=>{n?(localStorage.setItem("username",n.username),localStorage.setItem("sessionKey",n.sessionKey),console.log("connecting..."),cf.connect()):(console.log("clearing session..."),localStorage.removeItem("sessionKey"))})},({setSelf:s})=>{const n=localStorage.getItem("username"),i=localStorage.getItem("sessionKey");n&&i&&s({username:n,sessionKey:i})}]}),ns=Vt({key:"username",default:window.localStorage.getItem("username")??""}),gp=qa({key:"usernameIssues",get:({get:s})=>{const n=s(ns),i=sf.safeParse(n);return i.success?null:i.error.issues}}),Ui=Vt({key:"password0",default:""}),vp=qa({key:"password0Issues",get:({get:s})=>{const n=s(Ui),i=uf.safeParse(n);return i.success?null:i.error.issues}}),zo=Vt({key:"password1",default:""}),bp=qa({key:"password1Issues",get:({get:s})=>{const n=s(Ui),i=s(zo),u=Re.string().refine(c=>c===n,{message:"Passwords do not match."}).safeParse(i);return u.success?null:u.error.issues}}),Uo=Vt({key:"email",default:""}),_p=qa({key:"emailIssues",get:({get:s})=>{const n=s(Uo),i=pp.safeParse(n);return i.success?null:i.error.issues}}),K1=qa({key:"signupReady",get:({get:s})=>{const n=s(gp),i=s(vp),u=s(bp),c=s(_p);return!(n??i??u??c)}}),Sp=D_({login:null,sign_up:null,game:z_({clicker:null}),admin:null});function Y1(s){return U_(Sp,s)}const G1=[["login"],["sign_up"]];function X1(s){return G1.some(n=>n.join("/")===s.join("/"))}function Tp(s){history.pushState(null,"",s),Zo(Ep,s)}const Ep=Vt({key:"pathName",default:window.location.pathname,effects:[({onSet:s,setSelf:n})=>{const i=c=>{history.replaceState(null,"",c),n(c)},u=c=>{switch(c){case"/":{const f=_o(zi);let h="/login";f&&(h="/game"),i(h);break}case"/login":case"/sign_up":{_o(zi)&&i("/game");break}}};u(window.location.pathname),s(({newValue:c})=>{u(c)})},({setSelf:s})=>{document.addEventListener("click",n=>{const i=n.target.closest("a");if(i&&i instanceof HTMLAnchorElement){const u=i.getAttribute("href");u!=null&&u.startsWith("/")&&(n.preventDefault(),history.pushState(null,"",u),s(u))}}),window.addEventListener("popstate",()=>{s(window.location.pathname)})}]}),Q1=qa({key:"route",get:({get:s})=>{const i=s(Ep).split("/").slice(1);return Y1(i)?X1(i)||s(zi)?i:401:404}});function $1(){return q.jsx("article",{children:q.jsx("h1",{children:"admin"})})}class J1 extends Map{set(n,i){return this.has(n)?(console.warn("Tried to set a key that already exists in an InvariantMap",{key:n,value:i}),this):super.set(n,i)}clear(){throw new Error("Cannot clear an InvariantMap")}}const Hl=class Hl{constructor(n){j(this,"type","continuity");j(this,"globals",[]);j(this,"actions",[]);j(this,"perspectives",[]);j(this,"key");this.key=n}static create(n,i){const u=new Hl(n),{type:c,globals:f,actions:h,perspectives:y}=i(u),p={type:c,key:n,globals:f,actions:h,perspectives:y};return Hl.existing.set(n,p),p}add(...n){switch(n[0].type){case"atom":case"mutable_atom":this.globals.push(...n);break;case"transaction":this.actions.push(...n);break;case"atom_family":case"mutable_atom_family":{const[u,c]=n;this.perspectives.push({type:"realtime_perspective",resourceAtoms:u,viewAtoms:c})}break}return this}};j(Hl,"existing",new J1);let jo=Hl;function W1(s){const{key:n,config:i}=s,u=jo.create(n,i),{actions:c}=u;for(const f of c)zm(Pe.STORE,n,f.key);return Ko(Pe.STORE,n,-1),u}Vt({key:"usersInRoomIndex",mutable:!0,default:()=>new hn,toJson:s=>s.toJSON(),fromJson:s=>hn.fromJSON(s)});Vt({key:"roomIndex",default:()=>new hn,mutable:!0,toJson:s=>s.toJSON(),fromJson:s=>hn.fromJSON(s)});const F1={enteredAtEpoch:0},I1=a0({key:"usersInRooms",between:["room","user"],cardinality:"1:n",isAType:s=>typeof s=="string",isBType:s=>typeof s=="string"},F1);c0({key:"usersInMyRoomView",get:s=>({find:n})=>{const i=i0(I1);return[n(i,s)]}});const of=Vt({key:"count",default:0}),Ap=N0({key:"incrementTX",do:({set:s})=>{s(of,n=>n+1)}}),P1=W1({key:"countContinuity",config:s=>s.add(of).add(Ap)});function eS({route:[s]}){return q.jsx("article",{children:s?q.jsx(nS,{gameId:s}):q.jsx(tS,{})})}function tS(){return q.jsx("nav",{children:q.jsx(Lu,{href:"/game/clicker",children:"Clicker"})})}Rm(Sp[1].game[1]);function nS({gameId:s}){console.log(s);const n=qt(of),i=C0(Ap);return yb(P1),q.jsxs("article",{children:[q.jsxs("button",{type:"button",onClick:()=>{i()},children:["count is ",n]}),q.jsx("p",{children:"Let's see how high we can count!"})]})}async function aS(s,n="SHA-256"){const u=new TextEncoder().encode(s),c=await crypto.subtle.digest(n,u);return Array.from(new Uint8Array(c)).map(h=>h.toString(16).padStart(2,"0")).join("")}async function xp(s){const n=await aS(s);return`${n.substring(0,8)}-${n.substring(8,12)}-${n.substring(12,16)}-${n.substring(16,20)}-${n.substring(20,32)}`}function iS(){const s=Ca(ns),n=Ca(Ui),i=qt(ns),u=qt(Ui),[c,f]=ot.useState(null);return q.jsxs("form",{onSubmit:async h=>{h.preventDefault();const y=await xp("login"),p=await fetch(`${rf.VITE_BACKEND_ORIGIN}/login-${y}`,{method:"POST",body:JSON.stringify({username:i,password:u})});if(console.log(p),p.status===200){s(""),n("");const g=await p.text(),[,b]=g.split(" ");Zo(zi,{username:i,sessionKey:b}),cf.once("connect",()=>{Tp("/game")})}if(p.status>=400){const g=await p.text();f(g)}},children:[q.jsxs("main",{children:[c?q.jsx("aside",{children:c}):null,q.jsxs("label",{htmlFor:"username",children:[q.jsx("span",{children:"Username"}),q.jsx("input",{id:"username",type:"text",value:i,onChange:h=>{s(h.target.value)},autoComplete:"username",autoCapitalize:"none"})]}),q.jsxs("label",{htmlFor:"password",children:[q.jsx("span",{children:"Password"}),q.jsx("input",{id:"password",type:"password",value:u,onChange:h=>{n(h.target.value)},autoComplete:"current-password",autoCapitalize:"none"})]}),q.jsx("button",{type:"submit",disabled:!i||!u,children:"->"})]}),q.jsx("footer",{children:q.jsxs(Lu,{href:"/sign_up",children:["New here? ",q.jsx("u",{children:"Sign up"})," for an account."]})})]})}function lS(){const s=Ca(ns),n=Ca(Ui),i=Ca(zo),u=Ca(Uo),c=qt(ns),f=qt(Ui),h=qt(zo),y=qt(Uo),p=qt(gp),g=qt(vp),b=qt(bp),w=qt(_p),z=qt(K1),[B,Q]=ot.useState(null);return q.jsxs("form",{onSubmit:async K=>{K.preventDefault();const oe=f,ye=await xp("sign-up"),Se=await fetch(`${rf.VITE_BACKEND_ORIGIN}/sign-up-${ye}`,{method:"POST",body:JSON.stringify({username:c,password:oe,email:y})});if(Se.status===201&&(i(""),u(""),Tp("/login")),Se.status>=400){const Ue=await Se.text();Q(Ue)}},children:[q.jsxs("main",{children:[B?q.jsx("aside",{children:B}):null,q.jsxs("label",{htmlFor:"username",children:[q.jsx("span",{children:"Username"}),q.jsx("input",{id:"username",type:"text",value:c,onChange:K=>{s(K.target.value)},autoComplete:"username",autoCapitalize:"none",style:{"--energy-color":c?p?"red":"green":void 0}}),c&&p?q.jsx("aside",{children:p.map(K=>q.jsx("span",{children:K.message},K.path.join(".")))}):null]}),q.jsxs("label",{htmlFor:"password",children:[q.jsx("span",{children:"Password"}),q.jsx("input",{id:"password0",type:"password",value:f,onChange:K=>{n(K.target.value)},autoComplete:"new-password",autoCapitalize:"none",style:{"--energy-color":f?g?"red":"green":void 0}}),f&&g?q.jsx("aside",{children:g.map(K=>q.jsx("span",{children:K.message},K.path.join(".")))}):null]}),q.jsxs("label",{htmlFor:"password",children:[q.jsx("span",{children:"Confirm Password"}),q.jsx("input",{id:"password1",type:"password",value:h,onChange:K=>{i(K.target.value)},autoComplete:"new-password",autoCapitalize:"none",style:{"--energy-color":h?b?"red":"green":void 0}}),h&&b?q.jsx("aside",{children:b.map(K=>q.jsx("span",{children:K.message},K.path.join(".")))}):null]}),q.jsxs("label",{htmlFor:"email",children:[q.jsx("span",{children:"Email"}),q.jsx("input",{id:"email",type:"email",value:y,onChange:K=>{u(K.target.value)},autoComplete:"email",autoCapitalize:"none",style:{"--energy-color":y?w?"red":"green":void 0}}),y&&w?q.jsx("aside",{children:w.map(K=>q.jsx("span",{children:K.message},K.path.join(".")))}):null]}),q.jsx("button",{type:"submit",disabled:!z,children:"->"})]}),q.jsx("footer",{children:q.jsxs(Lu,{href:"/login",children:["Already have an account? ",q.jsx("u",{children:"Log in"})," instead."]})})]})}function sS(){const s=qt(Q1);return q.jsxs("main",{className:C_.class,children:[q.jsx("header",{children:q.jsx(N_,{})}),q.jsx("main",{children:typeof s=="number"?q.jsxs("article",{children:[q.jsx("h1",{children:s}),q.jsx("h2",{children:np[s]}),q.jsx(Lu,{href:"/login",children:"Return to Home Page"})]}):(()=>{const[n,...i]=s;switch(n){case"admin":return q.jsx($1,{});case"login":return q.jsx(iS,{});case"sign_up":return q.jsx(lS,{});case"game":return q.jsx(eS,{route:i})}})()})]})}Sb.createRoot(document.getElementById("root")).render(q.jsx(ot.StrictMode,{children:q.jsx(rb,{socket:cf,children:q.jsx(sS,{})})}));