43 lines
593 KiB
JavaScript
43 lines
593 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/auth-D_7LuZ3W.js","assets/router-zNjPR4CY.js","assets/use-animation--6lc2CfN.js","assets/icons-DTcdLw9j.js","assets/misc-BwRzHX8c.js","assets/radix-C-ZuImoP.js","assets/utils-DjBw3JGv.js","assets/index-x_t_kdGn.js","assets/progress-C6-hh8fF.js","assets/select-DGqIoF9r.js","assets/switch-Kc2EZ0Ga.js","assets/textarea-8PIujbf-.js","assets/restart-overlay-B44c6hlE.js","assets/system-api-DeeJapvB.js","assets/index-C5U4NsIF.js","assets/skeleton-CXI2IV_v.js","assets/charts-C6WIfXk3.js","assets/badge-CDs67obV.js","assets/expression-reviewer-HNWlEaz6.js","assets/checkbox-DWiVrbnx.js","assets/pagination-DX-kWu7G.js","assets/bot-zehsWfTg.js","assets/parse-BBzU4wsN.js","assets/CodeEditor-4JcGD1og.js","assets/BotInfoSection-D3nfOJyA.js","assets/separator-B_DSOSdz.js","assets/key-value-editor-D1uUqXIn.js","assets/slider-mDhSC-zv.js","assets/popover-DSuRLFDH.js","assets/index-V_LLuoFO.js","assets/ProviderList-4mOft0xL.js","assets/table-DFeDhBY_.js","assets/model-Bpgh3xA9.js","assets/pack-api-NsQx-ed4.js","assets/dnd-BoJ1-vkD.js","assets/prompts-Ck1GtTX1.js","assets/adapter-disabled-CLDOktNC.js","assets/index-Bsbt9db6.js","assets/uppy-S0BLpioz.js","assets/markdown-renderer-CrKRiZ7X.js","assets/markdown-6e5N06bH.js","assets/markdown-renderer-CIHdCL6t.css","assets/index-9nJ1fKRN.css","assets/index-DYRlR_zV.js","assets/person-DaV3zh8d.js","assets/index-P80u2Mbr.js","assets/index-DIOXYKVA.js","assets/reactflow-Bd-f2Ch7.js","assets/index-B5DZHykP.css","assets/knowledge-base-Du35OURl.js","assets/unified-ws-CBnrIqHW.js","assets/logs-bFuaYf8z.js","assets/log-websocket-BnMQh0M3.js","assets/reasoning-process-CrCr8cDD.js","assets/index-B_FHivTS.js","assets/index-BnkN5WGH.js","assets/index-BpTcuomx.js","assets/plugin-stats-Bq_VsOhk.js","assets/installed-CHw5f9lL.js","assets/plugin-detail-C98YfI36.js","assets/model-presets-C1oJlh_V.js","assets/plugin-config-Gj4DzZjP.js","assets/plugin-mirrors-Chrh5WMR.js","assets/mcp-settings-6oaCtDHj.js","assets/index-5HyjKTOp.js","assets/accordion-BDNDahhI.js","assets/pack-market-BOV814Tz.js","assets/pack-detail-BOBdaAtu.js","assets/radio-group-BBkaGEpR.js","assets/webui-feedback-D6Zzxnbw.js","assets/survey-renderer-DVA7Y8cR.js","assets/maibot-feedback-BNwa_tM0.js"])))=>i.map(i=>d[i]);
|
||
import{e as uw,h as fw,r as T,j as y,a as dw,i as Wf,L as hf,k as hw,l as mw,m as pw,n as gw,o as Te,p as De,q as yw,s as vw,O as tb,t as bw}from"./router-zNjPR4CY.js";import{R as Sw}from"./misc-BwRzHX8c.js";import{s as xw,S as Tw,b as nb,V as ww,d as Cw,e as ab,f as Dw,g as Aw,h as Ew,i as Mw,j as ib,k as sb,l as ob,A as rb,m as lb,T as cb,D as ub,n as kw,o as Nw,p as fb,q as Rw,r as jw,t as Ow,v as db,w as Lw,x as hb,y as mb,z as pb,B as gb,E as yb,F as zw,G as Bw,O as vb,a as Uw,C as bb,H as Vw,I as Sb,J as xb,R as Pw,K as _w,L as Hw,M as Fw,N as Iw,Q as Gw,U as Hr,W as qw,X as Kw,Y as Yw,Z as Xw,_ as Qw,$ as Zw,a0 as Tb,a1 as $w,a2 as Ww,a3 as Jw,u as Kg,a4 as eC,P as tC,c as nC,a5 as aC,a6 as iC,a7 as sC,a8 as wb,a9 as Cb,aa as Db,ab as oC}from"./radix-C-ZuImoP.js";import{N as rC,M as lC,O as Qs}from"./utils-DjBw3JGv.js";import{T as Fr,R as cC,H as Jf,B as uC,C as Yg,a as Xg,b as ed,c as Ab,d as fC,L as mf,e as dC,f as hC,A as mC,X as cl,S as Ir,g as pC,h as gC,M as yC,i as vC,j as bC,F as Eb,k as SC,l as xC,m as TC,n as Mb,o as wC,D as CC,p as DC,P as AC,N as EC,q as MC,r as kC,s as NC,t as kb,u as RC,v as jC,w as OC,x as Nb,y as LC,z as zC,E as BC,G as UC,I as VC,J as PC,K as _C,O as HC,Q as FC}from"./icons-DTcdLw9j.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(l){if(l.ep)return;l.ep=!0;const u=s(l);fetch(l.href,u)}})();var Uu={exports:{}},Es={},Vu={exports:{}},Pu={};var Qg;function IC(){return Qg||(Qg=1,(function(n){function a(U,q){var Y=U.length;U.push(q);e:for(;0<Y;){var se=Y-1>>>1,fe=U[se];if(0<l(fe,q))U[se]=q,U[Y]=fe,Y=se;else break e}}function s(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var q=U[0],Y=U.pop();if(Y!==q){U[0]=Y;e:for(var se=0,fe=U.length,de=fe>>>1;se<de;){var ve=2*(se+1)-1,he=U[ve],Fe=ve+1,en=U[Fe];if(0>l(he,Y))Fe<fe&&0>l(en,he)?(U[se]=en,U[Fe]=Y,se=Fe):(U[se]=he,U[ve]=Y,se=ve);else if(Fe<fe&&0>l(en,Y))U[se]=en,U[Fe]=Y,se=Fe;else break e}}return q}function l(U,q){var Y=U.sortIndex-q.sortIndex;return Y!==0?Y:U.id-q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var m=[],g=[],b=1,v=null,x=3,D=!1,w=!1,R=!1,L=!1,M=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function j(U){for(var q=s(g);q!==null;){if(q.callback===null)o(g);else if(q.startTime<=U)o(g),q.sortIndex=q.expirationTime,a(m,q);else break;q=s(g)}}function F(U){if(R=!1,j(U),!w)if(s(m)!==null)w=!0,X||(X=!0,ne());else{var q=s(g);q!==null&&Be(F,q.startTime-U)}}var X=!1,ie=-1,Q=5,G=-1;function I(){return L?!0:!(n.unstable_now()-G<Q)}function ee(){if(L=!1,X){var U=n.unstable_now();G=U;var q=!0;try{e:{w=!1,R&&(R=!1,V(ie),ie=-1),D=!0;var Y=x;try{t:{for(j(U),v=s(m);v!==null&&!(v.expirationTime>U&&I());){var se=v.callback;if(typeof se=="function"){v.callback=null,x=v.priorityLevel;var fe=se(v.expirationTime<=U);if(U=n.unstable_now(),typeof fe=="function"){v.callback=fe,j(U),q=!0;break t}v===s(m)&&o(m),j(U)}else o(m);v=s(m)}if(v!==null)q=!0;else{var de=s(g);de!==null&&Be(F,de.startTime-U),q=!1}}break e}finally{v=null,x=Y,D=!1}q=void 0}}finally{q?ne():X=!1}}}var ne;if(typeof z=="function")ne=function(){z(ee)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ye=le.port2;le.port1.onmessage=ee,ne=function(){ye.postMessage(null)}}else ne=function(){M(ee,0)};function Be(U,q){ie=M(function(){U(n.unstable_now())},q)}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(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(U){switch(x){case 1:case 2:case 3:var q=3;break;default:q=x}var Y=x;x=q;try{return U()}finally{x=Y}},n.unstable_requestPaint=function(){L=!0},n.unstable_runWithPriority=function(U,q){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var Y=x;x=U;try{return q()}finally{x=Y}},n.unstable_scheduleCallback=function(U,q,Y){var se=n.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?se+Y:se):Y=se,U){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=Y+fe,U={id:b++,callback:q,priorityLevel:U,startTime:Y,expirationTime:fe,sortIndex:-1},Y>se?(U.sortIndex=Y,a(g,U),s(m)===null&&U===s(g)&&(R?(V(ie),ie=-1):R=!0,Be(F,Y-se))):(U.sortIndex=fe,a(m,U),w||D||(w=!0,X||(X=!0,ne()))),U},n.unstable_shouldYield=I,n.unstable_wrapCallback=function(U){var q=x;return function(){var Y=x;x=q;try{return U.apply(this,arguments)}finally{x=Y}}}})(Pu)),Pu}var Zg;function GC(){return Zg||(Zg=1,Vu.exports=IC()),Vu.exports}var $g;function qC(){if($g)return Es;$g=1;var n=GC(),a=uw(),s=fw();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}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 l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i: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 m(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,r=t;;){var c=i.return;if(c===null)break;var f=c.alternate;if(f===null){if(r=c.return,r!==null){i=r;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===i)return m(c),e;if(f===r)return m(c),t;f=f.sibling}throw Error(o(188))}if(i.return!==r.return)i=c,r=f;else{for(var p=!1,S=c.child;S;){if(S===i){p=!0,i=c,r=f;break}if(S===r){p=!0,r=c,i=f;break}S=S.sibling}if(!p){for(S=f.child;S;){if(S===i){p=!0,i=f,r=c;break}if(S===r){p=!0,r=f,i=c;break}S=S.sibling}if(!p)throw Error(o(189))}}if(i.alternate!==r)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),z=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function ye(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 R:return"Fragment";case M:return"Profiler";case L:return"StrictMode";case F:return"Suspense";case X:return"SuspenseList";case G:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case z:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case j:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var Be=Array.isArray,U=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},se=[],fe=-1;function de(e){return{current:e}}function ve(e){0>fe||(e.current=se[fe],se[fe]=null,fe--)}function he(e,t){fe++,se[fe]=e.current,e.current=t}var Fe=de(null),en=de(null),Rn=de(null),to=de(null);function no(e,t){switch(he(Rn,t),he(en,e),he(Fe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pg(t),e=gg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ve(Fe),he(Fe,e)}function Ba(){ve(Fe),ve(en),ve(Rn)}function vl(e){e.memoizedState!==null&&he(to,e);var t=Fe.current,i=gg(t,e.type);t!==i&&(he(en,e),he(Fe,i))}function ao(e){en.current===e&&(ve(Fe),ve(en)),to.current===e&&(ve(to),ws._currentValue=Y)}var bl,qd;function la(e){if(bl===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);bl=t&&t[1]||"",qd=-1<i.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+bl+e+qd}var Sl=!1;function xl(e,t){if(!e||Sl)return"";Sl=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(B){var O=B}Reflect.construct(e,[],H)}else{try{H.call()}catch(B){O=B}e.call(H.prototype)}}else{try{throw Error()}catch(B){O=B}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(B){if(B&&O&&typeof B.stack=="string")return[B.stack,O.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=r.DetermineComponentFrameRoot(),p=f[0],S=f[1];if(p&&S){var C=p.split(`
|
||
`),N=S.split(`
|
||
`);for(c=r=0;r<C.length&&!C[r].includes("DetermineComponentFrameRoot");)r++;for(;c<N.length&&!N[c].includes("DetermineComponentFrameRoot");)c++;if(r===C.length||c===N.length)for(r=C.length-1,c=N.length-1;1<=r&&0<=c&&C[r]!==N[c];)c--;for(;1<=r&&0<=c;r--,c--)if(C[r]!==N[c]){if(r!==1||c!==1)do if(r--,c--,0>c||C[r]!==N[c]){var P=`
|
||
`+C[r].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=r&&0<=c);break}}}finally{Sl=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?la(i):""}function Hx(e,t){switch(e.tag){case 26:case 27:case 5:return la(e.type);case 16:return la("Lazy");case 13:return e.child!==t&&t!==null?la("Suspense Fallback"):la("Suspense");case 19:return la("SuspenseList");case 0:case 15:return xl(e.type,!1);case 11:return xl(e.type.render,!1);case 1:return xl(e.type,!0);case 31:return la("Activity");default:return""}}function Kd(e){try{var t="",i=null;do t+=Hx(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
|
||
Error generating stack: `+r.message+`
|
||
`+r.stack}}var Tl=Object.prototype.hasOwnProperty,wl=n.unstable_scheduleCallback,Cl=n.unstable_cancelCallback,Fx=n.unstable_shouldYield,Ix=n.unstable_requestPaint,Tt=n.unstable_now,Gx=n.unstable_getCurrentPriorityLevel,Yd=n.unstable_ImmediatePriority,Xd=n.unstable_UserBlockingPriority,io=n.unstable_NormalPriority,qx=n.unstable_LowPriority,Qd=n.unstable_IdlePriority,Kx=n.log,Yx=n.unstable_setDisableYieldValue,zi=null,wt=null;function jn(e){if(typeof Kx=="function"&&Yx(e),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(zi,e)}catch{}}var Ct=Math.clz32?Math.clz32:Zx,Xx=Math.log,Qx=Math.LN2;function Zx(e){return e>>>=0,e===0?32:31-(Xx(e)/Qx|0)|0}var so=256,oo=262144,ro=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 lo(e,t,i){var r=e.pendingLanes;if(r===0)return 0;var c=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~f,r!==0?c=ca(r):(p&=S,p!==0?c=ca(p):i||(i=S&~e,i!==0&&(c=ca(i))))):(S=r&~f,S!==0?c=ca(S):p!==0?c=ca(p):i||(i=r&~e,i!==0&&(c=ca(i)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,i=t&-t,f>=i||f===32&&(i&4194048)!==0)?t:c}function Bi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $x(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 Zd(){var e=ro;return ro<<=1,(ro&62914560)===0&&(ro=4194304),e}function Dl(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Ui(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wx(e,t,i,r,c,f){var p=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var S=e.entanglements,C=e.expirationTimes,N=e.hiddenUpdates;for(i=p&~i;0<i;){var P=31-Ct(i),H=1<<P;S[P]=0,C[P]=-1;var O=N[P];if(O!==null)for(N[P]=null,P=0;P<O.length;P++){var B=O[P];B!==null&&(B.lane&=-536870913)}i&=~H}r!==0&&$d(e,r,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~t))}function $d(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ct(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function Wd(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-Ct(i),c=1<<r;c&t|e[r]&t&&(e[r]|=t),i&=~c}}function Jd(e,t){var i=t&-t;return i=(i&42)!==0?1:Al(i),(i&(e.suspendedLanes|t))!==0?0:i}function Al(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 El(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function eh(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:Pg(e.type))}function th(e,t){var i=q.p;try{return q.p=e,t()}finally{q.p=i}}var On=Math.random().toString(36).slice(2),nt="__reactFiber$"+On,pt="__reactProps$"+On,Ua="__reactContainer$"+On,Ml="__reactEvents$"+On,Jx="__reactListeners$"+On,eT="__reactHandles$"+On,nh="__reactResources$"+On,Vi="__reactMarker$"+On;function kl(e){delete e[nt],delete e[pt],delete e[Ml],delete e[Jx],delete e[eT]}function Va(e){var t=e[nt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ua]||i[nt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=wg(e);e!==null;){if(i=e[nt])return i;e=wg(e)}return t}e=i,i=e.parentNode}return null}function Pa(e){if(e=e[nt]||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 Pi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function _a(e){var t=e[nh];return t||(t=e[nh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Vi]=!0}var ah=new Set,ih={};function ua(e,t){Ha(e,t),Ha(e+"Capture",t)}function Ha(e,t){for(ih[e]=t,e=0;e<t.length;e++)ah.add(t[e])}var tT=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]*$"),sh={},oh={};function nT(e){return Tl.call(oh,e)?!0:Tl.call(sh,e)?!1:tT.test(e)?oh[e]=!0:(sh[e]=!0,!1)}function co(e,t,i){if(nT(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){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,""+i)}}function uo(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function dn(e,t,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+r)}}function Lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aT(e,t,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(p){i=""+p,f.call(this,p)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(p){i=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nl(e){if(!e._valueTracker){var t=rh(e)?"checked":"value";e._valueTracker=aT(e,t,""+e[t])}}function lh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=rh(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function fo(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 iT=/[\n"\\]/g;function zt(e){return e.replace(iT,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Rl(e,t,i,r,c,f,p,S){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Lt(t)):e.value!==""+Lt(t)&&(e.value=""+Lt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?jl(e,p,Lt(t)):i!=null?jl(e,p,Lt(i)):r!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Lt(S):e.removeAttribute("name")}function ch(e,t,i,r,c,f,p,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){Nl(e);return}i=i!=null?""+Lt(i):"",t=t!=null?""+Lt(t):i,S||t===e.value||(e.value=t),e.defaultValue=t}r=r??c,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),Nl(e)}function jl(e,t,i){t==="number"&&fo(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Fa(e,t,i,r){if(e=e.options,t){t={};for(var c=0;c<i.length;c++)t["$"+i[c]]=!0;for(i=0;i<e.length;i++)c=t.hasOwnProperty("$"+e[i].value),e[i].selected!==c&&(e[i].selected=c),c&&r&&(e[i].defaultSelected=!0)}else{for(i=""+Lt(i),t=null,c=0;c<e.length;c++){if(e[c].value===i){e[c].selected=!0,r&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function uh(e,t,i){if(t!=null&&(t=""+Lt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Lt(i):""}function fh(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(o(92));if(Be(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=Lt(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),Nl(e)}function Ia(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var sT=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 dh(e,t,i){var r=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,i):typeof i!="number"||i===0||sT.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function hh(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var c in t)r=t[c],t.hasOwnProperty(c)&&i[c]!==r&&dh(e,c,r)}else for(var f in t)t.hasOwnProperty(f)&&dh(e,f,t[f])}function Ol(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 oT=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"]]),rT=/^[\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 ho(e){return rT.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function hn(){}var Ll=null;function zl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ga=null,qa=null;function mh(e){var t=Pa(e);if(t&&(e=t.stateNode)){var i=e[pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Rl(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+zt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var c=r[pt]||null;if(!c)throw Error(o(90));Rl(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<i.length;t++)r=i[t],r.form===e.form&&lh(r)}break e;case"textarea":uh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Fa(e,!!i.multiple,t,!1)}}}var Bl=!1;function ph(e,t,i){if(Bl)return e(t,i);Bl=!0;try{var r=e(t);return r}finally{if(Bl=!1,(Ga!==null||qa!==null)&&(er(),Ga&&(t=Ga,e=qa,qa=Ga=null,mh(t),e)))for(t=0;t<e.length;t++)mh(e[t])}}function _i(e,t){var i=e.stateNode;if(i===null)return null;var r=i[pt]||null;if(r===null)return null;i=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(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ul=!1;if(mn)try{var Hi={};Object.defineProperty(Hi,"passive",{get:function(){Ul=!0}}),window.addEventListener("test",Hi,Hi),window.removeEventListener("test",Hi,Hi)}catch{Ul=!1}var Ln=null,Vl=null,mo=null;function gh(){if(mo)return mo;var e,t=Vl,i=t.length,r,c="value"in Ln?Ln.value:Ln.textContent,f=c.length;for(e=0;e<i&&t[e]===c[e];e++);var p=i-e;for(r=1;r<=p&&t[i-r]===c[f-r];r++);return mo=c.slice(e,1<r?1-r:void 0)}function po(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 go(){return!0}function yh(){return!1}function gt(e){function t(i,r,c,f,p){this._reactName=i,this._targetInst=c,this.type=r,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(i=e[S],this[S]=i?i(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?go:yh,this.isPropagationStopped=yh,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=go)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=go)},persist:function(){},isPersistent:go}),t}var fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yo=gt(fa),Fi=v({},fa,{view:0,detail:0}),lT=gt(Fi),Pl,_l,Ii,vo=v({},Fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fl,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!==Ii&&(Ii&&e.type==="mousemove"?(Pl=e.screenX-Ii.screenX,_l=e.screenY-Ii.screenY):_l=Pl=0,Ii=e),Pl)},movementY:function(e){return"movementY"in e?e.movementY:_l}}),vh=gt(vo),cT=v({},vo,{dataTransfer:0}),uT=gt(cT),fT=v({},Fi,{relatedTarget:0}),Hl=gt(fT),dT=v({},fa,{animationName:0,elapsedTime:0,pseudoElement:0}),hT=gt(dT),mT=v({},fa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pT=gt(mT),gT=v({},fa,{data:0}),bh=gt(gT),yT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vT={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"},bT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ST(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bT[e])?!!t[e]:!1}function Fl(){return ST}var xT=v({},Fi,{key:function(e){if(e.key){var t=yT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=po(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fl,charCode:function(e){return e.type==="keypress"?po(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?po(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TT=gt(xT),wT=v({},vo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sh=gt(wT),CT=v({},Fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fl}),DT=gt(CT),AT=v({},fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),ET=gt(AT),MT=v({},vo,{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}),kT=gt(MT),NT=v({},fa,{newState:0,oldState:0}),RT=gt(NT),jT=[9,13,27,32],Il=mn&&"CompositionEvent"in window,Gi=null;mn&&"documentMode"in document&&(Gi=document.documentMode);var OT=mn&&"TextEvent"in window&&!Gi,xh=mn&&(!Il||Gi&&8<Gi&&11>=Gi),Th=" ",wh=!1;function Ch(e,t){switch(e){case"keyup":return jT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function LT(e,t){switch(e){case"compositionend":return Dh(t);case"keypress":return t.which!==32?null:(wh=!0,Th);case"textInput":return e=t.data,e===Th&&wh?null:e;default:return null}}function zT(e,t){if(Ka)return e==="compositionend"||!Il&&Ch(e,t)?(e=gh(),mo=Vl=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 xh&&t.locale!=="ko"?null:t.data;default:return null}}var BT={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 Ah(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!BT[e.type]:t==="textarea"}function Eh(e,t,i,r){Ga?qa?qa.push(r):qa=[r]:Ga=r,t=rr(t,"onChange"),0<t.length&&(i=new yo("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var qi=null,Ki=null;function UT(e){cg(e,0)}function bo(e){var t=Pi(e);if(lh(t))return e}function Mh(e,t){if(e==="change")return t}var kh=!1;if(mn){var Gl;if(mn){var ql="oninput"in document;if(!ql){var Nh=document.createElement("div");Nh.setAttribute("oninput","return;"),ql=typeof Nh.oninput=="function"}Gl=ql}else Gl=!1;kh=Gl&&(!document.documentMode||9<document.documentMode)}function Rh(){qi&&(qi.detachEvent("onpropertychange",jh),Ki=qi=null)}function jh(e){if(e.propertyName==="value"&&bo(Ki)){var t=[];Eh(t,Ki,e,zl(e)),ph(UT,t)}}function VT(e,t,i){e==="focusin"?(Rh(),qi=t,Ki=i,qi.attachEvent("onpropertychange",jh)):e==="focusout"&&Rh()}function PT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bo(Ki)}function _T(e,t){if(e==="click")return bo(t)}function HT(e,t){if(e==="input"||e==="change")return bo(t)}function FT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:FT;function Yi(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var c=i[r];if(!Tl.call(t,c)||!Dt(e[c],t[c]))return!1}return!0}function Oh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lh(e,t){var i=Oh(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=t&&r>=t)return{node:i,offset:t-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Oh(i)}}function zh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fo(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=fo(e.document)}return t}function Kl(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 IT=mn&&"documentMode"in document&&11>=document.documentMode,Ya=null,Yl=null,Xi=null,Xl=!1;function Uh(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Xl||Ya==null||Ya!==fo(r)||(r=Ya,"selectionStart"in r&&Kl(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}),Xi&&Yi(Xi,r)||(Xi=r,r=rr(Yl,"onSelect"),0<r.length&&(t=new yo("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=Ya)))}function da(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Xa={animationend:da("Animation","AnimationEnd"),animationiteration:da("Animation","AnimationIteration"),animationstart:da("Animation","AnimationStart"),transitionrun:da("Transition","TransitionRun"),transitionstart:da("Transition","TransitionStart"),transitioncancel:da("Transition","TransitionCancel"),transitionend:da("Transition","TransitionEnd")},Ql={},Vh={};mn&&(Vh=document.createElement("div").style,"AnimationEvent"in window||(delete Xa.animationend.animation,delete Xa.animationiteration.animation,delete Xa.animationstart.animation),"TransitionEvent"in window||delete Xa.transitionend.transition);function ha(e){if(Ql[e])return Ql[e];if(!Xa[e])return e;var t=Xa[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Vh)return Ql[e]=t[i];return e}var Ph=ha("animationend"),_h=ha("animationiteration"),Hh=ha("animationstart"),GT=ha("transitionrun"),qT=ha("transitionstart"),KT=ha("transitioncancel"),Fh=ha("transitionend"),Ih=new Map,Zl="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(" ");Zl.push("scrollEnd");function Xt(e,t){Ih.set(e,t),ua(t,[e])}var So=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)},Bt=[],Qa=0,$l=0;function xo(){for(var e=Qa,t=$l=Qa=0;t<e;){var i=Bt[t];Bt[t++]=null;var r=Bt[t];Bt[t++]=null;var c=Bt[t];Bt[t++]=null;var f=Bt[t];if(Bt[t++]=null,r!==null&&c!==null){var p=r.pending;p===null?c.next=c:(c.next=p.next,p.next=c),r.pending=c}f!==0&&Gh(i,c,f)}}function To(e,t,i,r){Bt[Qa++]=e,Bt[Qa++]=t,Bt[Qa++]=i,Bt[Qa++]=r,$l|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Wl(e,t,i,r){return To(e,t,i,r),wo(e)}function ma(e,t){return To(e,null,null,t),wo(e)}function Gh(e,t,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var c=!1,f=e.return;f!==null;)f.childLanes|=i,r=f.alternate,r!==null&&(r.childLanes|=i),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-Ct(i),e=f.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=i|536870912),f):null}function wo(e){if(50<gs)throw gs=0,ru=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Za={};function YT(e,t,i,r){this.tag=e,this.key=i,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 At(e,t,i,r){return new YT(e,t,i,r)}function Jl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pn(e,t){var i=e.alternate;return i===null?(i=At(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function qh(e,t){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Co(e,t,i,r,c,f){var p=0;if(r=e,typeof e=="function")Jl(e)&&(p=1);else if(typeof e=="string")p=W1(e,i,Fe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case G:return e=At(31,i,t,c),e.elementType=G,e.lanes=f,e;case R:return pa(i.children,c,f,t);case L:p=8,c|=24;break;case M:return e=At(12,i,t,c|2),e.elementType=M,e.lanes=f,e;case F:return e=At(13,i,t,c),e.elementType=F,e.lanes=f,e;case X:return e=At(19,i,t,c),e.elementType=X,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:p=10;break e;case V:p=9;break e;case j:p=11;break e;case ie:p=14;break e;case Q:p=16,r=null;break e}p=29,i=Error(o(130,e===null?"null":typeof e,"")),r=null}return t=At(p,i,t,c),t.elementType=e,t.type=r,t.lanes=f,t}function pa(e,t,i,r){return e=At(7,e,r,t),e.lanes=i,e}function ec(e,t,i){return e=At(6,e,null,t),e.lanes=i,e}function Kh(e){var t=At(18,null,null,0);return t.stateNode=e,t}function tc(e,t,i){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yh=new WeakMap;function Ut(e,t){if(typeof e=="object"&&e!==null){var i=Yh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Kd(t)},Yh.set(e,t),t)}return{value:e,source:t,stack:Kd(t)}}var $a=[],Wa=0,Do=null,Qi=0,Vt=[],Pt=0,zn=null,tn=1,nn="";function gn(e,t){$a[Wa++]=Qi,$a[Wa++]=Do,Do=e,Qi=t}function Xh(e,t,i){Vt[Pt++]=tn,Vt[Pt++]=nn,Vt[Pt++]=zn,zn=e;var r=tn;e=nn;var c=32-Ct(r)-1;r&=~(1<<c),i+=1;var f=32-Ct(t)+c;if(30<f){var p=c-c%5;f=(r&(1<<p)-1).toString(32),r>>=p,c-=p,tn=1<<32-Ct(t)+c|i<<c|r,nn=f+e}else tn=1<<f|i<<c|r,nn=e}function nc(e){e.return!==null&&(gn(e,1),Xh(e,1,0))}function ac(e){for(;e===Do;)Do=$a[--Wa],$a[Wa]=null,Qi=$a[--Wa],$a[Wa]=null;for(;e===zn;)zn=Vt[--Pt],Vt[Pt]=null,nn=Vt[--Pt],Vt[Pt]=null,tn=Vt[--Pt],Vt[Pt]=null}function Qh(e,t){Vt[Pt++]=tn,Vt[Pt++]=nn,Vt[Pt++]=zn,tn=t.id,nn=t.overflow,zn=e}var at=null,Oe=null,ge=!1,Bn=null,_t=!1,ic=Error(o(519));function Un(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zi(Ut(t,e)),ic}function Zh(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[nt]=e,t[pt]=r,i){case"dialog":ue("cancel",t),ue("close",t);break;case"iframe":case"object":case"embed":ue("load",t);break;case"video":case"audio":for(i=0;i<vs.length;i++)ue(vs[i],t);break;case"source":ue("error",t);break;case"img":case"image":case"link":ue("error",t),ue("load",t);break;case"details":ue("toggle",t);break;case"input":ue("invalid",t),ch(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ue("invalid",t);break;case"textarea":ue("invalid",t),fh(t,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||r.suppressHydrationWarning===!0||hg(t.textContent,i)?(r.popover!=null&&(ue("beforetoggle",t),ue("toggle",t)),r.onScroll!=null&&ue("scroll",t),r.onScrollEnd!=null&&ue("scrollend",t),r.onClick!=null&&(t.onclick=hn),t=!0):t=!1,t||Un(e,!0)}function $h(e){for(at=e.return;at;)switch(at.tag){case 5:case 31:case 13:_t=!1;return;case 27:case 3:_t=!0;return;default:at=at.return}}function Ja(e){if(e!==at)return!1;if(!ge)return $h(e),ge=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Tu(e.type,e.memoizedProps)),i=!i),i&&Oe&&Un(e),$h(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Oe=Tg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Oe=Tg(e)}else t===27?(t=Oe,$n(e.type)?(e=Eu,Eu=null,Oe=e):Oe=t):Oe=at?Ft(e.stateNode.nextSibling):null;return!0}function ga(){Oe=at=null,ge=!1}function sc(){var e=Bn;return e!==null&&(St===null?St=e:St.push.apply(St,e),Bn=null),e}function Zi(e){Bn===null?Bn=[e]:Bn.push(e)}var oc=de(null),ya=null,yn=null;function Vn(e,t,i){he(oc,t._currentValue),t._currentValue=i}function vn(e){e._currentValue=oc.current,ve(oc)}function rc(e,t,i){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===i)break;e=e.return}}function lc(e,t,i,r){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var p=c.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=c;for(var C=0;C<t.length;C++)if(S.context===t[C]){f.lanes|=i,S=f.alternate,S!==null&&(S.lanes|=i),rc(f.return,i,e),r||(p=null);break e}f=S.next}}else if(c.tag===18){if(p=c.return,p===null)throw Error(o(341));p.lanes|=i,f=p.alternate,f!==null&&(f.lanes|=i),rc(p,i,e),p=null}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===e){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}}function ei(e,t,i,r){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var p=c.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var S=c.type;Dt(c.pendingProps.value,p.value)||(e!==null?e.push(S):e=[S])}}else if(c===to.current){if(p=c.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ws):e=[ws])}c=c.return}e!==null&&lc(t,e,i,r),t.flags|=262144}function Ao(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function va(e){ya=e,yn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function it(e){return Wh(ya,e)}function Eo(e,t){return ya===null&&va(e),Wh(e,t)}function Wh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},yn===null){if(e===null)throw Error(o(308));yn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else yn=yn.next=t;return i}var XT=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},QT=n.unstable_scheduleCallback,ZT=n.unstable_NormalPriority,qe={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cc(){return{controller:new XT,data:new Map,refCount:0}}function $i(e){e.refCount--,e.refCount===0&&QT(ZT,function(){e.controller.abort()})}var Wi=null,uc=0,ti=0,ni=null;function $T(e,t){if(Wi===null){var i=Wi=[];uc=0,ti=hu(),ni={status:"pending",value:void 0,then:function(r){i.push(r)}}}return uc++,t.then(Jh,Jh),t}function Jh(){if(--uc===0&&Wi!==null){ni!==null&&(ni.status="fulfilled");var e=Wi;Wi=null,ti=0,ni=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function WT(e,t){var i=[],r={status:"pending",value:null,reason:null,then:function(c){i.push(c)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var c=0;c<i.length;c++)(0,i[c])(t)},function(c){for(r.status="rejected",r.reason=c,c=0;c<i.length;c++)(0,i[c])(void 0)}),r}var em=U.S;U.S=function(e,t){Up=Tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&$T(e,t),em!==null&&em(e,t)};var ba=de(null);function fc(){var e=ba.current;return e!==null?e:je.pooledCache}function Mo(e,t){t===null?he(ba,ba.current):he(ba,t.pool)}function tm(){var e=fc();return e===null?null:{parent:qe._currentValue,pool:e}}var ai=Error(o(460)),dc=Error(o(474)),ko=Error(o(542)),No={then:function(){}};function nm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function am(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(hn,hn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sm(e),e;default:if(typeof t.status=="string")t.then(hn,hn);else{if(e=je,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sm(e),e}throw xa=t,ai}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(xa=i,ai):i}}var xa=null;function im(){if(xa===null)throw Error(o(459));var e=xa;return xa=null,e}function sm(e){if(e===ai||e===ko)throw Error(o(483))}var ii=null,Ji=0;function Ro(e){var t=Ji;return Ji+=1,ii===null&&(ii=[]),am(ii,e,t)}function es(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function jo(e,t){throw t.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function om(e){function t(E,A){if(e){var k=E.deletions;k===null?(E.deletions=[A],E.flags|=16):k.push(A)}}function i(E,A){if(!e)return null;for(;A!==null;)t(E,A),A=A.sibling;return null}function r(E){for(var A=new Map;E!==null;)E.key!==null?A.set(E.key,E):A.set(E.index,E),E=E.sibling;return A}function c(E,A){return E=pn(E,A),E.index=0,E.sibling=null,E}function f(E,A,k){return E.index=k,e?(k=E.alternate,k!==null?(k=k.index,k<A?(E.flags|=67108866,A):k):(E.flags|=67108866,A)):(E.flags|=1048576,A)}function p(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function S(E,A,k,_){return A===null||A.tag!==6?(A=ec(k,E.mode,_),A.return=E,A):(A=c(A,k),A.return=E,A)}function C(E,A,k,_){var J=k.type;return J===R?P(E,A,k.props.children,_,k.key):A!==null&&(A.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Q&&Sa(J)===A.type)?(A=c(A,k.props),es(A,k),A.return=E,A):(A=Co(k.type,k.key,k.props,null,E.mode,_),es(A,k),A.return=E,A)}function N(E,A,k,_){return A===null||A.tag!==4||A.stateNode.containerInfo!==k.containerInfo||A.stateNode.implementation!==k.implementation?(A=tc(k,E.mode,_),A.return=E,A):(A=c(A,k.children||[]),A.return=E,A)}function P(E,A,k,_,J){return A===null||A.tag!==7?(A=pa(k,E.mode,_,J),A.return=E,A):(A=c(A,k),A.return=E,A)}function H(E,A,k){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=ec(""+A,E.mode,k),A.return=E,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case D:return k=Co(A.type,A.key,A.props,null,E.mode,k),es(k,A),k.return=E,k;case w:return A=tc(A,E.mode,k),A.return=E,A;case Q:return A=Sa(A),H(E,A,k)}if(Be(A)||ne(A))return A=pa(A,E.mode,k,null),A.return=E,A;if(typeof A.then=="function")return H(E,Ro(A),k);if(A.$$typeof===z)return H(E,Eo(E,A),k);jo(E,A)}return null}function O(E,A,k,_){var J=A!==null?A.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return J!==null?null:S(E,A,""+k,_);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case D:return k.key===J?C(E,A,k,_):null;case w:return k.key===J?N(E,A,k,_):null;case Q:return k=Sa(k),O(E,A,k,_)}if(Be(k)||ne(k))return J!==null?null:P(E,A,k,_,null);if(typeof k.then=="function")return O(E,A,Ro(k),_);if(k.$$typeof===z)return O(E,A,Eo(E,k),_);jo(E,k)}return null}function B(E,A,k,_,J){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return E=E.get(k)||null,S(A,E,""+_,J);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case D:return E=E.get(_.key===null?k:_.key)||null,C(A,E,_,J);case w:return E=E.get(_.key===null?k:_.key)||null,N(A,E,_,J);case Q:return _=Sa(_),B(E,A,k,_,J)}if(Be(_)||ne(_))return E=E.get(k)||null,P(A,E,_,J,null);if(typeof _.then=="function")return B(E,A,k,Ro(_),J);if(_.$$typeof===z)return B(E,A,k,Eo(A,_),J);jo(A,_)}return null}function Z(E,A,k,_){for(var J=null,be=null,W=A,re=A=0,pe=null;W!==null&&re<k.length;re++){W.index>re?(pe=W,W=null):pe=W.sibling;var Se=O(E,W,k[re],_);if(Se===null){W===null&&(W=pe);break}e&&W&&Se.alternate===null&&t(E,W),A=f(Se,A,re),be===null?J=Se:be.sibling=Se,be=Se,W=pe}if(re===k.length)return i(E,W),ge&&gn(E,re),J;if(W===null){for(;re<k.length;re++)W=H(E,k[re],_),W!==null&&(A=f(W,A,re),be===null?J=W:be.sibling=W,be=W);return ge&&gn(E,re),J}for(W=r(W);re<k.length;re++)pe=B(W,E,re,k[re],_),pe!==null&&(e&&pe.alternate!==null&&W.delete(pe.key===null?re:pe.key),A=f(pe,A,re),be===null?J=pe:be.sibling=pe,be=pe);return e&&W.forEach(function(na){return t(E,na)}),ge&&gn(E,re),J}function te(E,A,k,_){if(k==null)throw Error(o(151));for(var J=null,be=null,W=A,re=A=0,pe=null,Se=k.next();W!==null&&!Se.done;re++,Se=k.next()){W.index>re?(pe=W,W=null):pe=W.sibling;var na=O(E,W,Se.value,_);if(na===null){W===null&&(W=pe);break}e&&W&&na.alternate===null&&t(E,W),A=f(na,A,re),be===null?J=na:be.sibling=na,be=na,W=pe}if(Se.done)return i(E,W),ge&&gn(E,re),J;if(W===null){for(;!Se.done;re++,Se=k.next())Se=H(E,Se.value,_),Se!==null&&(A=f(Se,A,re),be===null?J=Se:be.sibling=Se,be=Se);return ge&&gn(E,re),J}for(W=r(W);!Se.done;re++,Se=k.next())Se=B(W,E,re,Se.value,_),Se!==null&&(e&&Se.alternate!==null&&W.delete(Se.key===null?re:Se.key),A=f(Se,A,re),be===null?J=Se:be.sibling=Se,be=Se);return e&&W.forEach(function(cw){return t(E,cw)}),ge&&gn(E,re),J}function ke(E,A,k,_){if(typeof k=="object"&&k!==null&&k.type===R&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case D:e:{for(var J=k.key;A!==null;){if(A.key===J){if(J=k.type,J===R){if(A.tag===7){i(E,A.sibling),_=c(A,k.props.children),_.return=E,E=_;break e}}else if(A.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Q&&Sa(J)===A.type){i(E,A.sibling),_=c(A,k.props),es(_,k),_.return=E,E=_;break e}i(E,A);break}else t(E,A);A=A.sibling}k.type===R?(_=pa(k.props.children,E.mode,_,k.key),_.return=E,E=_):(_=Co(k.type,k.key,k.props,null,E.mode,_),es(_,k),_.return=E,E=_)}return p(E);case w:e:{for(J=k.key;A!==null;){if(A.key===J)if(A.tag===4&&A.stateNode.containerInfo===k.containerInfo&&A.stateNode.implementation===k.implementation){i(E,A.sibling),_=c(A,k.children||[]),_.return=E,E=_;break e}else{i(E,A);break}else t(E,A);A=A.sibling}_=tc(k,E.mode,_),_.return=E,E=_}return p(E);case Q:return k=Sa(k),ke(E,A,k,_)}if(Be(k))return Z(E,A,k,_);if(ne(k)){if(J=ne(k),typeof J!="function")throw Error(o(150));return k=J.call(k),te(E,A,k,_)}if(typeof k.then=="function")return ke(E,A,Ro(k),_);if(k.$$typeof===z)return ke(E,A,Eo(E,k),_);jo(E,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,A!==null&&A.tag===6?(i(E,A.sibling),_=c(A,k),_.return=E,E=_):(i(E,A),_=ec(k,E.mode,_),_.return=E,E=_),p(E)):i(E,A)}return function(E,A,k,_){try{Ji=0;var J=ke(E,A,k,_);return ii=null,J}catch(W){if(W===ai||W===ko)throw W;var be=At(29,W,null,E.mode);return be.lanes=_,be.return=E,be}}}var Ta=om(!0),rm=om(!1),Pn=!1;function hc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mc(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 _n(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Hn(e,t,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(xe&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=wo(e),Gh(e,null,i),t}return To(e,r,t,i),wo(e)}function ts(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Wd(e,i)}}function pc(e,t){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var p={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?c=f=p:f=f.next=p,i=i.next}while(i!==null);f===null?c=f=t:f=f.next=t}else c=f=t;i={baseState:r.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var gc=!1;function ns(){if(gc){var e=ni;if(e!==null)throw e}}function as(e,t,i,r){gc=!1;var c=e.updateQueue;Pn=!1;var f=c.firstBaseUpdate,p=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var C=S,N=C.next;C.next=null,p===null?f=N:p.next=N,p=C;var P=e.alternate;P!==null&&(P=P.updateQueue,S=P.lastBaseUpdate,S!==p&&(S===null?P.firstBaseUpdate=N:S.next=N,P.lastBaseUpdate=C))}if(f!==null){var H=c.baseState;p=0,P=N=C=null,S=f;do{var O=S.lane&-536870913,B=O!==S.lane;if(B?(me&O)===O:(r&O)===O){O!==0&&O===ti&&(gc=!0),P!==null&&(P=P.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var Z=e,te=S;O=t;var ke=i;switch(te.tag){case 1:if(Z=te.payload,typeof Z=="function"){H=Z.call(ke,H,O);break e}H=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=te.payload,O=typeof Z=="function"?Z.call(ke,H,O):Z,O==null)break e;H=v({},H,O);break e;case 2:Pn=!0}}O=S.callback,O!==null&&(e.flags|=64,B&&(e.flags|=8192),B=c.callbacks,B===null?c.callbacks=[O]:B.push(O))}else B={lane:O,tag:S.tag,payload:S.payload,callback:S.callback,next:null},P===null?(N=P=B,C=H):P=P.next=B,p|=O;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;B=S,S=B.next,B.next=null,c.lastBaseUpdate=B,c.shared.pending=null}}while(!0);P===null&&(C=H),c.baseState=C,c.firstBaseUpdate=N,c.lastBaseUpdate=P,f===null&&(c.shared.lanes=0),Kn|=p,e.lanes=p,e.memoizedState=H}}function lm(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function cm(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)lm(i[e],t)}var si=de(null),Oo=de(0);function um(e,t){e=En,he(Oo,e),he(si,t),En=e|t.baseLanes}function yc(){he(Oo,En),he(si,si.current)}function vc(){En=Oo.current,ve(si),ve(Oo)}var Et=de(null),Ht=null;function Fn(e){var t=e.alternate;he(Ie,Ie.current&1),he(Et,e),Ht===null&&(t===null||si.current!==null||t.memoizedState!==null)&&(Ht=e)}function bc(e){he(Ie,Ie.current),he(Et,e),Ht===null&&(Ht=e)}function fm(e){e.tag===22?(he(Ie,Ie.current),he(Et,e),Ht===null&&(Ht=e)):In()}function In(){he(Ie,Ie.current),he(Et,Et.current)}function Mt(e){ve(Et),Ht===e&&(Ht=null),ve(Ie)}var Ie=de(0);function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Du(i)||Au(i)))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 bn=0,oe=null,Ee=null,Ke=null,zo=!1,oi=!1,wa=!1,Bo=0,is=0,ri=null,JT=0;function Ve(){throw Error(o(321))}function Sc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Dt(e[i],t[i]))return!1;return!0}function xc(e,t,i,r,c,f){return bn=f,oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Xm:Bc,wa=!1,f=i(r,c),wa=!1,oi&&(f=hm(t,i,r,c)),dm(e),f}function dm(e){U.H=rs;var t=Ee!==null&&Ee.next!==null;if(bn=0,Ke=Ee=oe=null,zo=!1,is=0,ri=null,t)throw Error(o(300));e===null||Ye||(e=e.dependencies,e!==null&&Ao(e)&&(Ye=!0))}function hm(e,t,i,r){oe=e;var c=0;do{if(oi&&(ri=null),is=0,oi=!1,25<=c)throw Error(o(301));if(c+=1,Ke=Ee=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=Qm,f=t(i,r)}while(oi);return f}function e1(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?ss(t):t,e=e.useState()[0],(Ee!==null?Ee.memoizedState:null)!==e&&(oe.flags|=1024),t}function Tc(){var e=Bo!==0;return Bo=0,e}function wc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Cc(e){if(zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zo=!1}bn=0,Ke=Ee=oe=null,oi=!1,is=Bo=0,ri=null}function ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?oe.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function Ge(){if(Ee===null){var e=oe.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=Ke===null?oe.memoizedState:Ke.next;if(t!==null)Ke=t,Ee=e;else{if(e===null)throw oe.alternate===null?Error(o(467)):Error(o(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Ke===null?oe.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(e){var t=is;return is+=1,ri===null&&(ri=[]),e=am(ri,e,t),t=oe,(Ke===null?t.memoizedState:Ke.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Xm:Bc),e}function Vo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ss(e);if(e.$$typeof===z)return it(e)}throw Error(o(438,String(e)))}function Dc(e){var t=null,i=oe.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=oe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Uo(),oe.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),r=0;r<e;r++)i[r]=I;return t.index++,i}function Sn(e,t){return typeof t=="function"?t(e):t}function Po(e){var t=Ge();return Ac(t,Ee,e)}function Ac(e,t,i){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=i;var c=e.baseQueue,f=r.pending;if(f!==null){if(c!==null){var p=c.next;c.next=f.next,f.next=p}t.baseQueue=c=f,r.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var S=p=null,C=null,N=t,P=!1;do{var H=N.lane&-536870913;if(H!==N.lane?(me&H)===H:(bn&H)===H){var O=N.revertLane;if(O===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),H===ti&&(P=!0);else if((bn&O)===O){N=N.next,O===ti&&(P=!0);continue}else H={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(S=C=H,p=f):C=C.next=H,oe.lanes|=O,Kn|=O;H=N.action,wa&&i(f,H),f=N.hasEagerState?N.eagerState:i(f,H)}else O={lane:H,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(S=C=O,p=f):C=C.next=O,oe.lanes|=H,Kn|=H;N=N.next}while(N!==null&&N!==t);if(C===null?p=f:C.next=S,!Dt(f,e.memoizedState)&&(Ye=!0,P&&(i=ni,i!==null)))throw i;e.memoizedState=f,e.baseState=p,e.baseQueue=C,r.lastRenderedState=f}return c===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ec(e){var t=Ge(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var r=i.dispatch,c=i.pending,f=t.memoizedState;if(c!==null){i.pending=null;var p=c=c.next;do f=e(f,p.action),p=p.next;while(p!==c);Dt(f,t.memoizedState)||(Ye=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),i.lastRenderedState=f}return[f,r]}function mm(e,t,i){var r=oe,c=Ge(),f=ge;if(f){if(i===void 0)throw Error(o(407));i=i()}else i=t();var p=!Dt((Ee||c).memoizedState,i);if(p&&(c.memoizedState=i,Ye=!0),c=c.queue,Nc(ym.bind(null,r,c,e),[e]),c.getSnapshot!==t||p||Ke!==null&&Ke.memoizedState.tag&1){if(r.flags|=2048,li(9,{destroy:void 0},gm.bind(null,r,c,i,t),null),je===null)throw Error(o(349));f||(bn&127)!==0||pm(r,t,i)}return i}function pm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=oe.updateQueue,t===null?(t=Uo(),oe.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function gm(e,t,i,r){t.value=i,t.getSnapshot=r,vm(t)&&bm(e)}function ym(e,t,i){return i(function(){vm(t)&&bm(e)})}function vm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Dt(e,i)}catch{return!0}}function bm(e){var t=ma(e,2);t!==null&&xt(t,e,2)}function Mc(e){var t=ft();if(typeof e=="function"){var i=e;if(e=i(),wa){jn(!0);try{i()}finally{jn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sn,lastRenderedState:e},t}function Sm(e,t,i,r){return e.baseState=i,Ac(e,Ee,typeof r=="function"?r:Sn)}function t1(e,t,i,r,c){if(Fo(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};U.T!==null?i(!0):f.isTransition=!1,r(f),i=t.pending,i===null?(f.next=t.pending=f,xm(t,f)):(f.next=i.next,t.pending=i.next=f)}}function xm(e,t){var i=t.action,r=t.payload,c=e.state;if(t.isTransition){var f=U.T,p={};U.T=p;try{var S=i(c,r),C=U.S;C!==null&&C(p,S),Tm(e,t,S)}catch(N){kc(e,t,N)}finally{f!==null&&p.types!==null&&(f.types=p.types),U.T=f}}else try{f=i(c,r),Tm(e,t,f)}catch(N){kc(e,t,N)}}function Tm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){wm(e,t,r)},function(r){return kc(e,t,r)}):wm(e,t,i)}function wm(e,t,i){t.status="fulfilled",t.value=i,Cm(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,xm(e,i)))}function kc(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,Cm(t),t=t.next;while(t!==r)}e.action=null}function Cm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dm(e,t){return t}function Am(e,t){if(ge){var i=je.formState;if(i!==null){e:{var r=oe;if(ge){if(Oe){t:{for(var c=Oe,f=_t;c.nodeType!==8;){if(!f){c=null;break t}if(c=Ft(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){Oe=Ft(c.nextSibling),r=c.data==="F!";break e}}Un(r)}r=!1}r&&(t=i[0])}}return i=ft(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dm,lastRenderedState:t},i.queue=r,i=qm.bind(null,oe,r),r.dispatch=i,r=Mc(!1),f=zc.bind(null,oe,!1,r.queue),r=ft(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,i=t1.bind(null,oe,c,f,i),c.dispatch=i,r.memoizedState=e,[t,i,!1]}function Em(e){var t=Ge();return Mm(t,Ee,e)}function Mm(e,t,i){if(t=Ac(e,t,Dm)[0],e=Po(Sn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ss(t)}catch(p){throw p===ai?ko:p}else r=t;t=Ge();var c=t.queue,f=c.dispatch;return i!==t.memoizedState&&(oe.flags|=2048,li(9,{destroy:void 0},n1.bind(null,c,i),null)),[r,f,e]}function n1(e,t){e.action=t}function km(e){var t=Ge(),i=Ee;if(i!==null)return Mm(t,i,e);Ge(),t=t.memoizedState,i=Ge();var r=i.queue.dispatch;return i.memoizedState=e,[t,r,!1]}function li(e,t,i,r){return e={tag:e,create:i,deps:r,inst:t,next:null},t=oe.updateQueue,t===null&&(t=Uo(),oe.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,t.lastEffect=e),e}function Nm(){return Ge().memoizedState}function _o(e,t,i,r){var c=ft();oe.flags|=e,c.memoizedState=li(1|t,{destroy:void 0},i,r===void 0?null:r)}function Ho(e,t,i,r){var c=Ge();r=r===void 0?null:r;var f=c.memoizedState.inst;Ee!==null&&r!==null&&Sc(r,Ee.memoizedState.deps)?c.memoizedState=li(t,f,i,r):(oe.flags|=e,c.memoizedState=li(1|t,f,i,r))}function Rm(e,t){_o(8390656,8,e,t)}function Nc(e,t){Ho(2048,8,e,t)}function a1(e){oe.flags|=4;var t=oe.updateQueue;if(t===null)t=Uo(),oe.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function jm(e){var t=Ge().memoizedState;return a1({ref:t,nextImpl:e}),function(){if((xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Om(e,t){return Ho(4,2,e,t)}function Lm(e,t){return Ho(4,4,e,t)}function zm(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bm(e,t,i){i=i!=null?i.concat([e]):null,Ho(4,4,zm.bind(null,t,e),i)}function Rc(){}function Um(e,t){var i=Ge();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&Sc(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function Vm(e,t){var i=Ge();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&Sc(t,r[1]))return r[0];if(r=e(),wa){jn(!0);try{e()}finally{jn(!1)}}return i.memoizedState=[r,t],r}function jc(e,t,i){return i===void 0||(bn&1073741824)!==0&&(me&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Pp(),oe.lanes|=e,Kn|=e,i)}function Pm(e,t,i,r){return Dt(i,t)?i:si.current!==null?(e=jc(e,i,r),Dt(e,t)||(Ye=!0),e):(bn&42)===0||(bn&1073741824)!==0&&(me&261930)===0?(Ye=!0,e.memoizedState=i):(e=Pp(),oe.lanes|=e,Kn|=e,t)}function _m(e,t,i,r,c){var f=q.p;q.p=f!==0&&8>f?f:8;var p=U.T,S={};U.T=S,zc(e,!1,t,i);try{var C=c(),N=U.S;if(N!==null&&N(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var P=WT(C,r);os(e,t,P,Rt(e))}else os(e,t,r,Rt(e))}catch(H){os(e,t,{then:function(){},status:"rejected",reason:H},Rt())}finally{q.p=f,p!==null&&S.types!==null&&(p.types=S.types),U.T=p}}function i1(){}function Oc(e,t,i,r){if(e.tag!==5)throw Error(o(476));var c=Hm(e).queue;_m(e,c,t,Y,i===null?i1:function(){return Fm(e),i(r)})}function Hm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sn,lastRenderedState:Y},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fm(e){var t=Hm(e);t.next===null&&(t=e.alternate.memoizedState),os(e,t.next.queue,{},Rt())}function Lc(){return it(ws)}function Im(){return Ge().memoizedState}function Gm(){return Ge().memoizedState}function s1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Rt();e=_n(i);var r=Hn(t,e,i);r!==null&&(xt(r,t,i),ts(r,t,i)),t={cache:cc()},e.payload=t;return}t=t.return}}function o1(e,t,i){var r=Rt();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Fo(e)?Km(t,i):(i=Wl(e,t,i,r),i!==null&&(xt(i,e,r),Ym(i,t,r)))}function qm(e,t,i){var r=Rt();os(e,t,i,r)}function os(e,t,i,r){var c={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Fo(e))Km(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var p=t.lastRenderedState,S=f(p,i);if(c.hasEagerState=!0,c.eagerState=S,Dt(S,p))return To(e,t,c,0),je===null&&xo(),!1}catch{}if(i=Wl(e,t,c,r),i!==null)return xt(i,e,r),Ym(i,t,r),!0}return!1}function zc(e,t,i,r){if(r={lane:2,revertLane:hu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fo(e)){if(t)throw Error(o(479))}else t=Wl(e,i,r,2),t!==null&&xt(t,e,2)}function Fo(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function Km(e,t){oi=zo=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Ym(e,t,i){if((i&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Wd(e,i)}}var rs={readContext:it,use:Vo,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve};rs.useEffectEvent=Ve;var Xm={readContext:it,use:Vo,useCallback:function(e,t){return ft().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:Rm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,_o(4194308,4,zm.bind(null,t,e),i)},useLayoutEffect:function(e,t){return _o(4194308,4,e,t)},useInsertionEffect:function(e,t){_o(4,2,e,t)},useMemo:function(e,t){var i=ft();t=t===void 0?null:t;var r=e();if(wa){jn(!0);try{e()}finally{jn(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=ft();if(i!==void 0){var c=i(t);if(wa){jn(!0);try{i(t)}finally{jn(!1)}}}else c=t;return r.memoizedState=r.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},r.queue=e,e=e.dispatch=o1.bind(null,oe,e),[r.memoizedState,e]},useRef:function(e){var t=ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Mc(e);var t=e.queue,i=qm.bind(null,oe,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Rc,useDeferredValue:function(e,t){var i=ft();return jc(i,e,t)},useTransition:function(){var e=Mc(!1);return e=_m.bind(null,oe,e.queue,!0,!1),ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=oe,c=ft();if(ge){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),je===null)throw Error(o(349));(me&127)!==0||pm(r,t,i)}c.memoizedState=i;var f={value:i,getSnapshot:t};return c.queue=f,Rm(ym.bind(null,r,f,e),[e]),r.flags|=2048,li(9,{destroy:void 0},gm.bind(null,r,f,i,t),null),i},useId:function(){var e=ft(),t=je.identifierPrefix;if(ge){var i=nn,r=tn;i=(r&~(1<<32-Ct(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Bo++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=JT++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lc,useFormState:Am,useActionState:Am,useOptimistic:function(e){var t=ft();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=zc.bind(null,oe,!0,i),i.dispatch=t,[e,t]},useMemoCache:Dc,useCacheRefresh:function(){return ft().memoizedState=s1.bind(null,oe)},useEffectEvent:function(e){var t=ft(),i={impl:e};return t.memoizedState=i,function(){if((xe&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Bc={readContext:it,use:Vo,useCallback:Um,useContext:it,useEffect:Nc,useImperativeHandle:Bm,useInsertionEffect:Om,useLayoutEffect:Lm,useMemo:Vm,useReducer:Po,useRef:Nm,useState:function(){return Po(Sn)},useDebugValue:Rc,useDeferredValue:function(e,t){var i=Ge();return Pm(i,Ee.memoizedState,e,t)},useTransition:function(){var e=Po(Sn)[0],t=Ge().memoizedState;return[typeof e=="boolean"?e:ss(e),t]},useSyncExternalStore:mm,useId:Im,useHostTransitionStatus:Lc,useFormState:Em,useActionState:Em,useOptimistic:function(e,t){var i=Ge();return Sm(i,Ee,e,t)},useMemoCache:Dc,useCacheRefresh:Gm};Bc.useEffectEvent=jm;var Qm={readContext:it,use:Vo,useCallback:Um,useContext:it,useEffect:Nc,useImperativeHandle:Bm,useInsertionEffect:Om,useLayoutEffect:Lm,useMemo:Vm,useReducer:Ec,useRef:Nm,useState:function(){return Ec(Sn)},useDebugValue:Rc,useDeferredValue:function(e,t){var i=Ge();return Ee===null?jc(i,e,t):Pm(i,Ee.memoizedState,e,t)},useTransition:function(){var e=Ec(Sn)[0],t=Ge().memoizedState;return[typeof e=="boolean"?e:ss(e),t]},useSyncExternalStore:mm,useId:Im,useHostTransitionStatus:Lc,useFormState:km,useActionState:km,useOptimistic:function(e,t){var i=Ge();return Ee!==null?Sm(i,Ee,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Dc,useCacheRefresh:Gm};Qm.useEffectEvent=jm;function Uc(e,t,i,r){t=e.memoizedState,i=i(r,t),i=i==null?t:v({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Vc={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=Rt(),c=_n(r);c.payload=t,i!=null&&(c.callback=i),t=Hn(e,c,r),t!==null&&(xt(t,e,r),ts(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=Rt(),c=_n(r);c.tag=1,c.payload=t,i!=null&&(c.callback=i),t=Hn(e,c,r),t!==null&&(xt(t,e,r),ts(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Rt(),r=_n(i);r.tag=2,t!=null&&(r.callback=t),t=Hn(e,r,i),t!==null&&(xt(t,e,i),ts(t,e,i))}};function Zm(e,t,i,r,c,f,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,f,p):t.prototype&&t.prototype.isPureReactComponent?!Yi(i,r)||!Yi(c,f):!0}function $m(e,t,i,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,r),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function Ca(e,t){var i=t;if("ref"in t){i={};for(var r in t)r!=="ref"&&(i[r]=t[r])}if(e=e.defaultProps){i===t&&(i=v({},i));for(var c in e)i[c]===void 0&&(i[c]=e[c])}return i}function Wm(e){So(e)}function Jm(e){console.error(e)}function ep(e){So(e)}function Io(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function tp(e,t,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Pc(e,t,i){return i=_n(i),i.tag=3,i.payload={element:null},i.callback=function(){Io(e,t)},i}function np(e){return e=_n(e),e.tag=3,e}function ap(e,t,i,r){var c=i.type.getDerivedStateFromError;if(typeof c=="function"){var f=r.value;e.payload=function(){return c(f)},e.callback=function(){tp(t,i,r)}}var p=i.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){tp(t,i,r),typeof c!="function"&&(Yn===null?Yn=new Set([this]):Yn.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function r1(e,t,i,r,c){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=i.alternate,t!==null&&ei(t,i,c,!0),i=Et.current,i!==null){switch(i.tag){case 31:case 13:return Ht===null?tr():i.alternate===null&&Pe===0&&(Pe=3),i.flags&=-257,i.flags|=65536,i.lanes=c,r===No?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([r]):t.add(r),uu(e,r,c)),!1;case 22:return i.flags|=65536,r===No?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([r]):i.add(r)),uu(e,r,c)),!1}throw Error(o(435,i.tag))}return uu(e,r,c),tr(),!1}if(ge)return t=Et.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==ic&&(e=Error(o(422),{cause:r}),Zi(Ut(e,i)))):(r!==ic&&(t=Error(o(423),{cause:r}),Zi(Ut(t,i))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=Ut(r,i),c=Pc(e.stateNode,r,c),pc(e,c),Pe!==4&&(Pe=2)),!1;var f=Error(o(520),{cause:r});if(f=Ut(f,i),ps===null?ps=[f]:ps.push(f),Pe!==4&&(Pe=2),t===null)return!0;r=Ut(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=c&-c,i.lanes|=e,e=Pc(i.stateNode,r,e),pc(i,e),!1;case 1:if(t=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Yn===null||!Yn.has(f))))return i.flags|=65536,c&=-c,i.lanes|=c,c=np(c),ap(c,e,i,r),pc(i,c),!1}i=i.return}while(i!==null);return!1}var _c=Error(o(461)),Ye=!1;function st(e,t,i,r){t.child=e===null?rm(t,null,i,r):Ta(t,e.child,i,r)}function ip(e,t,i,r,c){i=i.render;var f=t.ref;if("ref"in r){var p={};for(var S in r)S!=="ref"&&(p[S]=r[S])}else p=r;return va(t),r=xc(e,t,i,p,f,c),S=Tc(),e!==null&&!Ye?(wc(e,t,c),xn(e,t,c)):(ge&&S&&nc(t),t.flags|=1,st(e,t,r,c),t.child)}function sp(e,t,i,r,c){if(e===null){var f=i.type;return typeof f=="function"&&!Jl(f)&&f.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=f,op(e,t,f,r,c)):(e=Co(i.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Xc(e,c)){var p=f.memoizedProps;if(i=i.compare,i=i!==null?i:Yi,i(p,r)&&e.ref===t.ref)return xn(e,t,c)}return t.flags|=1,e=pn(f,r),e.ref=t.ref,e.return=t,t.child=e}function op(e,t,i,r,c){if(e!==null){var f=e.memoizedProps;if(Yi(f,r)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=r=f,Xc(e,c))(e.flags&131072)!==0&&(Ye=!0);else return t.lanes=e.lanes,xn(e,t,c)}return Hc(e,t,i,r,c)}function rp(e,t,i,r){var c=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|i:i,e!==null){for(r=t.child=e.child,c=0;r!==null;)c=c|r.lanes|r.childLanes,r=r.sibling;r=c&~f}else r=0,t.child=null;return lp(e,t,f,i,r)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Mo(t,f!==null?f.cachePool:null),f!==null?um(t,f):yc(),fm(t);else return r=t.lanes=536870912,lp(e,t,f!==null?f.baseLanes|i:i,i,r)}else f!==null?(Mo(t,f.cachePool),um(t,f),In(),t.memoizedState=null):(e!==null&&Mo(t,null),yc(),In());return st(e,t,c,i),t.child}function ls(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lp(e,t,i,r,c){var f=fc();return f=f===null?null:{parent:qe._currentValue,pool:f},t.memoizedState={baseLanes:i,cachePool:f},e!==null&&Mo(t,null),yc(),fm(t),e!==null&&ei(e,t,r,!0),t.childLanes=c,null}function Go(e,t){return t=Ko({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cp(e,t,i){return Ta(t,e.child,null,i),e=Go(t,t.pendingProps),e.flags|=2,Mt(t),t.memoizedState=null,e}function l1(e,t,i){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ge){if(r.mode==="hidden")return e=Go(t,r),t.lanes=536870912,ls(null,e);if(bc(t),(e=Oe)?(e=xg(e,_t),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zn!==null?{id:tn,overflow:nn}:null,retryLane:536870912,hydrationErrors:null},i=Kh(e),i.return=t,t.child=i,at=t,Oe=null)):e=null,e===null)throw Un(t);return t.lanes=536870912,null}return Go(t,r)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(bc(t),c)if(t.flags&256)t.flags&=-257,t=cp(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ye||ei(e,t,i,!1),c=(i&e.childLanes)!==0,Ye||c){if(r=je,r!==null&&(p=Jd(r,i),p!==0&&p!==f.retryLane))throw f.retryLane=p,ma(e,p),xt(r,e,p),_c;tr(),t=cp(e,t,i)}else e=f.treeContext,Oe=Ft(p.nextSibling),at=t,ge=!0,Bn=null,_t=!1,e!==null&&Qh(t,e),t=Go(t,r),t.flags|=4096;return t}return e=pn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qo(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Hc(e,t,i,r,c){return va(t),i=xc(e,t,i,r,void 0,c),r=Tc(),e!==null&&!Ye?(wc(e,t,c),xn(e,t,c)):(ge&&r&&nc(t),t.flags|=1,st(e,t,i,c),t.child)}function up(e,t,i,r,c,f){return va(t),t.updateQueue=null,i=hm(t,r,i,c),dm(e),r=Tc(),e!==null&&!Ye?(wc(e,t,f),xn(e,t,f)):(ge&&r&&nc(t),t.flags|=1,st(e,t,i,f),t.child)}function fp(e,t,i,r,c){if(va(t),t.stateNode===null){var f=Za,p=i.contextType;typeof p=="object"&&p!==null&&(f=it(p)),f=new i(r,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Vc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=r,f.state=t.memoizedState,f.refs={},hc(t),p=i.contextType,f.context=typeof p=="object"&&p!==null?it(p):Za,f.state=t.memoizedState,p=i.getDerivedStateFromProps,typeof p=="function"&&(Uc(t,i,p,r),f.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(p=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&Vc.enqueueReplaceState(f,f.state,null),as(t,r,f,c),ns(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,C=Ca(i,S);f.props=C;var N=f.context,P=i.contextType;p=Za,typeof P=="object"&&P!==null&&(p=it(P));var H=i.getDerivedStateFromProps;P=typeof H=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,P||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||N!==p)&&$m(t,f,r,p),Pn=!1;var O=t.memoizedState;f.state=O,as(t,r,f,c),ns(),N=t.memoizedState,S||O!==N||Pn?(typeof H=="function"&&(Uc(t,i,H,r),N=t.memoizedState),(C=Pn||Zm(t,i,C,r,O,N,p))?(P||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=N),f.props=r,f.state=N,f.context=p,r=C):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{f=t.stateNode,mc(e,t),p=t.memoizedProps,P=Ca(i,p),f.props=P,H=t.pendingProps,O=f.context,N=i.contextType,C=Za,typeof N=="object"&&N!==null&&(C=it(N)),S=i.getDerivedStateFromProps,(N=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(p!==H||O!==C)&&$m(t,f,r,C),Pn=!1,O=t.memoizedState,f.state=O,as(t,r,f,c),ns();var B=t.memoizedState;p!==H||O!==B||Pn||e!==null&&e.dependencies!==null&&Ao(e.dependencies)?(typeof S=="function"&&(Uc(t,i,S,r),B=t.memoizedState),(P=Pn||Zm(t,i,P,r,O,B,C)||e!==null&&e.dependencies!==null&&Ao(e.dependencies))?(N||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,B,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,B,C)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=B),f.props=r,f.state=B,f.context=C,r=P):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),r=!1)}return f=r,qo(e,t),r=(t.flags&128)!==0,f||r?(f=t.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&r?(t.child=Ta(t,e.child,null,c),t.child=Ta(t,null,i,c)):st(e,t,i,c),t.memoizedState=f.state,e=t.child):e=xn(e,t,c),e}function dp(e,t,i,r){return ga(),t.flags|=256,st(e,t,i,r),t.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ic(e){return{baseLanes:e,cachePool:tm()}}function Gc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Nt),e}function hp(e,t,i){var r=t.pendingProps,c=!1,f=(t.flags&128)!==0,p;if((p=f)||(p=e!==null&&e.memoizedState===null?!1:(Ie.current&2)!==0),p&&(c=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(ge){if(c?Fn(t):In(),(e=Oe)?(e=xg(e,_t),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zn!==null?{id:tn,overflow:nn}:null,retryLane:536870912,hydrationErrors:null},i=Kh(e),i.return=t,t.child=i,at=t,Oe=null)):e=null,e===null)throw Un(t);return Au(e)?t.lanes=32:t.lanes=536870912,null}var S=r.children;return r=r.fallback,c?(In(),c=t.mode,S=Ko({mode:"hidden",children:S},c),r=pa(r,c,i,null),S.return=t,r.return=t,S.sibling=r,t.child=S,r=t.child,r.memoizedState=Ic(i),r.childLanes=Gc(e,p,i),t.memoizedState=Fc,ls(null,r)):(Fn(t),qc(t,S))}var C=e.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(f)t.flags&256?(Fn(t),t.flags&=-257,t=Kc(e,t,i)):t.memoizedState!==null?(In(),t.child=e.child,t.flags|=128,t=null):(In(),S=r.fallback,c=t.mode,r=Ko({mode:"visible",children:r.children},c),S=pa(S,c,i,null),S.flags|=2,r.return=t,S.return=t,r.sibling=S,t.child=r,Ta(t,e.child,null,i),r=t.child,r.memoizedState=Ic(i),r.childLanes=Gc(e,p,i),t.memoizedState=Fc,t=ls(null,r));else if(Fn(t),Au(S)){if(p=S.nextSibling&&S.nextSibling.dataset,p)var N=p.dgst;p=N,r=Error(o(419)),r.stack="",r.digest=p,Zi({value:r,source:null,stack:null}),t=Kc(e,t,i)}else if(Ye||ei(e,t,i,!1),p=(i&e.childLanes)!==0,Ye||p){if(p=je,p!==null&&(r=Jd(p,i),r!==0&&r!==C.retryLane))throw C.retryLane=r,ma(e,r),xt(p,e,r),_c;Du(S)||tr(),t=Kc(e,t,i)}else Du(S)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,Oe=Ft(S.nextSibling),at=t,ge=!0,Bn=null,_t=!1,e!==null&&Qh(t,e),t=qc(t,r.children),t.flags|=4096);return t}return c?(In(),S=r.fallback,c=t.mode,C=e.child,N=C.sibling,r=pn(C,{mode:"hidden",children:r.children}),r.subtreeFlags=C.subtreeFlags&65011712,N!==null?S=pn(N,S):(S=pa(S,c,i,null),S.flags|=2),S.return=t,r.return=t,r.sibling=S,t.child=r,ls(null,r),r=t.child,S=e.child.memoizedState,S===null?S=Ic(i):(c=S.cachePool,c!==null?(C=qe._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=tm(),S={baseLanes:S.baseLanes|i,cachePool:c}),r.memoizedState=S,r.childLanes=Gc(e,p,i),t.memoizedState=Fc,ls(e.child,r)):(Fn(t),i=e.child,e=i.sibling,i=pn(i,{mode:"visible",children:r.children}),i.return=t,i.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=i,t.memoizedState=null,i)}function qc(e,t){return t=Ko({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ko(e,t){return e=At(22,e,null,t),e.lanes=0,e}function Kc(e,t,i){return Ta(t,e.child,null,i),e=qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mp(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),rc(e.return,t,i)}function Yc(e,t,i,r,c,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:c,treeForkCount:f}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=r,p.tail=i,p.tailMode=c,p.treeForkCount=f)}function pp(e,t,i){var r=t.pendingProps,c=r.revealOrder,f=r.tail;r=r.children;var p=Ie.current,S=(p&2)!==0;if(S?(p=p&1|2,t.flags|=128):p&=1,he(Ie,p),st(e,t,r,i),r=ge?Qi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mp(e,i,t);else if(e.tag===19)mp(e,i,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(c){case"forwards":for(i=t.child,c=null;i!==null;)e=i.alternate,e!==null&&Lo(e)===null&&(c=i),i=i.sibling;i=c,i===null?(c=t.child,t.child=null):(c=i.sibling,i.sibling=null),Yc(t,!1,c,i,f,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Lo(e)===null){t.child=c;break}e=c.sibling,c.sibling=i,i=c,c=e}Yc(t,!0,i,null,f,r);break;case"together":Yc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function xn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Kn|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ei(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,i=pn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=pn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Xc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ao(e)))}function c1(e,t,i){switch(t.tag){case 3:no(t,t.stateNode.containerInfo),Vn(t,qe,e.memoizedState.cache),ga();break;case 27:case 5:vl(t);break;case 4:no(t,t.stateNode.containerInfo);break;case 10:Vn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,bc(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Fn(t),t.flags|=128,null):(i&t.child.childLanes)!==0?hp(e,t,i):(Fn(t),e=xn(e,t,i),e!==null?e.sibling:null);Fn(t);break;case 19:var c=(e.flags&128)!==0;if(r=(i&t.childLanes)!==0,r||(ei(e,t,i,!1),r=(i&t.childLanes)!==0),c){if(r)return pp(e,t,i);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),he(Ie,Ie.current),r)break;return null;case 22:return t.lanes=0,rp(e,t,i,t.pendingProps);case 24:Vn(t,qe,e.memoizedState.cache)}return xn(e,t,i)}function gp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ye=!0;else{if(!Xc(e,i)&&(t.flags&128)===0)return Ye=!1,c1(e,t,i);Ye=(e.flags&131072)!==0}else Ye=!1,ge&&(t.flags&1048576)!==0&&Xh(t,Qi,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")Jl(e)?(r=Ca(e,r),t.tag=1,t=fp(null,t,e,r,i)):(t.tag=0,t=Hc(null,t,e,r,i));else{if(e!=null){var c=e.$$typeof;if(c===j){t.tag=11,t=ip(null,t,e,r,i);break e}else if(c===ie){t.tag=14,t=sp(null,t,e,r,i);break e}}throw t=ye(e)||e,Error(o(306,t,""))}}return t;case 0:return Hc(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,c=Ca(r,t.pendingProps),fp(e,t,r,c,i);case 3:e:{if(no(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var f=t.memoizedState;c=f.element,mc(e,t),as(t,r,null,i);var p=t.memoizedState;if(r=p.cache,Vn(t,qe,r),r!==f.cache&&lc(t,[qe],i,!0),ns(),r=p.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=dp(e,t,r,i);break e}else if(r!==c){c=Ut(Error(o(424)),t),Zi(c),t=dp(e,t,r,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Oe=Ft(e.firstChild),at=t,ge=!0,Bn=null,_t=!0,i=rm(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ga(),r===c){t=xn(e,t,i);break e}st(e,t,r,i)}t=t.child}return t;case 26:return qo(e,t),e===null?(i=Eg(t.type,null,t.pendingProps,null))?t.memoizedState=i:ge||(i=t.type,e=t.pendingProps,r=lr(Rn.current).createElement(i),r[nt]=t,r[pt]=e,ot(r,i,e),et(r),t.stateNode=r):t.memoizedState=Eg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return vl(t),e===null&&ge&&(r=t.stateNode=Cg(t.type,t.pendingProps,Rn.current),at=t,_t=!0,c=Oe,$n(t.type)?(Eu=c,Oe=Ft(r.firstChild)):Oe=c),st(e,t,t.pendingProps.children,i),qo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ge&&((c=r=Oe)&&(r=P1(r,t.type,t.pendingProps,_t),r!==null?(t.stateNode=r,at=t,Oe=Ft(r.firstChild),_t=!1,c=!0):c=!1),c||Un(t)),vl(t),c=t.type,f=t.pendingProps,p=e!==null?e.memoizedProps:null,r=f.children,Tu(c,f)?r=null:p!==null&&Tu(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=xc(e,t,e1,null,null,i),ws._currentValue=c),qo(e,t),st(e,t,r,i),t.child;case 6:return e===null&&ge&&((e=i=Oe)&&(i=_1(i,t.pendingProps,_t),i!==null?(t.stateNode=i,at=t,Oe=null,e=!0):e=!1),e||Un(t)),null;case 13:return hp(e,t,i);case 4:return no(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ta(t,null,r,i):st(e,t,r,i),t.child;case 11:return ip(e,t,t.type,t.pendingProps,i);case 7:return st(e,t,t.pendingProps,i),t.child;case 8:return st(e,t,t.pendingProps.children,i),t.child;case 12:return st(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,Vn(t,t.type,r.value),st(e,t,r.children,i),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,va(t),c=it(c),r=r(c),t.flags|=1,st(e,t,r,i),t.child;case 14:return sp(e,t,t.type,t.pendingProps,i);case 15:return op(e,t,t.type,t.pendingProps,i);case 19:return pp(e,t,i);case 31:return l1(e,t,i);case 22:return rp(e,t,i,t.pendingProps);case 24:return va(t),r=it(qe),e===null?(c=fc(),c===null&&(c=je,f=cc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=i),c=f),t.memoizedState={parent:r,cache:c},hc(t),Vn(t,qe,c)):((e.lanes&i)!==0&&(mc(e,t),as(t,null,null,i),ns()),c=e.memoizedState,f=t.memoizedState,c.parent!==r?(c={parent:r,cache:r},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Vn(t,qe,r)):(r=f.cache,Vn(t,qe,r),r!==c.cache&&lc(t,[qe],i,!0))),st(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Tn(e){e.flags|=4}function Qc(e,t,i,r,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Ip())e.flags|=8192;else throw xa=No,dc}else e.flags&=-16777217}function yp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jg(t))if(Ip())e.flags|=8192;else throw xa=No,dc}function Yo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Zd():536870912,e.lanes|=t,di|=t)}function cs(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(t)for(var c=e.child;c!==null;)i|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)i|=c.lanes|c.childLanes,r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=r,e.childLanes=i,t}function u1(e,t,i){var r=t.pendingProps;switch(ac(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Le(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),vn(qe),Ba(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?Tn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sc())),Le(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Tn(t),f!==null?(Le(t),yp(t,f)):(Le(t),Qc(t,c,null,r,i))):f?f!==e.memoizedState?(Tn(t),Le(t),yp(t,f)):(Le(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Tn(t),Le(t),Qc(t,c,e,r,i)),null;case 27:if(ao(t),i=Rn.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Le(t),null}e=Fe.current,Ja(t)?Zh(t):(e=Cg(c,r,i),t.stateNode=e,Tn(t))}return Le(t),null;case 5:if(ao(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Le(t),null}if(f=Fe.current,Ja(t))Zh(t);else{var p=lr(Rn.current);switch(f){case 1:f=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=p.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?p.createElement("select",{is:r.is}):p.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?p.createElement(c,{is:r.is}):p.createElement(c)}}f[nt]=t,f[pt]=r;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=f;e:switch(ot(f,c,r),c){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Tn(t)}}return Le(t),Qc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Tn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=Rn.current,Ja(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,c=at,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[nt]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||hg(e.nodeValue,i)),e||Un(t,!0)}else e=lr(e).createTextNode(r),e[nt]=t,t.stateNode=e}return Le(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ja(t),i!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[nt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),e=!1}else i=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Mt(t),t):(Mt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Le(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[nt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),c=!1}else c=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Mt(t),t):(Mt(t),null)}return Mt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=t.child,c=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(c=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==c&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Yo(t,t.updateQueue),Le(t),null);case 4:return Ba(),e===null&&yu(t.stateNode.containerInfo),Le(t),null;case 10:return vn(t.type),Le(t),null;case 19:if(ve(Ie),r=t.memoizedState,r===null)return Le(t),null;if(c=(t.flags&128)!==0,f=r.rendering,f===null)if(c)cs(r,!1);else{if(Pe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Lo(e),f!==null){for(t.flags|=128,cs(r,!1),e=f.updateQueue,t.updateQueue=e,Yo(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)qh(i,e),i=i.sibling;return he(Ie,Ie.current&1|2),ge&&gn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Tt()>Wo&&(t.flags|=128,c=!0,cs(r,!1),t.lanes=4194304)}else{if(!c)if(e=Lo(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Yo(t,e),cs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!ge)return Le(t),null}else 2*Tt()-r.renderingStartTime>Wo&&i!==536870912&&(t.flags|=128,c=!0,cs(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=Tt(),e.sibling=null,i=Ie.current,he(Ie,c?i&1|2:i&1),ge&&gn(t,r.treeForkCount),e):(Le(t),null);case 22:case 23:return Mt(t),vc(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(i&536870912)!==0&&(t.flags&128)===0&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),i=t.updateQueue,i!==null&&Yo(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==i&&(t.flags|=2048),e!==null&&ve(ba),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),vn(qe),Le(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function f1(e,t){switch(ac(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vn(qe),Ba(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ao(t),null;case 31:if(t.memoizedState!==null){if(Mt(t),t.alternate===null)throw Error(o(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(Ie),null;case 4:return Ba(),null;case 10:return vn(t.type),null;case 22:case 23:return Mt(t),vc(),e!==null&&ve(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return vn(qe),null;case 25:return null;default:return null}}function vp(e,t){switch(ac(t),t.tag){case 3:vn(qe),Ba();break;case 26:case 27:case 5:ao(t);break;case 4:Ba();break;case 31:t.memoizedState!==null&&Mt(t);break;case 13:Mt(t);break;case 19:ve(Ie);break;case 10:vn(t.type);break;case 22:case 23:Mt(t),vc(),e!==null&&ve(ba);break;case 24:vn(qe)}}function us(e,t){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var c=r.next;i=c;do{if((i.tag&e)===e){r=void 0;var f=i.create,p=i.inst;r=f(),p.destroy=r}i=i.next}while(i!==c)}}catch(S){Ce(t,t.return,S)}}function Gn(e,t,i){try{var r=t.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var f=c.next;r=f;do{if((r.tag&e)===e){var p=r.inst,S=p.destroy;if(S!==void 0){p.destroy=void 0,c=t;var C=i,N=S;try{N()}catch(P){Ce(c,C,P)}}}r=r.next}while(r!==f)}}catch(P){Ce(t,t.return,P)}}function bp(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{cm(t,i)}catch(r){Ce(e,e.return,r)}}}function Sp(e,t,i){i.props=Ca(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Ce(e,t,r)}}function fs(e,t){try{var i=e.ref;if(i!==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 i=="function"?e.refCleanup=i(r):i.current=r}}catch(c){Ce(e,t,c)}}function an(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(c){Ce(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(c){Ce(e,t,c)}else i.current=null}function xp(e){var t=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(c){Ce(e,e.return,c)}}function Zc(e,t,i){try{var r=e.stateNode;O1(r,e.type,i,t),r[pt]=t}catch(c){Ce(e,e.return,c)}}function Tp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$n(e.type)||e.tag===4}function $c(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tp(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&&$n(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 Wc(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=hn));else if(r!==4&&(r===27&&$n(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Wc(e,t,i),e=e.sibling;e!==null;)Wc(e,t,i),e=e.sibling}function Xo(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(r!==4&&(r===27&&$n(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Xo(e,t,i),e=e.sibling;e!==null;)Xo(e,t,i),e=e.sibling}function wp(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);ot(t,r,i),t[nt]=e,t[pt]=i}catch(f){Ce(e,e.return,f)}}var wn=!1,Xe=!1,Jc=!1,Cp=typeof WeakSet=="function"?WeakSet:Set,tt=null;function d1(e,t){if(e=e.containerInfo,Su=pr,e=Bh(e),Kl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var c=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var p=0,S=-1,C=-1,N=0,P=0,H=e,O=null;t:for(;;){for(var B;H!==i||c!==0&&H.nodeType!==3||(S=p+c),H!==f||r!==0&&H.nodeType!==3||(C=p+r),H.nodeType===3&&(p+=H.nodeValue.length),(B=H.firstChild)!==null;)O=H,H=B;for(;;){if(H===e)break t;if(O===i&&++N===c&&(S=p),O===f&&++P===r&&(C=p),(B=H.nextSibling)!==null)break;H=O,O=H.parentNode}H=B}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(xu={focusedElem:e,selectionRange:i},pr=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){switch(t=tt,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(i=0;i<e.length;i++)c=e[i],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,i=t,c=f.memoizedProps,f=f.memoizedState,r=i.stateNode;try{var Z=Ca(i.type,c);e=r.getSnapshotBeforeUpdate(Z,f),r.__reactInternalSnapshotBeforeUpdate=e}catch(te){Ce(i,i.return,te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Cu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Cu(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}}function Dp(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Dn(e,i),r&4&&us(5,i);break;case 1:if(Dn(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(p){Ce(i,i.return,p)}else{var c=Ca(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Ce(i,i.return,p)}}r&64&&bp(i),r&512&&fs(i,i.return);break;case 3:if(Dn(e,i),r&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{cm(e,t)}catch(p){Ce(i,i.return,p)}}break;case 27:t===null&&r&4&&wp(i);case 26:case 5:Dn(e,i),t===null&&r&4&&xp(i),r&512&&fs(i,i.return);break;case 12:Dn(e,i);break;case 31:Dn(e,i),r&4&&Mp(e,i);break;case 13:Dn(e,i),r&4&&kp(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=x1.bind(null,i),H1(e,i))));break;case 22:if(r=i.memoizedState!==null||wn,!r){t=t!==null&&t.memoizedState!==null||Xe,c=wn;var f=Xe;wn=r,(Xe=t)&&!f?An(e,i,(i.subtreeFlags&8772)!==0):Dn(e,i),wn=c,Xe=f}break;case 30:break;default:Dn(e,i)}}function Ap(e){var t=e.alternate;t!==null&&(e.alternate=null,Ap(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&kl(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 Ue=null,yt=!1;function Cn(e,t,i){for(i=i.child;i!==null;)Ep(e,t,i),i=i.sibling}function Ep(e,t,i){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(zi,i)}catch{}switch(i.tag){case 26:Xe||an(i,t),Cn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Xe||an(i,t);var r=Ue,c=yt;$n(i.type)&&(Ue=i.stateNode,yt=!1),Cn(e,t,i),Ss(i.stateNode),Ue=r,yt=c;break;case 5:Xe||an(i,t);case 6:if(r=Ue,c=yt,Ue=null,Cn(e,t,i),Ue=r,yt=c,Ue!==null)if(yt)try{(Ue.nodeType===9?Ue.body:Ue.nodeName==="HTML"?Ue.ownerDocument.body:Ue).removeChild(i.stateNode)}catch(f){Ce(i,t,f)}else try{Ue.removeChild(i.stateNode)}catch(f){Ce(i,t,f)}break;case 18:Ue!==null&&(yt?(e=Ue,bg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Si(e)):bg(Ue,i.stateNode));break;case 4:r=Ue,c=yt,Ue=i.stateNode.containerInfo,yt=!0,Cn(e,t,i),Ue=r,yt=c;break;case 0:case 11:case 14:case 15:Gn(2,i,t),Xe||Gn(4,i,t),Cn(e,t,i);break;case 1:Xe||(an(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&Sp(i,t,r)),Cn(e,t,i);break;case 21:Cn(e,t,i);break;case 22:Xe=(r=Xe)||i.memoizedState!==null,Cn(e,t,i),Xe=r;break;default:Cn(e,t,i)}}function Mp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Si(e)}catch(i){Ce(t,t.return,i)}}}function kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Si(e)}catch(i){Ce(t,t.return,i)}}function h1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Cp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Cp),t;default:throw Error(o(435,e.tag))}}function Qo(e,t){var i=h1(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var c=T1.bind(null,e,r);r.then(c,c)}})}function vt(e,t){var i=t.deletions;if(i!==null)for(var r=0;r<i.length;r++){var c=i[r],f=e,p=t,S=p;e:for(;S!==null;){switch(S.tag){case 27:if($n(S.type)){Ue=S.stateNode,yt=!1;break e}break;case 5:Ue=S.stateNode,yt=!1;break e;case 3:case 4:Ue=S.stateNode.containerInfo,yt=!0;break e}S=S.return}if(Ue===null)throw Error(o(160));Ep(f,p,c),Ue=null,yt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Np(t,e),t=t.sibling}var Qt=null;function Np(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vt(t,e),bt(e),r&4&&(Gn(3,e,e.return),us(3,e),Gn(5,e,e.return));break;case 1:vt(t,e),bt(e),r&512&&(Xe||i===null||an(i,i.return)),r&64&&wn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var c=Qt;if(vt(t,e),bt(e),r&512&&(Xe||i===null||an(i,i.return)),r&4){var f=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,c=c.ownerDocument||c;t:switch(r){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Vi]||f[nt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(r),c.head.insertBefore(f,c.querySelector("head > title"))),ot(f,r,i),f[nt]=e,et(f),r=f;break e;case"link":var p=Ng("link","href",c).get(r+(i.href||""));if(p){for(var S=0;S<p.length;S++)if(f=p[S],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){p.splice(S,1);break t}}f=c.createElement(r),ot(f,r,i),c.head.appendChild(f);break;case"meta":if(p=Ng("meta","content",c).get(r+(i.content||""))){for(S=0;S<p.length;S++)if(f=p[S],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){p.splice(S,1);break t}}f=c.createElement(r),ot(f,r,i),c.head.appendChild(f);break;default:throw Error(o(468,r))}f[nt]=e,et(f),r=f}e.stateNode=r}else Rg(c,e.type,e.stateNode);else e.stateNode=kg(c,r,e.memoizedProps);else f!==r?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,r===null?Rg(c,e.type,e.stateNode):kg(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Zc(e,e.memoizedProps,i.memoizedProps)}break;case 27:vt(t,e),bt(e),r&512&&(Xe||i===null||an(i,i.return)),i!==null&&r&4&&Zc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(vt(t,e),bt(e),r&512&&(Xe||i===null||an(i,i.return)),e.flags&32){c=e.stateNode;try{Ia(c,"")}catch(Z){Ce(e,e.return,Z)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,Zc(e,c,i!==null?i.memoizedProps:c)),r&1024&&(Jc=!0);break;case 6:if(vt(t,e),bt(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(Z){Ce(e,e.return,Z)}}break;case 3:if(fr=null,c=Qt,Qt=cr(t.containerInfo),vt(t,e),Qt=c,bt(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(Z){Ce(e,e.return,Z)}Jc&&(Jc=!1,Rp(e));break;case 4:r=Qt,Qt=cr(e.stateNode.containerInfo),vt(t,e),bt(e),Qt=r;break;case 12:vt(t,e),bt(e);break;case 31:vt(t,e),bt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Qo(e,r)));break;case 13:vt(t,e),bt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&($o=Tt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Qo(e,r)));break;case 22:c=e.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,N=wn,P=Xe;if(wn=N||c,Xe=P||C,vt(t,e),Xe=P,wn=N,bt(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(i===null||C||wn||Xe||Da(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){C=i=t;try{if(f=C.stateNode,c)p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{S=C.stateNode;var H=C.memoizedProps.style,O=H!=null&&H.hasOwnProperty("display")?H.display:null;S.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(Z){Ce(C,C.return,Z)}}}else if(t.tag===6){if(i===null){C=t;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(Z){Ce(C,C.return,Z)}}}else if(t.tag===18){if(i===null){C=t;try{var B=C.stateNode;c?Sg(B,!0):Sg(C.stateNode,!1)}catch(Z){Ce(C,C.return,Z)}}}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;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,Qo(e,i))));break;case 19:vt(t,e),bt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Qo(e,r)));break;case 30:break;case 21:break;default:vt(t,e),bt(e)}}function bt(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(Tp(r)){i=r;break}r=r.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var c=i.stateNode,f=$c(e);Xo(e,f,c);break;case 5:var p=i.stateNode;i.flags&32&&(Ia(p,""),i.flags&=-33);var S=$c(e);Xo(e,S,p);break;case 3:case 4:var C=i.stateNode.containerInfo,N=$c(e);Wc(e,N,C);break;default:throw Error(o(161))}}catch(P){Ce(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dp(e,t.alternate,t),t=t.sibling}function Da(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gn(4,t,t.return),Da(t);break;case 1:an(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Sp(t,t.return,i),Da(t);break;case 27:Ss(t.stateNode);case 26:case 5:an(t,t.return),Da(t);break;case 22:t.memoizedState===null&&Da(t);break;case 30:Da(t);break;default:Da(t)}e=e.sibling}}function An(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,c=e,f=t,p=f.flags;switch(f.tag){case 0:case 11:case 15:An(c,f,i),us(4,f);break;case 1:if(An(c,f,i),r=f,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(N){Ce(r,r.return,N)}if(r=f,c=r.updateQueue,c!==null){var S=r.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)lm(C[c],S)}catch(N){Ce(r,r.return,N)}}i&&p&64&&bp(f),fs(f,f.return);break;case 27:wp(f);case 26:case 5:An(c,f,i),i&&r===null&&p&4&&xp(f),fs(f,f.return);break;case 12:An(c,f,i);break;case 31:An(c,f,i),i&&p&4&&Mp(c,f);break;case 13:An(c,f,i),i&&p&4&&kp(c,f);break;case 22:f.memoizedState===null&&An(c,f,i),fs(f,f.return);break;case 30:break;default:An(c,f,i)}t=t.sibling}}function eu(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&$i(i))}function tu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e))}function Zt(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jp(e,t,i,r),t=t.sibling}function jp(e,t,i,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Zt(e,t,i,r),c&2048&&us(9,t);break;case 1:Zt(e,t,i,r);break;case 3:Zt(e,t,i,r),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e)));break;case 12:if(c&2048){Zt(e,t,i,r),e=t.stateNode;try{var f=t.memoizedProps,p=f.id,S=f.onPostCommit;typeof S=="function"&&S(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Ce(t,t.return,C)}}else Zt(e,t,i,r);break;case 31:Zt(e,t,i,r);break;case 13:Zt(e,t,i,r);break;case 23:break;case 22:f=t.stateNode,p=t.alternate,t.memoizedState!==null?f._visibility&2?Zt(e,t,i,r):ds(e,t):f._visibility&2?Zt(e,t,i,r):(f._visibility|=2,ci(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&eu(p,t);break;case 24:Zt(e,t,i,r),c&2048&&tu(t.alternate,t);break;default:Zt(e,t,i,r)}}function ci(e,t,i,r,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,p=t,S=i,C=r,N=p.flags;switch(p.tag){case 0:case 11:case 15:ci(f,p,S,C,c),us(8,p);break;case 23:break;case 22:var P=p.stateNode;p.memoizedState!==null?P._visibility&2?ci(f,p,S,C,c):ds(f,p):(P._visibility|=2,ci(f,p,S,C,c)),c&&N&2048&&eu(p.alternate,p);break;case 24:ci(f,p,S,C,c),c&&N&2048&&tu(p.alternate,p);break;default:ci(f,p,S,C,c)}t=t.sibling}}function ds(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,r=t,c=r.flags;switch(r.tag){case 22:ds(i,r),c&2048&&eu(r.alternate,r);break;case 24:ds(i,r),c&2048&&tu(r.alternate,r);break;default:ds(i,r)}t=t.sibling}}var hs=8192;function ui(e,t,i){if(e.subtreeFlags&hs)for(e=e.child;e!==null;)Op(e,t,i),e=e.sibling}function Op(e,t,i){switch(e.tag){case 26:ui(e,t,i),e.flags&hs&&e.memoizedState!==null&&J1(i,Qt,e.memoizedState,e.memoizedProps);break;case 5:ui(e,t,i);break;case 3:case 4:var r=Qt;Qt=cr(e.stateNode.containerInfo),ui(e,t,i),Qt=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=hs,hs=16777216,ui(e,t,i),hs=r):ui(e,t,i));break;default:ui(e,t,i)}}function Lp(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 ms(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];tt=r,Bp(r,e)}Lp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zp(e),e=e.sibling}function zp(e){switch(e.tag){case 0:case 11:case 15:ms(e),e.flags&2048&&Gn(9,e,e.return);break;case 3:ms(e);break;case 12:ms(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zo(e)):ms(e);break;default:ms(e)}}function Zo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];tt=r,Bp(r,e)}Lp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gn(8,t,t.return),Zo(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Zo(t));break;default:Zo(t)}e=e.sibling}}function Bp(e,t){for(;tt!==null;){var i=tt;switch(i.tag){case 0:case 11:case 15:Gn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:$i(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,tt=r;else e:for(i=e;tt!==null;){r=tt;var c=r.sibling,f=r.return;if(Ap(r),r===i){tt=null;break e}if(c!==null){c.return=f,tt=c;break e}tt=f}}}var m1={getCacheForType:function(e){var t=it(qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return it(qe).controller.signal}},p1=typeof WeakMap=="function"?WeakMap:Map,xe=0,je=null,ce=null,me=0,we=0,kt=null,qn=!1,fi=!1,nu=!1,En=0,Pe=0,Kn=0,Aa=0,au=0,Nt=0,di=0,ps=null,St=null,iu=!1,$o=0,Up=0,Wo=1/0,Jo=null,Yn=null,Ze=0,Xn=null,hi=null,Mn=0,su=0,ou=null,Vp=null,gs=0,ru=null;function Rt(){return(xe&2)!==0&&me!==0?me&-me:U.T!==null?hu():eh()}function Pp(){if(Nt===0)if((me&536870912)===0||ge){var e=oo;oo<<=1,(oo&3932160)===0&&(oo=262144),Nt=e}else Nt=536870912;return e=Et.current,e!==null&&(e.flags|=32),Nt}function xt(e,t,i){(e===je&&(we===2||we===9)||e.cancelPendingCommit!==null)&&(mi(e,0),Qn(e,me,Nt,!1)),Ui(e,i),((xe&2)===0||e!==je)&&(e===je&&((xe&2)===0&&(Aa|=i),Pe===4&&Qn(e,me,Nt,!1)),sn(e))}function _p(e,t,i){if((xe&6)!==0)throw Error(o(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Bi(e,t),c=r?v1(e,t):cu(e,t,!0),f=r;do{if(c===0){fi&&!r&&Qn(e,t,0,!1);break}else{if(i=e.current.alternate,f&&!g1(i)){c=cu(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var S=e;c=ps;var C=S.current.memoizedState.isDehydrated;if(C&&(mi(S,p).flags|=256),p=cu(S,p,!1),p!==2){if(nu&&!C){S.errorRecoveryDisabledLanes|=f,Aa|=f,c=4;break e}f=St,St=c,f!==null&&(St===null?St=f:St.push.apply(St,f))}c=p}if(f=!1,c!==2)continue}}if(c===1){mi(e,0),Qn(e,t,0,!0);break}e:{switch(r=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Qn(r,t,Nt,!qn);break e;case 2:St=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=$o+300-Tt(),10<c)){if(Qn(r,t,Nt,!qn),lo(r,0,!0)!==0)break e;Mn=t,r.timeoutHandle=yg(Hp.bind(null,r,i,St,Jo,iu,t,Nt,Aa,di,qn,f,"Throttled",-0,0),c);break e}Hp(r,i,St,Jo,iu,t,Nt,Aa,di,qn,f,null,-0,0)}}break}while(!0);sn(e)}function Hp(e,t,i,r,c,f,p,S,C,N,P,H,O,B){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hn},Op(t,f,H);var Z=(f&62914560)===f?$o-Tt():(f&4194048)===f?Up-Tt():0;if(Z=ew(H,Z),Z!==null){Mn=f,e.cancelPendingCommit=Z(Qp.bind(null,e,t,f,i,r,c,p,S,C,P,H,null,O,B)),Qn(e,f,p,!N);return}}Qp(e,t,f,i,r,c,p,S,C)}function g1(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var r=0;r<i.length;r++){var c=i[r],f=c.getSnapshot;c=c.value;try{if(!Dt(f(),c))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;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 Qn(e,t,i,r){t&=~au,t&=~Aa,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var f=31-Ct(c),p=1<<f;r[f]=-1,c&=~p}i!==0&&$d(e,i,t)}function er(){return(xe&6)===0?(ys(0),!1):!0}function lu(){if(ce!==null){if(we===0)var e=ce.return;else e=ce,yn=ya=null,Cc(e),ii=null,Ji=0,e=ce;for(;e!==null;)vp(e.alternate,e),e=e.return;ce=null}}function mi(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,B1(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Mn=0,lu(),je=e,ce=i=pn(e.current,null),me=t,we=0,kt=null,qn=!1,fi=Bi(e,t),nu=!1,di=Nt=au=Aa=Kn=Pe=0,St=ps=null,iu=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var c=31-Ct(r),f=1<<c;t|=e[c],r&=~f}return En=t,xo(),i}function Fp(e,t){oe=null,U.H=rs,t===ai||t===ko?(t=im(),we=3):t===dc?(t=im(),we=4):we=t===_c?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,kt=t,ce===null&&(Pe=1,Io(e,Ut(t,e.current)))}function Ip(){var e=Et.current;return e===null?!0:(me&4194048)===me?Ht===null:(me&62914560)===me||(me&536870912)!==0?e===Ht:!1}function Gp(){var e=U.H;return U.H=rs,e===null?rs:e}function qp(){var e=U.A;return U.A=m1,e}function tr(){Pe=4,qn||(me&4194048)!==me&&Et.current!==null||(fi=!0),(Kn&134217727)===0&&(Aa&134217727)===0||je===null||Qn(je,me,Nt,!1)}function cu(e,t,i){var r=xe;xe|=2;var c=Gp(),f=qp();(je!==e||me!==t)&&(Jo=null,mi(e,t)),t=!1;var p=Pe;e:do try{if(we!==0&&ce!==null){var S=ce,C=kt;switch(we){case 8:lu(),p=6;break e;case 3:case 2:case 9:case 6:Et.current===null&&(t=!0);var N=we;if(we=0,kt=null,pi(e,S,C,N),i&&fi){p=0;break e}break;default:N=we,we=0,kt=null,pi(e,S,C,N)}}y1(),p=Pe;break}catch(P){Fp(e,P)}while(!0);return t&&e.shellSuspendCounter++,yn=ya=null,xe=r,U.H=c,U.A=f,ce===null&&(je=null,me=0,xo()),p}function y1(){for(;ce!==null;)Kp(ce)}function v1(e,t){var i=xe;xe|=2;var r=Gp(),c=qp();je!==e||me!==t?(Jo=null,Wo=Tt()+500,mi(e,t)):fi=Bi(e,t);e:do try{if(we!==0&&ce!==null){t=ce;var f=kt;t:switch(we){case 1:we=0,kt=null,pi(e,t,f,1);break;case 2:case 9:if(nm(f)){we=0,kt=null,Yp(t);break}t=function(){we!==2&&we!==9||je!==e||(we=7),sn(e)},f.then(t,t);break e;case 3:we=7;break e;case 4:we=5;break e;case 7:nm(f)?(we=0,kt=null,Yp(t)):(we=0,kt=null,pi(e,t,f,7));break;case 5:var p=null;switch(ce.tag){case 26:p=ce.memoizedState;case 5:case 27:var S=ce;if(p?jg(p):S.stateNode.complete){we=0,kt=null;var C=S.sibling;if(C!==null)ce=C;else{var N=S.return;N!==null?(ce=N,nr(N)):ce=null}break t}}we=0,kt=null,pi(e,t,f,5);break;case 6:we=0,kt=null,pi(e,t,f,6);break;case 8:lu(),Pe=6;break e;default:throw Error(o(462))}}b1();break}catch(P){Fp(e,P)}while(!0);return yn=ya=null,U.H=r,U.A=c,xe=i,ce!==null?0:(je=null,me=0,xo(),Pe)}function b1(){for(;ce!==null&&!Fx();)Kp(ce)}function Kp(e){var t=gp(e.alternate,e,En);e.memoizedProps=e.pendingProps,t===null?nr(e):ce=t}function Yp(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=up(i,t,t.pendingProps,t.type,void 0,me);break;case 11:t=up(i,t,t.pendingProps,t.type.render,t.ref,me);break;case 5:Cc(t);default:vp(i,t),t=ce=qh(t,En),t=gp(i,t,En)}e.memoizedProps=e.pendingProps,t===null?nr(e):ce=t}function pi(e,t,i,r){yn=ya=null,Cc(t),ii=null,Ji=0;var c=t.return;try{if(r1(e,c,t,i,me)){Pe=1,Io(e,Ut(i,e.current)),ce=null;return}}catch(f){if(c!==null)throw ce=c,f;Pe=1,Io(e,Ut(i,e.current)),ce=null;return}t.flags&32768?(ge||r===1?e=!0:fi||(me&536870912)!==0?e=!1:(qn=e=!0,(r===2||r===9||r===3||r===6)&&(r=Et.current,r!==null&&r.tag===13&&(r.flags|=16384))),Xp(t,e)):nr(t)}function nr(e){var t=e;do{if((t.flags&32768)!==0){Xp(t,qn);return}e=t.return;var i=u1(t.alternate,t,En);if(i!==null){ce=i;return}if(t=t.sibling,t!==null){ce=t;return}ce=t=e}while(t!==null);Pe===0&&(Pe=5)}function Xp(e,t){do{var i=f1(e.alternate,e);if(i!==null){i.flags&=32767,ce=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ce=e;return}ce=e=i}while(e!==null);Pe=6,ce=null}function Qp(e,t,i,r,c,f,p,S,C){e.cancelPendingCommit=null;do ar();while(Ze!==0);if((xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=$l,Wx(e,i,f,p,S,C),e===je&&(ce=je=null,me=0),hi=t,Xn=e,Mn=i,su=f,ou=c,Vp=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,w1(io,function(){return eg(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=U.T,U.T=null,c=q.p,q.p=2,p=xe,xe|=4;try{d1(e,t,i)}finally{xe=p,q.p=c,U.T=r}}Ze=1,Zp(),$p(),Wp()}}function Zp(){if(Ze===1){Ze=0;var e=Xn,t=hi,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var r=q.p;q.p=2;var c=xe;xe|=4;try{Np(t,e);var f=xu,p=Bh(e.containerInfo),S=f.focusedElem,C=f.selectionRange;if(p!==S&&S&&S.ownerDocument&&zh(S.ownerDocument.documentElement,S)){if(C!==null&&Kl(S)){var N=C.start,P=C.end;if(P===void 0&&(P=N),"selectionStart"in S)S.selectionStart=N,S.selectionEnd=Math.min(P,S.value.length);else{var H=S.ownerDocument||document,O=H&&H.defaultView||window;if(O.getSelection){var B=O.getSelection(),Z=S.textContent.length,te=Math.min(C.start,Z),ke=C.end===void 0?te:Math.min(C.end,Z);!B.extend&&te>ke&&(p=ke,ke=te,te=p);var E=Lh(S,te),A=Lh(S,ke);if(E&&A&&(B.rangeCount!==1||B.anchorNode!==E.node||B.anchorOffset!==E.offset||B.focusNode!==A.node||B.focusOffset!==A.offset)){var k=H.createRange();k.setStart(E.node,E.offset),B.removeAllRanges(),te>ke?(B.addRange(k),B.extend(A.node,A.offset)):(k.setEnd(A.node,A.offset),B.addRange(k))}}}}for(H=[],B=S;B=B.parentNode;)B.nodeType===1&&H.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<H.length;S++){var _=H[S];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}pr=!!Su,xu=Su=null}finally{xe=c,q.p=r,U.T=i}}e.current=t,Ze=2}}function $p(){if(Ze===2){Ze=0;var e=Xn,t=hi,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var r=q.p;q.p=2;var c=xe;xe|=4;try{Dp(e,t.alternate,t)}finally{xe=c,q.p=r,U.T=i}}Ze=3}}function Wp(){if(Ze===4||Ze===3){Ze=0,Ix();var e=Xn,t=hi,i=Mn,r=Vp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ze=5:(Ze=0,hi=Xn=null,Jp(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Yn=null),El(i),t=t.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(zi,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=U.T,c=q.p,q.p=2,U.T=null;try{for(var f=e.onRecoverableError,p=0;p<r.length;p++){var S=r[p];f(S.value,{componentStack:S.stack})}}finally{U.T=t,q.p=c}}(Mn&3)!==0&&ar(),sn(e),c=e.pendingLanes,(i&261930)!==0&&(c&42)!==0?e===ru?gs++:(gs=0,ru=e):gs=0,ys(0)}}function Jp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$i(t)))}function ar(){return Zp(),$p(),Wp(),eg()}function eg(){if(Ze!==5)return!1;var e=Xn,t=su;su=0;var i=El(Mn),r=U.T,c=q.p;try{q.p=32>i?32:i,U.T=null,i=ou,ou=null;var f=Xn,p=Mn;if(Ze=0,hi=Xn=null,Mn=0,(xe&6)!==0)throw Error(o(331));var S=xe;if(xe|=4,zp(f.current),jp(f,f.current,p,i),xe=S,ys(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(zi,f)}catch{}return!0}finally{q.p=c,U.T=r,Jp(e,t)}}function tg(e,t,i){t=Ut(i,t),t=Pc(e.stateNode,t,2),e=Hn(e,t,2),e!==null&&(Ui(e,2),sn(e))}function Ce(e,t,i){if(e.tag===3)tg(e,e,i);else for(;t!==null;){if(t.tag===3){tg(t,e,i);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yn===null||!Yn.has(r))){e=Ut(i,e),i=np(2),r=Hn(t,i,2),r!==null&&(ap(i,r,t,e),Ui(r,2),sn(r));break}}t=t.return}}function uu(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new p1;var c=new Set;r.set(t,c)}else c=r.get(t),c===void 0&&(c=new Set,r.set(t,c));c.has(i)||(nu=!0,c.add(i),e=S1.bind(null,e,t,i),t.then(e,e))}function S1(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,je===e&&(me&i)===i&&(Pe===4||Pe===3&&(me&62914560)===me&&300>Tt()-$o?(xe&2)===0&&mi(e,0):au|=i,di===me&&(di=0)),sn(e)}function ng(e,t){t===0&&(t=Zd()),e=ma(e,t),e!==null&&(Ui(e,t),sn(e))}function x1(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),ng(e,i)}function T1(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),ng(e,i)}function w1(e,t){return wl(e,t)}var ir=null,gi=null,fu=!1,sr=!1,du=!1,Zn=0;function sn(e){e!==gi&&e.next===null&&(gi===null?ir=gi=e:gi=gi.next=e),sr=!0,fu||(fu=!0,D1())}function ys(e,t){if(!du&&sr){du=!0;do for(var i=!1,r=ir;r!==null;){if(e!==0){var c=r.pendingLanes;if(c===0)var f=0;else{var p=r.suspendedLanes,S=r.pingedLanes;f=(1<<31-Ct(42|e)+1)-1,f&=c&~(p&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,og(r,f))}else f=me,f=lo(r,r===je?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||Bi(r,f)||(i=!0,og(r,f));r=r.next}while(i);du=!1}}function C1(){ag()}function ag(){sr=fu=!1;var e=0;Zn!==0&&z1()&&(e=Zn);for(var t=Tt(),i=null,r=ir;r!==null;){var c=r.next,f=ig(r,t);f===0?(r.next=null,i===null?ir=c:i.next=c,c===null&&(gi=i)):(i=r,(e!==0||(f&3)!==0)&&(sr=!0)),r=c}Ze!==0&&Ze!==5||ys(e),Zn!==0&&(Zn=0)}function ig(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var p=31-Ct(f),S=1<<p,C=c[p];C===-1?((S&i)===0||(S&r)!==0)&&(c[p]=$x(S,t)):C<=t&&(e.expiredLanes|=S),f&=~S}if(t=je,i=me,i=lo(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(we===2||we===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Cl(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Bi(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(r!==null&&Cl(r),El(i)){case 2:case 8:i=Xd;break;case 32:i=io;break;case 268435456:i=Qd;break;default:i=io}return r=sg.bind(null,e),i=wl(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&Cl(r),e.callbackPriority=2,e.callbackNode=null,2}function sg(e,t){if(Ze!==0&&Ze!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ar()&&e.callbackNode!==i)return null;var r=me;return r=lo(e,e===je?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_p(e,r,t),ig(e,Tt()),e.callbackNode!=null&&e.callbackNode===i?sg.bind(null,e):null)}function og(e,t){if(ar())return null;_p(e,t,!0)}function D1(){U1(function(){(xe&6)!==0?wl(Yd,C1):ag()})}function hu(){if(Zn===0){var e=ti;e===0&&(e=so,so<<=1,(so&261888)===0&&(so=256)),Zn=e}return Zn}function rg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ho(""+e)}function lg(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function A1(e,t,i,r,c){if(t==="submit"&&i&&i.stateNode===c){var f=rg((c[pt]||null).action),p=r.submitter;p&&(t=(t=p[pt]||null)?rg(t.formAction):p.getAttribute("formAction"),t!==null&&(f=t,p=null));var S=new yo("action","action",null,r,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Zn!==0){var C=p?lg(c,p):new FormData(c);Oc(i,{pending:!0,data:C,method:c.method,action:f},null,C)}}else typeof f=="function"&&(S.preventDefault(),C=p?lg(c,p):new FormData(c),Oc(i,{pending:!0,data:C,method:c.method,action:f},f,C))},currentTarget:c}]})}}for(var mu=0;mu<Zl.length;mu++){var pu=Zl[mu],E1=pu.toLowerCase(),M1=pu[0].toUpperCase()+pu.slice(1);Xt(E1,"on"+M1)}Xt(Ph,"onAnimationEnd"),Xt(_h,"onAnimationIteration"),Xt(Hh,"onAnimationStart"),Xt("dblclick","onDoubleClick"),Xt("focusin","onFocus"),Xt("focusout","onBlur"),Xt(GT,"onTransitionRun"),Xt(qT,"onTransitionStart"),Xt(KT,"onTransitionCancel"),Xt(Fh,"onTransitionEnd"),Ha("onMouseEnter",["mouseout","mouseover"]),Ha("onMouseLeave",["mouseout","mouseover"]),Ha("onPointerEnter",["pointerout","pointerover"]),Ha("onPointerLeave",["pointerout","pointerover"]),ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ua("onBeforeInput",["compositionend","keypress","textInput","paste"]),ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vs="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(" "),k1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vs));function cg(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],c=r.event;r=r.listeners;e:{var f=void 0;if(t)for(var p=r.length-1;0<=p;p--){var S=r[p],C=S.instance,N=S.currentTarget;if(S=S.listener,C!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=N;try{f(c)}catch(P){So(P)}c.currentTarget=null,f=C}else for(p=0;p<r.length;p++){if(S=r[p],C=S.instance,N=S.currentTarget,S=S.listener,C!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=N;try{f(c)}catch(P){So(P)}c.currentTarget=null,f=C}}}}function ue(e,t){var i=t[Ml];i===void 0&&(i=t[Ml]=new Set);var r=e+"__bubble";i.has(r)||(ug(t,e,2,!1),i.add(r))}function gu(e,t,i){var r=0;t&&(r|=4),ug(i,e,r,t)}var or="_reactListening"+Math.random().toString(36).slice(2);function yu(e){if(!e[or]){e[or]=!0,ah.forEach(function(i){i!=="selectionchange"&&(k1.has(i)||gu(i,!1,e),gu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[or]||(t[or]=!0,gu("selectionchange",!1,t))}}function ug(e,t,i,r){switch(Pg(t)){case 2:var c=aw;break;case 8:c=iw;break;default:c=ju}i=c.bind(null,t,i,e),c=void 0,!Ul||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),r?c!==void 0?e.addEventListener(t,i,{capture:!0,passive:c}):e.addEventListener(t,i,!0):c!==void 0?e.addEventListener(t,i,{passive:c}):e.addEventListener(t,i,!1)}function vu(e,t,i,r,c){var f=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var p=r.tag;if(p===3||p===4){var S=r.stateNode.containerInfo;if(S===c)break;if(p===4)for(p=r.return;p!==null;){var C=p.tag;if((C===3||C===4)&&p.stateNode.containerInfo===c)return;p=p.return}for(;S!==null;){if(p=Va(S),p===null)return;if(C=p.tag,C===5||C===6||C===26||C===27){r=f=p;continue e}S=S.parentNode}}r=r.return}ph(function(){var N=f,P=zl(i),H=[];e:{var O=Ih.get(e);if(O!==void 0){var B=yo,Z=e;switch(e){case"keypress":if(po(i)===0)break e;case"keydown":case"keyup":B=TT;break;case"focusin":Z="focus",B=Hl;break;case"focusout":Z="blur",B=Hl;break;case"beforeblur":case"afterblur":B=Hl;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=uT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=DT;break;case Ph:case _h:case Hh:B=hT;break;case Fh:B=ET;break;case"scroll":case"scrollend":B=lT;break;case"wheel":B=kT;break;case"copy":case"cut":case"paste":B=pT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Sh;break;case"toggle":case"beforetoggle":B=RT}var te=(t&4)!==0,ke=!te&&(e==="scroll"||e==="scrollend"),E=te?O!==null?O+"Capture":null:O;te=[];for(var A=N,k;A!==null;){var _=A;if(k=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||k===null||E===null||(_=_i(A,E),_!=null&&te.push(bs(A,_,k))),ke)break;A=A.return}0<te.length&&(O=new B(O,Z,null,i,P),H.push({event:O,listeners:te}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",O&&i!==Ll&&(Z=i.relatedTarget||i.fromElement)&&(Va(Z)||Z[Ua]))break e;if((B||O)&&(O=P.window===P?P:(O=P.ownerDocument)?O.defaultView||O.parentWindow:window,B?(Z=i.relatedTarget||i.toElement,B=N,Z=Z?Va(Z):null,Z!==null&&(ke=u(Z),te=Z.tag,Z!==ke||te!==5&&te!==27&&te!==6)&&(Z=null)):(B=null,Z=N),B!==Z)){if(te=vh,_="onMouseLeave",E="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(te=Sh,_="onPointerLeave",E="onPointerEnter",A="pointer"),ke=B==null?O:Pi(B),k=Z==null?O:Pi(Z),O=new te(_,A+"leave",B,i,P),O.target=ke,O.relatedTarget=k,_=null,Va(P)===N&&(te=new te(E,A+"enter",Z,i,P),te.target=k,te.relatedTarget=ke,_=te),ke=_,B&&Z)t:{for(te=N1,E=B,A=Z,k=0,_=E;_;_=te(_))k++;_=0;for(var J=A;J;J=te(J))_++;for(;0<k-_;)E=te(E),k--;for(;0<_-k;)A=te(A),_--;for(;k--;){if(E===A||A!==null&&E===A.alternate){te=E;break t}E=te(E),A=te(A)}te=null}else te=null;B!==null&&fg(H,O,B,te,!1),Z!==null&&ke!==null&&fg(H,ke,Z,te,!0)}}e:{if(O=N?Pi(N):window,B=O.nodeName&&O.nodeName.toLowerCase(),B==="select"||B==="input"&&O.type==="file")var be=Mh;else if(Ah(O))if(kh)be=HT;else{be=PT;var W=VT}else B=O.nodeName,!B||B.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?N&&Ol(N.elementType)&&(be=Mh):be=_T;if(be&&(be=be(e,N))){Eh(H,be,i,P);break e}W&&W(e,O,N),e==="focusout"&&N&&O.type==="number"&&N.memoizedProps.value!=null&&jl(O,"number",O.value)}switch(W=N?Pi(N):window,e){case"focusin":(Ah(W)||W.contentEditable==="true")&&(Ya=W,Yl=N,Xi=null);break;case"focusout":Xi=Yl=Ya=null;break;case"mousedown":Xl=!0;break;case"contextmenu":case"mouseup":case"dragend":Xl=!1,Uh(H,i,P);break;case"selectionchange":if(IT)break;case"keydown":case"keyup":Uh(H,i,P)}var re;if(Il)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else Ka?Ch(e,i)&&(pe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(pe="onCompositionStart");pe&&(xh&&i.locale!=="ko"&&(Ka||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&Ka&&(re=gh()):(Ln=P,Vl="value"in Ln?Ln.value:Ln.textContent,Ka=!0)),W=rr(N,pe),0<W.length&&(pe=new bh(pe,e,null,i,P),H.push({event:pe,listeners:W}),re?pe.data=re:(re=Dh(i),re!==null&&(pe.data=re)))),(re=OT?LT(e,i):zT(e,i))&&(pe=rr(N,"onBeforeInput"),0<pe.length&&(W=new bh("onBeforeInput","beforeinput",null,i,P),H.push({event:W,listeners:pe}),W.data=re)),A1(H,e,N,i,P)}cg(H,t)})}function bs(e,t,i){return{instance:e,listener:t,currentTarget:i}}function rr(e,t){for(var i=t+"Capture",r=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=_i(e,i),c!=null&&r.unshift(bs(e,c,f)),c=_i(e,t),c!=null&&r.push(bs(e,c,f))),e.tag===3)return r;e=e.return}return[]}function N1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function fg(e,t,i,r,c){for(var f=t._reactName,p=[];i!==null&&i!==r;){var S=i,C=S.alternate,N=S.stateNode;if(S=S.tag,C!==null&&C===r)break;S!==5&&S!==26&&S!==27||N===null||(C=N,c?(N=_i(i,f),N!=null&&p.unshift(bs(i,N,C))):c||(N=_i(i,f),N!=null&&p.push(bs(i,N,C)))),i=i.return}p.length!==0&&e.push({event:t,listeners:p})}var R1=/\r\n?/g,j1=/\u0000|\uFFFD/g;function dg(e){return(typeof e=="string"?e:""+e).replace(R1,`
|
||
`).replace(j1,"")}function hg(e,t){return t=dg(t),dg(e)===t}function Me(e,t,i,r,c,f){switch(i){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Ia(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Ia(e,""+r);break;case"className":uo(e,"class",r);break;case"tabIndex":uo(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(e,i,r);break;case"style":hh(e,r,f);break;case"data":if(t!=="object"){uo(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=ho(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(i,"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"&&(i==="formAction"?(t!=="input"&&Me(e,t,"name",c.name,c,null),Me(e,t,"formEncType",c.formEncType,c,null),Me(e,t,"formMethod",c.formMethod,c,null),Me(e,t,"formTarget",c.formTarget,c,null)):(Me(e,t,"encType",c.encType,c,null),Me(e,t,"method",c.method,c,null),Me(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=ho(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=hn);break;case"onScroll":r!=null&&ue("scroll",e);break;case"onScrollEnd":r!=null&&ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=i}}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}i=ho(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+r):e.removeAttribute(i);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(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":ue("beforetoggle",e),ue("toggle",e),co(e,"popover",r);break;case"xlinkActuate":dn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":dn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":dn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":dn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":dn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":dn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":dn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":dn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":dn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":co(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=oT.get(i)||i,co(e,i,r))}}function bu(e,t,i,r,c,f){switch(i){case"style":hh(e,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof r=="string"?Ia(e,r):(typeof r=="number"||typeof r=="bigint")&&Ia(e,""+r);break;case"onScroll":r!=null&&ue("scroll",e);break;case"onScrollEnd":r!=null&&ue("scrollend",e);break;case"onClick":r!=null&&(e.onclick=hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ih.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(c=i.endsWith("Capture"),t=i.slice(2,c?i.length-7:void 0),f=e[pt]||null,f=f!=null?f[i]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof r=="function")){typeof f!="function"&&f!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,r,c);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):co(e,i,r)}}}function ot(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ue("error",e),ue("load",e);var r=!1,c=!1,f;for(f in i)if(i.hasOwnProperty(f)){var p=i[f];if(p!=null)switch(f){case"src":r=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Me(e,t,f,p,i,null)}}c&&Me(e,t,"srcSet",i.srcSet,i,null),r&&Me(e,t,"src",i.src,i,null);return;case"input":ue("invalid",e);var S=f=p=c=null,C=null,N=null;for(r in i)if(i.hasOwnProperty(r)){var P=i[r];if(P!=null)switch(r){case"name":c=P;break;case"type":p=P;break;case"checked":C=P;break;case"defaultChecked":N=P;break;case"value":f=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:Me(e,t,r,P,i,null)}}ch(e,f,S,C,N,p,c,!1);return;case"select":ue("invalid",e),r=p=f=null;for(c in i)if(i.hasOwnProperty(c)&&(S=i[c],S!=null))switch(c){case"value":f=S;break;case"defaultValue":p=S;break;case"multiple":r=S;default:Me(e,t,c,S,i,null)}t=f,i=p,e.multiple=!!r,t!=null?Fa(e,!!r,t,!1):i!=null&&Fa(e,!!r,i,!0);return;case"textarea":ue("invalid",e),f=c=r=null;for(p in i)if(i.hasOwnProperty(p)&&(S=i[p],S!=null))switch(p){case"value":r=S;break;case"defaultValue":c=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(o(91));break;default:Me(e,t,p,S,i,null)}fh(e,r,c,f);return;case"option":for(C in i)i.hasOwnProperty(C)&&(r=i[C],r!=null)&&(C==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":Me(e,t,C,r,i,null));return;case"dialog":ue("beforetoggle",e),ue("toggle",e),ue("cancel",e),ue("close",e);break;case"iframe":case"object":ue("load",e);break;case"video":case"audio":for(r=0;r<vs.length;r++)ue(vs[r],e);break;case"image":ue("error",e),ue("load",e);break;case"details":ue("toggle",e);break;case"embed":case"source":case"link":ue("error",e),ue("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(N in i)if(i.hasOwnProperty(N)&&(r=i[N],r!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Me(e,t,N,r,i,null)}return;default:if(Ol(t)){for(P in i)i.hasOwnProperty(P)&&(r=i[P],r!==void 0&&bu(e,t,P,r,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(r=i[S],r!=null&&Me(e,t,S,r,i,null))}function O1(e,t,i,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,p=null,S=null,C=null,N=null,P=null;for(B in i){var H=i[B];if(i.hasOwnProperty(B)&&H!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":C=H;default:r.hasOwnProperty(B)||Me(e,t,B,null,r,H)}}for(var O in r){var B=r[O];if(H=i[O],r.hasOwnProperty(O)&&(B!=null||H!=null))switch(O){case"type":f=B;break;case"name":c=B;break;case"checked":N=B;break;case"defaultChecked":P=B;break;case"value":p=B;break;case"defaultValue":S=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:B!==H&&Me(e,t,O,B,r,H)}}Rl(e,p,S,C,N,P,f,c);return;case"select":B=p=S=O=null;for(f in i)if(C=i[f],i.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":B=C;default:r.hasOwnProperty(f)||Me(e,t,f,null,r,C)}for(c in r)if(f=r[c],C=i[c],r.hasOwnProperty(c)&&(f!=null||C!=null))switch(c){case"value":O=f;break;case"defaultValue":S=f;break;case"multiple":p=f;default:f!==C&&Me(e,t,c,f,r,C)}t=S,i=p,r=B,O!=null?Fa(e,!!i,O,!1):!!r!=!!i&&(t!=null?Fa(e,!!i,t,!0):Fa(e,!!i,i?[]:"",!1));return;case"textarea":B=O=null;for(S in i)if(c=i[S],i.hasOwnProperty(S)&&c!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Me(e,t,S,null,r,c)}for(p in r)if(c=r[p],f=i[p],r.hasOwnProperty(p)&&(c!=null||f!=null))switch(p){case"value":O=c;break;case"defaultValue":B=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&Me(e,t,p,c,r,f)}uh(e,O,B);return;case"option":for(var Z in i)O=i[Z],i.hasOwnProperty(Z)&&O!=null&&!r.hasOwnProperty(Z)&&(Z==="selected"?e.selected=!1:Me(e,t,Z,null,r,O));for(C in r)O=r[C],B=i[C],r.hasOwnProperty(C)&&O!==B&&(O!=null||B!=null)&&(C==="selected"?e.selected=O&&typeof O!="function"&&typeof O!="symbol":Me(e,t,C,O,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 te in i)O=i[te],i.hasOwnProperty(te)&&O!=null&&!r.hasOwnProperty(te)&&Me(e,t,te,null,r,O);for(N in r)if(O=r[N],B=i[N],r.hasOwnProperty(N)&&O!==B&&(O!=null||B!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(137,t));break;default:Me(e,t,N,O,r,B)}return;default:if(Ol(t)){for(var ke in i)O=i[ke],i.hasOwnProperty(ke)&&O!==void 0&&!r.hasOwnProperty(ke)&&bu(e,t,ke,void 0,r,O);for(P in r)O=r[P],B=i[P],!r.hasOwnProperty(P)||O===B||O===void 0&&B===void 0||bu(e,t,P,O,r,B);return}}for(var E in i)O=i[E],i.hasOwnProperty(E)&&O!=null&&!r.hasOwnProperty(E)&&Me(e,t,E,null,r,O);for(H in r)O=r[H],B=i[H],!r.hasOwnProperty(H)||O===B||O==null&&B==null||Me(e,t,H,O,r,B)}function mg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function L1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var c=i[r],f=c.transferSize,p=c.initiatorType,S=c.duration;if(f&&S&&mg(p)){for(p=0,S=c.responseEnd,r+=1;r<i.length;r++){var C=i[r],N=C.startTime;if(N>S)break;var P=C.transferSize,H=C.initiatorType;P&&mg(H)&&(C=C.responseEnd,p+=P*(C<S?1:(S-N)/(C-N)))}if(--r,t+=8*(f+p)/(c.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 Su=null,xu=null;function lr(e){return e.nodeType===9?e:e.ownerDocument}function pg(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 gg(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 Tu(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 wu=null;function z1(){var e=window.event;return e&&e.type==="popstate"?e===wu?!1:(wu=e,!0):(wu=null,!1)}var yg=typeof setTimeout=="function"?setTimeout:void 0,B1=typeof clearTimeout=="function"?clearTimeout:void 0,vg=typeof Promise=="function"?Promise:void 0,U1=typeof queueMicrotask=="function"?queueMicrotask:typeof vg<"u"?function(e){return vg.resolve(null).then(e).catch(V1)}:yg;function V1(e){setTimeout(function(){throw e})}function $n(e){return e==="head"}function bg(e,t){var i=t,r=0;do{var c=i.nextSibling;if(e.removeChild(i),c&&c.nodeType===8)if(i=c.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(c),Si(t);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")Ss(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ss(i);for(var f=i.firstChild;f;){var p=f.nextSibling,S=f.nodeName;f[Vi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=p}}else i==="body"&&Ss(e.ownerDocument.body);i=c}while(i);Si(t)}function Sg(e,t){var i=e;e=0;do{var r=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function Cu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Cu(i),kl(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function P1(e,t,i,r){for(;e.nodeType===1;){var c=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Vi])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!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Ft(e.nextSibling),e===null)break}return null}function _1(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ft(e.nextSibling),e===null))return null;return e}function xg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ft(e.nextSibling),e===null))return null;return e}function Du(e){return e.data==="$?"||e.data==="$~"}function Au(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function H1(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var r=function(){t(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Ft(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 Eu=null;function Tg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ft(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function wg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Cg(e,t,i){switch(t=lr(i),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ss(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);kl(e)}var It=new Map,Dg=new Set;function cr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kn=q.d;q.d={f:F1,r:I1,D:G1,C:q1,L:K1,m:Y1,X:Q1,S:X1,M:Z1};function F1(){var e=kn.f(),t=er();return e||t}function I1(e){var t=Pa(e);t!==null&&t.tag===5&&t.type==="form"?Fm(t):kn.r(e)}var yi=typeof document>"u"?null:document;function Ag(e,t,i){var r=yi;if(r&&typeof t=="string"&&t){var c=zt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof i=="string"&&(c+='[crossorigin="'+i+'"]'),Dg.has(c)||(Dg.add(c),e={rel:e,crossOrigin:i,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),ot(t,"link",e),et(t),r.head.appendChild(t)))}}function G1(e){kn.D(e),Ag("dns-prefetch",e,null)}function q1(e,t){kn.C(e,t),Ag("preconnect",e,t)}function K1(e,t,i){kn.L(e,t,i);var r=yi;if(r&&e&&t){var c='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(c+='[imagesrcset="'+zt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(c+='[imagesizes="'+zt(i.imageSizes)+'"]')):c+='[href="'+zt(e)+'"]';var f=c;switch(t){case"style":f=vi(e);break;case"script":f=bi(e)}It.has(f)||(e=v({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),It.set(f,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(xs(f))||t==="script"&&r.querySelector(Ts(f))||(t=r.createElement("link"),ot(t,"link",e),et(t),r.head.appendChild(t)))}}function Y1(e,t){kn.m(e,t);var i=yi;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+zt(r)+'"][href="'+zt(e)+'"]',f=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=bi(e)}if(!It.has(f)&&(e=v({rel:"modulepreload",href:e},t),It.set(f,e),i.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ts(f)))return}r=i.createElement("link"),ot(r,"link",e),et(r),i.head.appendChild(r)}}}function X1(e,t,i){kn.S(e,t,i);var r=yi;if(r&&e){var c=_a(r).hoistableStyles,f=vi(e);t=t||"default";var p=c.get(f);if(!p){var S={loading:0,preload:null};if(p=r.querySelector(xs(f)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},i),(i=It.get(f))&&Mu(e,i);var C=p=r.createElement("link");et(C),ot(C,"link",e),C._p=new Promise(function(N,P){C.onload=N,C.onerror=P}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,ur(p,t,r)}p={type:"stylesheet",instance:p,count:1,state:S},c.set(f,p)}}}function Q1(e,t){kn.X(e,t);var i=yi;if(i&&e){var r=_a(i).hoistableScripts,c=bi(e),f=r.get(c);f||(f=i.querySelector(Ts(c)),f||(e=v({src:e,async:!0},t),(t=It.get(c))&&ku(e,t),f=i.createElement("script"),et(f),ot(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function Z1(e,t){kn.M(e,t);var i=yi;if(i&&e){var r=_a(i).hoistableScripts,c=bi(e),f=r.get(c);f||(f=i.querySelector(Ts(c)),f||(e=v({src:e,async:!0,type:"module"},t),(t=It.get(c))&&ku(e,t),f=i.createElement("script"),et(f),ot(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function Eg(e,t,i,r){var c=(c=Rn.current)?cr(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=vi(i.href),i=_a(c).hoistableStyles,r=i.get(t),r||(r={type:"style",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=vi(i.href);var f=_a(c).hoistableStyles,p=f.get(e);if(p||(c=c.ownerDocument||c,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,p),(f=c.querySelector(xs(e)))&&!f._p&&(p.instance=f,p.state.loading=5),It.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},It.set(e,i),f||$1(c,e,i,p.state))),t&&r===null)throw Error(o(528,""));return p}if(t&&r!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=bi(i),i=_a(c).hoistableScripts,r=i.get(t),r||(r={type:"script",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function vi(e){return'href="'+zt(e)+'"'}function xs(e){return'link[rel="stylesheet"]['+e+"]"}function Mg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function $1(e,t,i,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}),ot(t,"link",i),et(t),e.head.appendChild(t))}function bi(e){return'[src="'+zt(e)+'"]'}function Ts(e){return"script[async]"+e}function kg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+zt(i.href)+'"]');if(r)return t.instance=r,et(r),r;var c=v({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),et(r),ot(r,"style",c),ur(r,i.precedence,e),t.instance=r;case"stylesheet":c=vi(i.href);var f=e.querySelector(xs(c));if(f)return t.state.loading|=4,t.instance=f,et(f),f;r=Mg(i),(c=It.get(c))&&Mu(r,c),f=(e.ownerDocument||e).createElement("link"),et(f);var p=f;return p._p=new Promise(function(S,C){p.onload=S,p.onerror=C}),ot(f,"link",r),t.state.loading|=4,ur(f,i.precedence,e),t.instance=f;case"script":return f=bi(i.src),(c=e.querySelector(Ts(f)))?(t.instance=c,et(c),c):(r=i,(c=It.get(f))&&(r=v({},i),ku(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),et(c),ot(c,"link",r),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,ur(r,i.precedence,e));return t.instance}function ur(e,t,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=r.length?r[r.length-1]:null,f=c,p=0;p<r.length;p++){var S=r[p];if(S.dataset.precedence===t)f=S;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Mu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ku(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var fr=null;function Ng(e,t,i){if(fr===null){var r=new Map,c=fr=new Map;c.set(i,r)}else c=fr,r=c.get(i),r||(r=new Map,c.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),c=0;c<i.length;c++){var f=i[c];if(!(f[Vi]||f[nt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var p=f.getAttribute(t)||"";p=e+p;var S=r.get(p);S?S.push(f):r.set(p,[f])}}return r}function Rg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function W1(e,t,i){if(i===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 jg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function J1(e,t,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var c=vi(r.href),f=t.querySelector(xs(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=dr.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=f,et(f);return}f=t.ownerDocument||t,r=Mg(r),(c=It.get(c))&&Mu(r,c),f=f.createElement("link"),et(f);var p=f;p._p=new Promise(function(S,C){p.onload=S,p.onerror=C}),ot(f,"link",r),i.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=dr.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Nu=0;function ew(e,t){return e.stylesheets&&e.count===0&&mr(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&mr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Nu===0&&(Nu=62500*L1());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Nu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function dr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var hr=null;function mr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,hr=new Map,t.forEach(tw,e),hr=null,dr.call(e))}function tw(e,t){if(!(t.state.loading&4)){var i=hr.get(e);if(i)var r=i.get(null);else{i=new Map,hr.set(e,i);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var p=c[f];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(i.set(p.dataset.precedence,p),r=p)}r&&i.set(null,r)}c=t.instance,p=c.getAttribute("data-precedence"),f=i.get(p)||r,f===r&&i.set(null,c),i.set(p,c),this.count++,r=dr.bind(this),c.addEventListener("load",r),c.addEventListener("error",r),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var ws={$$typeof:z,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function nw(e,t,i,r,c,f,p,S,C){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=Dl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dl(0),this.hiddenUpdates=Dl(null),this.identifierPrefix=r,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Og(e,t,i,r,c,f,p,S,C,N,P,H){return e=new nw(e,t,i,p,C,N,P,H,S),t=1,f===!0&&(t|=24),f=At(3,null,null,t),e.current=f,f.stateNode=e,t=cc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:r,isDehydrated:i,cache:t},hc(f),e}function Lg(e){return e?(e=Za,e):Za}function zg(e,t,i,r,c,f){c=Lg(c),r.context===null?r.context=c:r.pendingContext=c,r=_n(t),r.payload={element:i},f=f===void 0?null:f,f!==null&&(r.callback=f),i=Hn(e,r,t),i!==null&&(xt(i,e,t),ts(i,e,t))}function Bg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Ru(e,t){Bg(e,t),(e=e.alternate)&&Bg(e,t)}function Ug(e){if(e.tag===13||e.tag===31){var t=ma(e,67108864);t!==null&&xt(t,e,67108864),Ru(e,67108864)}}function Vg(e){if(e.tag===13||e.tag===31){var t=Rt();t=Al(t);var i=ma(e,t);i!==null&&xt(i,e,t),Ru(e,t)}}var pr=!0;function aw(e,t,i,r){var c=U.T;U.T=null;var f=q.p;try{q.p=2,ju(e,t,i,r)}finally{q.p=f,U.T=c}}function iw(e,t,i,r){var c=U.T;U.T=null;var f=q.p;try{q.p=8,ju(e,t,i,r)}finally{q.p=f,U.T=c}}function ju(e,t,i,r){if(pr){var c=Ou(r);if(c===null)vu(e,t,r,gr,i),_g(e,r);else if(ow(c,e,t,i,r))r.stopPropagation();else if(_g(e,r),t&4&&-1<sw.indexOf(e)){for(;c!==null;){var f=Pa(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=ca(f.pendingLanes);if(p!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;p;){var C=1<<31-Ct(p);S.entanglements[1]|=C,p&=~C}sn(f),(xe&6)===0&&(Wo=Tt()+500,ys(0))}}break;case 31:case 13:S=ma(f,2),S!==null&&xt(S,f,2),er(),Ru(f,2)}if(f=Ou(r),f===null&&vu(e,t,r,gr,i),f===c)break;c=f}c!==null&&r.stopPropagation()}else vu(e,t,r,null,i)}}function Ou(e){return e=zl(e),Lu(e)}var gr=null;function Lu(e){if(gr=null,e=Va(e),e!==null){var t=u(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=d(t),e!==null)return e;e=null}else if(i===31){if(e=h(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gr=e,null}function Pg(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(Gx()){case Yd:return 2;case Xd:return 8;case io:case qx:return 32;case Qd:return 268435456;default:return 32}default:return 32}}var zu=!1,Wn=null,Jn=null,ea=null,Cs=new Map,Ds=new Map,ta=[],sw="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 _g(e,t){switch(e){case"focusin":case"focusout":Wn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":ea=null;break;case"pointerover":case"pointerout":Cs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(t.pointerId)}}function As(e,t,i,r,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:i,eventSystemFlags:r,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Pa(t),t!==null&&Ug(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function ow(e,t,i,r,c){switch(t){case"focusin":return Wn=As(Wn,e,t,i,r,c),!0;case"dragenter":return Jn=As(Jn,e,t,i,r,c),!0;case"mouseover":return ea=As(ea,e,t,i,r,c),!0;case"pointerover":var f=c.pointerId;return Cs.set(f,As(Cs.get(f)||null,e,t,i,r,c)),!0;case"gotpointercapture":return f=c.pointerId,Ds.set(f,As(Ds.get(f)||null,e,t,i,r,c)),!0}return!1}function Hg(e){var t=Va(e.target);if(t!==null){var i=u(t);if(i!==null){if(t=i.tag,t===13){if(t=d(i),t!==null){e.blockedOn=t,th(e.priority,function(){Vg(i)});return}}else if(t===31){if(t=h(i),t!==null){e.blockedOn=t,th(e.priority,function(){Vg(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Ou(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);Ll=r,i.target.dispatchEvent(r),Ll=null}else return t=Pa(i),t!==null&&Ug(t),e.blockedOn=i,!1;t.shift()}return!0}function Fg(e,t,i){yr(e)&&i.delete(t)}function rw(){zu=!1,Wn!==null&&yr(Wn)&&(Wn=null),Jn!==null&&yr(Jn)&&(Jn=null),ea!==null&&yr(ea)&&(ea=null),Cs.forEach(Fg),Ds.forEach(Fg)}function vr(e,t){e.blockedOn===t&&(e.blockedOn=null,zu||(zu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,rw)))}var br=null;function Ig(e){br!==e&&(br=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){br===e&&(br=null);for(var t=0;t<e.length;t+=3){var i=e[t],r=e[t+1],c=e[t+2];if(typeof r!="function"){if(Lu(r||i)===null)continue;break}var f=Pa(i);f!==null&&(e.splice(t,3),t-=3,Oc(f,{pending:!0,data:c,method:i.method,action:r},r,c))}}))}function Si(e){function t(C){return vr(C,e)}Wn!==null&&vr(Wn,e),Jn!==null&&vr(Jn,e),ea!==null&&vr(ea,e),Cs.forEach(t),Ds.forEach(t);for(var i=0;i<ta.length;i++){var r=ta[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ta.length&&(i=ta[0],i.blockedOn===null);)Hg(i),i.blockedOn===null&&ta.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var c=i[r],f=i[r+1],p=c[pt]||null;if(typeof f=="function")p||Ig(i);else if(p){var S=null;if(f&&f.hasAttribute("formAction")){if(c=f,p=f[pt]||null)S=p.formAction;else if(Lu(c)!==null)continue}else S=p.action;typeof S=="function"?i[r+1]=S:(i.splice(r,3),r-=3),Ig(i)}}}function Gg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return c=p})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),r||setTimeout(i,20)}function i(){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,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Bu(e){this._internalRoot=e}Sr.prototype.render=Bu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,r=Rt();zg(i,r,e,t,null,null)},Sr.prototype.unmount=Bu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zg(e.current,2,null,e,null,null),er(),t[Ua]=null}};function Sr(e){this._internalRoot=e}Sr.prototype.unstable_scheduleHydration=function(e){if(e){var t=eh();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ta.length&&t!==0&&t<ta[i].priority;i++);ta.splice(i,0,e),i===0&&Hg(e)}};var qg=a.version;if(qg!=="19.2.4")throw Error(o(527,qg,"19.2.4"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var lw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xr.isDisabled&&xr.supportsFiber)try{zi=xr.inject(lw),wt=xr}catch{}}return Es.createRoot=function(e,t){if(!l(e))throw Error(o(299));var i=!1,r="",c=Wm,f=Jm,p=ep;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=Og(e,1,!1,null,null,i,r,null,c,f,p,Gg),e[Ua]=t.current,yu(e),new Bu(t)},Es.hydrateRoot=function(e,t,i){if(!l(e))throw Error(o(299));var r=!1,c="",f=Wm,p=Jm,S=ep,C=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(p=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),t=Og(e,1,!0,t,i??null,r,c,C,f,p,S,Gg),t.context=Lg(null),i=t.current,r=Rt(),r=Al(r),c=_n(r),c.callback=null,Hn(i,c,r),i=r,t.current.lanes=i,Ui(t,i),sn(t),e[Ua]=t.current,yu(e),new Sr(t)},Es.version="19.2.4",Es}var Wg;function KC(){if(Wg)return Uu.exports;Wg=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(a){console.error(a)}}return n(),Uu.exports=qC(),Uu.exports}var YC=KC();const{slice:XC,forEach:QC}=[];function ZC(n){return QC.call(XC.call(arguments,1),a=>{if(a)for(const s in a)n[s]===void 0&&(n[s]=a[s])}),n}function $C(n){return typeof n!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(s=>s.test(n))}const Jg=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,WC=function(n,a){const o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},l=encodeURIComponent(a);let u=`${n}=${l}`;if(o.maxAge>0){const d=o.maxAge-0;if(Number.isNaN(d))throw new Error("maxAge should be a Number");u+=`; Max-Age=${Math.floor(d)}`}if(o.domain){if(!Jg.test(o.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${o.domain}`}if(o.path){if(!Jg.test(o.path))throw new TypeError("option path is invalid");u+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(u+="; HttpOnly"),o.secure&&(u+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(u+="; Partitioned"),u},ey={create(n,a,s,o){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};s&&(l.expires=new Date,l.expires.setTime(l.expires.getTime()+s*60*1e3)),o&&(l.domain=o),document.cookie=WC(n,a,l)},read(n){const a=`${n}=`,s=document.cookie.split(";");for(let o=0;o<s.length;o++){let l=s[o];for(;l.charAt(0)===" ";)l=l.substring(1,l.length);if(l.indexOf(a)===0)return l.substring(a.length,l.length)}return null},remove(n,a){this.create(n,"",-1,a)}};var JC={name:"cookie",lookup(n){let{lookupCookie:a}=n;if(a&&typeof document<"u")return ey.read(a)||void 0},cacheUserLanguage(n,a){let{lookupCookie:s,cookieMinutes:o,cookieDomain:l,cookieOptions:u}=a;s&&typeof document<"u"&&ey.create(s,n,o,l,u)}},eD={name:"querystring",lookup(n){let{lookupQuerystring:a}=n,s;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const u=o.substring(1).split("&");for(let d=0;d<u.length;d++){const h=u[d].indexOf("=");h>0&&u[d].substring(0,h)===a&&(s=u[d].substring(h+1))}}return s}},tD={name:"hash",lookup(n){let{lookupHash:a,lookupFromHashIndex:s}=n,o;if(typeof window<"u"){const{hash:l}=window.location;if(l&&l.length>2){const u=l.substring(1);if(a){const d=u.split("&");for(let h=0;h<d.length;h++){const m=d[h].indexOf("=");m>0&&d[h].substring(0,m)===a&&(o=d[h].substring(m+1))}}if(o)return o;if(!o&&s>-1){const d=l.match(/\/([a-zA-Z-]*)/g);return Array.isArray(d)?d[typeof s=="number"?s:0]?.replace("/",""):void 0}}}return o}};let xi=null;const ty=()=>{if(xi!==null)return xi;try{if(xi=typeof window<"u"&&window.localStorage!==null,!xi)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{xi=!1}return xi};var nD={name:"localStorage",lookup(n){let{lookupLocalStorage:a}=n;if(a&&ty())return window.localStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupLocalStorage:s}=a;s&&ty()&&window.localStorage.setItem(s,n)}};let Ti=null;const ny=()=>{if(Ti!==null)return Ti;try{if(Ti=typeof window<"u"&&window.sessionStorage!==null,!Ti)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Ti=!1}return Ti};var aD={name:"sessionStorage",lookup(n){let{lookupSessionStorage:a}=n;if(a&&ny())return window.sessionStorage.getItem(a)||void 0},cacheUserLanguage(n,a){let{lookupSessionStorage:s}=a;s&&ny()&&window.sessionStorage.setItem(s,n)}},iD={name:"navigator",lookup(n){const a=[];if(typeof navigator<"u"){const{languages:s,userLanguage:o,language:l}=navigator;if(s)for(let u=0;u<s.length;u++)a.push(s[u]);o&&a.push(o),l&&a.push(l)}return a.length>0?a:void 0}},sD={name:"htmlTag",lookup(n){let{htmlTag:a}=n,s;const o=a||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(s=o.getAttribute("lang")),s}},oD={name:"path",lookup(n){let{lookupFromPathIndex:a}=n;if(typeof window>"u")return;const s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof a=="number"?a:0]?.replace("/",""):void 0}},rD={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:a}=n;const s=typeof a=="number"?a+1:1,o=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(o)return o[s]}};let Rb=!1;try{document.cookie,Rb=!0}catch{}const jb=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Rb||jb.splice(1,1);const lD=()=>({order:jb,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class Ob{constructor(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(a,s)}init(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=a,this.options=ZC(s,this.options||{},lD()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=l=>l.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(JC),this.addDetector(eD),this.addDetector(nD),this.addDetector(aD),this.addDetector(iD),this.addDetector(sD),this.addDetector(oD),this.addDetector(rD),this.addDetector(tD)}addDetector(a){return this.detectors[a.name]=a,this}detect(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,s=[];return a.forEach(o=>{if(this.detectors[o]){let l=this.detectors[o].lookup(this.options);l&&typeof l=="string"&&(l=[l]),l&&(s=s.concat(l))}}),s=s.filter(o=>o!=null&&!$C(o)).map(o=>this.options.convertDetectedLanguage(o)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?s:s.length>0?s[0]:null}cacheUserLanguage(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;s&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(a)>-1||s.forEach(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(a,this.options)}))}}Ob.type="languageDetector";var _u={};const ae=n=>typeof n=="string",Ms=()=>{let n,a;const s=new Promise((o,l)=>{n=o,a=l});return s.resolve=n,s.reject=a,s},ay=n=>n==null?"":""+n,cD=(n,a,s)=>{n.forEach(o=>{a[o]&&(s[o]=a[o])})},uD=/###/g,iy=n=>n&&n.indexOf("###")>-1?n.replace(uD,"."):n,sy=n=>!n||ae(n),Os=(n,a,s)=>{const o=ae(a)?a.split("."):a;let l=0;for(;l<o.length-1;){if(sy(n))return{};const u=iy(o[l]);!n[u]&&s&&(n[u]=new s),Object.prototype.hasOwnProperty.call(n,u)?n=n[u]:n={},++l}return sy(n)?{}:{obj:n,k:iy(o[l])}},oy=(n,a,s)=>{const{obj:o,k:l}=Os(n,a,Object);if(o!==void 0||a.length===1){o[l]=s;return}let u=a[a.length-1],d=a.slice(0,a.length-1),h=Os(n,d,Object);for(;h.obj===void 0&&d.length;)u=`${d[d.length-1]}.${u}`,d=d.slice(0,d.length-1),h=Os(n,d,Object),h?.obj&&typeof h.obj[`${h.k}.${u}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${u}`]=s},fD=(n,a,s,o)=>{const{obj:l,k:u}=Os(n,a,Object);l[u]=l[u]||[],l[u].push(s)},Gr=(n,a)=>{const{obj:s,k:o}=Os(n,a);if(s&&Object.prototype.hasOwnProperty.call(s,o))return s[o]},dD=(n,a,s)=>{const o=Gr(n,s);return o!==void 0?o:Gr(a,s)},Lb=(n,a,s)=>{for(const o in a)o!=="__proto__"&&o!=="constructor"&&(o in n?ae(n[o])||n[o]instanceof String||ae(a[o])||a[o]instanceof String?s&&(n[o]=a[o]):Lb(n[o],a[o],s):n[o]=a[o]);return n},Ea=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hD={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const mD=n=>ae(n)?n.replace(/[&<>"'\/]/g,a=>hD[a]):n;class pD{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const s=this.regExpMap.get(a);if(s!==void 0)return s;const o=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,o),this.regExpQueue.push(a),o}}const gD=[" ",",","?","!",";"],yD=new pD(20),vD=(n,a,s)=>{a=a||"",s=s||"";const o=gD.filter(d=>a.indexOf(d)<0&&s.indexOf(d)<0);if(o.length===0)return!0;const l=yD.getRegExp(`(${o.map(d=>d==="?"?"\\?":d).join("|")})`);let u=!l.test(n);if(!u){const d=n.indexOf(s);d>0&&!l.test(n.substring(0,d))&&(u=!0)}return u},pf=(n,a,s=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const o=a.split(s);let l=n;for(let u=0;u<o.length;){if(!l||typeof l!="object")return;let d,h="";for(let m=u;m<o.length;++m)if(m!==u&&(h+=s),h+=o[m],d=l[h],d!==void 0){if(["string","number","boolean"].indexOf(typeof d)>-1&&m<o.length-1)continue;u+=m-u+1;break}l=d}return l},Hs=n=>n?.replace(/_/g,"-"),bD={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){console?.[n]?.apply?.(console,a)}};class qr{constructor(a,s={}){this.init(a,s)}init(a,s={}){this.prefix=s.prefix||"i18next:",this.logger=a||bD,this.options=s,this.debug=s.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,s,o,l){return l&&!this.debug?null:(ae(a[0])&&(a[0]=`${o}${this.prefix} ${a[0]}`),this.logger[s](a))}create(a){return new qr(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new qr(this.logger,a)}}var ln=new qr;class ul{constructor(){this.observers={}}on(a,s){return a.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const l=this.observers[o].get(s)||0;this.observers[o].set(s,l+1)}),this}off(a,s){if(this.observers[a]){if(!s){delete this.observers[a];return}this.observers[a].delete(s)}}emit(a,...s){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([l,u])=>{for(let d=0;d<u;d++)l(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([l,u])=>{for(let d=0;d<u;d++)l.apply(l,[a,...s])})}}class ry extends ul{constructor(a,s={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const s=this.options.ns.indexOf(a);s>-1&&this.options.ns.splice(s,1)}getResource(a,s,o,l={}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,d=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;a.indexOf(".")>-1?h=a.split("."):(h=[a,s],o&&(Array.isArray(o)?h.push(...o):ae(o)&&u?h.push(...o.split(u)):h.push(o)));const m=Gr(this.data,h);return!m&&!s&&!o&&a.indexOf(".")>-1&&(a=h[0],s=h[1],o=h.slice(2).join(".")),m||!d||!ae(o)?m:pf(this.data?.[a]?.[s],o,u)}addResource(a,s,o,l,u={silent:!1}){const d=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let h=[a,s];o&&(h=h.concat(d?o.split(d):o)),a.indexOf(".")>-1&&(h=a.split("."),l=s,s=h[1]),this.addNamespaces(s),oy(this.data,h,l),u.silent||this.emit("added",a,s,o,l)}addResources(a,s,o,l={silent:!1}){for(const u in o)(ae(o[u])||Array.isArray(o[u]))&&this.addResource(a,s,u,o[u],{silent:!0});l.silent||this.emit("added",a,s,o)}addResourceBundle(a,s,o,l,u,d={silent:!1,skipCopy:!1}){let h=[a,s];a.indexOf(".")>-1&&(h=a.split("."),l=o,o=s,s=h[1]),this.addNamespaces(s);let m=Gr(this.data,h)||{};d.skipCopy||(o=JSON.parse(JSON.stringify(o))),l?Lb(m,o,u):m={...m,...o},oy(this.data,h,m),d.silent||this.emit("added",a,s,o)}removeResourceBundle(a,s){this.hasResourceBundle(a,s)&&delete this.data[a][s],this.removeNamespaces(s),this.emit("removed",a,s)}hasResourceBundle(a,s){return this.getResource(a,s)!==void 0}getResourceBundle(a,s){return s||(s=this.options.defaultNS),this.getResource(a,s)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const s=this.getDataByLanguage(a);return!!(s&&Object.keys(s)||[]).find(l=>s[l]&&Object.keys(s[l]).length>0)}toJSON(){return this.data}}var zb={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,s,o,l){return n.forEach(u=>{a=this.processors[u]?.process(a,s,o,l)??a}),a}};const Bb=Symbol("i18next/PATH_KEY");function SD(){const n=[],a=Object.create(null);let s;return a.get=(o,l)=>(s?.revoke?.(),l===Bb?n:(n.push(l),s=Proxy.revocable(o,a),s.proxy)),Proxy.revocable(Object.create(null),a).proxy}function Ei(n,a){const{[Bb]:s}=n(SD()),o=a?.keySeparator??".",l=a?.nsSeparator??":";if(s.length>1&&l){const u=a?.ns,d=Array.isArray(u)?u:null;if(d&&d.length>1&&d.slice(1).includes(s[0]))return`${s[0]}${l}${s.slice(1).join(o)}`}return s.join(o)}const ly={},Hu=n=>!ae(n)&&typeof n!="boolean"&&typeof n!="number";class Kr extends ul{constructor(a,s={}){super(),cD(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ln.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,s={interpolation:{}}){const o={...s};if(a==null)return!1;const l=this.resolve(a,o);if(l?.res===void 0)return!1;const u=Hu(l.res);return!(o.returnObjects===!1&&u)}extractFromKey(a,s){let o=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let u=s.ns||this.options.defaultNS||[];const d=o&&a.indexOf(o)>-1,h=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!vD(a,o,l);if(d&&!h){const m=a.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:a,namespaces:ae(u)?[u]:u};const g=a.split(o);(o!==l||o===l&&this.options.ns.indexOf(g[0])>-1)&&(u=g.shift()),a=g.join(l)}return{key:a,namespaces:ae(u)?[u]:u}}translate(a,s,o){let l=typeof s=="object"?{...s}:s;if(typeof l!="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),typeof l=="object"&&(l={...l}),l||(l={}),a==null)return"";typeof a=="function"&&(a=Ei(a,{...this.options,...l})),Array.isArray(a)||(a=[String(a)]),a=a.map(le=>typeof le=="function"?Ei(le,{...this.options,...l}):String(le));const u=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,d=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,{key:h,namespaces:m}=this.extractFromKey(a[a.length-1],l),g=m[m.length-1];let b=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;b===void 0&&(b=":");const v=l.lng||this.language,x=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v?.toLowerCase()==="cimode")return x?u?{res:`${g}${b}${h}`,usedKey:h,exactUsedKey:h,usedLng:v,usedNS:g,usedParams:this.getUsedParamsDetails(l)}:`${g}${b}${h}`:u?{res:h,usedKey:h,exactUsedKey:h,usedLng:v,usedNS:g,usedParams:this.getUsedParamsDetails(l)}:h;const D=this.resolve(a,l);let w=D?.res;const R=D?.usedKey||h,L=D?.exactUsedKey||h,M=["[object Number]","[object Function]","[object RegExp]"],V=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,j=l.count!==void 0&&!ae(l.count),F=Kr.hasDefaultValue(l),X=j?this.pluralResolver.getSuffix(v,l.count,l):"",ie=l.ordinal&&j?this.pluralResolver.getSuffix(v,l.count,{ordinal:!1}):"",Q=j&&!l.ordinal&&l.count===0,G=Q&&l[`defaultValue${this.options.pluralSeparator}zero`]||l[`defaultValue${X}`]||l[`defaultValue${ie}`]||l.defaultValue;let I=w;z&&!w&&F&&(I=G);const ee=Hu(I),ne=Object.prototype.toString.apply(I);if(z&&I&&ee&&M.indexOf(ne)<0&&!(ae(V)&&Array.isArray(I))){if(!l.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(R,I,{...l,ns:m}):`key '${h} (${this.language})' returned an object instead of string.`;return u?(D.res=le,D.usedParams=this.getUsedParamsDetails(l),D):le}if(d){const le=Array.isArray(I),ye=le?[]:{},Be=le?L:R;for(const U in I)if(Object.prototype.hasOwnProperty.call(I,U)){const q=`${Be}${d}${U}`;F&&!w?ye[U]=this.translate(q,{...l,defaultValue:Hu(G)?G[U]:void 0,joinArrays:!1,ns:m}):ye[U]=this.translate(q,{...l,joinArrays:!1,ns:m}),ye[U]===q&&(ye[U]=I[U])}w=ye}}else if(z&&ae(V)&&Array.isArray(w))w=w.join(V),w&&(w=this.extendTranslation(w,a,l,o));else{let le=!1,ye=!1;!this.isValidLookup(w)&&F&&(le=!0,w=G),this.isValidLookup(w)||(ye=!0,w=h);const U=(l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ye?void 0:w,q=F&&G!==w&&this.options.updateMissing;if(ye||le||q){if(this.logger.log(q?"updateKey":"missingKey",v,g,h,q?G:w),d){const de=this.resolve(h,{...l,keySeparator:!1});de&&de.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 Y=[];const se=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&se&&se[0])for(let de=0;de<se.length;de++)Y.push(se[de]);else this.options.saveMissingTo==="all"?Y=this.languageUtils.toResolveHierarchy(l.lng||this.language):Y.push(l.lng||this.language);const fe=(de,ve,he)=>{const Fe=F&&he!==w?he:U;this.options.missingKeyHandler?this.options.missingKeyHandler(de,g,ve,Fe,q,l):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(de,g,ve,Fe,q,l),this.emit("missingKey",de,g,ve,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?Y.forEach(de=>{const ve=this.pluralResolver.getSuffixes(de,l);Q&&l[`defaultValue${this.options.pluralSeparator}zero`]&&ve.indexOf(`${this.options.pluralSeparator}zero`)<0&&ve.push(`${this.options.pluralSeparator}zero`),ve.forEach(he=>{fe([de],h+he,l[`defaultValue${he}`]||G)})}):fe(Y,h,G))}w=this.extendTranslation(w,a,l,D,o),ye&&w===h&&this.options.appendNamespaceToMissingKey&&(w=`${g}${b}${h}`),(ye||le)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${b}${h}`:h,le?w:void 0,l))}return u?(D.res=w,D.usedParams=this.getUsedParamsDetails(l),D):w}extendTranslation(a,s,o,l,u){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const m=ae(a)&&(o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(m){const v=a.match(this.interpolator.nestingRegexp);g=v&&v.length}let b=o.replace&&!ae(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),a=this.interpolator.interpolate(a,b,o.lng||this.language||l.usedLng,o),m){const v=a.match(this.interpolator.nestingRegexp),x=v&&v.length;g<x&&(o.nest=!1)}!o.lng&&l&&l.res&&(o.lng=this.language||l.usedLng),o.nest!==!1&&(a=this.interpolator.nest(a,(...v)=>u?.[0]===v[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${s[0]}`),null):this.translate(...v,s),o)),o.interpolation&&this.interpolator.reset()}const d=o.postProcess||this.options.postProcess,h=ae(d)?[d]:d;return a!=null&&h?.length&&o.applyPostProcessor!==!1&&(a=zb.handle(h,a,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),a}resolve(a,s={}){let o,l,u,d,h;return ae(a)&&(a=[a]),Array.isArray(a)&&(a=a.map(m=>typeof m=="function"?Ei(m,{...this.options,...s}):m)),a.forEach(m=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(m,s),b=g.key;l=b;let v=g.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const x=s.count!==void 0&&!ae(s.count),D=x&&!s.ordinal&&s.count===0,w=s.context!==void 0&&(ae(s.context)||typeof s.context=="number")&&s.context!=="",R=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);v.forEach(L=>{this.isValidLookup(o)||(h=L,!ly[`${R[0]}-${L}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(h)&&(ly[`${R[0]}-${L}`]=!0,this.logger.warn(`key "${l}" for languages "${R.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!!!")),R.forEach(M=>{if(this.isValidLookup(o))return;d=M;const V=[b];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(V,b,M,L,s);else{let j;x&&(j=this.pluralResolver.getSuffix(M,s.count,s));const F=`${this.options.pluralSeparator}zero`,X=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(s.ordinal&&j.indexOf(X)===0&&V.push(b+j.replace(X,this.options.pluralSeparator)),V.push(b+j),D&&V.push(b+F)),w){const ie=`${b}${this.options.contextSeparator||"_"}${s.context}`;V.push(ie),x&&(s.ordinal&&j.indexOf(X)===0&&V.push(ie+j.replace(X,this.options.pluralSeparator)),V.push(ie+j),D&&V.push(ie+F))}}let z;for(;z=V.pop();)this.isValidLookup(o)||(u=z,o=this.getResource(M,L,z,s))}))})}),{res:o,usedKey:l,exactUsedKey:u,usedLng:d,usedNS:h}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,s,o,l={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,s,o,l):this.resourceStore.getResource(a,s,o,l)}getUsedParamsDetails(a={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=a.replace&&!ae(a.replace);let l=o?a.replace:a;if(o&&typeof a.count<"u"&&(l.count=a.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!o){l={...l};for(const u of s)delete l[u]}return l}static hasDefaultValue(a){const s="defaultValue";for(const o in a)if(Object.prototype.hasOwnProperty.call(a,o)&&s===o.substring(0,s.length)&&a[o]!==void 0)return!0;return!1}}class cy{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ln.create("languageUtils")}getScriptPartFromCode(a){if(a=Hs(a),!a||a.indexOf("-")<0)return null;const s=a.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(a){if(a=Hs(a),!a||a.indexOf("-")<0)return a;const s=a.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(a){if(ae(a)&&a.indexOf("-")>-1){let s;try{s=Intl.getCanonicalLocales(a)[0]}catch{}return s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let s;return a.forEach(o=>{if(s)return;const l=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(l))&&(s=l)}),!s&&this.options.supportedLngs&&a.forEach(o=>{if(s)return;const l=this.getScriptPartFromCode(o);if(this.isSupportedCode(l))return s=l;const u=this.getLanguagePartFromCode(o);if(this.isSupportedCode(u))return s=u;s=this.options.supportedLngs.find(d=>{if(d===u)return d;if(!(d.indexOf("-")<0&&u.indexOf("-")<0)&&(d.indexOf("-")>0&&u.indexOf("-")<0&&d.substring(0,d.indexOf("-"))===u||d.indexOf(u)===0&&u.length>1))return d})}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(a,s){if(!a)return[];if(typeof a=="function"&&(a=a(s)),ae(a)&&(a=[a]),Array.isArray(a))return a;if(!s)return a.default||[];let o=a[s];return o||(o=a[this.getScriptPartFromCode(s)]),o||(o=a[this.formatLanguageCode(s)]),o||(o=a[this.getLanguagePartFromCode(s)]),o||(o=a.default),o||[]}toResolveHierarchy(a,s){const o=this.getFallbackCodes((s===!1?[]:s)||this.options.fallbackLng||[],a),l=[],u=d=>{d&&(this.isSupportedCode(d)?l.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return ae(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(a))):ae(a)&&u(this.formatLanguageCode(a)),o.forEach(d=>{l.indexOf(d)<0&&u(this.formatLanguageCode(d))}),l}}const uy={zero:0,one:1,two:2,few:3,many:4,other:5},fy={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xD{constructor(a,s={}){this.languageUtils=a,this.options=s,this.logger=ln.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(a,s={}){const o=Hs(a==="dev"?"en":a),l=s.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:o,type:l});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let d;try{d=new Intl.PluralRules(o,{type:l})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),fy;if(!a.match(/-|_/))return fy;const m=this.languageUtils.getLanguagePartFromCode(a);d=this.getRule(m,s)}return this.pluralRulesCache[u]=d,d}needsPlural(a,s={}){let o=this.getRule(a,s);return o||(o=this.getRule("dev",s)),o?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,s,o={}){return this.getSuffixes(a,o).map(l=>`${s}${l}`)}getSuffixes(a,s={}){let o=this.getRule(a,s);return o||(o=this.getRule("dev",s)),o?o.resolvedOptions().pluralCategories.sort((l,u)=>uy[l]-uy[u]).map(l=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(a,s,o={}){const l=this.getRule(a,o);return l?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${l.select(s)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",s,o))}}const dy=(n,a,s,o=".",l=!0)=>{let u=dD(n,a,s);return!u&&l&&ae(s)&&(u=pf(n,s,o),u===void 0&&(u=pf(a,s,o))),u},Fu=n=>n.replace(/\$/g,"$$$$");class hy{constructor(a={}){this.logger=ln.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(s=>s),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:s,escapeValue:o,useRawValueToEscape:l,prefix:u,prefixEscaped:d,suffix:h,suffixEscaped:m,formatSeparator:g,unescapeSuffix:b,unescapePrefix:v,nestingPrefix:x,nestingPrefixEscaped:D,nestingSuffix:w,nestingSuffixEscaped:R,nestingOptionsSeparator:L,maxReplaces:M,alwaysFormat:V}=a.interpolation;this.escape=s!==void 0?s:mD,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=u?Ea(u):d||"{{",this.suffix=h?Ea(h):m||"}}",this.formatSeparator=g||",",this.unescapePrefix=b?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=x?Ea(x):D||Ea("$t("),this.nestingSuffix=w?Ea(w):R||Ea(")"),this.nestingOptionsSeparator=L||",",this.maxReplaces=M||1e3,this.alwaysFormat=V!==void 0?V:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(s,o)=>s?.source===o?(s.lastIndex=0,s):new RegExp(o,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(a,s,o,l){let u,d,h;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=D=>{if(D.indexOf(this.formatSeparator)<0){const M=dy(s,m,D,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,o,{...l,...s,interpolationkey:D}):M}const w=D.split(this.formatSeparator),R=w.shift().trim(),L=w.join(this.formatSeparator).trim();return this.format(dy(s,m,R,this.options.keySeparator,this.options.ignoreJSONStructure),L,o,{...l,...s,interpolationkey:R})};this.resetRegExp();const b=l?.missingInterpolationHandler||this.options.missingInterpolationHandler,v=l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:D=>Fu(D)},{regex:this.regexp,safeValue:D=>this.escapeValue?Fu(this.escape(D)):Fu(D)}].forEach(D=>{for(h=0;u=D.regex.exec(a);){const w=u[1].trim();if(d=g(w),d===void 0)if(typeof b=="function"){const L=b(a,u,l);d=ae(L)?L:""}else if(l&&Object.prototype.hasOwnProperty.call(l,w))d="";else if(v){d=u[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${a}`),d="";else!ae(d)&&!this.useRawValueToEscape&&(d=ay(d));const R=D.safeValue(d);if(a=a.replace(u[0],R),v?(D.regex.lastIndex+=d.length,D.regex.lastIndex-=u[0].length):D.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),a}nest(a,s,o={}){let l,u,d;const h=(m,g)=>{const b=this.nestingOptionsSeparator;if(m.indexOf(b)<0)return m;const v=m.split(new RegExp(`${Ea(b)}[ ]*{`));let x=`{${v[1]}`;m=v[0],x=this.interpolate(x,d);const D=x.match(/'/g),w=x.match(/"/g);((D?.length??0)%2===0&&!w||(w?.length??0)%2!==0)&&(x=x.replace(/'/g,'"'));try{d=JSON.parse(x),g&&(d={...g,...d})}catch(R){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,R),`${m}${b}${x}`}return d.defaultValue&&d.defaultValue.indexOf(this.prefix)>-1&&delete d.defaultValue,m};for(;l=this.nestingRegexp.exec(a);){let m=[];d={...o},d=d.replace&&!ae(d.replace)?d.replace:d,d.applyPostProcessor=!1,delete d.defaultValue;const g=/{.*}/.test(l[1])?l[1].lastIndexOf("}")+1:l[1].indexOf(this.formatSeparator);if(g!==-1&&(m=l[1].slice(g).split(this.formatSeparator).map(b=>b.trim()).filter(Boolean),l[1]=l[1].slice(0,g)),u=s(h.call(this,l[1].trim(),d),d),u&&l[0]===a&&!ae(u))return u;ae(u)||(u=ay(u)),u||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${a}`),u=""),m.length&&(u=m.reduce((b,v)=>this.format(b,v,o.lng,{...o,interpolationkey:l[1].trim()}),u.trim())),a=a.replace(l[0],u),this.regexp.lastIndex=0}return a}}const TD=n=>{let a=n.toLowerCase().trim();const s={};if(n.indexOf("(")>-1){const o=n.split("(");a=o[0].toLowerCase().trim();const l=o[1].substring(0,o[1].length-1);a==="currency"&&l.indexOf(":")<0?s.currency||(s.currency=l.trim()):a==="relativetime"&&l.indexOf(":")<0?s.range||(s.range=l.trim()):l.split(";").forEach(d=>{if(d){const[h,...m]=d.split(":"),g=m.join(":").trim().replace(/^'+|'+$/g,""),b=h.trim();s[b]||(s[b]=g),g==="false"&&(s[b]=!1),g==="true"&&(s[b]=!0),isNaN(g)||(s[b]=parseInt(g,10))}})}return{formatName:a,formatOptions:s}},my=n=>{const a={};return(s,o,l)=>{let u=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(u={...u,[l.interpolationkey]:void 0});const d=o+JSON.stringify(u);let h=a[d];return h||(h=n(Hs(o),l),a[d]=h),h(s)}},wD=n=>(a,s,o)=>n(Hs(s),o)(a);class CD{constructor(a={}){this.logger=ln.create("formatter"),this.options=a,this.init(a)}init(a,s={interpolation:{}}){this.formatSeparator=s.interpolation.formatSeparator||",";const o=s.cacheInBuiltFormats?my:wD;this.formats={number:o((l,u)=>{const d=new Intl.NumberFormat(l,{...u});return h=>d.format(h)}),currency:o((l,u)=>{const d=new Intl.NumberFormat(l,{...u,style:"currency"});return h=>d.format(h)}),datetime:o((l,u)=>{const d=new Intl.DateTimeFormat(l,{...u});return h=>d.format(h)}),relativetime:o((l,u)=>{const d=new Intl.RelativeTimeFormat(l,{...u});return h=>d.format(h,u.range||"day")}),list:o((l,u)=>{const d=new Intl.ListFormat(l,{...u});return h=>d.format(h)})}}add(a,s){this.formats[a.toLowerCase().trim()]=s}addCached(a,s){this.formats[a.toLowerCase().trim()]=my(s)}format(a,s,o,l={}){const u=s.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(h=>h.indexOf(")")>-1)){const h=u.findIndex(m=>m.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,h)].join(this.formatSeparator)}return u.reduce((h,m)=>{const{formatName:g,formatOptions:b}=TD(m);if(this.formats[g]){let v=h;try{const x=l?.formatParams?.[l.interpolationkey]||{},D=x.locale||x.lng||l.locale||l.lng||o;v=this.formats[g](h,D,{...b,...l,...x})}catch(x){this.logger.warn(x)}return v}else this.logger.warn(`there was no format function for ${g}`);return h},a)}}const DD=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class AD extends ul{constructor(a,s,o,l={}){super(),this.backend=a,this.store=s,this.services=o,this.languageUtils=o.languageUtils,this.options=l,this.logger=ln.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(o,l.backend,l)}queueLoad(a,s,o,l){const u={},d={},h={},m={};return a.forEach(g=>{let b=!0;s.forEach(v=>{const x=`${g}|${v}`;!o.reload&&this.store.hasResourceBundle(g,v)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?d[x]===void 0&&(d[x]=!0):(this.state[x]=1,b=!1,d[x]===void 0&&(d[x]=!0),u[x]===void 0&&(u[x]=!0),m[v]===void 0&&(m[v]=!0)))}),b||(h[g]=!0)}),(Object.keys(u).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(u),pending:Object.keys(d),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(m)}}loaded(a,s,o){const l=a.split("|"),u=l[0],d=l[1];s&&this.emit("failedLoading",u,d,s),!s&&o&&this.store.addResourceBundle(u,d,o,void 0,void 0,{skipCopy:!0}),this.state[a]=s?-1:2,s&&o&&(this.state[a]=0);const h={};this.queue.forEach(m=>{fD(m.loaded,[u],d),DD(m,a),s&&m.errors.push(s),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(g=>{h[g]||(h[g]={});const b=m.loaded[g];b.length&&b.forEach(v=>{h[g][v]===void 0&&(h[g][v]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(m=>!m.done)}read(a,s,o,l=0,u=this.retryTimeout,d){if(!a.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:s,fcName:o,tried:l,wait:u,callback:d});return}this.readingCalls++;const h=(g,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(g&&b&&l<this.maxRetries){setTimeout(()=>{this.read.call(this,a,s,o,l+1,u*2,d)},u);return}d(g,b)},m=this.backend[o].bind(this.backend);if(m.length===2){try{const g=m(a,s);g&&typeof g.then=="function"?g.then(b=>h(null,b)).catch(h):h(null,g)}catch(g){h(g)}return}return m(a,s,h)}prepareLoading(a,s,o={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();ae(a)&&(a=this.languageUtils.toResolveHierarchy(a)),ae(s)&&(s=[s]);const u=this.queueLoad(a,s,o,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(d=>{this.loadOne(d)})}load(a,s,o){this.prepareLoading(a,s,{},o)}reload(a,s,o){this.prepareLoading(a,s,{reload:!0},o)}loadOne(a,s=""){const o=a.split("|"),l=o[0],u=o[1];this.read(l,u,"read",void 0,void 0,(d,h)=>{d&&this.logger.warn(`${s}loading namespace ${u} for language ${l} failed`,d),!d&&h&&this.logger.log(`${s}loaded namespace ${u} for language ${l}`,h),this.loaded(a,d,h)})}saveMissing(a,s,o,l,u,d={},h=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(s)){this.logger.warn(`did not save key "${o}" as the namespace "${s}" 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(!(o==null||o==="")){if(this.backend?.create){const m={...d,isUpdate:u},g=this.backend.create.bind(this.backend);if(g.length<6)try{let b;g.length===5?b=g(a,s,o,l,m):b=g(a,s,o,l),b&&typeof b.then=="function"?b.then(v=>h(null,v)).catch(h):h(null,b)}catch(b){h(b)}else g(a,s,o,l,h,m)}!a||!a[0]||this.store.addResource(a[0],s,o,l)}}}const Iu=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",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 a={};if(typeof n[1]=="object"&&(a=n[1]),ae(n[1])&&(a.defaultValue=n[1]),ae(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const s=n[3]||n[2];Object.keys(s).forEach(o=>{a[o]=s[o]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),py=n=>(ae(n.ns)&&(n.ns=[n.ns]),ae(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),ae(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),Tr=()=>{},ED=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(s=>{typeof n[s]=="function"&&(n[s]=n[s].bind(n))})},Ub="__i18next_supportNoticeShown",MD=()=>!!(typeof globalThis<"u"&&globalThis[Ub]||typeof process<"u"&&_u&&_u.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&_u),kD=()=>{typeof globalThis<"u"&&(globalThis[Ub]=!0)},ND=n=>!!(n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(a=>a?.name?.indexOf("Locize")>0||a?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(a=>a?.projectId));class Ls extends ul{constructor(a={},s){if(super(),this.options=py(a),this.services={},this.logger=ln,this.modules={external:[]},ED(this),s&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,s),this;setTimeout(()=>{this.init(a,s)},0)}}init(a={},s){this.isInitializing=!0,typeof a=="function"&&(s=a,a={}),a.defaultNS==null&&a.ns&&(ae(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const o=Iu();this.options={...o,...this.options,...py(a)},this.options.interpolation={...o.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=o.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ND(this)&&!MD()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),kD());const l=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?ln.init(l(this.modules.logger),this.options):ln.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=CD;const b=new cy(this.options);this.store=new ry(this.options.resources,this.options);const v=this.services;v.logger=ln,v.resourceStore=this.store,v.languageUtils=b,v.pluralResolver=new xD(b,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),g&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(v.formatter=l(g),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new hy(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new AD(l(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(D,...w)=>{this.emit(D,...w)}),this.modules.languageDetector&&(v.languageDetector=l(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=l(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new Kr(this.services,this.options),this.translator.on("*",(D,...w)=>{this.emit(D,...w)}),this.modules.external.forEach(D=>{D.init&&D.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Tr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[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(g=>{this[g]=(...b)=>this.store[g](...b)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...b)=>(this.store[g](...b),this)});const h=Ms(),m=()=>{const g=(b,v)=>{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(v),s(b,v)};if(this.languages&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),h}loadResources(a,s=Tr){let o=s;const l=ae(a)?a:this.language;if(typeof a=="function"&&(o=a),!this.options.resources||this.options.partialBundledLanguages){if(l?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const u=[],d=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(g=>{g!=="cimode"&&u.indexOf(g)<0&&u.push(g)})};l?d(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>d(m)),this.options.preload?.forEach?.(h=>d(h)),this.services.backendConnector.load(u,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(h)})}else o(null)}reloadResources(a,s,o){const l=Ms();return typeof a=="function"&&(o=a,a=void 0),typeof s=="function"&&(o=s,s=void 0),a||(a=this.languages),s||(s=this.options.ns),o||(o=Tr),this.services.backendConnector.reload(a,s,u=>{l.resolve(),o(u)}),l}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&zb.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let s=0;s<this.languages.length;s++){const o=this.languages[s];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,s){this.isLanguageChangingTo=a;const o=Ms();this.emit("languageChanging",a);const l=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},u=(h,m)=>{m?this.isLanguageChangingTo===a&&(l(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,o.resolve((...g)=>this.t(...g)),s&&s(h,(...g)=>this.t(...g))},d=h=>{!a&&!h&&this.services.languageDetector&&(h=[]);const m=ae(h)?h:h&&h[0],g=this.store.hasLanguageSomeTranslations(m)?m:this.services.languageUtils.getBestMatchFromCodes(ae(h)?[h]:h);g&&(this.language||l(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,b=>{u(b,g)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!a&&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(a),o}getFixedT(a,s,o){const l=(u,d,...h)=>{let m;typeof d!="object"?m=this.options.overloadTranslationOptionHandler([u,d].concat(h)):m={...d},m.lng=m.lng||l.lng,m.lngs=m.lngs||l.lngs,m.ns=m.ns||l.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||o||l.keyPrefix);const g={...this.options,...m};typeof m.keyPrefix=="function"&&(m.keyPrefix=Ei(m.keyPrefix,g));const b=this.options.keySeparator||".";let v;return m.keyPrefix&&Array.isArray(u)?v=u.map(x=>(typeof x=="function"&&(x=Ei(x,g)),`${m.keyPrefix}${b}${x}`)):(typeof u=="function"&&(u=Ei(u,g)),v=m.keyPrefix?`${m.keyPrefix}${b}${u}`:u),this.t(v,m)};return ae(a)?l.lng=a:l.lngs=a,l.ns=s,l.keyPrefix=o,l}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,s={}){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 o=s.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const d=(h,m)=>{const g=this.services.backendConnector.state[`${h}|${m}`];return g===-1||g===0||g===2};if(s.precheck){const h=s.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(o,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(o,a)&&(!l||d(u,a)))}loadNamespaces(a,s){const o=Ms();return this.options.ns?(ae(a)&&(a=[a]),a.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{o.resolve(),s&&s(l)}),o):(s&&s(),Promise.resolve())}loadLanguages(a,s){const o=Ms();ae(a)&&(a=[a]);const l=this.options.preload||[],u=a.filter(d=>l.indexOf(d)<0&&this.services.languageUtils.isSupportedCode(d));return u.length?(this.options.preload=l.concat(u),this.loadResources(d=>{o.resolve(),s&&s(d)}),o):(s&&s(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const l=new Intl.Locale(a);if(l&&l.getTextInfo){const u=l.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const s=["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"],o=this.services?.languageUtils||new cy(Iu());return a.toLowerCase().indexOf("-latn")>1?"ltr":s.indexOf(o.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},s){const o=new Ls(a,s);return o.createInstance=Ls.createInstance,o}cloneInstance(a={},s=Tr){const o=a.forkResourceStore;o&&delete a.forkResourceStore;const l={...this.options,...a,isClone:!0},u=new Ls(l);if((a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a)),["store","services","language"].forEach(h=>{u[h]=this[h]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},o){const h=Object.keys(this.store.data).reduce((m,g)=>(m[g]={...this.store.data[g]},m[g]=Object.keys(m[g]).reduce((b,v)=>(b[v]={...m[g][v]},b),m[g]),m),{});u.store=new ry(h,l),u.services.resourceStore=u.store}if(a.interpolation){const m={...Iu().interpolation,...this.options.interpolation,...a.interpolation},g={...l,interpolation:m};u.services.interpolator=new hy(g)}return u.translator=new Kr(u.services,l),u.translator.on("*",(h,...m)=>{u.emit(h,...m)}),u.init(l,s),u.translator.options=l,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ut=Ls.createInstance();ut.createInstance;ut.dir;ut.init;ut.loadResources;ut.reloadResources;ut.use;ut.changeLanguage;ut.getFixedT;ut.t;ut.exists;ut.setDefaultNamespace;ut.hasLoadedNamespace;ut.loadNamespaces;ut.loadLanguages;const RD=(n,a,s,o)=>{const l=[s,{code:a,...o||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(l,"warn","react-i18next::",!0);za(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...l):console?.warn&&console.warn(...l)},gy={},gf=(n,a,s,o)=>{za(s)&&gy[s]||(za(s)&&(gy[s]=new Date),RD(n,a,s,o))},Vb=(n,a)=>()=>{if(n.isInitialized)a();else{const s=()=>{setTimeout(()=>{n.off("initialized",s)},0),a()};n.on("initialized",s)}},yf=(n,a,s)=>{n.loadNamespaces(a,Vb(n,s))},yy=(n,a,s,o)=>{if(za(s)&&(s=[s]),n.options.preload&&n.options.preload.indexOf(a)>-1)return yf(n,s,o);s.forEach(l=>{n.options.ns.indexOf(l)<0&&n.options.ns.push(l)}),n.loadLanguages(a,Vb(n,o))},jD=(n,a,s={})=>!a.languages||!a.languages.length?(gf(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:s.lng,precheck:(o,l)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!l(o.isLanguageChangingTo,n))return!1}}),za=n=>typeof n=="string",OD=n=>typeof n=="object"&&n!==null,LD=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,zD={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},BD=n=>zD[n],UD=n=>n.replace(LD,BD);let vf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:UD,transDefaultProps:void 0};const VD=(n={})=>{vf={...vf,...n}},PD=()=>vf;let Pb;const _D=n=>{Pb=n},HD=()=>Pb,FD={type:"3rdParty",init(n){VD(n.options.react),_D(n)}},ID=T.createContext();class GD{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const qD=(n,a)=>{if(za(a))return a;if(OD(a)&&za(a.defaultValue))return a.defaultValue;if(typeof n=="function")return"";if(Array.isArray(n)){const s=n[n.length-1];return typeof s=="function"?"":s}return n},KD={t:qD,ready:!1},YD=()=>()=>{},Nn=(n,a={})=>{const{i18n:s}=a,{i18n:o,defaultNS:l}=T.useContext(ID)||{},u=s||o||HD();u&&!u.reportNamespaces&&(u.reportNamespaces=new GD),u||gf(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=T.useMemo(()=>({...PD(),...u?.options?.react,...a}),[u,a]),{useSuspense:h,keyPrefix:m}=d,g=l||u?.options?.defaultNS,b=za(g)?[g]:g||["translation"],v=T.useMemo(()=>b,b);u?.reportNamespaces?.addUsedNamespaces?.(v);const x=T.useRef(0),D=T.useCallback(G=>{if(!u)return YD;const{bindI18n:I,bindI18nStore:ee}=d,ne=()=>{x.current+=1,G()};return I&&u.on(I,ne),ee&&u.store.on(ee,ne),()=>{I&&I.split(" ").forEach(le=>u.off(le,ne)),ee&&ee.split(" ").forEach(le=>u.store.off(le,ne))}},[u,d]),w=T.useRef(),R=T.useCallback(()=>{if(!u)return KD;const G=!!(u.isInitialized||u.initializedStoreOnce)&&v.every(Be=>jD(Be,u,d)),I=a.lng||u.language,ee=x.current,ne=w.current;if(ne&&ne.ready===G&&ne.lng===I&&ne.keyPrefix===m&&ne.revision===ee)return ne;const ye={t:u.getFixedT(I,d.nsMode==="fallback"?v:v[0],m),ready:G,lng:I,keyPrefix:m,revision:ee};return w.current=ye,ye},[u,v,m,d,a.lng]),[L,M]=T.useState(0),{t:V,ready:z}=xw.useSyncExternalStore(D,R,R);T.useEffect(()=>{if(u&&!z&&!h){const G=()=>M(I=>I+1);a.lng?yy(u,a.lng,v,G):yf(u,v,G)}},[u,a.lng,v,z,h,L]);const j=u||{},F=T.useRef(null),X=T.useRef(),ie=G=>{const I=Object.getOwnPropertyDescriptors(G);I.__original&&delete I.__original;const ee=Object.create(Object.getPrototypeOf(G),I);if(!Object.prototype.hasOwnProperty.call(ee,"__original"))try{Object.defineProperty(ee,"__original",{value:G,writable:!1,enumerable:!1,configurable:!1})}catch{}return ee},Q=T.useMemo(()=>{const G=j,I=G?.language;let ee=G;G&&(F.current&&F.current.__original===G?X.current!==I?(ee=ie(G),F.current=ee,X.current=I):ee=F.current:(ee=ie(G),F.current=ee,X.current=I));const ne=!z&&!h?(...ye)=>(gf(u,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),V(...ye)):V,le=[ne,ee,z];return le.t=ne,le.i18n=ee,le.ready=z,le},[V,j,z,j.resolvedLanguage,j.language,j.languages]);if(u&&h&&!z)throw new Promise(G=>{const I=()=>G();a.lng?yy(u,a.lng,v,I):yf(u,v,I)});return Q},XD={collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",toggleConnection:"Toggle backend connection",viewAnnualSummary:"View annual summary",annualSummary:"2025 Annual Summary",searchPlaceholder:"Search...",viewDocs:"View MaiBot docs",docs:"MaiBot Docs",switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode",logout:"Log out",logoutLabel:"Logout",notConnected:"Not connected"},QD={groups:{overview:"Overview",botConfig:"Bot Configuration",botResources:"Bot Resources",extensionsMonitor:"Plugins & Extensions",system:"System"},menu:{home:"Home",botMainConfig:"Bot Main Config",aiModelProvider:"AI Model Providers",modelManagement:"Model Management",promptManagement:"Prompt Management",adapterConfig:"Adapter Config",emojiManagement:"Emoji Management",expressionManagement:"Expression Management",slangManagement:"Slang Management",personInfo:"Person Info",knowledgeGraph:"Long-Term Memory Graph",knowledgeBase:"Long-Term Memory",pluginMarket:"Plugin Market",configTemplate:"Config Templates",pluginConfig:"Plugin Management",mcpSettings:"MCP Settings",logViewer:"Log Viewer",reasoningProcess:"Reasoning Process",maisakaMonitor:"MaiSaka Chat Monitor",localChat:"Local Chat",settings:"Settings"}},ZD={switcherLabel:"Switch MaiBot workspace",settings:"Mai Settings",chat:"Mai Chat"},$D={defaultTab:"WebUI",botNameFallback:"Mai",userFallback:"User",userNameFallback:"WebUI User",virtualGroupFallback:"WebUI Virtual Group",status:{connected:"Connected",connecting:"Connecting...",disconnected:"Disconnected"},actions:{cancel:"Cancel",reconnect:"Reconnect",save:"Save",send:"Send message"},identity:{current:"Current identity:",editName:"Edit nickname",group:"Group: {{group}}",namePlaceholder:"Enter nickname",virtual:"Virtual identity:"},input:{placeholder:"Type a message...",waiting:"Waiting for connection..."},message:{empty:"Start chatting with {{bot}}!",emptyHint:"Type a message below and press Enter to send",errorFallback:"An error occurred",thinking:"Thinking..."},composer:{hint:"Enter to send · Shift + Enter for newline"},sidebar:{closeConversation:"Close {{label}}",conversations:"Chat conversations",emptyPreview:"No messages yet",identityHint:"Local chat identity",newVirtual:"New virtual identity chat",online:"Online",offline:"Offline",subtitle:"{{count}} conversations",title:"Chats",webuiBadge:"WebUI",virtualBadge:"Virtual",profileTitle:"My identity",editName:"Edit nickname",saveName:"Save"},dialog:{create:"Create chat",description:"Choose a user MaiBot already knows and chat as that user. MaiBot will respond using her memory and understanding of that user.",groupName:"Virtual group name (optional)",groupNameHint:"MaiBot will treat this as a group chat with this name",knownUserSuffix:" · Known",loading:"Loading...",noUsers:"No users found",personCount:"({{count}} people)",platform:"Select platform",platformPlaceholder:"Select platform",searchUser:"Search user...",title:"New virtual identity chat",user:"Select user"},media:{audioUnsupported:"Your browser does not support audio playback",emoji:"Emoji",face:"[Face: {{data}}]",file:"[File: {{data}}]",forward:"[Forwarded message]",image:"Image",loadFailed:"[{{type}} failed to load]",music:"[Music share]",noCaptions:"No captions",reply:"[Reply]",unknown:"[{{type}}]",unknownMessage:"Unknown message",videoUnsupported:"Your browser does not support video playback"},toast:{backendUnavailable:"Cannot connect to the backend. Make sure MaiBot is running.",backendUnavailableShort:"Cannot connect to the backend",connectionFailed:"Connection failed",currentSessionUnavailable:"The current chat session is unavailable. Please try again later.",error:"Error",incompleteConfig:"Incomplete configuration",networkError:"Network error",platformFailed:"Failed to load platforms",selectPlatformAndUser:"Please select a platform and user",sendFailed:"Send failed",serverError:"Server returned error: {{status}}",sessionUnavailable:"Cannot open the chat session. Please try again later.",virtualTabCreated:"Virtual identity tab",virtualTabCreatedDesc:"Created a chat for {{label}}"}},WD={verifyingLogin:"Verifying login status...",logoTitle:"MaiBot WebUI",logoTitleShort:"M"},JD={title:"Security notice: ",message:"You are accessing WebUI over HTTP.",description:"Non-local HTTP connections may expose access tokens and configuration data. Use HTTPS or a trusted private network when possible.",dismiss:"Dismiss HTTP security notice"},eA=JSON.parse('{"title":"Settings","description":"Manage your application preferences","tabs":{"appearance":"Appearance","security":"Security","other":"Other","about":"About"},"appearance":{"themeMode":"Theme Mode","themeModeDesc":"Light / Dark / Follow system","light":"Light","dark":"Dark","system":"System","accentColor":"Accent Color","resetDefault":"Reset Default","colorPreview":"Live Color Preview","styleTweaks":"Style Tweaks","typography":"Typography","visualEffects":"Visual Effects","layout":"Layout","animation":"Animation","background":"Background","customCss":"Custom CSS","animationEffect":"Animation Effect","importExportTheme":"Import / Export Theme","importTheme":"Import Theme","exportTheme":"Export Theme","importSuccess":"Import successful","importFailed":"Import failed","resetSuccess":"Reset successful","fontFamily":"Font Family","fontSize":"Font Size","borderRadius":"Border Radius","contentWidth":"Content Width","sidebarWidth":"Sidebar Width","animationSpeed":"Animation Speed","backgroundImage":"Background Image","backgroundBlur":"Background Blur","backgroundOpacity":"Background Opacity","lightDesc":"Always use light theme","darkDesc":"Always use dark theme","systemDesc":"Auto-switch based on system settings","accentPrimary":"Primary Color","accentHint":"Click the color ring or enter a HEX value","resetTheme":"Reset to Default","confirmResetTheme":"Confirm Reset Theme","confirmResetThemeDesc":"This will reset all theme settings to default, including colors, fonts, layout and custom CSS. This cannot be undone, are you sure?","confirmResetAction":"Confirm Reset","cssWarningTitle":"The following have been filtered for safety:","cssPlaceholder":"/* Enter custom CSS here */\\n\\n/* Example: */\\n/* .sidebar { background: #1a1a2e; } */","cssDescription":"Write custom CSS to further personalize the interface. Dangerous CSS (like @import, url()) will be automatically filtered.","clearCss":"Clear","exportDesc":"Export theme as a JSON file for sharing or backup; all settings will be applied automatically on import.","importSuccessDesc":"Theme config imported, page will reload automatically","resetSuccessDesc":"Theme has been reset to default","enableAnimations":"Enable Animations","enableAnimationsDesc":"Disabling this will turn off all transition animations and effects, improving performance","loginWavesBackground":"Login Page Wave Background","loginWavesBackgroundDesc":"Disabling this will use a solid color background on the login page, suitable for low-performance devices","inheritParentBg":"Inherit Parent Background","inheritParentBgDesc":"When enabled, uses the background config from the parent layer","fontFamilyLabel":"Font Family","fontFamilyPlaceholder":"Select font family","fontFamilySystem":"System Default (System)","fontFamilySans":"Sans-serif","fontFamilySerif":"Serif","fontFamilyMono":"Monospace","baseFontSize":"Base Font Size","lineHeight":"Line Height","lineHeightPlaceholder":"Select line height","lineHeightCompact":"Compact (1.2)","lineHeightNormal":"Normal (1.5)","lineHeightLoose":"Loose (1.75)","borderRadiusLabel":"Border Radius","shadowLabel":"Shadow Intensity","shadowPlaceholder":"Select shadow intensity","shadowNone":"None","shadowSm":"Small","shadowMd":"Medium","shadowLg":"Large","shadowXl":"Extra Large","blurLabel":"Blur Effect","sidebarWidthLabel":"Sidebar Width","maxContentWidth":"Max Content Width","spacingUnit":"Spacing Unit","animationSpeedLabel":"Animation Speed","animationSpeedPlaceholder":"Select animation speed","animationFast":"Fast (100ms)","animationNormal":"Normal (300ms)","animationSlow":"Slow (500ms)","animationOff":"Off (0ms)","bgPage":"Page","bgSidebar":"Sidebar","typographyGroup":"Typography","visualGroup":"Visual Effects","layoutGroup":"Layout","animationGroup":"Animation","backgroundGroup":"Background Settings"},"security":{"currentToken":"Current Access Token","yourToken":"Your Access Token","regenerate":"Regenerate","customToken":"Custom Access Token","securityTip":"Security Tips","cannotCopy":"Cannot copy","copySuccess":"Copied","copyFailed":"Copy failed","updateSuccess":"Updated","updateFailed":"Update failed","generateSuccess":"Generated","generateFailed":"Generation failed","newToken":"New Access Token","confirmRegenerate":"Confirm Regenerate Token","confirmRegenerateDesc":"The old token will be invalidated after regeneration. You will need to log in again.","cancel":"Cancel","confirm":"Confirm","cannotCopyDesc":"Token is stored in a secure Cookie. Please regenerate to get a new Token.","copySuccessDesc":"Token copied to clipboard","copyFailedDesc":"Please copy the Token manually","inputError":"Input error","inputErrorDesc":"Please enter a new Token","formatError":"Format error","formatErrorDesc":"Token does not meet requirements: {{failedRules}}","updateSuccessDesc":"Access Token updated. Redirecting to login page.","updateFailedDesc":"Unable to update Token","updateFailedConn":"Failed to connect to server","generateSuccessDesc":"New Access Token generated. Please save it immediately.","generateFailedDesc":"Unable to generate new Token","generateFailedConn":"Failed to connect to server","cannotView":"Cannot view","cannotViewDesc":"Token is stored in a secure Cookie. Click \\"Regenerate\\" to get a new Token.","hide":"Hide","show":"Show","copyTip":"Copy to clipboard","regenerateShort":"Generate","confirmRegenerateFullDesc":"This will generate a new 64-character secure token, immediately invalidating the current Token. You will need to log in again with the new Token. This action cannot be undone. Are you sure?","confirmGenerate":"Confirm Generate","tokenStorePlaceholder":"Token is stored in a secure Cookie","safekeepTip":"Keep your Access Token safe and do not share it with others.","newTokenLabel":"New Access Token","customTokenPlaceholder":"Enter custom Token","tokenReqTitle":"Token security requirements:","tokenValid":"Token format is valid and ready to use","updateBtn":"Update Custom Token","updating":"Updating...","dialogTitle":"New Access Token","dialogDesc":"This is your new Token. Please save it immediately. You will be redirected to the login page after closing this window.","dialogTokenLabel":"Your new Token (64-char secure token)","important":"Important Notice","tip1":"This Token is only shown once and cannot be viewed after closing","tip2":"Copy and save it to a secure location immediately","tip3":"You will be automatically redirected to the login page after closing","tip4":"Use the new Token to log back in","copied":"Copied","copyToken":"Copy Token","savedClose":"Saved, close","securityTip1":"Regenerating creates a new system-generated 64-character secure token","securityTip2":"Custom Tokens must meet all security requirements","securityTip3":"After updating, the old Token will be immediately invalidated","securityTip4":"View and copy your Token only in a secure environment","securityTip5":"If you suspect a Token leak, regenerate or update it immediately","securityTip6":"System-generated Tokens are recommended for maximum security"},"other":{"performance":"Performance & Storage","localStorage":"Local Storage Usage","logCache":"Log Cache Size","importExport":"Import / Export Settings","configWizard":"Config Wizard","devTools":"Developer Tools","clearStorage":"Clear Local Storage","clearStorageDesc":"Clear all local storage data","clearStorageConfirm":"Confirm Clear","clearLogCache":"Clear Log Cache","clearLogCacheDesc":"Clear all cached log data","clearLogCacheConfirm":"Confirm Clear","importSettings":"Import Settings","exportSettings":"Export Settings","resetAllSettings":"Reset All Settings","resetAllSettingsDesc":"Restore all settings to defaults","resetAllSettingsConfirm":"Confirm Reset","clearStorageSuccess":"Local storage cleared","clearStorageFailed":"Failed to clear","clearLogSuccess":"Log cache cleared","clearLogFailed":"Failed to clear","importSuccess":"Import successful","importFailed":"Import failed","exportSuccess":"Export successful","exportFailed":"Export failed","resetSuccess":"Reset successful","resetFailed":"Reset failed","storageItems":"{{count}} storage items","logCacheSizeDesc":"Controls the maximum number of log entries cached. Larger values use more memory.","logCacheSizeUnit":"entries","dataSyncIntervalLabel":"Home Data Refresh Interval","dataSyncIntervalUnit":"s","dataSyncIntervalDesc":"Controls the auto-refresh interval for home page statistics","wsReconnectLabel":"WebSocket Reconnect Interval","wsReconnectUnit":"s","wsReconnectDesc":"Base reconnect interval after log WebSocket disconnects","wsMaxReconnectLabel":"WebSocket Max Reconnect Attempts","wsMaxReconnectUnit":"times","wsMaxReconnectDesc":"Maximum reconnect attempts after connection failure","clearLogCacheFn":"Clear Log Cache","clearLocalCache":"Clear Local Cache","confirmClearCache":"Confirm Clear Local Cache","confirmClearCacheDesc":"This will clear all locally cached settings and data (excluding login credentials). You may need to reconfigure some preferences. Are you sure?","confirmClear":"Confirm Clear","importExportDesc":"Export current interface settings for backup, or restore from a previously exported file.","exporting":"Exporting...","importing":"Importing...","resetAllSettingsBtn":"Reset All Settings to Defaults","confirmResetAll":"Confirm Reset All Settings","confirmResetAllDesc":"This will restore all interface settings to their defaults, including theme, colors, animation, and other preferences. This will not affect your login status. Are you sure?","configWizardDesc":"Re-run the initial setup wizard to reconfigure system basics.","rerunSetup":"Re-run Initial Setup","confirmRerunSetup":"Confirm Re-run Setup","confirmRerunSetupDesc":"This will take you back to the initial setup wizard. You can reconfigure the system basics. Are you sure?","devToolsDesc":"The following features are for development and debugging only. They may cause crashes or abnormal behavior.","triggerError":"Trigger Test Error","confirmTriggerError":"Confirm Trigger Error","confirmTriggerErrorDesc":"This will manually trigger a React error to test the error boundary component. The page will display an error view; you can recover by refreshing the page or clicking Go Home.","confirmTrigger":"Confirm Trigger","logCleared":"Log cleared","logClearedDesc":"Log cache has been cleared","cacheCleared":"Cache cleared","cacheClearedDesc":"Cleared {{count}} cached items","exportSuccessDesc":"Settings exported as a JSON file","exportFailedDesc":"Unable to export settings","importSuccessDesc":"Successfully imported {{imported}} settings","importSkippedSuffix":", skipped {{skipped}}","importRefreshHint":"Note","importRefreshHintDesc":"Some settings require a page refresh to take full effect","importNoDataDesc":"No valid settings to import","importInvalidDesc":"Invalid file format","resetDone":"Reset done","resetDoneDesc":"All settings restored to defaults. Refresh the page to apply changes."},"about":{"openSource":"Open Source","aboutApp":"About MaiBot Dashboard","version":"Version:","author":"Author","techStack":"Tech Stack","frontendFramework":"Frontend Framework","uiComponents":"UI Components","backend":"Backend","buildTool":"Build Tool","openSourceThanks":"Open Source Libraries","openSourceLicense":"Open Source License","openSourceDesc":"This project is open source on GitHub. Give us a Star ⭐!","visitGitHub":"Visit GitHub","appDesc":"A modern Web management interface for MaiBot","maimaiCore":"MaiBot Core","uiFrameworkGroup":"UI Framework & Components","routingStateGroup":"Routing & State Management","formGroup":"Form Handling","utilsGroup":"Utility Libraries","animationGroup":"Animation","backendGroup":"Backend Framework","devToolsGroup":"Developer Tools","openSourceThanksDesc":"This project uses the following excellent open source libraries. Thank you for your contributions:","licenseDesc":"This project is licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute the software, provided you keep the same open source license.","licenseDeps":"All open source libraries used by this project comply with their respective licenses (MIT, Apache-2.0, BSD, etc.). Thank you to all open source contributors for your selfless work.","lib":{"react":"UI library for building user interfaces","shadcn":"Elegant React component library","radix":"Unstyled accessible component primitives","tailwind":"Utility-first CSS framework","lucide":"Beautiful icon library","tanstackRouter":"Type-safe routing library","zustand":"Lightweight state management","reactHookForm":"High-performance form library","zod":"TypeScript-first schema validation","clsx":"Conditional className builder","tailwindMerge":"Tailwind class name merger","cva":"Component variant management","dateFns":"Modern date utility library","framerMotion":"React animation library","vaul":"Drawer component animation","fastapi":"Modern Python web framework","uvicorn":"ASGI server","pydantic":"Data validation library","pythonMultipart":"File upload support","typescript":"Superset of JavaScript","vite":"Next-generation frontend build tool","eslint":"JavaScript code linter"}}}'),tA={title:"Login",description:"Enter your access token to continue",tokenLabel:"Access Token",tokenPlaceholder:"Enter Access Token",loginButton:"Login",loggingIn:"Logging in...",loginFailed:"Login failed",loginSuccess:"Login successful",checkingAuth:"Checking login status...",welcome:"Welcome to MaiBot",accessDesc:"Enter your Access Token to continue accessing the system",tokenRequired:"Please enter your Access Token",verifyingLabel:"Verifying...",verifyEnter:"Verify & Enter",helpLink:"I don't have a Token. Where can I get one?",helpTitle:"How to Get an Access Token",helpDesc:"Access Token is the only credential to access MaiBot WebUI. Get yours in one of the following ways",method1Title:"Method 1: Check Startup Log",method1Desc:"When MaiBot starts, the console will display the WebUI Access Token.",method1Example1:"🔑 WebUI Access Token: abc123...",method1Example2:"💡 Use this Token to log in to WebUI",method2Title:"Method 2: Check Config File",method2Desc:"The Token is saved in the config file at the project root:",method2FileHint:"Open this file and copy the value of the access_token field",securityTipTitle:"Security Notice",securityTip1:"Keep your Token safe and never share it with others",securityTip2:"To reset the Token, go to System Settings after logging in",slowLink:"The interface feels laggy. What can I do?",disableAnimTitle:"Disable Background Animation",disableAnimDesc:"Background animation may cause lag on low-performance devices. Disabling it can significantly improve smoothness.",disableAnimDetail:"After disabling, the background will be a solid color, but all features remain fully functional. You can re-enable it anytime in System Settings.",disableAnimBtn:"Disable Animation",verifyFailed:"Token verification failed. Please check and try again.",connFailed:"Failed to connect to the server. Please check your network connection.",switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode"},nA={steps:{botBasic:{title:"Bot Basics",description:"Configure the bot's basic information"},personality:{title:"Personality",description:"Define the bot's personality and speaking style"},apiProvider:{title:"API Setup",description:"Configure the API provider"},modelSetup:{title:"Model Setup",description:"Configure planner and replyer models"}},loading:{title:"Loading configuration...",description:"Reading existing configuration"},header:{title:"Initial Setup Wizard",description:"Let's complete the initial setup for {{appName}}"},progress:{stepCounter:"Step {{current}} / {{total}}"},validation:{selectPlatform:"Please select a platform",enterNickname:"Please enter a nickname",enterQqAccount:"Please enter a QQ account",enterAccountId:"Please enter an account ID",enterProviderName:"Please enter an API provider name",enterBaseUrl:"Please enter the API base URL",enterApiKey:"Please enter the API key",enterPlannerModelIdentifier:"Please enter the planner model identifier",enterReplyerModelIdentifier:"Please enter the replyer model identifier"},toast:{loadFailedTitle:"Failed to load configuration",loadFailedDescription:"Unable to load the existing configuration. Default values will be used.",saveSuccessTitle:"Saved successfully",saveSuccessDescription:"{{step}} configuration has been saved",saveFailedTitle:"Save failed",validationFailedTitle:"Validation failed",completeSuccessTitle:"Setup complete",completeSuccessDescription:"{{appName}} is restarting to apply the new configuration...",completeFailedTitle:"Setup failed",skipFailedTitle:"Failed to skip the setup wizard",unknownError:"Unknown error"},actions:{previous:"Previous",next:"Next",skip:"Skip Wizard",complete:"Complete Setup",saving:"Saving...",completing:"Completing..."},skipDialog:{title:"Skip the setup wizard?",description:"You can reopen the setup wizard anytime from System Settings. Are you sure you want to skip it?",confirm:"Skip Anyway"},footer:"You can change these settings anytime in Settings",defaults:{personality:{personality:"She is a sophomore college student who spends time on Tieba.",replyStyle:"Keep replies plain and concise, speak Chinese, and avoid deliberately emphasizing any academic background. You can refer to the reply styles commonly seen on Tieba, Zhihu, and Weibo.",multipleReplyStyles:{plain:"Your style is plain, lightly sarcastic, very short, and colloquial. You can reference Tieba and Weibo reply styles.",shortText:"Reply with 1-2 words",shortSymbol:"Reply with 1-2 symbols",translation:"Use a slightly translated tone, but keep it short"}},emoji:{filtrationPrompt:"Appropriate and safe for general audiences"}},forms:{botBasic:{platform:{label:"Platform *",placeholder:"Select a platform",description:"Choose the platform where the bot runs",options:{custom:"Other Platform"}},customPlatform:{label:"Platform Name *",placeholder:"Enter a platform name, such as matrix"},qqAccount:{label:"QQ Account *",placeholder:"Enter the bot's QQ account",description:"The QQ account used to log in the bot"},primaryAccount:{label:"Account ID *",placeholder:"Enter the bot's account ID",description:"The bot's account identifier on this platform"},nickname:{label:"Nickname *",placeholder:"Enter the bot's nickname",description:"The bot's primary display name"},alias:{label:"Aliases",placeholder:"Type an alias and press Enter to add it",add:"Add",description:"Other names for the bot. You can add multiple aliases.",remove:"Remove alias {{alias}}"}},personality:{personality:{label:"Personality Traits *",placeholder:"Describe the bot's personality and identity traits (recommended within 120 characters)",description:"Example: a sophomore college girl who browses Tieba"},replyStyle:{label:"Reply Style *",placeholder:"Describe how the bot speaks and expresses itself",description:"Example: keep replies plain and concise, speak Chinese, and refer to styles seen on Tieba, Zhihu, and Weibo"},multipleReplyStyle:{label:"Alternate Reply Styles",placeholder:"Enter one alternate reply style per line",description:"When this list is not empty, MaiBot may randomly replace the default reply style using the probability below"},multipleProbability:{label:"Alternate Style Probability",description:"The chance of randomly replacing the default reply style each time a reply is built"}},emoji:{emojiSendNum:{label:"Emoji Candidate Count",description:"How many emojis to choose from before sending. Maximum is 64"},maxRegNum:{label:"Maximum Emoji Count",description:"The maximum number of emojis the bot can store"},doReplace:{label:"Replace When Full",description:"When enabled, old emojis will be removed; when disabled, new emojis will no longer be collected"},checkInterval:{label:"Check Interval (Minutes)",description:"How often to check emoji registration, damage, and deletion"},stealEmoji:{label:"Collect Emojis",description:"Allow the bot to keep certain emojis for itself"},contentFiltration:{label:"Enable Emoji Filtering",description:"Only save emojis that meet the requirements"},filtrationPrompt:{label:"Filter Requirements",placeholder:"For example: appropriate and safe for general audiences",description:"Describe what kind of emojis should be allowed"}},other:{allGlobal:{label:"Enable Global Slang Mode",description:"Allow the bot to learn and use group-specific slang"}},apiProvider:{providerName:{label:"API Provider Name *",placeholder:"For example OpenAI, DeepSeek, or self-hosted",description:"This name is written to model_config.toml and referenced by the models below"},baseUrl:{label:"API Base URL *",description:"Enter an OpenAI-compatible endpoint, for example https://api.example.com/v1"},apiKey:{label:"API Key *",description:"Enter the API key for this provider",show:"Show API key",hide:"Hide API key"}},modelSetup:{planner:{identifier:{label:"planner Model Identifier *",description:"The real model ID provided by the API service; the model name will be initialized from it"},visual:{label:"Enable vision"}},replyer:{identifier:{label:"replyer Model Identifier *",description:"The real model ID provided by the API service; the model name will be initialized from it"},visual:{label:"Enable vision"}},saveHint:"You can configure more detailed task assignment later."}}},aA={loading:"Loading...",error:"Error",retry:"Retry",save:"Save",cancel:"Cancel",confirm:"Confirm",delete:"Delete",edit:"Edit",close:"Close",search:"Search",noData:"No data",success:"Success",failed:"Failed"},iA={preparing:"Preparing to restart",preparingDesc:"Sending restart request...",preparingTip:"🔄 Preparing to restart MaiBot...",restarting:"Restarting MaiBot",restartingDesc:"Please wait, MaiBot is restarting...",restartingTip:"🔄 Config saved, restarting main process...",checking:"Checking service status",checkingDesc:"Waiting for service to recover... ({{current}}/{{max}})",checkingTip:"⏳ Waiting for service to recover, do not close this page...",success:"Restart successful",successDesc:"Redirecting to login page...",successTip:"✅ Config applied, service is running normally",failed:"Restart timed out",failedDesc:"Service failed to recover within the expected time",failedTip:"⚠️ If unresponsive for a long time, try restarting manually",refreshPage:"Refresh page",retryCheck:"Retry check",elapsed:"Elapsed:"},sA={title:"Something went wrong",description:"The application encountered an unexpected error. You can try refreshing the page or going back home.",refreshPage:"Refresh page",goHome:"Go home",footer:"If the problem persists, copy the error info and report it to the developer",copiedToClipboard:"Copied to clipboard",copyError:"Copy error info"},oA={placeholder:"Search pages...",title:"Search",noResults:"No matching pages found",startSearch:"Type a keyword to start searching",navigate:"Navigate",select:"Select",close:"Close",categories:{overview:"Overview",config:"Config",resources:"Resources",monitor:"Monitor",extensions:"Extensions",system:"System"},items:{home:"Home",homeDesc:"View dashboard overview",botConfig:"Bot Main Config",botConfigDesc:"Configure bot core settings",modelProvider:"Model Provider Config",modelProviderDesc:"Configure model providers",model:"Model Config",modelDesc:"Configure model parameters",emoji:"Emoji Management",emojiDesc:"Manage bot emoji",expression:"Expression Management",expressionDesc:"Manage bot expressions",person:"Person Info",personDesc:"Manage person info",jargon:"Slang Management",jargonDesc:"Manage bot learned slang and jargon",statistics:"Statistics",statisticsDesc:"View usage statistics",plugins:"Plugin Market",pluginsDesc:"Browse and install plugins",logs:"Log Viewer",logsDesc:"View system logs",reasoningProcessDesc:"Browse Maisaka prompt reasoning logs",settings:"Settings",settingsDesc:"Configure system settings"}},rA={skipToContent:"Skip to main content",sidebarNav:"Main navigation",closeMenu:"Close menu",navigatedTo:"Navigated to {{page}}"},lA={title:"Live Monitor",subtitle:"MaiBot runtime status and statistics overview",loading:"Loading statistics...",loadingHint:"Fetching MaiBot runtime data",timeRange:{"24h":"24 Hours","7d":"7 Days","30d":"30 Days"},autoRefresh:"Auto Refresh",botStatus:{title:"MaiBot Status",running:"Running",stopped:"Stopped",uptime:"Up {{time}}"},quickActions:{title:"Quick Actions",restart:"Restart MaiBot",restarting:"Restarting...",expressionReview:"Expression Review",viewLogs:"View Logs",pluginManage:"Plugins",systemSettings:"Settings"},survey:{title:"Feedback Survey",description:"Help us improve the experience",webui:"WebUI Feedback",maibot:"MaiBot Feedback"},stats:{totalRequests:"Total Requests",totalCost:"Total Cost",tokenUsage:"Token Usage",avgResponse:"Avg Response",avgResponseDesc:"Avg API latency",onlineTime:"Online Time",messageProcessing:"Messages",costEfficiency:"Cost Efficiency",recentPeriod:"Last {{range}}",perHour:"{{value}}/hr",noData:"No data",replied:"{{num}} replies",per100Messages:"Per 100 messages",seconds:"sec",hours:"hours",days:"days"},charts:{tabs:{trends:"Trends",models:"Models",activity:"Activity",daily:"Daily"},requestTrend:"Request Trend",requestTrendDesc:"Request volume over the last {{hours}} hours",costTrend:"Cost Trend",costTrendDesc:"API call cost over time",tokenUsage:"Token Usage",tokenUsageDesc:"Token consumption over time",modelDistribution:"Model Request Distribution",modelDistributionDesc:"Usage share per model ({{count}} models)",modelDetails:"Model Details",modelDetailsDesc:"Requests, cost and performance",recentActivity:"Recent Activity",recentActivityDesc:"Latest API call records",dailyStats:"Daily Statistics",dailyStatsDesc:"Data summary for the last 7 days",requests:"Requests",cost:"Cost (¥)",requestCount:"Requests",costLabel:"Cost",avgTime:"Avg Time",timeCost:"Duration",status:"Status"},time:{hoursMinutes:"{{hours}}h {{minutes}}m"},hitokotoFallback:"Life is like a box of chocolates, you never know what you're gonna get.",hitokotoFallbackFrom:"Forrest Gump",unknownSource:"Unknown",ariaLabel:{requestTrend:"Hourly request trend chart showing request count changes over recent hours",costTrend:"API cost trend chart showing API call cost changes over recent hours",tokenUsage:"Token usage trend chart showing token consumption over recent hours"}},cA={header:XD,sidebar:QD,workspace:ZD,chat:$D,layout:WD,httpWarning:JD,settings:eA,auth:tA,setupPage:nA,common:aA,restart:iA,errorBoundary:sA,search:oA,a11y:rA,home:lA},uA={collapseSidebar:"サイドバーを折りたたむ",expandSidebar:"サイドバーを展開する",toggleConnection:"バックエンド接続を切り替える",viewAnnualSummary:"年間サマリーを表示",annualSummary:"2025 年間サマリー",searchPlaceholder:"検索...",viewDocs:"MaiBot ドキュメントを表示",docs:"MaiBot ドキュメント",switchToLight:"ライトモードに切り替える",switchToDark:"ダークモードに切り替える",logout:"ログアウト",logoutLabel:"ログアウト",notConnected:"未接続"},fA={groups:{overview:"概要",botConfig:"ボット設定",botResources:"ボットリソース",extensionsMonitor:"プラグインと拡張",system:"システム"},menu:{home:"ホーム",botMainConfig:"ボットメイン設定",aiModelProvider:"AIモデルプロバイダー",modelManagement:"モデル管理",promptManagement:"Prompt 管理",adapterConfig:"アダプター設定",emojiManagement:"絵文字管理",expressionManagement:"表現管理",slangManagement:"スラング管理",personInfo:"人物情報",knowledgeGraph:"長期記憶グラフ",knowledgeBase:"長期記憶",pluginMarket:"プラグインマーケット",configTemplate:"設定テンプレート",pluginConfig:"プラグイン管理",mcpSettings:"MCP 設定",logViewer:"ログビューア",reasoningProcess:"推論プロセス",maisakaMonitor:"MaiSaka チャット監視",localChat:"ローカルチャット",settings:"設定"}},dA={switcherLabel:"麦麦ワークスペースを切り替え",settings:"麦麦設定",chat:"麦麦チャット"},hA={defaultTab:"WebUI",botNameFallback:"麦麦",userFallback:"ユーザー",userNameFallback:"WebUIユーザー",virtualGroupFallback:"WebUI仮想グループチャット",status:{connected:"接続済み",connecting:"接続中...",disconnected:"未接続"},actions:{cancel:"キャンセル",reconnect:"再接続",save:"保存",send:"メッセージを送信"},identity:{current:"現在の身份:",editName:"ニックネームを変更",group:"グループ:{{group}}",namePlaceholder:"ニックネームを入力",virtual:"仮想身份:"},input:{placeholder:"メッセージを入力...",waiting:"接続待ち..."},message:{empty:"{{bot}} と会話を始めましょう!",emptyHint:"下の入力欄にメッセージを入力し、Enter キーで送信",errorFallback:"エラーが発生しました",thinking:"考え中..."},composer:{hint:"Enter で送信・Shift + Enter で改行"},sidebar:{closeConversation:"{{label}} を閉じる",conversations:"チャット会話",emptyPreview:"まだメッセージはありません",identityHint:"ローカルチャット身份",newVirtual:"仮想身份チャットを作成",online:"オンライン",offline:"オフライン",subtitle:"{{count}} 件の会話",title:"チャット",webuiBadge:"WebUI",virtualBadge:"仮想",profileTitle:"自分の身份",editName:"ニックネームを編集",saveName:"保存"},dialog:{create:"会話を作成",description:"麦麦がすでに知っているユーザーを選び、そのユーザーとして麦麦と会話します。麦麦はそのユーザーへの記憶と理解を使って返信します。",groupName:"仮想グループ名(任意)",groupNameHint:"麦麦はこれをこの名前のグループチャットとして認識します",knownUserSuffix:" · 既知",loading:"読み込み中...",noUsers:"ユーザーが見つかりません",personCount:"({{count}} 人)",platform:"プラットフォームを選択",platformPlaceholder:"プラットフォームを選択",searchUser:"ユーザー名を検索...",title:"仮想身份チャットを作成",user:"ユーザーを選択"},media:{audioUnsupported:"お使いのブラウザは音声再生に対応していません",emoji:"絵文字",face:"[表情:{{data}}]",file:"[ファイル: {{data}}]",forward:"[転送メッセージ]",image:"画像",loadFailed:"[{{type}}の読み込みに失敗]",music:"[音楽共有]",noCaptions:"字幕なし",reply:"[返信メッセージ]",unknown:"[{{type}}]",unknownMessage:"不明なメッセージ",videoUnsupported:"お使いのブラウザは動画再生に対応していません"},toast:{backendUnavailable:"バックエンドサービスに接続できません。MaiBot が起動しているか確認してください",backendUnavailableShort:"バックエンドサービスに接続できません",connectionFailed:"接続に失敗しました",currentSessionUnavailable:"現在のチャットセッションは利用できません。しばらくしてから再試行してください",error:"エラー",incompleteConfig:"設定が未完了です",networkError:"ネットワークエラー",platformFailed:"プラットフォームの取得に失敗しました",selectPlatformAndUser:"プラットフォームとユーザーを選択してください",sendFailed:"送信に失敗しました",serverError:"サーバーエラー: {{status}}",sessionUnavailable:"チャットセッションを開始できません。しばらくしてから再試行してください",virtualTabCreated:"仮想身份タブ",virtualTabCreatedDesc:"{{label}} の会話を作成しました"}},mA={verifyingLogin:"ログイン状態を確認中...",logoTitle:"MaiBot WebUI",logoTitleShort:"M"},pA={title:"セキュリティ通知:",message:"WebUI に HTTP でアクセスしています。",description:"ローカル以外の HTTP 接続では、アクセストークンや設定内容が漏えいする可能性があります。可能であれば HTTPS または信頼できる内網接続を使用してください。",dismiss:"HTTP セキュリティ通知を閉じる"},gA={title:"設定",description:"アプリの設定を管理する",tabs:{appearance:"外観",security:"セキュリティ",other:"その他",about:"について"},appearance:{themeMode:"テーマモード",themeModeDesc:"ライト / ダーク / システムに従う",light:"ライト",dark:"ダーク",system:"システム",accentColor:"アクセントカラー",resetDefault:"デフォルトにリセット",colorPreview:"カラープレビュー",styleTweaks:"スタイル調整",typography:"タイポグラフィ",visualEffects:"視覚効果",layout:"レイアウト",animation:"アニメーション",background:"背景",customCss:"カスタム CSS",animationEffect:"アニメーション効果",importExportTheme:"テーマのインポート / エクスポート",importTheme:"テーマをインポート",exportTheme:"テーマをエクスポート",importSuccess:"インポート成功",importFailed:"インポート失敗",resetSuccess:"リセット成功",fontFamily:"フォントファミリー",fontSize:"フォントサイズ",borderRadius:"ボーダー半径",contentWidth:"コンテンツ幅",sidebarWidth:"サイドバー幅",animationSpeed:"アニメーション速度",backgroundImage:"背景画像",backgroundBlur:"背景ぼかし",backgroundOpacity:"背景の透明度",lightDesc:"常にライトテーマを使用",darkDesc:"常にダークテーマを使用",systemDesc:"システム設定に従って自動切り替え",accentPrimary:"メインカラー",accentHint:"カラーリングをクリックするか、HEX 値を入力してください",resetTheme:"デフォルトにリセット",confirmResetTheme:"テーマのリセットを確認",confirmResetThemeDesc:"これにより、色、フォント、レイアウト、カスタム CSS を含むすべてのテーマ設定がデフォルトにリセットされます。この操作は元に戻せません。よろしいですか?",confirmResetAction:"リセットを確認",cssWarningTitle:"以下の内容はセキュリティフィルターされました:",cssPlaceholder:`/* カスタム CSS をここに入力 */
|
||
|
||
/* 例: */
|
||
/* .sidebar { background: #1a1a2e; } */`,cssDescription:"カスタム CSS を記述して、インターフェースをさらにカスタマイズしてください。危険な CSS(@import、url() など)は自動的にフィルターされます。",clearCss:"クリア",exportDesc:"テーマを JSON ファイルとしてエクスポートして共有またはバックアップ。インポート時にすべての設定が自動適用されます。",importSuccessDesc:"テーマ設定がインポートされました。ページが自動的にリロードされます",resetSuccessDesc:"テーマがデフォルトにリセットされました",enableAnimations:"アニメーションを有効にする",enableAnimationsDesc:"無効にすると、すべてのトランジションアニメーションとエフェクトが無効化されパフォーマンスが向上します",loginWavesBackground:"ログインページのウェーブ背景",loginWavesBackgroundDesc:"無効にするとログインページが単色背景になります。低スペックのデバイスに適しています",inheritParentBg:"上位背景を継承",inheritParentBgDesc:"有効にすると上位レイヤーの背景設定を使用します",fontFamilyLabel:"フォントファミリー",fontFamilyPlaceholder:"フォントファミリーを選択",fontFamilySystem:"システムデフォルト (System)",fontFamilySans:"サンセリフ (Sans-serif)",fontFamilySerif:"セリフ (Serif)",fontFamilyMono:"等幅 (Monospace)",baseFontSize:"基準フォントサイズ (Base Size)",lineHeight:"行の高さ (Line Height)",lineHeightPlaceholder:"行高を選択",lineHeightCompact:"コンパクト (1.2)",lineHeightNormal:"標準 (1.5)",lineHeightLoose:"ルーズ (1.75)",borderRadiusLabel:"圆角の大きさ (Radius)",shadowLabel:"シャドウの強度 (Shadow)",shadowPlaceholder:"シャドウの強度を選択",shadowNone:"なし (None)",shadowSm:"軽微 (Small)",shadowMd:"中程度 (Medium)",shadowLg:"強い (Large)",shadowXl:"極強 (Extra Large)",blurLabel:"ボカシ効果 (Blur)",sidebarWidthLabel:"サイドバー幅 (Sidebar Width)",maxContentWidth:"コンテンツ最大幅 (Max Width)",spacingUnit:"基準間隔 (Spacing Unit)",animationSpeedLabel:"アニメーション速度 (Speed)",animationSpeedPlaceholder:"アニメーション速度を選択",animationFast:"高速 (100ms)",animationNormal:"標準 (300ms)",animationSlow:"低速 (500ms)",animationOff:"オフ (0ms)",bgPage:"ページ",bgSidebar:"サイドバー",typographyGroup:"タイポグラフィ (Typography)",visualGroup:"視覚効果 (Visual)",layoutGroup:"レイアウト (Layout)",animationGroup:"アニメーション (Animation)",backgroundGroup:"背景設定 (Backgrounds)"},security:{currentToken:"現在のアクセストークン",yourToken:"あなたのアクセストークン",regenerate:"再生成",customToken:"カスタムアクセストークン",securityTip:"セキュリティのヒント",cannotCopy:"コピーできません",copySuccess:"コピーしました",copyFailed:"コピー失敗",updateSuccess:"更新しました",updateFailed:"更新失敗",generateSuccess:"生成しました",generateFailed:"生成失敗",newToken:"新しいアクセストークン",confirmRegenerate:"トークンの再生成を確認",confirmRegenerateDesc:"再生成後、古いトークンは無効になります。再ログインが必要です。",cancel:"キャンセル",confirm:"確認",cannotCopyDesc:"Token はセキュアな Cookie に保存されています。新しい Token を取得するには再生成してください。",copySuccessDesc:"Token をクリップボードにコピーしました",copyFailedDesc:"Token を手動でコピーしてください",inputError:"入力エラー",inputErrorDesc:"新しい Token を入力してください",formatError:"フォーマットエラー",formatErrorDesc:"Token が要件を満たしていません: {{failedRules}}",updateSuccessDesc:"Access Token を更新しました。ログインページにリダイレクトします。",updateFailedDesc:"Token を更新できません",updateFailedConn:"サーバーへの接続に失敗しました",generateSuccessDesc:"新しい Access Token を生成しました。すぐに保存してください。",generateFailedDesc:"新しい Token を生成できません",generateFailedConn:"サーバーへの接続に失敗しました",cannotView:"表示できません",cannotViewDesc:'Token はセキュアな Cookie に保存されています。新しい Token が必要な場合は"再生成"をクリックしてください。',hide:"非表示",show:"表示",copyTip:"クリップボードにコピー",regenerateShort:"生成する",confirmRegenerateFullDesc:"新しい 64 桁のセキュアトークンを生成し、現在の Token を即座に無効にします。新しい Token で再ログインが必要です。この操作は元に戻せません。続けますか?",confirmGenerate:"生成を確認",tokenStorePlaceholder:"Token はセキュアな Cookie に保存されています",safekeepTip:"Access Token を安全に保管し、他人に漏洩しないでください。",newTokenLabel:"新しいアクセストークン",customTokenPlaceholder:"カスタム Token を入力",tokenReqTitle:"Token セキュリティ要件:",tokenValid:"Token のフォーマットは正しく使用できます",updateBtn:"カスタム Token を更新",updating:"更新しています...",dialogTitle:"新しい Access Token",dialogDesc:"これが新しい Token です。すぐに保存してください。このウィンドウを閉じるとログインページにリダイレクトされます。",dialogTokenLabel:"新しい Token (64 桁セキュアトークン)",important:"重要なお知らせ",tip1:"この Token は一度しか表示されません。閉じた後は表示できません",tip2:"すぐにコピーして安全な場所に保存してください",tip3:"閉じると自動的にログインページにリダイレクトされます",tip4:"新しい Token で再ログインしてください",copied:"コピー済み",copyToken:"Token をコピー",savedClose:"保存しました。閉じる",securityTip1:"再生成するとシステムがランダムに生成した 64 桁のセキュアトークンが作成されます",securityTip2:"カスタム Token はすべてのセキュリティ要件を満たす必要があります",securityTip3:"Token を更新すると、古い Token は即座に無効になります",securityTip4:"安全な環境で Token を表示してコピーしてください",securityTip5:"Token の漏洩が疏われる場合は、すぐに再生成または更新してください",securityTip6:"最高のセキュリティのためにシステム生成の Token を推奨します"},other:{performance:"パフォーマンス & ストレージ",localStorage:"ローカルストレージ使用量",logCache:"ログキャッシュサイズ",importExport:"設定のインポート / エクスポート",configWizard:"設定ウィザード",devTools:"開発者ツール",clearStorage:"ローカルストレージを削除",clearStorageDesc:"すべてのローカルストレージデータを削除します",clearStorageConfirm:"削除を確認",clearLogCache:"ログキャッシュを削除",clearLogCacheDesc:"すべてのキャッシュされたログデータを削除します",clearLogCacheConfirm:"削除を確認",importSettings:"設定をインポート",exportSettings:"設定をエクスポート",resetAllSettings:"すべての設定をリセット",resetAllSettingsDesc:"すべての設定をデフォルトに戻します",resetAllSettingsConfirm:"リセットを確認",clearStorageSuccess:"ローカルストレージを削除しました",clearStorageFailed:"削除失敗",clearLogSuccess:"ログキャッシュを削除しました",clearLogFailed:"削除失敗",importSuccess:"インポート成功",importFailed:"インポート失敗",exportSuccess:"エクスポート成功",exportFailed:"エクスポート失敗",resetSuccess:"リセット成功",resetFailed:"リセット失敗",storageItems:"{{count}} 件のアイテム",logCacheSizeDesc:"ログビューアがキャッシュする最大ログ数を制御します。大きい値はより多くのメモリを使用します。",logCacheSizeUnit:"件",dataSyncIntervalLabel:"ホームデータ更新間隔",dataSyncIntervalUnit:"秒間",dataSyncIntervalDesc:"ホーム画面の統計データの自動更新間隔を制御します",wsReconnectLabel:"WebSocket 再接続間隔",wsReconnectUnit:"秒間",wsReconnectDesc:"ログ WebSocket 切断後の再接続基本間隔",wsMaxReconnectLabel:"WebSocket 最大再接続回数",wsMaxReconnectUnit:"回",wsMaxReconnectDesc:"接続失敗後の最大再接続試行回数",clearLogCacheFn:"ログキャッシュをクリア",clearLocalCache:"ローカルキャッシュをクリア",confirmClearCache:"ローカルキャッシュのクリアを確認",confirmClearCacheDesc:"ローカルにキャッシュされたすべての設定とデータ(ログイン資格情報を除く)をクリアします。一部の設定を再構成する必要があるかもしれません。続けますか?",confirmClear:"クリアを確認",importExportDesc:"現在のインターフェース設定をエクスポートしてバックアップしたり、以前のファイルから復元したりできます。",exporting:"エクスポート中...",importing:"インポート中...",resetAllSettingsBtn:"すべての設定をデフォルトにリセット",confirmResetAll:"すべての設定のリセットを確認",confirmResetAllDesc:"テーマ、色、アニメーションなどのインターフェース設定をデフォルトに戻します。ログイン状態には影響しません。続けますか?",configWizardDesc:"初回設定ウィザードを再実行してシステムの基本設定を再構成できます。",rerunSetup:"初回設定を再実行",confirmRerunSetup:"再構成を確認",confirmRerunSetupDesc:"初回設定ウィザードに戻ります。システムの基本設定を再設定できます。続けますか?",devToolsDesc:"以下の機能は開発・デバッグ目的のみです。クラッシュや異常動作を引き起こす可能性があります。",triggerError:"テストエラーを発生させる",confirmTriggerError:"エラーの発生を確認",confirmTriggerErrorDesc:"React エラーを手動で発生させ、エラーボーダーコンポーネントをテストします。ページを更新するかホームに戻ることで復元できます。",confirmTrigger:"発生を確認",logCleared:"ログをクリアしました",logClearedDesc:"ログキャッシュをクリアしました",cacheCleared:"キャッシュをクリアしました",cacheClearedDesc:"{{count}} 件のキャッシュデータをクリアしました",exportSuccessDesc:"設定を JSON ファイルとしてエクスポートしました",exportFailedDesc:"設定のエクスポートに失敗しました",importSuccessDesc:"{{imported}} 件の設定をインポートしました",importSkippedSuffix:"、{{skipped}} 件をスキップ",importRefreshHint:"お知らせ",importRefreshHintDesc:"一部の設定はページを更新するまで完全に有効になりません",importNoDataDesc:"インポートする有効な設定がありません",importInvalidDesc:"ファイルフォーマットが無効です",resetDone:"リセット完了",resetDoneDesc:"すべての設定がデフォルトに戻りました。変更を適用するにはページを更新してください。"},about:{openSource:"オープンソース",aboutApp:"MaiBot Dashboard について",version:"バージョン:",author:"開発者",techStack:"技術スタック",frontendFramework:"フロントエンドフレームワーク",uiComponents:"UI コンポーネント",backend:"バックエンド",buildTool:"ビルドツール",openSourceThanks:"使用オープンソースライブラリ",openSourceLicense:"オープンソースライセンス",openSourceDesc:"このプロジェクトは GitHub で公開されています。Star ⭐ でサポートしてください!",visitGitHub:"GitHub へ進む",appDesc:"MaiBot のモダンな Web 管理インターフェース",maimaiCore:"MaiBot コア",uiFrameworkGroup:"UI フレームワーク & コンポーネント",routingStateGroup:"ルーティング & 状態管理",formGroup:"フォーム処理",utilsGroup:"ユーティリティライブラリ",animationGroup:"アニメーション",backendGroup:"バックエンドフレームワーク",devToolsGroup:"開発ツール",openSourceThanksDesc:"このプロジェクトは以下の優れたオープンソースライブラリを使用しています。貢献に感謝します:",licenseDesc:"このプロジェクトは GNU General Public License v3.0 でライセンスされています。同じオープンソースライセンスを保持する限り、自由に使用・修改・配布できます。",licenseDeps:"このプロジェクトのすべての依存オープンソースライブラリはそれぞれのライセンス(MIT、Apache-2.0、BSD など)に従っています。すべてのオープンソース貢献者に感謝します。",lib:{react:"UIを構築するためのライブラリ",shadcn:"エレガントな React コンポーネントライブラリ",radix:"スタイルなしのアクセシブルなコンポーネント",tailwind:"ユーティリティファーストの CSS フレームワーク",lucide:"美しいアイコンライブラリ",tanstackRouter:"型安全なルーティングライブラリ",zustand:"軽量な状態管理ライブラリ",reactHookForm:"高パフォーマンスなフォームライブラリ",zod:"TypeScript ファーストのスキーマ検証",clsx:"条件付き className ビルダー",tailwindMerge:"Tailwind クラス名マージツール",cva:"コンポーネントバリアント管理",dateFns:"モダンな日付ユーティリティライブラリ",framerMotion:"React アニメーションライブラリ",vaul:"ドロワーコンポーネントアニメーション",fastapi:"モダンな Python Web フレームワーク",uvicorn:"ASGI サーバー",pydantic:"データ検証ライブラリ",pythonMultipart:"ファイルアップロードサポート",typescript:"JavaScript のスーパーセット",vite:"次世代フロントエンドビルドツール",eslint:"JavaScript コードリンター"}}},yA={title:"ログイン",description:"続行するにはアクセストークンを入力してください",tokenLabel:"アクセストークン",tokenPlaceholder:"アクセストークンを入力",loginButton:"ログイン",loggingIn:"ログイン中...",loginFailed:"ログイン失敗",loginSuccess:"ログイン成功",checkingAuth:"ログイン状態を確認中...",welcome:"MaiBot へようこそ",accessDesc:"システムにアクセスするためにアクセストークンを入力してください",tokenRequired:"アクセストークンを入力してください",verifyingLabel:"验証中...",verifyEnter:"验証して入る",helpLink:"Token がありません。どこで取得できますか?",helpTitle:"Access Token の取得方法",helpDesc:"Access Token は MaiBot WebUI にアクセスする唯一の証明情報です。次の方法で取得してください",method1Title:"方法1:起動ログを確認",method1Desc:"MaiBot 起動時にコンソールに WebUI Access Token が表示されます。",method1Example1:"🔑 WebUI Access Token: abc123...",method1Example2:"💡 この Token で WebUI にログインしてください",method2Title:"方法2:設定ファイルを確認",method2Desc:"Token はプロジェクトルートの設定ファイルに保存されています:",method2FileHint:"このファイルを開いて access_token フィールドの値をコピーしてください",securityTipTitle:"セキュリティノート",securityTip1:"Token を安全に保管し、他人に漏洱しないでください",securityTip2:"Token をリセットするには、ログイン後にシステム設定へ進んでください",slowLink:"インターフェースが重いです。どうすればいいですか?",disableAnimTitle:"バックグラウンドアニメーションを無効にする",disableAnimDesc:"バックグラウンドアニメーションは低スペックのデバイスで遅延を引き起こす可能性があります。無効にすると活百度が大幅に向上します。",disableAnimDetail:"無効にすると背景が単色になりますが、機能には影響しません。システム設定からいつでも再有効化できます。",disableAnimBtn:"アニメーションを無効にする",verifyFailed:"Token の検証に失敗しました。确認して再試行してください。",connFailed:"サーバーへの接続に失敗しました。ネットワーク接続を確認してください。",switchToLight:"ライトモードに切り替える",switchToDark:"ダークモードに切り替える"},vA={steps:{botBasic:{title:"Bot基本設定",description:"ボットの基本情報を設定します"},personality:{title:"人格設定",description:"ボットの性格や話し方を定義します"},apiProvider:{title:"API設定",description:"APIプロバイダーを設定します"},modelSetup:{title:"モデル設定",description:"planner と replyer モデルを設定します"}},loading:{title:"設定を読み込み中...",description:"既存の設定を読み取っています"},header:{title:"初回セットアップウィザード",description:"{{appName}} の初期設定を一緒に完了しましょう"},progress:{stepCounter:"ステップ {{current}} / {{total}}"},validation:{selectPlatform:"プラットフォームを選択してください",enterNickname:"ニックネームを入力してください",enterQqAccount:"QQ アカウントを入力してください",enterAccountId:"アカウント ID を入力してください",enterProviderName:"APIプロバイダー名を入力してください",enterBaseUrl:"API Base URL を入力してください",enterApiKey:"API Key を入力してください",enterPlannerModelIdentifier:"planner モデル識別子を入力してください",enterReplyerModelIdentifier:"replyer モデル識別子を入力してください"},toast:{loadFailedTitle:"設定の読み込みに失敗しました",loadFailedDescription:"既存の設定を読み込めなかったため、デフォルト値を使用します",saveSuccessTitle:"保存しました",saveSuccessDescription:"{{step}} を保存しました",saveFailedTitle:"保存に失敗しました",validationFailedTitle:"入力内容を確認してください",completeSuccessTitle:"設定が完了しました",completeSuccessDescription:"新しい設定を反映するために {{appName}} を再起動しています...",completeFailedTitle:"設定の完了に失敗しました",skipFailedTitle:"セットアップのスキップに失敗しました",unknownError:"不明なエラー"},actions:{previous:"前へ",next:"次へ",skip:"ウィザードをスキップ",complete:"設定を完了",saving:"保存中...",completing:"完了処理中..."},skipDialog:{title:"セットアップウィザードをスキップしますか?",description:"システム設定からいつでも再度セットアップウィザードを開けます。スキップしてもよろしいですか?",confirm:"スキップする"},footer:"これらの設定はいつでも設定画面から変更できます",defaults:{personality:{personality:"女子大生で、現在大学2年生。掲示板を見るのが好き。",replyStyle:"返信は淡々と、短めにし、中国語で話してください。自分の学科背景をわざと強調しないでください。Tieba、Zhihu、Weibo の返信スタイルを参考にできます。",multipleReplyStyles:{plain:"淡々として少し皮肉っぽく、とても短く口語的に返信します。Tieba や Weibo の返信スタイルを参考にできます。",shortText:"1〜2文字で返信する",shortSymbol:"1〜2個の記号で返信する",translation:"少し翻訳調にするが、長くしない"}},emoji:{filtrationPrompt:"公序良俗に反しないこと"}},forms:{botBasic:{platform:{label:"プラットフォーム *",placeholder:"プラットフォームを選択",description:"ボットが動作するプラットフォームを選択します",options:{custom:"その他のプラットフォーム"}},customPlatform:{label:"プラットフォーム名 *",placeholder:"matrix などのプラットフォーム名を入力"},qqAccount:{label:"QQ アカウント *",placeholder:"ボットの QQ アカウントを入力",description:"ボットのログインに使用する QQ アカウントです"},primaryAccount:{label:"アカウント ID *",placeholder:"ボットのアカウント ID を入力",description:"このプラットフォーム上でのボットのアカウント識別子です"},nickname:{label:"ニックネーム *",placeholder:"ボットのニックネームを入力",description:"ボットの主な呼び名です"},alias:{label:"別名",placeholder:"別名を入力して Enter で追加",add:"追加",description:"ボットの他の呼び名を複数追加できます",remove:"別名 {{alias}} を削除"}},personality:{personality:{label:"人格特性 *",placeholder:"ボットの人格や設定を説明してください(120文字以内推奨)",description:"例:大学2年生の女子大生で、Tieba をよく見ている"},replyStyle:{label:"話し方 *",placeholder:"ボットの話し方や表現の癖を説明してください",description:"例:返信は淡々と短めにし、中国語で話し、Tieba・Zhihu・Weibo の雰囲気を参考にする"},multipleReplyStyle:{label:"代替返信スタイル",placeholder:"1行につき1つの代替返信スタイルを入力",description:"リストが空でない場合、MaiBot は下の確率でデフォルトの返信スタイルをランダムに置き換えます"},multipleProbability:{label:"代替スタイルの発動確率",description:"返信を構築するたびに、代替返信スタイルでデフォルトを置き換える確率です"}},emoji:{emojiSendNum:{label:"絵文字候補数",description:"送信前にいくつの絵文字から選ぶかを指定します。最大 64 です"},maxRegNum:{label:"最大絵文字数",description:"ボットが保存できる絵文字の最大数です"},doReplace:{label:"上限到達時に置き換える",description:"有効にすると古い絵文字を削除し、無効にすると新しい絵文字を収集しません"},checkInterval:{label:"確認間隔(分)",description:"絵文字の登録、破損、削除を確認する間隔です"},stealEmoji:{label:"絵文字を収集する",description:"一部の絵文字をボットが自分用に保存できるようにします"},contentFiltration:{label:"絵文字フィルタリングを有効にする",description:"条件に合う絵文字だけを保存します"},filtrationPrompt:{label:"フィルタ条件",placeholder:"例:公序良俗に反しないこと",description:"保存する絵文字の条件を説明してください"}},other:{allGlobal:{label:"グローバルスラングモードを有効にする",description:"グループ内のスラングを学習して使えるようにします"}},apiProvider:{providerName:{label:"APIプロバイダー名 *",placeholder:"例: OpenAI、DeepSeek、自ホストサービス",description:"この名前は model_config.toml に保存され、下のモデルから参照されます"},baseUrl:{label:"API Base URL *",description:"OpenAI互換エンドポイントを入力してください。例: https://api.example.com/v1"},apiKey:{label:"API Key *",description:"このプロバイダーの API Key を入力してください",show:"API Key を表示",hide:"API Key を非表示"}},modelSetup:{planner:{identifier:{label:"planner モデル識別子 *",description:"APIサービスが提供する実際のモデルID。モデル名はこの識別子で初期化されます"},visual:{label:"ビジョンを有効化"}},replyer:{identifier:{label:"replyer モデル識別子 *",description:"APIサービスが提供する実際のモデルID。モデル名はこの識別子で初期化されます"},visual:{label:"ビジョンを有効化"}},saveHint:"より詳細なタスク割り当ては後で設定できます。"}}},bA={loading:"読み込み中...",error:"エラー",retry:"再試行",save:"保存する",cancel:"キャンセル",confirm:"確認",delete:"削除",edit:"編集",close:"閉じる",search:"検索",noData:"データなし",success:"成功しました",failed:"失敗"},SA={preparing:"再起動を準備中",preparingDesc:"再起動リクエストを送信中...",preparingTip:"🔄 MaiBot の再起動を準備中...",restarting:"MaiBot を再起動中",restartingDesc:"しばらお待ちください、MaiBot が再起動中です...",restartingTip:"🔄 設定を保存しました、メインプロセスを再起動中...",checking:"サービス状態を確認中",checkingDesc:"サービスの回復を待機中... ({{current}}/{{max}})",checkingTip:"⏳ サービスの回復を待機中、ページを閉じないでください...",success:"再起動成功",successDesc:"ログインページにリダイレクト中...",successTip:"✅ 設定が適用されました、サービスは正常に動作しています",failed:"再起動タイムアウト",failedDesc:"サービスが予定時間内に回復しませんでした",failedTip:"⚠️ 長時間応答がない場合は、手動で再起動してください",refreshPage:"ページを更新",retryCheck:"再試行",elapsed:"経過時間:"},xA={title:"問題が発生しました",description:"アプリケーションが予期しないエラーを検出しました。ページを更新するかホームに戻ることができます。",refreshPage:"ページを更新",goHome:"ホームに戻る",footer:"問題が解決しない場合は、エラー情報をコピーして開発者に報告してください",copiedToClipboard:"クリップボードにコピーしました",copyError:"エラー情報をコピー"},TA={placeholder:"ページを検索...",title:"検索",noResults:"一致するページが見つかりません",startSearch:"キーワードを入力して検索を開始",navigate:"ナビゲート",select:"選択",close:"閉じる",categories:{overview:"概要",config:"設定",resources:"リソース",monitor:"監視",extensions:"拡張機能",system:"システム"},items:{home:"ホーム",homeDesc:"ダッシュボード概要を表示",botConfig:"ボットメイン設定",botConfigDesc:"ボットのコア設定を構成",modelProvider:"モデルプロバイダー設定",modelProviderDesc:"モデルプロバイダーを設定",model:"モデル設定",modelDesc:"モデルパラメーターを設定",emoji:"絵文字管理",emojiDesc:"ボットの絵文字を管理",expression:"表現管理",expressionDesc:"ボットの表現を管理",person:"人物情報",personDesc:"人物情報を管理",jargon:"スラング管理",jargonDesc:"ボットが学習したスラングを管理",statistics:"統計情報",statisticsDesc:"使用統計を表示",plugins:"プラグインマーケット",pluginsDesc:"プラグインを閉覧してインストール",logs:"ログビューア",logsDesc:"システムログを表示",reasoningProcessDesc:"Maisaka prompt の推論ログを閲覧",settings:"設定",settingsDesc:"システム設定を構成"}},wA={skipToContent:"メインコンテンツにスキップ",sidebarNav:"メインナビゲーション",closeMenu:"メニューを閉じる",navigatedTo:"{{page}} に移動しました"},CA={title:"リアルタイムモニター",subtitle:"MaiBotの稼働状況と統計データの一覧",loading:"統計データを読み込み中...",loadingHint:"MaiBotの稼働データを取得しています",timeRange:{"24h":"24時間","7d":"7日間","30d":"30日間"},autoRefresh:"自動更新",botStatus:{title:"MaiBot ステータス",running:"稼働中",stopped:"停止中",uptime:"稼働 {{time}}"},quickActions:{title:"クイック操作",restart:"MaiBotを再起動",restarting:"再起動中...",expressionReview:"表現レビュー",viewLogs:"ログを見る",pluginManage:"プラグイン管理",systemSettings:"システム設定"},survey:{title:"フィードバック",description:"製品体験の改善にご協力ください",webui:"WebUI フィードバック",maibot:"MaiBot フィードバック"},stats:{totalRequests:"総リクエスト数",totalCost:"総コスト",tokenUsage:"トークン消費",avgResponse:"平均応答",avgResponseDesc:"API平均レイテンシ",onlineTime:"オンライン時間",messageProcessing:"メッセージ処理",costEfficiency:"コスト効率",recentPeriod:"直近{{range}}",perHour:"{{value}}/時",noData:"データなし",replied:"返信 {{num}} 件",per100Messages:"100メッセージあたり",seconds:"秒間",hours:"時間",days:"日"},charts:{tabs:{trends:"トレンド",models:"モデル",activity:"アクティビティ",daily:"日次統計"},requestTrend:"リクエストトレンド",requestTrendDesc:"直近{{hours}}時間のリクエスト量の変化",costTrend:"コストトレンド",costTrendDesc:"API呼び出しコストの変化",tokenUsage:"トークン消費",tokenUsageDesc:"トークン使用量の変化",modelDistribution:"モデルリクエスト分布",modelDistributionDesc:"各モデルの使用割合({{count}}モデル)",modelDetails:"モデル詳細統計",modelDetailsDesc:"リクエスト数、コスト、パフォーマンス",recentActivity:"最近のアクティビティ",recentActivityDesc:"最新のAPI呼び出し記録",dailyStats:"日次統計",dailyStatsDesc:"直近7日間のデータサマリー",requests:"リクエスト数",cost:"コスト(¥)",requestCount:"リクエスト数",costLabel:"コスト",avgTime:"平均所要時間",timeCost:"所要時間",status:"ステータス"},time:{hoursMinutes:"{{hours}}時間{{minutes}}分"},hitokotoFallback:"人生はチョコレートの箱のようなもの、次に何が出てくるか分からない。",hitokotoFallbackFrom:"フォレスト・ガンプ",unknownSource:"不明",ariaLabel:{requestTrend:"時間ごとのリクエスト数トレンドチャート、直近のリクエスト数変化を表示",costTrend:"APIコストトレンドチャート、直近のAPI呼び出しコスト変化を表示",tokenUsage:"Token消費トレンドチャート、直近のToken使用量変化を表示"}},DA={header:uA,sidebar:fA,workspace:dA,chat:hA,layout:mA,httpWarning:pA,settings:gA,auth:yA,setupPage:vA,common:bA,restart:SA,errorBoundary:xA,search:TA,a11y:wA,home:CA},AA={collapseSidebar:"사이드바 접기",expandSidebar:"사이드바 펼치기",toggleConnection:"백엔드 연결 전환",viewAnnualSummary:"연간 요약 보기",annualSummary:"2025 연간 요약",searchPlaceholder:"검색...",viewDocs:"MaiBot 문서 보기",docs:"MaiBot 문서",switchToLight:"라이트 모드로 전환",switchToDark:"다크 모드로 전환",logout:"로그아웃",logoutLabel:"로그아웃",notConnected:"연결 안됨"},EA={groups:{overview:"개요",botConfig:"봇 설정",botResources:"봇 리소스",extensionsMonitor:"플러그인 및 확장",system:"시스템"},menu:{home:"홈",botMainConfig:"봇 메인 설정",aiModelProvider:"AI 모델 공급자",modelManagement:"모델 관리",promptManagement:"Prompt 관리",adapterConfig:"어댑터 설정",emojiManagement:"이모티콘 관리",expressionManagement:"표현 관리",slangManagement:"슬랭 관리",personInfo:"인물 정보",knowledgeGraph:"장기 기억 그래프",knowledgeBase:"장기 기억",pluginMarket:"플러그인 마켓",configTemplate:"설정 템플릿",pluginConfig:"플러그인 관리",mcpSettings:"MCP 설정",logViewer:"로그 뷰어",reasoningProcess:"추론 과정",maisakaMonitor:"MaiSaka 채팅 모니터",localChat:"로컬 채팅",settings:"설정"}},MA={switcherLabel:"MaiBot 작업 공간 전환",settings:"麦麦 설정",chat:"麦麦 채팅"},kA={defaultTab:"WebUI",botNameFallback:"麦麦",userFallback:"사용자",userNameFallback:"WebUI 사용자",virtualGroupFallback:"WebUI 가상 그룹 채팅",status:{connected:"연결됨",connecting:"연결 중...",disconnected:"연결 안됨"},actions:{cancel:"취소",reconnect:"다시 연결",save:"저장",send:"메시지 보내기"},identity:{current:"현재 신분:",editName:"닉네임 수정",group:"그룹: {{group}}",namePlaceholder:"닉네임 입력",virtual:"가상 신분:"},input:{placeholder:"메시지 입력...",waiting:"연결 대기 중..."},message:{empty:"{{bot}}와 대화를 시작해 보세요!",emptyHint:"아래 입력란에 메시지를 입력하고 Enter 키를 눌러 보내세요",errorFallback:"오류가 발생했습니다",thinking:"생각 중..."},composer:{hint:"Enter 전송 · Shift + Enter 줄바꿈"},sidebar:{closeConversation:"{{label}} 닫기",conversations:"채팅 대화",emptyPreview:"아직 메시지가 없습니다",identityHint:"로컬 채팅 신분",newVirtual:"새 가상 신분 대화",online:"온라인",offline:"오프라인",subtitle:"대화 {{count}}개",title:"채팅",webuiBadge:"WebUI",virtualBadge:"가상",profileTitle:"내 신분",editName:"닉네임 편집",saveName:"저장"},dialog:{create:"대화 만들기",description:"麦麦가 이미 알고 있는 사용자를 선택해 그 사용자 신분으로 대화합니다. 麦麦는 해당 사용자에 대한 기억과 이해를 사용해 응답합니다.",groupName:"가상 그룹 이름(선택)",groupNameHint:"麦麦는 이 이름의 그룹 채팅으로 인식합니다",knownUserSuffix:" · 알고 있음",loading:"불러오는 중...",noUsers:"사용자를 찾을 수 없습니다",personCount:"({{count}}명)",platform:"플랫폼 선택",platformPlaceholder:"플랫폼 선택",searchUser:"사용자 이름 검색...",title:"새 가상 신분 대화",user:"사용자 선택"},media:{audioUnsupported:"브라우저가 오디오 재생을 지원하지 않습니다",emoji:"이모티콘",face:"[표정:{{data}}]",file:"[파일: {{data}}]",forward:"[전달 메시지]",image:"이미지",loadFailed:"[{{type}} 로드 실패]",music:"[음악 공유]",noCaptions:"자막 없음",reply:"[답장]",unknown:"[{{type}}]",unknownMessage:"알 수 없는 메시지",videoUnsupported:"브라우저가 비디오 재생을 지원하지 않습니다"},toast:{backendUnavailable:"백엔드 서비스에 연결할 수 없습니다. MaiBot이 실행 중인지 확인하세요.",backendUnavailableShort:"백엔드 서비스에 연결할 수 없습니다",connectionFailed:"연결 실패",currentSessionUnavailable:"현재 채팅 세션을 사용할 수 없습니다. 잠시 후 다시 시도하세요.",error:"오류",incompleteConfig:"설정이 완전하지 않습니다",networkError:"네트워크 오류",platformFailed:"플랫폼을 불러오지 못했습니다",selectPlatformAndUser:"플랫폼과 사용자를 선택하세요",sendFailed:"전송 실패",serverError:"서버 오류: {{status}}",sessionUnavailable:"채팅 세션을 열 수 없습니다. 잠시 후 다시 시도하세요.",virtualTabCreated:"가상 신분 탭",virtualTabCreatedDesc:"{{label}} 대화를 만들었습니다"}},NA={verifyingLogin:"로그인 상태 확인 중...",logoTitle:"MaiBot WebUI",logoTitleShort:"M"},RA={title:"보안 알림: ",message:"현재 HTTP로 WebUI에 접속하고 있습니다.",description:"로컬이 아닌 HTTP 연결에서는 액세스 토큰과 설정 내용이 노출될 수 있습니다. 가능하면 HTTPS 또는 신뢰할 수 있는 내부망 연결을 사용하세요.",dismiss:"HTTP 보안 알림 닫기"},jA={title:"설정",description:"앱 환경 설정 관리",tabs:{appearance:"외관",security:"보안",other:"기타",about:"정보"},appearance:{themeMode:"테마 모드",themeModeDesc:"라이트 / 다크 / 시스템 따라가기",light:"라이트",dark:"다크",system:"시스템",accentColor:"강조 색상",resetDefault:"기본값으로 재설정",colorPreview:"색상 미리보기",styleTweaks:"스타일 조정",typography:"타이포그래피",visualEffects:"시각 효과",layout:"레이아웃",animation:"애니메이션",background:"배경",customCss:"사용자 정의 CSS",animationEffect:"애니메이션 효과",importExportTheme:"테마 가져오기 / 내보내기",importTheme:"테마 가져오기",exportTheme:"테마 내보내기",importSuccess:"가져오기 성공",importFailed:"가져오기 실패",resetSuccess:"재설정 성공",fontFamily:"글꼴",fontSize:"글자 크기",borderRadius:"테두리 반경",contentWidth:"콘텐츠 너비",sidebarWidth:"사이드바 너비",animationSpeed:"애니메이션 속도",backgroundImage:"배경 이미지",backgroundBlur:"배경 흐림",backgroundOpacity:"배경 투명도",lightDesc:"항상 라이트 테마 사용",darkDesc:"항상 다크 테마 사용",systemDesc:"시스템 설정에 따라 자동 전환",accentPrimary:"링 컴러",accentHint:"색상 퐹을 클릭하거나 HEX 값을 입력하세요",resetTheme:"기본값으로 재설정",confirmResetTheme:"테마 재설정 확인",confirmResetThemeDesc:"이렇게 하면 색상, 글꼴, 레이아웃 및 사용자 정의 CSS를 포함한 모든 테마 설정이 기본값으로 재설정됩니다. 이 작업은 되돌릴 수 없습니다. 계속하시겠습니까?",confirmResetAction:"재설정 확인",cssWarningTitle:"다음 내용이 안전 필터를 거쳣습니다:",cssPlaceholder:`/* 사용자 정의 CSS를 여기에 입력 */
|
||
|
||
/* 예시: */
|
||
/* .sidebar { background: #1a1a2e; } */`,cssDescription:"인터페이스를 더욱 개인화하도록 사용자 정의 CSS를 작성하세요. 위험한 CSS(@import, url() 등)는 자동으로 필터됩니다.",clearCss:"지우기",exportDesc:"주제를 JSON 파일로 내보내 공유하거나 백업합니다. 가져올 때 모든 설정이 자동으로 적용됩니다.",importSuccessDesc:"테마 설정을 가져왔습니다. 페이지가 자동으로 새로고침됩니다",resetSuccessDesc:"테마가 기본값으로 재설정되었습니다",enableAnimations:"애니메이션 활성화",enableAnimationsDesc:"비활성화하면 모든 전환 애니메이션과 효과가 긺히고 성능이 향상됩니다",loginWavesBackground:"로그인 페이지 파도 배경",loginWavesBackgroundDesc:"비활성화하면 로그인 페이지가 단색 배경이 됩니다. 저사양 디바이스에 적합합니다",inheritParentBg:"상위 배경 상속",inheritParentBgDesc:"활성화하면 상위 레이어의 배경 설정을 사용합니다",fontFamilyLabel:"글꼴 패밀리",fontFamilyPlaceholder:"글꼴 패밀리 선택",fontFamilySystem:"시스템 기본 (System)",fontFamilySans:"돋움체 (Sans-serif)",fontFamilySerif:"세리프 (Serif)",fontFamilyMono:"등폭 (Monospace)",baseFontSize:"기본 글자 크기 (Base Size)",lineHeight:"줄 높이 (Line Height)",lineHeightPlaceholder:"줄 높이 선택",lineHeightCompact:"콤팬트 (1.2)",lineHeightNormal:"보통 (1.5)",lineHeightLoose:"느슨 (1.75)",borderRadiusLabel:"테두리 반경 (Radius)",shadowLabel:"그림자 강도 (Shadow)",shadowPlaceholder:"그림자 강도 선택",shadowNone:"없음 (None)",shadowSm:"약함 (Small)",shadowMd:"중간 (Medium)",shadowLg:"강함 (Large)",shadowXl:"매우 강함 (Extra Large)",blurLabel:"흘림 효과 (Blur)",sidebarWidthLabel:"사이드바드 너비 (Sidebar Width)",maxContentWidth:"콘텐츠 최대 너비 (Max Width)",spacingUnit:"기본 간격 (Spacing Unit)",animationSpeedLabel:"애니메이션 속도 (Speed)",animationSpeedPlaceholder:"애니메이션 속도 선택",animationFast:"빠름 (100ms)",animationNormal:"보통 (300ms)",animationSlow:"느림 (500ms)",animationOff:"끄기 (0ms)",bgPage:"페이지",bgSidebar:"사이드바드",typographyGroup:"타이포그래피 (Typography)",visualGroup:"시각 효과 (Visual)",layoutGroup:"레이아웃 (Layout)",animationGroup:"애니메이션 (Animation)",backgroundGroup:"배경 설정 (Backgrounds)"},security:{currentToken:"현재 액세스 토큰",yourToken:"액세스 토큰",regenerate:"재생성",customToken:"사용자 정의 액세스 토큰",securityTip:"보안 팁",cannotCopy:"복사할 수 없습니다",copySuccess:"복사됨",copyFailed:"복사 실패",updateSuccess:"업데이트됨",updateFailed:"업데이트 실패",generateSuccess:"생성됨",generateFailed:"생성 실패",newToken:"새 액세스 토큰",confirmRegenerate:"토큰 재생성 확인",confirmRegenerateDesc:"재생성 후 이전 토큰은 무효화됩니다. 다시 로그인해야 합니다.",cancel:"취소",confirm:"확인",cannotCopyDesc:"토큰이 보안 쿠키에 저장되어 있습니다. 새 토큰을 얻으려면 재생성하세요.",copySuccessDesc:"토큰이 클립보드에 복사되었습니다",copyFailedDesc:"토큰을 수동으로 복사하세요",inputError:"입력 오류",inputErrorDesc:"새 토큰을 입력하세요",formatError:"형식 오류",formatErrorDesc:"토큰이 요구 사항을 충족하지 않습니다: {{failedRules}}",updateSuccessDesc:"액세스 토큰이 업데이트되었습니다. 로그인 페이지로 이동합니다.",updateFailedDesc:"토큰을 업데이트할 수 없습니다",updateFailedConn:"서버 연결에 실패했습니다",generateSuccessDesc:"새 액세스 토큰이 생성되었습니다. 즉시 저장하세요.",generateFailedDesc:"새 토큰을 생성할 수 없습니다",generateFailedConn:"서버 연결에 실패했습니다",cannotView:"볼 수 없습니다",cannotViewDesc:'토큰이 보안 쿠키에 저장되어 있습니다. 새 토큰이 필요하면 "재생성"을 클릭하세요.',hide:"숨기기",show:"표시",copyTip:"클립보드에 복사",regenerateShort:"생성",confirmRegenerateFullDesc:"새로운 64자 보안 토큰을 생성하고 현재 토큰을 즉시 무효화합니다. 새 토큰으로 다시 로그인해야 합니다. 이 작업은 되돌릴 수 없습니다. 계속하시겠습니까?",confirmGenerate:"생성 확인",tokenStorePlaceholder:"토큰이 보안 쿠키에 저장되어 있습니다",safekeepTip:"액세스 토큰을 안전하게 보관하고 다른 사람과 공유하지 마세요.",newTokenLabel:"새 액세스 토큰",customTokenPlaceholder:"사용자 정의 토큰 입력",tokenReqTitle:"토큰 보안 요구 사항:",tokenValid:"토큰 형식이 올바르며 사용 가능합니다",updateBtn:"사용자 정의 토큰 업데이트",updating:"업데이트 중...",dialogTitle:"새 액세스 토큰",dialogDesc:"새 토큰입니다. 즉시 저장하세요. 창을 닫으면 로그인 페이지로 이동합니다.",dialogTokenLabel:"새 토큰 (64자 보안 토큰)",important:"중요 공지",tip1:"이 토큰은 한 번만 표시됩니다. 닫은 후에는 볼 수 없습니다",tip2:"즉시 복사하여 안전한 위치에 저장하세요",tip3:"닫으면 자동으로 로그인 페이지로 이동합니다",tip4:"새 토큰으로 다시 로그인하세요",copied:"복사됨",copyToken:"토큰 복사",savedClose:"저장했습니다, 닫기",securityTip1:"재생성하면 시스템이 랜덤 64자 보안 토큰을 생성합니다",securityTip2:"사용자 정의 토큰은 모든 보안 요구 사항을 충족해야 합니다",securityTip3:"토큰을 업데이트하면 이전 토큰이 즉시 무효화됩니다",securityTip4:"안전한 환경에서 토큰을 확인하고 복사하세요",securityTip5:"토큰 유출이 의심되면 즉시 재생성하거나 업데이트하세요",securityTip6:"최고의 보안을 위해 시스템 생성 토큰을 권장합니다"},other:{performance:"성능 & 저장소",localStorage:"로컬 저장소 사용량",logCache:"로그 캐시 크기",importExport:"설정 가져오기 / 내보내기",configWizard:"설정 마법사",devTools:"개발자 도구",clearStorage:"로컬 저장소 지우기",clearStorageDesc:"모든 로컬 저장소 데이터를 지웁니다",clearStorageConfirm:"지우기 확인",clearLogCache:"로그 캐시 지우기",clearLogCacheDesc:"모든 캐시된 로그 데이터를 지웁니다",clearLogCacheConfirm:"지우기 확인",importSettings:"설정 가져오기",exportSettings:"설정 내보내기",resetAllSettings:"모든 설정 재설정",resetAllSettingsDesc:"모든 설정을 기본값으로 되돌립니다",resetAllSettingsConfirm:"재설정 확인",clearStorageSuccess:"로컬 저장소를 지웠습니다",clearStorageFailed:"지우기 실패",clearLogSuccess:"로그 캐시를 지웠습니다",clearLogFailed:"지우기 실패",importSuccess:"가져오기 성공",importFailed:"가져오기 실패",exportSuccess:"내보내기 성공",exportFailed:"내보내기 실패",resetSuccess:"재설정 성공",resetFailed:"재설정 실패",storageItems:"{{count}}개 저장 항목",logCacheSizeDesc:"로그 뷰어가 캐시할 최대 로그 수를 제어합니다. 값이 클수록 메모리를 더 사용합니다.",logCacheSizeUnit:"개",dataSyncIntervalLabel:"홈 데이터 새로고침 간격",dataSyncIntervalUnit:"초",dataSyncIntervalDesc:"홈 화면 통계 데이터의 자동 새로고침 간격을 제어합니다",wsReconnectLabel:"WebSocket 재연결 간격",wsReconnectUnit:"초",wsReconnectDesc:"로그 WebSocket 연결 해제 후 재연결 기본 간격",wsMaxReconnectLabel:"WebSocket 최대 재연결 횟수",wsMaxReconnectUnit:"회",wsMaxReconnectDesc:"연결 실패 후 최대 재연결 시도 횟수",clearLogCacheFn:"로그 캐시 지우기",clearLocalCache:"로컬 캐시 지우기",confirmClearCache:"로컬 캐시 지우기 확인",confirmClearCacheDesc:"로그인 자격 증명을 제외한 모든 로컬 캐시 설정과 데이터를 지웁니다. 일부 기본 설정을 다시 구성해야 할 수 있습니다. 계속하시겠습니까?",confirmClear:"지우기 확인",importExportDesc:"현재 인터페이스 설정을 내보내 백업하거나, 이전에 내보낸 파일에서 복원하세요.",exporting:"내보내는 중...",importing:"가져오는 중...",resetAllSettingsBtn:"모든 설정을 기본값으로 재설정",confirmResetAll:"모든 설정 재설정 확인",confirmResetAllDesc:"테마, 색상, 애니메이션 등 모든 인터페이스 설정을 기본값으로 복원합니다. 로그인 상태에는 영향이 없습니다. 계속하시겠습니까?",configWizardDesc:"초기 설정 마법사를 다시 실행하여 시스템 기본 설정을 재구성할 수 있습니다.",rerunSetup:"초기 설정 다시 실행",confirmRerunSetup:"재구성 확인",confirmRerunSetupDesc:"초기 설정 마법사로 돌아갑니다. 시스템 기본 설정을 재구성할 수 있습니다. 계속하시겠습니까?",devToolsDesc:"아래 기능은 개발 및 디버깅 전용입니다. 페이지 충돌이나 비정상 동작을 유발할 수 있습니다.",triggerError:"테스트 오류 발생",confirmTriggerError:"오류 발생 확인",confirmTriggerErrorDesc:"React 오류를 수동으로 발생시켜 오류 경계 컴포넌트를 테스트합니다. 페이지를 새로고침하거나 홈으로 돌아가면 복구됩니다.",confirmTrigger:"발생 확인",logCleared:"로그 지워짐",logClearedDesc:"로그 캐시가 지워졌습니다",cacheCleared:"캐시 지워짐",cacheClearedDesc:"{{count}}개의 캐시 데이터를 지웠습니다",exportSuccessDesc:"설정을 JSON 파일로 내보냈습니다",exportFailedDesc:"설정을 내보낼 수 없습니다",importSuccessDesc:"{{imported}}개 설정을 가져왔습니다",importSkippedSuffix:", {{skipped}}개 건너뜀",importRefreshHint:"참고",importRefreshHintDesc:"일부 설정은 페이지를 새로고침해야 완전히 적용됩니다",importNoDataDesc:"가져올 유효한 설정이 없습니다",importInvalidDesc:"유효하지 않은 파일 형식",resetDone:"재설정 완료",resetDoneDesc:"모든 설정이 기본값으로 복원되었습니다. 변경 사항을 적용하려면 페이지를 새로고침하세요."},about:{openSource:"오픈 소스",aboutApp:"MaiBot Dashboard 정보",version:"버전:",author:"작성자",techStack:"기술 스택",frontendFramework:"프론트엔드 프레임워크",uiComponents:"UI 컴포넌트",backend:"백엔드",buildTool:"빌드 도구",openSourceThanks:"오픈 소스 라이브러리",openSourceLicense:"오픈 소스 라이선스",openSourceDesc:"이 프로젝트는 GitHub에서 오픈 소스입니다. Star ⭐로 응원해 주세요!",visitGitHub:"GitHub 방문",appDesc:"MaiBot의 현대적인 웹 관리 인터페이스",maimaiCore:"MaiBot 코어",uiFrameworkGroup:"UI 프레임워크 & 컴포넌트",routingStateGroup:"라우팅 & 상태 관리",formGroup:"폼 처리",utilsGroup:"유틸리티 라이브러리",animationGroup:"애니메이션",backendGroup:"백엔드 프레임워크",devToolsGroup:"개발자 도구",openSourceThanksDesc:"이 프로젝트는 다음 훌륭한 오픈 소스 라이브러리를 사용합니다. 기여에 감사드립니다:",licenseDesc:"이 프로젝트는 GNU General Public License v3.0으로 라이선스됩니다. 동일한 오픈 소스 라이선스를 유지하는 한 자유롭게 사용, 수정, 배포할 수 있습니다.",licenseDeps:"이 프로젝트의 모든 오픈 소스 라이브러리는 각각의 라이선스(MIT, Apache-2.0, BSD 등)를 따릅니다. 모든 오픈 소스 기여자에게 감사드립니다.",lib:{react:"UI 구축을 위한 라이브러리",shadcn:"우아한 React 컴포넌트 라이브러리",radix:"스타일 없는 접근 가능한 컴포넌트",tailwind:"유틸리티 우선 CSS 프레임워크",lucide:"아름다운 아이콘 라이브러리",tanstackRouter:"타입 안전한 라우팅 라이브러리",zustand:"경량 상태 관리 라이브러리",reactHookForm:"고성능 폼 라이브러리",zod:"TypeScript 우선 스키마 검증",clsx:"조건부 className 빌더",tailwindMerge:"Tailwind 클래스 이름 병합 도구",cva:"컴포넌트 변형 관리",dateFns:"현대적인 날짜 유틸리티 라이브러리",framerMotion:"React 애니메이션 라이브러리",vaul:"드로어 컴포넌트 애니메이션",fastapi:"현대적인 Python 웹 프레임워크",uvicorn:"ASGI 서버",pydantic:"데이터 검증 라이브러리",pythonMultipart:"파일 업로드 지원",typescript:"JavaScript의 슈퍼셋",vite:"차세대 프론트엔드 빌드 도구",eslint:"JavaScript 코드 린터"}}},OA={title:"로그인",description:"계속하려면 액세스 토큰을 입력하세요",tokenLabel:"액세스 토큰",tokenPlaceholder:"액세스 토큰 입력",loginButton:"로그인",loggingIn:"로그인 중...",loginFailed:"로그인 실패",loginSuccess:"로그인 성공",checkingAuth:"로그인 상태 확인 중...",welcome:"MaiBot에 오신 것을 환영합니다",accessDesc:"시스템에 액세스하려면 액세스 토큰을 입력하세요",tokenRequired:"액세스 토큰을 입력해 주세요",verifyingLabel:"확인 중...",verifyEnter:"확인 후 입장",helpLink:"Token이 없습니다. 어디서 얻을 수 있나요?",helpTitle:"Access Token 얻는 방법",helpDesc:"Access Token은 MaiBot WebUI에 액세스하는 유일한 자격 증명입니다. 다음 방법으로 얻으세요",method1Title:"방법 1: 시작 로그 확인",method1Desc:"MaiBot 시작 시 콘솔에 WebUI Access Token이 표시됩니다.",method1Example1:"🔑 WebUI Access Token: abc123...",method1Example2:"💡 이 Token으로 WebUI에 로그인하세요",method2Title:"방법 2: 설정 파일 확인",method2Desc:"Token은 프로젝트 루트의 설정 파일에 저장됩니다:",method2FileHint:"이 파일을 열고 access_token 필드의 값을 복사하세요",securityTipTitle:"보안 안내",securityTip1:"Token을 안전하게 유지하고 타인에게 노출하지 마세요",securityTip2:"Token을 재설정하려면 로그인 후 시스템 설정으로 이동하세요",slowLink:"인터페이스가 느립니다. 어떻게 하나요?",disableAnimTitle:"배경 애니메이션 비활성화",disableAnimDesc:"배경 애니메이션은 저사양 디바이스에서 느리게 동작할 수 있습니다. 비활성화하면 화면이 훨씬 부드러워집니다.",disableAnimDetail:"비활성화 후 배경은 단색으로 바뀐지지만 모든 기능은 정상 작동합니다. 시스템 설정에서 언제든지 다시 활성화할 수 있습니다.",disableAnimBtn:"애니메이션 비활성화",verifyFailed:"Token 확인에 실패했습니다. 확인 후 다시 시도해 주세요.",connFailed:"서버에 연결하지 못했습니다. 네트워크 연결을 확인해 주세요.",switchToLight:"라이트 모드로 전환",switchToDark:"다크 모드로 전환"},LA={steps:{botBasic:{title:"Bot 기본 설정",description:"봇의 기본 정보를 설정합니다"},personality:{title:"성격 설정",description:"봇의 성격과 말투를 정의합니다"},apiProvider:{title:"API 설정",description:"API 제공자를 설정합니다"},modelSetup:{title:"모델 설정",description:"planner와 replyer 모델을 설정합니다"}},loading:{title:"설정을 불러오는 중...",description:"기존 설정을 읽고 있습니다"},header:{title:"초기 설정 마법사",description:"{{appName}}의 초기 설정을 함께 완료해 봅시다"},progress:{stepCounter:"단계 {{current}} / {{total}}"},validation:{selectPlatform:"플랫폼을 선택해 주세요",enterNickname:"닉네임을 입력해 주세요",enterQqAccount:"QQ 계정을 입력해 주세요",enterAccountId:"계정 ID를 입력해 주세요",enterProviderName:"API 제공자 이름을 입력해 주세요",enterBaseUrl:"API Base URL을 입력해 주세요",enterApiKey:"API Key를 입력해 주세요",enterPlannerModelIdentifier:"planner 모델 식별자를 입력해 주세요",enterReplyerModelIdentifier:"replyer 모델 식별자를 입력해 주세요"},toast:{loadFailedTitle:"설정 불러오기에 실패했습니다",loadFailedDescription:"기존 설정을 불러올 수 없어 기본값을 사용합니다",saveSuccessTitle:"저장되었습니다",saveSuccessDescription:"{{step}} 설정이 저장되었습니다",saveFailedTitle:"저장에 실패했습니다",validationFailedTitle:"입력값을 확인해 주세요",completeSuccessTitle:"설정이 완료되었습니다",completeSuccessDescription:"새 설정을 적용하기 위해 {{appName}}을(를) 재시작하는 중입니다...",completeFailedTitle:"설정 완료에 실패했습니다",skipFailedTitle:"설정 마법사 건너뛰기에 실패했습니다",unknownError:"알 수 없는 오류"},actions:{previous:"이전",next:"다음",skip:"마법사 건너뛰기",complete:"설정 완료",saving:"저장 중...",completing:"완료 중..."},skipDialog:{title:"설정 마법사를 건너뛸까요?",description:"시스템 설정에서 언제든지 다시 설정 마법사를 열 수 있습니다. 정말 건너뛰시겠습니까?",confirm:"건너뛰기"},footer:"이 설정들은 언제든지 설정 화면에서 변경할 수 있습니다",defaults:{personality:{personality:"여자 대학생이며 현재 2학년이고, Tieba 같은 커뮤니티를 자주 봅니다.",replyStyle:"답변은 담백하고 짧게 하며 중국어로 말하세요. 자신의 학과 배경을 일부러 강조하지 마세요. Tieba, Zhihu, Weibo의 답변 스타일을 참고할 수 있습니다.",multipleReplyStyles:{plain:"말투는 담백하지만 약간 냉소적이고, 매우 짧고 구어체입니다. Tieba 와 Weibo 답변 스타일을 참고할 수 있습니다.",shortText:"1-2글자로 답장하기",shortSymbol:"1-2개의 기호로 답장하기",translation:"살짝 번역체로 말하되 길게 쓰지 않기"}},emoji:{filtrationPrompt:"공공질서와 미풍양속에 어긋나지 않음"}},forms:{botBasic:{platform:{label:"플랫폼 *",placeholder:"플랫폼 선택",description:"봇이 실행될 플랫폼을 선택합니다",options:{custom:"기타 플랫폼"}},customPlatform:{label:"플랫폼 이름 *",placeholder:"예: matrix 와 같은 플랫폼 이름 입력"},qqAccount:{label:"QQ 계정 *",placeholder:"봇의 QQ 계정을 입력하세요",description:"봇 로그인에 사용하는 QQ 계정입니다"},primaryAccount:{label:"계정 ID *",placeholder:"봇의 계정 ID를 입력하세요",description:"이 플랫폼에서 봇을 식별하는 계정 ID입니다"},nickname:{label:"닉네임 *",placeholder:"봇의 닉네임을 입력하세요",description:"봇의 대표 호칭입니다"},alias:{label:"별칭",placeholder:"별칭을 입력하고 Enter 로 추가",add:"추가",description:"봇의 다른 호칭을 여러 개 추가할 수 있습니다",remove:"별칭 {{alias}} 제거"}},personality:{personality:{label:"성격 특성 *",placeholder:"봇의 성격과 설정을 설명해 주세요 (권장 120자 이내)",description:"예: 대학 2학년 여자 대학생으로 Tieba 를 자주 본다"},replyStyle:{label:"말투 *",placeholder:"봇이 말하는 방식과 표현 습관을 설명해 주세요",description:"예: 답변은 담백하고 짧게, 중국어로 말하며 Tieba, Zhihu, Weibo 스타일을 참고한다"},multipleReplyStyle:{label:"대체 답변 스타일",placeholder:"한 줄에 하나씩 대체 답변 스타일을 입력하세요",description:"목록이 비어 있지 않으면 MaiBot 이 아래 확률에 따라 기본 답변 스타일을 무작위로 대체합니다"},multipleProbability:{label:"대체 스타일 적용 확률",description:"답변을 만들 때마다 기본 답변 스타일을 대체 스타일로 무작위 교체할 확률입니다"}},emoji:{emojiSendNum:{label:"이모지 후보 수",description:"전송 전에 몇 개의 이모지 중에서 고를지 정합니다. 최대 64개입니다"},maxRegNum:{label:"최대 이모지 수",description:"봇이 저장할 수 있는 이모지의 최대 개수입니다"},doReplace:{label:"최대 수 도달 시 교체",description:"켜면 오래된 이모지를 삭제하고, 끄면 새 이모지를 더 이상 수집하지 않습니다"},checkInterval:{label:"확인 간격 (분)",description:"이모지 등록, 손상, 삭제를 확인하는 간격입니다"},stealEmoji:{label:"이모지 수집",description:"일부 이모지를 봇이 자신의 것으로 저장할 수 있게 합니다"},contentFiltration:{label:"이모지 필터링 사용",description:"조건에 맞는 이모지만 저장합니다"},filtrationPrompt:{label:"필터 조건",placeholder:"예: 공공질서와 미풍양속에 어긋나지 않음",description:"저장할 이모지가 충족해야 하는 조건을 설명해 주세요"}},other:{allGlobal:{label:"전역 슬랭 모드 사용",description:"봇이 그룹 슬랭을 학습하고 사용할 수 있게 합니다"}},apiProvider:{providerName:{label:"API 제공자 이름 *",placeholder:"예: OpenAI, DeepSeek, 자체 호스팅",description:"이 이름은 model_config.toml에 저장되며 아래 모델에서 참조됩니다"},baseUrl:{label:"API Base URL *",description:"OpenAI 호환 엔드포인트를 입력해 주세요. 예: https://api.example.com/v1"},apiKey:{label:"API Key *",description:"이 제공자의 API Key를 입력해 주세요",show:"API Key 표시",hide:"API Key 숨기기"}},modelSetup:{planner:{identifier:{label:"planner 모델 식별자 *",description:"API 서비스가 제공하는 실제 모델 ID입니다. 모델 이름은 이 식별자로 초기화됩니다"},visual:{label:"비전 사용"}},replyer:{identifier:{label:"replyer 모델 식별자 *",description:"API 서비스가 제공하는 실제 모델 ID입니다. 모델 이름은 이 식별자로 초기화됩니다"},visual:{label:"비전 사용"}},saveHint:"더 자세한 작업 할당은 나중에 설정할 수 있습니다."}}},zA={loading:"로딩 중...",error:"오류",retry:"재시도",save:"저장",cancel:"취소",confirm:"확인",delete:"삭제",edit:"편집",close:"닫기",search:"검색",noData:"데이터 없음",success:"성공",failed:"실패"},BA={preparing:"재시작 준비 중",preparingDesc:"재시작 요청 전송 중...",preparingTip:"🔄 MaiBot 재시작을 준비 중...",restarting:"MaiBot 재시작 중",restartingDesc:"잠시 기다려주세요, MaiBot이 재시작 중입니다...",restartingTip:"🔄 설정을 저장했습니다, 메인 프로세스를 재시작 중...",checking:"서비스 상태 확인 중",checkingDesc:"서비스 복구 대기 중... ({{current}}/{{max}})",checkingTip:"⏳ 서비스 복구를 기다리는 중, 페이지를 닫지 마세요...",success:"재시작 성공",successDesc:"로그인 페이지로 이동 중...",successTip:"✅ 설정이 적용되었습니다, 서비스가 정상적으로 실행 중입니다",failed:"재시작 시간 초과",failedDesc:"서비스가 예상 시간 내에 복구되지 않았습니다",failedTip:"⚠️ 장시간 응답이 없으면 수동으로 재시작해 보세요",refreshPage:"페이지 새로고침",retryCheck:"재시도",elapsed:"경과 시간:"},UA={title:"문제가 발생했습니다",description:"앱이 예기치 않은 오류를 만났습니다. 페이지를 새로고침하거나 홈으로 돌아갈 수 있습니다.",refreshPage:"페이지 새로고침",goHome:"홈으로 이동",footer:"문제가 계속되면 오류 정보를 복사하여 개발자에게 보고해 주세요",copiedToClipboard:"클립보드에 복사됨",copyError:"오류 정보 복사"},VA={placeholder:"페이지 검색...",title:"검색",noResults:"일치하는 페이지를 찾을 수 없습니다",startSearch:"키워드를 입력하여 검색 시작",navigate:"탐색",select:"선택",close:"닫기",categories:{overview:"개요",config:"설정",resources:"리소스",monitor:"모니터",extensions:"확장 기능",system:"시스템"},items:{home:"홈",homeDesc:"대시보드 개요 보기",botConfig:"속 메인 설정",botConfigDesc:"속 핵심 설정 구성",modelProvider:"모델 공급자 설정",modelProviderDesc:"모델 공급자 구성",model:"모델 설정",modelDesc:"모델 매개변수 구성",emoji:"이모티콘 관리",emojiDesc:"속 이모티콘 관리",expression:"표현 관리",expressionDesc:"속 표현 관리",person:"인물 정보",personDesc:"인물 정보 관리",jargon:"슬랭 관리",jargonDesc:"속이 학습한 슬랭 관리",statistics:"통계 정보",statisticsDesc:"사용 통계 보기",plugins:"플러그인 마켓",pluginsDesc:"플러그인 탐색 및 설치",logs:"로그 뷰어",logsDesc:"시스템 로그 보기",reasoningProcessDesc:"Maisaka prompt 추론 로그 보기",settings:"설정",settingsDesc:"시스템 설정 구성"}},PA={skipToContent:"메인 콘텐츠로 건너뀐기",sidebarNav:"메인 내비게이션",closeMenu:"메뉴 닫기",navigatedTo:"{{page}}으로 이동했습니다"},_A={title:"실시간 모니터",subtitle:"MaiBot 실행 상태 및 통계 데이터 개요",loading:"통계 데이터 로딩 중...",loadingHint:"MaiBot 실행 데이터를 가져오는 중",timeRange:{"24h":"24시간","7d":"7일","30d":"30일"},autoRefresh:"자동 새로고침",botStatus:{title:"MaiBot 상태",running:"실행 중",stopped:"중지됨",uptime:"가동 {{time}}"},quickActions:{title:"빠른 작업",restart:"MaiBot 재시작",restarting:"재시작 중...",expressionReview:"표현 검토",viewLogs:"로그 보기",pluginManage:"플러그인 관리",systemSettings:"시스템 설정"},survey:{title:"피드백 설문",description:"제품 경험 개선에 도움을 주세요",webui:"WebUI 피드백",maibot:"MaiBot 피드백"},stats:{totalRequests:"총 요청 수",totalCost:"총 비용",tokenUsage:"토큰 소비",avgResponse:"평균 응답",avgResponseDesc:"API 평균 지연",onlineTime:"온라인 시간",messageProcessing:"메시지 처리",costEfficiency:"비용 효율",recentPeriod:"최근 {{range}}",perHour:"{{value}}/시간",noData:"데이터 없음",replied:"답장 {{num}}건",per100Messages:"100건당",seconds:"초",hours:"시간",days:"일"},charts:{tabs:{trends:"트렌드",models:"모델",activity:"활동",daily:"일간 통계"},requestTrend:"요청 트렌드",requestTrendDesc:"최근 {{hours}}시간의 요청량 변화",costTrend:"비용 트렌드",costTrendDesc:"API 호출 비용 변화",tokenUsage:"토큰 소비",tokenUsageDesc:"토큰 사용량 변화",modelDistribution:"모델 요청 분포",modelDistributionDesc:"모델별 사용 비율 ({{count}}개 모델)",modelDetails:"모델 상세 통계",modelDetailsDesc:"요청 수, 비용 및 성능",recentActivity:"최근 활동",recentActivityDesc:"최신 API 호출 기록",dailyStats:"일간 통계",dailyStatsDesc:"최근 7일 데이터 요약",requests:"요청 수",cost:"비용(¥)",requestCount:"요청 수",costLabel:"비용",avgTime:"평균 소요",timeCost:"소요 시간",status:"상태"},time:{hoursMinutes:"{{hours}}시간 {{minutes}}분"},hitokotoFallback:"인생은 초콜릿 상자와 같아서, 다음에 무엇이 나올지 모릅니다.",hitokotoFallbackFrom:"포레스트 검프",unknownSource:"알 수 없음",ariaLabel:{requestTrend:"시간별 요청 트렌드 차트, 최근 시간대별 요청 수 변화 표시",costTrend:"API 비용 트렌드 차트, 최근 시간대별 API 호출 비용 변화 표시",tokenUsage:"토큰 소비 트렌드 차트, 최근 시간대별 토큰 사용량 변화 표시"}},HA={header:AA,sidebar:EA,workspace:MA,chat:kA,layout:NA,httpWarning:RA,settings:jA,auth:OA,setupPage:LA,common:zA,restart:BA,errorBoundary:UA,search:VA,a11y:PA,home:_A},FA={collapseSidebar:"收起侧边栏",expandSidebar:"展开侧边栏",toggleConnection:"切换后端连接",viewAnnualSummary:"查看年度总结",annualSummary:"2025 年度总结",searchPlaceholder:"搜索...",viewDocs:"查看麦麦文档",docs:"麦麦文档",switchToLight:"切换到浅色模式",switchToDark:"切换到深色模式",logout:"登出系统",logoutLabel:"登出",notConnected:"未连接"},IA={groups:{overview:"概览",botConfig:"麦麦配置编辑",botResources:"麦麦资源管理",extensionsMonitor:"插件与扩展",system:"系统"},menu:{home:"首页",botMainConfig:"麦麦设置",aiModelProvider:"模型厂商设置",modelManagement:"模型管理",promptManagement:"Prompt 管理",adapterConfig:"麦麦适配器配置",emojiManagement:"表情包",expressionManagement:"表达方式",slangManagement:"黑话",personInfo:"人物信息管理",knowledgeGraph:"长期记忆图谱",knowledgeBase:"长期记忆",pluginMarket:"插件市场",configTemplate:"配置模板市场",pluginConfig:"插件管理",mcpSettings:"MCP 设置",logViewer:"日志查看器",reasoningProcess:"推理过程",maisakaMonitor:"麦麦观察",localChat:"本地聊天室",settings:"系统设置"}},GA={switcherLabel:"切换麦麦工作区",settings:"麦麦设置",chat:"麦麦聊天"},qA={defaultTab:"WebUI",botNameFallback:"麦麦",userFallback:"用户",userNameFallback:"WebUI用户",virtualGroupFallback:"WebUI虚拟群聊",status:{connected:"已连接",connecting:"连接中...",disconnected:"未连接"},actions:{cancel:"取消",reconnect:"重新连接",save:"保存",send:"发送消息"},identity:{current:"当前身份:",editName:"修改昵称",group:"群:{{group}}",namePlaceholder:"输入昵称",virtual:"虚拟身份:"},input:{placeholder:"输入消息...",waiting:"等待连接..."},message:{empty:"开始与 {{bot}} 对话吧!",emptyHint:"在下方输入框输入消息,按 Enter 发送",errorFallback:"发生错误",thinking:"思考中..."},composer:{hint:"Enter 发送 · Shift + Enter 换行"},sidebar:{closeConversation:"关闭 {{label}}",conversations:"聊天会话",emptyPreview:"暂无消息",identityHint:"本地聊天室身份",newVirtual:"新建虚拟身份对话",online:"在线",offline:"离线",subtitle:"{{count}} 个会话",title:"聊天",webuiBadge:"WebUI",virtualBadge:"虚拟",profileTitle:"我的身份",editName:"编辑昵称",saveName:"保存"},dialog:{create:"创建对话",description:"选择一个麦麦已认识的用户,以该用户的身份与麦麦对话。麦麦将使用她对该用户的记忆和认知来回应。",groupName:"虚拟群名(可选)",groupNameHint:"麦麦会认为这是一个名为此名称的群聊",knownUserSuffix:" · 已认识",loading:"加载中...",noUsers:"没有找到用户",personCount:"({{count}} 人)",platform:"选择平台",platformPlaceholder:"选择平台",searchUser:"搜索用户名...",title:"新建虚拟身份对话",user:"选择用户"},media:{audioUnsupported:"您的浏览器不支持音频播放",emoji:"表情包",face:"[表情:{{data}}]",file:"[文件: {{data}}]",forward:"[转发消息]",image:"图片",loadFailed:"[{{type}}加载失败]",music:"[音乐分享]",noCaptions:"无字幕",reply:"[回复消息]",unknown:"[{{type}}]",unknownMessage:"未知消息",videoUnsupported:"您的浏览器不支持视频播放"},toast:{backendUnavailable:"无法连接到后端服务,请确保 MaiBot 已启动",backendUnavailableShort:"无法连接到后端服务",connectionFailed:"连接失败",currentSessionUnavailable:"当前聊天会话不可用,请稍后重试",error:"错误",incompleteConfig:"配置不完整",networkError:"网络错误",platformFailed:"获取平台失败",selectPlatformAndUser:"请选择平台和用户",sendFailed:"发送失败",serverError:"服务器返回错误: {{status}}",sessionUnavailable:"无法建立聊天会话,请稍后重试",virtualTabCreated:"虚拟身份标签页",virtualTabCreatedDesc:"已创建 {{label}} 的对话"}},KA={verifyingLogin:"正在验证登录状态...",logoTitle:"MaiBot WebUI",logoTitleShort:"M"},YA={title:"安全提示:",message:"当前正在通过 HTTP 访问 WebUI。",description:"非本地 HTTP 连接可能暴露访问令牌和配置内容,建议改用 HTTPS 或受信任的内网连接。",dismiss:"关闭 HTTP 安全提示"},XA={title:"系统设置",description:"管理您的应用偏好设置",tabs:{appearance:"外观",security:"安全",other:"其他",about:"关于"},appearance:{themeMode:"主题模式",themeModeDesc:"浅色/深色/跟随系统",light:"浅色",dark:"深色",system:"跟随系统",accentColor:"主题色",resetDefault:"重置默认",colorPreview:"实时色板预览",styleTweaks:"界面样式微调",typography:"字体排版",visualEffects:"视觉效果",layout:"布局",animation:"动画",background:"背景设置",customCss:"自定义 CSS",animationEffect:"动画效果",importExportTheme:"主题导入/导出",importTheme:"导入主题",exportTheme:"导出主题",importSuccess:"导入成功",importFailed:"导入失败",resetSuccess:"重置成功",fontFamily:"字体",fontSize:"字号",borderRadius:"圆角",contentWidth:"内容宽度",sidebarWidth:"侧边栏宽度",animationSpeed:"动画速度",backgroundImage:"背景图片",backgroundBlur:"背景模糊",backgroundOpacity:"背景透明度",lightDesc:"始终使用浅色主题",darkDesc:"始终使用深色主题",systemDesc:"根据系统设置自动切换",accentPrimary:"主色调",accentHint:"点击色环选择或输入 HEX 值",resetTheme:"重置为默认",confirmResetTheme:"确认重置主题",confirmResetThemeDesc:"这将重置所有主题设置为默认值,包括颜色、字体、布局和自定义 CSS。此操作不可撤销,确定要继续吗?",confirmResetAction:"确认重置",cssWarningTitle:"以下内容已被安全过滤:",cssPlaceholder:`/* 在这里输入自定义 CSS */
|
||
|
||
/* 例如: */
|
||
/* .sidebar { background: #1a1a2e; } */`,cssDescription:"编写自定义 CSS 来进一步个性化界面。危险的 CSS(如 @import、url())将被自动过滤。",clearCss:"清除",exportDesc:"导出主题为 JSON 文件便于分享或备份,导入时会自动应用所有配置。",importSuccessDesc:"主题配置已导入,页面将自动刷新",resetSuccessDesc:"主题已重置为默认值",enableAnimations:"启用动画效果",enableAnimationsDesc:"关闭后将禁用所有过渡动画和特效,提升性能",loginWavesBackground:"登录页波浪背景",loginWavesBackgroundDesc:"关闭后登录页将使用纯色背景,适合低性能设备",inheritParentBg:"继承上级背景",inheritParentBgDesc:"开启后将使用上级层级的背景配置",fontFamilyLabel:"字体族 (Font Family)",fontFamilyPlaceholder:"选择字体族",fontFamilySystem:"系统默认 (System)",fontFamilySans:"无衬线 (Sans-serif)",fontFamilySerif:"衬线 (Serif)",fontFamilyMono:"等宽 (Monospace)",baseFontSize:"基准字体大小 (Base Size)",lineHeight:"行高 (Line Height)",lineHeightPlaceholder:"选择行高",lineHeightCompact:"紧凑 (1.2)",lineHeightNormal:"正常 (1.5)",lineHeightLoose:"宽松 (1.75)",borderRadiusLabel:"圆角大小 (Radius)",shadowLabel:"阴影强度 (Shadow)",shadowPlaceholder:"选择阴影强度",shadowNone:"无阴影 (None)",shadowSm:"轻微 (Small)",shadowMd:"中等 (Medium)",shadowLg:"强烈 (Large)",shadowXl:"极强 (Extra Large)",blurLabel:"模糊效果 (Blur)",sidebarWidthLabel:"侧边栏宽度 (Sidebar Width)",maxContentWidth:"内容区最大宽度 (Max Width)",spacingUnit:"基准间距 (Spacing Unit)",animationSpeedLabel:"动画速度 (Speed)",animationSpeedPlaceholder:"选择动画速度",animationFast:"快速 (100ms)",animationNormal:"正常 (300ms)",animationSlow:"慢速 (500ms)",animationOff:"关闭 (0ms)",bgPage:"页面",bgSidebar:"侧边栏",typographyGroup:"字体排版 (Typography)",visualGroup:"视觉效果 (Visual)",layoutGroup:"布局 (Layout)",animationGroup:"动画 (Animation)",backgroundGroup:"背景设置 (Backgrounds)"},security:{currentToken:"当前 Access Token",yourToken:"您的访问令牌",regenerate:"重新生成",customToken:"自定义 Access Token",securityTip:"安全提示",cannotCopy:"无法复制",copySuccess:"复制成功",copyFailed:"复制失败",updateSuccess:"更新成功",updateFailed:"更新失败",generateSuccess:"生成成功",generateFailed:"生成失败",newToken:"新的 Access Token",confirmRegenerate:"确认重新生成 Token",confirmRegenerateDesc:"重新生成后,旧 Token 将失效,需重新登录",cancel:"取消",confirm:"确认",cannotCopyDesc:"Token 存储在安全 Cookie 中,请重新生成以获取新 Token",copySuccessDesc:"Token 已复制到剪贴板",copyFailedDesc:"请手动复制 Token",inputError:"输入错误",inputErrorDesc:"请输入新的 Token",formatError:"格式错误",formatErrorDesc:"Token 不符合要求: {{failedRules}}",updateSuccessDesc:"Access Token 已更新,即将跳转到登录页",updateFailedDesc:"无法更新 Token",updateFailedConn:"连接服务器失败",generateSuccessDesc:"新的 Access Token 已生成,请及时保存",generateFailedDesc:"无法生成新 Token",generateFailedConn:"连接服务器失败",cannotView:"无法查看",cannotViewDesc:'Token 存储在安全 Cookie 中,如需新 Token 请点击"重新生成"',hide:"隐藏",show:"显示",copyTip:"复制到剪贴板",regenerateShort:"生成",confirmRegenerateFullDesc:"这将生成一个新的 64 位安全令牌,并使当前 Token 立即失效。您需要使用新 Token 重新登录系统。此操作不可撤销,确定要继续吗?",confirmGenerate:"确认生成",tokenStorePlaceholder:"Token 存储在安全 Cookie 中",safekeepTip:"请妥善保管您的 Access Token,不要泄露给他人",newTokenLabel:"新的访问令牌",customTokenPlaceholder:"输入自定义 Token",tokenReqTitle:"Token 安全要求:",tokenValid:"Token 格式正确,可以使用",updateBtn:"更新自定义 Token",updating:"更新中...",dialogTitle:"新的 Access Token",dialogDesc:"这是您的新 Token,请立即保存。关闭此窗口后将跳转到登录页面。",dialogTokenLabel:"您的新 Token (64位安全令牌)",important:"重要提示",tip1:"此 Token 仅显示一次,关闭后无法再查看",tip2:"请立即复制并保存到安全的位置",tip3:"关闭窗口后将自动跳转到登录页面",tip4:"请使用新 Token 重新登录系统",copied:"已复制",copyToken:"复制 Token",savedClose:"我已保存,关闭",securityTip1:"重新生成 Token 会创建系统随机生成的 64 位安全令牌",securityTip2:"自定义 Token 必须满足所有安全要求才能使用",securityTip3:"更新 Token 后,旧的 Token 将立即失效",securityTip4:"请在安全的环境下查看和复制 Token",securityTip5:"如果怀疑 Token 泄露,请立即重新生成或更新",securityTip6:"建议使用系统生成的 Token 以获得最高安全性"},other:{performance:"性能与存储",localStorage:"本地存储使用",logCache:"日志缓存大小",importExport:"导入/导出设置",configWizard:"配置向导",devTools:"开发者工具",clearStorage:"清空本地存储",clearStorageDesc:"清空所有本地存储数据",clearStorageConfirm:"确认清空",clearLogCache:"清空日志缓存",clearLogCacheDesc:"清空所有缓存的日志数据",clearLogCacheConfirm:"确认清空",importSettings:"导入设置",exportSettings:"导出设置",resetAllSettings:"重置所有设置",resetAllSettingsDesc:"将所有设置恢复到默认值",resetAllSettingsConfirm:"确认重置",clearStorageSuccess:"本地存储已清空",clearStorageFailed:"清空失败",clearLogSuccess:"日志缓存已清空",clearLogFailed:"清空失败",importSuccess:"导入成功",importFailed:"导入失败",exportSuccess:"导出成功",exportFailed:"导出失败",resetSuccess:"重置成功",resetFailed:"重置失败",storageItems:"{{count}} 个存储项",logCacheSizeDesc:"控制日志查看器最多缓存的日志条数,较大的值会占用更多内存",logCacheSizeUnit:"条",dataSyncIntervalLabel:"首页数据刷新间隔",dataSyncIntervalUnit:"秒",dataSyncIntervalDesc:"控制首页统计数据的自动刷新间隔",wsReconnectLabel:"WebSocket 重连间隔",wsReconnectUnit:"秒",wsReconnectDesc:"日志 WebSocket 连接断开后的重连基础间隔",wsMaxReconnectLabel:"WebSocket 最大重连次数",wsMaxReconnectUnit:"次",wsMaxReconnectDesc:"连接失败后的最大重连尝试次数",clearLogCacheFn:"清除日志缓存",clearLocalCache:"清除本地缓存",confirmClearCache:"确认清除本地缓存",confirmClearCacheDesc:"这将清除所有本地缓存的设置和数据(不包括登录凭证)。您可能需要重新配置部分偏好设置。确定要继续吗?",confirmClear:"确认清除",importExportDesc:"导出当前的界面设置以便备份,或从之前导出的文件中恢复设置。",exporting:"导出中...",importing:"导入中...",resetAllSettingsBtn:"重置所有设置为默认值",confirmResetAll:"确认重置所有设置",confirmResetAllDesc:"这将把所有界面设置恢复为默认值,包括主题、颜色、动画等偏好设置。此操作不会影响您的登录状态。确定要继续吗?",configWizardDesc:"重新进行初次配置向导,可以帮助您重新设置系统的基础配置。",rerunSetup:"重新进行初次配置",confirmRerunSetup:"确认重新配置",confirmRerunSetupDesc:"这将带您重新进入初次配置向导。您可以重新设置系统的基础配置项。确定要继续吗?",devToolsDesc:"以下功能仅供开发调试使用,可能会导致页面崩溃或异常。",triggerError:"触发测试错误",confirmTriggerError:"确认触发错误",confirmTriggerErrorDesc:"这将手动触发一个 React 错误,用于测试错误边界组件的显示效果。页面将显示错误界面,您可以通过刷新页面或点击返回首页来恢复。",confirmTrigger:"确认触发",logCleared:"日志已清除",logClearedDesc:"日志缓存已清空",cacheCleared:"缓存已清除",cacheClearedDesc:"已清除 {{count}} 项缓存数据",exportSuccessDesc:"设置已导出为 JSON 文件",exportFailedDesc:"无法导出设置",importSuccessDesc:"成功导入 {{imported}} 项设置",importSkippedSuffix:",跳过 {{skipped}} 项",importRefreshHint:"提示",importRefreshHintDesc:"部分设置需要刷新页面才能完全生效",importNoDataDesc:"没有有效的设置项可导入",importInvalidDesc:"文件格式无效",resetDone:"已重置",resetDoneDesc:"所有设置已恢复为默认值,刷新页面以应用更改"},about:{openSource:"开源项目",aboutApp:"关于 MaiBot Dashboard",version:"版本:",author:"作者",techStack:"技术栈",frontendFramework:"前端框架",uiComponents:"UI 组件",backend:"后端",buildTool:"构建工具",openSourceThanks:"开源库感谢",openSourceLicense:"开源许可",openSourceDesc:"本项目在 GitHub 开源,欢迎 Star ⭐ 支持!",visitGitHub:"前往 GitHub",appDesc:"麦麦(MaiBot)的现代化 Web 管理界面",maimaiCore:"MaiBot 核心",uiFrameworkGroup:"UI 框架与组件",routingStateGroup:"路由与状态管理",formGroup:"表单处理",utilsGroup:"工具库",animationGroup:"动画效果",backendGroup:"后端框架",devToolsGroup:"开发工具",openSourceThanksDesc:"本项目使用了以下优秀的开源库,感谢他们的贡献:",licenseDesc:"本项目采用 GNU General Public License v3.0 开源许可证。您可以自由地使用、修改和分发本软件,但必须保持相同的开源许可。",licenseDeps:"本项目依赖的所有开源库均遵循各自的开源许可证(MIT、Apache-2.0、BSD 等)。感谢所有开源贡献者的无私奉献。",lib:{react:"用户界面构建库",shadcn:"优雅的 React 组件库",radix:"无样式的可访问组件库",tailwind:"实用优先的 CSS 框架",lucide:"精美的图标库",tanstackRouter:"类型安全的路由库",zustand:"轻量级状态管理",reactHookForm:"高性能表单库",zod:"TypeScript 优先的 schema 验证",clsx:"条件 className 构建工具",tailwindMerge:"Tailwind 类名合并工具",cva:"组件变体管理",dateFns:"现代化日期处理库",framerMotion:"React 动画库",vaul:"抽屉组件动画",fastapi:"现代化 Python Web 框架",uvicorn:"ASGI 服务器",pydantic:"数据验证库",pythonMultipart:"文件上传支持",typescript:"JavaScript 的超集",vite:"下一代前端构建工具",eslint:"JavaScript 代码检查工具"}}},QA={title:"登录",description:"请输入访问令牌以继续",tokenLabel:"Access Token",tokenPlaceholder:"请输入 Access Token",loginButton:"登录",loggingIn:"登录中...",loginFailed:"登录失败",loginSuccess:"登录成功",checkingAuth:"正在检查登录状态...",welcome:"欢迎使用 MaiBot",accessDesc:"请输入您的 Access Token 以继续访问系统",tokenRequired:"请输入 Access Token",verifyingLabel:"验证中...",verifyEnter:"验证并进入",helpLink:"我没有 Token,我该去哪里获得 Token?",helpTitle:"如何获取 Access Token",helpDesc:"Access Token 是访问 MaiBot WebUI 的唯一凭证,请按以下方式获取",method1Title:"方式一:查看启动日志",method1Desc:"在 MaiBot 启动时,控制台会显示 WebUI Access Token。",method1Example1:"🔑 WebUI Access Token: abc123...",method1Example2:"💡 请使用此 Token 登录 WebUI",method2Title:"方式二:查看配置文件",method2Desc:"Token 保存在项目根目录的配置文件中:",method2FileHint:"打开此文件,复制 access_token 字段的值",securityTipTitle:"安全提示",securityTip1:"请妥善保管您的 Token,不要泄露给他人",securityTip2:"如需重置 Token,请在登录后前往系统设置",slowLink:"我觉得这个界面很卡怎么办?",disableAnimTitle:"关闭背景动画",disableAnimDesc:"背景动画可能会在低性能设备上造成卡顿。关闭动画可以显著提升界面流畅度。",disableAnimDetail:"关闭动画后,背景将变为纯色,但不影响任何功能的使用。您可以随时在系统设置中重新开启动画。",disableAnimBtn:"关闭动画",verifyFailed:"Token 验证失败,请检查后重试",connFailed:"连接服务器失败,请检查网络连接",switchToLight:"切换到浅色模式",switchToDark:"切换到深色模式"},ZA={steps:{botBasic:{title:"Bot基础",description:"配置机器人的基本信息"},personality:{title:"人格配置",description:"定义机器人的性格和说话风格"},apiProvider:{title:"API配置",description:"配置 API 提供商"},modelSetup:{title:"模型配置",description:"配置 planner 和 replyer 模型"}},loading:{title:"加载配置中...",description:"正在读取现有配置"},header:{title:"首次配置向导",description:"让我们一起完成 {{appName}} 的初始配置"},progress:{stepCounter:"步骤 {{current}} / {{total}}"},validation:{selectPlatform:"请选择平台",enterNickname:"请输入昵称",enterQqAccount:"请输入 QQ 账号",enterAccountId:"请输入账号 ID",enterProviderName:"请输入 API 提供商名称",enterBaseUrl:"请输入 API Base URL",enterApiKey:"请输入 API Key",enterPlannerModelIdentifier:"请输入 planner 模型标识符",enterReplyerModelIdentifier:"请输入 replyer 模型标识符"},toast:{loadFailedTitle:"加载配置失败",loadFailedDescription:"无法加载现有配置,将使用默认值",saveSuccessTitle:"保存成功",saveSuccessDescription:"{{step}} 配置已保存",saveFailedTitle:"保存失败",validationFailedTitle:"验证失败",completeSuccessTitle:"配置完成",completeSuccessDescription:"{{appName}} 正在重启以应用新配置...",completeFailedTitle:"配置失败",skipFailedTitle:"跳过失败",unknownError:"未知错误"},actions:{previous:"上一步",next:"下一步",skip:"跳过向导",complete:"完成配置",saving:"保存中...",completing:"完成中..."},skipDialog:{title:"确认跳过配置向导",description:"您可以随时在系统设置中重新进入配置向导。确定要跳过吗?",confirm:"确认跳过"},footer:"您可以随时在设置中修改这些配置",defaults:{personality:{personality:"是一个大二女大学生,现在正在上网和群友聊天。有轻微攻击性",replyStyle:"你的风格平淡简短。可以参考贴吧,知乎和微博的回复风格。不浮夸不长篇大论,不要过分修辞和复杂句。",multipleReplyStyles:{plain:"你的风格平淡但不失讽刺,很简短,很白话。可以参考贴吧、微博的回复风格。",shortText:"用1-2个字进行回复",shortSymbol:"用1-2个符号进行回复",translation:"带点翻译腔,但不要太长"}},emoji:{filtrationPrompt:"符合公序良俗"}},forms:{botBasic:{platform:{label:"平台 *",placeholder:"请选择平台",description:"选择麦麦Bot运行的平台",options:{custom:"其他平台"}},customPlatform:{label:"平台名称 *",placeholder:"请输入平台名称,如 matrix"},qqAccount:{label:"QQ账号 *",placeholder:"请输入机器人的 QQ 账号",description:"运行麦麦Bot的 QQ 账号"},primaryAccount:{label:"账号 ID *",placeholder:"请输入机器人的账号 ID",description:"机器人在该平台上的账号标识"},nickname:{label:"昵称 *",placeholder:"请输入机器人的昵称",description:"麦麦Bot的名称"},alias:{label:"别名",placeholder:"输入别名后按回车添加",add:"添加",description:"机器人的其他称呼,可以添加多个",remove:"移除别名 {{alias}}"}},personality:{personality:{label:"人格特征 *",placeholder:"描述机器人的人格特质和身份特征(建议 120 字以内)",description:"例如:是一个女大学生,现在在读大二,会刷贴吧"},replyStyle:{label:"表达风格 *",placeholder:"描述机器人说话的表达风格、表达习惯",description:"例如:回复平淡一些,简短一些,说中文,参考贴吧、知乎和微博的回复风格"},multipleReplyStyle:{label:"备用表达风格",placeholder:"每行输入一种备用表达风格",description:"当列表不为空时,麦麦会按概率从这些风格中随机替换默认表达风格"},multipleProbability:{label:"备用风格触发概率",description:"每次构建回复时,从备用表达风格中随机替换默认表达风格的概率"}},emoji:{emojiSendNum:{label:"表情包候选数量",description:"每次发送前从多少个表情包中选择,最大为 64"},maxRegNum:{label:"最大表情包数量",description:"机器人最多保存的表情包数量"},doReplace:{label:"达到最大数量时替换",description:"开启后会删除旧表情包,关闭则不再收集新表情包"},checkInterval:{label:"检查间隔(分钟)",description:"检查表情包注册、破损、删除的时间间隔"},stealEmoji:{label:"偷取表情包",description:"允许机器人将一些表情包据为己有"},contentFiltration:{label:"启用表情包过滤",description:"只保存符合要求的表情包"},filtrationPrompt:{label:"过滤要求",placeholder:"例如:符合公序良俗",description:"描述表情包应该符合的要求"}},other:{allGlobal:{label:"启用全局黑话模式",description:"允许机器人学习和使用群组黑话"}},apiProvider:{providerName:{label:"API 提供商名称 *",placeholder:"例如 OpenAI、DeepSeek、自建服务",description:"为api提供商命名"},baseUrl:{label:"API Base URL *",description:"请填写 OpenAI 兼容接口地址,例如 https://api.example.com/v1"},apiKey:{label:"API Key *",description:"请填写该提供商的 API Key",show:"显示 API Key",hide:"隐藏 API Key"}},modelSetup:{planner:{identifier:{label:"planner 模型标识符 *",description:"API 服务商提供的真实模型 ID,模型名称会自动初始化为该标识符"},visual:{label:"启用视觉"}},replyer:{identifier:{label:"replyer 模型标识符 *",description:"API 服务商提供的真实模型 ID,模型名称会自动初始化为该标识符"},visual:{label:"启用视觉"}},saveHint:"你可以稍后配置更详细的任务分配。"}}},$A={loading:"加载中...",error:"错误",retry:"重试",save:"保存",cancel:"取消",confirm:"确认",delete:"删除",edit:"编辑",close:"关闭",search:"搜索",noData:"暂无数据",success:"成功",failed:"失败"},WA={preparing:"准备重启",preparingDesc:"正在发送重启请求...",preparingTip:"🔄 正在准备重启麦麦...",restarting:"正在重启麦麦",restartingDesc:"请稍候,麦麦正在重启中...",restartingTip:"🔄 配置已保存,正在重启主程序...",checking:"检查服务状态",checkingDesc:"等待服务恢复... ({{current}}/{{max}})",checkingTip:"⏳ 正在等待服务恢复,请勿关闭页面...",success:"重启成功",successDesc:"正在跳转到登录页面...",successTip:"✅ 配置已生效,服务运行正常",failed:"重启超时",failedDesc:"服务未能在预期时间内恢复",failedTip:"⚠️ 如果长时间无响应,请尝试手动重启",refreshPage:"刷新页面",retryCheck:"重试检测",elapsed:"已用时:"},JA={title:"页面出现了问题",description:"应用程序遇到了意外错误。您可以尝试刷新页面或返回首页。",refreshPage:"刷新页面",goHome:"返回首页",footer:"如果问题持续存在,请将错误信息复制并反馈给开发者",copiedToClipboard:"已复制到剪贴板",copyError:"复制错误信息"},eE={placeholder:"搜索页面...",title:"搜索",noResults:"未找到匹配的页面",startSearch:"输入关键词开始搜索",navigate:"导航",select:"选择",close:"关闭",categories:{overview:"概览",config:"配置",resources:"资源",monitor:"监控",extensions:"扩展",system:"系统"},items:{home:"首页",homeDesc:"查看仪表板概览",botConfig:"麦麦设置",botConfigDesc:"配置麦麦的核心设置",modelProvider:"模型厂商设置",modelProviderDesc:"配置模型提供商",model:"麦麦模型配置",modelDesc:"配置模型参数",emoji:"表情包",emojiDesc:"管理麦麦的表情包",expression:"表达方式",expressionDesc:"管理麦麦的表达方式",person:"人物信息管理",personDesc:"管理人物信息",jargon:"黑话",jargonDesc:"管理麦麦学习到的黑话和俚语",statistics:"统计信息",statisticsDesc:"查看使用统计",plugins:"插件市场",pluginsDesc:"浏览和安装插件",logs:"日志查看器",logsDesc:"查看系统日志",reasoningProcessDesc:"浏览 Maisaka prompt 推理记录",settings:"系统设置",settingsDesc:"配置系统参数"}},tE={skipToContent:"跳过导航,直达主内容",sidebarNav:"主导航",closeMenu:"关闭菜单",navigatedTo:"已导航至 {{page}}"},nE={title:"实时监控面板",subtitle:"麦麦运行状态和统计数据一览",loading:"加载统计数据中...",loadingHint:"正在获取麦麦运行数据",timeRange:{"24h":"24小时","7d":"7天","30d":"30天"},autoRefresh:"自动刷新",botStatus:{title:"麦麦状态",running:"运行中",stopped:"已停止",uptime:"运行 {{time}}"},quickActions:{title:"快速操作",restart:"重启麦麦",restarting:"重启中...",expressionReview:"表达审核",viewLogs:"查看日志",pluginManage:"插件管理",systemSettings:"系统设置"},survey:{title:"反馈问卷",description:"帮助我们改进产品体验",webui:"WebUI 反馈",maibot:"麦麦反馈"},stats:{totalRequests:"总请求数",totalCost:"总花费",tokenUsage:"Token消耗",avgResponse:"平均响应",avgResponseDesc:"API平均耗时",onlineTime:"在线时长",messageProcessing:"消息处理",costEfficiency:"成本效率",recentPeriod:"最近{{range}}",perHour:"{{value}}/小时",noData:"暂无数据",replied:"回复 {{num}} 条",per100Messages:"每100条消息",seconds:"秒",hours:"小时",days:"天"},charts:{tabs:{trends:"趋势",models:"模型",activity:"活动",daily:"日统计"},requestTrend:"请求趋势",requestTrendDesc:"最近{{hours}}小时的请求量变化",costTrend:"花费趋势",costTrendDesc:"API调用成本变化",tokenUsage:"Token消耗",tokenUsageDesc:"Token使用量变化",modelDistribution:"模型请求分布",modelDistributionDesc:"各模型使用占比 (共 {{count}} 个模型)",modelDetails:"模型详细统计",modelDetailsDesc:"请求数、花费和性能",recentActivity:"最近活动",recentActivityDesc:"最新的API调用记录",dailyStats:"每日统计",dailyStatsDesc:"最近7天的数据汇总",requests:"请求数",cost:"花费(¥)",requestCount:"请求数",costLabel:"花费",avgTime:"平均耗时",timeCost:"耗时",status:"状态"},time:{hoursMinutes:"{{hours}}小时{{minutes}}分钟"},hitokotoFallback:"人生就像一盒巧克力,你永远不知道下一颗是什么味道。",hitokotoFallbackFrom:"阿甘正传",unknownSource:"未知",ariaLabel:{requestTrend:"每小时请求量趋势图,显示最近若干小时的请求次数变化",costTrend:"API花费趋势图,显示最近若干小时的API调用成本变化",tokenUsage:"Token消耗趋势图,显示最近若干小时的Token使用量变化"}},aE={header:FA,sidebar:IA,workspace:GA,chat:qA,layout:KA,httpWarning:YA,settings:XA,auth:QA,setupPage:ZA,common:$A,restart:WA,errorBoundary:JA,search:eE,a11y:tE,home:nE};ut.use(Ob).use(FD).init({resources:{zh:{translation:aE},en:{translation:cA},ja:{translation:DA},ko:{translation:HA}},fallbackLng:"en",supportedLngs:["zh","en","ja","ko"],interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],lookupLocalStorage:"maibot-locale",caches:["localStorage"]},keySeparator:"."});ut.on("languageChanged",n=>{document.documentElement.lang=n});const _b=T.createContext(null);function iE(){const n=T.useContext(_b);return n?n.announce:()=>{}}function sE({children:n}){const[a,s]=T.useState({polite:"",assertive:""}),o=T.useRef(null),l=T.useRef(null),u=T.useCallback((d,h="polite")=>{h==="assertive"?(s(m=>({...m,assertive:""})),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(m=>({...m,assertive:d}))},50)):(s(m=>({...m,polite:""})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{s(m=>({...m,polite:d}))},50))},[]);return y.jsxs(_b.Provider,{value:{announce:u},children:[n,y.jsx("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:a.polite}),y.jsx("div",{"aria-live":"assertive","aria-atomic":"true",className:"sr-only",children:a.assertive})]})}const bf=(n,a)=>a.some(s=>n instanceof s);let vy,by;function oE(){return vy||(vy=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function rE(){return by||(by=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Sf=new WeakMap,Gu=new WeakMap,fl=new WeakMap;function lE(n){const a=new Promise((s,o)=>{const l=()=>{n.removeEventListener("success",u),n.removeEventListener("error",d)},u=()=>{s(ja(n.result)),l()},d=()=>{o(n.error),l()};n.addEventListener("success",u),n.addEventListener("error",d)});return fl.set(a,n),a}function cE(n){if(Sf.has(n))return;const a=new Promise((s,o)=>{const l=()=>{n.removeEventListener("complete",u),n.removeEventListener("error",d),n.removeEventListener("abort",d)},u=()=>{s(),l()},d=()=>{o(n.error||new DOMException("AbortError","AbortError")),l()};n.addEventListener("complete",u),n.addEventListener("error",d),n.addEventListener("abort",d)});Sf.set(n,a)}let xf={get(n,a,s){if(n instanceof IDBTransaction){if(a==="done")return Sf.get(n);if(a==="store")return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return ja(n[a])},set(n,a,s){return n[a]=s,!0},has(n,a){return n instanceof IDBTransaction&&(a==="done"||a==="store")?!0:a in n}};function Hb(n){xf=n(xf)}function uE(n){return rE().includes(n)?function(...a){return n.apply(Tf(this),a),ja(this.request)}:function(...a){return ja(n.apply(Tf(this),a))}}function fE(n){return typeof n=="function"?uE(n):(n instanceof IDBTransaction&&cE(n),bf(n,oE())?new Proxy(n,xf):n)}function ja(n){if(n instanceof IDBRequest)return lE(n);if(Gu.has(n))return Gu.get(n);const a=fE(n);return a!==n&&(Gu.set(n,a),fl.set(a,n)),a}const Tf=n=>fl.get(n);function dE(n,a,{blocked:s,upgrade:o,blocking:l,terminated:u}={}){const d=indexedDB.open(n,a),h=ja(d);return o&&d.addEventListener("upgradeneeded",m=>{o(ja(d.result),m.oldVersion,m.newVersion,ja(d.transaction),m)}),s&&d.addEventListener("blocked",m=>s(m.oldVersion,m.newVersion,m)),h.then(m=>{u&&m.addEventListener("close",()=>u()),l&&m.addEventListener("versionchange",g=>l(g.oldVersion,g.newVersion,g))}).catch(()=>{}),h}const hE=["get","getKey","getAll","getAllKeys","count"],mE=["put","add","delete","clear"],qu=new Map;function Sy(n,a){if(!(n instanceof IDBDatabase&&!(a in n)&&typeof a=="string"))return;if(qu.get(a))return qu.get(a);const s=a.replace(/FromIndex$/,""),o=a!==s,l=mE.includes(s);if(!(s in(o?IDBIndex:IDBObjectStore).prototype)||!(l||hE.includes(s)))return;const u=async function(d,...h){const m=this.transaction(d,l?"readwrite":"readonly");let g=m.store;return o&&(g=g.index(h.shift())),(await Promise.all([g[s](...h),l&&m.done]))[0]};return qu.set(a,u),u}Hb(n=>({...n,get:(a,s,o)=>Sy(a,s)||n.get(a,s,o),has:(a,s)=>!!Sy(a,s)||n.has(a,s)}));const pE=["continue","continuePrimaryKey","advance"],xy={},wf=new WeakMap,Fb=new WeakMap,gE={get(n,a){if(!pE.includes(a))return n[a];let s=xy[a];return s||(s=xy[a]=function(...o){wf.set(this,Fb.get(this)[a](...o))}),s}};async function*yE(...n){let a=this;if(a instanceof IDBCursor||(a=await a.openCursor(...n)),!a)return;a=a;const s=new Proxy(a,gE);for(Fb.set(s,a),fl.set(s,Tf(a));a;)yield s,a=await(wf.get(s)||a.continue()),wf.delete(s)}function Ty(n,a){return a===Symbol.asyncIterator&&bf(n,[IDBIndex,IDBObjectStore,IDBCursor])||a==="iterate"&&bf(n,[IDBIndex,IDBObjectStore])}Hb(n=>({...n,get(a,s,o){return Ty(a,s)?yE:n.get(a,s,o)},has(a,s){return Ty(a,s)||n.has(a,s)}}));const vE="maibot-assets",Yr="assets",bE=1;async function Ib(){return dE(vE,bE,{upgrade(n){n.objectStoreNames.contains(Yr)||n.createObjectStore(Yr,{keyPath:"id"})}})}async function UL(n){const a=await Ib(),s=crypto.randomUUID(),o=n.type.startsWith("video/")?"video":"image",l={id:s,filename:n.name,type:o,mimeType:n.type,blob:n,size:n.size,createdAt:Date.now()};return await a.add(Yr,l),s}async function SE(n){return await(await Ib()).get(Yr,n)}const Gb=T.createContext(null);function xE({children:n}){const a=T.useRef(new Map),s=async l=>{const u=a.current.get(l);if(u)return u;const d=await SE(l);if(!d)return;const h=URL.createObjectURL(d.blob);return a.current.set(l,h),h},o=T.useMemo(()=>({getAssetUrl:s}),[]);return T.useEffect(()=>()=>{a.current.forEach(l=>{URL.revokeObjectURL(l)}),a.current.clear()},[]),y.jsx(Gb,{value:o,children:n})}function TE(){const n=T.useContext(Gb);if(!n)throw new Error("useAssetStore must be used within AssetStoreProvider");return n}const wE=T.createContext(void 0);function CE({children:n,defaultEnabled:a=!0,defaultWavesEnabled:s=!0,storageKey:o="enable-animations",wavesStorageKey:l="enable-waves-background"}){const[u,d]=T.useState(()=>{const b=localStorage.getItem(o);return b!==null?b==="true":a}),[h,m]=T.useState(()=>{const b=localStorage.getItem(l);return b!==null?b==="true":s});T.useEffect(()=>{const b=document.documentElement;u?b.classList.remove("no-animations"):b.classList.add("no-animations"),localStorage.setItem(o,String(u))},[u,o]),T.useEffect(()=>{localStorage.setItem(l,String(h))},[h,l]);const g={enableAnimations:u,setEnableAnimations:d,enableWavesBackground:h,setEnableWavesBackground:m};return y.jsx(wE,{value:g,children:n})}const DE={theme:"system",resolvedTheme:"light",setTheme:()=>null,themeConfig:{selectedPreset:"light",accentColor:"",tokenOverrides:{},customCSS:""},updateThemeConfig:()=>null,resetTheme:()=>null},qb=T.createContext(DE),wy="188.5 100% 45.5%",VL="#00c7e8",jt=(n,a,s)=>n<a?a:n>s?s:n,Ku=n=>Math.round(n*10)/10,AE=n=>(n%360+360)%360,Ri=n=>{const s=n.trim().replace(/^hsl\(/i,"").replace(/\)$/i,"").replace(/,/g," ").split(/\s+/).filter(Boolean),o=s[0]??"0",l=s[1]??"0%",u=s[2]??"0%",d=Number.parseFloat(o),h=Number.parseFloat(l.replace("%","")),m=Number.parseFloat(u.replace("%",""));return{h:Number.isNaN(d)?0:d,s:Number.isNaN(h)?0:h,l:Number.isNaN(m)?0:m}},lt=(n,a,s)=>{const o=Ku(AE(n)),l=Ku(jt(a,0,100)),u=Ku(jt(s,0,100));return`${o} ${l}% ${u}%`},EE=n=>{const a=n.trim();return/^-?\d+(?:\.\d+)?\s+-?\d+(?:\.\d+)?%\s+-?\d+(?:\.\d+)?%$/i.test(a)},ME=n=>{let a=n.trim().replace("#","");if(a.length===3&&(a=a.split("").map(v=>`${v}${v}`).join("")),a.length!==6)return lt(0,0,0);const s=Number.parseInt(a.slice(0,2),16)/255,o=Number.parseInt(a.slice(2,4),16)/255,l=Number.parseInt(a.slice(4,6),16)/255,u=Math.max(s,o,l),d=Math.min(s,o,l),h=u-d,m=(u+d)/2;let g=0,b=0;if(h!==0){switch(b=m>.5?h/(2-u-d):h/(u+d),u){case s:g=(o-l)/h+(o<l?6:0);break;case o:g=(l-s)/h+2;break;case l:g=(s-o)/h+4;break}g*=60}return lt(g,b*100,m*100)},td=n=>{const a=n?.trim();if(!a)return wy;if(a.startsWith("#"))return ME(a);if(EE(a)){const{h:s,s:o,l}=Ri(a);return lt(s,o,l)}return wy},kE=(n,a)=>{const{h:s,s:o,l}=Ri(n);return lt(s+a,o,l)},NE=(n,a)=>{const{h:s,s:o}=Ri(n);return lt(s,o,a)},RE=(n,a)=>{const{h:s,l:o}=Ri(n);return lt(s,a,o)},wr=n=>{const{h:a,s,l:o}=Ri(n),l=jt(s*.15,6,20);return o>60?lt(a,l,10):lt(a,l,96)},jE=(n,a)=>{const s=Ri(n),o=lt(s.h,s.s,s.l),l=a?"222.2 84% 4.9%":"0 0% 100%",u=a?"210 40% 98%":"222.2 84% 4.9%",d=lt(s.h,jt(s.s*.35,8,40),a?17.5:96),h=lt(s.h,jt(s.s*.12,2,18),a?17.5:96),m=lt(s.h+35,jt(s.s*.6,20,85),a?jt(s.l*.6+8,25,60):jt(s.l*.8+14,40,75)),g=lt(0,jt(s.s,60,90),a?30.6:60.2),b=lt(s.h,jt(s.s*.2,5,25),a?17.5:91.4),v=RE(NE(h,a?65.1:46.9),jt(s.s*.2,10,30)),x=lt(s.h,s.s,s.l),w=[0,72,144,216,288].map(V=>kE(x,V)),R=jt(s.s*(a?.18:.14),a?10:6,a?24:16),L=lt(s.h,R,a?8.8:98.6),M=lt(s.h,jt(R+(a?3:2),0,100),a?10.5:99.3);return{primary:o,"primary-foreground":wr(o),"primary-gradient":"none",secondary:d,"secondary-foreground":wr(d),muted:h,"muted-foreground":v,accent:m,"accent-foreground":wr(m),destructive:g,"destructive-foreground":wr(g),background:l,foreground:u,card:L,"card-foreground":u,popover:M,"popover-foreground":u,border:b,input:b,ring:o,"chart-1":w[0],"chart-2":w[1],"chart-3":w[2],"chart-4":w[3],"chart-5":w[4]}},We={MODE:"maibot-theme-mode",PRESET:"maibot-theme-preset",ACCENT:"maibot-theme-accent",OVERRIDES:"maibot-theme-overrides",CUSTOM_CSS:"maibot-theme-custom-css",BACKGROUND_CONFIG:"maibot-theme-background"},Cy={selectedPreset:"light",customCSS:""};function Xr(){const n=localStorage.getItem(We.PRESET),a=localStorage.getItem(We.ACCENT),s=localStorage.getItem(We.OVERRIDES),o=localStorage.getItem(We.CUSTOM_CSS);let l={};if(s)try{l=JSON.parse(s)}catch{l={}}const u=localStorage.getItem(We.BACKGROUND_CONFIG);let d={};if(u)try{d=JSON.parse(u)}catch{d={}}return{selectedPreset:n||Cy.selectedPreset,accentColor:td(a),tokenOverrides:l,customCSS:o||Cy.customCSS,backgroundConfig:d}}function Kb(n){localStorage.setItem(We.PRESET,n.selectedPreset),localStorage.setItem(We.ACCENT,td(n.accentColor)),localStorage.setItem(We.OVERRIDES,JSON.stringify(n.tokenOverrides)),localStorage.setItem(We.CUSTOM_CSS,n.customCSS),n.backgroundConfig?localStorage.setItem(We.BACKGROUND_CONFIG,JSON.stringify(n.backgroundConfig)):localStorage.removeItem(We.BACKGROUND_CONFIG)}function OE(n){const s={...Xr(),...n};Kb(s)}function PL(){const n=Xr();return JSON.stringify(n,null,2)}function _L(n){const a=[];let s;try{s=JSON.parse(n)}catch(u){return{success:!1,errors:[`Invalid JSON format: ${u instanceof Error?u.message:"Unknown error"}`]}}if(typeof s!="object"||s===null)return{success:!1,errors:["Configuration must be a JSON object"]};const o=s;if(typeof o.selectedPreset!="string"&&a.push("selectedPreset must be a string"),typeof o.accentColor!="string"&&a.push("accentColor must be a string"),typeof o.customCSS!="string"&&a.push("customCSS must be a string"),o.tokenOverrides!==void 0&&typeof o.tokenOverrides!="object"&&a.push("tokenOverrides must be an object"),a.length>0)return{success:!1,errors:a};const l={selectedPreset:o.selectedPreset,accentColor:o.accentColor,tokenOverrides:o.tokenOverrides||{},customCSS:o.customCSS,backgroundConfig:o.backgroundConfig??{}};return Kb(l),{success:!0,errors:[]}}function LE(){Object.values(We).forEach(n=>{localStorage.removeItem(n)})}function zE(){const n=localStorage.getItem("ui-theme"),a=localStorage.getItem("maibot-ui-theme");localStorage.getItem(We.MODE)||(n?localStorage.setItem(We.MODE,n):a&&localStorage.setItem(We.MODE,a));const o=localStorage.getItem("accent-color"),l=localStorage.getItem(We.ACCENT);o&&!l&&localStorage.setItem(We.ACCENT,td(o)),localStorage.removeItem("ui-theme"),localStorage.removeItem("maibot-ui-theme"),localStorage.removeItem("accent-color")}const Yb={color:{primary:"188.5 100% 45.5%","primary-foreground":"210 40% 98%","primary-gradient":"none",secondary:"188.5 35% 96%","secondary-foreground":"222.2 47.4% 11.2%",muted:"188.5 12% 96%","muted-foreground":"188.5 20% 46.9%",accent:"223.5 60% 50.4%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"188.5 14% 98.6%","card-foreground":"222.2 84% 4.9%",popover:"188.5 16% 99.3%","popover-foreground":"222.2 84% 4.9%",border:"188.5 20% 91.4%",input:"188.5 20% 91.4%",ring:"188.5 100% 45.5%","chart-1":"188.5 100% 45.5%","chart-2":"160 60% 45%","chart-3":"30 80% 55%","chart-4":"280 65% 60%","chart-5":"340 75% 55%"},typography:{"font-family-base":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"font-family-code":'"JetBrains Mono", "Monaco", "Courier New", monospace',"font-size-xs":"0.75rem","font-size-sm":"0.875rem","font-size-base":"1rem","font-size-lg":"1.125rem","font-size-xl":"1.25rem","font-size-2xl":"1.5rem","font-weight-normal":400,"font-weight-medium":500,"font-weight-semibold":600,"font-weight-bold":700,"line-height-tight":1.2,"line-height-normal":1.5,"line-height-relaxed":1.75,"letter-spacing-tight":"-0.02em","letter-spacing-normal":"0em","letter-spacing-wide":"0.02em"},visual:{"radius-sm":"0.25rem","radius-md":"0.375rem","radius-lg":"0.5rem","radius-xl":"0.75rem","radius-full":"9999px","shadow-sm":"0 1px 2px 0 rgba(0, 0, 0, 0.05)","shadow-md":"0 4px 6px -1px rgba(0, 0, 0, 0.1)","shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1)","shadow-xl":"0 20px 25px -5px rgba(0, 0, 0, 0.1)","blur-sm":"4px","blur-md":"12px","blur-lg":"24px","opacity-disabled":.5,"opacity-hover":.8,"opacity-overlay":.75},layout:{"space-unit":"0.25rem","space-xs":"0.5rem","space-sm":"0.75rem","space-md":"1rem","space-lg":"1.5rem","space-xl":"2rem","space-2xl":"3rem","sidebar-width":"13rem","header-height":"3.5rem","max-content-width":"1280px"},animation:{"anim-duration-fast":"150ms","anim-duration-normal":"300ms","anim-duration-slow":"500ms","anim-easing-default":"cubic-bezier(0.4, 0, 0.2, 1)","anim-easing-in":"cubic-bezier(0.4, 0, 1, 1)","anim-easing-out":"cubic-bezier(0, 0, 0.2, 1)","anim-easing-in-out":"cubic-bezier(0.4, 0, 0.2, 1)","transition-colors":"color 300ms cubic-bezier(0.4, 0, 0.2, 1)","transition-transform":"transform 300ms cubic-bezier(0.4, 0, 0.2, 1)","transition-opacity":"opacity 300ms cubic-bezier(0.4, 0, 0.2, 1)"}},Xb={color:{primary:"188.5 100% 45.5%","primary-foreground":"210 40% 98%","primary-gradient":"none",secondary:"188.5 35% 17.5%","secondary-foreground":"210 40% 98%",muted:"188.5 12% 17.5%","muted-foreground":"188.5 20% 65.1%",accent:"223.5 60% 35.3%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"188.5 18% 8.8%","card-foreground":"210 40% 98%",popover:"188.5 21% 10.5%","popover-foreground":"210 40% 98%",border:"188.5 20% 17.5%",input:"188.5 20% 17.5%",ring:"188.5 100% 45.5%","chart-1":"188.5 100% 45.5%","chart-2":"160 60% 50%","chart-3":"30 80% 60%","chart-4":"280 65% 65%","chart-5":"340 75% 60%"},typography:{"font-family-base":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"font-family-code":'"JetBrains Mono", "Monaco", "Courier New", monospace',"font-size-xs":"0.75rem","font-size-sm":"0.875rem","font-size-base":"1rem","font-size-lg":"1.125rem","font-size-xl":"1.25rem","font-size-2xl":"1.5rem","font-weight-normal":400,"font-weight-medium":500,"font-weight-semibold":600,"font-weight-bold":700,"line-height-tight":1.2,"line-height-normal":1.5,"line-height-relaxed":1.75,"letter-spacing-tight":"-0.02em","letter-spacing-normal":"0em","letter-spacing-wide":"0.02em"},visual:{"radius-sm":"0.25rem","radius-md":"0.375rem","radius-lg":"0.5rem","radius-xl":"0.75rem","radius-full":"9999px","shadow-sm":"0 1px 2px 0 rgba(0, 0, 0, 0.25)","shadow-md":"0 4px 6px -1px rgba(0, 0, 0, 0.3)","shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.4)","shadow-xl":"0 20px 25px -5px rgba(0, 0, 0, 0.5)","blur-sm":"4px","blur-md":"12px","blur-lg":"24px","opacity-disabled":.5,"opacity-hover":.8,"opacity-overlay":.75},layout:{"space-unit":"0.25rem","space-xs":"0.5rem","space-sm":"0.75rem","space-md":"1rem","space-lg":"1.5rem","space-xl":"2rem","space-2xl":"3rem","sidebar-width":"13rem","header-height":"3.5rem","max-content-width":"1280px"},animation:{"anim-duration-fast":"150ms","anim-duration-normal":"300ms","anim-duration-slow":"500ms","anim-easing-default":"cubic-bezier(0.4, 0, 0.2, 1)","anim-easing-in":"cubic-bezier(0.4, 0, 1, 1)","anim-easing-out":"cubic-bezier(0, 0, 0.2, 1)","anim-easing-in-out":"cubic-bezier(0.4, 0, 0.2, 1)","transition-colors":"color 300ms cubic-bezier(0.4, 0, 0.2, 1)","transition-transform":"transform 300ms cubic-bezier(0.4, 0, 0.2, 1)","transition-opacity":"opacity 300ms cubic-bezier(0.4, 0, 0.2, 1)"}};function ks(n,a){return`--${n}-${a}`}const BE={blur:0,overlayColor:"0 0% 0%",overlayOpacity:0,position:"cover",brightness:100,contrast:100,saturate:100},Dy={type:"none",effects:BE,customCSS:""},UE={id:"light",name:"默认亮色",description:"默认亮色主题",tokens:Yb,isDark:!1},VE={id:"dark",name:"默认暗色",description:"默认暗色主题",tokens:Xb,isDark:!0},PE=[UE,VE];function _E(n){return PE.find(a=>a.id===n)}const HE=[{pattern:/@import\s+(?:url\()?['"]?(?:https?:|\/\/)?[^)'"]+['"]?\)?[;]?/gi,message:"移除 @import 语句(禁止加载外部资源)"},{pattern:/url\s*\(\s*(?:https?:|\/\/|data:|javascript:)[^)]*\)/gi,message:"移除 url() 调用(禁止外部请求)"},{pattern:/javascript:/gi,message:"移除 javascript: 协议(XSS 防护)"},{pattern:/expression\s*\(\s*[^)]*\)/gi,message:"移除 expression() 函数(IE 遗留 XSS 向量)"},{pattern:/-moz-binding\s*:\s*[^;]+/gi,message:"移除 -moz-binding 属性(Firefox XSS 向量)"},{pattern:/behavior\s*:\s*[^;]+/gi,message:"移除 behavior: 属性(IE HTC)"}];function FE(n){return n.split(/\r?\n/)}function IE(n,a){const s=FE(n),o=[];return s.forEach((l,u)=>{a.test(l)&&o.push(u+1)}),o}function Qb(n){let a=n;const s=[];return HE.forEach(o=>{IE(a,o.pattern).forEach(u=>{s.push(`Line ${u}: ${o.message}`)}),a=a.replace(o.pattern,"")}),a=a.replace(/\n\s*\n/g,`
|
||
`).trim(),{css:a,warnings:s}}const Cf="maibot-custom-css",Zb="maibot-bg-css-",GE=["page","sidebar","header","card","dialog"],Cr=(n,a)=>({color:{...n.color,...a.color??{}},typography:{...n.typography,...a.typography??{}},visual:{...n.visual,...a.visual??{}},layout:{...n.layout,...a.layout??{}},animation:{...n.animation,...a.animation??{}}}),$b=(n,a)=>{let o=Cr(a?Xb:Yb,{});if(n.accentColor){const l=jE(n.accentColor,a);o=Cr(o,{color:l})}if(n.selectedPreset&&n.selectedPreset!=="light"&&n.selectedPreset!=="dark"){const l=_E(n.selectedPreset);l?.tokens&&(o=Cr(o,l.tokens))}return n.tokenOverrides&&(o=Cr(o,n.tokenOverrides)),o};function HL(n,a){return $b(n,a)}function qE(n,a){Object.entries(n.color).forEach(([s,o])=>{a.style.setProperty(ks("color",s),String(o))}),Object.entries(n.typography).forEach(([s,o])=>{a.style.setProperty(ks("typography",s),String(o))}),Object.entries(n.visual).forEach(([s,o])=>{a.style.setProperty(ks("visual",s),String(o))}),Object.entries(n.layout).forEach(([s,o])=>{a.style.setProperty(ks("layout",s),String(o))}),Object.entries(n.animation).forEach(([s,o])=>{a.style.setProperty(ks("animation",s),String(o))})}function KE(n){if(n.trim().length===0){Qr();return}const a=document.getElementById(Cf);if(a){a.textContent=n;return}const s=document.createElement("style");s.id=Cf,s.textContent=n,document.head.appendChild(s)}function Qr(){const n=document.getElementById(Cf);n&&n.remove()}function YE(n,a){const s=`${Zb}${a}`;if(n.trim().length===0){Zr(a);return}const l=Qb(n).css;if(l.trim().length===0){Zr(a);return}const u=document.getElementById(s);if(u){u.textContent=l;return}const d=document.createElement("style");d.id=s,d.textContent=l,document.head.appendChild(d)}function Zr(n){const a=`${Zb}${n}`;document.getElementById(a)?.remove()}function XE(){GE.forEach(Zr)}function QE(n,a){const s=document.documentElement,o=$b(n,a);if(qE(o,s),n.customCSS){const l=Qb(n.customCSS);l.css.trim().length>0?KE(l.css):Qr()}else Qr();if(n.backgroundConfig){const{page:l,sidebar:u,header:d,card:h,dialog:m}=n.backgroundConfig;[["page",l],["sidebar",u],["header",d],["card",h],["dialog",m]].forEach(([g,b])=>{b&&typeof b=="object"&&"customCSS"in b&&b.customCSS?YE(b.customCSS,g):Zr(g)})}else XE()}function ZE({children:n,defaultTheme:a="system",storageKey:s}){const[o,l]=T.useState(()=>localStorage.getItem(We.MODE)||a),[u,d]=T.useState(()=>Xr()),[h,m]=T.useState(0),g=T.useMemo(()=>o!=="system"?o:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[o,h]);T.useEffect(()=>{zE()},[]),T.useEffect(()=>{const w=window.matchMedia("(prefers-color-scheme: dark)"),R=()=>{o==="system"&&m(L=>L+1)};return w.addEventListener("change",R),()=>w.removeEventListener("change",R)},[o]),T.useEffect(()=>{const w=document.documentElement;w.classList.remove("light","dark"),w.classList.add(g),QE(u,g==="dark")},[g,u]);const b=T.useCallback(w=>{localStorage.setItem(We.MODE,w),l(w)},[]),v=T.useCallback(w=>{OE(w),d(R=>({...R,...w}))},[]),x=T.useCallback(()=>{LE(),Qr(),d(Xr())},[]),D=T.useMemo(()=>({theme:o,resolvedTheme:g,setTheme:b,themeConfig:u,updateThemeConfig:v,resetTheme:x}),[o,g,b,u,v,x]);return y.jsx(qb,{value:D,children:n})}const Wb=T.createContext(null),Jb="maibot-completed-tours";function $E(){try{const n=localStorage.getItem(Jb);return n?new Set(JSON.parse(n)):new Set}catch{return new Set}}function Ay(n){localStorage.setItem(Jb,JSON.stringify([...n]))}function WE({children:n}){const[a,s]=T.useState({activeTourId:null,stepIndex:0,isRunning:!1}),[o]=T.useState(()=>new Map),[l,u]=T.useState($E),[,d]=T.useState(0),h=T.useCallback((z,j)=>{o.set(z,j),d(F=>F+1)},[o]),m=T.useCallback(z=>{o.delete(z),s(j=>j.activeTourId===z?{...j,activeTourId:null,isRunning:!1,stepIndex:0}:j)},[o]),g=T.useCallback((z,j=0)=>{o.has(z)&&s({activeTourId:z,stepIndex:j,isRunning:!0})},[o]),b=T.useCallback(()=>{s(z=>({...z,isRunning:!1}))},[]),v=T.useCallback(z=>{s(j=>({...j,stepIndex:z}))},[]),x=T.useCallback(()=>{s(z=>({...z,stepIndex:z.stepIndex+1}))},[]),D=T.useCallback(()=>{s(z=>({...z,stepIndex:Math.max(0,z.stepIndex-1)}))},[]),w=T.useCallback(()=>a.activeTourId?o.get(a.activeTourId)||[]:[],[a.activeTourId,o]),R=T.useCallback(z=>{u(j=>{const F=new Set(j);return F.add(z),Ay(F),F})},[]),L=T.useCallback(z=>{const{action:j,index:F,status:X,type:ie}=z,Q=["finished","skipped"];if(j==="close"){s(G=>({...G,isRunning:!1,stepIndex:0}));return}Q.includes(X)?s(G=>(X==="finished"&&G.activeTourId&&setTimeout(()=>R(G.activeTourId),0),{...G,isRunning:!1,stepIndex:0})):ie==="step:after"&&(j==="next"?s(G=>({...G,stepIndex:F+1})):j==="prev"&&s(G=>({...G,stepIndex:F-1})))},[R]),M=T.useCallback(z=>l.has(z),[l]),V=T.useCallback(z=>{u(j=>{const F=new Set(j);return F.delete(z),Ay(F),F})},[]);return y.jsx(Wb,{value:{state:a,tours:o,registerTour:h,unregisterTour:m,startTour:g,stopTour:b,goToStep:v,nextStep:x,prevStep:D,getCurrentSteps:w,handleJoyrideCallback:L,isTourCompleted:M,markTourCompleted:R,resetTourCompleted:V},children:n})}function JE(){const n=T.useContext(Wb);if(!n)throw new Error("useTour must be used within a TourProvider");return n}const eM={options:{zIndex:1e5,primaryColor:"hsl(var(--color-primary))",textColor:"hsl(var(--color-foreground))",backgroundColor:"hsl(var(--color-background))",arrowColor:"hsl(var(--color-background))",overlayColor:"rgba(0, 0, 0, 0.5)"},tooltip:{borderRadius:"var(--radius)",padding:"1rem"},tooltipContainer:{textAlign:"left"},tooltipTitle:{fontSize:"1rem",fontWeight:600,marginBottom:"0.5rem"},tooltipContent:{fontSize:"0.875rem",padding:"0.5rem 0"},buttonNext:{backgroundColor:"hsl(var(--color-primary))",color:"hsl(var(--color-primary-foreground))",borderRadius:"calc(var(--radius) - 2px)",fontSize:"0.875rem",padding:"0.5rem 1rem"},buttonBack:{color:"hsl(var(--color-muted-foreground))",fontSize:"0.875rem",marginRight:"0.5rem"},buttonSkip:{color:"hsl(var(--color-muted-foreground))",fontSize:"0.875rem"},buttonClose:{color:"hsl(var(--color-muted-foreground))"},spotlight:{borderRadius:"var(--radius)"}},tM={back:"上一步",close:"关闭",last:"完成",next:"下一步",nextLabelWithProgress:"下一步 ({step}/{steps})",open:"打开对话框",skip:"跳过"};function nM(){const{state:n,getCurrentSteps:a,handleJoyrideCallback:s}=JE(),o=a(),[l,u]=T.useState(!1),d=T.useRef(n.stepIndex),h=T.useRef(null);T.useEffect(()=>{d.current!==n.stepIndex&&(u(!1),d.current=n.stepIndex)},[n.stepIndex]),T.useEffect(()=>{if(!n.isRunning||o.length===0){u(!1);return}const v=o[n.stepIndex];if(!v){u(!1);return}const x=v.target;if(x==="body"){u(!0);return}u(!1);const D=setTimeout(()=>{const w=()=>{const V=document.querySelector(x);if(V){const z=V.getBoundingClientRect();if(z.width>0&&z.height>0)return!0}return!1};if(w()){setTimeout(()=>u(!0),100);return}const R=setInterval(()=>{w()&&(clearInterval(R),setTimeout(()=>u(!0),100))},100),L=setTimeout(()=>{clearInterval(R),u(!0)},5e3),M=()=>{clearInterval(R),clearTimeout(L)};h.current=M},150);return()=>{clearTimeout(D),h.current&&(h.current(),h.current=null)}},[n.isRunning,n.stepIndex,o]);const[m,g]=T.useState(null);if(T.useEffect(()=>{let v=document.getElementById("tour-portal-container");return v||(v=document.createElement("div"),v.id="tour-portal-container",v.style.cssText="position: fixed; top: 0; left: 0; z-index: 99999; pointer-events: none;",document.body.appendChild(v)),g(v),()=>{}},[]),!n.isRunning||o.length===0||!l)return null;const b=y.jsx(Sw,{steps:o,stepIndex:n.stepIndex,run:n.isRunning,continuous:!0,showSkipButton:!0,showProgress:!0,disableOverlayClose:!0,disableScrolling:!1,disableScrollParentFix:!1,callback:s,styles:eM,locale:tM,scrollOffset:80,scrollToFirstStep:!0},`tour-step-${n.stepIndex}`);return m?dw.createPortal(b,m):b}function K(...n){return rC(lC(n))}const nd=Qs("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),He=T.forwardRef(({className:n,variant:a,size:s,asChild:o=!1,...l},u)=>{const d=o?Tw:"button";return y.jsx(d,{className:K(nd({variant:a,size:s,className:n})),ref:u,...l})});He.displayName="Button";const ad=T.forwardRef(({className:n,...a},s)=>y.jsx("div",{ref:s,className:K("rounded-xl border bg-card text-card-foreground shadow",n),...a}));ad.displayName="Card";const id=T.forwardRef(({className:n,...a},s)=>y.jsx("div",{ref:s,className:K("flex flex-col space-y-1.5 p-6",n),...a}));id.displayName="CardHeader";const sd=T.forwardRef(({className:n,...a},s)=>y.jsx("div",{ref:s,className:K("font-semibold leading-none tracking-tight",n),...a}));sd.displayName="CardTitle";const od=T.forwardRef(({className:n,...a},s)=>y.jsx("div",{ref:s,className:K("text-sm text-muted-foreground",n),...a}));od.displayName="CardDescription";const rd=T.forwardRef(({className:n,...a},s)=>y.jsx("div",{ref:s,className:K("p-6 pt-0",n),...a}));rd.displayName="CardContent";const aM=T.forwardRef(({className:n,...a},s)=>y.jsx("div",{ref:s,className:K("flex items-center p-6 pt-0",n),...a}));aM.displayName="CardFooter";const iM=Qs("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),e0=T.forwardRef(({className:n,variant:a,...s},o)=>y.jsx("div",{ref:o,role:"alert",className:K(iM({variant:a}),n),...s}));e0.displayName="Alert";const sM=T.forwardRef(({className:n,...a},s)=>y.jsx("h5",{ref:s,className:K("mb-1 font-medium leading-none tracking-tight",n),...a}));sM.displayName="AlertTitle";const t0=T.forwardRef(({className:n,...a},s)=>y.jsx("div",{ref:s,className:K("text-sm [&_p]:leading-relaxed",n),...a}));t0.displayName="AlertDescription";const Fs=T.forwardRef(({className:n,children:a,viewportRef:s,viewportClassName:o,contentClassName:l,scrollbars:u="both",...d},h)=>y.jsxs(nb,{ref:h,className:K("relative overflow-hidden",n),...d,children:[y.jsx(ww,{ref:s,className:K("h-full w-full rounded-[inherit]",o),children:y.jsx("div",{className:l,children:a})}),u!=="horizontal"&&y.jsx(Df,{}),u!=="vertical"&&y.jsx(Df,{orientation:"horizontal"}),y.jsx(Cw,{})]}));Fs.displayName=nb.displayName;const Df=T.forwardRef(({className:n,orientation:a="vertical",...s},o)=>y.jsx(ab,{ref:o,orientation:a,className:K("flex touch-none select-none transition-colors",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",n),...s,children:y.jsx(Dw,{className:"relative flex-1 rounded-full bg-border"})}));Df.displayName=ab.displayName;const Ey=Aw,My=Ew,ky=Mw;function oM(n){const a=n.split(`
|
||
`).slice(1),s=[];for(const o of a){const l=o.trim();if(!l.startsWith("at "))continue;const u=l.match(/at\s+(?:(.+?)\s+\()?(.+?):(\d+):(\d+)\)?$/);u?s.push({functionName:u[1]||"<anonymous>",fileName:u[2],lineNumber:u[3],columnNumber:u[4],raw:l}):s.push({functionName:"<unknown>",fileName:"",lineNumber:"",columnNumber:"",raw:l})}return s}function rM({error:n,errorInfo:a}){const[s,o]=T.useState(!0),[l,u]=T.useState(!1),[d,h]=T.useState(!1),{t:m}=Nn(),g=n.stack?oM(n.stack):[],b=async()=>{const v=`
|
||
Error: ${n.name}
|
||
Message: ${n.message}
|
||
|
||
Stack Trace:
|
||
${n.stack||"No stack trace available"}
|
||
|
||
Component Stack:
|
||
${a?.componentStack||"No component stack available"}
|
||
|
||
URL: ${window.location.href}
|
||
User Agent: ${navigator.userAgent}
|
||
Time: ${new Date().toISOString()}
|
||
`.trim();try{await navigator.clipboard.writeText(v),h(!0),setTimeout(()=>h(!1),2e3)}catch(x){console.error("Failed to copy:",x)}};return y.jsxs("div",{className:"space-y-4",children:[y.jsxs(e0,{variant:"destructive",className:"border-red-500/50 bg-red-500/10",children:[y.jsx(Fr,{className:"h-4 w-4"}),y.jsxs(t0,{className:"font-mono text-sm",children:[y.jsxs("span",{className:"font-semibold",children:[n.name,":"]})," ",n.message]})]}),g.length>0&&y.jsxs(Ey,{open:s,onOpenChange:o,children:[y.jsx(My,{asChild:!0,children:y.jsxs(He,{variant:"ghost",className:"w-full justify-between p-3 h-auto",children:[y.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[y.jsx(uC,{className:"h-4 w-4"}),"Stack Trace (",g.length," frames)"]}),s?y.jsx(Yg,{className:"h-4 w-4"}):y.jsx(Xg,{className:"h-4 w-4"})]})}),y.jsx(ky,{children:y.jsx(Fs,{className:"h-[280px] rounded-md border bg-muted/30",children:y.jsx("div",{className:"p-3 space-y-1",children:g.map((v,x)=>y.jsx("div",{className:"font-mono text-xs p-2 rounded hover:bg-muted/50 transition-colors",children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsxs("span",{className:"text-muted-foreground w-6 text-right flex-shrink-0",children:[x+1,"."]}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("span",{className:"text-primary font-medium",children:v.functionName}),v.fileName&&y.jsxs("div",{className:"text-muted-foreground mt-0.5 break-all",children:[v.fileName,v.lineNumber&&y.jsxs("span",{className:"text-yellow-600 dark:text-yellow-400",children:[":",v.lineNumber,":",v.columnNumber]})]})]})]})},x))})})})]}),a?.componentStack&&y.jsxs(Ey,{open:l,onOpenChange:u,children:[y.jsx(My,{asChild:!0,children:y.jsxs(He,{variant:"ghost",className:"w-full justify-between p-3 h-auto",children:[y.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[y.jsx(Fr,{className:"h-4 w-4"}),"Component Stack"]}),l?y.jsx(Yg,{className:"h-4 w-4"}):y.jsx(Xg,{className:"h-4 w-4"})]})}),y.jsx(ky,{children:y.jsx(Fs,{className:"h-[200px] rounded-md border bg-muted/30",children:y.jsx("pre",{className:"p-3 font-mono text-xs whitespace-pre-wrap text-muted-foreground",children:a.componentStack})})})]}),y.jsx(He,{variant:"outline",size:"sm",onClick:b,className:"w-full",children:d?y.jsxs(y.Fragment,{children:[y.jsx(ed,{className:"mr-2 h-4 w-4 text-green-500"}),m("errorBoundary.copiedToClipboard")]}):y.jsxs(y.Fragment,{children:[y.jsx(Ab,{className:"mr-2 h-4 w-4"}),m("errorBoundary.copyError")]})})]})}function n0({error:n,errorInfo:a}){const{t:s}=Nn(),o=()=>{window.location.href="/"},l=()=>{window.location.reload()};return y.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:y.jsxs(ad,{className:"w-full max-w-2xl shadow-lg",children:[y.jsxs(id,{className:"text-center pb-2",children:[y.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30 mb-4",children:y.jsx(Fr,{className:"h-8 w-8 text-red-600 dark:text-red-400"})}),y.jsx(sd,{className:"text-2xl font-bold",children:s("errorBoundary.title")}),y.jsx(od,{className:"text-base mt-2",children:s("errorBoundary.description")})]}),y.jsxs(rd,{className:"space-y-4",children:[y.jsx(rM,{error:n,errorInfo:a}),y.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 pt-2",children:[y.jsxs(He,{onClick:l,className:"flex-1",children:[y.jsx(cC,{className:"mr-2 h-4 w-4"}),s("errorBoundary.refreshPage")]}),y.jsxs(He,{onClick:o,variant:"outline",className:"flex-1",children:[y.jsx(Jf,{className:"mr-2 h-4 w-4"}),s("errorBoundary.goHome")]})]}),y.jsx("p",{className:"text-xs text-center text-muted-foreground pt-2",children:s("errorBoundary.footer")})]})]})})}class lM extends T.Component{constructor(a){super(a),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,s){console.error("ErrorBoundary caught an error:",a,s),this.setState({errorInfo:s})}handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null})};render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback:y.jsx(n0,{error:this.state.error,errorInfo:this.state.errorInfo}):this.props.children}}function a0({error:n}){return y.jsx(n0,{error:n,errorInfo:null})}const Mi=T.forwardRef(({className:n,type:a,...s},o)=>y.jsx("input",{type:a,className:K("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:o,...s}));Mi.displayName="Input";const cM=Qs("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Is=T.forwardRef(({className:n,...a},s)=>y.jsx(ib,{ref:s,className:K(cM(),n),...a}));Is.displayName=ib.displayName;function uM(){return{kind:"browser",userAgent:typeof navigator<"u"?navigator.userAgent:void 0,source:"fallback"}}function fM(){return typeof globalThis<"u"&&globalThis.__RUNTIME__?globalThis.__RUNTIME__:uM()}function Je(){return fM().kind==="electron"}function dM(){return Je()?typeof window<"u"&&window.electronAPI?.getPlatform?window.electronAPI.getPlatform():"unknown":"browser"}function hM({open:n}){const[a,s]=T.useState(""),[o,l]=T.useState(""),[u,d]=T.useState("idle"),[h,m]=T.useState(""),[g,b]=T.useState(!1),[v,x]=T.useState(""),[D,w]=T.useState("");if(!Je()||!n)return null;const R=j=>j.trim()?(x(""),!0):(x("后端名称不能为空"),!1),L=j=>j.trim()?/^https?:\/\/.+/.test(j)?j.endsWith("/")?(w("地址末尾不能包含 /"),!1):(w(""),!0):(w("地址必须以 http:// 或 https:// 开头"),!1):(w("后端地址不能为空"),!1),M=async()=>{if(L(o)){d("loading"),m("");try{const j=await fetch(`${o}/api/webui/system/health`,{method:"GET",signal:AbortSignal.timeout(1e4)});j.ok?d("success"):(d("error"),m(`服务器返回状态码 ${j.status}`))}catch(j){d("error"),j instanceof DOMException&&j.name==="TimeoutError"?m("连接超时,请检查地址是否正确"):j instanceof TypeError?m("无法连接到服务器,请检查地址和网络"):m(j instanceof Error?j.message:"未知错误")}}},V=async()=>{const j=R(a),F=L(o);if(!(!j||!F)){b(!0);try{const X=await window.electronAPI.addBackend({name:a.trim(),url:o.trim(),isDefault:!0});await window.electronAPI.setActiveBackend(X.id),await window.electronAPI.markFirstLaunchComplete(),window.location.reload()}catch(X){b(!1),d("error"),m(X instanceof Error?X.message:"保存配置失败,请重试")}}},z=a.trim()!==""&&/^https?:\/\/.+/.test(o)&&!o.endsWith("/");return y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background",children:[y.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[y.jsx("div",{className:"absolute left-1/4 top-1/4 h-64 w-64 md:h-96 md:w-96 rounded-full bg-primary/5 blur-3xl"}),y.jsx("div",{className:"absolute right-1/4 bottom-1/4 h-64 w-64 md:h-96 md:w-96 rounded-full bg-secondary/5 blur-3xl"})]}),y.jsxs(ad,{className:"relative z-10 max-w-md w-full mx-4 shadow-lg",children:[y.jsxs(id,{className:"text-center",children:[y.jsx("div",{className:"mx-auto mb-2 flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10",children:y.jsx(fC,{className:"h-6 w-6 text-primary"})}),y.jsx(sd,{className:"text-2xl",children:"欢迎使用 MaiBot"}),y.jsx(od,{children:"配置您的第一个后端连接以开始使用"})]}),y.jsxs(rd,{className:"space-y-6",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Is,{htmlFor:"backend-name",children:["后端名称 ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(Mi,{id:"backend-name",placeholder:"例如:本地服务器",value:a,onChange:j=>{s(j.target.value),v&&R(j.target.value)},onBlur:()=>R(a)}),v&&y.jsx("p",{className:"text-sm text-destructive",children:v})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(Is,{htmlFor:"backend-url",children:["后端地址 ",y.jsx("span",{className:"text-destructive",children:"*"})]}),y.jsx(Mi,{id:"backend-url",placeholder:"例如:http://192.168.1.100:8001",value:o,onChange:j=>{l(j.target.value),D&&L(j.target.value),u!=="idle"&&(d("idle"),m(""))},onBlur:()=>L(o)}),D&&y.jsx("p",{className:"text-sm text-destructive",children:D})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(He,{type:"button",variant:"outline",onClick:M,disabled:u==="loading"||!o.trim(),className:"w-full",children:u==="loading"?y.jsxs(y.Fragment,{children:[y.jsx(mf,{className:"h-4 w-4 animate-spin"}),"测试连接中..."]}):"测试连接"}),u==="success"&&y.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[y.jsx(dC,{className:"h-4 w-4"}),"连接成功"]}),u==="error"&&y.jsxs("div",{className:"flex items-start gap-2 text-sm text-destructive",children:[y.jsx(hC,{className:"h-4 w-4 mt-0.5 shrink-0"}),y.jsx("span",{children:h||"无法连接"})]})]}),y.jsx(He,{onClick:V,disabled:!z||g,className:"w-full",children:g?y.jsxs(y.Fragment,{children:[y.jsx(mf,{className:"h-4 w-4 animate-spin"}),"配置中..."]}):y.jsxs(y.Fragment,{children:["开始使用",y.jsx(mC,{className:"h-4 w-4"})]})})]})]})]})}const mM=5,pM=5e3;let Yu=0;function gM(){return Yu=(Yu+1)%Number.MAX_SAFE_INTEGER,Yu.toString()}const Xu=new Map,Ny=n=>{if(Xu.has(n))return;const a=setTimeout(()=>{Xu.delete(n),zs({type:"REMOVE_TOAST",toastId:n})},pM);Xu.set(n,a)},yM=(n,a)=>{switch(a.type){case"ADD_TOAST":return{...n,toasts:[a.toast,...n.toasts].slice(0,mM)};case"UPDATE_TOAST":return{...n,toasts:n.toasts.map(s=>s.id===a.toast.id?{...s,...a.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=a;return s?Ny(s):n.toasts.forEach(o=>{Ny(o.id)}),{...n,toasts:n.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return a.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==a.toastId)}}},Nr=[];let Rr={toasts:[]};function zs(n){Rr=yM(Rr,n),Nr.forEach(a=>{a(Rr)})}function vM({...n}){const a=gM(),s=l=>zs({type:"UPDATE_TOAST",toast:{...l,id:a}}),o=()=>zs({type:"DISMISS_TOAST",toastId:a});return zs({type:"ADD_TOAST",toast:{...n,id:a,open:!0,onOpenChange:l=>{l||o()}}}),{id:a,dismiss:o,update:s}}function bM(){const[n,a]=T.useState(Rr);return T.useEffect(()=>(Nr.push(a),()=>{const s=Nr.indexOf(a);s>-1&&Nr.splice(s,1)}),[n]),{...n,toast:vM,dismiss:s=>zs({type:"DISMISS_TOAST",toastId:s})}}function SM(n){const[a,s]=T.useState(()=>typeof window<"u"?window.matchMedia(n).matches:!1);return T.useEffect(()=>{if(typeof window>"u")return;const o=window.matchMedia(n),l=u=>{s(u.matches)};return s(o.matches),o.addEventListener("change",l),()=>{o.removeEventListener("change",l)}},[n]),a}function ld(){return SM("(max-width: 768px)")}const xM=kw,i0=T.forwardRef(({className:n,...a},s)=>{const o=ld();return y.jsx(sb,{ref:s,className:K("fixed z-[100] flex max-h-screen w-full gap-2 p-4",o?"top-0 left-0 right-0 flex-col items-center":"bottom-0 right-0 flex-col-reverse sm:max-w-[420px]",n),...a})});i0.displayName=sb.displayName;const TM=Qs("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all",{variants:{variant:{default:"border bg-primary/5 text-foreground backdrop-blur-sm",destructive:"destructive group border-destructive bg-destructive/10 text-destructive-foreground backdrop-blur-sm"},position:{desktop:"data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-slide-in-from-right data-[state=open]:animate-fade-in data-[state=closed]:animate-slide-out-to-right data-[state=closed]:animate-fade-out data-[swipe=end]:animate-slide-out-to-right",mobile:"data-[swipe=cancel]:translate-y-0 data-[swipe=end]:translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:transition-none data-[state=open]:animate-slide-in-from-top data-[state=open]:animate-fade-in data-[state=closed]:animate-slide-out-to-top data-[state=closed]:animate-fade-out data-[swipe=end]:animate-slide-out-to-top"}},defaultVariants:{variant:"default",position:"desktop"}}),s0=T.forwardRef(({className:n,variant:a,...s},o)=>{const u=ld()?"mobile":"desktop";return y.jsx(ob,{ref:o,className:K(TM({variant:a,position:u}),n),...s})});s0.displayName=ob.displayName;const wM=T.forwardRef(({className:n,...a},s)=>y.jsx(rb,{ref:s,className:K("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...a}));wM.displayName=rb.displayName;const o0=T.forwardRef(({className:n,...a},s)=>y.jsx(lb,{ref:s,className:K("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"aria-label":"关闭提示","toast-close":"",...a,children:y.jsx(cl,{className:"h-4 w-4"})}));o0.displayName=lb.displayName;const r0=T.forwardRef(({className:n,...a},s)=>y.jsx(cb,{ref:s,className:K("text-sm font-semibold [&+div]:text-xs",n),...a}));r0.displayName=cb.displayName;const l0=T.forwardRef(({className:n,...a},s)=>y.jsx(ub,{ref:s,className:K("text-sm opacity-90",n),...a}));l0.displayName=ub.displayName;function CM(){const{toasts:n}=bM(),a=ld();return y.jsxs(xM,{swipeDirection:a?"up":"right",children:[n.map(function({id:s,title:o,description:l,action:u,...d}){return y.jsxs(s0,{...d,children:[y.jsxs("div",{className:"grid gap-1",children:[o&&y.jsx(r0,{children:o}),l&&y.jsx(l0,{children:l})]}),u,y.jsx(o0,{})]},s)}),y.jsx(i0,{})]})}const DM="modulepreload",AM=function(n){return"/"+n},Ry={},Ae=function(a,s,o){let l=Promise.resolve();if(s&&s.length>0){let m=function(g){return Promise.all(g.map(b=>Promise.resolve(b).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),h=d?.nonce||d?.getAttribute("nonce");l=m(s.map(g=>{if(g=AM(g),g in Ry)return;Ry[g]=!0;const b=g.endsWith(".css"),v=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const x=document.createElement("link");if(x.rel=b?"stylesheet":DM,b||(x.as="script"),x.crossOrigin="",x.href=g,h&&x.setAttribute("nonce",h),document.head.appendChild(x),b)return new Promise((D,w)=>{x.addEventListener("load",D),x.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return l.then(d=>{for(const h of d||[])h.status==="rejected"&&u(h.reason);return a().catch(u)})};function c0(){const n=Wf();return y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:y.jsxs("div",{className:"w-full max-w-2xl text-center",children:[y.jsxs("div",{className:"relative mb-8",children:[y.jsx("h1",{className:"text-[150px] font-black leading-none text-primary/10 select-none sm:text-[200px]",children:"404"}),y.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:y.jsx(Ir,{className:"h-20 w-20 text-primary/30 sm:h-24 sm:w-24"})})]}),y.jsxs("div",{className:"space-y-4 mb-8",children:[y.jsx("h2",{className:"text-2xl font-bold text-foreground sm:text-3xl",children:"页面未找到"}),y.jsx("p",{className:"text-base text-muted-foreground sm:text-lg max-w-md mx-auto",children:"抱歉,您访问的页面不存在或已被移除。请检查 URL 是否正确,或返回首页继续浏览。"})]}),y.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[y.jsxs(He,{size:"lg",onClick:()=>n({to:"/"}),className:"gap-2 w-full sm:w-auto",children:[y.jsx(Jf,{className:"h-4 w-4"}),"返回首页"]}),y.jsxs(He,{size:"lg",variant:"outline",onClick:()=>window.history.back(),className:"gap-2 w-full sm:w-auto",children:[y.jsx(pC,{className:"h-4 w-4"}),"返回上一页"]})]}),y.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:y.jsx("p",{className:"text-sm text-muted-foreground",children:"如果您认为这是一个错误,请联系系统管理员"})})]})})}const Gs=T.createContext({});function cd(n){const a=T.useRef(null);return a.current===null&&(a.current=n()),a.current}const EM=typeof window<"u",ud=EM?T.useLayoutEffect:T.useEffect,dl=T.createContext(null);function fd(n,a){n.indexOf(a)===-1&&n.push(a)}function $r(n,a){const s=n.indexOf(a);s>-1&&n.splice(s,1)}const un=(n,a,s)=>s>a?a:s<n?n:s;let dd=()=>{};const sa={},u0=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function f0(n){return typeof n=="object"&&n!==null}const d0=n=>/^0[^.\s]+$/u.test(n);function h0(n){let a;return()=>(a===void 0&&(a=n()),a)}const qt=n=>n,MM=(n,a)=>s=>a(n(s)),Zs=(...n)=>n.reduce(MM),qs=(n,a,s)=>{const o=a-n;return o===0?1:(s-n)/o};class hd{constructor(){this.subscriptions=[]}add(a){return fd(this.subscriptions,a),()=>$r(this.subscriptions,a)}notify(a,s,o){const l=this.subscriptions.length;if(l)if(l===1)this.subscriptions[0](a,s,o);else for(let u=0;u<l;u++){const d=this.subscriptions[u];d&&d(a,s,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ot=n=>n*1e3,Gt=n=>n/1e3;function m0(n,a){return a?n*(1e3/a):0}const p0=(n,a,s)=>(((1-3*s+3*a)*n+(3*s-6*a))*n+3*a)*n,kM=1e-7,NM=12;function RM(n,a,s,o,l){let u,d,h=0;do d=a+(s-a)/2,u=p0(d,o,l)-n,u>0?s=d:a=d;while(Math.abs(u)>kM&&++h<NM);return d}function $s(n,a,s,o){if(n===a&&s===o)return qt;const l=u=>RM(u,0,1,n,s);return u=>u===0||u===1?u:p0(l(u),a,o)}const g0=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,y0=n=>a=>1-n(1-a),v0=$s(.33,1.53,.69,.99),md=y0(v0),b0=g0(md),S0=n=>n>=1?1:(n*=2)<1?.5*md(n):.5*(2-Math.pow(2,-10*(n-1))),pd=n=>1-Math.sin(Math.acos(n)),x0=y0(pd),T0=g0(pd),jM=$s(.42,0,1,1),OM=$s(0,0,.58,1),w0=$s(.42,0,.58,1),LM=n=>Array.isArray(n)&&typeof n[0]!="number",C0=n=>Array.isArray(n)&&typeof n[0]=="number",zM={linear:qt,easeIn:jM,easeInOut:w0,easeOut:OM,circIn:pd,circInOut:T0,circOut:x0,backIn:md,backInOut:b0,backOut:v0,anticipate:S0},BM=n=>typeof n=="string",jy=n=>{if(C0(n)){dd(n.length===4);const[a,s,o,l]=n;return $s(a,s,o,l)}else if(BM(n))return zM[n];return n},Dr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function UM(n,a){let s=new Set,o=new Set,l=!1,u=!1;const d=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function m(b){d.has(b)&&(g.schedule(b),n()),b(h)}const g={schedule:(b,v=!1,x=!1)=>{const w=x&&l?s:o;return v&&d.add(b),w.add(b),b},cancel:b=>{o.delete(b),d.delete(b)},process:b=>{if(h=b,l){u=!0;return}l=!0;const v=s;s=o,o=v,s.forEach(m),s.clear(),l=!1,u&&(u=!1,g.process(b))}};return g}const VM=40;function D0(n,a){let s=!1,o=!0;const l={delta:0,timestamp:0,isProcessing:!1},u=()=>s=!0,d=Dr.reduce((z,j)=>(z[j]=UM(u),z),{}),{setup:h,read:m,resolveKeyframes:g,preUpdate:b,update:v,preRender:x,render:D,postRender:w}=d,R=()=>{const z=sa.useManualTiming,j=z?l.timestamp:performance.now();s=!1,z||(l.delta=o?1e3/60:Math.max(Math.min(j-l.timestamp,VM),1)),l.timestamp=j,l.isProcessing=!0,h.process(l),m.process(l),g.process(l),b.process(l),v.process(l),x.process(l),D.process(l),w.process(l),l.isProcessing=!1,s&&a&&(o=!1,n(R))},L=()=>{s=!0,o=!0,l.isProcessing||n(R)};return{schedule:Dr.reduce((z,j)=>{const F=d[j];return z[j]=(X,ie=!1,Q=!1)=>(s||L(),F.schedule(X,ie,Q)),z},{}),cancel:z=>{for(let j=0;j<Dr.length;j++)d[Dr[j]].cancel(z)},state:l,steps:d}}const{schedule:Ne,cancel:oa,state:rt,steps:Qu}=D0(typeof requestAnimationFrame<"u"?requestAnimationFrame:qt,!0);let jr;function PM(){jr=void 0}const dt={now:()=>(jr===void 0&&dt.set(rt.isProcessing||sa.useManualTiming?rt.timestamp:performance.now()),jr),set:n=>{jr=n,queueMicrotask(PM)}},A0=n=>a=>typeof a=="string"&&a.startsWith(n),E0=A0("--"),_M=A0("var(--"),gd=n=>_M(n)?HM.test(n.split("/*")[0].trim()):!1,HM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Oy(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const ji={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Ks={...ji,transform:n=>un(0,1,n)},Ar={...ji,default:1},Bs=n=>Math.round(n*1e5)/1e5,yd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function FM(n){return n==null}const IM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vd=(n,a)=>s=>!!(typeof s=="string"&&IM.test(s)&&s.startsWith(n)||a&&!FM(s)&&Object.prototype.hasOwnProperty.call(s,a)),M0=(n,a,s)=>o=>{if(typeof o!="string")return o;const[l,u,d,h]=o.match(yd);return{[n]:parseFloat(l),[a]:parseFloat(u),[s]:parseFloat(d),alpha:h!==void 0?parseFloat(h):1}},GM=n=>un(0,255,n),Zu={...ji,transform:n=>Math.round(GM(n))},Na={test:vd("rgb","red"),parse:M0("red","green","blue"),transform:({red:n,green:a,blue:s,alpha:o=1})=>"rgba("+Zu.transform(n)+", "+Zu.transform(a)+", "+Zu.transform(s)+", "+Bs(Ks.transform(o))+")"};function qM(n){let a="",s="",o="",l="";return n.length>5?(a=n.substring(1,3),s=n.substring(3,5),o=n.substring(5,7),l=n.substring(7,9)):(a=n.substring(1,2),s=n.substring(2,3),o=n.substring(3,4),l=n.substring(4,5),a+=a,s+=s,o+=o,l+=l),{red:parseInt(a,16),green:parseInt(s,16),blue:parseInt(o,16),alpha:l?parseInt(l,16)/255:1}}const Af={test:vd("#"),parse:qM,transform:Na.transform},Ws=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),aa=Ws("deg"),cn=Ws("%"),$=Ws("px"),KM=Ws("vh"),YM=Ws("vw"),Ly={...cn,parse:n=>cn.parse(n)/100,transform:n=>cn.transform(n*100)},Ci={test:vd("hsl","hue"),parse:M0("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:s,alpha:o=1})=>"hsla("+Math.round(n)+", "+cn.transform(Bs(a))+", "+cn.transform(Bs(s))+", "+Bs(Ks.transform(o))+")"},Qe={test:n=>Na.test(n)||Af.test(n)||Ci.test(n),parse:n=>Na.test(n)?Na.parse(n):Ci.test(n)?Ci.parse(n):Af.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Na.transform(n):Ci.transform(n),getAnimatableNone:n=>{const a=Qe.parse(n);return a.alpha=0,Qe.transform(a)}},XM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function QM(n){return isNaN(n)&&typeof n=="string"&&(n.match(yd)?.length||0)+(n.match(XM)?.length||0)>0}const k0="number",N0="color",ZM="var",$M="var(",zy="${}",WM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ki(n){const a=n.toString(),s=[],o={color:[],number:[],var:[]},l=[];let u=0;const h=a.replace(WM,m=>(Qe.test(m)?(o.color.push(u),l.push(N0),s.push(Qe.parse(m))):m.startsWith($M)?(o.var.push(u),l.push(ZM),s.push(m)):(o.number.push(u),l.push(k0),s.push(parseFloat(m))),++u,zy)).split(zy);return{values:s,split:h,indexes:o,types:l}}function JM(n){return ki(n).values}function R0({split:n,types:a}){const s=n.length;return o=>{let l="";for(let u=0;u<s;u++)if(l+=n[u],o[u]!==void 0){const d=a[u];d===k0?l+=Bs(o[u]):d===N0?l+=Qe.transform(o[u]):l+=o[u]}return l}}function e2(n){return R0(ki(n))}const t2=n=>typeof n=="number"?0:Qe.test(n)?Qe.getAnimatableNone(n):n,n2=(n,a)=>typeof n=="number"?a?.trim().endsWith("/")?n:0:t2(n);function a2(n){const a=ki(n);return R0(a)(a.values.map((o,l)=>n2(o,a.split[l])))}const Jt={test:QM,parse:JM,createTransformer:e2,getAnimatableNone:a2};function $u(n,a,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?n+(a-n)*6*s:s<1/2?a:s<2/3?n+(a-n)*(2/3-s)*6:n}function i2({hue:n,saturation:a,lightness:s,alpha:o}){n/=360,a/=100,s/=100;let l=0,u=0,d=0;if(!a)l=u=d=s;else{const h=s<.5?s*(1+a):s+a-s*a,m=2*s-h;l=$u(m,h,n+1/3),u=$u(m,h,n),d=$u(m,h,n-1/3)}return{red:Math.round(l*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function Wr(n,a){return s=>s>0?a:n}const ze=(n,a,s)=>n+(a-n)*s,Wu=(n,a,s)=>{const o=n*n,l=s*(a*a-o)+o;return l<0?0:Math.sqrt(l)},s2=[Af,Na,Ci],o2=n=>s2.find(a=>a.test(n));function By(n){const a=o2(n);if(!a)return!1;let s=a.parse(n);return a===Ci&&(s=i2(s)),s}const Uy=(n,a)=>{const s=By(n),o=By(a);if(!s||!o)return Wr(n,a);const l={...s};return u=>(l.red=Wu(s.red,o.red,u),l.green=Wu(s.green,o.green,u),l.blue=Wu(s.blue,o.blue,u),l.alpha=ze(s.alpha,o.alpha,u),Na.transform(l))},Ef=new Set(["none","hidden"]);function r2(n,a){return Ef.has(n)?s=>s<=0?n:a:s=>s>=1?a:n}function l2(n,a){return s=>ze(n,a,s)}function bd(n){return typeof n=="number"?l2:typeof n=="string"?gd(n)?Wr:Qe.test(n)?Uy:f2:Array.isArray(n)?j0:typeof n=="object"?Qe.test(n)?Uy:c2:Wr}function j0(n,a){const s=[...n],o=s.length,l=n.map((u,d)=>bd(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)s[d]=l[d](u);return s}}function c2(n,a){const s={...n,...a},o={};for(const l in s)n[l]!==void 0&&a[l]!==void 0&&(o[l]=bd(n[l])(n[l],a[l]));return l=>{for(const u in o)s[u]=o[u](l);return s}}function u2(n,a){const s=[],o={color:0,var:0,number:0};for(let l=0;l<a.values.length;l++){const u=a.types[l],d=n.indexes[u][o[u]],h=n.values[d]??0;s[l]=h,o[u]++}return s}const f2=(n,a)=>{const s=Jt.createTransformer(a),o=ki(n),l=ki(a);return o.indexes.var.length===l.indexes.var.length&&o.indexes.color.length===l.indexes.color.length&&o.indexes.number.length>=l.indexes.number.length?Ef.has(n)&&!l.values.length||Ef.has(a)&&!o.values.length?r2(n,a):Zs(j0(u2(o,l),l.values),s):Wr(n,a)};function O0(n,a,s){return typeof n=="number"&&typeof a=="number"&&typeof s=="number"?ze(n,a,s):bd(n)(n,a)}const d2=n=>{const a=({timestamp:s})=>n(s);return{start:(s=!0)=>Ne.update(a,s),stop:()=>oa(a),now:()=>rt.isProcessing?rt.timestamp:dt.now()}},L0=(n,a,s=10)=>{let o="";const l=Math.max(Math.round(a/s),2);for(let u=0;u<l;u++)o+=Math.round(n(u/(l-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Jr=2e4;function Sd(n){let a=0;const s=50;let o=n.next(a);for(;!o.done&&a<Jr;)a+=s,o=n.next(a);return a>=Jr?1/0:a}function h2(n,a=100,s){const o=s({...n,keyframes:[0,a]}),l=Math.min(Sd(o),Jr);return{type:"keyframes",ease:u=>o.next(l*u).value/a,duration:Gt(l)}}const _e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Mf(n,a){return n*Math.sqrt(1-a*a)}const m2=12;function p2(n,a,s){let o=s;for(let l=1;l<m2;l++)o=o-n(o)/a(o);return o}const Ju=.001;function g2({duration:n=_e.duration,bounce:a=_e.bounce,velocity:s=_e.velocity,mass:o=_e.mass}){let l,u,d=1-a;d=un(_e.minDamping,_e.maxDamping,d),n=un(_e.minDuration,_e.maxDuration,Gt(n)),d<1?(l=g=>{const b=g*d,v=b*n,x=b-s,D=Mf(g,d),w=Math.exp(-v);return Ju-x/D*w},u=g=>{const v=g*d*n,x=v*s+s,D=Math.pow(d,2)*Math.pow(g,2)*n,w=Math.exp(-v),R=Mf(Math.pow(g,2),d);return(-l(g)+Ju>0?-1:1)*((x-D)*w)/R}):(l=g=>{const b=Math.exp(-g*n),v=(g-s)*n+1;return-Ju+b*v},u=g=>{const b=Math.exp(-g*n),v=(s-g)*(n*n);return b*v});const h=5/n,m=p2(l,u,h);if(n=Ot(n),isNaN(m))return{stiffness:_e.stiffness,damping:_e.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const y2=["duration","bounce"],v2=["stiffness","damping","mass"];function Vy(n,a){return a.some(s=>n[s]!==void 0)}function b2(n){let a={velocity:_e.velocity,stiffness:_e.stiffness,damping:_e.damping,mass:_e.mass,isResolvedFromDuration:!1,...n};if(!Vy(n,v2)&&Vy(n,y2))if(a.velocity=0,n.visualDuration){const s=n.visualDuration,o=2*Math.PI/(s*1.2),l=o*o,u=2*un(.05,1,1-(n.bounce||0))*Math.sqrt(l);a={...a,mass:_e.mass,stiffness:l,damping:u}}else{const s=g2({...n,velocity:0});a={...a,...s,mass:_e.mass},a.isResolvedFromDuration=!0}return a}function el(n=_e.visualDuration,a=_e.bounce){const s=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:l}=s;const u=s.keyframes[0],d=s.keyframes[s.keyframes.length-1],h={done:!1,value:u},{stiffness:m,damping:g,mass:b,duration:v,velocity:x,isResolvedFromDuration:D}=b2({...s,velocity:-Gt(s.velocity||0)}),w=x||0,R=g/(2*Math.sqrt(m*b)),L=d-u,M=Gt(Math.sqrt(m/b)),V=Math.abs(L)<5;o||(o=V?_e.restSpeed.granular:_e.restSpeed.default),l||(l=V?_e.restDelta.granular:_e.restDelta.default);let z,j,F,X,ie,Q;if(R<1)F=Mf(M,R),X=(w+R*M*L)/F,z=I=>{const ee=Math.exp(-R*M*I);return d-ee*(X*Math.sin(F*I)+L*Math.cos(F*I))},ie=R*M*X+L*F,Q=R*M*L-X*F,j=I=>Math.exp(-R*M*I)*(ie*Math.sin(F*I)+Q*Math.cos(F*I));else if(R===1){z=ee=>d-Math.exp(-M*ee)*(L+(w+M*L)*ee);const I=w+M*L;j=ee=>Math.exp(-M*ee)*(M*I*ee-w)}else{const I=M*Math.sqrt(R*R-1);z=ye=>{const Be=Math.exp(-R*M*ye),U=Math.min(I*ye,300);return d-Be*((w+R*M*L)*Math.sinh(U)+I*L*Math.cosh(U))/I};const ee=(w+R*M*L)/I,ne=R*M*ee-L*I,le=R*M*L-ee*I;j=ye=>{const Be=Math.exp(-R*M*ye),U=Math.min(I*ye,300);return Be*(ne*Math.sinh(U)+le*Math.cosh(U))}}const G={calculatedDuration:D&&v||null,velocity:I=>Ot(j(I)),next:I=>{if(!D&&R<1){const ne=Math.exp(-R*M*I),le=Math.sin(F*I),ye=Math.cos(F*I),Be=d-ne*(X*le+L*ye),U=Ot(ne*(ie*le+Q*ye));return h.done=Math.abs(U)<=o&&Math.abs(d-Be)<=l,h.value=h.done?d:Be,h}const ee=z(I);if(D)h.done=I>=v;else{const ne=Ot(j(I));h.done=Math.abs(ne)<=o&&Math.abs(d-ee)<=l}return h.value=h.done?d:ee,h},toString:()=>{const I=Math.min(Sd(G),Jr),ee=L0(ne=>G.next(I*ne).value,I,30);return I+"ms "+ee},toTransition:()=>{}};return G}el.applyToOptions=n=>{const a=h2(n,100,el);return n.ease=a.ease,n.duration=Ot(a.duration),n.type="keyframes",n};const S2=5;function z0(n,a,s){const o=Math.max(a-S2,0);return m0(s-n(o),a-o)}function kf({keyframes:n,velocity:a=0,power:s=.8,timeConstant:o=325,bounceDamping:l=10,bounceStiffness:u=500,modifyTarget:d,min:h,max:m,restDelta:g=.5,restSpeed:b}){const v=n[0],x={done:!1,value:v},D=Q=>h!==void 0&&Q<h||m!==void 0&&Q>m,w=Q=>h===void 0?m:m===void 0||Math.abs(h-Q)<Math.abs(m-Q)?h:m;let R=s*a;const L=v+R,M=d===void 0?L:d(L);M!==L&&(R=M-v);const V=Q=>-R*Math.exp(-Q/o),z=Q=>M+V(Q),j=Q=>{const G=V(Q),I=z(Q);x.done=Math.abs(G)<=g,x.value=x.done?M:I};let F,X;const ie=Q=>{D(x.value)&&(F=Q,X=el({keyframes:[x.value,w(x.value)],velocity:z0(z,Q,x.value),damping:l,stiffness:u,restDelta:g,restSpeed:b}))};return ie(0),{calculatedDuration:null,next:Q=>{let G=!1;return!X&&F===void 0&&(G=!0,j(Q),ie(Q)),F!==void 0&&Q>=F?X.next(Q-F):(!G&&j(Q),x)}}}function x2(n,a,s){const o=[],l=s||sa.mix||O0,u=n.length-1;for(let d=0;d<u;d++){let h=l(n[d],n[d+1]);if(a){const m=Array.isArray(a)?a[d]||qt:a;h=Zs(m,h)}o.push(h)}return o}function T2(n,a,{clamp:s=!0,ease:o,mixer:l}={}){const u=n.length;if(dd(u===a.length),u===1)return()=>a[0];if(u===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[u-1]&&(n=[...n].reverse(),a=[...a].reverse());const h=x2(a,o,l),m=h.length,g=b=>{if(d&&b<n[0])return a[0];let v=0;if(m>1)for(;v<n.length-2&&!(b<n[v+1]);v++);const x=qs(n[v],n[v+1],b);return h[v](x)};return s?b=>g(un(n[0],n[u-1],b)):g}function w2(n,a){const s=n[n.length-1];for(let o=1;o<=a;o++){const l=qs(0,a,o);n.push(ze(s,1,l))}}function C2(n){const a=[0];return w2(a,n.length-1),a}function D2(n,a){return n.map(s=>s*a)}function A2(n,a){return n.map(()=>a||w0).splice(0,n.length-1)}function Us({duration:n=300,keyframes:a,times:s,ease:o="easeInOut"}){const l=LM(o)?o.map(jy):jy(o),u={done:!1,value:a[0]},d=D2(s&&s.length===a.length?s:C2(a),n),h=T2(d,a,{ease:Array.isArray(l)?l:A2(a,l)});return{calculatedDuration:n,next:m=>(u.value=h(m),u.done=m>=n,u)}}const E2=n=>n!==null;function hl(n,{repeat:a,repeatType:s="loop"},o,l=1){const u=n.filter(E2),h=l<0||a&&s!=="loop"&&a%2===1?0:u.length-1;return!h||o===void 0?u[h]:o}const M2={decay:kf,inertia:kf,tween:Us,keyframes:Us,spring:el};function B0(n){typeof n.type=="string"&&(n.type=M2[n.type])}class xd{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,s){return this.finished.then(a,s)}}const k2=n=>n/100;class tl extends xd{constructor(a){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==dt.now()&&this.tick(dt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;B0(a);const{type:s=Us,repeat:o=0,repeatDelay:l=0,repeatType:u,velocity:d=0}=a;let{keyframes:h}=a;const m=s||Us;m!==Us&&typeof h[0]!="number"&&(this.mixKeyframes=Zs(k2,O0(h[0],h[1])),h=[0,100]);const g=m({...a,keyframes:h});u==="mirror"&&(this.mirroredGenerator=m({...a,keyframes:[...h].reverse(),velocity:-d})),g.calculatedDuration===null&&(g.calculatedDuration=Sd(g));const{calculatedDuration:b}=g;this.calculatedDuration=b,this.resolvedDuration=b+l,this.totalDuration=this.resolvedDuration*(o+1)-l,this.generator=g}updateTime(a){const s=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(a,s=!1){const{generator:o,totalDuration:l,mixKeyframes:u,mirroredGenerator:d,resolvedDuration:h,calculatedDuration:m}=this;if(this.startTime===null)return o.next(0);const{delay:g=0,keyframes:b,repeat:v,repeatType:x,repeatDelay:D,type:w,onUpdate:R,finalKeyframe:L}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-l/this.speed,this.startTime)),s?this.currentTime=a:this.updateTime(a);const M=this.currentTime-g*(this.playbackSpeed>=0?1:-1),V=this.playbackSpeed>=0?M<0:M>l;this.currentTime=Math.max(M,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=l);let z=this.currentTime,j=o;if(v){const Q=Math.min(this.currentTime,l)/h;let G=Math.floor(Q),I=Q%1;!I&&Q>=1&&(I=1),I===1&&G--,G=Math.min(G,v+1),G%2&&(x==="reverse"?(I=1-I,D&&(I-=D/h)):x==="mirror"&&(j=d)),z=un(0,1,I)*h}let F;V?(this.delayState.value=b[0],F=this.delayState):F=j.next(z),u&&!V&&(F.value=u(F.value));let{done:X}=F;!V&&m!==null&&(X=this.playbackSpeed>=0?this.currentTime>=l:this.currentTime<=0);const ie=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&X);return ie&&w!==kf&&(F.value=hl(b,this.options,L,this.speed)),R&&R(F.value),ie&&this.finish(),F}then(a,s){return this.finished.then(a,s)}get duration(){return Gt(this.calculatedDuration)}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Gt(a)}get time(){return Gt(this.currentTime)}set time(a){a=Ot(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=a,this.tick(a))}getGeneratorVelocity(){const a=this.currentTime;if(a<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(a);const s=this.generator.next(a).value;return z0(o=>this.generator.next(o).value,a,s)}get speed(){return this.playbackSpeed}set speed(a){const s=this.playbackSpeed!==a;s&&this.driver&&this.updateTime(dt.now()),this.playbackSpeed=a,s&&this.driver&&(this.time=Gt(this.currentTime))}play(){if(this.isStopped)return;const{driver:a=d2,startTime:s}=this.options;this.driver||(this.driver=a(l=>this.tick(l))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=s??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(dt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),a.observe(this)}}function N2(n){for(let a=1;a<n.length;a++)n[a]??(n[a]=n[a-1])}const Ra=n=>n*180/Math.PI,Nf=n=>{const a=Ra(Math.atan2(n[1],n[0]));return Rf(a)},R2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:Nf,rotateZ:Nf,skewX:n=>Ra(Math.atan(n[1])),skewY:n=>Ra(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},Rf=n=>(n=n%360,n<0&&(n+=360),n),Py=Nf,_y=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),Hy=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),j2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_y,scaleY:Hy,scale:n=>(_y(n)+Hy(n))/2,rotateX:n=>Rf(Ra(Math.atan2(n[6],n[5]))),rotateY:n=>Rf(Ra(Math.atan2(-n[2],n[0]))),rotateZ:Py,rotate:Py,skewX:n=>Ra(Math.atan(n[4])),skewY:n=>Ra(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function jf(n){return n.includes("scale")?1:0}function Of(n,a){if(!n||n==="none")return jf(a);const s=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,l;if(s)o=j2,l=s;else{const h=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=R2,l=h}if(!l)return jf(a);const u=o[a],d=l[1].split(",").map(L2);return typeof u=="function"?u(d):d[u]}const O2=(n,a)=>{const{transform:s="none"}=getComputedStyle(n);return Of(s,a)};function L2(n){return parseFloat(n.trim())}const Oi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Li=new Set(Oi),Fy=n=>n===ji||n===$,z2=new Set(["x","y","z"]),B2=Oi.filter(n=>!z2.has(n));function U2(n){const a=[];return B2.forEach(s=>{const o=n.getValue(s);o!==void 0&&(a.push([s,o.get()]),o.set(s.startsWith("scale")?1:0))}),a}const ia={width:({x:n},{paddingLeft:a="0",paddingRight:s="0",boxSizing:o})=>{const l=n.max-n.min;return o==="border-box"?l:l-parseFloat(a)-parseFloat(s)},height:({y:n},{paddingTop:a="0",paddingBottom:s="0",boxSizing:o})=>{const l=n.max-n.min;return o==="border-box"?l:l-parseFloat(a)-parseFloat(s)},top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:(n,{transform:a})=>Of(a,"x"),y:(n,{transform:a})=>Of(a,"y")};ia.translateX=ia.x;ia.translateY=ia.y;const Oa=new Set;let Lf=!1,zf=!1,Bf=!1;function U0(){if(zf){const n=Array.from(Oa).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),s=new Map;a.forEach(o=>{const l=U2(o);l.length&&(s.set(o,l),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const l=s.get(o);l&&l.forEach(([u,d])=>{o.getValue(u)?.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}zf=!1,Lf=!1,Oa.forEach(n=>n.complete(Bf)),Oa.clear()}function V0(){Oa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(zf=!0)})}function V2(){Bf=!0,V0(),U0(),Bf=!1}class Td{constructor(a,s,o,l,u,d=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=s,this.name=o,this.motionValue=l,this.element=u,this.isAsync=d}scheduleResolve(){this.state="scheduled",this.isAsync?(Oa.add(this),Lf||(Lf=!0,Ne.read(V0),Ne.resolveKeyframes(U0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:s,element:o,motionValue:l}=this;if(a[0]===null){const u=l?.get(),d=a[a.length-1];if(u!==void 0)a[0]=u;else if(o&&s){const h=o.readValue(s,d);h!=null&&(a[0]=h)}a[0]===void 0&&(a[0]=d),l&&u===void 0&&l.set(a[0])}N2(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Oa.delete(this)}cancel(){this.state==="scheduled"&&(Oa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const P2=n=>n.startsWith("--");function P0(n,a,s){P2(a)?n.style.setProperty(a,s):n.style[a]=s}const _2={};function _0(n,a){const s=h0(n);return()=>_2[a]??s()}const H2=_0(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),H0=_0(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Rs=([n,a,s,o])=>`cubic-bezier(${n}, ${a}, ${s}, ${o})`,Iy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rs([0,.65,.55,1]),circOut:Rs([.55,0,1,.45]),backIn:Rs([.31,.01,.66,-.59]),backOut:Rs([.33,1.53,.69,.99])};function F0(n,a){if(n)return typeof n=="function"?H0()?L0(n,a):"ease-out":C0(n)?Rs(n):Array.isArray(n)?n.map(s=>F0(s,a)||Iy.easeOut):Iy[n]}function F2(n,a,s,{delay:o=0,duration:l=300,repeat:u=0,repeatType:d="loop",ease:h="easeOut",times:m}={},g=void 0){const b={[a]:s};m&&(b.offset=m);const v=F0(h,l);Array.isArray(v)&&(b.easing=v);const x={delay:o,duration:l,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"};return g&&(x.pseudoElement=g),n.animate(b,x)}function I0(n){return typeof n=="function"&&"applyToOptions"in n}function I2({type:n,...a}){return I0(n)&&H0()?n.applyToOptions(a):(a.duration??(a.duration=300),a.ease??(a.ease="easeOut"),a)}class G0 extends xd{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!a)return;const{element:s,name:o,keyframes:l,pseudoElement:u,allowFlatten:d=!1,finalKeyframe:h,onComplete:m}=a;this.isPseudoElement=!!u,this.allowFlatten=d,this.options=a,dd(typeof a.type!="string");const g=I2(a);this.animation=F2(s,o,l,g,u),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const b=hl(l,this.options,h,this.speed);this.updateMotionValue&&this.updateMotionValue(b),P0(s,o,b),this.animation.cancel()}m?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const a=this.options?.element;!this.isPseudoElement&&a?.isConnected&&this.animation.commitStyles?.()}get duration(){const a=this.animation.effect?.getComputedTiming?.().duration||0;return Gt(Number(a))}get iterationDuration(){const{delay:a=0}=this.options||{};return this.duration+Gt(a)}get time(){return Gt(Number(this.animation.currentTime)||0)}set time(a){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ot(a),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(a){this.manualStartTime=this.animation.startTime=a}attachTimeline({timeline:a,rangeStart:s,rangeEnd:o,observe:l}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,a&&H2()?(this.animation.timeline=a,s&&(this.animation.rangeStart=s),o&&(this.animation.rangeEnd=o),qt):l(this)}}const q0={anticipate:S0,backInOut:b0,circInOut:T0};function G2(n){return n in q0}function q2(n){typeof n.ease=="string"&&G2(n.ease)&&(n.ease=q0[n.ease])}const ef=10;class K2 extends G0{constructor(a){q2(a),B0(a),super(a),a.startTime!==void 0&&a.autoplay!==!1&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){const{motionValue:s,onUpdate:o,onComplete:l,element:u,...d}=this.options;if(!s)return;if(a!==void 0){s.set(a);return}const h=new tl({...d,autoplay:!1}),m=Math.max(ef,dt.now()-this.startTime),g=un(0,ef,m-ef),b=h.sample(m).value,{name:v}=this.options;u&&v&&P0(u,v,b),s.setWithVelocity(h.sample(Math.max(0,m-g)).value,b,g),h.stop()}}const Gy=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Jt.test(n)||n==="0")&&!n.startsWith("url("));function Y2(n){const a=n[0];if(n.length===1)return!0;for(let s=0;s<n.length;s++)if(n[s]!==a)return!0}function X2(n,a,s,o){const l=n[0];if(l===null)return!1;if(a==="display"||a==="visibility")return!0;const u=n[n.length-1],d=Gy(l,a),h=Gy(u,a);return!d||!h?!1:Y2(n)||(s==="spring"||I0(s))&&o}function Uf(n){n.duration=0,n.type="keyframes"}const K0=new Set(["opacity","clipPath","filter","transform"]),Q2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Z2(n){for(let a=0;a<n.length;a++)if(typeof n[a]=="string"&&Q2.test(n[a]))return!0;return!1}const $2=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),W2=h0(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function J2(n){const{motionValue:a,name:s,repeatDelay:o,repeatType:l,damping:u,type:d,keyframes:h}=n;if(!(a?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:b}=a.owner.getProps();return W2()&&s&&(K0.has(s)||$2.has(s)&&Z2(h))&&(s!=="transform"||!b)&&!g&&!o&&l!=="mirror"&&u!==0&&d!=="inertia"}const ek=40;class tk extends xd{constructor({autoplay:a=!0,delay:s=0,type:o="keyframes",repeat:l=0,repeatDelay:u=0,repeatType:d="loop",keyframes:h,name:m,motionValue:g,element:b,...v}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=dt.now();const x={autoplay:a,delay:s,type:o,repeat:l,repeatDelay:u,repeatType:d,name:m,motionValue:g,element:b,...v},D=b?.KeyframeResolver||Td;this.keyframeResolver=new D(h,(w,R,L)=>this.onKeyframesResolved(w,R,x,!L),m,g,b),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(a,s,o,l){this.keyframeResolver=void 0;const{name:u,type:d,velocity:h,delay:m,isHandoff:g,onUpdate:b}=o;this.resolvedAt=dt.now();let v=!0;X2(a,u,d,h)||(v=!1,(sa.instantAnimations||!m)&&b?.(hl(a,o,s)),a[0]=a[a.length-1],Uf(o),o.repeat=0);const D={startTime:l?this.resolvedAt?this.resolvedAt-this.createdAt>ek?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...o,keyframes:a},w=v&&!g&&J2(D),R=D.motionValue?.owner?.current;let L;if(w)try{L=new K2({...D,element:R})}catch{L=new tl(D)}else L=new tl(D);L.finished.then(()=>{this.notifyFinished()}).catch(qt),this.pendingTimeline&&(this.stopTimeline=L.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=L}get finished(){return this._animation?this.animation.finished:this._finished}then(a,s){return this.finished.finally(a).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),V2()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Y0(n,a,s,o=0,l=1){const u=Array.from(n).sort((g,b)=>g.sortNodePosition(b)).indexOf(a),d=n.size,h=(d-1)*o;return typeof s=="function"?s(u,d):l===1?u*o:h-u*o}const nk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ak(n){const a=nk.exec(n);if(!a)return[,];const[,s,o,l]=a;return[`--${s??o}`,l]}function X0(n,a,s=1){const[o,l]=ak(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return u0(d)?parseFloat(d):d}return gd(l)?X0(l,a,s+1):l}const ik={type:"spring",stiffness:500,damping:25,restSpeed:10},sk=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),ok={type:"keyframes",duration:.8},rk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lk=(n,{keyframes:a})=>a.length>2?ok:Li.has(n)?n.startsWith("scale")?sk(a[1]):ik:rk;function Q0(n,a){if(n?.inherit&&a){const{inherit:s,...o}=n;return{...a,...o}}return n}function wd(n,a){const s=n?.[a]??n?.default??n;return s!==n?Q0(s,n):s}const ck=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function uk(n){for(const a in n)if(!ck.has(a))return!0;return!1}const Cd=(n,a,s,o={},l,u)=>d=>{const h=wd(o,n)||{},m=h.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Ot(m);const b={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:a.getVelocity(),...h,delay:-g,onUpdate:x=>{a.set(x),h.onUpdate&&h.onUpdate(x)},onComplete:()=>{d(),h.onComplete&&h.onComplete()},name:n,motionValue:a,element:u?void 0:l};uk(h)||Object.assign(b,lk(n,b)),b.duration&&(b.duration=Ot(b.duration)),b.repeatDelay&&(b.repeatDelay=Ot(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let v=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(Uf(b),b.delay===0&&(v=!0)),(sa.instantAnimations||sa.skipAnimations||l?.shouldSkipAnimations)&&(v=!0,Uf(b),b.delay=0),b.allowFlatten=!h.type&&!h.ease,v&&!u&&a.get()!==void 0){const x=hl(b.keyframes,h);if(x!==void 0){Ne.update(()=>{b.onUpdate(x),b.onComplete()});return}}return h.isSync?new tl(b):new tk(b)};function qy(n){const a=[{},{}];return n?.values.forEach((s,o)=>{a[0][o]=s.get(),a[1][o]=s.getVelocity()}),a}function Dd(n,a,s,o){if(typeof a=="function"){const[l,u]=qy(o);a=a(s!==void 0?s:n.custom,l,u)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[l,u]=qy(o);a=a(s!==void 0?s:n.custom,l,u)}return a}function La(n,a,s){const o=n.getProps();return Dd(o,a,s!==void 0?s:o.custom,n)}const Z0=new Set(["width","height","top","left","right","bottom",...Oi]),Ky=30,fk=n=>!isNaN(parseFloat(n));class dk{constructor(a,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const l=dt.now();if(this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=s.owner}setCurrent(a){this.current=a,this.updatedAt=dt.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=fk(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,s){this.events[a]||(this.events[a]=new hd);const o=this.events[a].add(s);return a==="change"?()=>{o(),Ne.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,s){this.passiveEffect=a,this.stopPassiveEffect=s}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,s,o){this.set(s),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,s=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=dt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Ky)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Ky);return m0(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(a){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=a(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ni(n,a){return new dk(n,a)}const Vf=n=>Array.isArray(n);function hk(n,a,s){n.hasValue(a)?n.getValue(a).set(s):n.addValue(a,Ni(s))}function mk(n){return Vf(n)?n[n.length-1]||0:n}function pk(n,a){const s=La(n,a);let{transitionEnd:o={},transition:l={},...u}=s||{};u={...u,...o};for(const d in u){const h=mk(u[d]);hk(n,d,h)}}const ct=n=>!!(n&&n.getVelocity);function gk(n){return!!(ct(n)&&n.add)}function Pf(n,a){const s=n.getValue("willChange");if(gk(s))return s.add(a);if(!s&&sa.WillChange){const o=new sa.WillChange("auto");n.addValue("willChange",o),o.add(a)}}function Ad(n){return n.replace(/([A-Z])/g,a=>`-${a.toLowerCase()}`)}const yk="framerAppearId",$0="data-"+Ad(yk);function W0(n){return n.props[$0]}function vk({protectedKeys:n,needsAnimating:a},s){const o=n.hasOwnProperty(s)&&a[s]!==!0;return a[s]=!1,o}function J0(n,a,{delay:s=0,transitionOverride:o,type:l}={}){let{transition:u,transitionEnd:d,...h}=a;const m=n.getDefaultTransition();u=u?Q0(u,m):m;const g=u?.reduceMotion;o&&(u=o);const b=[],v=l&&n.animationState&&n.animationState.getState()[l];for(const x in h){const D=n.getValue(x,n.latestValues[x]??null),w=h[x];if(w===void 0||v&&vk(v,x))continue;const R={delay:s,...wd(u||{},x)},L=D.get();if(L!==void 0&&!D.isAnimating()&&!Array.isArray(w)&&w===L&&!R.velocity){Ne.update(()=>D.set(w));continue}let M=!1;if(window.MotionHandoffAnimation){const j=W0(n);if(j){const F=window.MotionHandoffAnimation(j,x,Ne);F!==null&&(R.startTime=F,M=!0)}}Pf(n,x);const V=g??n.shouldReduceMotion;D.start(Cd(x,D,w,V&&Z0.has(x)?{type:!1}:R,n,M));const z=D.animation;z&&b.push(z)}if(d){const x=()=>Ne.update(()=>{d&&pk(n,d)});b.length?Promise.all(b).then(x):x()}return b}function _f(n,a,s={}){const o=La(n,a,s.type==="exit"?n.presenceContext?.custom:void 0);let{transition:l=n.getDefaultTransition()||{}}=o||{};s.transitionOverride&&(l=s.transitionOverride);const u=o?()=>Promise.all(J0(n,o,s)):()=>Promise.resolve(),d=n.variantChildren&&n.variantChildren.size?(m=0)=>{const{delayChildren:g=0,staggerChildren:b,staggerDirection:v}=l;return bk(n,a,m,g,b,v,s)}:()=>Promise.resolve(),{when:h}=l;if(h){const[m,g]=h==="beforeChildren"?[u,d]:[d,u];return m().then(()=>g())}else return Promise.all([u(),d(s.delay)])}function bk(n,a,s=0,o=0,l=0,u=1,d){const h=[];for(const m of n.variantChildren)m.notify("AnimationStart",a),h.push(_f(m,a,{...d,delay:s+(typeof o=="function"?0:o)+Y0(n.variantChildren,m,o,l,u)}).then(()=>m.notify("AnimationComplete",a)));return Promise.all(h)}function Sk(n,a,s={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const l=a.map(u=>_f(n,u,s));o=Promise.all(l)}else if(typeof a=="string")o=_f(n,a,s);else{const l=typeof a=="function"?La(n,a,s.custom):a;o=Promise.all(J0(n,l,s))}return o.then(()=>{n.notify("AnimationComplete",a)})}const xk={test:n=>n==="auto",parse:n=>n},eS=n=>a=>a.test(n),tS=[ji,$,cn,aa,YM,KM,xk],Yy=n=>tS.find(eS(n));function Tk(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||d0(n):!0}const wk=new Set(["brightness","contrast","saturate","opacity"]);function Ck(n){const[a,s]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=s.match(yd)||[];if(!o)return n;const l=s.replace(o,"");let u=wk.has(a)?1:0;return o!==s&&(u*=100),a+"("+u+l+")"}const Dk=/\b([a-z-]*)\(.*?\)/gu,Hf={...Jt,getAnimatableNone:n=>{const a=n.match(Dk);return a?a.map(Ck).join(" "):n}},Ff={...Jt,getAnimatableNone:n=>{const a=Jt.parse(n);return Jt.createTransformer(n)(a.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},Xy={...ji,transform:Math.round},Ak={rotate:aa,rotateX:aa,rotateY:aa,rotateZ:aa,scale:Ar,scaleX:Ar,scaleY:Ar,scaleZ:Ar,skew:aa,skewX:aa,skewY:aa,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:Ks,originX:Ly,originY:Ly,originZ:$},Ed={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,inset:$,insetBlock:$,insetBlockStart:$,insetBlockEnd:$,insetInline:$,insetInlineStart:$,insetInlineEnd:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,paddingBlock:$,paddingBlockStart:$,paddingBlockEnd:$,paddingInline:$,paddingInlineStart:$,paddingInlineEnd:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,marginBlock:$,marginBlockStart:$,marginBlockEnd:$,marginInline:$,marginInlineStart:$,marginInlineEnd:$,fontSize:$,backgroundPositionX:$,backgroundPositionY:$,...Ak,zIndex:Xy,fillOpacity:Ks,strokeOpacity:Ks,numOctaves:Xy},Ek={...Ed,color:Qe,backgroundColor:Qe,outlineColor:Qe,fill:Qe,stroke:Qe,borderColor:Qe,borderTopColor:Qe,borderRightColor:Qe,borderBottomColor:Qe,borderLeftColor:Qe,filter:Hf,WebkitFilter:Hf,mask:Ff,WebkitMask:Ff},nS=n=>Ek[n],Mk=new Set([Hf,Ff]);function aS(n,a){let s=nS(n);return Mk.has(s)||(s=Jt),s.getAnimatableNone?s.getAnimatableNone(a):void 0}const kk=new Set(["auto","none","0"]);function Nk(n,a,s){let o=0,l;for(;o<n.length&&!l;){const u=n[o];typeof u=="string"&&!kk.has(u)&&ki(u).values.length&&(l=n[o]),o++}if(l&&s)for(const u of a)n[u]=aS(s,l)}class Rk extends Td{constructor(a,s,o,l,u){super(a,s,o,l,u,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:s,name:o}=this;if(!s||!s.current)return;super.readKeyframes();for(let b=0;b<a.length;b++){let v=a[b];if(typeof v=="string"&&(v=v.trim(),gd(v))){const x=X0(v,s.current);x!==void 0&&(a[b]=x),b===a.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!Z0.has(o)||a.length!==2)return;const[l,u]=a,d=Yy(l),h=Yy(u),m=Oy(l),g=Oy(u);if(m!==g&&ia[o]){this.needsMeasurement=!0;return}if(d!==h)if(Fy(d)&&Fy(h))for(let b=0;b<a.length;b++){const v=a[b];typeof v=="string"&&(a[b]=parseFloat(v))}else ia[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:s}=this,o=[];for(let l=0;l<a.length;l++)(a[l]===null||Tk(a[l]))&&o.push(l);o.length&&Nk(a,o,s)}measureInitialState(){const{element:a,unresolvedKeyframes:s,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ia[o](a.measureViewportBox(),window.getComputedStyle(a.current)),s[0]=this.measuredOrigin;const l=s[s.length-1];l!==void 0&&a.getValue(o,l).jump(l,!1)}measureEndState(){const{element:a,name:s,unresolvedKeyframes:o}=this;if(!a||!a.current)return;const l=a.getValue(s);l&&l.jump(this.measuredOrigin,!1);const u=o.length-1,d=o[u];o[u]=ia[s](a.measureViewportBox(),window.getComputedStyle(a.current)),d!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=d),this.removedTransforms?.length&&this.removedTransforms.forEach(([h,m])=>{a.getValue(h).set(m)}),this.resolveNoneKeyframes()}}function iS(n,a,s){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let o=document;const l=s?.[n]??o.querySelectorAll(n);return l?Array.from(l):[]}return Array.from(n).filter(o=>o!=null)}const sS=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function Or(n){return f0(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:Md}=D0(queueMicrotask,!1),Wt={x:!1,y:!1};function oS(){return Wt.x||Wt.y}function jk(n){return n==="x"||n==="y"?Wt[n]?null:(Wt[n]=!0,()=>{Wt[n]=!1}):Wt.x||Wt.y?null:(Wt.x=Wt.y=!0,()=>{Wt.x=Wt.y=!1})}function rS(n,a){const s=iS(n),o=new AbortController,l={passive:!0,...a,signal:o.signal};return[s,l,()=>o.abort()]}function Ok(n){return!(n.pointerType==="touch"||oS())}function Lk(n,a,s={}){const[o,l,u]=rS(n,s);return o.forEach(d=>{let h=!1,m=!1,g;const b=()=>{d.removeEventListener("pointerleave",w)},v=L=>{g&&(g(L),g=void 0),b()},x=L=>{h=!1,window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),m&&(m=!1,v(L))},D=()=>{h=!0,window.addEventListener("pointerup",x,l),window.addEventListener("pointercancel",x,l)},w=L=>{if(L.pointerType!=="touch"){if(h){m=!0;return}v(L)}},R=L=>{if(!Ok(L))return;m=!1;const M=a(d,L);typeof M=="function"&&(g=M,d.addEventListener("pointerleave",w,l))};d.addEventListener("pointerenter",R,l),d.addEventListener("pointerdown",D,l)}),u}const lS=(n,a)=>a?n===a?!0:lS(n,a.parentElement):!1,kd=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,zk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bk(n){return zk.has(n.tagName)||n.isContentEditable===!0}const Uk=new Set(["INPUT","SELECT","TEXTAREA"]);function Vk(n){return Uk.has(n.tagName)||n.isContentEditable===!0}const Lr=new WeakSet;function Qy(n){return a=>{a.key==="Enter"&&n(a)}}function tf(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const Pk=(n,a)=>{const s=n.currentTarget;if(!s)return;const o=Qy(()=>{if(Lr.has(s))return;tf(s,"down");const l=Qy(()=>{tf(s,"up")}),u=()=>tf(s,"cancel");s.addEventListener("keyup",l,a),s.addEventListener("blur",u,a)});s.addEventListener("keydown",o,a),s.addEventListener("blur",()=>s.removeEventListener("keydown",o),a)};function Zy(n){return kd(n)&&!oS()}const $y=new WeakSet;function _k(n,a,s={}){const[o,l,u]=rS(n,s),d=h=>{const m=h.currentTarget;if(!Zy(h)||$y.has(h))return;Lr.add(m),s.stopPropagation&&$y.add(h);const g=a(m,h),b=(D,w)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",x),Lr.has(m)&&Lr.delete(m),Zy(D)&&typeof g=="function"&&g(D,{success:w})},v=D=>{b(D,m===window||m===document||s.useGlobalTarget||lS(m,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",v,l),window.addEventListener("pointercancel",x,l)};return o.forEach(h=>{(s.useGlobalTarget?window:h).addEventListener("pointerdown",d,l),Or(h)&&(h.addEventListener("focus",g=>Pk(g,l)),!Bk(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),u}function Nd(n){return f0(n)&&"ownerSVGElement"in n}const zr=new WeakMap;let Br;const cS=(n,a,s)=>(o,l)=>l&&l[0]?l[0][n+"Size"]:Nd(o)&&"getBBox"in o?o.getBBox()[a]:o[s],Hk=cS("inline","width","offsetWidth"),Fk=cS("block","height","offsetHeight");function Ik({target:n,borderBoxSize:a}){zr.get(n)?.forEach(s=>{s(n,{get width(){return Hk(n,a)},get height(){return Fk(n,a)}})})}function Gk(n){n.forEach(Ik)}function qk(){typeof ResizeObserver>"u"||(Br=new ResizeObserver(Gk))}function Kk(n,a){Br||qk();const s=iS(n);return s.forEach(o=>{let l=zr.get(o);l||(l=new Set,zr.set(o,l)),l.add(a),Br?.observe(o)}),()=>{s.forEach(o=>{const l=zr.get(o);l?.delete(a),l?.size||Br?.unobserve(o)})}}const Ur=new Set;let Di;function Yk(){Di=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ur.forEach(a=>a(n))},window.addEventListener("resize",Di)}function Xk(n){return Ur.add(n),Di||Yk(),()=>{Ur.delete(n),!Ur.size&&typeof Di=="function"&&(window.removeEventListener("resize",Di),Di=void 0)}}function Wy(n,a){return typeof n=="function"?Xk(n):Kk(n,a)}function Qk(n){return Nd(n)&&n.tagName==="svg"}const Zk=[...tS,Qe,Jt],$k=n=>Zk.find(eS(n)),Jy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ai=()=>({x:Jy(),y:Jy()}),ev=()=>({min:0,max:0}),$e=()=>({x:ev(),y:ev()}),Wk=new WeakMap;function ml(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Ys(n){return typeof n=="string"||Array.isArray(n)}const Rd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jd=["initial",...Rd];function pl(n){return ml(n.animate)||jd.some(a=>Ys(n[a]))}function uS(n){return!!(pl(n)||n.variants)}function Jk(n,a,s){for(const o in a){const l=a[o],u=s[o];if(ct(l))n.addValue(o,l);else if(ct(u))n.addValue(o,Ni(l,{owner:n}));else if(u!==l)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(l):d.hasAnimated||d.set(l)}else{const d=n.getStaticValue(o);n.addValue(o,Ni(d!==void 0?d:l,{owner:n}))}}for(const o in s)a[o]===void 0&&n.removeValue(o);return a}const If={current:null},fS={current:!1},eN=typeof window<"u";function tN(){if(fS.current=!0,!!eN)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>If.current=n.matches;n.addEventListener("change",a),a()}else If.current=!1}const tv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let nl={};function dS(n){nl=n}function nN(){return nl}class aN{scrapeMotionValuesFromProps(a,s,o){return{}}constructor({parent:a,props:s,presenceContext:o,reducedMotionConfig:l,skipAnimations:u,blockInitialAnimation:d,visualState:h},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Td,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const D=dt.now();this.renderScheduledAt<D&&(this.renderScheduledAt=D,Ne.render(this.render,!1,!0))};const{latestValues:g,renderState:b}=h;this.latestValues=g,this.baseTarget={...g},this.initialValues=s.initial?{...g}:{},this.renderState=b,this.parent=a,this.props=s,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=l,this.skipAnimationsConfig=u,this.options=m,this.blockInitialAnimation=!!d,this.isControllingVariants=pl(s),this.isVariantNode=uS(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:v,...x}=this.scrapeMotionValuesFromProps(s,{},this);for(const D in x){const w=x[D];g[D]!==void 0&&ct(w)&&w.set(g[D])}}mount(a){if(this.hasBeenMounted)for(const s in this.initialValues)this.values.get(s)?.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=a,Wk.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(fS.current||tN(),this.shouldReduceMotion=If.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),oa(this.notifyUpdate),oa(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const s=this.features[a];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(a){this.children.add(a),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,s){if(this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)(),s.accelerate&&K0.has(a)&&this.current instanceof HTMLElement){const{factory:d,keyframes:h,times:m,ease:g,duration:b}=s.accelerate,v=new G0({element:this.current,name:a,keyframes:h,times:m,ease:g,duration:Ot(b)}),x=d(v);this.valueSubscriptions.set(a,()=>{x(),v.cancel()});return}const o=Li.has(a);o&&this.onBindTransform&&this.onBindTransform();const l=s.on("change",d=>{this.latestValues[a]=d,this.props.onUpdate&&Ne.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let u;typeof window<"u"&&window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,a,s)),this.valueSubscriptions.set(a,()=>{l(),u&&u(),s.owner&&s.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in nl){const s=nl[a];if(!s)continue;const{isEnabled:o,Feature:l}=s;if(!this.features[a]&&l&&o(this.props)&&(this.features[a]=new l(this)),this.features[a]){const u=this.features[a];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$e()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,s){this.latestValues[a]=s}update(a,s){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let o=0;o<tv.length;o++){const l=tv[o];this.propEventSubscriptions[l]&&(this.propEventSubscriptions[l](),delete this.propEventSubscriptions[l]);const u="on"+l,d=a[u];d&&(this.propEventSubscriptions[l]=this.on(l,d))}this.prevMotionValues=Jk(this,this.scrapeMotionValuesFromProps(a,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(a),()=>s.variantChildren.delete(a)}addValue(a,s){const o=this.values.get(a);s!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,s),this.values.set(a,s),this.latestValues[a]=s.get())}removeValue(a){this.values.delete(a);const s=this.valueSubscriptions.get(a);s&&(s(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,s){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&s!==void 0&&(o=Ni(s===null?void 0:s,{owner:this}),this.addValue(a,o)),o}readValue(a,s){let o=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:this.getBaseTargetFromProps(this.props,a)??this.readValueFromInstance(this.current,a,this.options);return o!=null&&(typeof o=="string"&&(u0(o)||d0(o))?o=parseFloat(o):!$k(o)&&Jt.test(s)&&(o=aS(a,s)),this.setBaseTarget(a,ct(o)?o.get():o)),ct(o)?o.get():o}setBaseTarget(a,s){this.baseTarget[a]=s}getBaseTarget(a){const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const u=Dd(this.props,s,this.presenceContext?.custom);u&&(o=u[a])}if(s&&o!==void 0)return o;const l=this.getBaseTargetFromProps(this.props,a);return l!==void 0&&!ct(l)?l:this.initialValues[a]!==void 0&&o===void 0?void 0:this.baseTarget[a]}on(a,s){return this.events[a]||(this.events[a]=new hd),this.events[a].add(s)}notify(a,...s){this.events[a]&&this.events[a].notify(...s)}scheduleRenderMicrotask(){Md.render(this.render)}}class hS extends aN{constructor(){super(...arguments),this.KeyframeResolver=Rk}sortInstanceNodePosition(a,s){return a.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(a,s){const o=a.style;return o?o[s]:void 0}removeValueFromRenderState(a,{vars:s,style:o}){delete s[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;ct(a)&&(this.childSubscription=a.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class ra{constructor(a){this.isMounted=!1,this.node=a}update(){}}function mS({top:n,left:a,right:s,bottom:o}){return{x:{min:a,max:s},y:{min:n,max:o}}}function iN({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function sN(n,a){if(!a)return n;const s=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:s.y,left:s.x,bottom:o.y,right:o.x}}function nf(n){return n===void 0||n===1}function Gf({scale:n,scaleX:a,scaleY:s}){return!nf(n)||!nf(a)||!nf(s)}function ka(n){return Gf(n)||pS(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function pS(n){return nv(n.x)||nv(n.y)}function nv(n){return n&&n!=="0%"}function al(n,a,s){const o=n-s,l=a*o;return s+l}function av(n,a,s,o,l){return l!==void 0&&(n=al(n,l,o)),al(n,s,o)+a}function qf(n,a=0,s=1,o,l){n.min=av(n.min,a,s,o,l),n.max=av(n.max,a,s,o,l)}function gS(n,{x:a,y:s}){qf(n.x,a.translate,a.scale,a.originPoint),qf(n.y,s.translate,s.scale,s.originPoint)}const iv=.999999999999,sv=1.0000000000001;function oN(n,a,s,o=!1){const l=s.length;if(!l)return;a.x=a.y=1;let u,d;for(let h=0;h<l;h++){u=s[h],d=u.projectionDelta;const{visualElement:m}=u.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(rn(n.x,-u.scroll.offset.x),rn(n.y,-u.scroll.offset.y)),d&&(a.x*=d.x.scale,a.y*=d.y.scale,gS(n,d)),o&&ka(u.latestValues)&&Vr(n,u.latestValues,u.layout?.layoutBox))}a.x<sv&&a.x>iv&&(a.x=1),a.y<sv&&a.y>iv&&(a.y=1)}function rn(n,a){n.min+=a,n.max+=a}function ov(n,a,s,o,l=.5){const u=ze(n.min,n.max,l);qf(n,a,s,u,o)}function rv(n,a){return typeof n=="string"?parseFloat(n)/100*(a.max-a.min):n}function Vr(n,a,s){const o=s??n;ov(n.x,rv(a.x,o.x),a.scaleX,a.scale,a.originX),ov(n.y,rv(a.y,o.y),a.scaleY,a.scale,a.originY)}function yS(n,a){return mS(sN(n.getBoundingClientRect(),a))}function rN(n,a,s){const o=yS(n,s),{scroll:l}=a;return l&&(rn(o.x,l.offset.x),rn(o.y,l.offset.y)),o}const lN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cN=Oi.length;function uN(n,a,s){let o="",l=!0;for(let u=0;u<cN;u++){const d=Oi[u],h=n[d];if(h===void 0)continue;let m=!0;if(typeof h=="number")m=h===(d.startsWith("scale")?1:0);else{const g=parseFloat(h);m=d.startsWith("scale")?g===1:g===0}if(!m||s){const g=sS(h,Ed[d]);if(!m){l=!1;const b=lN[d]||d;o+=`${b}(${g}) `}s&&(a[d]=g)}}return o=o.trim(),s?o=s(a,l?"":o):l&&(o="none"),o}function Od(n,a,s){const{style:o,vars:l,transformOrigin:u}=n;let d=!1,h=!1;for(const m in a){const g=a[m];if(Li.has(m)){d=!0;continue}else if(E0(m)){l[m]=g;continue}else{const b=sS(g,Ed[m]);m.startsWith("origin")?(h=!0,u[m]=b):o[m]=b}}if(a.transform||(d||s?o.transform=uN(a,n.transform,s):o.transform&&(o.transform="none")),h){const{originX:m="50%",originY:g="50%",originZ:b=0}=u;o.transformOrigin=`${m} ${g} ${b}`}}function vS(n,{style:a,vars:s},o,l){const u=n.style;let d;for(d in a)u[d]=a[d];l?.applyProjectionStyles(u,o);for(d in s)u.setProperty(d,s[d])}function lv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Ns={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if($.test(n))n=parseFloat(n);else return n;const s=lv(n,a.target.x),o=lv(n,a.target.y);return`${s}% ${o}%`}},fN={correct:(n,{treeScale:a,projectionDelta:s})=>{const o=n,l=Jt.parse(n);if(l.length>5)return o;const u=Jt.createTransformer(n),d=typeof l[0]!="number"?1:0,h=s.x.scale*a.x,m=s.y.scale*a.y;l[0+d]/=h,l[1+d]/=m;const g=ze(h,m,.5);return typeof l[2+d]=="number"&&(l[2+d]/=g),typeof l[3+d]=="number"&&(l[3+d]/=g),u(l)}},Kf={borderRadius:{...Ns,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ns,borderTopRightRadius:Ns,borderBottomLeftRadius:Ns,borderBottomRightRadius:Ns,boxShadow:fN};function bS(n,{layout:a,layoutId:s}){return Li.has(n)||n.startsWith("origin")||(a||s!==void 0)&&(!!Kf[n]||n==="opacity")}function Ld(n,a,s){const o=n.style,l=a?.style,u={};if(!o)return u;for(const d in o)(ct(o[d])||l&&ct(l[d])||bS(d,n)||s?.getValue(d)?.liveStyle!==void 0)&&(u[d]=o[d]);return u}function dN(n){return window.getComputedStyle(n)}class hN extends hS{constructor(){super(...arguments),this.type="html",this.renderInstance=vS}readValueFromInstance(a,s){if(Li.has(s))return this.projection?.isProjecting?jf(s):O2(a,s);{const o=dN(a),l=(E0(s)?o.getPropertyValue(s):o[s])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(a,{transformPagePoint:s}){return yS(a,s)}build(a,s,o){Od(a,s,o.transformTemplate)}scrapeMotionValuesFromProps(a,s,o){return Ld(a,s,o)}}const mN={offset:"stroke-dashoffset",array:"stroke-dasharray"},pN={offset:"strokeDashoffset",array:"strokeDasharray"};function gN(n,a,s=1,o=0,l=!0){n.pathLength=1;const u=l?mN:pN;n[u.offset]=`${-o}`,n[u.array]=`${a} ${s}`}const yN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function SS(n,{attrX:a,attrY:s,attrScale:o,pathLength:l,pathSpacing:u=1,pathOffset:d=0,...h},m,g,b){if(Od(n,h,g),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:v,style:x}=n;v.transform&&(x.transform=v.transform,delete v.transform),(x.transform||v.transformOrigin)&&(x.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),x.transform&&(x.transformBox=b?.transformBox??"fill-box",delete v.transformBox);for(const D of yN)v[D]!==void 0&&(x[D]=v[D],delete v[D]);a!==void 0&&(v.x=a),s!==void 0&&(v.y=s),o!==void 0&&(v.scale=o),l!==void 0&&gN(v,l,u,d,!1)}const xS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),TS=n=>typeof n=="string"&&n.toLowerCase()==="svg";function vN(n,a,s,o){vS(n,a,void 0,o);for(const l in a.attrs)n.setAttribute(xS.has(l)?l:Ad(l),a.attrs[l])}function wS(n,a,s){const o=Ld(n,a,s);for(const l in n)if(ct(n[l])||ct(a[l])){const u=Oi.indexOf(l)!==-1?"attr"+l.charAt(0).toUpperCase()+l.substring(1):l;o[u]=n[l]}return o}class bN extends hS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$e}getBaseTargetFromProps(a,s){return a[s]}readValueFromInstance(a,s){if(Li.has(s)){const o=nS(s);return o&&o.default||0}return s=xS.has(s)?s:Ad(s),a.getAttribute(s)}scrapeMotionValuesFromProps(a,s,o){return wS(a,s,o)}build(a,s,o){SS(a,s,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(a,s,o,l){vN(a,s,o,l)}mount(a){this.isSVGTag=TS(a.tagName),super.mount(a)}}const SN=jd.length;function CS(n){if(!n)return;if(!n.isControllingVariants){const s=n.parent?CS(n.parent)||{}:{};return n.props.initial!==void 0&&(s.initial=n.props.initial),s}const a={};for(let s=0;s<SN;s++){const o=jd[s],l=n.props[o];(Ys(l)||l===!1)&&(a[o]=l)}return a}function DS(n,a){if(!Array.isArray(a))return!1;const s=a.length;if(s!==n.length)return!1;for(let o=0;o<s;o++)if(a[o]!==n[o])return!1;return!0}const xN=[...Rd].reverse(),TN=Rd.length;function wN(n){return a=>Promise.all(a.map(({animation:s,options:o})=>Sk(n,s,o)))}function CN(n){let a=wN(n),s=cv(),o=!0,l=!1;const u=g=>(b,v)=>{const x=La(n,v,g==="exit"?n.presenceContext?.custom:void 0);if(x){const{transition:D,transitionEnd:w,...R}=x;b={...b,...R,...w}}return b};function d(g){a=g(n)}function h(g){const{props:b}=n,v=CS(n.parent)||{},x=[],D=new Set;let w={},R=1/0;for(let M=0;M<TN;M++){const V=xN[M],z=s[V],j=b[V]!==void 0?b[V]:v[V],F=Ys(j),X=V===g?z.isActive:null;X===!1&&(R=M);let ie=j===v[V]&&j!==b[V]&&F;if(ie&&(o||l)&&n.manuallyAnimateOnMount&&(ie=!1),z.protectedKeys={...w},!z.isActive&&X===null||!j&&!z.prevProp||ml(j)||typeof j=="boolean")continue;if(V==="exit"&&z.isActive&&X!==!0){z.prevResolvedValues&&(w={...w,...z.prevResolvedValues});continue}const Q=DN(z.prevProp,j);let G=Q||V===g&&z.isActive&&!ie&&F||M>R&&F,I=!1;const ee=Array.isArray(j)?j:[j];let ne=ee.reduce(u(V),{});X===!1&&(ne={});const{prevResolvedValues:le={}}=z,ye={...le,...ne},Be=Y=>{G=!0,D.has(Y)&&(I=!0,D.delete(Y)),z.needsAnimating[Y]=!0;const se=n.getValue(Y);se&&(se.liveStyle=!1)};for(const Y in ye){const se=ne[Y],fe=le[Y];if(w.hasOwnProperty(Y))continue;let de=!1;Vf(se)&&Vf(fe)?de=!DS(se,fe):de=se!==fe,de?se!=null?Be(Y):D.add(Y):se!==void 0&&D.has(Y)?Be(Y):z.protectedKeys[Y]=!0}z.prevProp=j,z.prevResolvedValues=ne,z.isActive&&(w={...w,...ne}),(o||l)&&n.blockInitialAnimation&&(G=!1);const U=ie&&Q;G&&(!U||I)&&x.push(...ee.map(Y=>{const se={type:V};if(typeof Y=="string"&&(o||l)&&!U&&n.manuallyAnimateOnMount&&n.parent){const{parent:fe}=n,de=La(fe,Y);if(fe.enteringChildren&&de){const{delayChildren:ve}=de.transition||{};se.delay=Y0(fe.enteringChildren,n,ve)}}return{animation:Y,options:se}}))}if(D.size){const M={};if(typeof b.initial!="boolean"){const V=La(n,Array.isArray(b.initial)?b.initial[0]:b.initial);V&&V.transition&&(M.transition=V.transition)}D.forEach(V=>{const z=n.getBaseTarget(V),j=n.getValue(V);j&&(j.liveStyle=!0),M[V]=z??null}),x.push({animation:M})}let L=!!x.length;return o&&(b.initial===!1||b.initial===b.animate)&&!n.manuallyAnimateOnMount&&(L=!1),o=!1,l=!1,L?a(x):Promise.resolve()}function m(g,b){if(s[g].isActive===b)return Promise.resolve();n.variantChildren?.forEach(x=>x.animationState?.setActive(g,b)),s[g].isActive=b;const v=h(g);for(const x in s)s[x].protectedKeys={};return v}return{animateChanges:h,setActive:m,setAnimateFunction:d,getState:()=>s,reset:()=>{s=cv(),l=!0}}}function DN(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!DS(a,n):!1}function Ma(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cv(){return{animate:Ma(!0),whileInView:Ma(),whileHover:Ma(),whileTap:Ma(),whileDrag:Ma(),whileFocus:Ma(),exit:Ma()}}function Yf(n,a){n.min=a.min,n.max=a.max}function $t(n,a){Yf(n.x,a.x),Yf(n.y,a.y)}function uv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}const AS=1e-4,AN=1-AS,EN=1+AS,ES=.01,MN=0-ES,kN=0+ES;function ht(n){return n.max-n.min}function NN(n,a,s){return Math.abs(n-a)<=s}function fv(n,a,s,o=.5){n.origin=o,n.originPoint=ze(a.min,a.max,n.origin),n.scale=ht(s)/ht(a),n.translate=ze(s.min,s.max,n.origin)-n.originPoint,(n.scale>=AN&&n.scale<=EN||isNaN(n.scale))&&(n.scale=1),(n.translate>=MN&&n.translate<=kN||isNaN(n.translate))&&(n.translate=0)}function Vs(n,a,s,o){fv(n.x,a.x,s.x,o?o.originX:void 0),fv(n.y,a.y,s.y,o?o.originY:void 0)}function dv(n,a,s,o=0){const l=o?ze(s.min,s.max,o):s.min;n.min=l+a.min,n.max=n.min+ht(a)}function RN(n,a,s,o){dv(n.x,a.x,s.x,o?.x),dv(n.y,a.y,s.y,o?.y)}function hv(n,a,s,o=0){const l=o?ze(s.min,s.max,o):s.min;n.min=a.min-l,n.max=n.min+ht(a)}function il(n,a,s,o){hv(n.x,a.x,s.x,o?.x),hv(n.y,a.y,s.y,o?.y)}function mv(n,a,s,o,l){return n-=a,n=al(n,1/s,o),l!==void 0&&(n=al(n,1/l,o)),n}function jN(n,a=0,s=1,o=.5,l,u=n,d=n){if(cn.test(a)&&(a=parseFloat(a),a=ze(d.min,d.max,a/100)-d.min),typeof a!="number")return;let h=ze(u.min,u.max,o);n===u&&(h-=a),n.min=mv(n.min,a,s,h,l),n.max=mv(n.max,a,s,h,l)}function pv(n,a,[s,o,l],u,d){jN(n,a[s],a[o],a[l],a.scale,u,d)}const ON=["x","scaleX","originX"],LN=["y","scaleY","originY"];function gv(n,a,s,o){pv(n.x,a,ON,s?s.x:void 0,o?o.x:void 0),pv(n.y,a,LN,s?s.y:void 0,o?o.y:void 0)}function yv(n){return n.translate===0&&n.scale===1}function MS(n){return yv(n.x)&&yv(n.y)}function vv(n,a){return n.min===a.min&&n.max===a.max}function zN(n,a){return vv(n.x,a.x)&&vv(n.y,a.y)}function bv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function kS(n,a){return bv(n.x,a.x)&&bv(n.y,a.y)}function Sv(n){return ht(n.x)/ht(n.y)}function xv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}function on(n){return[n("x"),n("y")]}function BN(n,a,s){let o="";const l=n.x.translate/a.x,u=n.y.translate/a.y,d=s?.z||0;if((l||u||d)&&(o=`translate3d(${l}px, ${u}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),s){const{transformPerspective:g,rotate:b,rotateX:v,rotateY:x,skewX:D,skewY:w}=s;g&&(o=`perspective(${g}px) ${o}`),b&&(o+=`rotate(${b}deg) `),v&&(o+=`rotateX(${v}deg) `),x&&(o+=`rotateY(${x}deg) `),D&&(o+=`skewX(${D}deg) `),w&&(o+=`skewY(${w}deg) `)}const h=n.x.scale*a.x,m=n.y.scale*a.y;return(h!==1||m!==1)&&(o+=`scale(${h}, ${m})`),o||"none"}const NS=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],UN=NS.length,Tv=n=>typeof n=="string"?parseFloat(n):n,wv=n=>typeof n=="number"||$.test(n);function VN(n,a,s,o,l,u){l?(n.opacity=ze(0,s.opacity??1,PN(o)),n.opacityExit=ze(a.opacity??1,0,_N(o))):u&&(n.opacity=ze(a.opacity??1,s.opacity??1,o));for(let d=0;d<UN;d++){const h=NS[d];let m=Cv(a,h),g=Cv(s,h);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||wv(m)===wv(g)?(n[h]=Math.max(ze(Tv(m),Tv(g),o),0),(cn.test(g)||cn.test(m))&&(n[h]+="%")):n[h]=g}(a.rotate||s.rotate)&&(n.rotate=ze(a.rotate||0,s.rotate||0,o))}function Cv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const PN=RS(0,.5,x0),_N=RS(.5,.95,qt);function RS(n,a,s){return o=>o<n?0:o>a?1:s(qs(n,a,o))}function HN(n,a,s){const o=ct(n)?n:Ni(n);return o.start(Cd("",o,a,s)),o.animation}function Xs(n,a,s,o={passive:!0}){return n.addEventListener(a,s,o),()=>n.removeEventListener(a,s)}const FN=(n,a)=>n.depth-a.depth;class IN{constructor(){this.children=[],this.isDirty=!1}add(a){fd(this.children,a),this.isDirty=!0}remove(a){$r(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(FN),this.isDirty=!1,this.children.forEach(a)}}function GN(n,a){const s=dt.now(),o=({timestamp:l})=>{const u=l-s;u>=a&&(oa(o),n(u-a))};return Ne.setup(o,!0),()=>oa(o)}function Pr(n){return ct(n)?n.get():n}class qN{constructor(){this.members=[]}add(a){fd(this.members,a);for(let s=this.members.length-1;s>=0;s--){const o=this.members[s];if(o===a||o===this.lead||o===this.prevLead)continue;const l=o.instance;(!l||l.isConnected===!1)&&!o.snapshot&&($r(this.members,o),o.unmount())}a.scheduleRender()}remove(a){if($r(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(a){for(let s=this.members.indexOf(a)-1;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1&&o.instance?.isConnected!==!1)return this.promote(o),!0}return!1}promote(a,s){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.updateSnapshot(),a.scheduleRender();const{layoutDependency:l}=o.options,{layoutDependency:u}=a.options;(l===void 0||l!==u)&&(a.resumeFrom=o,s&&(o.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root?.isUpdating&&(a.isLayoutDirty=!0)),a.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{a.options.onExitComplete?.(),a.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(a=>a.instance&&a.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const _r={hasAnimatedSinceResize:!0,hasEverUpdated:!1},af=["","X","Y","Z"],KN=1e3;let YN=0;function sf(n,a,s,o){const{latestValues:l}=a;l[n]&&(s[n]=l[n],a.setStaticValue(n,0),o&&(o[n]=0))}function jS(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const s=W0(a);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:l,layoutId:u}=n.options;window.MotionCancelOptimisedAnimation(s,"transform",Ne,!(l||u))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&jS(o)}function OS({attachResizeListener:n,defaultParent:a,measureScroll:s,checkIsScrollRoot:o,resetTransform:l}){return class{constructor(d={},h=a?.()){this.id=YN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ZN),this.nodes.forEach(nR),this.nodes.forEach(aR),this.nodes.forEach($N)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new IN)}addEventListener(d,h){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new hd),this.eventHandlers.get(d).add(h)}notifyListeners(d,...h){const m=this.eventHandlers.get(d);m&&m.notify(...h)}hasListeners(d){return this.eventHandlers.has(d)}mount(d){if(this.instance)return;this.isSVG=Nd(d)&&!Qk(d),this.instance=d;const{layoutId:h,layout:m,visualElement:g}=this.options;if(g&&!g.current&&g.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||h)&&(this.isLayoutDirty=!0),n){let b,v=0;const x=()=>this.root.updateBlockedByResize=!1;Ne.read(()=>{v=window.innerWidth}),n(d,()=>{const D=window.innerWidth;D!==v&&(v=D,this.root.updateBlockedByResize=!0,b&&b(),b=GN(x,250),_r.hasAnimatedSinceResize&&(_r.hasAnimatedSinceResize=!1,this.nodes.forEach(Ev)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&g&&(h||m)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:v,hasRelativeLayoutChanged:x,layout:D})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||g.getDefaultTransition()||lR,{onLayoutAnimationStart:R,onLayoutAnimationComplete:L}=g.getProps(),M=!this.targetLayout||!kS(this.targetLayout,D),V=!v&&x;if(this.options.layoutRoot||this.resumeFrom||V||v&&(M||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const z={...wd(w,"layout"),onPlay:R,onComplete:L};(g.shouldReduceMotion||this.options.layoutRoot)&&(z.delay=0,z.type=!1),this.startAnimation(z),this.setAnimationOrigin(b,V)}else v||Ev(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=D})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),oa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(iR),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const v=this.path[b];v.shouldResetTransform=!0,(typeof v.latestValues.x=="string"||typeof v.latestValues.y=="string")&&(v.isLayoutDirty=!0),v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:h,layout:m}=this.options;if(h===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const m=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),m&&this.nodes.forEach(JN),this.nodes.forEach(Dv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Av);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(eR),this.nodes.forEach(tR),this.nodes.forEach(XN),this.nodes.forEach(QN)):this.nodes.forEach(Av),this.clearAllSnapshots();const h=dt.now();rt.delta=un(0,1e3/60,h-rt.timestamp),rt.timestamp=h,rt.isProcessing=!0,Qu.update.process(rt),Qu.preRender.process(rt),Qu.render.process(rt),rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Md.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(WN),this.sharedNodes.forEach(sR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ne.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ne.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ht(this.snapshot.measuredBox.x)&&!ht(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=$e()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(h=!1),h&&this.instance){const m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:m,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!l)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!MS(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,b=g!==this.prevTransformTemplateValue;d&&this.instance&&(h||ka(this.latestValues)||b)&&(l(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const h=this.measurePageBox();let m=this.removeElementScroll(h);return d&&(m=this.removeTransform(m)),cR(m),{animationId:this.root.animationId,measuredBox:h,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:d}=this.options;if(!d)return $e();const h=d.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(uR))){const{scroll:g}=this.root;g&&(rn(h.x,g.offset.x),rn(h.y,g.offset.y))}return h}removeElementScroll(d){const h=$e();if($t(h,d),this.scroll?.wasRoot)return h;for(let m=0;m<this.path.length;m++){const g=this.path[m],{scroll:b,options:v}=g;g!==this.root&&b&&v.layoutScroll&&(b.wasRoot&&$t(h,d),rn(h.x,b.offset.x),rn(h.y,b.offset.y))}return h}applyTransform(d,h=!1,m){const g=m||$e();$t(g,d);for(let b=0;b<this.path.length;b++){const v=this.path[b];!h&&v.options.layoutScroll&&v.scroll&&v!==v.root&&(rn(g.x,-v.scroll.offset.x),rn(g.y,-v.scroll.offset.y)),ka(v.latestValues)&&Vr(g,v.latestValues,v.layout?.layoutBox)}return ka(this.latestValues)&&Vr(g,this.latestValues,this.layout?.layoutBox),g}removeTransform(d){const h=$e();$t(h,d);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!ka(g.latestValues))continue;let b;g.instance&&(Gf(g.latestValues)&&g.updateSnapshot(),b=$e(),$t(b,g.measurePageBox())),gv(h,g.latestValues,g.snapshot?.layoutBox,b)}return ka(this.latestValues)&&gv(h,this.latestValues),h}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==h;if(!(d||m&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:v}=this.options;if(!this.layout||!(b||v))return;this.resolvedRelativeTargetAt=rt.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$e(),this.targetWithTransforms=$e()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),RN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):$t(this.target,this.layout.layoutBox),gS(this.target,this.targetDelta)):$t(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Gf(this.parent.latestValues)||pS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(d,h,m){this.relativeParent=d,this.linkedParentVersion=d.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$e(),this.relativeTargetOrigin=$e(),il(this.relativeTargetOrigin,h,m,this.options.layoutAnchor||void 0),$t(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const d=this.getLead(),h=!!this.resumingFrom||this!==d;let m=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(m=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===rt.timestamp&&(m=!1),m)return;const{layout:g,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||b))return;$t(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,x=this.treeScale.y;oN(this.layoutCorrected,this.treeScale,this.path,h),d.layout&&!d.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(d.target=d.layout.layoutBox,d.targetWithTransforms=$e());const{target:D}=d;if(!D){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(uv(this.prevProjectionDelta.x,this.projectionDelta.x),uv(this.prevProjectionDelta.y,this.projectionDelta.y)),Vs(this.projectionDelta,this.layoutCorrected,D,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==x||!xv(this.projectionDelta.x,this.prevProjectionDelta.x)||!xv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",D))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){if(this.options.visualElement?.scheduleRender(),d){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ai(),this.projectionDelta=Ai(),this.projectionDeltaWithTransform=Ai()}setAnimationOrigin(d,h=!1){const m=this.snapshot,g=m?m.latestValues:{},b={...this.latestValues},v=Ai();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const x=$e(),D=m?m.source:void 0,w=this.layout?this.layout.source:void 0,R=D!==w,L=this.getStack(),M=!L||L.members.length<=1,V=!!(R&&!M&&this.options.crossfade===!0&&!this.path.some(rR));this.animationProgress=0;let z;this.mixTargetDelta=j=>{const F=j/1e3;Mv(v.x,d.x,F),Mv(v.y,d.y,F),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(il(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),oR(this.relativeTarget,this.relativeTargetOrigin,x,F),z&&zN(this.relativeTarget,z)&&(this.isProjectionDirty=!1),z||(z=$e()),$t(z,this.relativeTarget)),R&&(this.animationValues=b,VN(b,g,this.latestValues,F,V,M)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(oa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ne.update(()=>{_r.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ni(0)),this.motionValue.jump(0,!1),this.currentAnimation=HN(this.motionValue,[0,1e3],{...d,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),d.onUpdate&&d.onUpdate(h)},onStop:()=>{},onComplete:()=>{d.onComplete&&d.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:h,target:m,layout:g,latestValues:b}=d;if(!(!h||!m||!g)){if(this!==d&&this.layout&&g&&LS(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||$e();const v=ht(this.layout.layoutBox.x);m.x.min=d.target.x.min,m.x.max=m.x.min+v;const x=ht(this.layout.layoutBox.y);m.y.min=d.target.y.min,m.y.max=m.y.min+x}$t(h,m),Vr(h,b),Vs(this.projectionDeltaWithTransform,this.layoutCorrected,h,b)}}registerSharedNode(d,h){this.sharedNodes.has(d)||this.sharedNodes.set(d,new qN),this.sharedNodes.get(d).add(h);const g=h.options.initialPromotionConfig;h.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(h):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){const{layoutId:d}=this.options;return d?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:d}=this.options;return d?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:h,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),d&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let h=!1;const{latestValues:m}=d;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(h=!0),!h)return;const g={};m.z&&sf("z",d,g,this.animationValues);for(let b=0;b<af.length;b++)sf(`rotate${af[b]}`,d,g,this.animationValues),sf(`skew${af[b]}`,d,g,this.animationValues);d.render();for(const b in g)d.setStaticValue(b,g[b]),this.animationValues&&(this.animationValues[b]=g[b]);d.scheduleRender()}applyProjectionStyles(d,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){d.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,d.visibility="",d.opacity="",d.pointerEvents=Pr(h?.pointerEvents)||"",d.transform=m?m(this.latestValues,""):"none";return}const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=Pr(h?.pointerEvents)||""),this.hasProjected&&!ka(this.latestValues)&&(d.transform=m?m({},""):"none",this.hasProjected=!1);return}d.visibility="";const b=g.animationValues||g.latestValues;this.applyTransformsToTarget();let v=BN(this.projectionDeltaWithTransform,this.treeScale,b);m&&(v=m(b,v)),d.transform=v;const{x,y:D}=this.projectionDelta;d.transformOrigin=`${x.origin*100}% ${D.origin*100}% 0`,g.animationValues?d.opacity=g===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:d.opacity=g===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const w in Kf){if(b[w]===void 0)continue;const{correct:R,applyTo:L,isCSSVariable:M}=Kf[w],V=v==="none"?b[w]:R(b[w],g);if(L){const z=L.length;for(let j=0;j<z;j++)d[L[j]]=V}else M?this.options.visualElement.renderState.vars[w]=V:d[w]=V}this.options.layoutId&&(d.pointerEvents=g===this?Pr(h?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>d.currentAnimation?.stop()),this.root.nodes.forEach(Dv),this.root.sharedNodes.clear()}}}function XN(n){n.updateLayout()}function QN(n){const a=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=n.layout,{animationType:l}=n.options,u=a.source!==n.layout.source;if(l==="size")on(b=>{const v=u?a.measuredBox[b]:a.layoutBox[b],x=ht(v);v.min=s[b].min,v.max=v.min+x});else if(l==="x"||l==="y"){const b=l==="x"?"y":"x";Yf(u?a.measuredBox[b]:a.layoutBox[b],s[b])}else LS(l,a.layoutBox,s)&&on(b=>{const v=u?a.measuredBox[b]:a.layoutBox[b],x=ht(s[b]);v.max=v.min+x,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+x)});const d=Ai();Vs(d,s,a.layoutBox);const h=Ai();u?Vs(h,n.applyTransform(o,!0),a.measuredBox):Vs(h,s,a.layoutBox);const m=!MS(d);let g=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:v,layout:x}=b;if(v&&x){const D=n.options.layoutAnchor||void 0,w=$e();il(w,a.layoutBox,v.layoutBox,D);const R=$e();il(R,s,x.layoutBox,D),kS(w,R)||(g=!0),b.options.layoutRoot&&(n.relativeTarget=R,n.relativeTargetOrigin=w,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:s,snapshot:a,delta:h,layoutDelta:d,hasLayoutChanged:m,hasRelativeLayoutChanged:g})}else if(n.isLead()){const{onExitComplete:s}=n.options;s&&s()}n.options.transition=void 0}function ZN(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function $N(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function WN(n){n.clearSnapshot()}function Dv(n){n.clearMeasurements()}function JN(n){n.isLayoutDirty=!0,n.updateLayout()}function Av(n){n.isLayoutDirty=!1}function eR(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function tR(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function Ev(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function nR(n){n.resolveTargetDelta()}function aR(n){n.calcProjection()}function iR(n){n.resetSkewAndRotation()}function sR(n){n.removeLeadSnapshot()}function Mv(n,a,s){n.translate=ze(a.translate,0,s),n.scale=ze(a.scale,1,s),n.origin=a.origin,n.originPoint=a.originPoint}function kv(n,a,s,o){n.min=ze(a.min,s.min,o),n.max=ze(a.max,s.max,o)}function oR(n,a,s,o){kv(n.x,a.x,s.x,o),kv(n.y,a.y,s.y,o)}function rR(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const lR={duration:.45,ease:[.4,0,.1,1]},Nv=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Rv=Nv("applewebkit/")&&!Nv("chrome/")?Math.round:qt;function jv(n){n.min=Rv(n.min),n.max=Rv(n.max)}function cR(n){jv(n.x),jv(n.y)}function LS(n,a,s){return n==="position"||n==="preserve-aspect"&&!NN(Sv(a),Sv(s),.2)}function uR(n){return n!==n.root&&n.scroll?.wasRoot}const fR=OS({attachResizeListener:(n,a)=>Xs(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),dR=n=>!n.isLayoutDirty&&n.willUpdate(!1);function Ov(){const n=new Set,a=new WeakMap,s=()=>n.forEach(dR);return{add:o=>{n.add(o),a.set(o,o.addEventListener("willUpdate",s))},remove:o=>{n.delete(o);const l=a.get(o);l&&(l(),a.delete(o)),s()},dirty:s}}const of={current:void 0},zS=OS({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!of.current){const n=new fR({});n.mount(window),n.setOptions({layoutScroll:!0}),of.current=n}return of.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),zd=T.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function Lv(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function hR(...n){return a=>{let s=!1;const o=n.map(l=>{const u=Lv(l,a);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let l=0;l<o.length;l++){const u=o[l];typeof u=="function"?u():Lv(n[l],null)}}}}function mR(...n){return T.useCallback(hR(...n),n)}class pR extends T.Component{getSnapshotBeforeUpdate(a){const s=this.props.childRef.current;if(Or(s)&&a.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=s.offsetParent,l=Or(o)&&o.offsetWidth||0,u=Or(o)&&o.offsetHeight||0,d=getComputedStyle(s),h=this.props.sizeRef.current;h.height=parseFloat(d.height),h.width=parseFloat(d.width),h.top=s.offsetTop,h.left=s.offsetLeft,h.right=l-h.width-h.left,h.bottom=u-h.height-h.top}return null}componentDidUpdate(){}render(){return this.props.children}}function gR({children:n,isPresent:a,anchorX:s,anchorY:o,root:l,pop:u}){const d=T.useId(),h=T.useRef(null),m=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:g}=T.useContext(zd),b=n.props?.ref??n?.ref,v=mR(h,b);return T.useInsertionEffect(()=>{const{width:x,height:D,top:w,left:R,right:L,bottom:M}=m.current;if(a||u===!1||!h.current||!x||!D)return;const V=s==="left"?`left: ${R}`:`right: ${L}`,z=o==="bottom"?`bottom: ${M}`:`top: ${w}`;h.current.dataset.motionPopId=d;const j=document.createElement("style");g&&(j.nonce=g);const F=l??document.head;return F.appendChild(j),j.sheet&&j.sheet.insertRule(`
|
||
[data-motion-pop-id="${d}"] {
|
||
position: absolute !important;
|
||
width: ${x}px !important;
|
||
height: ${D}px !important;
|
||
${V}px !important;
|
||
${z}px !important;
|
||
}
|
||
`),()=>{h.current?.removeAttribute("data-motion-pop-id"),F.contains(j)&&F.removeChild(j)}},[a]),y.jsx(pR,{isPresent:a,childRef:h,sizeRef:m,pop:u,children:u===!1?n:T.cloneElement(n,{ref:v})})}const yR=({children:n,initial:a,isPresent:s,onExitComplete:o,custom:l,presenceAffectsLayout:u,mode:d,anchorX:h,anchorY:m,root:g})=>{const b=cd(vR),v=T.useId();let x=!0,D=T.useMemo(()=>(x=!1,{id:v,initial:a,isPresent:s,custom:l,onExitComplete:w=>{b.set(w,!0);for(const R of b.values())if(!R)return;o&&o()},register:w=>(b.set(w,!1),()=>b.delete(w))}),[s,b,o]);return u&&x&&(D={...D}),T.useMemo(()=>{b.forEach((w,R)=>b.set(R,!1))},[s]),T.useEffect(()=>{!s&&!b.size&&o&&o()},[s]),n=y.jsx(gR,{pop:d==="popLayout",isPresent:s,anchorX:h,anchorY:m,root:g,children:n}),y.jsx(dl.Provider,{value:D,children:n})};function vR(){return new Map}function BS(n=!0){const a=T.useContext(dl);if(a===null)return[!0,null];const{isPresent:s,onExitComplete:o,register:l}=a,u=T.useId();T.useEffect(()=>{if(n)return l(u)},[n]);const d=T.useCallback(()=>n&&o&&o(u),[u,o,n]);return!s&&o?[!1,d]:[!0]}const Er=n=>n.key||"";function zv(n){const a=[];return T.Children.forEach(n,s=>{T.isValidElement(s)&&a.push(s)}),a}const rf=({children:n,custom:a,initial:s=!0,onExitComplete:o,presenceAffectsLayout:l=!0,mode:u="sync",propagate:d=!1,anchorX:h="left",anchorY:m="top",root:g})=>{const[b,v]=BS(d),x=T.useMemo(()=>zv(n),[n]),D=d&&!b?[]:x.map(Er),w=T.useRef(!0),R=T.useRef(x),L=cd(()=>new Map),M=T.useRef(new Set),[V,z]=T.useState(x),[j,F]=T.useState(x);ud(()=>{w.current=!1,R.current=x;for(let Q=0;Q<j.length;Q++){const G=Er(j[Q]);D.includes(G)?(L.delete(G),M.current.delete(G)):L.get(G)!==!0&&L.set(G,!1)}},[j,D.length,D.join("-")]);const X=[];if(x!==V){let Q=[...x];for(let G=0;G<j.length;G++){const I=j[G],ee=Er(I);D.includes(ee)||(Q.splice(G,0,I),X.push(I))}return u==="wait"&&X.length&&(Q=X),F(zv(Q)),z(x),null}const{forceRender:ie}=T.useContext(Gs);return y.jsx(y.Fragment,{children:j.map(Q=>{const G=Er(Q),I=d&&!b?!1:x===j||D.includes(G),ee=()=>{if(M.current.has(G))return;if(L.has(G))M.current.add(G),L.set(G,!0);else return;let ne=!0;L.forEach(le=>{le||(ne=!1)}),ne&&(ie?.(),F(R.current),d&&v?.(),o&&o())};return y.jsx(yR,{isPresent:I,initial:!w.current||s?void 0:!1,custom:a,presenceAffectsLayout:l,mode:u,root:g,onExitComplete:I?void 0:ee,anchorX:h,anchorY:m,children:Q},G)})})},bR=T.createContext(null);function SR(){const n=T.useRef(!1);return ud(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function xR(){const n=SR(),[a,s]=T.useState(0),o=T.useCallback(()=>{n.current&&s(a+1)},[a]);return[T.useCallback(()=>Ne.postRender(o),[o]),a]}const US=n=>n===!0,TR=n=>US(n===!0)||n==="id",wR=({children:n,id:a,inherit:s=!0})=>{const o=T.useContext(Gs),l=T.useContext(bR),[u,d]=xR(),h=T.useRef(null),m=o.id||l;h.current===null&&(TR(s)&&m&&(a=a?m+"-"+a:m),h.current={id:a,group:US(s)&&o.group||Ov()});const g=T.useMemo(()=>({...h.current,forceRender:u}),[d]);return y.jsx(Gs.Provider,{value:g,children:n})},VS=T.createContext({strict:!1}),Bv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Uv=!1;function CR(){if(Uv)return;const n={};for(const a in Bv)n[a]={isEnabled:s=>Bv[a].some(o=>!!s[o])};dS(n),Uv=!0}function PS(){return CR(),nN()}function DR(n){const a=PS();for(const s in n)a[s]={...a[s],...n[s]};dS(a)}const AR=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function sl(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||AR.has(n)}let _S=n=>!sl(n);function ER(n){typeof n=="function"&&(_S=a=>a.startsWith("on")?!sl(a):n(a))}try{ER(require("@emotion/is-prop-valid").default)}catch{}function MR(n,a,s){const o={};for(const l in n)l==="values"&&typeof n.values=="object"||ct(n[l])||(_S(l)||s===!0&&sl(l)||!a&&!sl(l)||n.draggable&&l.startsWith("onDrag"))&&(o[l]=n[l]);return o}const gl=T.createContext({});function kR(n,a){if(pl(n)){const{initial:s,animate:o}=n;return{initial:s===!1||Ys(s)?s:void 0,animate:Ys(o)?o:void 0}}return n.inherit!==!1?a:{}}function NR(n){const{initial:a,animate:s}=kR(n,T.useContext(gl));return T.useMemo(()=>({initial:a,animate:s}),[Vv(a),Vv(s)])}function Vv(n){return Array.isArray(n)?n.join(" "):n}const Bd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function HS(n,a,s){for(const o in a)!ct(a[o])&&!bS(o,s)&&(n[o]=a[o])}function RR({transformTemplate:n},a){return T.useMemo(()=>{const s=Bd();return Od(s,a,n),Object.assign({},s.vars,s.style)},[a])}function jR(n,a){const s=n.style||{},o={};return HS(o,s,n),Object.assign(o,RR(n,a)),o}function OR(n,a){const s={},o=jR(n,a);return n.drag&&n.dragListener!==!1&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(s.tabIndex=0),s.style=o,s}const FS=()=>({...Bd(),attrs:{}});function LR(n,a,s,o){const l=T.useMemo(()=>{const u=FS();return SS(u,a,TS(o),n.transformTemplate,n.style),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};HS(u,n.style,n),l.style={...u,...l.style}}return l}const zR=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ud(n){return typeof n!="string"||n.includes("-")?!1:!!(zR.indexOf(n)>-1||/[A-Z]/u.test(n))}function BR(n,a,s,{latestValues:o},l,u=!1,d){const m=(d??Ud(n)?LR:OR)(a,o,l,n),g=MR(a,typeof n=="string",u),b=n!==T.Fragment?{...g,...m,ref:s}:{},{children:v}=a,x=T.useMemo(()=>ct(v)?v.get():v,[v]);return T.createElement(n,{...b,children:x})}function UR({scrapeMotionValuesFromProps:n,createRenderState:a},s,o,l){return{latestValues:VR(s,o,l,n),renderState:a()}}function VR(n,a,s,o){const l={},u=o(n,{});for(const x in u)l[x]=Pr(u[x]);let{initial:d,animate:h}=n;const m=pl(n),g=uS(n);a&&g&&!m&&n.inherit!==!1&&(d===void 0&&(d=a.initial),h===void 0&&(h=a.animate));let b=s?s.initial===!1:!1;b=b||d===!1;const v=b?h:d;if(v&&typeof v!="boolean"&&!ml(v)){const x=Array.isArray(v)?v:[v];for(let D=0;D<x.length;D++){const w=Dd(n,x[D]);if(w){const{transitionEnd:R,transition:L,...M}=w;for(const V in M){let z=M[V];if(Array.isArray(z)){const j=b?z.length-1:0;z=z[j]}z!==null&&(l[V]=z)}for(const V in R)l[V]=R[V]}}}return l}const IS=n=>(a,s)=>{const o=T.useContext(gl),l=T.useContext(dl),u=()=>UR(n,a,o,l);return s?u():cd(u)},PR=IS({scrapeMotionValuesFromProps:Ld,createRenderState:Bd}),_R=IS({scrapeMotionValuesFromProps:wS,createRenderState:FS}),HR=Symbol.for("motionComponentSymbol");function FR(n,a,s){const o=T.useRef(s);T.useInsertionEffect(()=>{o.current=s});const l=T.useRef(null);return T.useCallback(u=>{u&&n.onMount?.(u);const d=o.current;if(typeof d=="function")if(u){const h=d(u);typeof h=="function"&&(l.current=h)}else l.current?(l.current(),l.current=null):d(u);else d&&(d.current=u);a&&(u?a.mount(u):a.unmount())},[a])}const GS=T.createContext({});function wi(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function IR(n,a,s,o,l,u){const{visualElement:d}=T.useContext(gl),h=T.useContext(VS),m=T.useContext(dl),g=T.useContext(zd),b=g.reducedMotion,v=g.skipAnimations,x=T.useRef(null),D=T.useRef(!1);o=o||h.renderer,!x.current&&o&&(x.current=o(n,{visualState:a,parent:d,props:s,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:b,skipAnimations:v,isSVG:u}),D.current&&x.current&&(x.current.manuallyAnimateOnMount=!0));const w=x.current,R=T.useContext(GS);w&&!w.projection&&l&&(w.type==="html"||w.type==="svg")&&GR(x.current,s,l,R);const L=T.useRef(!1);T.useInsertionEffect(()=>{w&&L.current&&w.update(s,m)});const M=s[$0],V=T.useRef(!!M&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(M)&&window.MotionHasOptimisedAnimation?.(M));return ud(()=>{D.current=!0,w&&(L.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),V.current&&w.animationState&&w.animationState.animateChanges())}),T.useEffect(()=>{w&&(!V.current&&w.animationState&&w.animationState.animateChanges(),V.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(M)}),V.current=!1),w.enteringChildren=void 0)}),w}function GR(n,a,s,o){const{layoutId:l,layout:u,drag:d,dragConstraints:h,layoutScroll:m,layoutRoot:g,layoutAnchor:b,layoutCrossfade:v}=a;n.projection=new s(n.latestValues,a["data-framer-portal-id"]?void 0:qS(n.parent)),n.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!d||h&&wi(h),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,crossfade:v,layoutScroll:m,layoutRoot:g,layoutAnchor:b})}function qS(n){if(n)return n.options.allowProjection!==!1?n.projection:qS(n.parent)}function lf(n,{forwardMotionProps:a=!1,type:s}={},o,l){o&&DR(o);const u=s?s==="svg":Ud(n),d=u?_R:PR;function h(g,b){let v;const x={...T.useContext(zd),...g,layoutId:qR(g)},{isStatic:D}=x,w=NR(g),R=d(g,D);if(!D&&typeof window<"u"){KR();const L=YR(x);v=L.MeasureLayout,w.visualElement=IR(n,R,x,l,L.ProjectionNode,u)}return y.jsxs(gl.Provider,{value:w,children:[v&&w.visualElement?y.jsx(v,{visualElement:w.visualElement,...x}):null,BR(n,g,FR(R,w.visualElement,b),R,D,a,u)]})}h.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=T.forwardRef(h);return m[HR]=n,m}function qR({layoutId:n}){const a=T.useContext(Gs).id;return a&&n!==void 0?a+"-"+n:n}function KR(n,a){T.useContext(VS).strict}function YR(n){const a=PS(),{drag:s,layout:o}=a;if(!s&&!o)return{};const l={...s,...o};return{MeasureLayout:s?.isEnabled(n)||o?.isEnabled(n)?l.MeasureLayout:void 0,ProjectionNode:l.ProjectionNode}}function XR(n,a){if(typeof Proxy>"u")return lf;const s=new Map,o=(u,d)=>lf(u,d,n,a),l=(u,d)=>o(u,d);return new Proxy(l,{get:(u,d)=>d==="create"?o:(s.has(d)||s.set(d,lf(d,void 0,n,a)),s.get(d))})}const QR=(n,a)=>a.isSVG??Ud(n)?new bN(a):new hN(a,{allowProjection:n!==T.Fragment});class ZR extends ra{constructor(a){super(a),a.animationState||(a.animationState=CN(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();ml(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:s}=this.node.prevProps||{};a!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let $R=0;class WR extends ra{constructor(){super(...arguments),this.id=$R++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:s}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;if(a&&o===!1){if(this.isExitComplete){const{initial:u,custom:d}=this.node.getProps();if(typeof u=="string"){const h=La(this.node,u,d);if(h){const{transition:m,transitionEnd:g,...b}=h;for(const v in b)this.node.getValue(v)?.jump(b[v])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const l=this.node.animationState.setActive("exit",!a);s&&!a&&l.then(()=>{this.isExitComplete=!0,s(this.id)})}mount(){const{register:a,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const JR={animation:{Feature:ZR},exit:{Feature:WR}};function Js(n){return{point:{x:n.pageX,y:n.pageY}}}const ej=n=>a=>kd(a)&&n(a,Js(a));function Ps(n,a,s,o){return Xs(n,a,ej(s),o)}const KS=({current:n})=>n?n.ownerDocument.defaultView:null,Pv=(n,a)=>Math.abs(n-a);function tj(n,a){const s=Pv(n.x,a.x),o=Pv(n.y,a.y);return Math.sqrt(s**2+o**2)}const _v=new Set(["auto","scroll"]);class YS{constructor(a,s,{transformPagePoint:o,contextWindow:l=window,dragSnapToOrigin:u=!1,distanceThreshold:d=3,element:h}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=D=>{this.handleScroll(D.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Mr(this.lastRawMoveEventInfo,this.transformPagePoint));const D=cf(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,R=tj(D.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!R)return;const{point:L}=D,{timestamp:M}=rt;this.history.push({...L,timestamp:M});const{onStart:V,onMove:z}=this.handlers;w||(V&&V(this.lastMoveEvent,D),this.startEvent=this.lastMoveEvent),z&&z(this.lastMoveEvent,D)},this.handlePointerMove=(D,w)=>{this.lastMoveEvent=D,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=Mr(w,this.transformPagePoint),Ne.update(this.updatePoint,!0)},this.handlePointerUp=(D,w)=>{this.end();const{onEnd:R,onSessionEnd:L,resumeAnimation:M}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const V=cf(D.type==="pointercancel"?this.lastMoveEventInfo:Mr(w,this.transformPagePoint),this.history);this.startEvent&&R&&R(D,V),L&&L(D,V)},!kd(a))return;this.dragSnapToOrigin=u,this.handlers=s,this.transformPagePoint=o,this.distanceThreshold=d,this.contextWindow=l||window;const m=Js(a),g=Mr(m,this.transformPagePoint),{point:b}=g,{timestamp:v}=rt;this.history=[{...b,timestamp:v}];const{onSessionStart:x}=s;x&&x(a,cf(g,this.history)),this.removeListeners=Zs(Ps(this.contextWindow,"pointermove",this.handlePointerMove),Ps(this.contextWindow,"pointerup",this.handlePointerUp),Ps(this.contextWindow,"pointercancel",this.handlePointerUp)),h&&this.startScrollTracking(h)}startScrollTracking(a){let s=a.parentElement;for(;s;){const o=getComputedStyle(s);(_v.has(o.overflowX)||_v.has(o.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(a){const s=this.scrollPositions.get(a);if(!s)return;const o=a===window,l=o?{x:window.scrollX,y:window.scrollY}:{x:a.scrollLeft,y:a.scrollTop},u={x:l.x-s.x,y:l.y-s.y};u.x===0&&u.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=u.x,this.lastMoveEventInfo.point.y+=u.y):this.history.length>0&&(this.history[0].x-=u.x,this.history[0].y-=u.y),this.scrollPositions.set(a,l),Ne.update(this.updatePoint,!0))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),oa(this.updatePoint)}}function Mr(n,a){return a?{point:a(n.point)}:n}function Hv(n,a){return{x:n.x-a.x,y:n.y-a.y}}function cf({point:n},a){return{point:n,delta:Hv(n,XS(a)),offset:Hv(n,nj(a)),velocity:aj(a,.1)}}function nj(n){return n[0]}function XS(n){return n[n.length-1]}function aj(n,a){if(n.length<2)return{x:0,y:0};let s=n.length-1,o=null;const l=XS(n);for(;s>=0&&(o=n[s],!(l.timestamp-o.timestamp>Ot(a)));)s--;if(!o)return{x:0,y:0};o===n[0]&&n.length>2&&l.timestamp-o.timestamp>Ot(a)*2&&(o=n[1]);const u=Gt(l.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const d={x:(l.x-o.x)/u,y:(l.y-o.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}function ij(n,{min:a,max:s},o){return a!==void 0&&n<a?n=o?ze(a,n,o.min):Math.max(n,a):s!==void 0&&n>s&&(n=o?ze(s,n,o.max):Math.min(n,s)),n}function Fv(n,a,s){return{min:a!==void 0?n.min+a:void 0,max:s!==void 0?n.max+s-(n.max-n.min):void 0}}function sj(n,{top:a,left:s,bottom:o,right:l}){return{x:Fv(n.x,s,l),y:Fv(n.y,a,o)}}function Iv(n,a){let s=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([s,o]=[o,s]),{min:s,max:o}}function oj(n,a){return{x:Iv(n.x,a.x),y:Iv(n.y,a.y)}}function rj(n,a){let s=.5;const o=ht(n),l=ht(a);return l>o?s=qs(a.min,a.max-o,n.min):o>l&&(s=qs(n.min,n.max-l,a.min)),un(0,1,s)}function lj(n,a){const s={};return a.min!==void 0&&(s.min=a.min-n.min),a.max!==void 0&&(s.max=a.max-n.min),s}const Xf=.35;function cj(n=Xf){return n===!1?n=0:n===!0&&(n=Xf),{x:Gv(n,"left","right"),y:Gv(n,"top","bottom")}}function Gv(n,a,s){return{min:qv(n,a),max:qv(n,s)}}function qv(n,a){return typeof n=="number"?n:n[a]||0}const uj=new WeakMap;class fj{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$e(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:s=!1,distanceThreshold:o}={}){const{presenceContext:l}=this.visualElement;if(l&&l.isPresent===!1)return;const u=v=>{s&&this.snapToCursor(Js(v).point),this.stopAnimation()},d=(v,x)=>{const{drag:D,dragPropagation:w,onDragStart:R}=this.getProps();if(D&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jk(D),!this.openDragLock))return;this.latestPointerEvent=v,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),on(M=>{let V=this.getAxisMotionValue(M).get()||0;if(cn.test(V)){const{projection:z}=this.visualElement;if(z&&z.layout){const j=z.layout.layoutBox[M];j&&(V=ht(j)*(parseFloat(V)/100))}}this.originPoint[M]=V}),R&&Ne.update(()=>R(v,x),!1,!0),Pf(this.visualElement,"transform");const{animationState:L}=this.visualElement;L&&L.setActive("whileDrag",!0)},h=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x;const{dragPropagation:D,dragDirectionLock:w,onDirectionLock:R,onDrag:L}=this.getProps();if(!D&&!this.openDragLock)return;const{offset:M}=x;if(w&&this.currentDirection===null){this.currentDirection=hj(M),this.currentDirection!==null&&R&&R(this.currentDirection);return}this.updateAxis("x",x.point,M),this.updateAxis("y",x.point,M),this.visualElement.render(),L&&Ne.update(()=>L(v,x),!1,!0)},m=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x,this.stop(v,x),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>{const{dragSnapToOrigin:v}=this.getProps();(v||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:b}=this.getProps();this.panSession=new YS(a,{onSessionStart:u,onStart:d,onMove:h,onSessionEnd:m,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:o,contextWindow:KS(this.visualElement),element:this.visualElement.current})}stop(a,s){const o=a||this.latestPointerEvent,l=s||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!l||!o)return;const{velocity:d}=l;this.startAnimation(d);const{onDragEnd:h}=this.getProps();h&&Ne.postRender(()=>h(o,l))}cancel(){this.isDragging=!1;const{projection:a,animationState:s}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(a,s,o){const{drag:l}=this.getProps();if(!o||!kr(a,l,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=ij(d,this.constraints[a],this.elastic[a])),u.set(d)}resolveConstraints(){const{dragConstraints:a,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,l=this.constraints;a&&wi(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&o?this.constraints=sj(o.layoutBox,a):this.constraints=!1,this.elastic=cj(s),l!==this.constraints&&!wi(a)&&o&&this.constraints&&!this.hasMutatedConstraints&&on(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=lj(o.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:s}=this.getProps();if(!a||!wi(a))return!1;const o=a.current,{projection:l}=this.visualElement;if(!l||!l.layout)return!1;const u=rN(o,l.root,this.visualElement.getTransformPagePoint());let d=oj(l.layout.layoutBox,u);if(s){const h=s(iN(d));this.hasMutatedConstraints=!!h,h&&(d=mS(h))}return d}startAnimation(a){const{drag:s,dragMomentum:o,dragElastic:l,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:h}=this.getProps(),m=this.constraints||{},g=on(b=>{if(!kr(b,s,this.currentDirection))return;let v=m&&m[b]||{};(d===!0||d===b)&&(v={min:0,max:0});const x=l?200:1e6,D=l?40:1e7,w={type:"inertia",velocity:o?a[b]:0,bounceStiffness:x,bounceDamping:D,timeConstant:750,restDelta:1,restSpeed:10,...u,...v};return this.startAxisValueAnimation(b,w)});return Promise.all(g).then(h)}startAxisValueAnimation(a,s){const o=this.getAxisMotionValue(a);return Pf(this.visualElement,a),o.start(Cd(a,o,0,s,this.visualElement,!1))}stopAnimation(){on(a=>this.getAxisMotionValue(a).stop())}getAxisMotionValue(a){const s=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),l=o[s];return l||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){on(s=>{const{drag:o}=this.getProps();if(!kr(s,o,this.currentDirection))return;const{projection:l}=this.visualElement,u=this.getAxisMotionValue(s);if(l&&l.layout){const{min:d,max:h}=l.layout.layoutBox[s],m=u.get()||0;u.set(a[s]-ze(d,h,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:s}=this.getProps(),{projection:o}=this.visualElement;if(!wi(s)||!o||!this.constraints)return;this.stopAnimation();const l={x:0,y:0};on(d=>{const h=this.getAxisMotionValue(d);if(h&&this.constraints!==!1){const m=h.get();l[d]=rj({min:m,max:m},this.constraints[d])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),on(d=>{if(!kr(d,a,null))return;const h=this.getAxisMotionValue(d),{min:m,max:g}=this.constraints[d];h.set(ze(m,g,l[d]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;uj.set(this.visualElement,this);const a=this.visualElement.current,s=Ps(a,"pointerdown",g=>{const{drag:b,dragListener:v=!0}=this.getProps(),x=g.target,D=x!==a&&Vk(x);b&&v&&!D&&this.start(g)});let o;const l=()=>{const{dragConstraints:g}=this.getProps();wi(g)&&g.current&&(this.constraints=this.resolveRefConstraints(),o||(o=dj(a,g.current,()=>this.scalePositionWithinConstraints())))},{projection:u}=this.visualElement,d=u.addEventListener("measure",l);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),Ne.read(l);const h=Xs(window,"resize",()=>this.scalePositionWithinConstraints()),m=u.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:b})=>{this.isDragging&&b&&(on(v=>{const x=this.getAxisMotionValue(v);x&&(this.originPoint[v]+=g[v].translate,x.set(x.get()+g[v].translate))}),this.visualElement.render())}));return()=>{h(),s(),d(),m&&m(),o&&o()}}getProps(){const a=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:o=!1,dragPropagation:l=!1,dragConstraints:u=!1,dragElastic:d=Xf,dragMomentum:h=!0}=a;return{...a,drag:s,dragDirectionLock:o,dragPropagation:l,dragConstraints:u,dragElastic:d,dragMomentum:h}}}function Kv(n){let a=!0;return()=>{if(a){a=!1;return}n()}}function dj(n,a,s){const o=Wy(n,Kv(s)),l=Wy(a,Kv(s));return()=>{o(),l()}}function kr(n,a,s){return(a===!0||a===n)&&(s===null||s===n)}function hj(n,a=10){let s=null;return Math.abs(n.y)>a?s="y":Math.abs(n.x)>a&&(s="x"),s}class mj extends ra{constructor(a){super(a),this.removeGroupControls=qt,this.removeListeners=qt,this.controls=new fj(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qt}update(){const{dragControls:a}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};a!==s&&(this.removeGroupControls(),a&&(this.removeGroupControls=a.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const uf=n=>(a,s)=>{n&&Ne.update(()=>n(a,s),!1,!0)};class pj extends ra{constructor(){super(...arguments),this.removePointerDownListener=qt}onPointerDown(a){this.session=new YS(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:KS(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:s,onPan:o,onPanEnd:l}=this.node.getProps();return{onSessionStart:uf(a),onStart:uf(s),onMove:uf(o),onEnd:(u,d)=>{delete this.session,l&&Ne.postRender(()=>l(u,d))}}}mount(){this.removePointerDownListener=Ps(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ff=!1;class gj extends T.Component{componentDidMount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:o,layoutId:l}=this.props,{projection:u}=a;u&&(s.group&&s.group.add(u),o&&o.register&&l&&o.register(u),ff&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),_r.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:s,visualElement:o,drag:l,isPresent:u}=this.props,{projection:d}=o;return d&&(d.isPresent=u,a.layoutDependency!==s&&d.setOptions({...d.options,layoutDependency:s}),ff=!0,l||a.layoutDependency!==s||s===void 0||a.isPresent!==u?d.willUpdate():this.safeToRemove(),a.isPresent!==u&&(u?d.promote():d.relegate()||Ne.postRender(()=>{const h=d.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:a,layoutAnchor:s}=this.props,{projection:o}=a;o&&(o.options.layoutAnchor=s,o.root.didUpdate(),Md.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:s,switchLayoutGroup:o}=this.props,{projection:l}=a;ff=!0,l&&(l.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(l),o&&o.deregister&&o.deregister(l))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function QS(n){const[a,s]=BS(),o=T.useContext(Gs);return y.jsx(gj,{...n,layoutGroup:o,switchLayoutGroup:T.useContext(GS),isPresent:a,safeToRemove:s})}const yj={pan:{Feature:pj},drag:{Feature:mj,ProjectionNode:zS,MeasureLayout:QS}};function Yv(n,a,s){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",s==="Start");const l="onHover"+s,u=o[l];u&&Ne.postRender(()=>u(a,Js(a)))}class vj extends ra{mount(){const{current:a}=this.node;a&&(this.unmount=Lk(a,(s,o)=>(Yv(this.node,o,"Start"),l=>Yv(this.node,l,"End"))))}unmount(){}}class bj extends ra{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Zs(Xs(this.node.current,"focus",()=>this.onFocus()),Xs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Xv(n,a,s){const{props:o}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",s==="Start");const l="onTap"+(s==="End"?"":s),u=o[l];u&&Ne.postRender(()=>u(a,Js(a)))}class Sj extends ra{mount(){const{current:a}=this.node;if(!a)return;const{globalTapTarget:s,propagate:o}=this.node.props;this.unmount=_k(a,(l,u)=>(Xv(this.node,u,"Start"),(d,{success:h})=>Xv(this.node,d,h?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:o?.tap===!1})}unmount(){}}const Qf=new WeakMap,df=new WeakMap,xj=n=>{const a=Qf.get(n.target);a&&a(n)},Tj=n=>{n.forEach(xj)};function wj({root:n,...a}){const s=n||document;df.has(s)||df.set(s,{});const o=df.get(s),l=JSON.stringify(a);return o[l]||(o[l]=new IntersectionObserver(Tj,{root:n,...a})),o[l]}function Cj(n,a,s){const o=wj(a);return Qf.set(n,s),o.observe(n),()=>{Qf.delete(n),o.unobserve(n)}}const Dj={some:0,all:1};class Aj extends ra{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:a={}}=this.node.getProps(),{root:s,margin:o,amount:l="some",once:u}=a,d={root:s?s.current:void 0,rootMargin:o,threshold:typeof l=="number"?l:Dj[l]},h=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:b,onViewportLeave:v}=this.node.getProps(),x=g?b:v;x&&x(m)};this.stopObserver=Cj(this.node.current,d,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:s}=this.node;["amount","margin","root"].some(Ej(a,s))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function Ej({viewport:n={}},{viewport:a={}}={}){return s=>n[s]!==a[s]}const Mj={inView:{Feature:Aj},tap:{Feature:Sj},focus:{Feature:bj},hover:{Feature:vj}},kj={layout:{ProjectionNode:zS,MeasureLayout:QS}},Nj={...JR,...Mj,...yj,...kj},_s=XR(Nj,QR);function Rj(n){switch(n){case"page":return .62;case"header":return .72;case"sidebar":return .78;case"card":return .82;case"dialog":return .88;default:return .68}}function jj(n){if(n==="page")return"linear-gradient(to bottom, hsl(var(--background) / 0.82), hsl(var(--background) / 0.52) 28%, hsl(var(--background) / 0.7) 100%)"}function Oj(n){const a=[];return n.blur>0&&a.push(`blur(${n.blur}px)`),n.brightness!==100&&a.push(`brightness(${n.brightness}%)`),n.contrast!==100&&a.push(`contrast(${n.contrast}%)`),n.saturate!==100&&a.push(`saturate(${n.saturate}%)`),a.join(" ")}function Lj(n){switch(n){case"cover":return"cover";case"contain":return"contain";case"center":return"auto";case"stretch":return"100% 100%";default:return"cover"}}function zj(n){switch(n){case"cover":return"cover";case"contain":return"contain";case"center":return"none";case"stretch":return"fill";default:return"cover"}}function Vd({config:n,layerId:a}){const{getAssetUrl:s}=TE(),[o,l]=T.useState(),u=T.useRef(null);if(T.useEffect(()=>{if(!n.assetId){l(void 0);return}s(n.assetId).then(l)},[n.assetId,s]),T.useEffect(()=>{if(n.type!=="video"||!u.current)return;const w=window.matchMedia("(prefers-reduced-motion: reduce)"),R=()=>{u.current&&(w.matches?u.current.pause():u.current.play().catch(()=>{}))};return R(),w.addEventListener("change",R),()=>w.removeEventListener("change",R)},[n.type]),n.type==="none")return null;const d=Oj(n.effects),{overlayColor:h,overlayOpacity:m,gradientOverlay:g}=n.effects,b=m>0,v=b?m:Rj(a),x=b?`hsl(${h} / ${v})`:`hsl(var(--background) / ${v})`,D=g||jj(a);return y.jsxs("div",{"data-background-layer":a,style:{position:"absolute",inset:0,zIndex:0,overflow:"hidden",pointerEvents:"none"},children:[n.type==="image"&&y.jsx("div",{style:{position:"absolute",inset:0,zIndex:0,backgroundImage:o?`url(${o})`:void 0,backgroundSize:Lj(n.effects.position),backgroundPosition:"center",backgroundRepeat:"no-repeat",filter:d||void 0}}),n.type==="video"&&o&&y.jsx("video",{ref:u,src:o,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{position:"absolute",inset:0,zIndex:0,width:"100%",height:"100%",objectFit:zj(n.effects.position),filter:d||void 0},onError:()=>{u.current&&u.current.pause()}}),v>0&&y.jsx("div",{style:{position:"absolute",inset:0,zIndex:1,backgroundColor:x,pointerEvents:"none"}}),D&&y.jsx("div",{style:{position:"absolute",inset:0,zIndex:2,background:D,pointerEvents:"none"}})]},a)}function Bj(){const[n,a]=T.useState(0),[s,o]=T.useState(!1),l=T.useRef(null);T.useEffect(()=>{const g=b=>{const v=b.target;if(v.scrollHeight>v.clientHeight+100){l.current=v;const x=v.scrollTop,D=v.scrollHeight-v.clientHeight,w=D>0?x/D*100:0;a(w),o(x>300)}};return window.addEventListener("scroll",g,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})},[]);const u=()=>{l.current?.scrollTo({top:0,behavior:"smooth"})},d=18,h=2*Math.PI*d,m=h-n/100*h;return y.jsx("div",{className:K("fixed bottom-24 right-8 z-50 transition-all duration-500 ease-in-out transform",s?"translate-x-0 opacity-100":"translate-x-32 opacity-0 pointer-events-none"),children:y.jsxs(He,{variant:"outline",size:"icon",className:K("relative h-12 w-12 rounded-full shadow-xl","bg-background/80 backdrop-blur-md border-border/50","hover:bg-accent hover:scale-110 hover:shadow-2xl hover:border-primary/50","transition-all duration-300","group"),onClick:u,"aria-label":"回到顶部",children:[y.jsxs("svg",{className:"absolute inset-0 h-full w-full -rotate-90 transform p-1",viewBox:"0 0 44 44",children:[y.jsx("circle",{className:"text-muted-foreground/10",strokeWidth:"3",stroke:"currentColor",fill:"transparent",r:d,cx:"22",cy:"22"}),y.jsx("circle",{className:"text-primary transition-all duration-100 ease-out",strokeWidth:"3",strokeDasharray:h,strokeDashoffset:m,strokeLinecap:"round",stroke:"currentColor",fill:"transparent",r:d,cx:"22",cy:"22"})]}),y.jsx(gC,{className:"h-5 w-5 text-primary transition-transform duration-300 group-hover:-translate-y-1 group-hover:scale-110",strokeWidth:2.5}),y.jsx("div",{className:"absolute inset-0 rounded-full bg-primary/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]})})}function Uj(){const{t:n}=Nn(),a=window.location.protocol==="http:",s=window.location.hostname.toLowerCase(),o=s==="localhost"||s==="127.0.0.1"||s==="::1",l=sessionStorage.getItem("http-warning-dismissed")==="true",[u,d]=T.useState(a&&!o&&!l),[h,m]=T.useState(!1),g=()=>{m(!0),d(!1),sessionStorage.setItem("http-warning-dismissed","true")};return!u||h?null:y.jsx("div",{className:"relative bg-amber-500/10 border-b border-amber-500/20 backdrop-blur-sm",children:y.jsx("div",{className:"container mx-auto px-4 py-3",children:y.jsxs("div",{className:"flex items-center justify-between gap-4",children:[y.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[y.jsx(Fr,{className:"h-5 w-5 text-amber-600 dark:text-amber-500 flex-shrink-0"}),y.jsxs("div",{className:"flex-1",children:[y.jsxs("p",{className:"text-sm font-medium text-amber-900 dark:text-amber-100",children:[y.jsx("span",{className:"font-semibold",children:n("httpWarning.title")}),n("httpWarning.message")]}),y.jsx("p",{className:"text-xs text-amber-800 dark:text-amber-200 mt-1",children:n("httpWarning.description")})]})]}),y.jsx(He,{variant:"ghost",size:"icon",onClick:g,className:"h-8 w-8 text-amber-700 hover:text-amber-900 dark:text-amber-400 dark:hover:text-amber-200 flex-shrink-0","aria-label":n("httpWarning.dismiss"),children:y.jsx(cl,{className:"h-4 w-4"})})]})})})}function Vj(){const{t:n}=Nn();return y.jsx("a",{href:"#main-content",className:["sr-only","focus-visible:not-sr-only","focus-visible:fixed","focus-visible:left-4","focus-visible:top-4","focus-visible:z-[9999]","focus-visible:rounded-md","focus-visible:bg-background","focus-visible:px-4","focus-visible:py-2","focus-visible:text-sm","focus-visible:font-medium","focus-visible:text-foreground","focus-visible:shadow-md","focus-visible:outline-none","focus-visible:ring-2","focus-visible:ring-ring"].join(" "),children:n("a11y.skipToContent")})}const Pj=Rw,_j=jw,Hj=Ow,ZS=T.forwardRef(({className:n,sideOffset:a=4,...s},o)=>y.jsx(Nw,{children:y.jsx(fb,{ref:o,sideOffset:a,className:K("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",n),...s})}));ZS.displayName=fb.displayName;const $S=()=>{const n=T.useContext(qb);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n},Fj=(n,a,s)=>{const o=document.documentElement.classList.contains("no-animations");if(!document.startViewTransition||o){a(n);return}const l=s.clientX,u=s.clientY,d=Math.hypot(Math.max(l,innerWidth-l),Math.max(u,innerHeight-u));document.startViewTransition(()=>{a(n)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${l}px ${u}px)`,`circle(${d}px at ${l}px ${u}px)`]},{duration:500,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})};async function Pd(){return Je()?await window.electronAPI?.getActiveBackendUrl()??"":""}async function IL(){if(Je()){const s=await Pd();return s?s.replace(/^https?/,o=>o==="https"?"wss":"ws"):""}const n=window.location.protocol==="https:"?"wss:":"ws:",a=window.location.host;return`${n}//${a}`}async function GL(n){if(Je()){const a=await Pd();return a?`${a}${n}`:n}return n}async function _d(n){if(Je()&&typeof n=="string"&&n.startsWith("/")){const a=await Pd();return a?`${a}${n}`:n}return n}async function Kt(n,a){const o=a?.body instanceof FormData?{...a?.headers}:{"Content-Type":"application/json",...a?.headers},l={...a,credentials:"include",headers:o},u=await fetch(await _d(n),l);if(u.status===401)throw window.location.href="/auth",new Error("认证失败,请重新登录");return u}function qL(){return{"Content-Type":"application/json"}}async function Ij(){try{await fetch(await _d("/api/webui/auth/logout"),{method:"POST",credentials:"include"})}catch(n){console.error("登出请求失败:",n)}window.location.href="/auth"}async function WS(){try{return(await(await fetch(await _d("/api/webui/auth/check"),{method:"GET",credentials:"include"})).json()).authenticated===!0}catch{return!1}}function Gj(){const n=Wf(),[a,s]=T.useState(!0);return T.useEffect(()=>{let o=!1;return(async()=>{try{const u=await WS();!o&&!u&&n({to:"/auth"})}catch{o||n({to:"/auth"})}finally{o||s(!1)}})(),()=>{o=!0}},[n]),{checking:a}}async function qj(){return await WS()}function Hd(n){const{themeConfig:a}=$S(),s=a.backgroundConfig??{},o=s[n]??Dy;return n!=="page"&&o.inherit?{config:s.page??Dy,inheritEnabled:!0,inheritedFrom:"page"}:{config:o,inheritEnabled:!!o.inherit,inheritedFrom:null}}function Kj(){const[n,a]=T.useState(!1);T.useEffect(()=>{if(!Je())return;const u=window.electronAPI;if(!u)return;u.isMaximized().then(a);const d=u.onWindowMaximized(()=>a(!0)),h=u.onWindowUnmaximized(()=>a(!1));return()=>{d?.(),h?.()}},[]);const s=T.useCallback(()=>window.electronAPI?.minimizeWindow(),[]),o=T.useCallback(()=>window.electronAPI?.maximizeWindow(),[]);return{close:T.useCallback(()=>window.electronAPI?.closeWindow(),[]),isMaximized:n,minimize:s,toggleMaximize:o}}const Yj={WebkitAppRegion:"drag"},Qv={WebkitAppRegion:"no-drag"};function Xj(){const{close:n,isMaximized:a,minimize:s,toggleMaximize:o}=Kj(),l=T.useMemo(()=>dM()==="darwin",[]);return Je()?y.jsxs("div",{className:`flex items-center justify-between border-b border-border bg-background select-none ${l?"h-7":"h-8"}`,style:Yj,children:[l&&y.jsx("div",{className:"h-full w-[78px]",style:Qv}),y.jsx("div",{className:"flex flex-1 items-center justify-center text-xs font-semibold text-foreground/80",children:"MaiBot"}),!l&&y.jsxs("div",{className:"flex h-full items-center",style:Qv,children:[y.jsx("button",{className:"flex h-8 w-11 items-center justify-center hover:bg-accent hover:text-accent-foreground",onClick:s,tabIndex:-1,type:"button","aria-label":"最小化",children:y.jsx(yC,{className:"h-3.5 w-3.5"})}),y.jsx("button",{className:"flex h-8 w-11 items-center justify-center hover:bg-accent hover:text-accent-foreground",onClick:o,tabIndex:-1,type:"button","aria-label":a?"还原窗口":"最大化",children:a?y.jsx(Ab,{className:"h-3.5 w-3.5"}):y.jsx(vC,{className:"h-3.5 w-3.5"})}),y.jsx("button",{className:"flex h-8 w-11 items-center justify-center hover:bg-destructive hover:text-destructive-foreground",onClick:n,tabIndex:-1,type:"button","aria-label":"关闭窗口",children:y.jsx(cl,{className:"h-3.5 w-3.5"})})]})]}):null}const Qj=/(Mac|iPhone|iPod|iPad)/i;function Fd(){return typeof navigator>"u"?!1:Qj.test(navigator.platform||navigator.userAgent)}function Zj(n){const a=Fd();switch(n.toLowerCase()){case"mod":return a?"⌘":"Ctrl";case"shift":return a?"⇧":"Shift";case"alt":return a?"⌥":"Alt";case"enter":return a?"↵":"Enter";case"esc":case"escape":return"Esc";case"up":return"↑";case"down":return"↓";case"left":return"←";case"right":return"→";default:return n.length===1?n.toUpperCase():n}}function $j(){return Fd()?"Command":"Control"}function JS(n,a){const s=a.map(u=>u.toLowerCase()),o=n.key.toLowerCase(),l={mod:Fd()?n.metaKey:n.ctrlKey,shift:n.shiftKey,alt:n.altKey};for(const u of s){if(u in l){if(!l[u])return!1;continue}if(o!==u)return!1}return!0}function Wj(n){return n instanceof HTMLElement?n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.isContentEditable||n.getAttribute("role")==="textbox":!1}const Id=[{title:"sidebar.groups.overview",items:[{icon:Jf,label:"sidebar.menu.home",path:"/",searchDescription:"search.items.homeDesc"},{icon:bC,label:"sidebar.menu.maisakaMonitor",path:"/planner-monitor"}]},{title:"sidebar.groups.botConfig",items:[{icon:Eb,label:"sidebar.menu.botMainConfig",path:"/config/bot",searchDescription:"search.items.botConfigDesc"},{icon:SC,label:"sidebar.menu.modelManagement",path:"/config/model",searchDescription:"search.items.modelDesc",tourId:"sidebar-model-management"},{icon:xC,label:"sidebar.menu.promptManagement",path:"/config/prompts"}]},{title:"sidebar.groups.botResources",items:[{icon:TC,label:"sidebar.menu.emojiManagement",path:"/resource/emoji",searchDescription:"search.items.emojiDesc"},{icon:Mb,label:"sidebar.menu.expressionManagement",path:"/resource/expression",searchDescription:"search.items.expressionDesc"},{icon:wC,label:"sidebar.menu.slangManagement",path:"/resource/jargon",searchDescription:"search.items.jargonDesc"},{icon:CC,label:"sidebar.menu.knowledgeBase",path:"/resource/knowledge-base"}]},{title:"sidebar.groups.extensionsMonitor",items:[{icon:DC,label:"sidebar.menu.pluginConfig",path:"/plugin-config"},{icon:AC,label:"sidebar.menu.pluginMarket",path:"/plugins",searchDescription:"search.items.pluginsDesc"},{icon:EC,label:"sidebar.menu.mcpSettings",path:"/mcp-settings"}]},{title:"sidebar.groups.system",items:[{icon:MC,label:"sidebar.menu.logViewer",path:"/logs",searchDescription:"search.items.logsDesc"},{icon:kC,label:"sidebar.menu.reasoningProcess",path:"/reasoning-process",searchDescription:"search.items.reasoningProcessDesc"},{icon:NC,label:"sidebar.menu.settings",path:"/settings",searchDescription:"search.items.settingsDesc"}]}],Jj=zw,KL=Bw,eO=Lw,ex=T.forwardRef(({className:n,...a},s)=>y.jsx(db,{className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a,ref:s}));ex.displayName=db.displayName;const tx=T.forwardRef(({className:n,...a},s)=>y.jsxs(eO,{children:[y.jsx(ex,{}),y.jsx(hb,{ref:s,className:K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n),...a})]}));tx.displayName=hb.displayName;const nx=({className:n,...a})=>y.jsx("div",{className:K("flex flex-col space-y-2 text-center sm:text-left",n),...a});nx.displayName="AlertDialogHeader";const ax=({className:n,...a})=>y.jsx("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});ax.displayName="AlertDialogFooter";const ix=T.forwardRef(({className:n,...a},s)=>y.jsx(mb,{ref:s,className:K("text-lg font-semibold",n),...a}));ix.displayName=mb.displayName;const sx=T.forwardRef(({className:n,...a},s)=>y.jsx(pb,{ref:s,className:K("text-sm text-muted-foreground",n),...a}));sx.displayName=pb.displayName;const ox=T.forwardRef(({className:n,variant:a,...s},o)=>y.jsx(gb,{ref:o,className:K(nd({variant:a}),n),...s}));ox.displayName=gb.displayName;const rx=T.forwardRef(({className:n,...a},s)=>y.jsx(yb,{ref:s,className:K(nd({variant:"outline"}),"mt-2 sm:mt-0",n),...a}));rx.displayName=yb.displayName;const Zf=Pw,YL=_w,tO=Uw,lx=T.forwardRef(({className:n,...a},s)=>y.jsx(vb,{ref:s,className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a}));lx.displayName=vb.displayName;const ol=T.forwardRef(({className:n,children:a,preventOutsideClose:s=!1,hideCloseButton:o=!1,confirmOnEnter:l=!1,onKeyDownCapture:u,...d},h)=>y.jsxs(tO,{children:[y.jsx(lx,{}),y.jsxs(bb,{ref:h,className:K("fixed left-[50%] top-[50%] z-50 flex w-[min(calc(100vw-2rem),var(--dialog-width,32rem))] max-h-[calc(100vh-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 overflow-hidden border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n),onPointerDownOutside:s?m=>m.preventDefault():void 0,onInteractOutside:s?m=>m.preventDefault():void 0,onKeyDownCapture:m=>{if(u?.(m),!l||m.defaultPrevented||!JS(m,["enter"])||m.nativeEvent.isComposing||Wj(m.target))return;const g=m.currentTarget.querySelector('[data-dialog-action="confirm"]:not([disabled])');g&&(m.preventDefault(),g.click())},...d,children:[a,!o&&y.jsxs(Vw,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[y.jsx(cl,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"关闭"})]})]})]}));ol.displayName=bb.displayName;const Gd=T.forwardRef(({className:n,children:a,allowHorizontalScroll:s=!1,contentClassName:o,scrollbars:l,viewportClassName:u,type:d,...h},m)=>y.jsx(Fs,{ref:m,className:K("min-h-0 flex-1 flex flex-col",n),contentClassName:K(s&&"min-w-full w-max",o),scrollbars:l??(s?"both":"vertical"),viewportClassName:K("min-h-0 flex-1 pr-4 [&>div]:!block",u),type:d??"always",...h,children:a}));Gd.displayName="DialogBody";const rl=({className:n,...a})=>y.jsx("div",{className:K("flex flex-col space-y-1.5 text-center sm:text-left",n),...a});rl.displayName="DialogHeader";const nO=({className:n,...a})=>y.jsx("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...a});nO.displayName="DialogFooter";const ll=T.forwardRef(({className:n,...a},s)=>y.jsx(Sb,{ref:s,className:K("text-lg font-semibold leading-none tracking-tight",n),...a}));ll.displayName=Sb.displayName;const aO=T.forwardRef(({className:n,...a},s)=>y.jsx(xb,{ref:s,className:K("text-sm text-muted-foreground",n),...a}));aO.displayName=xb.displayName;function iO(){const[n,a]=T.useState([]),[s,o]=T.useState(null),[l,u]=T.useState(!0),d=T.useCallback(async()=>{if(!Je())return;const[v,x]=await Promise.all([window.electronAPI.getBackends(),window.electronAPI.getActiveBackend()]);a(v),o(x?.id??null),u(!1)},[]);T.useEffect(()=>{d()},[d]);const h=T.useCallback(async v=>{Je()&&(await window.electronAPI.addBackend(v),await d())},[d]),m=T.useCallback(async(v,x)=>{Je()&&(await window.electronAPI.updateBackend(v,x),await d())},[d]),g=T.useCallback(async v=>{Je()&&(await window.electronAPI.removeBackend(v),await d())},[d]),b=T.useCallback(async v=>{Je()&&(await window.electronAPI.setActiveBackend(v),o(v),window.location.reload())},[]);return{backends:n,activeId:s,loading:l,addBackend:h,updateBackend:m,removeBackend:g,switchBackend:b,refresh:d}}function sO({open:n,onOpenChange:a}){const{activeId:s,addBackend:o,backends:l,loading:u,removeBackend:d,switchBackend:h,updateBackend:m}=iO(),[g,b]=T.useState(null),[v,x]=T.useState(null);if(!Je())return null;const D=async()=>{!g?.name||!g?.url||!/^https?:\/\//.test(g.url)||(g.id?await m(g.id,g):await o({name:g.name,url:g.url,isDefault:g.isDefault??!1}),b(null))},w=async()=>{v&&v.id!==s&&(await d(v.id),x(null))},R=async L=>{L!==s&&await h(L)};return y.jsxs(y.Fragment,{children:[y.jsx(Zf,{open:n,onOpenChange:a,children:y.jsxs(ol,{className:"max-w-md sm:max-w-106.25",children:[y.jsx(rl,{children:y.jsx(ll,{children:"后端连接管理"})}),u?y.jsx("div",{className:"flex h-32 items-center justify-center",children:y.jsx(mf,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):y.jsx(Gd,{className:"pr-4",children:y.jsx("div",{className:"flex flex-col gap-3 py-4",children:l.map(L=>{const M=L.id===s;return y.jsxs("div",{className:`flex items-center justify-between rounded-lg border p-3 transition-colors ${M?"border-blue-500 bg-blue-500/10":"border-border"}`,children:[y.jsxs("div",{className:"flex flex-1 items-center gap-3 overflow-hidden",children:[y.jsx("div",{className:"shrink-0",children:M?y.jsx(ed,{className:"h-5 w-5 text-blue-500"}):y.jsx("div",{className:"h-3 w-3 rounded-full bg-muted-foreground/30 ml-1",title:"未知状态"})}),y.jsxs("div",{className:"flex flex-col overflow-hidden",children:[y.jsx("span",{className:"truncate font-medium leading-none",children:L.name}),y.jsx("span",{className:"truncate text-xs text-muted-foreground mt-1",children:L.url})]})]}),y.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[!M&&y.jsxs(He,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>R(L.id),title:"切换到此后端",children:[y.jsx(kb,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"切换到此后端"})]}),y.jsxs(He,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>b(L),title:"编辑",children:[y.jsx(RC,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"编辑"})]}),y.jsxs(He,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>x(L),disabled:M,title:M?"无法删除活跃后端":"删除",children:[y.jsx(jC,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"删除"})]})]})]},L.id)})})}),y.jsx("div",{className:"flex justify-end pt-4 border-t",children:y.jsxs(He,{className:"w-full",onClick:()=>b({name:"",url:"http://",isDefault:!1}),children:[y.jsx(OC,{className:"mr-2 h-4 w-4"}),"添加新连接"]})})]})}),y.jsx(Zf,{open:!!g,onOpenChange:L=>!L&&b(null),children:y.jsxs(ol,{className:"sm:max-w-106.25",confirmOnEnter:!0,children:[y.jsx(rl,{children:y.jsx(ll,{children:g?.id?"编辑连接":"添加连接"})}),y.jsxs("div",{className:"grid gap-4 py-4",children:[y.jsxs("div",{className:"grid gap-2",children:[y.jsx(Is,{htmlFor:"name",children:"名称"}),y.jsx(Mi,{id:"name",value:g?.name||"",onChange:L=>b(M=>M?{...M,name:L.target.value}:null),placeholder:"我的服务器"})]}),y.jsxs("div",{className:"grid gap-2",children:[y.jsx(Is,{htmlFor:"url",children:"URL"}),y.jsx(Mi,{id:"url",value:g?.url||"",onChange:L=>b(M=>M?{...M,url:L.target.value}:null),placeholder:"http://192.168.1.100:8001"})]})]}),y.jsxs("div",{className:"flex justify-end gap-3",children:[y.jsx(He,{variant:"outline",onClick:()=>b(null),children:"取消"}),y.jsx(He,{onClick:D,disabled:!g?.name||!g?.url||!/^https?:\/\//.test(g.url),"data-dialog-action":"confirm",children:"保存"})]})]})}),y.jsx(Jj,{open:!!v,onOpenChange:L=>!L&&x(null),children:y.jsxs(tx,{children:[y.jsxs(nx,{children:[y.jsx(ix,{children:"删除连接"}),y.jsxs(sx,{children:["确定要删除 ",v?.name," 吗?此操作不可撤销。"]})]}),y.jsxs(ax,{children:[y.jsx(rx,{children:"取消"}),y.jsx(ox,{onClick:w,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})})]})}const oO=Qs("pointer-events-none inline-flex select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono font-medium opacity-100",{variants:{size:{sm:"h-5 text-[10px]",default:"h-6 text-xs",lg:"h-7 text-sm"}},defaultVariants:{size:"default"}}),cx=T.forwardRef(({className:n,size:a,abbrTitle:s,children:o,...l},u)=>y.jsx("kbd",{className:K(oO({size:a,className:n})),ref:u,...l,children:s?y.jsx("abbr",{title:s,children:o}):o}));cx.displayName="Kbd";function js({keys:n,className:a,size:s,...o}){return y.jsx("span",{className:K("inline-flex items-center gap-1",a),children:n.map(l=>{const u=Zj(l),d=l==="mod"?$j():void 0;return y.jsx(cx,{size:s,abbrTitle:d,...o,children:u},`${l}-${u}`)})})}async function Yt(n){if(n.ok)try{return{success:!0,data:await n.json()}}catch{return{success:!1,error:"Failed to parse response body"}}try{const a=await n.json(),s=a.error?.detail??a.error?.message??a.detail??a.message??n.statusText;return{success:!1,error:String(s)}}catch{return{success:!1,error:n.statusText||"Unknown error"}}}function XL(n){if(n.success)return n.data;throw new Error(n.error)}const fn="/api/webui/config";async function rO(){const n=await Kt(`${fn}/schema/bot`,{cache:"no-store"});return Yt(n)}async function lO(){const n=await Kt(`${fn}/schema/model`,{cache:"no-store"});return Yt(n)}async function QL(){const n=await Kt(`${fn}/bot`,{cache:"no-store"});return Yt(n)}async function ZL(){const n=await Kt(`${fn}/model`,{cache:"no-store"});return Yt(n)}async function $L(n){const a=await Kt(`${fn}/bot`,{method:"POST",body:JSON.stringify(n)});return Yt(a)}async function WL(){const n=await Kt(`${fn}/bot/raw`,{cache:"no-store"});return Yt(n)}async function JL(n){const a=await Kt(`${fn}/bot/raw`,{method:"POST",body:JSON.stringify({raw_content:n})});return Yt(a)}async function e3(n){const a=await Kt(`${fn}/model`,{method:"POST",body:JSON.stringify(n)});return Yt(a)}async function t3(n,a){const s=await Kt(`${fn}/bot/section/${n}`,{method:"POST",body:JSON.stringify(a)});return Yt(s)}async function n3(n,a){const s=await Kt(`${fn}/model/section/${n}`,{method:"POST",body:JSON.stringify(a)});return Yt(s)}async function a3(n,a="openai",s="/models"){const o=new URLSearchParams({provider_name:n,parser:a,endpoint:s}),l=await Kt(`/api/webui/models/list?${o}`),u=await Yt(l);if(!u.success)return u;const d=u.data;return{success:!0,data:Array.isArray(d)?d:Array.isArray(d?.models)?d.models:[]}}async function i3(n){const a=new URLSearchParams({provider_name:n}),s=await Kt(`/api/webui/models/test-connection-by-name?${a}`,{method:"POST"});return Yt(s)}const cO={zh:["zh_CN","zh-CN","zh"],en:["en_US","en-US","en"],ja:["ja_JP","ja-JP","ja"],ko:["ko_KR","ko-KR","ko"]};function uO(n){const a=(n||"").replace("-","_"),s=a.split("_")[0];return[a,n||"",...cO[s]??[],"zh_CN","zh-CN","zh"].filter(Boolean)}function fO(n,a,s=""){if(!n)return s;if(typeof n=="string")return n||s;for(const o of uO(a)){const l=n[o];if(l)return l}return Object.values(n).find(Boolean)??s}function dO(n){return n?typeof n=="string"?[n]:Object.values(n):[]}function ux(n,a){return fO(n.label,a,n.name)}function hO(n,a){return n.uiLabel||n.classDoc||n.className||a}function Zv(n){if(!n||typeof n!="object")return null;if("fields"in n)return n;if("schema"in n){const a=n.schema;if(a&&typeof a=="object"&&"fields"in a)return a}return null}function mO(n){return"/config/model"}function pO(n,a,s,o){const l=n.options?.join(" ")??"",u=n["x-option-descriptions"]?Object.entries(n["x-option-descriptions"]).map(([d,h])=>`${d} ${h}`).join(" "):"";return[ux(n,o),...dO(n.label),n.name,a,n.description,s,n.type,l,u].join(" ")}function $v(n,a,s,o,l){const u=[],d=(h,m,g)=>{const b=hO(h,a),v=[...g,b].filter(Boolean);for(const x of h.fields){const D=m?`${m}.${x.name}`:x.name,w=h.nested?.[x.name],R=ux(x,l),L=x.description||v.join(" / ")||D,M=D,V=o(M);u.push({id:`config:${a}:${M}`,icon:a==="模型配置"?Nb:Eb,title:R,description:`${a} / ${v.join(" / ")} / ${M} · ${L}`,path:V,category:"配置项",keywords:pO(x,M,v.join(" / "),l)}),w&&d(w,D,v)}};return d(n,"",[]),u}function gO({open:n,onOpenChange:a}){const[s,o]=T.useState(""),[l,u]=T.useState(0),[d,h]=T.useState([]),m=T.useRef(null),g=Wf(),{i18n:b,t:v}=Nn();T.useEffect(()=>{h([])},[b.language]),T.useEffect(()=>{if(!n)return;const M=window.requestAnimationFrame(()=>{m.current?.focus()});return()=>window.cancelAnimationFrame(M)},[n]),T.useEffect(()=>{if(!n||d.length>0)return;let M=!1;return(async()=>{const[z,j]=await Promise.all([rO(),lO()]);if(M)return;const F=[];if(z.success){const X=Zv(z.data);X&&F.push(...$v(X,"Bot 配置","",()=>"/config/bot",b.language))}if(j.success){const X=Zv(j.data);X&&F.push(...$v(X,"模型配置","",mO,b.language))}h(F)})().catch(()=>{M||h([])}),()=>{M=!0}},[d.length,b.language,n]);const x=T.useMemo(()=>Id.flatMap(M=>M.items.filter(V=>kL.has(V.path)).map(V=>({id:`route:${V.path}`,icon:V.icon,title:v(V.label),description:V.searchDescription?v(V.searchDescription):V.path,path:V.path,category:v(M.title),keywords:[v(V.label),V.path,V.searchDescription?v(V.searchDescription):"",v(M.title)].join(" ")}))),[v]),D=s.trim().toLowerCase(),w=(D?[...x,...d]:x).filter(M=>M.keywords.toLowerCase().includes(D)).slice(0,80),R=T.useCallback(M=>{g({to:M}),a(!1),o(""),u(0)},[g,a]),L=T.useCallback(M=>{if(M.key==="ArrowDown"){if(M.preventDefault(),w.length===0)return;u(V=>(V+1)%w.length)}else if(M.key==="ArrowUp"){if(M.preventDefault(),w.length===0)return;u(V=>(V-1+w.length)%w.length)}else M.key==="Enter"&&w[l]&&(M.preventDefault(),R(w[l].path))},[w,l,R]);return y.jsx(Zf,{open:n,onOpenChange:a,children:y.jsxs(ol,{className:"max-w-2xl p-0 gap-0",confirmOnEnter:!0,children:[y.jsxs(rl,{className:"px-4 pt-4 pb-0",children:[y.jsx(ll,{className:"sr-only",children:v("search.title")}),y.jsxs("div",{className:"relative",children:[y.jsx(Ir,{className:"absolute left-3 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground"}),y.jsx(Mi,{ref:m,value:s,onChange:M=>{o(M.target.value),u(0)},onKeyDown:L,placeholder:v("search.placeholder"),className:"h-12 pl-11 text-base border-0 focus-visible:ring-0 shadow-none"})]})]}),y.jsx("div",{className:"border-t",children:y.jsx(Gd,{className:"h-100",viewportClassName:"px-0",children:w.length>0?y.jsx("div",{className:"p-2",children:w.map((M,V)=>{const z=M.icon;return y.jsxs("button",{onClick:()=>R(M.path),onMouseEnter:()=>u(V),className:K("w-full flex items-center gap-3 px-3 py-2.5 rounded-md text-left transition-colors",V===l?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:[y.jsx(z,{className:"h-5 w-5 shrink-0"}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"font-medium text-sm",children:M.title}),y.jsx("div",{className:"text-xs text-muted-foreground truncate",children:M.description})]}),y.jsx("div",{className:"text-xs text-muted-foreground px-2 py-1 bg-muted rounded",children:M.category})]},M.id)})}):y.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[y.jsx(Ir,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:v(s?"search.noResults":"search.startSearch")})]})})}),y.jsx("div",{className:"border-t px-4 py-3 flex items-center justify-between text-xs text-muted-foreground",children:y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsxs("span",{className:"flex items-center gap-1",children:[y.jsx(js,{size:"sm",keys:["up"]}),y.jsx(js,{size:"sm",keys:["down"]}),v("search.navigate")]}),y.jsxs("span",{className:"flex items-center gap-1",children:[y.jsx(js,{size:"sm",keys:["enter"]}),v("search.select")]}),y.jsxs("span",{className:"flex items-center gap-1",children:[y.jsx(js,{size:"sm",keys:["esc"]}),v("search.close")]})]})})]})})}var yl="DropdownMenu",[yO]=$w(yl,[Tb]),mt=Tb(),[vO,fx]=yO(yl),dx=n=>{const{__scopeDropdownMenu:a,children:s,dir:o,open:l,defaultOpen:u,onOpenChange:d,modal:h=!0}=n,m=mt(a),g=T.useRef(null),[b,v]=Ww({prop:l,defaultProp:u??!1,onChange:d,caller:yl});return y.jsx(vO,{scope:a,triggerId:Kg(),triggerRef:g,contentId:Kg(),open:b,onOpenChange:v,onOpenToggle:T.useCallback(()=>v(x=>!x),[v]),modal:h,children:y.jsx(Jw,{...m,open:b,onOpenChange:v,dir:o,modal:h,children:s})})};dx.displayName=yl;var hx="DropdownMenuTrigger",mx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,disabled:o=!1,...l}=n,u=fx(hx,s),d=mt(s);return y.jsx(eC,{asChild:!0,...d,children:y.jsx(tC.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:nC(a,u.triggerRef),onPointerDown:Hr(n.onPointerDown,h=>{!o&&h.button===0&&h.ctrlKey===!1&&(u.onOpenToggle(),u.open||h.preventDefault())}),onKeyDown:Hr(n.onKeyDown,h=>{o||(["Enter"," "].includes(h.key)&&u.onOpenToggle(),h.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});mx.displayName=hx;var bO="DropdownMenuPortal",px=n=>{const{__scopeDropdownMenu:a,...s}=n,o=mt(a);return y.jsx(Iw,{...o,...s})};px.displayName=bO;var gx="DropdownMenuContent",yx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=fx(gx,s),u=mt(s),d=T.useRef(!1);return y.jsx(Gw,{id:l.contentId,"aria-labelledby":l.triggerId,...u,...o,ref:a,onCloseAutoFocus:Hr(n.onCloseAutoFocus,h=>{d.current||l.triggerRef.current?.focus(),d.current=!1,h.preventDefault()}),onInteractOutside:Hr(n.onInteractOutside,h=>{const m=h.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,b=m.button===2||g;(!l.modal||b)&&(d.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yx.displayName=gx;var SO="DropdownMenuGroup",xO=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(aC,{...l,...o,ref:a})});xO.displayName=SO;var TO="DropdownMenuLabel",vx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(Qw,{...l,...o,ref:a})});vx.displayName=TO;var wO="DropdownMenuItem",bx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(qw,{...l,...o,ref:a})});bx.displayName=wO;var CO="DropdownMenuCheckboxItem",Sx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(Kw,{...l,...o,ref:a})});Sx.displayName=CO;var DO="DropdownMenuRadioGroup",AO=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(iC,{...l,...o,ref:a})});AO.displayName=DO;var EO="DropdownMenuRadioItem",xx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(Xw,{...l,...o,ref:a})});xx.displayName=EO;var MO="DropdownMenuItemIndicator",Tx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(Yw,{...l,...o,ref:a})});Tx.displayName=MO;var kO="DropdownMenuSeparator",wx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(Zw,{...l,...o,ref:a})});wx.displayName=kO;var NO="DropdownMenuArrow",RO=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(sC,{...l,...o,ref:a})});RO.displayName=NO;var jO="DropdownMenuSubTrigger",Cx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(Hw,{...l,...o,ref:a})});Cx.displayName=jO;var OO="DropdownMenuSubContent",Dx=T.forwardRef((n,a)=>{const{__scopeDropdownMenu:s,...o}=n,l=mt(s);return y.jsx(Fw,{...l,...o,ref:a,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dx.displayName=OO;var LO=dx,zO=mx,BO=px,Ax=yx,Ex=vx,Mx=bx,kx=Sx,Nx=xx,Rx=Tx,jx=wx,Ox=Cx,Lx=Dx;const UO=LO,VO=zO,PO=T.forwardRef(({className:n,inset:a,children:s,...o},l)=>y.jsxs(Ox,{ref:l,className:K("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",a&&"pl-8",n),...o,children:[s,y.jsx(LC,{className:"ml-auto h-4 w-4"})]}));PO.displayName=Ox.displayName;const _O=T.forwardRef(({className:n,...a},s)=>y.jsx(Lx,{ref:s,className:K("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...a}));_O.displayName=Lx.displayName;const zx=T.forwardRef(({className:n,sideOffset:a=4,...s},o)=>y.jsx(BO,{children:y.jsx(Ax,{ref:o,sideOffset:a,className:K("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...s})}));zx.displayName=Ax.displayName;const Bx=T.forwardRef(({className:n,inset:a,...s},o)=>y.jsx(Mx,{ref:o,className:K("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",n),...s}));Bx.displayName=Mx.displayName;const HO=T.forwardRef(({className:n,children:a,checked:s,...o},l)=>y.jsxs(kx,{ref:l,className:K("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),checked:s,...o,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(Rx,{children:y.jsx(ed,{className:"h-4 w-4"})})}),a]}));HO.displayName=kx.displayName;const FO=T.forwardRef(({className:n,children:a,...s},o)=>y.jsxs(Nx,{ref:o,className:K("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(Rx,{children:y.jsx(zC,{className:"h-2 w-2 fill-current"})})}),a]}));FO.displayName=Nx.displayName;const IO=T.forwardRef(({className:n,inset:a,...s},o)=>y.jsx(Ex,{ref:o,className:K("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",n),...s}));IO.displayName=Ex.displayName;const GO=T.forwardRef(({className:n,...a},s)=>y.jsx(jx,{ref:s,className:K("-mx-1 my-1 h-px bg-muted",n),...a}));GO.displayName=jx.displayName;const qO=oC,Ux=T.forwardRef(({className:n,...a},s)=>y.jsx(wb,{ref:s,className:K("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",n),...a}));Ux.displayName=wb.displayName;const $f=T.forwardRef(({className:n,...a},s)=>y.jsx(Cb,{ref:s,className:K("inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",n),...a}));$f.displayName=Cb.displayName;const KO=T.forwardRef(({className:n,...a},s)=>y.jsx(Db,{ref:s,className:K("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:animate-in data-[state=active]:fade-in data-[state=active]:duration-300",n),...a}));KO.displayName=Db.displayName;const YO=["zh","en","ja","ko"],Wv={zh:"中文",en:"English",ja:"日本語",ko:"한국어"};function XO({sidebarOpen:n,mobileMenuOpen:a,searchOpen:s,actualTheme:o,onSidebarToggle:l,onMobileMenuToggle:u,onSearchOpenChange:d,onThemeChange:h,workspaceMode:m}){const{t:g,i18n:b}=Nn(),v=b.language||"zh",{config:x,inheritedFrom:D}=Hd("header"),w=D==="page",[R,L]=T.useState(!1),[M,V]=T.useState("");T.useEffect(()=>{Je()&&window.electronAPI.getActiveBackend().then(j=>{V(j?.name??g("header.notConnected"))})},[]);const z=async()=>{await Ij()};return y.jsxs("header",{className:K("sticky top-0 isolate z-10 flex h-16 min-w-0 items-center justify-between gap-2 border-b px-3 backdrop-blur-md sm:px-4",w?"bg-transparent":"bg-card/80"),children:[!w&&y.jsx(Vd,{config:x,layerId:"header"}),y.jsxs("div",{className:"relative z-10 flex min-w-0 shrink-0 items-center gap-2 sm:gap-4",children:[y.jsx("button",{onClick:u,"aria-label":g("a11y.closeMenu"),"aria-expanded":a,className:K("hover:bg-accent rounded-lg p-2 lg:hidden",m==="chat"&&"hidden"),children:y.jsx(BC,{className:"h-5 w-5"})}),y.jsx("button",{onClick:l,"aria-label":g(n?"header.collapseSidebar":"header.expandSidebar"),"aria-expanded":n,className:K("hover:bg-accent hidden rounded-lg p-2 lg:block",m==="chat"&&"lg:hidden"),children:y.jsx(UC,{className:K("h-5 w-5 transition-transform",!n&&"rotate-180")})})]}),y.jsxs("div",{className:"relative z-10 flex min-w-0 flex-1 items-center justify-end gap-1 sm:gap-2",children:[y.jsx(wR,{id:"workspace-switcher",children:y.jsx(qO,{value:m,"aria-label":g("workspace.switcherLabel"),children:y.jsxs(Ux,{className:"bg-background/60 relative h-9 gap-0.5 border p-1 shadow-sm backdrop-blur",children:[y.jsx($f,{asChild:!0,value:"settings",className:"relative h-7 gap-1.5 bg-transparent px-2.5 text-xs font-medium data-[state=active]:bg-transparent data-[state=active]:text-primary-foreground data-[state=active]:shadow-none",children:y.jsxs(hf,{to:"/",children:[m==="settings"&&y.jsx(_s.span,{layoutId:"workspace-tab-pill",className:"bg-primary absolute inset-0 -z-10 rounded-md shadow-sm",transition:{type:"spring",stiffness:480,damping:38,mass:.6}}),y.jsx(Nb,{className:"h-3.5 w-3.5"}),y.jsx("span",{className:"hidden sm:inline",children:g("workspace.settings")})]})}),y.jsx($f,{asChild:!0,value:"chat",className:"relative h-7 gap-1.5 bg-transparent px-2.5 text-xs font-medium data-[state=active]:bg-transparent data-[state=active]:text-primary-foreground data-[state=active]:shadow-none",children:y.jsxs(hf,{to:"/chat",children:[m==="chat"&&y.jsx(_s.span,{layoutId:"workspace-tab-pill",className:"bg-primary absolute inset-0 -z-10 rounded-md shadow-sm",transition:{type:"spring",stiffness:480,damping:38,mass:.6}}),y.jsx(Mb,{className:"h-3.5 w-3.5"}),y.jsx("span",{className:"hidden sm:inline",children:g("workspace.chat")})]})})]})})}),y.jsx("div",{className:"bg-border hidden h-6 w-px sm:block"}),Je()&&y.jsxs(y.Fragment,{children:[y.jsxs(He,{variant:"ghost",size:"sm",className:"gap-2",onClick:()=>L(!0),title:g("header.toggleConnection"),children:[y.jsx(kb,{className:"h-4 w-4"}),y.jsx("span",{className:"text-muted-foreground hidden max-w-25 truncate text-xs sm:inline",children:M})]}),y.jsx(sO,{open:R,onOpenChange:L}),y.jsx("div",{className:"bg-border h-6 w-px"})]}),y.jsxs("button",{onClick:()=>d(!0),"aria-label":g("header.searchPlaceholder"),className:"bg-background/50 hover:bg-accent/50 relative hidden h-9 w-64 items-center rounded-md border pr-16 pl-9 text-left transition-colors md:flex",children:[y.jsx(Ir,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2","aria-hidden":"true"}),y.jsx("span",{className:"text-muted-foreground text-sm",children:g("header.searchPlaceholder")}),y.jsx(js,{size:"sm",className:"absolute top-1/2 right-2 -translate-y-1/2",keys:["mod","k"]})]}),y.jsx(gO,{open:s,onOpenChange:d}),y.jsxs(He,{variant:"ghost",size:"sm",onClick:()=>window.open("https://docs.mai-mai.org","_blank"),className:"hidden gap-2 sm:inline-flex",title:g("header.viewDocs"),children:[y.jsx(VC,{className:"h-4 w-4"}),y.jsx("span",{className:"hidden sm:inline",children:g("header.docs")})]}),y.jsxs(UO,{children:[y.jsx(VO,{asChild:!0,children:y.jsxs(He,{variant:"ghost",size:"sm",className:"gap-2 px-2 sm:px-3",children:[y.jsx(PC,{className:"h-4 w-4"}),y.jsx("span",{className:"hidden text-xs sm:inline",children:Wv[v.split("-")[0]]??v})]})}),y.jsx(zx,{align:"end",children:YO.map(j=>y.jsxs(Bx,{onClick:()=>b.changeLanguage(j),className:K("cursor-pointer",v.split("-")[0]===j&&"text-primary font-semibold"),children:[v.split("-")[0]===j&&y.jsx("span",{className:"mr-2",children:"✓"}),Wv[j]]},j))})]}),y.jsx("button",{onClick:j=>{Fj(o==="dark"?"light":"dark",h,j)},"aria-label":g(o==="dark"?"header.switchToLight":"header.switchToDark"),className:"hover:bg-accent rounded-lg p-2",children:o==="dark"?y.jsx(_C,{className:"h-5 w-5"}):y.jsx(HC,{className:"h-5 w-5"})}),y.jsx("div",{className:"bg-border hidden h-6 w-px sm:block"}),y.jsxs(He,{variant:"ghost",size:"sm",onClick:z,className:"gap-2 px-2 sm:px-3",title:g("header.logout"),children:[y.jsx(FC,{className:"h-4 w-4"}),y.jsx("span",{className:"hidden sm:inline",children:g("header.logoutLabel")})]})]})]})}const Vx="1.0.10",QO="MaiBot Dashboard",s3=`${QO} v${Vx}`,Jv=(n="v")=>`${n}${Vx}`;function ZO({sidebarOpen:n}){return y.jsx("div",{className:"flex h-20 items-center border-b px-4",children:y.jsxs("div",{className:K("relative flex items-center justify-center flex-1 transition-all overflow-hidden","lg:flex-1",!n&&"lg:flex-none lg:w-8"),children:[y.jsxs("div",{className:K("flex min-w-0 flex-col items-start justify-center gap-1",!n&&"lg:hidden"),children:[y.jsx("span",{className:"max-w-full truncate whitespace-nowrap text-xl font-bold text-primary-gradient",children:"MaiBot WebUI"}),y.jsx("div",{className:"flex max-w-full items-center gap-2 overflow-hidden",children:y.jsx("span",{className:"shrink-0 whitespace-nowrap text-sm font-semibold text-primary/70",children:Jv()})}),y.jsxs("div",{className:"hidden",children:[y.jsx("span",{className:"font-bold text-xl text-primary-gradient whitespace-nowrap",children:"MaiBot WebUI"}),y.jsx("span",{className:"text-base font-semibold text-primary/70 whitespace-nowrap",children:Jv()})]})]}),!n&&y.jsx("span",{className:"hidden lg:block font-bold text-primary-gradient text-2xl",children:"M"})]})})}function $O({item:n,sidebarOpen:a,tooltipsEnabled:s,onMobileMenuClose:o}){const{t:l}=Nn(),d=hw()({to:n.path}),h=n.icon,m=y.jsxs(y.Fragment,{children:[d&&y.jsx("div",{className:"absolute left-0 top-1/2 h-8 w-1 -translate-y-1/2 rounded-r-full bg-primary transition-opacity duration-300"}),y.jsxs("div",{className:K("flex items-center transition-all duration-300",a?"gap-3":"gap-3 lg:gap-0"),children:[y.jsx(h,{className:K("h-5 w-5 flex-shrink-0",d&&"text-primary"),strokeWidth:2,fill:"none"}),y.jsx("span",{className:K("text-sm font-medium whitespace-nowrap transition-all duration-300",d&&"font-semibold",a?"opacity-100 max-w-[200px]":"opacity-100 max-w-[200px] lg:opacity-0 lg:max-w-0 lg:overflow-hidden"),children:l(n.label)})]})]});return y.jsx("li",{className:"relative",children:y.jsxs(_j,{children:[y.jsx(Hj,{asChild:!0,children:y.jsx(hf,{to:n.path,"data-tour":n.tourId,className:K("relative flex items-center rounded-lg py-2 transition-all duration-300","hover:bg-accent hover:text-accent-foreground",d?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground",a?"px-3":"px-3 lg:px-0 lg:justify-center lg:w-12 lg:mx-auto"),onClick:o,children:m})}),s&&y.jsx(ZS,{side:"right",className:"hidden lg:block",children:y.jsx("p",{children:l(n.label)})})]})})}function eb({sidebarOpen:n,mobileMenuOpen:a,tooltipsEnabled:s,onMobileMenuClose:o}){const{t:l}=Nn(),{config:u,inheritedFrom:d}=Hd("sidebar"),h=d==="page";return y.jsxs("aside",{className:K("fixed inset-y-0 left-0 z-50 isolate flex flex-col border-r transition-all duration-300 lg:relative lg:z-0 lg:h-full",h?"bg-transparent":"bg-card","w-52 lg:w-auto",n?"lg:w-52":"lg:w-16",a?"translate-x-0":"-translate-x-full lg:translate-x-0"),children:[!h&&y.jsx(Vd,{config:u,layerId:"sidebar"}),y.jsx("div",{className:"relative z-10",children:y.jsx(ZO,{sidebarOpen:n})}),y.jsx(Fs,{className:K("relative z-10","min-h-0 flex-1 overflow-x-hidden",!n&&"lg:w-16"),viewportClassName:"[&>div]:!block",children:y.jsx("nav",{"aria-label":l("a11y.sidebarNav"),className:K("p-4",!n&&"lg:p-2 lg:w-16"),children:y.jsx("ul",{className:K("space-y-6",!n&&"lg:space-y-3 lg:w-full"),children:Id.map((m,g)=>y.jsxs("li",{children:[y.jsx("div",{className:K("px-3 h-[1.25rem]","mb-2",!n&&"lg:mb-1 lg:invisible"),children:y.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground/60 whitespace-nowrap",children:l(m.title)})}),!n&&g>0&&y.jsx("div",{className:"hidden lg:block mb-2 border-t border-border"}),y.jsx("ul",{className:"space-y-1",children:m.items.map(b=>y.jsx($O,{item:b,sidebarOpen:n,tooltipsEnabled:s,onMobileMenuClose:o},b.path))})]},m.title))})})})]})}function WO({children:n}){const{t:a}=Nn(),{checking:s}=Gj(),o=mw(),l=pw({select:F=>F.location.pathname}),u=iE(),d=l.startsWith("/chat")?"chat":"settings",h=d==="chat",[m,g]=T.useState(!0),[b,v]=T.useState(!1),[x,D]=T.useState(!1),[w,R]=T.useState(!1),{theme:L,setTheme:M}=$S();T.useEffect(()=>{if(m)R(!1);else{const F=setTimeout(()=>{R(!0)},350);return()=>clearTimeout(F)}},[m]),T.useEffect(()=>{const F=X=>{JS(X,["mod","k"])&&(X.preventDefault(),D(!0))};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[]),T.useEffect(()=>{const F={};for(const X of Id)for(const ie of X.items)F[ie.path]=a(ie.label);return F["/chat"]=a("workspace.chat"),o.subscribe("onResolved",()=>{const X=F[o.state.location.pathname]??"MaiBot Dashboard",ie=X==="MaiBot Dashboard"?"MaiBot Dashboard":`${X} — MaiBot Dashboard`;document.title=ie,u(a("a11y.navigatedTo",{page:X}),"polite");const Q=document.getElementById("main-content");Q&&!Q.contains(document.activeElement)&&requestAnimationFrame(()=>{Q.focus({preventScroll:!0})})})},[o,u,a]);const z=L==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":L,{config:j}=Hd("page");return s?y.jsx("div",{className:"bg-background flex h-screen items-center justify-center",children:y.jsx("div",{className:"text-muted-foreground",children:a("layout.verifyingLogin")})}):y.jsxs(Pj,{delayDuration:300,children:[y.jsx(Vj,{}),Je()&&y.jsx(Xj,{}),y.jsxs("div",{className:K("relative isolate flex h-screen overflow-hidden",Je()&&"pt-8"),children:[y.jsx(Vd,{config:j,layerId:"page"}),y.jsxs("div",{className:"relative z-10 flex h-full w-full overflow-hidden",children:[y.jsx(rf,{initial:!1,children:!h&&y.jsx(_s.div,{className:"relative z-40 hidden shrink-0 lg:block",initial:{width:0,opacity:0},animate:{width:m?208:64,opacity:1},exit:{width:0,opacity:0},transition:{type:"spring",stiffness:320,damping:36,mass:.7,opacity:{duration:.2}},style:{overflow:"hidden"},children:y.jsx(eb,{sidebarOpen:m,mobileMenuOpen:b,tooltipsEnabled:w,onMobileMenuClose:()=>v(!1)})},"settings-sidebar")}),!h&&y.jsx("div",{className:"lg:hidden",children:y.jsx(eb,{sidebarOpen:m,mobileMenuOpen:b,tooltipsEnabled:w,onMobileMenuClose:()=>v(!1)})}),y.jsx(rf,{children:!h&&b&&y.jsx(_s.div,{"aria-hidden":"true",className:"fixed inset-0 z-40 bg-black/50 lg:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},onClick:()=>v(!1)})}),y.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[y.jsx(Uj,{}),y.jsx(XO,{sidebarOpen:m,mobileMenuOpen:b,searchOpen:x,actualTheme:z,onSidebarToggle:()=>g(!m),onMobileMenuToggle:()=>v(!b),onSearchOpenChange:D,onThemeChange:M,workspaceMode:d}),y.jsx("main",{id:"main-content",tabIndex:-1,className:K("relative isolate flex-1 overflow-hidden outline-none",h?"bg-transparent":j.type==="none"?"bg-background":"bg-transparent"),children:y.jsx(rf,{mode:"wait",initial:!1,children:y.jsx(_s.div,{className:"relative z-10 h-full min-w-0",initial:{opacity:0,x:h?32:-32,filter:"blur(6px)"},animate:{opacity:1,x:0,filter:"blur(0px)"},exit:{opacity:0,x:h?-32:32,filter:"blur(6px)"},transition:{type:"spring",stiffness:320,damping:34,mass:.7,opacity:{duration:.18},filter:{duration:.22}},children:n},d)})}),!h&&y.jsx(Bj,{})]})]})]})]})}const eo=gw({component:()=>y.jsxs(y.Fragment,{children:[y.jsx(tb,{}),!1]}),beforeLoad:()=>{if(window.location.pathname==="/"&&!qj())throw vw({to:"/auth"})}}),JO=Te({getParentRoute:()=>eo,path:"/auth",component:De(()=>Ae(()=>import("./auth-D_7LuZ3W.js"),__vite__mapDeps([0,1,2,3,4,5,6])),"AuthPage")}),eL=Te({getParentRoute:()=>eo,path:"/setup",component:De(()=>Ae(()=>import("./index-x_t_kdGn.js"),__vite__mapDeps([7,1,8,5,9,3,10,11,12,13,4,6])),"SetupPage")}),Re=Te({getParentRoute:()=>eo,id:"protected",component:()=>y.jsx(WO,{children:y.jsx(tb,{})}),errorComponent:({error:n})=>y.jsx(a0,{error:n})}),tL=Te({getParentRoute:()=>Re,path:"/",component:De(()=>Ae(()=>import("./index-C5U4NsIF.js"),__vite__mapDeps([14,1,6,15,8,5,16,17,12,13,3,18,19,9,20,4])),"IndexPage")}),nL=Te({getParentRoute:()=>Re,path:"/config/bot",component:De(()=>Ae(()=>import("./bot-zehsWfTg.js"),__vite__mapDeps([21,1,22,23,24,17,6,9,5,3,11,25,26,10,27,28,12,8,13,4])),"BotConfigPage")}),aL=Te({getParentRoute:()=>Re,path:"/config/modelProvider",component:De(()=>Ae(()=>import("./index-V_LLuoFO.js"),__vite__mapDeps([29,1,30,4,5,6,3,28,9,17,19,31,12,8,13])),"ModelProviderConfigPage")}),iL=Te({getParentRoute:()=>Re,path:"/config/model",component:De(()=>Ae(()=>import("./model-Bpgh3xA9.js"),__vite__mapDeps([32,1,9,5,3,30,4,6,28,17,19,31,10,27,12,8,13,26,11,25,33,34])),"ModelConfigPage")}),sL=Te({getParentRoute:()=>Re,path:"/config/prompts",component:De(()=>Ae(()=>import("./prompts-Ck1GtTX1.js"),__vite__mapDeps([35,1,23,17,6,9,5,3,25,4])),"PromptManagementPage")}),oL=Te({getParentRoute:()=>Re,path:"/config/adapter",component:De(()=>Ae(()=>import("./adapter-disabled-CLDOktNC.js"),__vite__mapDeps([36,1,3,4,5,6])),"AdapterConfigPage")}),rL=Te({getParentRoute:()=>Re,path:"/resource/emoji",component:De(()=>Ae(()=>import("./index-Bsbt9db6.js"),__vite__mapDeps([37,1,9,5,3,38,16,6,17,19,39,40,41,11,15,4,42])),"EmojiManagementPage")}),lL=Te({getParentRoute:()=>Re,path:"/resource/expression",component:De(()=>Ae(()=>import("./index-DYRlR_zV.js"),__vite__mapDeps([43,1,18,17,6,19,5,3,9,20,10,31,4])),"ExpressionManagementPage")}),cL=Te({getParentRoute:()=>Re,path:"/resource/person",component:De(()=>Ae(()=>import("./person-DaV3zh8d.js"),__vite__mapDeps([44,1,19,5,3,9,10,31,11,4,6])),"PersonManagementPage")}),uL=Te({getParentRoute:()=>Re,path:"/resource/jargon",component:De(()=>Ae(()=>import("./index-P80u2Mbr.js"),__vite__mapDeps([45,1,9,5,3,17,6,39,40,41,10,11,19,31,4])),"JargonManagementPage")}),fL=Te({getParentRoute:()=>Re,path:"/resource/knowledge-graph",component:De(()=>Ae(()=>import("./index-DIOXYKVA.js").then(n=>n.V),__vite__mapDeps([46,1,17,6,3,9,5,19,47,16,38,48])),"KnowledgeGraphPage")}),dL=Te({getParentRoute:()=>Re,path:"/resource/knowledge-base",component:De(()=>Ae(()=>import("./knowledge-base-Du35OURl.js"),__vite__mapDeps([49,1,23,46,17,6,3,9,5,19,47,16,38,48,31,11,50,8,4])),"KnowledgeBasePage")}),hL=Te({getParentRoute:()=>Re,path:"/logs",component:De(()=>Ae(()=>import("./logs-bFuaYf8z.js"),__vite__mapDeps([51,1,9,5,3,27,4,6,28,52,50])),"LogViewerPage")}),mL=Te({getParentRoute:()=>Re,path:"/reasoning-process",component:De(()=>Ae(()=>import("./reasoning-process-CrCr8cDD.js"),__vite__mapDeps([53,1,17,6,9,5,3,4])),"ReasoningProcessPage")}),pL=Te({getParentRoute:()=>Re,path:"/planner-monitor",component:De(()=>Ae(()=>import("./index-B_FHivTS.js"),__vite__mapDeps([54,1,17,6,25,5,50,3,4])),"PlannerMonitorPage")}),gL=Te({getParentRoute:()=>Re,path:"/chat",component:De(()=>Ae(()=>import("./index-BnkN5WGH.js"),__vite__mapDeps([55,1,50,11,3,5,9,4,6])),"ChatPage")}),yL=Te({getParentRoute:()=>Re,path:"/plugins",component:De(()=>Ae(()=>import("./index-BpTcuomx.js"),__vite__mapDeps([56,1,17,6,19,5,3,8,9,12,13,57,50,58,4])),"PluginsPage")}),vL=Te({getParentRoute:()=>Re,path:"/plugin-detail",component:De(()=>Ae(()=>import("./plugin-detail-C98YfI36.js"),__vite__mapDeps([59,1,17,6,57,50,58,39,40,41,11,3,4,5])),"PluginDetailPage")}),bL=Te({getParentRoute:()=>Re,path:"/model-presets",component:De(()=>Ae(()=>import("./model-presets-C1oJlh_V.js"),__vite__mapDeps([60,1,3,4,5,6])),"ModelPresetsPage")}),SL=Te({getParentRoute:()=>Re,path:"/plugin-config",component:De(()=>Ae(()=>import("./plugin-config-Gj4DzZjP.js"),__vite__mapDeps([61,1,10,5,27,11,17,6,34,9,3,23,22,12,8,13,58,4])),"PluginConfigPage")}),xL=Te({getParentRoute:()=>Re,path:"/plugin-mirrors",component:De(()=>Ae(()=>import("./plugin-mirrors-Chrh5WMR.js"),__vite__mapDeps([62,1,17,6,10,5,31,3,4])),"PluginMirrorsPage")}),TL=Te({getParentRoute:()=>Re,path:"/mcp-settings",component:De(()=>Ae(()=>import("./mcp-settings-6oaCtDHj.js"),__vite__mapDeps([63,1,17,6,26,11,10,5,9,3,24,25,27,28,12,8,13,4])),"MCPSettingsPage")}),wL=Te({getParentRoute:()=>Re,path:"/settings",component:De(()=>Ae(()=>import("./index-5HyjKTOp.js"),__vite__mapDeps([64,1,2,10,5,27,65,3,23,9,19,13,50,52,4,6])),"SettingsPage")}),CL=Te({getParentRoute:()=>Re,path:"/config/pack-market",component:De(()=>Ae(()=>import("./pack-market-BOV814Tz.js"),__vite__mapDeps([66,1,17,6,20,3,15,33,4,5])))}),DL=Te({getParentRoute:()=>Re,path:"/config/pack-market/$packId",component:De(()=>Ae(()=>import("./pack-detail-BOBdaAtu.js"),__vite__mapDeps([67,1,17,6,19,5,3,68,9,15,65,31,25,33,4])))}),AL=Te({getParentRoute:()=>Re,path:"/survey/webui-feedback",component:De(()=>Ae(()=>import("./webui-feedback-D6Zzxnbw.js"),__vite__mapDeps([69,1,70,8,5,11,68,3,19,27,9,4,6])),"WebUIFeedbackSurveyPage")}),EL=Te({getParentRoute:()=>Re,path:"/survey/maibot-feedback",component:De(()=>Ae(()=>import("./maibot-feedback-BNwa_tM0.js"),__vite__mapDeps([71,1,70,8,5,11,68,3,19,27,9,13,4,6])),"MaiBotFeedbackSurveyPage")}),ML=Te({getParentRoute:()=>eo,path:"*",component:c0}),Px=eo.addChildren([JO,eL,Re.addChildren([tL,nL,aL,iL,sL,oL,rL,lL,uL,cL,fL,dL,yL,vL,bL,SL,xL,TL,hL,mL,pL,gL,wL,CL,DL,AL,EL]),ML]);function _x(n){const a=n.fullPath?[n.fullPath]:[],s=n.children?.flatMap(_x)??[];return[...a,...s]}const kL=new Set(_x(Px)),NL=yw({routeTree:Px,defaultNotFoundComponent:c0,defaultErrorComponent:({error:n})=>y.jsx(a0,{error:n})});function RL(){const[n,a]=T.useState(!1);return T.useEffect(()=>{window.electronAPI.isFirstLaunch().then(a)},[]),y.jsx(hM,{open:n})}YC.createRoot(document.getElementById("root")).render(y.jsx(T.StrictMode,{children:y.jsx(lM,{children:y.jsx(sE,{children:y.jsx(xE,{children:y.jsx(ZE,{defaultTheme:"system",children:y.jsx(CE,{children:y.jsxs(WE,{children:[Je()&&y.jsx(RL,{}),y.jsx(bw,{router:NL}),y.jsx(nM,{}),y.jsx(CM,{})]})})})})})})}));export{JE as $,Jj as A,He as B,ad as C,Zf as D,bM as E,UO as F,VO as G,zx as H,Mi as I,Bx as J,QO as K,Is as L,QL as M,ZL as N,Ux as O,$f as P,Vx as Q,KO as R,Fs as S,qO as T,t3 as U,WL as V,rO as W,e0 as X,t0 as Y,$L as Z,JL as _,$S as a,n3 as a0,e3 as a1,i3 as a2,nO as a3,vM as a4,Gd as a5,sM as a6,Pj as a7,_j as a8,Hj as a9,Dy as aA,PL as aB,_L as aC,wE as aD,IL as aE,Ae as aF,DL as aG,ZS as aa,a3 as ab,lO as ac,ux as ad,js as ae,Ey as af,My as ag,ky as ah,Je as ai,Pd as aj,nd as ak,GL as al,dE as am,aM as an,fO as ao,BE as ap,ME as aq,TE as ar,SE as as,UL as at,Qb as au,VL as av,Yb as aw,wy as ax,QE as ay,HL as az,id as b,WS as c,sd as d,od as e,rd as f,K as g,YL as h,ol as i,rl as j,ll as k,aO as l,KL as m,tx as n,nx as o,Yt as p,ix as q,sx as r,ax as s,rx as t,Nn as u,ox as v,s3 as w,Kt as x,qL as y,XL as z};
|