From e57c94c19d72aa16ad3773850500ac7c85a62673 Mon Sep 17 00:00:00 2001 From: baiyanyun Date: Thu, 11 Jun 2026 21:53:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=B8=E6=94=B6=E6=95=B0=E5=AD=97=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E5=AE=A1=E6=89=B9=E8=B7=A8=E7=AB=AF=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../embedded/sgrobot-digital/src/index.css | 7 + .../embedded/sgrobot-digital/src/lib/api.ts | 4 +- .../src/lib/qimingclawAdapter.ts | 38 +++- .../src/pages/digital/CommandDeck.tsx | 39 +++- .../embedded/sgrobot-digital/src/types/api.ts | 8 + .../sgrobot-digital/assets/index-BCqhbj_N.js | 184 ++++++++++++++++++ .../sgrobot-digital/assets/index-Bp_ixnWX.js | 184 ------------------ ...{index-4TVkOCsf.css => index-DQBQCK-i.css} | 2 +- .../public/sgrobot-digital/index.html | 4 +- .../scripts/check-digital-employee.js | 8 + .../digitalEmployee/stateService.test.ts | 150 +++++++++++++- .../services/digitalEmployee/stateService.ts | 134 ++++++++++++- .../digitalEmployee/syncService.test.ts | 53 +++++ .../services/digitalEmployee/syncService.ts | 8 +- ...ital-employee-frontend-integration-plan.md | 10 +- 15 files changed, 625 insertions(+), 208 deletions(-) create mode 100644 qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-BCqhbj_N.js delete mode 100644 qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-Bp_ixnWX.js rename qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/{index-4TVkOCsf.css => index-DQBQCK-i.css} (65%) diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/index.css b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/index.css index ed180fd9..620ca699 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/index.css +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/index.css @@ -2344,6 +2344,13 @@ display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: #60758a; font-size: 12px; line-height: 1.45; } +.de-decision-chain-note--conflict { + padding: 8px 10px; + border-radius: 8px; + color: #8c3434; + background: rgba(244,96,96,0.09); + border: 1px solid rgba(244,96,96,0.18); +} @keyframes deFeedIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } 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 515e72bc..caac57bd 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 @@ -920,8 +920,8 @@ export function recordApprovalAction( }); } -export function pullApprovalUpdates(): Promise<{ ok: boolean; applied?: number; ignored?: number; skipped?: boolean; error?: string | null }> { - return apiFetch<{ ok: boolean; applied?: number; ignored?: number; skipped?: boolean; error?: string | null }>('/api/approval/updates/pull', { +export function pullApprovalUpdates(): Promise<{ ok: boolean; applied?: number; ignored?: number; conflicted?: number; skipped?: boolean; error?: string | null }> { + return apiFetch<{ ok: boolean; applied?: number; ignored?: number; conflicted?: number; skipped?: boolean; error?: string | null }>('/api/approval/updates/pull', { method: 'POST', body: JSON.stringify({}), }); 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 9c855ad3..0949d7fe 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 @@ -63,7 +63,7 @@ declare global { setSkillEnabled?: (skillId: string, enabled: boolean) => Promise<{ ok?: boolean; skill_id?: string; enabled?: boolean; error?: string }>; pullSkillPolicies?: () => Promise<{ ok?: boolean; skipped?: boolean; error?: string | null }>; pullRiskApprovalPolicy?: () => Promise<{ ok?: boolean; skipped?: boolean; error?: string | null }>; - pullApprovalUpdates?: () => Promise<{ ok?: boolean; applied?: number; ignored?: number; skipped?: boolean; error?: string | null }>; + pullApprovalUpdates?: () => Promise<{ ok?: boolean; applied?: number; ignored?: number; conflicted?: number; skipped?: boolean; error?: string | null }>; submitApprovalDecision?: (input: Record) => Promise<{ ok?: boolean; error?: string | null }>; pullNotificationUpdates?: () => Promise<{ ok?: boolean; applied?: number; ignored?: number; skipped?: boolean; error?: string | null }>; submitNotificationAction?: (input: Record) => Promise<{ ok?: boolean; error?: string | null }>; @@ -1308,7 +1308,7 @@ async function pullBridgeRouteDecisionPolicy(): Promise { +async function pullBridgeApprovalUpdates(): Promise<{ ok: boolean; applied?: number; ignored?: number; conflicted?: number; skipped?: boolean; error?: string | null }> { const bridge = window.QimingClawBridge?.digital; if (!bridge?.pullApprovalUpdates) { return { ok: false, error: 'qimingclaw_bridge_unavailable' }; @@ -1322,6 +1322,7 @@ async function pullBridgeApprovalUpdates(): Promise<{ ok: boolean; applied?: num ok: result?.ok !== false, applied: Number(result?.applied ?? 0), ignored: Number(result?.ignored ?? 0), + conflicted: Number(result?.conflicted ?? 0), ...(result?.skipped ? { skipped: true } : {}), ...(result?.error ? { error: result.error } : {}), }; @@ -3560,6 +3561,7 @@ function businessApprovalRows(snapshot: QimingclawSnapshot | null): BusinessView const runtime = runtimeById.get(approvalId); const summary = approvalActionSummary(snapshot, approvalId, approval); const workflow = approvalWorkflowSummary(approval); + const conflict = approvalConflictSummary(approval); const entity = businessEntityFromRefs({ plan_id: approval.plan_id, task_id: approval.task_id, @@ -3588,6 +3590,12 @@ function businessApprovalRows(snapshot: QimingclawSnapshot | null): BusinessView approval_step_index: workflow.step_index, approval_step_count: workflow.step_count, next_step_label: workflow.next_step_label, + approval_conflict_active: conflict.active, + approval_conflict_reason: conflict.reason, + approval_conflict_remote_status: conflict.remote_status, + approval_conflict_detected_at: conflict.detected_at, + approval_conflict_local_status: conflict.local_status, + approval_conflict_remote_current_step_id: conflict.remote_current_step_id, }; }); } @@ -3728,6 +3736,19 @@ function approvalWorkflowSummary(approval: Record): ApprovalWor }; } +function approvalConflictSummary(approval: Record): Record { + const payload = asRecord(approval.payload) ?? {}; + const conflict = asRecord(payload.conflict) ?? {}; + return { + active: conflict.active === true, + reason: stringValue(conflict.reason) || null, + remote_status: stringValue(conflict.remote_status ?? conflict.remoteStatus) || null, + detected_at: stringValue(conflict.detected_at ?? conflict.detectedAt) || null, + local_status: stringValue(conflict.local_status ?? conflict.localStatus) || null, + remote_current_step_id: stringValue(conflict.remote_current_step_id ?? conflict.remoteCurrentStepId) || null, + }; +} + function approvalActionSummary( snapshot: QimingclawSnapshot | null, approvalId: string, @@ -4994,6 +5015,7 @@ function buildWorkdayDecisions( const plan = planId ? plansById.get(planId) : null; const task = taskId ? tasksById.get(taskId) : null; const summary = approvalSummaries.get(decisionId); + const hasConflict = summary?.approval_conflict_active === true; return { id: decisionId, title: stringValue(approval.title) || stringValue(payload?.title) || '待确认事项', @@ -5016,7 +5038,17 @@ function buildWorkdayDecisions( approval_step_index: numberValue(summary?.approval_step_index), approval_step_count: numberValue(summary?.approval_step_count), next_step_label: stringValue(summary?.next_step_label) || null, - actions: isDecisionOpenStatus(status) + conflict: hasConflict + ? { + active: true, + reason: stringValue(summary?.approval_conflict_reason) || null, + remote_status: stringValue(summary?.approval_conflict_remote_status) || null, + detected_at: stringValue(summary?.approval_conflict_detected_at) || null, + local_status: stringValue(summary?.approval_conflict_local_status) || null, + remote_current_step_id: stringValue(summary?.approval_conflict_remote_current_step_id) || null, + } + : null, + actions: isDecisionOpenStatus(status) && !hasConflict ? [ { id: 'approved', label: '同意', tone: 'primary' }, { id: 'rejected', label: '驳回', tone: 'secondary' }, diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/pages/digital/CommandDeck.tsx b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/pages/digital/CommandDeck.tsx index afbb50b1..36c01c28 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/pages/digital/CommandDeck.tsx +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/pages/digital/CommandDeck.tsx @@ -302,6 +302,24 @@ function approvalActionLabel(value?: string | null): string { return normalized || '暂无动作'; } +function approvalConflictReasonLabel(value?: string | null): string { + const normalized = compactText(value).toLowerCase(); + if (normalized === 'terminal_status_mismatch') return '终态不一致'; + if (normalized === 'local_newer_status_mismatch') return '本地状态较新'; + if (normalized === 'workflow_step_mismatch') return '审批步骤不一致'; + return normalized || '跨端状态不一致'; +} + +function approvalStatusShortLabel(value?: string | null): string { + const normalized = compactText(value).toLowerCase(); + if (normalized === 'approved') return '已同意'; + if (normalized === 'rejected') return '已驳回'; + if (normalized === 'cancelled') return '已取消'; + if (normalized === 'pending') return '待确认'; + if (normalized === 'dismissed') return '已忽略'; + return normalized || '未知'; +} + function dutyCardClass(planItem: DigitalPlanItem, selected: boolean): string { const classes = ['de-template-card-row', 'de-duty-card', 'de-duty-card--compact']; if (!planItem.implemented) classes.push('de-duty-card--disabled'); @@ -1464,7 +1482,7 @@ export default function CommandDeck({ onNavigate }: { onNavigate: (target: Digit await fetchProjection(); if (!mountedRef.current) return; setActionNotice(result.ok - ? `审批更新已拉取:应用 ${result.applied ?? 0} 条,忽略 ${result.ignored ?? 0} 条。` + ? `审批更新已拉取:应用 ${result.applied ?? 0} 条,忽略 ${result.ignored ?? 0} 条,冲突 ${result.conflicted ?? 0} 项。` : `审批更新拉取失败:${result.error || '未知错误'}。`); } catch (error) { if (mountedRef.current) { @@ -3363,6 +3381,7 @@ export default function CommandDeck({ onNavigate }: { onNavigate: (target: Digit const timeoutBusy = actionBusy === `${actionBusyPrefix}mark_timeout`; const markRiskBusy = actionBusy === `${actionBusyPrefix}mark_risk`; const clearRiskBusy = actionBusy === `${actionBusyPrefix}clear_risk`; + const approvalConflict = decision.conflict?.active ? decision.conflict : null; return (
@@ -3371,6 +3390,9 @@ export default function CommandDeck({ onNavigate }: { onNavigate: (target: Digit

{decision.scenario}

+ {approvalConflict && ( + 跨端冲突 + )} {approvalRiskLabel(decision.risk_level)} @@ -3386,6 +3408,15 @@ export default function CommandDeck({ onNavigate }: { onNavigate: (target: Digit {decision.current_participant ? `处理人 ${decision.current_participant}` : '未指定处理人'} {decision.next_step_label ? `下一步 ${decision.next_step_label}` : '无后续步骤'}
+ {approvalConflict && ( +
+ 人工排查 + + {approvalConflictReasonLabel(approvalConflict.reason)}:本地 {approvalStatusShortLabel(approvalConflict.local_status ?? decision.status)},管理端 {approvalStatusShortLabel(approvalConflict.remote_status)}。 + {approvalConflict.detected_at ? ` 检测 ${formatBeijingDateTime(approvalConflict.detected_at) || approvalConflict.detected_at}` : ''} + +
+ )}
- 本地记录 - {isDecisionOpen(decision.status) ? '处理结果会写入 qimingclaw runtime event。' : '该事项已在本地状态中处理。'} + {approvalConflict ? '冲突保护' : '本地记录'} + {approvalConflict ? '直接同意/驳回已暂停,请先同步或在管理端工作台排查。' : isDecisionOpen(decision.status) ? '处理结果会写入 qimingclaw runtime event。' : '该事项已在本地状态中处理。'}
{decision.actions.map((action) => ( @@ -3460,7 +3491,7 @@ export default function CommandDeck({ onNavigate }: { onNavigate: (target: Digit key={action.id} type="button" className={action.tone === 'primary' ? 'de-workbench-action-accent' : ''} - disabled={actionBusy === `${decision.id}:${action.id}` || !isDecisionOpen(decision.status)} + disabled={actionBusy === `${decision.id}:${action.id}` || !isDecisionOpen(decision.status) || Boolean(approvalConflict)} onClick={() => { void resolveDecision(decision, action.id); }} > {actionBusy === `${decision.id}:${action.id}` ? '处理中...' : action.label} diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/types/api.ts b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/types/api.ts index e19338bc..0a203203 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/types/api.ts +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/types/api.ts @@ -976,6 +976,14 @@ export interface DigitalEmployeeDecision { approval_step_index?: number | null; approval_step_count?: number | null; next_step_label?: string | null; + conflict?: { + active: boolean; + reason?: string | null; + remote_status?: string | null; + detected_at?: string | null; + local_status?: string | null; + remote_current_step_id?: string | null; + } | null; actions: DigitalEmployeeDecisionAction[]; } diff --git a/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-BCqhbj_N.js b/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-BCqhbj_N.js new file mode 100644 index 00000000..206027b4 --- /dev/null +++ b/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-BCqhbj_N.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"]'))s(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const _ of d.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&s(_)}).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 s(c){if(c.ep)return;c.ep=!0;const d=i(c);fetch(c.href,d)}})();function wS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cf={exports:{}},br={};/** + * @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 Jh;function jS(){if(Jh)return br;Jh=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(s,c,d){var _=null;if(d!==void 0&&(_=""+d),c.key!==void 0&&(_=""+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:t,type:s,key:_,ref:c!==void 0?c:null,props:d}}return br.Fragment=a,br.jsx=i,br.jsxs=i,br}var Fh;function CS(){return Fh||(Fh=1,cf.exports=jS()),cf.exports}var o=CS(),of={exports:{}},Ce={};/** + * @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 Ph;function AS(){if(Ph)return Ce;Ph=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),_=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),w=Symbol.iterator;function M(E){return E===null||typeof E!="object"?null:(E=w&&E[w]||E["@@iterator"],typeof E=="function"?E:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,N={};function j(E,I,ee){this.props=E,this.context=I,this.refs=N,this.updater=ee||C}j.prototype.isReactComponent={},j.prototype.setState=function(E,I){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,I,"setState")},j.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function H(){}H.prototype=j.prototype;function G(E,I,ee){this.props=E,this.context=I,this.refs=N,this.updater=ee||C}var ne=G.prototype=new H;ne.constructor=G,R(ne,j.prototype),ne.isPureReactComponent=!0;var ae=Array.isArray;function re(){}var J={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function se(E,I,ee){var ie=ee.ref;return{$$typeof:t,type:E,key:I,ref:ie!==void 0?ie:null,props:ee}}function xe(E,I){return se(E.type,I,E.props)}function le(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function Ne(E){var I={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(ee){return I[ee]})}var D=/\/+/g;function W(E,I){return typeof E=="object"&&E!==null&&E.key!=null?Ne(""+E.key):I.toString(36)}function ge(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(re,re):(E.status="pending",E.then(function(I){E.status==="pending"&&(E.status="fulfilled",E.value=I)},function(I){E.status==="pending"&&(E.status="rejected",E.reason=I)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function L(E,I,ee,ie,ye){var we=typeof E;(we==="undefined"||we==="boolean")&&(E=null);var Z=!1;if(E===null)Z=!0;else switch(we){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(E.$$typeof){case t:case a:Z=!0;break;case b:return Z=E._init,L(Z(E._payload),I,ee,ie,ye)}}if(Z)return ye=ye(E),Z=ie===""?"."+W(E,0):ie,ae(ye)?(ee="",Z!=null&&(ee=Z.replace(D,"$&/")+"/"),L(ye,I,ee,"",function(Ue){return Ue})):ye!=null&&(le(ye)&&(ye=xe(ye,ee+(ye.key==null||E&&E.key===ye.key?"":(""+ye.key).replace(D,"$&/")+"/")+Z)),I.push(ye)),1;Z=0;var fe=ie===""?".":ie+":";if(ae(E))for(var Be=0;Be>>1,X=L[pe];if(0>>1;pec(ee,te))iec(ye,ee)?(L[pe]=ye,L[ie]=te,pe=ie):(L[pe]=ee,L[I]=te,pe=I);else if(iec(ye,te))L[pe]=ye,L[ie]=te,pe=ie;else break e}}return V}function c(L,V){var te=L.sortIndex-V.sortIndex;return te!==0?te:L.id-V.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var _=Date,y=_.now();t.unstable_now=function(){return _.now()-y}}var p=[],h=[],b=1,k=null,w=3,M=!1,C=!1,R=!1,N=!1,j=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function ne(L){for(var V=i(h);V!==null;){if(V.callback===null)s(h);else if(V.startTime<=L)s(h),V.sortIndex=V.expirationTime,a(p,V);else break;V=i(h)}}function ae(L){if(R=!1,ne(L),!C)if(i(p)!==null)C=!0,re||(re=!0,Ne());else{var V=i(h);V!==null&&ge(ae,V.startTime-L)}}var re=!1,J=-1,F=5,se=-1;function xe(){return N?!0:!(t.unstable_now()-seL&&xe());){var pe=k.callback;if(typeof pe=="function"){k.callback=null,w=k.priorityLevel;var X=pe(k.expirationTime<=L);if(L=t.unstable_now(),typeof X=="function"){k.callback=X,ne(L),V=!0;break t}k===i(p)&&s(p),ne(L)}else s(p);k=i(p)}if(k!==null)V=!0;else{var E=i(h);E!==null&&ge(ae,E.startTime-L),V=!1}}break e}finally{k=null,w=te,M=!1}V=void 0}}finally{V?Ne():re=!1}}}var Ne;if(typeof G=="function")Ne=function(){G(le)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,W=D.port2;D.port1.onmessage=le,Ne=function(){W.postMessage(null)}}else Ne=function(){j(le,0)};function ge(L,V){J=j(function(){L(t.unstable_now())},V)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125pe?(L.sortIndex=te,a(h,L),i(p)===null&&L===i(h)&&(R?(H(J),J=-1):R=!0,ge(ae,te-pe))):(L.sortIndex=X,a(p,L),C||M||(C=!0,re||(re=!0,Ne()))),L},t.unstable_shouldYield=xe,t.unstable_wrapCallback=function(L){var V=w;return function(){var te=w;w=V;try{return L.apply(this,arguments)}finally{w=te}}}})(ff)),ff}var tg;function TS(){return tg||(tg=1,df.exports=NS()),df.exports}var mf={exports:{}},Vt={};/** + * @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 ng;function DS(){if(ng)return Vt;ng=1;var t=Ff();function a(p){var h="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),mf.exports=DS(),mf.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 lg;function $S(){if(lg)return Sr;lg=1;var t=TS(),a=Ff(),i=RS();function s(e){var n="https://react.dev/errors/"+e;if(1X||(e.current=pe[X],pe[X]=null,X--)}function ee(e,n){X++,pe[X]=e.current,e.current=n}var ie=E(null),ye=E(null),we=E(null),Z=E(null);function fe(e,n){switch(ee(we,n),ee(ye,e),ee(ie,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?vh(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=vh(n),e=bh(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(ie),ee(ie,e)}function Be(){I(ie),I(ye),I(we)}function Ue(e){e.memoizedState!==null&&ee(Z,e);var n=ie.current,l=bh(n,e.type);n!==l&&(ee(ye,e),ee(ie,l))}function Ht(e){ye.current===e&&(I(ie),I(ye)),Z.current===e&&(I(Z),hr._currentValue=te)}var Gt,He;function Le(e){if(Gt===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Gt=n&&n[1]||"",He=-1)":-1u||A[r]!==O[u]){var Y=` +`+A[r].replace(" at new "," at ");return e.displayName&&Y.includes("")&&(Y=Y.replace("",e.displayName)),Y}while(1<=r&&0<=u);break}}}finally{Ct=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Le(l):""}function oi(e,n){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le("Lazy");case 13:return e.child!==n&&n!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return ma(e.type,!1);case 11:return ma(e.type.render,!1);case 1:return ma(e.type,!0);case 31:return Le("Activity");default:return""}}function gs(e){try{var n="",l=null;do n+=oi(e,l),l=e,e=e.return;while(e);return n}catch(r){return` +Error generating stack: `+r.message+` +`+r.stack}}var Al=Object.prototype.hasOwnProperty,ui=t.unstable_scheduleCallback,di=t.unstable_cancelCallback,Yr=t.unstable_shouldYield,ys=t.unstable_requestPaint,It=t.unstable_now,fi=t.unstable_getCurrentPriorityLevel,Ya=t.unstable_ImmediatePriority,El=t.unstable_UserBlockingPriority,Ka=t.unstable_NormalPriority,yn=t.unstable_LowPriority,_a=t.unstable_IdlePriority,Qa=t.log,Kr=t.unstable_setDisableYieldValue,Nl=null,Rt=null;function Xn(e){if(typeof Qa=="function"&&Kr(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(Nl,e)}catch{}}var Xt=Math.clz32?Math.clz32:ce,Zt=Math.log,Qr=Math.LN2;function ce(e){return e>>>=0,e===0?32:31-(Zt(e)/Qr|0)|0}var Zn=256,Ke=262144,Yt=4194304;function vn(e){var n=e&42;if(n!==0)return n;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 Pt(e,n,l){var r=e.pendingLanes;if(r===0)return 0;var u=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~f,r!==0?u=vn(r):(g&=S,g!==0?u=vn(g):l||(l=S&~e,l!==0&&(u=vn(l))))):(S=r&~f,S!==0?u=vn(S):g!==0?u=vn(g):l||(l=r&~e,l!==0&&(u=vn(l)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,l=n&-n,f>=l||f===32&&(l&4194048)!==0)?n:u}function At(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function mi(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 Jn(){var e=Yt;return Yt<<=1,(Yt&62914560)===0&&(Yt=4194304),e}function pa(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function ha(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jt(e,n,l,r,u,f){var g=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 S=e.entanglements,A=e.expirationTimes,O=e.hiddenUpdates;for(l=g&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var uu=/[\n"\\]/g;function Kt(e){return e.replace(uu,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function gi(e,n,l,r,u,f,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),n!=null?g==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Wt(n)):e.value!==""+Wt(n)&&(e.value=""+Wt(n)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),n!=null?vi(e,g,Wt(n)):l!=null?vi(e,g,Wt(l)):r!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Wt(S):e.removeAttribute("name")}function yi(e,n,l,r,u,f,g,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),n!=null||l!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Dl(e);return}l=l!=null?""+Wt(l):"",n=n!=null?""+Wt(n):l,S||n===e.value||(e.value=n),e.defaultValue=n}r=r??u,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Dl(e)}function vi(e,n,l){n==="number"&&Rl(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function va(e,n,l,r){if(e=e.options,n){n={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Es=!1;if(Ln)try{var Za={};Object.defineProperty(Za,"passive",{get:function(){Es=!0}}),window.addEventListener("test",Za,Za),window.removeEventListener("test",Za,Za)}catch{Es=!1}var ea=null,Ns=null,ki=null;function nc(){if(ki)return ki;var e,n=Ns,l=n.length,r,u="value"in ea?ea.value:ea.textContent,f=u.length;for(e=0;e=qs),Cm=" ",Am=!1;function Em(e,n){switch(e){case"keyup":return aa.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ei=!1;function Xv(e,n){switch(e){case"compositionend":return Nm(n);case"keypress":return n.which!==32?null:(Am=!0,Cm);case"textInput":return e=n.data,e===Cm&&Am?null:e;default:return null}}function Zv(e,n){if(Ei)return e==="compositionend"||!Ai&&Em(e,n)?(e=nc(),ki=Ns=ea=null,Ei=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:l,offset:n-e};e=r}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=qm(l)}}function Bm(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Bm(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Um(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Rl(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=Rl(e.document)}return n}function hu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var ab=Ln&&"documentMode"in document&&11>=document.documentMode,Ni=null,gu=null,Hs=null,yu=!1;function Hm(e,n,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;yu||Ni==null||Ni!==Rl(r)||(r=Ni,"selectionStart"in r&&hu(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}),Hs&&Us(Hs,r)||(Hs=r,r=eo(gu,"onSelect"),0>=g,u-=g,la=1<<32-Xt(n)+u|l<Ee?(ze=_e,_e=null):ze=_e.sibling;var Ye=q($,_e,z[Ee],K);if(Ye===null){_e===null&&(_e=ze);break}e&&_e&&Ye.alternate===null&&n($,_e),T=f(Ye,T,Ee),Ie===null?ve=Ye:Ie.sibling=Ye,Ie=Ye,_e=ze}if(Ee===z.length)return l($,_e),Oe&&xa($,Ee),ve;if(_e===null){for(;EeEe?(ze=_e,_e=null):ze=_e.sibling;var yl=q($,_e,Ye.value,K);if(yl===null){_e===null&&(_e=ze);break}e&&_e&&yl.alternate===null&&n($,_e),T=f(yl,T,Ee),Ie===null?ve=yl:Ie.sibling=yl,Ie=yl,_e=ze}if(Ye.done)return l($,_e),Oe&&xa($,Ee),ve;if(_e===null){for(;!Ye.done;Ee++,Ye=z.next())Ye=Q($,Ye.value,K),Ye!==null&&(T=f(Ye,T,Ee),Ie===null?ve=Ye:Ie.sibling=Ye,Ie=Ye);return Oe&&xa($,Ee),ve}for(_e=r(_e);!Ye.done;Ee++,Ye=z.next())Ye=U(_e,$,Ee,Ye.value,K),Ye!==null&&(e&&Ye.alternate!==null&&_e.delete(Ye.key===null?Ee:Ye.key),T=f(Ye,T,Ee),Ie===null?ve=Ye:Ie.sibling=Ye,Ie=Ye);return e&&_e.forEach(function(xS){return n($,xS)}),Oe&&xa($,Ee),ve}function We($,T,z,K){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 M:e:{for(var ve=z.key;T!==null;){if(T.key===ve){if(ve=z.type,ve===R){if(T.tag===7){l($,T.sibling),K=u(T,z.props.children),K.return=$,$=K;break e}}else if(T.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===F&&Yl(ve)===T.type){l($,T.sibling),K=u(T,z.props),Vs(K,z),K.return=$,$=K;break e}l($,T);break}else n($,T);T=T.sibling}z.type===R?(K=Bl(z.props.children,$.mode,K,z.key),K.return=$,$=K):(K=gc(z.type,z.key,z.props,null,$.mode,K),Vs(K,z),K.return=$,$=K)}return g($);case C:e:{for(ve=z.key;T!==null;){if(T.key===ve)if(T.tag===4&&T.stateNode.containerInfo===z.containerInfo&&T.stateNode.implementation===z.implementation){l($,T.sibling),K=u(T,z.children||[]),K.return=$,$=K;break e}else{l($,T);break}else n($,T);T=T.sibling}K=ju(z,$.mode,K),K.return=$,$=K}return g($);case F:return z=Yl(z),We($,T,z,K)}if(ge(z))return de($,T,z,K);if(Ne(z)){if(ve=Ne(z),typeof ve!="function")throw Error(s(150));return z=ve.call(z),ke($,T,z,K)}if(typeof z.then=="function")return We($,T,wc(z),K);if(z.$$typeof===G)return We($,T,bc($,z),K);jc($,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,T!==null&&T.tag===6?(l($,T.sibling),K=u(T,z),K.return=$,$=K):(l($,T),K=wu(z,$.mode,K),K.return=$,$=K),g($)):l($,T)}return function($,T,z,K){try{Qs=0;var ve=We($,T,z,K);return Ui=null,ve}catch(_e){if(_e===Bi||_e===kc)throw _e;var Ie=on(29,_e,null,$.mode);return Ie.lanes=K,Ie.return=$,Ie}finally{}}}var Ql=u_(!0),d_=u_(!1),tl=!1;function qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function nl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function al(e,n,l){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ve&2)!==0){var u=r.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),r.pending=n,n=hc(e),Xm(e,null,l),n}return pc(e,r,n,l),hc(e)}function Xs(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var r=n.lanes;r&=e.pendingLanes,l|=r,n.lanes=l,vs(e,l)}}function Bu(e,n){var l=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,l===r)){var u=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};f===null?u=f=g:f=f.next=g,l=l.next}while(l!==null);f===null?u=f=n:f=f.next=n}else u=f=n;l={baseState:r.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var Uu=!1;function Zs(){if(Uu){var e=Li;if(e!==null)throw e}}function Js(e,n,l,r){Uu=!1;var u=e.updateQueue;tl=!1;var f=u.firstBaseUpdate,g=u.lastBaseUpdate,S=u.shared.pending;if(S!==null){u.shared.pending=null;var A=S,O=A.next;A.next=null,g===null?f=O:g.next=O,g=A;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==g&&(S===null?Y.firstBaseUpdate=O:S.next=O,Y.lastBaseUpdate=A))}if(f!==null){var Q=u.baseState;g=0,Y=O=A=null,S=f;do{var q=S.lane&-536870913,U=q!==S.lane;if(U?(Me&q)===q:(r&q)===q){q!==0&&q===qi&&(Uu=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var de=e,ke=S;q=n;var We=l;switch(ke.tag){case 1:if(de=ke.payload,typeof de=="function"){Q=de.call(We,Q,q);break e}Q=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ke.payload,q=typeof de=="function"?de.call(We,Q,q):de,q==null)break e;Q=k({},Q,q);break e;case 2:tl=!0}}q=S.callback,q!==null&&(e.flags|=64,U&&(e.flags|=8192),U=u.callbacks,U===null?u.callbacks=[q]:U.push(q))}else U={lane:q,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(O=Y=U,A=Q):Y=Y.next=U,g|=q;if(S=S.next,S===null){if(S=u.shared.pending,S===null)break;U=S,S=U.next,U.next=null,u.lastBaseUpdate=U,u.shared.pending=null}}while(!0);Y===null&&(A=Q),u.baseState=A,u.firstBaseUpdate=O,u.lastBaseUpdate=Y,f===null&&(u.shared.lanes=0),cl|=g,e.lanes=g,e.memoizedState=Q}}function f_(e,n){if(typeof e!="function")throw Error(s(191,e));e.call(n)}function m_(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;ef?f:8;var g=L.T,S={};L.T=S,id(e,!1,n,l);try{var A=u(),O=L.S;if(O!==null&&O(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var Y=fb(A,r);Ws(e,n,Y,_n(e))}else Ws(e,n,r,_n(e))}catch(Q){Ws(e,n,{then:function(){},status:"rejected",reason:Q},_n())}finally{V.p=f,g!==null&&S.types!==null&&(g.types=S.types),L.T=g}}function yb(){}function ad(e,n,l,r){if(e.tag!==5)throw Error(s(476));var u=K_(e).queue;Y_(e,u,n,te,l===null?yb:function(){return Q_(e),l(r)})}function K_(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Aa,lastRenderedState:te},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Aa,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Q_(e){var n=K_(e);n.next===null&&(n=e.alternate.memoizedState),Ws(e,n.next.queue,{},_n())}function ld(){return zt(hr)}function V_(){return yt().memoizedState}function X_(){return yt().memoizedState}function vb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=_n();e=nl(l);var r=al(n,e,l);r!==null&&(ln(r,n,l),Xs(r,n,l)),n={cache:$u()},e.payload=n;return}n=n.return}}function bb(e,n,l){var r=_n();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},zc(e)?J_(n,l):(l=ku(e,n,l,r),l!==null&&(ln(l,e,r),F_(l,n,r)))}function Z_(e,n,l){var r=_n();Ws(e,n,l,r)}function Ws(e,n,l,r){var u={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(zc(e))J_(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var g=n.lastRenderedState,S=f(g,l);if(u.hasEagerState=!0,u.eagerState=S,cn(S,g))return pc(e,n,u,0),et===null&&_c(),!1}catch{}finally{}if(l=ku(e,n,u,r),l!==null)return ln(l,e,r),F_(l,n,r),!0}return!1}function id(e,n,l,r){if(r={lane:2,revertLane:qd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zc(e)){if(n)throw Error(s(479))}else n=ku(e,l,r,2),n!==null&&ln(n,e,2)}function zc(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function J_(e,n){Gi=Ec=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function F_(e,n,l){if((l&4194048)!==0){var r=n.lanes;r&=e.pendingLanes,l|=r,n.lanes=l,vs(e,l)}}var er={readContext:zt,use:Dc,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};er.useEffectEvent=mt;var P_={readContext:zt,use:Dc,useCallback:function(e,n){return Ft().memoizedState=[e,n===void 0?null:n],e},useContext:zt,useEffect:z_,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,$c(4194308,4,B_.bind(null,n,e),l)},useLayoutEffect:function(e,n){return $c(4194308,4,e,n)},useInsertionEffect:function(e,n){$c(4,2,e,n)},useMemo:function(e,n){var l=Ft();n=n===void 0?null:n;var r=e();if(Vl){Xn(!0);try{e()}finally{Xn(!1)}}return l.memoizedState=[r,n],r},useReducer:function(e,n,l){var r=Ft();if(l!==void 0){var u=l(n);if(Vl){Xn(!0);try{l(n)}finally{Xn(!1)}}}else u=n;return r.memoizedState=r.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},r.queue=e,e=e.dispatch=bb.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var n=Ft();return e={current:e},n.memoizedState=e},useState:function(e){e=Pu(e);var n=e.queue,l=Z_.bind(null,Ae,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:td,useDeferredValue:function(e,n){var l=Ft();return nd(l,e,n)},useTransition:function(){var e=Pu(!1);return e=Y_.bind(null,Ae,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var r=Ae,u=Ft();if(Oe){if(l===void 0)throw Error(s(407));l=l()}else{if(l=n(),et===null)throw Error(s(349));(Me&127)!==0||v_(r,n,l)}u.memoizedState=l;var f={value:l,getSnapshot:n};return u.queue=f,z_(S_.bind(null,r,f,e),[e]),r.flags|=2048,Yi(9,{destroy:void 0},b_.bind(null,r,f,l,n),null),l},useId:function(){var e=Ft(),n=et.identifierPrefix;if(Oe){var l=ia,r=la;l=(r&~(1<<32-Xt(r)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Nc++,0<\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?g.createElement("select",{is:r.is}):g.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?g.createElement(u,{is:r.is}):g.createElement(u)}}f[Et]=n,f[rt]=r;e:for(g=n.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===n)break e;for(;g.sibling===null;){if(g.return===null||g.return===n)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}n.stateNode=f;e:switch(qt(f,u,r),u){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Na(n)}}return it(n),vd(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==r&&Na(n);else{if(typeof r!="string"&&n.stateNode===null)throw Error(s(166));if(e=we.current,zi(n)){if(e=n.stateNode,l=n.memoizedProps,r=null,u=Mt,u!==null)switch(u.tag){case 27:case 5:r=u.memoizedProps}e[Et]=n,e=!!(e.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||gh(e.nodeValue,l)),e||Wa(n,!0)}else e=to(e).createTextNode(r),e[Et]=n,n.stateNode=e}return it(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(r=zi(n),l!==null){if(e===null){if(!r)throw Error(s(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[Et]=n}else Ul(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;it(n),e=!1}else l=Nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(dn(n),n):(dn(n),null);if((n.flags&128)!==0)throw Error(s(558))}return it(n),null;case 13:if(r=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=zi(n),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(s(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[Et]=n}else Ul(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;it(n),u=!1}else u=Nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(dn(n),n):(dn(n),null)}return dn(n),(n.flags&128)!==0?(n.lanes=l,n):(l=r!==null,e=e!==null&&e.memoizedState!==null,l&&(r=n.child,u=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(u=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==u&&(r.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Uc(n,n.updateQueue),it(n),null);case 4:return Be(),e===null&&Hd(n.stateNode.containerInfo),it(n),null;case 10:return ja(n.type),it(n),null;case 19:if(I(gt),r=n.memoizedState,r===null)return it(n),null;if(u=(n.flags&128)!==0,f=r.rendering,f===null)if(u)nr(r,!1);else{if(_t!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Ac(e),f!==null){for(n.flags|=128,nr(r,!1),e=f.updateQueue,n.updateQueue=e,Uc(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Zm(l,e),l=l.sibling;return ee(gt,gt.current&1|2),Oe&&xa(n,r.treeForkCount),n.child}e=e.sibling}r.tail!==null&&It()>Kc&&(n.flags|=128,u=!0,nr(r,!1),n.lanes=4194304)}else{if(!u)if(e=Ac(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,Uc(n,e),nr(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!Oe)return it(n),null}else 2*It()-r.renderingStartTime>Kc&&l!==536870912&&(n.flags|=128,u=!0,nr(r,!1),n.lanes=4194304);r.isBackwards?(f.sibling=n.child,n.child=f):(e=r.last,e!==null?e.sibling=f:n.child=f,r.last=f)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=It(),e.sibling=null,l=gt.current,ee(gt,u?l&1|2:l&1),Oe&&xa(n,r.treeForkCount),e):(it(n),null);case 22:case 23:return dn(n),Gu(),r=n.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?(l&536870912)!==0&&(n.flags&128)===0&&(it(n),n.subtreeFlags&6&&(n.flags|=8192)):it(n),l=n.updateQueue,l!==null&&Uc(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==l&&(n.flags|=2048),e!==null&&I(Il),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ja(bt),it(n),null;case 25:return null;case 30:return null}throw Error(s(156,n.tag))}function jb(e,n){switch(Au(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ja(bt),Be(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ht(n),null;case 31:if(n.memoizedState!==null){if(dn(n),n.alternate===null)throw Error(s(340));Ul()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(dn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));Ul()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return I(gt),null;case 4:return Be(),null;case 10:return ja(n.type),null;case 22:case 23:return dn(n),Gu(),e!==null&&I(Il),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ja(bt),null;case 25:return null;default:return null}}function kp(e,n){switch(Au(n),n.tag){case 3:ja(bt),Be();break;case 26:case 27:case 5:Ht(n);break;case 4:Be();break;case 31:n.memoizedState!==null&&dn(n);break;case 13:dn(n);break;case 19:I(gt);break;case 10:ja(n.type);break;case 22:case 23:dn(n),Gu(),e!==null&&I(Il);break;case 24:ja(bt)}}function ar(e,n){try{var l=n.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var u=r.next;l=u;do{if((l.tag&e)===e){r=void 0;var f=l.create,g=l.inst;r=f(),g.destroy=r}l=l.next}while(l!==u)}}catch(S){Je(n,n.return,S)}}function sl(e,n,l){try{var r=n.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var f=u.next;r=f;do{if((r.tag&e)===e){var g=r.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,u=n;var A=l,O=S;try{O()}catch(Y){Je(u,A,Y)}}}r=r.next}while(r!==f)}}catch(Y){Je(n,n.return,Y)}}function xp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{m_(n,l)}catch(r){Je(e,e.return,r)}}}function wp(e,n,l){l.props=Xl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(r){Je(e,n,r)}}function lr(e,n){try{var l=e.ref;if(l!==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 l=="function"?e.refCleanup=l(r):l.current=r}}catch(u){Je(e,n,u)}}function sa(e,n){var l=e.ref,r=e.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(u){Je(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(u){Je(e,n,u)}else l.current=null}function jp(e){var n=e.type,l=e.memoizedProps,r=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break e;case"img":l.src?r.src=l.src:l.srcSet&&(r.srcset=l.srcSet)}}catch(u){Je(e,e.return,u)}}function bd(e,n,l){try{var r=e.stateNode;Vb(r,e.type,l,n),r[rt]=n}catch(u){Je(e,e.return,u)}}function Cp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ml(e.type)||e.tag===4}function Sd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cp(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&&ml(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 kd(e,n,l){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=qn));else if(r!==4&&(r===27&&ml(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(kd(e,n,l),e=e.sibling;e!==null;)kd(e,n,l),e=e.sibling}function Hc(e,n,l){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(r!==4&&(r===27&&ml(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Hc(e,n,l),e=e.sibling;e!==null;)Hc(e,n,l),e=e.sibling}function Ap(e){var n=e.stateNode,l=e.memoizedProps;try{for(var r=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);qt(n,r,l),n[Et]=e,n[rt]=l}catch(f){Je(e,e.return,f)}}var Ta=!1,xt=!1,xd=!1,Ep=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function Cb(e,n){if(e=e.containerInfo,Yd=co,e=Um(e),hu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var r=l.getSelection&&l.getSelection();if(r&&r.rangeCount!==0){l=r.anchorNode;var u=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var g=0,S=-1,A=-1,O=0,Y=0,Q=e,q=null;t:for(;;){for(var U;Q!==l||u!==0&&Q.nodeType!==3||(S=g+u),Q!==f||r!==0&&Q.nodeType!==3||(A=g+r),Q.nodeType===3&&(g+=Q.nodeValue.length),(U=Q.firstChild)!==null;)q=Q,Q=U;for(;;){if(Q===e)break t;if(q===l&&++O===u&&(S=g),q===f&&++Y===r&&(A=g),(U=Q.nextSibling)!==null)break;Q=q,q=Q.parentNode}Q=U}l=S===-1||A===-1?null:{start:S,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Kd={focusedElem:e,selectionRange:l},co=!1,Dt=n;Dt!==null;)if(n=Dt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Dt=e;else for(;Dt!==null;){switch(n=Dt,f=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title"))),qt(f,r,l),f[Et]=e,pt(f),r=f;break e;case"link":var g=Mh("link","href",u).get(r+(l.href||""));if(g){for(var S=0;SWe&&(g=We,We=ke,ke=g);var $=Lm(S,ke),T=Lm(S,We);if($&&T&&(U.rangeCount!==1||U.anchorNode!==$.node||U.anchorOffset!==$.offset||U.focusNode!==T.node||U.focusOffset!==T.offset)){var z=Q.createRange();z.setStart($.node,$.offset),U.removeAllRanges(),ke>We?(U.addRange(z),U.extend(T.node,T.offset)):(z.setEnd(T.node,T.offset),U.addRange(z))}}}}for(Q=[],U=S;U=U.parentNode;)U.nodeType===1&&Q.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;Sl?32:l,L.T=null,l=Td,Td=null;var f=ul,g=za;if(Nt=0,Zi=ul=null,za=0,(Ve&6)!==0)throw Error(s(331));var S=Ve;if(Ve|=4,Bp(f.current),Op(f,f.current,g,l),Ve=S,ur(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Nl,f)}catch{}return!0}finally{V.p=u,L.T=r,ah(e,n)}}function ih(e,n,l){n=xn(l,n),n=od(e.stateNode,n,2),e=al(e,n,2),e!==null&&(ha(e,2),ra(e))}function Je(e,n,l){if(e.tag===3)ih(e,e,l);else for(;n!==null;){if(n.tag===3){ih(n,e,l);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ol===null||!ol.has(r))){e=xn(l,e),l=sp(2),r=al(n,l,2),r!==null&&(rp(l,r,n,e),ha(r,2),ra(r));break}}n=n.return}}function Md(e,n,l){var r=e.pingCache;if(r===null){r=e.pingCache=new Nb;var u=new Set;r.set(n,u)}else u=r.get(n),u===void 0&&(u=new Set,r.set(n,u));u.has(l)||(Cd=!0,u.add(l),e=Mb.bind(null,e,n,l),n.then(e,e))}function Mb(e,n,l){var r=e.pingCache;r!==null&&r.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,et===e&&(Me&l)===l&&(_t===4||_t===3&&(Me&62914560)===Me&&300>It()-Yc?(Ve&2)===0&&Ji(e,0):Ad|=l,Xi===Me&&(Xi=0)),ra(e)}function sh(e,n){n===0&&(n=Jn()),e=Ll(e,n),e!==null&&(ha(e,n),ra(e))}function zb(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),sh(e,l)}function Ob(e,n){var l=0;switch(e.tag){case 31:case 13:var r=e.stateNode,u=e.memoizedState;u!==null&&(l=u.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(n),sh(e,l)}function qb(e,n){return ui(e,n)}var Fc=null,Pi=null,zd=!1,Pc=!1,Od=!1,fl=0;function ra(e){e!==Pi&&e.next===null&&(Pi===null?Fc=Pi=e:Pi=Pi.next=e),Pc=!0,zd||(zd=!0,Bb())}function ur(e,n){if(!Od&&Pc){Od=!0;do for(var l=!1,r=Fc;r!==null;){if(e!==0){var u=r.pendingLanes;if(u===0)var f=0;else{var g=r.suspendedLanes,S=r.pingedLanes;f=(1<<31-Xt(42|e)+1)-1,f&=u&~(g&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(l=!0,uh(r,f))}else f=Me,f=Pt(r,r===et?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||At(r,f)||(l=!0,uh(r,f));r=r.next}while(l);Od=!1}}function Lb(){rh()}function rh(){Pc=zd=!1;var e=0;fl!==0&&Zb()&&(e=fl);for(var n=It(),l=null,r=Fc;r!==null;){var u=r.next,f=ch(r,n);f===0?(r.next=null,l===null?Fc=u:l.next=u,u===null&&(Pi=l)):(l=r,(e!==0||(f&3)!==0)&&(Pc=!0)),r=u}Nt!==0&&Nt!==5||ur(e),fl!==0&&(fl=0)}function ch(e,n){for(var l=e.suspendedLanes,r=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0S)break;var Y=A.transferSize,Q=A.initiatorType;Y&&yh(Q)&&(A=A.responseEnd,g+=Y*(A"u"?null:document;function Th(e,n,l){var r=Wi;if(r&&typeof n=="string"&&n){var u=Kt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof l=="string"&&(u+='[crossorigin="'+l+'"]'),Nh.has(u)||(Nh.add(u),e={rel:e,crossOrigin:l,href:n},r.querySelector(u)===null&&(n=r.createElement("link"),qt(n,"link",e),pt(n),r.head.appendChild(n)))}}function lS(e){Oa.D(e),Th("dns-prefetch",e,null)}function iS(e,n){Oa.C(e,n),Th("preconnect",e,n)}function sS(e,n,l){Oa.L(e,n,l);var r=Wi;if(r&&e&&n){var u='link[rel="preload"][as="'+Kt(n)+'"]';n==="image"&&l&&l.imageSrcSet?(u+='[imagesrcset="'+Kt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(u+='[imagesizes="'+Kt(l.imageSizes)+'"]')):u+='[href="'+Kt(e)+'"]';var f=u;switch(n){case"style":f=es(e);break;case"script":f=ts(e)}Nn.has(f)||(e=k({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),Nn.set(f,e),r.querySelector(u)!==null||n==="style"&&r.querySelector(_r(f))||n==="script"&&r.querySelector(pr(f))||(n=r.createElement("link"),qt(n,"link",e),pt(n),r.head.appendChild(n)))}}function rS(e,n){Oa.m(e,n);var l=Wi;if(l&&e){var r=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Kt(r)+'"][href="'+Kt(e)+'"]',f=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=ts(e)}if(!Nn.has(f)&&(e=k({rel:"modulepreload",href:e},n),Nn.set(f,e),l.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pr(f)))return}r=l.createElement("link"),qt(r,"link",e),pt(r),l.head.appendChild(r)}}}function cS(e,n,l){Oa.S(e,n,l);var r=Wi;if(r&&e){var u=ya(r).hoistableStyles,f=es(e);n=n||"default";var g=u.get(f);if(!g){var S={loading:0,preload:null};if(g=r.querySelector(_r(f)))S.loading=5;else{e=k({rel:"stylesheet",href:e,"data-precedence":n},l),(l=Nn.get(f))&&Pd(e,l);var A=g=r.createElement("link");pt(A),qt(A,"link",e),A._p=new Promise(function(O,Y){A.onload=O,A.onerror=Y}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,ao(g,n,r)}g={type:"stylesheet",instance:g,count:1,state:S},u.set(f,g)}}}function oS(e,n){Oa.X(e,n);var l=Wi;if(l&&e){var r=ya(l).hoistableScripts,u=ts(e),f=r.get(u);f||(f=l.querySelector(pr(u)),f||(e=k({src:e,async:!0},n),(n=Nn.get(u))&&Wd(e,n),f=l.createElement("script"),pt(f),qt(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(u,f))}}function uS(e,n){Oa.M(e,n);var l=Wi;if(l&&e){var r=ya(l).hoistableScripts,u=ts(e),f=r.get(u);f||(f=l.querySelector(pr(u)),f||(e=k({src:e,async:!0,type:"module"},n),(n=Nn.get(u))&&Wd(e,n),f=l.createElement("script"),pt(f),qt(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(u,f))}}function Dh(e,n,l,r){var u=(u=we.current)?no(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=es(l.href),l=ya(u).hoistableStyles,r=l.get(n),r||(r={type:"style",instance:null,count:0,state:null},l.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=es(l.href);var f=ya(u).hoistableStyles,g=f.get(e);if(g||(u=u.ownerDocument||u,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=u.querySelector(_r(e)))&&!f._p&&(g.instance=f,g.state.loading=5),Nn.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},Nn.set(e,l),f||dS(u,e,l,g.state))),n&&r===null)throw Error(s(528,""));return g}if(n&&r!==null)throw Error(s(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ts(l),l=ya(u).hoistableScripts,r=l.get(n),r||(r={type:"script",instance:null,count:0,state:null},l.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function es(e){return'href="'+Kt(e)+'"'}function _r(e){return'link[rel="stylesheet"]['+e+"]"}function Rh(e){return k({},e,{"data-precedence":e.precedence,precedence:null})}function dS(e,n,l,r){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=e.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),qt(n,"link",l),pt(n),e.head.appendChild(n))}function ts(e){return'[src="'+Kt(e)+'"]'}function pr(e){return"script[async]"+e}function $h(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var r=e.querySelector('style[data-href~="'+Kt(l.href)+'"]');if(r)return n.instance=r,pt(r),r;var u=k({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),pt(r),qt(r,"style",u),ao(r,l.precedence,e),n.instance=r;case"stylesheet":u=es(l.href);var f=e.querySelector(_r(u));if(f)return n.state.loading|=4,n.instance=f,pt(f),f;r=Rh(l),(u=Nn.get(u))&&Pd(r,u),f=(e.ownerDocument||e).createElement("link"),pt(f);var g=f;return g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),qt(f,"link",r),n.state.loading|=4,ao(f,l.precedence,e),n.instance=f;case"script":return f=ts(l.src),(u=e.querySelector(pr(f)))?(n.instance=u,pt(u),u):(r=l,(u=Nn.get(f))&&(r=k({},l),Wd(r,u)),e=e.ownerDocument||e,u=e.createElement("script"),pt(u),qt(u,"link",r),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,ao(r,l.precedence,e));return n.instance}function ao(e,n,l){for(var r=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,f=u,g=0;g title"):null)}function fS(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Oh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mS(e,n,l,r){if(l.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var u=es(r.href),f=n.querySelector(_r(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=io.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=f,pt(f);return}f=n.ownerDocument||n,r=Rh(r),(u=Nn.get(u))&&Pd(r,u),f=f.createElement("link"),pt(f);var g=f;g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),qt(f,"link",r),l.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=io.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var ef=0;function _S(e,n){return e.stylesheets&&e.count===0&&ro(e,e.stylesheets),0ef?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function io(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ro(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var so=null;function ro(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,so=new Map,n.forEach(pS,e),so=null,io.call(e))}function pS(e,n){if(!(n.state.loading&4)){var l=so.get(e);if(l)var r=l.get(null);else{l=new Map,so.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(t)}catch(a){console.error(a)}}return t(),uf.exports=$S(),uf.exports}var zS=MS();/** + * 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 sg="popstate";function rg(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function OS(t={}){function a(c,d){let{pathname:_="/",search:y="",hash:p=""}=ii(c.location.hash.substring(1));return!_.startsWith("/")&&!_.startsWith(".")&&(_="/"+_),Tf("",{pathname:_,search:y,hash:p},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(c,d){let _=c.document.querySelector("base"),y="";if(_&&_.getAttribute("href")){let p=c.location.href,h=p.indexOf("#");y=h===-1?p:p.slice(0,h)}return y+"#"+(typeof d=="string"?d:$r(d))}function s(c,d){Dn(c.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(d)})`)}return LS(a,i,s,t)}function ut(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function Dn(t,a){if(!t){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function qS(){return Math.random().toString(36).substring(2,10)}function cg(t,a){return{usr:t.state,key:t.key,idx:a,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function Tf(t,a,i=null,s,c){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof a=="string"?ii(a):a,state:i,key:a&&a.key||s||qS(),mask:c}}function $r({pathname:t="/",search:a="",hash:i=""}){return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function ii(t){let a={};if(t){let i=t.indexOf("#");i>=0&&(a.hash=t.substring(i),t=t.substring(0,i));let s=t.indexOf("?");s>=0&&(a.search=t.substring(s),t=t.substring(0,s)),t&&(a.pathname=t)}return a}function LS(t,a,i,s={}){let{window:c=document.defaultView,v5Compat:d=!1}=s,_=c.history,y="POP",p=null,h=b();h==null&&(h=0,_.replaceState({..._.state,idx:h},""));function b(){return(_.state||{idx:null}).idx}function k(){y="POP";let N=b(),j=N==null?null:N-h;h=N,p&&p({action:y,location:R.location,delta:j})}function w(N,j){y="PUSH";let H=rg(N)?N:Tf(R.location,N,j);i&&i(H,N),h=b()+1;let G=cg(H,h),ne=R.createHref(H.mask||H);try{_.pushState(G,"",ne)}catch(ae){if(ae instanceof DOMException&&ae.name==="DataCloneError")throw ae;c.location.assign(ne)}d&&p&&p({action:y,location:R.location,delta:1})}function M(N,j){y="REPLACE";let H=rg(N)?N:Tf(R.location,N,j);i&&i(H,N),h=b();let G=cg(H,h),ne=R.createHref(H.mask||H);_.replaceState(G,"",ne),d&&p&&p({action:y,location:R.location,delta:0})}function C(N){return BS(c,N)}let R={get action(){return y},get location(){return t(c,_)},listen(N){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(sg,k),p=N,()=>{c.removeEventListener(sg,k),p=null}},createHref(N){return a(c,N)},createURL:C,encodeLocation(N){let j=C(N);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:w,replace:M,go(N){return _.go(N)}};return R}function BS(t,a,i=!1){let s="http://localhost";t&&(s=t.location.origin!=="null"?t.location.origin:t.location.href),ut(s,"No window.location.(origin|href) available to create URL");let c=typeof a=="string"?a:$r(a);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=s+c),new URL(c,s)}function my(t,a,i="/"){return US(t,a,i,!1)}function US(t,a,i,s,c){let d=typeof a=="string"?ii(a):a,_=Ua(d.pathname||"/",i);if(_==null)return null;let y=HS(t),p=null,h=WS(_);for(let b=0;p==null&&b{let b={relativePath:h===void 0?_.path||"":h,caseSensitive:_.caseSensitive===!0,childrenIndex:y,route:_};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&p)return;ut(b.relativePath.startsWith(s),`Absolute route path "${b.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(s.length)}let k=Yn([s,b.relativePath]),w=i.concat(b);_.children&&_.children.length>0&&(ut(_.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${k}".`),_y(_.children,a,w,k,p)),!(_.path==null&&!_.index)&&a.push({path:k,score:ZS(k,_.index),routesMeta:w})};return t.forEach((_,y)=>{var p;if(_.path===""||!((p=_.path)!=null&&p.includes("?")))d(_,y);else for(let h of py(_.path))d(_,y,!0,h)}),a}function py(t){let a=t.split("/");if(a.length===0)return[];let[i,...s]=a,c=i.endsWith("?"),d=i.replace(/\?$/,"");if(s.length===0)return c?[d,""]:[d];let _=py(s.join("/")),y=[];return y.push(..._.map(p=>p===""?d:[d,p].join("/"))),c&&y.push(..._),y.map(p=>t.startsWith("/")&&p===""?"/":p)}function GS(t){t.sort((a,i)=>a.score!==i.score?i.score-a.score:JS(a.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var IS=/^:[\w-]+$/,YS=3,KS=2,QS=1,VS=10,XS=-2,og=t=>t==="*";function ZS(t,a){let i=t.split("/"),s=i.length;return i.some(og)&&(s+=XS),a&&(s+=KS),i.filter(c=>!og(c)).reduce((c,d)=>c+(IS.test(d)?YS:d===""?QS:VS),s)}function JS(t,a){return t.length===a.length&&t.slice(0,-1).every((s,c)=>s===a[c])?t[t.length-1]-a[a.length-1]:0}function FS(t,a,i=!1){let{routesMeta:s}=t,c={},d="/",_=[];for(let y=0;y{if(b==="*"){let C=y[w]||"";_=d.slice(0,d.length-C.length).replace(/(.)\/+$/,"$1")}const M=y[w];return k&&!M?h[b]=void 0:h[b]=(M||"").replace(/%2F/g,"/"),h},{}),pathname:d,pathnameBase:_,pattern:t}}function PS(t,a=!1,i=!0){Dn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let s=[],c="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(_,y,p,h,b)=>{if(s.push({paramName:y,isOptional:p!=null}),p){let k=b.charAt(h+_.length);return k&&k!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(s.push({paramName:"*"}),c+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?c+="\\/*$":t!==""&&t!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),s]}function WS(t){try{return t.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Dn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),t}}function Ua(t,a){if(a==="/")return t;if(!t.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,s=t.charAt(i);return s&&s!=="/"?null:t.slice(i)||"/"}var e0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function t0(t,a="/"){let{pathname:i,search:s="",hash:c=""}=typeof t=="string"?ii(t):t,d;return i?(i=hy(i),i.startsWith("/")?d=ug(i.substring(1),"/"):d=ug(i,a)):d=a,{pathname:d,search:l0(s),hash:i0(c)}}function ug(t,a){let i=To(a).split("/");return t.split("/").forEach(c=>{c===".."?i.length>1&&i.pop():c!=="."&&i.push(c)}),i.length>1?i.join("/"):"/"}function _f(t,a,i,s){return`Cannot include a '${t}' character in a manually specified \`to.${a}\` field [${JSON.stringify(s)}]. 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 n0(t){return t.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Pf(t){let a=n0(t);return a.map((i,s)=>s===a.length-1?i.pathname:i.pathnameBase)}function Yo(t,a,i,s=!1){let c;typeof t=="string"?c=ii(t):(c={...t},ut(!c.pathname||!c.pathname.includes("?"),_f("?","pathname","search",c)),ut(!c.pathname||!c.pathname.includes("#"),_f("#","pathname","hash",c)),ut(!c.search||!c.search.includes("#"),_f("#","search","hash",c)));let d=t===""||c.pathname==="",_=d?"/":c.pathname,y;if(_==null)y=i;else{let k=a.length-1;if(!s&&_.startsWith("..")){let w=_.split("/");for(;w[0]==="..";)w.shift(),k-=1;c.pathname=w.join("/")}y=k>=0?a[k]:"/"}let p=t0(c,y),h=_&&_!=="/"&&_.endsWith("/"),b=(d||_===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(h||b)&&(p.pathname+="/"),p}var hy=t=>t.replace(/\/\/+/g,"/"),Yn=t=>hy(t.join("/")),To=t=>t.replace(/\/+$/,""),a0=t=>To(t).replace(/^\/*/,"/"),l0=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,i0=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,s0=class{constructor(t,a,i,s=!1){this.status=t,this.statusText=a||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function r0(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function c0(t){let a=t.map(i=>i.route.path).filter(Boolean);return Yn(a)||"/"}var gy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yy(t,a){let i=t;if(typeof i!="string"||!e0.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,c=!1;if(gy)try{let d=new URL(window.location.href),_=i.startsWith("//")?new URL(d.protocol+i):new URL(i),y=Ua(_.pathname,a);_.origin===d.origin&&y!=null?i=y+_.search+_.hash:c=!0}catch{Dn(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:c,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var vy=["POST","PUT","PATCH","DELETE"];new Set(vy);var o0=["GET",...vy];new Set(o0);var us=x.createContext(null);us.displayName="DataRouter";var Ko=x.createContext(null);Ko.displayName="DataRouterState";var by=x.createContext(!1);function u0(){return x.useContext(by)}var Sy=x.createContext({isTransitioning:!1});Sy.displayName="ViewTransition";var d0=x.createContext(new Map);d0.displayName="Fetchers";var f0=x.createContext(null);f0.displayName="Await";var hn=x.createContext(null);hn.displayName="Navigation";var qr=x.createContext(null);qr.displayName="Location";var da=x.createContext({outlet:null,matches:[],isDataRoute:!1});da.displayName="Route";var Wf=x.createContext(null);Wf.displayName="RouteError";var ky="REACT_ROUTER_ERROR",m0="REDIRECT",_0="ROUTE_ERROR_RESPONSE";function p0(t){if(t.startsWith(`${ky}:${m0}:{`))try{let a=JSON.parse(t.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 h0(t){if(t.startsWith(`${ky}:${_0}:{`))try{let a=JSON.parse(t.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new s0(a.status,a.statusText,a.data)}catch{}}function g0(t,{relative:a}={}){ut(ds(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:s}=x.useContext(hn),{hash:c,pathname:d,search:_}=Lr(t,{relative:a}),y=d;return i!=="/"&&(y=d==="/"?i:Yn([i,d])),s.createHref({pathname:y,search:_,hash:c})}function ds(){return x.useContext(qr)!=null}function Vn(){return ut(ds(),"useLocation() may be used only in the context of a component."),x.useContext(qr).location}var xy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wy(t){x.useContext(hn).static||x.useLayoutEffect(t)}function em(){let{isDataRoute:t}=x.useContext(da);return t?T0():y0()}function y0(){ut(ds(),"useNavigate() may be used only in the context of a component.");let t=x.useContext(us),{basename:a,navigator:i}=x.useContext(hn),{matches:s}=x.useContext(da),{pathname:c}=Vn(),d=JSON.stringify(Pf(s)),_=x.useRef(!1);return wy(()=>{_.current=!0}),x.useCallback((p,h={})=>{if(Dn(_.current,xy),!_.current)return;if(typeof p=="number"){i.go(p);return}let b=Yo(p,JSON.parse(d),c,h.relative==="path");t==null&&a!=="/"&&(b.pathname=b.pathname==="/"?a:Yn([a,b.pathname])),(h.replace?i.replace:i.push)(b,h.state,h)},[a,i,d,c,t])}x.createContext(null);function Lr(t,{relative:a}={}){let{matches:i}=x.useContext(da),{pathname:s}=Vn(),c=JSON.stringify(Pf(i));return x.useMemo(()=>Yo(t,JSON.parse(c),s,a==="path"),[t,c,s,a])}function v0(t,a){return jy(t,a)}function jy(t,a,i){var N;ut(ds(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=x.useContext(hn),{matches:c}=x.useContext(da),d=c[c.length-1],_=d?d.params:{},y=d?d.pathname:"/",p=d?d.pathnameBase:"/",h=d&&d.route;{let j=h&&h.path||"";Ay(y,!h||j.endsWith("*")||j.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 b=Vn(),k;if(a){let j=typeof a=="string"?ii(a):a;ut(p==="/"||((N=j.pathname)==null?void 0:N.startsWith(p)),`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 "${p}" but pathname "${j.pathname}" was given in the \`location\` prop.`),k=j}else k=b;let w=k.pathname||"/",M=w;if(p!=="/"){let j=p.replace(/^\//,"").split("/");M="/"+w.replace(/^\//,"").split("/").slice(j.length).join("/")}let C=i&&i.state.matches.length?i.state.matches.map(j=>Object.assign(j,{route:i.manifest[j.route.id]||j.route})):my(t,{pathname:M});Dn(h||C!=null,`No routes matched location "${k.pathname}${k.search}${k.hash}" `),Dn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${k.pathname}${k.search}${k.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=w0(C&&C.map(j=>Object.assign({},j,{params:Object.assign({},_,j.params),pathname:Yn([p,s.encodeLocation?s.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?p:Yn([p,s.encodeLocation?s.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),c,i);return a&&R?x.createElement(qr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...k},navigationType:"POP"}},R):R}function b0(){let t=N0(),a=r0(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},d={padding:"2px 4px",backgroundColor:s},_=null;return console.error("Error handled by React Router default ErrorBoundary:",t),_=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:d},"ErrorBoundary")," or"," ",x.createElement("code",{style:d},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},a),i?x.createElement("pre",{style:c},i):null,_)}var S0=x.createElement(b0,null),Cy=class extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){this.props.onError?this.props.onError(t,a):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const i=h0(t.digest);i&&(t=i)}let a=t!==void 0?x.createElement(da.Provider,{value:this.props.routeContext},x.createElement(Wf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?x.createElement(k0,{error:t},a):a}};Cy.contextType=by;var pf=new WeakMap;function k0({children:t,error:a}){let{basename:i}=x.useContext(hn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let s=p0(a.digest);if(s){let c=pf.get(a);if(c)throw c;let d=yy(s.location,i);if(gy&&!pf.get(a))if(d.isExternal||s.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const _=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:s.replace}));throw pf.set(a,_),_}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return t}function x0({routeContext:t,match:a,children:i}){let s=x.useContext(us);return s&&s.static&&s.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=a.route.id),x.createElement(da.Provider,{value:t},i)}function w0(t,a=[],i){let s=i==null?void 0:i.state;if(t==null){if(!s)return null;if(s.errors)t=s.matches;else if(a.length===0&&!s.initialized&&s.matches.length>0)t=s.matches;else return null}let c=t,d=s==null?void 0:s.errors;if(d!=null){let b=c.findIndex(k=>k.route.id&&(d==null?void 0:d[k.route.id])!==void 0);ut(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,b+1))}let _=!1,y=-1;if(i&&s){_=s.renderFallback;for(let b=0;b=0?c=c.slice(0,y+1):c=[c[0]];break}}}}let p=i==null?void 0:i.onError,h=s&&p?(b,k)=>{var w,M;p(b,{location:s.location,params:((M=(w=s.matches)==null?void 0:w[0])==null?void 0:M.params)??{},pattern:c0(s.matches),errorInfo:k})}:void 0;return c.reduceRight((b,k,w)=>{let M,C=!1,R=null,N=null;s&&(M=d&&k.route.id?d[k.route.id]:void 0,R=k.route.errorElement||S0,_&&(y<0&&w===0?(Ay("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,N=null):y===w&&(C=!0,N=k.route.hydrateFallbackElement||null)));let j=a.concat(c.slice(0,w+1)),H=()=>{let G;return M?G=R:C?G=N:k.route.Component?G=x.createElement(k.route.Component,null):k.route.element?G=k.route.element:G=b,x.createElement(x0,{match:k,routeContext:{outlet:b,matches:j,isDataRoute:s!=null},children:G})};return s&&(k.route.ErrorBoundary||k.route.errorElement||w===0)?x.createElement(Cy,{location:s.location,revalidation:s.revalidation,component:R,error:M,children:H(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:h}):H()},null)}function tm(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function j0(t){let a=x.useContext(us);return ut(a,tm(t)),a}function C0(t){let a=x.useContext(Ko);return ut(a,tm(t)),a}function A0(t){let a=x.useContext(da);return ut(a,tm(t)),a}function nm(t){let a=A0(t),i=a.matches[a.matches.length-1];return ut(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function E0(){return nm("useRouteId")}function N0(){var s;let t=x.useContext(Wf),a=C0("useRouteError"),i=nm("useRouteError");return t!==void 0?t:(s=a.errors)==null?void 0:s[i]}function T0(){let{router:t}=j0("useNavigate"),a=nm("useNavigate"),i=x.useRef(!1);return wy(()=>{i.current=!0}),x.useCallback(async(c,d={})=>{Dn(i.current,xy),i.current&&(typeof c=="number"?await t.navigate(c):await t.navigate(c,{fromRouteId:a,...d}))},[t,a])}var dg={};function Ay(t,a,i){!a&&!dg[t]&&(dg[t]=!0,Dn(!1,i))}x.memo(D0);function D0({routes:t,manifest:a,future:i,state:s,isStatic:c,onError:d}){return jy(t,void 0,{manifest:a,state:s,isStatic:c,onError:d})}function R0({to:t,replace:a,state:i,relative:s}){ut(ds()," may be used only in the context of a component.");let{static:c}=x.useContext(hn);Dn(!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}=x.useContext(da),{pathname:_}=Vn(),y=em(),p=Yo(t,Pf(d),_,s==="path"),h=JSON.stringify(p);return x.useEffect(()=>{y(JSON.parse(h),{replace:a,state:i,relative:s})},[y,h,s,a,i]),null}function Df(t){ut(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function $0({basename:t="/",children:a=null,location:i,navigationType:s="POP",navigator:c,static:d=!1,useTransitions:_}){ut(!ds(),"You cannot render a inside another . You should never have more than one in your app.");let y=t.replace(/^\/*/,"/"),p=x.useMemo(()=>({basename:y,navigator:c,static:d,useTransitions:_,future:{}}),[y,c,d,_]);typeof i=="string"&&(i=ii(i));let{pathname:h="/",search:b="",hash:k="",state:w=null,key:M="default",mask:C}=i,R=x.useMemo(()=>{let N=Ua(h,y);return N==null?null:{location:{pathname:N,search:b,hash:k,state:w,key:M,mask:C},navigationType:s}},[y,h,b,k,w,M,s,C]);return Dn(R!=null,` is not able to match the URL "${h}${b}${k}" because it does not start with the basename, so the won't render anything.`),R==null?null:x.createElement(hn.Provider,{value:p},x.createElement(qr.Provider,{children:a,value:R}))}function M0({children:t,location:a}){return v0(Rf(t),a)}function Rf(t,a=[]){let i=[];return x.Children.forEach(t,(s,c)=>{if(!x.isValidElement(s))return;let d=[...a,c];if(s.type===x.Fragment){i.push.apply(i,Rf(s.props.children,d));return}ut(s.type===Df,`[${typeof s.type=="string"?s.type:s.type.name}] is not a component. All component children of must be a or `),ut(!s.props.index||!s.props.children,"An index route cannot have child routes.");let _={id:s.props.id||d.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(_.children=Rf(s.props.children,d)),i.push(_)}),i}var So="get",ko="application/x-www-form-urlencoded";function Qo(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function z0(t){return Qo(t)&&t.tagName.toLowerCase()==="button"}function O0(t){return Qo(t)&&t.tagName.toLowerCase()==="form"}function q0(t){return Qo(t)&&t.tagName.toLowerCase()==="input"}function L0(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function B0(t,a){return t.button===0&&(!a||a==="_self")&&!L0(t)}var ho=null;function U0(){if(ho===null)try{new FormData(document.createElement("form"),0),ho=!1}catch{ho=!0}return ho}var H0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hf(t){return t!=null&&!H0.has(t)?(Dn(!1,`"${t}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${ko}"`),null):t}function G0(t,a){let i,s,c,d,_;if(O0(t)){let y=t.getAttribute("action");s=y?Ua(y,a):null,i=t.getAttribute("method")||So,c=hf(t.getAttribute("enctype"))||ko,d=new FormData(t)}else if(z0(t)||q0(t)&&(t.type==="submit"||t.type==="image")){let y=t.form;if(y==null)throw new Error('Cannot submit a