@tyanxie/paimon-darwin-arm64 1.1.0 → 1.3.0
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,270 @@
|
|
|
1
|
+
var zv=Object.defineProperty;var Lv=(n,l,i)=>l in n?zv(n,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[l]=i;var Qm=(n,l,i)=>Lv(n,typeof l!="symbol"?l+"":l,i);import{f as Nf,r as b,R as ju,g as h0,j as y,a as Dv,p as wi,o as kv,h as Uv,s as Bv,b as wu,m as Ou,e as Hv,M as qv,c as Yv,d as Vv}from"./markdown-Cx3yqksU.js";(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))u(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&u(d)}).observe(document,{childList:!0,subtree:!0});function i(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function u(s){if(s.ep)return;s.ep=!0;const c=i(s);fetch(s.href,c)}})();var jc={exports:{}},Oi={},wc={exports:{}},Oc={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* scheduler.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 Zm;function Gv(){return Zm||(Zm=1,(function(n){function l(M,H){var I=M.length;M.push(H);e:for(;0<I;){var Z=I-1>>>1,W=M[Z];if(0<s(W,H))M[Z]=H,M[I]=W,I=Z;else break e}}function i(M){return M.length===0?null:M[0]}function u(M){if(M.length===0)return null;var H=M[0],I=M.pop();if(I!==H){M[0]=I;e:for(var Z=0,W=M.length,Y=W>>>1;Z<Y;){var P=2*(Z+1)-1,ne=M[P],de=P+1,fe=M[de];if(0>s(ne,I))de<W&&0>s(fe,ne)?(M[Z]=fe,M[de]=I,Z=de):(M[Z]=ne,M[P]=I,Z=P);else if(de<W&&0>s(fe,I))M[Z]=fe,M[de]=I,Z=de;else break e}}return H}function s(M,H){var I=M.sortIndex-H.sortIndex;return I!==0?I:M.id-H.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var p=[],m=[],v=1,x=null,E=3,C=!1,N=!1,w=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function U(M){for(var H=i(m);H!==null;){if(H.callback===null)u(m);else if(H.startTime<=M)u(m),H.sortIndex=H.expirationTime,l(p,H);else break;H=i(m)}}function X(M){if(w=!1,U(M),!N)if(i(p)!==null)N=!0,Q||(Q=!0,ee());else{var H=i(m);H!==null&&re(X,H.startTime-M)}}var Q=!1,F=-1,K=5,q=-1;function J(){return T?!0:!(n.unstable_now()-q<K)}function oe(){if(T=!1,Q){var M=n.unstable_now();q=M;var H=!0;try{e:{N=!1,w&&(w=!1,j(F),F=-1),C=!0;var I=E;try{t:{for(U(M),x=i(p);x!==null&&!(x.expirationTime>M&&J());){var Z=x.callback;if(typeof Z=="function"){x.callback=null,E=x.priorityLevel;var W=Z(x.expirationTime<=M);if(M=n.unstable_now(),typeof W=="function"){x.callback=W,U(M),H=!0;break t}x===i(p)&&u(p),U(M)}else u(p);x=i(p)}if(x!==null)H=!0;else{var Y=i(m);Y!==null&&re(X,Y.startTime-M),H=!1}}break e}finally{x=null,E=I,C=!1}H=void 0}}finally{H?ee():Q=!1}}}var ee;if(typeof z=="function")ee=function(){z(oe)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,te=le.port2;le.port1.onmessage=oe,ee=function(){te.postMessage(null)}}else ee=function(){R(oe,0)};function re(M,H){F=R(function(){M(n.unstable_now())},H)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(M){switch(E){case 1:case 2:case 3:var H=3;break;default:H=E}var I=E;E=H;try{return M()}finally{E=I}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(M,H){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var I=E;E=M;try{return H()}finally{E=I}},n.unstable_scheduleCallback=function(M,H,I){var Z=n.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?Z+I:Z):I=Z,M){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=I+W,M={id:v++,callback:H,priorityLevel:M,startTime:I,expirationTime:W,sortIndex:-1},I>Z?(M.sortIndex=I,l(m,M),i(p)===null&&M===i(m)&&(w?(j(F),F=-1):w=!0,re(X,I-Z))):(M.sortIndex=W,l(p,M),N||C||(N=!0,Q||(Q=!0,ee()))),M},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(M){var H=E;return function(){var I=E;E=H;try{return M.apply(this,arguments)}finally{E=I}}}})(Oc)),Oc}var Jm;function Fv(){return Jm||(Jm=1,wc.exports=Gv()),wc.exports}var Rc={exports:{}},lt={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-dom.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Im;function $v(){if(Im)return lt;Im=1;var n=Nf();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+m+" 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(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(p,m,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:p,containerInfo:m,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,lt.createPortal=function(p,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return c(p,m,null,v)},lt.flushSync=function(p){var m=d.T,v=u.p;try{if(d.T=null,u.p=2,p)return p()}finally{d.T=m,u.p=v,u.d.f()}},lt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,u.d.C(p,m))},lt.prefetchDNS=function(p){typeof p=="string"&&u.d.D(p)},lt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,x=h(v,m.crossOrigin),E=typeof m.integrity=="string"?m.integrity:void 0,C=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?u.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:E,fetchPriority:C}):v==="script"&&u.d.X(p,{crossOrigin:x,integrity:E,fetchPriority:C,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},lt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=h(m.as,m.crossOrigin);u.d.M(p,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&u.d.M(p)},lt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,x=h(v,m.crossOrigin);u.d.L(p,v,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},lt.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=h(m.as,m.crossOrigin);u.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else u.d.m(p)},lt.requestFormReset=function(p){u.d.r(p)},lt.unstable_batchedUpdates=function(p,m){return p(m)},lt.useFormState=function(p,m,v){return d.H.useFormState(p,m,v)},lt.useFormStatus=function(){return d.H.useHostTransitionStatus()},lt.version="19.2.6",lt}var Wm;function p0(){if(Wm)return Rc.exports;Wm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Rc.exports=$v(),Rc.exports}/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react-dom-client.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Pm;function Kv(){if(Pm)return Oi;Pm=1;var n=Fv(),l=Nf(),i=p0();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 s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(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 d(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 h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(c(e)!==e)throw Error(u(188))}function m(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,r=t;;){var o=a.return;if(o===null)break;var f=o.alternate;if(f===null){if(r=o.return,r!==null){a=r;continue}break}if(o.child===f.child){for(f=o.child;f;){if(f===a)return p(o),e;if(f===r)return p(o),t;f=f.sibling}throw Error(u(188))}if(a.return!==r.return)a=o,r=f;else{for(var g=!1,S=o.child;S;){if(S===a){g=!0,a=o,r=f;break}if(S===r){g=!0,r=o,a=f;break}S=S.sibling}if(!g){for(S=f.child;S;){if(S===a){g=!0,a=f,r=o;break}if(S===r){g=!0,r=f,a=o;break}S=S.sibling}if(!g)throw Error(u(189))}}if(a.alternate!==r)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,E=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),z=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case X:return"Suspense";case Q:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case z:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case U:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var re=Array.isArray,M=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},Z=[],W=-1;function Y(e){return{current:e}}function P(e){0>W||(e.current=Z[W],Z[W]=null,W--)}function ne(e,t){W++,Z[W]=e.current,e.current=t}var de=Y(null),fe=Y(null),Ae=Y(null),ut=Y(null);function Xt(e,t){switch(ne(Ae,t),ne(fe,e),ne(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ym(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ym(t),e=xm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(de),ne(de,e)}function ln(){P(de),P(fe),P(Ae)}function _l(e){e.memoizedState!==null&&ne(ut,e);var t=de.current,a=xm(t,e.type);t!==a&&(ne(fe,e),ne(de,a))}function Ma(e){fe.current===e&&(P(de),P(fe)),ut.current===e&&(P(ut),Ni._currentValue=I)}var za,rr;function Qt(e){if(za===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);za=t&&t[1]||"",rr=-1<a.stack.indexOf(`
|
|
26
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
27
|
+
`+za+e+rr}var Ml=!1;function sa(e,t){if(!e||Ml)return"";Ml=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(B){var k=B}Reflect.construct(e,[],$)}else{try{$.call()}catch(B){k=B}e.call($.prototype)}}else{try{throw Error()}catch(B){k=B}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(B){if(B&&k&&typeof B.stack=="string")return[B.stack,k.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=r.DetermineComponentFrameRoot(),g=f[0],S=f[1];if(g&&S){var A=g.split(`
|
|
28
|
+
`),D=S.split(`
|
|
29
|
+
`);for(o=r=0;r<A.length&&!A[r].includes("DetermineComponentFrameRoot");)r++;for(;o<D.length&&!D[o].includes("DetermineComponentFrameRoot");)o++;if(r===A.length||o===D.length)for(r=A.length-1,o=D.length-1;1<=r&&0<=o&&A[r]!==D[o];)o--;for(;1<=r&&0<=o;r--,o--)if(A[r]!==D[o]){if(r!==1||o!==1)do if(r--,o--,0>o||A[r]!==D[o]){var V=`
|
|
30
|
+
`+A[r].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=r&&0<=o);break}}}finally{Ml=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Qt(a):""}function hs(e,t){switch(e.tag){case 26:case 27:case 5:return Qt(e.type);case 16:return Qt("Lazy");case 13:return e.child!==t&&t!==null?Qt("Suspense Fallback"):Qt("Suspense");case 19:return Qt("SuspenseList");case 0:case 15:return sa(e.type,!1);case 11:return sa(e.type.render,!1);case 1:return sa(e.type,!0);case 31:return Qt("Activity");default:return""}}function ur(e){try{var t="",a=null;do t+=hs(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
|
|
31
|
+
Error generating stack: `+r.message+`
|
|
32
|
+
`+r.stack}}var zl=Object.prototype.hasOwnProperty,Ll=n.unstable_scheduleCallback,sr=n.unstable_cancelCallback,or=n.unstable_shouldYield,Ne=n.unstable_requestPaint,ze=n.unstable_now,La=n.unstable_getCurrentPriorityLevel,oa=n.unstable_ImmediatePriority,Da=n.unstable_UserBlockingPriority,ka=n.unstable_NormalPriority,cr=n.unstable_LowPriority,Dl=n.unstable_IdlePriority,m1=n.log,g1=n.unstable_setDisableYieldValue,kl=null,bt=null;function Mn(e){if(typeof m1=="function"&&g1(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(kl,e)}catch{}}var St=Math.clz32?Math.clz32:v1,y1=Math.log,x1=Math.LN2;function v1(e){return e>>>=0,e===0?32:31-(y1(e)/x1|0)|0}var fr=256,dr=262144,hr=4194304;function ca(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:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;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 pr(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var o=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~f,r!==0?o=ca(r):(g&=S,g!==0?o=ca(g):a||(a=S&~e,a!==0&&(o=ca(a))))):(S=r&~f,S!==0?o=ca(S):g!==0?o=ca(g):a||(a=r&~e,a!==0&&(o=ca(a)))),o===0?0:t!==0&&t!==o&&(t&f)===0&&(f=o&-o,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:o}function Ul(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function b1(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 Wf(){var e=hr;return hr<<=1,(hr&62914560)===0&&(hr=4194304),e}function ps(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Bl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function S1(e,t,a,r,o,f){var g=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 S=e.entanglements,A=e.expirationTimes,D=e.hiddenUpdates;for(a=g&~a;0<a;){var V=31-St(a),$=1<<V;S[V]=0,A[V]=-1;var k=D[V];if(k!==null)for(D[V]=null,V=0;V<k.length;V++){var B=k[V];B!==null&&(B.lane&=-536870913)}a&=~$}r!==0&&Pf(e,r,0),f!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function Pf(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-St(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function ed(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-St(a),o=1<<r;o&t|e[r]&t&&(e[r]|=t),a&=~o}}function td(e,t){var a=t&-t;return a=(a&42)!==0?1:ms(a),(a&(e.suspendedLanes|t))!==0?0:a}function ms(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 gs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function nd(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Ym(e.type))}function ad(e,t){var a=H.p;try{return H.p=e,t()}finally{H.p=a}}var zn=Math.random().toString(36).slice(2),We="__reactFiber$"+zn,ft="__reactProps$"+zn,Ua="__reactContainer$"+zn,ys="__reactEvents$"+zn,E1="__reactListeners$"+zn,C1="__reactHandles$"+zn,ld="__reactResources$"+zn,Hl="__reactMarker$"+zn;function xs(e){delete e[We],delete e[ft],delete e[ys],delete e[E1],delete e[C1]}function Ba(e){var t=e[We];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ua]||a[We]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Am(e);e!==null;){if(a=e[We])return a;e=Am(e)}return t}e=a,a=e.parentNode}return null}function Ha(e){if(e=e[We]||e[Ua]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ql(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function qa(e){var t=e[ld];return t||(t=e[ld]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Je(e){e[Hl]=!0}var id=new Set,rd={};function fa(e,t){Ya(e,t),Ya(e+"Capture",t)}function Ya(e,t){for(rd[e]=t,e=0;e<t.length;e++)id.add(t[e])}var N1=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]*$"),ud={},sd={};function A1(e){return zl.call(sd,e)?!0:zl.call(ud,e)?!1:N1.test(e)?sd[e]=!0:(ud[e]=!0,!1)}function mr(e,t,a){if(A1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function gr(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 rn(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function Ot(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function od(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function T1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){a=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vs(e){if(!e._valueTracker){var t=od(e)?"checked":"value";e._valueTracker=T1(e,t,""+e[t])}}function cd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=od(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function yr(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 j1=/[\n"\\]/g;function Rt(e){return e.replace(j1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function bs(e,t,a,r,o,f,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ot(t)):e.value!==""+Ot(t)&&(e.value=""+Ot(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Ss(e,g,Ot(t)):a!=null?Ss(e,g,Ot(a)):r!=null&&e.removeAttribute("value"),o==null&&f!=null&&(e.defaultChecked=!!f),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Ot(S):e.removeAttribute("name")}function fd(e,t,a,r,o,f,g,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){vs(e);return}a=a!=null?""+Ot(a):"",t=t!=null?""+Ot(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}r=r??o,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),vs(e)}function Ss(e,t,a){t==="number"&&yr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Va(e,t,a,r){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&r&&(e[a].defaultSelected=!0)}else{for(a=""+Ot(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function dd(e,t,a){if(t!=null&&(t=""+Ot(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ot(a):""}function hd(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(u(92));if(re(r)){if(1<r.length)throw Error(u(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=Ot(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),vs(e)}function Ga(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var w1=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 pd(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||w1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function md(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&a[o]!==r&&pd(e,o,r)}else for(var f in t)t.hasOwnProperty(f)&&pd(e,f,t[f])}function Es(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 O1=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"]]),R1=/^[\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 xr(e){return R1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function un(){}var Cs=null;function Ns(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fa=null,$a=null;function gd(e){var t=Ha(e);if(t&&(e=t.stateNode)){var a=e[ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(bs(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="'+Rt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var o=r[ft]||null;if(!o)throw Error(u(90));bs(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&cd(r)}break e;case"textarea":dd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Va(e,!!a.multiple,t,!1)}}}var As=!1;function yd(e,t,a){if(As)return e(t,a);As=!0;try{var r=e(t);return r}finally{if(As=!1,(Fa!==null||$a!==null)&&(iu(),Fa&&(t=Fa,e=$a,$a=Fa=null,gd(t),e)))for(t=0;t<e.length;t++)gd(e[t])}}function Yl(e,t){var a=e.stateNode;if(a===null)return null;var r=a[ft]||null;if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ts=!1;if(sn)try{var Vl={};Object.defineProperty(Vl,"passive",{get:function(){Ts=!0}}),window.addEventListener("test",Vl,Vl),window.removeEventListener("test",Vl,Vl)}catch{Ts=!1}var Ln=null,js=null,vr=null;function xd(){if(vr)return vr;var e,t=js,a=t.length,r,o="value"in Ln?Ln.value:Ln.textContent,f=o.length;for(e=0;e<a&&t[e]===o[e];e++);var g=a-e;for(r=1;r<=g&&t[a-r]===o[f-r];r++);return vr=o.slice(e,1<r?1-r:void 0)}function br(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 Sr(){return!0}function vd(){return!1}function dt(e){function t(a,r,o,f,g){this._reactName=a,this._targetInst=o,this.type=r,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Sr:vd,this.isPropagationStopped=vd,this}return x(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=Sr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Sr)},persist:function(){},isPersistent:Sr}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Er=dt(da),Gl=x({},da,{view:0,detail:0}),_1=dt(Gl),ws,Os,Fl,Cr=x({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_s,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!==Fl&&(Fl&&e.type==="mousemove"?(ws=e.screenX-Fl.screenX,Os=e.screenY-Fl.screenY):Os=ws=0,Fl=e),ws)},movementY:function(e){return"movementY"in e?e.movementY:Os}}),bd=dt(Cr),M1=x({},Cr,{dataTransfer:0}),z1=dt(M1),L1=x({},Gl,{relatedTarget:0}),Rs=dt(L1),D1=x({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),k1=dt(D1),U1=x({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),B1=dt(U1),H1=x({},da,{data:0}),Sd=dt(H1),q1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y1={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"},V1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function G1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=V1[e])?!!t[e]:!1}function _s(){return G1}var F1=x({},Gl,{key:function(e){if(e.key){var t=q1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=br(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Y1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_s,charCode:function(e){return e.type==="keypress"?br(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?br(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$1=dt(F1),K1=x({},Cr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ed=dt(K1),X1=x({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_s}),Q1=dt(X1),Z1=x({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),J1=dt(Z1),I1=x({},Cr,{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}),W1=dt(I1),P1=x({},da,{newState:0,oldState:0}),ex=dt(P1),tx=[9,13,27,32],Ms=sn&&"CompositionEvent"in window,$l=null;sn&&"documentMode"in document&&($l=document.documentMode);var nx=sn&&"TextEvent"in window&&!$l,Cd=sn&&(!Ms||$l&&8<$l&&11>=$l),Nd=" ",Ad=!1;function Td(e,t){switch(e){case"keyup":return tx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function ax(e,t){switch(e){case"compositionend":return jd(t);case"keypress":return t.which!==32?null:(Ad=!0,Nd);case"textInput":return e=t.data,e===Nd&&Ad?null:e;default:return null}}function lx(e,t){if(Ka)return e==="compositionend"||!Ms&&Td(e,t)?(e=xd(),vr=js=Ln=null,Ka=!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 Cd&&t.locale!=="ko"?null:t.data;default:return null}}var ix={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 wd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ix[e.type]:t==="textarea"}function Od(e,t,a,r){Fa?$a?$a.push(r):$a=[r]:Fa=r,t=du(t,"onChange"),0<t.length&&(a=new Er("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var Kl=null,Xl=null;function rx(e){fm(e,0)}function Nr(e){var t=ql(e);if(cd(t))return e}function Rd(e,t){if(e==="change")return t}var _d=!1;if(sn){var zs;if(sn){var Ls="oninput"in document;if(!Ls){var Md=document.createElement("div");Md.setAttribute("oninput","return;"),Ls=typeof Md.oninput=="function"}zs=Ls}else zs=!1;_d=zs&&(!document.documentMode||9<document.documentMode)}function zd(){Kl&&(Kl.detachEvent("onpropertychange",Ld),Xl=Kl=null)}function Ld(e){if(e.propertyName==="value"&&Nr(Xl)){var t=[];Od(t,Xl,e,Ns(e)),yd(rx,t)}}function ux(e,t,a){e==="focusin"?(zd(),Kl=t,Xl=a,Kl.attachEvent("onpropertychange",Ld)):e==="focusout"&&zd()}function sx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nr(Xl)}function ox(e,t){if(e==="click")return Nr(t)}function cx(e,t){if(e==="input"||e==="change")return Nr(t)}function fx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:fx;function Ql(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var o=a[r];if(!zl.call(t,o)||!Et(e[o],t[o]))return!1}return!0}function Dd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kd(e,t){var a=Dd(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Dd(a)}}function Ud(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ud(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yr(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=yr(e.document)}return t}function Ds(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 dx=sn&&"documentMode"in document&&11>=document.documentMode,Xa=null,ks=null,Zl=null,Us=!1;function Hd(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Us||Xa==null||Xa!==yr(r)||(r=Xa,"selectionStart"in r&&Ds(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zl&&Ql(Zl,r)||(Zl=r,r=du(ks,"onSelect"),0<r.length&&(t=new Er("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=Xa)))}function ha(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Qa={animationend:ha("Animation","AnimationEnd"),animationiteration:ha("Animation","AnimationIteration"),animationstart:ha("Animation","AnimationStart"),transitionrun:ha("Transition","TransitionRun"),transitionstart:ha("Transition","TransitionStart"),transitioncancel:ha("Transition","TransitionCancel"),transitionend:ha("Transition","TransitionEnd")},Bs={},qd={};sn&&(qd=document.createElement("div").style,"AnimationEvent"in window||(delete Qa.animationend.animation,delete Qa.animationiteration.animation,delete Qa.animationstart.animation),"TransitionEvent"in window||delete Qa.transitionend.transition);function pa(e){if(Bs[e])return Bs[e];if(!Qa[e])return e;var t=Qa[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in qd)return Bs[e]=t[a];return e}var Yd=pa("animationend"),Vd=pa("animationiteration"),Gd=pa("animationstart"),hx=pa("transitionrun"),px=pa("transitionstart"),mx=pa("transitioncancel"),Fd=pa("transitionend"),$d=new Map,Hs="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(" ");Hs.push("scrollEnd");function Vt(e,t){$d.set(e,t),fa(t,[e])}var Ar=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)},_t=[],Za=0,qs=0;function Tr(){for(var e=Za,t=qs=Za=0;t<e;){var a=_t[t];_t[t++]=null;var r=_t[t];_t[t++]=null;var o=_t[t];_t[t++]=null;var f=_t[t];if(_t[t++]=null,r!==null&&o!==null){var g=r.pending;g===null?o.next=o:(o.next=g.next,g.next=o),r.pending=o}f!==0&&Kd(a,o,f)}}function jr(e,t,a,r){_t[Za++]=e,_t[Za++]=t,_t[Za++]=a,_t[Za++]=r,qs|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ys(e,t,a,r){return jr(e,t,a,r),wr(e)}function ma(e,t){return jr(e,null,null,t),wr(e)}function Kd(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var o=!1,f=e.return;f!==null;)f.childLanes|=a,r=f.alternate,r!==null&&(r.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(o=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,o&&t!==null&&(o=31-St(a),e=f.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=a|536870912),f):null}function wr(e){if(50<yi)throw yi=0,Io=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ja={};function gx(e,t,a,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ct(e,t,a,r){return new gx(e,t,a,r)}function Vs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function on(e,t){var a=e.alternate;return a===null?(a=Ct(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 Xd(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 Or(e,t,a,r,o,f){var g=0;if(r=e,typeof e=="function")Vs(e)&&(g=1);else if(typeof e=="string")g=Sv(e,a,de.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=Ct(31,a,t,o),e.elementType=q,e.lanes=f,e;case w:return ga(a.children,o,f,t);case T:g=8,o|=24;break;case R:return e=Ct(12,a,t,o|2),e.elementType=R,e.lanes=f,e;case X:return e=Ct(13,a,t,o),e.elementType=X,e.lanes=f,e;case Q:return e=Ct(19,a,t,o),e.elementType=Q,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:g=10;break e;case j:g=9;break e;case U:g=11;break e;case F:g=14;break e;case K:g=16,r=null;break e}g=29,a=Error(u(130,e===null?"null":typeof e,"")),r=null}return t=Ct(g,a,t,o),t.elementType=e,t.type=r,t.lanes=f,t}function ga(e,t,a,r){return e=Ct(7,e,r,t),e.lanes=a,e}function Gs(e,t,a){return e=Ct(6,e,null,t),e.lanes=a,e}function Qd(e){var t=Ct(18,null,null,0);return t.stateNode=e,t}function Fs(e,t,a){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Zd=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var a=Zd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ur(t)},Zd.set(e,t),t)}return{value:e,source:t,stack:ur(t)}}var Ia=[],Wa=0,Rr=null,Jl=0,zt=[],Lt=0,Dn=null,Zt=1,Jt="";function cn(e,t){Ia[Wa++]=Jl,Ia[Wa++]=Rr,Rr=e,Jl=t}function Jd(e,t,a){zt[Lt++]=Zt,zt[Lt++]=Jt,zt[Lt++]=Dn,Dn=e;var r=Zt;e=Jt;var o=32-St(r)-1;r&=~(1<<o),a+=1;var f=32-St(t)+o;if(30<f){var g=o-o%5;f=(r&(1<<g)-1).toString(32),r>>=g,o-=g,Zt=1<<32-St(t)+o|a<<o|r,Jt=f+e}else Zt=1<<f|a<<o|r,Jt=e}function $s(e){e.return!==null&&(cn(e,1),Jd(e,1,0))}function Ks(e){for(;e===Rr;)Rr=Ia[--Wa],Ia[Wa]=null,Jl=Ia[--Wa],Ia[Wa]=null;for(;e===Dn;)Dn=zt[--Lt],zt[Lt]=null,Jt=zt[--Lt],zt[Lt]=null,Zt=zt[--Lt],zt[Lt]=null}function Id(e,t){zt[Lt++]=Zt,zt[Lt++]=Jt,zt[Lt++]=Dn,Zt=t.id,Jt=t.overflow,Dn=e}var Pe=null,Le=null,be=!1,kn=null,Dt=!1,Xs=Error(u(519));function Un(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Il(Mt(t,e)),Xs}function Wd(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[We]=e,t[ft]=r,a){case"dialog":ye("cancel",t),ye("close",t);break;case"iframe":case"object":case"embed":ye("load",t);break;case"video":case"audio":for(a=0;a<vi.length;a++)ye(vi[a],t);break;case"source":ye("error",t);break;case"img":case"image":case"link":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"input":ye("invalid",t),fd(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ye("invalid",t);break;case"textarea":ye("invalid",t),hd(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||mm(t.textContent,a)?(r.popover!=null&&(ye("beforetoggle",t),ye("toggle",t)),r.onScroll!=null&&ye("scroll",t),r.onScrollEnd!=null&&ye("scrollend",t),r.onClick!=null&&(t.onclick=un),t=!0):t=!1,t||Un(e,!0)}function Pd(e){for(Pe=e.return;Pe;)switch(Pe.tag){case 5:case 31:case 13:Dt=!1;return;case 27:case 3:Dt=!0;return;default:Pe=Pe.return}}function Pa(e){if(e!==Pe)return!1;if(!be)return Pd(e),be=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||dc(e.type,e.memoizedProps)),a=!a),a&&Le&&Un(e),Pd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Le=Nm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Le=Nm(e)}else t===27?(t=Le,In(e.type)?(e=yc,yc=null,Le=e):Le=t):Le=Pe?Ut(e.stateNode.nextSibling):null;return!0}function ya(){Le=Pe=null,be=!1}function Qs(){var e=kn;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),kn=null),e}function Il(e){kn===null?kn=[e]:kn.push(e)}var Zs=Y(null),xa=null,fn=null;function Bn(e,t,a){ne(Zs,t._currentValue),t._currentValue=a}function dn(e){e._currentValue=Zs.current,P(Zs)}function Js(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function Is(e,t,a,r){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){var g=o.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=o;for(var A=0;A<t.length;A++)if(S.context===t[A]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),Js(f.return,a,e),r||(g=null);break e}f=S.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(u(341));g.lanes|=a,f=g.alternate,f!==null&&(f.lanes|=a),Js(g,a,e),g=null}else g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function el(e,t,a,r){e=null;for(var o=t,f=!1;o!==null;){if(!f){if((o.flags&524288)!==0)f=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(u(387));if(g=g.memoizedProps,g!==null){var S=o.type;Et(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===ut.current){if(g=o.alternate,g===null)throw Error(u(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Ni):e=[Ni])}o=o.return}e!==null&&Is(t,e,a,r),t.flags|=262144}function _r(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function va(e){xa=e,fn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function et(e){return eh(xa,e)}function Mr(e,t){return xa===null&&va(e),eh(e,t)}function eh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},fn===null){if(e===null)throw Error(u(308));fn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fn=fn.next=t;return a}var yx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},xx=n.unstable_scheduleCallback,vx=n.unstable_NormalPriority,Ge={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ws(){return{controller:new yx,data:new Map,refCount:0}}function Wl(e){e.refCount--,e.refCount===0&&xx(vx,function(){e.controller.abort()})}var Pl=null,Ps=0,tl=0,nl=null;function bx(e,t){if(Pl===null){var a=Pl=[];Ps=0,tl=ac(),nl={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Ps++,t.then(th,th),t}function th(){if(--Ps===0&&Pl!==null){nl!==null&&(nl.status="fulfilled");var e=Pl;Pl=null,tl=0,nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sx(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(r.status="rejected",r.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),r}var nh=M.S;M.S=function(e,t){Hp=ze(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&bx(e,t),nh!==null&&nh(e,t)};var ba=Y(null);function eo(){var e=ba.current;return e!==null?e:Me.pooledCache}function zr(e,t){t===null?ne(ba,ba.current):ne(ba,t.pool)}function ah(){var e=eo();return e===null?null:{parent:Ge._currentValue,pool:e}}var al=Error(u(460)),to=Error(u(474)),Lr=Error(u(542)),Dr={then:function(){}};function lh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ih(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(un,un),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uh(e),e;default:if(typeof t.status=="string")t.then(un,un);else{if(e=Me,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uh(e),e}throw Ea=t,al}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ea=a,al):a}}var Ea=null;function rh(){if(Ea===null)throw Error(u(459));var e=Ea;return Ea=null,e}function uh(e){if(e===al||e===Lr)throw Error(u(483))}var ll=null,ei=0;function kr(e){var t=ei;return ei+=1,ll===null&&(ll=[]),ih(ll,e,t)}function ti(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ur(e,t){throw t.$$typeof===E?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function sh(e){function t(_,O){if(e){var L=_.deletions;L===null?(_.deletions=[O],_.flags|=16):L.push(O)}}function a(_,O){if(!e)return null;for(;O!==null;)t(_,O),O=O.sibling;return null}function r(_){for(var O=new Map;_!==null;)_.key!==null?O.set(_.key,_):O.set(_.index,_),_=_.sibling;return O}function o(_,O){return _=on(_,O),_.index=0,_.sibling=null,_}function f(_,O,L){return _.index=L,e?(L=_.alternate,L!==null?(L=L.index,L<O?(_.flags|=67108866,O):L):(_.flags|=67108866,O)):(_.flags|=1048576,O)}function g(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function S(_,O,L,G){return O===null||O.tag!==6?(O=Gs(L,_.mode,G),O.return=_,O):(O=o(O,L),O.return=_,O)}function A(_,O,L,G){var se=L.type;return se===w?V(_,O,L.props.children,G,L.key):O!==null&&(O.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===K&&Sa(se)===O.type)?(O=o(O,L.props),ti(O,L),O.return=_,O):(O=Or(L.type,L.key,L.props,null,_.mode,G),ti(O,L),O.return=_,O)}function D(_,O,L,G){return O===null||O.tag!==4||O.stateNode.containerInfo!==L.containerInfo||O.stateNode.implementation!==L.implementation?(O=Fs(L,_.mode,G),O.return=_,O):(O=o(O,L.children||[]),O.return=_,O)}function V(_,O,L,G,se){return O===null||O.tag!==7?(O=ga(L,_.mode,G,se),O.return=_,O):(O=o(O,L),O.return=_,O)}function $(_,O,L){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Gs(""+O,_.mode,L),O.return=_,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case C:return L=Or(O.type,O.key,O.props,null,_.mode,L),ti(L,O),L.return=_,L;case N:return O=Fs(O,_.mode,L),O.return=_,O;case K:return O=Sa(O),$(_,O,L)}if(re(O)||ee(O))return O=ga(O,_.mode,L,null),O.return=_,O;if(typeof O.then=="function")return $(_,kr(O),L);if(O.$$typeof===z)return $(_,Mr(_,O),L);Ur(_,O)}return null}function k(_,O,L,G){var se=O!==null?O.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return se!==null?null:S(_,O,""+L,G);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case C:return L.key===se?A(_,O,L,G):null;case N:return L.key===se?D(_,O,L,G):null;case K:return L=Sa(L),k(_,O,L,G)}if(re(L)||ee(L))return se!==null?null:V(_,O,L,G,null);if(typeof L.then=="function")return k(_,O,kr(L),G);if(L.$$typeof===z)return k(_,O,Mr(_,L),G);Ur(_,L)}return null}function B(_,O,L,G,se){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return _=_.get(L)||null,S(O,_,""+G,se);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case C:return _=_.get(G.key===null?L:G.key)||null,A(O,_,G,se);case N:return _=_.get(G.key===null?L:G.key)||null,D(O,_,G,se);case K:return G=Sa(G),B(_,O,L,G,se)}if(re(G)||ee(G))return _=_.get(L)||null,V(O,_,G,se,null);if(typeof G.then=="function")return B(_,O,L,kr(G),se);if(G.$$typeof===z)return B(_,O,L,Mr(O,G),se);Ur(O,G)}return null}function ae(_,O,L,G){for(var se=null,Se=null,ie=O,me=O=0,ve=null;ie!==null&&me<L.length;me++){ie.index>me?(ve=ie,ie=null):ve=ie.sibling;var Ee=k(_,ie,L[me],G);if(Ee===null){ie===null&&(ie=ve);break}e&&ie&&Ee.alternate===null&&t(_,ie),O=f(Ee,O,me),Se===null?se=Ee:Se.sibling=Ee,Se=Ee,ie=ve}if(me===L.length)return a(_,ie),be&&cn(_,me),se;if(ie===null){for(;me<L.length;me++)ie=$(_,L[me],G),ie!==null&&(O=f(ie,O,me),Se===null?se=ie:Se.sibling=ie,Se=ie);return be&&cn(_,me),se}for(ie=r(ie);me<L.length;me++)ve=B(ie,_,me,L[me],G),ve!==null&&(e&&ve.alternate!==null&&ie.delete(ve.key===null?me:ve.key),O=f(ve,O,me),Se===null?se=ve:Se.sibling=ve,Se=ve);return e&&ie.forEach(function(na){return t(_,na)}),be&&cn(_,me),se}function ce(_,O,L,G){if(L==null)throw Error(u(151));for(var se=null,Se=null,ie=O,me=O=0,ve=null,Ee=L.next();ie!==null&&!Ee.done;me++,Ee=L.next()){ie.index>me?(ve=ie,ie=null):ve=ie.sibling;var na=k(_,ie,Ee.value,G);if(na===null){ie===null&&(ie=ve);break}e&&ie&&na.alternate===null&&t(_,ie),O=f(na,O,me),Se===null?se=na:Se.sibling=na,Se=na,ie=ve}if(Ee.done)return a(_,ie),be&&cn(_,me),se;if(ie===null){for(;!Ee.done;me++,Ee=L.next())Ee=$(_,Ee.value,G),Ee!==null&&(O=f(Ee,O,me),Se===null?se=Ee:Se.sibling=Ee,Se=Ee);return be&&cn(_,me),se}for(ie=r(ie);!Ee.done;me++,Ee=L.next())Ee=B(ie,_,me,Ee.value,G),Ee!==null&&(e&&Ee.alternate!==null&&ie.delete(Ee.key===null?me:Ee.key),O=f(Ee,O,me),Se===null?se=Ee:Se.sibling=Ee,Se=Ee);return e&&ie.forEach(function(Mv){return t(_,Mv)}),be&&cn(_,me),se}function _e(_,O,L,G){if(typeof L=="object"&&L!==null&&L.type===w&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case C:e:{for(var se=L.key;O!==null;){if(O.key===se){if(se=L.type,se===w){if(O.tag===7){a(_,O.sibling),G=o(O,L.props.children),G.return=_,_=G;break e}}else if(O.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===K&&Sa(se)===O.type){a(_,O.sibling),G=o(O,L.props),ti(G,L),G.return=_,_=G;break e}a(_,O);break}else t(_,O);O=O.sibling}L.type===w?(G=ga(L.props.children,_.mode,G,L.key),G.return=_,_=G):(G=Or(L.type,L.key,L.props,null,_.mode,G),ti(G,L),G.return=_,_=G)}return g(_);case N:e:{for(se=L.key;O!==null;){if(O.key===se)if(O.tag===4&&O.stateNode.containerInfo===L.containerInfo&&O.stateNode.implementation===L.implementation){a(_,O.sibling),G=o(O,L.children||[]),G.return=_,_=G;break e}else{a(_,O);break}else t(_,O);O=O.sibling}G=Fs(L,_.mode,G),G.return=_,_=G}return g(_);case K:return L=Sa(L),_e(_,O,L,G)}if(re(L))return ae(_,O,L,G);if(ee(L)){if(se=ee(L),typeof se!="function")throw Error(u(150));return L=se.call(L),ce(_,O,L,G)}if(typeof L.then=="function")return _e(_,O,kr(L),G);if(L.$$typeof===z)return _e(_,O,Mr(_,L),G);Ur(_,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,O!==null&&O.tag===6?(a(_,O.sibling),G=o(O,L),G.return=_,_=G):(a(_,O),G=Gs(L,_.mode,G),G.return=_,_=G),g(_)):a(_,O)}return function(_,O,L,G){try{ei=0;var se=_e(_,O,L,G);return ll=null,se}catch(ie){if(ie===al||ie===Lr)throw ie;var Se=Ct(29,ie,null,_.mode);return Se.lanes=G,Se.return=_,Se}finally{}}}var Ca=sh(!0),oh=sh(!1),Hn=!1;function no(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(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 qn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yn(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ce&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=wr(e),Kd(e,null,a),t}return jr(e,r,t,a),wr(e)}function ni(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,ed(e,a)}}function lo(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var o=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?o=f=g:f=f.next=g,a=a.next}while(a!==null);f===null?o=f=t:f=f.next=t}else o=f=t;a={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var io=!1;function ai(){if(io){var e=nl;if(e!==null)throw e}}function li(e,t,a,r){io=!1;var o=e.updateQueue;Hn=!1;var f=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var A=S,D=A.next;A.next=null,g===null?f=D:g.next=D,g=A;var V=e.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==g&&(S===null?V.firstBaseUpdate=D:S.next=D,V.lastBaseUpdate=A))}if(f!==null){var $=o.baseState;g=0,V=D=A=null,S=f;do{var k=S.lane&-536870913,B=k!==S.lane;if(B?(xe&k)===k:(r&k)===k){k!==0&&k===tl&&(io=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ae=e,ce=S;k=t;var _e=a;switch(ce.tag){case 1:if(ae=ce.payload,typeof ae=="function"){$=ae.call(_e,$,k);break e}$=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=ce.payload,k=typeof ae=="function"?ae.call(_e,$,k):ae,k==null)break e;$=x({},$,k);break e;case 2:Hn=!0}}k=S.callback,k!==null&&(e.flags|=64,B&&(e.flags|=8192),B=o.callbacks,B===null?o.callbacks=[k]:B.push(k))}else B={lane:k,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(D=V=B,A=$):V=V.next=B,g|=k;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;B=S,S=B.next,B.next=null,o.lastBaseUpdate=B,o.shared.pending=null}}while(!0);V===null&&(A=$),o.baseState=A,o.firstBaseUpdate=D,o.lastBaseUpdate=V,f===null&&(o.shared.lanes=0),Kn|=g,e.lanes=g,e.memoizedState=$}}function ch(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function fh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ch(a[e],t)}var il=Y(null),Br=Y(0);function dh(e,t){e=Sn,ne(Br,e),ne(il,t),Sn=e|t.baseLanes}function ro(){ne(Br,Sn),ne(il,il.current)}function uo(){Sn=Br.current,P(il),P(Br)}var Nt=Y(null),kt=null;function Vn(e){var t=e.alternate;ne(Ye,Ye.current&1),ne(Nt,e),kt===null&&(t===null||il.current!==null||t.memoizedState!==null)&&(kt=e)}function so(e){ne(Ye,Ye.current),ne(Nt,e),kt===null&&(kt=e)}function hh(e){e.tag===22?(ne(Ye,Ye.current),ne(Nt,e),kt===null&&(kt=e)):Gn()}function Gn(){ne(Ye,Ye.current),ne(Nt,Nt.current)}function At(e){P(Nt),kt===e&&(kt=null),P(Ye)}var Ye=Y(0);function Hr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mc(a)||gc(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){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}var hn=0,pe=null,Oe=null,Fe=null,qr=!1,rl=!1,Na=!1,Yr=0,ii=0,ul=null,Ex=0;function He(){throw Error(u(321))}function oo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Et(e[a],t[a]))return!1;return!0}function co(e,t,a,r,o,f){return hn=f,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Jh:To,Na=!1,f=a(r,o),Na=!1,rl&&(f=mh(t,a,r,o)),ph(e),f}function ph(e){M.H=si;var t=Oe!==null&&Oe.next!==null;if(hn=0,Fe=Oe=pe=null,qr=!1,ii=0,ul=null,t)throw Error(u(300));e===null||$e||(e=e.dependencies,e!==null&&_r(e)&&($e=!0))}function mh(e,t,a,r){pe=e;var o=0;do{if(rl&&(ul=null),ii=0,rl=!1,25<=o)throw Error(u(301));if(o+=1,Fe=Oe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}M.H=Ih,f=t(a,r)}while(rl);return f}function Cx(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?ri(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(pe.flags|=1024),t}function fo(){var e=Yr!==0;return Yr=0,e}function ho(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function po(e){if(qr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qr=!1}hn=0,Fe=Oe=pe=null,rl=!1,ii=Yr=0,ul=null}function st(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?pe.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function Ve(){if(Oe===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Fe===null?pe.memoizedState:Fe.next;if(t!==null)Fe=t,Oe=e;else{if(e===null)throw pe.alternate===null?Error(u(467)):Error(u(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Fe===null?pe.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Vr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ri(e){var t=ii;return ii+=1,ul===null&&(ul=[]),e=ih(ul,e,t),t=pe,(Fe===null?t.memoizedState:Fe.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Jh:To),e}function Gr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ri(e);if(e.$$typeof===z)return et(e)}throw Error(u(438,String(e)))}function mo(e){var t=null,a=pe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=pe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Vr(),pe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=J;return t.index++,a}function pn(e,t){return typeof t=="function"?t(e):t}function Fr(e){var t=Ve();return go(t,Oe,e)}function go(e,t,a){var r=e.queue;if(r===null)throw Error(u(311));r.lastRenderedReducer=a;var o=e.baseQueue,f=r.pending;if(f!==null){if(o!==null){var g=o.next;o.next=f.next,f.next=g}t.baseQueue=o=f,r.pending=null}if(f=e.baseState,o===null)e.memoizedState=f;else{t=o.next;var S=g=null,A=null,D=t,V=!1;do{var $=D.lane&-536870913;if($!==D.lane?(xe&$)===$:(hn&$)===$){var k=D.revertLane;if(k===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),$===tl&&(V=!0);else if((hn&k)===k){D=D.next,k===tl&&(V=!0);continue}else $={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=$,g=f):A=A.next=$,pe.lanes|=k,Kn|=k;$=D.action,Na&&a(f,$),f=D.hasEagerState?D.eagerState:a(f,$)}else k={lane:$,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=k,g=f):A=A.next=k,pe.lanes|=$,Kn|=$;D=D.next}while(D!==null&&D!==t);if(A===null?g=f:A.next=S,!Et(f,e.memoizedState)&&($e=!0,V&&(a=nl,a!==null)))throw a;e.memoizedState=f,e.baseState=g,e.baseQueue=A,r.lastRenderedState=f}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function yo(e){var t=Ve(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var r=a.dispatch,o=a.pending,f=t.memoizedState;if(o!==null){a.pending=null;var g=o=o.next;do f=e(f,g.action),g=g.next;while(g!==o);Et(f,t.memoizedState)||($e=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,r]}function gh(e,t,a){var r=pe,o=Ve(),f=be;if(f){if(a===void 0)throw Error(u(407));a=a()}else a=t();var g=!Et((Oe||o).memoizedState,a);if(g&&(o.memoizedState=a,$e=!0),o=o.queue,bo(vh.bind(null,r,o,e),[e]),o.getSnapshot!==t||g||Fe!==null&&Fe.memoizedState.tag&1){if(r.flags|=2048,sl(9,{destroy:void 0},xh.bind(null,r,o,a,t),null),Me===null)throw Error(u(349));f||(hn&127)!==0||yh(r,t,a)}return a}function yh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=pe.updateQueue,t===null?(t=Vr(),pe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function xh(e,t,a,r){t.value=a,t.getSnapshot=r,bh(t)&&Sh(e)}function vh(e,t,a){return a(function(){bh(t)&&Sh(e)})}function bh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Et(e,a)}catch{return!0}}function Sh(e){var t=ma(e,2);t!==null&&yt(t,e,2)}function xo(e){var t=st();if(typeof e=="function"){var a=e;if(e=a(),Na){Mn(!0);try{a()}finally{Mn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pn,lastRenderedState:e},t}function Eh(e,t,a,r){return e.baseState=a,go(e,Oe,typeof r=="function"?r:pn)}function Nx(e,t,a,r,o){if(Xr(e))throw Error(u(485));if(e=t.action,e!==null){var f={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};M.T!==null?a(!0):f.isTransition=!1,r(f),a=t.pending,a===null?(f.next=t.pending=f,Ch(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Ch(e,t){var a=t.action,r=t.payload,o=e.state;if(t.isTransition){var f=M.T,g={};M.T=g;try{var S=a(o,r),A=M.S;A!==null&&A(g,S),Nh(e,t,S)}catch(D){vo(e,t,D)}finally{f!==null&&g.types!==null&&(f.types=g.types),M.T=f}}else try{f=a(o,r),Nh(e,t,f)}catch(D){vo(e,t,D)}}function Nh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Ah(e,t,r)},function(r){return vo(e,t,r)}):Ah(e,t,a)}function Ah(e,t,a){t.status="fulfilled",t.value=a,Th(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ch(e,a)))}function vo(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Th(t),t=t.next;while(t!==r)}e.action=null}function Th(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function jh(e,t){return t}function wh(e,t){if(be){var a=Me.formState;if(a!==null){e:{var r=pe;if(be){if(Le){t:{for(var o=Le,f=Dt;o.nodeType!==8;){if(!f){o=null;break t}if(o=Ut(o.nextSibling),o===null){o=null;break t}}f=o.data,o=f==="F!"||f==="F"?o:null}if(o){Le=Ut(o.nextSibling),r=o.data==="F!";break e}}Un(r)}r=!1}r&&(t=a[0])}}return a=st(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jh,lastRenderedState:t},a.queue=r,a=Xh.bind(null,pe,r),r.dispatch=a,r=xo(!1),f=Ao.bind(null,pe,!1,r.queue),r=st(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,a=Nx.bind(null,pe,o,f,a),o.dispatch=a,r.memoizedState=e,[t,a,!1]}function Oh(e){var t=Ve();return Rh(t,Oe,e)}function Rh(e,t,a){if(t=go(e,t,jh)[0],e=Fr(pn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ri(t)}catch(g){throw g===al?Lr:g}else r=t;t=Ve();var o=t.queue,f=o.dispatch;return a!==t.memoizedState&&(pe.flags|=2048,sl(9,{destroy:void 0},Ax.bind(null,o,a),null)),[r,f,e]}function Ax(e,t){e.action=t}function _h(e){var t=Ve(),a=Oe;if(a!==null)return Rh(t,a,e);Ve(),t=t.memoizedState,a=Ve();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function sl(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=pe.updateQueue,t===null&&(t=Vr(),pe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Mh(){return Ve().memoizedState}function $r(e,t,a,r){var o=st();pe.flags|=e,o.memoizedState=sl(1|t,{destroy:void 0},a,r===void 0?null:r)}function Kr(e,t,a,r){var o=Ve();r=r===void 0?null:r;var f=o.memoizedState.inst;Oe!==null&&r!==null&&oo(r,Oe.memoizedState.deps)?o.memoizedState=sl(t,f,a,r):(pe.flags|=e,o.memoizedState=sl(1|t,f,a,r))}function zh(e,t){$r(8390656,8,e,t)}function bo(e,t){Kr(2048,8,e,t)}function Tx(e){pe.flags|=4;var t=pe.updateQueue;if(t===null)t=Vr(),pe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Lh(e){var t=Ve().memoizedState;return Tx({ref:t,nextImpl:e}),function(){if((Ce&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Dh(e,t){return Kr(4,2,e,t)}function kh(e,t){return Kr(4,4,e,t)}function Uh(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 Bh(e,t,a){a=a!=null?a.concat([e]):null,Kr(4,4,Uh.bind(null,t,e),a)}function So(){}function Hh(e,t){var a=Ve();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&oo(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function qh(e,t){var a=Ve();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&oo(t,r[1]))return r[0];if(r=e(),Na){Mn(!0);try{e()}finally{Mn(!1)}}return a.memoizedState=[r,t],r}function Eo(e,t,a){return a===void 0||(hn&1073741824)!==0&&(xe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Yp(),pe.lanes|=e,Kn|=e,a)}function Yh(e,t,a,r){return Et(a,t)?a:il.current!==null?(e=Eo(e,a,r),Et(e,t)||($e=!0),e):(hn&42)===0||(hn&1073741824)!==0&&(xe&261930)===0?($e=!0,e.memoizedState=a):(e=Yp(),pe.lanes|=e,Kn|=e,t)}function Vh(e,t,a,r,o){var f=H.p;H.p=f!==0&&8>f?f:8;var g=M.T,S={};M.T=S,Ao(e,!1,t,a);try{var A=o(),D=M.S;if(D!==null&&D(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var V=Sx(A,r);ui(e,t,V,wt(e))}else ui(e,t,r,wt(e))}catch($){ui(e,t,{then:function(){},status:"rejected",reason:$},wt())}finally{H.p=f,g!==null&&S.types!==null&&(g.types=S.types),M.T=g}}function jx(){}function Co(e,t,a,r){if(e.tag!==5)throw Error(u(476));var o=Gh(e).queue;Vh(e,o,t,I,a===null?jx:function(){return Fh(e),a(r)})}function Gh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pn,lastRenderedState:I},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fh(e){var t=Gh(e);t.next===null&&(t=e.alternate.memoizedState),ui(e,t.next.queue,{},wt())}function No(){return et(Ni)}function $h(){return Ve().memoizedState}function Kh(){return Ve().memoizedState}function wx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=wt();e=qn(a);var r=Yn(t,e,a);r!==null&&(yt(r,t,a),ni(r,t,a)),t={cache:Ws()},e.payload=t;return}t=t.return}}function Ox(e,t,a){var r=wt();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Xr(e)?Qh(t,a):(a=Ys(e,t,a,r),a!==null&&(yt(a,e,r),Zh(a,t,r)))}function Xh(e,t,a){var r=wt();ui(e,t,a,r)}function ui(e,t,a,r){var o={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Xr(e))Qh(t,o);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,S=f(g,a);if(o.hasEagerState=!0,o.eagerState=S,Et(S,g))return jr(e,t,o,0),Me===null&&Tr(),!1}catch{}finally{}if(a=Ys(e,t,o,r),a!==null)return yt(a,e,r),Zh(a,t,r),!0}return!1}function Ao(e,t,a,r){if(r={lane:2,revertLane:ac(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Xr(e)){if(t)throw Error(u(479))}else t=Ys(e,a,r,2),t!==null&&yt(t,e,2)}function Xr(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Qh(e,t){rl=qr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Zh(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,ed(e,a)}}var si={readContext:et,use:Gr,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useLayoutEffect:He,useInsertionEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useSyncExternalStore:He,useId:He,useHostTransitionStatus:He,useFormState:He,useActionState:He,useOptimistic:He,useMemoCache:He,useCacheRefresh:He};si.useEffectEvent=He;var Jh={readContext:et,use:Gr,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:zh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,$r(4194308,4,Uh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return $r(4194308,4,e,t)},useInsertionEffect:function(e,t){$r(4,2,e,t)},useMemo:function(e,t){var a=st();t=t===void 0?null:t;var r=e();if(Na){Mn(!0);try{e()}finally{Mn(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=st();if(a!==void 0){var o=a(t);if(Na){Mn(!0);try{a(t)}finally{Mn(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=Ox.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:function(e){e=xo(e);var t=e.queue,a=Xh.bind(null,pe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:So,useDeferredValue:function(e,t){var a=st();return Eo(a,e,t)},useTransition:function(){var e=xo(!1);return e=Vh.bind(null,pe,e.queue,!0,!1),st().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=pe,o=st();if(be){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Me===null)throw Error(u(349));(xe&127)!==0||yh(r,t,a)}o.memoizedState=a;var f={value:a,getSnapshot:t};return o.queue=f,zh(vh.bind(null,r,f,e),[e]),r.flags|=2048,sl(9,{destroy:void 0},xh.bind(null,r,f,a,t),null),a},useId:function(){var e=st(),t=Me.identifierPrefix;if(be){var a=Jt,r=Zt;a=(r&~(1<<32-St(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Yr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ex++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:No,useFormState:wh,useActionState:wh,useOptimistic:function(e){var t=st();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Ao.bind(null,pe,!0,a),a.dispatch=t,[e,t]},useMemoCache:mo,useCacheRefresh:function(){return st().memoizedState=wx.bind(null,pe)},useEffectEvent:function(e){var t=st(),a={impl:e};return t.memoizedState=a,function(){if((Ce&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},To={readContext:et,use:Gr,useCallback:Hh,useContext:et,useEffect:bo,useImperativeHandle:Bh,useInsertionEffect:Dh,useLayoutEffect:kh,useMemo:qh,useReducer:Fr,useRef:Mh,useState:function(){return Fr(pn)},useDebugValue:So,useDeferredValue:function(e,t){var a=Ve();return Yh(a,Oe.memoizedState,e,t)},useTransition:function(){var e=Fr(pn)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:ri(e),t]},useSyncExternalStore:gh,useId:$h,useHostTransitionStatus:No,useFormState:Oh,useActionState:Oh,useOptimistic:function(e,t){var a=Ve();return Eh(a,Oe,e,t)},useMemoCache:mo,useCacheRefresh:Kh};To.useEffectEvent=Lh;var Ih={readContext:et,use:Gr,useCallback:Hh,useContext:et,useEffect:bo,useImperativeHandle:Bh,useInsertionEffect:Dh,useLayoutEffect:kh,useMemo:qh,useReducer:yo,useRef:Mh,useState:function(){return yo(pn)},useDebugValue:So,useDeferredValue:function(e,t){var a=Ve();return Oe===null?Eo(a,e,t):Yh(a,Oe.memoizedState,e,t)},useTransition:function(){var e=yo(pn)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:ri(e),t]},useSyncExternalStore:gh,useId:$h,useHostTransitionStatus:No,useFormState:_h,useActionState:_h,useOptimistic:function(e,t){var a=Ve();return Oe!==null?Eh(a,Oe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:mo,useCacheRefresh:Kh};Ih.useEffectEvent=Lh;function jo(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var wo={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=wt(),o=qn(r);o.payload=t,a!=null&&(o.callback=a),t=Yn(e,o,r),t!==null&&(yt(t,e,r),ni(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=wt(),o=qn(r);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Yn(e,o,r),t!==null&&(yt(t,e,r),ni(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=wt(),r=qn(a);r.tag=2,t!=null&&(r.callback=t),t=Yn(e,r,a),t!==null&&(yt(t,e,a),ni(t,e,a))}};function Wh(e,t,a,r,o,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,f,g):t.prototype&&t.prototype.isPureReactComponent?!Ql(a,r)||!Ql(o,f):!0}function Ph(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&wo.enqueueReplaceState(t,t.state,null)}function Aa(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function ep(e){Ar(e)}function tp(e){console.error(e)}function np(e){Ar(e)}function Qr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function ap(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Oo(e,t,a){return a=qn(a),a.tag=3,a.payload={element:null},a.callback=function(){Qr(e,t)},a}function lp(e){return e=qn(e),e.tag=3,e}function ip(e,t,a,r){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var f=r.value;e.payload=function(){return o(f)},e.callback=function(){ap(t,a,r)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){ap(t,a,r),typeof o!="function"&&(Xn===null?Xn=new Set([this]):Xn.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function Rx(e,t,a,r,o){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&el(t,a,o,!0),a=Nt.current,a!==null){switch(a.tag){case 31:case 13:return kt===null?ru():a.alternate===null&&qe===0&&(qe=3),a.flags&=-257,a.flags|=65536,a.lanes=o,r===Dr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),ec(e,r,o)),!1;case 22:return a.flags|=65536,r===Dr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),ec(e,r,o)),!1}throw Error(u(435,a.tag))}return ec(e,r,o),ru(),!1}if(be)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==Xs&&(e=Error(u(422),{cause:r}),Il(Mt(e,a)))):(r!==Xs&&(t=Error(u(423),{cause:r}),Il(Mt(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=Mt(r,a),o=Oo(e.stateNode,r,o),lo(e,o),qe!==4&&(qe=2)),!1;var f=Error(u(520),{cause:r});if(f=Mt(f,a),gi===null?gi=[f]:gi.push(f),qe!==4&&(qe=2),t===null)return!0;r=Mt(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Oo(a.stateNode,r,e),lo(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Xn===null||!Xn.has(f))))return a.flags|=65536,o&=-o,a.lanes|=o,o=lp(o),ip(o,e,a,r),lo(a,o),!1}a=a.return}while(a!==null);return!1}var Ro=Error(u(461)),$e=!1;function tt(e,t,a,r){t.child=e===null?oh(t,null,a,r):Ca(t,e.child,a,r)}function rp(e,t,a,r,o){a=a.render;var f=t.ref;if("ref"in r){var g={};for(var S in r)S!=="ref"&&(g[S]=r[S])}else g=r;return va(t),r=co(e,t,a,g,f,o),S=fo(),e!==null&&!$e?(ho(e,t,o),mn(e,t,o)):(be&&S&&$s(t),t.flags|=1,tt(e,t,r,o),t.child)}function up(e,t,a,r,o){if(e===null){var f=a.type;return typeof f=="function"&&!Vs(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,sp(e,t,f,r,o)):(e=Or(a.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Bo(e,o)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:Ql,a(g,r)&&e.ref===t.ref)return mn(e,t,o)}return t.flags|=1,e=on(f,r),e.ref=t.ref,e.return=t,t.child=e}function sp(e,t,a,r,o){if(e!==null){var f=e.memoizedProps;if(Ql(f,r)&&e.ref===t.ref)if($e=!1,t.pendingProps=r=f,Bo(e,o))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,mn(e,t,o)}return _o(e,t,a,r,o)}function op(e,t,a,r){var o=r.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~f}else r=0,t.child=null;return cp(e,t,f,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&zr(t,f!==null?f.cachePool:null),f!==null?dh(t,f):ro(),hh(t);else return r=t.lanes=536870912,cp(e,t,f!==null?f.baseLanes|a:a,a,r)}else f!==null?(zr(t,f.cachePool),dh(t,f),Gn(),t.memoizedState=null):(e!==null&&zr(t,null),ro(),Gn());return tt(e,t,o,a),t.child}function oi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cp(e,t,a,r,o){var f=eo();return f=f===null?null:{parent:Ge._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&zr(t,null),ro(),hh(t),e!==null&&el(e,t,r,!0),t.childLanes=o,null}function Zr(e,t){return t=Ir({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fp(e,t,a){return Ca(t,e.child,null,a),e=Zr(t,t.pendingProps),e.flags|=2,At(t),t.memoizedState=null,e}function _x(e,t,a){var r=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(be){if(r.mode==="hidden")return e=Zr(t,r),t.lanes=536870912,oi(null,e);if(so(t),(e=Le)?(e=Cm(e,Dt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Dn!==null?{id:Zt,overflow:Jt}:null,retryLane:536870912,hydrationErrors:null},a=Qd(e),a.return=t,t.child=a,Pe=t,Le=null)):e=null,e===null)throw Un(t);return t.lanes=536870912,null}return Zr(t,r)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(so(t),o)if(t.flags&256)t.flags&=-257,t=fp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if($e||el(e,t,a,!1),o=(a&e.childLanes)!==0,$e||o){if(r=Me,r!==null&&(g=td(r,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,ma(e,g),yt(r,e,g),Ro;ru(),t=fp(e,t,a)}else e=f.treeContext,Le=Ut(g.nextSibling),Pe=t,be=!0,kn=null,Dt=!1,e!==null&&Id(t,e),t=Zr(t,r),t.flags|=4096;return t}return e=on(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Jr(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 _o(e,t,a,r,o){return va(t),a=co(e,t,a,r,void 0,o),r=fo(),e!==null&&!$e?(ho(e,t,o),mn(e,t,o)):(be&&r&&$s(t),t.flags|=1,tt(e,t,a,o),t.child)}function dp(e,t,a,r,o,f){return va(t),t.updateQueue=null,a=mh(t,r,a,o),ph(e),r=fo(),e!==null&&!$e?(ho(e,t,f),mn(e,t,f)):(be&&r&&$s(t),t.flags|=1,tt(e,t,a,f),t.child)}function hp(e,t,a,r,o){if(va(t),t.stateNode===null){var f=Ja,g=a.contextType;typeof g=="object"&&g!==null&&(f=et(g)),f=new a(r,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=wo,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=r,f.state=t.memoizedState,f.refs={},no(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?et(g):Ja,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(jo(t,a,g,r),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&wo.enqueueReplaceState(f,f.state,null),li(t,r,f,o),ai(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,A=Aa(a,S);f.props=A;var D=f.context,V=a.contextType;g=Ja,typeof V=="object"&&V!==null&&(g=et(V));var $=a.getDerivedStateFromProps;V=typeof $=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,V||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||D!==g)&&Ph(t,f,r,g),Hn=!1;var k=t.memoizedState;f.state=k,li(t,r,f,o),ai(),D=t.memoizedState,S||k!==D||Hn?(typeof $=="function"&&(jo(t,a,$,r),D=t.memoizedState),(A=Hn||Wh(t,a,A,r,k,D,g))?(V||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=D),f.props=r,f.state=D,f.context=g,r=A):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{f=t.stateNode,ao(e,t),g=t.memoizedProps,V=Aa(a,g),f.props=V,$=t.pendingProps,k=f.context,D=a.contextType,A=Ja,typeof D=="object"&&D!==null&&(A=et(D)),S=a.getDerivedStateFromProps,(D=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==$||k!==A)&&Ph(t,f,r,A),Hn=!1,k=t.memoizedState,f.state=k,li(t,r,f,o),ai();var B=t.memoizedState;g!==$||k!==B||Hn||e!==null&&e.dependencies!==null&&_r(e.dependencies)?(typeof S=="function"&&(jo(t,a,S,r),B=t.memoizedState),(V=Hn||Wh(t,a,V,r,k,B,A)||e!==null&&e.dependencies!==null&&_r(e.dependencies))?(D||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,B,A),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,B,A)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=B),f.props=r,f.state=B,f.context=A,r=V):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),r=!1)}return f=r,Jr(e,t),r=(t.flags&128)!==0,f||r?(f=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&r?(t.child=Ca(t,e.child,null,o),t.child=Ca(t,null,a,o)):tt(e,t,a,o),t.memoizedState=f.state,e=t.child):e=mn(e,t,o),e}function pp(e,t,a,r){return ya(),t.flags|=256,tt(e,t,a,r),t.child}var Mo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zo(e){return{baseLanes:e,cachePool:ah()}}function Lo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=jt),e}function mp(e,t,a){var r=t.pendingProps,o=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(Ye.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(be){if(o?Vn(t):Gn(),(e=Le)?(e=Cm(e,Dt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Dn!==null?{id:Zt,overflow:Jt}:null,retryLane:536870912,hydrationErrors:null},a=Qd(e),a.return=t,t.child=a,Pe=t,Le=null)):e=null,e===null)throw Un(t);return gc(e)?t.lanes=32:t.lanes=536870912,null}var S=r.children;return r=r.fallback,o?(Gn(),o=t.mode,S=Ir({mode:"hidden",children:S},o),r=ga(r,o,a,null),S.return=t,r.return=t,S.sibling=r,t.child=S,r=t.child,r.memoizedState=zo(a),r.childLanes=Lo(e,g,a),t.memoizedState=Mo,oi(null,r)):(Vn(t),Do(t,S))}var A=e.memoizedState;if(A!==null&&(S=A.dehydrated,S!==null)){if(f)t.flags&256?(Vn(t),t.flags&=-257,t=ko(e,t,a)):t.memoizedState!==null?(Gn(),t.child=e.child,t.flags|=128,t=null):(Gn(),S=r.fallback,o=t.mode,r=Ir({mode:"visible",children:r.children},o),S=ga(S,o,a,null),S.flags|=2,r.return=t,S.return=t,r.sibling=S,t.child=r,Ca(t,e.child,null,a),r=t.child,r.memoizedState=zo(a),r.childLanes=Lo(e,g,a),t.memoizedState=Mo,t=oi(null,r));else if(Vn(t),gc(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var D=g.dgst;g=D,r=Error(u(419)),r.stack="",r.digest=g,Il({value:r,source:null,stack:null}),t=ko(e,t,a)}else if($e||el(e,t,a,!1),g=(a&e.childLanes)!==0,$e||g){if(g=Me,g!==null&&(r=td(g,a),r!==0&&r!==A.retryLane))throw A.retryLane=r,ma(e,r),yt(g,e,r),Ro;mc(S)||ru(),t=ko(e,t,a)}else mc(S)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,Le=Ut(S.nextSibling),Pe=t,be=!0,kn=null,Dt=!1,e!==null&&Id(t,e),t=Do(t,r.children),t.flags|=4096);return t}return o?(Gn(),S=r.fallback,o=t.mode,A=e.child,D=A.sibling,r=on(A,{mode:"hidden",children:r.children}),r.subtreeFlags=A.subtreeFlags&65011712,D!==null?S=on(D,S):(S=ga(S,o,a,null),S.flags|=2),S.return=t,r.return=t,r.sibling=S,t.child=r,oi(null,r),r=t.child,S=e.child.memoizedState,S===null?S=zo(a):(o=S.cachePool,o!==null?(A=Ge._currentValue,o=o.parent!==A?{parent:A,pool:A}:o):o=ah(),S={baseLanes:S.baseLanes|a,cachePool:o}),r.memoizedState=S,r.childLanes=Lo(e,g,a),t.memoizedState=Mo,oi(e.child,r)):(Vn(t),a=e.child,e=a.sibling,a=on(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function Do(e,t){return t=Ir({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ir(e,t){return e=Ct(22,e,null,t),e.lanes=0,e}function ko(e,t,a){return Ca(t,e.child,null,a),e=Do(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gp(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Js(e.return,t,a)}function Uo(e,t,a,r,o,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:o,treeForkCount:f}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=r,g.tail=a,g.tailMode=o,g.treeForkCount=f)}function yp(e,t,a){var r=t.pendingProps,o=r.revealOrder,f=r.tail;r=r.children;var g=Ye.current,S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,ne(Ye,g),tt(e,t,r,a),r=be?Jl:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gp(e,a,t);else if(e.tag===19)gp(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}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Hr(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Uo(t,!1,o,a,f,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Hr(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Uo(t,!0,a,null,f,r);break;case"together":Uo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function mn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Kn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(el(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=on(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=on(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Bo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_r(e)))}function Mx(e,t,a){switch(t.tag){case 3:Xt(t,t.stateNode.containerInfo),Bn(t,Ge,e.memoizedState.cache),ya();break;case 27:case 5:_l(t);break;case 4:Xt(t,t.stateNode.containerInfo);break;case 10:Bn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,so(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Vn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?mp(e,t,a):(Vn(t),e=mn(e,t,a),e!==null?e.sibling:null);Vn(t);break;case 19:var o=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(el(e,t,a,!1),r=(a&t.childLanes)!==0),o){if(r)return yp(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ne(Ye,Ye.current),r)break;return null;case 22:return t.lanes=0,op(e,t,a,t.pendingProps);case 24:Bn(t,Ge,e.memoizedState.cache)}return mn(e,t,a)}function xp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!Bo(e,a)&&(t.flags&128)===0)return $e=!1,Mx(e,t,a);$e=(e.flags&131072)!==0}else $e=!1,be&&(t.flags&1048576)!==0&&Jd(t,Jl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Sa(t.elementType),t.type=e,typeof e=="function")Vs(e)?(r=Aa(e,r),t.tag=1,t=hp(null,t,e,r,a)):(t.tag=0,t=_o(null,t,e,r,a));else{if(e!=null){var o=e.$$typeof;if(o===U){t.tag=11,t=rp(null,t,e,r,a);break e}else if(o===F){t.tag=14,t=up(null,t,e,r,a);break e}}throw t=te(e)||e,Error(u(306,t,""))}}return t;case 0:return _o(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,o=Aa(r,t.pendingProps),hp(e,t,r,o,a);case 3:e:{if(Xt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));r=t.pendingProps;var f=t.memoizedState;o=f.element,ao(e,t),li(t,r,null,a);var g=t.memoizedState;if(r=g.cache,Bn(t,Ge,r),r!==f.cache&&Is(t,[Ge],a,!0),ai(),r=g.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=pp(e,t,r,a);break e}else if(r!==o){o=Mt(Error(u(424)),t),Il(o),t=pp(e,t,r,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(Le=Ut(e.firstChild),Pe=t,be=!0,kn=null,Dt=!0,a=oh(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ya(),r===o){t=mn(e,t,a);break e}tt(e,t,r,a)}t=t.child}return t;case 26:return Jr(e,t),e===null?(a=Om(t.type,null,t.pendingProps,null))?t.memoizedState=a:be||(a=t.type,e=t.pendingProps,r=hu(Ae.current).createElement(a),r[We]=t,r[ft]=e,nt(r,a,e),Je(r),t.stateNode=r):t.memoizedState=Om(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _l(t),e===null&&be&&(r=t.stateNode=Tm(t.type,t.pendingProps,Ae.current),Pe=t,Dt=!0,o=Le,In(t.type)?(yc=o,Le=Ut(r.firstChild)):Le=o),tt(e,t,t.pendingProps.children,a),Jr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&be&&((o=r=Le)&&(r=sv(r,t.type,t.pendingProps,Dt),r!==null?(t.stateNode=r,Pe=t,Le=Ut(r.firstChild),Dt=!1,o=!0):o=!1),o||Un(t)),_l(t),o=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,r=f.children,dc(o,f)?r=null:g!==null&&dc(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=co(e,t,Cx,null,null,a),Ni._currentValue=o),Jr(e,t),tt(e,t,r,a),t.child;case 6:return e===null&&be&&((e=a=Le)&&(a=ov(a,t.pendingProps,Dt),a!==null?(t.stateNode=a,Pe=t,Le=null,e=!0):e=!1),e||Un(t)),null;case 13:return mp(e,t,a);case 4:return Xt(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ca(t,null,r,a):tt(e,t,r,a),t.child;case 11:return rp(e,t,t.type,t.pendingProps,a);case 7:return tt(e,t,t.pendingProps,a),t.child;case 8:return tt(e,t,t.pendingProps.children,a),t.child;case 12:return tt(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Bn(t,t.type,r.value),tt(e,t,r.children,a),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,va(t),o=et(o),r=r(o),t.flags|=1,tt(e,t,r,a),t.child;case 14:return up(e,t,t.type,t.pendingProps,a);case 15:return sp(e,t,t.type,t.pendingProps,a);case 19:return yp(e,t,a);case 31:return _x(e,t,a);case 22:return op(e,t,a,t.pendingProps);case 24:return va(t),r=et(Ge),e===null?(o=eo(),o===null&&(o=Me,f=Ws(),o.pooledCache=f,f.refCount++,f!==null&&(o.pooledCacheLanes|=a),o=f),t.memoizedState={parent:r,cache:o},no(t),Bn(t,Ge,o)):((e.lanes&a)!==0&&(ao(e,t),li(t,null,null,a),ai()),o=e.memoizedState,f=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Bn(t,Ge,r)):(r=f.cache,Bn(t,Ge,r),r!==o.cache&&Is(t,[Ge],a,!0))),tt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function gn(e){e.flags|=4}function Ho(e,t,a,r,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if($p())e.flags|=8192;else throw Ea=Dr,to}else e.flags&=-16777217}function vp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lm(t))if($p())e.flags|=8192;else throw Ea=Dr,to}function Wr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wf():536870912,e.lanes|=t,dl|=t)}function ci(e,t){if(!be)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 r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function De(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags&65011712,r|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function zx(e,t,a){var r=t.pendingProps;switch(Ks(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(t),null;case 1:return De(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),dn(Ge),ln(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Pa(t)?gn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Qs())),De(t),null;case 26:var o=t.type,f=t.memoizedState;return e===null?(gn(t),f!==null?(De(t),vp(t,f)):(De(t),Ho(t,o,null,r,a))):f?f!==e.memoizedState?(gn(t),De(t),vp(t,f)):(De(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&gn(t),De(t),Ho(t,o,e,r,a)),null;case 27:if(Ma(t),a=Ae.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gn(t);else{if(!r){if(t.stateNode===null)throw Error(u(166));return De(t),null}e=de.current,Pa(t)?Wd(t):(e=Tm(o,r,a),t.stateNode=e,gn(t))}return De(t),null;case 5:if(Ma(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gn(t);else{if(!r){if(t.stateNode===null)throw Error(u(166));return De(t),null}if(f=de.current,Pa(t))Wd(t);else{var g=hu(Ae.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?g.createElement("select",{is:r.is}):g.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?g.createElement(o,{is:r.is}):g.createElement(o)}}f[We]=t,f[ft]=r;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=f;e:switch(nt(f,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&gn(t)}}return De(t),Ho(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(e=Ae.current,Pa(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,o=Pe,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[We]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||mm(e.nodeValue,a)),e||Un(t,!0)}else e=hu(e).createTextNode(r),e[We]=t,t.stateNode=e}return De(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pa(t),a!==null){if(e===null){if(!r)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[We]=t}else ya(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),e=!1}else a=Qs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(At(t),t):(At(t),null);if((t.flags&128)!==0)throw Error(u(558))}return De(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Pa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(u(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(u(317));o[We]=t}else ya(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),o=!1}else o=Qs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(At(t),t):(At(t),null)}return At(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==o&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Wr(t,t.updateQueue),De(t),null);case 4:return ln(),e===null&&uc(t.stateNode.containerInfo),De(t),null;case 10:return dn(t.type),De(t),null;case 19:if(P(Ye),r=t.memoizedState,r===null)return De(t),null;if(o=(t.flags&128)!==0,f=r.rendering,f===null)if(o)ci(r,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Hr(e),f!==null){for(t.flags|=128,ci(r,!1),e=f.updateQueue,t.updateQueue=e,Wr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Xd(a,e),a=a.sibling;return ne(Ye,Ye.current&1|2),be&&cn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>au&&(t.flags|=128,o=!0,ci(r,!1),t.lanes=4194304)}else{if(!o)if(e=Hr(f),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Wr(t,e),ci(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!be)return De(t),null}else 2*ze()-r.renderingStartTime>au&&a!==536870912&&(t.flags|=128,o=!0,ci(r,!1),t.lanes=4194304);r.isBackwards?(f.sibling=t.child,t.child=f):(e=r.last,e!==null?e.sibling=f:t.child=f,r.last=f)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,a=Ye.current,ne(Ye,o?a&1|2:a&1),be&&cn(t,r.treeForkCount),e):(De(t),null);case 22:case 23:return At(t),uo(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),a=t.updateQueue,a!==null&&Wr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&P(ba),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),dn(Ge),De(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Lx(e,t){switch(Ks(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dn(Ge),ln(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ma(t),null;case 31:if(t.memoizedState!==null){if(At(t),t.alternate===null)throw Error(u(340));ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(At(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(Ye),null;case 4:return ln(),null;case 10:return dn(t.type),null;case 22:case 23:return At(t),uo(),e!==null&&P(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return dn(Ge),null;case 25:return null;default:return null}}function bp(e,t){switch(Ks(t),t.tag){case 3:dn(Ge),ln();break;case 26:case 27:case 5:Ma(t);break;case 4:ln();break;case 31:t.memoizedState!==null&&At(t);break;case 13:At(t);break;case 19:P(Ye);break;case 10:dn(t.type);break;case 22:case 23:At(t),uo(),e!==null&&P(ba);break;case 24:dn(Ge)}}function fi(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var o=r.next;a=o;do{if((a.tag&e)===e){r=void 0;var f=a.create,g=a.inst;r=f(),g.destroy=r}a=a.next}while(a!==o)}}catch(S){je(t,t.return,S)}}function Fn(e,t,a){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var f=o.next;r=f;do{if((r.tag&e)===e){var g=r.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var A=a,D=S;try{D()}catch(V){je(o,A,V)}}}r=r.next}while(r!==f)}}catch(V){je(t,t.return,V)}}function Sp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{fh(t,a)}catch(r){je(e,e.return,r)}}}function Ep(e,t,a){a.props=Aa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){je(e,t,r)}}function di(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(o){je(e,t,o)}}function It(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(o){je(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){je(e,t,o)}else a.current=null}function Cp(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(o){je(e,e.return,o)}}function qo(e,t,a){try{var r=e.stateNode;nv(r,e.type,a,t),r[ft]=t}catch(o){je(e,e.return,o)}}function Np(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&In(e.type)||e.tag===4}function Yo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Np(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&&In(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 Vo(e,t,a){var r=e.tag;if(r===5||r===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=un));else if(r!==4&&(r===27&&In(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Vo(e,t,a),e=e.sibling;e!==null;)Vo(e,t,a),e=e.sibling}function Pr(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&In(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Pr(e,t,a),e=e.sibling;e!==null;)Pr(e,t,a),e=e.sibling}function Ap(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);nt(t,r,a),t[We]=e,t[ft]=a}catch(f){je(e,e.return,f)}}var yn=!1,Ke=!1,Go=!1,Tp=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Dx(e,t){if(e=e.containerInfo,cc=bu,e=Bd(e),Ds(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var o=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var g=0,S=-1,A=-1,D=0,V=0,$=e,k=null;t:for(;;){for(var B;$!==a||o!==0&&$.nodeType!==3||(S=g+o),$!==f||r!==0&&$.nodeType!==3||(A=g+r),$.nodeType===3&&(g+=$.nodeValue.length),(B=$.firstChild)!==null;)k=$,$=B;for(;;){if($===e)break t;if(k===a&&++D===o&&(S=g),k===f&&++V===r&&(A=g),(B=$.nextSibling)!==null)break;$=k,k=$.parentNode}$=B}a=S===-1||A===-1?null:{start:S,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(fc={focusedElem:e,selectionRange:a},bu=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){switch(t=Ie,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,o=f.memoizedProps,f=f.memoizedState,r=a.stateNode;try{var ae=Aa(a.type,o);e=r.getSnapshotBeforeUpdate(ae,f),r.__reactInternalSnapshotBeforeUpdate=e}catch(ce){je(a,a.return,ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)pc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pc(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,Ie=e;break}Ie=t.return}}function jp(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:vn(e,a),r&4&&fi(5,a);break;case 1:if(vn(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){je(a,a.return,g)}else{var o=Aa(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){je(a,a.return,g)}}r&64&&Sp(a),r&512&&di(a,a.return);break;case 3:if(vn(e,a),r&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{fh(e,t)}catch(g){je(a,a.return,g)}}break;case 27:t===null&&r&4&&Ap(a);case 26:case 5:vn(e,a),t===null&&r&4&&Cp(a),r&512&&di(a,a.return);break;case 12:vn(e,a);break;case 31:vn(e,a),r&4&&Rp(e,a);break;case 13:vn(e,a),r&4&&_p(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Fx.bind(null,a),cv(e,a))));break;case 22:if(r=a.memoizedState!==null||yn,!r){t=t!==null&&t.memoizedState!==null||Ke,o=yn;var f=Ke;yn=r,(Ke=t)&&!f?bn(e,a,(a.subtreeFlags&8772)!==0):vn(e,a),yn=o,Ke=f}break;case 30:break;default:vn(e,a)}}function wp(e){var t=e.alternate;t!==null&&(e.alternate=null,wp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&xs(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 ke=null,ht=!1;function xn(e,t,a){for(a=a.child;a!==null;)Op(e,t,a),a=a.sibling}function Op(e,t,a){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(kl,a)}catch{}switch(a.tag){case 26:Ke||It(a,t),xn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ke||It(a,t);var r=ke,o=ht;In(a.type)&&(ke=a.stateNode,ht=!1),xn(e,t,a),Si(a.stateNode),ke=r,ht=o;break;case 5:Ke||It(a,t);case 6:if(r=ke,o=ht,ke=null,xn(e,t,a),ke=r,ht=o,ke!==null)if(ht)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(a.stateNode)}catch(f){je(a,t,f)}else try{ke.removeChild(a.stateNode)}catch(f){je(a,t,f)}break;case 18:ke!==null&&(ht?(e=ke,Sm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),bl(e)):Sm(ke,a.stateNode));break;case 4:r=ke,o=ht,ke=a.stateNode.containerInfo,ht=!0,xn(e,t,a),ke=r,ht=o;break;case 0:case 11:case 14:case 15:Fn(2,a,t),Ke||Fn(4,a,t),xn(e,t,a);break;case 1:Ke||(It(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Ep(a,t,r)),xn(e,t,a);break;case 21:xn(e,t,a);break;case 22:Ke=(r=Ke)||a.memoizedState!==null,xn(e,t,a),Ke=r;break;default:xn(e,t,a)}}function Rp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bl(e)}catch(a){je(t,t.return,a)}}}function _p(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bl(e)}catch(a){je(t,t.return,a)}}function kx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tp),t;default:throw Error(u(435,e.tag))}}function eu(e,t){var a=kx(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var o=$x.bind(null,e,r);r.then(o,o)}})}function pt(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var o=a[r],f=e,g=t,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(In(S.type)){ke=S.stateNode,ht=!1;break e}break;case 5:ke=S.stateNode,ht=!1;break e;case 3:case 4:ke=S.stateNode.containerInfo,ht=!0;break e}S=S.return}if(ke===null)throw Error(u(160));Op(f,g,o),ke=null,ht=!1,f=o.alternate,f!==null&&(f.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Mp(t,e),t=t.sibling}var Gt=null;function Mp(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pt(t,e),mt(e),r&4&&(Fn(3,e,e.return),fi(3,e),Fn(5,e,e.return));break;case 1:pt(t,e),mt(e),r&512&&(Ke||a===null||It(a,a.return)),r&64&&yn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var o=Gt;if(pt(t,e),mt(e),r&512&&(Ke||a===null||It(a,a.return)),r&4){var f=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":f=o.getElementsByTagName("title")[0],(!f||f[Hl]||f[We]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=o.createElement(r),o.head.insertBefore(f,o.querySelector("head > title"))),nt(f,r,a),f[We]=e,Je(f),r=f;break e;case"link":var g=Mm("link","href",o).get(r+(a.href||""));if(g){for(var S=0;S<g.length;S++)if(f=g[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(S,1);break t}}f=o.createElement(r),nt(f,r,a),o.head.appendChild(f);break;case"meta":if(g=Mm("meta","content",o).get(r+(a.content||""))){for(S=0;S<g.length;S++)if(f=g[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(S,1);break t}}f=o.createElement(r),nt(f,r,a),o.head.appendChild(f);break;default:throw Error(u(468,r))}f[We]=e,Je(f),r=f}e.stateNode=r}else zm(o,e.type,e.stateNode);else e.stateNode=_m(o,r,e.memoizedProps);else f!==r?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,r===null?zm(o,e.type,e.stateNode):_m(o,r,e.memoizedProps)):r===null&&e.stateNode!==null&&qo(e,e.memoizedProps,a.memoizedProps)}break;case 27:pt(t,e),mt(e),r&512&&(Ke||a===null||It(a,a.return)),a!==null&&r&4&&qo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(pt(t,e),mt(e),r&512&&(Ke||a===null||It(a,a.return)),e.flags&32){o=e.stateNode;try{Ga(o,"")}catch(ae){je(e,e.return,ae)}}r&4&&e.stateNode!=null&&(o=e.memoizedProps,qo(e,o,a!==null?a.memoizedProps:o)),r&1024&&(Go=!0);break;case 6:if(pt(t,e),mt(e),r&4){if(e.stateNode===null)throw Error(u(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(ae){je(e,e.return,ae)}}break;case 3:if(gu=null,o=Gt,Gt=pu(t.containerInfo),pt(t,e),Gt=o,mt(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{bl(t.containerInfo)}catch(ae){je(e,e.return,ae)}Go&&(Go=!1,zp(e));break;case 4:r=Gt,Gt=pu(e.stateNode.containerInfo),pt(t,e),mt(e),Gt=r;break;case 12:pt(t,e),mt(e);break;case 31:pt(t,e),mt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,eu(e,r)));break;case 13:pt(t,e),mt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(nu=ze()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,eu(e,r)));break;case 22:o=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,D=yn,V=Ke;if(yn=D||o,Ke=V||A,pt(t,e),Ke=V,yn=D,mt(e),r&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||A||yn||Ke||Ta(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(f=A.stateNode,o)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{S=A.stateNode;var $=A.memoizedProps.style,k=$!=null&&$.hasOwnProperty("display")?$.display:null;S.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ae){je(A,A.return,ae)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=o?"":A.memoizedProps}catch(ae){je(A,A.return,ae)}}}else if(t.tag===18){if(a===null){A=t;try{var B=A.stateNode;o?Em(B,!0):Em(A.stateNode,!1)}catch(ae){je(A,A.return,ae)}}}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}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,eu(e,a))));break;case 19:pt(t,e),mt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,eu(e,r)));break;case 30:break;case 21:break;default:pt(t,e),mt(e)}}function mt(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(Np(r)){a=r;break}r=r.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var o=a.stateNode,f=Yo(e);Pr(e,f,o);break;case 5:var g=a.stateNode;a.flags&32&&(Ga(g,""),a.flags&=-33);var S=Yo(e);Pr(e,S,g);break;case 3:case 4:var A=a.stateNode.containerInfo,D=Yo(e);Vo(e,D,A);break;default:throw Error(u(161))}}catch(V){je(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jp(e,t.alternate,t),t=t.sibling}function Ta(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fn(4,t,t.return),Ta(t);break;case 1:It(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Ep(t,t.return,a),Ta(t);break;case 27:Si(t.stateNode);case 26:case 5:It(t,t.return),Ta(t);break;case 22:t.memoizedState===null&&Ta(t);break;case 30:Ta(t);break;default:Ta(t)}e=e.sibling}}function bn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,o=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:bn(o,f,a),fi(4,f);break;case 1:if(bn(o,f,a),r=f,o=r.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(D){je(r,r.return,D)}if(r=f,o=r.updateQueue,o!==null){var S=r.stateNode;try{var A=o.shared.hiddenCallbacks;if(A!==null)for(o.shared.hiddenCallbacks=null,o=0;o<A.length;o++)ch(A[o],S)}catch(D){je(r,r.return,D)}}a&&g&64&&Sp(f),di(f,f.return);break;case 27:Ap(f);case 26:case 5:bn(o,f,a),a&&r===null&&g&4&&Cp(f),di(f,f.return);break;case 12:bn(o,f,a);break;case 31:bn(o,f,a),a&&g&4&&Rp(o,f);break;case 13:bn(o,f,a),a&&g&4&&_p(o,f);break;case 22:f.memoizedState===null&&bn(o,f,a),di(f,f.return);break;case 30:break;default:bn(o,f,a)}t=t.sibling}}function Fo(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&&Wl(a))}function $o(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wl(e))}function Ft(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lp(e,t,a,r),t=t.sibling}function Lp(e,t,a,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Ft(e,t,a,r),o&2048&&fi(9,t);break;case 1:Ft(e,t,a,r);break;case 3:Ft(e,t,a,r),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wl(e)));break;case 12:if(o&2048){Ft(e,t,a,r),e=t.stateNode;try{var f=t.memoizedProps,g=f.id,S=f.onPostCommit;typeof S=="function"&&S(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){je(t,t.return,A)}}else Ft(e,t,a,r);break;case 31:Ft(e,t,a,r);break;case 13:Ft(e,t,a,r);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?Ft(e,t,a,r):hi(e,t):f._visibility&2?Ft(e,t,a,r):(f._visibility|=2,ol(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Fo(g,t);break;case 24:Ft(e,t,a,r),o&2048&&$o(t.alternate,t);break;default:Ft(e,t,a,r)}}function ol(e,t,a,r,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,g=t,S=a,A=r,D=g.flags;switch(g.tag){case 0:case 11:case 15:ol(f,g,S,A,o),fi(8,g);break;case 23:break;case 22:var V=g.stateNode;g.memoizedState!==null?V._visibility&2?ol(f,g,S,A,o):hi(f,g):(V._visibility|=2,ol(f,g,S,A,o)),o&&D&2048&&Fo(g.alternate,g);break;case 24:ol(f,g,S,A,o),o&&D&2048&&$o(g.alternate,g);break;default:ol(f,g,S,A,o)}t=t.sibling}}function hi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,o=r.flags;switch(r.tag){case 22:hi(a,r),o&2048&&Fo(r.alternate,r);break;case 24:hi(a,r),o&2048&&$o(r.alternate,r);break;default:hi(a,r)}t=t.sibling}}var pi=8192;function cl(e,t,a){if(e.subtreeFlags&pi)for(e=e.child;e!==null;)Dp(e,t,a),e=e.sibling}function Dp(e,t,a){switch(e.tag){case 26:cl(e,t,a),e.flags&pi&&e.memoizedState!==null&&Ev(a,Gt,e.memoizedState,e.memoizedProps);break;case 5:cl(e,t,a);break;case 3:case 4:var r=Gt;Gt=pu(e.stateNode.containerInfo),cl(e,t,a),Gt=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=pi,pi=16777216,cl(e,t,a),pi=r):cl(e,t,a));break;default:cl(e,t,a)}}function kp(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 mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Ie=r,Bp(r,e)}kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Up(e),e=e.sibling}function Up(e){switch(e.tag){case 0:case 11:case 15:mi(e),e.flags&2048&&Fn(9,e,e.return);break;case 3:mi(e);break;case 12:mi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,tu(e)):mi(e);break;default:mi(e)}}function tu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Ie=r,Bp(r,e)}kp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fn(8,t,t.return),tu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,tu(t));break;default:tu(t)}e=e.sibling}}function Bp(e,t){for(;Ie!==null;){var a=Ie;switch(a.tag){case 0:case 11:case 15:Fn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Wl(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Ie=r;else e:for(a=e;Ie!==null;){r=Ie;var o=r.sibling,f=r.return;if(wp(r),r===a){Ie=null;break e}if(o!==null){o.return=f,Ie=o;break e}Ie=f}}}var Ux={getCacheForType:function(e){var t=et(Ge),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return et(Ge).controller.signal}},Bx=typeof WeakMap=="function"?WeakMap:Map,Ce=0,Me=null,ge=null,xe=0,Te=0,Tt=null,$n=!1,fl=!1,Ko=!1,Sn=0,qe=0,Kn=0,ja=0,Xo=0,jt=0,dl=0,gi=null,gt=null,Qo=!1,nu=0,Hp=0,au=1/0,lu=null,Xn=null,Qe=0,Qn=null,hl=null,En=0,Zo=0,Jo=null,qp=null,yi=0,Io=null;function wt(){return(Ce&2)!==0&&xe!==0?xe&-xe:M.T!==null?ac():nd()}function Yp(){if(jt===0)if((xe&536870912)===0||be){var e=dr;dr<<=1,(dr&3932160)===0&&(dr=262144),jt=e}else jt=536870912;return e=Nt.current,e!==null&&(e.flags|=32),jt}function yt(e,t,a){(e===Me&&(Te===2||Te===9)||e.cancelPendingCommit!==null)&&(pl(e,0),Zn(e,xe,jt,!1)),Bl(e,a),((Ce&2)===0||e!==Me)&&(e===Me&&((Ce&2)===0&&(ja|=a),qe===4&&Zn(e,xe,jt,!1)),Wt(e))}function Vp(e,t,a){if((Ce&6)!==0)throw Error(u(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ul(e,t),o=r?Yx(e,t):Po(e,t,!0),f=r;do{if(o===0){fl&&!r&&Zn(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!Hx(a)){o=Po(e,t,!1),f=!1;continue}if(o===2){if(f=t,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;o=gi;var A=S.current.memoizedState.isDehydrated;if(A&&(pl(S,g).flags|=256),g=Po(S,g,!1),g!==2){if(Ko&&!A){S.errorRecoveryDisabledLanes|=f,ja|=f,o=4;break e}f=gt,gt=o,f!==null&&(gt===null?gt=f:gt.push.apply(gt,f))}o=g}if(f=!1,o!==2)continue}}if(o===1){pl(e,0),Zn(e,t,0,!0);break}e:{switch(r=e,f=o,f){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Zn(r,t,jt,!$n);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(o=nu+300-ze(),10<o)){if(Zn(r,t,jt,!$n),pr(r,0,!0)!==0)break e;En=t,r.timeoutHandle=vm(Gp.bind(null,r,a,gt,lu,Qo,t,jt,ja,dl,$n,f,"Throttled",-0,0),o);break e}Gp(r,a,gt,lu,Qo,t,jt,ja,dl,$n,f,null,-0,0)}}break}while(!0);Wt(e)}function Gp(e,t,a,r,o,f,g,S,A,D,V,$,k,B){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},Dp(t,f,$);var ae=(f&62914560)===f?nu-ze():(f&4194048)===f?Hp-ze():0;if(ae=Cv($,ae),ae!==null){En=f,e.cancelPendingCommit=ae(Ip.bind(null,e,t,f,a,r,o,g,S,A,V,$,null,k,B)),Zn(e,f,g,!D);return}}Ip(e,t,f,a,r,o,g,S,A)}function Hx(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 r=0;r<a.length;r++){var o=a[r],f=o.getSnapshot;o=o.value;try{if(!Et(f(),o))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 Zn(e,t,a,r){t&=~Xo,t&=~ja,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var f=31-St(o),g=1<<f;r[f]=-1,o&=~g}a!==0&&Pf(e,a,t)}function iu(){return(Ce&6)===0?(xi(0),!1):!0}function Wo(){if(ge!==null){if(Te===0)var e=ge.return;else e=ge,fn=xa=null,po(e),ll=null,ei=0,e=ge;for(;e!==null;)bp(e.alternate,e),e=e.return;ge=null}}function pl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,iv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),En=0,Wo(),Me=e,ge=a=on(e.current,null),xe=t,Te=0,Tt=null,$n=!1,fl=Ul(e,t),Ko=!1,dl=jt=Xo=ja=Kn=qe=0,gt=gi=null,Qo=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var o=31-St(r),f=1<<o;t|=e[o],r&=~f}return Sn=t,Tr(),a}function Fp(e,t){pe=null,M.H=si,t===al||t===Lr?(t=rh(),Te=3):t===to?(t=rh(),Te=4):Te=t===Ro?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tt=t,ge===null&&(qe=1,Qr(e,Mt(t,e.current)))}function $p(){var e=Nt.current;return e===null?!0:(xe&4194048)===xe?kt===null:(xe&62914560)===xe||(xe&536870912)!==0?e===kt:!1}function Kp(){var e=M.H;return M.H=si,e===null?si:e}function Xp(){var e=M.A;return M.A=Ux,e}function ru(){qe=4,$n||(xe&4194048)!==xe&&Nt.current!==null||(fl=!0),(Kn&134217727)===0&&(ja&134217727)===0||Me===null||Zn(Me,xe,jt,!1)}function Po(e,t,a){var r=Ce;Ce|=2;var o=Kp(),f=Xp();(Me!==e||xe!==t)&&(lu=null,pl(e,t)),t=!1;var g=qe;e:do try{if(Te!==0&&ge!==null){var S=ge,A=Tt;switch(Te){case 8:Wo(),g=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var D=Te;if(Te=0,Tt=null,ml(e,S,A,D),a&&fl){g=0;break e}break;default:D=Te,Te=0,Tt=null,ml(e,S,A,D)}}qx(),g=qe;break}catch(V){Fp(e,V)}while(!0);return t&&e.shellSuspendCounter++,fn=xa=null,Ce=r,M.H=o,M.A=f,ge===null&&(Me=null,xe=0,Tr()),g}function qx(){for(;ge!==null;)Qp(ge)}function Yx(e,t){var a=Ce;Ce|=2;var r=Kp(),o=Xp();Me!==e||xe!==t?(lu=null,au=ze()+500,pl(e,t)):fl=Ul(e,t);e:do try{if(Te!==0&&ge!==null){t=ge;var f=Tt;t:switch(Te){case 1:Te=0,Tt=null,ml(e,t,f,1);break;case 2:case 9:if(lh(f)){Te=0,Tt=null,Zp(t);break}t=function(){Te!==2&&Te!==9||Me!==e||(Te=7),Wt(e)},f.then(t,t);break e;case 3:Te=7;break e;case 4:Te=5;break e;case 7:lh(f)?(Te=0,Tt=null,Zp(t)):(Te=0,Tt=null,ml(e,t,f,7));break;case 5:var g=null;switch(ge.tag){case 26:g=ge.memoizedState;case 5:case 27:var S=ge;if(g?Lm(g):S.stateNode.complete){Te=0,Tt=null;var A=S.sibling;if(A!==null)ge=A;else{var D=S.return;D!==null?(ge=D,uu(D)):ge=null}break t}}Te=0,Tt=null,ml(e,t,f,5);break;case 6:Te=0,Tt=null,ml(e,t,f,6);break;case 8:Wo(),qe=6;break e;default:throw Error(u(462))}}Vx();break}catch(V){Fp(e,V)}while(!0);return fn=xa=null,M.H=r,M.A=o,Ce=a,ge!==null?0:(Me=null,xe=0,Tr(),qe)}function Vx(){for(;ge!==null&&!or();)Qp(ge)}function Qp(e){var t=xp(e.alternate,e,Sn);e.memoizedProps=e.pendingProps,t===null?uu(e):ge=t}function Zp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=dp(a,t,t.pendingProps,t.type,void 0,xe);break;case 11:t=dp(a,t,t.pendingProps,t.type.render,t.ref,xe);break;case 5:po(t);default:bp(a,t),t=ge=Xd(t,Sn),t=xp(a,t,Sn)}e.memoizedProps=e.pendingProps,t===null?uu(e):ge=t}function ml(e,t,a,r){fn=xa=null,po(t),ll=null,ei=0;var o=t.return;try{if(Rx(e,o,t,a,xe)){qe=1,Qr(e,Mt(a,e.current)),ge=null;return}}catch(f){if(o!==null)throw ge=o,f;qe=1,Qr(e,Mt(a,e.current)),ge=null;return}t.flags&32768?(be||r===1?e=!0:fl||(xe&536870912)!==0?e=!1:($n=e=!0,(r===2||r===9||r===3||r===6)&&(r=Nt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Jp(t,e)):uu(t)}function uu(e){var t=e;do{if((t.flags&32768)!==0){Jp(t,$n);return}e=t.return;var a=zx(t.alternate,t,Sn);if(a!==null){ge=a;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);qe===0&&(qe=5)}function Jp(e,t){do{var a=Lx(e.alternate,e);if(a!==null){a.flags&=32767,ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=a}while(e!==null);qe=6,ge=null}function Ip(e,t,a,r,o,f,g,S,A){e.cancelPendingCommit=null;do su();while(Qe!==0);if((Ce&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(f=t.lanes|t.childLanes,f|=qs,S1(e,a,f,g,S,A),e===Me&&(ge=Me=null,xe=0),hl=t,Qn=e,En=a,Zo=f,Jo=o,qp=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Kx(ka,function(){return nm(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=M.T,M.T=null,o=H.p,H.p=2,g=Ce,Ce|=4;try{Dx(e,t,a)}finally{Ce=g,H.p=o,M.T=r}}Qe=1,Wp(),Pp(),em()}}function Wp(){if(Qe===1){Qe=0;var e=Qn,t=hl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var r=H.p;H.p=2;var o=Ce;Ce|=4;try{Mp(t,e);var f=fc,g=Bd(e.containerInfo),S=f.focusedElem,A=f.selectionRange;if(g!==S&&S&&S.ownerDocument&&Ud(S.ownerDocument.documentElement,S)){if(A!==null&&Ds(S)){var D=A.start,V=A.end;if(V===void 0&&(V=D),"selectionStart"in S)S.selectionStart=D,S.selectionEnd=Math.min(V,S.value.length);else{var $=S.ownerDocument||document,k=$&&$.defaultView||window;if(k.getSelection){var B=k.getSelection(),ae=S.textContent.length,ce=Math.min(A.start,ae),_e=A.end===void 0?ce:Math.min(A.end,ae);!B.extend&&ce>_e&&(g=_e,_e=ce,ce=g);var _=kd(S,ce),O=kd(S,_e);if(_&&O&&(B.rangeCount!==1||B.anchorNode!==_.node||B.anchorOffset!==_.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var L=$.createRange();L.setStart(_.node,_.offset),B.removeAllRanges(),ce>_e?(B.addRange(L),B.extend(O.node,O.offset)):(L.setEnd(O.node,O.offset),B.addRange(L))}}}}for($=[],B=S;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<$.length;S++){var G=$[S];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}bu=!!cc,fc=cc=null}finally{Ce=o,H.p=r,M.T=a}}e.current=t,Qe=2}}function Pp(){if(Qe===2){Qe=0;var e=Qn,t=hl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var r=H.p;H.p=2;var o=Ce;Ce|=4;try{jp(e,t.alternate,t)}finally{Ce=o,H.p=r,M.T=a}}Qe=3}}function em(){if(Qe===4||Qe===3){Qe=0,Ne();var e=Qn,t=hl,a=En,r=qp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Qe=5:(Qe=0,hl=Qn=null,tm(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Xn=null),gs(a),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(kl,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=M.T,o=H.p,H.p=2,M.T=null;try{for(var f=e.onRecoverableError,g=0;g<r.length;g++){var S=r[g];f(S.value,{componentStack:S.stack})}}finally{M.T=t,H.p=o}}(En&3)!==0&&su(),Wt(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Io?yi++:(yi=0,Io=e):yi=0,xi(0)}}function tm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wl(t)))}function su(){return Wp(),Pp(),em(),nm()}function nm(){if(Qe!==5)return!1;var e=Qn,t=Zo;Zo=0;var a=gs(En),r=M.T,o=H.p;try{H.p=32>a?32:a,M.T=null,a=Jo,Jo=null;var f=Qn,g=En;if(Qe=0,hl=Qn=null,En=0,(Ce&6)!==0)throw Error(u(331));var S=Ce;if(Ce|=4,Up(f.current),Lp(f,f.current,g,a),Ce=S,xi(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(kl,f)}catch{}return!0}finally{H.p=o,M.T=r,tm(e,t)}}function am(e,t,a){t=Mt(a,t),t=Oo(e.stateNode,t,2),e=Yn(e,t,2),e!==null&&(Bl(e,2),Wt(e))}function je(e,t,a){if(e.tag===3)am(e,e,a);else for(;t!==null;){if(t.tag===3){am(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xn===null||!Xn.has(r))){e=Mt(a,e),a=lp(2),r=Yn(t,a,2),r!==null&&(ip(a,r,t,e),Bl(r,2),Wt(r));break}}t=t.return}}function ec(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new Bx;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(a)||(Ko=!0,o.add(a),e=Gx.bind(null,e,t,a),t.then(e,e))}function Gx(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Me===e&&(xe&a)===a&&(qe===4||qe===3&&(xe&62914560)===xe&&300>ze()-nu?(Ce&2)===0&&pl(e,0):Xo|=a,dl===xe&&(dl=0)),Wt(e)}function lm(e,t){t===0&&(t=Wf()),e=ma(e,t),e!==null&&(Bl(e,t),Wt(e))}function Fx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),lm(e,a)}function $x(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(u(314))}r!==null&&r.delete(t),lm(e,a)}function Kx(e,t){return Ll(e,t)}var ou=null,gl=null,tc=!1,cu=!1,nc=!1,Jn=0;function Wt(e){e!==gl&&e.next===null&&(gl===null?ou=gl=e:gl=gl.next=e),cu=!0,tc||(tc=!0,Qx())}function xi(e,t){if(!nc&&cu){nc=!0;do for(var a=!1,r=ou;r!==null;){if(e!==0){var o=r.pendingLanes;if(o===0)var f=0;else{var g=r.suspendedLanes,S=r.pingedLanes;f=(1<<31-St(42|e)+1)-1,f&=o&~(g&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,sm(r,f))}else f=xe,f=pr(r,r===Me?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||Ul(r,f)||(a=!0,sm(r,f));r=r.next}while(a);nc=!1}}function Xx(){im()}function im(){cu=tc=!1;var e=0;Jn!==0&&lv()&&(e=Jn);for(var t=ze(),a=null,r=ou;r!==null;){var o=r.next,f=rm(r,t);f===0?(r.next=null,a===null?ou=o:a.next=o,o===null&&(gl=a)):(a=r,(e!==0||(f&3)!==0)&&(cu=!0)),r=o}Qe!==0&&Qe!==5||xi(e),Jn!==0&&(Jn=0)}function rm(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-St(f),S=1<<g,A=o[g];A===-1?((S&a)===0||(S&r)!==0)&&(o[g]=b1(S,t)):A<=t&&(e.expiredLanes|=S),f&=~S}if(t=Me,a=xe,a=pr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(Te===2||Te===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&sr(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ul(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&sr(r),gs(a)){case 2:case 8:a=Da;break;case 32:a=ka;break;case 268435456:a=Dl;break;default:a=ka}return r=um.bind(null,e),a=Ll(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&sr(r),e.callbackPriority=2,e.callbackNode=null,2}function um(e,t){if(Qe!==0&&Qe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(su()&&e.callbackNode!==a)return null;var r=xe;return r=pr(e,e===Me?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Vp(e,r,t),rm(e,ze()),e.callbackNode!=null&&e.callbackNode===a?um.bind(null,e):null)}function sm(e,t){if(su())return null;Vp(e,t,!0)}function Qx(){rv(function(){(Ce&6)!==0?Ll(oa,Xx):im()})}function ac(){if(Jn===0){var e=tl;e===0&&(e=fr,fr<<=1,(fr&261888)===0&&(fr=256)),Jn=e}return Jn}function om(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xr(""+e)}function cm(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 Zx(e,t,a,r,o){if(t==="submit"&&a&&a.stateNode===o){var f=om((o[ft]||null).action),g=r.submitter;g&&(t=(t=g[ft]||null)?om(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var S=new Er("action","action",null,r,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Jn!==0){var A=g?cm(o,g):new FormData(o);Co(a,{pending:!0,data:A,method:o.method,action:f},null,A)}}else typeof f=="function"&&(S.preventDefault(),A=g?cm(o,g):new FormData(o),Co(a,{pending:!0,data:A,method:o.method,action:f},f,A))},currentTarget:o}]})}}for(var lc=0;lc<Hs.length;lc++){var ic=Hs[lc],Jx=ic.toLowerCase(),Ix=ic[0].toUpperCase()+ic.slice(1);Vt(Jx,"on"+Ix)}Vt(Yd,"onAnimationEnd"),Vt(Vd,"onAnimationIteration"),Vt(Gd,"onAnimationStart"),Vt("dblclick","onDoubleClick"),Vt("focusin","onFocus"),Vt("focusout","onBlur"),Vt(hx,"onTransitionRun"),Vt(px,"onTransitionStart"),Vt(mx,"onTransitionCancel"),Vt(Fd,"onTransitionEnd"),Ya("onMouseEnter",["mouseout","mouseover"]),Ya("onMouseLeave",["mouseout","mouseover"]),Ya("onPointerEnter",["pointerout","pointerover"]),Ya("onPointerLeave",["pointerout","pointerover"]),fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vi="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(" "),Wx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vi));function fm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],o=r.event;r=r.listeners;e:{var f=void 0;if(t)for(var g=r.length-1;0<=g;g--){var S=r[g],A=S.instance,D=S.currentTarget;if(S=S.listener,A!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=D;try{f(o)}catch(V){Ar(V)}o.currentTarget=null,f=A}else for(g=0;g<r.length;g++){if(S=r[g],A=S.instance,D=S.currentTarget,S=S.listener,A!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=D;try{f(o)}catch(V){Ar(V)}o.currentTarget=null,f=A}}}}function ye(e,t){var a=t[ys];a===void 0&&(a=t[ys]=new Set);var r=e+"__bubble";a.has(r)||(dm(t,e,2,!1),a.add(r))}function rc(e,t,a){var r=0;t&&(r|=4),dm(a,e,r,t)}var fu="_reactListening"+Math.random().toString(36).slice(2);function uc(e){if(!e[fu]){e[fu]=!0,id.forEach(function(a){a!=="selectionchange"&&(Wx.has(a)||rc(a,!1,e),rc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fu]||(t[fu]=!0,rc("selectionchange",!1,t))}}function dm(e,t,a,r){switch(Ym(t)){case 2:var o=Tv;break;case 8:o=jv;break;default:o=Ec}a=o.bind(null,t,a,e),o=void 0,!Ts||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function sc(e,t,a,r,o){var f=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var g=r.tag;if(g===3||g===4){var S=r.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=r.return;g!==null;){var A=g.tag;if((A===3||A===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=Ba(S),g===null)return;if(A=g.tag,A===5||A===6||A===26||A===27){r=f=g;continue e}S=S.parentNode}}r=r.return}yd(function(){var D=f,V=Ns(a),$=[];e:{var k=$d.get(e);if(k!==void 0){var B=Er,ae=e;switch(e){case"keypress":if(br(a)===0)break e;case"keydown":case"keyup":B=$1;break;case"focusin":ae="focus",B=Rs;break;case"focusout":ae="blur",B=Rs;break;case"beforeblur":case"afterblur":B=Rs;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":B=bd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=z1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=Q1;break;case Yd:case Vd:case Gd:B=k1;break;case Fd:B=J1;break;case"scroll":case"scrollend":B=_1;break;case"wheel":B=W1;break;case"copy":case"cut":case"paste":B=B1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Ed;break;case"toggle":case"beforetoggle":B=ex}var ce=(t&4)!==0,_e=!ce&&(e==="scroll"||e==="scrollend"),_=ce?k!==null?k+"Capture":null:k;ce=[];for(var O=D,L;O!==null;){var G=O;if(L=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||L===null||_===null||(G=Yl(O,_),G!=null&&ce.push(bi(O,G,L))),_e)break;O=O.return}0<ce.length&&(k=new B(k,ae,null,a,V),$.push({event:k,listeners:ce}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",k&&a!==Cs&&(ae=a.relatedTarget||a.fromElement)&&(Ba(ae)||ae[Ua]))break e;if((B||k)&&(k=V.window===V?V:(k=V.ownerDocument)?k.defaultView||k.parentWindow:window,B?(ae=a.relatedTarget||a.toElement,B=D,ae=ae?Ba(ae):null,ae!==null&&(_e=c(ae),ce=ae.tag,ae!==_e||ce!==5&&ce!==27&&ce!==6)&&(ae=null)):(B=null,ae=D),B!==ae)){if(ce=bd,G="onMouseLeave",_="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(ce=Ed,G="onPointerLeave",_="onPointerEnter",O="pointer"),_e=B==null?k:ql(B),L=ae==null?k:ql(ae),k=new ce(G,O+"leave",B,a,V),k.target=_e,k.relatedTarget=L,G=null,Ba(V)===D&&(ce=new ce(_,O+"enter",ae,a,V),ce.target=L,ce.relatedTarget=_e,G=ce),_e=G,B&&ae)t:{for(ce=Px,_=B,O=ae,L=0,G=_;G;G=ce(G))L++;G=0;for(var se=O;se;se=ce(se))G++;for(;0<L-G;)_=ce(_),L--;for(;0<G-L;)O=ce(O),G--;for(;L--;){if(_===O||O!==null&&_===O.alternate){ce=_;break t}_=ce(_),O=ce(O)}ce=null}else ce=null;B!==null&&hm($,k,B,ce,!1),ae!==null&&_e!==null&&hm($,_e,ae,ce,!0)}}e:{if(k=D?ql(D):window,B=k.nodeName&&k.nodeName.toLowerCase(),B==="select"||B==="input"&&k.type==="file")var Se=Rd;else if(wd(k))if(_d)Se=cx;else{Se=sx;var ie=ux}else B=k.nodeName,!B||B.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&Es(D.elementType)&&(Se=Rd):Se=ox;if(Se&&(Se=Se(e,D))){Od($,Se,a,V);break e}ie&&ie(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Ss(k,"number",k.value)}switch(ie=D?ql(D):window,e){case"focusin":(wd(ie)||ie.contentEditable==="true")&&(Xa=ie,ks=D,Zl=null);break;case"focusout":Zl=ks=Xa=null;break;case"mousedown":Us=!0;break;case"contextmenu":case"mouseup":case"dragend":Us=!1,Hd($,a,V);break;case"selectionchange":if(dx)break;case"keydown":case"keyup":Hd($,a,V)}var me;if(Ms)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else Ka?Td(e,a)&&(ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ve="onCompositionStart");ve&&(Cd&&a.locale!=="ko"&&(Ka||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&Ka&&(me=xd()):(Ln=V,js="value"in Ln?Ln.value:Ln.textContent,Ka=!0)),ie=du(D,ve),0<ie.length&&(ve=new Sd(ve,e,null,a,V),$.push({event:ve,listeners:ie}),me?ve.data=me:(me=jd(a),me!==null&&(ve.data=me)))),(me=nx?ax(e,a):lx(e,a))&&(ve=du(D,"onBeforeInput"),0<ve.length&&(ie=new Sd("onBeforeInput","beforeinput",null,a,V),$.push({event:ie,listeners:ve}),ie.data=me)),Zx($,e,D,a,V)}fm($,t)})}function bi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function du(e,t){for(var a=t+"Capture",r=[];e!==null;){var o=e,f=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||f===null||(o=Yl(e,a),o!=null&&r.unshift(bi(e,o,f)),o=Yl(e,t),o!=null&&r.push(bi(e,o,f))),e.tag===3)return r;e=e.return}return[]}function Px(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function hm(e,t,a,r,o){for(var f=t._reactName,g=[];a!==null&&a!==r;){var S=a,A=S.alternate,D=S.stateNode;if(S=S.tag,A!==null&&A===r)break;S!==5&&S!==26&&S!==27||D===null||(A=D,o?(D=Yl(a,f),D!=null&&g.unshift(bi(a,D,A))):o||(D=Yl(a,f),D!=null&&g.push(bi(a,D,A)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var ev=/\r\n?/g,tv=/\u0000|\uFFFD/g;function pm(e){return(typeof e=="string"?e:""+e).replace(ev,`
|
|
33
|
+
`).replace(tv,"")}function mm(e,t){return t=pm(t),pm(e)===t}function Re(e,t,a,r,o,f){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Ga(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Ga(e,""+r);break;case"className":gr(e,"class",r);break;case"tabIndex":gr(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":gr(e,a,r);break;case"style":md(e,r,f);break;case"data":if(t!=="object"){gr(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=xr(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="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 f=="function"&&(a==="formAction"?(t!=="input"&&Re(e,t,"name",o.name,o,null),Re(e,t,"formEncType",o.formEncType,o,null),Re(e,t,"formMethod",o.formMethod,o,null),Re(e,t,"formTarget",o.formTarget,o,null)):(Re(e,t,"encType",o.encType,o,null),Re(e,t,"method",o.method,o,null),Re(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=xr(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=un);break;case"onScroll":r!=null&&ye("scroll",e);break;case"onScrollEnd":r!=null&&ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(u(61));if(a=r.__html,a!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=xr(""+r),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":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":ye("beforetoggle",e),ye("toggle",e),mr(e,"popover",r);break;case"xlinkActuate":rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":rn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":rn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":rn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":rn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":mr(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=O1.get(a)||a,mr(e,a,r))}}function oc(e,t,a,r,o,f){switch(a){case"style":md(e,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(u(61));if(a=r.__html,a!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof r=="string"?Ga(e,r):(typeof r=="number"||typeof r=="bigint")&&Ga(e,""+r);break;case"onScroll":r!=null&&ye("scroll",e);break;case"onScrollEnd":r!=null&&ye("scrollend",e);break;case"onClick":r!=null&&(e.onclick=un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),f=e[ft]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,o),typeof r=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,o);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):mr(e,a,r)}}}function nt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",e),ye("load",e);var r=!1,o=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Re(e,t,f,g,a,null)}}o&&Re(e,t,"srcSet",a.srcSet,a,null),r&&Re(e,t,"src",a.src,a,null);return;case"input":ye("invalid",e);var S=f=g=o=null,A=null,D=null;for(r in a)if(a.hasOwnProperty(r)){var V=a[r];if(V!=null)switch(r){case"name":o=V;break;case"type":g=V;break;case"checked":A=V;break;case"defaultChecked":D=V;break;case"value":f=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:Re(e,t,r,V,a,null)}}fd(e,f,S,A,D,g,o,!1);return;case"select":ye("invalid",e),r=g=f=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":f=S;break;case"defaultValue":g=S;break;case"multiple":r=S;default:Re(e,t,o,S,a,null)}t=f,a=g,e.multiple=!!r,t!=null?Va(e,!!r,t,!1):a!=null&&Va(e,!!r,a,!0);return;case"textarea":ye("invalid",e),f=o=r=null;for(g in a)if(a.hasOwnProperty(g)&&(S=a[g],S!=null))switch(g){case"value":r=S;break;case"defaultValue":o=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(u(91));break;default:Re(e,t,g,S,a,null)}hd(e,r,o,f);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(r=a[A],r!=null))switch(A){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Re(e,t,A,r,a,null)}return;case"dialog":ye("beforetoggle",e),ye("toggle",e),ye("cancel",e),ye("close",e);break;case"iframe":case"object":ye("load",e);break;case"video":case"audio":for(r=0;r<vi.length;r++)ye(vi[r],e);break;case"image":ye("error",e),ye("load",e);break;case"details":ye("toggle",e);break;case"embed":case"source":case"link":ye("error",e),ye("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(D in a)if(a.hasOwnProperty(D)&&(r=a[D],r!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Re(e,t,D,r,a,null)}return;default:if(Es(t)){for(V in a)a.hasOwnProperty(V)&&(r=a[V],r!==void 0&&oc(e,t,V,r,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(r=a[S],r!=null&&Re(e,t,S,r,a,null))}function nv(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,f=null,g=null,S=null,A=null,D=null,V=null;for(B in a){var $=a[B];if(a.hasOwnProperty(B)&&$!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":A=$;default:r.hasOwnProperty(B)||Re(e,t,B,null,r,$)}}for(var k in r){var B=r[k];if($=a[k],r.hasOwnProperty(k)&&(B!=null||$!=null))switch(k){case"type":f=B;break;case"name":o=B;break;case"checked":D=B;break;case"defaultChecked":V=B;break;case"value":g=B;break;case"defaultValue":S=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(u(137,t));break;default:B!==$&&Re(e,t,k,B,r,$)}}bs(e,g,S,A,D,V,f,o);return;case"select":B=g=S=k=null;for(f in a)if(A=a[f],a.hasOwnProperty(f)&&A!=null)switch(f){case"value":break;case"multiple":B=A;default:r.hasOwnProperty(f)||Re(e,t,f,null,r,A)}for(o in r)if(f=r[o],A=a[o],r.hasOwnProperty(o)&&(f!=null||A!=null))switch(o){case"value":k=f;break;case"defaultValue":S=f;break;case"multiple":g=f;default:f!==A&&Re(e,t,o,f,r,A)}t=S,a=g,r=B,k!=null?Va(e,!!a,k,!1):!!r!=!!a&&(t!=null?Va(e,!!a,t,!0):Va(e,!!a,a?[]:"",!1));return;case"textarea":B=k=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Re(e,t,S,null,r,o)}for(g in r)if(o=r[g],f=a[g],r.hasOwnProperty(g)&&(o!=null||f!=null))switch(g){case"value":k=o;break;case"defaultValue":B=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(u(91));break;default:o!==f&&Re(e,t,g,o,r,f)}dd(e,k,B);return;case"option":for(var ae in a)if(k=a[ae],a.hasOwnProperty(ae)&&k!=null&&!r.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:Re(e,t,ae,null,r,k)}for(A in r)if(k=r[A],B=a[A],r.hasOwnProperty(A)&&k!==B&&(k!=null||B!=null))switch(A){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Re(e,t,A,k,r,B)}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 ce in a)k=a[ce],a.hasOwnProperty(ce)&&k!=null&&!r.hasOwnProperty(ce)&&Re(e,t,ce,null,r,k);for(D in r)if(k=r[D],B=a[D],r.hasOwnProperty(D)&&k!==B&&(k!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(137,t));break;default:Re(e,t,D,k,r,B)}return;default:if(Es(t)){for(var _e in a)k=a[_e],a.hasOwnProperty(_e)&&k!==void 0&&!r.hasOwnProperty(_e)&&oc(e,t,_e,void 0,r,k);for(V in r)k=r[V],B=a[V],!r.hasOwnProperty(V)||k===B||k===void 0&&B===void 0||oc(e,t,V,k,r,B);return}}for(var _ in a)k=a[_],a.hasOwnProperty(_)&&k!=null&&!r.hasOwnProperty(_)&&Re(e,t,_,null,r,k);for($ in r)k=r[$],B=a[$],!r.hasOwnProperty($)||k===B||k==null&&B==null||Re(e,t,$,k,r,B)}function gm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function av(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var o=a[r],f=o.transferSize,g=o.initiatorType,S=o.duration;if(f&&S&&gm(g)){for(g=0,S=o.responseEnd,r+=1;r<a.length;r++){var A=a[r],D=A.startTime;if(D>S)break;var V=A.transferSize,$=A.initiatorType;V&&gm($)&&(A=A.responseEnd,g+=V*(A<S?1:(S-D)/(A-D)))}if(--r,t+=8*(f+g)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var cc=null,fc=null;function hu(e){return e.nodeType===9?e:e.ownerDocument}function ym(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 xm(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 dc(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 hc=null;function lv(){var e=window.event;return e&&e.type==="popstate"?e===hc?!1:(hc=e,!0):(hc=null,!1)}var vm=typeof setTimeout=="function"?setTimeout:void 0,iv=typeof clearTimeout=="function"?clearTimeout:void 0,bm=typeof Promise=="function"?Promise:void 0,rv=typeof queueMicrotask=="function"?queueMicrotask:typeof bm<"u"?function(e){return bm.resolve(null).then(e).catch(uv)}:vm;function uv(e){setTimeout(function(){throw e})}function In(e){return e==="head"}function Sm(e,t){var a=t,r=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(o),bl(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")Si(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Si(a);for(var f=a.firstChild;f;){var g=f.nextSibling,S=f.nodeName;f[Hl]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=g}}else a==="body"&&Si(e.ownerDocument.body);a=o}while(a);bl(t)}function Em(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function pc(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":pc(a),xs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function sv(e,t,a,r){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Hl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function ov(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ut(e.nextSibling),e===null))return null;return e}function Cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function mc(e){return e.data==="$?"||e.data==="$~"}function gc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function cv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Ut(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==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var yc=null;function Nm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ut(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Am(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Tm(e,t,a){switch(t=hu(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 Si(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);xs(e)}var Bt=new Map,jm=new Set;function pu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Cn=H.d;H.d={f:fv,r:dv,D:hv,C:pv,L:mv,m:gv,X:xv,S:yv,M:vv};function fv(){var e=Cn.f(),t=iu();return e||t}function dv(e){var t=Ha(e);t!==null&&t.tag===5&&t.type==="form"?Fh(t):Cn.r(e)}var yl=typeof document>"u"?null:document;function wm(e,t,a){var r=yl;if(r&&typeof t=="string"&&t){var o=Rt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),jm.has(o)||(jm.add(o),e={rel:e,crossOrigin:a,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),nt(t,"link",e),Je(t),r.head.appendChild(t)))}}function hv(e){Cn.D(e),wm("dns-prefetch",e,null)}function pv(e,t){Cn.C(e,t),wm("preconnect",e,t)}function mv(e,t,a){Cn.L(e,t,a);var r=yl;if(r&&e&&t){var o='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Rt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Rt(a.imageSizes)+'"]')):o+='[href="'+Rt(e)+'"]';var f=o;switch(t){case"style":f=xl(e);break;case"script":f=vl(e)}Bt.has(f)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bt.set(f,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(Ei(f))||t==="script"&&r.querySelector(Ci(f))||(t=r.createElement("link"),nt(t,"link",e),Je(t),r.head.appendChild(t)))}}function gv(e,t){Cn.m(e,t);var a=yl;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Rt(r)+'"][href="'+Rt(e)+'"]',f=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=vl(e)}if(!Bt.has(f)&&(e=x({rel:"modulepreload",href:e},t),Bt.set(f,e),a.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ci(f)))return}r=a.createElement("link"),nt(r,"link",e),Je(r),a.head.appendChild(r)}}}function yv(e,t,a){Cn.S(e,t,a);var r=yl;if(r&&e){var o=qa(r).hoistableStyles,f=xl(e);t=t||"default";var g=o.get(f);if(!g){var S={loading:0,preload:null};if(g=r.querySelector(Ei(f)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bt.get(f))&&xc(e,a);var A=g=r.createElement("link");Je(A),nt(A,"link",e),A._p=new Promise(function(D,V){A.onload=D,A.onerror=V}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,mu(g,t,r)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(f,g)}}}function xv(e,t){Cn.X(e,t);var a=yl;if(a&&e){var r=qa(a).hoistableScripts,o=vl(e),f=r.get(o);f||(f=a.querySelector(Ci(o)),f||(e=x({src:e,async:!0},t),(t=Bt.get(o))&&vc(e,t),f=a.createElement("script"),Je(f),nt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(o,f))}}function vv(e,t){Cn.M(e,t);var a=yl;if(a&&e){var r=qa(a).hoistableScripts,o=vl(e),f=r.get(o);f||(f=a.querySelector(Ci(o)),f||(e=x({src:e,async:!0,type:"module"},t),(t=Bt.get(o))&&vc(e,t),f=a.createElement("script"),Je(f),nt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(o,f))}}function Om(e,t,a,r){var o=(o=Ae.current)?pu(o):null;if(!o)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=xl(a.href),a=qa(o).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=xl(a.href);var f=qa(o).hoistableStyles,g=f.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=o.querySelector(Ei(e)))&&!f._p&&(g.instance=f,g.state.loading=5),Bt.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},Bt.set(e,a),f||bv(o,e,a,g.state))),t&&r===null)throw Error(u(528,""));return g}if(t&&r!==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=vl(a),a=qa(o).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function xl(e){return'href="'+Rt(e)+'"'}function Ei(e){return'link[rel="stylesheet"]['+e+"]"}function Rm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function bv(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),nt(t,"link",a),Je(t),e.head.appendChild(t))}function vl(e){return'[src="'+Rt(e)+'"]'}function Ci(e){return"script[async]"+e}function _m(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Rt(a.href)+'"]');if(r)return t.instance=r,Je(r),r;var o=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Je(r),nt(r,"style",o),mu(r,a.precedence,e),t.instance=r;case"stylesheet":o=xl(a.href);var f=e.querySelector(Ei(o));if(f)return t.state.loading|=4,t.instance=f,Je(f),f;r=Rm(a),(o=Bt.get(o))&&xc(r,o),f=(e.ownerDocument||e).createElement("link"),Je(f);var g=f;return g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),nt(f,"link",r),t.state.loading|=4,mu(f,a.precedence,e),t.instance=f;case"script":return f=vl(a.src),(o=e.querySelector(Ci(f)))?(t.instance=o,Je(o),o):(r=a,(o=Bt.get(f))&&(r=x({},a),vc(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),Je(o),nt(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,mu(r,a.precedence,e));return t.instance}function mu(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,f=o,g=0;g<r.length;g++){var S=r[g];if(S.dataset.precedence===t)f=S;else if(f!==o)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gu=null;function Mm(e,t,a){if(gu===null){var r=new Map,o=gu=new Map;o.set(a,r)}else o=gu,r=o.get(a),r||(r=new Map,o.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var f=a[o];if(!(f[Hl]||f[We]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(t)||"";g=e+g;var S=r.get(g);S?S.push(f):r.set(g,[f])}}return r}function zm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Sv(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 Lm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ev(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=xl(r.href),f=t.querySelector(Ei(o));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=yu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,Je(f);return}f=t.ownerDocument||t,r=Rm(r),(o=Bt.get(o))&&xc(r,o),f=f.createElement("link"),Je(f);var g=f;g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),nt(f,"link",r),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=yu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var bc=0;function Cv(e,t){return e.stylesheets&&e.count===0&&vu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&vu(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&bc===0&&(bc=62500*av());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&vu(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>bc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function yu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xu=null;function vu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xu=new Map,t.forEach(Nv,e),xu=null,yu.call(e))}function Nv(e,t){if(!(t.state.loading&4)){var a=xu.get(e);if(a)var r=a.get(null);else{a=new Map,xu.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<o.length;f++){var g=o[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),r=g)}r&&a.set(null,r)}o=t.instance,g=o.getAttribute("data-precedence"),f=a.get(g)||r,f===r&&a.set(null,o),a.set(g,o),this.count++,r=yu.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),f?f.parentNode.insertBefore(o,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Ni={$$typeof:z,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function Av(e,t,a,r,o,f,g,S,A){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=ps(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ps(0),this.hiddenUpdates=ps(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Dm(e,t,a,r,o,f,g,S,A,D,V,$){return e=new Av(e,t,a,g,A,D,V,$,S),t=1,f===!0&&(t|=24),f=Ct(3,null,null,t),e.current=f,f.stateNode=e,t=Ws(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:r,isDehydrated:a,cache:t},no(f),e}function km(e){return e?(e=Ja,e):Ja}function Um(e,t,a,r,o,f){o=km(o),r.context===null?r.context=o:r.pendingContext=o,r=qn(t),r.payload={element:a},f=f===void 0?null:f,f!==null&&(r.callback=f),a=Yn(e,r,t),a!==null&&(yt(a,e,t),ni(a,e,t))}function Bm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Sc(e,t){Bm(e,t),(e=e.alternate)&&Bm(e,t)}function Hm(e){if(e.tag===13||e.tag===31){var t=ma(e,67108864);t!==null&&yt(t,e,67108864),Sc(e,67108864)}}function qm(e){if(e.tag===13||e.tag===31){var t=wt();t=ms(t);var a=ma(e,t);a!==null&&yt(a,e,t),Sc(e,t)}}var bu=!0;function Tv(e,t,a,r){var o=M.T;M.T=null;var f=H.p;try{H.p=2,Ec(e,t,a,r)}finally{H.p=f,M.T=o}}function jv(e,t,a,r){var o=M.T;M.T=null;var f=H.p;try{H.p=8,Ec(e,t,a,r)}finally{H.p=f,M.T=o}}function Ec(e,t,a,r){if(bu){var o=Cc(r);if(o===null)sc(e,t,r,Su,a),Vm(e,r);else if(Ov(o,e,t,a,r))r.stopPropagation();else if(Vm(e,r),t&4&&-1<wv.indexOf(e)){for(;o!==null;){var f=Ha(o);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=ca(f.pendingLanes);if(g!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var A=1<<31-St(g);S.entanglements[1]|=A,g&=~A}Wt(f),(Ce&6)===0&&(au=ze()+500,xi(0))}}break;case 31:case 13:S=ma(f,2),S!==null&&yt(S,f,2),iu(),Sc(f,2)}if(f=Cc(r),f===null&&sc(e,t,r,Su,a),f===o)break;o=f}o!==null&&r.stopPropagation()}else sc(e,t,r,null,a)}}function Cc(e){return e=Ns(e),Nc(e)}var Su=null;function Nc(e){if(Su=null,e=Ba(e),e!==null){var t=c(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){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 Su=e,null}function Ym(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(La()){case oa:return 2;case Da:return 8;case ka:case cr:return 32;case Dl:return 268435456;default:return 32}default:return 32}}var Ac=!1,Wn=null,Pn=null,ea=null,Ai=new Map,Ti=new Map,ta=[],wv="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 Vm(e,t){switch(e){case"focusin":case"focusout":Wn=null;break;case"dragenter":case"dragleave":Pn=null;break;case"mouseover":case"mouseout":ea=null;break;case"pointerover":case"pointerout":Ai.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ti.delete(t.pointerId)}}function ji(e,t,a,r,o,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:f,targetContainers:[o]},t!==null&&(t=Ha(t),t!==null&&Hm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Ov(e,t,a,r,o){switch(t){case"focusin":return Wn=ji(Wn,e,t,a,r,o),!0;case"dragenter":return Pn=ji(Pn,e,t,a,r,o),!0;case"mouseover":return ea=ji(ea,e,t,a,r,o),!0;case"pointerover":var f=o.pointerId;return Ai.set(f,ji(Ai.get(f)||null,e,t,a,r,o)),!0;case"gotpointercapture":return f=o.pointerId,Ti.set(f,ji(Ti.get(f)||null,e,t,a,r,o)),!0}return!1}function Gm(e){var t=Ba(e.target);if(t!==null){var a=c(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,ad(e.priority,function(){qm(a)});return}}else if(t===31){if(t=h(a),t!==null){e.blockedOn=t,ad(e.priority,function(){qm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Eu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Cc(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);Cs=r,a.target.dispatchEvent(r),Cs=null}else return t=Ha(a),t!==null&&Hm(t),e.blockedOn=a,!1;t.shift()}return!0}function Fm(e,t,a){Eu(e)&&a.delete(t)}function Rv(){Ac=!1,Wn!==null&&Eu(Wn)&&(Wn=null),Pn!==null&&Eu(Pn)&&(Pn=null),ea!==null&&Eu(ea)&&(ea=null),Ai.forEach(Fm),Ti.forEach(Fm)}function Cu(e,t){e.blockedOn===t&&(e.blockedOn=null,Ac||(Ac=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Rv)))}var Nu=null;function $m(e){Nu!==e&&(Nu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Nu===e&&(Nu=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(Nc(r||a)===null)continue;break}var f=Ha(a);f!==null&&(e.splice(t,3),t-=3,Co(f,{pending:!0,data:o,method:a.method,action:r},r,o))}}))}function bl(e){function t(A){return Cu(A,e)}Wn!==null&&Cu(Wn,e),Pn!==null&&Cu(Pn,e),ea!==null&&Cu(ea,e),Ai.forEach(t),Ti.forEach(t);for(var a=0;a<ta.length;a++){var r=ta[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ta.length&&(a=ta[0],a.blockedOn===null);)Gm(a),a.blockedOn===null&&ta.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var o=a[r],f=a[r+1],g=o[ft]||null;if(typeof f=="function")g||$m(a);else if(g){var S=null;if(f&&f.hasAttribute("formAction")){if(o=f,g=f[ft]||null)S=g.formAction;else if(Nc(o)!==null)continue}else S=g.action;typeof S=="function"?a[r+1]=S:(a.splice(r,3),r-=3),$m(a)}}}function Km(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Tc(e){this._internalRoot=e}Au.prototype.render=Tc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,r=wt();Um(a,r,e,t,null,null)},Au.prototype.unmount=Tc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Um(e.current,2,null,e,null,null),iu(),t[Ua]=null}};function Au(e){this._internalRoot=e}Au.prototype.unstable_scheduleHydration=function(e){if(e){var t=nd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ta.length&&t!==0&&t<ta[a].priority;a++);ta.splice(a,0,e),a===0&&Gm(e)}};var Xm=l.version;if(Xm!=="19.2.6")throw Error(u(527,Xm,"19.2.6"));H.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=m(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var _v={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{kl=Tu.inject(_v),bt=Tu}catch{}}return Oi.createRoot=function(e,t){if(!s(e))throw Error(u(299));var a=!1,r="",o=ep,f=tp,g=np;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Dm(e,1,!1,null,null,a,r,null,o,f,g,Km),e[Ua]=t.current,uc(e),new Tc(t)},Oi.hydrateRoot=function(e,t,a){if(!s(e))throw Error(u(299));var r=!1,o="",f=ep,g=tp,S=np,A=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),t=Dm(e,1,!0,t,a??null,r,o,A,f,g,S,Km),t.context=km(null),a=t.current,r=wt(),r=ms(r),o=qn(r),o.callback=null,Yn(a,o,r),a=r,t.current.lanes=a,Bl(t,a),Wt(t),e[Ua]=t.current,uc(e),new Au(t)},Oi.version="19.2.6",Oi}var eg;function Xv(){if(eg)return jc.exports;eg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),jc.exports=Kv(),jc.exports}var Qv=Xv();/**
|
|
34
|
+
* react-router v7.15.1
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) Remix Software Inc.
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the MIT license found in the
|
|
39
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
40
|
+
*
|
|
41
|
+
* @license MIT
|
|
42
|
+
*/var tg="popstate";function ng(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Zv(n={}){function l(u,s){var m;let c=(m=s.state)==null?void 0:m.masked,{pathname:d,search:h,hash:p}=c||u.location;return ef("",{pathname:d,search:h,hash:p},s.state&&s.state.usr||null,s.state&&s.state.key||"default",c?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function i(u,s){return typeof s=="string"?s:Yi(s)}return Iv(l,i,null,n)}function Ue(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function nn(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Jv(){return Math.random().toString(36).substring(2,10)}function ag(n,l){return{usr:n.state,key:n.key,idx:l,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function ef(n,l,i=null,u,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?Ol(l):l,state:i,key:l&&l.key||u||Jv(),mask:s}}function Yi({pathname:n="/",search:l="",hash:i=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Ol(n){let l={};if(n){let i=n.indexOf("#");i>=0&&(l.hash=n.substring(i),n=n.substring(0,i));let u=n.indexOf("?");u>=0&&(l.search=n.substring(u),n=n.substring(0,u)),n&&(l.pathname=n)}return l}function Iv(n,l,i,u={}){let{window:s=document.defaultView,v5Compat:c=!1}=u,d=s.history,h="POP",p=null,m=v();m==null&&(m=0,d.replaceState({...d.state,idx:m},""));function v(){return(d.state||{idx:null}).idx}function x(){h="POP";let T=v(),R=T==null?null:T-m;m=T,p&&p({action:h,location:w.location,delta:R})}function E(T,R){h="PUSH";let j=ng(T)?T:ef(w.location,T,R);m=v()+1;let z=ag(j,m),U=w.createHref(j.mask||j);try{d.pushState(z,"",U)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;s.location.assign(U)}c&&p&&p({action:h,location:w.location,delta:1})}function C(T,R){h="REPLACE";let j=ng(T)?T:ef(w.location,T,R);m=v();let z=ag(j,m),U=w.createHref(j.mask||j);d.replaceState(z,"",U),c&&p&&p({action:h,location:w.location,delta:0})}function N(T){return Wv(T)}let w={get action(){return h},get location(){return n(s,d)},listen(T){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(tg,x),p=T,()=>{s.removeEventListener(tg,x),p=null}},createHref(T){return l(s,T)},createURL:N,encodeLocation(T){let R=N(T);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:E,replace:C,go(T){return d.go(T)}};return w}function Wv(n,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(i,"No window.location.(origin|href) available to create URL");let u=typeof n=="string"?n:Yi(n);return u=u.replace(/ $/,"%20"),!l&&u.startsWith("//")&&(u=i+u),new URL(u,i)}function m0(n,l,i="/"){return Pv(n,l,i,!1)}function Pv(n,l,i,u,s){let c=typeof l=="string"?Ol(l):l,d=jn(c.pathname||"/",i);if(d==null)return null;let h=eb(n),p=null,m=db(d);for(let v=0;p==null&&v<h.length;++v)p=cb(h[v],m,u);return p}function eb(n){let l=g0(n);return tb(l),l}function g0(n,l=[],i=[],u="",s=!1){let c=(d,h,p=s,m)=>{let v={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(u)&&p)return;Ue(v.relativePath.startsWith(u),`Absolute route path "${v.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(u.length)}let x=$t([u,v.relativePath]),E=i.concat(v);d.children&&d.children.length>0&&(Ue(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),g0(d.children,l,E,x,p)),!(d.path==null&&!d.index)&&l.push({path:x,score:sb(x,d.index),routesMeta:E})};return n.forEach((d,h)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))c(d,h);else for(let m of y0(d.path))c(d,h,!0,m)}),l}function y0(n){let l=n.split("/");if(l.length===0)return[];let[i,...u]=l,s=i.endsWith("?"),c=i.replace(/\?$/,"");if(u.length===0)return s?[c,""]:[c];let d=y0(u.join("/")),h=[];return h.push(...d.map(p=>p===""?c:[c,p].join("/"))),s&&h.push(...d),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function tb(n){n.sort((l,i)=>l.score!==i.score?i.score-l.score:ob(l.routesMeta.map(u=>u.childrenIndex),i.routesMeta.map(u=>u.childrenIndex)))}var nb=/^:[\w-]+$/,ab=3,lb=2,ib=1,rb=10,ub=-2,lg=n=>n==="*";function sb(n,l){let i=n.split("/"),u=i.length;return i.some(lg)&&(u+=ub),l&&(u+=lb),i.filter(s=>!lg(s)).reduce((s,c)=>s+(nb.test(c)?ab:c===""?ib:rb),u)}function ob(n,l){return n.length===l.length&&n.slice(0,-1).every((u,s)=>u===l[s])?n[n.length-1]-l[l.length-1]:0}function cb(n,l,i=!1){let{routesMeta:u}=n,s={},c="/",d=[];for(let h=0;h<u.length;++h){let p=u[h],m=h===u.length-1,v=c==="/"?l:l.slice(c.length)||"/",x=Yu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},v),E=p.route;if(!x&&m&&i&&!u[u.length-1].route.index&&(x=Yu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!x)return null;Object.assign(s,x.params),d.push({params:s,pathname:$t([c,x.pathname]),pathnameBase:gb($t([c,x.pathnameBase])),route:E}),x.pathnameBase!=="/"&&(c=$t([c,x.pathnameBase]))}return d}function Yu(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,u]=fb(n.path,n.caseSensitive,n.end),s=l.match(i);if(!s)return null;let c=s[0],d=c.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:u.reduce((m,{paramName:v,isOptional:x},E)=>{if(v==="*"){let N=h[E]||"";d=c.slice(0,c.length-N.length).replace(/(.)\/+$/,"$1")}const C=h[E];return x&&!C?m[v]=void 0:m[v]=(C||"").replace(/%2F/g,"/"),m},{}),pathname:c,pathnameBase:d,pattern:n}}function fb(n,l=!1,i=!0){nn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let u=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p,m,v)=>{if(u.push({paramName:h,isOptional:p!=null}),p){let x=v.charAt(m+d.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,l?void 0:"i"),u]}function db(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return nn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function jn(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,u=n.charAt(i);return u&&u!=="/"?null:n.slice(i)||"/"}var hb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function pb(n,l="/"){let{pathname:i,search:u="",hash:s=""}=typeof n=="string"?Ol(n):n,c;return i?(i=v0(i),i.startsWith("/")?c=ig(i.substring(1),"/"):c=ig(i,l)):c=l,{pathname:c,search:yb(u),hash:xb(s)}}function ig(n,l){let i=Vu(l).split("/");return n.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function _c(n,l,i,u){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mb(n){return n.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function x0(n){let l=mb(n);return l.map((i,u)=>u===l.length-1?i.pathname:i.pathnameBase)}function Af(n,l,i,u=!1){let s;typeof n=="string"?s=Ol(n):(s={...n},Ue(!s.pathname||!s.pathname.includes("?"),_c("?","pathname","search",s)),Ue(!s.pathname||!s.pathname.includes("#"),_c("#","pathname","hash",s)),Ue(!s.search||!s.search.includes("#"),_c("#","search","hash",s)));let c=n===""||s.pathname==="",d=c?"/":s.pathname,h;if(d==null)h=i;else{let x=l.length-1;if(!u&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),x-=1;s.pathname=E.join("/")}h=x>=0?l[x]:"/"}let p=pb(s,h),m=d&&d!=="/"&&d.endsWith("/"),v=(c||d===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}var v0=n=>n.replace(/\/\/+/g,"/"),$t=n=>v0(n.join("/")),Vu=n=>n.replace(/\/+$/,""),gb=n=>Vu(n).replace(/^\/*/,"/"),yb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,xb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,vb=class{constructor(n,l,i,u=!1){this.status=n,this.statusText=l||"",this.internal=u,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function bb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Sb(n){let l=n.map(i=>i.route.path).filter(Boolean);return $t(l)||"/"}var b0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function S0(n,l){let i=n;if(typeof i!="string"||!hb.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let u=i,s=!1;if(b0)try{let c=new URL(window.location.href),d=i.startsWith("//")?new URL(c.protocol+i):new URL(i),h=jn(d.pathname,l);d.origin===c.origin&&h!=null?i=h+d.search+d.hash:s=!0}catch{nn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:s,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var E0=["POST","PUT","PATCH","DELETE"];new Set(E0);var Eb=["GET",...E0];new Set(Eb);var Rl=b.createContext(null);Rl.displayName="DataRouter";var us=b.createContext(null);us.displayName="DataRouterState";var C0=b.createContext(!1);function Cb(){return b.useContext(C0)}var N0=b.createContext({isTransitioning:!1});N0.displayName="ViewTransition";var Nb=b.createContext(new Map);Nb.displayName="Fetchers";var Ab=b.createContext(null);Ab.displayName="Await";var Yt=b.createContext(null);Yt.displayName="Navigation";var Ii=b.createContext(null);Ii.displayName="Location";var Kt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Kt.displayName="Route";var Tf=b.createContext(null);Tf.displayName="RouteError";var A0="REACT_ROUTER_ERROR",Tb="REDIRECT",jb="ROUTE_ERROR_RESPONSE";function wb(n){if(n.startsWith(`${A0}:${Tb}:{`))try{let l=JSON.parse(n.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function Ob(n){if(n.startsWith(`${A0}:${jb}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new vb(l.status,l.statusText,l.data)}catch{}}function Rb(n,{relative:l}={}){Ue(Wi(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:u}=b.useContext(Yt),{hash:s,pathname:c,search:d}=Pi(n,{relative:l}),h=c;return i!=="/"&&(h=c==="/"?i:$t([i,c])),u.createHref({pathname:h,search:d,hash:s})}function Wi(){return b.useContext(Ii)!=null}function an(){return Ue(Wi(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Ii).location}var T0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function j0(n){b.useContext(Yt).static||b.useLayoutEffect(n)}function ss(){let{isDataRoute:n}=b.useContext(Kt);return n?Kb():_b()}function _b(){Ue(Wi(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(Rl),{basename:l,navigator:i}=b.useContext(Yt),{matches:u}=b.useContext(Kt),{pathname:s}=an(),c=JSON.stringify(x0(u)),d=b.useRef(!1);return j0(()=>{d.current=!0}),b.useCallback((p,m={})=>{if(nn(d.current,T0),!d.current)return;if(typeof p=="number"){i.go(p);return}let v=Af(p,JSON.parse(c),s,m.relative==="path");n==null&&l!=="/"&&(v.pathname=v.pathname==="/"?l:$t([l,v.pathname])),(m.replace?i.replace:i.push)(v,m.state,m)},[l,i,c,s,n])}var Mb=b.createContext(null);function zb(n){let l=b.useContext(Kt).outlet;return b.useMemo(()=>l&&b.createElement(Mb.Provider,{value:n},l),[l,n])}function Lb(){let{matches:n}=b.useContext(Kt),l=n[n.length-1];return(l==null?void 0:l.params)??{}}function Pi(n,{relative:l}={}){let{matches:i}=b.useContext(Kt),{pathname:u}=an(),s=JSON.stringify(x0(i));return b.useMemo(()=>Af(n,JSON.parse(s),u,l==="path"),[n,s,u,l])}function Db(n,l){return w0(n,l)}function w0(n,l,i){var T;Ue(Wi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=b.useContext(Yt),{matches:s}=b.useContext(Kt),c=s[s.length-1],d=c?c.params:{},h=c?c.pathname:"/",p=c?c.pathnameBase:"/",m=c&&c.route;{let R=m&&m.path||"";R0(h,!m||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
43
|
+
|
|
44
|
+
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let v=an(),x;if(l){let R=typeof l=="string"?Ol(l):l;Ue(p==="/"||((T=R.pathname)==null?void 0:T.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${R.pathname}" was given in the \`location\` prop.`),x=R}else x=v;let E=x.pathname||"/",C=E;if(p!=="/"){let R=p.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(R.length).join("/")}let N=i&&i.state.matches.length?i.state.matches.map(R=>Object.assign(R,{route:i.manifest[R.route.id]||R.route})):m0(n,{pathname:C});nn(m||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),nn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=qb(N&&N.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:$t([p,u.encodeLocation?u.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?p:$t([p,u.encodeLocation?u.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),s,i);return l&&w?b.createElement(Ii.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},w):w}function kb(){let n=$b(),l=bb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:u},c={padding:"2px 4px",backgroundColor:u},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:c},"ErrorBoundary")," or"," ",b.createElement("code",{style:c},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},l),i?b.createElement("pre",{style:s},i):null,d)}var Ub=b.createElement(kb,null),O0=class extends b.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){this.props.onError?this.props.onError(n,l):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=Ob(n.digest);i&&(n=i)}let l=n!==void 0?b.createElement(Kt.Provider,{value:this.props.routeContext},b.createElement(Tf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?b.createElement(Bb,{error:n},l):l}};O0.contextType=C0;var Mc=new WeakMap;function Bb({children:n,error:l}){let{basename:i}=b.useContext(Yt);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let u=wb(l.digest);if(u){let s=Mc.get(l);if(s)throw s;let c=S0(u.location,i);if(b0&&!Mc.get(l))if(c.isExternal||u.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:u.replace}));throw Mc.set(l,d),d}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return n}function Hb({routeContext:n,match:l,children:i}){let u=b.useContext(Rl);return u&&u.static&&u.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=l.route.id),b.createElement(Kt.Provider,{value:n},i)}function qb(n,l=[],i){let u=i==null?void 0:i.state;if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(l.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let s=n,c=u==null?void 0:u.errors;if(c!=null){let v=s.findIndex(x=>x.route.id&&(c==null?void 0:c[x.route.id])!==void 0);Ue(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,v+1))}let d=!1,h=-1;if(i&&u){d=u.renderFallback;for(let v=0;v<s.length;v++){let x=s[v];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(h=v),x.route.id){let{loaderData:E,errors:C}=u,N=x.route.loader&&!E.hasOwnProperty(x.route.id)&&(!C||C[x.route.id]===void 0);if(x.route.lazy||N){i.isStatic&&(d=!0),h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let p=i==null?void 0:i.onError,m=u&&p?(v,x)=>{var E,C;p(v,{location:u.location,params:((C=(E=u.matches)==null?void 0:E[0])==null?void 0:C.params)??{},pattern:Sb(u.matches),errorInfo:x})}:void 0;return s.reduceRight((v,x,E)=>{let C,N=!1,w=null,T=null;u&&(C=c&&x.route.id?c[x.route.id]:void 0,w=x.route.errorElement||Ub,d&&(h<0&&E===0?(R0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,T=null):h===E&&(N=!0,T=x.route.hydrateFallbackElement||null)));let R=l.concat(s.slice(0,E+1)),j=()=>{let z;return C?z=w:N?z=T:x.route.Component?z=b.createElement(x.route.Component,null):x.route.element?z=x.route.element:z=v,b.createElement(Hb,{match:x,routeContext:{outlet:v,matches:R,isDataRoute:u!=null},children:z})};return u&&(x.route.ErrorBoundary||x.route.errorElement||E===0)?b.createElement(O0,{location:u.location,revalidation:u.revalidation,component:w,error:C,children:j(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:m}):j()},null)}function jf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yb(n){let l=b.useContext(Rl);return Ue(l,jf(n)),l}function Vb(n){let l=b.useContext(us);return Ue(l,jf(n)),l}function Gb(n){let l=b.useContext(Kt);return Ue(l,jf(n)),l}function wf(n){let l=Gb(n),i=l.matches[l.matches.length-1];return Ue(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function Fb(){return wf("useRouteId")}function $b(){var u;let n=b.useContext(Tf),l=Vb("useRouteError"),i=wf("useRouteError");return n!==void 0?n:(u=l.errors)==null?void 0:u[i]}function Kb(){let{router:n}=Yb("useNavigate"),l=wf("useNavigate"),i=b.useRef(!1);return j0(()=>{i.current=!0}),b.useCallback(async(s,c={})=>{nn(i.current,T0),i.current&&(typeof s=="number"?await n.navigate(s):await n.navigate(s,{fromRouteId:l,...c}))},[n,l])}var rg={};function R0(n,l,i){!l&&!rg[n]&&(rg[n]=!0,nn(!1,i))}b.memo(Xb);function Xb({routes:n,manifest:l,future:i,state:u,isStatic:s,onError:c}){return w0(n,void 0,{manifest:l,state:u,isStatic:s,onError:c})}function Qb(n){return zb(n.context)}function Mi(n){Ue(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Zb({basename:n="/",children:l=null,location:i,navigationType:u="POP",navigator:s,static:c=!1,useTransitions:d}){Ue(!Wi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),p=b.useMemo(()=>({basename:h,navigator:s,static:c,useTransitions:d,future:{}}),[h,s,c,d]);typeof i=="string"&&(i=Ol(i));let{pathname:m="/",search:v="",hash:x="",state:E=null,key:C="default",mask:N}=i,w=b.useMemo(()=>{let T=jn(m,h);return T==null?null:{location:{pathname:T,search:v,hash:x,state:E,key:C,mask:N},navigationType:u}},[h,m,v,x,E,C,u,N]);return nn(w!=null,`<Router basename="${h}"> is not able to match the URL "${m}${v}${x}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:b.createElement(Yt.Provider,{value:p},b.createElement(Ii.Provider,{children:l,value:w}))}function Jb({children:n,location:l}){return Db(tf(n),l)}function tf(n,l=[]){let i=[];return b.Children.forEach(n,(u,s)=>{if(!b.isValidElement(u))return;let c=[...l,s];if(u.type===b.Fragment){i.push.apply(i,tf(u.props.children,c));return}Ue(u.type===Mi,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ue(!u.props.index||!u.props.children,"An index route cannot have child routes.");let d={id:u.props.id||c.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(d.children=tf(u.props.children,c)),i.push(d)}),i}var Lu="get",Du="application/x-www-form-urlencoded";function os(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Ib(n){return os(n)&&n.tagName.toLowerCase()==="button"}function Wb(n){return os(n)&&n.tagName.toLowerCase()==="form"}function Pb(n){return os(n)&&n.tagName.toLowerCase()==="input"}function e2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function t2(n,l){return n.button===0&&(!l||l==="_self")&&!e2(n)}var Ru=null;function n2(){if(Ru===null)try{new FormData(document.createElement("form"),0),Ru=!1}catch{Ru=!0}return Ru}var a2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zc(n){return n!=null&&!a2.has(n)?(nn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Du}"`),null):n}function l2(n,l){let i,u,s,c,d;if(Wb(n)){let h=n.getAttribute("action");u=h?jn(h,l):null,i=n.getAttribute("method")||Lu,s=zc(n.getAttribute("enctype"))||Du,c=new FormData(n)}else if(Ib(n)||Pb(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||h.getAttribute("action");if(u=p?jn(p,l):null,i=n.getAttribute("formmethod")||h.getAttribute("method")||Lu,s=zc(n.getAttribute("formenctype"))||zc(h.getAttribute("enctype"))||Du,c=new FormData(h,n),!n2()){let{name:m,type:v,value:x}=n;if(v==="image"){let E=m?`${m}.`:"";c.append(`${E}x`,"0"),c.append(`${E}y`,"0")}else m&&c.append(m,x)}}else{if(os(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Lu,u=null,s=Du,d=n}return c&&s==="text/plain"&&(d=c,c=void 0),{action:u,method:i.toLowerCase(),encType:s,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Of(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function _0(n,l,i,u){let s=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${u}`:s.pathname=`${s.pathname}.${u}`:s.pathname==="/"?s.pathname=`_root.${u}`:l&&jn(s.pathname,l)==="/"?s.pathname=`${Vu(l)}/_root.${u}`:s.pathname=`${Vu(s.pathname)}.${u}`,s}async function i2(n,l){if(n.id in l)return l[n.id];try{let i=await import(n.module);return l[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function r2(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function u2(n,l,i){let u=await Promise.all(n.map(async s=>{let c=l.routes[s.route.id];if(c){let d=await i2(c,i);return d.links?d.links():[]}return[]}));return f2(u.flat(1).filter(r2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function ug(n,l,i,u,s,c){let d=(p,m)=>i[m]?p.route.id!==i[m].route.id:!0,h=(p,m)=>{var v;return i[m].pathname!==p.pathname||((v=i[m].route.path)==null?void 0:v.endsWith("*"))&&i[m].params["*"]!==p.params["*"]};return c==="assets"?l.filter((p,m)=>d(p,m)||h(p,m)):c==="data"?l.filter((p,m)=>{var x;let v=u.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(d(p,m)||h(p,m))return!0;if(p.route.shouldRevalidate){let E=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((x=i[0])==null?void 0:x.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function s2(n,l,{includeHydrateFallback:i}={}){return o2(n.map(u=>{let s=l.routes[u.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),i&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function o2(n){return[...new Set(n)]}function c2(n){let l={},i=Object.keys(n).sort();for(let u of i)l[u]=n[u];return l}function f2(n,l){let i=new Set;return new Set(l),n.reduce((u,s)=>{let c=JSON.stringify(c2(s));return i.has(c)||(i.add(c),u.push({key:c,link:s})),u},[])}function Rf(){let n=b.useContext(Rl);return Of(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function d2(){let n=b.useContext(us);return Of(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var _f=b.createContext(void 0);_f.displayName="FrameworkContext";function Mf(){let n=b.useContext(_f);return Of(n,"You must render this element inside a <HydratedRouter> element"),n}function h2(n,l){let i=b.useContext(_f),[u,s]=b.useState(!1),[c,d]=b.useState(!1),{onFocus:h,onBlur:p,onMouseEnter:m,onMouseLeave:v,onTouchStart:x}=l,E=b.useRef(null);b.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let w=R=>{R.forEach(j=>{d(j.isIntersecting)})},T=new IntersectionObserver(w,{threshold:.5});return E.current&&T.observe(E.current),()=>{T.disconnect()}}},[n]),b.useEffect(()=>{if(u){let w=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(w)}}},[u]);let C=()=>{s(!0)},N=()=>{s(!1),d(!1)};return i?n!=="intent"?[c,E,{}]:[c,E,{onFocus:Ri(h,C),onBlur:Ri(p,N),onMouseEnter:Ri(m,C),onMouseLeave:Ri(v,N),onTouchStart:Ri(x,C)}]:[!1,E,{}]}function Ri(n,l){return i=>{n&&n(i),i.defaultPrevented||l(i)}}function p2({page:n,...l}){let i=Cb(),{router:u}=Rf(),s=b.useMemo(()=>m0(u.routes,n,u.basename),[u.routes,n,u.basename]);return s?i?b.createElement(g2,{page:n,matches:s,...l}):b.createElement(y2,{page:n,matches:s,...l}):null}function m2(n){let{manifest:l,routeModules:i}=Mf(),[u,s]=b.useState([]);return b.useEffect(()=>{let c=!1;return u2(n,l,i).then(d=>{c||s(d)}),()=>{c=!0}},[n,l,i]),u}function g2({page:n,matches:l,...i}){let u=an(),{future:s}=Mf(),{basename:c}=Rf(),d=b.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let h=_0(n,c,s.unstable_trailingSlashAwareDataRequests,"rsc"),p=!1,m=[];for(let v of l)typeof v.route.shouldRevalidate=="function"?p=!0:m.push(v.route.id);return p&&m.length>0&&h.searchParams.set("_routes",m.join(",")),[h.pathname+h.search]},[c,s.unstable_trailingSlashAwareDataRequests,n,u,l]);return b.createElement(b.Fragment,null,d.map(h=>b.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...i})))}function y2({page:n,matches:l,...i}){let u=an(),{future:s,manifest:c,routeModules:d}=Mf(),{basename:h}=Rf(),{loaderData:p,matches:m}=d2(),v=b.useMemo(()=>ug(n,l,m,c,u,"data"),[n,l,m,c,u]),x=b.useMemo(()=>ug(n,l,m,c,u,"assets"),[n,l,m,c,u]),E=b.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let w=new Set,T=!1;if(l.forEach(j=>{var U;let z=c.routes[j.route.id];!z||!z.hasLoader||(!v.some(X=>X.route.id===j.route.id)&&j.route.id in p&&((U=d[j.route.id])!=null&&U.shouldRevalidate)||z.hasClientLoader?T=!0:w.add(j.route.id))}),w.size===0)return[];let R=_0(n,h,s.unstable_trailingSlashAwareDataRequests,"data");return T&&w.size>0&&R.searchParams.set("_routes",l.filter(j=>w.has(j.route.id)).map(j=>j.route.id).join(",")),[R.pathname+R.search]},[h,s.unstable_trailingSlashAwareDataRequests,p,u,c,v,l,n,d]),C=b.useMemo(()=>s2(x,c),[x,c]),N=m2(x);return b.createElement(b.Fragment,null,E.map(w=>b.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),C.map(w=>b.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),N.map(({key:w,link:T})=>b.createElement("link",{key:w,nonce:i.nonce,...T,crossOrigin:T.crossOrigin??i.crossOrigin})))}function x2(...n){return l=>{n.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var v2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{v2&&(window.__reactRouterVersion="7.15.1")}catch{}function b2({basename:n,children:l,useTransitions:i,window:u}){let s=b.useRef();s.current==null&&(s.current=Zv({window:u,v5Compat:!0}));let c=s.current,[d,h]=b.useState({action:c.action,location:c.location}),p=b.useCallback(m=>{i===!1?h(m):b.startTransition(()=>h(m))},[i]);return b.useLayoutEffect(()=>c.listen(p),[c,p]),b.createElement(Zb,{basename:n,children:l,location:d.location,navigationType:d.action,navigator:c,useTransitions:i})}var M0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,z0=b.forwardRef(function({onClick:l,discover:i="render",prefetch:u="none",relative:s,reloadDocument:c,replace:d,mask:h,state:p,target:m,to:v,preventScrollReset:x,viewTransition:E,defaultShouldRevalidate:C,...N},w){let{basename:T,navigator:R,useTransitions:j}=b.useContext(Yt),z=typeof v=="string"&&M0.test(v),U=S0(v,T);v=U.to;let X=Rb(v,{relative:s}),Q=an(),F=null;if(h){let re=Af(h,[],Q.mask?Q.mask.pathname:"/",!0);T!=="/"&&(re.pathname=re.pathname==="/"?T:$t([T,re.pathname])),F=R.createHref(re)}let[K,q,J]=h2(u,N),oe=N2(v,{replace:d,mask:h,state:p,target:m,preventScrollReset:x,relative:s,viewTransition:E,defaultShouldRevalidate:C,useTransitions:j});function ee(re){l&&l(re),re.defaultPrevented||oe(re)}let le=!(U.isExternal||c),te=b.createElement("a",{...N,...J,href:(le?F:void 0)||U.absoluteURL||X,onClick:le?ee:l,ref:x2(w,q),target:m,"data-discover":!z&&i==="render"?"true":void 0});return K&&!z?b.createElement(b.Fragment,null,te,b.createElement(p2,{page:X})):te});z0.displayName="Link";var S2=b.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:u="",end:s=!1,style:c,to:d,viewTransition:h,children:p,...m},v){let x=Pi(d,{relative:m.relative}),E=an(),C=b.useContext(us),{navigator:N,basename:w}=b.useContext(Yt),T=C!=null&&O2(x)&&h===!0,R=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,j=E.pathname,z=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(j=j.toLowerCase(),z=z?z.toLowerCase():null,R=R.toLowerCase()),z&&w&&(z=jn(z,w)||z);const U=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let X=j===R||!s&&j.startsWith(R)&&j.charAt(U)==="/",Q=z!=null&&(z===R||!s&&z.startsWith(R)&&z.charAt(R.length)==="/"),F={isActive:X,isPending:Q,isTransitioning:T},K=X?l:void 0,q;typeof u=="function"?q=u(F):q=[u,X?"active":null,Q?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let J=typeof c=="function"?c(F):c;return b.createElement(z0,{...m,"aria-current":K,className:q,ref:v,style:J,to:d,viewTransition:h},typeof p=="function"?p(F):p)});S2.displayName="NavLink";var E2=b.forwardRef(({discover:n="render",fetcherKey:l,navigate:i,reloadDocument:u,replace:s,state:c,method:d=Lu,action:h,onSubmit:p,relative:m,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:E,...C},N)=>{let{useTransitions:w}=b.useContext(Yt),T=j2(),R=w2(h,{relative:m}),j=d.toLowerCase()==="get"?"get":"post",z=typeof h=="string"&&M0.test(h),U=X=>{if(p&&p(X),X.defaultPrevented)return;X.preventDefault();let Q=X.nativeEvent.submitter,F=(Q==null?void 0:Q.getAttribute("formmethod"))||d,K=()=>T(Q||X.currentTarget,{fetcherKey:l,method:F,navigate:i,replace:s,state:c,relative:m,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:E});w&&i!==!1?b.startTransition(()=>K()):K()};return b.createElement("form",{ref:N,method:j,action:R,onSubmit:u?p:U,...C,"data-discover":!z&&n==="render"?"true":void 0})});E2.displayName="Form";function C2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function L0(n){let l=b.useContext(Rl);return Ue(l,C2(n)),l}function N2(n,{target:l,replace:i,mask:u,state:s,preventScrollReset:c,relative:d,viewTransition:h,defaultShouldRevalidate:p,useTransitions:m}={}){let v=ss(),x=an(),E=Pi(n,{relative:d});return b.useCallback(C=>{if(t2(C,l)){C.preventDefault();let N=i!==void 0?i:Yi(x)===Yi(E),w=()=>v(n,{replace:N,mask:u,state:s,preventScrollReset:c,relative:d,viewTransition:h,defaultShouldRevalidate:p});m?b.startTransition(()=>w()):w()}},[x,v,E,i,u,s,l,n,c,d,h,p,m])}var A2=0,T2=()=>`__${String(++A2)}__`;function j2(){let{router:n}=L0("useSubmit"),{basename:l}=b.useContext(Yt),i=Fb(),u=n.fetch,s=n.navigate;return b.useCallback(async(c,d={})=>{let{action:h,method:p,encType:m,formData:v,body:x}=l2(c,l);if(d.navigate===!1){let E=d.fetcherKey||T2();await u(E,i,d.action||h,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:x,formMethod:d.method||p,formEncType:d.encType||m,flushSync:d.flushSync})}else await s(d.action||h,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:x,formMethod:d.method||p,formEncType:d.encType||m,replace:d.replace,state:d.state,fromRouteId:i,flushSync:d.flushSync,viewTransition:d.viewTransition})},[u,s,l,i])}function w2(n,{relative:l}={}){let{basename:i}=b.useContext(Yt),u=b.useContext(Kt);Ue(u,"useFormAction must be used inside a RouteContext");let[s]=u.matches.slice(-1),c={...Pi(n||".",{relative:l})},d=an();if(n==null){c.search=d.search;let h=new URLSearchParams(c.search),p=h.getAll("index");if(p.some(v=>v==="")){h.delete("index"),p.filter(x=>x).forEach(x=>h.append("index",x));let v=h.toString();c.search=v?`?${v}`:""}}return(!n||n===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(c.pathname=c.pathname==="/"?i:$t([i,c.pathname])),Yi(c)}function O2(n,{relative:l}={}){let i=b.useContext(N0);Ue(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=L0("useViewTransitionState"),s=Pi(n,{relative:l});if(!i.isTransitioning)return!1;let c=jn(i.currentLocation.pathname,u)||i.currentLocation.pathname,d=jn(i.nextLocation.pathname,u)||i.nextLocation.pathname;return Yu(s.pathname,d)!=null||Yu(s.pathname,c)!=null}function R2(){b.useEffect(()=>{const n=window.visualViewport;if(!n)return;const l=document.documentElement;function i(){if(!n)return;window.innerHeight-n.height>1?(l.style.setProperty("--app-viewport-height",`${n.height}px`),window.scrollY>0&&window.scrollTo(0,0)):l.style.removeProperty("--app-viewport-height")}return n.addEventListener("resize",i),n.addEventListener("scroll",i),()=>{n.removeEventListener("resize",i),n.removeEventListener("scroll",i),l.style.removeProperty("--app-viewport-height")}},[])}const zf="paimon:accessToken";function D0(){return localStorage.getItem(zf)}function _2(n){localStorage.setItem(zf,n)}function k0(){localStorage.removeItem(zf)}function M2(){const[n,l]=b.useState(D0()),[i,u]=b.useState(!1),s=b.useCallback(d=>{u(!1),l(d)},[]),c=b.useCallback(()=>{k0(),l(null),u(!0)},[]);return{authToken:n,authError:i,handleLogin:s,handleAuthError:c}}const sg=n=>{let l;const i=new Set,u=(m,v)=>{const x=typeof m=="function"?m(l):m;if(!Object.is(x,l)){const E=l;l=v??(typeof x!="object"||x===null)?x:Object.assign({},l,x),i.forEach(C=>C(l,E))}},s=()=>l,h={setState:u,getState:s,getInitialState:()=>p,subscribe:m=>(i.add(m),()=>i.delete(m))},p=l=n(u,s,h);return h},z2=(n=>n?sg(n):sg),L2=n=>n;function D2(n,l=L2){const i=ju.useSyncExternalStore(n.subscribe,ju.useCallback(()=>l(n.getState()),[n,l]),ju.useCallback(()=>l(n.getInitialState()),[n,l]));return ju.useDebugValue(i),i}const og=n=>{const l=z2(n),i=u=>D2(l,u);return Object.assign(i,l),i},cs=(n=>n?og(n):og),cg={HEARTBEAT_INTERVAL:5e3,HEARTBEAT_TIMEOUT:5e3};let An=null;const nf=new Set;let Tl=!1,ku=null,Oa=null,Uu=null,ki=null,Cl=null,Ui,Lc=!1;const k2=3e3,U2=3e3;function B2(n){for(const l of nf)try{l(n)}catch(i){console.error("[useWebSocket] listener error:",i)}}function H2(n){ku=setInterval(()=>{n.readyState===WebSocket.OPEN&&(n.send(JSON.stringify({type:"ping"})),Oa=setTimeout(()=>{n.close()},cg.HEARTBEAT_TIMEOUT))},cg.HEARTBEAT_INTERVAL)}function U0(){ku&&(clearInterval(ku),ku=null),Oa&&(clearTimeout(Oa),Oa=null)}function Dc(){Tl||(Uu=setTimeout(B0,U2))}function af(){ki&&(clearTimeout(ki),ki=null)}function B0(){if(Tl||!Cl)return;const i=`${`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/browser`}?token=${encodeURIComponent(Cl)}`;Lc=!1;const u=new WebSocket(i);An=u,Ht.setState({connectionState:"connecting"}),ki=setTimeout(()=>{ki=null,u.readyState===WebSocket.CONNECTING&&u.close()},k2),u.onopen=()=>{af(),Lc=!0,Ht.setState({connectionState:"connected"}),u.send(JSON.stringify({type:"list"})),H2(u)},u.onmessage=s=>{try{const c=JSON.parse(s.data);if(c.type==="pong"){Oa&&(clearTimeout(Oa),Oa=null);return}B2(c)}catch{}},u.onclose=s=>{if(af(),Ht.setState({connectionState:"disconnected"}),An=null,U0(),!Tl&&!Lc){const c={};Cl&&(c.Authorization=`Bearer ${Cl}`),fetch("/api/instances",{headers:c}).then(d=>{d.status===401?Ui==null||Ui():Dc()}).catch(()=>{Dc()});return}Tl||Dc()},u.onerror=()=>{u.close()}}const Ht=cs((n,l)=>({connectionState:"idle",send:i=>{(An==null?void 0:An.readyState)===WebSocket.OPEN&&An.send(JSON.stringify(i))},subscribe:i=>(nf.add(i),()=>{nf.delete(i)}),connect:(i,u)=>{l().disconnect(),Tl=!1,Cl=i,Ui=u,B0()},disconnect:()=>{Tl=!0,Cl=null,Ui=void 0,U0(),af(),Uu&&(clearTimeout(Uu),Uu=null),An&&(An.close(),An=null),n({connectionState:"idle"})}}));function q2(n,l){let i;try{i=n()}catch{return}return{getItem:s=>{var c;const d=p=>p===null?null:JSON.parse(p,void 0),h=(c=i.getItem(s))!=null?c:null;return h instanceof Promise?h.then(d):d(h)},setItem:(s,c)=>i.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>i.removeItem(s)}}const lf=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(u){return lf(u)(i)},catch(u){return this}}}catch(i){return{then(u){return this},catch(u){return lf(u)(i)}}}},Y2=(n,l)=>(i,u,s)=>{let c={storage:q2(()=>window.localStorage),partialize:T=>T,version:0,merge:(T,R)=>({...R,...T}),...l},d=!1,h=0;const p=new Set,m=new Set;let v=c.storage;if(!v)return n((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),i(...T)},u,s);const x=()=>{const T=c.partialize({...u()});return v.setItem(c.name,{state:T,version:c.version})},E=s.setState;s.setState=(T,R)=>(E(T,R),x());const C=n((...T)=>(i(...T),x()),u,s);s.getInitialState=()=>C;let N;const w=()=>{var T,R;if(!v)return;const j=++h;d=!1,p.forEach(U=>{var X;return U((X=u())!=null?X:C)});const z=((R=c.onRehydrateStorage)==null?void 0:R.call(c,(T=u())!=null?T:C))||void 0;return lf(v.getItem.bind(v))(c.name).then(U=>{if(U)if(typeof U.version=="number"&&U.version!==c.version){if(c.migrate){const X=c.migrate(U.state,U.version);return X instanceof Promise?X.then(Q=>[!0,Q]):[!0,X]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,U.state];return[!1,void 0]}).then(U=>{var X;if(j!==h)return;const[Q,F]=U;if(N=c.merge(F,(X=u())!=null?X:C),i(N,!0),Q)return x()}).then(()=>{j===h&&(z==null||z(u(),void 0),N=u(),d=!0,m.forEach(U=>U(N)))}).catch(U=>{j===h&&(z==null||z(void 0,U))})};return s.persist={setOptions:T=>{c={...c,...T},T.storage&&(v=T.storage)},clearStorage:()=>{v==null||v.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>w(),hasHydrated:()=>d,onHydrate:T=>(p.add(T),()=>{p.delete(T)}),onFinishHydration:T=>(m.add(T),()=>{m.delete(T)})},c.skipHydration||w(),N||C},V2=Y2,zi=cs()(V2((n,l)=>({instances:[],instanceListReady:!1,handleMessage:i=>{switch(i.type){case"instance_list":n({instances:i.payload.instances,instanceListReady:!0});break;case"instance_update":{const{instance:u,action:s}=i.payload;s==="connected"?n(c=>({instances:c.instances.some(h=>h.id===u.id)?c.instances.map(h=>h.id===u.id?u:h):[...c.instances,u]})):s==="disconnected"?n(c=>({instances:c.instances.filter(d=>d.id!==u.id)})):s==="updated"&&n(c=>({instances:c.instances.map(d=>d.id===u.id?u:d)}));break}}}}),{name:"paimon:instances",partialize:n=>({instances:n.instances})}));function G2(n){return l=>n?l.instances.find(i=>i.id===n):void 0}/**
|
|
45
|
+
* @license lucide-react v1.16.0 - ISC
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the ISC license.
|
|
48
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/const H0=(...n)=>n.filter((l,i,u)=>!!l&&l.trim()!==""&&u.indexOf(l)===i).join(" ").trim();/**
|
|
50
|
+
* @license lucide-react v1.16.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const F2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
55
|
+
* @license lucide-react v1.16.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/const $2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,u)=>u?u.toUpperCase():i.toLowerCase());/**
|
|
60
|
+
* @license lucide-react v1.16.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const fg=n=>{const l=$2(n);return l.charAt(0).toUpperCase()+l.slice(1)};/**
|
|
65
|
+
* @license lucide-react v1.16.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/var kc={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
70
|
+
* @license lucide-react v1.16.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const K2=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},X2=b.createContext({}),Q2=()=>b.useContext(X2),Z2=b.forwardRef(({color:n,size:l,strokeWidth:i,absoluteStrokeWidth:u,className:s="",children:c,iconNode:d,...h},p)=>{const{size:m=24,strokeWidth:v=2,absoluteStrokeWidth:x=!1,color:E="currentColor",className:C=""}=Q2()??{},N=u??x?Number(i??v)*24/Number(l??m):i??v;return b.createElement("svg",{ref:p,...kc,width:l??m??kc.width,height:l??m??kc.height,stroke:n??E,strokeWidth:N,className:H0("lucide",C,s),...!c&&!K2(h)&&{"aria-hidden":"true"},...h},[...d.map(([w,T])=>b.createElement(w,T)),...Array.isArray(c)?c:[c]])});/**
|
|
75
|
+
* @license lucide-react v1.16.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const we=(n,l)=>{const i=b.forwardRef(({className:u,...s},c)=>b.createElement(Z2,{ref:c,iconNode:l,className:H0(`lucide-${F2(fg(n))}`,`lucide-${n}`,u),...s}));return i.displayName=fg(n),i};/**
|
|
80
|
+
* @license lucide-react v1.16.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const J2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],I2=we("arrow-up",J2);/**
|
|
85
|
+
* @license lucide-react v1.16.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const W2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],er=we("check",W2);/**
|
|
90
|
+
* @license lucide-react v1.16.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const P2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],q0=we("chevron-down",P2);/**
|
|
95
|
+
* @license lucide-react v1.16.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const eS=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],tS=we("chevron-left",eS);/**
|
|
100
|
+
* @license lucide-react v1.16.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const nS=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lf=we("chevron-right",nS);/**
|
|
105
|
+
* @license lucide-react v1.16.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const aS=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],lS=we("chevrons-down",aS);/**
|
|
110
|
+
* @license lucide-react v1.16.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const iS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],rf=we("circle-alert",iS);/**
|
|
115
|
+
* @license lucide-react v1.16.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const rS=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],uS=we("circle-check-big",rS);/**
|
|
120
|
+
* @license lucide-react v1.16.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const sS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Y0=we("circle-x",sS);/**
|
|
125
|
+
* @license lucide-react v1.16.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const oS=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],V0=we("copy",oS);/**
|
|
130
|
+
* @license lucide-react v1.16.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const cS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],fS=we("file-text",cS);/**
|
|
135
|
+
* @license lucide-react v1.16.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const dS=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],hS=we("folder-plus",dS);/**
|
|
140
|
+
* @license lucide-react v1.16.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const pS=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],G0=we("folder",pS);/**
|
|
145
|
+
* @license lucide-react v1.16.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const mS=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],gS=we("git-branch",mS);/**
|
|
150
|
+
* @license lucide-react v1.16.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const yS=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],xS=we("history",yS);/**
|
|
155
|
+
* @license lucide-react v1.16.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const vS=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],bS=we("image-plus",vS);/**
|
|
160
|
+
* @license lucide-react v1.16.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const SS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ES=we("info",SS);/**
|
|
165
|
+
* @license lucide-react v1.16.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const CS=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Vi=we("loader-circle",CS);/**
|
|
170
|
+
* @license lucide-react v1.16.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const NS=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],AS=we("log-out",NS);/**
|
|
175
|
+
* @license lucide-react v1.16.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const TS=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],jS=we("minimize-2",TS);/**
|
|
180
|
+
* @license lucide-react v1.16.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const wS=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],dg=we("pencil",wS);/**
|
|
185
|
+
* @license lucide-react v1.16.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const OS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],F0=we("plus",OS);/**
|
|
190
|
+
* @license lucide-react v1.16.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const RS=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_S=we("settings",RS);/**
|
|
195
|
+
* @license lucide-react v1.16.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const MS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],zS=we("square",MS);/**
|
|
200
|
+
* @license lucide-react v1.16.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const LS=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],DS=we("terminal",LS);/**
|
|
205
|
+
* @license lucide-react v1.16.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const kS=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],US=we("timer",kS);/**
|
|
210
|
+
* @license lucide-react v1.16.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const BS=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],HS=we("triangle-alert",BS);/**
|
|
215
|
+
* @license lucide-react v1.16.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const qS=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],YS=we("wrench",qS);/**
|
|
220
|
+
* @license lucide-react v1.16.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const VS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Df=we("x",VS),Gu={appearance:"paimon:appearance",background:"paimon:background"};function uf(){const n=localStorage.getItem(Gu.appearance);return n==="light"||n==="dark"||n==="system"?n:"system"}function $0(){const n=localStorage.getItem(Gu.background);return n==="mist"||n==="aurora"||n==="ember"?n:"mist"}function K0(n){return n==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n}function Fu(n,l){const i=K0(n);return document.documentElement.setAttribute("data-theme",i),document.documentElement.setAttribute("data-bg",l),i}const wn=cs(n=>({appearance:uf(),background:$0(),resolvedTheme:K0(uf()),setAppearance:l=>{localStorage.setItem(Gu.appearance,l);const i=Fu(l,wn.getState().background);n({appearance:l,resolvedTheme:i})},setBackground:l=>{localStorage.setItem(Gu.background,l),Fu(wn.getState().appearance,l),n({background:l})}})),GS=window.matchMedia("(prefers-color-scheme: dark)");GS.addEventListener("change",()=>{const{appearance:n,background:l}=wn.getState();if(n==="system"){const i=Fu(n,l);wn.setState({resolvedTheme:i})}});function FS(){const n=wn(i=>i.appearance),l=wn(i=>i.setAppearance);return[n,l]}function X0(){const n=wn(i=>i.background),l=wn(i=>i.setBackground);return[n,l]}function $S(){return wn(n=>n.resolvedTheme)}Fu(uf(),$0());const KS="/logos/mist/light/paimon-logo.png";function XS(n,l){return!n||!l?KS:`/logos/${n}/${l}/paimon-logo.png`}function kf(){const[n]=X0(),l=$S();return XS(n,l)}const he=n=>typeof n=="string",_i=()=>{let n,l;const i=new Promise((u,s)=>{n=u,l=s});return i.resolve=n,i.reject=l,i},hg=n=>n==null?"":String(n),QS=(n,l,i)=>{n.forEach(u=>{l[u]&&(i[u]=l[u])})},ZS=/###/g,pg=n=>n&&n.includes("###")?n.replace(ZS,"."):n,mg=n=>!n||he(n),Bi=(n,l,i)=>{const u=he(l)?l.split("."):l;let s=0;for(;s<u.length-1;){if(mg(n))return{};const c=pg(u[s]);!n[c]&&i&&(n[c]=new i),Object.prototype.hasOwnProperty.call(n,c)?n=n[c]:n={},++s}return mg(n)?{}:{obj:n,k:pg(u[s])}},gg=(n,l,i)=>{const{obj:u,k:s}=Bi(n,l,Object);if(u!==void 0||l.length===1){u[s]=i;return}let c=l[l.length-1],d=l.slice(0,l.length-1),h=Bi(n,d,Object);for(;h.obj===void 0&&d.length;)c=`${d[d.length-1]}.${c}`,d=d.slice(0,d.length-1),h=Bi(n,d,Object),h!=null&&h.obj&&typeof h.obj[`${h.k}.${c}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${c}`]=i},JS=(n,l,i,u)=>{const{obj:s,k:c}=Bi(n,l,Object);s[c]=s[c]||[],s[c].push(i)},$u=(n,l)=>{const{obj:i,k:u}=Bi(n,l);if(i&&Object.prototype.hasOwnProperty.call(i,u))return i[u]},IS=(n,l,i)=>{const u=$u(n,i);return u!==void 0?u:$u(l,i)},Q0=(n,l,i)=>{for(const u in l)u!=="__proto__"&&u!=="constructor"&&(u in n?he(n[u])||n[u]instanceof String||he(l[u])||l[u]instanceof String?i&&(n[u]=l[u]):Q0(n[u],l[u],i):n[u]=l[u]);return n},Nn=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),WS={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},PS=n=>he(n)?n.replace(/[&<>"'\/]/g,l=>WS[l]):n;class e3{constructor(l){this.capacity=l,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(l){const i=this.regExpMap.get(l);if(i!==void 0)return i;const u=new RegExp(l);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(l,u),this.regExpQueue.push(l),u}}const t3=[" ",",","?","!",";"],n3=new e3(20),a3=(n,l,i)=>{l=l||"",i=i||"";const u=t3.filter(d=>!l.includes(d)&&!i.includes(d));if(u.length===0)return!0;const s=n3.getRegExp(`(${u.map(d=>d==="?"?"\\?":d).join("|")})`);let c=!s.test(n);if(!c){const d=n.indexOf(i);d>0&&!s.test(n.substring(0,d))&&(c=!0)}return c},sf=(n,l,i=".")=>{if(!n)return;if(n[l])return Object.prototype.hasOwnProperty.call(n,l)?n[l]:void 0;const u=l.split(i);let s=n;for(let c=0;c<u.length;){if(!s||typeof s!="object")return;let d,h="";for(let p=c;p<u.length;++p)if(p!==c&&(h+=i),h+=u[p],d=s[h],d!==void 0){if(["string","number","boolean"].includes(typeof d)&&p<u.length-1)continue;c+=p-c+1;break}s=d}return s},Gi=n=>n==null?void 0:n.replace(/_/g,"-"),l3={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,l){var i,u;(u=(i=console==null?void 0:console[n])==null?void 0:i.apply)==null||u.call(i,console,l)}};class Ku{constructor(l,i={}){this.init(l,i)}init(l,i={}){this.prefix=i.prefix||"i18next:",this.logger=l||l3,this.options=i,this.debug=i.debug}log(...l){return this.forward(l,"log","",!0)}warn(...l){return this.forward(l,"warn","",!0)}error(...l){return this.forward(l,"error","")}deprecate(...l){return this.forward(l,"warn","WARNING DEPRECATED: ",!0)}forward(l,i,u,s){return s&&!this.debug?null:(l=l.map(c=>he(c)?c.replace(/[\r\n\x00-\x1F\x7F]/g," "):c),he(l[0])&&(l[0]=`${u}${this.prefix} ${l[0]}`),this.logger[i](l))}create(l){return new Ku(this.logger,{prefix:`${this.prefix}:${l}:`,...this.options})}clone(l){return l=l||this.options,l.prefix=l.prefix||this.prefix,new Ku(this.logger,l)}}var Pt=new Ku;class fs{constructor(){this.observers={}}on(l,i){return l.split(" ").forEach(u=>{this.observers[u]||(this.observers[u]=new Map);const s=this.observers[u].get(i)||0;this.observers[u].set(i,s+1)}),this}off(l,i){if(this.observers[l]){if(!i){delete this.observers[l];return}this.observers[l].delete(i)}}once(l,i){const u=(...s)=>{i(...s),this.off(l,u)};return this.on(l,u),this}emit(l,...i){this.observers[l]&&Array.from(this.observers[l].entries()).forEach(([s,c])=>{for(let d=0;d<c;d++)s(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,c])=>{for(let d=0;d<c;d++)s(l,...i)})}}class yg extends fs{constructor(l,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=l||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(l){this.options.ns.includes(l)||this.options.ns.push(l)}removeNamespaces(l){const i=this.options.ns.indexOf(l);i>-1&&this.options.ns.splice(i,1)}getResource(l,i,u,s={}){var m,v;const c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,d=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;l.includes(".")?h=l.split("."):(h=[l,i],u&&(Array.isArray(u)?h.push(...u):he(u)&&c?h.push(...u.split(c)):h.push(u)));const p=$u(this.data,h);return!p&&!i&&!u&&l.includes(".")&&(l=h[0],i=h[1],u=h.slice(2).join(".")),p||!d||!he(u)?p:sf((v=(m=this.data)==null?void 0:m[l])==null?void 0:v[i],u,c)}addResource(l,i,u,s,c={silent:!1}){const d=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let h=[l,i];u&&(h=h.concat(d?u.split(d):u)),l.includes(".")&&(h=l.split("."),s=i,i=h[1]),this.addNamespaces(i),gg(this.data,h,s),c.silent||this.emit("added",l,i,u,s)}addResources(l,i,u,s={silent:!1}){for(const c in u)(he(u[c])||Array.isArray(u[c]))&&this.addResource(l,i,c,u[c],{silent:!0});s.silent||this.emit("added",l,i,u)}addResourceBundle(l,i,u,s,c,d={silent:!1,skipCopy:!1}){let h=[l,i];l.includes(".")&&(h=l.split("."),s=u,u=i,i=h[1]),this.addNamespaces(i);let p=$u(this.data,h)||{};d.skipCopy||(u=JSON.parse(JSON.stringify(u))),s?Q0(p,u,c):p={...p,...u},gg(this.data,h,p),d.silent||this.emit("added",l,i,u)}removeResourceBundle(l,i){this.hasResourceBundle(l,i)&&delete this.data[l][i],this.removeNamespaces(i),this.emit("removed",l,i)}hasResourceBundle(l,i){return this.getResource(l,i)!==void 0}getResourceBundle(l,i){return i||(i=this.options.defaultNS),this.getResource(l,i)}getDataByLanguage(l){return this.data[l]}hasLanguageSomeTranslations(l){const i=this.getDataByLanguage(l);return!!(i&&Object.keys(i)||[]).find(s=>i[s]&&Object.keys(i[s]).length>0)}toJSON(){return this.data}}var Z0={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,l,i,u,s){return n.forEach(c=>{var d;l=((d=this.processors[c])==null?void 0:d.process(l,i,u,s))??l}),l}};const J0=Symbol("i18next/PATH_KEY");function i3(){const n=[],l=Object.create(null);let i;return l.get=(u,s)=>{var c;return(c=i==null?void 0:i.revoke)==null||c.call(i),s===J0?n:(n.push(s),i=Proxy.revocable(u,l),i.proxy)},Proxy.revocable(Object.create(null),l).proxy}function Ra(n,l){const{[J0]:i}=n(i3()),u=(l==null?void 0:l.keySeparator)??".",s=(l==null?void 0:l.nsSeparator)??":",c=(l==null?void 0:l.enableSelector)==="strict";if(i.length>1&&s){const d=l==null?void 0:l.ns,h=c?Array.isArray(d)?d:d?[d]:null:Array.isArray(d)?d:null;if(h&&(c?h:h.length>1?h.slice(1):[]).includes(i[0]))return`${i[0]}${s}${i.slice(1).join(u)}`}return i.join(u)}const Uc=n=>!he(n)&&typeof n!="boolean"&&typeof n!="number";class Xu extends fs{constructor(l,i={}){super(),QS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],l,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pt.create("translator"),this.checkedLoadedFor={}}changeLanguage(l){l&&(this.language=l)}exists(l,i={interpolation:{}}){const u={...i};if(l==null)return!1;const s=this.resolve(l,u);if((s==null?void 0:s.res)===void 0)return!1;const c=Uc(s.res);return!(u.returnObjects===!1&&c)}extractFromKey(l,i){let u=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let c=i.ns||this.options.defaultNS||[];const d=u&&l.includes(u),h=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!a3(l,u,s);if(d&&!h){const p=l.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:l,namespaces:he(c)?[c]:c};const m=l.split(u);(u!==s||u===s&&this.options.ns.includes(m[0]))&&(c=m.shift()),l=m.join(s)}return{key:l,namespaces:he(c)?[c]:c}}translate(l,i,u){let s=typeof i=="object"?{...i}:i;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),l==null)return"";typeof l=="function"&&(l=Ra(l,{...this.options,...s})),Array.isArray(l)||(l=[String(l)]),l=l.map(le=>typeof le=="function"?Ra(le,{...this.options,...s}):String(le));const c=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,d=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:h,namespaces:p}=this.extractFromKey(l[l.length-1],s),m=p[p.length-1];let v=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const x=s.lng||this.language,E=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((x==null?void 0:x.toLowerCase())==="cimode")return E?c?{res:`${m}${v}${h}`,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${v}${h}`:c?{res:h,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:h;const C=this.resolve(l,s);let N=C==null?void 0:C.res;const w=(C==null?void 0:C.usedKey)||h,T=(C==null?void 0:C.exactUsedKey)||h,R=["[object Number]","[object Function]","[object RegExp]"],j=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,U=s.count!==void 0&&!he(s.count),X=Xu.hasDefaultValue(s),Q=U?this.pluralResolver.getSuffix(x,s.count,s):"",F=s.ordinal&&U?this.pluralResolver.getSuffix(x,s.count,{ordinal:!1}):"",K=U&&!s.ordinal&&s.count===0,q=K&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${Q}`]||s[`defaultValue${F}`]||s.defaultValue;let J=N;z&&!N&&X&&(J=q);const oe=Uc(J),ee=Object.prototype.toString.apply(J);if(z&&J&&oe&&!R.includes(ee)&&!(he(j)&&Array.isArray(J))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const le=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,J,{...s,ns:p}):`key '${h} (${this.language})' returned an object instead of string.`;return c?(C.res=le,C.usedParams=this.getUsedParamsDetails(s),C):le}if(d){const le=Array.isArray(J),te=le?[]:{},re=le?T:w;for(const M in J)if(Object.prototype.hasOwnProperty.call(J,M)){const H=`${re}${d}${M}`;X&&!N?te[M]=this.translate(H,{...s,defaultValue:Uc(q)?q[M]:void 0,joinArrays:!1,ns:p}):te[M]=this.translate(H,{...s,joinArrays:!1,ns:p}),te[M]===H&&(te[M]=J[M])}N=te}}else if(z&&he(j)&&Array.isArray(N))N=N.join(j),N&&(N=this.extendTranslation(N,l,s,u));else{let le=!1,te=!1;!this.isValidLookup(N)&&X&&(le=!0,N=q),this.isValidLookup(N)||(te=!0,N=h);const M=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:N,H=X&&q!==N&&this.options.updateMissing;if(te||le||H){if(this.logger.log(H?"updateKey":"missingKey",x,m,U&&!H?`${h}${this.pluralResolver.getSuffix(x,s.count,s)}`:h,H?q:N),d){const Y=this.resolve(h,{...s,keySeparator:!1});Y&&Y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let Y=0;Y<Z.length;Y++)I.push(Z[Y]);else this.options.saveMissingTo==="all"?I=this.languageUtils.toResolveHierarchy(s.lng||this.language):I.push(s.lng||this.language);const W=(Y,P,ne)=>{var fe;const de=X&&ne!==N?ne:M;this.options.missingKeyHandler?this.options.missingKeyHandler(Y,m,P,de,H,s):(fe=this.backendConnector)!=null&&fe.saveMissing&&this.backendConnector.saveMissing(Y,m,P,de,H,s),this.emit("missingKey",Y,m,P,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&U?I.forEach(Y=>{const P=this.pluralResolver.getSuffixes(Y,s);K&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!P.includes(`${this.options.pluralSeparator}zero`)&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(ne=>{W([Y],h+ne,s[`defaultValue${ne}`]||q)})}):W(I,h,q))}N=this.extendTranslation(N,l,s,C,u),te&&N===h&&this.options.appendNamespaceToMissingKey&&(N=`${m}${v}${h}`),(te||le)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${v}${h}`:h,le?N:void 0,s))}return c?(C.res=N,C.usedParams=this.getUsedParamsDetails(s),C):N}extendTranslation(l,i,u,s,c){var p,m;if((p=this.i18nFormat)!=null&&p.parse)l=this.i18nFormat.parse(l,{...this.options.interpolation.defaultVariables,...u},u.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!u.skipInterpolation){u.interpolation&&this.interpolator.init({...u,interpolation:{...this.options.interpolation,...u.interpolation}});const v=he(l)&&(((m=u==null?void 0:u.interpolation)==null?void 0:m.skipOnVariables)!==void 0?u.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let x;if(v){const C=l.match(this.interpolator.nestingRegexp);x=C&&C.length}let E=u.replace&&!he(u.replace)?u.replace:u;if(this.options.interpolation.defaultVariables&&(E={...this.options.interpolation.defaultVariables,...E}),l=this.interpolator.interpolate(l,E,u.lng||this.language||s.usedLng,u),v){const C=l.match(this.interpolator.nestingRegexp),N=C&&C.length;x<N&&(u.nest=!1)}!u.lng&&s&&s.res&&(u.lng=this.language||s.usedLng),u.nest!==!1&&(l=this.interpolator.nest(l,(...C)=>(c==null?void 0:c[0])===C[0]&&!u.context?(this.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${i[0]}`),null):this.translate(...C,i),u)),u.interpolation&&this.interpolator.reset()}const d=u.postProcess||this.options.postProcess,h=he(d)?[d]:d;return l!=null&&(h!=null&&h.length)&&u.applyPostProcessor!==!1&&(l=Z0.handle(h,l,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(u)},...u}:u,this)),l}resolve(l,i={}){let u,s,c,d,h;return he(l)&&(l=[l]),Array.isArray(l)&&(l=l.map(p=>typeof p=="function"?Ra(p,{...this.options,...i}):p)),l.forEach(p=>{if(this.isValidLookup(u))return;const m=this.extractFromKey(p,i),v=m.key;s=v;let x=m.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const E=i.count!==void 0&&!he(i.count),C=E&&!i.ordinal&&i.count===0,N=i.context!==void 0&&(he(i.context)||typeof i.context=="number")&&i.context!=="",w=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);x.forEach(T=>{var R,j;this.isValidLookup(u)||(h=T,!this.checkedLoadedFor[`${w[0]}-${T}`]&&((R=this.utils)!=null&&R.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(h))&&(this.checkedLoadedFor[`${w[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${w.join(", ")}" won't get resolved as namespace "${h}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(z=>{var Q;if(this.isValidLookup(u))return;d=z;const U=[v];if((Q=this.i18nFormat)!=null&&Q.addLookupKeys)this.i18nFormat.addLookupKeys(U,v,z,T,i);else{let F;E&&(F=this.pluralResolver.getSuffix(z,i.count,i));const K=`${this.options.pluralSeparator}zero`,q=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(i.ordinal&&F.startsWith(q)&&U.push(v+F.replace(q,this.options.pluralSeparator)),U.push(v+F),C&&U.push(v+K)),N){const J=`${v}${this.options.contextSeparator||"_"}${i.context}`;U.push(J),E&&(i.ordinal&&F.startsWith(q)&&U.push(J+F.replace(q,this.options.pluralSeparator)),U.push(J+F),C&&U.push(J+K))}}let X;for(;X=U.pop();)this.isValidLookup(u)||(c=X,u=this.getResource(z,T,X,i))}))})}),{res:u,usedKey:s,exactUsedKey:c,usedLng:d,usedNS:h}}isValidLookup(l){return l!==void 0&&!(!this.options.returnNull&&l===null)&&!(!this.options.returnEmptyString&&l==="")}getResource(l,i,u,s={}){var c;return(c=this.i18nFormat)!=null&&c.getResource?this.i18nFormat.getResource(l,i,u,s):this.resourceStore.getResource(l,i,u,s)}getUsedParamsDetails(l={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],u=l.replace&&!he(l.replace);let s=u?l.replace:l;if(u&&typeof l.count<"u"&&(s.count=l.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!u){s={...s};for(const c of i)delete s[c]}return s}static hasDefaultValue(l){const i="defaultValue";for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u)&&u.startsWith(i)&&l[u]!==void 0)return!0;return!1}}class xg{constructor(l){this.options=l,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pt.create("languageUtils")}getScriptPartFromCode(l){if(l=Gi(l),!l||!l.includes("-"))return null;const i=l.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(l){if(l=Gi(l),!l||!l.includes("-"))return l;const i=l.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(l){if(he(l)&&l.includes("-")){let i;try{i=Intl.getCanonicalLocales(l)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?l.toLowerCase():l)}return this.options.cleanCode||this.options.lowerCaseLng?l.toLowerCase():l}isSupportedCode(l){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(l=this.getLanguagePartFromCode(l)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(l)}getBestMatchFromCodes(l){if(!l)return null;let i;return l.forEach(u=>{if(i)return;const s=this.formatLanguageCode(u);(!this.options.supportedLngs||this.isSupportedCode(s))&&(i=s)}),!i&&this.options.supportedLngs&&l.forEach(u=>{if(i)return;const s=this.getScriptPartFromCode(u);if(this.isSupportedCode(s))return i=s;const c=this.getLanguagePartFromCode(u);if(this.isSupportedCode(c))return i=c;i=this.options.supportedLngs.find(d=>d===c?!0:!d.includes("-")&&!c.includes("-")?!1:!!(d.includes("-")&&!c.includes("-")&&d.slice(0,d.indexOf("-"))===c||d.startsWith(c)&&c.length>1))}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(l,i){if(!l)return[];if(typeof l=="function"&&(l=l(i)),he(l)&&(l=[l]),Array.isArray(l))return l;if(!i)return l.default||[];let u=l[i];return u||(u=l[this.getScriptPartFromCode(i)]),u||(u=l[this.formatLanguageCode(i)]),u||(u=l[this.getLanguagePartFromCode(i)]),u||(u=l.default),u||[]}toResolveHierarchy(l,i){const u=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],l),s=[],c=d=>{d&&(this.isSupportedCode(d)?s.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return he(l)&&(l.includes("-")||l.includes("_"))?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(l)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(l)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(l))):he(l)&&c(this.formatLanguageCode(l)),u.forEach(d=>{s.includes(d)||c(this.formatLanguageCode(d))}),s}}const vg={zero:0,one:1,two:2,few:3,many:4,other:5},bg={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class r3{constructor(l,i={}){this.languageUtils=l,this.options=i,this.logger=Pt.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(l,i={}){const u=Gi(l==="dev"?"en":l),s=i.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:u,type:s});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let d;try{d=new Intl.PluralRules(u,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),bg;if(!l.match(/-|_/))return bg;const p=this.languageUtils.getLanguagePartFromCode(l);d=this.getRule(p,i)}return this.pluralRulesCache[c]=d,d}needsPlural(l,i={}){let u=this.getRule(l,i);return u||(u=this.getRule("dev",i)),(u==null?void 0:u.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(l,i,u={}){return this.getSuffixes(l,u).map(s=>`${i}${s}`)}getSuffixes(l,i={}){let u=this.getRule(l,i);return u||(u=this.getRule("dev",i)),u?u.resolvedOptions().pluralCategories.sort((s,c)=>vg[s]-vg[c]).map(s=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(l,i,u={}){const s=this.getRule(l,u);return s?`${this.options.prepend}${u.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${l}`),this.getSuffix("dev",i,u))}}const Sg=(n,l,i,u=".",s=!0)=>{let c=IS(n,l,i);return!c&&s&&he(i)&&(c=sf(n,i,u),c===void 0&&(c=sf(l,i,u))),c},Bc=n=>n.replace(/\$/g,"$$$$");class Eg{constructor(l={}){var i;this.logger=Pt.create("interpolator"),this.options=l,this.format=((i=l==null?void 0:l.interpolation)==null?void 0:i.format)||(u=>u),this.init(l)}init(l={}){l.interpolation||(l.interpolation={escapeValue:!0});const{escape:i,escapeValue:u,useRawValueToEscape:s,prefix:c,prefixEscaped:d,suffix:h,suffixEscaped:p,formatSeparator:m,unescapeSuffix:v,unescapePrefix:x,nestingPrefix:E,nestingPrefixEscaped:C,nestingSuffix:N,nestingSuffixEscaped:w,nestingOptionsSeparator:T,maxReplaces:R,alwaysFormat:j}=l.interpolation;this.escape=i!==void 0?i:PS,this.escapeValue=u!==void 0?u:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=c?Nn(c):d||"{{",this.suffix=h?Nn(h):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=v?"":x?Nn(x):"-",this.unescapeSuffix=this.unescapePrefix?"":v?Nn(v):"",this.nestingPrefix=E?Nn(E):C||Nn("$t("),this.nestingSuffix=N?Nn(N):w||Nn(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=R||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const l=(i,u)=>(i==null?void 0:i.source)===u?(i.lastIndex=0,i):new RegExp(u,"g");this.regexp=l(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=l(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=l(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(l,i,u,s){var C;let c,d,h;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=N=>{if(!N.includes(this.formatSeparator)){const j=Sg(i,p,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,u,{...s,...i,interpolationkey:N}):j}const w=N.split(this.formatSeparator),T=w.shift().trim(),R=w.join(this.formatSeparator).trim();return this.format(Sg(i,p,T,this.options.keySeparator,this.options.ignoreJSONStructure),R,u,{...s,...i,interpolationkey:T})};this.resetRegExp(),!this.escapeValue&&typeof l=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(l)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const v=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,x=((C=s==null?void 0:s.interpolation)==null?void 0:C.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>Bc(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?Bc(this.escape(N)):Bc(N)}].forEach(N=>{for(h=0;c=N.regex.exec(l);){const w=c[1].trim();if(d=m(w),d===void 0)if(typeof v=="function"){const R=v(l,c,s);d=he(R)?R:""}else if(s&&Object.prototype.hasOwnProperty.call(s,w))d="";else if(x){d=c[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${l}`),d="";else!he(d)&&!this.useRawValueToEscape&&(d=hg(d));const T=N.safeValue(d);if(l=l.replace(c[0],T),x?(N.regex.lastIndex+=d.length,N.regex.lastIndex-=c[0].length):N.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),l}nest(l,i,u={}){let s,c,d;const h=(p,m)=>{const v=this.nestingOptionsSeparator;if(!p.includes(v))return p;const x=p.split(new RegExp(`${Nn(v)}[ ]*{`));let E=`{${x[1]}`;p=x[0],E=this.interpolate(E,d);const C=E.match(/'/g),N=E.match(/"/g);(((C==null?void 0:C.length)??0)%2===0&&!N||((N==null?void 0:N.length)??0)%2!==0)&&(E=E.replace(/'/g,'"'));try{d=JSON.parse(E),m&&(d={...m,...d})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,w),`${p}${v}${E}`}return d.defaultValue&&d.defaultValue.includes(this.prefix)&&delete d.defaultValue,p};for(;s=this.nestingRegexp.exec(l);){let p=[];d={...u},d=d.replace&&!he(d.replace)?d.replace:d,d.applyPostProcessor=!1,delete d.defaultValue;const m=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(m!==-1&&(p=s[1].slice(m).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),c=i(h.call(this,s[1].trim(),d),d),c&&s[0]===l&&!he(c))return c;he(c)||(c=hg(c)),c||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${l}`),c=""),p.length&&(c=p.reduce((v,x)=>this.format(v,x,u.lng,{...u,interpolationkey:s[1].trim()}),c.trim())),l=l.replace(s[0],c),this.regexp.lastIndex=0}return l}}const u3=n=>{let l=n.toLowerCase().trim();const i={};if(n.includes("(")){const u=n.split("(");l=u[0].toLowerCase().trim();const s=u[1].slice(0,-1);l==="currency"&&!s.includes(":")?i.currency||(i.currency=s.trim()):l==="relativetime"&&!s.includes(":")?i.range||(i.range=s.trim()):s.split(";").forEach(d=>{if(d){const[h,...p]=d.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),v=h.trim();i[v]||(i[v]=m),m==="false"&&(i[v]=!1),m==="true"&&(i[v]=!0),isNaN(m)||(i[v]=parseInt(m,10))}})}return{formatName:l,formatOptions:i}},Cg=n=>{const l={};return(i,u,s)=>{let c=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(c={...c,[s.interpolationkey]:void 0});const d=u+JSON.stringify(c);let h=l[d];return h||(h=n(Gi(u),s),l[d]=h),h(i)}},s3=n=>(l,i,u)=>n(Gi(i),u)(l);class o3{constructor(l={}){this.logger=Pt.create("formatter"),this.options=l,this.init(l)}init(l,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const u=i.cacheInBuiltFormats?Cg:s3;this.formats={number:u((s,c)=>{const d=new Intl.NumberFormat(s,{...c});return h=>d.format(h)}),currency:u((s,c)=>{const d=new Intl.NumberFormat(s,{...c,style:"currency"});return h=>d.format(h)}),datetime:u((s,c)=>{const d=new Intl.DateTimeFormat(s,{...c});return h=>d.format(h)}),relativetime:u((s,c)=>{const d=new Intl.RelativeTimeFormat(s,{...c});return h=>d.format(h,c.range||"day")}),list:u((s,c)=>{const d=new Intl.ListFormat(s,{...c});return h=>d.format(h)})}}add(l,i){this.formats[l.toLowerCase().trim()]=i}addCached(l,i){this.formats[l.toLowerCase().trim()]=Cg(i)}format(l,i,u,s={}){if(!i||l==null)return l;const c=i.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&!c[0].includes(")")&&c.find(h=>h.includes(")"))){const h=c.findIndex(p=>p.includes(")"));c[0]=[c[0],...c.splice(1,h)].join(this.formatSeparator)}return c.reduce((h,p)=>{var x;const{formatName:m,formatOptions:v}=u3(p);if(this.formats[m]){let E=h;try{const C=((x=s==null?void 0:s.formatParams)==null?void 0:x[s.interpolationkey])||{},N=C.locale||C.lng||s.locale||s.lng||u;E=this.formats[m](h,N,{...v,...s,...C})}catch(C){this.logger.warn(C)}return E}else this.logger.warn(`there was no format function for ${m}`);return h},l)}}const c3=(n,l)=>{n.pending[l]!==void 0&&(delete n.pending[l],n.pendingCount--)};class f3 extends fs{constructor(l,i,u,s={}){var c,d;super(),this.backend=l,this.store=i,this.services=u,this.languageUtils=u.languageUtils,this.options=s,this.logger=Pt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(d=(c=this.backend)==null?void 0:c.init)==null||d.call(c,u,s.backend,s)}queueLoad(l,i,u,s){const c={},d={},h={},p={};return l.forEach(m=>{let v=!0;i.forEach(x=>{const E=`${m}|${x}`;!u.reload&&this.store.hasResourceBundle(m,x)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?d[E]===void 0&&(d[E]=!0):(this.state[E]=1,v=!1,d[E]===void 0&&(d[E]=!0),c[E]===void 0&&(c[E]=!0),p[x]===void 0&&(p[x]=!0)))}),v||(h[m]=!0)}),(Object.keys(c).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(d),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}loaded(l,i,u){const s=l.split("|"),c=s[0],d=s[1];i&&this.emit("failedLoading",c,d,i),!i&&u&&this.store.addResourceBundle(c,d,u,void 0,void 0,{skipCopy:!0}),this.state[l]=i?-1:2,i&&u&&(this.state[l]=0);const h={};this.queue.forEach(p=>{JS(p.loaded,[c],d),c3(p,l),i&&p.errors.push(i),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{h[m]||(h[m]={});const v=p.loaded[m];v.length&&v.forEach(x=>{h[m][x]===void 0&&(h[m][x]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(p=>!p.done)}read(l,i,u,s=0,c=this.retryTimeout,d){if(!l.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:l,ns:i,fcName:u,tried:s,wait:c,callback:d});return}this.readingCalls++;const h=(m,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(m&&v&&s<this.maxRetries){setTimeout(()=>{this.read(l,i,u,s+1,c*2,d)},c);return}d(m,v)},p=this.backend[u].bind(this.backend);if(p.length===2){try{const m=p(l,i);m&&typeof m.then=="function"?m.then(v=>h(null,v)).catch(h):h(null,m)}catch(m){h(m)}return}return p(l,i,h)}prepareLoading(l,i,u={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();he(l)&&(l=this.languageUtils.toResolveHierarchy(l)),he(i)&&(i=[i]);const c=this.queueLoad(l,i,u,s);if(!c.toLoad.length)return c.pending.length||s(),null;c.toLoad.forEach(d=>{this.loadOne(d)})}load(l,i,u){this.prepareLoading(l,i,{},u)}reload(l,i,u){this.prepareLoading(l,i,{reload:!0},u)}loadOne(l,i=""){const u=l.split("|"),s=u[0],c=u[1];this.read(s,c,"read",void 0,void 0,(d,h)=>{d&&this.logger.warn(`${i}loading namespace ${c} for language ${s} failed`,d),!d&&h&&this.logger.log(`${i}loaded namespace ${c} for language ${s}`,h),this.loaded(l,d,h)})}saveMissing(l,i,u,s,c,d={},h=()=>{}){var p,m,v,x,E;if((m=(p=this.services)==null?void 0:p.utils)!=null&&m.hasLoadedNamespace&&!((x=(v=this.services)==null?void 0:v.utils)!=null&&x.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${u}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(u==null||u==="")){if((E=this.backend)!=null&&E.create){const C={...d,isUpdate:c},N=this.backend.create.bind(this.backend);if(N.length<6)try{let w;N.length===5?w=N(l,i,u,s,C):w=N(l,i,u,s),w&&typeof w.then=="function"?w.then(T=>h(null,T)).catch(h):h(null,w)}catch(w){h(w)}else N(l,i,u,s,h,C)}!l||!l[0]||this.store.addResource(l[0],i,u,s)}}}const Hc=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let l={};if(typeof n[1]=="object"&&(l=n[1]),he(n[1])&&(l.defaultValue=n[1]),he(n[2])&&(l.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const i=n[3]||n[2];Object.keys(i).forEach(u=>{l[u]=i[u]})}return l},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ng=n=>(he(n.ns)&&(n.ns=[n.ns]),he(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),he(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&!n.supportedLngs.includes("cimode")&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),_u=()=>{},d3=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(i=>{typeof n[i]=="function"&&(n[i]=n[i].bind(n))})};class Hi extends fs{constructor(l={},i){if(super(),this.options=Ng(l),this.services={},this.logger=Pt,this.modules={external:[]},d3(this),i&&!this.isInitialized&&!l.isClone){if(!this.options.initAsync)return this.init(l,i),this;setTimeout(()=>{this.init(l,i)},0)}}init(l={},i){this.isInitializing=!0,typeof l=="function"&&(i=l,l={}),l.defaultNS==null&&l.ns&&(he(l.ns)?l.defaultNS=l.ns:l.ns.includes("translation")||(l.defaultNS=l.ns[0]));const u=Hc();this.options={...u,...this.options,...Ng(l)},this.options.interpolation={...u.interpolation,...this.options.interpolation},l.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=l.keySeparator),l.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=l.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=u.overloadTranslationOptionHandler);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Pt.init(s(this.modules.logger),this.options):Pt.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=o3;const v=new xg(this.options);this.store=new yg(this.options.resources,this.options);const x=this.services;x.logger=Pt,x.resourceStore=this.store,x.languageUtils=v,x.pluralResolver=new r3(v,{prepend:this.options.pluralSeparator}),m&&(x.formatter=s(m),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new Eg(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new f3(s(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(E,...C)=>{this.emit(E,...C)}),this.modules.languageDetector&&(x.languageDetector=s(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=s(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Xu(this.services,this.options),this.translator.on("*",(E,...C)=>{this.emit(E,...C)}),this.modules.external.forEach(E=>{E.init&&E.init(this)})}if(this.format=this.options.interpolation.format,i||(i=_u),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=(...v)=>this.store[m](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...v)=>(this.store[m](...v),this)});const h=_i(),p=()=>{const m=(v,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(x),i(v,x)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),h}loadResources(l,i=_u){var c,d;let u=i;const s=he(l)?l:this.language;if(typeof l=="function"&&(u=l),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return u();const h=[],p=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(x=>{x!=="cimode"&&(h.includes(x)||h.push(x))})};s?p(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(v=>p(v)),(d=(c=this.options.preload)==null?void 0:c.forEach)==null||d.call(c,m=>p(m)),this.services.backendConnector.load(h,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),u(m)})}else u(null)}reloadResources(l,i,u){const s=_i();return typeof l=="function"&&(u=l,l=void 0),typeof i=="function"&&(u=i,i=void 0),l||(l=this.languages),i||(i=this.options.ns),u||(u=_u),this.services.backendConnector.reload(l,i,c=>{s.resolve(),u(c)}),s}use(l){if(!l)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!l.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return l.type==="backend"&&(this.modules.backend=l),(l.type==="logger"||l.log&&l.warn&&l.error)&&(this.modules.logger=l),l.type==="languageDetector"&&(this.modules.languageDetector=l),l.type==="i18nFormat"&&(this.modules.i18nFormat=l),l.type==="postProcessor"&&Z0.addPostProcessor(l),l.type==="formatter"&&(this.modules.formatter=l),l.type==="3rdParty"&&this.modules.external.push(l),this}setResolvedLanguage(l){if(!(!l||!this.languages)&&!["cimode","dev"].includes(l)){for(let i=0;i<this.languages.length;i++){const u=this.languages[i];if(!["cimode","dev"].includes(u)&&this.store.hasLanguageSomeTranslations(u)){this.resolvedLanguage=u;break}}!this.resolvedLanguage&&!this.languages.includes(l)&&this.store.hasLanguageSomeTranslations(l)&&(this.resolvedLanguage=l,this.languages.unshift(l))}}changeLanguage(l,i){this.isLanguageChangingTo=l;const u=_i();this.emit("languageChanging",l);const s=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},c=(h,p)=>{p?this.isLanguageChangingTo===l&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,u.resolve((...m)=>this.t(...m)),i&&i(h,(...m)=>this.t(...m))},d=h=>{var v,x;!l&&!h&&this.services.languageDetector&&(h=[]);const p=he(h)?h:h&&h[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(he(h)?[h]:h);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),(x=(v=this.services.languageDetector)==null?void 0:v.cacheUserLanguage)==null||x.call(v,m)),this.loadResources(m,E=>{c(E,m)})};return!l&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!l&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(l),u}getFixedT(l,i,u,s){const c=s==null?void 0:s.scopeNs,d=(h,p,...m)=>{let v;typeof p!="object"?v=this.options.overloadTranslationOptionHandler([h,p].concat(m)):v={...p},v.lng=v.lng||d.lng,v.lngs=v.lngs||d.lngs;const x=v.ns!==void 0&&v.ns!==null;v.ns=v.ns||d.ns,v.keyPrefix!==""&&(v.keyPrefix=v.keyPrefix||u||d.keyPrefix);const E={...this.options,...v};Array.isArray(c)&&!x&&(E.ns=c),typeof v.keyPrefix=="function"&&(v.keyPrefix=Ra(v.keyPrefix,E));const C=this.options.keySeparator||".";let N;return v.keyPrefix&&Array.isArray(h)?N=h.map(w=>(typeof w=="function"&&(w=Ra(w,E)),`${v.keyPrefix}${C}${w}`)):(typeof h=="function"&&(h=Ra(h,E)),N=v.keyPrefix?`${v.keyPrefix}${C}${h}`:h),this.t(N,v)};return he(l)?d.lng=l:d.lngs=l,d.ns=i,d.keyPrefix=u,d}t(...l){var i;return(i=this.translator)==null?void 0:i.translate(...l)}exists(...l){var i;return(i=this.translator)==null?void 0:i.exists(...l)}setDefaultNamespace(l){this.options.defaultNS=l}hasLoadedNamespace(l,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const u=i.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(u.toLowerCase()==="cimode")return!0;const d=(h,p)=>{const m=this.services.backendConnector.state[`${h}|${p}`];return m===-1||m===0||m===2};if(i.precheck){const h=i.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(u,l)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(u,l)&&(!s||d(c,l)))}loadNamespaces(l,i){const u=_i();return this.options.ns?(he(l)&&(l=[l]),l.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{u.resolve(),i&&i(s)}),u):(i&&i(),Promise.resolve())}loadLanguages(l,i){const u=_i();he(l)&&(l=[l]);const s=this.options.preload||[],c=l.filter(d=>!s.includes(d)&&this.services.languageUtils.isSupportedCode(d));return c.length?(this.options.preload=s.concat(c),this.loadResources(d=>{u.resolve(),i&&i(d)}),u):(i&&i(),Promise.resolve())}dir(l){var s,c;if(l||(l=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!l)return"rtl";try{const d=new Intl.Locale(l);if(d&&d.getTextInfo){const h=d.getTextInfo();if(h&&h.direction)return h.direction}}catch{}const i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],u=((c=this.services)==null?void 0:c.languageUtils)||new xg(Hc());return l.toLowerCase().indexOf("-latn")>1?"ltr":i.includes(u.getLanguagePartFromCode(l))||l.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(l={},i){const u=new Hi(l,i);return u.createInstance=Hi.createInstance,u}cloneInstance(l={},i=_u){const u=l.forkResourceStore;u&&delete l.forkResourceStore;const s={...this.options,...l,isClone:!0},c=new Hi(s);if((l.debug!==void 0||l.prefix!==void 0)&&(c.logger=c.logger.clone(l)),["store","services","language"].forEach(h=>{c[h]=this[h]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},u){const h=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((v,x)=>(v[x]={...p[m][x]},v),p[m]),p),{});c.store=new yg(h,s),c.services.resourceStore=c.store}if(l.interpolation){const p={...Hc().interpolation,...this.options.interpolation,...l.interpolation},m={...s,interpolation:p};c.services.interpolator=new Eg(m)}return c.translator=new Xu(c.services,s),c.translator.on("*",(h,...p)=>{c.emit(h,...p)}),c.init(s,i),c.translator.options=s,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const it=Hi.createInstance();it.createInstance;it.dir;it.init;it.loadResources;it.reloadResources;it.use;it.changeLanguage;it.getFixedT;it.t;it.exists;it.setDefaultNamespace;it.hasLoadedNamespace;it.loadNamespaces;it.loadLanguages;var qc,Ag;function h3(){return Ag||(Ag=1,qc={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),qc}var p3=h3();const m3=h0(p3);var g3=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Tg(n){var l={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=n.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(l.name=i[1],(m3[i[1]]||n.charAt(n.length-2)==="/")&&(l.voidElement=!0),l.name.startsWith("!--"))){var u=n.indexOf("-->");return{type:"comment",comment:u!==-1?n.slice(4,u):""}}for(var s=new RegExp(g3),c=null;(c=s.exec(n))!==null;)if(c[0].trim())if(c[1]){var d=c[1].trim(),h=[d,""];d.indexOf("=")>-1&&(h=d.split("=")),l.attrs[h[0]]=h[1],s.lastIndex--}else c[2]&&(l.attrs[c[2]]=c[3].trim().substring(1,c[3].length-1));return l}var y3=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,x3=/^\s*$/,v3=Object.create(null);function I0(n,l){switch(l.type){case"text":return n+l.content;case"tag":return n+="<"+l.name+(l.attrs?(function(i){var u=[];for(var s in i)u.push(s+'="'+i[s]+'"');return u.length?" "+u.join(" "):""})(l.attrs):"")+(l.voidElement?"/>":">"),l.voidElement?n:n+l.children.reduce(I0,"")+"</"+l.name+">";case"comment":return n+"<!--"+l.comment+"-->"}}var b3={parse:function(n,l){l||(l={}),l.components||(l.components=v3);var i,u=[],s=[],c=-1,d=!1;if(n.indexOf("<")!==0){var h=n.indexOf("<");u.push({type:"text",content:h===-1?n:n.substring(0,h)})}return n.replace(y3,function(p,m){if(d){if(p!=="</"+i.name+">")return;d=!1}var v,x=p.charAt(1)!=="/",E=p.startsWith("<!--"),C=m+p.length,N=n.charAt(C);if(E){var w=Tg(p);return c<0?(u.push(w),u):((v=s[c]).children.push(w),u)}if(x&&(c++,(i=Tg(p)).type==="tag"&&l.components[i.name]&&(i.type="component",d=!0),i.voidElement||d||!N||N==="<"||i.children.push({type:"text",content:n.slice(C,n.indexOf("<",C))}),c===0&&u.push(i),(v=s[c-1])&&v.children.push(i),s[c]=i),(!x||i.voidElement)&&(c>-1&&(i.voidElement||i.name===p.slice(2,-1))&&(c--,i=c===-1?u:s[c]),!d&&N!=="<"&&N)){v=c===-1?u:s[c].children;var T=n.indexOf("<",C),R=n.slice(C,T===-1?void 0:T);x3.test(R)&&(R=" "),(T>-1&&c+v.length>=0||R!==" ")&&v.push({type:"text",content:R})}}),u},stringify:function(n){return n.reduce(function(l,i){return l+I0("",i)},"")}};const Bu=(n,l,i,u)=>{var c,d,h,p;const s=[i,{code:l,...u||{}}];if((d=(c=n==null?void 0:n.services)==null?void 0:c.logger)!=null&&d.forward)return n.services.logger.forward(s,"warn","react-i18next::",!0);vt(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(p=(h=n==null?void 0:n.services)==null?void 0:h.logger)!=null&&p.warn?n.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},jg={},Fi=(n,l,i,u)=>{vt(i)&&jg[i]||(vt(i)&&(jg[i]=new Date),Bu(n,l,i,u))},W0=(n,l)=>()=>{if(n.isInitialized)l();else{const i=()=>{setTimeout(()=>{n.off("initialized",i)},0),l()};n.on("initialized",i)}},of=(n,l,i)=>{n.loadNamespaces(l,W0(n,i))},wg=(n,l,i,u)=>{if(vt(i)&&(i=[i]),n.options.preload&&n.options.preload.indexOf(l)>-1)return of(n,i,u);i.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(l,W0(n,u))},S3=(n,l,i={})=>!l.languages||!l.languages.length?(Fi(l,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:l.languages}),!0):l.hasLoadedNamespace(n,{lng:i.lng,precheck:(u,s)=>{if(i.bindI18n&&i.bindI18n.indexOf("languageChanging")>-1&&u.services.backendConnector.backend&&u.isLanguageChangingTo&&!s(u.isLanguageChangingTo,n))return!1}}),vt=n=>typeof n=="string",Tn=n=>typeof n=="object"&&n!==null,E3=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,C3={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},N3=n=>C3[n],P0=n=>n.replace(E3,N3);let cf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:P0,transDefaultProps:void 0};const A3=(n={})=>{cf={...cf,...n}},Uf=()=>cf;let ey;const T3=n=>{ey=n},Bf=()=>ey,Hu=(n,l)=>{var u;if(!n)return!1;const i=((u=n.props)==null?void 0:u.children)??n.children;return l?i.length>0:!!i},Li=n=>{var i,u;if(!n)return[];const l=((i=n.props)==null?void 0:i.children)??n.children;return(u=n.props)!=null&&u.i18nIsDynamicList?la(l):l},j3=n=>Array.isArray(n)&&n.every(b.isValidElement),la=n=>Array.isArray(n)?n:[n],w3=(n,l)=>{const i={...l};return i.props={...l.props,...n.props},i},O3=n=>{const l={};if(!n)return l;const i=u=>{la(u).forEach(c=>{vt(c)||(Hu(c)?i(Li(c)):Tn(c)&&!b.isValidElement(c)&&Object.assign(l,c))})};return i(n),l},ff=(n,l,i,u)=>{if(!n)return"";let s="";const c=la(n),d=l!=null&&l.transSupportBasicHtmlNodes?l.transKeepBasicHtmlNodesFor??[]:[];return c.forEach((h,p)=>{if(vt(h)){s+=`${h}`;return}if(b.isValidElement(h)){const{props:m,type:v}=h,x=Object.keys(m).length,E=d.indexOf(v)>-1,C=m.children;if(!C&&E&&!x){s+=`<${v}/>`;return}if(!C&&(!E||x)||m.i18nIsDynamicList){s+=`<${p}></${p}>`;return}if(E&&x<=1){const w=vt(C)?C:ff(C,l,i,u);s+=`<${v}>${w}</${v}>`;return}const N=ff(C,l,i,u);s+=`<${p}>${N}</${p}>`;return}if(h===null){Bu(i,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:u});return}if(Tn(h)){const{format:m,...v}=h,x=Object.keys(v);if(x.length===1){const E=m?`${x[0]}, ${m}`:x[0];s+=`{{${E}}}`;return}Bu(i,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:u,child:h});return}Bu(i,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:u,child:h})}),s},R3=(n,l=[],i={})=>{if(!n)return n;const u=Object.keys(i),s=[...l,...u];let c="",d=0;for(;d<n.length;)if(n[d]==="<"){let h=!1;const p=n.slice(d).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(p){const m=p[1];(/^\d+$/.test(m)||s.includes(m))&&(h=!0,c+=p[0],d+=p[0].length)}if(!h){const m=n.slice(d).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(m){const v=m[1];(/^\d+$/.test(v)||s.includes(v))&&(h=!0,c+=m[0],d+=m[0].length)}}h||(c+="<",d+=1)}else c+=n[d],d+=1;return c},_3=(n,l,i,u,s,c,d)=>{if(i==="")return[];const h=s.transKeepBasicHtmlNodesFor||[],p=i&&new RegExp(h.map(j=>`<${j}`).join("|")).test(i);if(!n&&!l&&!p&&!d)return[i];const m=l??{},v=j=>{la(j).forEach(U=>{vt(U)||(Hu(U)?v(Li(U)):Tn(U)&&!b.isValidElement(U)&&Object.assign(m,U))})};v(n);const x=R3(i,h,m),E=b3.parse(`<0>${x}</0>`),C={...m,...c},N=(j,z,U)=>{var F;const X=Li(j),Q=T(X,z.children,U);return j3(X)&&Q.length===0||(F=j.props)!=null&&F.i18nIsDynamicList?X:Q},w=(j,z,U,X,Q)=>{j.dummy?(j.children=z,U.push(b.cloneElement(j,{key:X},Q?void 0:z))):U.push(...b.Children.map([j],F=>{var q;if(F.type===b.Fragment||((q=F.props)==null?void 0:q.i18nIsDynamicList)!==void 0){const J={key:X};return F&&F.props&&Object.keys(F.props).forEach(oe=>{oe==="children"||oe==="i18nIsDynamicList"||(J[oe]=F.props[oe])}),b.createElement(F.type,J,Q?null:z)}const K={key:X};return F&&F.props&&Object.keys(F.props).forEach(J=>{J==="ref"||J==="children"||(K[J]=F.props[J])}),b.cloneElement(F,K,Q?null:z)}))},T=(j,z,U)=>{const X=la(j),Q=la(z),F={};return Q.reduce((K,q,J)=>{var ee,le;const oe=((le=(ee=q.children)==null?void 0:ee[0])==null?void 0:le.content)&&u.services.interpolator.interpolate(q.children[0].content,C,u.language);if(q.type==="tag"){let te=X[parseInt(q.name,10)];!te&&l&&(te=l[q.name]),U.length===1&&!te&&(te=U[0][q.name]),te||(te={});const re={...q.attrs};d&&Object.keys(re).forEach(Y=>{const P=re[Y];vt(P)&&(re[Y]=P0(P))});const M=Object.keys(re).length!==0?w3({props:re},te):te,H=b.isValidElement(M),I=H&&Hu(q,!0)&&!q.voidElement,Z=p&&Tn(M)&&M.dummy&&!H,W=Tn(l)&&Object.hasOwnProperty.call(l,q.name);if(vt(M)){const Y=u.services.interpolator.interpolate(M,C,u.language);K.push(Y)}else if(Hu(M)||I){const Y=N(M,q,U);w(M,Y,K,J)}else if(Z){const Y=T(X,q.children,U);w(M,Y,K,J)}else if(Number.isNaN(parseFloat(q.name)))if(W){const Y=N(M,q,U);w(M,Y,K,J,q.voidElement)}else if(s.transSupportBasicHtmlNodes&&h.indexOf(q.name)>-1)if(q.voidElement)K.push(b.createElement(q.name,{key:`${q.name}-${J}`}));else{const Y=F[q.name]||0;F[q.name]=Y+1;let P,ne=0;for(let Ae=0;Ae<X.length;Ae+=1){const ut=X[Ae];if(b.isValidElement(ut)&&ut.type===q.name){if(ne===Y){P=ut;break}ne+=1}}const de=P?la(Li(P)):X,fe=T(de,q.children,U);K.push(b.createElement(q.name,{key:`${q.name}-${J}`},fe))}else if(q.voidElement)K.push(`<${q.name} />`);else{const Y=T(X,q.children,U);K.push(`<${q.name}>${Y}</${q.name}>`)}else if(Tn(M)&&!H){const Y=q.children[0]?oe:null;Y&&K.push(Y)}else w(M,oe,K,J,q.children.length!==1||!oe)}else if(q.type==="text"){const te=s.transWrapTextNodes,re=typeof s.unescape=="function"?s.unescape:Uf().unescape,M=d?re(u.services.interpolator.interpolate(q.content,C,u.language)):u.services.interpolator.interpolate(q.content,C,u.language);te?K.push(b.createElement(te,{key:`${q.name}-${J}`},M)):K.push(M)}return K},[])},R=T([{dummy:!0,children:n||[]}],E,la(n||[]));return Li(R[0])},ty=(n,l,i)=>{const u=n.key||l,s=b.cloneElement(n,{key:u});if(!s.props||!s.props.children||i.indexOf(`${l}/>`)<0&&i.indexOf(`${l} />`)<0)return s;function c(){return b.createElement(b.Fragment,null,s)}return b.createElement(c,{key:u})},M3=(n,l)=>n.map((i,u)=>ty(i,u,l)),z3=(n,l)=>{const i={};return Object.keys(n).forEach(u=>{Object.assign(i,{[u]:ty(n[u],u,l)})}),i},L3=(n,l,i,u)=>n?Array.isArray(n)?M3(n,l):Tn(n)?z3(n,l):(Fi(i,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:u}),null):null,D3=n=>!Tn(n)||Array.isArray(n)?!1:Object.keys(n).reduce((l,i)=>l&&Number.isNaN(Number.parseFloat(i)),!0);function k3({children:n,count:l,parent:i,i18nKey:u,context:s,tOptions:c={},values:d,defaults:h,components:p,ns:m,i18n:v,t:x,shouldUnescape:E,...C}){var W,Y,P,ne,de,fe;const N=v||Bf();if(!N)return Fi(N,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:u}),n;const w=x||N.t.bind(N)||(Ae=>Ae),T={...Uf(),...(W=N.options)==null?void 0:W.react};let R=m||w.ns||((Y=N.options)==null?void 0:Y.defaultNS);R=vt(R)?[R]:R||["translation"];const{transDefaultProps:j}=T,z=j!=null&&j.tOptions?{...j.tOptions,...c}:c,U=E??(j==null?void 0:j.shouldUnescape),X=j!=null&&j.values?{...j.values,...d}:d,Q=j!=null&&j.components?{...j.components,...p}:p,F=ff(n,T,N,u),K=h||(z==null?void 0:z.defaultValue)||F||T.transEmptyNodeValue||(typeof u=="function"?Ra(u):u),{hashTransKey:q}=T,J=u||(q?q(F||K):F||K);(ne=(P=N.options)==null?void 0:P.interpolation)!=null&&ne.defaultVariables?d=X&&Object.keys(X).length>0?{...X,...N.options.interpolation.defaultVariables}:{...N.options.interpolation.defaultVariables}:d=X;const oe=O3(n);oe&&typeof oe.count=="number"&&l===void 0&&(l=oe.count);const ee=d||l!==void 0&&!((fe=(de=N.options)==null?void 0:de.interpolation)!=null&&fe.alwaysFormat)||!n?z.interpolation:{interpolation:{...z.interpolation,prefix:"#$?",suffix:"?$#"}},le={...z,context:s||z.context,count:l,...d,...ee,defaultValue:K,ns:R};let te=J?w(J,le):K;te===J&&K&&(te=K);const re=L3(Q,te,N,u);let M=re||n,H=null;D3(re)&&(H=re,M=n);const I=_3(M,H,te,N,T,le,U),Z=i??T.defaultTransParent;return Z?b.createElement(Z,C,I):I}const U3={type:"3rdParty",init(n){A3(n.options.react),T3(n)}},ny=b.createContext();class B3{constructor(){this.usedNamespaces={}}addUsedNamespaces(l){l.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function H3({children:n,count:l,parent:i,i18nKey:u,context:s,tOptions:c={},values:d,defaults:h,components:p,ns:m,i18n:v,t:x,shouldUnescape:E,...C}){var j;const{i18n:N,defaultNS:w}=b.useContext(ny)||{},T=v||N||Bf(),R=x||(T==null?void 0:T.t.bind(T));return k3({children:n,count:l,parent:i,i18nKey:u,context:s,tOptions:c,values:d,defaults:h,components:p,ns:m||(R==null?void 0:R.ns)||w||((j=T==null?void 0:T.options)==null?void 0:j.defaultNS),i18n:T,t:x,shouldUnescape:E,...C})}var Yc={exports:{}},Vc={};/**
|
|
225
|
+
* @license React
|
|
226
|
+
* use-sync-external-store-shim.production.js
|
|
227
|
+
*
|
|
228
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the MIT license found in the
|
|
231
|
+
* LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/var Og;function q3(){if(Og)return Vc;Og=1;var n=Nf();function l(x,E){return x===E&&(x!==0||1/x===1/E)||x!==x&&E!==E}var i=typeof Object.is=="function"?Object.is:l,u=n.useState,s=n.useEffect,c=n.useLayoutEffect,d=n.useDebugValue;function h(x,E){var C=E(),N=u({inst:{value:C,getSnapshot:E}}),w=N[0].inst,T=N[1];return c(function(){w.value=C,w.getSnapshot=E,p(w)&&T({inst:w})},[x,C,E]),s(function(){return p(w)&&T({inst:w}),x(function(){p(w)&&T({inst:w})})},[x]),d(C),C}function p(x){var E=x.getSnapshot;x=x.value;try{var C=E();return!i(x,C)}catch{return!0}}function m(x,E){return E()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Vc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,Vc}var Rg;function Y3(){return Rg||(Rg=1,Yc.exports=q3()),Yc.exports}var V3=Y3();const G3=(n,l)=>{if(vt(l))return l;if(Tn(l)&&vt(l.defaultValue))return l.defaultValue;if(typeof n=="function")return"";if(Array.isArray(n)){const i=n[n.length-1];return typeof i=="function"?"":i}return n},F3={t:G3,ready:!1},$3=()=>()=>{},Be=(n,l={})=>{var q,J,oe;const{i18n:i}=l,{i18n:u,defaultNS:s}=b.useContext(ny)||{},c=i||u||Bf();c&&!c.reportNamespaces&&(c.reportNamespaces=new B3),c||Fi(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=b.useMemo(()=>{var ee;return{...Uf(),...(ee=c==null?void 0:c.options)==null?void 0:ee.react,...l}},[c,l]),{useSuspense:h,keyPrefix:p}=d,m=s||((q=c==null?void 0:c.options)==null?void 0:q.defaultNS),v=vt(m)?[m]:m||["translation"],x=b.useMemo(()=>v,v);(oe=(J=c==null?void 0:c.reportNamespaces)==null?void 0:J.addUsedNamespaces)==null||oe.call(J,x);const E=b.useRef(0),C=b.useCallback(ee=>{if(!c)return $3;const{bindI18n:le,bindI18nStore:te}=d,re=()=>{E.current+=1,ee()};return le&&c.on(le,re),te&&c.store.on(te,re),()=>{le&&le.split(" ").forEach(M=>c.off(M,re)),te&&te.split(" ").forEach(M=>c.store.off(M,re))}},[c,d]),N=b.useRef(),w=b.useCallback(()=>{if(!c)return F3;const ee=!!(c.isInitialized||c.initializedStoreOnce)&&x.every(I=>S3(I,c,d)),le=l.lng||c.language,te=E.current,re=N.current;if(re&&re.ready===ee&&re.lng===le&&re.keyPrefix===p&&re.revision===te)return re;const H={t:c.getFixedT(le,d.nsMode==="fallback"?x:x[0],p,{scopeNs:x}),ready:ee,lng:le,keyPrefix:p,revision:te};return N.current=H,H},[c,x,p,d,l.lng]),[T,R]=b.useState(0),{t:j,ready:z}=V3.useSyncExternalStore(C,w,w);b.useEffect(()=>{if(c&&!z&&!h){const ee=()=>R(le=>le+1);l.lng?wg(c,l.lng,x,ee):of(c,x,ee)}},[c,l.lng,x,z,h,T]);const U=c||{},X=b.useRef(null),Q=b.useRef(),F=ee=>{const le=Object.getOwnPropertyDescriptors(ee);le.__original&&delete le.__original;const te=Object.create(Object.getPrototypeOf(ee),le);if(!Object.prototype.hasOwnProperty.call(te,"__original"))try{Object.defineProperty(te,"__original",{value:ee,writable:!1,enumerable:!1,configurable:!1})}catch{}return te},K=b.useMemo(()=>{const ee=U,le=ee==null?void 0:ee.language;let te=ee;ee&&(X.current&&X.current.__original===ee?Q.current!==le?(te=F(ee),X.current=te,Q.current=le):te=X.current:(te=F(ee),X.current=te,Q.current=le));const re=!z&&!h?(...H)=>(Fi(c,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),j(...H)):j,M=[re,te,z];return M.t=re,M.i18n=te,M.ready=z,M},[j,U,z,U.resolvedLanguage,U.language,U.languages]);if(c&&h&&!z)throw new Promise(ee=>{const le=()=>ee();l.lng?wg(c,l.lng,x,le):of(c,x,le)});return K};function K3(){const{t:n}=Be(),l=Ht(s=>s.connectionState),i=b.useRef(!1);l==="disconnected"&&(i.current=!0),l==="connected"&&(i.current=!1);const u=i.current&&l!=="connected";return y.jsx("span",{className:`w-2 h-2 rounded-full transition-colors ${u?"bg-red-500":"bg-green-500"}`,title:n(u?"common.offline":"common.online")})}var ay=p0();function X3(n,l,i=12){const{innerWidth:u,innerHeight:s}=window;let c=n.x,d=n.y;return c+l.width+i>u&&(c=u-l.width-i),d+l.height+i>s&&(d=s-l.height-i),c=Math.max(i,c),d=Math.max(i,d),{left:c,top:d}}function Q3({position:n,onClose:l,children:i}){const u=b.useRef(null),s=b.useRef(l);s.current=l;const c=b.useCallback(()=>s.current(),[]);return b.useEffect(()=>{function d(m){u.current&&!u.current.contains(m.target)&&c()}function h(m){u.current&&!u.current.contains(m.target)&&c()}function p(m){m.key==="Escape"&&c()}return document.addEventListener("mousedown",d),document.addEventListener("contextmenu",h),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("contextmenu",h),document.removeEventListener("keydown",p)}},[c]),b.useEffect(()=>{if(u.current){const d=u.current.getBoundingClientRect(),h=X3(n,{width:d.width,height:d.height});u.current.style.left=`${h.left}px`,u.current.style.top=`${h.top}px`,u.current.style.opacity="1"}},[n]),ay.createPortal(y.jsx("div",{ref:u,className:"glass-popover z-50 py-1.5 min-w-[160px]",style:{position:"fixed",left:n.x,top:n.y,opacity:0},children:i}),document.body)}function Z3({icon:n,label:l,danger:i=!1,disabled:u=!1,onClick:s}){return y.jsxs("button",{onClick:c=>{c.stopPropagation(),u||s()},disabled:u,className:`w-full text-left flex items-center gap-2 px-3 py-1.5 text-[13px] leading-[18px] transition-colors ${u?"opacity-40 cursor-default":i?"text-red-500 hover:bg-[var(--fill-tertiary)]":"text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)]"}`,children:[n&&y.jsx("span",{className:"flex-shrink-0 w-4 h-4 flex items-center justify-center",children:n}),y.jsx("span",{children:l})]})}const J3=500;function _g({instances:n,selectedId:l,onSelect:i,onShutdown:u,onNewInstance:s}){const{t:c}=Be(),d=ss(),h=kf(),[p,m]=b.useState(null),v=b.useRef(null),x=b.useRef(!1),E=b.useCallback((Q,F)=>{Q.preventDefault(),Q.stopPropagation(),m({position:{x:Q.clientX,y:Q.clientY},instanceId:F})},[]),C=b.useCallback((Q,F)=>{x.current=!1;const K=Q.touches[0],q={x:K.clientX,y:K.clientY};v.current=setTimeout(()=>{var J;x.current=!0,(J=navigator.vibrate)==null||J.call(navigator,10),m({position:q,instanceId:F})},J3)},[]),N=b.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),w=b.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),T=b.useCallback(()=>m(null),[]),[R,j]=b.useState(null),z=b.useRef(null);b.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);const U=b.useCallback(Q=>{navigator.clipboard.writeText(Q).then(()=>{j(Q),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>j(null),1500)},()=>{})},[]),X=b.useMemo(()=>{const Q=new Map;for(const F of n){const K=Q.get(F.edgeId);K?K.push(F):Q.set(F.edgeId,[F])}return[...Q.entries()].sort((F,K)=>F[0].localeCompare(K[0]))},[n]);return y.jsxs("aside",{className:"glass-panel select-none w-[240px] md:w-[240px] flex-shrink-0 flex flex-col overflow-hidden max-md:w-full max-md:flex-1",children:[y.jsx("div",{className:"px-4 pt-4 pb-2",children:y.jsxs("div",{className:"grid grid-cols-[auto_1fr] grid-rows-[auto_auto] gap-x-2.5 items-center",children:[y.jsx("div",{className:"row-span-2",children:y.jsx("img",{src:h,alt:"Paimon",className:"h-[34px] aspect-square object-contain"})}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("h1",{className:"text-[16px] leading-[20px] max-md:text-[18px] max-md:leading-[24px] font-semibold text-[var(--label-primary)]",children:"Paimon"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("button",{onClick:s,title:c("sidebar.newInstance"),className:"select-none w-6 h-6 flex items-center justify-center rounded-full text-[var(--label-secondary)] hover:text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)] transition-all duration-150",children:y.jsx(F0,{size:16})}),y.jsx(K3,{})]})]}),y.jsxs("div",{className:"text-[12px] leading-[15px] max-md:text-[13px] max-md:leading-[18px] text-[var(--label-tertiary)]",children:[c("sidebar.machine",{count:X.length})," · ",c("sidebar.instance",{count:n.length})]})]})}),y.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-1 scrollbar-auto",children:n.length===0?y.jsx("div",{className:"px-3 py-8 text-center text-[var(--label-tertiary)] text-[12px] leading-[16px] max-md:text-[13px] max-md:leading-[18px]",children:c("sidebar.noInstances")}):y.jsx("div",{children:X.map(([Q,F],K)=>y.jsxs("div",{children:[y.jsxs("button",{type:"button",onClick:()=>U(Q),title:Q,className:`flex items-center gap-1 px-2.5 pb-1 text-[11px] leading-[14px] font-semibold text-[var(--label-tertiary)] max-w-full max-md:px-3 rounded-[4px] hover:text-[var(--label-secondary)] transition-colors cursor-pointer ${K===0?"pt-1":"pt-3"}`,children:[y.jsx("span",{className:"truncate",children:Q}),y.jsx("span",{className:"shrink-0 opacity-60",children:R===Q?y.jsx(er,{size:10,className:"text-green-500"}):y.jsx(V0,{size:10})})]}),y.jsx("ul",{className:"space-y-0.5 max-md:space-y-1",children:F.map(q=>{var J;return y.jsx("li",{children:y.jsxs("button",{onClick:()=>{x.current||i(q.id)},onContextMenu:oe=>E(oe,q.id),onTouchStart:oe=>C(oe,q.id),onTouchEnd:N,onTouchMove:w,className:`w-full text-left px-2.5 py-1.5 max-md:px-3 max-md:py-2.5 rounded-[8px] transition-all duration-150 ${l===q.id?"bg-[rgba(0,145,255,0.08)] dark:bg-[rgba(0,145,255,0.12)]":"hover:bg-[var(--fill-tertiary)]"}`,children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:`w-1.5 h-1.5 max-md:w-2 max-md:h-2 rounded-full flex-shrink-0 transition-colors ${q.status==="streaming"?"bg-[var(--color-accent)] animate-pulse":q.status==="compacting"?"bg-amber-500 animate-pulse":"bg-green-500"}`,title:q.status==="streaming"?c("sidebar.statusStreaming"):q.status==="compacting"?c("sidebar.statusCompacting"):c("sidebar.statusIdle")}),y.jsx("span",{className:"text-[14px] leading-[18px] max-md:text-[15px] max-md:leading-[21px] text-[var(--label-primary)] truncate",children:q.cwd.split("/").pop()||q.cwd})]}),y.jsx("div",{className:"ml-3.5 text-[11px] leading-[14px] max-md:text-[12px] max-md:leading-[16px] text-[var(--label-secondary)] truncate mt-0.5",children:q.model.name||`${q.model.provider}/${q.model.id}`}),((J=q.contextUsage)==null?void 0:J.percent)!=null&&q.contextUsage.percent>0&&y.jsx("div",{className:"ml-3.5 mt-1.5 h-[3px] rounded-full bg-[var(--fill-quaternary)] overflow-hidden",children:y.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${Math.max(2,Math.min(100,q.contextUsage.percent))}%`,backgroundColor:q.contextUsage.percent>=90?"#ff4245":q.contextUsage.percent>=60?"#ff9230":"#30d158"}})})]})},q.id)})})]},Q))})}),p&&y.jsx(Q3,{position:p.position,onClose:T,children:y.jsx(Z3,{icon:y.jsx(AS,{size:14}),label:c("sidebar.shutdown"),danger:!0,onClick:()=>{u(p.instanceId),T()}})}),y.jsx("div",{className:"px-3 py-2 border-t border-[var(--separator)]",children:y.jsxs("button",{onClick:()=>d("/settings"),className:"flex items-center gap-2 w-full px-2.5 py-1.5 max-md:py-2.5 rounded-[8px] text-[var(--label-secondary)] hover:text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)] transition-all duration-150",children:[y.jsx(_S,{size:15,className:"max-md:w-4 max-md:h-4"}),y.jsx("span",{className:"text-[13px] leading-[18px] max-md:text-[14px] max-md:leading-[20px]",children:c("sidebar.settings")})]})})]})}function df(n){const l=n.id??n.__renderKey;if(!l)throw new Error(`SessionEntry missing stable render key: type=${n.type}`);return l}const Hf=Object.freeze({text:"",images:[]}),Qu=cs((n,l)=>({drafts:new Map,setDraft:(i,u)=>{n(s=>{const c=s.drafts.get(i)??Hf,d=typeof u=="function"?u(c):u,h=new Map(s.drafts);return d.text||d.images.length>0?h.set(i,d):h.delete(i),{drafts:h}})}})),$i=n=>n!==void 0&&n!=="idle",ct={eof:null,asterisk:42,underscore:95},Zu={characterGroupPunctuation:2,characterGroupWhitespace:1},aa={emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"},I3=161,W3=1114109,P3=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],eE=12288,tE=65510,nE=[12288,12288,65281,65376,65504,65510],aE=8361,lE=65518,iE=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],rE=32,uE=10630,sE=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],oE=4352,cE=262141,ly=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],tr=(n,l)=>{let i=0,u=Math.floor(n.length/2)-1;for(;i<=u;){const s=Math.floor((i+u)/2),c=s*2;if(l<n[c])u=s-1;else if(l>n[c+1])i=s+1;else return!0}return!1},Mg=19968,[fE,dE]=hE(ly);function hE(n){let l=n[0],i=n[1];for(let u=0;u<n.length;u+=2){const s=n[u],c=n[u+1];if(Mg>=s&&Mg<=c)return[s,c];c-s>i-l&&(l=s,i=c)}return[l,i]}const pE=n=>n<I3||n>W3?!1:tr(P3,n),mE=n=>n<eE||n>tE?!1:tr(nE,n),gE=n=>n<aE||n>lE?!1:tr(iE,n),yE=n=>n<rE||n>uE?!1:tr(sE,n),xE=n=>n>=fE&&n<=dE?!0:n<oE||n>cE?!1:tr(ly,n);function vE(n){return pE(n)?"ambiguous":mE(n)?"fullwidth":gE(n)?"halfwidth":yE(n)?"narrow":xE(n)?"wide":"neutral"}function bE(n){if(!Number.isSafeInteger(n))throw new TypeError(`Expected a code point, got \`${typeof n}\`.`)}function SE(n){return bE(n),vE(n)}function EE(n){return new RegExp("^\\p{Emoji_Presentation}","u").test(String.fromCodePoint(n))}function CE(n){if(!n||n<4352)return!1;switch(SE(n)){case"fullwidth":case"halfwidth":return!0;case"wide":return!EE(n);case"narrow":return!1;case"ambiguous":return 917760<=n&&n<=917999?null:!1;case"neutral":return new RegExp("^\\p{sc=Hangul}","u").test(String.fromCodePoint(n))}}function NE(n,l){return l!==65025||!n||n<8216?!1:n===8216||n===8217||n===8220||n===8221}function AE(n){return n!==null&&n>=65024&&n<=65038}const TE=iy(new RegExp("\\p{P}|\\p{S}","u")),jE=iy(/\s/);function iy(n){return l;function l(i){return i!==null&&i>-1&&n.test(String.fromCodePoint(i))}}function en(n){return!!(n&Zu.characterGroupWhitespace)}function Ki(n){return(n&qt.cjkPunctuation)===Zu.characterGroupPunctuation}function ry(n){return!!(n&qt.cjk)}function Ju(n){return!!(n&qt.cjkOrIvs)}function qf(n){return n===qt.nonEmojiGeneralUseVS}function Iu(n){return!!(n&qt.spaceOrPunctuation)}let qt;(function(n){n.spaceOrPunctuation=3,n.cjk=4096,n.cjkPunctuation=4098,n.ivs=8192,n.cjkOrIvs=12288,n.nonEmojiGeneralUseVS=16384,n.variationSelector=24576,n.ivsToCjkRightShift=1})(qt||(qt={}));function ra(n){if(n===ct.eof||Dv(n)||jE(n))return Zu.characterGroupWhitespace;let l=0;if(n>=4352){if(AE(n))return qt.nonEmojiGeneralUseVS;switch(CE(n)){case null:return qt.ivs;case!0:l|=qt.cjk;break}}return TE(n)&&(l|=Zu.characterGroupPunctuation),l}function uy(n,l,i){if(!qf(n))return n;const u=l(),s=ra(u);return!u||en(s)?n:NE(u,i)?qt.cjkPunctuation:wE(s)}function wE(n){return n&~qt.ivs}function OE(n){return!!(n&&n>=55296&&n<=56319)}function RE(n){return!!(n&&n>=56320&&n<=57343)}function _E(n,l,i){if(l._bufferIndex<2)return n;const u=i({start:{...l,_bufferIndex:l._bufferIndex-2},end:l}).codePointAt(0);return u&&u>=65536?u:n}function ME(n,l,i){const u=n>=65536?2:1;if(l._bufferIndex<1+u)return null;const s=l._bufferIndex-u-2,c=i({start:{...l,_bufferIndex:s>=0?s:0},end:{...l,_bufferIndex:l._bufferIndex-u}}),d=c.charCodeAt(c.length-1);if(Number.isNaN(d))return null;if(c.length<2||d<56320||57343<d)return d;const h=c.codePointAt(0);return h&&h>=65536?h:d}var zE=class{constructor(n,l,i){Qm(this,"cachedValue");this.previousCode=n,this.nowPoint=l,this.sliceSerialize=i}value(){return this.cachedValue===void 0&&(this.cachedValue=ME(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function LE(n,l,i){const u=i({start:l,end:{...l,_bufferIndex:l._bufferIndex+2}}).codePointAt(0);return u&&u>=65536?u:n}const Gc={name:"attention",resolveAll:DE,tokenize:kE};function DE(n,l){let i=-1,u,s,c,d,h,p,m,v;for(;++i<n.length;)if(n[i][0]==="enter"&&n[i][1].type==="attentionSequence"&&n[i][1]._close){for(u=i;u--;)if(n[u][0]==="exit"&&n[u][1].type==="attentionSequence"&&n[u][1]._open&&l.sliceSerialize(n[u][1]).charCodeAt(0)===l.sliceSerialize(n[i][1]).charCodeAt(0)){if((n[u][1]._close||n[i][1]._open)&&(n[i][1].end.offset-n[i][1].start.offset)%3&&!((n[u][1].end.offset-n[u][1].start.offset+n[i][1].end.offset-n[i][1].start.offset)%3))continue;p=n[u][1].end.offset-n[u][1].start.offset>1&&n[i][1].end.offset-n[i][1].start.offset>1?2:1;const x={...n[u][1].end},E={...n[i][1].start};zg(x,-p),zg(E,p),d={type:p>1?aa.strongSequence:aa.emphasisSequence,start:x,end:{...n[u][1].end}},h={type:p>1?aa.strongSequence:aa.emphasisSequence,start:{...n[i][1].start},end:E},c={type:p>1?aa.strongText:aa.emphasisText,start:{...n[u][1].end},end:{...n[i][1].start}},s={type:p>1?aa.strong:aa.emphasis,start:{...d.start},end:{...h.end}},n[u][1].end={...d.start},n[i][1].start={...h.end},m=[],n[u][1].end.offset-n[u][1].start.offset&&(m=wi(m,[["enter",n[u][1],l],["exit",n[u][1],l]])),m=wi(m,[["enter",s,l],["enter",d,l],["exit",d,l],["enter",c,l]]),kv(l.parser.constructs.insideSpan.null),m=wi(m,Uv(l.parser.constructs.insideSpan.null,n.slice(u+1,i),l)),m=wi(m,[["exit",c,l],["enter",h,l],["exit",h,l],["exit",s,l]]),n[i][1].end.offset-n[i][1].start.offset?(v=2,m=wi(m,[["enter",n[i][1],l],["exit",n[i][1],l]])):v=0,Bv(n,u-1,i-u+3,m),i=u+m.length-v-2;break}}for(i=-1;++i<n.length;)n[i][1].type==="attentionSequence"&&(n[i][1].type="data");return n}function kE(n,l){const i=this.parser.constructs.attentionMarkers.null,{now:u,sliceSerialize:s,previous:c}=this,d=RE(c)?_E(c,u(),s):c,h=ra(d),p=new zE(d,u(),s),m=uy(h,p.value.bind(p),d);let v;return x;function x(C){return v=C,n.enter("attentionSequence"),E(C)}function E(C){if(C===v)return n.consume(C),E;const N=n.exit("attentionSequence"),w=ra(OE(C)?LE(C,u(),s):C),T=Ki(m),R=T||en(m),j=Ki(w),z=j||en(w),U=Ju(m),X=!z||j&&(R||U)||i.includes(C),Q=!R||T&&(z||ry(w))||i.includes(d);return N._open=!!(v===ct.asterisk?X:X&&(Iu(m)||!Q)),N._close=!!(v===ct.asterisk?Q:Q&&(Iu(w)||!X)),l(C)}}function zg(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}function UE(){return{text:{[ct.asterisk]:Gc,[ct.underscore]:Gc},insideSpan:{null:[Gc]}}}function BE(){const n=this.data();(n.micromarkExtensions||(n.micromarkExtensions=[])).push(UE())}const HE=";".codePointAt(0)??ct.eof,qE="&".codePointAt(0)??ct.eof;function YE(){return{handlers:{emphasis:sy,strong:oy,text:VE}}}sy.peek=cy;oy.peek=fy;function sy(n,l,i,u){return dy(n,l,i,u,cy(n,l,i),1)}function oy(n,l,i,u){return dy(n,l,i,u,fy(n,l,i),2)}function cy(n,l,i){return i.options.emphasis||"*"}function fy(n,l,i){return i.options.strong||"*"}function dy(n,l,i,u,s,c){const d=s.repeat(c),h=i.enter(c===1?"emphasis":"strong"),p=i.createTracker(u),m=p.move(d);let v=p.move(i.containerPhrasing(n,{after:s,before:m,...p.current()}));const x=$E(n,l,i,u.before),E=KE(n,l,i,u.after),C=Lg(x,Wu(v),s,"open");C.inside&&v&&(v=IE(v));const N=Lg({current:pf(v),previous:hf(v)},E,s,"close");N.inside&&v&&(v=WE(v));const w=p.move(d);h();const T=N.outside&&JE(l,i);return i.attentionEncodeSurroundingInfo={after:N.outside&&!T,before:C.outside},i.cjkFriendlyEncodeAfterSupplementaryText=T,m+v+w}function VE(n,l,i,u){const s=i;if(!s.cjkFriendlyEncodeAfterSupplementaryText)return i.safe(n.value,u);s.cjkFriendlyEncodeAfterSupplementaryText=!1;const[c=""]=[...n.value],d=n.value.slice(c.length);return`${Vf(c.codePointAt(0)??ct.eof)}${i.safe(d,{...u,before:";"})}`}function Lg(n,l,i,u){const s=Yf(n),c=ra(l);if(!Ju(s)&&!Ju(c))return u==="open"?Dg(s,c,i):Dg(c,s,i);const d={inside:!1,outside:!1},h={inside:!0,outside:!1},p={inside:!1,outside:!0},m={inside:!0,outside:!0};for(const v of[d,h,p,m]){const x=u==="open"?v.outside?kg:n:v.inside?kg:n,E=u==="open"?v.inside?Ug:l:v.outside?Ug:l;if(u==="open"?GE(i,x,E):FE(i,x,E))return v}return m}function Dg(n,l,i){return Fc(n)?Fc(l)?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:en(l)?{inside:!0,outside:!0}:{inside:!1,outside:!0}:en(n)?Fc(l)?{inside:!1,outside:!1}:en(l)?{inside:!0,outside:!0}:{inside:!1,outside:!1}:en(l)?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function GE(n,l,i){const u=Yf(l),{close:s,open:c}=hy(u,ra(i));return n==="_"?c&&(Iu(u)||!s):c}function FE(n,l,i){const u=ra(i),{close:s,open:c}=hy(Yf(l),u);return n==="_"?s&&(Iu(u)||!c):s}function hy(n,l){const i=Ki(n),u=i||en(n),s=Ki(l),c=s||en(l);return{open:!c||s&&(u||Ju(n)),close:!u||i&&(c||ry(l))}}function Fc(n){return!en(n)&&!Ki(n)}function Yf(n){const l=ra(n.current);return n.current===null||!qf(l)?l:uy(l,()=>n.previous,n.current)}function $E(n,l,i,u){let s=pf(u),c=hf(u);if(XE(s)||ZE(s,c)){const d=py(n,l,i,-1);d&&(s=pf(d),c=hf(d))}return{current:s,previous:c}}function KE(n,l,i,u){const s=Wu(u);if(!QE(s))return s;const c=py(n,l,i,1);return c?Wu(c):s}function XE(n){return n!==null&&56320<=n&&n<=57343}function QE(n){return n!==null&&55296<=n&&n<=56319}function ZE(n,l){return qf(ra(n))&&(l===null||l===ct.eof)}function py(n,l,i,u){if(!l)return;const s=i.indexStack.at(-1),c=l.children,d=typeof s=="number"?s:c.indexOf(n);if(d<0)return;const h=c[d+u];return my(h)||void 0}function JE(n,l){if(!n)return!1;const i=l.indexStack.at(-1);if(typeof i!="number")return!1;const u=n.children[i+1];return(u==null?void 0:u.type)==="text"&&(Wu(u.value)??0)>65535}function my(n){return!n||typeof n!="object"?"":"value"in n&&typeof n.value=="string"?n.value:"alt"in n&&typeof n.alt=="string"?n.alt:"children"in n&&Array.isArray(n.children)?n.children.map(my).join(""):""}function Vf(n){return`&#x${(n??0).toString(16).toUpperCase()};`}function IE(n){const[l=""]=[...n];return Vf(l.codePointAt(0)??ct.eof)+n.slice(l.length)}function WE(n){const l=[...n],i=l.pop();return`${l.join("")}${Vf((i==null?void 0:i.codePointAt(0))??ct.eof)}`}function hf(n){var i;const l=[...n];return l.pop(),((i=l.at(-1))==null?void 0:i.codePointAt(0))??ct.eof}function Wu(n){return n.codePointAt(0)??ct.eof}function pf(n){var l;return((l=[...n].at(-1))==null?void 0:l.codePointAt(0))??ct.eof}const kg={current:HE,previous:ct.eof},Ug=qE;function PE(){const n=this.data();(n.toMarkdownExtensions||(n.toMarkdownExtensions=[])).push(YE())}function eC(){BE.call(this),PE.call(this)}var tC=eC,$c={exports:{}},Bg;function nC(){return Bg||(Bg=1,(function(n){(function(){var l;l=n.exports=s,l.format=s,l.vsprintf=u,typeof console<"u"&&typeof console.log=="function"&&(l.printf=i);function i(){console.log(s.apply(null,arguments))}function u(c,d){return s.apply(null,[c].concat(d))}function s(c){for(var d=1,h=[].slice.call(arguments),p=0,m=c.length,v="",x,E=!1,C,N,w=!1,T,R=function(){return h[d++]},j=function(){for(var z="";/\d/.test(c[p]);)z+=c[p++],x=c[p];return z.length>0?parseInt(z):null};p<m;++p)if(x=c[p],E)switch(E=!1,x=="."?(w=!1,x=c[++p]):x=="0"&&c[p+1]=="."?(w=!0,p+=2,x=c[p]):w=!0,T=j(),x){case"b":v+=parseInt(R(),10).toString(2);break;case"c":C=R(),typeof C=="string"||C instanceof String?v+=C:v+=String.fromCharCode(parseInt(C,10));break;case"d":v+=parseInt(R(),10);break;case"f":N=String(parseFloat(R()).toFixed(T||6)),v+=w?N:N.replace(/^0/,"");break;case"j":v+=JSON.stringify(R());break;case"o":v+="0"+parseInt(R(),10).toString(8);break;case"s":v+=R();break;case"x":v+="0x"+parseInt(R(),10).toString(16);break;case"X":v+="0x"+parseInt(R(),10).toString(16).toUpperCase();break;default:v+=x;break}else x==="%"?E=!0:v+=x;return v}})()})($c)),$c.exports}var aC=nC();const lC=h0(aC),Mu=Object.assign(wa(Error),{eval:wa(EvalError),range:wa(RangeError),reference:wa(ReferenceError),syntax:wa(SyntaxError),type:wa(TypeError),uri:wa(URIError)});function wa(n){return l.displayName=n.displayName||n.name,l;function l(i,...u){const s=i&&lC(i,...u);return new n(s)}}const zu={}.hasOwnProperty,Hg={yaml:"-",toml:"+"};function Gf(n){const l=[];let i=-1;const u=Array.isArray(n)?n:n?[n]:["yaml"];for(;++i<u.length;)l[i]=iC(u[i]);return l}function iC(n){let l=n;if(typeof l=="string"){if(!zu.call(Hg,l))throw Mu("Missing matter definition for `%s`",l);l={type:l,marker:Hg[l]}}else if(typeof l!="object")throw Mu("Expected matter to be an object, not `%j`",l);if(!zu.call(l,"type"))throw Mu("Missing `type` in matter `%j`",l);if(!zu.call(l,"fence")&&!zu.call(l,"marker"))throw Mu("Missing `marker` or `fence` in matter `%j`",l);return l}function rC(n){const l=Gf(n),i={};let u=-1;for(;++u<l.length;){const s=l[u],c=mf(s,"open").charCodeAt(0),d=uC(s),h=i[c];Array.isArray(h)?h.push(d):i[c]=[d]}return{flow:i}}function uC(n){const l=n.anywhere,i=n.type,u=i+"Fence",s=u+"Sequence",c=i+"Value",d={tokenize:v,partial:!0};let h,p=0;return{tokenize:m,concrete:!0};function m(x,E,C){const N=this;return w;function w(F){const K=N.now();return K.column===1&&(K.line===1||l)&&(h=mf(n,"open"),p=0,F===h.charCodeAt(p))?(x.enter(i),x.enter(u),x.enter(s),T(F)):C(F)}function T(F){return p===h.length?(x.exit(s),wu(F)?(x.enter("whitespace"),R(F)):j(F)):F===h.charCodeAt(p++)?(x.consume(F),T):C(F)}function R(F){return wu(F)?(x.consume(F),R):(x.exit("whitespace"),j(F))}function j(F){return Ou(F)?(x.exit(u),x.enter("lineEnding"),x.consume(F),x.exit("lineEnding"),h=mf(n,"close"),p=0,x.attempt(d,Q,z)):C(F)}function z(F){return F===null||Ou(F)?X(F):(x.enter(c),U(F))}function U(F){return F===null||Ou(F)?(x.exit(c),X(F)):(x.consume(F),U)}function X(F){return F===null?C(F):(x.enter("lineEnding"),x.consume(F),x.exit("lineEnding"),x.attempt(d,Q,z))}function Q(F){return x.exit(i),E(F)}}function v(x,E,C){let N=0;return w;function w(z){return z===h.charCodeAt(N)?(x.enter(u),x.enter(s),T(z)):C(z)}function T(z){return N===h.length?(x.exit(s),wu(z)?(x.enter("whitespace"),R(z)):j(z)):z===h.charCodeAt(N++)?(x.consume(z),T):C(z)}function R(z){return wu(z)?(x.consume(z),R):(x.exit("whitespace"),j(z))}function j(z){return z===null||Ou(z)?(x.exit(u),E(z)):C(z)}}}function mf(n,l){return n.marker?qg(n.marker,l).repeat(3):qg(n.fence,l)}function qg(n,l){return typeof n=="string"?n:n[l]}function sC(n){const l=Gf(n),i={},u={};let s=-1;for(;++s<l.length;){const c=l[s];i[c.type]=oC(c),u[c.type]=cC,u[c.type+"Value"]=fC}return{enter:i,exit:u}}function oC(n){return l;function l(i){this.enter({type:n.type,value:""},i),this.buffer()}}function cC(n){const l=this.resume(),i=this.stack[this.stack.length-1];this.exit(n),i.value=l.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function fC(n){this.config.enter.data.call(this,n),this.config.exit.data.call(this,n)}function dC(n){const l=[],i={},u=Gf(n);let s=-1;for(;++s<u.length;){const c=u[s];i[c.type]=hC(c);const d=gf(c,"open");l.push({atBreak:!0,character:d.charAt(0),after:Hv(d.charAt(1))})}return{unsafe:l,handlers:i}}function hC(n){const l=gf(n,"open"),i=gf(n,"close");return u;function u(s){return l+(s.value?`
|
|
233
|
+
`+s.value:"")+`
|
|
234
|
+
`+i}}function gf(n,l){return n.marker?Yg(n.marker,l).repeat(3):Yg(n.fence,l)}function Yg(n,l){return typeof n=="string"?n:n[l]}const pC="yaml";function mC(n){const l=this,i=n||pC,u=l.data(),s=u.micromarkExtensions||(u.micromarkExtensions=[]),c=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),d=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);s.push(rC(i)),c.push(sC(i)),d.push(dC(i))}/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function gy(n){return typeof n>"u"||n===null}function gC(n){return typeof n=="object"&&n!==null}function yC(n){return Array.isArray(n)?n:gy(n)?[]:[n]}function xC(n,l){var i,u,s,c;if(l)for(c=Object.keys(l),i=0,u=c.length;i<u;i+=1)s=c[i],n[s]=l[s];return n}function vC(n,l){var i="",u;for(u=0;u<l;u+=1)i+=n;return i}function bC(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}var SC=gy,EC=gC,CC=yC,NC=vC,AC=bC,TC=xC,Ze={isNothing:SC,isObject:EC,toArray:CC,repeat:NC,isNegativeZero:AC,extend:TC};function yy(n,l){var i="",u=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(i+='in "'+n.mark.name+'" '),i+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!l&&n.mark.snippet&&(i+=`
|
|
235
|
+
|
|
236
|
+
`+n.mark.snippet),u+" "+i):u}function Xi(n,l){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=l,this.message=yy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Xi.prototype=Object.create(Error.prototype);Xi.prototype.constructor=Xi;Xi.prototype.toString=function(l){return this.name+": "+yy(this,l)};var ot=Xi;function Kc(n,l,i,u,s){var c="",d="",h=Math.floor(s/2)-1;return u-l>h&&(c=" ... ",l=u-h+c.length),i-u>h&&(d=" ...",i=u+h-d.length),{str:c+n.slice(l,i).replace(/\t/g,"→")+d,pos:u-l+c.length}}function Xc(n,l){return Ze.repeat(" ",l-n.length)+n}function jC(n,l){if(l=Object.create(l||null),!n.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);for(var i=/\r?\n|\r|\0/g,u=[0],s=[],c,d=-1;c=i.exec(n.buffer);)s.push(c.index),u.push(c.index+c[0].length),n.position<=c.index&&d<0&&(d=u.length-2);d<0&&(d=u.length-1);var h="",p,m,v=Math.min(n.line+l.linesAfter,s.length).toString().length,x=l.maxLength-(l.indent+v+3);for(p=1;p<=l.linesBefore&&!(d-p<0);p++)m=Kc(n.buffer,u[d-p],s[d-p],n.position-(u[d]-u[d-p]),x),h=Ze.repeat(" ",l.indent)+Xc((n.line-p+1).toString(),v)+" | "+m.str+`
|
|
237
|
+
`+h;for(m=Kc(n.buffer,u[d],s[d],n.position,x),h+=Ze.repeat(" ",l.indent)+Xc((n.line+1).toString(),v)+" | "+m.str+`
|
|
238
|
+
`,h+=Ze.repeat("-",l.indent+v+3+m.pos)+`^
|
|
239
|
+
`,p=1;p<=l.linesAfter&&!(d+p>=s.length);p++)m=Kc(n.buffer,u[d+p],s[d+p],n.position-(u[d]-u[d+p]),x),h+=Ze.repeat(" ",l.indent)+Xc((n.line+p+1).toString(),v)+" | "+m.str+`
|
|
240
|
+
`;return h.replace(/\n$/,"")}var wC=jC,OC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],RC=["scalar","sequence","mapping"];function _C(n){var l={};return n!==null&&Object.keys(n).forEach(function(i){n[i].forEach(function(u){l[String(u)]=i})}),l}function MC(n,l){if(l=l||{},Object.keys(l).forEach(function(i){if(OC.indexOf(i)===-1)throw new ot('Unknown option "'+i+'" is met in definition of "'+n+'" YAML type.')}),this.options=l,this.tag=n,this.kind=l.kind||null,this.resolve=l.resolve||function(){return!0},this.construct=l.construct||function(i){return i},this.instanceOf=l.instanceOf||null,this.predicate=l.predicate||null,this.represent=l.represent||null,this.representName=l.representName||null,this.defaultStyle=l.defaultStyle||null,this.multi=l.multi||!1,this.styleAliases=_C(l.styleAliases||null),RC.indexOf(this.kind)===-1)throw new ot('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}var at=MC;function Vg(n,l){var i=[];return n[l].forEach(function(u){var s=i.length;i.forEach(function(c,d){c.tag===u.tag&&c.kind===u.kind&&c.multi===u.multi&&(s=d)}),i[s]=u}),i}function zC(){var n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},l,i;function u(s){s.multi?(n.multi[s.kind].push(s),n.multi.fallback.push(s)):n[s.kind][s.tag]=n.fallback[s.tag]=s}for(l=0,i=arguments.length;l<i;l+=1)arguments[l].forEach(u);return n}function yf(n){return this.extend(n)}yf.prototype.extend=function(l){var i=[],u=[];if(l instanceof at)u.push(l);else if(Array.isArray(l))u=u.concat(l);else if(l&&(Array.isArray(l.implicit)||Array.isArray(l.explicit)))l.implicit&&(i=i.concat(l.implicit)),l.explicit&&(u=u.concat(l.explicit));else throw new ot("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(c){if(!(c instanceof at))throw new ot("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&c.loadKind!=="scalar")throw new ot("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new ot("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(c){if(!(c instanceof at))throw new ot("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(yf.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(u),s.compiledImplicit=Vg(s,"implicit"),s.compiledExplicit=Vg(s,"explicit"),s.compiledTypeMap=zC(s.compiledImplicit,s.compiledExplicit),s};var xy=yf,vy=new at("tag:yaml.org,2002:str",{kind:"scalar",construct:function(n){return n!==null?n:""}}),by=new at("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(n){return n!==null?n:[]}}),Sy=new at("tag:yaml.org,2002:map",{kind:"mapping",construct:function(n){return n!==null?n:{}}}),Ey=new xy({explicit:[vy,by,Sy]});function LC(n){if(n===null)return!0;var l=n.length;return l===1&&n==="~"||l===4&&(n==="null"||n==="Null"||n==="NULL")}function DC(){return null}function kC(n){return n===null}var Cy=new at("tag:yaml.org,2002:null",{kind:"scalar",resolve:LC,construct:DC,predicate:kC,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function UC(n){if(n===null)return!1;var l=n.length;return l===4&&(n==="true"||n==="True"||n==="TRUE")||l===5&&(n==="false"||n==="False"||n==="FALSE")}function BC(n){return n==="true"||n==="True"||n==="TRUE"}function HC(n){return Object.prototype.toString.call(n)==="[object Boolean]"}var Ny=new at("tag:yaml.org,2002:bool",{kind:"scalar",resolve:UC,construct:BC,predicate:HC,represent:{lowercase:function(n){return n?"true":"false"},uppercase:function(n){return n?"TRUE":"FALSE"},camelcase:function(n){return n?"True":"False"}},defaultStyle:"lowercase"});function qC(n){return 48<=n&&n<=57||65<=n&&n<=70||97<=n&&n<=102}function YC(n){return 48<=n&&n<=55}function VC(n){return 48<=n&&n<=57}function GC(n){if(n===null)return!1;var l=n.length,i=0,u=!1,s;if(!l)return!1;if(s=n[i],(s==="-"||s==="+")&&(s=n[++i]),s==="0"){if(i+1===l)return!0;if(s=n[++i],s==="b"){for(i++;i<l;i++)if(s=n[i],s!=="_"){if(s!=="0"&&s!=="1")return!1;u=!0}return u&&s!=="_"}if(s==="x"){for(i++;i<l;i++)if(s=n[i],s!=="_"){if(!qC(n.charCodeAt(i)))return!1;u=!0}return u&&s!=="_"}if(s==="o"){for(i++;i<l;i++)if(s=n[i],s!=="_"){if(!YC(n.charCodeAt(i)))return!1;u=!0}return u&&s!=="_"}}if(s==="_")return!1;for(;i<l;i++)if(s=n[i],s!=="_"){if(!VC(n.charCodeAt(i)))return!1;u=!0}return!(!u||s==="_")}function FC(n){var l=n,i=1,u;if(l.indexOf("_")!==-1&&(l=l.replace(/_/g,"")),u=l[0],(u==="-"||u==="+")&&(u==="-"&&(i=-1),l=l.slice(1),u=l[0]),l==="0")return 0;if(u==="0"){if(l[1]==="b")return i*parseInt(l.slice(2),2);if(l[1]==="x")return i*parseInt(l.slice(2),16);if(l[1]==="o")return i*parseInt(l.slice(2),8)}return i*parseInt(l,10)}function $C(n){return Object.prototype.toString.call(n)==="[object Number]"&&n%1===0&&!Ze.isNegativeZero(n)}var Ay=new at("tag:yaml.org,2002:int",{kind:"scalar",resolve:GC,construct:FC,predicate:$C,represent:{binary:function(n){return n>=0?"0b"+n.toString(2):"-0b"+n.toString(2).slice(1)},octal:function(n){return n>=0?"0o"+n.toString(8):"-0o"+n.toString(8).slice(1)},decimal:function(n){return n.toString(10)},hexadecimal:function(n){return n>=0?"0x"+n.toString(16).toUpperCase():"-0x"+n.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),KC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function XC(n){return!(n===null||!KC.test(n)||n[n.length-1]==="_")}function QC(n){var l,i;return l=n.replace(/_/g,"").toLowerCase(),i=l[0]==="-"?-1:1,"+-".indexOf(l[0])>=0&&(l=l.slice(1)),l===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:l===".nan"?NaN:i*parseFloat(l,10)}var ZC=/^[-+]?[0-9]+e/;function JC(n,l){var i;if(isNaN(n))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===n)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===n)switch(l){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ze.isNegativeZero(n))return"-0.0";return i=n.toString(10),ZC.test(i)?i.replace("e",".e"):i}function IC(n){return Object.prototype.toString.call(n)==="[object Number]"&&(n%1!==0||Ze.isNegativeZero(n))}var Ty=new at("tag:yaml.org,2002:float",{kind:"scalar",resolve:XC,construct:QC,predicate:IC,represent:JC,defaultStyle:"lowercase"}),jy=Ey.extend({implicit:[Cy,Ny,Ay,Ty]}),wy=jy,Oy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ry=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function WC(n){return n===null?!1:Oy.exec(n)!==null||Ry.exec(n)!==null}function PC(n){var l,i,u,s,c,d,h,p=0,m=null,v,x,E;if(l=Oy.exec(n),l===null&&(l=Ry.exec(n)),l===null)throw new Error("Date resolve error");if(i=+l[1],u=+l[2]-1,s=+l[3],!l[4])return new Date(Date.UTC(i,u,s));if(c=+l[4],d=+l[5],h=+l[6],l[7]){for(p=l[7].slice(0,3);p.length<3;)p+="0";p=+p}return l[9]&&(v=+l[10],x=+(l[11]||0),m=(v*60+x)*6e4,l[9]==="-"&&(m=-m)),E=new Date(Date.UTC(i,u,s,c,d,h,p)),m&&E.setTime(E.getTime()-m),E}function eN(n){return n.toISOString()}var _y=new at("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:WC,construct:PC,instanceOf:Date,represent:eN});function tN(n){return n==="<<"||n===null}var My=new at("tag:yaml.org,2002:merge",{kind:"scalar",resolve:tN}),Ff=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
241
|
+
\r`;function nN(n){if(n===null)return!1;var l,i,u=0,s=n.length,c=Ff;for(i=0;i<s;i++)if(l=c.indexOf(n.charAt(i)),!(l>64)){if(l<0)return!1;u+=6}return u%8===0}function aN(n){var l,i,u=n.replace(/[\r\n=]/g,""),s=u.length,c=Ff,d=0,h=[];for(l=0;l<s;l++)l%4===0&&l&&(h.push(d>>16&255),h.push(d>>8&255),h.push(d&255)),d=d<<6|c.indexOf(u.charAt(l));return i=s%4*6,i===0?(h.push(d>>16&255),h.push(d>>8&255),h.push(d&255)):i===18?(h.push(d>>10&255),h.push(d>>2&255)):i===12&&h.push(d>>4&255),new Uint8Array(h)}function lN(n){var l="",i=0,u,s,c=n.length,d=Ff;for(u=0;u<c;u++)u%3===0&&u&&(l+=d[i>>18&63],l+=d[i>>12&63],l+=d[i>>6&63],l+=d[i&63]),i=(i<<8)+n[u];return s=c%3,s===0?(l+=d[i>>18&63],l+=d[i>>12&63],l+=d[i>>6&63],l+=d[i&63]):s===2?(l+=d[i>>10&63],l+=d[i>>4&63],l+=d[i<<2&63],l+=d[64]):s===1&&(l+=d[i>>2&63],l+=d[i<<4&63],l+=d[64],l+=d[64]),l}function iN(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}var zy=new at("tag:yaml.org,2002:binary",{kind:"scalar",resolve:nN,construct:aN,predicate:iN,represent:lN}),rN=Object.prototype.hasOwnProperty,uN=Object.prototype.toString;function sN(n){if(n===null)return!0;var l=[],i,u,s,c,d,h=n;for(i=0,u=h.length;i<u;i+=1){if(s=h[i],d=!1,uN.call(s)!=="[object Object]")return!1;for(c in s)if(rN.call(s,c))if(!d)d=!0;else return!1;if(!d)return!1;if(l.indexOf(c)===-1)l.push(c);else return!1}return!0}function oN(n){return n!==null?n:[]}var Ly=new at("tag:yaml.org,2002:omap",{kind:"sequence",resolve:sN,construct:oN}),cN=Object.prototype.toString;function fN(n){if(n===null)return!0;var l,i,u,s,c,d=n;for(c=new Array(d.length),l=0,i=d.length;l<i;l+=1){if(u=d[l],cN.call(u)!=="[object Object]"||(s=Object.keys(u),s.length!==1))return!1;c[l]=[s[0],u[s[0]]]}return!0}function dN(n){if(n===null)return[];var l,i,u,s,c,d=n;for(c=new Array(d.length),l=0,i=d.length;l<i;l+=1)u=d[l],s=Object.keys(u),c[l]=[s[0],u[s[0]]];return c}var Dy=new at("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:fN,construct:dN}),hN=Object.prototype.hasOwnProperty;function pN(n){if(n===null)return!0;var l,i=n;for(l in i)if(hN.call(i,l)&&i[l]!==null)return!1;return!0}function mN(n){return n!==null?n:{}}var ky=new at("tag:yaml.org,2002:set",{kind:"mapping",resolve:pN,construct:mN}),$f=wy.extend({implicit:[_y,My],explicit:[zy,Ly,Dy,ky]}),ua=Object.prototype.hasOwnProperty,Pu=1,Uy=2,By=3,es=4,Qc=1,gN=2,Gg=3,yN=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xN=/[\x85\u2028\u2029]/,vN=/[,\[\]\{\}]/,Hy=/^(?:!|!!|![a-z\-]+!)$/i,qy=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Fg(n){return Object.prototype.toString.call(n)}function tn(n){return n===10||n===13}function _a(n){return n===9||n===32}function xt(n){return n===9||n===32||n===10||n===13}function Nl(n){return n===44||n===91||n===93||n===123||n===125}function bN(n){var l;return 48<=n&&n<=57?n-48:(l=n|32,97<=l&&l<=102?l-97+10:-1)}function SN(n){return n===120?2:n===117?4:n===85?8:0}function EN(n){return 48<=n&&n<=57?n-48:-1}function $g(n){return n===48?"\0":n===97?"\x07":n===98?"\b":n===116||n===9?" ":n===110?`
|
|
242
|
+
`:n===118?"\v":n===102?"\f":n===114?"\r":n===101?"\x1B":n===32?" ":n===34?'"':n===47?"/":n===92?"\\":n===78?"
":n===95?" ":n===76?"\u2028":n===80?"\u2029":""}function CN(n){return n<=65535?String.fromCharCode(n):String.fromCharCode((n-65536>>10)+55296,(n-65536&1023)+56320)}function Yy(n,l,i){l==="__proto__"?Object.defineProperty(n,l,{configurable:!0,enumerable:!0,writable:!0,value:i}):n[l]=i}var Vy=new Array(256),Gy=new Array(256);for(var Sl=0;Sl<256;Sl++)Vy[Sl]=$g(Sl)?1:0,Gy[Sl]=$g(Sl);function NN(n,l){this.input=n,this.filename=l.filename||null,this.schema=l.schema||$f,this.onWarning=l.onWarning||null,this.legacy=l.legacy||!1,this.json=l.json||!1,this.listener=l.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=n.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Fy(n,l){var i={name:n.filename,buffer:n.input.slice(0,-1),position:n.position,line:n.line,column:n.position-n.lineStart};return i.snippet=wC(i),new ot(l,i)}function ue(n,l){throw Fy(n,l)}function ts(n,l){n.onWarning&&n.onWarning.call(null,Fy(n,l))}var Kg={YAML:function(l,i,u){var s,c,d;l.version!==null&&ue(l,"duplication of %YAML directive"),u.length!==1&&ue(l,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(u[0]),s===null&&ue(l,"ill-formed argument of the YAML directive"),c=parseInt(s[1],10),d=parseInt(s[2],10),c!==1&&ue(l,"unacceptable YAML version of the document"),l.version=u[0],l.checkLineBreaks=d<2,d!==1&&d!==2&&ts(l,"unsupported YAML version of the document")},TAG:function(l,i,u){var s,c;u.length!==2&&ue(l,"TAG directive accepts exactly two arguments"),s=u[0],c=u[1],Hy.test(s)||ue(l,"ill-formed tag handle (first argument) of the TAG directive"),ua.call(l.tagMap,s)&&ue(l,'there is a previously declared suffix for "'+s+'" tag handle'),qy.test(c)||ue(l,"ill-formed tag prefix (second argument) of the TAG directive");try{c=decodeURIComponent(c)}catch{ue(l,"tag prefix is malformed: "+c)}l.tagMap[s]=c}};function ia(n,l,i,u){var s,c,d,h;if(l<i){if(h=n.input.slice(l,i),u)for(s=0,c=h.length;s<c;s+=1)d=h.charCodeAt(s),d===9||32<=d&&d<=1114111||ue(n,"expected valid JSON character");else yN.test(h)&&ue(n,"the stream contains non-printable characters");n.result+=h}}function Xg(n,l,i,u){var s,c,d,h;for(Ze.isObject(i)||ue(n,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(i),d=0,h=s.length;d<h;d+=1)c=s[d],ua.call(l,c)||(Yy(l,c,i[c]),u[c]=!0)}function Al(n,l,i,u,s,c,d,h,p){var m,v;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),m=0,v=s.length;m<v;m+=1)Array.isArray(s[m])&&ue(n,"nested arrays are not supported inside keys"),typeof s=="object"&&Fg(s[m])==="[object Object]"&&(s[m]="[object Object]");if(typeof s=="object"&&Fg(s)==="[object Object]"&&(s="[object Object]"),s=String(s),l===null&&(l={}),u==="tag:yaml.org,2002:merge")if(Array.isArray(c))for(m=0,v=c.length;m<v;m+=1)Xg(n,l,c[m],i);else Xg(n,l,c,i);else!n.json&&!ua.call(i,s)&&ua.call(l,s)&&(n.line=d||n.line,n.lineStart=h||n.lineStart,n.position=p||n.position,ue(n,"duplicated mapping key")),Yy(l,s,c),delete i[s];return l}function Kf(n){var l;l=n.input.charCodeAt(n.position),l===10?n.position++:l===13?(n.position++,n.input.charCodeAt(n.position)===10&&n.position++):ue(n,"a line break is expected"),n.line+=1,n.lineStart=n.position,n.firstTabInLine=-1}function Xe(n,l,i){for(var u=0,s=n.input.charCodeAt(n.position);s!==0;){for(;_a(s);)s===9&&n.firstTabInLine===-1&&(n.firstTabInLine=n.position),s=n.input.charCodeAt(++n.position);if(l&&s===35)do s=n.input.charCodeAt(++n.position);while(s!==10&&s!==13&&s!==0);if(tn(s))for(Kf(n),s=n.input.charCodeAt(n.position),u++,n.lineIndent=0;s===32;)n.lineIndent++,s=n.input.charCodeAt(++n.position);else break}return i!==-1&&u!==0&&n.lineIndent<i&&ts(n,"deficient indentation"),u}function ds(n){var l=n.position,i;return i=n.input.charCodeAt(l),!!((i===45||i===46)&&i===n.input.charCodeAt(l+1)&&i===n.input.charCodeAt(l+2)&&(l+=3,i=n.input.charCodeAt(l),i===0||xt(i)))}function Xf(n,l){l===1?n.result+=" ":l>1&&(n.result+=Ze.repeat(`
|
|
243
|
+
`,l-1))}function AN(n,l,i){var u,s,c,d,h,p,m,v,x=n.kind,E=n.result,C;if(C=n.input.charCodeAt(n.position),xt(C)||Nl(C)||C===35||C===38||C===42||C===33||C===124||C===62||C===39||C===34||C===37||C===64||C===96||(C===63||C===45)&&(s=n.input.charCodeAt(n.position+1),xt(s)||i&&Nl(s)))return!1;for(n.kind="scalar",n.result="",c=d=n.position,h=!1;C!==0;){if(C===58){if(s=n.input.charCodeAt(n.position+1),xt(s)||i&&Nl(s))break}else if(C===35){if(u=n.input.charCodeAt(n.position-1),xt(u))break}else{if(n.position===n.lineStart&&ds(n)||i&&Nl(C))break;if(tn(C))if(p=n.line,m=n.lineStart,v=n.lineIndent,Xe(n,!1,-1),n.lineIndent>=l){h=!0,C=n.input.charCodeAt(n.position);continue}else{n.position=d,n.line=p,n.lineStart=m,n.lineIndent=v;break}}h&&(ia(n,c,d,!1),Xf(n,n.line-p),c=d=n.position,h=!1),_a(C)||(d=n.position+1),C=n.input.charCodeAt(++n.position)}return ia(n,c,d,!1),n.result?!0:(n.kind=x,n.result=E,!1)}function TN(n,l){var i,u,s;if(i=n.input.charCodeAt(n.position),i!==39)return!1;for(n.kind="scalar",n.result="",n.position++,u=s=n.position;(i=n.input.charCodeAt(n.position))!==0;)if(i===39)if(ia(n,u,n.position,!0),i=n.input.charCodeAt(++n.position),i===39)u=n.position,n.position++,s=n.position;else return!0;else tn(i)?(ia(n,u,s,!0),Xf(n,Xe(n,!1,l)),u=s=n.position):n.position===n.lineStart&&ds(n)?ue(n,"unexpected end of the document within a single quoted scalar"):(n.position++,s=n.position);ue(n,"unexpected end of the stream within a single quoted scalar")}function jN(n,l){var i,u,s,c,d,h;if(h=n.input.charCodeAt(n.position),h!==34)return!1;for(n.kind="scalar",n.result="",n.position++,i=u=n.position;(h=n.input.charCodeAt(n.position))!==0;){if(h===34)return ia(n,i,n.position,!0),n.position++,!0;if(h===92){if(ia(n,i,n.position,!0),h=n.input.charCodeAt(++n.position),tn(h))Xe(n,!1,l);else if(h<256&&Vy[h])n.result+=Gy[h],n.position++;else if((d=SN(h))>0){for(s=d,c=0;s>0;s--)h=n.input.charCodeAt(++n.position),(d=bN(h))>=0?c=(c<<4)+d:ue(n,"expected hexadecimal character");n.result+=CN(c),n.position++}else ue(n,"unknown escape sequence");i=u=n.position}else tn(h)?(ia(n,i,u,!0),Xf(n,Xe(n,!1,l)),i=u=n.position):n.position===n.lineStart&&ds(n)?ue(n,"unexpected end of the document within a double quoted scalar"):(n.position++,u=n.position)}ue(n,"unexpected end of the stream within a double quoted scalar")}function wN(n,l){var i=!0,u,s,c,d=n.tag,h,p=n.anchor,m,v,x,E,C,N=Object.create(null),w,T,R,j;if(j=n.input.charCodeAt(n.position),j===91)v=93,C=!1,h=[];else if(j===123)v=125,C=!0,h={};else return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=h),j=n.input.charCodeAt(++n.position);j!==0;){if(Xe(n,!0,l),j=n.input.charCodeAt(n.position),j===v)return n.position++,n.tag=d,n.anchor=p,n.kind=C?"mapping":"sequence",n.result=h,!0;i?j===44&&ue(n,"expected the node content, but found ','"):ue(n,"missed comma between flow collection entries"),T=w=R=null,x=E=!1,j===63&&(m=n.input.charCodeAt(n.position+1),xt(m)&&(x=E=!0,n.position++,Xe(n,!0,l))),u=n.line,s=n.lineStart,c=n.position,jl(n,l,Pu,!1,!0),T=n.tag,w=n.result,Xe(n,!0,l),j=n.input.charCodeAt(n.position),(E||n.line===u)&&j===58&&(x=!0,j=n.input.charCodeAt(++n.position),Xe(n,!0,l),jl(n,l,Pu,!1,!0),R=n.result),C?Al(n,h,N,T,w,R,u,s,c):x?h.push(Al(n,null,N,T,w,R,u,s,c)):h.push(w),Xe(n,!0,l),j=n.input.charCodeAt(n.position),j===44?(i=!0,j=n.input.charCodeAt(++n.position)):i=!1}ue(n,"unexpected end of the stream within a flow collection")}function ON(n,l){var i,u,s=Qc,c=!1,d=!1,h=l,p=0,m=!1,v,x;if(x=n.input.charCodeAt(n.position),x===124)u=!1;else if(x===62)u=!0;else return!1;for(n.kind="scalar",n.result="";x!==0;)if(x=n.input.charCodeAt(++n.position),x===43||x===45)Qc===s?s=x===43?Gg:gN:ue(n,"repeat of a chomping mode identifier");else if((v=EN(x))>=0)v===0?ue(n,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?ue(n,"repeat of an indentation width identifier"):(h=l+v-1,d=!0);else break;if(_a(x)){do x=n.input.charCodeAt(++n.position);while(_a(x));if(x===35)do x=n.input.charCodeAt(++n.position);while(!tn(x)&&x!==0)}for(;x!==0;){for(Kf(n),n.lineIndent=0,x=n.input.charCodeAt(n.position);(!d||n.lineIndent<h)&&x===32;)n.lineIndent++,x=n.input.charCodeAt(++n.position);if(!d&&n.lineIndent>h&&(h=n.lineIndent),tn(x)){p++;continue}if(n.lineIndent<h){s===Gg?n.result+=Ze.repeat(`
|
|
244
|
+
`,c?1+p:p):s===Qc&&c&&(n.result+=`
|
|
245
|
+
`);break}for(u?_a(x)?(m=!0,n.result+=Ze.repeat(`
|
|
246
|
+
`,c?1+p:p)):m?(m=!1,n.result+=Ze.repeat(`
|
|
247
|
+
`,p+1)):p===0?c&&(n.result+=" "):n.result+=Ze.repeat(`
|
|
248
|
+
`,p):n.result+=Ze.repeat(`
|
|
249
|
+
`,c?1+p:p),c=!0,d=!0,p=0,i=n.position;!tn(x)&&x!==0;)x=n.input.charCodeAt(++n.position);ia(n,i,n.position,!1)}return!0}function Qg(n,l){var i,u=n.tag,s=n.anchor,c=[],d,h=!1,p;if(n.firstTabInLine!==-1)return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=c),p=n.input.charCodeAt(n.position);p!==0&&(n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,ue(n,"tab characters must not be used in indentation")),!(p!==45||(d=n.input.charCodeAt(n.position+1),!xt(d))));){if(h=!0,n.position++,Xe(n,!0,-1)&&n.lineIndent<=l){c.push(null),p=n.input.charCodeAt(n.position);continue}if(i=n.line,jl(n,l,By,!1,!0),c.push(n.result),Xe(n,!0,-1),p=n.input.charCodeAt(n.position),(n.line===i||n.lineIndent>l)&&p!==0)ue(n,"bad indentation of a sequence entry");else if(n.lineIndent<l)break}return h?(n.tag=u,n.anchor=s,n.kind="sequence",n.result=c,!0):!1}function RN(n,l,i){var u,s,c,d,h,p,m=n.tag,v=n.anchor,x={},E=Object.create(null),C=null,N=null,w=null,T=!1,R=!1,j;if(n.firstTabInLine!==-1)return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=x),j=n.input.charCodeAt(n.position);j!==0;){if(!T&&n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,ue(n,"tab characters must not be used in indentation")),u=n.input.charCodeAt(n.position+1),c=n.line,(j===63||j===58)&&xt(u))j===63?(T&&(Al(n,x,E,C,N,null,d,h,p),C=N=w=null),R=!0,T=!0,s=!0):T?(T=!1,s=!0):ue(n,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),n.position+=1,j=u;else{if(d=n.line,h=n.lineStart,p=n.position,!jl(n,i,Uy,!1,!0))break;if(n.line===c){for(j=n.input.charCodeAt(n.position);_a(j);)j=n.input.charCodeAt(++n.position);if(j===58)j=n.input.charCodeAt(++n.position),xt(j)||ue(n,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(Al(n,x,E,C,N,null,d,h,p),C=N=w=null),R=!0,T=!1,s=!1,C=n.tag,N=n.result;else if(R)ue(n,"can not read an implicit mapping pair; a colon is missed");else return n.tag=m,n.anchor=v,!0}else if(R)ue(n,"can not read a block mapping entry; a multiline key may not be an implicit key");else return n.tag=m,n.anchor=v,!0}if((n.line===c||n.lineIndent>l)&&(T&&(d=n.line,h=n.lineStart,p=n.position),jl(n,l,es,!0,s)&&(T?N=n.result:w=n.result),T||(Al(n,x,E,C,N,w,d,h,p),C=N=w=null),Xe(n,!0,-1),j=n.input.charCodeAt(n.position)),(n.line===c||n.lineIndent>l)&&j!==0)ue(n,"bad indentation of a mapping entry");else if(n.lineIndent<l)break}return T&&Al(n,x,E,C,N,null,d,h,p),R&&(n.tag=m,n.anchor=v,n.kind="mapping",n.result=x),R}function _N(n){var l,i=!1,u=!1,s,c,d;if(d=n.input.charCodeAt(n.position),d!==33)return!1;if(n.tag!==null&&ue(n,"duplication of a tag property"),d=n.input.charCodeAt(++n.position),d===60?(i=!0,d=n.input.charCodeAt(++n.position)):d===33?(u=!0,s="!!",d=n.input.charCodeAt(++n.position)):s="!",l=n.position,i){do d=n.input.charCodeAt(++n.position);while(d!==0&&d!==62);n.position<n.length?(c=n.input.slice(l,n.position),d=n.input.charCodeAt(++n.position)):ue(n,"unexpected end of the stream within a verbatim tag")}else{for(;d!==0&&!xt(d);)d===33&&(u?ue(n,"tag suffix cannot contain exclamation marks"):(s=n.input.slice(l-1,n.position+1),Hy.test(s)||ue(n,"named tag handle cannot contain such characters"),u=!0,l=n.position+1)),d=n.input.charCodeAt(++n.position);c=n.input.slice(l,n.position),vN.test(c)&&ue(n,"tag suffix cannot contain flow indicator characters")}c&&!qy.test(c)&&ue(n,"tag name cannot contain such characters: "+c);try{c=decodeURIComponent(c)}catch{ue(n,"tag name is malformed: "+c)}return i?n.tag=c:ua.call(n.tagMap,s)?n.tag=n.tagMap[s]+c:s==="!"?n.tag="!"+c:s==="!!"?n.tag="tag:yaml.org,2002:"+c:ue(n,'undeclared tag handle "'+s+'"'),!0}function MN(n){var l,i;if(i=n.input.charCodeAt(n.position),i!==38)return!1;for(n.anchor!==null&&ue(n,"duplication of an anchor property"),i=n.input.charCodeAt(++n.position),l=n.position;i!==0&&!xt(i)&&!Nl(i);)i=n.input.charCodeAt(++n.position);return n.position===l&&ue(n,"name of an anchor node must contain at least one character"),n.anchor=n.input.slice(l,n.position),!0}function zN(n){var l,i,u;if(u=n.input.charCodeAt(n.position),u!==42)return!1;for(u=n.input.charCodeAt(++n.position),l=n.position;u!==0&&!xt(u)&&!Nl(u);)u=n.input.charCodeAt(++n.position);return n.position===l&&ue(n,"name of an alias node must contain at least one character"),i=n.input.slice(l,n.position),ua.call(n.anchorMap,i)||ue(n,'unidentified alias "'+i+'"'),n.result=n.anchorMap[i],Xe(n,!0,-1),!0}function jl(n,l,i,u,s){var c,d,h,p=1,m=!1,v=!1,x,E,C,N,w,T;if(n.listener!==null&&n.listener("open",n),n.tag=null,n.anchor=null,n.kind=null,n.result=null,c=d=h=es===i||By===i,u&&Xe(n,!0,-1)&&(m=!0,n.lineIndent>l?p=1:n.lineIndent===l?p=0:n.lineIndent<l&&(p=-1)),p===1)for(;_N(n)||MN(n);)Xe(n,!0,-1)?(m=!0,h=c,n.lineIndent>l?p=1:n.lineIndent===l?p=0:n.lineIndent<l&&(p=-1)):h=!1;if(h&&(h=m||s),(p===1||es===i)&&(Pu===i||Uy===i?w=l:w=l+1,T=n.position-n.lineStart,p===1?h&&(Qg(n,T)||RN(n,T,w))||wN(n,w)?v=!0:(d&&ON(n,w)||TN(n,w)||jN(n,w)?v=!0:zN(n)?(v=!0,(n.tag!==null||n.anchor!==null)&&ue(n,"alias node should not have any properties")):AN(n,w,Pu===i)&&(v=!0,n.tag===null&&(n.tag="?")),n.anchor!==null&&(n.anchorMap[n.anchor]=n.result)):p===0&&(v=h&&Qg(n,T))),n.tag===null)n.anchor!==null&&(n.anchorMap[n.anchor]=n.result);else if(n.tag==="?"){for(n.result!==null&&n.kind!=="scalar"&&ue(n,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+n.kind+'"'),x=0,E=n.implicitTypes.length;x<E;x+=1)if(N=n.implicitTypes[x],N.resolve(n.result)){n.result=N.construct(n.result),n.tag=N.tag,n.anchor!==null&&(n.anchorMap[n.anchor]=n.result);break}}else if(n.tag!=="!"){if(ua.call(n.typeMap[n.kind||"fallback"],n.tag))N=n.typeMap[n.kind||"fallback"][n.tag];else for(N=null,C=n.typeMap.multi[n.kind||"fallback"],x=0,E=C.length;x<E;x+=1)if(n.tag.slice(0,C[x].tag.length)===C[x].tag){N=C[x];break}N||ue(n,"unknown tag !<"+n.tag+">"),n.result!==null&&N.kind!==n.kind&&ue(n,"unacceptable node kind for !<"+n.tag+'> tag; it should be "'+N.kind+'", not "'+n.kind+'"'),N.resolve(n.result,n.tag)?(n.result=N.construct(n.result,n.tag),n.anchor!==null&&(n.anchorMap[n.anchor]=n.result)):ue(n,"cannot resolve a node with !<"+n.tag+"> explicit tag")}return n.listener!==null&&n.listener("close",n),n.tag!==null||n.anchor!==null||v}function LN(n){var l=n.position,i,u,s,c=!1,d;for(n.version=null,n.checkLineBreaks=n.legacy,n.tagMap=Object.create(null),n.anchorMap=Object.create(null);(d=n.input.charCodeAt(n.position))!==0&&(Xe(n,!0,-1),d=n.input.charCodeAt(n.position),!(n.lineIndent>0||d!==37));){for(c=!0,d=n.input.charCodeAt(++n.position),i=n.position;d!==0&&!xt(d);)d=n.input.charCodeAt(++n.position);for(u=n.input.slice(i,n.position),s=[],u.length<1&&ue(n,"directive name must not be less than one character in length");d!==0;){for(;_a(d);)d=n.input.charCodeAt(++n.position);if(d===35){do d=n.input.charCodeAt(++n.position);while(d!==0&&!tn(d));break}if(tn(d))break;for(i=n.position;d!==0&&!xt(d);)d=n.input.charCodeAt(++n.position);s.push(n.input.slice(i,n.position))}d!==0&&Kf(n),ua.call(Kg,u)?Kg[u](n,u,s):ts(n,'unknown document directive "'+u+'"')}if(Xe(n,!0,-1),n.lineIndent===0&&n.input.charCodeAt(n.position)===45&&n.input.charCodeAt(n.position+1)===45&&n.input.charCodeAt(n.position+2)===45?(n.position+=3,Xe(n,!0,-1)):c&&ue(n,"directives end mark is expected"),jl(n,n.lineIndent-1,es,!1,!0),Xe(n,!0,-1),n.checkLineBreaks&&xN.test(n.input.slice(l,n.position))&&ts(n,"non-ASCII line breaks are interpreted as content"),n.documents.push(n.result),n.position===n.lineStart&&ds(n)){n.input.charCodeAt(n.position)===46&&(n.position+=3,Xe(n,!0,-1));return}if(n.position<n.length-1)ue(n,"end of the stream or a document separator is expected");else return}function $y(n,l){n=String(n),l=l||{},n.length!==0&&(n.charCodeAt(n.length-1)!==10&&n.charCodeAt(n.length-1)!==13&&(n+=`
|
|
250
|
+
`),n.charCodeAt(0)===65279&&(n=n.slice(1)));var i=new NN(n,l),u=n.indexOf("\0");for(u!==-1&&(i.position=u,ue(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)LN(i);return i.documents}function DN(n,l,i){l!==null&&typeof l=="object"&&typeof i>"u"&&(i=l,l=null);var u=$y(n,i);if(typeof l!="function")return u;for(var s=0,c=u.length;s<c;s+=1)l(u[s])}function kN(n,l){var i=$y(n,l);if(i.length!==0){if(i.length===1)return i[0];throw new ot("expected a single document in the stream, but found more")}}var UN=DN,BN=kN,Ky={loadAll:UN,load:BN},Xy=Object.prototype.toString,Qy=Object.prototype.hasOwnProperty,Qf=65279,HN=9,Qi=10,qN=13,YN=32,VN=33,GN=34,xf=35,FN=37,$N=38,KN=39,XN=42,Zy=44,QN=45,ns=58,ZN=61,JN=62,IN=63,WN=64,Jy=91,Iy=93,PN=96,Wy=123,e4=124,Py=125,rt={};rt[0]="\\0";rt[7]="\\a";rt[8]="\\b";rt[9]="\\t";rt[10]="\\n";rt[11]="\\v";rt[12]="\\f";rt[13]="\\r";rt[27]="\\e";rt[34]='\\"';rt[92]="\\\\";rt[133]="\\N";rt[160]="\\_";rt[8232]="\\L";rt[8233]="\\P";var t4=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],n4=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function a4(n,l){var i,u,s,c,d,h,p;if(l===null)return{};for(i={},u=Object.keys(l),s=0,c=u.length;s<c;s+=1)d=u[s],h=String(l[d]),d.slice(0,2)==="!!"&&(d="tag:yaml.org,2002:"+d.slice(2)),p=n.compiledTypeMap.fallback[d],p&&Qy.call(p.styleAliases,h)&&(h=p.styleAliases[h]),i[d]=h;return i}function l4(n){var l,i,u;if(l=n.toString(16).toUpperCase(),n<=255)i="x",u=2;else if(n<=65535)i="u",u=4;else if(n<=4294967295)i="U",u=8;else throw new ot("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Ze.repeat("0",u-l.length)+l}var i4=1,Zi=2;function r4(n){this.schema=n.schema||$f,this.indent=Math.max(1,n.indent||2),this.noArrayIndent=n.noArrayIndent||!1,this.skipInvalid=n.skipInvalid||!1,this.flowLevel=Ze.isNothing(n.flowLevel)?-1:n.flowLevel,this.styleMap=a4(this.schema,n.styles||null),this.sortKeys=n.sortKeys||!1,this.lineWidth=n.lineWidth||80,this.noRefs=n.noRefs||!1,this.noCompatMode=n.noCompatMode||!1,this.condenseFlow=n.condenseFlow||!1,this.quotingType=n.quotingType==='"'?Zi:i4,this.forceQuotes=n.forceQuotes||!1,this.replacer=typeof n.replacer=="function"?n.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Zg(n,l){for(var i=Ze.repeat(" ",l),u=0,s=-1,c="",d,h=n.length;u<h;)s=n.indexOf(`
|
|
251
|
+
`,u),s===-1?(d=n.slice(u),u=h):(d=n.slice(u,s+1),u=s+1),d.length&&d!==`
|
|
252
|
+
`&&(c+=i),c+=d;return c}function vf(n,l){return`
|
|
253
|
+
`+Ze.repeat(" ",n.indent*l)}function u4(n,l){var i,u,s;for(i=0,u=n.implicitTypes.length;i<u;i+=1)if(s=n.implicitTypes[i],s.resolve(l))return!0;return!1}function as(n){return n===YN||n===HN}function Ji(n){return 32<=n&&n<=126||161<=n&&n<=55295&&n!==8232&&n!==8233||57344<=n&&n<=65533&&n!==Qf||65536<=n&&n<=1114111}function Jg(n){return Ji(n)&&n!==Qf&&n!==qN&&n!==Qi}function Ig(n,l,i){var u=Jg(n),s=u&&!as(n);return(i?u:u&&n!==Zy&&n!==Jy&&n!==Iy&&n!==Wy&&n!==Py)&&n!==xf&&!(l===ns&&!s)||Jg(l)&&!as(l)&&n===xf||l===ns&&s}function s4(n){return Ji(n)&&n!==Qf&&!as(n)&&n!==QN&&n!==IN&&n!==ns&&n!==Zy&&n!==Jy&&n!==Iy&&n!==Wy&&n!==Py&&n!==xf&&n!==$N&&n!==XN&&n!==VN&&n!==e4&&n!==ZN&&n!==JN&&n!==KN&&n!==GN&&n!==FN&&n!==WN&&n!==PN}function o4(n){return!as(n)&&n!==ns}function Di(n,l){var i=n.charCodeAt(l),u;return i>=55296&&i<=56319&&l+1<n.length&&(u=n.charCodeAt(l+1),u>=56320&&u<=57343)?(i-55296)*1024+u-56320+65536:i}function e1(n){var l=/^\n* /;return l.test(n)}var t1=1,bf=2,n1=3,a1=4,El=5;function c4(n,l,i,u,s,c,d,h){var p,m=0,v=null,x=!1,E=!1,C=u!==-1,N=-1,w=s4(Di(n,0))&&o4(Di(n,n.length-1));if(l||d)for(p=0;p<n.length;m>=65536?p+=2:p++){if(m=Di(n,p),!Ji(m))return El;w=w&&Ig(m,v,h),v=m}else{for(p=0;p<n.length;m>=65536?p+=2:p++){if(m=Di(n,p),m===Qi)x=!0,C&&(E=E||p-N-1>u&&n[N+1]!==" ",N=p);else if(!Ji(m))return El;w=w&&Ig(m,v,h),v=m}E=E||C&&p-N-1>u&&n[N+1]!==" "}return!x&&!E?w&&!d&&!s(n)?t1:c===Zi?El:bf:i>9&&e1(n)?El:d?c===Zi?El:bf:E?a1:n1}function f4(n,l,i,u,s){n.dump=(function(){if(l.length===0)return n.quotingType===Zi?'""':"''";if(!n.noCompatMode&&(t4.indexOf(l)!==-1||n4.test(l)))return n.quotingType===Zi?'"'+l+'"':"'"+l+"'";var c=n.indent*Math.max(1,i),d=n.lineWidth===-1?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-c),h=u||n.flowLevel>-1&&i>=n.flowLevel;function p(m){return u4(n,m)}switch(c4(l,h,n.indent,d,p,n.quotingType,n.forceQuotes&&!u,s)){case t1:return l;case bf:return"'"+l.replace(/'/g,"''")+"'";case n1:return"|"+Wg(l,n.indent)+Pg(Zg(l,c));case a1:return">"+Wg(l,n.indent)+Pg(Zg(d4(l,d),c));case El:return'"'+h4(l)+'"';default:throw new ot("impossible error: invalid scalar style")}})()}function Wg(n,l){var i=e1(n)?String(l):"",u=n[n.length-1]===`
|
|
254
|
+
`,s=u&&(n[n.length-2]===`
|
|
255
|
+
`||n===`
|
|
256
|
+
`),c=s?"+":u?"":"-";return i+c+`
|
|
257
|
+
`}function Pg(n){return n[n.length-1]===`
|
|
258
|
+
`?n.slice(0,-1):n}function d4(n,l){for(var i=/(\n+)([^\n]*)/g,u=(function(){var m=n.indexOf(`
|
|
259
|
+
`);return m=m!==-1?m:n.length,i.lastIndex=m,e0(n.slice(0,m),l)})(),s=n[0]===`
|
|
260
|
+
`||n[0]===" ",c,d;d=i.exec(n);){var h=d[1],p=d[2];c=p[0]===" ",u+=h+(!s&&!c&&p!==""?`
|
|
261
|
+
`:"")+e0(p,l),s=c}return u}function e0(n,l){if(n===""||n[0]===" ")return n;for(var i=/ [^ ]/g,u,s=0,c,d=0,h=0,p="";u=i.exec(n);)h=u.index,h-s>l&&(c=d>s?d:h,p+=`
|
|
262
|
+
`+n.slice(s,c),s=c+1),d=h;return p+=`
|
|
263
|
+
`,n.length-s>l&&d>s?p+=n.slice(s,d)+`
|
|
264
|
+
`+n.slice(d+1):p+=n.slice(s),p.slice(1)}function h4(n){for(var l="",i=0,u,s=0;s<n.length;i>=65536?s+=2:s++)i=Di(n,s),u=rt[i],!u&&Ji(i)?(l+=n[s],i>=65536&&(l+=n[s+1])):l+=u||l4(i);return l}function p4(n,l,i){var u="",s=n.tag,c,d,h;for(c=0,d=i.length;c<d;c+=1)h=i[c],n.replacer&&(h=n.replacer.call(i,String(c),h)),(On(n,l,h,!1,!1)||typeof h>"u"&&On(n,l,null,!1,!1))&&(u!==""&&(u+=","+(n.condenseFlow?"":" ")),u+=n.dump);n.tag=s,n.dump="["+u+"]"}function t0(n,l,i,u){var s="",c=n.tag,d,h,p;for(d=0,h=i.length;d<h;d+=1)p=i[d],n.replacer&&(p=n.replacer.call(i,String(d),p)),(On(n,l+1,p,!0,!0,!1,!0)||typeof p>"u"&&On(n,l+1,null,!0,!0,!1,!0))&&((!u||s!=="")&&(s+=vf(n,l)),n.dump&&Qi===n.dump.charCodeAt(0)?s+="-":s+="- ",s+=n.dump);n.tag=c,n.dump=s||"[]"}function m4(n,l,i){var u="",s=n.tag,c=Object.keys(i),d,h,p,m,v;for(d=0,h=c.length;d<h;d+=1)v="",u!==""&&(v+=", "),n.condenseFlow&&(v+='"'),p=c[d],m=i[p],n.replacer&&(m=n.replacer.call(i,p,m)),On(n,l,p,!1,!1)&&(n.dump.length>1024&&(v+="? "),v+=n.dump+(n.condenseFlow?'"':"")+":"+(n.condenseFlow?"":" "),On(n,l,m,!1,!1)&&(v+=n.dump,u+=v));n.tag=s,n.dump="{"+u+"}"}function g4(n,l,i,u){var s="",c=n.tag,d=Object.keys(i),h,p,m,v,x,E;if(n.sortKeys===!0)d.sort();else if(typeof n.sortKeys=="function")d.sort(n.sortKeys);else if(n.sortKeys)throw new ot("sortKeys must be a boolean or a function");for(h=0,p=d.length;h<p;h+=1)E="",(!u||s!=="")&&(E+=vf(n,l)),m=d[h],v=i[m],n.replacer&&(v=n.replacer.call(i,m,v)),On(n,l+1,m,!0,!0,!0)&&(x=n.tag!==null&&n.tag!=="?"||n.dump&&n.dump.length>1024,x&&(n.dump&&Qi===n.dump.charCodeAt(0)?E+="?":E+="? "),E+=n.dump,x&&(E+=vf(n,l)),On(n,l+1,v,!0,x)&&(n.dump&&Qi===n.dump.charCodeAt(0)?E+=":":E+=": ",E+=n.dump,s+=E));n.tag=c,n.dump=s||"{}"}function n0(n,l,i){var u,s,c,d,h,p;for(s=i?n.explicitTypes:n.implicitTypes,c=0,d=s.length;c<d;c+=1)if(h=s[c],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof l=="object"&&l instanceof h.instanceOf)&&(!h.predicate||h.predicate(l))){if(i?h.multi&&h.representName?n.tag=h.representName(l):n.tag=h.tag:n.tag="?",h.represent){if(p=n.styleMap[h.tag]||h.defaultStyle,Xy.call(h.represent)==="[object Function]")u=h.represent(l,p);else if(Qy.call(h.represent,p))u=h.represent[p](l,p);else throw new ot("!<"+h.tag+'> tag resolver accepts not "'+p+'" style');n.dump=u}return!0}return!1}function On(n,l,i,u,s,c,d){n.tag=null,n.dump=i,n0(n,i,!1)||n0(n,i,!0);var h=Xy.call(n.dump),p=u,m;u&&(u=n.flowLevel<0||n.flowLevel>l);var v=h==="[object Object]"||h==="[object Array]",x,E;if(v&&(x=n.duplicates.indexOf(i),E=x!==-1),(n.tag!==null&&n.tag!=="?"||E||n.indent!==2&&l>0)&&(s=!1),E&&n.usedDuplicates[x])n.dump="*ref_"+x;else{if(v&&E&&!n.usedDuplicates[x]&&(n.usedDuplicates[x]=!0),h==="[object Object]")u&&Object.keys(n.dump).length!==0?(g4(n,l,n.dump,s),E&&(n.dump="&ref_"+x+n.dump)):(m4(n,l,n.dump),E&&(n.dump="&ref_"+x+" "+n.dump));else if(h==="[object Array]")u&&n.dump.length!==0?(n.noArrayIndent&&!d&&l>0?t0(n,l-1,n.dump,s):t0(n,l,n.dump,s),E&&(n.dump="&ref_"+x+n.dump)):(p4(n,l,n.dump),E&&(n.dump="&ref_"+x+" "+n.dump));else if(h==="[object String]")n.tag!=="?"&&f4(n,n.dump,l,c,p);else{if(h==="[object Undefined]")return!1;if(n.skipInvalid)return!1;throw new ot("unacceptable kind of an object to dump "+h)}n.tag!==null&&n.tag!=="?"&&(m=encodeURI(n.tag[0]==="!"?n.tag.slice(1):n.tag).replace(/!/g,"%21"),n.tag[0]==="!"?m="!"+m:m.slice(0,18)==="tag:yaml.org,2002:"?m="!!"+m.slice(18):m="!<"+m+">",n.dump=m+" "+n.dump)}return!0}function y4(n,l){var i=[],u=[],s,c;for(Sf(n,i,u),s=0,c=u.length;s<c;s+=1)l.duplicates.push(i[u[s]]);l.usedDuplicates=new Array(c)}function Sf(n,l,i){var u,s,c;if(n!==null&&typeof n=="object")if(s=l.indexOf(n),s!==-1)i.indexOf(s)===-1&&i.push(s);else if(l.push(n),Array.isArray(n))for(s=0,c=n.length;s<c;s+=1)Sf(n[s],l,i);else for(u=Object.keys(n),s=0,c=u.length;s<c;s+=1)Sf(n[u[s]],l,i)}function x4(n,l){l=l||{};var i=new r4(l);i.noRefs||y4(n,i);var u=n;return i.replacer&&(u=i.replacer.call({"":u},"",u)),On(i,0,u,!0,!0)?i.dump+`
|
|
265
|
+
`:""}var v4=x4,b4={dump:v4};function Zf(n,l){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}var S4=at,E4=xy,C4=Ey,N4=jy,A4=wy,T4=$f,j4=Ky.load,w4=Ky.loadAll,O4=b4.dump,R4=ot,_4={binary:zy,float:Ty,map:Sy,null:Cy,pairs:Dy,set:ky,timestamp:_y,bool:Ny,int:Ay,merge:My,omap:Ly,seq:by,str:vy},M4=Zf("safeLoad","load"),z4=Zf("safeLoadAll","loadAll"),L4=Zf("safeDump","dump"),l1={Type:S4,Schema:E4,FAILSAFE_SCHEMA:C4,JSON_SCHEMA:N4,CORE_SCHEMA:A4,DEFAULT_SCHEMA:T4,load:j4,loadAll:w4,dump:O4,YAMLException:R4,types:_4,safeLoad:M4,safeLoadAll:z4,safeDump:L4};function D4(){return n=>{var l;((l=n.children[0])==null?void 0:l.type)==="yaml"&&(n.children[0]={type:"code",lang:"__frontmatter__",value:n.children[0].value})}}function k4({yamlText:n}){let l=[];try{const i=l1.load(n);i&&typeof i=="object"&&!Array.isArray(i)&&(l=Object.entries(i).map(([u,s])=>{const c=typeof s=="string"?s:JSON.stringify(s,null,2);return[u,c]}))}catch{l=[["raw",n]]}return l.length===0?null:y.jsx("div",{className:"my-2 rounded-[8px] border border-[var(--separator)] overflow-hidden",children:y.jsx("table",{className:"w-full text-[13px]",children:y.jsx("tbody",{children:l.map(([i,u])=>y.jsxs("tr",{className:"border-b last:border-b-0 border-[var(--separator)]",children:[y.jsx("td",{className:"px-3 py-1.5 bg-[var(--fill-quaternary)] text-[var(--label-secondary)] font-medium whitespace-nowrap align-top w-[1%]",children:i}),y.jsx("td",{className:"px-3 py-1.5 text-[var(--label-primary)] whitespace-pre-wrap break-all",children:u})]},i))})})})}function ls(n){return n==null||typeof n=="boolean"?"":typeof n=="string"||typeof n=="number"?String(n):Array.isArray(n)?n.map(ls).join(""):typeof n=="object"&&"props"in n?ls(n.props.children):""}function a0({language:n,children:l}){const{t:i}=Be(),[u,s]=b.useState(!1),c=ls(l).replace(/\n$/,""),d=b.useCallback(()=>{navigator.clipboard.writeText(c),s(!0),setTimeout(()=>s(!1),2e3)},[c]);return y.jsxs("div",{className:"group/code relative my-2 rounded-[8px] bg-[var(--fill-card)] border border-[var(--separator)] overflow-hidden",children:[y.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-[var(--separator)]",children:[y.jsx("span",{className:"text-[11px] text-[var(--label-tertiary)] font-medium",children:n||"code"}),y.jsxs("button",{onClick:d,className:"flex items-center gap-1 text-[11px] text-[var(--label-tertiary)] hover:text-[var(--label-secondary)] transition-colors",children:[u?y.jsx(er,{size:12}):y.jsx(V0,{size:12}),i(u?"entries.copied":"entries.copy")]})]}),y.jsx("pre",{className:"px-3 py-2.5 overflow-x-auto text-[13px] leading-[20px]",children:y.jsx("code",{children:l})})]})}const U4={code({className:n,children:l,...i}){const u=/language-(\w+)/.exec(n||"");if((u==null?void 0:u[1])==="__frontmatter__"){const s=ls(l).replace(/\n$/,"");return y.jsx(k4,{yamlText:s})}return u?y.jsx(a0,{language:u[1],children:l}):String(l).includes(`
|
|
266
|
+
`)?y.jsx(a0,{language:"",children:l}):y.jsx("code",{className:"px-1.5 py-0.5 rounded-[4px] bg-[var(--fill-secondary)] text-[13px] font-mono break-words",...i,children:l})},pre({children:n}){return y.jsx(y.Fragment,{children:n})},p({children:n}){return y.jsx("p",{className:"text-[14px] leading-[22px] text-[var(--label-primary)] mb-2 last:mb-0",children:n})},h1({children:n}){return y.jsx("h1",{className:"text-[20px] leading-[26px] font-semibold text-[var(--label-primary)] mt-4 mb-2",children:n})},h2({children:n}){return y.jsx("h2",{className:"text-[17px] leading-[23px] font-semibold text-[var(--label-primary)] mt-3 mb-1.5",children:n})},h3({children:n}){return y.jsx("h3",{className:"text-[15px] leading-[21px] font-semibold text-[var(--label-primary)] mt-2 mb-1",children:n})},ul({children:n}){return y.jsx("ul",{className:"text-[14px] leading-[22px] text-[var(--label-primary)] pl-5 mb-2 list-disc space-y-0.5",children:n})},ol({children:n}){return y.jsx("ol",{className:"text-[14px] leading-[22px] text-[var(--label-primary)] pl-5 mb-2 list-decimal space-y-0.5",children:n})},li({children:n}){return y.jsx("li",{className:"text-[14px] leading-[22px]",children:n})},blockquote({children:n}){return y.jsx("blockquote",{className:"pl-3 border-l-2 border-[var(--color-accent)] text-[14px] leading-[22px] text-[var(--label-secondary)] my-2",children:n})},table({children:n}){return y.jsx("div",{className:"overflow-x-auto my-2 rounded-[8px] border border-[var(--separator)]",children:y.jsx("table",{className:"w-full text-[13px]",children:n})})},thead({children:n}){return y.jsx("thead",{className:"bg-[var(--fill-tertiary)] text-[var(--label-secondary)]",children:n})},th({children:n}){return y.jsx("th",{className:"px-3 py-1.5 text-left font-medium border-b border-[var(--separator)]",children:n})},td({children:n}){return y.jsx("td",{className:"px-3 py-1.5 border-b border-[var(--separator)]",children:n})},hr(){return y.jsx("hr",{className:"my-3 border-[var(--separator)]"})},a({href:n,children:l}){return y.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-accent)] hover:underline",children:l})},strong({children:n}){return y.jsx("strong",{className:"font-semibold text-[var(--label-primary)]",children:n})},em({children:n}){return y.jsx("em",{className:"italic text-[var(--label-primary)]",children:n})}};function B4(n){if(!/^---\s*\n/.test(n))return n;const l=n.match(/\n---\s*(?:\n|$)/);if(!l||l.index===void 0)return n;const i=n.slice(4,l.index);let u=!1;try{const s=l1.load(i);u=typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length>0}catch{}return u?n:"***"+n.slice(3)}function Rn({content:n}){if(!n.trim())return null;const l=b.useMemo(()=>B4(n),[n]);return y.jsx("div",{className:"markdown-body min-w-0 max-w-full break-words",children:y.jsx(qv,{remarkPlugins:[Vv,tC,mC,D4],rehypePlugins:[Yv],components:U4,children:l})})}function H4({content:n,streaming:l,autoCollapse:i}){const{t:u}=Be(),[s,c]=b.useState(i),d=b.useRef(!1);return b.useEffect(()=>{i&&!d.current&&(d.current=!0,c(!0))},[i]),y.jsxs("div",{className:`rounded-[8px] bg-[var(--fill-card)] border border-[var(--separator)] overflow-hidden transition-all ${s?"max-w-[640px]":""}`,children:[y.jsxs("button",{onClick:()=>c(!s),className:"w-full flex items-center gap-1.5 px-3 py-1.5 text-left hover:bg-[var(--fill-quaternary)] transition-colors",children:[y.jsx(Lf,{size:12,className:`text-[var(--label-tertiary)] transition-transform ${s?"":"rotate-90"}`}),y.jsx("span",{className:"text-[12px] font-medium text-[var(--label-tertiary)]",children:u(l?"entries.thinkingStreaming":"entries.thinking")})]}),!s&&y.jsx("div",{className:"px-3 pb-2.5 pt-0.5 text-[var(--label-secondary)] italic",children:y.jsx(Rn,{content:n})})]})}function _n({title:n,trailing:l,onClose:i,children:u}){return y.jsx("div",{className:"fixed-viewport z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:i,children:y.jsxs("div",{className:"w-[90%] max-w-[640px] max-h-[80vh] rounded-[18px] bg-[var(--material-modal)] backdrop-blur-[30px] border border-[var(--separator)] shadow-[0_8px_40px_rgba(0,0,0,0.12)] flex flex-col overflow-hidden",onClick:s=>s.stopPropagation(),children:[y.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-[var(--separator)]",children:[y.jsx("div",{className:"flex items-center gap-2 text-[15px] font-semibold text-[var(--label-primary)] select-text",children:n}),y.jsxs("div",{className:"flex items-center gap-2 select-text",children:[l,y.jsx("button",{onClick:i,className:"select-none w-7 h-7 flex items-center justify-center rounded-full hover:bg-[var(--fill-secondary)] transition-colors text-[var(--label-secondary)]",children:y.jsx(Df,{size:14})})]})]}),u]})})}function i1(n){return{read:y.jsx(fS,{size:14}),bash:y.jsx(DS,{size:14}),edit:y.jsx(dg,{size:14}),write:y.jsx(dg,{size:14})}[n]??y.jsx(YS,{size:14})}function q4(n,l){switch(n){case"read":{const i=l.path??"",u=l.offset,s=l.limit;if(u!=null||s!=null){const c=u??"",d=s!=null?(u??1)+s-1:"";return`${i} [${c}:${d}]`}return i}case"bash":return l.command?String(l.command).slice(0,80):"";case"edit":return l.path??"";case"write":return l.path??"";default:return""}}function is(n,l){let i=0;const u=/`+/g;let s;for(;(s=u.exec(n))!==null;)s[0].length>i&&(i=s[0].length);const c="`".repeat(Math.max(3,i+1));return`${c}${l}
|
|
267
|
+
${n}
|
|
268
|
+
${c}`}const Y4={ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"scss",less:"less",html:"xml",htm:"xml",xml:"xml",svg:"xml",md:"markdown",mdx:"markdown",yaml:"yaml",yml:"yaml",toml:"ini",ini:"ini",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",py:"python",rb:"ruby",rs:"rust",go:"go",java:"java",kt:"kotlin",swift:"swift",c:"c",h:"c",cpp:"cpp",hpp:"cpp",cs:"csharp",php:"php",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",makefile:"makefile",lua:"lua",vim:"vim",diff:"diff",patch:"diff"};function r1(n){var s;const l=n.split("/").pop()??"",i=l.toLowerCase();if(i==="dockerfile")return"dockerfile";if(i==="makefile"||i==="gnumakefile")return"makefile";const u=(s=l.split(".").pop())==null?void 0:s.toLowerCase();if(u)return Y4[u]}function V4(n,l){for(const i of n){const u=i.message;if((u==null?void 0:u.role)==="toolResult"&&u.toolCallId===l)return{content:Array.isArray(u.content)?u.content.filter(c=>c.type==="text").map(c=>c.text).join(`
|
|
269
|
+
`):String(u.content??""),isError:u.isError??!1,details:u.details??void 0}}return null}function G4({name:n,args:l,toolCallId:i,entries:u,isAborted:s=!1}){const[c,d]=b.useState(!1),h=q4(n,l),p=b.useMemo(()=>i?V4(u,i):null,[u,i]),m=p!==null,x=((p==null?void 0:p.isError)??!1)||!m&&s,E=n==="read"?F4:n==="bash"?$4:n==="write"?K4:n==="edit"?Q4:Z4;return y.jsxs(y.Fragment,{children:[y.jsxs("button",{onClick:()=>d(!0),className:"w-full max-w-[640px] flex items-center gap-2.5 px-3 py-2 rounded-[8px] bg-[var(--fill-card)] border border-[var(--separator)] hover:bg-[var(--fill-tertiary)] transition-colors text-left group select-none",children:[y.jsx("span",{className:"text-[var(--label-secondary)] group-hover:text-[var(--color-accent)] transition-colors",children:i1(n)}),y.jsx("span",{className:"text-[13px] font-medium text-[var(--label-primary)]",children:n}),h&&y.jsx("span",{className:"text-[12px] text-[var(--label-tertiary)] truncate flex-1 min-w-0",children:h}),y.jsx("span",{className:"flex-shrink-0 ml-auto",children:!m&&!s?y.jsx(Vi,{size:14,className:"text-[var(--label-tertiary)] animate-spin"}):x?y.jsx(Y0,{size:14,className:"text-red-400"}):y.jsx(Lf,{size:14,className:"text-[var(--label-tertiary)] group-hover:text-[var(--label-secondary)] transition-colors"})})]}),c&&y.jsx(E,{name:n,args:l,result:p,isAborted:s,onClose:()=>d(!1)})]})}function nr(){const{t:n}=Be();return y.jsxs("div",{className:"flex items-center gap-2 text-[12px] text-[var(--label-tertiary)]",children:[y.jsx(Vi,{size:14,className:"animate-spin"}),y.jsx("span",{children:n("entries.running")})]})}function ar(){const{t:n}=Be();return y.jsxs("div",{className:"flex items-center gap-2 text-[12px] text-red-400",children:[y.jsx(Y0,{size:14}),y.jsx("span",{children:n("entries.aborted")})]})}function lr({name:n}){return y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-[var(--label-secondary)] select-none",children:i1(n)}),n]})}function F4({name:n,args:l,result:i,isAborted:u,onClose:s}){const c=l.path??"",d=l.offset,h=l.limit,p=r1(c);let m=c;if(d!=null||h!=null){const E=d??"",C=h!=null?(d??1)+h-1:"";m+=` [${E}:${C}]`}const v=p==="markdown",x=i&&!i.isError&&!v?is(i.content,p??""):null;return y.jsxs(_n,{title:y.jsx(lr,{name:n}),onClose:s,children:[y.jsx("div",{className:"px-5 py-2 border-b border-[var(--separator)] bg-[var(--fill-quaternary)]",children:y.jsx("p",{className:"text-[13px] text-[var(--label-secondary)] break-all leading-[20px] font-mono",children:m})}),y.jsx("div",{className:"flex-1 overflow-y-auto px-5 pt-3 pb-5 scrollbar-auto",children:i!==null?i.isError?y.jsx("pre",{className:"text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] px-3 py-2 text-red-400 bg-red-400/5",children:i.content}):v?y.jsx(Rn,{content:i.content}):y.jsx(Rn,{content:x}):u?y.jsx(ar,{}):y.jsx(nr,{})})]})}function $4({name:n,args:l,result:i,isAborted:u,onClose:s}){const c=l.command??"",d=l.timeout,h=is(c,"bash"),p=i&&!i.isError?is(i.content.trim(),"plaintext"):null;return y.jsx(_n,{title:y.jsx(lr,{name:n}),onClose:s,trailing:d!=null?y.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--label-tertiary)]",children:[y.jsx(US,{size:12}),d,"s"]}):void 0,children:y.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-auto",children:[y.jsx("div",{className:"px-5 pt-3 pb-3 bg-[var(--fill-quaternary)]",children:y.jsx(Rn,{content:h})}),y.jsxs("div",{className:"px-5 pt-3 pb-5",children:[y.jsx("h4",{className:"text-[11px] font-semibold text-[var(--label-tertiary)] uppercase tracking-wide mb-2",children:"Output"}),i!==null?i.isError?y.jsx("pre",{className:"text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] px-3 py-2 text-red-400 bg-red-400/5",children:i.content}):y.jsx(Rn,{content:p}):u?y.jsx(ar,{}):y.jsx(nr,{})]})]})})}function K4({name:n,args:l,result:i,isAborted:u,onClose:s}){const{t:c}=Be(),d=l.path??"",h=l.content??"",p=r1(d),m=p==="markdown",v=m?null:is(h,p??"");return y.jsxs(_n,{title:y.jsx(lr,{name:n}),onClose:s,children:[y.jsx("div",{className:"px-5 py-2 border-b border-[var(--separator)] bg-[var(--fill-quaternary)]",children:y.jsx("p",{className:"text-[13px] text-[var(--label-secondary)] break-all leading-[20px] font-mono",children:d})}),y.jsxs("div",{className:"flex-1 overflow-y-auto px-5 pt-3 pb-5 space-y-3 scrollbar-auto",children:[y.jsx("section",{children:y.jsx(Rn,{content:m?h:v})}),i!==null&&y.jsxs("section",{children:[y.jsx("h4",{className:"text-[11px] font-semibold text-[var(--label-tertiary)] uppercase tracking-wide mb-1.5",children:c("entries.result")}),y.jsx("pre",{className:`text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] px-3 py-2 ${i.isError?"text-red-400 bg-red-400/5":"text-[var(--label-secondary)] bg-[var(--fill-tertiary)]"}`,children:i.content})]}),i===null&&(u?y.jsx(ar,{}):y.jsx(nr,{}))]})]})}function X4({diff:n}){const l=n.split(`
|
|
270
|
+
`);return y.jsx("pre",{className:"text-[13px] leading-[20px] font-mono overflow-x-auto",children:y.jsx("div",{style:{minWidth:"fit-content"},children:l.map((i,u)=>{const s=i[0];return s==="+"?y.jsx("div",{className:"px-3 rounded-[2px]",style:{backgroundColor:"var(--diff-add-bg)",color:"var(--diff-add-text)"},children:i},u):s==="-"?y.jsx("div",{className:"px-3 rounded-[2px]",style:{backgroundColor:"var(--diff-del-bg)",color:"var(--diff-del-text)"},children:i},u):y.jsx("div",{className:"px-3",style:{color:"var(--diff-context-text)"},children:i},u)})})})}function Q4({name:n,args:l,result:i,isAborted:u,onClose:s}){var h;const c=l.path??"",d=(h=i==null?void 0:i.details)==null?void 0:h.diff;return y.jsxs(_n,{title:y.jsx(lr,{name:n}),onClose:s,children:[y.jsx("div",{className:"px-5 py-2 border-b border-[var(--separator)] bg-[var(--fill-quaternary)]",children:y.jsx("p",{className:"text-[13px] text-[var(--label-secondary)] break-all leading-[20px] font-mono",children:c})}),y.jsx("div",{className:"flex-1 overflow-y-auto pt-3 pb-5 scrollbar-auto",children:i!==null?i.isError?y.jsx("pre",{className:"text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] mx-5 px-3 py-2 text-red-400 bg-red-400/5",children:i.content}):d?y.jsx(X4,{diff:d}):y.jsx("pre",{className:"text-[13px] leading-[20px] whitespace-pre-wrap break-words mx-5 px-3 py-2 text-[var(--label-secondary)] bg-[var(--fill-tertiary)] rounded-[8px]",children:i.content}):u?y.jsx("div",{className:"px-5",children:y.jsx(ar,{})}):y.jsx("div",{className:"px-5",children:y.jsx(nr,{})})})]})}function Z4({name:n,args:l,result:i,isAborted:u,onClose:s}){const{t:c}=Be();return y.jsx(_n,{title:y.jsx(lr,{name:n}),onClose:s,children:y.jsxs("div",{className:"flex-1 overflow-y-auto px-5 pt-3 pb-5 space-y-3 scrollbar-auto",children:[y.jsxs("section",{children:[y.jsx("h4",{className:"text-[11px] font-semibold text-[var(--label-tertiary)] uppercase tracking-wide mb-1.5",children:c("entries.params")}),y.jsx("pre",{className:"text-[13px] leading-[20px] text-[var(--label-secondary)] whitespace-pre-wrap break-words bg-[var(--fill-tertiary)] rounded-[8px] px-3 py-2 overflow-x-auto",children:JSON.stringify(l,null,2)})]}),i!==null&&y.jsxs("section",{children:[y.jsx("h4",{className:"text-[11px] font-semibold text-[var(--label-tertiary)] uppercase tracking-wide mb-1.5",children:c("entries.result")}),y.jsx("pre",{className:`text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] px-3 py-2 overflow-x-auto ${i.isError?"text-red-400 bg-red-400/5":"text-[var(--label-secondary)] bg-[var(--fill-tertiary)]"}`,children:i.content})]}),i===null&&y.jsx("section",{children:u?y.jsx(ar,{}):y.jsx(nr,{})})]})})}function u1({src:n,alt:l,onClose:i}){const u=b.useCallback(s=>{s.key==="Escape"&&i()},[i]);return b.useEffect(()=>(document.addEventListener("keydown",u),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",u),document.body.style.overflow=""}),[u]),y.jsxs("div",{className:"fixed-viewport z-[9999] flex items-center justify-center bg-black/60 backdrop-blur-[30px] animate-in fade-in duration-150",onClick:i,children:[y.jsx("button",{onClick:i,className:"absolute top-4 right-4 z-10 w-9 h-9 rounded-full bg-[var(--badge-bg)] hover:bg-[var(--badge-bg-hover)] text-[var(--badge-text)] flex items-center justify-center transition-colors","aria-label":"Close",children:y.jsx(Df,{size:18})}),y.jsx("img",{src:n,alt:l??"Image preview",onClick:s=>s.stopPropagation(),className:"max-w-[90vw] max-h-[90vh] object-contain rounded-lg shadow-2xl select-none",draggable:!1})]})}function J4({entry:n,entries:l,isLast:i,isStreaming:u,onReEdit:s}){const c=i&&u;switch(n.type){case"message":return y.jsx(I4,{entry:n,entries:l,streaming:c,onReEdit:s});case"compaction":case"branch_summary":return y.jsx(tA,{type:n.type,summary:n.summary??""});default:return null}}function I4({entry:n,entries:l,streaming:i,onReEdit:u}){const s=n.message;if(!s)return null;switch(s.role){case"user":return y.jsx(W4,{content:s.content});case"assistant":return y.jsx(P4,{content:s.content,entries:l,streaming:i,stopReason:s.stopReason,errorMessage:s.errorMessage,onReEdit:u});case"toolResult":return null;default:return null}}function W4({content:n}){const[l,i]=b.useState(null);let u="",s=[];return typeof n=="string"?u=n:Array.isArray(n)?(u=n.filter(c=>c.type==="text").map(c=>c.text).join(""),s=n.filter(c=>c.type==="image")):u=JSON.stringify(n),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"flex justify-end px-4 py-1.5",children:y.jsxs("div",{className:"max-w-[80%] rounded-[16px] rounded-br-[4px] bg-[var(--color-accent)] text-white",children:[s.length>0&&y.jsx("div",{className:"flex flex-wrap gap-1.5 p-2 pb-0",children:s.map((c,d)=>{const h=`data:${c.mimeType};base64,${c.data}`;return y.jsx("button",{onClick:()=>i(h),className:"block rounded-[8px] overflow-hidden hover:opacity-90 transition-opacity",children:y.jsx("img",{src:h,alt:`Attached image ${d+1}`,className:"max-w-[200px] max-h-[150px] object-cover",draggable:!1})},d)})}),u&&y.jsx("p",{className:"text-[14px] leading-[21px] whitespace-pre-wrap break-words px-3.5 py-2",children:u}),!u&&s.length>0&&y.jsx("div",{className:"h-2"})]})}),l&&y.jsx(u1,{src:l,onClose:()=>i(null)})]})}function P4({content:n,entries:l,streaming:i,stopReason:u,errorMessage:s,onReEdit:c}){if((u==="error"||u==="aborted")&&s&&(!Array.isArray(n)||n.length===0))return y.jsx("div",{className:"px-4",children:y.jsx(l0,{message:s,onReEdit:u==="aborted"?c:void 0})});if(!Array.isArray(n))return y.jsx("div",{className:"px-4",children:y.jsx(Rn,{content:String(n)})});const d=u==="aborted"||u==="error",h=n[n.length-1],p=i&&(h==null?void 0:h.type)==="thinking",m=n.some(v=>v.type==="text"||v.type==="toolCall")||d;return y.jsxs("div",{className:"px-4 space-y-2",children:[n.map((v,x)=>y.jsx(eA,{block:v,entries:l,streaming:i&&x===n.length-1,autoCollapse:v.type==="thinking"&&m&&!p,isAborted:d},x)),(u==="error"||u==="aborted")&&s&&y.jsx(l0,{message:s,onReEdit:u==="aborted"&&!i?c:void 0}),i&&(h==null?void 0:h.type)!=="thinking"&&y.jsx("span",{className:"inline-block w-2 h-4 bg-[var(--label-tertiary)] rounded-sm animate-pulse"})]})}function eA({block:n,entries:l,streaming:i,autoCollapse:u,isAborted:s}){var c;switch(n.type){case"text":return y.jsx(Rn,{content:n.text});case"thinking":return(c=n.thinking)!=null&&c.trim()?y.jsx(H4,{content:n.thinking,streaming:i,autoCollapse:u}):null;case"toolCall":return y.jsx(G4,{name:n.name,args:n.arguments,toolCallId:n.id,entries:l,isAborted:s});default:return null}}function tA({type:n,summary:l}){const{t:i}=Be(),[u,s]=b.useState(!1),c=i(n==="compaction"?"entries.contextCompacted":"entries.branchSummary");return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"flex justify-center px-4 py-2",children:y.jsxs("button",{onClick:()=>l&&s(!0),className:`px-3 py-1 rounded-full bg-[var(--fill-tertiary)] text-[11px] text-[var(--label-tertiary)] transition-colors ${l?"hover:bg-[var(--fill-secondary)] cursor-pointer":""}`,children:[c,l&&y.jsxs("span",{className:"ml-1.5 opacity-70",children:["— ",l.slice(0,60),l.length>60?"...":""]})]})}),u&&y.jsx(_n,{title:c,onClose:()=>s(!1),children:y.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4 scrollbar-auto",children:y.jsx(Rn,{content:l})})})]})}function l0({message:n,onReEdit:l}){var x,E;const{t:i}=Be(),[u,s]=b.useState(!1);let c=n,d="",h="",p="";const m=n.indexOf("{");if(m>0){c=n.slice(0,m).trim();try{const C=JSON.parse(n.slice(m));d=((x=C==null?void 0:C.error)==null?void 0:x.message)??n.slice(m),h=((E=C==null?void 0:C.error)==null?void 0:E.type)??"";const N=d.match(/request id:\s*([\w]+)/i);N&&(p=N[1])}catch{d=n.slice(m)}}const v=d.length>200;return y.jsxs(y.Fragment,{children:[y.jsx("div",{onClick:v?()=>s(!0):void 0,className:`rounded-[10px] border border-[rgba(255,66,69,0.3)] bg-[rgba(255,66,69,0.06)] dark:bg-[rgba(255,66,69,0.1)] px-3.5 py-2.5 max-w-[640px] ${v?"cursor-pointer":""}`,children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx(rf,{size:14,className:"text-[#ff4245] flex-shrink-0 mt-0.5"}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center justify-between gap-2",children:[y.jsx("p",{className:"text-[12px] font-medium text-[#ff4245]",children:c}),y.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[l&&y.jsx("button",{onClick:C=>{C.stopPropagation(),l()},className:"text-[12px] leading-[15px] text-[var(--color-accent)] hover:opacity-70 active:opacity-50 transition-opacity select-none",children:i("reEdit.button")}),v&&y.jsx(Lf,{size:12,className:"text-[var(--label-tertiary)] flex-shrink-0"})]})]}),d&&!v&&y.jsx("p",{className:"text-[11px] text-[var(--label-secondary)] mt-1.5 break-all whitespace-pre-wrap",children:d})]})]})}),u&&y.jsx(_n,{title:i("error.title"),onClose:()=>s(!1),children:y.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-6 scrollbar-auto",children:[y.jsxs("div",{className:"flex flex-col items-center text-center mb-5",children:[y.jsx("div",{className:"w-10 h-10 rounded-full bg-[rgba(255,66,69,0.1)] dark:bg-[rgba(255,66,69,0.15)] flex items-center justify-center mb-3",children:y.jsx(rf,{size:20,className:"text-[#ff4245]"})}),y.jsx("p",{className:"text-[15px] font-semibold text-[#ff4245]",children:c})]}),y.jsxs("div",{className:"rounded-[10px] bg-[var(--fill-card)] p-4 space-y-3",children:[y.jsx(Zc,{label:i("error.message"),value:d}),h&&y.jsx(Zc,{label:i("error.type"),value:h}),p&&y.jsx(Zc,{label:i("error.requestId"),value:p,mono:!0})]})]})})]})}function Zc({label:n,value:l,mono:i}){return y.jsxs("div",{children:[y.jsx("p",{className:"text-[11px] text-[var(--label-tertiary)] mb-0.5",children:n}),y.jsx("p",{className:`text-[14px] leading-[22px] text-[var(--label-primary)] break-all whitespace-pre-wrap ${i?"font-mono text-[13px] leading-[20px]":""}`,children:l})]})}function s1({title:n,subtitle:l,backTo:i="/",actions:u,children:s}){const c=ss();return y.jsxs("div",{className:"md:hidden flex items-center gap-2",children:[y.jsx("button",{onClick:()=>c(i),"aria-label":"Back to instances",className:"flex select-none items-center text-[var(--label-secondary)] active:opacity-60 transition-opacity",children:y.jsx(tS,{size:20})}),s??y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-[14px] font-medium text-[var(--label-primary)] truncate select-text",children:n}),l&&y.jsx("div",{className:"text-[11px] text-[var(--label-tertiary)] truncate select-text",children:l})]}),u]})]})}function nA(n,l){if(l&&n.startsWith(l)){const i=n.slice(l.length);return!i||i==="/"?"~":"~"+(i.startsWith("/")?i:"/"+i)}return n}function Ef(n,l){if(n.length<=l)return n;const i=Math.floor((l-1)/2),u=l-1-i;return n.slice(0,u)+"…"+n.slice(-i)}function aA(n){const l=n.split("/").filter(Boolean);return l.length<=2?n.length:l.slice(-2).join("/").length}function i0(n,l){if(n.length<=l)return n;const i=aA(n);if(i+2<=l){const u=l-1-i;return n.slice(0,u)+"…"+n.slice(-i)}return Ef(n,l)}const lA=6.2,iA=20,rA=8;function r0({icon:n,text:l,copyText:i,title:u}){const[s,c]=b.useState(!1),d=b.useRef(null);b.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const h=b.useCallback(()=>{navigator.clipboard.writeText(i),c(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>c(!1),1500)},[i]);return y.jsxs("button",{type:"button",onClick:h,title:u??i,className:"inline-flex min-w-0 items-center gap-1 rounded-[4px] px-1 py-0.5 -mx-1 transition-colors hover:bg-[var(--fill-tertiary)] active:bg-[var(--fill-secondary)] cursor-pointer select-none",children:[y.jsx("span",{className:"shrink-0 opacity-70",children:s?y.jsx(er,{size:11,className:"text-green-500"}):n}),y.jsx("span",{className:"truncate",children:l})]})}function u0({title:n,cwd:l,homedir:i,gitBranch:u,actions:s}){const c=l?nA(l,i):null,d=b.useRef(null),[h,p]=b.useState(c),[m,v]=b.useState(u),x=b.useCallback(()=>{const E=d.current;if(!E)return;const C=E.getBoundingClientRect().width;if(C<=0)return;const N=(c?1:0)+(u?1:0),w=N*iA+(N-1)*rA,T=Math.floor((C-w)/lA);if(c&&u){const R=Math.max(10,Math.floor(T*.6)),j=Math.max(8,T-R);p(i0(c,R)),v(Ef(u,j))}else c?p(i0(c,Math.max(10,T))):u&&v(Ef(u,Math.max(8,T)))},[c,u]);return b.useEffect(()=>{const E=d.current;if(!E)return;const C=new ResizeObserver(()=>x());return C.observe(E),x(),()=>C.disconnect()},[x]),b.useEffect(()=>{p(c),v(u),x()},[c,u,x]),y.jsxs("div",{className:"flex items-center justify-between gap-2 min-w-0 flex-1 min-h-[40px]",children:[y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("div",{className:"truncate text-[14px] leading-[20px] font-medium text-[var(--label-primary)] select-text",children:n}),(c||u)&&y.jsxs("div",{ref:d,className:"mt-0.5 flex min-w-0 items-center gap-2 text-[11px] leading-[14px] text-[var(--label-secondary)]",children:[h&&y.jsx(r0,{icon:y.jsx(G0,{size:11}),text:h,copyText:l,title:l},l),m&&y.jsx(r0,{icon:y.jsx(gS,{size:11}),text:m,copyText:u},u)]})]}),s]})}function uA(n,l="top",i="right",u=8,s=12){const{innerWidth:c,innerHeight:d}=window,h=i==="left"?{left:Math.max(s,n.left)}:{right:Math.max(s,c-n.right)};return l==="bottom"?{...h,top:Math.max(s,n.bottom+u)}:{...h,bottom:Math.max(s,d-n.top+u)}}function Jf({trigger:n,width:l=200,children:i,disabled:u=!1,placement:s="top",align:c="right"}){const[d,h]=b.useState(!1),[p,m]=b.useState(null),v=b.useRef(null),x=b.useRef(null);b.useEffect(()=>{if(!d)return;function w(T){var j,z;const R=T.target;!((j=v.current)!=null&&j.contains(R))&&!((z=x.current)!=null&&z.contains(R))&&h(!1)}return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[d]),b.useEffect(()=>{if(!d)return;const w=()=>h(!1);return window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[d]);const E=()=>{var T;if(u)return;if(d){h(!1);return}const w=(T=v.current)==null?void 0:T.getBoundingClientRect();w&&(m(uA(w,s,c)),h(!0))},C=()=>h(!1),N=d&&p?ay.createPortal(y.jsx("div",{ref:x,className:"glass-popover z-50",style:{position:"fixed",...p.left!==void 0?{left:p.left}:{right:p.right},...p.top!==void 0?{top:p.top}:{bottom:p.bottom},width:`${l}px`},children:i(C)}),document.body):null;return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"relative",ref:v,onClick:E,children:n({open:d})}),N]})}function sA(n,l){const i=new Date(n),s=Date.now()-i.getTime(),c=Math.floor(s/6e4);if(c<1)return l("session.timeJustNow");if(c<60)return`${c}m`;const d=Math.floor(c/60);if(d<24)return`${d}h`;const h=Math.floor(d/24);if(h<7)return`${h}d`;const p=Math.floor(h/7);return p<4?`${p}w`:i.toLocaleDateString()}function oA({sessions:n,loading:l,hasMore:i,total:u,disabled:s,onOpen:c,onNewSession:d,onSwitchSession:h,onLoadMore:p,onFilterChange:m}){const{t:v}=Be(),[x,E]=b.useState(""),C=b.useRef(null),N=b.useRef(null),w=b.useCallback(R=>{E(R),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{m(R)},300)},[m]),T=b.useCallback(R=>{if(!i||l)return;const j=R.currentTarget;j.scrollHeight-j.scrollTop-j.clientHeight<40&&p(n.length,x)},[i,l,n.length,x,p]);return y.jsx(Jf,{trigger:({open:R})=>y.jsx("button",{className:`flex items-center justify-center w-9 h-9 rounded-[8px] transition-colors ${R?"bg-[rgba(0,0,0,0.11)] dark:bg-[rgba(255,255,255,0.11)]":"hover:bg-[var(--fill-tertiary)]"} ${s?"opacity-40 pointer-events-none":""}`,title:v("session.title"),onClick:()=>{R||(E(""),c())},children:y.jsx(xS,{size:16,className:"text-[var(--label-secondary)]"})}),width:320,disabled:s,placement:"bottom",children:R=>y.jsxs("div",{className:"flex flex-col max-h-[360px]",children:[y.jsxs("div",{className:"flex items-center justify-between px-3 pt-2.5 pb-2",children:[y.jsxs("span",{className:"text-[13px] font-medium text-[var(--label-primary)] select-none",children:[v("session.title"),u>0&&y.jsxs("span",{className:"ml-1.5 text-[11px] font-normal text-[var(--label-tertiary)]",children:["(",u,")"]})]}),y.jsxs("button",{onClick:()=>{d(),R()},disabled:s,className:"flex items-center gap-1 px-2 py-1 rounded-[6px] text-[12px] text-[var(--label-secondary)] hover:text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)] transition-colors disabled:opacity-40",children:[y.jsx(F0,{size:12}),y.jsx("span",{children:v("session.new")})]})]}),y.jsx("div",{className:"px-3 pb-2",children:y.jsx("input",{type:"text",placeholder:v("session.filter"),value:x,onChange:j=>w(j.target.value),className:"w-full px-2.5 py-1.5 rounded-[6px] bg-[var(--fill-tertiary)] text-[12px] text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] outline-none border border-transparent focus:border-[var(--separator)]",autoFocus:!0})}),y.jsx("div",{className:"h-px bg-[var(--separator)] mx-2"}),y.jsx("div",{ref:N,className:"flex-1 overflow-y-auto scrollbar-auto py-1.5 px-1.5",onScroll:T,children:l&&n.length===0?y.jsx("div",{className:"flex items-center justify-center py-6",children:y.jsx(Vi,{size:16,className:"animate-spin text-[var(--label-tertiary)]"})}):n.length===0?y.jsx("div",{className:"py-4 text-center text-[12px] text-[var(--label-tertiary)] select-none",children:v(x?"session.noMatch":"session.noPrevious")}):y.jsxs(y.Fragment,{children:[n.map(j=>y.jsxs("button",{onClick:()=>{j.isCurrent||(h(j.path),R())},disabled:j.isCurrent,className:`w-full text-left px-2.5 py-2 rounded-[8px] transition-colors mb-0.5 ${j.isCurrent?"bg-[var(--fill-secondary)] cursor-default":"hover:bg-[var(--fill-tertiary)] cursor-pointer"}`,children:[y.jsxs("div",{className:"flex items-center justify-between gap-2",children:[y.jsx("span",{className:`text-[13px] leading-[18px] truncate ${j.isCurrent?"font-medium text-[var(--color-accent)]":"text-[var(--label-primary)]"}`,children:j.name||j.firstMessage||v("session.empty")}),y.jsx("span",{className:"text-[11px] text-[var(--label-tertiary)] whitespace-nowrap shrink-0",children:sA(j.modified,v)})]}),j.name&&j.firstMessage&&y.jsx("div",{className:"mt-0.5 text-[11px] leading-[15px] text-[var(--label-tertiary)] truncate",children:j.firstMessage}),y.jsx("div",{className:"mt-0.5 text-[10px] text-[var(--label-quaternary)]",children:v("session.messageCount",{count:j.messageCount})})]},j.id)),l&&n.length>0&&y.jsx("div",{className:"flex items-center justify-center py-2",children:y.jsx(Vi,{size:14,className:"animate-spin text-[var(--label-tertiary)]"})})]})})]})})}const cA=["image/png","image/jpeg","image/gif","image/webp"],fA=2048,dA=2048,s0=.85,Jc=5*1024*1024;function o1(){return`img_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}async function o0(n){if(!cA.includes(n.type))throw new Error(`Unsupported image type: ${n.type}`);const l=await createImageBitmap(n),{width:i,height:u}=pA(l.width,l.height,fA,dA),s=document.createElement("canvas");s.width=i,s.height=u,s.getContext("2d").drawImage(l,0,0,i,u),l.close();let d=n.type,h=s0;n.type!=="image/png"&&n.type!=="image/gif"&&(d="image/jpeg");let p=s.toDataURL(d,h);if(d==="image/jpeg"||d==="image/webp")for(;Ic(p)>Jc&&h>.3;)h-=.1,p=s.toDataURL(d,h);if(d==="image/png"&&Ic(p)>Jc)for(d="image/jpeg",h=s0,p=s.toDataURL(d,h);Ic(p)>Jc&&h>.3;)h-=.1,p=s.toDataURL(d,h);const m=p.split(",")[1];return{id:o1(),data:m,mimeType:d,previewUrl:p}}function hA(n){const l=[];for(let i=0;i<n.items.length;i++){const u=n.items[i];if(u.type.startsWith("image/")){const s=u.getAsFile();s&&l.push(s)}}return l}function pA(n,l,i,u){if(n<=i&&l<=u)return{width:n,height:l};const s=Math.min(i/n,u/l);return{width:Math.round(n*s),height:Math.round(l*s)}}function Ic(n){const l=n.split(",")[1];return l?Math.ceil(l.length*3/4):0}let mA=0,qu=[];function wl(n,l="info"){const i={id:++mA,message:n,level:l,phase:"entering"};qu.forEach(u=>u(i))}const gA=16,yA=300,xA={info:3e3,success:3e3,warning:4e3,error:5e3},vA={info:ES,success:uS,warning:HS,error:rf},bA={info:"var(--toast-icon-info)",success:"var(--toast-icon-success)",warning:"var(--toast-icon-warning)",error:"var(--toast-icon-error)"};function SA(){const[n,l]=b.useState([]),i=b.useRef(new Set);return b.useEffect(()=>{const u=s=>{l(p=>[...p,s]);const c=setTimeout(()=>{i.current.delete(c),l(p=>p.map(m=>m.id===s.id?{...m,phase:"visible"}:m))},gA);i.current.add(c);const d=xA[s.level],h=setTimeout(()=>{i.current.delete(h),l(m=>m.map(v=>v.id===s.id?{...v,phase:"exiting"}:v));const p=setTimeout(()=>{i.current.delete(p),l(m=>m.filter(v=>v.id!==s.id))},yA);i.current.add(p)},d);i.current.add(h)};return qu.push(u),()=>{qu=qu.filter(s=>s!==u),i.current.forEach(s=>clearTimeout(s)),i.current.clear()}},[]),n.length===0?null:y.jsx("div",{className:"fixed top-[max(1rem,env(safe-area-inset-top))] left-1/2 -translate-x-1/2 z-[100] flex flex-col items-center gap-2 pointer-events-none",children:n.map(u=>{const s=vA[u.level],c=bA[u.level];return y.jsxs("div",{className:"pointer-events-auto flex items-center gap-2 rounded-full bg-[var(--panel-bg)] backdrop-blur-[30px] border-[0.5px] border-[var(--panel-border)] shadow-[var(--panel-shadow)] px-4 py-2.5 text-[13px] leading-[16px] text-[var(--label-primary)] select-none transition-all duration-300 ease-out",style:u.phase==="entering"?{opacity:0,transform:"translateY(-8px)"}:u.phase==="exiting"?{opacity:0,transform:"translateY(-4px)"}:{opacity:1,transform:"translateY(0)"},children:[y.jsx(s,{size:14,className:"shrink-0",style:{color:c}}),y.jsx("span",{children:u.message})]},u.id)})})}function EA({currentModel:n,availableModels:l,onSelect:i}){const s=l&&l.length>0&&i,c=new Map;if(l)for(const h of l){const p=c.get(h.provider)??[];p.push(h),c.set(h.provider,p)}const d=h=>h.provider===n.provider&&h.id===n.id;return y.jsx(Jf,{disabled:!s,width:280,align:"left",trigger:({open:h})=>y.jsxs("button",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-[9px] bg-[var(--fill-tertiary)] text-[12px] transition-colors ${s?"hover:bg-[var(--fill-secondary)] hover:text-[var(--label-primary)] cursor-pointer":"cursor-default"} text-[var(--label-secondary)]`,children:[y.jsx("span",{className:"max-w-[140px] truncate select-text",children:n.name||n.id}),s&&y.jsx(q0,{size:10,className:`transition-transform ${h?"rotate-180":""}`})]}),children:h=>y.jsx("div",{className:"max-h-[320px] overflow-y-auto py-1.5 px-1.5 scrollbar-auto",children:Array.from(c.entries()).map(([p,m],v)=>y.jsxs("div",{children:[v>0&&y.jsx("div",{className:"mx-1 my-1 h-px bg-[var(--separator)]"}),y.jsx("div",{className:"px-2.5 pt-2 pb-1 text-[11px] font-bold text-[var(--label-tertiary)] uppercase select-none",children:p}),m.map(x=>{const E=d(x);return y.jsxs("button",{onClick:()=>{E||i==null||i(x.provider,x.id),h()},className:`w-full text-left px-2.5 py-2 rounded-[8px] flex items-center gap-2 transition-colors select-none mb-0.5 ${E?"bg-[var(--fill-secondary)]":"hover:bg-[var(--fill-tertiary)]"}`,children:[y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-[13px] text-[var(--label-primary)] truncate select-text",children:x.name||x.id}),y.jsx("div",{className:"text-[11px] text-[var(--label-tertiary)] truncate select-text",children:x.id})]}),E&&y.jsx(er,{size:14,className:"text-[var(--color-accent)] flex-shrink-0"})]},`${x.provider}/${x.id}`)})]},p))})})}const CA=["off","minimal","low","medium","high"];function NA({currentLevel:n,onSelect:l}){const i=!!l;return y.jsx(Jf,{disabled:!i,width:160,align:"left",trigger:({open:u})=>y.jsxs("button",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-[9px] bg-[var(--fill-tertiary)] text-[12px] transition-colors ${i?"hover:bg-[var(--fill-secondary)] hover:text-[var(--label-primary)] cursor-pointer":"cursor-default"} text-[var(--label-secondary)]`,children:[y.jsx("span",{className:"select-text",children:n}),i&&y.jsx(q0,{size:10,className:`transition-transform ${u?"rotate-180":""}`})]}),children:u=>y.jsx("div",{className:"py-1.5 px-1.5",children:CA.map(s=>{const c=s===n;return y.jsxs("button",{onClick:()=>{c||l==null||l(s),u()},className:`w-full text-left px-2.5 py-2 rounded-[8px] flex items-center gap-2 transition-colors select-none mb-0.5 ${c?"bg-[var(--fill-secondary)]":"hover:bg-[var(--fill-tertiary)]"}`,children:[y.jsx("span",{className:"flex-1 text-[13px] text-[var(--label-primary)]",children:s}),c&&y.jsx(er,{size:14,className:"text-[var(--color-accent)] flex-shrink-0"})]},s)})})})}function AA({onClose:n,onConfirm:l}){const{t:i}=Be(),[u,s]=b.useState(""),c=b.useCallback(()=>{l(u.trim()||void 0)},[u,l]);return y.jsx(_n,{title:i("compact.title"),onClose:n,children:y.jsxs("div",{className:"px-5 py-4 space-y-3",children:[y.jsx("p",{className:"text-[13px] leading-[18px] text-[var(--label-secondary)] select-none",children:i("compact.description")}),y.jsx("textarea",{value:u,onChange:d=>s(d.target.value),placeholder:i("compact.placeholder"),rows:3,className:"w-full px-3 py-2 rounded-[10px] bg-[var(--fill-tertiary)] border border-[var(--separator)] text-[14px] leading-[20px] text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] outline-none resize-none focus:border-[var(--color-accent)] transition-colors"}),y.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[y.jsx("button",{onClick:n,className:"px-3.5 py-1.5 rounded-[8px] text-[13px] text-[var(--label-secondary)] hover:bg-[var(--fill-tertiary)] transition-colors",children:i("common.cancel")}),y.jsx("button",{onClick:c,className:"px-3.5 py-1.5 rounded-[8px] text-[13px] font-medium text-white bg-[var(--color-accent)] hover:opacity-90 active:opacity-80 transition-opacity",children:i("compact.start")})]})]})})}function TA({instance:n,draft:l,onDraftChange:i,onSendMessage:u,onAbort:s,onSetModel:c,onSetThinkingLevel:d,onCompact:h,buttonMode:p,showCompactButton:m,compactDisabled:v,onImageLightbox:x,startBottomFollow:E}){const{t:C}=Be(),N=b.useRef(null),w=b.useRef(null),T=b.useRef(l);T.current=l;const[R,j]=b.useState(!1),z=n==null?void 0:n.status,U=n==null?void 0:n.contextUsage,X=n==null?void 0:n.model,Q=n==null?void 0:n.availableModels,F=n==null?void 0:n.thinkingLevel,K=!!U&&U.tokens!=null&&U.percent!=null,q=b.useCallback(H=>{H.style.height="auto";const I=Math.min(H.scrollHeight,150);H.style.height=`${I}px`,H.style.overflowY=H.scrollHeight>150?"auto":"hidden"},[]);b.useLayoutEffect(()=>{N.current&&q(N.current)},[l.text,q]);const J=b.useCallback(H=>{i(I=>({...I,text:H.target.value})),q(H.target)},[i,q]),oe=!$i(z)&&(!!l.text.trim()||l.images.length>0),ee=b.useCallback(()=>{const H=T.current;if($i(z)||!H.text.trim()&&H.images.length===0)return;const I=H.images.length?H.images.map(Z=>({data:Z.data,mimeType:Z.mimeType})):void 0;u(H.text.trim(),I),N.current&&(N.current.style.height="auto"),E()},[z,u,E]),le=b.useCallback(H=>{H.nativeEvent.isComposing||H.keyCode===229||H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),ee())},[ee]),te=b.useCallback(H=>{const I=hA(H.clipboardData);I.length!==0&&(H.preventDefault(),Promise.all(I.map(o0)).then(Z=>{i(W=>({...W,images:[...W.images,...Z]}))}).catch(Z=>{wl(C("eventStream.imageProcessFailed"),"error"),console.error("Image process failed:",Z)}))},[i,C]),re=b.useCallback(H=>{const I=Array.from(H.target.files??[]);I.length!==0&&(Promise.all(I.map(o0)).then(Z=>{i(W=>({...W,images:[...W.images,...Z]}))}).catch(Z=>{wl(C("eventStream.imageProcessFailed"),"error"),console.error("Image process failed:",Z)}),H.target.value="")},[i,C]),M=b.useCallback(H=>{i(I=>({...I,images:I.images.filter(Z=>Z.id!==H)}))},[i]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"glass-panel glass-panel-input px-3 py-2 md:px-4",children:[(z||K)&&y.jsxs("div",{className:"mb-1.5 flex items-center gap-2 px-1 text-[12px] leading-[15px] text-[var(--label-secondary)]",children:[y.jsx(jA,{status:z}),K&&y.jsxs("span",{className:"min-w-0 flex items-center gap-1",children:[y.jsx("span",{className:"min-w-0 truncate",children:y.jsx(wA,{contextUsage:U})}),m&&y.jsx("button",{onClick:()=>j(!0),disabled:v,title:C("eventStream.compactContext"),className:"shrink-0 inline-flex items-center justify-center p-0.5 rounded-[4px] text-[var(--label-secondary)] hover:text-[var(--color-accent)] hover:bg-[var(--fill-tertiary)] transition-colors disabled:opacity-40 disabled:pointer-events-none",children:y.jsx(jS,{size:12})})]})]}),y.jsxs("div",{className:"flex flex-col overflow-hidden rounded-[14px] border border-[var(--separator)]",children:[l.images.length>0&&y.jsx("div",{className:"flex gap-2 px-3 pt-2 pb-0 overflow-x-auto scrollbar-none md:px-4",children:l.images.map(H=>y.jsxs("div",{className:"relative flex-shrink-0 group",children:[y.jsx("button",{onClick:()=>x(H.previewUrl),className:"block rounded-[8px] overflow-hidden border border-[var(--separator)] hover:border-[var(--color-accent)] transition-colors",children:y.jsx("img",{src:H.previewUrl,alt:"Attached",className:"w-[60px] h-[60px] object-cover",draggable:!1})}),y.jsx("button",{onClick:()=>M(H.id),className:"absolute -top-1 -right-1 w-[14px] h-[14px] rounded-full bg-[var(--badge-bg)] text-[var(--badge-text)] flex items-center justify-center hover:bg-[var(--badge-bg-hover)] transition-colors","aria-label":"Remove image",children:y.jsx(Df,{size:8})})]},H.id))}),y.jsx("textarea",{ref:N,rows:1,placeholder:C("eventStream.sendPlaceholder"),value:l.text,onChange:J,onKeyDown:le,onPaste:te,className:"resize-none bg-transparent text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] text-[16px] leading-[24px] px-3 pt-[9px] pb-0 outline-none overflow-hidden md:px-4 md:pt-[10px] md:text-[14px] md:leading-[22px]"}),y.jsxs("div",{className:"flex items-center justify-between px-1.5 pt-[9px] pb-1.5 md:pt-[10px]",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[X&&y.jsx(EA,{currentModel:X,availableModels:Q,onSelect:c}),F&&y.jsx(NA,{currentLevel:F,onSelect:d}),y.jsx("button",{onClick:()=>{var H;return(H=w.current)==null?void 0:H.click()},className:"select-none h-[26px] px-1.5 rounded-[6px] flex items-center justify-center text-[var(--label-secondary)] hover:text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)] transition-colors",title:C("eventStream.attachImage"),children:y.jsx(bS,{size:15})}),y.jsx("input",{ref:w,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",multiple:!0,onChange:re,className:"hidden"})]}),y.jsx("div",{className:"flex-shrink-0",children:p==="stop"?y.jsx("button",{onClick:s,className:"select-none w-[28px] h-[28px] rounded-full bg-red-500 text-white flex items-center justify-center hover:opacity-90 active:opacity-80 transition-opacity",title:C("eventStream.stop"),children:y.jsx(zS,{size:12,fill:"currentColor"})}):y.jsx("button",{onClick:ee,disabled:!oe,className:`select-none w-[28px] h-[28px] rounded-full flex items-center justify-center transition-opacity ${oe?"bg-[var(--color-accent)] text-white hover:opacity-90 active:opacity-80":"bg-[var(--fill-secondary)] text-[var(--label-tertiary)] opacity-50 cursor-default"}`,title:C("eventStream.send"),children:y.jsx(I2,{size:16,strokeWidth:2.5})})})]})]})]}),R&&y.jsx(AA,{onClose:()=>j(!1),onConfirm:H=>{h(H),j(!1)}})]})}function jA({status:n}){const{t:l}=Be();if(!n)return null;const i=n==="streaming",u=n==="compacting",s=i?"bg-[color-mix(in_srgb,var(--color-accent)_12%,transparent)] text-[var(--color-accent)]":u?"bg-amber-500/10 text-amber-500":"bg-green-500/10 text-green-500",c=i?"bg-[var(--color-accent)] animate-pulse":u?"bg-amber-500 animate-pulse":"bg-green-500",d=l(i?"eventStream.statusRunning":u?"eventStream.statusCompacting":"eventStream.statusOnline");return y.jsxs("span",{className:`flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 ${s}`,title:d,role:"status","aria-live":"polite","aria-label":d,children:[y.jsx("span",{"aria-hidden":"true",className:`h-2 w-2 rounded-full ${c}`}),y.jsx("span",{className:"text-[11px] font-medium leading-none",children:d})]})}function wA({contextUsage:n}){const{tokens:l,contextWindow:i,percent:u}=n;if(l==null||u==null)return null;const s=u>90?"#ff4245":u>60?"#ff9230":"#30d158",c=d=>{if(d<1e3)return String(d);if(d<1e4)return`${(d/1e3).toFixed(1)}k`;if(d<1e6)return`${Math.round(d/1e3)}k`;const h=d/1e6;return h%1===0?`${h}M`:`${h.toFixed(1)}M`};return y.jsxs("span",{className:"select-text",style:{color:s},children:[c(l)," / ",c(i)," (",Math.round(u),"%)"]})}let OA=0;function c1(n,l){return`${n}:${l}:${OA++}`}function Wc(n,l,i){return l.id||l.__renderKey?l:{...l,__renderKey:c1(n,i)}}function RA(n,l){const{t:i}=Be(),u=Ht(Y=>Y.send),s=Ht(Y=>Y.subscribe),c=Ht(Y=>Y.connectionState==="connected"),[d,h]=b.useState([]),[p,m]=b.useState(null),v=b.useRef(null),[x,E]=b.useState("idle"),[C,N]=b.useState(null),[w,T]=b.useState(!1),[R,j]=b.useState([]),[z,U]=b.useState(!1),[X,Q]=b.useState(!1),[F,K]=b.useState(0),q=b.useRef(0),J=b.useRef(d);J.current=d;const oe=b.useRef(x);oe.current=x;const ee=b.useRef(w);ee.current=w;const le=b.useCallback(()=>{h([]),m(null),E("refreshing"),N(null),T(!1),j([]),U(!1),Q(!1),K(0)},[]);b.useEffect(()=>s(Y=>{switch(Y.type){case"forwarded_event":{if(Y.payload.instanceId!==n)return;H(n,Y.payload.event,Y.payload.data);break}case"history":{if(Y.payload.instanceId!==n)return;const P=Y.payload.messages,ne=Y.payload.hasMore??!1;I(n,P,ne);break}case"session_list":{if(Y.payload.instanceId!==n)return;q.current>0?j(P=>[...P,...Y.payload.sessions]):j(Y.payload.sessions),Q(Y.payload.hasMore??!1),K(Y.payload.total??Y.payload.sessions.length),U(!1);break}case"error":{console.error("[Paimon]",Y.payload.message),E("error"),N(Y.payload.message);break}case"instance_error":{if(Y.payload.instanceId!==n)return;const P=Y.payload.action?`error.action.${Y.payload.action}`:null,ne=P?i(P,{message:Y.payload.message,defaultValue:Y.payload.message}):Y.payload.message;wl(ne,"error");break}}}),[n,s]),b.useEffect(()=>{if(c)return le(),u({type:"subscribe",payload:{instanceId:n}}),u({type:"get_history",payload:{instanceId:n}}),()=>{u({type:"unsubscribe",payload:{instanceId:n}})}},[n,c,u,le]);const te=b.useRef(l==null?void 0:l.sessionId),re=b.useRef(n);b.useEffect(()=>{const Y=l==null?void 0:l.sessionId;if(n!==re.current){re.current=n,Y!==void 0&&(te.current=Y);return}te.current!==void 0&&Y!==void 0&&Y!==te.current&&(le(),u({type:"get_history",payload:{instanceId:n}})),Y!==void 0&&(te.current=Y)},[l==null?void 0:l.sessionId,n,u,le]);const M=b.useRef(l==null?void 0:l.status);b.useEffect(()=>{const Y=l==null?void 0:l.status;M.current==="compacting"&&Y!=="compacting"&&(le(),u({type:"get_history",payload:{instanceId:n}})),M.current=Y},[l==null?void 0:l.status,n,u,le]);function H(Y,P,ne){const de=ne;switch(P){case"message_start":{const fe=de.message;if(!fe||fe.role!=="assistant")break;const Ae=Wc(Y,{type:"message",timestamp:new Date().toISOString(),message:fe},"streaming");v.current=Ae.__renderKey??Ae.id??null,m(Ae);break}case"message_update":{const fe=de.message;if(!fe)break;m(Ae=>Ae?{...Ae,message:fe}:Wc(Y,{type:"message",timestamp:new Date().toISOString(),message:fe},"streaming"));break}case"message_end":{const fe=de.message;if(fe){const Ae=v.current??c1(Y,"live"),ut={type:"message",timestamp:new Date().toISOString(),message:fe,__renderKey:Ae};h(Xt=>[...Xt,ut])}v.current=null,m(null);break}}}function I(Y,P,ne){const de=P.map(fe=>Wc(Y,fe,"history"));oe.current==="loadingMore"?h(fe=>[...de,...fe]):h(de),T(ne),E("idle"),N(null)}const Z=b.useCallback(()=>{if(!ee.current||oe.current!=="idle")return;const Y=J.current.length;E("loadingMore"),u({type:"get_history",payload:{instanceId:n,offset:Y}})},[n,u]),W=b.useCallback(Y=>{const P=(Y==null?void 0:Y.offset)??0;q.current=P,P===0&&j([]),U(!0),u({type:"list_sessions",payload:{instanceId:n,offset:P,limit:Y==null?void 0:Y.limit,filter:Y==null?void 0:Y.filter}})},[n,u]);return{entries:p?[...d,p]:d,streamingEntry:p,isStreaming:p!==null,loadState:x,errorMessage:C,hasMore:w,sessionList:R,sessionListLoading:z,sessionHasMore:X,sessionTotal:F,loadMore:Z,requestSessionList:W}}const _A=.5;function MA({topChromeHeight:n,bottomChromeHeight:l,bottomSafeGap:i=0}){const u=Math.max(0,l-i),s=Math.max(40,u+12);return{paddingTop:Math.max(24,n-4),paddingBottom:s,scrollButtonBottom:i+s}}function zA({previousScrollTop:n,previousScrollHeight:l,nextScrollHeight:i}){return n+i-l}function LA(n){return n==="streaming"||n==="compacting"?"stop":"send"}function rs(n){return Math.max(0,n)}function DA({isAtBottom:n,isLoadingMore:l,distanceToBottom:i,overlap:u,force:s=!1,scrollToBottom:c}){return!n||l||!s&&i<=_A&&u<=0?!1:(c(),!0)}function kA({rawScrollTop:n,hasMore:l,canLoadMore:i,isLoadingMore:u,isSuppressed:s}){return n>=0&&rs(n)<100&&l&&i&&!u&&!s}const UA=350,ir="data-entry-key",f1=.5,BA=3,HA=2e3;function If(n){return n.getAttribute(ir)??void 0}function d1(n,l){const i=l.closest(`[${ir}]`);return!i||!n.contains(i)?null:i}function h1(n,l){const i=n.querySelectorAll(`[${ir}]`);for(const u of i)if(If(u)===l)return u;return null}function qi(n,l){return l.getBoundingClientRect().top-n.top}function qA(n){const l=n.getBoundingClientRect(),i=l.top+8,u=n.querySelectorAll(`[${ir}]`);for(const s of u){const c=s.getBoundingClientRect();if(c.bottom>i&&c.top<l.bottom)return s}return null}function YA(n){const l={fallbackScrollTop:rs(n.scrollTop),fallbackScrollHeight:n.scrollHeight},i=n.getBoundingClientRect(),u=qA(n);if(!u)return l;const s=If(u);if(!s)return l;const c=u.getBoundingClientRect(),d=Math.min(Math.max(i.top+12,c.top+8),Math.min(c.bottom-1,i.bottom-1)),h=[{x:i.left+i.width/2,y:d},{x:i.left+24,y:d},{x:i.right-24,y:d}];for(const p of h){const m=document.elementsFromPoint(p.x,p.y);for(const v of m){if(v===n||!n.contains(v))continue;const x=d1(n,v);if(!x||x!==u)continue;const E=v.getBoundingClientRect();if(!(E.bottom<=i.top||E.top>=i.bottom))return{...l,entryKey:s,element:v,elementTop:qi(i,v),entryTop:qi(i,u)}}}return{...l,entryKey:s,entryTop:qi(i,u)}}function c0(n,l){return Math.abs(l)<=f1?!1:(n.scrollTop+=l,!0)}function f0(n,l,{allowDiffFallback:i}){const u=n.getBoundingClientRect();if(l.element&&l.elementTop!=null&&l.element.isConnected&&n.contains(l.element)){const s=d1(n,l.element),c=s?If(s):void 0;if(!l.entryKey||c===l.entryKey){const d=qi(u,l.element)-l.elementTop;return{mode:"deep",delta:d,adjusted:c0(n,d)}}}if(l.entryKey&&l.entryTop!=null){const s=h1(n,l.entryKey);if(s){const c=qi(u,s)-l.entryTop;return{mode:"entry",delta:c,adjusted:c0(n,c)}}}if(i){const s=zA({previousScrollTop:l.fallbackScrollTop,previousScrollHeight:l.fallbackScrollHeight,nextScrollHeight:n.scrollHeight}),c=s-n.scrollTop;return n.scrollTop=s,{mode:"diff",delta:c,adjusted:Math.abs(c)>f1}}return{mode:"none",delta:0,adjusted:!1}}function VA({scrollRef:n,contentRef:l,bottomChromeRef:i,entries:u,entriesRef:s,instanceId:c,hasMore:d,shouldScrollToBottom:h,onScrollToBottomHandled:p,onLoadMore:m,bottomChromeHeight:v,bottomSafeGap:x}){const E=b.useRef(!0),[C,N]=b.useState(!1),w=b.useRef(!1),T=b.useRef(!1),R=b.useRef(null),j=b.useRef(null),z=b.useRef(!1),U=b.useRef(null),X=b.useRef(u.length),Q=b.useRef(void 0),F=b.useRef(0),K=b.useRef(null),q=b.useCallback(Z=>{R.current!=null&&cancelAnimationFrame(R.current),T.current=!0,w.current=!0,Z(),R.current=requestAnimationFrame(()=>{T.current=!1,w.current=!1,R.current=null})},[]),J=b.useCallback(()=>{var W;const Z=K.current;Z&&(Z.rafId!=null&&cancelAnimationFrame(Z.rafId),(W=Z.observer)==null||W.disconnect(),K.current=null)},[]),oe=b.useCallback(({force:Z=!1}={})=>{const W=n.current,Y=l.current,P=i.current;if(!W||!Y||!P)return!1;const ne=Y.querySelectorAll(`[${ir}]`),de=ne[ne.length-1],fe=de==null?void 0:de.getBoundingClientRect(),Ae=P.getBoundingClientRect(),ut=W.scrollHeight-rs(W.scrollTop)-W.clientHeight,Xt=fe?fe.bottom-Ae.top:0;return DA({isAtBottom:E.current,isLoadingMore:z.current,distanceToBottom:ut,overlap:Xt,force:Z,scrollToBottom:()=>{J(),q(()=>{W.scrollTop=W.scrollHeight}),N(!1)}})},[n,l,i,q,J]),ee=b.useCallback(()=>{var Z;(Z=j.current)==null||Z.call(j),j.current=null},[]),le=b.useCallback(()=>{ee();const Z=performance.now();let W=null,Y=!1;const P=(ne=performance.now())=>{W=null,!(Y||ne-Z>=HA)&&(!E.current||z.current||(oe(),W=requestAnimationFrame(P)))};P(),j.current=()=>{Y=!0,W!=null&&(cancelAnimationFrame(W),W=null)}},[oe,ee]);b.useLayoutEffect(()=>{z.current||oe()},[v,x,oe]),b.useLayoutEffect(()=>{const Z=l.current;if(!Z||typeof ResizeObserver>"u")return;const W=new ResizeObserver(()=>{oe()});return W.observe(Z),()=>W.disconnect()},[c,l,oe]);const te=b.useCallback(()=>{const Z=n.current,W=K.current;if(!Z||!W)return;let Y={mode:"none"};q(()=>{Y=f0(Z,W.snapshot,{allowDiffFallback:!1})}),Y.mode==="none"&&J()},[n,q,J]),re=b.useCallback(()=>{const Z=K.current;!Z||Z.rafId!=null||(Z.rafId=requestAnimationFrame(()=>{const W=K.current;!W||W!==Z||(W.rafId=null,te())}))},[te]),M=b.useCallback(Z=>{const W=n.current,Y=l.current;if(!W||!Y||!Z.entryKey)return;J();const P={snapshot:Z,observer:null,rafId:null,warmupFrame:0};if(K.current=P,typeof ResizeObserver<"u"){const de=new ResizeObserver(()=>{re()});de.observe(Y);const fe=h1(W,Z.entryKey);fe&&fe!==Y&&de.observe(fe),P.observer=de}const ne=()=>{const de=K.current;!de||de!==P||de.warmupFrame>=BA||(de.rafId=requestAnimationFrame(()=>{const fe=K.current;!fe||fe!==P||(fe.rafId=null,fe.warmupFrame+=1,te(),ne())}))};ne()},[n,l,te,re,J]);b.useLayoutEffect(()=>(z.current=!1,U.current=null,Q.current=void 0,F.current=0,X.current=s.current.length,E.current=!0,N(!1),()=>{ee(),J(),R.current!=null&&(cancelAnimationFrame(R.current),R.current=null),T.current=!1,w.current=!1,z.current=!1,U.current=null,Q.current=void 0,F.current=0}),[c,s,J,ee]),b.useLayoutEffect(()=>{n.current&&(z.current||oe())},[u,c,n,oe]),b.useLayoutEffect(()=>{if(!h)return;if(!n.current){p();return}E.current=!0,oe({force:!0}),N(!1),p()},[h,u,n,oe,p]),b.useLayoutEffect(()=>{const Z=n.current;if(z.current&&Z&&u.length>X.current){const W=u[0]?df(u[0]):void 0;if(!Q.current||W!==Q.current){const P=U.current;let ne={mode:"none"};P&&q(()=>{ne=f0(Z,P,{allowDiffFallback:!0})}),F.current=performance.now()+UA,P&&P.entryKey&&ne.mode!=="none"&&M(P),z.current=!1,U.current=null,Q.current=void 0}else U.current&&(U.current={...U.current,fallbackScrollHeight:Z.scrollHeight})}z.current&&!d&&(z.current=!1,U.current=null,Q.current=void 0),X.current=u.length},[u,d,c,n,q,M]);const H=b.useCallback(()=>{const Z=n.current;if(!Z)return;const W=Z.scrollTop,Y=rs(W),P=performance.now()<F.current;if(W<0||w.current||T.current)return;K.current&&J();const ne=Z.scrollHeight-Y-Z.clientHeight<60;if(E.current=ne,ne||ee(),N(!ne),kA({rawScrollTop:W,hasMore:d,canLoadMore:!!m,isLoadingMore:z.current,isSuppressed:P})&&m){ee(),J(),z.current=!0;const fe=s.current,Ae=YA(Z);U.current=Ae,Q.current=fe[0]?df(fe[0]):void 0,m()}},[n,s,d,m,J,ee]),I=b.useCallback(()=>{n.current&&(J(),q(()=>{n.current.scrollTop=n.current.scrollHeight}),E.current=!0,N(!1))},[n,q,J]);return{handleScroll:H,scrollToBottom:I,showScrollBtn:C,startBottomFollow:le}}function GA(n,l,i){const{t:u}=Be(),s=Qu(p=>p.setDraft),{canReEdit:c,userContent:d}=b.useMemo(()=>{var m,v;if(i!=="idle"||l.length===0)return{canReEdit:!1,userContent:null};const p=l[l.length-1];if(p.type!=="message"||((m=p.message)==null?void 0:m.role)!=="assistant"||p.message.stopReason!=="aborted")return{canReEdit:!1,userContent:null};for(let x=l.length-2;x>=0;x--){const E=l[x];if(E.type==="message"&&((v=E.message)==null?void 0:v.role)==="user")return{canReEdit:!0,userContent:E.message.content}}return{canReEdit:!1,userContent:null}},[l,i]),h=b.useCallback(()=>{if(!c||d==null)return;const p=Qu.getState().drafts.get(n)??Hf;if(p.text.trim()||p.images.length>0){wl(u("reEdit.draftNotEmpty"),"warning");return}const m=FA(d);s(n,m)},[c,d,n,s,u]);return c?h:void 0}function FA(n){let l="";const i=[];if(typeof n=="string")l=n;else if(Array.isArray(n)){const u=[];for(const s of n)if(s.type==="text")u.push(s.text);else if(s.type==="image"){const c=s,d=o1();i.push({id:d,data:c.data,mimeType:c.mimeType,previewUrl:`data:${c.mimeType};base64,${c.data}`})}l=u.join("")}return{text:l,images:i}}function $A(){const{t:n}=Be(),{id:l}=Lb(),i=l,u=Ht(Ne=>Ne.send),s=zi(G2(i)),c=Qu(Ne=>Ne.drafts.get(i)??Hf),d=Qu(Ne=>Ne.setDraft),{entries:h,isStreaming:p,loadState:m,errorMessage:v,hasMore:x,sessionList:E,sessionListLoading:C,sessionHasMore:N,sessionTotal:w,loadMore:T,requestSessionList:R}=RA(i,s),j=b.useCallback(Ne=>{d(i,Ne)},[i,d]),z=b.useCallback((Ne,ze)=>{u({type:"prompt",payload:{instanceId:i,message:Ne,images:ze!=null&&ze.length?ze:void 0}}),d(i,{text:"",images:[]})},[i,u,d]),U=b.useCallback(()=>{u({type:"abort",payload:{instanceId:i}})},[i,u]),X=b.useCallback((Ne,ze)=>{u({type:"set_model",payload:{instanceId:i,provider:Ne,id:ze}})},[i,u]),Q=b.useCallback(Ne=>{u({type:"set_thinking_level",payload:{instanceId:i,level:Ne}})},[i,u]),F=b.useCallback(()=>{R({offset:0})},[R]),K=b.useCallback((Ne,ze)=>{R({offset:Ne,filter:ze})},[R]),q=b.useCallback(Ne=>{R({offset:0,filter:Ne||void 0})},[R]),J=b.useCallback(()=>{u({type:"new_session",payload:{instanceId:i}})},[i,u]),oe=b.useCallback(Ne=>{u({type:"switch_session",payload:{instanceId:i,path:Ne}})},[i,u]),ee=b.useCallback(Ne=>{u({type:"compact",payload:{instanceId:i,customInstructions:Ne}})},[i,u]),le=GA(i,h,s==null?void 0:s.status),te=b.useRef(null),re=b.useRef(null),M=b.useRef(null),H=b.useRef(null),I=b.useRef(null),[Z,W]=b.useState(null),Y=b.useRef(h);Y.current=h;const P=m==="refreshing",ne=LA(s==null?void 0:s.status),de=h.length>0&&h[h.length-1].type==="compaction",fe=$i(s==null?void 0:s.status),[Ae,ut]=b.useState(!1),Xt=b.useCallback(()=>{ut(!1)},[]),ln=b.useRef(m);b.useLayoutEffect(()=>{ln.current==="refreshing"&&m==="idle"&&ut(!0),ln.current=m},[m]);const[_l,Ma]=b.useState(64),[za,rr]=b.useState(96),[Qt,Ml]=b.useState(12),sa=MA({topChromeHeight:_l,bottomChromeHeight:za,bottomSafeGap:Qt});b.useLayoutEffect(()=>{const Ne=(Da,ka)=>{if(!Da)return()=>{};const cr=()=>{ka(Math.ceil(Da.getBoundingClientRect().height))};if(cr(),typeof ResizeObserver>"u")return()=>{};const Dl=new ResizeObserver(cr);return Dl.observe(Da),()=>Dl.disconnect()},ze=Ne(M.current,Ma),La=Ne(H.current,rr),oa=Ne(I.current,Ml);return()=>{ze(),La(),oa()}},[i]);const{handleScroll:hs,scrollToBottom:ur,showScrollBtn:zl,startBottomFollow:Ll}=VA({scrollRef:te,contentRef:re,bottomChromeRef:H,entries:h,entriesRef:Y,instanceId:i,hasMore:x,shouldScrollToBottom:Ae,onScrollToBottomHandled:Xt,onLoadMore:T,bottomChromeHeight:za,bottomSafeGap:Qt}),or={title:(s==null?void 0:s.cwd.split("/").pop())||(s==null?void 0:s.cwd)||"",cwd:s==null?void 0:s.cwd,homedir:s==null?void 0:s.homedir,gitBranch:s==null?void 0:s.gitBranch,actions:y.jsx(oA,{sessions:E,loading:C,hasMore:N,total:w,disabled:$i(s==null?void 0:s.status),onOpen:F,onNewSession:J,onSwitchSession:oe,onLoadMore:K,onFilterChange:q})};return y.jsxs("div",{className:"relative flex-1 min-w-0 overflow-hidden",children:[y.jsxs("main",{className:"absolute inset-0 flex min-h-0 flex-col overflow-hidden",children:[y.jsx("div",{className:"pointer-events-none absolute left-0 right-0 top-0 z-20 px-3 pt-3 md:px-4 md:pt-4",children:y.jsxs("div",{ref:M,className:"glass-panel pointer-events-auto mx-auto w-full max-w-[920px] px-3 py-2 md:px-4 md:py-2.5",role:"region","aria-label":"Instance info",children:[y.jsx("div",{className:"hidden md:flex",children:y.jsx(u0,{...or})}),y.jsx(s1,{children:y.jsx(u0,{...or})})]})}),y.jsx("div",{ref:te,onScroll:hs,style:{overflowAnchor:"none"},"aria-busy":P,className:"absolute bottom-[var(--bottom-safe-gap)] left-0 right-0 top-6 overflow-y-auto scrollbar-auto px-3 md:bottom-0 md:top-7 md:px-4",children:y.jsxs("div",{ref:re,style:{paddingTop:sa.paddingTop,paddingBottom:sa.paddingBottom},className:"mx-auto max-w-[920px] space-y-2",children:[m==="loadingMore"&&y.jsx("div",{className:"text-center text-[var(--label-tertiary)] text-[11px] py-2 select-none",children:"Loading earlier messages..."}),P?y.jsx(KA,{}):m==="error"?y.jsxs("div",{className:"mx-auto mt-8 max-w-[520px] rounded-[12px] border border-[var(--separator)] bg-[var(--fill-card)] px-4 py-3 text-center",children:[y.jsx("div",{className:"text-[13px] text-[var(--label-primary)] select-none",children:"Failed to load conversation"}),v&&y.jsx("div",{className:"mt-1 text-[12px] text-[var(--label-secondary)] break-words select-text",children:v})]}):h.length===0&&!x?y.jsx("div",{className:"text-center text-[var(--label-tertiary)] text-[12px] pt-8 select-none",children:"No messages yet"}):h.map((Ne,ze)=>{const La=df(Ne),oa=ze===h.length-1;return y.jsx("div",{"data-entry-key":La,children:y.jsx(J4,{entry:Ne,entries:h,isLast:oa,isStreaming:p,onReEdit:oa?le:void 0})},La)})]})}),zl&&y.jsx("div",{style:{bottom:sa.scrollButtonBottom},className:"absolute left-1/2 z-30 -translate-x-1/2",children:y.jsx("button",{onClick:ur,className:"select-none w-9 h-9 rounded-full bg-[var(--btn-solid)] border border-[var(--separator)] text-[var(--label-secondary)] flex items-center justify-center hover:bg-[var(--btn-solid-hover)] active:scale-95 transition-all shadow-[0_4px_20px_rgba(0,0,0,0.12)]",title:n("eventStream.scrollToBottom"),children:y.jsx(lS,{size:16})})}),y.jsx("div",{ref:H,className:"pointer-events-none absolute bottom-0 left-0 right-0 z-20 px-3 pb-0 md:px-4",children:y.jsxs("div",{className:"pointer-events-auto mx-auto w-full max-w-[920px]",children:[y.jsx(TA,{instance:s,draft:c,onDraftChange:j,onSendMessage:z,onAbort:U,onSetModel:X,onSetThinkingLevel:Q,onCompact:ee,buttonMode:ne,showCompactButton:!de,compactDisabled:fe,onImageLightbox:W,startBottomFollow:Ll}),y.jsx("div",{ref:I,className:"h-[var(--bottom-safe-gap)] md:h-0","aria-hidden":"true"})]})})]}),Z&&y.jsx(u1,{src:Z,onClose:()=>W(null)})]})}function KA(){return y.jsx("div",{className:"space-y-3 pt-3 select-none","aria-label":"Loading conversation",children:[0,1,2,3].map(n=>y.jsxs("div",{className:"space-y-1.5 animate-pulse",children:[y.jsx("div",{className:"h-3 w-20 rounded-full bg-[var(--fill-tertiary)]"}),y.jsxs("div",{className:"max-w-[680px] space-y-1.5 rounded-[10px] border border-[var(--separator)] bg-[var(--fill-card)] p-3",children:[y.jsx("div",{className:"h-3 w-[82%] rounded-full bg-[var(--fill-secondary)]"}),y.jsx("div",{className:"h-3 w-[64%] rounded-full bg-[var(--fill-tertiary)]"})]})]},n))})}function XA(){const{t:n}=Be(),l=kf();return y.jsx("div",{className:"flex-1 flex items-center justify-center",children:y.jsxs("div",{className:"text-center select-none",children:[y.jsx("img",{src:l,alt:"Paimon",className:"w-16 h-16 mx-auto mb-4 opacity-80"}),y.jsx("div",{className:"text-[14px] text-[var(--label-tertiary)] tracking-wide",children:n("eventStream.tagline")})]})})}function QA(){return y.jsx("div",{className:"relative flex-1 min-w-0 overflow-hidden flex flex-col",children:y.jsx(Qb,{})})}const ZA={common:{cancel:"取消",confirm:"确认",loading:"加载中…",online:"在线",offline:"离线"},login:{subtitle:"输入 Access Token 以连接",placeholder:"Access Token",invalidToken:"Token 无效,请检查后重试。",connect:"连接",verifying:"验证中…",tokenHint:"Token 可在 <1>~/.paimon/hub.json</1> 中找到"},sidebar:{newInstance:"新建实例",machine_one:"{{count}} 台机器",machine_other:"{{count}} 台机器",instance_one:"{{count}} 个实例",instance_other:"{{count}} 个实例",noInstances:"暂无 pi 实例连接",settings:"设置",shutdown:"退出实例",shutdownBusy:"实例正在执行中,请等待完成后再退出",statusStreaming:"生成中",statusCompacting:"压缩中",statusIdle:"空闲"},eventStream:{tagline:"守望 · 交互 · 掌控",sendPlaceholder:"发送消息…",scrollToBottom:"滚到底部",stop:"停止",send:"发送",attachImage:"添加图片",imageProcessFailed:"图片处理失败,请检查图片格式",statusRunning:"执行中",statusCompacting:"压缩中",statusOnline:"在线",compactContext:"压缩上下文",instanceNotFound:"实例不存在"},compact:{title:"压缩上下文",description:"压缩将总结旧的对话内容以释放上下文空间。可选填自定义提示词来指定压缩时关注的方向。",placeholder:"例如:重点保留关于数据库设计的讨论…",start:"开始压缩"},settings:{title:"设置",appearance:"外观",theme:"主题",themeLight:"浅色",themeDark:"深色",themeSystem:"系统",background:"背景",bgMist:"雾",bgAurora:"极光",bgEmber:"余烬",language:"语言",langZhCN:"简体中文",langEn:"English"},newInstance:{title:"新建实例",edgeNode:"Edge 节点",noEdges:"没有可用的 Edge 节点",workingDir:"工作目录",pathPlaceholder:"/path/to/your/project",create:"创建",creating:"创建中…",truncatedHint:"输入更多字符以缩小范围…",fetchEdgeError:"获取 Edge 列表失败",noEdgeSelected:"未选择 Edge 节点",requestTimeout:"请求超时",networkError:"网络错误",requestFailed:"请求失败 (HTTP {{status}})"},session:{title:"Sessions",new:"新建",filter:"筛选…",noMatch:"无匹配的 Session",noPrevious:"暂无历史 Session",empty:"空 Session",messageCount_one:"{{count}} 条消息",messageCount_other:"{{count}} 条消息",timeJustNow:"刚刚"},entries:{contextCompacted:"上下文已压缩",branchSummary:"分支摘要",thinking:"思考",thinkingStreaming:"思考中...",running:"执行中...",aborted:"已终止",copied:"已复制",copy:"复制",result:"结果",params:"参数"},reEdit:{button:"重新编辑",draftNotEmpty:"输入框已有内容,请先清空"},error:{title:"错误详情",message:"错误信息",type:"错误类型",requestId:"请求 ID",action:{compact:"压缩失败:{{message}}"}}},JA={common:{cancel:"Cancel",confirm:"Confirm",loading:"Loading…",online:"Online",offline:"Offline"},login:{subtitle:"Enter access token to connect",placeholder:"Access Token",invalidToken:"Invalid token. Please check and try again.",connect:"Connect",verifying:"Verifying…",tokenHint:"Find your token in <1>~/.paimon/hub.json</1>"},sidebar:{newInstance:"New instance",machine_one:"{{count}} machine",machine_other:"{{count}} machines",instance_one:"{{count}} instance",instance_other:"{{count}} instances",noInstances:"No pi instances connected",settings:"Settings",shutdown:"Shutdown instance",shutdownBusy:"Instance is running, please wait before shutting down",statusStreaming:"Streaming",statusCompacting:"Compacting",statusIdle:"Idle"},eventStream:{tagline:"Watch · Interact · Control",sendPlaceholder:"Send a message...",scrollToBottom:"Scroll to bottom",stop:"Stop",send:"Send",attachImage:"Attach image",imageProcessFailed:"Image processing failed, please check the format",statusRunning:"Running",statusCompacting:"Compacting",statusOnline:"Online",compactContext:"Compact context",instanceNotFound:"Instance not found"},compact:{title:"Compact Context",description:"Compaction summarizes older conversation to free up context space. Optionally provide custom instructions to guide what to focus on.",placeholder:"e.g. Keep the discussion about database design…",start:"Start compaction"},settings:{title:"Settings",appearance:"Appearance",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",background:"Background",bgMist:"Mist",bgAurora:"Aurora",bgEmber:"Ember",language:"Language",langZhCN:"简体中文",langEn:"English"},newInstance:{title:"New Instance",edgeNode:"Edge Node",noEdges:"No available Edge nodes",workingDir:"Working Directory",pathPlaceholder:"/path/to/your/project",create:"Create",creating:"Creating…",truncatedHint:"Type more to narrow results…",fetchEdgeError:"Failed to fetch edge list",noEdgeSelected:"No edge selected",requestTimeout:"Request timed out",networkError:"Network error",requestFailed:"Request failed (HTTP {{status}})"},session:{title:"Sessions",new:"New",filter:"Filter…",noMatch:"No matching sessions",noPrevious:"No previous sessions",empty:"Empty session",messageCount_one:"{{count}} message",messageCount_other:"{{count}} messages",timeJustNow:"just now"},entries:{contextCompacted:"Context compacted",branchSummary:"Branch summary",thinking:"Thinking",thinkingStreaming:"Thinking...",running:"Running...",aborted:"Aborted",copied:"Copied",copy:"Copy",result:"Result",params:"Parameters"},reEdit:{button:"Edit",draftNotEmpty:"Input is not empty, please clear first"},error:{title:"Error Details",message:"Error message",type:"Error type",requestId:"Request ID",action:{compact:"Compaction failed: {{message}}"}}},p1="paimon:language";function IA(){const n=localStorage.getItem(p1);return n==="zh-CN"||n==="en"?n:"zh-CN"}function WA(n){localStorage.setItem(p1,n),it.changeLanguage(n)}it.use(U3).init({resources:{"zh-CN":{translation:ZA},en:{translation:JA}},lng:IA(),fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});function d0({options:n,value:l,onChange:i}){return y.jsx("div",{className:"flex rounded-[8px] bg-[var(--fill-secondary)] p-[2px] select-none",children:n.map(u=>y.jsx("button",{onClick:()=>i(u.value),className:`px-3 py-1.5 rounded-[6px] text-[13px] leading-[18px] transition-all ${l===u.value?"bg-[var(--panel-bg)] text-[var(--label-primary)] font-semibold shadow-sm backdrop-blur-sm":"text-[var(--label-secondary)] font-normal hover:text-[var(--label-primary)]"}`,children:u.label},u.value))})}function Pc({label:n,children:l,showSeparator:i=!0}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex items-center justify-between px-4 py-3 select-none",children:[y.jsx("span",{className:"text-[14px] leading-[20px] font-semibold text-[var(--label-primary)]",children:n}),l]}),i&&y.jsx("div",{className:"ml-4 border-b border-[var(--separator)]"})]})}function PA({value:n,onChange:l,options:i}){return y.jsx("div",{className:"flex items-center gap-3 select-none",children:i.map(u=>y.jsxs("button",{onClick:()=>l(u.value),className:"flex flex-col items-center gap-1",children:[y.jsx("div",{className:`w-7 h-7 rounded-full transition-all ${n===u.value?"ring-2 ring-[var(--color-accent)] ring-offset-1":"hover:scale-110"}`,style:{background:`conic-gradient(${u.colors.join(", ")})`}}),y.jsx("span",{className:`text-[12px] leading-[16px] ${n===u.value?"text-[var(--label-primary)] font-semibold":"text-[var(--label-secondary)] font-normal"}`,children:u.label})]},u.value))})}function e8(){const{t:n,i18n:l}=Be(),[i,u]=FS(),[s,c]=X0(),d=[{value:"light",label:n("settings.themeLight")},{value:"dark",label:n("settings.themeDark")},{value:"system",label:n("settings.themeSystem")}],h=[{value:"mist",label:n("settings.bgMist"),colors:["#e8f0fe","#f5e6f0","#e6f0f5","#f0f5e6"]},{value:"aurora",label:n("settings.bgAurora"),colors:["#a8d8ea","#aa96da","#8fd3c4","#c4a8d8"]},{value:"ember",label:n("settings.bgEmber"),colors:["#f8d4b0","#f0b0c0","#f8e0a0","#e8c0d0"]}],p=[{value:"zh-CN",label:n("settings.langZhCN")},{value:"en",label:n("settings.langEn")}];return y.jsx("div",{className:"flex-1 flex items-start justify-center p-4 md:p-6 overflow-y-auto scrollbar-auto",children:y.jsxs("div",{className:"w-full max-w-[480px]",children:[y.jsx(s1,{title:n("settings.title")}),y.jsx("h1",{className:"hidden md:block text-[22px] font-semibold text-[var(--label-primary)] mb-6 px-4 select-none",children:n("settings.title")}),y.jsx("div",{className:"text-[14px] leading-[20px] font-semibold text-[var(--label-primary)] mb-2 px-4 select-none",children:n("settings.appearance")}),y.jsxs("section",{className:"glass-panel overflow-hidden",children:[y.jsx(Pc,{label:n("settings.theme"),children:y.jsx(d0,{options:d,value:i,onChange:u})}),y.jsx(Pc,{label:n("settings.background"),showSeparator:!1,children:y.jsx(PA,{value:s,onChange:c,options:h})})]}),y.jsx("div",{className:"text-[14px] leading-[20px] font-semibold text-[var(--label-primary)] mb-2 mt-6 px-4 select-none",children:n("settings.language")}),y.jsx("section",{className:"glass-panel overflow-hidden",children:y.jsx(Pc,{label:n("settings.language"),showSeparator:!1,children:y.jsx(d0,{options:p,value:l.language,onChange:WA})})})]})})}async function Cf(n,l){const i=D0(),u=new Headers(l==null?void 0:l.headers);i&&u.set("Authorization",`Bearer ${i}`);const s=await fetch(n,{...l,headers:u});return s.status===401&&(k0(),window.location.reload()),s}function t8({value:n,onChange:l,edgeId:i,disabled:u=!1,autoFocus:s=!1,onSubmit:c}){const{t:d}=Be(),[h,p]=b.useState([]),[m,v]=b.useState(!1),[x,E]=b.useState(!1),[C,N]=b.useState(-1),[w,T]=b.useState(!1),R=b.useRef(null),j=b.useRef(null),z=b.useRef(null),U=b.useRef(null);b.useEffect(()=>()=>{var K;(K=z.current)==null||K.abort()},[]),b.useEffect(()=>{var K;s&&((K=R.current)==null||K.focus())},[s]);const X=b.useCallback(async(K,q)=>{z.current&&z.current.abort();const J=new AbortController;z.current=J,E(!0);try{const ee=await(await Cf(`/api/edges/${encodeURIComponent(K)}/browse?path=${encodeURIComponent(q)}`,{signal:J.signal})).json();if(J.signal.aborted)return;ee.error?(p([]),v(!1),T(!1)):(p(ee.entries??[]),v(ee.truncated??!1),T((ee.entries??[]).length>0||ee.truncated)),N(-1)}catch{J.signal.aborted||(p([]),T(!1))}finally{J.signal.aborted||E(!1)}},[]);b.useEffect(()=>{if(!i||!n||!n.startsWith("/")){p([]),T(!1);return}return U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{X(i,n)},250),()=>{U.current&&clearTimeout(U.current)}},[n,i,X]);const Q=b.useCallback(K=>{var ee;const oe=(n.endsWith("/")?n:n.substring(0,n.lastIndexOf("/")+1))+K.name+"/";l(oe),N(-1),(ee=R.current)==null||ee.focus()},[n,l]),F=b.useCallback(K=>{if(w&&h.length>0){if(K.key==="ArrowDown"){K.preventDefault(),N(q=>q<h.length-1?q+1:0);return}if(K.key==="ArrowUp"){K.preventDefault(),N(q=>q>0?q-1:h.length-1);return}if(K.key==="Tab"){K.preventDefault(),C>=0&&C<h.length?Q(h[C]):h.length===1&&Q(h[0]);return}if(K.key==="Enter"&&C>=0&&C<h.length){K.preventDefault(),Q(h[C]);return}if(K.key==="Escape"){K.preventDefault(),T(!1),N(-1);return}}K.key==="Enter"&&(K.preventDefault(),c==null||c())},[w,h,C,Q,c]);return b.useEffect(()=>{if(C<0||!j.current)return;const q=j.current.children[C];q==null||q.scrollIntoView({block:"nearest"})},[C]),b.useEffect(()=>{p([]),T(!1),N(-1)},[i]),y.jsxs("div",{className:"flex flex-col gap-1.5",children:[y.jsxs("div",{className:"relative",children:[y.jsx("input",{ref:R,type:"text",value:n,onChange:K=>l(K.target.value),onKeyDown:F,onFocus:()=>{h.length>0&&T(!0)},onBlur:()=>{setTimeout(()=>T(!1),150)},placeholder:d("newInstance.pathPlaceholder"),disabled:u,spellCheck:!1,autoComplete:"off",className:"w-full rounded-[10px] px-3 py-2 bg-[var(--fill-tertiary)] border border-[var(--separator)] text-[14px] leading-[20px] text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] outline-none focus:border-[var(--color-accent)] transition-colors disabled:opacity-50 pr-8"}),x&&y.jsx("div",{className:"absolute right-2.5 top-1/2 -translate-y-1/2",children:y.jsx(Vi,{size:14,className:"animate-spin text-[var(--label-tertiary)]"})})]}),w&&y.jsxs("div",{ref:j,className:"max-h-[200px] overflow-y-auto rounded-[10px] border border-[var(--separator)] bg-[var(--fill-quaternary)]",children:[h.map((K,q)=>y.jsxs("button",{type:"button",onMouseDown:J=>{J.preventDefault(),Q(K)},onMouseEnter:()=>N(q),className:`w-full flex items-center gap-2 px-3 py-1.5 text-left text-[13px] transition-colors ${q===C?"bg-[var(--fill-secondary)]":"hover:bg-[var(--fill-tertiary)]"}`,children:[y.jsx(G0,{size:14,className:"shrink-0 text-[var(--label-tertiary)]"}),y.jsx("span",{className:"text-[var(--label-primary)] truncate",children:K.name})]},K.name)),m&&y.jsx("div",{className:"px-3 py-1.5 text-[12px] text-[var(--label-tertiary)] border-t border-[var(--separator)]",children:d("newInstance.truncatedHint")})]})]})}function n8({onClose:n,onCreated:l}){const{t:i}=Be(),[u,s]=b.useState(""),[c,d]=b.useState([]),[h,p]=b.useState(""),[m,v]=b.useState(!0),[x,E]=b.useState(!1),[C,N]=b.useState(null);b.useEffect(()=>{Cf("/api/edges").then(R=>R.json()).then(R=>{if(d(R.edges),R.edges.length>0){p(R.edges[0].edgeId);const j=R.edges[0].homedir;if(j){const z=j.endsWith("/")?j:j+"/";s(z)}}v(!1)}).catch(()=>{v(!1),N(i("newInstance.fetchEdgeError"))})},[]);const w=b.useCallback(R=>{p(R);const j=c.find(z=>z.edgeId===R);if(j!=null&&j.homedir){const z=j.homedir.endsWith("/")?j.homedir:j.homedir+"/";s(z)}},[c]),T=b.useCallback(async()=>{const R=u.trim();if(!(!R||x)){if(!h){N(i("newInstance.noEdgeSelected"));return}E(!0),N(null);try{const j=await Cf("/api/instances",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:R,edgeId:h}),signal:AbortSignal.timeout(2e4)}),z=await j.json();if(!j.ok||!z.instanceId){N(z.error||i("newInstance.requestFailed",{status:j.status})),E(!1);return}l(z.instanceId)}catch(j){const z=j.name==="TimeoutError"?i("newInstance.requestTimeout"):j.message||i("newInstance.networkError");N(z),E(!1)}}},[u,x,h,l]);return y.jsx(_n,{title:y.jsxs(y.Fragment,{children:[y.jsx(hS,{size:16}),y.jsx("span",{children:i("newInstance.title")})]}),onClose:n,children:y.jsxs("div",{className:"px-5 py-4 flex flex-col gap-3",children:[y.jsxs("div",{className:"flex flex-col gap-1.5",children:[y.jsx("label",{className:"text-[13px] text-[var(--label-secondary)]",children:i("newInstance.edgeNode")}),m?y.jsx("div",{className:"text-[13px] text-[var(--label-tertiary)]",children:i("common.loading")}):c.length===0?y.jsx("div",{className:"text-[12px] text-[#ff4245]",children:i("newInstance.noEdges")}):c.length===1?y.jsxs("div",{className:"text-[13px] text-[var(--label-primary)]",children:[c[0].hostname,y.jsxs("span",{className:"text-[var(--label-tertiary)] ml-1.5",children:["(",c[0].edgeId,")"]})]}):y.jsx("select",{value:h,onChange:R=>w(R.target.value),disabled:x,className:"w-full rounded-[10px] px-3 py-2 bg-[var(--fill-tertiary)] border border-[var(--separator)] text-[14px] text-[var(--label-primary)] outline-none focus:border-[var(--color-accent)] transition-colors disabled:opacity-50",children:c.map(R=>y.jsxs("option",{value:R.edgeId,children:[R.hostname," (",R.edgeId,")"]},R.edgeId))})]}),y.jsxs("div",{className:"flex flex-col gap-1.5",children:[y.jsx("label",{className:"text-[13px] text-[var(--label-secondary)]",children:i("newInstance.workingDir")}),y.jsx(t8,{value:u,onChange:s,edgeId:h,disabled:x||m,autoFocus:!m,onSubmit:T})]}),C&&y.jsx("div",{className:"text-[12px] leading-[16px] text-[#ff4245] whitespace-pre-wrap break-words",children:C}),y.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[y.jsx("button",{onClick:n,disabled:x,className:"px-3.5 py-1.5 rounded-[8px] text-[13px] text-[var(--label-secondary)] hover:bg-[var(--fill-tertiary)] transition-colors disabled:opacity-50",children:i("common.cancel")}),y.jsx("button",{onClick:T,disabled:x||!u.trim()||!h,className:"px-3.5 py-1.5 rounded-[8px] text-[13px] font-medium text-white bg-[var(--color-accent)] hover:opacity-90 transition-opacity disabled:opacity-40",children:i(x?"newInstance.creating":"newInstance.create")})]})]})})}function a8({onLogin:n,error:l}){const{t:i}=Be(),[u,s]=b.useState(""),[c,d]=b.useState(!1),[h,p]=b.useState(!1),m=kf(),v=b.useCallback(async x=>{x.preventDefault();const E=u.trim();if(!(!E||c)){d(!0),p(!1);try{if((await fetch("/api/instances",{headers:{Authorization:`Bearer ${E}`}})).status===401){p(!0),d(!1);return}}catch{}d(!1),_2(E),n(E)}},[u,c,n]);return y.jsx("div",{className:"fixed-viewport flex items-center justify-center p-4 overflow-y-auto",children:y.jsxs("form",{onSubmit:v,className:"glass-panel w-full max-w-[380px] p-8 flex flex-col items-center gap-6",children:[y.jsx("img",{src:m,alt:"Paimon",className:"w-16 h-16 select-none",draggable:!1}),y.jsxs("div",{className:"text-center",children:[y.jsx("h1",{className:"text-[17px] font-semibold text-[var(--label-primary)]",children:"Paimon"}),y.jsx("p",{className:"mt-1 text-[13px] text-[var(--label-secondary)]",children:i("login.subtitle")})]}),y.jsxs("div",{className:"w-full",children:[y.jsx("input",{type:"password",value:u,onChange:x=>s(x.target.value),placeholder:i("login.placeholder"),autoFocus:!0,className:`w-full h-9 px-3 rounded-[9px] text-[13px] bg-[var(--fill-primary)] text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] border outline-none transition-colors ${l||h?"border-red-500 focus:border-red-500":"border-[var(--separator)] focus:border-[var(--color-accent)]"}`}),(l||h)&&y.jsx("p",{className:"mt-2 text-[11px] text-red-500",children:i("login.invalidToken")})]}),y.jsx("button",{type:"submit",disabled:!u.trim()||c,className:"w-full h-9 rounded-[1000px] bg-[var(--color-accent)] text-white text-[13px] font-medium transition-opacity disabled:opacity-40 hover:opacity-90 active:opacity-80",children:i(c?"login.verifying":"login.connect")}),y.jsx("p",{className:"text-[11px] text-[var(--label-tertiary)] text-center leading-relaxed",children:y.jsx(H3,{i18nKey:"login.tokenHint",components:{1:y.jsx("code",{className:"px-1 py-0.5 rounded bg-[var(--fill-secondary)] text-[var(--label-secondary)]"})}})})]})})}function l8(){const{pathname:n}=an(),l=n.match(/^\/instance\/(.+)$/);return l?l[1]:null}function i8(){const{t:n}=Be(),{authToken:l,authError:i,handleLogin:u,handleAuthError:s}=M2(),c=Ht(U=>U.connect),d=Ht(U=>U.disconnect),h=Ht(U=>U.subscribe),p=Ht(U=>U.send),m=zi(U=>U.instances),v=zi(U=>U.instanceListReady),x=zi(U=>U.handleMessage),E=ss();R2();const C=l8();b.useEffect(()=>(l?c(l,s):d(),()=>d()),[l,c,d,s]),b.useEffect(()=>h(U=>{(U.type==="instance_list"||U.type==="instance_update")&&x(U)}),[h,x]);const N=b.useCallback(U=>{E(`/instance/${U}`)},[E]),w=b.useRef(new Set),T=b.useCallback(U=>{const X=zi.getState().instances.find(Q=>Q.id===U);if(X&&$i(X.status)){wl(n("sidebar.shutdownBusy"),"warning");return}w.current.add(U),p({type:"shutdown",payload:{instanceId:U}})},[p,n]),[R,j]=b.useState(!1),z=b.useCallback(U=>{j(!1),E(`/instance/${U}`)},[E]);return b.useEffect(()=>{if(!v||!C)return;m.some(X=>X.id===C)||(w.current.has(C)?w.current.delete(C):wl(n("eventStream.instanceNotFound"),"error"),E("/"))},[v,C,m,E,n]),l?y.jsxs("div",{className:"h-[var(--app-viewport-height,100dvh)] w-screen animated-bg flex items-stretch p-2 gap-2 md:p-3 md:gap-3 overflow-hidden pb-[max(0.5rem,env(safe-area-inset-bottom))]",children:[y.jsx("div",{className:"hidden md:flex self-stretch",children:y.jsx(_g,{instances:m,selectedId:C,onSelect:N,onShutdown:T,onNewInstance:()=>j(!0)})}),y.jsx(Jb,{children:y.jsxs(Mi,{element:y.jsx(QA,{}),children:[y.jsx(Mi,{path:"/settings",element:y.jsx(e8,{})}),y.jsx(Mi,{path:"/instance/:id",element:y.jsx($A,{})}),y.jsx(Mi,{path:"*",element:y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"flex-1 md:hidden min-w-0 flex flex-col",children:y.jsx(_g,{instances:m,selectedId:C,onSelect:N,onShutdown:T,onNewInstance:()=>j(!0)})}),y.jsx("div",{className:"hidden md:flex flex-1 min-w-0",children:y.jsx(XA,{})})]})})]})}),R&&y.jsx(n8,{onClose:()=>j(!1),onCreated:z}),y.jsx(SA,{})]}):y.jsx("div",{className:"h-[var(--app-viewport-height,100dvh)] w-screen animated-bg flex items-stretch overflow-hidden",children:y.jsx(a8,{onLogin:u,error:i})})}Qv.createRoot(document.getElementById("root")).render(y.jsx(b2,{children:y.jsx(i8,{})}));
|