diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/api.ts b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/api.ts index f2b99ecc..c336b1a1 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/api.ts +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/api.ts @@ -619,6 +619,12 @@ export function pullPlanStepDispatchPolicy(): Promise { + return apiFetch<{ ok: boolean; skipped?: boolean; error?: string | null }>('/api/skill/policies/pull', { + method: 'POST', + }); +} + export function getPlanSteps(params: Record = {}): Promise> { const query = new URLSearchParams(); Object.entries(params).forEach(([key, value]) => { diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/consoleDataAdapter.ts b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/consoleDataAdapter.ts index d6157860..5e172dc9 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/consoleDataAdapter.ts +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/consoleDataAdapter.ts @@ -78,6 +78,9 @@ export interface SkillSummary { allowTools?: string[]; denyTools?: string[]; governancePolicy?: 'allow' | 'deny' | 'open' | 'disabled' | null; + policySource?: 'remote' | 'local' | 'open' | null; + remotePolicy?: Record | null; + localPolicy?: Record | null; recentCalls?: Array<{ eventId: string; message: string; @@ -496,6 +499,9 @@ export function adaptSkillSummaries(skillsData: Obj[] | null): SkillSummary[] { allowTools: stringList(s.allow_tools ?? governance?.server_allow_tools ?? governance?.global_allow_tools), denyTools: stringList(s.deny_tools ?? governance?.server_deny_tools ?? governance?.global_deny_tools), governancePolicy: governancePolicy(s.governance_policy ?? governance?.effective_policy), + policySource: policySource(s.policy_source), + remotePolicy: obj(s.remote_policy), + localPolicy: obj(s.local_policy), recentCalls: arr(s.recent_calls).map((call) => { const c = obj(call) ?? {}; return { @@ -533,6 +539,12 @@ function governancePolicy(value: unknown): SkillSummary['governancePolicy'] { : null; } +function policySource(value: unknown): SkillSummary['policySource'] { + return value === 'remote' || value === 'local' || value === 'open' + ? value + : null; +} + export function adaptJournalEntries(storeData: Obj | null): JournalEntry[] { if (!storeData) return []; const tables = (storeData.tables ?? {}) as Obj; diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/qimingclawAdapter.ts b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/qimingclawAdapter.ts index 3559ccdd..ef5418b1 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/qimingclawAdapter.ts +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/qimingclawAdapter.ts @@ -54,6 +54,7 @@ declare global { getUiState?: () => Promise; getSkillCapabilities?: () => Promise; setSkillEnabled?: (skillId: string, enabled: boolean) => Promise<{ ok?: boolean; skill_id?: string; enabled?: boolean; error?: string }>; + pullSkillPolicies?: () => Promise<{ ok?: boolean; skipped?: boolean; error?: string | null }>; getPlanTemplates?: () => Promise; listMemories?: (options?: { query?: string; category?: string; limit?: number }) => Promise; addMemory?: (input: QimingclawMemoryUpsertInput) => Promise; @@ -975,6 +976,9 @@ export async function handleQimingclawDigitalApi( if (method === 'GET' && pathname === '/api/skill') { return { skills: await buildSkills() } as T; } + if (method === 'POST' && pathname === '/api/skill/policies/pull') { + return await pullBridgeSkillPolicies() as T; + } if (method === 'POST' && pathname.startsWith('/api/skill/') && pathname.endsWith('/enabled')) { const skillId = decodeURIComponent(pathname.split('/')[3] || ''); const body = parseJsonBody<{ enabled?: boolean }>(options.body); @@ -1093,6 +1097,23 @@ async function setBridgeSkillEnabled( } } +async function pullBridgeSkillPolicies(): Promise<{ ok: boolean; skipped?: boolean; error?: string | null }> { + const bridge = window.QimingClawBridge?.digital; + if (!bridge?.pullSkillPolicies) { + return { ok: false, error: 'qimingclaw_bridge_unavailable' }; + } + try { + const result = await bridge.pullSkillPolicies(); + return { + ok: result?.ok !== false, + ...(result?.skipped ? { skipped: true } : {}), + ...(result?.error ? { error: result.error } : {}), + }; + } catch (error) { + return { ok: false, error: error instanceof Error ? error.message : String(error) }; + } +} + function dedupeSkills(skills: SkillSpec[]): SkillSpec[] { const seen = new Set(); const result: SkillSpec[] = []; diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/pages/digital/SkillLibrary.tsx b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/pages/digital/SkillLibrary.tsx index 9bf0d644..de0ac8be 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/pages/digital/SkillLibrary.tsx +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/pages/digital/SkillLibrary.tsx @@ -2,7 +2,7 @@ import { useState, useEffect, useCallback, useRef } from 'react'; import GlassCard from '@/components/digital/GlassCard'; import CardTitleBar from '@/components/digital/CardTitleBar'; import { adaptSkillSummaries, type SkillSummary } from '@/lib/consoleDataAdapter'; -import { getSkills, setSkillEnabled } from '@/lib/api'; +import { getSkills, pullSkillPolicies, setSkillEnabled } from '@/lib/api'; import { domSafeId } from './navigation'; type TaskCadence = 'daily' | 'weekly' | 'monthly' | 'adhoc'; @@ -81,6 +81,8 @@ function skillMetaBadges(skill: SkillSummary): string[] { const badges: string[] = []; if (skill.serverId) badges.push(skill.serverId); if (skill.running !== null && skill.running !== undefined) badges.push(skill.running ? '运行中' : '未运行'); + if (skill.policySource === 'remote') badges.push('远端策略'); + if (skill.remotePolicy && skill.remotePolicy.enabled === false) badges.push('管理端禁用'); if (skill.governancePolicy) badges.push(policyLabels[skill.governancePolicy]); if (typeof skill.toolCount === 'number') badges.push(`${skill.toolCount} 工具`); if (skill.allowTools?.length) badges.push(`allow ${skill.allowTools.length}`); @@ -174,7 +176,9 @@ export default function SkillLibrary({ focusSkillId }: { focusSkillId?: string | const [cadenceFilter, setCadenceFilter] = useState<'all' | TaskCadence>('all'); const [selectedSkillId, setSelectedSkillId] = useState(focusSkillId ?? null); const [updatingSkillId, setUpdatingSkillId] = useState(null); + const [pullingPolicies, setPullingPolicies] = useState(false); const [actionError, setActionError] = useState(null); + const [actionNotice, setActionNotice] = useState(null); const mountedRef = useRef(false); useEffect(() => { @@ -217,6 +221,7 @@ export default function SkillLibrary({ focusSkillId }: { focusSkillId?: string | const nextEnabled = !skill.enabled; setUpdatingSkillId(skill.id); setActionError(null); + setActionNotice(null); try { const result = await setSkillEnabled(skill.id, nextEnabled); if (!result.ok) { @@ -233,6 +238,22 @@ export default function SkillLibrary({ focusSkillId }: { focusSkillId?: string | } }, []); + const pullPolicies = useCallback(async () => { + setPullingPolicies(true); + setActionError(null); + setActionNotice(null); + try { + const result = await pullSkillPolicies(); + if (!result.ok) throw new Error(result.error || '技能策略拉取失败'); + await fetchSkills(); + setActionNotice(result.skipped ? '技能策略无需重复拉取。' : '技能策略已更新。'); + } catch (err) { + setActionError(err instanceof Error ? err.message : '技能策略拉取失败'); + } finally { + setPullingPolicies(false); + } + }, [fetchSkills]); + const filtered = skills .filter(s => cadenceFilter === 'all' || getCadence(s) === cadenceFilter) .filter(s => { @@ -322,6 +343,9 @@ export default function SkillLibrary({ focusSkillId }: { focusSkillId?: string |
+
@@ -330,6 +354,11 @@ export default function SkillLibrary({ focusSkillId }: { focusSkillId?: string | {actionError}
)} + {actionNotice && ( +
+ {actionNotice} +
+ )}
setSearch(e.target.value)} />
diff --git a/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-1hmQ8OoX.js b/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-1hmQ8OoX.js new file mode 100644 index 00000000..a0eafee4 --- /dev/null +++ b/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-1hmQ8OoX.js @@ -0,0 +1,184 @@ +(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function i(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(c){if(c.ep)return;c.ep=!0;const d=i(c);fetch(c.href,d)}})();function l0(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Qd={exports:{}},sr={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Mh;function i0(){if(Mh)return sr;Mh=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(r,c,d){var p=null;if(d!==void 0&&(p=""+d),c.key!==void 0&&(p=""+c.key),"key"in c){d={};for(var y in c)y!=="key"&&(d[y]=c[y])}else d=c;return c=d.ref,{$$typeof:n,type:r,key:p,ref:c!==void 0?c:null,props:d}}return sr.Fragment=a,sr.jsx=i,sr.jsxs=i,sr}var zh;function s0(){return zh||(zh=1,Qd.exports=i0()),Qd.exports}var o=s0(),Vd={exports:{}},Ae={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Oh;function r0(){if(Oh)return Ae;Oh=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),p=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),j=Symbol.iterator;function D(C){return C===null||typeof C!="object"?null:(C=j&&C[j]||C["@@iterator"],typeof C=="function"?C:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,N={};function $(C,G,ee){this.props=C,this.context=G,this.refs=N,this.updater=ee||w}$.prototype.isReactComponent={},$.prototype.setState=function(C,G){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,G,"setState")},$.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function V(){}V.prototype=$.prototype;function Y(C,G,ee){this.props=C,this.context=G,this.refs=N,this.updater=ee||w}var te=Y.prototype=new V;te.constructor=Y,R(te,$.prototype),te.isPureReactComponent=!0;var ae=Array.isArray;function ue(){}var F={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function ie(C,G,ee){var ne=ee.ref;return{$$typeof:n,type:C,key:G,ref:ne!==void 0?ne:null,props:ee}}function M(C,G){return ie(C.type,G,C.props)}function le(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function Te(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(ee){return G[ee]})}var J=/\/+/g;function pe(C,G){return typeof C=="object"&&C!==null&&C.key!=null?Te(""+C.key):G.toString(36)}function re(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(ue,ue):(C.status="pending",C.then(function(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function q(C,G,ee,ne,_e){var je=typeof C;(je==="undefined"||je==="boolean")&&(C=null);var X=!1;if(C===null)X=!0;else switch(je){case"bigint":case"string":case"number":X=!0;break;case"object":switch(C.$$typeof){case n:case a:X=!0;break;case S:return X=C._init,q(X(C._payload),G,ee,ne,_e)}}if(X)return _e=_e(C),X=ne===""?"."+pe(C,0):ne,ae(_e)?(ee="",X!=null&&(ee=X.replace(J,"$&/")+"/"),q(_e,G,ee,"",function(Ue){return Ue})):_e!=null&&(le(_e)&&(_e=M(_e,ee+(_e.key==null||C&&C.key===_e.key?"":(""+_e.key).replace(J,"$&/")+"/")+X)),G.push(_e)),1;X=0;var de=ne===""?".":ne+":";if(ae(C))for(var Be=0;Be>>1,Z=q[xe];if(0>>1;xec(ee,ce))nec(_e,ee)?(q[xe]=_e,q[ne]=ce,xe=ne):(q[xe]=ee,q[G]=ce,xe=G);else if(nec(_e,ce))q[xe]=_e,q[ne]=ce,xe=ne;else break e}}return Q}function c(q,Q){var ce=q.sortIndex-Q.sortIndex;return ce!==0?ce:q.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var p=Date,y=p.now();n.unstable_now=function(){return p.now()-y}}var _=[],g=[],S=1,x=null,j=3,D=!1,w=!1,R=!1,N=!1,$=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function te(q){for(var Q=i(g);Q!==null;){if(Q.callback===null)r(g);else if(Q.startTime<=q)r(g),Q.sortIndex=Q.expirationTime,a(_,Q);else break;Q=i(g)}}function ae(q){if(R=!1,te(q),!w)if(i(_)!==null)w=!0,ue||(ue=!0,Te());else{var Q=i(g);Q!==null&&re(ae,Q.startTime-q)}}var ue=!1,F=-1,P=5,ie=-1;function M(){return N?!0:!(n.unstable_now()-ieq&&M());){var xe=x.callback;if(typeof xe=="function"){x.callback=null,j=x.priorityLevel;var Z=xe(x.expirationTime<=q);if(q=n.unstable_now(),typeof Z=="function"){x.callback=Z,te(q),Q=!0;break t}x===i(_)&&r(_),te(q)}else r(_);x=i(_)}if(x!==null)Q=!0;else{var C=i(g);C!==null&&re(ae,C.startTime-q),Q=!1}}break e}finally{x=null,j=ce,D=!1}Q=void 0}}finally{Q?Te():ue=!1}}}var Te;if(typeof Y=="function")Te=function(){Y(le)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,pe=J.port2;J.port1.onmessage=le,Te=function(){pe.postMessage(null)}}else Te=function(){$(le,0)};function re(q,Q){F=$(function(){q(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(q){q.callback=null},n.unstable_forceFrameRate=function(q){0>q||125xe?(q.sortIndex=ce,a(g,q),i(_)===null&&q===i(g)&&(R?(V(F),F=-1):R=!0,re(ae,ce-xe))):(q.sortIndex=Z,a(_,q),w||D||(w=!0,ue||(ue=!0,Te()))),q},n.unstable_shouldYield=M,n.unstable_wrapCallback=function(q){var Q=j;return function(){var ce=j;j=Q;try{return q.apply(this,arguments)}finally{j=ce}}}})(Jd)),Jd}var Bh;function u0(){return Bh||(Bh=1,Zd.exports=o0()),Zd.exports}var Fd={exports:{}},Gt={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Uh;function d0(){if(Uh)return Gt;Uh=1;var n=zf();function a(_){var g="https://react.dev/errors/"+_;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Fd.exports=d0(),Fd.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Gh;function m0(){if(Gh)return rr;Gh=1;var n=u0(),a=zf(),i=f0();function r(e){var t="https://react.dev/errors/"+e;if(1Z||(e.current=xe[Z],xe[Z]=null,Z--)}function ee(e,t){Z++,xe[Z]=e.current,e.current=t}var ne=C(null),_e=C(null),je=C(null),X=C(null);function de(e,t){switch(ee(je,t),ee(_e,e),ee(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ah(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ah(t),e=lh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(ne),ee(ne,e)}function Be(){G(ne),G(_e),G(je)}function Ue(e){e.memoizedState!==null&&ee(X,e);var t=ne.current,l=lh(t,e.type);t!==l&&(ee(_e,e),ee(ne,l))}function Ot(e){_e.current===e&&(G(ne),G(_e)),X.current===e&&(G(X),nr._currentValue=ce)}var qt,He;function Le(e){if(qt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);qt=t&&t[1]||"",He=-1)":-1u||A[s]!==O[u]){var H=` +`+A[s].replace(" at new "," at ");return e.displayName&&H.includes("")&&(H=H.replace("",e.displayName)),H}while(1<=s&&0<=u);break}}}finally{xt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Le(l):""}function ii(e,t){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le("Lazy");case 13:return e.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return aa(e.type,!1);case 11:return aa(e.type.render,!1);case 1:return aa(e.type,!0);case 31:return Le("Activity");default:return""}}function ds(e){try{var t="",l=null;do t+=ii(e,l),l=e,e=e.return;while(e);return t}catch(s){return` +Error generating stack: `+s.message+` +`+s.stack}}var bl=Object.prototype.hasOwnProperty,si=n.unstable_scheduleCallback,Oa=n.unstable_cancelCallback,Sl=n.unstable_shouldYield,ri=n.unstable_requestPaint,Nt=n.unstable_now,vn=n.unstable_getCurrentPriorityLevel,la=n.unstable_ImmediatePriority,ia=n.unstable_UserBlockingPriority,xl=n.unstable_NormalPriority,Ho=n.unstable_LowPriority,ci=n.unstable_IdlePriority,Go=n.log,Yo=n.unstable_setDisableYieldValue,kt=null,Lt=null;function me(e){if(typeof Go=="function"&&Yo(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(kt,e)}catch{}}var jt=Math.clz32?Math.clz32:oi,ht=Math.log,rn=Math.LN2;function oi(e){return e>>>=0,e===0?32:31-(ht(e)/rn|0)|0}var Wt=256,At=262144,sa=4194304;function Yt(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 Vn(e,t,l){var s=e.pendingLanes;if(s===0)return 0;var u=0,f=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~f,s!==0?u=Yt(s):(h&=b,h!==0?u=Yt(h):l||(l=b&~e,l!==0&&(u=Yt(l))))):(b=s&~f,b!==0?u=Yt(b):h!==0?u=Yt(h):l||(l=s&~e,l!==0&&(u=Yt(l)))),u===0?0:t!==0&&t!==u&&(t&f)===0&&(f=u&-u,l=t&-t,f>=l||f===32&&(l&4194048)!==0)?t:u}function ra(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function It(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 Dr(){var e=sa;return sa<<=1,(sa&62914560)===0&&(sa=4194304),e}function ui(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function bn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Io(e,t,l,s,u,f){var h=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var b=e.entanglements,A=e.expirationTimes,O=e.hiddenUpdates;for(l=h&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var qr=/[\n"\\]/g;function Jt(e){return e.replace(qr,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function hs(e,t,l,s,u,f,h,b){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?ys(e,h,Zt(t)):l!=null?ys(e,h,Zt(l)):s!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Zt(b):e.removeAttribute("name")}function gs(e,t,l,s,u,f,h,b){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||l!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){jl(e);return}l=l!=null?""+Zt(l):"",t=t!=null?""+Zt(t):l,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),jl(e)}function ys(e,t,l){t==="number"&&La(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ua(e,t,l,s){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yi=!1;if(On)try{var El={};Object.defineProperty(El,"passive",{get:function(){yi=!0}}),window.addEventListener("test",El,El),window.removeEventListener("test",El,El)}catch{yi=!1}var kn=null,da=null,Ha=null;function Ga(){if(Ha)return Ha;var e,t=da,l=t.length,s,u="value"in kn?kn.value:kn.textContent,f=u.length;for(e=0;e=ks),um=" ",dm=!1;function fm(e,t){switch(e){case"keyup":return Av.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xi=!1;function Ev(e,t){switch(e){case"compositionend":return mm(t);case"keypress":return t.which!==32?null:(dm=!0,um);case"textInput":return e=t.data,e===um&&dm?null:e;default:return null}}function Nv(e,t){if(xi)return e==="compositionend"||!Po&&fm(e,t)?(e=Ga(),Ha=da=kn=null,xi=!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)return{node:l,offset:t-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Sm(l)}}function km(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?km(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=La(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=La(e.document)}return t}function tu(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 qv=On&&"documentMode"in document&&11>=document.documentMode,ki=null,nu=null,Cs=null,au=!1;function wm(e,t,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;au||ki==null||ki!==La(s)||(s=ki,"selectionStart"in s&&tu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Cs&&As(Cs,s)||(Cs=s,s=Uc(nu,"onSelect"),0>=h,u-=h,Jn=1<<32-jt(t)+u|l<Ne?(Me=fe,fe=null):Me=fe.sibling;var Ye=L(T,fe,z[Ne],I);if(Ye===null){fe===null&&(fe=Me);break}e&&fe&&Ye.alternate===null&&t(T,fe),E=f(Ye,E,Ne),Ge===null?ye=Ye:Ge.sibling=Ye,Ge=Ye,fe=Me}if(Ne===z.length)return l(T,fe),Oe&&_a(T,Ne),ye;if(fe===null){for(;NeNe?(Me=fe,fe=null):Me=fe.sibling;var fl=L(T,fe,Ye.value,I);if(fl===null){fe===null&&(fe=Me);break}e&&fe&&fl.alternate===null&&t(T,fe),E=f(fl,E,Ne),Ge===null?ye=fl:Ge.sibling=fl,Ge=fl,fe=Me}if(Ye.done)return l(T,fe),Oe&&_a(T,Ne),ye;if(fe===null){for(;!Ye.done;Ne++,Ye=z.next())Ye=K(T,Ye.value,I),Ye!==null&&(E=f(Ye,E,Ne),Ge===null?ye=Ye:Ge.sibling=Ye,Ge=Ye);return Oe&&_a(T,Ne),ye}for(fe=s(fe);!Ye.done;Ne++,Ye=z.next())Ye=B(fe,T,Ne,Ye.value,I),Ye!==null&&(e&&Ye.alternate!==null&&fe.delete(Ye.key===null?Ne:Ye.key),E=f(Ye,E,Ne),Ge===null?ye=Ye:Ge.sibling=Ye,Ge=Ye);return e&&fe.forEach(function(a0){return t(T,a0)}),Oe&&_a(T,Ne),ye}function Fe(T,E,z,I){if(typeof z=="object"&&z!==null&&z.type===R&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case D:e:{for(var ye=z.key;E!==null;){if(E.key===ye){if(ye=z.type,ye===R){if(E.tag===7){l(T,E.sibling),I=u(E,z.props.children),I.return=T,T=I;break e}}else if(E.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===P&&Bl(ye)===E.type){l(T,E.sibling),I=u(E,z.props),$s(I,z),I.return=T,T=I;break e}l(T,E);break}else t(T,E);E=E.sibling}z.type===R?(I=Ml(z.props.children,T.mode,I,z.key),I.return=T,T=I):(I=ac(z.type,z.key,z.props,null,T.mode,I),$s(I,z),I.return=T,T=I)}return h(T);case w:e:{for(ye=z.key;E!==null;){if(E.key===ye)if(E.tag===4&&E.stateNode.containerInfo===z.containerInfo&&E.stateNode.implementation===z.implementation){l(T,E.sibling),I=u(E,z.children||[]),I.return=T,T=I;break e}else{l(T,E);break}else t(T,E);E=E.sibling}I=uu(z,T.mode,I),I.return=T,T=I}return h(T);case P:return z=Bl(z),Fe(T,E,z,I)}if(re(z))return oe(T,E,z,I);if(Te(z)){if(ye=Te(z),typeof ye!="function")throw Error(r(150));return z=ye.call(z),Se(T,E,z,I)}if(typeof z.then=="function")return Fe(T,E,uc(z),I);if(z.$$typeof===Y)return Fe(T,E,sc(T,z),I);dc(T,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,E!==null&&E.tag===6?(l(T,E.sibling),I=u(E,z),I.return=T,T=I):(l(T,E),I=ou(z,T.mode,I),I.return=T,T=I),h(T)):l(T,E)}return function(T,E,z,I){try{Rs=0;var ye=Fe(T,E,z,I);return Mi=null,ye}catch(fe){if(fe===$i||fe===cc)throw fe;var Ge=dn(29,fe,null,T.mode);return Ge.lanes=I,Ge.return=T,Ge}finally{}}}var Hl=Xm(!0),Zm=Xm(!1),Za=!1;function xu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(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 Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ie&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=nc(e),Rm(e,null,l),t}return tc(e,s,t,l),nc(e)}function Ms(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Rr(e,l)}}function ju(e,t){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var u=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var h={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};f===null?u=f=h:f=f.next=h,l=l.next}while(l!==null);f===null?u=f=t:f=f.next=t}else u=f=t;l={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var wu=!1;function zs(){if(wu){var e=Ri;if(e!==null)throw e}}function Os(e,t,l,s){wu=!1;var u=e.updateQueue;Za=!1;var f=u.firstBaseUpdate,h=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var A=b,O=A.next;A.next=null,h===null?f=O:h.next=O,h=A;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==h&&(b===null?H.firstBaseUpdate=O:b.next=O,H.lastBaseUpdate=A))}if(f!==null){var K=u.baseState;h=0,H=O=A=null,b=f;do{var L=b.lane&-536870913,B=L!==b.lane;if(B?($e&L)===L:(s&L)===L){L!==0&&L===Di&&(wu=!0),H!==null&&(H=H.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var oe=e,Se=b;L=t;var Fe=l;switch(Se.tag){case 1:if(oe=Se.payload,typeof oe=="function"){K=oe.call(Fe,K,L);break e}K=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=Se.payload,L=typeof oe=="function"?oe.call(Fe,K,L):oe,L==null)break e;K=x({},K,L);break e;case 2:Za=!0}}L=b.callback,L!==null&&(e.flags|=64,B&&(e.flags|=8192),B=u.callbacks,B===null?u.callbacks=[L]:B.push(L))}else B={lane:L,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(O=H=B,A=K):H=H.next=B,h|=L;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;B=b,b=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);H===null&&(A=K),u.baseState=A,u.firstBaseUpdate=O,u.lastBaseUpdate=H,f===null&&(u.shared.lanes=0),nl|=h,e.lanes=h,e.memoizedState=K}}function Jm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Fm(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;ef?f:8;var h=q.T,b={};q.T=b,Iu(e,!1,t,l);try{var A=u(),O=q.S;if(O!==null&&O(b,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var H=Qv(A,s);Bs(e,t,H,hn(e))}else Bs(e,t,s,hn(e))}catch(K){Bs(e,t,{then:function(){},status:"rejected",reason:K},hn())}finally{Q.p=f,h!==null&&b.types!==null&&(h.types=b.types),q.T=h}}function Pv(){}function Gu(e,t,l,s){if(e.tag!==5)throw Error(r(476));var u=Np(e).queue;Ep(e,u,t,ce,l===null?Pv:function(){return Tp(e),l(s)})}function Np(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:ce},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Tp(e){var t=Np(e);t.next===null&&(t=e.alternate.memoizedState),Bs(e,t.next.queue,{},hn())}function Yu(){return Dt(nr)}function Dp(){return pt().memoizedState}function Rp(){return pt().memoizedState}function Wv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=hn();e=Ja(l);var s=Fa(t,e,l);s!==null&&(ln(s,t,l),Ms(s,t,l)),t={cache:yu()},e.payload=t;return}t=t.return}}function eb(e,t,l){var s=hn();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Sc(e)?Mp(t,l):(l=ru(e,t,l,s),l!==null&&(ln(l,e,s),zp(l,t,s)))}function $p(e,t,l){var s=hn();Bs(e,t,l,s)}function Bs(e,t,l,s){var u={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Sc(e))Mp(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var h=t.lastRenderedState,b=f(h,l);if(u.hasEagerState=!0,u.eagerState=b,un(b,h))return tc(e,t,u,0),Pe===null&&ec(),!1}catch{}finally{}if(l=ru(e,t,u,s),l!==null)return ln(l,e,s),zp(l,t,s),!0}return!1}function Iu(e,t,l,s){if(s={lane:2,revertLane:xd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Sc(e)){if(t)throw Error(r(479))}else t=ru(e,l,s,2),t!==null&&ln(t,e,2)}function Sc(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Mp(e,t){Oi=pc=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function zp(e,t,l){if((l&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Rr(e,l)}}var Us={readContext:Dt,use:gc,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};Us.useEffectEvent=ct;var Op={readContext:Dt,use:gc,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:vp,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,vc(4194308,4,kp.bind(null,t,e),l)},useLayoutEffect:function(e,t){return vc(4194308,4,e,t)},useInsertionEffect:function(e,t){vc(4,2,e,t)},useMemo:function(e,t){var l=Ft();t=t===void 0?null:t;var s=e();if(Gl){me(!0);try{e()}finally{me(!1)}}return l.memoizedState=[s,t],s},useReducer:function(e,t,l){var s=Ft();if(l!==void 0){var u=l(t);if(Gl){me(!0);try{l(t)}finally{me(!1)}}}else u=t;return s.memoizedState=s.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},s.queue=e,e=e.dispatch=eb.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=qu(e);var t=e.queue,l=$p.bind(null,Ee,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Uu,useDeferredValue:function(e,t){var l=Ft();return Hu(l,e,t)},useTransition:function(){var e=qu(!1);return e=Ep.bind(null,Ee,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var s=Ee,u=Ft();if(Oe){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Pe===null)throw Error(r(349));($e&127)!==0||ap(s,t,l)}u.memoizedState=l;var f={value:l,getSnapshot:t};return u.queue=f,vp(ip.bind(null,s,f,e),[e]),s.flags|=2048,Li(9,{destroy:void 0},lp.bind(null,s,f,l,t),null),l},useId:function(){var e=Ft(),t=Pe.identifierPrefix;if(Oe){var l=Fn,s=Jn;l=(s&~(1<<32-jt(s)-1)).toString(32)+l,t="_"+t+"R_"+l,l=_c++,0<\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?f.multiple=!0:s.size&&(f.size=s.size);break;default:f=typeof s.is=="string"?h.createElement(u,{is:s.is}):h.createElement(u)}}f[dt]=t,f[Kt]=s;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)f.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=f;e:switch($t(f,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Sa(t)}}return tt(t),ld(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Sa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=je.current,Ni(t)){if(e=t.stateNode,l=t.memoizedProps,s=null,u=Tt,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[dt]=t,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||th(e.nodeValue,l)),e||Va(t,!0)}else e=Hc(e).createTextNode(s),e[dt]=t,t.stateNode=e}return tt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ni(t),l!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[dt]=t}else zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;tt(t),e=!1}else l=pu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(mn(t),t):(mn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return tt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Ni(t),s!==null&&s.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[dt]=t}else zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;tt(t),u=!1}else u=pu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(mn(t),t):(mn(t),null)}return mn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=t.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==u&&(s.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ac(t,t.updateQueue),tt(t),null);case 4:return Be(),e===null&&Ad(t.stateNode.containerInfo),tt(t),null;case 10:return ga(t.type),tt(t),null;case 19:if(G(mt),s=t.memoizedState,s===null)return tt(t),null;if(u=(t.flags&128)!==0,f=s.rendering,f===null)if(u)Gs(s,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=mc(e),f!==null){for(t.flags|=128,Gs(s,!1),e=f.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)$m(l,e),l=l.sibling;return ee(mt,mt.current&1|2),Oe&&_a(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Nt()>Dc&&(t.flags|=128,u=!0,Gs(s,!1),t.lanes=4194304)}else{if(!u)if(e=mc(f),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),Gs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!f.alternate&&!Oe)return tt(t),null}else 2*Nt()-s.renderingStartTime>Dc&&l!==536870912&&(t.flags|=128,u=!0,Gs(s,!1),t.lanes=4194304);s.isBackwards?(f.sibling=t.child,t.child=f):(e=s.last,e!==null?e.sibling=f:t.child=f,s.last=f)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Nt(),e.sibling=null,l=mt.current,ee(mt,u?l&1|2:l&1),Oe&&_a(t,s.treeForkCount),e):(tt(t),null);case 22:case 23:return mn(t),Cu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(l&536870912)!==0&&(t.flags&128)===0&&(tt(t),t.subtreeFlags&6&&(t.flags|=8192)):tt(t),l=t.updateQueue,l!==null&&Ac(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==l&&(t.flags|=2048),e!==null&&G(Ll),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ga(gt),tt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function ib(e,t){switch(fu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ga(gt),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ot(t),null;case 31:if(t.memoizedState!==null){if(mn(t),t.alternate===null)throw Error(r(340));zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(mt),null;case 4:return Be(),null;case 10:return ga(t.type),null;case 22:case 23:return mn(t),Cu(),e!==null&&G(Ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ga(gt),null;case 25:return null;default:return null}}function s_(e,t){switch(fu(t),t.tag){case 3:ga(gt),Be();break;case 26:case 27:case 5:Ot(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&mn(t);break;case 13:mn(t);break;case 19:G(mt);break;case 10:ga(t.type);break;case 22:case 23:mn(t),Cu(),e!==null&&G(Ll);break;case 24:ga(gt)}}function Ys(e,t){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var u=s.next;l=u;do{if((l.tag&e)===e){s=void 0;var f=l.create,h=l.inst;s=f(),h.destroy=s}l=l.next}while(l!==u)}}catch(b){Qe(t,t.return,b)}}function el(e,t,l){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var f=u.next;s=f;do{if((s.tag&e)===e){var h=s.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,u=t;var A=l,O=b;try{O()}catch(H){Qe(u,A,H)}}}s=s.next}while(s!==f)}}catch(H){Qe(t,t.return,H)}}function r_(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Fm(t,l)}catch(s){Qe(e,e.return,s)}}}function c_(e,t,l){l.props=Yl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){Qe(e,t,s)}}function Is(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(u){Qe(e,t,u)}}function Pn(e,t){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(u){Qe(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(u){Qe(e,t,u)}else l.current=null}function o_(e){var t=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(u){Qe(e,e.return,u)}}function id(e,t,l){try{var s=e.stateNode;Cb(s,e.type,l,t),s[Kt]=t}catch(u){Qe(e,e.return,u)}}function u_(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rl(e.type)||e.tag===4}function sd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||u_(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&&rl(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 rd(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=xn));else if(s!==4&&(s===27&&rl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(rd(e,t,l),e=e.sibling;e!==null;)rd(e,t,l),e=e.sibling}function Cc(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(s!==4&&(s===27&&rl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Cc(e,t,l),e=e.sibling;e!==null;)Cc(e,t,l),e=e.sibling}function d_(e){var t=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);$t(t,s,l),t[dt]=e,t[Kt]=l}catch(f){Qe(e,e.return,f)}}var xa=!1,bt=!1,cd=!1,f_=typeof WeakSet=="function"?WeakSet:Set,Et=null;function sb(e,t){if(e=e.containerInfo,Nd=Xc,e=jm(e),tu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var u=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var h=0,b=-1,A=-1,O=0,H=0,K=e,L=null;t:for(;;){for(var B;K!==l||u!==0&&K.nodeType!==3||(b=h+u),K!==f||s!==0&&K.nodeType!==3||(A=h+s),K.nodeType===3&&(h+=K.nodeValue.length),(B=K.firstChild)!==null;)L=K,K=B;for(;;){if(K===e)break t;if(L===l&&++O===u&&(b=h),L===f&&++H===s&&(A=h),(B=K.nextSibling)!==null)break;K=L,L=K.parentNode}K=B}l=b===-1||A===-1?null:{start:b,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Td={focusedElem:e,selectionRange:l},Xc=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,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(l=0;l title"))),$t(f,s,l),f[dt]=e,nt(f),s=f;break e;case"link":var h=yh("link","href",u).get(s+(l.href||""));if(h){for(var b=0;bFe&&(h=Fe,Fe=Se,Se=h);var T=xm(b,Se),E=xm(b,Fe);if(T&&E&&(B.rangeCount!==1||B.anchorNode!==T.node||B.anchorOffset!==T.offset||B.focusNode!==E.node||B.focusOffset!==E.offset)){var z=K.createRange();z.setStart(T.node,T.offset),B.removeAllRanges(),Se>Fe?(B.addRange(z),B.extend(E.node,E.offset)):(z.setEnd(E.node,E.offset),B.addRange(z))}}}}for(K=[],B=b;B=B.parentNode;)B.nodeType===1&&K.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;bl?32:l,q.T=null,l=_d,_d=null;var f=ll,h=Ca;if(wt=0,Yi=ll=null,Ca=0,(Ie&6)!==0)throw Error(r(331));var b=Ie;if(Ie|=4,k_(f.current),b_(f,f.current,h,l),Ie=b,Js(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(kt,f)}catch{}return!0}finally{Q.p=u,q.T=s,H_(e,t)}}function Y_(e,t,l){t=wn(l,t),t=Xu(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(bn(e,2),Wn(e))}function Qe(e,t,l){if(e.tag===3)Y_(e,e,l);else for(;t!==null;){if(t.tag===3){Y_(t,e,l);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(al===null||!al.has(s))){e=wn(l,e),l=Ip(2),s=Fa(t,l,2),s!==null&&(Kp(l,s,t,e),bn(s,2),Wn(s));break}}t=t.return}}function vd(e,t,l){var s=e.pingCache;if(s===null){s=e.pingCache=new ob;var u=new Set;s.set(t,u)}else u=s.get(t),u===void 0&&(u=new Set,s.set(t,u));u.has(l)||(dd=!0,u.add(l),e=pb.bind(null,e,t,l),t.then(e,e))}function pb(e,t,l){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Pe===e&&($e&l)===l&&(ot===4||ot===3&&($e&62914560)===$e&&300>Nt()-Tc?(Ie&2)===0&&Ii(e,0):fd|=l,Gi===$e&&(Gi=0)),Wn(e)}function I_(e,t){t===0&&(t=Dr()),e=$l(e,t),e!==null&&(bn(e,t),Wn(e))}function _b(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),I_(e,l)}function hb(e,t){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,u=e.memoizedState;u!==null&&(l=u.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),I_(e,l)}function gb(e,t){return si(e,t)}var qc=null,Qi=null,bd=!1,Lc=!1,Sd=!1,sl=0;function Wn(e){e!==Qi&&e.next===null&&(Qi===null?qc=Qi=e:Qi=Qi.next=e),Lc=!0,bd||(bd=!0,vb())}function Js(e,t){if(!Sd&&Lc){Sd=!0;do for(var l=!1,s=qc;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var f=0;else{var h=s.suspendedLanes,b=s.pingedLanes;f=(1<<31-jt(42|e)+1)-1,f&=u&~(h&~b),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(l=!0,X_(s,f))}else f=$e,f=Vn(s,s===Pe?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||ra(s,f)||(l=!0,X_(s,f));s=s.next}while(l);Sd=!1}}function yb(){K_()}function K_(){Lc=bd=!1;var e=0;sl!==0&&Nb()&&(e=sl);for(var t=Nt(),l=null,s=qc;s!==null;){var u=s.next,f=Q_(s,t);f===0?(s.next=null,l===null?qc=u:l.next=u,u===null&&(Qi=l)):(l=s,(e!==0||(f&3)!==0)&&(Lc=!0)),s=u}wt!==0&&wt!==5||Js(e),sl!==0&&(sl=0)}function Q_(e,t){for(var l=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0b)break;var H=A.transferSize,K=A.initiatorType;H&&nh(K)&&(A=A.responseEnd,h+=H*(A"u"?null:document;function ph(e,t,l){var s=Vi;if(s&&typeof t=="string"&&t){var u=Jt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof l=="string"&&(u+='[crossorigin="'+l+'"]'),mh.has(u)||(mh.add(u),e={rel:e,crossOrigin:l,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),$t(t,"link",e),nt(t),s.head.appendChild(t)))}}function Lb(e){Ea.D(e),ph("dns-prefetch",e,null)}function Bb(e,t){Ea.C(e,t),ph("preconnect",e,t)}function Ub(e,t,l){Ea.L(e,t,l);var s=Vi;if(s&&e&&t){var u='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(u+='[imagesrcset="'+Jt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(u+='[imagesizes="'+Jt(l.imageSizes)+'"]')):u+='[href="'+Jt(e)+'"]';var f=u;switch(t){case"style":f=Xi(e);break;case"script":f=Zi(e)}Dn.has(f)||(e=x({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Dn.set(f,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(er(f))||t==="script"&&s.querySelector(tr(f))||(t=s.createElement("link"),$t(t,"link",e),nt(t),s.head.appendChild(t)))}}function Hb(e,t){Ea.m(e,t);var l=Vi;if(l&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Jt(s)+'"][href="'+Jt(e)+'"]',f=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Zi(e)}if(!Dn.has(f)&&(e=x({rel:"modulepreload",href:e},t),Dn.set(f,e),l.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(tr(f)))return}s=l.createElement("link"),$t(s,"link",e),nt(s),l.head.appendChild(s)}}}function Gb(e,t,l){Ea.S(e,t,l);var s=Vi;if(s&&e){var u=oa(s).hoistableStyles,f=Xi(e);t=t||"default";var h=u.get(f);if(!h){var b={loading:0,preload:null};if(h=s.querySelector(er(f)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Dn.get(f))&&qd(e,l);var A=h=s.createElement("link");nt(A),$t(A,"link",e),A._p=new Promise(function(O,H){A.onload=O,A.onerror=H}),A.addEventListener("load",function(){b.loading|=1}),A.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Yc(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:b},u.set(f,h)}}}function Yb(e,t){Ea.X(e,t);var l=Vi;if(l&&e){var s=oa(l).hoistableScripts,u=Zi(e),f=s.get(u);f||(f=l.querySelector(tr(u)),f||(e=x({src:e,async:!0},t),(t=Dn.get(u))&&Ld(e,t),f=l.createElement("script"),nt(f),$t(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(u,f))}}function Ib(e,t){Ea.M(e,t);var l=Vi;if(l&&e){var s=oa(l).hoistableScripts,u=Zi(e),f=s.get(u);f||(f=l.querySelector(tr(u)),f||(e=x({src:e,async:!0,type:"module"},t),(t=Dn.get(u))&&Ld(e,t),f=l.createElement("script"),nt(f),$t(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(u,f))}}function _h(e,t,l,s){var u=(u=je.current)?Gc(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Xi(l.href),l=oa(u).hoistableStyles,s=l.get(t),s||(s={type:"style",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Xi(l.href);var f=oa(u).hoistableStyles,h=f.get(e);if(h||(u=u.ownerDocument||u,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,h),(f=u.querySelector(er(e)))&&!f._p&&(h.instance=f,h.state.loading=5),Dn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Dn.set(e,l),f||Kb(u,e,l,h.state))),t&&s===null)throw Error(r(528,""));return h}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zi(l),l=oa(u).hoistableScripts,s=l.get(t),s||(s={type:"script",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Xi(e){return'href="'+Jt(e)+'"'}function er(e){return'link[rel="stylesheet"]['+e+"]"}function hh(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Kb(e,t,l,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),$t(t,"link",l),nt(t),e.head.appendChild(t))}function Zi(e){return'[src="'+Jt(e)+'"]'}function tr(e){return"script[async]"+e}function gh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Jt(l.href)+'"]');if(s)return t.instance=s,nt(s),s;var u=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),nt(s),$t(s,"style",u),Yc(s,l.precedence,e),t.instance=s;case"stylesheet":u=Xi(l.href);var f=e.querySelector(er(u));if(f)return t.state.loading|=4,t.instance=f,nt(f),f;s=hh(l),(u=Dn.get(u))&&qd(s,u),f=(e.ownerDocument||e).createElement("link"),nt(f);var h=f;return h._p=new Promise(function(b,A){h.onload=b,h.onerror=A}),$t(f,"link",s),t.state.loading|=4,Yc(f,l.precedence,e),t.instance=f;case"script":return f=Zi(l.src),(u=e.querySelector(tr(f)))?(t.instance=u,nt(u),u):(s=l,(u=Dn.get(f))&&(s=x({},l),Ld(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),nt(u),$t(u,"link",s),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Yc(s,l.precedence,e));return t.instance}function Yc(e,t,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,f=u,h=0;h title"):null)}function Qb(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function bh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Vb(e,t,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var u=Xi(s.href),f=t.querySelector(er(u));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Kc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=f,nt(f);return}f=t.ownerDocument||t,s=hh(s),(u=Dn.get(u))&&qd(s,u),f=f.createElement("link"),nt(f);var h=f;h._p=new Promise(function(b,A){h.onload=b,h.onerror=A}),$t(f,"link",s),l.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Kc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Bd=0;function Xb(e,t){return e.stylesheets&&e.count===0&&Vc(e,e.stylesheets),0Bd?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function Kc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qc=null;function Vc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qc=new Map,t.forEach(Zb,e),Qc=null,Kc.call(e))}function Zb(e,t){if(!(t.state.loading&4)){var l=Qc.get(e);if(l)var s=l.get(null);else{l=new Map,Qc.set(e,l);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Xd.exports=m0(),Xd.exports}var _0=p0();/** + * react-router v7.17.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var Ih="popstate";function Kh(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function h0(n={}){function a(c,d){let{pathname:p="/",search:y="",hash:_=""}=Wl(c.location.hash.substring(1));return!p.startsWith("/")&&!p.startsWith(".")&&(p="/"+p),_f("",{pathname:p,search:y,hash:_},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(c,d){let p=c.document.querySelector("base"),y="";if(p&&p.getAttribute("href")){let _=c.location.href,g=_.indexOf("#");y=g===-1?_:_.slice(0,g)}return y+"#"+(typeof d=="string"?d:vr(d))}function r(c,d){$n(c.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(d)})`)}return y0(a,i,r,n)}function rt(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function $n(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function g0(){return Math.random().toString(36).substring(2,10)}function Qh(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function _f(n,a,i=null,r,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Wl(a):a,state:i,key:a&&a.key||r||g0(),mask:c}}function vr({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Wl(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let r=n.indexOf("?");r>=0&&(a.search=n.substring(r),n=n.substring(0,r)),n&&(a.pathname=n)}return a}function y0(n,a,i,r={}){let{window:c=document.defaultView,v5Compat:d=!1}=r,p=c.history,y="POP",_=null,g=S();g==null&&(g=0,p.replaceState({...p.state,idx:g},""));function S(){return(p.state||{idx:null}).idx}function x(){y="POP";let N=S(),$=N==null?null:N-g;g=N,_&&_({action:y,location:R.location,delta:$})}function j(N,$){y="PUSH";let V=Kh(N)?N:_f(R.location,N,$);i&&i(V,N),g=S()+1;let Y=Qh(V,g),te=R.createHref(V.mask||V);try{p.pushState(Y,"",te)}catch(ae){if(ae instanceof DOMException&&ae.name==="DataCloneError")throw ae;c.location.assign(te)}d&&_&&_({action:y,location:R.location,delta:1})}function D(N,$){y="REPLACE";let V=Kh(N)?N:_f(R.location,N,$);i&&i(V,N),g=S();let Y=Qh(V,g),te=R.createHref(V.mask||V);p.replaceState(Y,"",te),d&&_&&_({action:y,location:R.location,delta:0})}function w(N){return v0(c,N)}let R={get action(){return y},get location(){return n(c,p)},listen(N){if(_)throw new Error("A history only accepts one active listener");return c.addEventListener(Ih,x),_=N,()=>{c.removeEventListener(Ih,x),_=null}},createHref(N){return a(c,N)},createURL:w,encodeLocation(N){let $=w(N);return{pathname:$.pathname,search:$.search,hash:$.hash}},push:j,replace:D,go(N){return p.go(N)}};return R}function v0(n,a,i=!1){let r="http://localhost";n&&(r=n.location.origin!=="null"?n.location.origin:n.location.href),rt(r,"No window.location.(origin|href) available to create URL");let c=typeof a=="string"?a:vr(a);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=r+c),new URL(c,r)}function Kg(n,a,i="/"){return b0(n,a,i,!1)}function b0(n,a,i,r,c){let d=typeof a=="string"?Wl(a):a,p=Da(d.pathname||"/",i);if(p==null)return null;let y=S0(n),_=null,g=$0(p);for(let S=0;_==null&&S{let S={relativePath:g===void 0?p.path||"":g,caseSensitive:p.caseSensitive===!0,childrenIndex:y,route:p};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(r)&&_)return;rt(S.relativePath.startsWith(r),`Absolute route path "${S.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(r.length)}let x=Gn([r,S.relativePath]),j=i.concat(S);p.children&&p.children.length>0&&(rt(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Qg(p.children,a,j,x,_)),!(p.path==null&&!p.index)&&a.push({path:x,score:N0(x,p.index),routesMeta:j})};return n.forEach((p,y)=>{var _;if(p.path===""||!((_=p.path)!=null&&_.includes("?")))d(p,y);else for(let g of Vg(p.path))d(p,y,!0,g)}),a}function Vg(n){let a=n.split("/");if(a.length===0)return[];let[i,...r]=a,c=i.endsWith("?"),d=i.replace(/\?$/,"");if(r.length===0)return c?[d,""]:[d];let p=Vg(r.join("/")),y=[];return y.push(...p.map(_=>_===""?d:[d,_].join("/"))),c&&y.push(...p),y.map(_=>n.startsWith("/")&&_===""?"/":_)}function x0(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:T0(a.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var k0=/^:[\w-]+$/,j0=3,w0=2,A0=1,C0=10,E0=-2,Vh=n=>n==="*";function N0(n,a){let i=n.split("/"),r=i.length;return i.some(Vh)&&(r+=E0),a&&(r+=w0),i.filter(c=>!Vh(c)).reduce((c,d)=>c+(k0.test(d)?j0:d===""?A0:C0),r)}function T0(n,a){return n.length===a.length&&n.slice(0,-1).every((r,c)=>r===a[c])?n[n.length-1]-a[a.length-1]:0}function D0(n,a,i=!1){let{routesMeta:r}=n,c={},d="/",p=[];for(let y=0;y{if(S==="*"){let w=y[j]||"";p=d.slice(0,d.length-w.length).replace(/(.)\/+$/,"$1")}const D=y[j];return x&&!D?g[S]=void 0:g[S]=(D||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:p,pattern:n}}function R0(n,a=!1,i=!0){$n(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let r=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,y,_,g,S)=>{if(r.push({paramName:y,isOptional:_!=null}),_){let x=S.charAt(g+p.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(r.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),r]}function $0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return $n(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Da(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,r=n.charAt(i);return r&&r!=="/"?null:n.slice(i)||"/"}var M0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function z0(n,a="/"){let{pathname:i,search:r="",hash:c=""}=typeof n=="string"?Wl(n):n,d;return i?(i=Xg(i),i.startsWith("/")?d=Xh(i.substring(1),"/"):d=Xh(i,a)):d=a,{pathname:d,search:L0(r),hash:B0(c)}}function Xh(n,a){let i=ho(a).split("/");return n.split("/").forEach(c=>{c===".."?i.length>1&&i.pop():c!=="."&&i.push(c)}),i.length>1?i.join("/"):"/"}function Pd(n,a,i,r){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function O0(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Of(n){let a=O0(n);return a.map((i,r)=>r===a.length-1?i.pathname:i.pathnameBase)}function Ao(n,a,i,r=!1){let c;typeof n=="string"?c=Wl(n):(c={...n},rt(!c.pathname||!c.pathname.includes("?"),Pd("?","pathname","search",c)),rt(!c.pathname||!c.pathname.includes("#"),Pd("#","pathname","hash",c)),rt(!c.search||!c.search.includes("#"),Pd("#","search","hash",c)));let d=n===""||c.pathname==="",p=d?"/":c.pathname,y;if(p==null)y=i;else{let x=a.length-1;if(!r&&p.startsWith("..")){let j=p.split("/");for(;j[0]==="..";)j.shift(),x-=1;c.pathname=j.join("/")}y=x>=0?a[x]:"/"}let _=z0(c,y),g=p&&p!=="/"&&p.endsWith("/"),S=(d||p===".")&&i.endsWith("/");return!_.pathname.endsWith("/")&&(g||S)&&(_.pathname+="/"),_}var Xg=n=>n.replace(/\/\/+/g,"/"),Gn=n=>Xg(n.join("/")),ho=n=>n.replace(/\/+$/,""),q0=n=>ho(n).replace(/^\/*/,"/"),L0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,B0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,U0=class{constructor(n,a,i,r=!1){this.status=n,this.statusText=a||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function H0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function G0(n){let a=n.map(i=>i.route.path).filter(Boolean);return Gn(a)||"/"}var Zg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Jg(n,a){let i=n;if(typeof i!="string"||!M0.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let r=i,c=!1;if(Zg)try{let d=new URL(window.location.href),p=i.startsWith("//")?new URL(d.protocol+i):new URL(i),y=Da(p.pathname,a);p.origin===d.origin&&y!=null?i=y+p.search+p.hash:c=!0}catch{$n(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:c,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Fg=["POST","PUT","PATCH","DELETE"];new Set(Fg);var Y0=["GET",...Fg];new Set(Y0);var ss=k.createContext(null);ss.displayName="DataRouter";var Co=k.createContext(null);Co.displayName="DataRouterState";var Pg=k.createContext(!1);function I0(){return k.useContext(Pg)}var Wg=k.createContext({isTransitioning:!1});Wg.displayName="ViewTransition";var K0=k.createContext(new Map);K0.displayName="Fetchers";var Q0=k.createContext(null);Q0.displayName="Await";var yn=k.createContext(null);yn.displayName="Navigation";var kr=k.createContext(null);kr.displayName="Location";var na=k.createContext({outlet:null,matches:[],isDataRoute:!1});na.displayName="Route";var qf=k.createContext(null);qf.displayName="RouteError";var ey="REACT_ROUTER_ERROR",V0="REDIRECT",X0="ROUTE_ERROR_RESPONSE";function Z0(n){if(n.startsWith(`${ey}:${V0}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function J0(n){if(n.startsWith(`${ey}:${X0}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new U0(a.status,a.statusText,a.data)}catch{}}function F0(n,{relative:a}={}){rt(rs(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:r}=k.useContext(yn),{hash:c,pathname:d,search:p}=jr(n,{relative:a}),y=d;return i!=="/"&&(y=d==="/"?i:Gn([i,d])),r.createHref({pathname:y,search:p,hash:c})}function rs(){return k.useContext(kr)!=null}function Qn(){return rt(rs(),"useLocation() may be used only in the context of a component."),k.useContext(kr).location}var ty="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ny(n){k.useContext(yn).static||k.useLayoutEffect(n)}function Lf(){let{isDataRoute:n}=k.useContext(na);return n?uS():P0()}function P0(){rt(rs(),"useNavigate() may be used only in the context of a component.");let n=k.useContext(ss),{basename:a,navigator:i}=k.useContext(yn),{matches:r}=k.useContext(na),{pathname:c}=Qn(),d=JSON.stringify(Of(r)),p=k.useRef(!1);return ny(()=>{p.current=!0}),k.useCallback((_,g={})=>{if($n(p.current,ty),!p.current)return;if(typeof _=="number"){i.go(_);return}let S=Ao(_,JSON.parse(d),c,g.relative==="path");n==null&&a!=="/"&&(S.pathname=S.pathname==="/"?a:Gn([a,S.pathname])),(g.replace?i.replace:i.push)(S,g.state,g)},[a,i,d,c,n])}k.createContext(null);function jr(n,{relative:a}={}){let{matches:i}=k.useContext(na),{pathname:r}=Qn(),c=JSON.stringify(Of(i));return k.useMemo(()=>Ao(n,JSON.parse(c),r,a==="path"),[n,c,r,a])}function W0(n,a){return ay(n,a)}function ay(n,a,i){var N;rt(rs(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=k.useContext(yn),{matches:c}=k.useContext(na),d=c[c.length-1],p=d?d.params:{},y=d?d.pathname:"/",_=d?d.pathnameBase:"/",g=d&&d.route;{let $=g&&g.path||"";iy(y,!g||$.endsWith("*")||$.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${y}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let S=Qn(),x;if(a){let $=typeof a=="string"?Wl(a):a;rt(_==="/"||((N=$.pathname)==null?void 0:N.startsWith(_)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${_}" but pathname "${$.pathname}" was given in the \`location\` prop.`),x=$}else x=S;let j=x.pathname||"/",D=j;if(_!=="/"){let $=_.replace(/^\//,"").split("/");D="/"+j.replace(/^\//,"").split("/").slice($.length).join("/")}let w=i&&i.state.matches.length?i.state.matches.map($=>Object.assign($,{route:i.manifest[$.route.id]||$.route})):Kg(n,{pathname:D});$n(g||w!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),$n(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let R=lS(w&&w.map($=>Object.assign({},$,{params:Object.assign({},p,$.params),pathname:Gn([_,r.encodeLocation?r.encodeLocation($.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:$.pathname]),pathnameBase:$.pathnameBase==="/"?_:Gn([_,r.encodeLocation?r.encodeLocation($.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:$.pathnameBase])})),c,i);return a&&R?k.createElement(kr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},R):R}function eS(){let n=oS(),a=H0(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,r="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},p=null;return console.error("Error handled by React Router default ErrorBoundary:",n),p=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:d},"ErrorBoundary")," or"," ",k.createElement("code",{style:d},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},a),i?k.createElement("pre",{style:c},i):null,p)}var tS=k.createElement(eS,null),ly=class extends k.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=J0(n.digest);i&&(n=i)}let a=n!==void 0?k.createElement(na.Provider,{value:this.props.routeContext},k.createElement(qf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?k.createElement(nS,{error:n},a):a}};ly.contextType=Pg;var Wd=new WeakMap;function nS({children:n,error:a}){let{basename:i}=k.useContext(yn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let r=Z0(a.digest);if(r){let c=Wd.get(a);if(c)throw c;let d=Jg(r.location,i);if(Zg&&!Wd.get(a))if(d.isExternal||r.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:r.replace}));throw Wd.set(a,p),p}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function aS({routeContext:n,match:a,children:i}){let r=k.useContext(ss);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),k.createElement(na.Provider,{value:n},i)}function lS(n,a=[],i){let r=i==null?void 0:i.state;if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(a.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let c=n,d=r==null?void 0:r.errors;if(d!=null){let S=c.findIndex(x=>x.route.id&&(d==null?void 0:d[x.route.id])!==void 0);rt(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,S+1))}let p=!1,y=-1;if(i&&r){p=r.renderFallback;for(let S=0;S=0?c=c.slice(0,y+1):c=[c[0]];break}}}}let _=i==null?void 0:i.onError,g=r&&_?(S,x)=>{var j,D;_(S,{location:r.location,params:((D=(j=r.matches)==null?void 0:j[0])==null?void 0:D.params)??{},pattern:G0(r.matches),errorInfo:x})}:void 0;return c.reduceRight((S,x,j)=>{let D,w=!1,R=null,N=null;r&&(D=d&&x.route.id?d[x.route.id]:void 0,R=x.route.errorElement||tS,p&&(y<0&&j===0?(iy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,N=null):y===j&&(w=!0,N=x.route.hydrateFallbackElement||null)));let $=a.concat(c.slice(0,j+1)),V=()=>{let Y;return D?Y=R:w?Y=N:x.route.Component?Y=k.createElement(x.route.Component,null):x.route.element?Y=x.route.element:Y=S,k.createElement(aS,{match:x,routeContext:{outlet:S,matches:$,isDataRoute:r!=null},children:Y})};return r&&(x.route.ErrorBoundary||x.route.errorElement||j===0)?k.createElement(ly,{location:r.location,revalidation:r.revalidation,component:R,error:D,children:V(),routeContext:{outlet:null,matches:$,isDataRoute:!0},onError:g}):V()},null)}function Bf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iS(n){let a=k.useContext(ss);return rt(a,Bf(n)),a}function sS(n){let a=k.useContext(Co);return rt(a,Bf(n)),a}function rS(n){let a=k.useContext(na);return rt(a,Bf(n)),a}function Uf(n){let a=rS(n),i=a.matches[a.matches.length-1];return rt(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function cS(){return Uf("useRouteId")}function oS(){var r;let n=k.useContext(qf),a=sS("useRouteError"),i=Uf("useRouteError");return n!==void 0?n:(r=a.errors)==null?void 0:r[i]}function uS(){let{router:n}=iS("useNavigate"),a=Uf("useNavigate"),i=k.useRef(!1);return ny(()=>{i.current=!0}),k.useCallback(async(c,d={})=>{$n(i.current,ty),i.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:a,...d}))},[n,a])}var Zh={};function iy(n,a,i){!a&&!Zh[n]&&(Zh[n]=!0,$n(!1,i))}k.memo(dS);function dS({routes:n,manifest:a,future:i,state:r,isStatic:c,onError:d}){return ay(n,void 0,{manifest:a,state:r,isStatic:c,onError:d})}function fS({to:n,replace:a,state:i,relative:r}){rt(rs()," may be used only in the context of a component.");let{static:c}=k.useContext(yn);$n(!c," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:d}=k.useContext(na),{pathname:p}=Qn(),y=Lf(),_=Ao(n,Of(d),p,r==="path"),g=JSON.stringify(_);return k.useEffect(()=>{y(JSON.parse(g),{replace:a,state:i,relative:r})},[y,g,r,a,i]),null}function hf(n){rt(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function mS({basename:n="/",children:a=null,location:i,navigationType:r="POP",navigator:c,static:d=!1,useTransitions:p}){rt(!rs(),"You cannot render a inside another . You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),_=k.useMemo(()=>({basename:y,navigator:c,static:d,useTransitions:p,future:{}}),[y,c,d,p]);typeof i=="string"&&(i=Wl(i));let{pathname:g="/",search:S="",hash:x="",state:j=null,key:D="default",mask:w}=i,R=k.useMemo(()=>{let N=Da(g,y);return N==null?null:{location:{pathname:N,search:S,hash:x,state:j,key:D,mask:w},navigationType:r}},[y,g,S,x,j,D,r,w]);return $n(R!=null,` is not able to match the URL "${g}${S}${x}" because it does not start with the basename, so the won't render anything.`),R==null?null:k.createElement(yn.Provider,{value:_},k.createElement(kr.Provider,{children:a,value:R}))}function pS({children:n,location:a}){return W0(gf(n),a)}function gf(n,a=[]){let i=[];return k.Children.forEach(n,(r,c)=>{if(!k.isValidElement(r))return;let d=[...a,c];if(r.type===k.Fragment){i.push.apply(i,gf(r.props.children,d));return}rt(r.type===hf,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),rt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let p={id:r.props.id||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(p.children=gf(r.props.children,d)),i.push(p)}),i}var ro="get",co="application/x-www-form-urlencoded";function Eo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function _S(n){return Eo(n)&&n.tagName.toLowerCase()==="button"}function hS(n){return Eo(n)&&n.tagName.toLowerCase()==="form"}function gS(n){return Eo(n)&&n.tagName.toLowerCase()==="input"}function yS(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function vS(n,a){return n.button===0&&(!a||a==="_self")&&!yS(n)}var to=null;function bS(){if(to===null)try{new FormData(document.createElement("form"),0),to=!1}catch{to=!0}return to}var SS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ef(n){return n!=null&&!SS.has(n)?($n(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${co}"`),null):n}function xS(n,a){let i,r,c,d,p;if(hS(n)){let y=n.getAttribute("action");r=y?Da(y,a):null,i=n.getAttribute("method")||ro,c=ef(n.getAttribute("enctype"))||co,d=new FormData(n)}else if(_S(n)||gS(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a