syntaur 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{_basePickBy-DXzhD14q.js → _basePickBy-eih-KlEh.js} +1 -1
- package/dashboard/dist/assets/{_baseUniq-gxypqvP5.js → _baseUniq-M21wg9ZQ.js} +1 -1
- package/dashboard/dist/assets/{arc-Ce7nYKSm.js → arc-uKZMelpQ.js} +1 -1
- package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-zX4f4_Mf.js → architectureDiagram-2XIMDMQ5-CpMG5exj.js} +1 -1
- package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-auOdy7nH.js → blockDiagram-WCTKOSBZ-BHnCCKl_.js} +1 -1
- package/dashboard/dist/assets/{c4Diagram-IC4MRINW-C2kkjPbW.js → c4Diagram-IC4MRINW-B-n3zU9i.js} +1 -1
- package/dashboard/dist/assets/channel-DVBgSlOI.js +1 -0
- package/dashboard/dist/assets/{chunk-4BX2VUAB-B7dfpnbG.js → chunk-4BX2VUAB-ChD9Iuih.js} +1 -1
- package/dashboard/dist/assets/{chunk-55IACEB6-r1_jHZYp.js → chunk-55IACEB6-B3vP9Psg.js} +1 -1
- package/dashboard/dist/assets/{chunk-FMBD7UC4-5mMONjMK.js → chunk-FMBD7UC4-CIhWgxPS.js} +1 -1
- package/dashboard/dist/assets/{chunk-JSJVCQXG-CwKj-Es4.js → chunk-JSJVCQXG-DiGIV_cB.js} +1 -1
- package/dashboard/dist/assets/{chunk-KX2RTZJC-ByoW-HgN.js → chunk-KX2RTZJC-DnGsx5jo.js} +1 -1
- package/dashboard/dist/assets/{chunk-NQ4KR5QH-D1olOovd.js → chunk-NQ4KR5QH-BFBu1fmg.js} +1 -1
- package/dashboard/dist/assets/{chunk-QZHKN3VN-CB8_FC8w.js → chunk-QZHKN3VN-DYtumHth.js} +1 -1
- package/dashboard/dist/assets/{chunk-WL4C6EOR-CFEqRrE1.js → chunk-WL4C6EOR-BzCrQPuw.js} +1 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-B7dxBacd.js +1 -0
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-B7dxBacd.js +1 -0
- package/dashboard/dist/assets/clone-DAOrHcCC.js +1 -0
- package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-D6dGVXEI.js → cose-bilkent-S5V4N54A-Bl8mb5eY.js} +1 -1
- package/dashboard/dist/assets/{dagre-KLK3FWXG-Cvg9CgP-.js → dagre-KLK3FWXG-BHffcOgo.js} +1 -1
- package/dashboard/dist/assets/{diagram-E7M64L7V-iCBudhZD.js → diagram-E7M64L7V-Ib83qzT_.js} +1 -1
- package/dashboard/dist/assets/{diagram-IFDJBPK2-BGniy7VQ.js → diagram-IFDJBPK2-hOdh63_T.js} +1 -1
- package/dashboard/dist/assets/{diagram-P4PSJMXO-B6Ie044E.js → diagram-P4PSJMXO-D4ocLmc5.js} +1 -1
- package/dashboard/dist/assets/{erDiagram-INFDFZHY-BHvFRNhJ.js → erDiagram-INFDFZHY-CHJ6zqnJ.js} +1 -1
- package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-CN86Zu3Q.js → flowDiagram-PKNHOUZH-DEz5g2Ye.js} +1 -1
- package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-D-1fKFjW.js → ganttDiagram-A5KZAMGK-BSftxDHA.js} +1 -1
- package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-Dtf1A6KL.js → gitGraphDiagram-K3NZZRJ6-Cr3vGf07.js} +1 -1
- package/dashboard/dist/assets/{graph-B6H_kXSs.js → graph-D4us8trI.js} +1 -1
- package/dashboard/dist/assets/index-AXntWS_w.css +1 -0
- package/dashboard/dist/assets/index-CEMjexkj.js +460 -0
- package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-R9wJj4JF.js → infoDiagram-LFFYTUFH-CH_jVfru.js} +1 -1
- package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-CJmeR-bX.js → ishikawaDiagram-PHBUUO56-BdKLa5GC.js} +1 -1
- package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-FcUhyu8I.js → journeyDiagram-4ABVD52K-C_SMzNGF.js} +1 -1
- package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-C8UcTIwW.js → kanban-definition-K7BYSVSG-BeA-egRW.js} +1 -1
- package/dashboard/dist/assets/{layout-DzBy6alw.js → layout-B8tDmL4j.js} +1 -1
- package/dashboard/dist/assets/{linear-CZJCNOB9.js → linear-CeGJyrHS.js} +1 -1
- package/dashboard/dist/assets/{mermaid.core-fMQRe9Gq.js → mermaid.core-DyEs-LPd.js} +4 -4
- package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-BFwp-LS-.js → mindmap-definition-YRQLILUH-DCxzAr8m.js} +1 -1
- package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-CQLmPkkd.js → pieDiagram-SKSYHLDU-CEj5dRDi.js} +1 -1
- package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-DAmi-dmD.js → quadrantDiagram-337W2JSQ-CKfvAEQg.js} +1 -1
- package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-Dcdts4kX.js → requirementDiagram-Z7DCOOCP-CTRqKPtJ.js} +1 -1
- package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-By8LRvM0.js → sankeyDiagram-WA2Y5GQK-BlYbz8UR.js} +1 -1
- package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-BsvqgtTz.js → sequenceDiagram-2WXFIKYE-PT2t7ryQ.js} +1 -1
- package/dashboard/dist/assets/{stateDiagram-RAJIS63D-DFNOD7cx.js → stateDiagram-RAJIS63D-eDX7IUuV.js} +1 -1
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO--yuSBnLh.js +1 -0
- package/dashboard/dist/assets/{timeline-definition-YZTLITO2-CMcgJGjn.js → timeline-definition-YZTLITO2-By11B1Ow.js} +1 -1
- package/dashboard/dist/assets/{treemap-KZPCXAKY-BWsRNHwq.js → treemap-KZPCXAKY-rvdLeWWV.js} +1 -1
- package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-io7-2Tod.js → vennDiagram-LZ73GAT5-Br_oZ1wv.js} +1 -1
- package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-AVnh4fDS.js → xychartDiagram-JWTSCODW-D-MWVqrT.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dist/dashboard/server.js +624 -139
- package/dist/dashboard/server.js.map +1 -1
- package/dist/index.js +658 -124
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dashboard/dist/assets/channel-PMR2DuGi.js +0 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-DmESf_RL.js +0 -1
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-DmESf_RL.js +0 -1
- package/dashboard/dist/assets/clone-WlIeyha4.js +0 -1
- package/dashboard/dist/assets/index-BhuXD-Q5.js +0 -445
- package/dashboard/dist/assets/index-BnqH-RIk.css +0 -1
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-DVO-Epiz.js +0 -1
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
function Bk(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(s,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function GI(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),n}var ud={exports:{}},Si={},cd={exports:{}},_e={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var gg;function Uk(){if(gg)return _e;gg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),x=Symbol.iterator;function w($){return $===null||typeof $!="object"?null:($=x&&$[x]||$["@@iterator"],typeof $=="function"?$:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,k={};function j($,Q,L){this.props=$,this.context=Q,this.refs=k,this.updater=L||b}j.prototype.isReactComponent={},j.prototype.setState=function($,Q){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,Q,"setState")},j.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function S(){}S.prototype=j.prototype;function D($,Q,L){this.props=$,this.context=Q,this.refs=k,this.updater=L||b}var A=D.prototype=new S;A.constructor=D,E(A,j.prototype),A.isPureReactComponent=!0;var M=Array.isArray,_=Object.prototype.hasOwnProperty,N={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function z($,Q,L){var pe,ve={},de=null,Pe=null;if(Q!=null)for(pe in Q.ref!==void 0&&(Pe=Q.ref),Q.key!==void 0&&(de=""+Q.key),Q)_.call(Q,pe)&&!P.hasOwnProperty(pe)&&(ve[pe]=Q[pe]);var ke=arguments.length-2;if(ke===1)ve.children=L;else if(1<ke){for(var Te=Array(ke),ee=0;ee<ke;ee++)Te[ee]=arguments[ee+2];ve.children=Te}if($&&$.defaultProps)for(pe in ke=$.defaultProps,ke)ve[pe]===void 0&&(ve[pe]=ke[pe]);return{$$typeof:e,type:$,key:de,ref:Pe,props:ve,_owner:N.current}}function q($,Q){return{$$typeof:e,type:$.type,key:Q,ref:$.ref,props:$.props,_owner:$._owner}}function T($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function I($){var Q={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(L){return Q[L]})}var B=/\/+/g;function W($,Q){return typeof $=="object"&&$!==null&&$.key!=null?I(""+$.key):Q.toString(36)}function J($,Q,L,pe,ve){var de=typeof $;(de==="undefined"||de==="boolean")&&($=null);var Pe=!1;if($===null)Pe=!0;else switch(de){case"string":case"number":Pe=!0;break;case"object":switch($.$$typeof){case e:case t:Pe=!0}}if(Pe)return Pe=$,ve=ve(Pe),$=pe===""?"."+W(Pe,0):pe,M(ve)?(L="",$!=null&&(L=$.replace(B,"$&/")+"/"),J(ve,Q,L,"",function(ee){return ee})):ve!=null&&(T(ve)&&(ve=q(ve,L+(!ve.key||Pe&&Pe.key===ve.key?"":(""+ve.key).replace(B,"$&/")+"/")+$)),Q.push(ve)),1;if(Pe=0,pe=pe===""?".":pe+":",M($))for(var ke=0;ke<$.length;ke++){de=$[ke];var Te=pe+W(de,ke);Pe+=J(de,Q,L,Te,ve)}else if(Te=w($),typeof Te=="function")for($=Te.call($),ke=0;!(de=$.next()).done;)de=de.value,Te=pe+W(de,ke++),Pe+=J(de,Q,L,Te,ve);else if(de==="object")throw Q=String($),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Pe}function G($,Q,L){if($==null)return $;var pe=[],ve=0;return J($,pe,"","",function(de){return Q.call(L,de,ve++)}),pe}function te($){if($._status===-1){var Q=$._result;Q=Q(),Q.then(function(L){($._status===0||$._status===-1)&&($._status=1,$._result=L)},function(L){($._status===0||$._status===-1)&&($._status=2,$._result=L)}),$._status===-1&&($._status=0,$._result=Q)}if($._status===1)return $._result.default;throw $._result}var ie={current:null},X={transition:null},oe={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:X,ReactCurrentOwner:N};function R(){throw Error("act(...) is not supported in production builds of React.")}return _e.Children={map:G,forEach:function($,Q,L){G($,function(){Q.apply(this,arguments)},L)},count:function($){var Q=0;return G($,function(){Q++}),Q},toArray:function($){return G($,function(Q){return Q})||[]},only:function($){if(!T($))throw Error("React.Children.only expected to receive a single React element child.");return $}},_e.Component=j,_e.Fragment=n,_e.Profiler=i,_e.PureComponent=D,_e.StrictMode=s,_e.Suspense=p,_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,_e.act=R,_e.cloneElement=function($,Q,L){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var pe=E({},$.props),ve=$.key,de=$.ref,Pe=$._owner;if(Q!=null){if(Q.ref!==void 0&&(de=Q.ref,Pe=N.current),Q.key!==void 0&&(ve=""+Q.key),$.type&&$.type.defaultProps)var ke=$.type.defaultProps;for(Te in Q)_.call(Q,Te)&&!P.hasOwnProperty(Te)&&(pe[Te]=Q[Te]===void 0&&ke!==void 0?ke[Te]:Q[Te])}var Te=arguments.length-2;if(Te===1)pe.children=L;else if(1<Te){ke=Array(Te);for(var ee=0;ee<Te;ee++)ke[ee]=arguments[ee+2];pe.children=ke}return{$$typeof:e,type:$.type,key:ve,ref:de,props:pe,_owner:Pe}},_e.createContext=function($){return $={$$typeof:c,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:a,_context:$},$.Consumer=$},_e.createElement=z,_e.createFactory=function($){var Q=z.bind(null,$);return Q.type=$,Q},_e.createRef=function(){return{current:null}},_e.forwardRef=function($){return{$$typeof:d,render:$}},_e.isValidElement=T,_e.lazy=function($){return{$$typeof:m,_payload:{_status:-1,_result:$},_init:te}},_e.memo=function($,Q){return{$$typeof:h,type:$,compare:Q===void 0?null:Q}},_e.startTransition=function($){var Q=X.transition;X.transition={};try{$()}finally{X.transition=Q}},_e.unstable_act=R,_e.useCallback=function($,Q){return ie.current.useCallback($,Q)},_e.useContext=function($){return ie.current.useContext($)},_e.useDebugValue=function(){},_e.useDeferredValue=function($){return ie.current.useDeferredValue($)},_e.useEffect=function($,Q){return ie.current.useEffect($,Q)},_e.useId=function(){return ie.current.useId()},_e.useImperativeHandle=function($,Q,L){return ie.current.useImperativeHandle($,Q,L)},_e.useInsertionEffect=function($,Q){return ie.current.useInsertionEffect($,Q)},_e.useLayoutEffect=function($,Q){return ie.current.useLayoutEffect($,Q)},_e.useMemo=function($,Q){return ie.current.useMemo($,Q)},_e.useReducer=function($,Q,L){return ie.current.useReducer($,Q,L)},_e.useRef=function($){return ie.current.useRef($)},_e.useState=function($){return ie.current.useState($)},_e.useSyncExternalStore=function($,Q,L){return ie.current.useSyncExternalStore($,Q,L)},_e.useTransition=function(){return ie.current.useTransition()},_e.version="18.3.1",_e}var xg;function Rf(){return xg||(xg=1,cd.exports=Uk()),cd.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var yg;function Hk(){if(yg)return Si;yg=1;var e=Rf(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(d,p,h){var m,x={},w=null,b=null;h!==void 0&&(w=""+h),p.key!==void 0&&(w=""+p.key),p.ref!==void 0&&(b=p.ref);for(m in p)s.call(p,m)&&!a.hasOwnProperty(m)&&(x[m]=p[m]);if(d&&d.defaultProps)for(m in p=d.defaultProps,p)x[m]===void 0&&(x[m]=p[m]);return{$$typeof:t,type:d,key:w,ref:b,props:x,_owner:i.current}}return Si.Fragment=n,Si.jsx=c,Si.jsxs=c,Si}var vg;function Wk(){return vg||(vg=1,ud.exports=Hk()),ud.exports}var l=Wk(),y=Rf();const ft=eu(y),Ly=Bk({__proto__:null,default:ft},[y]);var ga={},dd={exports:{}},fn={},fd={exports:{}},pd={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var bg;function Vk(){return bg||(bg=1,(function(e){function t(X,oe){var R=X.length;X.push(oe);e:for(;0<R;){var $=R-1>>>1,Q=X[$];if(0<i(Q,oe))X[$]=oe,X[R]=Q,R=$;else break e}}function n(X){return X.length===0?null:X[0]}function s(X){if(X.length===0)return null;var oe=X[0],R=X.pop();if(R!==oe){X[0]=R;e:for(var $=0,Q=X.length,L=Q>>>1;$<L;){var pe=2*($+1)-1,ve=X[pe],de=pe+1,Pe=X[de];if(0>i(ve,R))de<Q&&0>i(Pe,ve)?(X[$]=Pe,X[de]=R,$=de):(X[$]=ve,X[pe]=R,$=pe);else if(de<Q&&0>i(Pe,R))X[$]=Pe,X[de]=R,$=de;else break e}}return oe}function i(X,oe){var R=X.sortIndex-oe.sortIndex;return R!==0?R:X.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],h=[],m=1,x=null,w=3,b=!1,E=!1,k=!1,j=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var oe=n(h);oe!==null;){if(oe.callback===null)s(h);else if(oe.startTime<=X)s(h),oe.sortIndex=oe.expirationTime,t(p,oe);else break;oe=n(h)}}function M(X){if(k=!1,A(X),!E)if(n(p)!==null)E=!0,te(_);else{var oe=n(h);oe!==null&&ie(M,oe.startTime-X)}}function _(X,oe){E=!1,k&&(k=!1,S(z),z=-1),b=!0;var R=w;try{for(A(oe),x=n(p);x!==null&&(!(x.expirationTime>oe)||X&&!I());){var $=x.callback;if(typeof $=="function"){x.callback=null,w=x.priorityLevel;var Q=$(x.expirationTime<=oe);oe=e.unstable_now(),typeof Q=="function"?x.callback=Q:x===n(p)&&s(p),A(oe)}else s(p);x=n(p)}if(x!==null)var L=!0;else{var pe=n(h);pe!==null&&ie(M,pe.startTime-oe),L=!1}return L}finally{x=null,w=R,b=!1}}var N=!1,P=null,z=-1,q=5,T=-1;function I(){return!(e.unstable_now()-T<q)}function B(){if(P!==null){var X=e.unstable_now();T=X;var oe=!0;try{oe=P(!0,X)}finally{oe?W():(N=!1,P=null)}}else N=!1}var W;if(typeof D=="function")W=function(){D(B)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,G=J.port2;J.port1.onmessage=B,W=function(){G.postMessage(null)}}else W=function(){j(B,0)};function te(X){P=X,N||(N=!0,W())}function ie(X,oe){z=j(function(){X(e.unstable_now())},oe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_continueExecution=function(){E||b||(E=!0,te(_))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function(X){switch(w){case 1:case 2:case 3:var oe=3;break;default:oe=w}var R=w;w=oe;try{return X()}finally{w=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,oe){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var R=w;w=X;try{return oe()}finally{w=R}},e.unstable_scheduleCallback=function(X,oe,R){var $=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?$+R:$):R=$,X){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=R+Q,X={id:m++,callback:oe,priorityLevel:X,startTime:R,expirationTime:Q,sortIndex:-1},R>$?(X.sortIndex=R,t(h,X),n(p)===null&&X===n(h)&&(k?(S(z),z=-1):k=!0,ie(M,R-$))):(X.sortIndex=Q,t(p,X),E||b||(E=!0,te(_))),X},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(X){var oe=w;return function(){var R=w;w=oe;try{return X.apply(this,arguments)}finally{w=R}}}})(pd)),pd}var wg;function qk(){return wg||(wg=1,fd.exports=Vk()),fd.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var kg;function Gk(){if(kg)return fn;kg=1;var e=Rf(),t=qk();function n(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,i={};function a(r,o){c(r,o),c(r+"Capture",o)}function c(r,o){for(i[r]=o,r=0;r<o.length;r++)s.add(o[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},x={};function w(r){return p.call(x,r)?!0:p.call(m,r)?!1:h.test(r)?x[r]=!0:(m[r]=!0,!1)}function b(r,o,u,f){if(u!==null&&u.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function E(r,o,u,f){if(o===null||typeof o>"u"||b(r,o,u,f))return!0;if(f)return!1;if(u!==null)switch(u.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function k(r,o,u,f,g,v,C){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=o,this.sanitizeURL=v,this.removeEmptyString=C}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){j[r]=new k(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];j[o]=new k(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){j[r]=new k(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){j[r]=new k(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){j[r]=new k(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){j[r]=new k(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){j[r]=new k(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){j[r]=new k(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){j[r]=new k(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function D(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var o=r.replace(S,D);j[o]=new k(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(S,D);j[o]=new k(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(S,D);j[o]=new k(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!1,!1)}),j.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,o,u,f){var g=j.hasOwnProperty(o)?j[o]:null;(g!==null?g.type!==0:f||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(E(o,u,g,f)&&(u=null),f||g===null?w(o)&&(u===null?r.removeAttribute(o):r.setAttribute(o,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(o=g.attributeName,f=g.attributeNamespace,u===null?r.removeAttribute(o):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,f?r.setAttributeNS(f,o,u):r.setAttribute(o,u))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),N=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),I=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),ie=Symbol.for("react.offscreen"),X=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=X&&r[X]||r["@@iterator"],typeof r=="function"?r:null)}var R=Object.assign,$;function Q(r){if($===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);$=o&&o[1]||""}return`
|
|
34
|
+
`+$+r}var L=!1;function pe(r,o){if(!r||L)return"";L=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Y){var f=Y}Reflect.construct(r,[],o)}else{try{o.call()}catch(Y){f=Y}r.call(o.prototype)}else{try{throw Error()}catch(Y){f=Y}r()}}catch(Y){if(Y&&f&&typeof Y.stack=="string"){for(var g=Y.stack.split(`
|
|
35
|
+
`),v=f.stack.split(`
|
|
36
|
+
`),C=g.length-1,O=v.length-1;1<=C&&0<=O&&g[C]!==v[O];)O--;for(;1<=C&&0<=O;C--,O--)if(g[C]!==v[O]){if(C!==1||O!==1)do if(C--,O--,0>O||g[C]!==v[O]){var F=`
|
|
37
|
+
`+g[C].replace(" at new "," at ");return r.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",r.displayName)),F}while(1<=C&&0<=O);break}}}finally{L=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Q(r):""}function ve(r){switch(r.tag){case 5:return Q(r.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return r=pe(r.type,!1),r;case 11:return r=pe(r.type.render,!1),r;case 1:return r=pe(r.type,!0),r;default:return""}}function de(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case P:return"Fragment";case N:return"Portal";case q:return"Profiler";case z:return"StrictMode";case W:return"Suspense";case J:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case I:return(r.displayName||"Context")+".Consumer";case T:return(r._context.displayName||"Context")+".Provider";case B:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case G:return o=r.displayName||null,o!==null?o:de(r.type)||"Memo";case te:o=r._payload,r=r._init;try{return de(r(o))}catch{}}return null}function Pe(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(o);case 8:return o===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ke(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Te(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ee(r){var o=Te(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),f=""+r[o];if(!r.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,v=u.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return g.call(this)},set:function(C){f=""+C,v.call(this,C)}}),Object.defineProperty(r,o,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(C){f=""+C},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function Ee(r){r._valueTracker||(r._valueTracker=ee(r))}function je(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var u=o.getValue(),f="";return r&&(f=Te(r)?r.checked?"true":"false":r.value),r=f,r!==u?(o.setValue(r),!0):!1}function Qe(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function yt(r,o){var u=o.checked;return R({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Bt(r,o){var u=o.defaultValue==null?"":o.defaultValue,f=o.checked!=null?o.checked:o.defaultChecked;u=ke(o.value!=null?o.value:u),r._wrapperState={initialChecked:f,initialValue:u,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ut(r,o){o=o.checked,o!=null&&A(r,"checked",o,!1)}function _t(r,o){Ut(r,o);var u=ke(o.value),f=o.type;if(u!=null)f==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?Dt(r,o.type,u):o.hasOwnProperty("defaultValue")&&Dt(r,o.type,ke(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function vn(r,o,u){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var f=o.type;if(!(f!=="submit"&&f!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,u||o===r.value||(r.value=o),r.defaultValue=o}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Dt(r,o,u){(o!=="number"||Qe(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var pt=Array.isArray;function Zt(r,o,u,f){if(r=r.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=o.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&f&&(r[u].defaultSelected=!0)}else{for(u=""+ke(u),o=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,f&&(r[g].defaultSelected=!0);return}o!==null||r[g].disabled||(o=r[g])}o!==null&&(o.selected=!0)}}function An(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return R({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function vt(r,o){var u=o.value;if(u==null){if(u=o.children,o=o.defaultValue,u!=null){if(o!=null)throw Error(n(92));if(pt(u)){if(1<u.length)throw Error(n(93));u=u[0]}o=u}o==null&&(o=""),u=o}r._wrapperState={initialValue:ke(u)}}function Nr(r,o){var u=ke(o.value),f=ke(o.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),o.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),f!=null&&(r.defaultValue=""+f)}function lr(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function Z(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ae(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?Z(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var be,Re=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,u,f,g){MSApp.execUnsafeLocalFunction(function(){return r(o,u,f,g)})}:r})(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(be=be||document.createElement("div"),be.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=be.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function U(r,o){if(o){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=o;return}}r.textContent=o}var se={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Se=["Webkit","ms","Moz","O"];Object.keys(se).forEach(function(r){Se.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),se[o]=se[r]})});function Fe(r,o,u){return o==null||typeof o=="boolean"||o===""?"":u||typeof o!="number"||o===0||se.hasOwnProperty(r)&&se[r]?(""+o).trim():o+"px"}function sn(r,o){r=r.style;for(var u in o)if(o.hasOwnProperty(u)){var f=u.indexOf("--")===0,g=Fe(u,o[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,g):r[u]=g}}var ct=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function We(r,o){if(o){if(ct[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function qe(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ht=null;function qr(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var js=null,Gr=null,ot=null;function Ht(r){if(r=ai(r)){if(typeof js!="function")throw Error(n(280));var o=r.stateNode;o&&(o=Al(o),js(r.stateNode,r.type,o))}}function Wt(r){Gr?ot?ot.push(r):ot=[r]:Gr=r}function Wn(){if(Gr){var r=Gr,o=ot;if(ot=Gr=null,Ht(r),o)for(r=0;r<o.length;r++)Ht(o[r])}}function en(r,o){return r(o)}function Vt(){}var on=!1;function Er(r,o,u){if(on)return r(o,u);on=!0;try{return en(r,o,u)}finally{on=!1,(Gr!==null||ot!==null)&&(Vt(),Wn())}}function it(r,o){var u=r.stateNode;if(u===null)return null;var f=Al(u);if(f===null)return null;u=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,o,typeof u));return u}var Dn=!1;if(d)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Dn=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch{Dn=!1}function Vn(r,o,u,f,g,v,C,O,F){var Y=Array.prototype.slice.call(arguments,3);try{o.apply(u,Y)}catch(re){this.onError(re)}}var qn=!1,ar=null,bn=!1,Rr=null,Ho={onError:function(r){qn=!0,ar=r}};function Yw(r,o,u,f,g,v,C,O,F){qn=!1,ar=null,Vn.apply(Ho,arguments)}function Xw(r,o,u,f,g,v,C,O,F){if(Yw.apply(this,arguments),qn){if(qn){var Y=ar;qn=!1,ar=null}else throw Error(n(198));bn||(bn=!0,Rr=Y)}}function Cs(r){var o=r,u=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(u=o.return),r=o.return;while(r)}return o.tag===3?u:null}function zp(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Fp(r){if(Cs(r)!==r)throw Error(n(188))}function Qw(r){var o=r.alternate;if(!o){if(o=Cs(r),o===null)throw Error(n(188));return o!==r?null:r}for(var u=r,f=o;;){var g=u.return;if(g===null)break;var v=g.alternate;if(v===null){if(f=g.return,f!==null){u=f;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===u)return Fp(g),r;if(v===f)return Fp(g),o;v=v.sibling}throw Error(n(188))}if(u.return!==f.return)u=g,f=v;else{for(var C=!1,O=g.child;O;){if(O===u){C=!0,u=g,f=v;break}if(O===f){C=!0,f=g,u=v;break}O=O.sibling}if(!C){for(O=v.child;O;){if(O===u){C=!0,u=v,f=g;break}if(O===f){C=!0,f=v,u=g;break}O=O.sibling}if(!C)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:o}function Bp(r){return r=Qw(r),r!==null?Up(r):null}function Up(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=Up(r);if(o!==null)return o;r=r.sibling}return null}var Hp=t.unstable_scheduleCallback,Wp=t.unstable_cancelCallback,Jw=t.unstable_shouldYield,Zw=t.unstable_requestPaint,mt=t.unstable_now,e1=t.unstable_getCurrentPriorityLevel,Tu=t.unstable_ImmediatePriority,Vp=t.unstable_UserBlockingPriority,dl=t.unstable_NormalPriority,t1=t.unstable_LowPriority,qp=t.unstable_IdlePriority,fl=null,ur=null;function n1(r){if(ur&&typeof ur.onCommitFiberRoot=="function")try{ur.onCommitFiberRoot(fl,r,void 0,(r.current.flags&128)===128)}catch{}}var Gn=Math.clz32?Math.clz32:o1,r1=Math.log,s1=Math.LN2;function o1(r){return r>>>=0,r===0?32:31-(r1(r)/s1|0)|0}var pl=64,hl=4194304;function Wo(r){switch(r&-r){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: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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function ml(r,o){var u=r.pendingLanes;if(u===0)return 0;var f=0,g=r.suspendedLanes,v=r.pingedLanes,C=u&268435455;if(C!==0){var O=C&~g;O!==0?f=Wo(O):(v&=C,v!==0&&(f=Wo(v)))}else C=u&~g,C!==0?f=Wo(C):v!==0&&(f=Wo(v));if(f===0)return 0;if(o!==0&&o!==f&&(o&g)===0&&(g=f&-f,v=o&-o,g>=v||g===16&&(v&4194240)!==0))return o;if((f&4)!==0&&(f|=u&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=f;0<o;)u=31-Gn(o),g=1<<u,f|=r[u],o&=~g;return f}function i1(r,o){switch(r){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64: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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function l1(r,o){for(var u=r.suspendedLanes,f=r.pingedLanes,g=r.expirationTimes,v=r.pendingLanes;0<v;){var C=31-Gn(v),O=1<<C,F=g[C];F===-1?((O&u)===0||(O&f)!==0)&&(g[C]=i1(O,o)):F<=o&&(r.expiredLanes|=O),v&=~O}}function Pu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Gp(){var r=pl;return pl<<=1,(pl&4194240)===0&&(pl=64),r}function Au(r){for(var o=[],u=0;31>u;u++)o.push(r);return o}function Vo(r,o,u){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-Gn(o),r[o]=u}function a1(r,o){var u=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<u;){var g=31-Gn(u),v=1<<g;o[g]=0,f[g]=-1,r[g]=-1,u&=~v}}function Du(r,o){var u=r.entangledLanes|=o;for(r=r.entanglements;u;){var f=31-Gn(u),g=1<<f;g&o|r[f]&o&&(r[f]|=o),u&=~g}}var Ve=0;function Kp(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Yp,Lu,Xp,Qp,Jp,Iu=!1,gl=[],Kr=null,Yr=null,Xr=null,qo=new Map,Go=new Map,Qr=[],u1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Zp(r,o){switch(r){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Yr=null;break;case"mouseover":case"mouseout":Xr=null;break;case"pointerover":case"pointerout":qo.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(o.pointerId)}}function Ko(r,o,u,f,g,v){return r===null||r.nativeEvent!==v?(r={blockedOn:o,domEventName:u,eventSystemFlags:f,nativeEvent:v,targetContainers:[g]},o!==null&&(o=ai(o),o!==null&&Lu(o)),r):(r.eventSystemFlags|=f,o=r.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),r)}function c1(r,o,u,f,g){switch(o){case"focusin":return Kr=Ko(Kr,r,o,u,f,g),!0;case"dragenter":return Yr=Ko(Yr,r,o,u,f,g),!0;case"mouseover":return Xr=Ko(Xr,r,o,u,f,g),!0;case"pointerover":var v=g.pointerId;return qo.set(v,Ko(qo.get(v)||null,r,o,u,f,g)),!0;case"gotpointercapture":return v=g.pointerId,Go.set(v,Ko(Go.get(v)||null,r,o,u,f,g)),!0}return!1}function eh(r){var o=Ns(r.target);if(o!==null){var u=Cs(o);if(u!==null){if(o=u.tag,o===13){if(o=zp(u),o!==null){r.blockedOn=o,Jp(r.priority,function(){Xp(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function xl(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var u=Mu(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);ht=f,u.target.dispatchEvent(f),ht=null}else return o=ai(u),o!==null&&Lu(o),r.blockedOn=u,!1;o.shift()}return!0}function th(r,o,u){xl(r)&&u.delete(o)}function d1(){Iu=!1,Kr!==null&&xl(Kr)&&(Kr=null),Yr!==null&&xl(Yr)&&(Yr=null),Xr!==null&&xl(Xr)&&(Xr=null),qo.forEach(th),Go.forEach(th)}function Yo(r,o){r.blockedOn===o&&(r.blockedOn=null,Iu||(Iu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,d1)))}function Xo(r){function o(g){return Yo(g,r)}if(0<gl.length){Yo(gl[0],r);for(var u=1;u<gl.length;u++){var f=gl[u];f.blockedOn===r&&(f.blockedOn=null)}}for(Kr!==null&&Yo(Kr,r),Yr!==null&&Yo(Yr,r),Xr!==null&&Yo(Xr,r),qo.forEach(o),Go.forEach(o),u=0;u<Qr.length;u++)f=Qr[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<Qr.length&&(u=Qr[0],u.blockedOn===null);)eh(u),u.blockedOn===null&&Qr.shift()}var Gs=M.ReactCurrentBatchConfig,yl=!0;function f1(r,o,u,f){var g=Ve,v=Gs.transition;Gs.transition=null;try{Ve=1,Ou(r,o,u,f)}finally{Ve=g,Gs.transition=v}}function p1(r,o,u,f){var g=Ve,v=Gs.transition;Gs.transition=null;try{Ve=4,Ou(r,o,u,f)}finally{Ve=g,Gs.transition=v}}function Ou(r,o,u,f){if(yl){var g=Mu(r,o,u,f);if(g===null)Zu(r,o,f,vl,u),Zp(r,f);else if(c1(g,r,o,u,f))f.stopPropagation();else if(Zp(r,f),o&4&&-1<u1.indexOf(r)){for(;g!==null;){var v=ai(g);if(v!==null&&Yp(v),v=Mu(r,o,u,f),v===null&&Zu(r,o,f,vl,u),v===g)break;g=v}g!==null&&f.stopPropagation()}else Zu(r,o,f,null,u)}}var vl=null;function Mu(r,o,u,f){if(vl=null,r=qr(f),r=Ns(r),r!==null)if(o=Cs(r),o===null)r=null;else if(u=o.tag,u===13){if(r=zp(o),r!==null)return r;r=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return vl=r,null}function nh(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(e1()){case Tu:return 1;case Vp:return 4;case dl:case t1:return 16;case qp:return 536870912;default:return 16}default:return 16}}var Jr=null,_u=null,bl=null;function rh(){if(bl)return bl;var r,o=_u,u=o.length,f,g="value"in Jr?Jr.value:Jr.textContent,v=g.length;for(r=0;r<u&&o[r]===g[r];r++);var C=u-r;for(f=1;f<=C&&o[u-f]===g[v-f];f++);return bl=g.slice(r,1<f?1-f:void 0)}function wl(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function kl(){return!0}function sh(){return!1}function wn(r){function o(u,f,g,v,C){this._reactName=u,this._targetInst=g,this.type=f,this.nativeEvent=v,this.target=C,this.currentTarget=null;for(var O in r)r.hasOwnProperty(O)&&(u=r[O],this[O]=u?u(v):v[O]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?kl:sh,this.isPropagationStopped=sh,this}return R(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=kl)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=kl)},persist:function(){},isPersistent:kl}),o}var Ks={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$u=wn(Ks),Qo=R({},Ks,{view:0,detail:0}),h1=wn(Qo),zu,Fu,Jo,Sl=R({},Qo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uu,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Jo&&(Jo&&r.type==="mousemove"?(zu=r.screenX-Jo.screenX,Fu=r.screenY-Jo.screenY):Fu=zu=0,Jo=r),zu)},movementY:function(r){return"movementY"in r?r.movementY:Fu}}),oh=wn(Sl),m1=R({},Sl,{dataTransfer:0}),g1=wn(m1),x1=R({},Qo,{relatedTarget:0}),Bu=wn(x1),y1=R({},Ks,{animationName:0,elapsedTime:0,pseudoElement:0}),v1=wn(y1),b1=R({},Ks,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),w1=wn(b1),k1=R({},Ks,{data:0}),ih=wn(k1),S1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},j1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},C1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function N1(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=C1[r])?!!o[r]:!1}function Uu(){return N1}var E1=R({},Qo,{key:function(r){if(r.key){var o=S1[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=wl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?j1[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uu,charCode:function(r){return r.type==="keypress"?wl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?wl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),R1=wn(E1),T1=R({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lh=wn(T1),P1=R({},Qo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uu}),A1=wn(P1),D1=R({},Ks,{propertyName:0,elapsedTime:0,pseudoElement:0}),L1=wn(D1),I1=R({},Sl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),O1=wn(I1),M1=[9,13,27,32],Hu=d&&"CompositionEvent"in window,Zo=null;d&&"documentMode"in document&&(Zo=document.documentMode);var _1=d&&"TextEvent"in window&&!Zo,ah=d&&(!Hu||Zo&&8<Zo&&11>=Zo),uh=" ",ch=!1;function dh(r,o){switch(r){case"keyup":return M1.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ys=!1;function $1(r,o){switch(r){case"compositionend":return fh(o);case"keypress":return o.which!==32?null:(ch=!0,uh);case"textInput":return r=o.data,r===uh&&ch?null:r;default:return null}}function z1(r,o){if(Ys)return r==="compositionend"||!Hu&&dh(r,o)?(r=rh(),bl=_u=Jr=null,Ys=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return ah&&o.locale!=="ko"?null:o.data;default:return null}}var F1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ph(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!F1[r.type]:o==="textarea"}function hh(r,o,u,f){Wt(f),o=Rl(o,"onChange"),0<o.length&&(u=new $u("onChange","change",null,u,f),r.push({event:u,listeners:o}))}var ei=null,ti=null;function B1(r){Dh(r,0)}function jl(r){var o=eo(r);if(je(o))return r}function U1(r,o){if(r==="change")return o}var mh=!1;if(d){var Wu;if(d){var Vu="oninput"in document;if(!Vu){var gh=document.createElement("div");gh.setAttribute("oninput","return;"),Vu=typeof gh.oninput=="function"}Wu=Vu}else Wu=!1;mh=Wu&&(!document.documentMode||9<document.documentMode)}function xh(){ei&&(ei.detachEvent("onpropertychange",yh),ti=ei=null)}function yh(r){if(r.propertyName==="value"&&jl(ti)){var o=[];hh(o,ti,r,qr(r)),Er(B1,o)}}function H1(r,o,u){r==="focusin"?(xh(),ei=o,ti=u,ei.attachEvent("onpropertychange",yh)):r==="focusout"&&xh()}function W1(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return jl(ti)}function V1(r,o){if(r==="click")return jl(o)}function q1(r,o){if(r==="input"||r==="change")return jl(o)}function G1(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Kn=typeof Object.is=="function"?Object.is:G1;function ni(r,o){if(Kn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var u=Object.keys(r),f=Object.keys(o);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var g=u[f];if(!p.call(o,g)||!Kn(r[g],o[g]))return!1}return!0}function vh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function bh(r,o){var u=vh(r);r=0;for(var f;u;){if(u.nodeType===3){if(f=r+u.textContent.length,r<=o&&f>=o)return{node:u,offset:o-r};r=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=vh(u)}}function wh(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?wh(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function kh(){for(var r=window,o=Qe();o instanceof r.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)r=o.contentWindow;else break;o=Qe(r.document)}return o}function qu(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function K1(r){var o=kh(),u=r.focusedElem,f=r.selectionRange;if(o!==u&&u&&u.ownerDocument&&wh(u.ownerDocument.documentElement,u)){if(f!==null&&qu(u)){if(o=f.start,r=f.end,r===void 0&&(r=o),"selectionStart"in u)u.selectionStart=o,u.selectionEnd=Math.min(r,u.value.length);else if(r=(o=u.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var g=u.textContent.length,v=Math.min(f.start,g);f=f.end===void 0?v:Math.min(f.end,g),!r.extend&&v>f&&(g=f,f=v,v=g),g=bh(u,v);var C=bh(u,f);g&&C&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==C.node||r.focusOffset!==C.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),r.removeAllRanges(),v>f?(r.addRange(o),r.extend(C.node,C.offset)):(o.setEnd(C.node,C.offset),r.addRange(o)))}}for(o=[],r=u;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<o.length;u++)r=o[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var Y1=d&&"documentMode"in document&&11>=document.documentMode,Xs=null,Gu=null,ri=null,Ku=!1;function Sh(r,o,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ku||Xs==null||Xs!==Qe(f)||(f=Xs,"selectionStart"in f&&qu(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),ri&&ni(ri,f)||(ri=f,f=Rl(Gu,"onSelect"),0<f.length&&(o=new $u("onSelect","select",null,o,u),r.push({event:o,listeners:f}),o.target=Xs)))}function Cl(r,o){var u={};return u[r.toLowerCase()]=o.toLowerCase(),u["Webkit"+r]="webkit"+o,u["Moz"+r]="moz"+o,u}var Qs={animationend:Cl("Animation","AnimationEnd"),animationiteration:Cl("Animation","AnimationIteration"),animationstart:Cl("Animation","AnimationStart"),transitionend:Cl("Transition","TransitionEnd")},Yu={},jh={};d&&(jh=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function Nl(r){if(Yu[r])return Yu[r];if(!Qs[r])return r;var o=Qs[r],u;for(u in o)if(o.hasOwnProperty(u)&&u in jh)return Yu[r]=o[u];return r}var Ch=Nl("animationend"),Nh=Nl("animationiteration"),Eh=Nl("animationstart"),Rh=Nl("transitionend"),Th=new Map,Ph="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Zr(r,o){Th.set(r,o),a(o,[r])}for(var Xu=0;Xu<Ph.length;Xu++){var Qu=Ph[Xu],X1=Qu.toLowerCase(),Q1=Qu[0].toUpperCase()+Qu.slice(1);Zr(X1,"on"+Q1)}Zr(Ch,"onAnimationEnd"),Zr(Nh,"onAnimationIteration"),Zr(Eh,"onAnimationStart"),Zr("dblclick","onDoubleClick"),Zr("focusin","onFocus"),Zr("focusout","onBlur"),Zr(Rh,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var si="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),J1=new Set("cancel close invalid load scroll toggle".split(" ").concat(si));function Ah(r,o,u){var f=r.type||"unknown-event";r.currentTarget=u,Xw(f,o,void 0,r),r.currentTarget=null}function Dh(r,o){o=(o&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],g=f.event;f=f.listeners;e:{var v=void 0;if(o)for(var C=f.length-1;0<=C;C--){var O=f[C],F=O.instance,Y=O.currentTarget;if(O=O.listener,F!==v&&g.isPropagationStopped())break e;Ah(g,O,Y),v=F}else for(C=0;C<f.length;C++){if(O=f[C],F=O.instance,Y=O.currentTarget,O=O.listener,F!==v&&g.isPropagationStopped())break e;Ah(g,O,Y),v=F}}}if(bn)throw r=Rr,bn=!1,Rr=null,r}function Je(r,o){var u=o[oc];u===void 0&&(u=o[oc]=new Set);var f=r+"__bubble";u.has(f)||(Lh(o,r,2,!1),u.add(f))}function Ju(r,o,u){var f=0;o&&(f|=4),Lh(u,r,f,o)}var El="_reactListening"+Math.random().toString(36).slice(2);function oi(r){if(!r[El]){r[El]=!0,s.forEach(function(u){u!=="selectionchange"&&(J1.has(u)||Ju(u,!1,r),Ju(u,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[El]||(o[El]=!0,Ju("selectionchange",!1,o))}}function Lh(r,o,u,f){switch(nh(o)){case 1:var g=f1;break;case 4:g=p1;break;default:g=Ou}u=g.bind(null,o,u,r),g=void 0,!Dn||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),f?g!==void 0?r.addEventListener(o,u,{capture:!0,passive:g}):r.addEventListener(o,u,!0):g!==void 0?r.addEventListener(o,u,{passive:g}):r.addEventListener(o,u,!1)}function Zu(r,o,u,f,g){var v=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var C=f.tag;if(C===3||C===4){var O=f.stateNode.containerInfo;if(O===g||O.nodeType===8&&O.parentNode===g)break;if(C===4)for(C=f.return;C!==null;){var F=C.tag;if((F===3||F===4)&&(F=C.stateNode.containerInfo,F===g||F.nodeType===8&&F.parentNode===g))return;C=C.return}for(;O!==null;){if(C=Ns(O),C===null)return;if(F=C.tag,F===5||F===6){f=v=C;continue e}O=O.parentNode}}f=f.return}Er(function(){var Y=v,re=qr(u),le=[];e:{var ne=Th.get(r);if(ne!==void 0){var fe=$u,me=r;switch(r){case"keypress":if(wl(u)===0)break e;case"keydown":case"keyup":fe=R1;break;case"focusin":me="focus",fe=Bu;break;case"focusout":me="blur",fe=Bu;break;case"beforeblur":case"afterblur":fe=Bu;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=oh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=g1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=A1;break;case Ch:case Nh:case Eh:fe=v1;break;case Rh:fe=L1;break;case"scroll":fe=h1;break;case"wheel":fe=O1;break;case"copy":case"cut":case"paste":fe=w1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=lh}var ge=(o&4)!==0,gt=!ge&&r==="scroll",V=ge?ne!==null?ne+"Capture":null:ne;ge=[];for(var H=Y,K;H!==null;){K=H;var ce=K.stateNode;if(K.tag===5&&ce!==null&&(K=ce,V!==null&&(ce=it(H,V),ce!=null&&ge.push(ii(H,ce,K)))),gt)break;H=H.return}0<ge.length&&(ne=new fe(ne,me,null,u,re),le.push({event:ne,listeners:ge}))}}if((o&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",fe=r==="mouseout"||r==="pointerout",ne&&u!==ht&&(me=u.relatedTarget||u.fromElement)&&(Ns(me)||me[Tr]))break e;if((fe||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,fe?(me=u.relatedTarget||u.toElement,fe=Y,me=me?Ns(me):null,me!==null&&(gt=Cs(me),me!==gt||me.tag!==5&&me.tag!==6)&&(me=null)):(fe=null,me=Y),fe!==me)){if(ge=oh,ce="onMouseLeave",V="onMouseEnter",H="mouse",(r==="pointerout"||r==="pointerover")&&(ge=lh,ce="onPointerLeave",V="onPointerEnter",H="pointer"),gt=fe==null?ne:eo(fe),K=me==null?ne:eo(me),ne=new ge(ce,H+"leave",fe,u,re),ne.target=gt,ne.relatedTarget=K,ce=null,Ns(re)===Y&&(ge=new ge(V,H+"enter",me,u,re),ge.target=K,ge.relatedTarget=gt,ce=ge),gt=ce,fe&&me)t:{for(ge=fe,V=me,H=0,K=ge;K;K=Js(K))H++;for(K=0,ce=V;ce;ce=Js(ce))K++;for(;0<H-K;)ge=Js(ge),H--;for(;0<K-H;)V=Js(V),K--;for(;H--;){if(ge===V||V!==null&&ge===V.alternate)break t;ge=Js(ge),V=Js(V)}ge=null}else ge=null;fe!==null&&Ih(le,ne,fe,ge,!1),me!==null&>!==null&&Ih(le,gt,me,ge,!0)}}e:{if(ne=Y?eo(Y):window,fe=ne.nodeName&&ne.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ne.type==="file")var ye=U1;else if(ph(ne))if(mh)ye=q1;else{ye=W1;var Ce=H1}else(fe=ne.nodeName)&&fe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(ye=V1);if(ye&&(ye=ye(r,Y))){hh(le,ye,u,re);break e}Ce&&Ce(r,ne,Y),r==="focusout"&&(Ce=ne._wrapperState)&&Ce.controlled&&ne.type==="number"&&Dt(ne,"number",ne.value)}switch(Ce=Y?eo(Y):window,r){case"focusin":(ph(Ce)||Ce.contentEditable==="true")&&(Xs=Ce,Gu=Y,ri=null);break;case"focusout":ri=Gu=Xs=null;break;case"mousedown":Ku=!0;break;case"contextmenu":case"mouseup":case"dragend":Ku=!1,Sh(le,u,re);break;case"selectionchange":if(Y1)break;case"keydown":case"keyup":Sh(le,u,re)}var Ne;if(Hu)e:{switch(r){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else Ys?dh(r,u)&&(Ae="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ae="onCompositionStart");Ae&&(ah&&u.locale!=="ko"&&(Ys||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&Ys&&(Ne=rh()):(Jr=re,_u="value"in Jr?Jr.value:Jr.textContent,Ys=!0)),Ce=Rl(Y,Ae),0<Ce.length&&(Ae=new ih(Ae,r,null,u,re),le.push({event:Ae,listeners:Ce}),Ne?Ae.data=Ne:(Ne=fh(u),Ne!==null&&(Ae.data=Ne)))),(Ne=_1?$1(r,u):z1(r,u))&&(Y=Rl(Y,"onBeforeInput"),0<Y.length&&(re=new ih("onBeforeInput","beforeinput",null,u,re),le.push({event:re,listeners:Y}),re.data=Ne))}Dh(le,o)})}function ii(r,o,u){return{instance:r,listener:o,currentTarget:u}}function Rl(r,o){for(var u=o+"Capture",f=[];r!==null;){var g=r,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=it(r,u),v!=null&&f.unshift(ii(r,v,g)),v=it(r,o),v!=null&&f.push(ii(r,v,g))),r=r.return}return f}function Js(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Ih(r,o,u,f,g){for(var v=o._reactName,C=[];u!==null&&u!==f;){var O=u,F=O.alternate,Y=O.stateNode;if(F!==null&&F===f)break;O.tag===5&&Y!==null&&(O=Y,g?(F=it(u,v),F!=null&&C.unshift(ii(u,F,O))):g||(F=it(u,v),F!=null&&C.push(ii(u,F,O)))),u=u.return}C.length!==0&&r.push({event:o,listeners:C})}var Z1=/\r\n?/g,ek=/\u0000|\uFFFD/g;function Oh(r){return(typeof r=="string"?r:""+r).replace(Z1,`
|
|
38
|
+
`).replace(ek,"")}function Tl(r,o,u){if(o=Oh(o),Oh(r)!==o&&u)throw Error(n(425))}function Pl(){}var ec=null,tc=null;function nc(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var rc=typeof setTimeout=="function"?setTimeout:void 0,tk=typeof clearTimeout=="function"?clearTimeout:void 0,Mh=typeof Promise=="function"?Promise:void 0,nk=typeof queueMicrotask=="function"?queueMicrotask:typeof Mh<"u"?function(r){return Mh.resolve(null).then(r).catch(rk)}:rc;function rk(r){setTimeout(function(){throw r})}function sc(r,o){var u=o,f=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(f===0){r.removeChild(g),Xo(o);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=g}while(u);Xo(o)}function es(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function _h(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(o===0)return r;o--}else u==="/$"&&o++}r=r.previousSibling}return null}var Zs=Math.random().toString(36).slice(2),cr="__reactFiber$"+Zs,li="__reactProps$"+Zs,Tr="__reactContainer$"+Zs,oc="__reactEvents$"+Zs,sk="__reactListeners$"+Zs,ok="__reactHandles$"+Zs;function Ns(r){var o=r[cr];if(o)return o;for(var u=r.parentNode;u;){if(o=u[Tr]||u[cr]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(r=_h(r);r!==null;){if(u=r[cr])return u;r=_h(r)}return o}r=u,u=r.parentNode}return null}function ai(r){return r=r[cr]||r[Tr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function eo(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Al(r){return r[li]||null}var ic=[],to=-1;function ts(r){return{current:r}}function Ze(r){0>to||(r.current=ic[to],ic[to]=null,to--)}function Ge(r,o){to++,ic[to]=r.current,r.current=o}var ns={},Gt=ts(ns),ln=ts(!1),Es=ns;function no(r,o){var u=r.type.contextTypes;if(!u)return ns;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===o)return f.__reactInternalMemoizedMaskedChildContext;var g={},v;for(v in u)g[v]=o[v];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=g),g}function an(r){return r=r.childContextTypes,r!=null}function Dl(){Ze(ln),Ze(Gt)}function $h(r,o,u){if(Gt.current!==ns)throw Error(n(168));Ge(Gt,o),Ge(ln,u)}function zh(r,o,u){var f=r.stateNode;if(o=o.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var g in f)if(!(g in o))throw Error(n(108,Pe(r)||"Unknown",g));return R({},u,f)}function Ll(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ns,Es=Gt.current,Ge(Gt,r),Ge(ln,ln.current),!0}function Fh(r,o,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=zh(r,o,Es),f.__reactInternalMemoizedMergedChildContext=r,Ze(ln),Ze(Gt),Ge(Gt,r)):Ze(ln),Ge(ln,u)}var Pr=null,Il=!1,lc=!1;function Bh(r){Pr===null?Pr=[r]:Pr.push(r)}function ik(r){Il=!0,Bh(r)}function rs(){if(!lc&&Pr!==null){lc=!0;var r=0,o=Ve;try{var u=Pr;for(Ve=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}Pr=null,Il=!1}catch(g){throw Pr!==null&&(Pr=Pr.slice(r+1)),Hp(Tu,rs),g}finally{Ve=o,lc=!1}}return null}var ro=[],so=0,Ol=null,Ml=0,Ln=[],In=0,Rs=null,Ar=1,Dr="";function Ts(r,o){ro[so++]=Ml,ro[so++]=Ol,Ol=r,Ml=o}function Uh(r,o,u){Ln[In++]=Ar,Ln[In++]=Dr,Ln[In++]=Rs,Rs=r;var f=Ar;r=Dr;var g=32-Gn(f)-1;f&=~(1<<g),u+=1;var v=32-Gn(o)+g;if(30<v){var C=g-g%5;v=(f&(1<<C)-1).toString(32),f>>=C,g-=C,Ar=1<<32-Gn(o)+g|u<<g|f,Dr=v+r}else Ar=1<<v|u<<g|f,Dr=r}function ac(r){r.return!==null&&(Ts(r,1),Uh(r,1,0))}function uc(r){for(;r===Ol;)Ol=ro[--so],ro[so]=null,Ml=ro[--so],ro[so]=null;for(;r===Rs;)Rs=Ln[--In],Ln[In]=null,Dr=Ln[--In],Ln[In]=null,Ar=Ln[--In],Ln[In]=null}var kn=null,Sn=null,nt=!1,Yn=null;function Hh(r,o){var u=$n(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=r,o=r.deletions,o===null?(r.deletions=[u],r.flags|=16):o.push(u)}function Wh(r,o){switch(r.tag){case 5:var u=r.type;return o=o.nodeType!==1||u.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,kn=r,Sn=es(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,kn=r,Sn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(u=Rs!==null?{id:Ar,overflow:Dr}:null,r.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=$n(18,null,null,0),u.stateNode=o,u.return=r,r.child=u,kn=r,Sn=null,!0):!1;default:return!1}}function cc(r){return(r.mode&1)!==0&&(r.flags&128)===0}function dc(r){if(nt){var o=Sn;if(o){var u=o;if(!Wh(r,o)){if(cc(r))throw Error(n(418));o=es(u.nextSibling);var f=kn;o&&Wh(r,o)?Hh(f,u):(r.flags=r.flags&-4097|2,nt=!1,kn=r)}}else{if(cc(r))throw Error(n(418));r.flags=r.flags&-4097|2,nt=!1,kn=r}}}function Vh(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;kn=r}function _l(r){if(r!==kn)return!1;if(!nt)return Vh(r),nt=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!nc(r.type,r.memoizedProps)),o&&(o=Sn)){if(cc(r))throw qh(),Error(n(418));for(;o;)Hh(r,o),o=es(o.nextSibling)}if(Vh(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(o===0){Sn=es(r.nextSibling);break e}o--}else u!=="$"&&u!=="$!"&&u!=="$?"||o++}r=r.nextSibling}Sn=null}}else Sn=kn?es(r.stateNode.nextSibling):null;return!0}function qh(){for(var r=Sn;r;)r=es(r.nextSibling)}function oo(){Sn=kn=null,nt=!1}function fc(r){Yn===null?Yn=[r]:Yn.push(r)}var lk=M.ReactCurrentBatchConfig;function ui(r,o,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var f=u.stateNode}if(!f)throw Error(n(147,r));var g=f,v=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===v?o.ref:(o=function(C){var O=g.refs;C===null?delete O[v]:O[v]=C},o._stringRef=v,o)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function $l(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function Gh(r){var o=r._init;return o(r._payload)}function Kh(r){function o(V,H){if(r){var K=V.deletions;K===null?(V.deletions=[H],V.flags|=16):K.push(H)}}function u(V,H){if(!r)return null;for(;H!==null;)o(V,H),H=H.sibling;return null}function f(V,H){for(V=new Map;H!==null;)H.key!==null?V.set(H.key,H):V.set(H.index,H),H=H.sibling;return V}function g(V,H){return V=ds(V,H),V.index=0,V.sibling=null,V}function v(V,H,K){return V.index=K,r?(K=V.alternate,K!==null?(K=K.index,K<H?(V.flags|=2,H):K):(V.flags|=2,H)):(V.flags|=1048576,H)}function C(V){return r&&V.alternate===null&&(V.flags|=2),V}function O(V,H,K,ce){return H===null||H.tag!==6?(H=rd(K,V.mode,ce),H.return=V,H):(H=g(H,K),H.return=V,H)}function F(V,H,K,ce){var ye=K.type;return ye===P?re(V,H,K.props.children,ce,K.key):H!==null&&(H.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===te&&Gh(ye)===H.type)?(ce=g(H,K.props),ce.ref=ui(V,H,K),ce.return=V,ce):(ce=aa(K.type,K.key,K.props,null,V.mode,ce),ce.ref=ui(V,H,K),ce.return=V,ce)}function Y(V,H,K,ce){return H===null||H.tag!==4||H.stateNode.containerInfo!==K.containerInfo||H.stateNode.implementation!==K.implementation?(H=sd(K,V.mode,ce),H.return=V,H):(H=g(H,K.children||[]),H.return=V,H)}function re(V,H,K,ce,ye){return H===null||H.tag!==7?(H=_s(K,V.mode,ce,ye),H.return=V,H):(H=g(H,K),H.return=V,H)}function le(V,H,K){if(typeof H=="string"&&H!==""||typeof H=="number")return H=rd(""+H,V.mode,K),H.return=V,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return K=aa(H.type,H.key,H.props,null,V.mode,K),K.ref=ui(V,null,H),K.return=V,K;case N:return H=sd(H,V.mode,K),H.return=V,H;case te:var ce=H._init;return le(V,ce(H._payload),K)}if(pt(H)||oe(H))return H=_s(H,V.mode,K,null),H.return=V,H;$l(V,H)}return null}function ne(V,H,K,ce){var ye=H!==null?H.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return ye!==null?null:O(V,H,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case _:return K.key===ye?F(V,H,K,ce):null;case N:return K.key===ye?Y(V,H,K,ce):null;case te:return ye=K._init,ne(V,H,ye(K._payload),ce)}if(pt(K)||oe(K))return ye!==null?null:re(V,H,K,ce,null);$l(V,K)}return null}function fe(V,H,K,ce,ye){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return V=V.get(K)||null,O(H,V,""+ce,ye);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return V=V.get(ce.key===null?K:ce.key)||null,F(H,V,ce,ye);case N:return V=V.get(ce.key===null?K:ce.key)||null,Y(H,V,ce,ye);case te:var Ce=ce._init;return fe(V,H,K,Ce(ce._payload),ye)}if(pt(ce)||oe(ce))return V=V.get(K)||null,re(H,V,ce,ye,null);$l(H,ce)}return null}function me(V,H,K,ce){for(var ye=null,Ce=null,Ne=H,Ae=H=0,Ot=null;Ne!==null&&Ae<K.length;Ae++){Ne.index>Ae?(Ot=Ne,Ne=null):Ot=Ne.sibling;var Be=ne(V,Ne,K[Ae],ce);if(Be===null){Ne===null&&(Ne=Ot);break}r&&Ne&&Be.alternate===null&&o(V,Ne),H=v(Be,H,Ae),Ce===null?ye=Be:Ce.sibling=Be,Ce=Be,Ne=Ot}if(Ae===K.length)return u(V,Ne),nt&&Ts(V,Ae),ye;if(Ne===null){for(;Ae<K.length;Ae++)Ne=le(V,K[Ae],ce),Ne!==null&&(H=v(Ne,H,Ae),Ce===null?ye=Ne:Ce.sibling=Ne,Ce=Ne);return nt&&Ts(V,Ae),ye}for(Ne=f(V,Ne);Ae<K.length;Ae++)Ot=fe(Ne,V,Ae,K[Ae],ce),Ot!==null&&(r&&Ot.alternate!==null&&Ne.delete(Ot.key===null?Ae:Ot.key),H=v(Ot,H,Ae),Ce===null?ye=Ot:Ce.sibling=Ot,Ce=Ot);return r&&Ne.forEach(function(fs){return o(V,fs)}),nt&&Ts(V,Ae),ye}function ge(V,H,K,ce){var ye=oe(K);if(typeof ye!="function")throw Error(n(150));if(K=ye.call(K),K==null)throw Error(n(151));for(var Ce=ye=null,Ne=H,Ae=H=0,Ot=null,Be=K.next();Ne!==null&&!Be.done;Ae++,Be=K.next()){Ne.index>Ae?(Ot=Ne,Ne=null):Ot=Ne.sibling;var fs=ne(V,Ne,Be.value,ce);if(fs===null){Ne===null&&(Ne=Ot);break}r&&Ne&&fs.alternate===null&&o(V,Ne),H=v(fs,H,Ae),Ce===null?ye=fs:Ce.sibling=fs,Ce=fs,Ne=Ot}if(Be.done)return u(V,Ne),nt&&Ts(V,Ae),ye;if(Ne===null){for(;!Be.done;Ae++,Be=K.next())Be=le(V,Be.value,ce),Be!==null&&(H=v(Be,H,Ae),Ce===null?ye=Be:Ce.sibling=Be,Ce=Be);return nt&&Ts(V,Ae),ye}for(Ne=f(V,Ne);!Be.done;Ae++,Be=K.next())Be=fe(Ne,V,Ae,Be.value,ce),Be!==null&&(r&&Be.alternate!==null&&Ne.delete(Be.key===null?Ae:Be.key),H=v(Be,H,Ae),Ce===null?ye=Be:Ce.sibling=Be,Ce=Be);return r&&Ne.forEach(function(Fk){return o(V,Fk)}),nt&&Ts(V,Ae),ye}function gt(V,H,K,ce){if(typeof K=="object"&&K!==null&&K.type===P&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case _:e:{for(var ye=K.key,Ce=H;Ce!==null;){if(Ce.key===ye){if(ye=K.type,ye===P){if(Ce.tag===7){u(V,Ce.sibling),H=g(Ce,K.props.children),H.return=V,V=H;break e}}else if(Ce.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===te&&Gh(ye)===Ce.type){u(V,Ce.sibling),H=g(Ce,K.props),H.ref=ui(V,Ce,K),H.return=V,V=H;break e}u(V,Ce);break}else o(V,Ce);Ce=Ce.sibling}K.type===P?(H=_s(K.props.children,V.mode,ce,K.key),H.return=V,V=H):(ce=aa(K.type,K.key,K.props,null,V.mode,ce),ce.ref=ui(V,H,K),ce.return=V,V=ce)}return C(V);case N:e:{for(Ce=K.key;H!==null;){if(H.key===Ce)if(H.tag===4&&H.stateNode.containerInfo===K.containerInfo&&H.stateNode.implementation===K.implementation){u(V,H.sibling),H=g(H,K.children||[]),H.return=V,V=H;break e}else{u(V,H);break}else o(V,H);H=H.sibling}H=sd(K,V.mode,ce),H.return=V,V=H}return C(V);case te:return Ce=K._init,gt(V,H,Ce(K._payload),ce)}if(pt(K))return me(V,H,K,ce);if(oe(K))return ge(V,H,K,ce);$l(V,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,H!==null&&H.tag===6?(u(V,H.sibling),H=g(H,K),H.return=V,V=H):(u(V,H),H=rd(K,V.mode,ce),H.return=V,V=H),C(V)):u(V,H)}return gt}var io=Kh(!0),Yh=Kh(!1),zl=ts(null),Fl=null,lo=null,pc=null;function hc(){pc=lo=Fl=null}function mc(r){var o=zl.current;Ze(zl),r._currentValue=o}function gc(r,o,u){for(;r!==null;){var f=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),r===u)break;r=r.return}}function ao(r,o){Fl=r,pc=lo=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(un=!0),r.firstContext=null)}function On(r){var o=r._currentValue;if(pc!==r)if(r={context:r,memoizedValue:o,next:null},lo===null){if(Fl===null)throw Error(n(308));lo=r,Fl.dependencies={lanes:0,firstContext:r}}else lo=lo.next=r;return o}var Ps=null;function xc(r){Ps===null?Ps=[r]:Ps.push(r)}function Xh(r,o,u,f){var g=o.interleaved;return g===null?(u.next=u,xc(o)):(u.next=g.next,g.next=u),o.interleaved=u,Lr(r,f)}function Lr(r,o){r.lanes|=o;var u=r.alternate;for(u!==null&&(u.lanes|=o),u=r,r=r.return;r!==null;)r.childLanes|=o,u=r.alternate,u!==null&&(u.childLanes|=o),u=r,r=r.return;return u.tag===3?u.stateNode:null}var ss=!1;function yc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qh(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Ir(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function os(r,o,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(ze&2)!==0){var g=f.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),f.pending=o,Lr(r,u)}return g=f.interleaved,g===null?(o.next=o,xc(f)):(o.next=g.next,g.next=o),f.interleaved=o,Lr(r,u)}function Bl(r,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var f=o.lanes;f&=r.pendingLanes,u|=f,o.lanes=u,Du(r,u)}}function Jh(r,o){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var g=null,v=null;if(u=u.firstBaseUpdate,u!==null){do{var C={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};v===null?g=v=C:v=v.next=C,u=u.next}while(u!==null);v===null?g=v=o:v=v.next=o}else g=v=o;u={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:f.shared,effects:f.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=o:r.next=o,u.lastBaseUpdate=o}function Ul(r,o,u,f){var g=r.updateQueue;ss=!1;var v=g.firstBaseUpdate,C=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var F=O,Y=F.next;F.next=null,C===null?v=Y:C.next=Y,C=F;var re=r.alternate;re!==null&&(re=re.updateQueue,O=re.lastBaseUpdate,O!==C&&(O===null?re.firstBaseUpdate=Y:O.next=Y,re.lastBaseUpdate=F))}if(v!==null){var le=g.baseState;C=0,re=Y=F=null,O=v;do{var ne=O.lane,fe=O.eventTime;if((f&ne)===ne){re!==null&&(re=re.next={eventTime:fe,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var me=r,ge=O;switch(ne=o,fe=u,ge.tag){case 1:if(me=ge.payload,typeof me=="function"){le=me.call(fe,le,ne);break e}le=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=ge.payload,ne=typeof me=="function"?me.call(fe,le,ne):me,ne==null)break e;le=R({},le,ne);break e;case 2:ss=!0}}O.callback!==null&&O.lane!==0&&(r.flags|=64,ne=g.effects,ne===null?g.effects=[O]:ne.push(O))}else fe={eventTime:fe,lane:ne,tag:O.tag,payload:O.payload,callback:O.callback,next:null},re===null?(Y=re=fe,F=le):re=re.next=fe,C|=ne;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;ne=O,O=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(re===null&&(F=le),g.baseState=F,g.firstBaseUpdate=Y,g.lastBaseUpdate=re,o=g.shared.interleaved,o!==null){g=o;do C|=g.lane,g=g.next;while(g!==o)}else v===null&&(g.shared.lanes=0);Ls|=C,r.lanes=C,r.memoizedState=le}}function Zh(r,o,u){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var f=r[o],g=f.callback;if(g!==null){if(f.callback=null,f=u,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var ci={},dr=ts(ci),di=ts(ci),fi=ts(ci);function As(r){if(r===ci)throw Error(n(174));return r}function vc(r,o){switch(Ge(fi,o),Ge(di,r),Ge(dr,ci),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ae(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=ae(o,r)}Ze(dr),Ge(dr,o)}function uo(){Ze(dr),Ze(di),Ze(fi)}function em(r){As(fi.current);var o=As(dr.current),u=ae(o,r.type);o!==u&&(Ge(di,r),Ge(dr,u))}function bc(r){di.current===r&&(Ze(dr),Ze(di))}var lt=ts(0);function Hl(r){for(var o=r;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var wc=[];function kc(){for(var r=0;r<wc.length;r++)wc[r]._workInProgressVersionPrimary=null;wc.length=0}var Wl=M.ReactCurrentDispatcher,Sc=M.ReactCurrentBatchConfig,Ds=0,at=null,Ct=null,Lt=null,Vl=!1,pi=!1,hi=0,ak=0;function Kt(){throw Error(n(321))}function jc(r,o){if(o===null)return!1;for(var u=0;u<o.length&&u<r.length;u++)if(!Kn(r[u],o[u]))return!1;return!0}function Cc(r,o,u,f,g,v){if(Ds=v,at=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Wl.current=r===null||r.memoizedState===null?fk:pk,r=u(f,g),pi){v=0;do{if(pi=!1,hi=0,25<=v)throw Error(n(301));v+=1,Lt=Ct=null,o.updateQueue=null,Wl.current=hk,r=u(f,g)}while(pi)}if(Wl.current=Kl,o=Ct!==null&&Ct.next!==null,Ds=0,Lt=Ct=at=null,Vl=!1,o)throw Error(n(300));return r}function Nc(){var r=hi!==0;return hi=0,r}function fr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?at.memoizedState=Lt=r:Lt=Lt.next=r,Lt}function Mn(){if(Ct===null){var r=at.alternate;r=r!==null?r.memoizedState:null}else r=Ct.next;var o=Lt===null?at.memoizedState:Lt.next;if(o!==null)Lt=o,Ct=r;else{if(r===null)throw Error(n(310));Ct=r,r={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Lt===null?at.memoizedState=Lt=r:Lt=Lt.next=r}return Lt}function mi(r,o){return typeof o=="function"?o(r):o}function Ec(r){var o=Mn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=Ct,g=f.baseQueue,v=u.pending;if(v!==null){if(g!==null){var C=g.next;g.next=v.next,v.next=C}f.baseQueue=g=v,u.pending=null}if(g!==null){v=g.next,f=f.baseState;var O=C=null,F=null,Y=v;do{var re=Y.lane;if((Ds&re)===re)F!==null&&(F=F.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),f=Y.hasEagerState?Y.eagerState:r(f,Y.action);else{var le={lane:re,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};F===null?(O=F=le,C=f):F=F.next=le,at.lanes|=re,Ls|=re}Y=Y.next}while(Y!==null&&Y!==v);F===null?C=f:F.next=O,Kn(f,o.memoizedState)||(un=!0),o.memoizedState=f,o.baseState=C,o.baseQueue=F,u.lastRenderedState=f}if(r=u.interleaved,r!==null){g=r;do v=g.lane,at.lanes|=v,Ls|=v,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function Rc(r){var o=Mn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,g=u.pending,v=o.memoizedState;if(g!==null){u.pending=null;var C=g=g.next;do v=r(v,C.action),C=C.next;while(C!==g);Kn(v,o.memoizedState)||(un=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),u.lastRenderedState=v}return[v,f]}function tm(){}function nm(r,o){var u=at,f=Mn(),g=o(),v=!Kn(f.memoizedState,g);if(v&&(f.memoizedState=g,un=!0),f=f.queue,Tc(om.bind(null,u,f,r),[r]),f.getSnapshot!==o||v||Lt!==null&&Lt.memoizedState.tag&1){if(u.flags|=2048,gi(9,sm.bind(null,u,f,g,o),void 0,null),It===null)throw Error(n(349));(Ds&30)!==0||rm(u,o,g)}return g}function rm(r,o,u){r.flags|=16384,r={getSnapshot:o,value:u},o=at.updateQueue,o===null?(o={lastEffect:null,stores:null},at.updateQueue=o,o.stores=[r]):(u=o.stores,u===null?o.stores=[r]:u.push(r))}function sm(r,o,u,f){o.value=u,o.getSnapshot=f,im(o)&&lm(r)}function om(r,o,u){return u(function(){im(o)&&lm(r)})}function im(r){var o=r.getSnapshot;r=r.value;try{var u=o();return!Kn(r,u)}catch{return!0}}function lm(r){var o=Lr(r,1);o!==null&&Zn(o,r,1,-1)}function am(r){var o=fr();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:r},o.queue=r,r=r.dispatch=dk.bind(null,at,r),[o.memoizedState,r]}function gi(r,o,u,f){return r={tag:r,create:o,destroy:u,deps:f,next:null},o=at.updateQueue,o===null?(o={lastEffect:null,stores:null},at.updateQueue=o,o.lastEffect=r.next=r):(u=o.lastEffect,u===null?o.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,o.lastEffect=r)),r}function um(){return Mn().memoizedState}function ql(r,o,u,f){var g=fr();at.flags|=r,g.memoizedState=gi(1|o,u,void 0,f===void 0?null:f)}function Gl(r,o,u,f){var g=Mn();f=f===void 0?null:f;var v=void 0;if(Ct!==null){var C=Ct.memoizedState;if(v=C.destroy,f!==null&&jc(f,C.deps)){g.memoizedState=gi(o,u,v,f);return}}at.flags|=r,g.memoizedState=gi(1|o,u,v,f)}function cm(r,o){return ql(8390656,8,r,o)}function Tc(r,o){return Gl(2048,8,r,o)}function dm(r,o){return Gl(4,2,r,o)}function fm(r,o){return Gl(4,4,r,o)}function pm(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function hm(r,o,u){return u=u!=null?u.concat([r]):null,Gl(4,4,pm.bind(null,o,r),u)}function Pc(){}function mm(r,o){var u=Mn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&jc(o,f[1])?f[0]:(u.memoizedState=[r,o],r)}function gm(r,o){var u=Mn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&jc(o,f[1])?f[0]:(r=r(),u.memoizedState=[r,o],r)}function xm(r,o,u){return(Ds&21)===0?(r.baseState&&(r.baseState=!1,un=!0),r.memoizedState=u):(Kn(u,o)||(u=Gp(),at.lanes|=u,Ls|=u,r.baseState=!0),o)}function uk(r,o){var u=Ve;Ve=u!==0&&4>u?u:4,r(!0);var f=Sc.transition;Sc.transition={};try{r(!1),o()}finally{Ve=u,Sc.transition=f}}function ym(){return Mn().memoizedState}function ck(r,o,u){var f=us(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},vm(r))bm(o,u);else if(u=Xh(r,o,u,f),u!==null){var g=nn();Zn(u,r,f,g),wm(u,o,f)}}function dk(r,o,u){var f=us(r),g={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(vm(r))bm(o,g);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null))try{var C=o.lastRenderedState,O=v(C,u);if(g.hasEagerState=!0,g.eagerState=O,Kn(O,C)){var F=o.interleaved;F===null?(g.next=g,xc(o)):(g.next=F.next,F.next=g),o.interleaved=g;return}}catch{}finally{}u=Xh(r,o,g,f),u!==null&&(g=nn(),Zn(u,r,f,g),wm(u,o,f))}}function vm(r){var o=r.alternate;return r===at||o!==null&&o===at}function bm(r,o){pi=Vl=!0;var u=r.pending;u===null?o.next=o:(o.next=u.next,u.next=o),r.pending=o}function wm(r,o,u){if((u&4194240)!==0){var f=o.lanes;f&=r.pendingLanes,u|=f,o.lanes=u,Du(r,u)}}var Kl={readContext:On,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},fk={readContext:On,useCallback:function(r,o){return fr().memoizedState=[r,o===void 0?null:o],r},useContext:On,useEffect:cm,useImperativeHandle:function(r,o,u){return u=u!=null?u.concat([r]):null,ql(4194308,4,pm.bind(null,o,r),u)},useLayoutEffect:function(r,o){return ql(4194308,4,r,o)},useInsertionEffect:function(r,o){return ql(4,2,r,o)},useMemo:function(r,o){var u=fr();return o=o===void 0?null:o,r=r(),u.memoizedState=[r,o],r},useReducer:function(r,o,u){var f=fr();return o=u!==void 0?u(o):o,f.memoizedState=f.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},f.queue=r,r=r.dispatch=ck.bind(null,at,r),[f.memoizedState,r]},useRef:function(r){var o=fr();return r={current:r},o.memoizedState=r},useState:am,useDebugValue:Pc,useDeferredValue:function(r){return fr().memoizedState=r},useTransition:function(){var r=am(!1),o=r[0];return r=uk.bind(null,r[1]),fr().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,u){var f=at,g=fr();if(nt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=o(),It===null)throw Error(n(349));(Ds&30)!==0||rm(f,o,u)}g.memoizedState=u;var v={value:u,getSnapshot:o};return g.queue=v,cm(om.bind(null,f,v,r),[r]),f.flags|=2048,gi(9,sm.bind(null,f,v,u,o),void 0,null),u},useId:function(){var r=fr(),o=It.identifierPrefix;if(nt){var u=Dr,f=Ar;u=(f&~(1<<32-Gn(f)-1)).toString(32)+u,o=":"+o+"R"+u,u=hi++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=ak++,o=":"+o+"r"+u.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},pk={readContext:On,useCallback:mm,useContext:On,useEffect:Tc,useImperativeHandle:hm,useInsertionEffect:dm,useLayoutEffect:fm,useMemo:gm,useReducer:Ec,useRef:um,useState:function(){return Ec(mi)},useDebugValue:Pc,useDeferredValue:function(r){var o=Mn();return xm(o,Ct.memoizedState,r)},useTransition:function(){var r=Ec(mi)[0],o=Mn().memoizedState;return[r,o]},useMutableSource:tm,useSyncExternalStore:nm,useId:ym,unstable_isNewReconciler:!1},hk={readContext:On,useCallback:mm,useContext:On,useEffect:Tc,useImperativeHandle:hm,useInsertionEffect:dm,useLayoutEffect:fm,useMemo:gm,useReducer:Rc,useRef:um,useState:function(){return Rc(mi)},useDebugValue:Pc,useDeferredValue:function(r){var o=Mn();return Ct===null?o.memoizedState=r:xm(o,Ct.memoizedState,r)},useTransition:function(){var r=Rc(mi)[0],o=Mn().memoizedState;return[r,o]},useMutableSource:tm,useSyncExternalStore:nm,useId:ym,unstable_isNewReconciler:!1};function Xn(r,o){if(r&&r.defaultProps){o=R({},o),r=r.defaultProps;for(var u in r)o[u]===void 0&&(o[u]=r[u]);return o}return o}function Ac(r,o,u,f){o=r.memoizedState,u=u(f,o),u=u==null?o:R({},o,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Yl={isMounted:function(r){return(r=r._reactInternals)?Cs(r)===r:!1},enqueueSetState:function(r,o,u){r=r._reactInternals;var f=nn(),g=us(r),v=Ir(f,g);v.payload=o,u!=null&&(v.callback=u),o=os(r,v,g),o!==null&&(Zn(o,r,g,f),Bl(o,r,g))},enqueueReplaceState:function(r,o,u){r=r._reactInternals;var f=nn(),g=us(r),v=Ir(f,g);v.tag=1,v.payload=o,u!=null&&(v.callback=u),o=os(r,v,g),o!==null&&(Zn(o,r,g,f),Bl(o,r,g))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var u=nn(),f=us(r),g=Ir(u,f);g.tag=2,o!=null&&(g.callback=o),o=os(r,g,f),o!==null&&(Zn(o,r,f,u),Bl(o,r,f))}};function km(r,o,u,f,g,v,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,v,C):o.prototype&&o.prototype.isPureReactComponent?!ni(u,f)||!ni(g,v):!0}function Sm(r,o,u){var f=!1,g=ns,v=o.contextType;return typeof v=="object"&&v!==null?v=On(v):(g=an(o)?Es:Gt.current,f=o.contextTypes,v=(f=f!=null)?no(r,g):ns),o=new o(u,v),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Yl,r.stateNode=o,o._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=v),o}function jm(r,o,u,f){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,f),o.state!==r&&Yl.enqueueReplaceState(o,o.state,null)}function Dc(r,o,u,f){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},yc(r);var v=o.contextType;typeof v=="object"&&v!==null?g.context=On(v):(v=an(o)?Es:Gt.current,g.context=no(r,v)),g.state=r.memoizedState,v=o.getDerivedStateFromProps,typeof v=="function"&&(Ac(r,o,v,u),g.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&Yl.enqueueReplaceState(g,g.state,null),Ul(r,u,g,f),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function co(r,o){try{var u="",f=o;do u+=ve(f),f=f.return;while(f);var g=u}catch(v){g=`
|
|
39
|
+
Error generating stack: `+v.message+`
|
|
40
|
+
`+v.stack}return{value:r,source:o,stack:g,digest:null}}function Lc(r,o,u){return{value:r,source:null,stack:u??null,digest:o??null}}function Ic(r,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var mk=typeof WeakMap=="function"?WeakMap:Map;function Cm(r,o,u){u=Ir(-1,u),u.tag=3,u.payload={element:null};var f=o.value;return u.callback=function(){na||(na=!0,Yc=f),Ic(r,o)},u}function Nm(r,o,u){u=Ir(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var g=o.value;u.payload=function(){return f(g)},u.callback=function(){Ic(r,o)}}var v=r.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(u.callback=function(){Ic(r,o),typeof f!="function"&&(ls===null?ls=new Set([this]):ls.add(this));var C=o.stack;this.componentDidCatch(o.value,{componentStack:C!==null?C:""})}),u}function Em(r,o,u){var f=r.pingCache;if(f===null){f=r.pingCache=new mk;var g=new Set;f.set(o,g)}else g=f.get(o),g===void 0&&(g=new Set,f.set(o,g));g.has(u)||(g.add(u),r=Tk.bind(null,r,o,u),o.then(r,r))}function Rm(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function Tm(r,o,u,f,g){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=Ir(-1,1),o.tag=2,os(u,o,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var gk=M.ReactCurrentOwner,un=!1;function tn(r,o,u,f){o.child=r===null?Yh(o,null,u,f):io(o,r.child,u,f)}function Pm(r,o,u,f,g){u=u.render;var v=o.ref;return ao(o,g),f=Cc(r,o,u,f,v,g),u=Nc(),r!==null&&!un?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,Or(r,o,g)):(nt&&u&&ac(o),o.flags|=1,tn(r,o,f,g),o.child)}function Am(r,o,u,f,g){if(r===null){var v=u.type;return typeof v=="function"&&!nd(v)&&v.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=v,Dm(r,o,v,f,g)):(r=aa(u.type,null,f,o,o.mode,g),r.ref=o.ref,r.return=o,o.child=r)}if(v=r.child,(r.lanes&g)===0){var C=v.memoizedProps;if(u=u.compare,u=u!==null?u:ni,u(C,f)&&r.ref===o.ref)return Or(r,o,g)}return o.flags|=1,r=ds(v,f),r.ref=o.ref,r.return=o,o.child=r}function Dm(r,o,u,f,g){if(r!==null){var v=r.memoizedProps;if(ni(v,f)&&r.ref===o.ref)if(un=!1,o.pendingProps=f=v,(r.lanes&g)!==0)(r.flags&131072)!==0&&(un=!0);else return o.lanes=r.lanes,Or(r,o,g)}return Oc(r,o,u,f,g)}function Lm(r,o,u){var f=o.pendingProps,g=f.children,v=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ge(po,jn),jn|=u;else{if((u&1073741824)===0)return r=v!==null?v.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,Ge(po,jn),jn|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:u,Ge(po,jn),jn|=f}else v!==null?(f=v.baseLanes|u,o.memoizedState=null):f=u,Ge(po,jn),jn|=f;return tn(r,o,g,u),o.child}function Im(r,o){var u=o.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function Oc(r,o,u,f,g){var v=an(u)?Es:Gt.current;return v=no(o,v),ao(o,g),u=Cc(r,o,u,f,v,g),f=Nc(),r!==null&&!un?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,Or(r,o,g)):(nt&&f&&ac(o),o.flags|=1,tn(r,o,u,g),o.child)}function Om(r,o,u,f,g){if(an(u)){var v=!0;Ll(o)}else v=!1;if(ao(o,g),o.stateNode===null)Ql(r,o),Sm(o,u,f),Dc(o,u,f,g),f=!0;else if(r===null){var C=o.stateNode,O=o.memoizedProps;C.props=O;var F=C.context,Y=u.contextType;typeof Y=="object"&&Y!==null?Y=On(Y):(Y=an(u)?Es:Gt.current,Y=no(o,Y));var re=u.getDerivedStateFromProps,le=typeof re=="function"||typeof C.getSnapshotBeforeUpdate=="function";le||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(O!==f||F!==Y)&&jm(o,C,f,Y),ss=!1;var ne=o.memoizedState;C.state=ne,Ul(o,f,C,g),F=o.memoizedState,O!==f||ne!==F||ln.current||ss?(typeof re=="function"&&(Ac(o,u,re,f),F=o.memoizedState),(O=ss||km(o,u,O,f,ne,F,Y))?(le||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(o.flags|=4194308)):(typeof C.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=F),C.props=f,C.state=F,C.context=Y,f=O):(typeof C.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{C=o.stateNode,Qh(r,o),O=o.memoizedProps,Y=o.type===o.elementType?O:Xn(o.type,O),C.props=Y,le=o.pendingProps,ne=C.context,F=u.contextType,typeof F=="object"&&F!==null?F=On(F):(F=an(u)?Es:Gt.current,F=no(o,F));var fe=u.getDerivedStateFromProps;(re=typeof fe=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(O!==le||ne!==F)&&jm(o,C,f,F),ss=!1,ne=o.memoizedState,C.state=ne,Ul(o,f,C,g);var me=o.memoizedState;O!==le||ne!==me||ln.current||ss?(typeof fe=="function"&&(Ac(o,u,fe,f),me=o.memoizedState),(Y=ss||km(o,u,Y,f,ne,me,F)||!1)?(re||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(f,me,F),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(f,me,F)),typeof C.componentDidUpdate=="function"&&(o.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof C.componentDidUpdate!="function"||O===r.memoizedProps&&ne===r.memoizedState||(o.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||O===r.memoizedProps&&ne===r.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=me),C.props=f,C.state=me,C.context=F,f=Y):(typeof C.componentDidUpdate!="function"||O===r.memoizedProps&&ne===r.memoizedState||(o.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||O===r.memoizedProps&&ne===r.memoizedState||(o.flags|=1024),f=!1)}return Mc(r,o,u,f,v,g)}function Mc(r,o,u,f,g,v){Im(r,o);var C=(o.flags&128)!==0;if(!f&&!C)return g&&Fh(o,u,!1),Or(r,o,v);f=o.stateNode,gk.current=o;var O=C&&typeof u.getDerivedStateFromError!="function"?null:f.render();return o.flags|=1,r!==null&&C?(o.child=io(o,r.child,null,v),o.child=io(o,null,O,v)):tn(r,o,O,v),o.memoizedState=f.state,g&&Fh(o,u,!0),o.child}function Mm(r){var o=r.stateNode;o.pendingContext?$h(r,o.pendingContext,o.pendingContext!==o.context):o.context&&$h(r,o.context,!1),vc(r,o.containerInfo)}function _m(r,o,u,f,g){return oo(),fc(g),o.flags|=256,tn(r,o,u,f),o.child}var _c={dehydrated:null,treeContext:null,retryLane:0};function $c(r){return{baseLanes:r,cachePool:null,transitions:null}}function $m(r,o,u){var f=o.pendingProps,g=lt.current,v=!1,C=(o.flags&128)!==0,O;if((O=C)||(O=r!==null&&r.memoizedState===null?!1:(g&2)!==0),O?(v=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),Ge(lt,g&1),r===null)return dc(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(C=f.children,r=f.fallback,v?(f=o.mode,v=o.child,C={mode:"hidden",children:C},(f&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=C):v=ua(C,f,0,null),r=_s(r,f,u,null),v.return=o,r.return=o,v.sibling=r,o.child=v,o.child.memoizedState=$c(u),o.memoizedState=_c,r):zc(o,C));if(g=r.memoizedState,g!==null&&(O=g.dehydrated,O!==null))return xk(r,o,C,f,O,g,u);if(v){v=f.fallback,C=o.mode,g=r.child,O=g.sibling;var F={mode:"hidden",children:f.children};return(C&1)===0&&o.child!==g?(f=o.child,f.childLanes=0,f.pendingProps=F,o.deletions=null):(f=ds(g,F),f.subtreeFlags=g.subtreeFlags&14680064),O!==null?v=ds(O,v):(v=_s(v,C,u,null),v.flags|=2),v.return=o,f.return=o,f.sibling=v,o.child=f,f=v,v=o.child,C=r.child.memoizedState,C=C===null?$c(u):{baseLanes:C.baseLanes|u,cachePool:null,transitions:C.transitions},v.memoizedState=C,v.childLanes=r.childLanes&~u,o.memoizedState=_c,f}return v=r.child,r=v.sibling,f=ds(v,{mode:"visible",children:f.children}),(o.mode&1)===0&&(f.lanes=u),f.return=o,f.sibling=null,r!==null&&(u=o.deletions,u===null?(o.deletions=[r],o.flags|=16):u.push(r)),o.child=f,o.memoizedState=null,f}function zc(r,o){return o=ua({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function Xl(r,o,u,f){return f!==null&&fc(f),io(o,r.child,null,u),r=zc(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function xk(r,o,u,f,g,v,C){if(u)return o.flags&256?(o.flags&=-257,f=Lc(Error(n(422))),Xl(r,o,C,f)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(v=f.fallback,g=o.mode,f=ua({mode:"visible",children:f.children},g,0,null),v=_s(v,g,C,null),v.flags|=2,f.return=o,v.return=o,f.sibling=v,o.child=f,(o.mode&1)!==0&&io(o,r.child,null,C),o.child.memoizedState=$c(C),o.memoizedState=_c,v);if((o.mode&1)===0)return Xl(r,o,C,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var O=f.dgst;return f=O,v=Error(n(419)),f=Lc(v,f,void 0),Xl(r,o,C,f)}if(O=(C&r.childLanes)!==0,un||O){if(f=It,f!==null){switch(C&-C){case 4:g=2;break;case 16:g=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|C))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,Lr(r,g),Zn(f,r,g,-1))}return td(),f=Lc(Error(n(421))),Xl(r,o,C,f)}return g.data==="$?"?(o.flags|=128,o.child=r.child,o=Pk.bind(null,r),g._reactRetry=o,null):(r=v.treeContext,Sn=es(g.nextSibling),kn=o,nt=!0,Yn=null,r!==null&&(Ln[In++]=Ar,Ln[In++]=Dr,Ln[In++]=Rs,Ar=r.id,Dr=r.overflow,Rs=o),o=zc(o,f.children),o.flags|=4096,o)}function zm(r,o,u){r.lanes|=o;var f=r.alternate;f!==null&&(f.lanes|=o),gc(r.return,o,u)}function Fc(r,o,u,f,g){var v=r.memoizedState;v===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:g}:(v.isBackwards=o,v.rendering=null,v.renderingStartTime=0,v.last=f,v.tail=u,v.tailMode=g)}function Fm(r,o,u){var f=o.pendingProps,g=f.revealOrder,v=f.tail;if(tn(r,o,f.children,u),f=lt.current,(f&2)!==0)f=f&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&zm(r,u,o);else if(r.tag===19)zm(r,u,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(Ge(lt,f),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(u=o.child,g=null;u!==null;)r=u.alternate,r!==null&&Hl(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),Fc(o,!1,g,u,v);break;case"backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(r=g.alternate,r!==null&&Hl(r)===null){o.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}Fc(o,!0,u,null,v);break;case"together":Fc(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Ql(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function Or(r,o,u){if(r!==null&&(o.dependencies=r.dependencies),Ls|=o.lanes,(u&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,u=ds(r,r.pendingProps),o.child=u,u.return=o;r.sibling!==null;)r=r.sibling,u=u.sibling=ds(r,r.pendingProps),u.return=o;u.sibling=null}return o.child}function yk(r,o,u){switch(o.tag){case 3:Mm(o),oo();break;case 5:em(o);break;case 1:an(o.type)&&Ll(o);break;case 4:vc(o,o.stateNode.containerInfo);break;case 10:var f=o.type._context,g=o.memoizedProps.value;Ge(zl,f._currentValue),f._currentValue=g;break;case 13:if(f=o.memoizedState,f!==null)return f.dehydrated!==null?(Ge(lt,lt.current&1),o.flags|=128,null):(u&o.child.childLanes)!==0?$m(r,o,u):(Ge(lt,lt.current&1),r=Or(r,o,u),r!==null?r.sibling:null);Ge(lt,lt.current&1);break;case 19:if(f=(u&o.childLanes)!==0,(r.flags&128)!==0){if(f)return Fm(r,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Ge(lt,lt.current),f)break;return null;case 22:case 23:return o.lanes=0,Lm(r,o,u)}return Or(r,o,u)}var Bm,Bc,Um,Hm;Bm=function(r,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Bc=function(){},Um=function(r,o,u,f){var g=r.memoizedProps;if(g!==f){r=o.stateNode,As(dr.current);var v=null;switch(u){case"input":g=yt(r,g),f=yt(r,f),v=[];break;case"select":g=R({},g,{value:void 0}),f=R({},f,{value:void 0}),v=[];break;case"textarea":g=An(r,g),f=An(r,f),v=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=Pl)}We(u,f);var C;u=null;for(Y in g)if(!f.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var O=g[Y];for(C in O)O.hasOwnProperty(C)&&(u||(u={}),u[C]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(i.hasOwnProperty(Y)?v||(v=[]):(v=v||[]).push(Y,null));for(Y in f){var F=f[Y];if(O=g!=null?g[Y]:void 0,f.hasOwnProperty(Y)&&F!==O&&(F!=null||O!=null))if(Y==="style")if(O){for(C in O)!O.hasOwnProperty(C)||F&&F.hasOwnProperty(C)||(u||(u={}),u[C]="");for(C in F)F.hasOwnProperty(C)&&O[C]!==F[C]&&(u||(u={}),u[C]=F[C])}else u||(v||(v=[]),v.push(Y,u)),u=F;else Y==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,O=O?O.__html:void 0,F!=null&&O!==F&&(v=v||[]).push(Y,F)):Y==="children"?typeof F!="string"&&typeof F!="number"||(v=v||[]).push(Y,""+F):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(i.hasOwnProperty(Y)?(F!=null&&Y==="onScroll"&&Je("scroll",r),v||O===F||(v=[])):(v=v||[]).push(Y,F))}u&&(v=v||[]).push("style",u);var Y=v;(o.updateQueue=Y)&&(o.flags|=4)}},Hm=function(r,o,u,f){u!==f&&(o.flags|=4)};function xi(r,o){if(!nt)switch(r.tailMode){case"hidden":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function Yt(r){var o=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(o)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=f,r.childLanes=u,o}function vk(r,o,u){var f=o.pendingProps;switch(uc(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yt(o),null;case 1:return an(o.type)&&Dl(),Yt(o),null;case 3:return f=o.stateNode,uo(),Ze(ln),Ze(Gt),kc(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(_l(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Yn!==null&&(Jc(Yn),Yn=null))),Bc(r,o),Yt(o),null;case 5:bc(o);var g=As(fi.current);if(u=o.type,r!==null&&o.stateNode!=null)Um(r,o,u,f,g),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!f){if(o.stateNode===null)throw Error(n(166));return Yt(o),null}if(r=As(dr.current),_l(o)){f=o.stateNode,u=o.type;var v=o.memoizedProps;switch(f[cr]=o,f[li]=v,r=(o.mode&1)!==0,u){case"dialog":Je("cancel",f),Je("close",f);break;case"iframe":case"object":case"embed":Je("load",f);break;case"video":case"audio":for(g=0;g<si.length;g++)Je(si[g],f);break;case"source":Je("error",f);break;case"img":case"image":case"link":Je("error",f),Je("load",f);break;case"details":Je("toggle",f);break;case"input":Bt(f,v),Je("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!v.multiple},Je("invalid",f);break;case"textarea":vt(f,v),Je("invalid",f)}We(u,v),g=null;for(var C in v)if(v.hasOwnProperty(C)){var O=v[C];C==="children"?typeof O=="string"?f.textContent!==O&&(v.suppressHydrationWarning!==!0&&Tl(f.textContent,O,r),g=["children",O]):typeof O=="number"&&f.textContent!==""+O&&(v.suppressHydrationWarning!==!0&&Tl(f.textContent,O,r),g=["children",""+O]):i.hasOwnProperty(C)&&O!=null&&C==="onScroll"&&Je("scroll",f)}switch(u){case"input":Ee(f),vn(f,v,!0);break;case"textarea":Ee(f),lr(f);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(f.onclick=Pl)}f=g,o.updateQueue=f,f!==null&&(o.flags|=4)}else{C=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Z(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=C.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=C.createElement(u,{is:f.is}):(r=C.createElement(u),u==="select"&&(C=r,f.multiple?C.multiple=!0:f.size&&(C.size=f.size))):r=C.createElementNS(r,u),r[cr]=o,r[li]=f,Bm(r,o,!1,!1),o.stateNode=r;e:{switch(C=qe(u,f),u){case"dialog":Je("cancel",r),Je("close",r),g=f;break;case"iframe":case"object":case"embed":Je("load",r),g=f;break;case"video":case"audio":for(g=0;g<si.length;g++)Je(si[g],r);g=f;break;case"source":Je("error",r),g=f;break;case"img":case"image":case"link":Je("error",r),Je("load",r),g=f;break;case"details":Je("toggle",r),g=f;break;case"input":Bt(r,f),g=yt(r,f),Je("invalid",r);break;case"option":g=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},g=R({},f,{value:void 0}),Je("invalid",r);break;case"textarea":vt(r,f),g=An(r,f),Je("invalid",r);break;default:g=f}We(u,g),O=g;for(v in O)if(O.hasOwnProperty(v)){var F=O[v];v==="style"?sn(r,F):v==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&Re(r,F)):v==="children"?typeof F=="string"?(u!=="textarea"||F!=="")&&U(r,F):typeof F=="number"&&U(r,""+F):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(i.hasOwnProperty(v)?F!=null&&v==="onScroll"&&Je("scroll",r):F!=null&&A(r,v,F,C))}switch(u){case"input":Ee(r),vn(r,f,!1);break;case"textarea":Ee(r),lr(r);break;case"option":f.value!=null&&r.setAttribute("value",""+ke(f.value));break;case"select":r.multiple=!!f.multiple,v=f.value,v!=null?Zt(r,!!f.multiple,v,!1):f.defaultValue!=null&&Zt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=Pl)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Yt(o),null;case 6:if(r&&o.stateNode!=null)Hm(r,o,r.memoizedProps,f);else{if(typeof f!="string"&&o.stateNode===null)throw Error(n(166));if(u=As(fi.current),As(dr.current),_l(o)){if(f=o.stateNode,u=o.memoizedProps,f[cr]=o,(v=f.nodeValue!==u)&&(r=kn,r!==null))switch(r.tag){case 3:Tl(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Tl(f.nodeValue,u,(r.mode&1)!==0)}v&&(o.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[cr]=o,o.stateNode=f}return Yt(o),null;case 13:if(Ze(lt),f=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(nt&&Sn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)qh(),oo(),o.flags|=98560,v=!1;else if(v=_l(o),f!==null&&f.dehydrated!==null){if(r===null){if(!v)throw Error(n(318));if(v=o.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[cr]=o}else oo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Yt(o),v=!1}else Yn!==null&&(Jc(Yn),Yn=null),v=!0;if(!v)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=u,o):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(lt.current&1)!==0?Nt===0&&(Nt=3):td())),o.updateQueue!==null&&(o.flags|=4),Yt(o),null);case 4:return uo(),Bc(r,o),r===null&&oi(o.stateNode.containerInfo),Yt(o),null;case 10:return mc(o.type._context),Yt(o),null;case 17:return an(o.type)&&Dl(),Yt(o),null;case 19:if(Ze(lt),v=o.memoizedState,v===null)return Yt(o),null;if(f=(o.flags&128)!==0,C=v.rendering,C===null)if(f)xi(v,!1);else{if(Nt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(C=Hl(r),C!==null){for(o.flags|=128,xi(v,!1),f=C.updateQueue,f!==null&&(o.updateQueue=f,o.flags|=4),o.subtreeFlags=0,f=u,u=o.child;u!==null;)v=u,r=f,v.flags&=14680066,C=v.alternate,C===null?(v.childLanes=0,v.lanes=r,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=C.childLanes,v.lanes=C.lanes,v.child=C.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=C.memoizedProps,v.memoizedState=C.memoizedState,v.updateQueue=C.updateQueue,v.type=C.type,r=C.dependencies,v.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return Ge(lt,lt.current&1|2),o.child}r=r.sibling}v.tail!==null&&mt()>ho&&(o.flags|=128,f=!0,xi(v,!1),o.lanes=4194304)}else{if(!f)if(r=Hl(C),r!==null){if(o.flags|=128,f=!0,u=r.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),xi(v,!0),v.tail===null&&v.tailMode==="hidden"&&!C.alternate&&!nt)return Yt(o),null}else 2*mt()-v.renderingStartTime>ho&&u!==1073741824&&(o.flags|=128,f=!0,xi(v,!1),o.lanes=4194304);v.isBackwards?(C.sibling=o.child,o.child=C):(u=v.last,u!==null?u.sibling=C:o.child=C,v.last=C)}return v.tail!==null?(o=v.tail,v.rendering=o,v.tail=o.sibling,v.renderingStartTime=mt(),o.sibling=null,u=lt.current,Ge(lt,f?u&1|2:u&1),o):(Yt(o),null);case 22:case 23:return ed(),f=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(o.flags|=8192),f&&(o.mode&1)!==0?(jn&1073741824)!==0&&(Yt(o),o.subtreeFlags&6&&(o.flags|=8192)):Yt(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function bk(r,o){switch(uc(o),o.tag){case 1:return an(o.type)&&Dl(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return uo(),Ze(ln),Ze(Gt),kc(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return bc(o),null;case 13:if(Ze(lt),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));oo()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return Ze(lt),null;case 4:return uo(),null;case 10:return mc(o.type._context),null;case 22:case 23:return ed(),null;case 24:return null;default:return null}}var Jl=!1,Xt=!1,wk=typeof WeakSet=="function"?WeakSet:Set,he=null;function fo(r,o){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){dt(r,o,f)}else u.current=null}function Uc(r,o,u){try{u()}catch(f){dt(r,o,f)}}var Wm=!1;function kk(r,o){if(ec=yl,r=kh(),qu(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var g=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{u.nodeType,v.nodeType}catch{u=null;break e}var C=0,O=-1,F=-1,Y=0,re=0,le=r,ne=null;t:for(;;){for(var fe;le!==u||g!==0&&le.nodeType!==3||(O=C+g),le!==v||f!==0&&le.nodeType!==3||(F=C+f),le.nodeType===3&&(C+=le.nodeValue.length),(fe=le.firstChild)!==null;)ne=le,le=fe;for(;;){if(le===r)break t;if(ne===u&&++Y===g&&(O=C),ne===v&&++re===f&&(F=C),(fe=le.nextSibling)!==null)break;le=ne,ne=le.parentNode}le=fe}u=O===-1||F===-1?null:{start:O,end:F}}else u=null}u=u||{start:0,end:0}}else u=null;for(tc={focusedElem:r,selectionRange:u},yl=!1,he=o;he!==null;)if(o=he,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,he=r;else for(;he!==null;){o=he;try{var me=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(me!==null){var ge=me.memoizedProps,gt=me.memoizedState,V=o.stateNode,H=V.getSnapshotBeforeUpdate(o.elementType===o.type?ge:Xn(o.type,ge),gt);V.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){dt(o,o.return,ce)}if(r=o.sibling,r!==null){r.return=o.return,he=r;break}he=o.return}return me=Wm,Wm=!1,me}function yi(r,o,u){var f=o.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&r)===r){var v=g.destroy;g.destroy=void 0,v!==void 0&&Uc(o,u,v)}g=g.next}while(g!==f)}}function Zl(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&r)===r){var f=u.create;u.destroy=f()}u=u.next}while(u!==o)}}function Hc(r){var o=r.ref;if(o!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof o=="function"?o(r):o.current=r}}function Vm(r){var o=r.alternate;o!==null&&(r.alternate=null,Vm(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[cr],delete o[li],delete o[oc],delete o[sk],delete o[ok])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function qm(r){return r.tag===5||r.tag===3||r.tag===4}function Gm(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||qm(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Wc(r,o,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?u.nodeType===8?u.parentNode.insertBefore(r,o):u.insertBefore(r,o):(u.nodeType===8?(o=u.parentNode,o.insertBefore(r,u)):(o=u,o.appendChild(r)),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Pl));else if(f!==4&&(r=r.child,r!==null))for(Wc(r,o,u),r=r.sibling;r!==null;)Wc(r,o,u),r=r.sibling}function Vc(r,o,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?u.insertBefore(r,o):u.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(Vc(r,o,u),r=r.sibling;r!==null;)Vc(r,o,u),r=r.sibling}var $t=null,Qn=!1;function is(r,o,u){for(u=u.child;u!==null;)Km(r,o,u),u=u.sibling}function Km(r,o,u){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount(fl,u)}catch{}switch(u.tag){case 5:Xt||fo(u,o);case 6:var f=$t,g=Qn;$t=null,is(r,o,u),$t=f,Qn=g,$t!==null&&(Qn?(r=$t,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):$t.removeChild(u.stateNode));break;case 18:$t!==null&&(Qn?(r=$t,u=u.stateNode,r.nodeType===8?sc(r.parentNode,u):r.nodeType===1&&sc(r,u),Xo(r)):sc($t,u.stateNode));break;case 4:f=$t,g=Qn,$t=u.stateNode.containerInfo,Qn=!0,is(r,o,u),$t=f,Qn=g;break;case 0:case 11:case 14:case 15:if(!Xt&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var v=g,C=v.destroy;v=v.tag,C!==void 0&&((v&2)!==0||(v&4)!==0)&&Uc(u,o,C),g=g.next}while(g!==f)}is(r,o,u);break;case 1:if(!Xt&&(fo(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(O){dt(u,o,O)}is(r,o,u);break;case 21:is(r,o,u);break;case 22:u.mode&1?(Xt=(f=Xt)||u.memoizedState!==null,is(r,o,u),Xt=f):is(r,o,u);break;default:is(r,o,u)}}function Ym(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new wk),o.forEach(function(f){var g=Ak.bind(null,r,f);u.has(f)||(u.add(f),f.then(g,g))})}}function Jn(r,o){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var g=u[f];try{var v=r,C=o,O=C;e:for(;O!==null;){switch(O.tag){case 5:$t=O.stateNode,Qn=!1;break e;case 3:$t=O.stateNode.containerInfo,Qn=!0;break e;case 4:$t=O.stateNode.containerInfo,Qn=!0;break e}O=O.return}if($t===null)throw Error(n(160));Km(v,C,g),$t=null,Qn=!1;var F=g.alternate;F!==null&&(F.return=null),g.return=null}catch(Y){dt(g,o,Y)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Xm(o,r),o=o.sibling}function Xm(r,o){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Jn(o,r),pr(r),f&4){try{yi(3,r,r.return),Zl(3,r)}catch(ge){dt(r,r.return,ge)}try{yi(5,r,r.return)}catch(ge){dt(r,r.return,ge)}}break;case 1:Jn(o,r),pr(r),f&512&&u!==null&&fo(u,u.return);break;case 5:if(Jn(o,r),pr(r),f&512&&u!==null&&fo(u,u.return),r.flags&32){var g=r.stateNode;try{U(g,"")}catch(ge){dt(r,r.return,ge)}}if(f&4&&(g=r.stateNode,g!=null)){var v=r.memoizedProps,C=u!==null?u.memoizedProps:v,O=r.type,F=r.updateQueue;if(r.updateQueue=null,F!==null)try{O==="input"&&v.type==="radio"&&v.name!=null&&Ut(g,v),qe(O,C);var Y=qe(O,v);for(C=0;C<F.length;C+=2){var re=F[C],le=F[C+1];re==="style"?sn(g,le):re==="dangerouslySetInnerHTML"?Re(g,le):re==="children"?U(g,le):A(g,re,le,Y)}switch(O){case"input":_t(g,v);break;case"textarea":Nr(g,v);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var fe=v.value;fe!=null?Zt(g,!!v.multiple,fe,!1):ne!==!!v.multiple&&(v.defaultValue!=null?Zt(g,!!v.multiple,v.defaultValue,!0):Zt(g,!!v.multiple,v.multiple?[]:"",!1))}g[li]=v}catch(ge){dt(r,r.return,ge)}}break;case 6:if(Jn(o,r),pr(r),f&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,v=r.memoizedProps;try{g.nodeValue=v}catch(ge){dt(r,r.return,ge)}}break;case 3:if(Jn(o,r),pr(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Xo(o.containerInfo)}catch(ge){dt(r,r.return,ge)}break;case 4:Jn(o,r),pr(r);break;case 13:Jn(o,r),pr(r),g=r.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(Kc=mt())),f&4&&Ym(r);break;case 22:if(re=u!==null&&u.memoizedState!==null,r.mode&1?(Xt=(Y=Xt)||re,Jn(o,r),Xt=Y):Jn(o,r),pr(r),f&8192){if(Y=r.memoizedState!==null,(r.stateNode.isHidden=Y)&&!re&&(r.mode&1)!==0)for(he=r,re=r.child;re!==null;){for(le=he=re;he!==null;){switch(ne=he,fe=ne.child,ne.tag){case 0:case 11:case 14:case 15:yi(4,ne,ne.return);break;case 1:fo(ne,ne.return);var me=ne.stateNode;if(typeof me.componentWillUnmount=="function"){f=ne,u=ne.return;try{o=f,me.props=o.memoizedProps,me.state=o.memoizedState,me.componentWillUnmount()}catch(ge){dt(f,u,ge)}}break;case 5:fo(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Zm(le);continue}}fe!==null?(fe.return=ne,he=fe):Zm(le)}re=re.sibling}e:for(re=null,le=r;;){if(le.tag===5){if(re===null){re=le;try{g=le.stateNode,Y?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(O=le.stateNode,F=le.memoizedProps.style,C=F!=null&&F.hasOwnProperty("display")?F.display:null,O.style.display=Fe("display",C))}catch(ge){dt(r,r.return,ge)}}}else if(le.tag===6){if(re===null)try{le.stateNode.nodeValue=Y?"":le.memoizedProps}catch(ge){dt(r,r.return,ge)}}else if((le.tag!==22&&le.tag!==23||le.memoizedState===null||le===r)&&le.child!==null){le.child.return=le,le=le.child;continue}if(le===r)break e;for(;le.sibling===null;){if(le.return===null||le.return===r)break e;re===le&&(re=null),le=le.return}re===le&&(re=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:Jn(o,r),pr(r),f&4&&Ym(r);break;case 21:break;default:Jn(o,r),pr(r)}}function pr(r){var o=r.flags;if(o&2){try{e:{for(var u=r.return;u!==null;){if(qm(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(U(g,""),f.flags&=-33);var v=Gm(r);Vc(r,v,g);break;case 3:case 4:var C=f.stateNode.containerInfo,O=Gm(r);Wc(r,O,C);break;default:throw Error(n(161))}}catch(F){dt(r,r.return,F)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function Sk(r,o,u){he=r,Qm(r)}function Qm(r,o,u){for(var f=(r.mode&1)!==0;he!==null;){var g=he,v=g.child;if(g.tag===22&&f){var C=g.memoizedState!==null||Jl;if(!C){var O=g.alternate,F=O!==null&&O.memoizedState!==null||Xt;O=Jl;var Y=Xt;if(Jl=C,(Xt=F)&&!Y)for(he=g;he!==null;)C=he,F=C.child,C.tag===22&&C.memoizedState!==null?eg(g):F!==null?(F.return=C,he=F):eg(g);for(;v!==null;)he=v,Qm(v),v=v.sibling;he=g,Jl=O,Xt=Y}Jm(r)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,he=v):Jm(r)}}function Jm(r){for(;he!==null;){var o=he;if((o.flags&8772)!==0){var u=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Xt||Zl(5,o);break;case 1:var f=o.stateNode;if(o.flags&4&&!Xt)if(u===null)f.componentDidMount();else{var g=o.elementType===o.type?u.memoizedProps:Xn(o.type,u.memoizedProps);f.componentDidUpdate(g,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=o.updateQueue;v!==null&&Zh(o,v,f);break;case 3:var C=o.updateQueue;if(C!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=o.child.stateNode;break;case 1:u=o.child.stateNode}Zh(o,C,u)}break;case 5:var O=o.stateNode;if(u===null&&o.flags&4){u=O;var F=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&u.focus();break;case"img":F.src&&(u.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Y=o.alternate;if(Y!==null){var re=Y.memoizedState;if(re!==null){var le=re.dehydrated;le!==null&&Xo(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Xt||o.flags&512&&Hc(o)}catch(ne){dt(o,o.return,ne)}}if(o===r){he=null;break}if(u=o.sibling,u!==null){u.return=o.return,he=u;break}he=o.return}}function Zm(r){for(;he!==null;){var o=he;if(o===r){he=null;break}var u=o.sibling;if(u!==null){u.return=o.return,he=u;break}he=o.return}}function eg(r){for(;he!==null;){var o=he;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{Zl(4,o)}catch(F){dt(o,u,F)}break;case 1:var f=o.stateNode;if(typeof f.componentDidMount=="function"){var g=o.return;try{f.componentDidMount()}catch(F){dt(o,g,F)}}var v=o.return;try{Hc(o)}catch(F){dt(o,v,F)}break;case 5:var C=o.return;try{Hc(o)}catch(F){dt(o,C,F)}}}catch(F){dt(o,o.return,F)}if(o===r){he=null;break}var O=o.sibling;if(O!==null){O.return=o.return,he=O;break}he=o.return}}var jk=Math.ceil,ea=M.ReactCurrentDispatcher,qc=M.ReactCurrentOwner,_n=M.ReactCurrentBatchConfig,ze=0,It=null,bt=null,zt=0,jn=0,po=ts(0),Nt=0,vi=null,Ls=0,ta=0,Gc=0,bi=null,cn=null,Kc=0,ho=1/0,Mr=null,na=!1,Yc=null,ls=null,ra=!1,as=null,sa=0,wi=0,Xc=null,oa=-1,ia=0;function nn(){return(ze&6)!==0?mt():oa!==-1?oa:oa=mt()}function us(r){return(r.mode&1)===0?1:(ze&2)!==0&&zt!==0?zt&-zt:lk.transition!==null?(ia===0&&(ia=Gp()),ia):(r=Ve,r!==0||(r=window.event,r=r===void 0?16:nh(r.type)),r)}function Zn(r,o,u,f){if(50<wi)throw wi=0,Xc=null,Error(n(185));Vo(r,u,f),((ze&2)===0||r!==It)&&(r===It&&((ze&2)===0&&(ta|=u),Nt===4&&cs(r,zt)),dn(r,f),u===1&&ze===0&&(o.mode&1)===0&&(ho=mt()+500,Il&&rs()))}function dn(r,o){var u=r.callbackNode;l1(r,o);var f=ml(r,r===It?zt:0);if(f===0)u!==null&&Wp(u),r.callbackNode=null,r.callbackPriority=0;else if(o=f&-f,r.callbackPriority!==o){if(u!=null&&Wp(u),o===1)r.tag===0?ik(ng.bind(null,r)):Bh(ng.bind(null,r)),nk(function(){(ze&6)===0&&rs()}),u=null;else{switch(Kp(f)){case 1:u=Tu;break;case 4:u=Vp;break;case 16:u=dl;break;case 536870912:u=qp;break;default:u=dl}u=cg(u,tg.bind(null,r))}r.callbackPriority=o,r.callbackNode=u}}function tg(r,o){if(oa=-1,ia=0,(ze&6)!==0)throw Error(n(327));var u=r.callbackNode;if(mo()&&r.callbackNode!==u)return null;var f=ml(r,r===It?zt:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||o)o=la(r,f);else{o=f;var g=ze;ze|=2;var v=sg();(It!==r||zt!==o)&&(Mr=null,ho=mt()+500,Os(r,o));do try{Ek();break}catch(O){rg(r,O)}while(!0);hc(),ea.current=v,ze=g,bt!==null?o=0:(It=null,zt=0,o=Nt)}if(o!==0){if(o===2&&(g=Pu(r),g!==0&&(f=g,o=Qc(r,g))),o===1)throw u=vi,Os(r,0),cs(r,f),dn(r,mt()),u;if(o===6)cs(r,f);else{if(g=r.current.alternate,(f&30)===0&&!Ck(g)&&(o=la(r,f),o===2&&(v=Pu(r),v!==0&&(f=v,o=Qc(r,v))),o===1))throw u=vi,Os(r,0),cs(r,f),dn(r,mt()),u;switch(r.finishedWork=g,r.finishedLanes=f,o){case 0:case 1:throw Error(n(345));case 2:Ms(r,cn,Mr);break;case 3:if(cs(r,f),(f&130023424)===f&&(o=Kc+500-mt(),10<o)){if(ml(r,0)!==0)break;if(g=r.suspendedLanes,(g&f)!==f){nn(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=rc(Ms.bind(null,r,cn,Mr),o);break}Ms(r,cn,Mr);break;case 4:if(cs(r,f),(f&4194240)===f)break;for(o=r.eventTimes,g=-1;0<f;){var C=31-Gn(f);v=1<<C,C=o[C],C>g&&(g=C),f&=~v}if(f=g,f=mt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*jk(f/1960))-f,10<f){r.timeoutHandle=rc(Ms.bind(null,r,cn,Mr),f);break}Ms(r,cn,Mr);break;case 5:Ms(r,cn,Mr);break;default:throw Error(n(329))}}}return dn(r,mt()),r.callbackNode===u?tg.bind(null,r):null}function Qc(r,o){var u=bi;return r.current.memoizedState.isDehydrated&&(Os(r,o).flags|=256),r=la(r,o),r!==2&&(o=cn,cn=u,o!==null&&Jc(o)),r}function Jc(r){cn===null?cn=r:cn.push.apply(cn,r)}function Ck(r){for(var o=r;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var g=u[f],v=g.getSnapshot;g=g.value;try{if(!Kn(v(),g))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function cs(r,o){for(o&=~Gc,o&=~ta,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var u=31-Gn(o),f=1<<u;r[u]=-1,o&=~f}}function ng(r){if((ze&6)!==0)throw Error(n(327));mo();var o=ml(r,0);if((o&1)===0)return dn(r,mt()),null;var u=la(r,o);if(r.tag!==0&&u===2){var f=Pu(r);f!==0&&(o=f,u=Qc(r,f))}if(u===1)throw u=vi,Os(r,0),cs(r,o),dn(r,mt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Ms(r,cn,Mr),dn(r,mt()),null}function Zc(r,o){var u=ze;ze|=1;try{return r(o)}finally{ze=u,ze===0&&(ho=mt()+500,Il&&rs())}}function Is(r){as!==null&&as.tag===0&&(ze&6)===0&&mo();var o=ze;ze|=1;var u=_n.transition,f=Ve;try{if(_n.transition=null,Ve=1,r)return r()}finally{Ve=f,_n.transition=u,ze=o,(ze&6)===0&&rs()}}function ed(){jn=po.current,Ze(po)}function Os(r,o){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,tk(u)),bt!==null)for(u=bt.return;u!==null;){var f=u;switch(uc(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Dl();break;case 3:uo(),Ze(ln),Ze(Gt),kc();break;case 5:bc(f);break;case 4:uo();break;case 13:Ze(lt);break;case 19:Ze(lt);break;case 10:mc(f.type._context);break;case 22:case 23:ed()}u=u.return}if(It=r,bt=r=ds(r.current,null),zt=jn=o,Nt=0,vi=null,Gc=ta=Ls=0,cn=bi=null,Ps!==null){for(o=0;o<Ps.length;o++)if(u=Ps[o],f=u.interleaved,f!==null){u.interleaved=null;var g=f.next,v=u.pending;if(v!==null){var C=v.next;v.next=g,f.next=C}u.pending=f}Ps=null}return r}function rg(r,o){do{var u=bt;try{if(hc(),Wl.current=Kl,Vl){for(var f=at.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}Vl=!1}if(Ds=0,Lt=Ct=at=null,pi=!1,hi=0,qc.current=null,u===null||u.return===null){Nt=1,vi=o,bt=null;break}e:{var v=r,C=u.return,O=u,F=o;if(o=zt,O.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var Y=F,re=O,le=re.tag;if((re.mode&1)===0&&(le===0||le===11||le===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var fe=Rm(C);if(fe!==null){fe.flags&=-257,Tm(fe,C,O,v,o),fe.mode&1&&Em(v,Y,o),o=fe,F=Y;var me=o.updateQueue;if(me===null){var ge=new Set;ge.add(F),o.updateQueue=ge}else me.add(F);break e}else{if((o&1)===0){Em(v,Y,o),td();break e}F=Error(n(426))}}else if(nt&&O.mode&1){var gt=Rm(C);if(gt!==null){(gt.flags&65536)===0&&(gt.flags|=256),Tm(gt,C,O,v,o),fc(co(F,O));break e}}v=F=co(F,O),Nt!==4&&(Nt=2),bi===null?bi=[v]:bi.push(v),v=C;do{switch(v.tag){case 3:v.flags|=65536,o&=-o,v.lanes|=o;var V=Cm(v,F,o);Jh(v,V);break e;case 1:O=F;var H=v.type,K=v.stateNode;if((v.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(ls===null||!ls.has(K)))){v.flags|=65536,o&=-o,v.lanes|=o;var ce=Nm(v,O,o);Jh(v,ce);break e}}v=v.return}while(v!==null)}ig(u)}catch(ye){o=ye,bt===u&&u!==null&&(bt=u=u.return);continue}break}while(!0)}function sg(){var r=ea.current;return ea.current=Kl,r===null?Kl:r}function td(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),It===null||(Ls&268435455)===0&&(ta&268435455)===0||cs(It,zt)}function la(r,o){var u=ze;ze|=2;var f=sg();(It!==r||zt!==o)&&(Mr=null,Os(r,o));do try{Nk();break}catch(g){rg(r,g)}while(!0);if(hc(),ze=u,ea.current=f,bt!==null)throw Error(n(261));return It=null,zt=0,Nt}function Nk(){for(;bt!==null;)og(bt)}function Ek(){for(;bt!==null&&!Jw();)og(bt)}function og(r){var o=ug(r.alternate,r,jn);r.memoizedProps=r.pendingProps,o===null?ig(r):bt=o,qc.current=null}function ig(r){var o=r;do{var u=o.alternate;if(r=o.return,(o.flags&32768)===0){if(u=vk(u,o,jn),u!==null){bt=u;return}}else{if(u=bk(u,o),u!==null){u.flags&=32767,bt=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Nt=6,bt=null;return}}if(o=o.sibling,o!==null){bt=o;return}bt=o=r}while(o!==null);Nt===0&&(Nt=5)}function Ms(r,o,u){var f=Ve,g=_n.transition;try{_n.transition=null,Ve=1,Rk(r,o,u,f)}finally{_n.transition=g,Ve=f}return null}function Rk(r,o,u,f){do mo();while(as!==null);if((ze&6)!==0)throw Error(n(327));u=r.finishedWork;var g=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var v=u.lanes|u.childLanes;if(a1(r,v),r===It&&(bt=It=null,zt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||ra||(ra=!0,cg(dl,function(){return mo(),null})),v=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||v){v=_n.transition,_n.transition=null;var C=Ve;Ve=1;var O=ze;ze|=4,qc.current=null,kk(r,u),Xm(u,r),K1(tc),yl=!!ec,tc=ec=null,r.current=u,Sk(u),Zw(),ze=O,Ve=C,_n.transition=v}else r.current=u;if(ra&&(ra=!1,as=r,sa=g),v=r.pendingLanes,v===0&&(ls=null),n1(u.stateNode),dn(r,mt()),o!==null)for(f=r.onRecoverableError,u=0;u<o.length;u++)g=o[u],f(g.value,{componentStack:g.stack,digest:g.digest});if(na)throw na=!1,r=Yc,Yc=null,r;return(sa&1)!==0&&r.tag!==0&&mo(),v=r.pendingLanes,(v&1)!==0?r===Xc?wi++:(wi=0,Xc=r):wi=0,rs(),null}function mo(){if(as!==null){var r=Kp(sa),o=_n.transition,u=Ve;try{if(_n.transition=null,Ve=16>r?16:r,as===null)var f=!1;else{if(r=as,as=null,sa=0,(ze&6)!==0)throw Error(n(331));var g=ze;for(ze|=4,he=r.current;he!==null;){var v=he,C=v.child;if((he.flags&16)!==0){var O=v.deletions;if(O!==null){for(var F=0;F<O.length;F++){var Y=O[F];for(he=Y;he!==null;){var re=he;switch(re.tag){case 0:case 11:case 15:yi(8,re,v)}var le=re.child;if(le!==null)le.return=re,he=le;else for(;he!==null;){re=he;var ne=re.sibling,fe=re.return;if(Vm(re),re===Y){he=null;break}if(ne!==null){ne.return=fe,he=ne;break}he=fe}}}var me=v.alternate;if(me!==null){var ge=me.child;if(ge!==null){me.child=null;do{var gt=ge.sibling;ge.sibling=null,ge=gt}while(ge!==null)}}he=v}}if((v.subtreeFlags&2064)!==0&&C!==null)C.return=v,he=C;else e:for(;he!==null;){if(v=he,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:yi(9,v,v.return)}var V=v.sibling;if(V!==null){V.return=v.return,he=V;break e}he=v.return}}var H=r.current;for(he=H;he!==null;){C=he;var K=C.child;if((C.subtreeFlags&2064)!==0&&K!==null)K.return=C,he=K;else e:for(C=H;he!==null;){if(O=he,(O.flags&2048)!==0)try{switch(O.tag){case 0:case 11:case 15:Zl(9,O)}}catch(ye){dt(O,O.return,ye)}if(O===C){he=null;break e}var ce=O.sibling;if(ce!==null){ce.return=O.return,he=ce;break e}he=O.return}}if(ze=g,rs(),ur&&typeof ur.onPostCommitFiberRoot=="function")try{ur.onPostCommitFiberRoot(fl,r)}catch{}f=!0}return f}finally{Ve=u,_n.transition=o}}return!1}function lg(r,o,u){o=co(u,o),o=Cm(r,o,1),r=os(r,o,1),o=nn(),r!==null&&(Vo(r,1,o),dn(r,o))}function dt(r,o,u){if(r.tag===3)lg(r,r,u);else for(;o!==null;){if(o.tag===3){lg(o,r,u);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(ls===null||!ls.has(f))){r=co(u,r),r=Nm(o,r,1),o=os(o,r,1),r=nn(),o!==null&&(Vo(o,1,r),dn(o,r));break}}o=o.return}}function Tk(r,o,u){var f=r.pingCache;f!==null&&f.delete(o),o=nn(),r.pingedLanes|=r.suspendedLanes&u,It===r&&(zt&u)===u&&(Nt===4||Nt===3&&(zt&130023424)===zt&&500>mt()-Kc?Os(r,0):Gc|=u),dn(r,o)}function ag(r,o){o===0&&((r.mode&1)===0?o=1:(o=hl,hl<<=1,(hl&130023424)===0&&(hl=4194304)));var u=nn();r=Lr(r,o),r!==null&&(Vo(r,o,u),dn(r,u))}function Pk(r){var o=r.memoizedState,u=0;o!==null&&(u=o.retryLane),ag(r,u)}function Ak(r,o){var u=0;switch(r.tag){case 13:var f=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(o),ag(r,u)}var ug;ug=function(r,o,u){if(r!==null)if(r.memoizedProps!==o.pendingProps||ln.current)un=!0;else{if((r.lanes&u)===0&&(o.flags&128)===0)return un=!1,yk(r,o,u);un=(r.flags&131072)!==0}else un=!1,nt&&(o.flags&1048576)!==0&&Uh(o,Ml,o.index);switch(o.lanes=0,o.tag){case 2:var f=o.type;Ql(r,o),r=o.pendingProps;var g=no(o,Gt.current);ao(o,u),g=Cc(null,o,f,r,g,u);var v=Nc();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,an(f)?(v=!0,Ll(o)):v=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,yc(o),g.updater=Yl,o.stateNode=g,g._reactInternals=o,Dc(o,f,r,u),o=Mc(null,o,f,!0,v,u)):(o.tag=0,nt&&v&&ac(o),tn(null,o,g,u),o=o.child),o;case 16:f=o.elementType;e:{switch(Ql(r,o),r=o.pendingProps,g=f._init,f=g(f._payload),o.type=f,g=o.tag=Lk(f),r=Xn(f,r),g){case 0:o=Oc(null,o,f,r,u);break e;case 1:o=Om(null,o,f,r,u);break e;case 11:o=Pm(null,o,f,r,u);break e;case 14:o=Am(null,o,f,Xn(f.type,r),u);break e}throw Error(n(306,f,""))}return o;case 0:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Xn(f,g),Oc(r,o,f,g,u);case 1:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Xn(f,g),Om(r,o,f,g,u);case 3:e:{if(Mm(o),r===null)throw Error(n(387));f=o.pendingProps,v=o.memoizedState,g=v.element,Qh(r,o),Ul(o,f,null,u);var C=o.memoizedState;if(f=C.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){g=co(Error(n(423)),o),o=_m(r,o,f,u,g);break e}else if(f!==g){g=co(Error(n(424)),o),o=_m(r,o,f,u,g);break e}else for(Sn=es(o.stateNode.containerInfo.firstChild),kn=o,nt=!0,Yn=null,u=Yh(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(oo(),f===g){o=Or(r,o,u);break e}tn(r,o,f,u)}o=o.child}return o;case 5:return em(o),r===null&&dc(o),f=o.type,g=o.pendingProps,v=r!==null?r.memoizedProps:null,C=g.children,nc(f,g)?C=null:v!==null&&nc(f,v)&&(o.flags|=32),Im(r,o),tn(r,o,C,u),o.child;case 6:return r===null&&dc(o),null;case 13:return $m(r,o,u);case 4:return vc(o,o.stateNode.containerInfo),f=o.pendingProps,r===null?o.child=io(o,null,f,u):tn(r,o,f,u),o.child;case 11:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Xn(f,g),Pm(r,o,f,g,u);case 7:return tn(r,o,o.pendingProps,u),o.child;case 8:return tn(r,o,o.pendingProps.children,u),o.child;case 12:return tn(r,o,o.pendingProps.children,u),o.child;case 10:e:{if(f=o.type._context,g=o.pendingProps,v=o.memoizedProps,C=g.value,Ge(zl,f._currentValue),f._currentValue=C,v!==null)if(Kn(v.value,C)){if(v.children===g.children&&!ln.current){o=Or(r,o,u);break e}}else for(v=o.child,v!==null&&(v.return=o);v!==null;){var O=v.dependencies;if(O!==null){C=v.child;for(var F=O.firstContext;F!==null;){if(F.context===f){if(v.tag===1){F=Ir(-1,u&-u),F.tag=2;var Y=v.updateQueue;if(Y!==null){Y=Y.shared;var re=Y.pending;re===null?F.next=F:(F.next=re.next,re.next=F),Y.pending=F}}v.lanes|=u,F=v.alternate,F!==null&&(F.lanes|=u),gc(v.return,u,o),O.lanes|=u;break}F=F.next}}else if(v.tag===10)C=v.type===o.type?null:v.child;else if(v.tag===18){if(C=v.return,C===null)throw Error(n(341));C.lanes|=u,O=C.alternate,O!==null&&(O.lanes|=u),gc(C,u,o),C=v.sibling}else C=v.child;if(C!==null)C.return=v;else for(C=v;C!==null;){if(C===o){C=null;break}if(v=C.sibling,v!==null){v.return=C.return,C=v;break}C=C.return}v=C}tn(r,o,g.children,u),o=o.child}return o;case 9:return g=o.type,f=o.pendingProps.children,ao(o,u),g=On(g),f=f(g),o.flags|=1,tn(r,o,f,u),o.child;case 14:return f=o.type,g=Xn(f,o.pendingProps),g=Xn(f.type,g),Am(r,o,f,g,u);case 15:return Dm(r,o,o.type,o.pendingProps,u);case 17:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Xn(f,g),Ql(r,o),o.tag=1,an(f)?(r=!0,Ll(o)):r=!1,ao(o,u),Sm(o,f,g),Dc(o,f,g,u),Mc(null,o,f,!0,r,u);case 19:return Fm(r,o,u);case 22:return Lm(r,o,u)}throw Error(n(156,o.tag))};function cg(r,o){return Hp(r,o)}function Dk(r,o,u,f){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(r,o,u,f){return new Dk(r,o,u,f)}function nd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Lk(r){if(typeof r=="function")return nd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===B)return 11;if(r===G)return 14}return 2}function ds(r,o){var u=r.alternate;return u===null?(u=$n(r.tag,o,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=o,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,o=r.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function aa(r,o,u,f,g,v){var C=2;if(f=r,typeof r=="function")nd(r)&&(C=1);else if(typeof r=="string")C=5;else e:switch(r){case P:return _s(u.children,g,v,o);case z:C=8,g|=8;break;case q:return r=$n(12,u,o,g|2),r.elementType=q,r.lanes=v,r;case W:return r=$n(13,u,o,g),r.elementType=W,r.lanes=v,r;case J:return r=$n(19,u,o,g),r.elementType=J,r.lanes=v,r;case ie:return ua(u,g,v,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case T:C=10;break e;case I:C=9;break e;case B:C=11;break e;case G:C=14;break e;case te:C=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=$n(C,u,o,g),o.elementType=r,o.type=f,o.lanes=v,o}function _s(r,o,u,f){return r=$n(7,r,f,o),r.lanes=u,r}function ua(r,o,u,f){return r=$n(22,r,f,o),r.elementType=ie,r.lanes=u,r.stateNode={isHidden:!1},r}function rd(r,o,u){return r=$n(6,r,null,o),r.lanes=u,r}function sd(r,o,u){return o=$n(4,r.children!==null?r.children:[],r.key,o),o.lanes=u,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function Ik(r,o,u,f,g){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Au(0),this.expirationTimes=Au(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Au(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function od(r,o,u,f,g,v,C,O,F){return r=new Ik(r,o,u,O,F),o===1?(o=1,v===!0&&(o|=8)):o=0,v=$n(3,null,null,o),r.current=v,v.stateNode=r,v.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},yc(v),r}function Ok(r,o,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:N,key:f==null?null:""+f,children:r,containerInfo:o,implementation:u}}function dg(r){if(!r)return ns;r=r._reactInternals;e:{if(Cs(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(an(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(an(u))return zh(r,u,o)}return o}function fg(r,o,u,f,g,v,C,O,F){return r=od(u,f,!0,r,g,v,C,O,F),r.context=dg(null),u=r.current,f=nn(),g=us(u),v=Ir(f,g),v.callback=o??null,os(u,v,g),r.current.lanes=g,Vo(r,g,f),dn(r,f),r}function ca(r,o,u,f){var g=o.current,v=nn(),C=us(g);return u=dg(u),o.context===null?o.context=u:o.pendingContext=u,o=Ir(v,C),o.payload={element:r},f=f===void 0?null:f,f!==null&&(o.callback=f),r=os(g,o,C),r!==null&&(Zn(r,g,C,v),Bl(r,g,C)),C}function da(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function pg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<o?u:o}}function id(r,o){pg(r,o),(r=r.alternate)&&pg(r,o)}function Mk(){return null}var hg=typeof reportError=="function"?reportError:function(r){console.error(r)};function ld(r){this._internalRoot=r}fa.prototype.render=ld.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));ca(r,o,null,null)},fa.prototype.unmount=ld.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Is(function(){ca(null,r,null,null)}),o[Tr]=null}};function fa(r){this._internalRoot=r}fa.prototype.unstable_scheduleHydration=function(r){if(r){var o=Qp();r={blockedOn:null,target:r,priority:o};for(var u=0;u<Qr.length&&o!==0&&o<Qr[u].priority;u++);Qr.splice(u,0,r),u===0&&eh(r)}};function ad(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function pa(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function mg(){}function _k(r,o,u,f,g){if(g){if(typeof f=="function"){var v=f;f=function(){var Y=da(C);v.call(Y)}}var C=fg(o,f,r,0,null,!1,!1,"",mg);return r._reactRootContainer=C,r[Tr]=C.current,oi(r.nodeType===8?r.parentNode:r),Is(),C}for(;g=r.lastChild;)r.removeChild(g);if(typeof f=="function"){var O=f;f=function(){var Y=da(F);O.call(Y)}}var F=od(r,0,!1,null,null,!1,!1,"",mg);return r._reactRootContainer=F,r[Tr]=F.current,oi(r.nodeType===8?r.parentNode:r),Is(function(){ca(o,F,u,f)}),F}function ha(r,o,u,f,g){var v=u._reactRootContainer;if(v){var C=v;if(typeof g=="function"){var O=g;g=function(){var F=da(C);O.call(F)}}ca(o,C,r,g)}else C=_k(u,o,r,g,f);return da(C)}Yp=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var u=Wo(o.pendingLanes);u!==0&&(Du(o,u|1),dn(o,mt()),(ze&6)===0&&(ho=mt()+500,rs()))}break;case 13:Is(function(){var f=Lr(r,1);if(f!==null){var g=nn();Zn(f,r,1,g)}}),id(r,1)}},Lu=function(r){if(r.tag===13){var o=Lr(r,134217728);if(o!==null){var u=nn();Zn(o,r,134217728,u)}id(r,134217728)}},Xp=function(r){if(r.tag===13){var o=us(r),u=Lr(r,o);if(u!==null){var f=nn();Zn(u,r,o,f)}id(r,o)}},Qp=function(){return Ve},Jp=function(r,o){var u=Ve;try{return Ve=r,o()}finally{Ve=u}},js=function(r,o,u){switch(o){case"input":if(_t(r,u),o=u.name,u.type==="radio"&&o!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<u.length;o++){var f=u[o];if(f!==r&&f.form===r.form){var g=Al(f);if(!g)throw Error(n(90));je(f),_t(f,g)}}}break;case"textarea":Nr(r,u);break;case"select":o=u.value,o!=null&&Zt(r,!!u.multiple,o,!1)}},en=Zc,Vt=Is;var $k={usingClientEntryPoint:!1,Events:[ai,eo,Al,Wt,Wn,Zc]},ki={findFiberByHostInstance:Ns,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zk={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Bp(r),r===null?null:r.stateNode},findFiberByHostInstance:ki.findFiberByHostInstance||Mk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ma=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ma.isDisabled&&ma.supportsFiber)try{fl=ma.inject(zk),ur=ma}catch{}}return fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$k,fn.createPortal=function(r,o){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ad(o))throw Error(n(200));return Ok(r,o,null,u)},fn.createRoot=function(r,o){if(!ad(r))throw Error(n(299));var u=!1,f="",g=hg;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=od(r,1,!1,null,null,u,!1,f,g),r[Tr]=o.current,oi(r.nodeType===8?r.parentNode:r),new ld(o)},fn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Bp(o),r=r===null?null:r.stateNode,r},fn.flushSync=function(r){return Is(r)},fn.hydrate=function(r,o,u){if(!pa(o))throw Error(n(200));return ha(null,r,o,!0,u)},fn.hydrateRoot=function(r,o,u){if(!ad(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,g=!1,v="",C=hg;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),o=fg(o,null,r,1,u??null,g,!1,v,C),r[Tr]=o.current,oi(r),f)for(r=0;r<f.length;r++)u=f[r],g=u._getVersion,g=g(u._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[u,g]:o.mutableSourceEagerHydrationData.push(u,g);return new fa(o)},fn.render=function(r,o,u){if(!pa(o))throw Error(n(200));return ha(null,r,o,!1,u)},fn.unmountComponentAtNode=function(r){if(!pa(r))throw Error(n(40));return r._reactRootContainer?(Is(function(){ha(null,null,r,!1,function(){r._reactRootContainer=null,r[Tr]=null})}),!0):!1},fn.unstable_batchedUpdates=Zc,fn.unstable_renderSubtreeIntoContainer=function(r,o,u,f){if(!pa(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return ha(r,o,u,!1,f)},fn.version="18.3.1-next-f1338f8080-20240426",fn}var Sg;function Iy(){if(Sg)return dd.exports;Sg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),dd.exports=Gk(),dd.exports}var jg;function Kk(){if(jg)return ga;jg=1;var e=Iy();return ga.createRoot=e.createRoot,ga.hydrateRoot=e.hydrateRoot,ga}var Yk=Kk();/**
|
|
41
|
+
* react-router v7.13.1
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var Cg="popstate";function Ng(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Xk(e={}){function t(s,i){var h;let a=(h=i.state)==null?void 0:h.masked,{pathname:c,search:d,hash:p}=a||s.location;return Yd("",{pathname:c,search:d,hash:p},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,i){return typeof i=="string"?i:Hi(i)}return Jk(t,n,null,e)}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function er(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Qk(){return Math.random().toString(36).substring(2,10)}function Eg(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Yd(e,t,n=null,s,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Do(t):t,state:n,key:t&&t.key||s||Qk(),unstable_mask:i}}function Hi({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Do(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function Jk(e,t,n,s={}){let{window:i=document.defaultView,v5Compat:a=!1}=s,c=i.history,d="POP",p=null,h=m();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function m(){return(c.state||{idx:null}).idx}function x(){d="POP";let j=m(),S=j==null?null:j-h;h=j,p&&p({action:d,location:k.location,delta:S})}function w(j,S){d="PUSH";let D=Ng(j)?j:Yd(k.location,j,S);h=m()+1;let A=Eg(D,h),M=k.createHref(D.unstable_mask||D);try{c.pushState(A,"",M)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(M)}a&&p&&p({action:d,location:k.location,delta:1})}function b(j,S){d="REPLACE";let D=Ng(j)?j:Yd(k.location,j,S);h=m();let A=Eg(D,h),M=k.createHref(D.unstable_mask||D);c.replaceState(A,"",M),a&&p&&p({action:d,location:k.location,delta:0})}function E(j){return Zk(j)}let k={get action(){return d},get location(){return e(i,c)},listen(j){if(p)throw new Error("A history only accepts one active listener");return i.addEventListener(Cg,x),p=j,()=>{i.removeEventListener(Cg,x),p=null}},createHref(j){return t(i,j)},createURL:E,encodeLocation(j){let S=E(j);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:w,replace:b,go(j){return c.go(j)}};return k}function Zk(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ut(n,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:Hi(e);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=n+s),new URL(s,n)}function Oy(e,t,n="/"){return eS(e,t,n,!1)}function eS(e,t,n,s){let i=typeof t=="string"?Do(t):t,a=Fr(i.pathname||"/",n);if(a==null)return null;let c=My(e);tS(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let h=fS(a);d=cS(c[p],h,s)}return d}function My(e,t=[],n=[],s="",i=!1){let a=(c,d,p=i,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(s)&&p)return;ut(m.relativePath.startsWith(s),`Absolute route path "${m.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(s.length)}let x=vr([s,m.relativePath]),w=n.concat(m);c.children&&c.children.length>0&&(ut(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),My(c.children,t,w,x,p)),!(c.path==null&&!c.index)&&t.push({path:x,score:aS(x,c.index),routesMeta:w})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))a(c,d);else for(let h of _y(c.path))a(c,d,!0,h)}),t}function _y(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(s.length===0)return i?[a,""]:[a];let c=_y(s.join("/")),d=[];return d.push(...c.map(p=>p===""?a:[a,p].join("/"))),i&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function tS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:uS(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var nS=/^:[\w-]+$/,rS=3,sS=2,oS=1,iS=10,lS=-2,Rg=e=>e==="*";function aS(e,t){let n=e.split("/"),s=n.length;return n.some(Rg)&&(s+=lS),t&&(s+=sS),n.filter(i=>!Rg(i)).reduce((i,a)=>i+(nS.test(a)?rS:a===""?oS:iS),s)}function uS(e,t){return e.length===t.length&&e.slice(0,-1).every((s,i)=>s===t[i])?e[e.length-1]-t[t.length-1]:0}function cS(e,t,n=!1){let{routesMeta:s}=e,i={},a="/",c=[];for(let d=0;d<s.length;++d){let p=s[d],h=d===s.length-1,m=a==="/"?t:t.slice(a.length)||"/",x=za({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},m),w=p.route;if(!x&&h&&n&&!s[s.length-1].route.index&&(x=za({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},m)),!x)return null;Object.assign(i,x.params),c.push({params:i,pathname:vr([a,x.pathname]),pathnameBase:gS(vr([a,x.pathnameBase])),route:w}),x.pathnameBase!=="/"&&(a=vr([a,x.pathnameBase]))}return c}function za(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=dS(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],c=a.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:s.reduce((h,{paramName:m,isOptional:x},w)=>{if(m==="*"){let E=d[w]||"";c=a.slice(0,a.length-E.length).replace(/(.)\/+$/,"$1")}const b=d[w];return x&&!b?h[m]=void 0:h[m]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:c,pattern:e}}function dS(e,t=!1,n=!0){er(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,h,m)=>{if(s.push({paramName:d,isOptional:p!=null}),p){let x=m.charAt(h+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),s]}function fS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return er(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Fr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}var pS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function hS(e,t="/"){let{pathname:n,search:s="",hash:i=""}=typeof e=="string"?Do(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=Tg(n.substring(1),"/"):a=Tg(n,t)):a=t,{pathname:a,search:xS(s),hash:yS(i)}}function Tg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function hd(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function $y(e){let t=mS(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function Tf(e,t,n,s=!1){let i;typeof e=="string"?i=Do(e):(i={...e},ut(!i.pathname||!i.pathname.includes("?"),hd("?","pathname","search",i)),ut(!i.pathname||!i.pathname.includes("#"),hd("#","pathname","hash",i)),ut(!i.search||!i.search.includes("#"),hd("#","search","hash",i)));let a=e===""||i.pathname==="",c=a?"/":i.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!s&&c.startsWith("..")){let w=c.split("/");for(;w[0]==="..";)w.shift(),x-=1;i.pathname=w.join("/")}d=x>=0?t[x]:"/"}let p=hS(i,d),h=c&&c!=="/"&&c.endsWith("/"),m=(a||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(h||m)&&(p.pathname+="/"),p}var vr=e=>e.join("/").replace(/\/\/+/g,"/"),gS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vS=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function bS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function wS(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var zy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fy(e,t){let n=e;if(typeof n!="string"||!pS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,i=!1;if(zy)try{let a=new URL(window.location.href),c=n.startsWith("//")?new URL(a.protocol+n):new URL(n),d=Fr(c.pathname,t);c.origin===a.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{er(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var By=["POST","PUT","PATCH","DELETE"];new Set(By);var kS=["GET",...By];new Set(kS);var Lo=y.createContext(null);Lo.displayName="DataRouter";var tu=y.createContext(null);tu.displayName="DataRouterState";var SS=y.createContext(!1),Uy=y.createContext({isTransitioning:!1});Uy.displayName="ViewTransition";var jS=y.createContext(new Map);jS.displayName="Fetchers";var CS=y.createContext(null);CS.displayName="Await";var Bn=y.createContext(null);Bn.displayName="Navigation";var Qi=y.createContext(null);Qi.displayName="Location";var or=y.createContext({outlet:null,matches:[],isDataRoute:!1});or.displayName="Route";var Pf=y.createContext(null);Pf.displayName="RouteError";var Hy="REACT_ROUTER_ERROR",NS="REDIRECT",ES="ROUTE_ERROR_RESPONSE";function RS(e){if(e.startsWith(`${Hy}:${NS}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function TS(e){if(e.startsWith(`${Hy}:${ES}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new vS(t.status,t.statusText,t.data)}catch{}}function PS(e,{relative:t}={}){ut(Ji(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=y.useContext(Bn),{hash:i,pathname:a,search:c}=Zi(e,{relative:t}),d=a;return n!=="/"&&(d=a==="/"?n:vr([n,a])),s.createHref({pathname:d,search:c,hash:i})}function Ji(){return y.useContext(Qi)!=null}function Un(){return ut(Ji(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Qi).location}var Wy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Vy(e){y.useContext(Bn).static||y.useLayoutEffect(e)}function Hn(){let{isDataRoute:e}=y.useContext(or);return e?VS():AS()}function AS(){ut(Ji(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(Lo),{basename:t,navigator:n}=y.useContext(Bn),{matches:s}=y.useContext(or),{pathname:i}=Un(),a=JSON.stringify($y(s)),c=y.useRef(!1);return Vy(()=>{c.current=!0}),y.useCallback((p,h={})=>{if(er(c.current,Wy),!c.current)return;if(typeof p=="number"){n.go(p);return}let m=Tf(p,JSON.parse(a),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:vr([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,a,i,e])}var DS=y.createContext(null);function LS(e){let t=y.useContext(or).outlet;return y.useMemo(()=>t&&y.createElement(DS.Provider,{value:e},t),[t,e])}function Pt(){let{matches:e}=y.useContext(or),t=e[e.length-1];return t?t.params:{}}function Zi(e,{relative:t}={}){let{matches:n}=y.useContext(or),{pathname:s}=Un(),i=JSON.stringify($y(n));return y.useMemo(()=>Tf(e,JSON.parse(i),s,t==="path"),[e,i,s,t])}function IS(e,t){return qy(e,t)}function qy(e,t,n){var j;ut(Ji(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(Bn),{matches:i}=y.useContext(or),a=i[i.length-1],c=a?a.params:{},d=a?a.pathname:"/",p=a?a.pathnameBase:"/",h=a&&a.route;{let S=h&&h.path||"";Ky(d,!h||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${S}">) 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.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let m=Un(),x;if(t){let S=typeof t=="string"?Do(t):t;ut(p==="/"||((j=S.pathname)==null?void 0:j.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${S.pathname}" was given in the \`location\` prop.`),x=S}else x=m;let w=x.pathname||"/",b=w;if(p!=="/"){let S=p.replace(/^\//,"").split("/");b="/"+w.replace(/^\//,"").split("/").slice(S.length).join("/")}let E=Oy(e,{pathname:b});er(h||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),er(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=zS(E&&E.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:vr([p,s.encodeLocation?s.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:vr([p,s.encodeLocation?s.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,n);return t&&k?y.createElement(Qi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function OS(){let e=WS(),t=bS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:s},a={padding:"2px 4px",backgroundColor:s},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:a},"ErrorBoundary")," or"," ",y.createElement("code",{style:a},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,c)}var MS=y.createElement(OS,null),Gy=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=TS(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(or.Provider,{value:this.props.routeContext},y.createElement(Pf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(_S,{error:e},t):t}};Gy.contextType=SS;var md=new WeakMap;function _S({children:e,error:t}){let{basename:n}=y.useContext(Bn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=RS(t.digest);if(s){let i=md.get(t);if(i)throw i;let a=Fy(s.location,n);if(zy&&!md.get(t))if(a.isExternal||s.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:s.replace}));throw md.set(t,c),c}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function $S({routeContext:e,match:t,children:n}){let s=y.useContext(Lo);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(or.Provider,{value:e},n)}function zS(e,t=[],n){let s=n==null?void 0:n.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let i=e,a=s==null?void 0:s.errors;if(a!=null){let m=i.findIndex(x=>x.route.id&&(a==null?void 0:a[x.route.id])!==void 0);ut(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,m+1))}let c=!1,d=-1;if(n&&s){c=s.renderFallback;for(let m=0;m<i.length;m++){let x=i[m];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=m),x.route.id){let{loaderData:w,errors:b}=s,E=x.route.loader&&!w.hasOwnProperty(x.route.id)&&(!b||b[x.route.id]===void 0);if(x.route.lazy||E){n.isStatic&&(c=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let p=n==null?void 0:n.onError,h=s&&p?(m,x)=>{var w,b;p(m,{location:s.location,params:((b=(w=s.matches)==null?void 0:w[0])==null?void 0:b.params)??{},unstable_pattern:wS(s.matches),errorInfo:x})}:void 0;return i.reduceRight((m,x,w)=>{let b,E=!1,k=null,j=null;s&&(b=a&&x.route.id?a[x.route.id]:void 0,k=x.route.errorElement||MS,c&&(d<0&&w===0?(Ky("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,j=null):d===w&&(E=!0,j=x.route.hydrateFallbackElement||null)));let S=t.concat(i.slice(0,w+1)),D=()=>{let A;return b?A=k:E?A=j:x.route.Component?A=y.createElement(x.route.Component,null):x.route.element?A=x.route.element:A=m,y.createElement($S,{match:x,routeContext:{outlet:m,matches:S,isDataRoute:s!=null},children:A})};return s&&(x.route.ErrorBoundary||x.route.errorElement||w===0)?y.createElement(Gy,{location:s.location,revalidation:s.revalidation,component:k,error:b,children:D(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:h}):D()},null)}function Af(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function FS(e){let t=y.useContext(Lo);return ut(t,Af(e)),t}function BS(e){let t=y.useContext(tu);return ut(t,Af(e)),t}function US(e){let t=y.useContext(or);return ut(t,Af(e)),t}function Df(e){let t=US(e),n=t.matches[t.matches.length-1];return ut(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function HS(){return Df("useRouteId")}function WS(){var s;let e=y.useContext(Pf),t=BS("useRouteError"),n=Df("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function VS(){let{router:e}=FS("useNavigate"),t=Df("useNavigate"),n=y.useRef(!1);return Vy(()=>{n.current=!0}),y.useCallback(async(i,a={})=>{er(n.current,Wy),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var Pg={};function Ky(e,t,n){!t&&!Pg[e]&&(Pg[e]=!0,er(!1,n))}y.memo(qS);function qS({routes:e,future:t,state:n,isStatic:s,onError:i}){return qy(e,void 0,{state:n,isStatic:s,onError:i})}function GS(e){return LS(e.context)}function Me(e){ut(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function KS({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:i,static:a=!1,unstable_useTransitions:c}){ut(!Ji(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=y.useMemo(()=>({basename:d,navigator:i,static:a,unstable_useTransitions:c,future:{}}),[d,i,a,c]);typeof n=="string"&&(n=Do(n));let{pathname:h="/",search:m="",hash:x="",state:w=null,key:b="default",unstable_mask:E}=n,k=y.useMemo(()=>{let j=Fr(h,d);return j==null?null:{location:{pathname:j,search:m,hash:x,state:w,key:b,unstable_mask:E},navigationType:s}},[d,h,m,x,w,b,s,E]);return er(k!=null,`<Router basename="${d}"> is not able to match the URL "${h}${m}${x}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:y.createElement(Bn.Provider,{value:p},y.createElement(Qi.Provider,{children:t,value:k}))}function YS({children:e,location:t}){return IS(Xd(e),t)}function Xd(e,t=[]){let n=[];return y.Children.forEach(e,(s,i)=>{if(!y.isValidElement(s))return;let a=[...t,i];if(s.type===y.Fragment){n.push.apply(n,Xd(s.props.children,a));return}ut(s.type===Me,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ut(!s.props.index||!s.props.children,"An index route cannot have child routes.");let c={id:s.props.id||a.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&&(c.children=Xd(s.props.children,a)),n.push(c)}),n}var Pa="get",Aa="application/x-www-form-urlencoded";function nu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function XS(e){return nu(e)&&e.tagName.toLowerCase()==="button"}function QS(e){return nu(e)&&e.tagName.toLowerCase()==="form"}function JS(e){return nu(e)&&e.tagName.toLowerCase()==="input"}function ZS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ej(e,t){return e.button===0&&(!t||t==="_self")&&!ZS(e)}function Qd(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let s=e[n];return t.concat(Array.isArray(s)?s.map(i=>[n,i]):[[n,s]])},[]))}function tj(e,t){let n=Qd(e);return t&&t.forEach((s,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}var xa=null;function nj(){if(xa===null)try{new FormData(document.createElement("form"),0),xa=!1}catch{xa=!0}return xa}var rj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gd(e){return e!=null&&!rj.has(e)?(er(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Aa}"`),null):e}function sj(e,t){let n,s,i,a,c;if(QS(e)){let d=e.getAttribute("action");s=d?Fr(d,t):null,n=e.getAttribute("method")||Pa,i=gd(e.getAttribute("enctype"))||Aa,a=new FormData(e)}else if(XS(e)||JS(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(s=p?Fr(p,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Pa,i=gd(e.getAttribute("formenctype"))||gd(d.getAttribute("enctype"))||Aa,a=new FormData(d,e),!nj()){let{name:h,type:m,value:x}=e;if(m==="image"){let w=h?`${h}.`:"";a.append(`${w}x`,"0"),a.append(`${w}y`,"0")}else h&&a.append(h,x)}}else{if(nu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Pa,s=null,i=Aa,c=e}return a&&i==="text/plain"&&(c=a,a=void 0),{action:s,method:n.toLowerCase(),encType:i,formData:a,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Lf(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function oj(e,t,n,s){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${s}`:i.pathname=`${i.pathname}.${s}`:i.pathname==="/"?i.pathname=`_root.${s}`:t&&Fr(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${s}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${s}`,i}async function ij(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lj(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function aj(e,t,n){let s=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let c=await ij(a,n);return c.links?c.links():[]}return[]}));return fj(s.flat(1).filter(lj).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Ag(e,t,n,s,i,a){let c=(p,h)=>n[h]?p.route.id!==n[h].route.id:!0,d=(p,h)=>{var m;return n[h].pathname!==p.pathname||((m=n[h].route.path)==null?void 0:m.endsWith("*"))&&n[h].params["*"]!==p.params["*"]};return a==="assets"?t.filter((p,h)=>c(p,h)||d(p,h)):a==="data"?t.filter((p,h)=>{var x;let m=s.routes[p.route.id];if(!m||!m.hasLoader)return!1;if(c(p,h)||d(p,h))return!0;if(p.route.shouldRevalidate){let w=p.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function uj(e,t,{includeHydrateFallback:n}={}){return cj(e.map(s=>{let i=t.routes[s.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function cj(e){return[...new Set(e)]}function dj(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function fj(e,t){let n=new Set;return new Set(t),e.reduce((s,i)=>{let a=JSON.stringify(dj(i));return n.has(a)||(n.add(a),s.push({key:a,link:i})),s},[])}function Yy(){let e=y.useContext(Lo);return Lf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function pj(){let e=y.useContext(tu);return Lf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var If=y.createContext(void 0);If.displayName="FrameworkContext";function Xy(){let e=y.useContext(If);return Lf(e,"You must render this element inside a <HydratedRouter> element"),e}function hj(e,t){let n=y.useContext(If),[s,i]=y.useState(!1),[a,c]=y.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:m,onTouchStart:x}=t,w=y.useRef(null);y.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=S=>{S.forEach(D=>{c(D.isIntersecting)})},j=new IntersectionObserver(k,{threshold:.5});return w.current&&j.observe(w.current),()=>{j.disconnect()}}},[e]),y.useEffect(()=>{if(s){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[s]);let b=()=>{i(!0)},E=()=>{i(!1),c(!1)};return n?e!=="intent"?[a,w,{}]:[a,w,{onFocus:ji(d,b),onBlur:ji(p,E),onMouseEnter:ji(h,b),onMouseLeave:ji(m,E),onTouchStart:ji(x,b)}]:[!1,w,{}]}function ji(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function mj({page:e,...t}){let{router:n}=Yy(),s=y.useMemo(()=>Oy(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?y.createElement(xj,{page:e,matches:s,...t}):null}function gj(e){let{manifest:t,routeModules:n}=Xy(),[s,i]=y.useState([]);return y.useEffect(()=>{let a=!1;return aj(e,t,n).then(c=>{a||i(c)}),()=>{a=!0}},[e,t,n]),s}function xj({page:e,matches:t,...n}){let s=Un(),{future:i,manifest:a,routeModules:c}=Xy(),{basename:d}=Yy(),{loaderData:p,matches:h}=pj(),m=y.useMemo(()=>Ag(e,t,h,a,s,"data"),[e,t,h,a,s]),x=y.useMemo(()=>Ag(e,t,h,a,s,"assets"),[e,t,h,a,s]),w=y.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let k=new Set,j=!1;if(t.forEach(D=>{var M;let A=a.routes[D.route.id];!A||!A.hasLoader||(!m.some(_=>_.route.id===D.route.id)&&D.route.id in p&&((M=c[D.route.id])!=null&&M.shouldRevalidate)||A.hasClientLoader?j=!0:k.add(D.route.id))}),k.size===0)return[];let S=oj(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return j&&k.size>0&&S.searchParams.set("_routes",t.filter(D=>k.has(D.route.id)).map(D=>D.route.id).join(",")),[S.pathname+S.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,s,a,m,t,e,c]),b=y.useMemo(()=>uj(x,a),[x,a]),E=gj(x);return y.createElement(y.Fragment,null,w.map(k=>y.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),b.map(k=>y.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),E.map(({key:k,link:j})=>y.createElement("link",{key:k,nonce:n.nonce,...j,crossOrigin:j.crossOrigin??n.crossOrigin})))}function yj(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var vj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vj&&(window.__reactRouterVersion="7.13.1")}catch{}function bj({basename:e,children:t,unstable_useTransitions:n,window:s}){let i=y.useRef();i.current==null&&(i.current=Xk({window:s,v5Compat:!0}));let a=i.current,[c,d]=y.useState({action:a.action,location:a.location}),p=y.useCallback(h=>{n===!1?d(h):y.startTransition(()=>d(h))},[n]);return y.useLayoutEffect(()=>a.listen(p),[a,p]),y.createElement(KS,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:a,unstable_useTransitions:n})}var Qy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,we=y.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:i,reloadDocument:a,replace:c,unstable_mask:d,state:p,target:h,to:m,preventScrollReset:x,viewTransition:w,unstable_defaultShouldRevalidate:b,...E},k){let{basename:j,navigator:S,unstable_useTransitions:D}=y.useContext(Bn),A=typeof m=="string"&&Qy.test(m),M=Fy(m,j);m=M.to;let _=PS(m,{relative:i}),N=Un(),P=null;if(d){let G=Tf(d,[],N.unstable_mask?N.unstable_mask.pathname:"/",!0);j!=="/"&&(G.pathname=G.pathname==="/"?j:vr([j,G.pathname])),P=S.createHref(G)}let[z,q,T]=hj(s,E),I=jj(m,{replace:c,unstable_mask:d,state:p,target:h,preventScrollReset:x,relative:i,viewTransition:w,unstable_defaultShouldRevalidate:b,unstable_useTransitions:D});function B(G){t&&t(G),G.defaultPrevented||I(G)}let W=!(M.isExternal||a),J=y.createElement("a",{...E,...T,href:(W?P:void 0)||M.absoluteURL||_,onClick:W?B:t,ref:yj(k,q),target:h,"data-discover":!A&&n==="render"?"true":void 0});return z&&!A?y.createElement(y.Fragment,null,J,y.createElement(mj,{page:_})):J});we.displayName="Link";var wj=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:i=!1,style:a,to:c,viewTransition:d,children:p,...h},m){let x=Zi(c,{relative:h.relative}),w=Un(),b=y.useContext(tu),{navigator:E,basename:k}=y.useContext(Bn),j=b!=null&&Tj(x)&&d===!0,S=E.encodeLocation?E.encodeLocation(x).pathname:x.pathname,D=w.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(D=D.toLowerCase(),A=A?A.toLowerCase():null,S=S.toLowerCase()),A&&k&&(A=Fr(A,k)||A);const M=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let _=D===S||!i&&D.startsWith(S)&&D.charAt(M)==="/",N=A!=null&&(A===S||!i&&A.startsWith(S)&&A.charAt(S.length)==="/"),P={isActive:_,isPending:N,isTransitioning:j},z=_?t:void 0,q;typeof s=="function"?q=s(P):q=[s,_?"active":null,N?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let T=typeof a=="function"?a(P):a;return y.createElement(we,{...h,"aria-current":z,className:q,ref:m,style:T,to:c,viewTransition:d},typeof p=="function"?p(P):p)});wj.displayName="NavLink";var kj=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:i,state:a,method:c=Pa,action:d,onSubmit:p,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:w,...b},E)=>{let{unstable_useTransitions:k}=y.useContext(Bn),j=Ej(),S=Rj(d,{relative:h}),D=c.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&Qy.test(d),M=_=>{if(p&&p(_),_.defaultPrevented)return;_.preventDefault();let N=_.nativeEvent.submitter,P=(N==null?void 0:N.getAttribute("formmethod"))||c,z=()=>j(N||_.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:i,state:a,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:w});k&&n!==!1?y.startTransition(()=>z()):z()};return y.createElement("form",{ref:E,method:D,action:S,onSubmit:s?p:M,...b,"data-discover":!A&&e==="render"?"true":void 0})});kj.displayName="Form";function Sj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jy(e){let t=y.useContext(Lo);return ut(t,Sj(e)),t}function jj(e,{target:t,replace:n,unstable_mask:s,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:h}={}){let m=Hn(),x=Un(),w=Zi(e,{relative:c});return y.useCallback(b=>{if(ej(b,t)){b.preventDefault();let E=n!==void 0?n:Hi(x)===Hi(w),k=()=>m(e,{replace:E,unstable_mask:s,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});h?y.startTransition(()=>k()):k()}},[x,m,w,n,s,i,t,e,a,c,d,p,h])}function Of(e){er(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(Qd(e)),n=y.useRef(!1),s=Un(),i=y.useMemo(()=>tj(s.search,n.current?null:t.current),[s.search]),a=Hn(),c=y.useCallback((d,p)=>{const h=Qd(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,a("?"+h,p)},[a,i]);return[i,c]}var Cj=0,Nj=()=>`__${String(++Cj)}__`;function Ej(){let{router:e}=Jy("useSubmit"),{basename:t}=y.useContext(Bn),n=HS(),s=e.fetch,i=e.navigate;return y.useCallback(async(a,c={})=>{let{action:d,method:p,encType:h,formData:m,body:x}=sj(a,t);if(c.navigate===!1){let w=c.fetcherKey||Nj();await s(w,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:m,body:x,formMethod:c.method||p,formEncType:c.encType||h,flushSync:c.flushSync})}else await i(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:m,body:x,formMethod:c.method||p,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[s,i,t,n])}function Rj(e,{relative:t}={}){let{basename:n}=y.useContext(Bn),s=y.useContext(or);ut(s,"useFormAction must be used inside a RouteContext");let[i]=s.matches.slice(-1),a={...Zi(e||".",{relative:t})},c=Un();if(e==null){a.search=c.search;let d=new URLSearchParams(a.search),p=d.getAll("index");if(p.some(m=>m==="")){d.delete("index"),p.filter(x=>x).forEach(x=>d.append("index",x));let m=d.toString();a.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:vr([n,a.pathname])),Hi(a)}function Tj(e,{relative:t}={}){let n=y.useContext(Uy);ut(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=Jy("useViewTransitionState"),i=Zi(e,{relative:t});if(!n.isTransitioning)return!1;let a=Fr(n.currentLocation.pathname,s)||n.currentLocation.pathname,c=Fr(n.nextLocation.pathname,s)||n.nextLocation.pathname;return za(i.pathname,c)!=null||za(i.pathname,a)!=null}var ys=Iy();const Pj=eu(ys);/**
|
|
52
|
+
* @license lucide-react v0.460.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const Aj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zy=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/**
|
|
57
|
+
* @license lucide-react v0.460.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/var Dj={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
62
|
+
* @license lucide-react v0.460.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const Lj=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:a,iconNode:c,...d},p)=>y.createElement("svg",{ref:p,...Dj,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Zy("lucide",i),...d},[...c.map(([h,m])=>y.createElement(h,m)),...Array.isArray(a)?a:[a]]));/**
|
|
67
|
+
* @license lucide-react v0.460.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const xe=(e,t)=>{const n=y.forwardRef(({className:s,...i},a)=>y.createElement(Lj,{ref:a,iconNode:t,className:Zy(`lucide-${Aj(e)}`,s),...i}));return n.displayName=`${e}`,n};/**
|
|
72
|
+
* @license lucide-react v0.460.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const ru=xe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
77
|
+
* @license lucide-react v0.460.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const ev=xe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
82
|
+
* @license lucide-react v0.460.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Ij=xe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
87
|
+
* @license lucide-react v0.460.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Fa=xe("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
92
|
+
* @license lucide-react v0.460.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const tv=xe("BookOpenText",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]]);/**
|
|
97
|
+
* @license lucide-react v0.460.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const nv=xe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
102
|
+
* @license lucide-react v0.460.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Mf=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
107
|
+
* @license lucide-react v0.460.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Wi=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
112
|
+
* @license lucide-react v0.460.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const rv=xe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
117
|
+
* @license lucide-react v0.460.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Jd=xe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
122
|
+
* @license lucide-react v0.460.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const sv=xe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
127
|
+
* @license lucide-react v0.460.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Zd=xe("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
|
|
132
|
+
* @license lucide-react v0.460.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const Oj=xe("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
137
|
+
* @license lucide-react v0.460.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const Mj=xe("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
|
|
142
|
+
* @license lucide-react v0.460.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const _j=xe("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
|
|
147
|
+
* @license lucide-react v0.460.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const $j=xe("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
152
|
+
* @license lucide-react v0.460.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const zj=xe("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
157
|
+
* @license lucide-react v0.460.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const _f=xe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
162
|
+
* @license lucide-react v0.460.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const Fj=xe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
167
|
+
* @license lucide-react v0.460.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const ov=xe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
172
|
+
* @license lucide-react v0.460.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const Dg=xe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
177
|
+
* @license lucide-react v0.460.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const Bj=xe("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
|
|
182
|
+
* @license lucide-react v0.460.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const Lg=xe("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/**
|
|
187
|
+
* @license lucide-react v0.460.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const Uj=xe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
192
|
+
* @license lucide-react v0.460.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const Hj=xe("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
|
197
|
+
* @license lucide-react v0.460.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const $f=xe("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
202
|
+
* @license lucide-react v0.460.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const Wj=xe("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
207
|
+
* @license lucide-react v0.460.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const iv=xe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
212
|
+
* @license lucide-react v0.460.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const Vj=xe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
217
|
+
* @license lucide-react v0.460.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const qj=xe("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
|
|
222
|
+
* @license lucide-react v0.460.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const Gj=xe("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
|
|
227
|
+
* @license lucide-react v0.460.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const lv=xe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
232
|
+
* @license lucide-react v0.460.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const Kj=xe("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
|
237
|
+
* @license lucide-react v0.460.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const Yj=xe("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
242
|
+
* @license lucide-react v0.460.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const Xj=xe("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
247
|
+
* @license lucide-react v0.460.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const av=xe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
252
|
+
* @license lucide-react v0.460.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const Qj=xe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
257
|
+
* @license lucide-react v0.460.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const zf=xe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
262
|
+
* @license lucide-react v0.460.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const Jj=xe("MoonStar",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9",key:"4ay0iu"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}]]);/**
|
|
267
|
+
* @license lucide-react v0.460.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const xd=xe("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/**
|
|
272
|
+
* @license lucide-react v0.460.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const Zj=xe("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
277
|
+
* @license lucide-react v0.460.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const eC=xe("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
282
|
+
* @license lucide-react v0.460.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const tr=xe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
287
|
+
* @license lucide-react v0.460.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const uv=xe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
292
|
+
* @license lucide-react v0.460.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const tC=xe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
297
|
+
* @license lucide-react v0.460.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const Ff=xe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
302
|
+
* @license lucide-react v0.460.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const nC=xe("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
307
|
+
* @license lucide-react v0.460.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const su=xe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
312
|
+
* @license lucide-react v0.460.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const rC=xe("SendToBack",[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",key:"1b0bso"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",key:"1x09vl"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1",key:"pao6x6"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1",key:"19tdru"}]]);/**
|
|
317
|
+
* @license lucide-react v0.460.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const sC=xe("ServerOff",[["path",{d:"M7 2h13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-5",key:"bt2siv"}],["path",{d:"M10 10 2.5 2.5C2 2 2 2.5 2 5v3a2 2 0 0 0 2 2h6z",key:"1hjrv1"}],["path",{d:"M22 17v-1a2 2 0 0 0-2-2h-1",key:"1iynyr"}],["path",{d:"M4 14a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16.5l1-.5.5.5-8-8H4z",key:"161ggg"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
322
|
+
* @license lucide-react v0.460.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const oC=xe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
327
|
+
* @license lucide-react v0.460.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const iC=xe("ShieldX",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);/**
|
|
332
|
+
* @license lucide-react v0.460.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const br=xe("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
337
|
+
* @license lucide-react v0.460.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const Ig=xe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
342
|
+
* @license lucide-react v0.460.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const cv=xe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
347
|
+
* @license lucide-react v0.460.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const lC=xe("SunMedium",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 3v1",key:"1asbbs"}],["path",{d:"M12 20v1",key:"1wcdkc"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M20 12h1",key:"1vloll"}],["path",{d:"m18.364 5.636-.707.707",key:"1hakh0"}],["path",{d:"m6.343 17.657-.707.707",key:"18m9nf"}],["path",{d:"m5.636 5.636.707.707",key:"1xv1c5"}],["path",{d:"m17.657 17.657.707.707",key:"vl76zb"}]]);/**
|
|
352
|
+
* @license lucide-react v0.460.0 - ISC
|
|
353
|
+
*
|
|
354
|
+
* This source code is licensed under the ISC license.
|
|
355
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
+
*/const dv=xe("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
357
|
+
* @license lucide-react v0.460.0 - ISC
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the ISC license.
|
|
360
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/const aC=xe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
362
|
+
* @license lucide-react v0.460.0 - ISC
|
|
363
|
+
*
|
|
364
|
+
* This source code is licensed under the ISC license.
|
|
365
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
+
*/const Io=xe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
367
|
+
* @license lucide-react v0.460.0 - ISC
|
|
368
|
+
*
|
|
369
|
+
* This source code is licensed under the ISC license.
|
|
370
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
+
*/const el=xe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
372
|
+
* @license lucide-react v0.460.0 - ISC
|
|
373
|
+
*
|
|
374
|
+
* This source code is licensed under the ISC license.
|
|
375
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
+
*/const uC=xe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
377
|
+
* @license lucide-react v0.460.0 - ISC
|
|
378
|
+
*
|
|
379
|
+
* This source code is licensed under the ISC license.
|
|
380
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
+
*/const fv=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function pv(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=pv(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function cC(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=pv(e))&&(s&&(s+=" "),s+=t);return s}const Bf="-",dC=e=>{const t=pC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{const d=c.split(Bf);return d[0]===""&&d.length!==1&&d.shift(),hv(d,t)||fC(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&s[c]?[...p,...s[c]]:p}}},hv=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],s=t.nextPart.get(n),i=s?hv(e.slice(1),s):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Bf);return(c=t.validators.find(({validator:d})=>d(a)))==null?void 0:c.classGroupId},Og=/^\[(.+)\]$/,fC=e=>{if(Og.test(e)){const t=Og.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pC=e=>{const{theme:t,prefix:n}=e,s={nextPart:new Map,validators:[]};return mC(Object.entries(e.classGroups),n).forEach(([a,c])=>{ef(c,s,a,t)}),s},ef=(e,t,n,s)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:Mg(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(hC(i)){ef(i(s),t,n,s);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,c])=>{ef(c,Mg(t,a),n,s)})})},Mg=(e,t)=>{let n=e;return t.split(Bf).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},hC=e=>e.isThemeGetter,mC=(e,t)=>t?e.map(([n,s])=>{const i=s.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([c,d])=>[t+c,d])):a);return[n,i]}):e,gC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,s=new Map;const i=(a,c)=>{n.set(a,c),t++,t>e&&(t=0,s=n,n=new Map)};return{get(a){let c=n.get(a);if(c!==void 0)return c;if((c=s.get(a))!==void 0)return i(a,c),c},set(a,c){n.has(a)?n.set(a,c):i(a,c)}}},mv="!",xC=e=>{const{separator:t,experimentalParseClassName:n}=e,s=t.length===1,i=t[0],a=t.length,c=d=>{const p=[];let h=0,m=0,x;for(let j=0;j<d.length;j++){let S=d[j];if(h===0){if(S===i&&(s||d.slice(j,j+a)===t)){p.push(d.slice(m,j)),m=j+a;continue}if(S==="/"){x=j;continue}}S==="["?h++:S==="]"&&h--}const w=p.length===0?d:d.substring(m),b=w.startsWith(mv),E=b?w.substring(1):w,k=x&&x>m?x-m:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:E,maybePostfixModifierPosition:k}};return n?d=>n({className:d,parseClassName:c}):c},yC=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(s=>{s[0]==="["?(t.push(...n.sort(),s),n=[]):n.push(s)}),t.push(...n.sort()),t},vC=e=>({cache:gC(e.cacheSize),parseClassName:xC(e),...dC(e)}),bC=/\s+/,wC=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i}=t,a=[],c=e.trim().split(bC);let d="";for(let p=c.length-1;p>=0;p-=1){const h=c[p],{modifiers:m,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:b}=n(h);let E=!!b,k=s(E?w.substring(0,b):w);if(!k){if(!E){d=h+(d.length>0?" "+d:d);continue}if(k=s(w),!k){d=h+(d.length>0?" "+d:d);continue}E=!1}const j=yC(m).join(":"),S=x?j+mv:j,D=S+k;if(a.includes(D))continue;a.push(D);const A=i(k,E);for(let M=0;M<A.length;++M){const _=A[M];a.push(S+_)}d=h+(d.length>0?" "+d:d)}return d};function kC(){let e=0,t,n,s="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gv(t))&&(s&&(s+=" "),s+=n);return s}const gv=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=gv(e[s]))&&(n&&(n+=" "),n+=t);return n};function SC(e,...t){let n,s,i,a=c;function c(p){const h=t.reduce((m,x)=>x(m),e());return n=vC(h),s=n.cache.get,i=n.cache.set,a=d,d(p)}function d(p){const h=s(p);if(h)return h;const m=wC(p,n);return i(p,m),m}return function(){return a(kC.apply(null,arguments))}}const et=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xv=/^\[(?:([a-z-]+):)?(.+)\]$/i,jC=/^\d+\/\d+$/,CC=new Set(["px","full","screen"]),NC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,RC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_r=e=>wo(e)||CC.has(e)||jC.test(e),ps=e=>Oo(e,"length",$C),wo=e=>!!e&&!Number.isNaN(Number(e)),yd=e=>Oo(e,"number",wo),Ci=e=>!!e&&Number.isInteger(Number(e)),AC=e=>e.endsWith("%")&&wo(e.slice(0,-1)),Ie=e=>xv.test(e),hs=e=>NC.test(e),DC=new Set(["length","size","percentage"]),LC=e=>Oo(e,DC,yv),IC=e=>Oo(e,"position",yv),OC=new Set(["image","url"]),MC=e=>Oo(e,OC,FC),_C=e=>Oo(e,"",zC),Ni=()=>!0,Oo=(e,t,n)=>{const s=xv.exec(e);return s?s[1]?typeof t=="string"?s[1]===t:t.has(s[1]):n(s[2]):!1},$C=e=>EC.test(e)&&!RC.test(e),yv=()=>!1,zC=e=>TC.test(e),FC=e=>PC.test(e),BC=()=>{const e=et("colors"),t=et("spacing"),n=et("blur"),s=et("brightness"),i=et("borderColor"),a=et("borderRadius"),c=et("borderSpacing"),d=et("borderWidth"),p=et("contrast"),h=et("grayscale"),m=et("hueRotate"),x=et("invert"),w=et("gap"),b=et("gradientColorStops"),E=et("gradientColorStopPositions"),k=et("inset"),j=et("margin"),S=et("opacity"),D=et("padding"),A=et("saturate"),M=et("scale"),_=et("sepia"),N=et("skew"),P=et("space"),z=et("translate"),q=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Ie,t],B=()=>[Ie,t],W=()=>["",_r,ps],J=()=>["auto",wo,Ie],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],oe=()=>["","0",Ie],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[wo,Ie];return{cacheSize:500,separator:":",theme:{colors:[Ni],spacing:[_r,ps],blur:["none","",hs,Ie],brightness:$(),borderColor:[e],borderRadius:["none","","full",hs,Ie],borderSpacing:B(),borderWidth:W(),contrast:$(),grayscale:oe(),hueRotate:$(),invert:oe(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[AC,ps],inset:I(),margin:I(),opacity:$(),padding:B(),saturate:$(),scale:$(),sepia:oe(),skew:$(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[hs]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Ie]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ci,Ie]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:oe()}],shrink:[{shrink:oe()}],order:[{order:["first","last","none",Ci,Ie]}],"grid-cols":[{"grid-cols":[Ni]}],"col-start-end":[{col:["auto",{span:["full",Ci,Ie]},Ie]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Ni]}],"row-start-end":[{row:["auto",{span:[Ci,Ie]},Ie]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ie,t]}],"min-w":[{"min-w":[Ie,t,"min","max","fit"]}],"max-w":[{"max-w":[Ie,t,"none","full","min","max","fit","prose",{screen:[hs]},hs]}],h:[{h:[Ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,t,"auto","min","max","fit"]}],"font-size":[{text:["base",hs,ps]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yd]}],"font-family":[{font:[Ni]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ie]}],"line-clamp":[{"line-clamp":["none",wo,yd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_r,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_r,ps]}],"underline-offset":[{"underline-offset":["auto",_r,Ie]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),IC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",LC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},MC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:te()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[_r,Ie]}],"outline-w":[{outline:[_r,ps]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[_r,ps]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",hs,_C]}],"shadow-color":[{shadow:[Ni]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[s]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",hs,Ie]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[x]}],saturate:[{saturate:[A]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ie]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Ci,Ie]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ie]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_r,ps,yd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},UC=SC(BC);function $e(...e){return UC(cC(e))}function Br(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Rn(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function rn(e){return e.split(/[_\s-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function vv(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function HC(e){let t=vv(e);const n=t.match(/^\/w\/[^/]+(\/.*)?$/);return n&&(t=n[1]||"/"),t==="/"?"/":t.startsWith("/missions")?/^\/missions\/[^/]+\/assignments\//.test(t)?"/assignments":"/missions":t.startsWith("/assignments")?"/assignments":t.startsWith("/servers")?"/servers":t.startsWith("/agent-sessions")?"/agent-sessions":t.startsWith("/playbooks")?"/playbooks":t.startsWith("/todos")?"/todos":t.startsWith("/attention")?"/attention":t.startsWith("/help")?"/help":t.startsWith("/settings")?"/settings":null}function bv(e,t){return HC(e)===t}function WC(e){let n=vv(e).split("/").filter(Boolean);const s=[];let i="Overview",a=null,c="";return n[0]==="w"&&n[1]&&(c=`/w/${n[1]}`,s.push({label:rn(n[1]),path:`${c}/missions`}),n=n.slice(2)),n.length===0?{title:i,breadcrumbs:s,missionSlug:a}:(n[0]==="missions"?(s.push({label:"Missions",path:`${c}/missions`}),i="Missions",n[1]&&(a=n[1],s.push({label:rn(n[1]),path:`${c}/missions/${n[1]}`}),i=rn(n[1])),n[2]==="edit"?i="Edit Mission":n[2]==="create"&&n[3]==="assignment"?i="Create Assignment":n[2]==="assignments"&&n[3]&&(s.push({label:rn(n[3]),path:`${c}/missions/${n[1]}/assignments/${n[3]}`}),i=rn(n[3]),n[4]==="edit"?i="Edit Assignment":n[4]==="plan"&&n[5]==="edit"?i="Edit Plan":n[4]==="scratchpad"&&n[5]==="edit"?i="Edit Scratchpad":n[4]==="handoff"&&n[5]==="edit"?i="Append Handoff":n[4]==="decision-record"&&n[5]==="edit"&&(i="Append Decision"))):n[0]==="servers"?(i="Servers",s.push({label:"Servers",path:`${c}/servers`})):n[0]==="agent-sessions"?(i="Agent Sessions",s.push({label:"Agent Sessions",path:`${c}/agent-sessions`})):n[0]==="attention"?(i="Attention",s.push({label:"Attention",path:"/attention"})):n[0]==="assignments"?(i="Assignments",s.push({label:"Assignments",path:`${c}/assignments`})):n[0]==="playbooks"?(s.push({label:"Playbooks",path:"/playbooks"}),i="Playbooks",n[1]==="create"?i="Create Playbook":n[1]&&n[2]==="edit"?(s.push({label:rn(n[1]),path:`/playbooks/${n[1]}`}),i="Edit Playbook"):n[1]&&(s.push({label:rn(n[1]),path:`/playbooks/${n[1]}`}),i=rn(n[1]))):n[0]==="todos"?(i="Todos",s.push({label:"Todos",path:`${c}/todos`})):n[0]==="help"?(i="Help",s.push({label:"Help",path:"/help"})):n[0]==="settings"?(i="Settings",s.push({label:"Settings",path:"/settings"})):n[0]==="create"&&n[1]==="mission"&&(i="Create Mission",s.push({label:"Create Mission",path:`${c}/create/mission`})),{title:i,breadcrumbs:s,missionSlug:a})}function _g({items:e,onNavigate:t}){const n=Un();return l.jsx("nav",{className:"space-y-1",children:e.map(s=>{const i=s.icon,a=bv(n.pathname,s.to)&&!n.pathname.startsWith("/w/");return l.jsxs(we,{to:s.to,onClick:t,className:$e("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition",a?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"),children:[l.jsx(i,{className:"h-4 w-4"}),l.jsx("span",{children:s.label})]},s.to)})})}const tf="syntaur-theme",wv=y.createContext(null);function nf(){try{const e=window.localStorage.getItem(tf);return e==="light"||e==="dark"?e:null}catch{return null}}function kv(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Sv(e){const t=document.documentElement;t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function VC(){if(typeof document>"u")return;const e=nf();Sv(e??kv())}function qC({children:e}){const[t,n]=y.useState(()=>nf()),[s,i]=y.useState(()=>nf()??kv());y.useEffect(()=>{Sv(s)},[s]),y.useEffect(()=>{if(!window.matchMedia)return;const c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{t||i(c.matches?"dark":"light")};return d(),c.addEventListener("change",d),()=>{c.removeEventListener("change",d)}},[t]);const a={resolvedTheme:s,explicitTheme:t,setTheme:c=>{window.localStorage.setItem(tf,c),n(c),i(c)},toggleTheme:()=>{const c=s==="dark"?"light":"dark";window.localStorage.setItem(tf,c),n(c),i(c)}};return l.jsx(wv.Provider,{value:a,children:e})}function GC(){const e=y.useContext(wv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const Da=new Set;let hn=null,ko=null;function KC(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function jv(){hn&&(hn.readyState===WebSocket.OPEN||hn.readyState===WebSocket.CONNECTING)||(hn=new WebSocket(KC()),hn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of Da)n(t)}catch{}},hn.onclose=()=>{hn=null,ko&&clearTimeout(ko),ko=setTimeout(jv,2e3)},hn.onerror=()=>{hn==null||hn.close()})}function Uf(e){const t=y.useRef(e);t.current=e,y.useEffect(()=>{const n=s=>t.current(s);return Da.add(n),jv(),()=>{Da.delete(n),Da.size===0&&hn&&(ko&&clearTimeout(ko),ko=null,hn.close(),hn=null)}},[])}function gn(e,t){const[n,s]=y.useState(null),[i,a]=y.useState(!0),[c,d]=y.useState(null),[p,h]=y.useState(0),m=y.useCallback(()=>{h(x=>x+1)},[]);return y.useEffect(()=>{if(!e){a(!1),s(null);return}let x=!1;return a(!0),d(null),fetch(e).then(async w=>{if(!w.ok){const b=await w.json().catch(()=>null);throw new Error((b==null?void 0:b.error)||`HTTP ${w.status}`)}return w.json()}).then(w=>{x||(s(w),a(!1))}).catch(w=>{x||(d(w.message),a(!1))}),()=>{x=!0}},[e,p]),Uf(x=>{t&&((x.type==="mission-updated"||x.type==="assignment-updated")&&m(),x.type==="servers-updated"&&t==="servers"&&m(),x.type==="agent-sessions-updated"&&t==="agent-sessions"&&m(),x.type==="playbooks-updated"&&t==="playbooks"&&m())}),{data:n,loading:i,error:c,refetch:m}}function Hf(){return gn("/api/missions","missions")}function Wf(){return gn("/api/workspaces","missions")}function At(){const{workspace:e}=Pt();return e?`/w/${e}`:""}function YC(){return gn("/api/overview","overview")}function XC(){return gn("/api/assignments","assignments")}function QC(){return gn("/api/attention","attention")}function Cv(){return gn("/api/help")}function Nv(e){const t=e?`/api/missions/${e}`:null;return gn(t,"mission")}function JC(e,t){const n=e&&t?`/api/missions/${e}/assignments/${t}`:null;return gn(n,"assignment")}function Ev(e){return gn(e)}function Rv(){return gn("/api/servers","servers")}function ZC(){return gn("/api/agent-sessions","agent-sessions")}function eN(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return gn(n,"agent-sessions")}function tN(){return gn("/api/playbooks","playbooks")}function nN(e){const t=e?`/api/playbooks/${e}`:null;return gn(t,"playbooks")}function rN({title:e,breadcrumbs:t,missionSlug:n,onOpenMobileNav:s}){const i=At(),{resolvedTheme:a,toggleTheme:c}=GC();return l.jsx("header",{className:"sticky top-0 z-30 border-b border-border/70 bg-background/85 backdrop-blur",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2.5 lg:px-6",children:[l.jsx("button",{type:"button",onClick:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/70 bg-card/80 text-foreground lg:hidden","aria-label":"Open navigation",children:l.jsx(Qj,{className:"h-4 w-4"})}),l.jsx("div",{className:"min-w-0 flex-1",children:l.jsxs("div",{className:"flex items-center gap-2",children:[t.length>1?l.jsxs("nav",{className:"flex items-center gap-1.5 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:[t.slice(0,-1).map((d,p)=>l.jsxs("span",{className:"flex items-center gap-1.5",children:[p>0?l.jsx("span",{children:"/"}):null,l.jsx(we,{to:d.path,className:"hover:text-foreground",children:d.label})]},d.path)),l.jsx("span",{children:"/"})]}):null,l.jsx("h1",{className:"truncate text-base font-semibold text-foreground",children:e})]})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(we,{className:"shell-action",to:`${i}/help`,children:"Help"}),l.jsxs(we,{className:"shell-action",to:`${i}/create/mission`,children:[l.jsx(tr,{className:"h-4 w-4"}),l.jsx("span",{children:"New Mission"})]}),n?l.jsxs(we,{className:"shell-action",to:`${i}/missions/${n}/create/assignment`,children:[l.jsx(tr,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}):null,l.jsxs("button",{type:"button",onClick:c,className:"shell-action","aria-label":"Toggle theme",children:[a==="dark"?l.jsx(lC,{className:"h-4 w-4"}):l.jsx(Jj,{className:"h-4 w-4"}),l.jsx("span",{children:a==="dark"?"Light":"Dark"})]})]})]})})}const sN=[{to:"/",label:"Overview",icon:zj},{to:"/attention",label:"Attention",icon:el},{to:"/playbooks",label:"Playbooks",icon:nv},{to:"/todos",label:"Todos",icon:br}],oN=[{suffix:"/missions",label:"Missions",icon:$f},{suffix:"/assignments",label:"Assignments",icon:Xj},{suffix:"/servers",label:"Servers",icon:zf},{suffix:"/agent-sessions",label:"Agent Sessions",icon:ru},{suffix:"/todos",label:"Todos",icon:br}],iN=[{to:"/help",label:"Help",icon:Kj},{to:"/settings",label:"Settings",icon:oC}],$g="syntaur.dashboard.sourceFirstNoticeDismissed";function lN({title:e,breadcrumbs:t,missionSlug:n,workspace:s,children:i}){const[a,c]=y.useState(!1),[d,p]=y.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem($g)==="1"}catch{return!1}});function h(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem($g,"1")}catch{}}return l.jsx("div",{className:"min-h-screen bg-background",children:l.jsxs("div",{className:"relative grid min-h-screen lg:grid-cols-[240px_minmax(0,1fr)]",children:[l.jsx("aside",{className:"hidden max-h-screen sticky top-0 overflow-y-auto border-r border-border/70 bg-sidebar/90 px-4 py-4 backdrop-blur lg:flex lg:flex-col",children:l.jsx(zg,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:s})}),a?l.jsx("div",{className:"fixed inset-0 z-40 bg-slate-950/40 lg:hidden",children:l.jsxs("div",{className:"h-full max-w-xs border-r border-border/70 bg-sidebar p-4 shadow-2xl",children:[l.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[l.jsx(we,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>c(!1),children:"Syntaur"}),l.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-9 w-9 items-center justify-center rounded-md border border-border/70 bg-background/80",children:l.jsx(fv,{className:"h-4 w-4"})})]}),l.jsx(zg,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:s,onNavigate:()=>c(!1)})]})}):null,l.jsxs("div",{className:"min-w-0",children:[l.jsx(rN,{title:e,breadcrumbs:t,missionSlug:n,onOpenMobileNav:()=>c(!0)}),l.jsx("main",{className:"mx-auto w-full max-w-[1480px] px-4 py-4 lg:px-6 lg:py-5",children:i})]})]})})}function zg({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:s}){const{data:i}=Wf(),a=(i==null?void 0:i.workspaces)??[],c=(i==null?void 0:i.hasUngrouped)??!1,d=Un(),[p,h]=y.useState(new Set),[m,x]=y.useState(!1),[w,b]=y.useState(""),E=Hn();function k(S){h(D=>{const A=new Set(D);return A.has(S)?A.delete(S):A.add(S),A})}const j=[...a,...c?["_ungrouped"]:[]];return l.jsxs("div",{className:"flex h-full flex-col gap-3",children:[l.jsx("div",{className:"space-y-3",children:l.jsxs(we,{to:"/",className:"inline-flex items-center gap-3",onClick:s,children:[l.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-lg bg-foreground text-sm font-semibold text-background shadow-sm",children:"S"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Syntaur"}),l.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Local-first mission control"})]})]})}),l.jsx(_g,{items:sN,onNavigate:s}),l.jsx("div",{className:"border-t border-border/40"}),l.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[j.length===0&&!m&&l.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),j.map(S=>{const D=S==="_ungrouped",A=D?"Ungrouped":rn(S),M=D?"/w/_ungrouped":`/w/${S}`,_=p.has(S),N=n===S||n===null&&D&&d.pathname.startsWith("/w/_ungrouped");return l.jsxs("div",{children:[l.jsxs("button",{type:"button",onClick:()=>k(S),className:`flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-semibold uppercase tracking-wider transition ${N?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[l.jsx(Wi,{className:`h-3 w-3 transition-transform ${_?"-rotate-90":""}`}),A]}),!_&&l.jsx("nav",{className:"ml-2 space-y-0.5",children:oN.map(P=>{const z=`${M}${P.suffix}`,q=bv(d.pathname,P.suffix)&&d.pathname.startsWith(M),T=P.icon;return l.jsxs(we,{to:z,onClick:s,className:`flex items-center gap-3 rounded-md px-3 py-1.5 text-sm font-medium transition ${q?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"}`,children:[l.jsx(T,{className:"h-4 w-4"}),l.jsx("span",{children:P.label})]},z)})})]},S)}),m?l.jsx("form",{className:"px-3 py-1.5",onSubmit:S=>{S.preventDefault();const D=w.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");D&&(x(!1),b(""),fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:D})}).then(()=>{s==null||s(),E(`/w/${D}/missions`)}))},children:l.jsx("input",{autoFocus:!0,type:"text",value:w,onChange:S=>b(S.target.value),onKeyDown:S=>{S.key==="Escape"&&(x(!1),b(""))},onBlur:()=>{w.trim()||(x(!1),b(""))},placeholder:"workspace-name",className:"w-full rounded-md border border-border/60 bg-background/80 px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-foreground/40 focus:outline-none"})}):l.jsxs("button",{type:"button",onClick:()=>x(!0),className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground/60 transition hover:text-muted-foreground",children:[l.jsx(tr,{className:"h-3 w-3"}),"New Workspace"]})]}),l.jsx("div",{className:"border-t border-border/40"}),l.jsx(_g,{items:iN,onNavigate:s}),e?null:l.jsx("div",{className:"rounded-lg border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Source-first dashboard"}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Mission and assignment markdown files stay authoritative. Derived files are read-only projections."})]}),l.jsx("button",{type:"button",onClick:t,className:"inline-flex h-7 w-7 items-center justify-center rounded-md border border-border/70 bg-background/80 text-muted-foreground transition hover:text-foreground","aria-label":"Dismiss source-first dashboard notice",children:l.jsx(fv,{className:"h-4 w-4"})})]})})]})}function aN(){const e=Un(),{workspace:t}=Pt(),{title:n,breadcrumbs:s,missionSlug:i}=WC(e.pathname);return l.jsx(lN,{title:n,breadcrumbs:s,missionSlug:i,workspace:t??null,children:l.jsx(GS,{})})}function uN(e){const[t,n]=y.useState(null),[s,i]=y.useState(!0),[a,c]=y.useState(null),d=y.useCallback(async()=>{try{const p=await fetch(`/api/todos/${encodeURIComponent(e)}`);if(!p.ok)throw new Error(`HTTP ${p.status}`);n(await p.json()),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to fetch todos")}finally{i(!1)}},[e]);return y.useEffect(()=>{d()},[d]),Uf(p=>{p.type==="todos-updated"&&d()}),{data:t,loading:s,error:a,refetch:d}}function Tv(){const[e,t]=y.useState(null),[n,s]=y.useState(!0),[i,a]=y.useState(null),c=y.useCallback(async()=>{try{const d=await fetch("/api/todos");if(!d.ok)throw new Error(`HTTP ${d.status}`);t(await d.json()),a(null)}catch(d){a(d instanceof Error?d.message:"Failed to fetch todos")}finally{s(!1)}},[]);return y.useEffect(()=>{c()},[c]),Uf(d=>{d.type==="todos-updated"&&c()}),{data:e,loading:n,error:i,refetch:c}}async function Pv(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t,tags:n})})}async function Av(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:"Completed."})})}async function Dv(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/block`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:n})})}async function Lv(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:n})})}async function Iv(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function cN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function dN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const Ba={pending:{label:"Pending",description:"Waiting to start or waiting on dependencies.",className:"border-slate-300 bg-slate-100 text-slate-700 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300",icon:_j},in_progress:{label:"In Progress",description:"Actively being worked on.",className:"border-teal-300 bg-teal-100 text-teal-700 dark:border-teal-800 dark:bg-teal-950 dark:text-teal-300",icon:av},blocked:{label:"Blocked",description:"Blocked by an explicit obstacle that needs intervention.",className:"border-amber-300 bg-amber-100 text-amber-800 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-300",icon:Jd},review:{label:"Review",description:"Ready for inspection or approval.",className:"border-violet-300 bg-violet-100 text-violet-800 dark:border-violet-800 dark:bg-violet-950 dark:text-violet-300",icon:nC},completed:{label:"Completed",description:"Finished successfully.",className:"border-emerald-300 bg-emerald-100 text-emerald-800 dark:border-emerald-800 dark:bg-emerald-950 dark:text-emerald-300",icon:sv},failed:{label:"Failed",description:"Could not be completed as planned.",className:"border-rose-300 bg-rose-100 text-rose-800 dark:border-rose-800 dark:bg-rose-950 dark:text-rose-300",icon:Jd},active:{label:"Active",description:"The mission has active or review work in flight.",className:"border-teal-300 bg-teal-100 text-teal-700 dark:border-teal-800 dark:bg-teal-950 dark:text-teal-300",icon:Zd},stopped:{label:"Stopped",description:"Session ended without completing.",className:"border-slate-300 bg-slate-100 text-slate-700 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300",icon:Oj},archived:{label:"Archived",description:"Archived by a human override.",className:"border-zinc-300 bg-zinc-100 text-zinc-700 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300",icon:Zd}};function Ft({status:e,className:t,showIcon:n=!0}){const s=Ba[e]??{label:e.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase()),description:`Status: ${e}`,className:"border-slate-300 bg-slate-100 text-slate-600 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-400",icon:Zd},i=s.icon;return l.jsxs("span",{title:s.description,className:$e("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold tracking-wide",s.className,t),children:[n?l.jsx(i,{className:"h-3.5 w-3.5"}):null,l.jsx("span",{children:s.label})]})}function Ov(e){var t;return((t=Ba[e])==null?void 0:t.description)??`Status: ${e}`}const fN={default:"border-border/70 bg-card/90",info:"border-teal-200 bg-teal-50 dark:border-teal-900 dark:bg-teal-950/40",warn:"border-amber-200 bg-amber-50 dark:border-amber-900 dark:bg-amber-950/40",danger:"border-rose-200 bg-rose-50 dark:border-rose-900 dark:bg-rose-950/40",success:"border-emerald-200 bg-emerald-50 dark:border-emerald-900 dark:bg-emerald-950/40"};function tt({label:e,value:t,description:n,icon:s,tone:i="default",to:a}){const c=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),l.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),s?l.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:l.jsx(s,{className:"h-5 w-5"})}):null]}),n?l.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=$e("rounded-lg border p-3 shadow-sm",fN[i],a?"block transition hover:-translate-y-0.5 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40":"");return a?l.jsx(we,{to:a,className:d,children:c}):l.jsx("article",{className:d,children:c})}function Le({title:e,description:t,children:n,className:s,actions:i}){return l.jsxs("section",{className:$e("surface-panel space-y-3",s),children:[e||i?l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[e?l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,t?l.jsx("p",{className:"text-sm text-muted-foreground",children:t}):null]}),i]}):null,n]})}function kt({label:e="Loading dashboard data…"}){return l.jsx("div",{className:"flex min-h-[240px] items-center justify-center",children:l.jsx("div",{className:"rounded-lg border border-border/70 bg-card/90 px-4 py-3 shadow-sm",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:e})})})}function St({title:e="Something went wrong",error:t,action:n}){return l.jsx("div",{className:"rounded-lg border border-rose-200 bg-rose-50 px-4 py-5 dark:border-rose-900 dark:bg-rose-950/30",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-lg font-semibold text-rose-800 dark:text-rose-200",children:e}),l.jsx("p",{className:"text-sm leading-6 text-rose-700 dark:text-rose-300",children:t}),n?l.jsx("div",{className:"pt-2",children:n}):null]})})}function xt({title:e,description:t,actions:n}){return l.jsx("div",{className:"rounded-lg border border-dashed border-border/80 bg-muted/30 px-4 py-6 text-center",children:l.jsxs("div",{className:"mx-auto max-w-xl space-y-2",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:e}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:t}),n?l.jsx("div",{className:"flex flex-wrap justify-center gap-3 pt-2",children:n}):null]})})}function La({command:e,description:t,example:n}){return l.jsxs("div",{className:"rounded-lg border border-border/70 bg-slate-950 px-3 py-3 text-slate-100 shadow-sm",children:[l.jsx("code",{className:"block overflow-x-auto font-mono text-sm",children:e}),t?l.jsx("p",{className:"mt-2 text-sm text-slate-300",children:t}):null,n?l.jsx("p",{className:"mt-2 font-mono text-xs text-slate-400",children:n}):null]})}function pN({help:e,compact:t=!1}){const n=t?(e==null?void 0:e.firstMissionChecklist.slice(0,3))??[]:(e==null?void 0:e.firstMissionChecklist)??[];return l.jsx(Le,{title:t?"Getting Started Refresher":"Getting Started",description:t?"A fast reminder of the real flow for creating and running work in Syntaur.":"A first-run checklist that maps to the current CLI and dashboard flow.",actions:l.jsx(we,{className:"text-sm font-semibold text-primary hover:underline",to:"/help",children:"Open full help"}),children:l.jsx("div",{className:"space-y-3",children:n.map((s,i)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:s.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:s.detail}),s.command?l.jsx(La,{command:s.command.command,example:s.command.example}):null]})]})},s.title))})})}function hN(){var c;const{data:e,loading:t,error:n}=YC(),{data:s}=Cv(),{data:i}=Tv(),a=i!=null&&i.workspaces?i.workspaces.reduce((d,p)=>d+p.counts.open+p.counts.in_progress,0):0;return t?l.jsx(kt,{label:"Loading overview…"}):n||!e?l.jsx(St,{error:n||"Overview data is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(160px,1fr))]",children:[l.jsx(tt,{label:"Active Missions",value:e.stats.activeMissions,icon:$f,to:"/missions"}),l.jsx(tt,{label:"In Progress",value:e.stats.inProgressAssignments,icon:Wj,tone:"info",to:"/assignments?status=in_progress"}),l.jsx(tt,{label:"Blocked",value:e.stats.blockedAssignments,icon:el,tone:"warn",to:"/assignments?status=blocked"}),l.jsx(tt,{label:"Review",value:e.stats.reviewAssignments,icon:Mj,tone:"info",to:"/assignments?status=review"}),l.jsx(tt,{label:"Failed",value:e.stats.failedAssignments,icon:Zj,tone:"danger",to:"/assignments?status=failed"}),l.jsx(tt,{label:"Stale",value:e.stats.staleAssignments,icon:ru,to:"/assignments?stale=1"}),l.jsx(tt,{label:"Open Todos",value:a,icon:br,to:"/todos"}),l.jsx(tt,{label:"Active Servers",value:e.serverStats?e.serverStats.aliveSessions:"…",description:e.serverStats?`${e.serverStats.totalPorts} ports · ${e.serverStats.deadSessions>0?`${e.serverStats.deadSessions} dead`:"all healthy"}`:"connecting",icon:zf,tone:(c=e.serverStats)!=null&&c.deadSessions?"warn":"default",to:"/servers"})]}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx(Le,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?l.jsx(xt,{title:"Nothing urgent right now",description:"The attention queue is empty. Overview will surface blocked, failed, review, and stale assignments here."}):l.jsx("div",{className:"space-y-3",children:e.attention.map(d=>l.jsxs(we,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40 hover:bg-background",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:d.assignmentTitle}),l.jsx("p",{className:"text-sm text-muted-foreground",children:d.missionTitle})]}),l.jsx(Ft,{status:d.status})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:d.reason}),l.jsxs("p",{className:"mt-2 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:["Updated ",Rn(d.updated)]})]},d.id))})}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(Le,{title:"Recently Updated Missions",children:e.recentMissions.length===0?l.jsx(xt,{title:"No missions yet",description:"Create your first mission to populate the mission directory, recent activity, and attention queue.",actions:l.jsx(we,{className:"shell-action bg-foreground text-background hover:opacity-90",to:"/create/mission",children:"Create Mission"})}):l.jsx("div",{className:"space-y-3",children:e.recentMissions.map(d=>l.jsx(we,{to:`/missions/${d.slug}`,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-semibold text-foreground",children:d.title}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:Rn(d.updated)})]}),l.jsx(Ft,{status:d.status})]})},d.slug))})}),l.jsx(Le,{title:"Recent Activity",children:e.recentActivity.length===0?l.jsx(xt,{title:"No activity yet",description:"Once missions and assignments exist, Overview will show activity based on parsed source timestamps instead of file mtimes."}):l.jsx("div",{className:"space-y-3",children:e.recentActivity.map(d=>l.jsxs(we,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-semibold text-foreground",children:d.title}),l.jsx("p",{className:"text-sm text-muted-foreground",children:d.summary})]}),l.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:rn(d.type)})]}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Rn(d.updated)})]},d.id))})})]})]}),e.firstRun&&l.jsx(pN,{help:s})]})]})}function mN(){const{data:e,loading:t,error:n}=QC();return t?l.jsx(kt,{label:"Loading attention queue…"}):n||!e?l.jsx(St,{error:n||"Attention queue is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[l.jsx(tt,{label:"Critical",value:e.summary.critical,icon:Hj,tone:"danger"}),l.jsx(tt,{label:"High",value:e.summary.high,icon:el,tone:"warn"}),l.jsx(tt,{label:"Medium",value:e.summary.medium,icon:iC,tone:"info"}),l.jsx(tt,{label:"Low",value:e.summary.low,icon:Gj})]}),l.jsx(Le,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?l.jsx(xt,{title:"Attention queue is clear",description:"No blocked, failed, review, or stale assignments are currently surfacing from the source files."}):l.jsx("div",{className:"space-y-3",children:e.items.map(s=>l.jsxs(we,{to:s.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:s.assignmentTitle}),l.jsx("p",{className:"text-sm text-muted-foreground",children:s.missionTitle})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:s.severity}),l.jsx(Ft,{status:s.status})]})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:s.reason}),l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",Rn(s.updated)]})]},s.id))})})]})}function gN({term:e,description:t}){return l.jsx("span",{title:t,className:"cursor-help rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-foreground underline decoration-dotted underline-offset-4",children:e})}function xN(){const{data:e,loading:t,error:n}=Cv();return t?l.jsx(kt,{label:"Loading help…"}):n||!e?l.jsx(St,{error:n||"Help content is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsx(Le,{title:"What Syntaur Is",description:e.whatIsSyntaur.summary,children:l.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:e.whatIsSyntaur.bullets.map(s=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3 text-sm leading-6 text-muted-foreground",children:s},s))})}),l.jsx(Le,{title:"Getting Started",children:l.jsx("div",{className:"space-y-3",children:e.workflow.map((s,i)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:s.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:s.detail}),s.command?l.jsx(La,{command:s.command.command,description:s.command.description,example:s.command.example}):null,s.href?l.jsx(we,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:s.href,children:"Open the related surface"}):null]})]})},s.title))})}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsxs(Le,{title:"Core Concepts",children:[l.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(s=>l.jsx(gN,{term:s.term,description:s.description},s.term))}),l.jsx("div",{className:"grid gap-3 pt-2",children:e.coreConcepts.map(s=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:s.term}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:s.description})]},s.term))})]}),l.jsx(Le,{title:"Status Guide",children:l.jsx("div",{className:"space-y-3",children:e.statusGuide.map(s=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Ft,{status:s.status}),l.jsx("p",{className:"font-semibold text-foreground",children:s.meaning})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:s.useWhen})]},s.status))})})]}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsx(Le,{title:"Ownership And File Rules",children:l.jsx("div",{className:"space-y-3",children:e.ownershipRules.map(s=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:s.label}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:s.description}),l.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:s.files.map(i=>l.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 font-mono text-xs text-foreground",children:i},i))})]},s.label))})}),l.jsx(Le,{title:"How To Navigate The Dashboard",children:l.jsx("div",{className:"space-y-3",children:e.navigation.map(s=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:s.label}),l.jsx(we,{className:"text-sm font-semibold text-primary hover:underline",to:s.href,children:"Open"})]}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:s.description})]},s.label))})})]}),l.jsx(Le,{title:"CLI Quick Reference",children:l.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(s=>l.jsx(La,{command:s.command,description:s.description,example:s.example},s.command))})}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsx(Le,{title:"FAQ",children:l.jsx("div",{className:"space-y-3",children:e.faq.map(s=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:s.question}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:s.answer})]},s.question))})}),l.jsx(Le,{title:"First Mission Checklist",children:l.jsx("div",{className:"space-y-3",children:e.firstMissionChecklist.map((s,i)=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:s.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:s.detail}),s.command?l.jsx(La,{command:s.command.command,example:s.command.example}):null,s.href?l.jsx(we,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:s.href,children:"Open the related surface"}):null]})]})},s.title))})})]})]})}function Vf({children:e}){return l.jsx("div",{className:"flex flex-col gap-2 rounded-lg border border-border/60 bg-card/80 p-2.5 shadow-sm md:flex-row md:flex-wrap md:items-center",children:e})}function qf({value:e,onChange:t,placeholder:n="Search"}){return l.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[l.jsx(su,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),l.jsx("input",{value:e,onChange:s=>t(s.target.value),placeholder:n,className:"h-9 w-full rounded-md border border-border/60 bg-background/90 pl-9 pr-3 text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30"})]})}function Gf({value:e,options:t,onChange:n}){return l.jsx("div",{className:"inline-flex rounded-md border border-border/60 bg-background/80 p-1",children:t.map(s=>l.jsx("button",{type:"button",onClick:()=>n(s.value),className:$e("rounded-sm px-2.5 py-1.5 text-sm font-medium transition",e===s.value?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),children:s.label},s.value))})}function Mv({columns:e,items:t,getItemId:n,getColumnId:s,renderCard:i,canDrop:a,onMove:c,emptyMessage:d="No cards in this column."}){const[p,h]=y.useState(null),[m,x]=y.useState(null),w=y.useRef(null),b=y.useMemo(()=>new Map(t.map(_=>[n(_),_])),[n,t]),E=y.useMemo(()=>e.map(_=>({column:_,items:t.filter(N=>s(N)===_.id)})),[e,s,t]),k=p?b.get(p)??null:null;function j(_){if(!k)return{allowed:!1};const N=s(k);return(a==null?void 0:a({item:k,fromColumnId:N,toColumnId:_}))??{allowed:!0}}function S(){h(null),x(null)}function D(_,N){c&&(_.dataTransfer.effectAllowed="move",_.dataTransfer.setData("text/plain",N),h(N))}function A(_,N,P){!c||!k||!j(N).allowed||(_.preventDefault(),_.dataTransfer.dropEffect="move",x(q=>(q==null?void 0:q.columnId)===N&&q.index===P?q:{columnId:N,index:P}))}async function M(_,N,P){var B;if(_.preventDefault(),!c||!k){S();return}const z=s(k),T=(((B=E.find(W=>W.column.id===z))==null?void 0:B.items)??[]).findIndex(W=>n(W)===n(k));if(!j(N).allowed||T<0){S();return}if(z===N&&(P===T||P===T+1)){S();return}try{await c({item:k,fromColumnId:z,toColumnId:N,fromIndex:T,toIndex:P})}finally{S()}}return l.jsx("div",{className:"relative overflow-x-auto pb-2",style:{scrollbarColor:"hsl(var(--border)) transparent",scrollbarWidth:"thin"},children:l.jsx("div",{className:"grid min-w-max auto-cols-[minmax(260px,320px)] grid-flow-col gap-4",children:E.map(({column:_,items:N})=>{const P=j(_.id),z=(m==null?void 0:m.columnId)===_.id;return l.jsxs("section",{className:$e("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",k&&!P.allowed?"border-dashed opacity-65":"",k&&P.allowed?"border-primary/30 bg-accent/30":"",z?"ring-2 ring-ring/30":""),title:k&&!P.allowed?P.reason:void 0,children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:_.title}),_.description?l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:_.description}):null]}),l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs font-semibold text-foreground",children:N.length})]}),l.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:q=>A(q,_.id,N.length),onDrop:q=>M(q,_.id,N.length),children:[N.length===0?l.jsx(yN,{active:(m==null?void 0:m.columnId)===_.id&&m.index===0,disabled:!!k&&!P.allowed,children:typeof d=="function"?d(_):d}):null,N.map((q,T)=>{const I=n(q),B=p===I;return l.jsxs(y.Fragment,{children:[l.jsx("div",{className:$e("h-2 rounded-full transition",(m==null?void 0:m.columnId)===_.id&&m.index===T?"bg-primary/70":"bg-transparent"),onDragOver:W=>A(W,_.id,T),onDrop:W=>M(W,_.id,T)}),l.jsx("div",{draggable:!!c,onMouseDown:W=>{w.current=W.target},onDragStart:W=>{const J=w.current;if(J!=null&&J.closest("a, button")){W.preventDefault();return}D(W,I)},onDragEnd:S,className:$e("transition",c?"cursor-grab active:cursor-grabbing":"",B?"scale-[0.98] opacity-50":""),children:i(q,{dragging:B})})]},I)}),N.length>0?l.jsx("div",{className:$e("mt-1 rounded-md border border-dashed px-3 py-2 text-center text-xs text-muted-foreground transition",(m==null?void 0:m.columnId)===_.id&&m.index===N.length?"border-primary/50 bg-primary/10 text-foreground":"border-border/60",k&&!P.allowed?"opacity-40":""),children:"Drop here to place at the end"}):null]})]},_.id)})})})}function yN({active:e,disabled:t,children:n}){return l.jsx("div",{className:$e("flex min-h-[128px] items-center justify-center rounded-lg border border-dashed px-4 text-center text-sm text-muted-foreground transition",e?"border-primary/60 bg-primary/10 text-foreground":"border-border/60 bg-background/50",t?"opacity-45":""),children:n})}const _v={statuses:[{id:"pending",label:"Pending"},{id:"in_progress",label:"In Progress"},{id:"blocked",label:"Blocked"},{id:"review",label:"Review"},{id:"completed",label:"Completed"},{id:"failed",label:"Failed"}],order:["pending","in_progress","blocked","review","completed","failed"],transitions:[],custom:!1};let Li=null,Fs=null;function vN(){return Li?Promise.resolve(Li):Fs||(Fs=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(Li=e,Fs=null,e)).catch(()=>(Fs=null,_v)),Fs)}function ou(){const[e,t]=y.useState(()=>Li??_v);return y.useEffect(()=>{vN().then(t)},[]),e}function Fg(){Li=null,Fs=null}function bN(e,t){const n=e.statuses.find(s=>s.id===t);return(n==null?void 0:n.label)??t.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase())}const wN={completed:"bg-emerald-500",in_progress:"bg-sky-500",review:"bg-violet-500",blocked:"bg-amber-500",failed:"bg-rose-500",pending:"bg-slate-400"},Bg=["bg-cyan-500","bg-indigo-500","bg-orange-500","bg-pink-500","bg-lime-500","bg-fuchsia-500"];function Ua({progress:e,className:t,showLegend:n=!1}){const s=ou(),i=y.useMemo(()=>{let c=0;return(s.order.length>0?s.order:Object.keys(e).filter(p=>p!=="total")).map(p=>({key:p,className:wN[p]??Bg[c++%Bg.length]}))},[s.order,e]),a=i.filter(c=>(e[c.key]??0)>0);return l.jsxs("div",{className:$e("space-y-2",t),children:[l.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?l.jsx("div",{className:"h-full w-full bg-muted"}):a.map(c=>l.jsx("div",{className:c.className,style:{width:`${(e[c.key]??0)/e.total*100}%`},title:`${rn(c.key)}: ${e[c.key]??0}`},c.key))}),n?l.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(c=>l.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[l.jsx("span",{className:$e("h-2 w-2 rounded-full",c.className)}),l.jsx("span",{children:rn(c.key)}),l.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const kN=["pending","active","blocked","failed","completed","archived"],Kf=kN,SN=["pending","in_progress","blocked","review","completed","failed"];function jN(e){return e&&e.length>0?e:[...SN]}function CN(e,t,n){if(t<0||t>=e.length)return e;const s=[...e],[i]=s.splice(t,1),a=t<n?n-1:n;return s.splice(Math.max(0,Math.min(a,s.length)),0,i),s}function Ug(){const{workspace:e}=Pt(),t=At(),{data:n,loading:s,error:i}=Hf(),[a,c]=y.useState(""),[d,p]=y.useState("all"),[h,m]=y.useState("active"),[x,w]=y.useState("all"),[b,E]=y.useState("updated"),[k,j]=Of(),S=k.get("view"),D=S==="table"||S==="kanban"?S:"cards",A=T=>{j(I=>{const B=new URLSearchParams(I);return T==="cards"?B.delete("view"):B.set("view",T),B})},[M,_]=y.useState({}),N=y.useMemo(()=>n?n.filter(T=>{if(e){if(e==="_ungrouped"){if(T.workspace!==null)return!1}else if(T.workspace!==e)return!1}return h==="active"&&T.archived||h==="archived"&&!T.archived||d!=="all"&&T.status!==d||x!=="all"&&!T.tags.includes(x)?!1:a.trim()?`${T.title} ${T.tags.join(" ")} ${T.slug}`.toLowerCase().includes(a.toLowerCase()):!0}).sort((T,I)=>RN(T,I,b)):[],[n,a,d,h,x,b,e]),P=N.map(T=>`${T.slug}:${T.status}`).join("|");y.useEffect(()=>{_(TN(N))},[P,b]);const z=y.useMemo(()=>{const T=new Map(N.map(I=>[I.slug,I]));return Kf.flatMap(I=>(M[I]??N.filter(W=>W.status===I).map(W=>W.slug)).map(W=>T.get(W)).filter(W=>!!W))},[N,M]);if(s)return l.jsx(kt,{label:"Loading missions…"});if(i||!n)return l.jsx(St,{error:i||"Mission list is unavailable."});const q=Array.from(new Set(n.flatMap(T=>T.tags))).sort();return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(Vf,{children:[l.jsx(qf,{value:a,onChange:c,placeholder:"Search by mission title or tag"}),l.jsxs("select",{value:d,onChange:T=>p(T.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),l.jsx("option",{value:"pending",children:"Pending"}),l.jsx("option",{value:"active",children:"Active"}),l.jsx("option",{value:"blocked",children:"Blocked"}),l.jsx("option",{value:"failed",children:"Failed"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"archived",children:"Archived"})]}),l.jsxs("select",{value:h,onChange:T=>m(T.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"active",children:"Hide archived"}),l.jsx("option",{value:"all",children:"All missions"}),l.jsx("option",{value:"archived",children:"Archived only"})]}),l.jsxs("select",{value:x,onChange:T=>w(T.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All tags"}),q.map(T=>l.jsx("option",{value:T,children:T},T))]}),l.jsxs("select",{value:b,onChange:T=>E(T.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"updated",children:"Sort: Updated"}),l.jsx("option",{value:"created",children:"Sort: Created"}),l.jsx("option",{value:"title",children:"Sort: Title"}),l.jsx("option",{value:"attention",children:"Sort: Attention"})]}),l.jsx(Gf,{value:D,onChange:T=>A(T),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),N.length===0?l.jsx(xt,{title:n.length===0?"No missions yet":"No missions match these filters",description:n.length===0?"A mission is the high-level objective that groups assignments, resources, and memories. Create one to start the dashboard flow.":"Adjust the current search and filters or create a new mission.",actions:l.jsx(we,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/create/mission`,children:"Create Mission"})}):D==="cards"?l.jsx("div",{className:"grid gap-3 lg:grid-cols-2 2xl:grid-cols-3",children:N.map(T=>l.jsxs(we,{to:`${t}/missions/${T.slug}`,className:"block rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm transition hover:border-primary/40 hover:shadow-md",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:T.title}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Br(T.updated)]})]}),l.jsx(Ft,{status:T.status})]}),l.jsxs("div",{className:"mt-4 space-y-3",children:[l.jsx(Ua,{progress:T.progress,showLegend:!0}),l.jsx("div",{className:"flex flex-wrap gap-2",children:T.tags.map(I=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:I},I))}),l.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("p",{className:"text-muted-foreground",children:"Needs attention"}),l.jsx("p",{className:"mt-1 font-semibold text-foreground",children:T.needsAttention.blockedCount+T.needsAttention.failedCount})]}),l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("p",{className:"text-muted-foreground",children:"Assignments"}),l.jsx("p",{className:"mt-1 font-semibold text-foreground",children:T.progress.total})]})]})]})]},T.slug))}):D==="table"?l.jsx(Le,{title:`${N.length} mission${N.length===1?"":"s"}`,children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx("th",{className:"pb-3 font-medium",children:"Mission"}),l.jsx("th",{className:"pb-3 font-medium",children:"Status"}),l.jsx("th",{className:"pb-3 font-medium",children:"Progress"}),l.jsx("th",{className:"pb-3 font-medium",children:"Attention"}),l.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),l.jsx("tbody",{children:N.map(T=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(we,{to:`${t}/missions/${T.slug}`,className:"font-semibold text-foreground hover:text-primary",children:T.title}),l.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:T.tags.map(I=>l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:I},I))})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx(Ft,{status:T.status})}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("div",{className:"min-w-[220px]",children:l.jsx(Ua,{progress:T.progress})})}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:T.needsAttention.blockedCount+T.needsAttention.failedCount}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Br(T.updated)})]},T.slug))})]})})}):l.jsx(Mv,{columns:EN,items:z,getItemId:T=>T.slug,getColumnId:T=>T.status,canDrop:({fromColumnId:T,toColumnId:I})=>({allowed:!0,reason:T===I?void 0:"This will set a manual status override on the mission."}),onMove:({item:T,fromColumnId:I,toColumnId:B,fromIndex:W,toIndex:J})=>{if(I===B){const G=M[I]??N.filter(te=>te.status===I).map(te=>te.slug);_(te=>({...te,[I]:CN(G,W,J)}));return}fetch(`/api/missions/${T.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:B})}).then(()=>{window.location.reload()})},emptyMessage:T=>`No ${T.title.toLowerCase()} missions.`,renderCard:(T,{dragging:I})=>l.jsx(PN,{mission:T,dragging:I})}),l.jsx("div",{className:"rounded-lg border border-border/60 bg-card/80 p-3 text-sm text-muted-foreground",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(lv,{className:"mt-0.5 h-4 w-4"}),l.jsxs("p",{children:["Mission status is derived from assignment state by default.",D==="kanban"?" Drag missions between columns or use":" Use"," the status override on the mission detail page to set a manual status."]})]})})]})}const NN={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},EN=Kf.map(e=>({id:e,title:NN[e],description:Ov(e)}));function RN(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return Hg(t)-Hg(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function Hg(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.unansweredQuestions}function TN(e){return Object.fromEntries(Kf.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function PN({mission:e,dragging:t}){const n=At();return l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(we,{to:`${n}/missions/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Br(e.updated)]})]}),l.jsx(Ft,{status:e.status})]}),l.jsx("div",{className:"mt-4",children:l.jsx(Ua,{progress:e.progress})}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.tags.map(s=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:s},s)),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.progress.total," assignments"]}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.needsAttention.blockedCount+e.needsAttention.failedCount," needs attention"]})]}),l.jsx("div",{className:"mt-4 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:t?"Reordering within status":"Derived mission lane"})]})}function vs({value:e}){const[t,n]=y.useState(!1);function s(){navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}return l.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-foreground",title:t?"Copied!":`Copy: ${e}`,children:t?l.jsx(Mf,{className:"h-3 w-3 text-green-500"}):l.jsx(_f,{className:"h-3 w-3"})})}function st(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function AN(e,t){const n=y.createContext(t),s=a=>{const{children:c,...d}=a,p=y.useMemo(()=>d,Object.values(d));return l.jsx(n.Provider,{value:p,children:c})};s.displayName=e+"Provider";function i(a){const c=y.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[s,i]}function Ws(e,t=[]){let n=[];function s(a,c){const d=y.createContext(c),p=n.length;n=[...n,c];const h=x=>{var S;const{scope:w,children:b,...E}=x,k=((S=w==null?void 0:w[e])==null?void 0:S[p])||d,j=y.useMemo(()=>E,Object.values(E));return l.jsx(k.Provider,{value:j,children:b})};h.displayName=a+"Provider";function m(x,w){var k;const b=((k=w==null?void 0:w[e])==null?void 0:k[p])||d,E=y.useContext(b);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${a}\``)}return[h,m]}const i=()=>{const a=n.map(c=>y.createContext(c));return function(d){const p=(d==null?void 0:d[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[s,DN(i,...t)]}function DN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const c=s.reduce((d,{useScope:p,scopeName:h})=>{const x=p(a)[`__scope${h}`];return{...d,...x}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Wg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function iu(...e){return t=>{let n=!1;const s=e.map(i=>{const a=Wg(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():Wg(e[i],null)}}}}function Qt(...e){return y.useCallback(iu(...e),e)}function Vg(e){const t=LN(e),n=y.forwardRef((s,i)=>{const{children:a,...c}=s,d=y.Children.toArray(a),p=d.find(ON);if(p){const h=p.props.children,m=d.map(x=>x===p?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...c,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function LN(e){const t=y.forwardRef((n,s)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=_N(i),d=MN(a,i.props);return i.type!==y.Fragment&&(d.ref=s?iu(s,c):c),y.cloneElement(i,d)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var IN=Symbol("radix.slottable");function ON(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===IN}function MN(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function _N(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $N(e){const t=e+"CollectionProvider",[n,s]=Ws(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=k=>{const{scope:j,children:S}=k,D=ft.useRef(null),A=ft.useRef(new Map).current;return l.jsx(i,{scope:j,itemMap:A,collectionRef:D,children:S})};c.displayName=t;const d=e+"CollectionSlot",p=Vg(d),h=ft.forwardRef((k,j)=>{const{scope:S,children:D}=k,A=a(d,S),M=Qt(j,A.collectionRef);return l.jsx(p,{ref:M,children:D})});h.displayName=d;const m=e+"CollectionItemSlot",x="data-radix-collection-item",w=Vg(m),b=ft.forwardRef((k,j)=>{const{scope:S,children:D,...A}=k,M=ft.useRef(null),_=Qt(j,M),N=a(m,S);return ft.useEffect(()=>(N.itemMap.set(M,{ref:M,...A}),()=>void N.itemMap.delete(M))),l.jsx(w,{[x]:"",ref:_,children:D})});b.displayName=m;function E(k){const j=a(e+"CollectionConsumer",k);return ft.useCallback(()=>{const D=j.collectionRef.current;if(!D)return[];const A=Array.from(D.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((N,P)=>A.indexOf(N.ref.current)-A.indexOf(P.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:h,ItemSlot:b},E,s]}var bs=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},zN=Ly[" useId ".trim().toString()]||(()=>{}),FN=0;function So(e){const[t,n]=y.useState(zN());return bs(()=>{n(s=>s??String(FN++))},[e]),t?`radix-${t}`:""}function BN(e){const t=UN(e),n=y.forwardRef((s,i)=>{const{children:a,...c}=s,d=y.Children.toArray(a),p=d.find(WN);if(p){const h=p.props.children,m=d.map(x=>x===p?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...c,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function UN(e){const t=y.forwardRef((n,s)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=qN(i),d=VN(a,i.props);return i.type!==y.Fragment&&(d.ref=s?iu(s,c):c),y.cloneElement(i,d)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var HN=Symbol("radix.slottable");function WN(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HN}function VN(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function qN(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var GN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jt=GN.reduce((e,t)=>{const n=BN(`Primitive.${t}`),s=y.forwardRef((i,a)=>{const{asChild:c,...d}=i,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(p,{...d,ref:a})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function KN(e,t){e&&ys.flushSync(()=>e.dispatchEvent(t))}function Bs(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}var YN=Ly[" useInsertionEffect ".trim().toString()]||bs;function lu({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,a,c]=XN({defaultProp:t,onChange:n}),d=e!==void 0,p=d?e:i;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const x=m.current;x!==d&&console.warn(`${s} is changing from ${x?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=d},[d,s])}const h=y.useCallback(m=>{var x;if(d){const w=QN(m)?m(e):m;w!==e&&((x=c.current)==null||x.call(c,w))}else a(m)},[d,e,a,c]);return[p,h]}function XN({defaultProp:e,onChange:t}){const[n,s]=y.useState(e),i=y.useRef(n),a=y.useRef(t);return YN(()=>{a.current=t},[t]),y.useEffect(()=>{var c;i.current!==n&&((c=a.current)==null||c.call(a,n),i.current=n)},[n,i]),[n,s,a]}function QN(e){return typeof e=="function"}var JN=y.createContext(void 0);function $v(e){const t=y.useContext(JN);return e||t||"ltr"}var vd="rovingFocusGroup.onEntryFocus",ZN={bubbles:!1,cancelable:!0},tl="RovingFocusGroup",[rf,zv,e2]=$N(tl),[t2,Fv]=Ws(tl,[e2]),[n2,r2]=t2(tl),Bv=y.forwardRef((e,t)=>l.jsx(rf.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(rf.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(s2,{...e,ref:t})})}));Bv.displayName=tl;var s2=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:i=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...x}=e,w=y.useRef(null),b=Qt(t,w),E=$v(a),[k,j]=lu({prop:c,defaultProp:d??null,onChange:p,caller:tl}),[S,D]=y.useState(!1),A=Bs(h),M=zv(n),_=y.useRef(!1),[N,P]=y.useState(0);return y.useEffect(()=>{const z=w.current;if(z)return z.addEventListener(vd,A),()=>z.removeEventListener(vd,A)},[A]),l.jsx(n2,{scope:n,orientation:s,dir:E,loop:i,currentTabStopId:k,onItemFocus:y.useCallback(z=>j(z),[j]),onItemShiftTab:y.useCallback(()=>D(!0),[]),onFocusableItemAdd:y.useCallback(()=>P(z=>z+1),[]),onFocusableItemRemove:y.useCallback(()=>P(z=>z-1),[]),children:l.jsx(jt.div,{tabIndex:S||N===0?-1:0,"data-orientation":s,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:st(e.onMouseDown,()=>{_.current=!0}),onFocus:st(e.onFocus,z=>{const q=!_.current;if(z.target===z.currentTarget&&q&&!S){const T=new CustomEvent(vd,ZN);if(z.currentTarget.dispatchEvent(T),!T.defaultPrevented){const I=M().filter(te=>te.focusable),B=I.find(te=>te.active),W=I.find(te=>te.id===k),G=[B,W,...I].filter(Boolean).map(te=>te.ref.current);Wv(G,m)}}_.current=!1}),onBlur:st(e.onBlur,()=>D(!1))})})}),Uv="RovingFocusGroupItem",Hv=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:i=!1,tabStopId:a,children:c,...d}=e,p=So(),h=a||p,m=r2(Uv,n),x=m.currentTabStopId===h,w=zv(n),{onFocusableItemAdd:b,onFocusableItemRemove:E,currentTabStopId:k}=m;return y.useEffect(()=>{if(s)return b(),()=>E()},[s,b,E]),l.jsx(rf.ItemSlot,{scope:n,id:h,focusable:s,active:i,children:l.jsx(jt.span,{tabIndex:x?0:-1,"data-orientation":m.orientation,...d,ref:t,onMouseDown:st(e.onMouseDown,j=>{s?m.onItemFocus(h):j.preventDefault()}),onFocus:st(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:st(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){m.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const S=l2(j,m.orientation,m.dir);if(S!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let A=w().filter(M=>M.focusable).map(M=>M.ref.current);if(S==="last")A.reverse();else if(S==="prev"||S==="next"){S==="prev"&&A.reverse();const M=A.indexOf(j.currentTarget);A=m.loop?a2(A,M+1):A.slice(M+1)}setTimeout(()=>Wv(A))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:k!=null}):c})})});Hv.displayName=Uv;var o2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function i2(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function l2(e,t,n){const s=i2(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return o2[s]}function Wv(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}function a2(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var u2=Bv,c2=Hv;function d2(e,t){return y.useReducer((n,s)=>t[n][s]??n,e)}var Vs=e=>{const{present:t,children:n}=e,s=f2(t),i=typeof n=="function"?n({present:s.isPresent}):y.Children.only(n),a=Qt(s.ref,p2(i));return typeof n=="function"||s.isPresent?y.cloneElement(i,{ref:a}):null};Vs.displayName="Presence";function f2(e){const[t,n]=y.useState(),s=y.useRef(null),i=y.useRef(e),a=y.useRef("none"),c=e?"mounted":"unmounted",[d,p]=d2(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=ya(s.current);a.current=d==="mounted"?h:"none"},[d]),bs(()=>{const h=s.current,m=i.current;if(m!==e){const w=a.current,b=ya(h);e?p("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?p("UNMOUNT"):p(m&&w!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),bs(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,x=b=>{const k=ya(s.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(p("ANIMATION_END"),!i.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},w=b=>{b.target===t&&(a.current=ya(s.current))};return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:y.useCallback(h=>{s.current=h?getComputedStyle(h):null,n(h)},[])}}function ya(e){return(e==null?void 0:e.animationName)||"none"}function p2(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var au="Tabs",[h2]=Ws(au,[Fv]),Vv=Fv(),[m2,Yf]=h2(au),qv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:d,activationMode:p="automatic",...h}=e,m=$v(d),[x,w]=lu({prop:s,onChange:i,defaultProp:a??"",caller:au});return l.jsx(m2,{scope:n,baseId:So(),value:x,onValueChange:w,orientation:c,dir:m,activationMode:p,children:l.jsx(jt.div,{dir:m,"data-orientation":c,...h,ref:t})})});qv.displayName=au;var Gv="TabsList",Kv=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:s=!0,...i}=e,a=Yf(Gv,n),c=Vv(n);return l.jsx(u2,{asChild:!0,...c,orientation:a.orientation,dir:a.dir,loop:s,children:l.jsx(jt.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});Kv.displayName=Gv;var Yv="TabsTrigger",Xv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,disabled:i=!1,...a}=e,c=Yf(Yv,n),d=Vv(n),p=Zv(c.baseId,s),h=e0(c.baseId,s),m=s===c.value;return l.jsx(c2,{asChild:!0,...d,focusable:!i,active:m,children:l.jsx(jt.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":h,"data-state":m?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...a,ref:t,onMouseDown:st(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?c.onValueChange(s):x.preventDefault()}),onKeyDown:st(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(s)}),onFocus:st(e.onFocus,()=>{const x=c.activationMode!=="manual";!m&&!i&&x&&c.onValueChange(s)})})})});Xv.displayName=Yv;var Qv="TabsContent",Jv=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:i,children:a,...c}=e,d=Yf(Qv,n),p=Zv(d.baseId,s),h=e0(d.baseId,s),m=s===d.value,x=y.useRef(m);return y.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),l.jsx(Vs,{present:i||m,children:({present:w})=>l.jsx(jt.div,{"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!w,id:h,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:w&&a})})});Jv.displayName=Qv;function Zv(e,t){return`${e}-trigger-${t}`}function e0(e,t){return`${e}-content-${t}`}var g2=qv,x2=Kv,y2=Xv,v2=Jv;function t0({value:e,onValueChange:t,items:n,className:s}){return l.jsxs(g2,{value:e,onValueChange:t,className:s,children:[l.jsx(x2,{className:"scrollbar-none flex gap-2 overflow-x-auto rounded-md border border-border/70 bg-card/80 p-1",children:n.map(i=>l.jsxs(y2,{value:i.value,className:$e("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:[l.jsx("span",{children:i.label}),typeof i.count=="number"?l.jsx("span",{className:"rounded-full bg-background/20 px-2 py-0.5 text-xs data-[state=active]:bg-background/20",children:i.count}):null]},i.value))}),n.map(i=>l.jsx(v2,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const b2="modulepreload",w2=function(e){return"/"+e},qg={},k2=function(t,n,s){let i=Promise.resolve();if(n&&n.length>0){let c=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));i=c(n.map(h=>{if(h=w2(h),h in qg)return;qg[h]=!0;const m=h.endsWith(".css"),x=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${x}`))return;const w=document.createElement("link");if(w.rel=m?"stylesheet":b2,m||(w.as="script"),w.crossOrigin="",w.href=h,p&&w.setAttribute("nonce",p),document.head.appendChild(w),m)return new Promise((b,E)=>{w.addEventListener("load",b),w.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${h}`)))})}))}function a(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&a(d.reason);return t().catch(a)})};function S2({definition:e,className:t,nodeRoutes:n={}}){const s=y.useRef(null),[i,a]=y.useState(null),[c,d]=y.useState(!0),p=Hn(),h=document.documentElement.classList.contains("dark")?"dark":"default";return y.useEffect(()=>{let m=!1;async function x(){if(s.current)try{const w=(await k2(async()=>{const{default:k}=await import("./mermaid.core-DyEs-LPd.js").then(j=>j.bF);return{default:k}},[])).default;if(w.initialize({startOnLoad:!1,theme:h}),m)return;const b=`mermaid-${Date.now()}`,{svg:E}=await w.render(b,e);if(m||!s.current)return;s.current.innerHTML=E,j2(s.current,n,p),d(!1)}catch(w){m||(a(w instanceof Error?w.message:"Failed to render graph"),d(!1))}}return d(!0),a(null),x(),()=>{m=!0}},[e,p,n,h]),i?l.jsxs("div",{className:$e("rounded-lg border border-border bg-card p-4",t),children:[l.jsxs("p",{className:"text-sm text-red-400",children:["Failed to render dependency graph: ",i]}),l.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):l.jsxs("div",{className:$e("rounded-lg border border-border bg-card p-4",t),children:[c&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),l.jsx("div",{ref:s,className:"overflow-auto"})]})}function j2(e,t,n){var s;for(const i of e.querySelectorAll(".node")){const a=((s=i.textContent)==null?void 0:s.replace(/\s+/g," ").trim())??"",c=t[a];if(!c)continue;i.style.cursor="pointer",i.setAttribute("role","link"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",`Open ${a}`);const d=()=>n(c);i.addEventListener("click",d),i.addEventListener("keydown",p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d())})}}function C2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const N2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R2={};function Gg(e,t){return(R2.jsx?E2:N2).test(e)}const T2=/[ \t\n\f\r]/g;function P2(e){return typeof e=="object"?e.type==="text"?Kg(e.value):!1:Kg(e)}function Kg(e){return e.replace(T2,"")===""}class nl{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}nl.prototype.normal={};nl.prototype.property={};nl.prototype.space=void 0;function n0(e,t){const n={},s={};for(const i of e)Object.assign(n,i.property),Object.assign(s,i.normal);return new nl(n,s,t)}function sf(e){return e.toLowerCase()}class xn{constructor(t,n){this.attribute=n,this.property=t}}xn.prototype.attribute="";xn.prototype.booleanish=!1;xn.prototype.boolean=!1;xn.prototype.commaOrSpaceSeparated=!1;xn.prototype.commaSeparated=!1;xn.prototype.defined=!1;xn.prototype.mustUseProperty=!1;xn.prototype.number=!1;xn.prototype.overloadedBoolean=!1;xn.prototype.property="";xn.prototype.spaceSeparated=!1;xn.prototype.space=void 0;let A2=0;const Oe=qs(),wt=qs(),of=qs(),ue=qs(),Ye=qs(),jo=qs(),Nn=qs();function qs(){return 2**++A2}const lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:wt,commaOrSpaceSeparated:Nn,commaSeparated:jo,number:ue,overloadedBoolean:of,spaceSeparated:Ye},Symbol.toStringTag,{value:"Module"})),bd=Object.keys(lf);class Xf extends xn{constructor(t,n,s,i){let a=-1;if(super(t,n),Yg(this,"space",i),typeof s=="number")for(;++a<bd.length;){const c=bd[a];Yg(this,bd[a],(s&lf[c])===lf[c])}}}Xf.prototype.defined=!0;function Yg(e,t,n){n&&(e[t]=n)}function Mo(e){const t={},n={};for(const[s,i]of Object.entries(e.properties)){const a=new Xf(s,e.transform(e.attributes||{},s),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(a.mustUseProperty=!0),t[s]=a,n[sf(s)]=s,n[sf(a.attribute)]=s}return new nl(t,n,e.space)}const r0=Mo({properties:{ariaActiveDescendant:null,ariaAtomic:wt,ariaAutoComplete:null,ariaBusy:wt,ariaChecked:wt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Ye,ariaCurrent:null,ariaDescribedBy:Ye,ariaDetails:null,ariaDisabled:wt,ariaDropEffect:Ye,ariaErrorMessage:null,ariaExpanded:wt,ariaFlowTo:Ye,ariaGrabbed:wt,ariaHasPopup:null,ariaHidden:wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ye,ariaLevel:ue,ariaLive:null,ariaModal:wt,ariaMultiLine:wt,ariaMultiSelectable:wt,ariaOrientation:null,ariaOwns:Ye,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:wt,ariaReadOnly:wt,ariaRelevant:null,ariaRequired:wt,ariaRoleDescription:Ye,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:wt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function s0(e,t){return t in e?e[t]:t}function o0(e,t){return s0(e,t.toLowerCase())}const D2=Mo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:jo,acceptCharset:Ye,accessKey:Ye,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:Ye,autoFocus:Oe,autoPlay:Oe,blocking:Ye,capture:null,charSet:null,checked:Oe,cite:null,className:Ye,cols:ue,colSpan:null,content:null,contentEditable:wt,controls:Oe,controlsList:Ye,coords:ue|jo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:of,draggable:wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:Ye,height:ue,hidden:of,high:ue,href:null,hrefLang:null,htmlFor:Ye,httpEquiv:Ye,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:Ye,itemRef:Ye,itemScope:Oe,itemType:Ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oe,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Oe,muted:Oe,name:null,nonce:null,noModule:Oe,noValidate:Oe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Oe,optimum:ue,pattern:null,ping:Ye,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:Ye,required:Oe,reversed:Oe,rows:ue,rowSpan:ue,sandbox:Ye,scope:null,scoped:Oe,seamless:Oe,selected:Oe,shadowRootClonable:Oe,shadowRootDelegatesFocus:Oe,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:wt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Oe,useMap:null,value:wt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ye,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oe,declare:Oe,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Oe,noHref:Oe,noShade:Oe,noWrap:Oe,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:wt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Oe,disableRemotePlayback:Oe,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:o0}),L2=Mo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Nn,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Ye,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:jo,g2:jo,glyphName:jo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ue,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nn,rev:Nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nn,requiredFeatures:Nn,requiredFonts:Nn,requiredFormats:Nn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nn,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Nn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:s0}),i0=Mo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),l0=Mo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:o0}),a0=Mo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),I2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},O2=/[A-Z]/g,Xg=/-[a-z]/g,M2=/^data[-\w.:]+$/i;function _2(e,t){const n=sf(t);let s=t,i=xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&M2.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Xg,z2);s="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Xg.test(a)){let c=a.replace(O2,$2);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}i=Xf}return new i(s,t)}function $2(e){return"-"+e.toLowerCase()}function z2(e){return e.charAt(1).toUpperCase()}const F2=n0([r0,D2,i0,l0,a0],"html"),Qf=n0([r0,L2,i0,l0,a0],"svg");function B2(e){return e.join(" ").trim()}var go={},wd,Qg;function U2(){if(Qg)return wd;Qg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
382
|
+
`,h="/",m="*",x="",w="comment",b="declaration";function E(j,S){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];S=S||{};var D=1,A=1;function M(J){var G=J.match(t);G&&(D+=G.length);var te=J.lastIndexOf(p);A=~te?J.length-te:A+J.length}function _(){var J={line:D,column:A};return function(G){return G.position=new N(J),q(),G}}function N(J){this.start=J,this.end={line:D,column:A},this.source=S.source}N.prototype.content=j;function P(J){var G=new Error(S.source+":"+D+":"+A+": "+J);if(G.reason=J,G.filename=S.source,G.line=D,G.column=A,G.source=j,!S.silent)throw G}function z(J){var G=J.exec(j);if(G){var te=G[0];return M(te),j=j.slice(te.length),G}}function q(){z(n)}function T(J){var G;for(J=J||[];G=I();)G!==!1&&J.push(G);return J}function I(){var J=_();if(!(h!=j.charAt(0)||m!=j.charAt(1))){for(var G=2;x!=j.charAt(G)&&(m!=j.charAt(G)||h!=j.charAt(G+1));)++G;if(G+=2,x===j.charAt(G-1))return P("End of comment missing");var te=j.slice(2,G-2);return A+=2,M(te),j=j.slice(G),A+=2,J({type:w,comment:te})}}function B(){var J=_(),G=z(s);if(G){if(I(),!z(i))return P("property missing ':'");var te=z(a),ie=J({type:b,property:k(G[0].replace(e,x)),value:te?k(te[0].replace(e,x)):x});return z(c),ie}}function W(){var J=[];T(J);for(var G;G=B();)G!==!1&&(J.push(G),T(J));return J}return q(),W()}function k(j){return j?j.replace(d,x):x}return wd=E,wd}var Jg;function H2(){if(Jg)return go;Jg=1;var e=go&&go.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(go,"__esModule",{value:!0}),go.default=n;const t=e(U2());function n(s,i){let a=null;if(!s||typeof s!="string")return a;const c=(0,t.default)(s),d=typeof i=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:m}=p;d?i(h,m,p):m&&(a=a||{},a[h]=m)}),a}return go}var Ei={},Zg;function W2(){if(Zg)return Ei;Zg=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},c=function(h,m){return m.toUpperCase()},d=function(h,m){return"".concat(m,"-")},p=function(h,m){return m===void 0&&(m={}),a(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(i,d):h=h.replace(s,d),h.replace(t,c))};return Ei.camelCase=p,Ei}var Ri,ex;function V2(){if(ex)return Ri;ex=1;var e=Ri&&Ri.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(H2()),n=W2();function s(i,a){var c={};return!i||typeof i!="string"||(0,t.default)(i,function(d,p){d&&p&&(c[(0,n.camelCase)(d,a)]=p)}),c}return s.default=s,Ri=s,Ri}var q2=V2();const G2=eu(q2),u0=c0("end"),Jf=c0("start");function c0(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function K2(e){const t=Jf(e),n=u0(e);if(t&&n)return{start:t,end:n}}function Ii(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tx(e.position):"start"in e||"end"in e?tx(e):"line"in e||"column"in e?af(e):""}function af(e){return nx(e&&e.line)+":"+nx(e&&e.column)}function tx(e){return af(e&&e.start)+"-"+af(e&&e.end)}function nx(e){return e&&typeof e=="number"?e:1}class Jt extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let i="",a={},c=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(c=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof s=="string"){const p=s.indexOf(":");p===-1?a.ruleId=s:(a.source=s.slice(0,p),a.ruleId=s.slice(p+1))}if(!a.place&&a.ancestors&&a.ancestors){const p=a.ancestors[a.ancestors.length-1];p&&(a.place=p.position)}const d=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=d?d.line:void 0,this.name=Ii(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=c&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Jt.prototype.file="";Jt.prototype.name="";Jt.prototype.reason="";Jt.prototype.message="";Jt.prototype.stack="";Jt.prototype.column=void 0;Jt.prototype.line=void 0;Jt.prototype.ancestors=void 0;Jt.prototype.cause=void 0;Jt.prototype.fatal=void 0;Jt.prototype.place=void 0;Jt.prototype.ruleId=void 0;Jt.prototype.source=void 0;const Zf={}.hasOwnProperty,Y2=new Map,X2=/[A-Z]/g,Q2=new Set(["table","tbody","thead","tfoot","tr"]),J2=new Set(["td","th"]),d0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Z2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=lE(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=iE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Qf:F2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=f0(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function f0(e,t,n){if(t.type==="element")return eE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rE(e,t,n);if(t.type==="mdxjsEsm")return nE(e,t);if(t.type==="root")return sE(e,t,n);if(t.type==="text")return oE(e,t)}function eE(e,t,n){const s=e.schema;let i=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(i=Qf,e.schema=i),e.ancestors.push(t);const a=h0(e,t.tagName,!1),c=aE(e,t);let d=tp(e,t);return Q2.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!P2(p):!0})),p0(e,c,a,t),ep(c,d),e.ancestors.pop(),e.schema=s,e.create(t,a,c,n)}function tE(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}Vi(e,t.position)}function nE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vi(e,t.position)}function rE(e,t,n){const s=e.schema;let i=s;t.name==="svg"&&s.space==="html"&&(i=Qf,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:h0(e,t.name,!0),c=uE(e,t),d=tp(e,t);return p0(e,c,a,t),ep(c,d),e.ancestors.pop(),e.schema=s,e.create(t,a,c,n)}function sE(e,t,n){const s={};return ep(s,tp(e,t)),e.create(t,e.Fragment,s,n)}function oE(e,t){return t.value}function p0(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function ep(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function iE(e,t,n){return s;function s(i,a,c,d){const h=Array.isArray(c.children)?n:t;return d?h(a,c,d):h(a,c)}}function lE(e,t){return n;function n(s,i,a,c){const d=Array.isArray(a.children),p=Jf(s);return t(i,a,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function aE(e,t){const n={};let s,i;for(i in t.properties)if(i!=="children"&&Zf.call(t.properties,i)){const a=cE(e,i,t.properties[i]);if(a){const[c,d]=a;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&J2.has(t.tagName)?s=d:n[c]=d}}if(s){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function uE(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const a=s.data.estree.body[0];a.type;const c=a.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Vi(e,t.position);else{const i=s.name;let a;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const d=s.value.data.estree.body[0];d.type,a=e.evaluater.evaluateExpression(d.expression)}else Vi(e,t.position);else a=s.value===null?!0:s.value;n[i]=a}return n}function tp(e,t){const n=[];let s=-1;const i=e.passKeys?new Map:Y2;for(;++s<t.children.length;){const a=t.children[s];let c;if(e.passKeys){const p=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(p){const h=i.get(p)||0;c=p+"-"+h,i.set(p,h+1)}}const d=f0(e,a,c);d!==void 0&&n.push(d)}return n}function cE(e,t,n){const s=_2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?C2(n):B2(n)),s.property==="style"){let i=typeof n=="object"?n:dE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=fE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&s.space?I2[s.property]||s.property:s.attribute,n]}}function dE(e,t){try{return G2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,i=new Jt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=d0+"#cannot-parse-style-attribute",i}}function h0(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,c;for(;++a<i.length;){const d=Gg(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(a&&d.type==="Literal"),optional:!1}:d}s=c}else s=Gg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const i=s.value;return Zf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(s);Vi(e)}function Vi(e,t){const n=new Jt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=d0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fE(e){const t={};let n;for(n in e)Zf.call(e,n)&&(t[pE(n)]=e[n]);return t}function pE(e){let t=e.replace(X2,hE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hE(e){return"-"+e.toLowerCase()}const kd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},mE={};function gE(e,t){const n=mE,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return m0(e,s,i)}function m0(e,t,n){if(xE(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rx(e.children,t,n)}return Array.isArray(e)?rx(e,t,n):""}function rx(e,t,n){const s=[];let i=-1;for(;++i<e.length;)s[i]=m0(e[i],t,n);return s.join("")}function xE(e){return!!(e&&typeof e=="object")}const sx=document.createElement("i");function np(e){const t="&"+e+";";sx.innerHTML=t;const n=sx.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kr(e,t,n,s){const i=e.length;let a=0,c;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,s.length<1e4)c=Array.from(s),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);a<s.length;)c=s.slice(a,a+1e4),c.unshift(t,0),e.splice(...c),a+=1e4,t+=1e4}function Fn(e,t){return e.length>0?(kr(e,e.length,0,t),e):t}const ox={}.hasOwnProperty;function yE(e){const t={};let n=-1;for(;++n<e.length;)vE(t,e[n]);return t}function vE(e,t){let n;for(n in t){const i=(ox.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let c;if(a)for(c in a){ox.call(i,c)||(i[c]=[]);const d=a[c];bE(i[c],Array.isArray(d)?d:d?[d]:[])}}}function bE(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);kr(e,0,0,s)}function g0(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Co(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gr=Ss(/[A-Za-z]/),Tn=Ss(/[\dA-Za-z]/),wE=Ss(/[#-'*+\--9=?A-Z^-~]/);function uf(e){return e!==null&&(e<32||e===127)}const cf=Ss(/\d/),kE=Ss(/[\dA-Fa-f]/),SE=Ss(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function mn(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const jE=Ss(new RegExp("\\p{P}|\\p{S}","u")),CE=Ss(/\s/);function Ss(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _o(e){const t=[];let n=-1,s=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let c="";if(a===37&&Tn(e.charCodeAt(n+1))&&Tn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(c=String.fromCharCode(a));else if(a>55295&&a<57344){const d=e.charCodeAt(n+1);a<56320&&d>56319&&d<57344?(c=String.fromCharCode(a,d),i=1):c="�"}else c=String.fromCharCode(a);c&&(t.push(e.slice(s,n),encodeURIComponent(c)),s=n+i+1,c=""),i&&(n+=i,i=0)}return t.join("")+e.slice(s)}function Xe(e,t,n,s){const i=s?s-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(p){return He(p)?(e.enter(n),d(p)):t(p)}function d(p){return He(p)&&a++<i?(e.consume(p),d):(e.exit(n),t(p))}}const NE={tokenize:EE};function EE(e){const t=e.attempt(this.parser.constructs.contentInitial,s,i);let n;return t;function s(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function i(d){return e.enter("paragraph"),a(d)}function a(d){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return De(d)?(e.consume(d),e.exit("chunkText"),a):(e.consume(d),c)}}const RE={tokenize:TE},ix={tokenize:PE};function TE(e){const t=this,n=[];let s=0,i,a,c;return d;function d(A){if(s<n.length){const M=n[s];return t.containerState=M[1],e.attempt(M[0].continuation,p,h)(A)}return h(A)}function p(A){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&D();const M=t.events.length;let _=M,N;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){N=t.events[_][1].end;break}S(s);let P=M;for(;P<t.events.length;)t.events[P][1].end={...N},P++;return kr(t.events,_+1,0,t.events.slice(M)),t.events.length=P,h(A)}return d(A)}function h(A){if(s===n.length){if(!i)return w(A);if(i.currentConstruct&&i.currentConstruct.concrete)return E(A);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ix,m,x)(A)}function m(A){return i&&D(),S(s),w(A)}function x(A){return t.parser.lazy[t.now().line]=s!==n.length,c=t.now().offset,E(A)}function w(A){return t.containerState={},e.attempt(ix,b,E)(A)}function b(A){return s++,n.push([t.currentConstruct,t.containerState]),w(A)}function E(A){if(A===null){i&&D(),S(0),e.consume(A);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),k(A)}function k(A){if(A===null){j(e.exit("chunkFlow"),!0),S(0),e.consume(A);return}return De(A)?(e.consume(A),j(e.exit("chunkFlow")),s=0,t.interrupt=void 0,d):(e.consume(A),k)}function j(A,M){const _=t.sliceStream(A);if(M&&_.push(null),A.previous=a,a&&(a.next=A),a=A,i.defineSkip(A.start),i.write(_),t.parser.lazy[A.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<c&&(!i.events[N][1].end||i.events[N][1].end.offset>c))return;const P=t.events.length;let z=P,q,T;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(q){T=t.events[z][1].end;break}q=!0}for(S(s),N=P;N<t.events.length;)t.events[N][1].end={...T},N++;kr(t.events,z+1,0,t.events.slice(P)),t.events.length=N}}function S(A){let M=n.length;for(;M-- >A;){const _=n[M];t.containerState=_[1],_[0].exit.call(t,e)}n.length=A}function D(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function PE(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function lx(e){if(e===null||mn(e)||CE(e))return 1;if(jE(e))return 2}function rp(e,t,n){const s=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!s.includes(a)&&(t=a(t,n),s.push(a))}return t}const df={name:"attention",resolveAll:AE,tokenize:DE};function AE(e,t){let n=-1,s,i,a,c,d,p,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;p=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const x={...e[s][1].end},w={...e[n][1].start};ax(x,-p),ax(w,p),c={type:p>1?"strongSequence":"emphasisSequence",start:x,end:{...e[s][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:w},a={type:p>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},i={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[s][1].end={...c.start},e[n][1].start={...d.end},h=[],e[s][1].end.offset-e[s][1].start.offset&&(h=Fn(h,[["enter",e[s][1],t],["exit",e[s][1],t]])),h=Fn(h,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",a,t]]),h=Fn(h,rp(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),h=Fn(h,[["exit",a,t],["enter",d,t],["exit",d,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Fn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,kr(e,s-1,n-s+3,h),n=s+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DE(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,i=lx(s);let a;return c;function c(p){return a=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===a)return e.consume(p),d;const h=e.exit("attentionSequence"),m=lx(p),x=!m||m===2&&i||n.includes(p),w=!i||i===2&&m||n.includes(s);return h._open=!!(a===42?x:x&&(i||!w)),h._close=!!(a===42?w:w&&(m||!x)),t(p)}}function ax(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const LE={name:"autolink",tokenize:IE};function IE(e,t,n){let s=0;return i;function i(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return gr(b)?(e.consume(b),c):b===64?n(b):h(b)}function c(b){return b===43||b===45||b===46||Tn(b)?(s=1,d(b)):h(b)}function d(b){return b===58?(e.consume(b),s=0,p):(b===43||b===45||b===46||Tn(b))&&s++<32?(e.consume(b),d):(s=0,h(b))}function p(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||uf(b)?n(b):(e.consume(b),p)}function h(b){return b===64?(e.consume(b),m):wE(b)?(e.consume(b),h):n(b)}function m(b){return Tn(b)?x(b):n(b)}function x(b){return b===46?(e.consume(b),s=0,m):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):w(b)}function w(b){if((b===45||Tn(b))&&s++<63){const E=b===45?w:x;return e.consume(b),E}return n(b)}}const uu={partial:!0,tokenize:OE};function OE(e,t,n){return s;function s(a){return He(a)?Xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||De(a)?t(a):n(a)}}const x0={continuation:{tokenize:_E},exit:$E,name:"blockQuote",tokenize:ME};function ME(e,t,n){const s=this;return i;function i(c){if(c===62){const d=s.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),a}return n(c)}function a(c){return He(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function _E(e,t,n){const s=this;return i;function i(c){return He(c)?Xe(e,a,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return e.attempt(x0,t,n)(c)}}function $E(e){e.exit("blockQuote")}const y0={name:"characterEscape",tokenize:zE};function zE(e,t,n){return s;function s(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return SE(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const v0={name:"characterReference",tokenize:FE};function FE(e,t,n){const s=this;let i=0,a,c;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),p}function p(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,c=Tn,m(x))}function h(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,c=kE,m):(e.enter("characterReferenceValue"),a=7,c=cf,m(x))}function m(x){if(x===59&&i){const w=e.exit("characterReferenceValue");return c===Tn&&!np(s.sliceSerialize(w))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&i++<a?(e.consume(x),m):n(x)}}const ux={partial:!0,tokenize:UE},cx={concrete:!0,name:"codeFenced",tokenize:BE};function BE(e,t,n){const s=this,i={partial:!0,tokenize:_};let a=0,c=0,d;return p;function p(N){return h(N)}function h(N){const P=s.events[s.events.length-1];return a=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,d=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(N)}function m(N){return N===d?(c++,e.consume(N),m):c<3?n(N):(e.exit("codeFencedFenceSequence"),He(N)?Xe(e,x,"whitespace")(N):x(N))}function x(N){return N===null||De(N)?(e.exit("codeFencedFence"),s.interrupt?t(N):e.check(ux,k,M)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(N))}function w(N){return N===null||De(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(N)):He(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,b,"whitespace")(N)):N===96&&N===d?n(N):(e.consume(N),w)}function b(N){return N===null||De(N)?x(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(N))}function E(N){return N===null||De(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(N)):N===96&&N===d?n(N):(e.consume(N),E)}function k(N){return e.attempt(i,M,j)(N)}function j(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),S}function S(N){return a>0&&He(N)?Xe(e,D,"linePrefix",a+1)(N):D(N)}function D(N){return N===null||De(N)?e.check(ux,k,M)(N):(e.enter("codeFlowValue"),A(N))}function A(N){return N===null||De(N)?(e.exit("codeFlowValue"),D(N)):(e.consume(N),A)}function M(N){return e.exit("codeFenced"),t(N)}function _(N,P,z){let q=0;return T;function T(G){return N.enter("lineEnding"),N.consume(G),N.exit("lineEnding"),I}function I(G){return N.enter("codeFencedFence"),He(G)?Xe(N,B,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):B(G)}function B(G){return G===d?(N.enter("codeFencedFenceSequence"),W(G)):z(G)}function W(G){return G===d?(q++,N.consume(G),W):q>=c?(N.exit("codeFencedFenceSequence"),He(G)?Xe(N,J,"whitespace")(G):J(G)):z(G)}function J(G){return G===null||De(G)?(N.exit("codeFencedFence"),P(G)):z(G)}}}function UE(e,t,n){const s=this;return i;function i(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a)}function a(c){return s.parser.lazy[s.now().line]?n(c):t(c)}}const Sd={name:"codeIndented",tokenize:WE},HE={partial:!0,tokenize:VE};function WE(e,t,n){const s=this;return i;function i(h){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(h)}function a(h){const m=s.events[s.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?p(h):De(h)?e.attempt(HE,c,p)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||De(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function p(h){return e.exit("codeIndented"),t(h)}}function VE(e,t,n){const s=this;return i;function i(c){return s.parser.lazy[s.now().line]?n(c):De(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i):Xe(e,a,"linePrefix",5)(c)}function a(c){const d=s.events[s.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):De(c)?i(c):n(c)}}const qE={name:"codeText",previous:KE,resolve:GE,tokenize:YE};function GE(e){let t=e.length-4,n=3,s,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)i===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(i=s):(s===t||e[s][1].type==="lineEnding")&&(e[i][1].type="codeTextData",s!==i+2&&(e[i][1].end=e[s-1][1].end,e.splice(i+2,s-i-2),t-=s-i-2,s=i+2),i=void 0);return e}function KE(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function YE(e,t,n){let s=0,i,a;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),s++,d):(e.exit("codeTextSequence"),p(x))}function p(x){return x===null?n(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),p):x===96?(a=e.enter("codeTextSequence"),i=0,m(x)):De(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(x))}function h(x){return x===null||x===32||x===96||De(x)?(e.exit("codeTextData"),p(x)):(e.consume(x),h)}function m(x){return x===96?(e.consume(x),i++,m):i===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(a.type="codeTextData",h(x))}}class XE{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return s&&Ti(this.left,s),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ti(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ti(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ti(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ti(this.left,n.reverse())}}}function Ti(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function b0(e){const t={};let n=-1,s,i,a,c,d,p,h;const m=new XE(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(s=m.get(n),n&&s[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(p=s[1]._tokenizer.events,a=0,a<p.length&&p[a][1].type==="lineEndingBlank"&&(a+=2),a<p.length&&p[a][1].type==="content"))for(;++a<p.length&&p[a][1].type!=="content";)p[a][1].type==="chunkText"&&(p[a][1]._isInFirstContentOfListItem=!0,a++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,QE(m,n)),n=t[n],h=!0);else if(s[1]._container){for(a=n,i=void 0;a--;)if(c=m.get(a),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),c[1].type="lineEnding",i=a);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;i&&(s[1].end={...m.get(i)[1].start},d=m.slice(i,n),d.unshift(s),m.splice(i,n-i+1,d))}}return kr(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function QE(e,t){const n=e.get(t)[1],s=e.get(t)[2];let i=t-1;const a=[];let c=n._tokenizer;c||(c=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],h={};let m,x,w=-1,b=n,E=0,k=0;const j=[k];for(;b;){for(;e.get(++i)[1]!==b;);a.push(i),b._tokenizer||(m=s.sliceStream(b),b.next||m.push(null),x&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=b,b=b.next}for(b=n;++w<d.length;)d[w][0]==="exit"&&d[w-1][0]==="enter"&&d[w][1].type===d[w-1][1].type&&d[w][1].start.line!==d[w][1].end.line&&(k=w+1,j.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):j.pop(),w=j.length;w--;){const S=d.slice(j[w],j[w+1]),D=a.pop();p.push([D,D+S.length-1]),e.splice(D,2,S)}for(p.reverse(),w=-1;++w<p.length;)h[E+p[w][0]]=E+p[w][1],E+=p[w][1]-p[w][0]-1;return h}const JE={resolve:eR,tokenize:tR},ZE={partial:!0,tokenize:nR};function eR(e){return b0(e),e}function tR(e,t){let n;return s;function s(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(d)}function i(d){return d===null?a(d):De(d)?e.check(ZE,c,a)(d):(e.consume(d),i)}function a(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function nR(e,t,n){const s=this;return i;function i(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(c){if(c===null||De(c))return n(c);const d=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(s.parser.constructs.flow,n,t)(c)}}function w0(e,t,n,s,i,a,c,d,p){const h=p||Number.POSITIVE_INFINITY;let m=0;return x;function x(S){return S===60?(e.enter(s),e.enter(i),e.enter(a),e.consume(S),e.exit(a),w):S===null||S===32||S===41||uf(S)?n(S):(e.enter(s),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(S))}function w(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(i),e.exit(s),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(e.exit("chunkString"),e.exit(d),w(S)):S===null||S===60||De(S)?n(S):(e.consume(S),S===92?E:b)}function E(S){return S===60||S===62||S===92?(e.consume(S),b):b(S)}function k(S){return!m&&(S===null||S===41||mn(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(s),t(S)):m<h&&S===40?(e.consume(S),m++,k):S===41?(e.consume(S),m--,k):S===null||S===32||S===40||uf(S)?n(S):(e.consume(S),S===92?j:k)}function j(S){return S===40||S===41||S===92?(e.consume(S),k):k(S)}}function k0(e,t,n,s,i,a){const c=this;let d=0,p;return h;function h(b){return e.enter(s),e.enter(i),e.consume(b),e.exit(i),e.enter(a),m}function m(b){return d>999||b===null||b===91||b===93&&!p||b===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(a),e.enter(i),e.consume(b),e.exit(i),e.exit(s),t):De(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===null||b===91||b===93||De(b)||d++>999?(e.exit("chunkString"),m(b)):(e.consume(b),p||(p=!He(b)),b===92?w:x)}function w(b){return b===91||b===92||b===93?(e.consume(b),d++,x):x(b)}}function S0(e,t,n,s,i,a){let c;return d;function d(w){return w===34||w===39||w===40?(e.enter(s),e.enter(i),e.consume(w),e.exit(i),c=w===40?41:w,p):n(w)}function p(w){return w===c?(e.enter(i),e.consume(w),e.exit(i),e.exit(s),t):(e.enter(a),h(w))}function h(w){return w===c?(e.exit(a),p(c)):w===null?n(w):De(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Xe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===c||w===null||De(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?x:m)}function x(w){return w===c||w===92?(e.consume(w),m):m(w)}}function Oi(e,t){let n;return s;function s(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,s):He(i)?Xe(e,s,n?"linePrefix":"lineSuffix")(i):t(i)}}const rR={name:"definition",tokenize:oR},sR={partial:!0,tokenize:iR};function oR(e,t,n){const s=this;let i;return a;function a(b){return e.enter("definition"),c(b)}function c(b){return k0.call(s,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return i=Co(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):n(b)}function p(b){return mn(b)?Oi(e,h)(b):h(b)}function h(b){return w0(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(sR,x,x)(b)}function x(b){return He(b)?Xe(e,w,"whitespace")(b):w(b)}function w(b){return b===null||De(b)?(e.exit("definition"),s.parser.defined.push(i),t(b)):n(b)}}function iR(e,t,n){return s;function s(d){return mn(d)?Oi(e,i)(d):n(d)}function i(d){return S0(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function a(d){return He(d)?Xe(e,c,"whitespace")(d):c(d)}function c(d){return d===null||De(d)?t(d):n(d)}}const lR={name:"hardBreakEscape",tokenize:aR};function aR(e,t,n){return s;function s(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const uR={name:"headingAtx",resolve:cR,tokenize:dR};function cR(e,t){let n=e.length-2,s=3,i,a;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(i={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},a={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},kr(e,s,n-s+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function dR(e,t,n){let s=0;return i;function i(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&s++<6?(e.consume(m),c):m===null||mn(m)?(e.exit("atxHeadingSequence"),d(m)):n(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),p(m)):m===null||De(m)?(e.exit("atxHeading"),t(m)):He(m)?Xe(e,d,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function p(m){return m===35?(e.consume(m),p):(e.exit("atxHeadingSequence"),d(m))}function h(m){return m===null||m===35||mn(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const fR=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],dx=["pre","script","style","textarea"],pR={concrete:!0,name:"htmlFlow",resolveTo:gR,tokenize:xR},hR={partial:!0,tokenize:vR},mR={partial:!0,tokenize:yR};function gR(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xR(e,t,n){const s=this;let i,a,c,d,p;return h;function h(L){return m(L)}function m(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),x}function x(L){return L===33?(e.consume(L),w):L===47?(e.consume(L),a=!0,k):L===63?(e.consume(L),i=3,s.interrupt?t:R):gr(L)?(e.consume(L),c=String.fromCharCode(L),j):n(L)}function w(L){return L===45?(e.consume(L),i=2,b):L===91?(e.consume(L),i=5,d=0,E):gr(L)?(e.consume(L),i=4,s.interrupt?t:R):n(L)}function b(L){return L===45?(e.consume(L),s.interrupt?t:R):n(L)}function E(L){const pe="CDATA[";return L===pe.charCodeAt(d++)?(e.consume(L),d===pe.length?s.interrupt?t:B:E):n(L)}function k(L){return gr(L)?(e.consume(L),c=String.fromCharCode(L),j):n(L)}function j(L){if(L===null||L===47||L===62||mn(L)){const pe=L===47,ve=c.toLowerCase();return!pe&&!a&&dx.includes(ve)?(i=1,s.interrupt?t(L):B(L)):fR.includes(c.toLowerCase())?(i=6,pe?(e.consume(L),S):s.interrupt?t(L):B(L)):(i=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(L):a?D(L):A(L))}return L===45||Tn(L)?(e.consume(L),c+=String.fromCharCode(L),j):n(L)}function S(L){return L===62?(e.consume(L),s.interrupt?t:B):n(L)}function D(L){return He(L)?(e.consume(L),D):T(L)}function A(L){return L===47?(e.consume(L),T):L===58||L===95||gr(L)?(e.consume(L),M):He(L)?(e.consume(L),A):T(L)}function M(L){return L===45||L===46||L===58||L===95||Tn(L)?(e.consume(L),M):_(L)}function _(L){return L===61?(e.consume(L),N):He(L)?(e.consume(L),_):A(L)}function N(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),p=L,P):He(L)?(e.consume(L),N):z(L)}function P(L){return L===p?(e.consume(L),p=null,q):L===null||De(L)?n(L):(e.consume(L),P)}function z(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||mn(L)?_(L):(e.consume(L),z)}function q(L){return L===47||L===62||He(L)?A(L):n(L)}function T(L){return L===62?(e.consume(L),I):n(L)}function I(L){return L===null||De(L)?B(L):He(L)?(e.consume(L),I):n(L)}function B(L){return L===45&&i===2?(e.consume(L),te):L===60&&i===1?(e.consume(L),ie):L===62&&i===4?(e.consume(L),$):L===63&&i===3?(e.consume(L),R):L===93&&i===5?(e.consume(L),oe):De(L)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(hR,Q,W)(L)):L===null||De(L)?(e.exit("htmlFlowData"),W(L)):(e.consume(L),B)}function W(L){return e.check(mR,J,Q)(L)}function J(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),G}function G(L){return L===null||De(L)?W(L):(e.enter("htmlFlowData"),B(L))}function te(L){return L===45?(e.consume(L),R):B(L)}function ie(L){return L===47?(e.consume(L),c="",X):B(L)}function X(L){if(L===62){const pe=c.toLowerCase();return dx.includes(pe)?(e.consume(L),$):B(L)}return gr(L)&&c.length<8?(e.consume(L),c+=String.fromCharCode(L),X):B(L)}function oe(L){return L===93?(e.consume(L),R):B(L)}function R(L){return L===62?(e.consume(L),$):L===45&&i===2?(e.consume(L),R):B(L)}function $(L){return L===null||De(L)?(e.exit("htmlFlowData"),Q(L)):(e.consume(L),$)}function Q(L){return e.exit("htmlFlow"),t(L)}}function yR(e,t,n){const s=this;return i;function i(c){return De(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):n(c)}function a(c){return s.parser.lazy[s.now().line]?n(c):t(c)}}function vR(e,t,n){return s;function s(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(uu,t,n)}}const bR={name:"htmlText",tokenize:wR};function wR(e,t,n){const s=this;let i,a,c;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),_):R===63?(e.consume(R),A):gr(R)?(e.consume(R),z):n(R)}function h(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),a=0,E):gr(R)?(e.consume(R),D):n(R)}function m(R){return R===45?(e.consume(R),b):n(R)}function x(R){return R===null?n(R):R===45?(e.consume(R),w):De(R)?(c=x,ie(R)):(e.consume(R),x)}function w(R){return R===45?(e.consume(R),b):x(R)}function b(R){return R===62?te(R):R===45?w(R):x(R)}function E(R){const $="CDATA[";return R===$.charCodeAt(a++)?(e.consume(R),a===$.length?k:E):n(R)}function k(R){return R===null?n(R):R===93?(e.consume(R),j):De(R)?(c=k,ie(R)):(e.consume(R),k)}function j(R){return R===93?(e.consume(R),S):k(R)}function S(R){return R===62?te(R):R===93?(e.consume(R),S):k(R)}function D(R){return R===null||R===62?te(R):De(R)?(c=D,ie(R)):(e.consume(R),D)}function A(R){return R===null?n(R):R===63?(e.consume(R),M):De(R)?(c=A,ie(R)):(e.consume(R),A)}function M(R){return R===62?te(R):A(R)}function _(R){return gr(R)?(e.consume(R),N):n(R)}function N(R){return R===45||Tn(R)?(e.consume(R),N):P(R)}function P(R){return De(R)?(c=P,ie(R)):He(R)?(e.consume(R),P):te(R)}function z(R){return R===45||Tn(R)?(e.consume(R),z):R===47||R===62||mn(R)?q(R):n(R)}function q(R){return R===47?(e.consume(R),te):R===58||R===95||gr(R)?(e.consume(R),T):De(R)?(c=q,ie(R)):He(R)?(e.consume(R),q):te(R)}function T(R){return R===45||R===46||R===58||R===95||Tn(R)?(e.consume(R),T):I(R)}function I(R){return R===61?(e.consume(R),B):De(R)?(c=I,ie(R)):He(R)?(e.consume(R),I):q(R)}function B(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,W):De(R)?(c=B,ie(R)):He(R)?(e.consume(R),B):(e.consume(R),J)}function W(R){return R===i?(e.consume(R),i=void 0,G):R===null?n(R):De(R)?(c=W,ie(R)):(e.consume(R),W)}function J(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||mn(R)?q(R):(e.consume(R),J)}function G(R){return R===47||R===62||mn(R)?q(R):n(R)}function te(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function ie(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),X}function X(R){return He(R)?Xe(e,oe,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):oe(R)}function oe(R){return e.enter("htmlTextData"),c(R)}}const sp={name:"labelEnd",resolveAll:CR,resolveTo:NR,tokenize:ER},kR={tokenize:RR},SR={tokenize:TR},jR={tokenize:PR};function CR(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const i=s.type==="labelImage"?4:2;s.type="data",t+=i}}return e.length!==n.length&&kr(e,0,e.length,n),e}function NR(e,t){let n=e.length,s=0,i,a,c,d;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){s=2;break}}else i.type==="labelEnd"&&(c=n);const p={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[a+s+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,t],["enter",h,t]],d=Fn(d,e.slice(a+1,a+s+3)),d=Fn(d,[["enter",m,t]]),d=Fn(d,rp(t.parser.constructs.insideSpan.null,e.slice(a+s+4,c-3),t)),d=Fn(d,[["exit",m,t],e[c-2],e[c-1],["exit",h,t]]),d=Fn(d,e.slice(c+1)),d=Fn(d,[["exit",p,t]]),kr(e,a,e.length,d),e}function ER(e,t,n){const s=this;let i=s.events.length,a,c;for(;i--;)if((s.events[i][1].type==="labelImage"||s.events[i][1].type==="labelLink")&&!s.events[i][1]._balanced){a=s.events[i][1];break}return d;function d(w){return a?a._inactive?x(w):(c=s.parser.defined.includes(Co(s.sliceSerialize({start:a.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),p):n(w)}function p(w){return w===40?e.attempt(kR,m,c?m:x)(w):w===91?e.attempt(SR,m,c?h:x)(w):c?m(w):x(w)}function h(w){return e.attempt(jR,m,x)(w)}function m(w){return t(w)}function x(w){return a._balanced=!0,n(w)}}function RR(e,t,n){return s;function s(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),i}function i(x){return mn(x)?Oi(e,a)(x):a(x)}function a(x){return x===41?m(x):w0(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return mn(x)?Oi(e,p)(x):m(x)}function d(x){return n(x)}function p(x){return x===34||x===39||x===40?S0(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):m(x)}function h(x){return mn(x)?Oi(e,m)(x):m(x)}function m(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):n(x)}}function TR(e,t,n){const s=this;return i;function i(d){return k0.call(s,e,a,c,"reference","referenceMarker","referenceString")(d)}function a(d){return s.parser.defined.includes(Co(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function PR(e,t,n){return s;function s(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const AR={name:"labelStartImage",resolveAll:sp.resolveAll,tokenize:DR};function DR(e,t,n){const s=this;return i;function i(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),a}function a(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):t(d)}}const LR={name:"labelStartLink",resolveAll:sp.resolveAll,tokenize:IR};function IR(e,t,n){const s=this;return i;function i(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),a}function a(c){return c===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(c):t(c)}}const jd={name:"lineEnding",tokenize:OR};function OR(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Ia={name:"thematicBreak",tokenize:MR};function MR(e,t,n){let s=0,i;return a;function a(h){return e.enter("thematicBreak"),c(h)}function c(h){return i=h,d(h)}function d(h){return h===i?(e.enter("thematicBreakSequence"),p(h)):s>=3&&(h===null||De(h))?(e.exit("thematicBreak"),t(h)):n(h)}function p(h){return h===i?(e.consume(h),s++,p):(e.exit("thematicBreakSequence"),He(h)?Xe(e,d,"whitespace")(h):d(h))}}const pn={continuation:{tokenize:FR},exit:UR,name:"list",tokenize:zR},_R={partial:!0,tokenize:HR},$R={partial:!0,tokenize:BR};function zR(e,t,n){const s=this,i=s.events[s.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,c=0;return d;function d(b){const E=s.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!s.containerState.marker||b===s.containerState.marker:cf(b)){if(s.containerState.type||(s.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Ia,n,h)(b):h(b);if(!s.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return n(b)}function p(b){return cf(b)&&++c<10?(e.consume(b),p):(!s.interrupt||c<2)&&(s.containerState.marker?b===s.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||b,e.check(uu,s.interrupt?n:m,e.attempt(_R,w,x))}function m(b){return s.containerState.initialBlankLine=!0,a++,w(b)}function x(b){return He(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),w):n(b)}function w(b){return s.containerState.size=a+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function FR(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(uu,i,a);function i(d){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Xe(e,t,"listItemIndent",s.containerState.size+1)(d)}function a(d){return s.containerState.furtherBlankLines||!He(d)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,c(d)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt($R,t,c)(d))}function c(d){return s.containerState._closeFlow=!0,s.interrupt=void 0,Xe(e,e.attempt(pn,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function BR(e,t,n){const s=this;return Xe(e,i,"listItemIndent",s.containerState.size+1);function i(a){const c=s.events[s.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===s.containerState.size?t(a):n(a)}}function UR(e){e.exit(this.containerState.type)}function HR(e,t,n){const s=this;return Xe(e,i,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const c=s.events[s.events.length-1];return!He(a)&&c&&c[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const fx={name:"setextUnderline",resolveTo:WR,tokenize:VR};function WR(e,t){let n=e.length,s,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const c={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",c,t]),e.splice(a+1,0,["exit",e[s][1],t]),e[s][1].end={...e[a][1].end}):e[s][1]=c,e.push(["exit",c,t]),e}function VR(e,t,n){const s=this;let i;return a;function a(h){let m=s.events.length,x;for(;m--;)if(s.events[m][1].type!=="lineEnding"&&s.events[m][1].type!=="linePrefix"&&s.events[m][1].type!=="content"){x=s.events[m][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||x)?(e.enter("setextHeadingLine"),i=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===i?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),He(h)?Xe(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||De(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const qR={tokenize:GR};function GR(e){const t=this,n=e.attempt(uu,s,e.attempt(this.parser.constructs.flowInitial,i,Xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(JE,i)),"linePrefix")));return n;function s(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const KR={resolveAll:C0()},YR=j0("string"),XR=j0("text");function j0(e){return{resolveAll:C0(e==="text"?QR:void 0),tokenize:t};function t(n){const s=this,i=this.parser.constructs[e],a=n.attempt(i,c,d);return c;function c(m){return h(m)?a(m):d(m)}function d(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),p}function p(m){return h(m)?(n.exit("data"),a(m)):(n.consume(m),p)}function h(m){if(m===null)return!0;const x=i[m];let w=-1;if(x)for(;++w<x.length;){const b=x[w];if(!b.previous||b.previous.call(s,s.previous))return!0}return!1}}}function C0(e){return t;function t(n,s){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,s):n}}function QR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const s=e[n-1][1],i=t.sliceStream(s);let a=i.length,c=-1,d=0,p;for(;a--;){const h=i[a];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)p=!0,d++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?c:s.start._bufferIndex+c,_index:s.start._index+a,line:s.end.line,column:s.end.column-d,offset:s.end.offset-d},end:{...s.end}};s.end={...h.start},s.start.offset===s.end.offset?Object.assign(s,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const JR={42:pn,43:pn,45:pn,48:pn,49:pn,50:pn,51:pn,52:pn,53:pn,54:pn,55:pn,56:pn,57:pn,62:x0},ZR={91:rR},eT={[-2]:Sd,[-1]:Sd,32:Sd},tT={35:uR,42:Ia,45:[fx,Ia],60:pR,61:fx,95:Ia,96:cx,126:cx},nT={38:v0,92:y0},rT={[-5]:jd,[-4]:jd,[-3]:jd,33:AR,38:v0,42:df,60:[LE,bR],91:LR,92:[lR,y0],93:sp,95:df,96:qE},sT={null:[df,KR]},oT={null:[42,95]},iT={null:[]},lT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:oT,contentInitial:ZR,disable:iT,document:JR,flow:tT,flowInitial:eT,insideSpan:sT,string:nT,text:rT},Symbol.toStringTag,{value:"Module"}));function aT(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let c=[],d=[];const p={attempt:P(_),check:P(N),consume:D,enter:A,exit:M,interrupt:P(N,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:E,parser:e,previous:null,sliceSerialize:w,sliceStream:b,write:x};let m=t.tokenize.call(h,p);return t.resolveAll&&a.push(t),h;function x(I){return c=Fn(c,I),j(),c[c.length-1]!==null?[]:(z(t,0),h.events=rp(a,h.events,h),h.events)}function w(I,B){return cT(b(I),B)}function b(I){return uT(c,I)}function E(){const{_bufferIndex:I,_index:B,line:W,column:J,offset:G}=s;return{_bufferIndex:I,_index:B,line:W,column:J,offset:G}}function k(I){i[I.line]=I.column,T()}function j(){let I;for(;s._index<c.length;){const B=c[s._index];if(typeof B=="string")for(I=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===I&&s._bufferIndex<B.length;)S(B.charCodeAt(s._bufferIndex));else S(B)}}function S(I){m=m(I)}function D(I){De(I)?(s.line++,s.column=1,s.offset+=I===-3?2:1,T()):I!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===c[s._index].length&&(s._bufferIndex=-1,s._index++)),h.previous=I}function A(I,B){const W=B||{};return W.type=I,W.start=E(),h.events.push(["enter",W,h]),d.push(W),W}function M(I){const B=d.pop();return B.end=E(),h.events.push(["exit",B,h]),B}function _(I,B){z(I,B.from)}function N(I,B){B.restore()}function P(I,B){return W;function W(J,G,te){let ie,X,oe,R;return Array.isArray(J)?Q(J):"tokenize"in J?Q([J]):$(J);function $(de){return Pe;function Pe(ke){const Te=ke!==null&&de[ke],ee=ke!==null&&de.null,Ee=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(ee)?ee:ee?[ee]:[]];return Q(Ee)(ke)}}function Q(de){return ie=de,X=0,de.length===0?te:L(de[X])}function L(de){return Pe;function Pe(ke){return R=q(),oe=de,de.partial||(h.currentConstruct=de),de.name&&h.parser.constructs.disable.null.includes(de.name)?ve():de.tokenize.call(B?Object.assign(Object.create(h),B):h,p,pe,ve)(ke)}}function pe(de){return I(oe,R),G}function ve(de){return R.restore(),++X<ie.length?L(ie[X]):te}}}function z(I,B){I.resolveAll&&!a.includes(I)&&a.push(I),I.resolve&&kr(h.events,B,h.events.length-B,I.resolve(h.events.slice(B),h)),I.resolveTo&&(h.events=I.resolveTo(h.events,h))}function q(){const I=E(),B=h.previous,W=h.currentConstruct,J=h.events.length,G=Array.from(d);return{from:J,restore:te};function te(){s=I,h.previous=B,h.currentConstruct=W,h.events.length=J,d=G,T()}}function T(){s.line in i&&s.column<2&&(s.column=i[s.line],s.offset+=i[s.line]-1)}}function uT(e,t){const n=t.start._index,s=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let c;if(n===i)c=[e[n].slice(s,a)];else{if(c=e.slice(n,i),s>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(s):c.shift()}a>0&&c.push(e[i].slice(0,a))}return c}function cT(e,t){let n=-1;const s=[];let i;for(;++n<e.length;){const a=e[n];let c;if(typeof a=="string")c=a;else switch(a){case-5:{c="\r";break}case-4:{c=`
|
|
383
|
+
`;break}case-3:{c=`\r
|
|
384
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&i)continue;c=" ";break}default:c=String.fromCharCode(a)}i=a===-2,s.push(c)}return s.join("")}function dT(e){const s={constructs:yE([lT,...(e||{}).extensions||[]]),content:i(NE),defined:[],document:i(RE),flow:i(qR),lazy:{},string:i(YR),text:i(XR)};return s;function i(a){return c;function c(d){return aT(s,a,d)}}}function fT(e){for(;!b0(e););return e}const px=/[\0\t\n\r]/g;function pT(){let e=1,t="",n=!0,s;return i;function i(a,c,d){const p=[];let h,m,x,w,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(c||void 0).decode(a)),x=0,t="",n&&(a.charCodeAt(0)===65279&&x++,n=void 0);x<a.length;){if(px.lastIndex=x,h=px.exec(a),w=h&&h.index!==void 0?h.index:a.length,b=a.charCodeAt(w),!h){t=a.slice(x);break}if(b===10&&x===w&&s)p.push(-3),s=void 0;else switch(s&&(p.push(-5),s=void 0),x<w&&(p.push(a.slice(x,w)),e+=w-x),b){case 0:{p.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,p.push(-2);e++<m;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:s=!0,e=1}x=w+1}return d&&(s&&p.push(-5),t&&p.push(t),p.push(null)),p}}const hT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mT(e){return e.replace(hT,gT)}function gT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return g0(n.slice(a?2:1),a?16:10)}return np(n)||e}const N0={}.hasOwnProperty;function xT(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),yT(n)(fT(dT(n).document().write(pT()(e,t,!0))))}function yT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Dt),autolinkProtocol:q,autolinkEmail:q,atxHeading:a(Bt),blockQuote:a(ee),characterEscape:q,characterReference:q,codeFenced:a(Ee),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(Ee,c),codeText:a(je,c),codeTextData:q,data:q,codeFlowValue:q,definition:a(Qe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(yt),hardBreakEscape:a(Ut),hardBreakTrailing:a(Ut),htmlFlow:a(_t,c),htmlFlowData:q,htmlText:a(_t,c),htmlTextData:q,image:a(vn),label:c,link:a(Dt),listItem:a(Zt),listItemValue:w,listOrdered:a(pt,x),listUnordered:a(pt),paragraph:a(An),reference:L,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(Bt),strong:a(vt),thematicBreak:a(lr)},exit:{atxHeading:p(),atxHeadingSequence:_,autolink:p(),autolinkEmail:Te,autolinkProtocol:ke,blockQuote:p(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:de,characterReference:Pe,codeFenced:p(j),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:E,codeFlowValue:T,codeIndented:p(S),codeText:p(G),codeTextData:T,data:T,definition:p(),definitionDestinationString:M,definitionLabelString:D,definitionTitleString:A,emphasis:p(),hardBreakEscape:p(B),hardBreakTrailing:p(B),htmlFlow:p(W),htmlFlowData:T,htmlText:p(J),htmlTextData:T,image:p(ie),label:oe,labelText:X,lineEnding:I,link:p(te),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:pe,resourceDestinationString:R,resourceTitleString:$,resource:Q,setextHeading:p(z),setextHeadingLineSequence:P,setextHeadingText:N,strong:p(),thematicBreak:p()}};E0(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(Z){let ae={type:"root",children:[]};const be={stack:[ae],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:m,data:n},Re=[];let U=-1;for(;++U<Z.length;)if(Z[U][1].type==="listOrdered"||Z[U][1].type==="listUnordered")if(Z[U][0]==="enter")Re.push(U);else{const se=Re.pop();U=i(Z,se,U)}for(U=-1;++U<Z.length;){const se=t[Z[U][0]];N0.call(se,Z[U][1].type)&&se[Z[U][1].type].call(Object.assign({sliceSerialize:Z[U][2].sliceSerialize},be),Z[U][1])}if(be.tokenStack.length>0){const se=be.tokenStack[be.tokenStack.length-1];(se[1]||hx).call(be,void 0,se[0])}for(ae.position={start:ms(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:ms(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)ae=t.transforms[U](ae)||ae;return ae}function i(Z,ae,be){let Re=ae-1,U=-1,se=!1,Se,Fe,sn,ct;for(;++Re<=be;){const We=Z[Re];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?U++:U--,ct=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(Se&&!ct&&!U&&!sn&&(sn=Re),ct=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ct=void 0}if(!U&&We[0]==="enter"&&We[1].type==="listItemPrefix"||U===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(Se){let qe=Re;for(Fe=void 0;qe--;){const ht=Z[qe];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;Fe&&(Z[Fe][1].type="lineEndingBlank",se=!0),ht[1].type="lineEnding",Fe=qe}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}sn&&(!Fe||sn<Fe)&&(Se._spread=!0),Se.end=Object.assign({},Fe?Z[Fe][1].start:We[1].end),Z.splice(Fe||Re,0,["exit",Se,We[2]]),Re++,be++}if(We[1].type==="listItemPrefix"){const qe={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};Se=qe,Z.splice(Re,0,["enter",qe,We[2]]),Re++,be++,sn=void 0,ct=!0}}}return Z[ae][1]._spread=se,be}function a(Z,ae){return be;function be(Re){d.call(this,Z(Re),Re),ae&&ae.call(this,Re)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(Z,ae,be){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ae,be||void 0]),Z.position={start:ms(ae.start),end:void 0}}function p(Z){return ae;function ae(be){Z&&Z.call(this,be),h.call(this,be)}}function h(Z,ae){const be=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==Z.type&&(ae?ae.call(this,Z,Re[0]):(Re[1]||hx).call(this,Z,Re[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Ii({start:Z.start,end:Z.end})+"): it’s not open");be.position.end=ms(Z.end)}function m(){return gE(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function w(Z){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=Z}function E(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=Z}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z.replace(/(\r?\n|\r)$/g,"")}function D(Z){const ae=this.resume(),be=this.stack[this.stack.length-1];be.label=ae,be.identifier=Co(this.sliceSerialize(Z)).toLowerCase()}function A(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.title=Z}function M(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.url=Z}function _(Z){const ae=this.stack[this.stack.length-1];if(!ae.depth){const be=this.sliceSerialize(Z).length;ae.depth=be}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function P(Z){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function q(Z){const be=this.stack[this.stack.length-1].children;let Re=be[be.length-1];(!Re||Re.type!=="text")&&(Re=Nr(),Re.position={start:ms(Z.start),end:void 0},be.push(Re)),this.stack.push(Re)}function T(Z){const ae=this.stack.pop();ae.value+=this.sliceSerialize(Z),ae.position.end=ms(Z.end)}function I(Z){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ae.children[ae.children.length-1];be.position.end=ms(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(q.call(this,Z),T.call(this,Z))}function B(){this.data.atHardBreak=!0}function W(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z}function J(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z}function G(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Z}function te(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ae,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function ie(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ae,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function X(Z){const ae=this.sliceSerialize(Z),be=this.stack[this.stack.length-2];be.label=mT(ae),be.identifier=Co(ae).toLowerCase()}function oe(){const Z=this.stack[this.stack.length-1],ae=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Re=Z.children;be.children=Re}else be.alt=ae}function R(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.url=Z}function $(){const Z=this.resume(),ae=this.stack[this.stack.length-1];ae.title=Z}function Q(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function pe(Z){const ae=this.resume(),be=this.stack[this.stack.length-1];be.label=ae,be.identifier=Co(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function ve(Z){this.data.characterReferenceType=Z.type}function de(Z){const ae=this.sliceSerialize(Z),be=this.data.characterReferenceType;let Re;be?(Re=g0(ae,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=np(ae);const U=this.stack[this.stack.length-1];U.value+=Re}function Pe(Z){const ae=this.stack.pop();ae.position.end=ms(Z.end)}function ke(Z){T.call(this,Z);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(Z)}function Te(Z){T.call(this,Z);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(Z)}function ee(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function Qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yt(){return{type:"emphasis",children:[]}}function Bt(){return{type:"heading",depth:0,children:[]}}function Ut(){return{type:"break"}}function _t(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function Dt(){return{type:"link",title:null,url:"",children:[]}}function pt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Zt(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function An(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function Nr(){return{type:"text",value:""}}function lr(){return{type:"thematicBreak"}}}function ms(e){return{line:e.line,column:e.column,offset:e.offset}}function E0(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?E0(e,s):vT(e,s)}}function vT(e,t){let n;for(n in t)if(N0.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function hx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ii({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ii({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ii({start:t.start,end:t.end})+") is still open")}function bT(e){const t=this;t.parser=n;function n(s){return xT(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function wT(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function kT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
385
|
+
`}]}function ST(e,t){const n=t.value?t.value+`
|
|
386
|
+
`:"",s={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(s.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function jT(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),i=_o(s.toLowerCase()),a=e.footnoteOrder.indexOf(s);let c,d=e.footnoteCounts.get(s);d===void 0?(d=0,e.footnoteOrder.push(s),c=e.footnoteOrder.length):c=a+1,d+=1,e.footnoteCounts.set(s,d);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,h),e.applyData(t,h)}function ET(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RT(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function R0(e,t){const n=t.referenceType;let s="]";if(n==="collapsed"?s+="[]":n==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const c=i[i.length-1];return c&&c.type==="text"?c.value+=s:i.push({type:"text",value:s}),i}function TT(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return R0(e,t);const i={src:_o(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(i.title=s.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function PT(e,t){const n={src:_o(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function AT(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const s={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,s),e.applyData(t,s)}function DT(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return R0(e,t);const i={href:_o(s.url||"")};s.title!==null&&s.title!==void 0&&(i.title=s.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function LT(e,t){const n={href:_o(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function IT(e,t,n){const s=e.all(t),i=n?OT(n):T0(t),a={},c=[];if(typeof t.checked=="boolean"){const m=s[0];let x;m&&m.type==="element"&&m.tagName==="p"?x=m:(x={type:"element",tagName:"p",properties:{},children:[]},s.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let d=-1;for(;++d<s.length;){const m=s[d];(i||d!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
387
|
+
`}),m.type==="element"&&m.tagName==="p"&&!i?c.push(...m.children):c.push(m)}const p=s[s.length-1];p&&(i||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
388
|
+
`});const h={type:"element",tagName:"li",properties:a,children:c};return e.patch(t,h),e.applyData(t,h)}function OT(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let s=-1;for(;!t&&++s<n.length;)t=T0(n[s])}return t}function T0(e){const t=e.spread;return t??e.children.length>1}function MT(e,t){const n={},s=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<s.length;){const c=s[i];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function _T(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $T(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function zT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FT(e,t){const n=e.all(t),s=n.shift(),i=[];if(s){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],c),i.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Jf(t.children[1]),p=u0(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),i.push(c)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function BT(e,t,n){const s=n?n.children:void 0,a=(s?s.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let p=-1;const h=[];for(;++p<d;){const x=t.children[p],w={},b=c?c[p]:void 0;b&&(w.align=b);let E={type:"element",tagName:a,properties:w,children:[]};x&&(E.children=e.all(x),e.patch(x,E),E=e.applyData(x,E)),h.push(E)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function UT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const mx=9,gx=32;function HT(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),i=0;const a=[];for(;s;)a.push(xx(t.slice(i,s.index),i>0,!0),s[0]),i=s.index+s[0].length,s=n.exec(t);return a.push(xx(t.slice(i),i>0,!1)),a.join("")}function xx(e,t,n){let s=0,i=e.length;if(t){let a=e.codePointAt(s);for(;a===mx||a===gx;)s++,a=e.codePointAt(s)}if(n){let a=e.codePointAt(i-1);for(;a===mx||a===gx;)i--,a=e.codePointAt(i-1)}return i>s?e.slice(s,i):""}function WT(e,t){const n={type:"text",value:HT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function VT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const qT={blockquote:wT,break:kT,code:ST,delete:jT,emphasis:CT,footnoteReference:NT,heading:ET,html:RT,imageReference:TT,image:PT,inlineCode:AT,linkReference:DT,link:LT,listItem:IT,list:MT,paragraph:_T,root:$T,strong:zT,table:FT,tableCell:UT,tableRow:BT,text:WT,thematicBreak:VT,toml:va,yaml:va,definition:va,footnoteDefinition:va};function va(){}const P0=-1,cu=0,Mi=1,Ha=2,op=3,ip=4,lp=5,ap=6,A0=7,D0=8,yx=typeof self=="object"?self:globalThis,GT=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),s=i=>{if(e.has(i))return e.get(i);const[a,c]=t[i];switch(a){case cu:case P0:return n(c,i);case Mi:{const d=n([],i);for(const p of c)d.push(s(p));return d}case Ha:{const d=n({},i);for(const[p,h]of c)d[s(p)]=s(h);return d}case op:return n(new Date(c),i);case ip:{const{source:d,flags:p}=c;return n(new RegExp(d,p),i)}case lp:{const d=n(new Map,i);for(const[p,h]of c)d.set(s(p),s(h));return d}case ap:{const d=n(new Set,i);for(const p of c)d.add(s(p));return d}case A0:{const{name:d,message:p}=c;return n(new yx[d](p),i)}case D0:return n(BigInt(c),i);case"BigInt":return n(Object(BigInt(c)),i);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(new yx[a](c),i)};return s},vx=e=>GT(new Map,e)(0),xo="",{toString:KT}={},{keys:YT}=Object,Pi=e=>{const t=typeof e;if(t!=="object"||!e)return[cu,t];const n=KT.call(e).slice(8,-1);switch(n){case"Array":return[Mi,xo];case"Object":return[Ha,xo];case"Date":return[op,xo];case"RegExp":return[ip,xo];case"Map":return[lp,xo];case"Set":return[ap,xo];case"DataView":return[Mi,n]}return n.includes("Array")?[Mi,n]:n.includes("Error")?[A0,n]:[Ha,n]},ba=([e,t])=>e===cu&&(t==="function"||t==="symbol"),XT=(e,t,n,s)=>{const i=(c,d)=>{const p=s.push(c)-1;return n.set(d,p),p},a=c=>{if(n.has(c))return n.get(c);let[d,p]=Pi(c);switch(d){case cu:{let m=c;switch(p){case"bigint":d=D0,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);m=null;break;case"undefined":return i([P0],c)}return i([d,m],c)}case Mi:{if(p){let w=c;return p==="DataView"?w=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(w=new Uint8Array(c)),i([p,[...w]],c)}const m=[],x=i([d,m],c);for(const w of c)m.push(a(w));return x}case Ha:{if(p)switch(p){case"BigInt":return i([p,c.toString()],c);case"Boolean":case"Number":case"String":return i([p,c.valueOf()],c)}if(t&&"toJSON"in c)return a(c.toJSON());const m=[],x=i([d,m],c);for(const w of YT(c))(e||!ba(Pi(c[w])))&&m.push([a(w),a(c[w])]);return x}case op:return i([d,c.toISOString()],c);case ip:{const{source:m,flags:x}=c;return i([d,{source:m,flags:x}],c)}case lp:{const m=[],x=i([d,m],c);for(const[w,b]of c)(e||!(ba(Pi(w))||ba(Pi(b))))&&m.push([a(w),a(b)]);return x}case ap:{const m=[],x=i([d,m],c);for(const w of c)(e||!ba(Pi(w)))&&m.push(a(w));return x}}const{message:h}=c;return i([d,{name:p,message:h}],c)};return a},bx=(e,{json:t,lossy:n}={})=>{const s=[];return XT(!(t||n),!!t,new Map,s)(e),s},Wa=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?vx(bx(e,t)):structuredClone(e):(e,t)=>vx(bx(e,t));function QT(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function JT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ZT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||QT,s=e.options.footnoteBackLabel||JT,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const m=e.all(h),x=String(h.identifier).toUpperCase(),w=_o(x.toLowerCase());let b=0;const E=[],k=e.footnoteCounts.get(x);for(;k!==void 0&&++b<=k;){E.length>0&&E.push({type:"text",value:" "});let D=typeof n=="string"?n:n(p,b);typeof D=="string"&&(D={type:"text",value:D}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+w+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(p,b),className:["data-footnote-backref"]},children:Array.isArray(D)?D:[D]})}const j=m[m.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const D=j.children[j.children.length-1];D&&D.type==="text"?D.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...E)}else m.push(...E);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+w},children:e.wrap(m,!0)};e.patch(h,S),d.push(S)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Wa(c),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
389
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
390
|
+
`}]}}const L0=(function(e){if(e==null)return rP;if(typeof e=="function")return du(e);if(typeof e=="object")return Array.isArray(e)?eP(e):tP(e);if(typeof e=="string")return nP(e);throw new Error("Expected function, string, or object as test")});function eP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=L0(e[n]);return du(s);function s(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function tP(e){const t=e;return du(n);function n(s){const i=s;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function nP(e){return du(t);function t(n){return n&&n.type===e}}function du(e){return t;function t(n,s,i){return!!(sP(n)&&e.call(this,n,typeof s=="number"?s:void 0,i||void 0))}}function rP(){return!0}function sP(e){return e!==null&&typeof e=="object"&&"type"in e}const I0=[],oP=!0,wx=!1,iP="skip";function lP(e,t,n,s){let i;typeof t=="function"&&typeof n!="function"?(s=n,n=t):i=t;const a=L0(i),c=s?-1:1;d(e,void 0,[])();function d(p,h,m){const x=p&&typeof p=="object"?p:{};if(typeof x.type=="string"){const b=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return w;function w(){let b=I0,E,k,j;if((!t||a(p,h,m[m.length-1]||void 0))&&(b=aP(n(p,m)),b[0]===wx))return b;if("children"in p&&p.children){const S=p;if(S.children&&b[0]!==iP)for(k=(s?S.children.length:-1)+c,j=m.concat(S);k>-1&&k<S.children.length;){const D=S.children[k];if(E=d(D,k,j)(),E[0]===wx)return E;k=typeof E[1]=="number"?E[1]:k+c}}return b}}}function aP(e){return Array.isArray(e)?e:typeof e=="number"?[oP,e]:e==null?I0:[e]}function O0(e,t,n,s){let i,a,c;typeof t=="function"&&typeof n!="function"?(a=void 0,c=t,i=n):(a=t,c=n,i=s),lP(e,a,d,i);function d(p,h){const m=h[h.length-1],x=m?m.children.indexOf(p):void 0;return c(p,x,m)}}const ff={}.hasOwnProperty,uP={};function cP(e,t){const n=t||uP,s=new Map,i=new Map,a=new Map,c={...qT,...n.handlers},d={all:h,applyData:fP,definitionById:s,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:c,one:p,options:n,patch:dP,wrap:hP};return O0(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const x=m.type==="definition"?s:i,w=String(m.identifier).toUpperCase();x.has(w)||x.set(w,m)}}),d;function p(m,x){const w=m.type,b=d.handlers[w];if(ff.call(d.handlers,w)&&b)return b(d,m,x);if(d.options.passThrough&&d.options.passThrough.includes(w)){if("children"in m){const{children:k,...j}=m,S=Wa(j);return S.children=d.all(m),S}return Wa(m)}return(d.options.unknownHandler||pP)(d,m,x)}function h(m){const x=[];if("children"in m){const w=m.children;let b=-1;for(;++b<w.length;){const E=d.one(w[b],m);if(E){if(b&&w[b-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=kx(E.value)),!Array.isArray(E)&&E.type==="element")){const k=E.children[0];k&&k.type==="text"&&(k.value=kx(k.value))}Array.isArray(E)?x.push(...E):x.push(E)}}}return x}}function dP(e,t){e.position&&(t.position=K2(e))}function fP(e,t){let n=t;if(e&&e.data){const s=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const c="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:c}}n.type==="element"&&a&&Object.assign(n.properties,Wa(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function pP(e,t){const n=t.data||{},s="value"in t&&!(ff.call(n,"hProperties")||ff.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function hP(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
|
|
391
|
+
`});++s<e.length;)s&&n.push({type:"text",value:`
|
|
392
|
+
`}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
393
|
+
`}),n}function kx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Sx(e,t){const n=cP(e,t),s=n.one(e,void 0),i=ZT(n),a=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
394
|
+
`},i),a}function mP(e,t){return e&&"run"in e?async function(n,s){const i=Sx(n,{file:s,...t});await e.run(i,s)}:function(n,s){return Sx(n,{file:s,...e||t})}}function jx(e){if(e)throw e}var Cd,Cx;function gP(){if(Cx)return Cd;Cx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),x=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!x)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},c=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},d=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(s)return s(h,m).value}else return;return h[m]};return Cd=function p(){var h,m,x,w,b,E,k=arguments[0],j=1,S=arguments.length,D=!1;for(typeof k=="boolean"&&(D=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<S;++j)if(h=arguments[j],h!=null)for(m in h)x=d(k,m),w=d(h,m),k!==w&&(D&&w&&(a(w)||(b=i(w)))?(b?(b=!1,E=x&&i(x)?x:[]):E=x&&a(x)?x:{},c(k,{name:m,newValue:p(D,E,w)})):typeof w<"u"&&c(k,{name:m,newValue:w}));return k},Cd}var xP=gP();const Nd=eu(xP);function pf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yP(){const e=[],t={run:n,use:s};return t;function n(...i){let a=-1;const c=i.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...i);function d(p,...h){const m=e[++a];let x=-1;if(p){c(p);return}for(;++x<i.length;)(h[x]===null||h[x]===void 0)&&(h[x]=i[x]);i=h,m?vP(m,d)(...h):c(null,...h)}}function s(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function vP(e,t){let n;return s;function s(...c){const d=e.length>c.length;let p;d&&c.push(i);try{p=e.apply(this,c)}catch(h){const m=h;if(d&&n)throw m;return i(m)}d||(p&&p.then&&typeof p.then=="function"?p.then(a,i):p instanceof Error?i(p):a(p))}function i(c,...d){n||(n=!0,t(c,...d))}function a(c){i(null,c)}}const mr={basename:bP,dirname:wP,extname:kP,join:SP,sep:"/"};function bP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rl(e);let n=0,s=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let c=-1,d=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else c<0&&(a=!0,c=i+1),d>-1&&(e.codePointAt(i)===t.codePointAt(d--)?d<0&&(s=i):(d=-1,s=c));return n===s?s=c:s<0&&(s=e.length),e.slice(n,s)}function wP(e){if(rl(e),e.length===0)return".";let t=-1,n=e.length,s;for(;--n;)if(e.codePointAt(n)===47){if(s){t=n;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function kP(e){rl(e);let t=e.length,n=-1,s=0,i=-1,a=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){s=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===s+1?"":e.slice(i,n)}function SP(...e){let t=-1,n;for(;++t<e.length;)rl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":jP(n)}function jP(e){rl(e);const t=e.codePointAt(0)===47;let n=CP(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function CP(e,t){let n="",s=0,i=-1,a=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(i===c-1||a===1))if(i!==c-1&&a===2){if(n.length<2||s!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",s=0):(n=n.slice(0,p),s=n.length-1-n.lastIndexOf("/")),i=c,a=0;continue}}else if(n.length>0){n="",s=0,i=c,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(i+1,c):n=e.slice(i+1,c),s=c-i-1;i=c,a=0}else d===46&&a>-1?a++:a=-1}return n}function rl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const NP={cwd:EP};function EP(){return"/"}function hf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function RP(e){if(typeof e=="string")e=new URL(e);else if(!hf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return TP(e)}function TP(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const s=t.codePointAt(n+2);if(s===70||s===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Ed=["history","path","basename","stem","extname","dirname"];class M0{constructor(t){let n;t?hf(t)?n={path:t}:typeof t=="string"||PP(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":NP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Ed.length;){const a=Ed[s];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Ed.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?mr.basename(this.path):void 0}set basename(t){Td(t,"basename"),Rd(t,"basename"),this.path=mr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?mr.dirname(this.path):void 0}set dirname(t){Nx(this.basename,"dirname"),this.path=mr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?mr.extname(this.path):void 0}set extname(t){if(Rd(t,"extname"),Nx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=mr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hf(t)&&(t=RP(t)),Td(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?mr.basename(this.path,this.extname):void 0}set stem(t){Td(t,"stem"),Rd(t,"stem"),this.path=mr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const i=this.message(t,n,s);throw i.fatal=!0,i}info(t,n,s){const i=this.message(t,n,s);return i.fatal=void 0,i}message(t,n,s){const i=new Jt(t,n,s);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rd(e,t){if(e&&e.includes(mr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+mr.sep+"`")}function Td(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Nx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function PP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const AP=(function(e){const s=this.constructor.prototype,i=s[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,s),a}),DP={}.hasOwnProperty;class up extends AP{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=yP()}copy(){const t=new up;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(Nd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Dd("data",this.frozen),this.namespace[t]=n,this):DP.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Dd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const i=n.call(t,...s);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=wa(t),s=this.parser||this.Parser;return Pd("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),Pd("process",this.parser||this.Parser),Ad("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,c){const d=wa(t),p=s.parse(d);s.run(p,d,function(m,x,w){if(m||!x||!w)return h(m);const b=x,E=s.stringify(b,w);OP(E)?w.value=E:w.result=E,h(m,w)});function h(m,x){m||!x?c(m):a?a(x):n(void 0,x)}}}processSync(t){let n=!1,s;return this.freeze(),Pd("processSync",this.parser||this.Parser),Ad("processSync",this.compiler||this.Compiler),this.process(t,i),Rx("processSync","process",n),s;function i(a,c){n=!0,jx(a),s=c}}run(t,n,s){Ex(t),this.freeze();const i=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?a(void 0,s):new Promise(a);function a(c,d){const p=wa(n);i.run(t,p,h);function h(m,x,w){const b=x||t;m?d(m):c?c(b):s(void 0,b,w)}}}runSync(t,n){let s=!1,i;return this.run(t,n,a),Rx("runSync","run",s),i;function a(c,d){jx(c),i=d,s=!0}}stringify(t,n){this.freeze();const s=wa(n),i=this.compiler||this.Compiler;return Ad("stringify",i),Ex(t),i(t,s)}use(t,...n){const s=this.attachers,i=this.namespace;if(Dd("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...x]=h;p(m,x)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(i.settings=Nd(!0,i.settings,h.settings))}function d(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const x=h[m];a(x)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,m){let x=-1,w=-1;for(;++x<s.length;)if(s[x][0]===h){w=x;break}if(w===-1)s.push([h,...m]);else if(m.length>0){let[b,...E]=m;const k=s[w][1];pf(k)&&pf(b)&&(b=Nd(!0,k,b)),s[w]=[h,b,...E]}}}}const LP=new up().freeze();function Pd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ad(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Dd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ex(e){if(!pf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Rx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wa(e){return IP(e)?e:new M0(e)}function IP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function OP(e){return typeof e=="string"||MP(e)}function MP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _P="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tx=[],Px={allowDangerousHtml:!0},$P=/^(https?|ircs?|mailto|xmpp)$/i,zP=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function FP(e){const t=BP(e),n=UP(e);return HP(t.runSync(t.parse(n),n),e)}function BP(e){const t=e.rehypePlugins||Tx,n=e.remarkPlugins||Tx,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Px}:Px;return LP().use(bT).use(n).use(mP,s).use(t)}function UP(e){const t=e.children||"",n=new M0;return typeof t=="string"&&(n.value=t),n}function HP(e,t){const n=t.allowedElements,s=t.allowElement,i=t.components,a=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||WP;for(const m of zP)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+_P+m.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),O0(e,h),Z2(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function h(m,x,w){if(m.type==="raw"&&w&&typeof x=="number")return c?w.children.splice(x,1):w.children[x]={type:"text",value:m.value},x;if(m.type==="element"){let b;for(b in kd)if(Object.hasOwn(kd,b)&&Object.hasOwn(m.properties,b)){const E=m.properties[b],k=kd[b];(k===null||k.includes(m.tagName))&&(m.properties[b]=p(String(E||""),b,m))}}if(m.type==="element"){let b=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!b&&s&&typeof x=="number"&&(b=!s(m,x,w)),b&&w&&typeof x=="number")return d&&m.children?w.children.splice(x,1,...m.children):w.children.splice(x,1),x}}}function WP(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||s!==-1&&t>s||$P.test(e.slice(0,t))?e:""}function zr({content:e,className:t,emptyState:n="No markdown content yet."}){const s=e.replace(/<!--[\s\S]*?-->/g,"");return s.trim()?l.jsx("div",{className:$e("prose-syntaur max-w-none",t),children:l.jsx(FP,{children:s})}):l.jsx("div",{className:"rounded-md border border-dashed border-border/80 bg-muted/30 px-3 py-4 text-sm text-muted-foreground",children:n})}function Ax(){const{slug:e}=Pt(),t=At(),{data:n,loading:s,error:i,refetch:a}=Nv(e),c=ou(),{data:d}=Wf(),[p,h]=y.useState("overview"),[m,x]=y.useState("board"),[w,b]=y.useState("all"),[E,k]=y.useState("all"),[j,S]=y.useState("all"),D=y.useMemo(()=>n?Object.fromEntries(n.assignments.flatMap(P=>{const z=`${t}/missions/${n.slug}/assignments/${P.slug}`;return[[P.slug,z],[P.title,z]]})):{},[n]);async function A(P){await fetch(`/api/missions/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:P})}),a()}async function M(P){await fetch(`/api/missions/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:P})}),a()}if(s)return l.jsx(kt,{label:"Loading mission workspace…"});if(i||!n)return l.jsx(St,{error:i||"Mission not found."});const _=Array.from(new Set(n.assignments.map(P=>P.assignee).filter(Boolean))).sort(),N=n.assignments.filter(P=>!(w!=="all"&&P.status!==w||E!=="all"&&P.assignee!==E||j!=="all"&&P.priority!==j));return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Ft,{status:n.status}),n.statusOverride&&l.jsx("button",{type:"button",className:"shell-action border-amber-300 text-amber-700 dark:border-amber-700 dark:text-amber-300",onClick:()=>A(null),title:"Clear manual status override and return to derived status",children:"Clear Override"}),l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:P=>{P.target.value&&A(P.target.value)},title:"Override mission status",children:[l.jsx("option",{value:"",children:"Set Status…"}),c.statuses.map(P=>l.jsx("option",{value:P.id,children:P.label},P.id)),l.jsx("option",{value:"active",children:"Active"})]}),d&&d.workspaces.length>0&&l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:P=>{P.target.value==="_ungrouped"?M(null):P.target.value&&M(P.target.value)},title:"Move mission to a different workspace",children:[l.jsx("option",{value:"",children:"Move to Workspace…"}),d.workspaces.filter(P=>P!==n.workspace).map(P=>l.jsx("option",{value:P,children:P},P)),n.workspace&&l.jsx("option",{value:"_ungrouped",children:"Ungrouped"})]}),l.jsxs(we,{className:"shell-action",to:`${t}/missions/${n.slug}/edit`,children:[l.jsx(Ig,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Mission"})]}),l.jsxs(we,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/missions/${n.slug}/create/assignment`,children:[l.jsx(tr,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",Br(n.created),". Last source update ",Rn(n.updated),"."]})]}),l.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:[l.jsx(tt,{label:"Assignments",value:n.progress.total}),l.jsx(tt,{label:"In Progress",value:n.progress.in_progress??0,tone:"info"}),l.jsx(tt,{label:"Review",value:n.progress.review??0,tone:"info"}),l.jsx(tt,{label:"Blocked",value:n.progress.blocked??0,tone:"warn"}),l.jsx(tt,{label:"Completed",value:n.progress.completed??0,tone:"success"})]}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[l.jsx("div",{className:"space-y-4",children:l.jsx(t0,{value:p,onValueChange:h,items:[{value:"overview",label:"Overview",content:l.jsx("div",{className:"space-y-5",children:l.jsx(Le,{title:"Mission Overview",children:l.jsx(zr,{content:n.body,emptyState:"This mission does not have overview content yet."})})})},{value:"assignments",label:"Assignments",count:n.assignments.length,content:l.jsx("div",{className:"space-y-5",children:l.jsx(Le,{title:"Assignment Queue",description:"Board and table views over the source assignment files.",actions:l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("select",{value:w,onChange:P=>b(P.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),c.statuses.map(P=>l.jsx("option",{value:P.id,children:P.label},P.id))]}),l.jsxs("select",{value:E,onChange:P=>k(P.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),_.map(P=>l.jsx("option",{value:P??"",children:P},P))]}),l.jsxs("select",{value:j,onChange:P=>S(P.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All priorities"}),l.jsx("option",{value:"low",children:"Low"}),l.jsx("option",{value:"medium",children:"Medium"}),l.jsx("option",{value:"high",children:"High"}),l.jsx("option",{value:"critical",children:"Critical"})]}),l.jsx(Gf,{value:m,onChange:P=>x(P),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:N.length===0?l.jsx(xt,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this mission.",actions:l.jsx(we,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/missions/${n.slug}/create/assignment`,children:"Create Assignment"})}):m==="board"?l.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:N.map(P=>l.jsx(VP,{missionSlug:n.slug,assignment:P},P.slug))}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx("th",{className:"pb-3 font-medium",children:"Assignment"}),l.jsx("th",{className:"pb-3 font-medium",children:"Status"}),l.jsx("th",{className:"pb-3 font-medium",children:"Priority"}),l.jsx("th",{className:"pb-3 font-medium",children:"Assignee"}),l.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),l.jsx("tbody",{children:N.map(P=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsx("td",{className:"py-4",children:l.jsx(we,{to:`${t}/missions/${n.slug}/assignments/${P.slug}`,className:"font-semibold text-foreground hover:text-primary",children:P.title})}),l.jsx("td",{className:"py-4",children:l.jsx(Ft,{status:P.status})}),l.jsx("td",{className:"py-4 capitalize text-muted-foreground",children:P.priority}),l.jsx("td",{className:"py-4 text-muted-foreground",children:P.assignee??"—"}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Br(P.updated)})]},P.slug))})]})})})})},{value:"dependencies",label:"Dependencies",content:n.dependencyGraph?l.jsx(Le,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:l.jsx(S2,{definition:n.dependencyGraph,nodeRoutes:D})}):l.jsx(xt,{title:"No dependency graph yet",description:"Dependencies appear here once assignments declare dependsOn relationships."})},{value:"knowledge",label:"Knowledge",content:l.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[l.jsx(Le,{title:"Resources",description:"Shared mission references.",children:n.resources.length===0?l.jsx(xt,{title:"No resources yet",description:"Resources live at the mission level and stay available to every assignment."}):l.jsx("div",{className:"space-y-3",children:n.resources.map(P=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:P.name}),l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[P.category," · ",P.source]})]},P.slug))})}),l.jsx(Le,{title:"Memories",description:"Learnings and patterns captured during the mission.",children:n.memories.length===0?l.jsx(xt,{title:"No memories yet",description:"Memories capture patterns discovered during execution so later assignments can reuse them."}):l.jsx("div",{className:"space-y-3",children:n.memories.map(P=>l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:P.name}),l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[P.scope," · ",P.source]})]},P.slug))})})]})}]})}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(Le,{title:"Progress Summary",children:l.jsx(Ua,{progress:n.progress,showLegend:!0})}),l.jsx(Le,{title:"Attention",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Blocked"}),l.jsx("dd",{className:"font-semibold text-foreground",children:n.needsAttention.blockedCount})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Failed"}),l.jsx("dd",{className:"font-semibold text-foreground",children:n.needsAttention.failedCount})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("dt",{className:"text-muted-foreground",children:"Unanswered questions"}),l.jsx("dd",{className:"font-semibold text-foreground",children:n.needsAttention.unansweredQuestions})]})]})}),l.jsx(Le,{title:"Quick Links",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/missions/${n.slug}/edit`,children:[l.jsx(Ig,{className:"h-4 w-4"}),"Edit mission source"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/missions/${n.slug}/create/assignment`,children:[l.jsx(tr,{className:"h-4 w-4"}),"Create assignment"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(tv,{className:"h-4 w-4"}),"Review mission rules"]}),l.jsxs("button",{type:"button",onClick:()=>h("dependencies"),className:"flex items-center gap-2 text-primary hover:underline",children:[l.jsx(iv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),n.archived?l.jsxs(Le,{title:"Archive Metadata",children:[l.jsxs("p",{className:"text-sm leading-6 text-muted-foreground",children:["Archived ",n.archivedAt?Rn(n.archivedAt):"with no timestamp recorded","."]}),n.archivedReason?l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:n.archivedReason}):null]}):null]})]})]})}function VP({missionSlug:e,assignment:t}){const n=At();return l.jsxs(we,{to:`${n}/missions/${e}/assignments/${t.slug}`,className:"block rounded-lg border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:t.title}),l.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:t.id,children:[t.id.slice(0,8),l.jsx("span",{onClick:s=>{s.preventDefault(),s.stopPropagation()},children:l.jsx(vs,{value:t.id})})]}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Br(t.updated)]})]}),l.jsx(Ft,{status:t.status})]}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:t.priority}),l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:t.assignee??"Unassigned"}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[t.dependsOn.length," dependencies"]})]})]})}function qP(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e);y.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var GP="DismissableLayer",mf="dismissableLayer.update",KP="dismissableLayer.pointerDownOutside",YP="dismissableLayer.focusOutside",Dx,_0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cp=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:d,...p}=e,h=y.useContext(_0),[m,x]=y.useState(null),w=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=y.useState({}),E=Qt(t,P=>x(P)),k=Array.from(h.layers),[j]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(j),D=m?k.indexOf(m):-1,A=h.layersWithOutsidePointerEventsDisabled.size>0,M=D>=S,_=JP(P=>{const z=P.target,q=[...h.branches].some(T=>T.contains(z));!M||q||(i==null||i(P),c==null||c(P),P.defaultPrevented||d==null||d())},w),N=ZP(P=>{const z=P.target;[...h.branches].some(T=>T.contains(z))||(a==null||a(P),c==null||c(P),P.defaultPrevented||d==null||d())},w);return qP(P=>{D===h.layers.size-1&&(s==null||s(P),!P.defaultPrevented&&d&&(P.preventDefault(),d()))},w),y.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Dx=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),Lx(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Dx)}},[m,w,n,h]),y.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),Lx())},[m,h]),y.useEffect(()=>{const P=()=>b({});return document.addEventListener(mf,P),()=>document.removeEventListener(mf,P)},[]),l.jsx(jt.div,{...p,ref:E,style:{pointerEvents:A?M?"auto":"none":void 0,...e.style},onFocusCapture:st(e.onFocusCapture,N.onFocusCapture),onBlurCapture:st(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:st(e.onPointerDownCapture,_.onPointerDownCapture)})});cp.displayName=GP;var XP="DismissableLayerBranch",QP=y.forwardRef((e,t)=>{const n=y.useContext(_0),s=y.useRef(null),i=Qt(t,s);return y.useEffect(()=>{const a=s.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(jt.div,{...e,ref:i})});QP.displayName=XP;function JP(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e),s=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const a=d=>{if(d.target&&!s.current){let p=function(){$0(KP,n,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=p,t.addEventListener("click",i.current,{once:!0})):p()}else t.removeEventListener("click",i.current);s.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function ZP(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e),s=y.useRef(!1);return y.useEffect(()=>{const i=a=>{a.target&&!s.current&&$0(YP,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Lx(){const e=new CustomEvent(mf);document.dispatchEvent(e)}function $0(e,t,n,{discrete:s}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?KN(i,a):i.dispatchEvent(a)}var Ld="focusScope.autoFocusOnMount",Id="focusScope.autoFocusOnUnmount",Ix={bubbles:!1,cancelable:!0},eA="FocusScope",z0=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...c}=e,[d,p]=y.useState(null),h=Bs(i),m=Bs(a),x=y.useRef(null),w=Qt(t,k=>p(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(s){let k=function(A){if(b.paused||!d)return;const M=A.target;d.contains(M)?x.current=M:gs(x.current,{select:!0})},j=function(A){if(b.paused||!d)return;const M=A.relatedTarget;M!==null&&(d.contains(M)||gs(x.current,{select:!0}))},S=function(A){if(document.activeElement===document.body)for(const _ of A)_.removedNodes.length>0&&gs(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",j);const D=new MutationObserver(S);return d&&D.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",j),D.disconnect()}}},[s,d,b.paused]),y.useEffect(()=>{if(d){Mx.add(b);const k=document.activeElement;if(!d.contains(k)){const S=new CustomEvent(Ld,Ix);d.addEventListener(Ld,h),d.dispatchEvent(S),S.defaultPrevented||(tA(iA(F0(d)),{select:!0}),document.activeElement===k&&gs(d))}return()=>{d.removeEventListener(Ld,h),setTimeout(()=>{const S=new CustomEvent(Id,Ix);d.addEventListener(Id,m),d.dispatchEvent(S),S.defaultPrevented||gs(k??document.body,{select:!0}),d.removeEventListener(Id,m),Mx.remove(b)},0)}}},[d,h,m,b]);const E=y.useCallback(k=>{if(!n&&!s||b.paused)return;const j=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,S=document.activeElement;if(j&&S){const D=k.currentTarget,[A,M]=nA(D);A&&M?!k.shiftKey&&S===M?(k.preventDefault(),n&&gs(A,{select:!0})):k.shiftKey&&S===A&&(k.preventDefault(),n&&gs(M,{select:!0})):S===D&&k.preventDefault()}},[n,s,b.paused]);return l.jsx(jt.div,{tabIndex:-1,...c,ref:w,onKeyDown:E})});z0.displayName=eA;function tA(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(gs(s,{select:t}),document.activeElement!==n)return}function nA(e){const t=F0(e),n=Ox(t,e),s=Ox(t.reverse(),e);return[n,s]}function F0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ox(e,t){for(const n of e)if(!rA(n,{upTo:t}))return n}function rA(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function sA(e){return e instanceof HTMLInputElement&&"select"in e}function gs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sA(e)&&t&&e.select()}}var Mx=oA();function oA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=_x(e,t),e.unshift(t)},remove(t){var n;e=_x(e,t),(n=e[0])==null||n.resume()}}}function _x(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function iA(e){return e.filter(t=>t.tagName!=="A")}var lA="Portal",dp=y.forwardRef((e,t)=>{var d;const{container:n,...s}=e,[i,a]=y.useState(!1);bs(()=>a(!0),[]);const c=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?Pj.createPortal(l.jsx(jt.div,{...s,ref:t}),c):null});dp.displayName=lA;var Od=0;function aA(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$x()),document.body.insertAdjacentElement("beforeend",e[1]??$x()),Od++,()=>{Od===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Od--}},[])}function $x(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var xr=function(){return xr=Object.assign||function(t){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},xr.apply(this,arguments)};function B0(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]]);return n}function uA(e,t,n){if(n||arguments.length===2)for(var s=0,i=t.length,a;s<i;s++)(a||!(s in t))&&(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))}var Oa="right-scroll-bar-position",Ma="width-before-scroll-bar",cA="with-scroll-bars-hidden",dA="--removed-body-scroll-bar-size";function Md(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fA(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=t,n.facade}var pA=typeof window<"u"?y.useLayoutEffect:y.useEffect,zx=new WeakMap;function hA(e,t){var n=fA(null,function(s){return e.forEach(function(i){return Md(i,s)})});return pA(function(){var s=zx.get(n);if(s){var i=new Set(s),a=new Set(e),c=n.current;i.forEach(function(d){a.has(d)||Md(d,null)}),a.forEach(function(d){i.has(d)||Md(d,c)})}zx.set(n,e)},[e]),n}function mA(e){return e}function gA(e,t){t===void 0&&(t=mA);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,s);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(a){for(s=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(d){return a(d)},filter:function(){return n}}},assignMedium:function(a){s=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(a),c=n}var p=function(){var m=c;c=[],m.forEach(a)},h=function(){return Promise.resolve().then(p)};h(),n={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),n}}}};return i}function xA(e){e===void 0&&(e={});var t=gA(null);return t.options=xr({async:!0,ssr:!1},e),t}var U0=function(e){var t=e.sideCar,n=B0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return y.createElement(s,xr({},n))};U0.isSideCarExport=!0;function yA(e,t){return e.useMedium(t),U0}var H0=xA(),_d=function(){},fu=y.forwardRef(function(e,t){var n=y.useRef(null),s=y.useState({onScrollCapture:_d,onWheelCapture:_d,onTouchMoveCapture:_d}),i=s[0],a=s[1],c=e.forwardProps,d=e.children,p=e.className,h=e.removeScrollBar,m=e.enabled,x=e.shards,w=e.sideCar,b=e.noRelative,E=e.noIsolation,k=e.inert,j=e.allowPinchZoom,S=e.as,D=S===void 0?"div":S,A=e.gapMode,M=B0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=w,N=hA([n,t]),P=xr(xr({},M),i);return y.createElement(y.Fragment,null,m&&y.createElement(_,{sideCar:H0,removeScrollBar:h,shards:x,noRelative:b,noIsolation:E,inert:k,setCallbacks:a,allowPinchZoom:!!j,lockRef:n,gapMode:A}),c?y.cloneElement(y.Children.only(d),xr(xr({},P),{ref:N})):y.createElement(D,xr({},P,{className:p,ref:N}),d))});fu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fu.classNames={fullWidth:Ma,zeroRight:Oa};var vA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vA();return t&&e.setAttribute("nonce",t),e}function wA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var SA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bA())&&(wA(t,n),kA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jA=function(){var e=SA();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},W0=function(){var e=jA(),t=function(n){var s=n.styles,i=n.dynamic;return e(s,i),null};return t},CA={left:0,top:0,right:0,gap:0},$d=function(e){return parseInt(e||"",10)||0},NA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[$d(n),$d(s),$d(i)]},EA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return CA;var t=NA(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},RA=W0(),No="data-scroll-locked",TA=function(e,t,n,s){var i=e.left,a=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
395
|
+
.`.concat(cA,` {
|
|
396
|
+
overflow: hidden `).concat(s,`;
|
|
397
|
+
padding-right: `).concat(d,"px ").concat(s,`;
|
|
398
|
+
}
|
|
399
|
+
body[`).concat(No,`] {
|
|
400
|
+
overflow: hidden `).concat(s,`;
|
|
401
|
+
overscroll-behavior: contain;
|
|
402
|
+
`).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&`
|
|
403
|
+
padding-left: `.concat(i,`px;
|
|
404
|
+
padding-top: `).concat(a,`px;
|
|
405
|
+
padding-right: `).concat(c,`px;
|
|
406
|
+
margin-left:0;
|
|
407
|
+
margin-top:0;
|
|
408
|
+
margin-right: `).concat(d,"px ").concat(s,`;
|
|
409
|
+
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.`).concat(Oa,` {
|
|
413
|
+
right: `).concat(d,"px ").concat(s,`;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.`).concat(Ma,` {
|
|
417
|
+
margin-right: `).concat(d,"px ").concat(s,`;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.`).concat(Oa," .").concat(Oa,` {
|
|
421
|
+
right: 0 `).concat(s,`;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.`).concat(Ma," .").concat(Ma,` {
|
|
425
|
+
margin-right: 0 `).concat(s,`;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
body[`).concat(No,`] {
|
|
429
|
+
`).concat(dA,": ").concat(d,`px;
|
|
430
|
+
}
|
|
431
|
+
`)},Fx=function(){var e=parseInt(document.body.getAttribute(No)||"0",10);return isFinite(e)?e:0},PA=function(){y.useEffect(function(){return document.body.setAttribute(No,(Fx()+1).toString()),function(){var e=Fx()-1;e<=0?document.body.removeAttribute(No):document.body.setAttribute(No,e.toString())}},[])},AA=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;PA();var a=y.useMemo(function(){return EA(i)},[i]);return y.createElement(RA,{styles:TA(a,!t,i,n?"":"!important")})},gf=!1;if(typeof window<"u")try{var ka=Object.defineProperty({},"passive",{get:function(){return gf=!0,!0}});window.addEventListener("test",ka,ka),window.removeEventListener("test",ka,ka)}catch{gf=!1}var yo=gf?{passive:!1}:!1,DA=function(e){return e.tagName==="TEXTAREA"},V0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!DA(e)&&n[t]==="visible")},LA=function(e){return V0(e,"overflowY")},IA=function(e){return V0(e,"overflowX")},Bx=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=q0(e,s);if(i){var a=G0(e,s),c=a[1],d=a[2];if(c>d)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},OA=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},MA=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},q0=function(e,t){return e==="v"?LA(t):IA(t)},G0=function(e,t){return e==="v"?OA(t):MA(t)},_A=function(e,t){return e==="h"&&t==="rtl"?-1:1},$A=function(e,t,n,s,i){var a=_A(e,window.getComputedStyle(t).direction),c=a*s,d=n.target,p=t.contains(d),h=!1,m=c>0,x=0,w=0;do{if(!d)break;var b=G0(e,d),E=b[0],k=b[1],j=b[2],S=k-j-a*E;(E||S)&&q0(e,d)&&(x+=S,w+=E);var D=d.parentNode;d=D&&D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?D.host:D}while(!p&&d!==document.body||p&&(t.contains(d)||t===d));return(m&&Math.abs(x)<1||!m&&Math.abs(w)<1)&&(h=!0),h},Sa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ux=function(e){return[e.deltaX,e.deltaY]},Hx=function(e){return e&&"current"in e?e.current:e},zA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},FA=function(e){return`
|
|
432
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
433
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
434
|
+
`)},BA=0,vo=[];function UA(e){var t=y.useRef([]),n=y.useRef([0,0]),s=y.useRef(),i=y.useState(BA++)[0],a=y.useState(W0)[0],c=y.useRef(e);y.useEffect(function(){c.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=uA([e.lockRef.current],(e.shards||[]).map(Hx),!0).filter(Boolean);return k.forEach(function(j){return j.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=y.useCallback(function(k,j){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!c.current.allowPinchZoom;var S=Sa(k),D=n.current,A="deltaX"in k?k.deltaX:D[0]-S[0],M="deltaY"in k?k.deltaY:D[1]-S[1],_,N=k.target,P=Math.abs(A)>Math.abs(M)?"h":"v";if("touches"in k&&P==="h"&&N.type==="range")return!1;var z=window.getSelection(),q=z&&z.anchorNode,T=q?q===N||q.contains(N):!1;if(T)return!1;var I=Bx(P,N);if(!I)return!0;if(I?_=P:(_=P==="v"?"h":"v",I=Bx(P,N)),!I)return!1;if(!s.current&&"changedTouches"in k&&(A||M)&&(s.current=_),!_)return!0;var B=s.current||_;return $A(B,j,k,B==="h"?A:M)},[]),p=y.useCallback(function(k){var j=k;if(!(!vo.length||vo[vo.length-1]!==a)){var S="deltaY"in j?Ux(j):Sa(j),D=t.current.filter(function(_){return _.name===j.type&&(_.target===j.target||j.target===_.shadowParent)&&zA(_.delta,S)})[0];if(D&&D.should){j.cancelable&&j.preventDefault();return}if(!D){var A=(c.current.shards||[]).map(Hx).filter(Boolean).filter(function(_){return _.contains(j.target)}),M=A.length>0?d(j,A[0]):!c.current.noIsolation;M&&j.cancelable&&j.preventDefault()}}},[]),h=y.useCallback(function(k,j,S,D){var A={name:k,delta:j,target:S,should:D,shadowParent:HA(S)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(M){return M!==A})},1)},[]),m=y.useCallback(function(k){n.current=Sa(k),s.current=void 0},[]),x=y.useCallback(function(k){h(k.type,Ux(k),k.target,d(k,e.lockRef.current))},[]),w=y.useCallback(function(k){h(k.type,Sa(k),k.target,d(k,e.lockRef.current))},[]);y.useEffect(function(){return vo.push(a),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:w}),document.addEventListener("wheel",p,yo),document.addEventListener("touchmove",p,yo),document.addEventListener("touchstart",m,yo),function(){vo=vo.filter(function(k){return k!==a}),document.removeEventListener("wheel",p,yo),document.removeEventListener("touchmove",p,yo),document.removeEventListener("touchstart",m,yo)}},[]);var b=e.removeScrollBar,E=e.inert;return y.createElement(y.Fragment,null,E?y.createElement(a,{styles:FA(i)}):null,b?y.createElement(AA,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HA(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const WA=yA(H0,UA);var K0=y.forwardRef(function(e,t){return y.createElement(fu,xr({},e,{ref:t,sideCar:WA}))});K0.classNames=fu.classNames;var VA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bo=new WeakMap,ja=new WeakMap,Ca={},zd=0,Y0=function(e){return e&&(e.host||Y0(e.parentNode))},qA=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=Y0(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},GA=function(e,t,n,s){var i=qA(t,Array.isArray(e)?e:[e]);Ca[n]||(Ca[n]=new WeakMap);var a=Ca[n],c=[],d=new Set,p=new Set(i),h=function(x){!x||d.has(x)||(d.add(x),h(x.parentNode))};i.forEach(h);var m=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(w){if(d.has(w))m(w);else try{var b=w.getAttribute(s),E=b!==null&&b!=="false",k=(bo.get(w)||0)+1,j=(a.get(w)||0)+1;bo.set(w,k),a.set(w,j),c.push(w),k===1&&E&&ja.set(w,!0),j===1&&w.setAttribute(n,"true"),E||w.setAttribute(s,"true")}catch(S){console.error("aria-hidden: cannot operate on ",w,S)}})};return m(t),d.clear(),zd++,function(){c.forEach(function(x){var w=bo.get(x)-1,b=a.get(x)-1;bo.set(x,w),a.set(x,b),w||(ja.has(x)||x.removeAttribute(s),ja.delete(x)),b||x.removeAttribute(n)}),zd--,zd||(bo=new WeakMap,bo=new WeakMap,ja=new WeakMap,Ca={})}},KA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=VA(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),GA(s,i,n,"aria-hidden")):function(){return null}};function YA(e){const t=XA(e),n=y.forwardRef((s,i)=>{const{children:a,...c}=s,d=y.Children.toArray(a),p=d.find(JA);if(p){const h=p.props.children,m=d.map(x=>x===p?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...c,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function XA(e){const t=y.forwardRef((n,s)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const c=e3(i),d=ZA(a,i.props);return i.type!==y.Fragment&&(d.ref=s?iu(s,c):c),y.cloneElement(i,d)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var QA=Symbol("radix.slottable");function JA(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===QA}function ZA(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function e3(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pu="Dialog",[X0,Q0]=Ws(pu),[t3,ir]=X0(pu),J0=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,d=y.useRef(null),p=y.useRef(null),[h,m]=lu({prop:s,defaultProp:i??!1,onChange:a,caller:pu});return l.jsx(t3,{scope:t,triggerRef:d,contentRef:p,contentId:So(),titleId:So(),descriptionId:So(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(x=>!x),[m]),modal:c,children:n})};J0.displayName=pu;var Z0="DialogTrigger",eb=y.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=ir(Z0,n),a=Qt(t,i.triggerRef);return l.jsx(jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":hp(i.open),...s,ref:a,onClick:st(e.onClick,i.onOpenToggle)})});eb.displayName=Z0;var fp="DialogPortal",[n3,tb]=X0(fp,{forceMount:void 0}),nb=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,a=ir(fp,t);return l.jsx(n3,{scope:t,forceMount:n,children:y.Children.map(s,c=>l.jsx(Vs,{present:n||a.open,children:l.jsx(dp,{asChild:!0,container:i,children:c})}))})};nb.displayName=fp;var Va="DialogOverlay",rb=y.forwardRef((e,t)=>{const n=tb(Va,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,a=ir(Va,e.__scopeDialog);return a.modal?l.jsx(Vs,{present:s||a.open,children:l.jsx(s3,{...i,ref:t})}):null});rb.displayName=Va;var r3=YA("DialogOverlay.RemoveScroll"),s3=y.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=ir(Va,n);return l.jsx(K0,{as:r3,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(jt.div,{"data-state":hp(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),Us="DialogContent",sb=y.forwardRef((e,t)=>{const n=tb(Us,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,a=ir(Us,e.__scopeDialog);return l.jsx(Vs,{present:s||a.open,children:a.modal?l.jsx(o3,{...i,ref:t}):l.jsx(i3,{...i,ref:t})})});sb.displayName=Us;var o3=y.forwardRef((e,t)=>{const n=ir(Us,e.__scopeDialog),s=y.useRef(null),i=Qt(t,n.contentRef,s);return y.useEffect(()=>{const a=s.current;if(a)return KA(a)},[]),l.jsx(ob,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:st(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:st(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&a.preventDefault()}),onFocusOutside:st(e.onFocusOutside,a=>a.preventDefault())})}),i3=y.forwardRef((e,t)=>{const n=ir(Us,e.__scopeDialog),s=y.useRef(!1),i=y.useRef(!1);return l.jsx(ob,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(s.current||(d=n.triggerRef.current)==null||d.focus(),a.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:a=>{var p,h;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=a.target;((h=n.triggerRef.current)==null?void 0:h.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),ob=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,...c}=e,d=ir(Us,n),p=y.useRef(null),h=Qt(t,p);return aA(),l.jsxs(l.Fragment,{children:[l.jsx(z0,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(cp,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":hp(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(a3,{titleId:d.titleId}),l.jsx(c3,{contentRef:p,descriptionId:d.descriptionId})]})]})}),pp="DialogTitle",ib=y.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=ir(pp,n);return l.jsx(jt.h2,{id:i.titleId,...s,ref:t})});ib.displayName=pp;var lb="DialogDescription",ab=y.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=ir(lb,n);return l.jsx(jt.p,{id:i.descriptionId,...s,ref:t})});ab.displayName=lb;var ub="DialogClose",cb=y.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=ir(ub,n);return l.jsx(jt.button,{type:"button",...s,ref:t,onClick:st(e.onClick,()=>i.onOpenChange(!1))})});cb.displayName=ub;function hp(e){return e?"open":"closed"}var db="DialogTitleWarning",[l3,fb]=AN(db,{contentName:Us,titleName:pp,docsSlug:"dialog"}),a3=({titleId:e})=>{const t=fb(db),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
435
|
+
|
|
436
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
437
|
+
|
|
438
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},u3="DialogDescriptionWarning",c3=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fb(u3).contentName}}.`;return y.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},pb=J0,d3=eb,hb=nb,mp=rb,gp=sb,xp=ib,yp=ab,mb=cb;const f3=pb,p3=hb,gb=y.forwardRef(({className:e,...t},n)=>l.jsx(mp,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));gb.displayName=mp.displayName;const xb=y.forwardRef(({className:e,children:t,...n},s)=>l.jsxs(p3,{children:[l.jsx(gb,{}),l.jsx(gp,{ref:s,className:$e("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...n,children:t})]}));xb.displayName=gp.displayName;function h3({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function m3({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const yb=y.forwardRef(({className:e,...t},n)=>l.jsx(xp,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));yb.displayName=xp.displayName;const vb=y.forwardRef(({className:e,...t},n)=>l.jsx(yp,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));vb.displayName=yp.displayName;function bb({open:e,action:t,assignmentTitle:n,loading:s=!1,onConfirm:i,onOpenChange:a}){const[c,d]=y.useState("");y.useEffect(()=>{e||d("")},[e,t==null?void 0:t.command]);const p=y.useMemo(()=>t&&t.command==="block"?"Blocked Reason":"Reason",[t]);if(!t)return null;const h=`${t.label} "${n}"`,m=s?"Applying...":t.label,x=c.trim()||void 0;return l.jsx(f3,{open:e,onOpenChange:w=>s?void 0:a(w),children:l.jsx(xb,{className:"max-w-xl",children:l.jsxs("form",{className:"space-y-5",onSubmit:w=>{w.preventDefault(),i(x)},children:[l.jsxs(h3,{children:[l.jsx(yb,{children:h}),l.jsx(vb,{children:t.description})]}),t.warning?l.jsx("div",{className:"rounded-lg border border-amber-300/80 bg-amber-50/80 px-4 py-3 text-sm text-amber-900 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-200",children:t.warning}):null,l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:p}),l.jsx("textarea",{value:c,onChange:w=>d(w.target.value),autoFocus:!0,rows:4,disabled:s,placeholder:"Optional context for why this assignment is blocked.",className:"editor-textarea min-h-[120px] bg-background/95 font-sans"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave this blank to continue without a written reason."})]}),l.jsxs(m3,{children:[l.jsx("button",{type:"button",onClick:()=>a(!1),disabled:s,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),l.jsx("button",{type:"submit",disabled:s,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:m})]})]})})})}var g3=Symbol("radix.slottable");function x3(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=g3,t}var wb="AlertDialog",[y3]=Ws(wb,[Q0]),Wr=Q0(),kb=e=>{const{__scopeAlertDialog:t,...n}=e,s=Wr(t);return l.jsx(pb,{...s,...n,modal:!0})};kb.displayName=wb;var v3="AlertDialogTrigger",b3=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=Wr(n);return l.jsx(d3,{...i,...s,ref:t})});b3.displayName=v3;var w3="AlertDialogPortal",Sb=e=>{const{__scopeAlertDialog:t,...n}=e,s=Wr(t);return l.jsx(hb,{...s,...n})};Sb.displayName=w3;var k3="AlertDialogOverlay",jb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=Wr(n);return l.jsx(mp,{...i,...s,ref:t})});jb.displayName=k3;var Eo="AlertDialogContent",[S3,j3]=y3(Eo),C3=x3("AlertDialogContent"),Cb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:s,...i}=e,a=Wr(n),c=y.useRef(null),d=Qt(t,c),p=y.useRef(null);return l.jsx(l3,{contentName:Eo,titleName:Nb,docsSlug:"alert-dialog",children:l.jsx(S3,{scope:n,cancelRef:p,children:l.jsxs(gp,{role:"alertdialog",...a,...i,ref:d,onOpenAutoFocus:st(i.onOpenAutoFocus,h=>{var m;h.preventDefault(),(m=p.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[l.jsx(C3,{children:s}),l.jsx(E3,{contentRef:c})]})})})});Cb.displayName=Eo;var Nb="AlertDialogTitle",Eb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=Wr(n);return l.jsx(xp,{...i,...s,ref:t})});Eb.displayName=Nb;var Rb="AlertDialogDescription",Tb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=Wr(n);return l.jsx(yp,{...i,...s,ref:t})});Tb.displayName=Rb;var N3="AlertDialogAction",Pb=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=Wr(n);return l.jsx(mb,{...i,...s,ref:t})});Pb.displayName=N3;var Ab="AlertDialogCancel",Db=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,{cancelRef:i}=j3(Ab,n),a=Wr(n),c=Qt(t,i);return l.jsx(mb,{...a,...s,ref:c})});Db.displayName=Ab;var E3=({contentRef:e})=>{const t=`\`${Eo}\` requires a description for the component to be accessible for screen reader users.
|
|
439
|
+
|
|
440
|
+
You can add a description to the \`${Eo}\` by passing a \`${Rb}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
441
|
+
|
|
442
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Eo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
443
|
+
|
|
444
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},R3=kb,T3=Sb,Lb=jb,Ib=Cb,Ob=Pb,Mb=Db,_b=Eb,$b=Tb;const P3=R3,A3=T3,zb=y.forwardRef(({className:e,...t},n)=>l.jsx(Lb,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));zb.displayName=Lb.displayName;const Fb=y.forwardRef(({className:e,...t},n)=>l.jsxs(A3,{children:[l.jsx(zb,{}),l.jsx(Ib,{ref:n,className:$e("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...t})]}));Fb.displayName=Ib.displayName;function D3({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function L3({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const Bb=y.forwardRef(({className:e,...t},n)=>l.jsx(_b,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));Bb.displayName=_b.displayName;const Ub=y.forwardRef(({className:e,...t},n)=>l.jsx($b,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));Ub.displayName=$b.displayName;const Hb=y.forwardRef(({className:e,...t},n)=>l.jsx(Ob,{ref:n,className:$e(e),...t}));Hb.displayName=Ob.displayName;const Wb=y.forwardRef(({className:e,...t},n)=>l.jsx(Mb,{ref:n,className:$e(e),...t}));Wb.displayName=Mb.displayName;function Vb({open:e,title:t,description:n,confirmLabel:s,cancelLabel:i="Cancel",loading:a=!1,destructive:c=!1,onConfirm:d,onOpenChange:p}){return l.jsx(P3,{open:e,onOpenChange:h=>a?void 0:p(h),children:l.jsxs(Fb,{children:[l.jsxs(D3,{children:[l.jsx(Bb,{children:t}),l.jsx(Ub,{children:n})]}),l.jsxs(L3,{children:[l.jsx(Wb,{disabled:a,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:i}),l.jsx(Hb,{disabled:a,className:`shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50 ${c?"border-destructive/80 bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-foreground text-background hover:opacity-90"}`,onClick:h=>{h.preventDefault(),d()},children:a?"Working...":s})]})]})})}async function qb(e,t,n,s){const i=await fetch(`/api/missions/${e}/assignments/${t}/transitions/${n.command}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s?{reason:s}:{})}),a=await i.json().catch(()=>null);if(!i.ok)throw new Error((a==null?void 0:a.error)||`HTTP ${i.status}`);return a.assignment}async function Gb(e,t,n){const s=await fetch(`/api/missions/${e}/assignments/${t}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:n})}),i=await s.json().catch(()=>null);if(!s.ok)throw new Error((i==null?void 0:i.error)||`HTTP ${s.status}`);return i.assignment}async function I3(e,t){const n=await fetch(`/api/missions/${e}/assignments/${t}`,{method:"DELETE"}),s=await n.json().catch(()=>null);if(!n.ok)throw new Error((s==null?void 0:s.error)||`HTTP ${n.status}`)}function Kb(e){return e.requiresReason||e.command==="block"}function O3(e){const t=e.split(`
|
|
445
|
+
`),n=t.findIndex(c=>/^##\s+Acceptance Criteria\s*$/i.test(c.trim()));if(n===-1)return{acceptanceCriteria:[],summaryBody:e};let s=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){s=c;break}const i=t.slice(n+1,s).map(c=>c.match(/^\s*[-*]\s+\[( |x|X)\]\s+(.*)$/)).filter(c=>!!c).map(c=>({checked:c[1].toLowerCase()==="x",text:c[2].trim()})),a=[...t.slice(0,n),...t.slice(s)].join(`
|
|
446
|
+
`).replace(/\n{3,}/g,`
|
|
447
|
+
|
|
448
|
+
`).trim();return{acceptanceCriteria:i,summaryBody:a}}function M3({missionSlug:e,dependencies:t,blockedReason:n}){const[s,i]=y.useState(!1);if(t.length===0)return null;const a=t.filter(d=>d.status!=="completed"&&d.status!=="review"),c=a.length===0;return c&&!s?l.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex w-full items-center gap-2 rounded-lg border border-emerald-200 bg-emerald-50/50 px-4 py-2.5 text-left transition hover:bg-emerald-50 dark:border-emerald-900 dark:bg-emerald-950/20 dark:hover:bg-emerald-950/30",children:[l.jsx(sv,{className:"h-4 w-4 shrink-0 text-emerald-600 dark:text-emerald-400"}),l.jsxs("span",{className:"text-sm font-medium text-emerald-800 dark:text-emerald-300",children:["All ",t.length," ",t.length===1?"dependency":"dependencies"," resolved"]}),l.jsx(Wi,{className:"ml-auto h-4 w-4 text-emerald-600 dark:text-emerald-400"})]}):l.jsxs("div",{className:"space-y-3",children:[a.length>0&&l.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 dark:border-amber-900 dark:bg-amber-950/30",children:[l.jsx(Jd,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600 dark:text-amber-400"}),l.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-300",children:[l.jsxs("strong",{children:[a.length," ",a.length===1?"dependency is":"dependencies are"," not yet completed."]}),n&&l.jsxs("p",{className:"mt-1 text-amber-700 dark:text-amber-400",children:["Blocked reason: ",n]})]})]}),l.jsx(Le,{title:"Dependencies",description:`${t.length-a.length} of ${t.length} resolved`,actions:c?l.jsx("button",{type:"button",onClick:()=>i(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Collapse"}):void 0,children:l.jsx("div",{className:"divide-y divide-border/40",children:t.map(d=>l.jsxs(we,{to:`/missions/${e}/assignments/${d.slug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(Ft,{status:d.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:d.slug})]}),d.assignee&&l.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:d.assignee}),l.jsx(Fa,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function _3({links:e}){const t=At();if(e.length===0)return null;const n=e.filter(i=>!i.isReverse),s=e.filter(i=>i.isReverse);return l.jsx(Le,{title:"Linked Assignments",description:`${e.length} ${e.length===1?"link":"links"}`,children:l.jsxs("div",{className:"divide-y divide-border/40",children:[n.map(i=>l.jsxs(we,{to:`${t}/missions/${i.missionSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(Ij,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Ft,{status:i.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),l.jsx(Fa,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`fwd-${i.slug}`)),s.map(i=>l.jsxs(we,{to:`${t}/missions/${i.missionSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[l.jsx(ev,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Ft,{status:i.status}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),l.jsx(Fa,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`rev-${i.slug}`))]})})}function Wx(){var pe,ve,de,Pe,ke,Te;const{slug:e,aslug:t}=Pt(),n=Hn(),s=At(),[i,a]=Of(),[c,d]=y.useState(null),[p,h]=y.useState(null),[m,x]=y.useState(null),[w,b]=y.useState(null),[E,k]=y.useState(null),[j,S]=y.useState(!1),[D,A]=y.useState(!1),M=i.get("tab")??"summary",_=ou(),{data:N,loading:P,error:z,refetch:q}=JC(e,t),{data:T}=Nv(e),{data:I}=Rv(),{data:B}=eN(e,t),W=y.useMemo(()=>{if(!N||!T)return[];const ee=new Map(T.assignments.map(Ee=>[Ee.slug,Ee]));return N.dependsOn.map(Ee=>{const je=ee.get(Ee);return{slug:Ee,title:(je==null?void 0:je.title)??Ee,status:(je==null?void 0:je.status)??"pending",priority:(je==null?void 0:je.priority)??"medium",assignee:(je==null?void 0:je.assignee)??null}})},[N,T]),J=W.filter(ee=>ee.status!=="completed"&&ee.status!=="review");if(P)return l.jsx(kt,{label:"Loading assignment workspace…"});if(z||!N||!e||!t)return l.jsx(St,{error:z||"Assignment not found."});const G=e,te=t,ie=O3(N.body),X=[];if(I!=null&&I.sessions)for(const ee of I.sessions)for(const Ee of ee.windows)for(const je of Ee.panes)((pe=je.assignment)==null?void 0:pe.mission)===e&&((ve=je.assignment)==null?void 0:ve.slug)===t&&X.push({sessionName:ee.name,command:je.command,urls:je.urls});async function oe(ee){d(null);try{await Gb(G,te,ee),q()}catch(Ee){d(Ee.message)}}async function R(){A(!0);try{await I3(G,te),n(`${s}/missions/${G}`)}catch(ee){d(ee.message),A(!1),S(!1)}}async function $(ee,Ee){d(null),h(ee.command);try{return await qb(G,te,ee,Ee),q(),!0}catch(je){return d(je.message),!1}finally{h(null)}}function Q(ee){if(Kb(ee)){x(ee);return}$(ee)}async function L(ee,Ee){b(null),k(ee);try{const je=await fetch(`/api/missions/${G}/assignments/${te}/acceptance-criteria/${ee}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:Ee})}),Qe=await je.json();if(!je.ok)throw new Error(Qe.error||`HTTP ${je.status}`);q()}catch(je){b(je.message)}finally{k(null)}}return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"sticky top-12 z-20 rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm backdrop-blur",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Ft,{status:N.status}),l.jsx(we,{className:"shell-action",to:`${s}/missions/${e}`,children:"Mission"}),l.jsxs(we,{className:"shell-action",to:`${s}/missions/${e}/assignments/${t}/edit`,children:[l.jsx(Lg,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Assignment"})]}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Mission ",e," · Updated ",Rn(N.updated)]})]}),l.jsxs("div",{className:"mt-5 flex flex-wrap gap-2",children:[(N.availableTransitions??[]).map(ee=>l.jsx("button",{type:"button",title:ee.warning||ee.disabledReason||ee.description,disabled:ee.disabled||p===ee.command,onClick:()=>Q(ee),className:`shell-action disabled:cursor-not-allowed disabled:opacity-50 ${ee.warning?"border-amber-300 dark:border-amber-700":""}`,children:l.jsx("span",{children:p===ee.command?"Working…":ee.label})},ee.command)),l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm text-muted-foreground",value:"",onChange:ee=>{ee.target.value&&oe(ee.target.value)},title:"Override assignment status directly",children:[l.jsx("option",{value:"",children:"Override Status…"}),_.statuses.map(ee=>l.jsx("option",{value:ee.id,children:ee.label},ee.id))]})]}),c?l.jsx("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:c}):null,N.blockedReason?l.jsxs("div",{className:"mt-4 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300",children:[l.jsx("strong",{children:"Blocked reason:"})," ",N.blockedReason]}):null,l.jsxs("div",{className:"mt-5 flex flex-wrap gap-2",children:[l.jsx($s,{label:`Priority ${N.priority}`}),l.jsx($s,{label:N.assignee?`Assignee ${N.assignee}`:"Unassigned"}),l.jsx($s,{label:`${N.dependsOn.length} dependencies`,variant:J.length>0?"warning":W.length>0?"success":"default"}),l.jsx($s,{label:N.plan?`Plan ${N.plan.status}`:"No plan"}),l.jsx($s,{label:`${((de=N.handoff)==null?void 0:de.handoffCount)??0} handoffs`}),l.jsx($s,{label:`${((Pe=N.decisionRecord)==null?void 0:Pe.decisionCount)??0} decisions`}),l.jsx($s,{label:$3(N.updated)?"Stale":"Fresh"})]})]}),W.length>0&&l.jsx(M3,{missionSlug:e,dependencies:W,blockedReason:N.blockedReason}),N.enrichedLinks&&N.enrichedLinks.length>0&&l.jsx(_3,{links:N.enrichedLinks}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[l.jsx("div",{className:"space-y-4",children:l.jsx(t0,{value:M,onValueChange:ee=>a({tab:ee}),items:[{value:"summary",label:"Summary",content:l.jsxs("div",{className:"space-y-5",children:[ie.acceptanceCriteria.length>0?l.jsx(Le,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:l.jsxs("div",{className:"space-y-3",children:[w?l.jsx("p",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:w}):null,ie.acceptanceCriteria.map((ee,Ee)=>{const je=E!==null;return l.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border/60 bg-background/80 px-3 py-3",children:[l.jsx("input",{type:"checkbox",checked:ee.checked,disabled:je,onChange:Qe=>L(Ee,Qe.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),l.jsx("span",{className:`text-sm leading-6 ${ee.checked?"text-muted-foreground line-through":"text-foreground"}`,children:ee.text})]},`${Ee}-${ee.text}`)})]})}):null,l.jsx(Le,{title:"Assignment Summary",children:l.jsx(zr,{content:ie.summaryBody,emptyState:ie.acceptanceCriteria.length>0?"No additional summary markdown beyond the acceptance criteria.":"This assignment does not have summary markdown yet."})}),l.jsx(Le,{title:"Latest Log Context",children:l.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:"Latest handoff"}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:N.handoff?Vx(N.handoff.body):"No handoff entries yet."})]}),l.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:"Latest decision"}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:N.decisionRecord?Vx(N.decisionRecord.body):"No decision entries yet."})]})]})})]})},{value:"plan",label:"Plan",count:N.plan?1:0,content:N.plan?l.jsx("div",{className:"space-y-5",children:l.jsxs(Le,{title:"Plan",actions:l.jsxs(we,{className:"shell-action",to:`${s}/missions/${e}/assignments/${t}/plan/edit`,children:[l.jsx(xd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Plan"})]}),children:[l.jsx("div",{className:"mb-4",children:l.jsx(Ft,{status:N.plan.status})}),l.jsx(zr,{content:N.plan.body,emptyState:"No plan content yet."})]})}):l.jsx(xt,{title:"No plan yet",description:"This assignment does not have a plan document yet."})},{value:"scratchpad",label:"Scratchpad",count:N.scratchpad?1:0,content:N.scratchpad?l.jsx(Le,{title:"Scratchpad",actions:l.jsxs(we,{className:"shell-action",to:`${s}/missions/${e}/assignments/${t}/scratchpad/edit`,children:[l.jsx(xd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Scratchpad"})]}),children:l.jsx(zr,{content:N.scratchpad.body,emptyState:"Scratchpad is empty."})}):l.jsx(xt,{title:"No scratchpad yet",description:"Scratchpad notes appear here when the assignment has working notes."})},{value:"handoff",label:"Handoff",count:((ke=N.handoff)==null?void 0:ke.handoffCount)??0,content:l.jsx("div",{className:"space-y-5",children:N.handoff?l.jsx(Le,{children:l.jsx(zr,{content:N.handoff.body,emptyState:"No handoff history yet."})}):l.jsx(xt,{title:"No handoff log yet",description:"Add a handoff entry when work changes hands or needs a restart point."})})},{value:"decisions",label:"Decisions",count:((Te=N.decisionRecord)==null?void 0:Te.decisionCount)??0,content:l.jsx("div",{className:"space-y-5",children:N.decisionRecord?l.jsx(Le,{children:l.jsx(zr,{content:N.decisionRecord.body,emptyState:"No decision history yet."})}):l.jsx(xt,{title:"No decision record yet",description:"Add a decision entry when the assignment makes a notable implementation choice."})})}]})}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(Le,{title:"Metadata",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(hr,{label:"ID",value:N.id,copyable:!0}),l.jsx(hr,{label:"Priority",value:N.priority}),l.jsx(hr,{label:"Assignee",value:N.assignee??"Unassigned"}),l.jsx(hr,{label:"Created",value:Rn(N.created)}),l.jsx(hr,{label:"Updated",value:Rn(N.updated)}),l.jsx(hr,{label:"Status",value:N.status})]})}),l.jsx(Le,{title:"Workspace Info",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(hr,{label:"Repository",value:N.workspace.repository??"—",copyable:!0}),l.jsx(hr,{label:"Worktree",value:N.workspace.worktreePath??"—",copyable:!0}),l.jsx(hr,{label:"Branch",value:N.workspace.branch??"—",copyable:!0}),l.jsx(hr,{label:"Parent branch",value:N.workspace.parentBranch??"—",copyable:!0})]})}),X.length>0&&l.jsx(Le,{title:"Servers",children:l.jsx("div",{className:"space-y-2",children:X.map((ee,Ee)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:ee.command}),l.jsx("span",{className:"text-xs text-muted-foreground",children:ee.sessionName}),ee.urls.map(je=>l.jsxs("a",{href:je,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-teal-600 hover:underline dark:text-teal-400",children:[je.replace("http://localhost:",":"),l.jsx(ov,{className:"h-2.5 w-2.5"})]},je))]},Ee))})}),B&&B.sessions.length>0&&l.jsx(Le,{title:"Agent Sessions",children:l.jsx("div",{className:"space-y-2",children:B.sessions.map(ee=>l.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",children:[l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(ru,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:ee.agent}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:ee.sessionId,children:[ee.sessionId.slice(0,8),l.jsx(vs,{value:ee.sessionId})]})]}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(Ft,{status:ee.status}),l.jsx("span",{className:"text-xs text-muted-foreground",children:Rn(ee.started)})]})]},ee.sessionId))})}),l.jsx(Le,{title:"Edit Actions",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${s}/missions/${e}/assignments/${t}/edit`,children:[l.jsx(Lg,{className:"h-4 w-4"}),"Edit assignment source"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${s}/missions/${e}/assignments/${t}/plan/edit`,children:[l.jsx(rC,{className:"h-4 w-4"}),"Edit plan"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${s}/missions/${e}/assignments/${t}/scratchpad/edit`,children:[l.jsx(xd,{className:"h-4 w-4"}),"Edit scratchpad"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${s}/missions/${e}/assignments/${t}/handoff/edit`,children:[l.jsx(Fa,{className:"h-4 w-4"}),"Append handoff"]}),l.jsxs(we,{className:"flex items-center gap-2 text-primary hover:underline",to:`${s}/missions/${e}/assignments/${t}/decision-record/edit`,children:[l.jsx(qj,{className:"h-4 w-4"}),"Append decision"]}),l.jsx("hr",{className:"border-border/40"}),l.jsxs("button",{type:"button",onClick:()=>S(!0),className:"flex items-center gap-2 text-destructive hover:underline",children:[l.jsx(Io,{className:"h-4 w-4"}),"Delete assignment"]})]})}),l.jsx(Le,{title:"Status Guidance",children:l.jsxs("div",{className:"space-y-3 text-sm leading-6 text-muted-foreground",children:[l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"Pending"})," means the work has not started or is structurally waiting on dependencies."]}),l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"Blocked"})," means there is an active obstacle that needs intervention, which is why blocking requires a reason."]}),l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"Review"})," means implementation is ready to inspect before completion."]}),l.jsxs(we,{className:"inline-flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(tv,{className:"h-4 w-4"}),"Open the full status guide"]})]})})]})]}),l.jsx(bb,{open:m!==null,action:m,assignmentTitle:N.title,loading:p===(m==null?void 0:m.command),onOpenChange:ee=>{ee||x(null)},onConfirm:async ee=>{if(!m)return;await $(m,ee)&&x(null)}}),l.jsx(Vb,{open:j,title:"Delete assignment?",description:`This will permanently delete "${N.title}" and all its files (plan, scratchpad, handoff, decision record). This cannot be undone.`,confirmLabel:"Delete Assignment",destructive:!0,loading:D,onOpenChange:ee=>{ee||S(!1)},onConfirm:R})]})}function $s({label:e,variant:t="default"}){const n={default:"border-border/60 bg-background/80 text-muted-foreground",warning:"border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-300",success:"border-emerald-300 bg-emerald-50 text-emerald-800 dark:border-emerald-800 dark:bg-emerald-950/30 dark:text-emerald-300"}[t];return l.jsx("span",{className:`rounded-full border px-3 py-1 text-xs font-medium ${n}`,children:e})}function hr({label:e,value:t,copyable:n}){return l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsx("dt",{className:"text-muted-foreground",children:e}),l.jsxs("dd",{className:"flex items-center gap-1.5 max-w-[60%] text-right text-foreground break-all",children:[l.jsx("span",{className:"truncate",title:t,children:t}),n&&t!=="—"&&l.jsx(vs,{value:t})]})]})}function Vx(e){return e.replace(/^#+\s+/gm,"").trim().split(`
|
|
449
|
+
`).find(n=>n.trim())??"No detail recorded yet."}function $3(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}const z3=["table","list","kanban"],qx={critical:0,high:1,medium:2,low:3};function Gx(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function F3(e,t){return e.toString()===t.toString()}function Kx(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function B3(e,t,n){return[...e].sort((i,a)=>{let c=0;switch(t){case"title":c=i.title.localeCompare(a.title);break;case"status":c=i.status.localeCompare(a.status);break;case"priority":c=(qx[i.priority]??99)-(qx[a.priority]??99);break;case"assignee":c=(i.assignee??"").localeCompare(a.assignee??"");break;case"dependencies":c=i.dependsOn.length-a.dependsOn.length;break;case"updated":c=i.updated.localeCompare(a.updated);break}return n==="asc"?c:-c})}function Yx(){const{workspace:e}=Pt(),t=At(),{data:n,loading:s,error:i,refetch:a}=XC(),c=ou(),[d,p]=Of(),h=y.useMemo(()=>jN(c.order),[c]),m=y.useMemo(()=>{const U={};for(const se of h)U[se]=bN(c,se);return U},[h,c]),x=y.useMemo(()=>h.map(U=>({id:U,title:m[U]??U,description:Ov(U)})),[h,m]),w=y.useMemo(()=>new Set(["all",...h]),[h]),b=d.get("view"),E=d.get("status"),k=d.get("stale"),j=b&&z3.includes(b)?b:"kanban";function S(U){return!U||!w.has(U)?"all":U}const D=y.useCallback(U=>{p(se=>{const Se=new URLSearchParams(se);return U==="kanban"?Se.delete("view"):Se.set("view",U),Se})},[p]),[A,M]=y.useState(""),[_,N]=y.useState(()=>S(E)),[P,z]=y.useState("all"),[q,T]=y.useState("all"),[I,B]=y.useState("all"),[W,J]=y.useState(()=>Gx(k)),[G,te]=y.useState("updated"),[ie,X]=y.useState("desc"),[oe,R]=y.useState(()=>new Set(h)),[$,Q]=y.useState([]),[L,pe]=y.useState(null),[ve,de]=y.useState(null),[Pe,ke]=y.useState(null),[Te,ee]=y.useState(null),[Ee,je]=y.useState(null);y.useEffect(()=>{Q((n==null?void 0:n.assignments)??[])},[n]),y.useEffect(()=>{const U=S(E);U!==_&&N(U);const se=Gx(k);se!==W&&J(se)},[W,k,_,E]),y.useEffect(()=>{p(U=>{const se=new URLSearchParams(U);return _==="all"?se.delete("status"):se.set("status",_),W==="all"?se.delete("stale"):W==="stale"?se.set("stale","1"):se.set("stale","0"),F3(U,se)?U:se})},[W,p,_]);const Qe=y.useMemo(()=>Array.from(new Set($.map(U=>U.status))).sort(),[$]),yt=y.useMemo(()=>Array.from(new Set($.map(U=>U.priority))).sort(),[$]),Bt=y.useMemo(()=>Array.from(new Set($.map(U=>U.assignee??"__unassigned__"))).sort(),[$]),Ut=y.useMemo(()=>Array.from(new Map($.map(U=>[U.missionSlug,U.missionTitle]))).sort(([,U],[,se])=>U.localeCompare(se)),[$]),_t=y.useMemo(()=>$.filter(U=>{if(e){if(e==="_ungrouped"){if(U.missionWorkspace!==null)return!1}else if(U.missionWorkspace!==e)return!1}if(_!=="all"&&U.status!==_||P!=="all"&&U.priority!==P||W==="stale"&&!Kx(U.updated)||W==="fresh"&&Kx(U.updated)||q!=="all"&&(U.assignee??"__unassigned__")!==q||I!=="all"&&U.missionSlug!==I)return!1;const se=A.trim().toLowerCase();return!(se&&!`${U.title} ${U.slug} ${U.missionTitle} ${U.missionSlug}`.toLowerCase().includes(se))}),[W,$,A,_,P,q,I,e]),vn=y.useMemo(()=>B3(_t,G,ie),[_t,G,ie]);if(s)return l.jsx(kt,{label:"Loading assignments board…"});if(i||!n)return l.jsx(St,{error:i||"Assignments board is unavailable."});async function Dt({item:U,toColumnId:se,action:Se,reason:Fe}){pe(null),de(Cn(U));const sn=$;Q(ct=>ct.map(We=>Cn(We)===Cn(U)?{...We,status:se,blockedReason:se==="blocked"?Fe??We.blockedReason:null}:We));try{const ct=Se?await qb(U.missionSlug,U.slug,Se,Fe):await Gb(U.missionSlug,U.slug,se);return Q(We=>We.map(qe=>Cn(qe)===Cn(U)?{...qe,status:ct.status,blockedReason:ct.blockedReason,availableTransitions:ct.availableTransitions,updated:ct.updated}:qe)),a(),!0}catch(ct){return Q(sn),pe(ct.message),!1}finally{de(null)}}async function pt({item:U,toColumnId:se}){if(U.status===se)return;const Se=Ai(U,se);if(Se!=null&&Se.disabled){pe(Se.disabledReason||`Cannot move this assignment to ${se}.`);return}if(Se&&Kb(Se)){je({item:U,toColumnId:se,action:Se});return}await Dt({item:U,toColumnId:se,action:Se})}function Zt(U){R(se=>{const Se=new Set(se);return Se.has(U)?Se.delete(U):Se.add(U),Se})}function An(U){G===U?X(se=>se==="asc"?"desc":"asc"):(te(U),X("asc"))}const vt=Pe?$.find(U=>Cn(U)===Pe)??null:null;function Nr(U,se){U.dataTransfer.effectAllowed="move",U.dataTransfer.setData("text/plain",se),ke(se)}function lr(){ke(null),ee(null)}function Z(U,se){if(!vt)return;const Se=Ai(vt,se);vt.status===se||Se!=null&&Se.disabled||(U.preventDefault(),U.dataTransfer.dropEffect="move",ee(se))}function ae(U,se){Te===se&&!U.currentTarget.contains(U.relatedTarget)&&ee(null)}function be(U,se){if(U.preventDefault(),!vt||vt.status===se){lr();return}lr(),pt({item:vt,toColumnId:se})}function Re({field:U,children:se}){const Se=G===U;return l.jsx("th",{className:"pb-3 font-medium",children:l.jsxs("button",{type:"button",onClick:()=>An(U),className:"inline-flex items-center gap-1 hover:text-foreground",children:[se,Se?ie==="asc"?l.jsx(rv,{className:"h-3 w-3"}):l.jsx(Wi,{className:"h-3 w-3"}):null]})})}return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(Vf,{children:[l.jsx(qf,{value:A,onChange:M,placeholder:"Search assignments or missions"}),l.jsxs("select",{value:_,onChange:U=>N(S(U.target.value)),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),Qe.map(U=>l.jsx("option",{value:U,children:m[U]??U},U))]}),l.jsxs("select",{value:P,onChange:U=>z(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All priorities"}),yt.map(U=>l.jsx("option",{value:U,className:"capitalize",children:U},U))]}),l.jsxs("select",{value:q,onChange:U=>T(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),Bt.map(U=>l.jsx("option",{value:U,children:U==="__unassigned__"?"Unassigned":U},U))]}),l.jsxs("select",{value:I,onChange:U=>B(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All missions"}),Ut.map(([U,se])=>l.jsx("option",{value:U,children:se},U))]}),l.jsxs("select",{value:W,onChange:U=>J(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All activity"}),l.jsx("option",{value:"stale",children:"Stale only"}),l.jsx("option",{value:"fresh",children:"Fresh only"})]}),l.jsx(Gf,{value:j,onChange:U=>D(U),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),L?l.jsx("div",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:L}):null,n.assignments.length===0?l.jsx(xt,{title:"No assignments yet",description:"Assignments appear here once missions contain concrete work items.",actions:l.jsxs(we,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/missions`,children:[l.jsx($f,{className:"h-4 w-4"}),l.jsx("span",{children:"Browse Missions"})]})}):_t.length===0?l.jsx(xt,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all missions again."}):j==="table"?l.jsx(Le,{title:`${vn.length} assignment${vn.length===1?"":"s"}`,children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[l.jsx(Re,{field:"title",children:"Assignment"}),l.jsx(Re,{field:"status",children:"Status"}),l.jsx(Re,{field:"priority",children:"Priority"}),l.jsx(Re,{field:"assignee",children:"Assignee"}),l.jsx(Re,{field:"dependencies",children:"Dependencies"}),l.jsx(Re,{field:"updated",children:"Updated"})]})}),l.jsx("tbody",{children:vn.map(U=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(we,{to:`${t}/missions/${U.missionSlug}/assignments/${U.slug}`,className:"font-semibold text-foreground hover:text-primary",children:U.title}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:U.missionTitle}),l.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:U.id,children:[U.id.slice(0,8),l.jsx(vs,{value:U.id})]})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("select",{value:U.status,disabled:ve===Cn(U),onChange:se=>pt({item:U,toColumnId:se.target.value}),className:$e("appearance-none rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-wide outline-none","cursor-pointer bg-[length:12px] bg-[right_6px_center] bg-no-repeat pr-6",`bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E")]`,(Ba[U.status]??Ba.pending).className,ve===Cn(U)&&"animate-pulse opacity-60"),children:h.map(se=>{const Se=U.status===se?void 0:Ai(U,se),Fe=(Se==null?void 0:Se.disabled)??!1;return l.jsx("option",{value:se,disabled:Fe,title:Fe?(Se==null?void 0:Se.disabledReason)??void 0:void 0,children:m[se]},se)})})}),l.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:U.priority}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:U.assignee??"Unassigned"}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:U.dependsOn.length}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Br(U.updated)})]},Cn(U)))})]})})}):j==="list"?l.jsx("div",{className:"space-y-3",children:h.map(U=>{var We;const se=_t.filter(qe=>qe.status===U);if(se.length===0&&!vt)return null;const Se=oe.has(U),Fe=vt?vt.status!==U&&!((We=Ai(vt,U))!=null&&We.disabled):!1,sn=vt?vt.status!==U&&!Fe:!1,ct=Te===U;return l.jsxs("div",{className:$e("rounded-lg border border-border/60 bg-card/90 transition",ct&&Fe&&"ring-2 ring-ring/30",sn&&"border-dashed opacity-65"),onDragOver:qe=>Z(qe,U),onDragLeave:qe=>ae(qe,U),onDrop:qe=>be(qe,U),children:[l.jsxs("button",{type:"button",onClick:()=>Zt(U),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[l.jsx(Wi,{className:`h-4 w-4 text-muted-foreground transition-transform ${Se?"":"-rotate-90"}`}),l.jsx("span",{className:"font-semibold text-foreground",children:m[U]}),l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:se.length})]}),Se&&se.length>0&&l.jsx("div",{className:"space-y-3 px-4 pb-4",children:se.map(qe=>{const ht=Cn(qe),qr=Pe===ht;return l.jsx("div",{draggable:!0,onDragStart:js=>Nr(js,ht),onDragEnd:lr,className:$e("cursor-grab transition active:cursor-grabbing",qr&&"scale-[0.98] opacity-50"),children:l.jsx(Xx,{assignment:qe,dragging:qr,transitioning:ve===ht})},ht)})})]},U)})}):l.jsx(Mv,{columns:x,items:_t,getItemId:Cn,getColumnId:U=>U.status,canDrop:({item:U,fromColumnId:se,toColumnId:Se})=>{if(se===Se)return{allowed:!0};const Fe=Ai(U,Se);return Fe!=null&&Fe.disabled?{allowed:!1,reason:Fe.disabledReason||Fe.description}:{allowed:!0,reason:Fe?Fe.warning||Fe.description:`Move to ${Se} (direct status change).`}},onMove:({item:U,toColumnId:se})=>pt({item:U,toColumnId:se}),emptyMessage:U=>`No ${U.title.toLowerCase()} assignments.`,renderCard:(U,{dragging:se})=>l.jsx(Xx,{assignment:U,dragging:se,transitioning:ve===Cn(U)})}),l.jsx(bb,{open:Ee!==null,action:(Ee==null?void 0:Ee.action)??null,assignmentTitle:(Ee==null?void 0:Ee.item.title)??"Assignment",loading:ve===(Ee?Cn(Ee.item):null),onOpenChange:U=>{U||je(null)},onConfirm:async U=>{if(!Ee)return;const se=Ee;await Dt({item:se.item,toColumnId:se.toColumnId,action:se.action,reason:U})&&je(null)}})]})}function Xx({assignment:e,dragging:t,transitioning:n}){var i;const s=At();return l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(we,{to:`${s}/missions/${e.missionSlug}/assignments/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e.missionTitle}),l.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:e.id??"",children:[(i=e.id)==null?void 0:i.slice(0,8),e.id&&l.jsx(vs,{value:e.id})]})]}),l.jsx(Ft,{status:e.status})]}),e.blockedReason?l.jsx("p",{className:"mt-3 rounded-md border border-amber-200/70 bg-amber-50/80 px-3 py-2 text-sm text-amber-800 dark:border-amber-900/70 dark:bg-amber-950/20 dark:text-amber-300",children:e.blockedReason}):null,l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:e.priority}),l.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:e.assignee??"Unassigned"}),l.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.dependsOn.length," dependencies"]})]}),l.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:[l.jsx("span",{children:n?"Updating":t?"Dragging":"Source-first"}),l.jsx("span",{children:Br(e.updated)})]})]})}function Ai(e,t){return e.availableTransitions.find(n=>n.targetStatus===t)}function Cn(e){return e.id||e.slug||"unknown"}function jr(e){const t=e.match(/^---\n([\s\S]*?)\n---\n?/);if(!t)return{order:[],blocks:new Map,body:e};const n=t[1],s=e.slice(t[0].length),i=n.split(`
|
|
450
|
+
`),a=[],c=new Map;let d=null,p=[];const h=()=>{d&&(a.push(d),c.set(d,p))};for(const m of i){const x=m.match(/^([A-Za-z_][A-Za-z0-9_-]*):/);if(x&&!m.startsWith(" ")){h(),d=x[1],p=[m];continue}d&&p.push(m)}return h(),{order:a,blocks:c,body:s}}function sl(e){return`---
|
|
451
|
+
${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
|
|
452
|
+
`)}
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
${e.body.replace(/^\n+/,"")}`}function Rt(e,t){const n=e.blocks.get(t);if(!(n!=null&&n[0]))return"";const s=n[0].match(/^[^:]+:\s*(.*)$/);if(!s)return"";const i=s[1].trim();return i==="null"?"":i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'")?i.slice(1,-1):i}function U3(e,t){return Rt(e,t)==="true"}function _i(e,t){const n=e.blocks.get(t);return n!=null&&n.length?n[0].trim().endsWith("[]")?[]:n.slice(1).map(s=>s.trim()).filter(s=>s.startsWith("- ")).map(s=>s.slice(2).trim()):[]}function H3(e){return typeof e=="boolean"?e?"true":"false":e===null||e===""?"null":/^\d{4}-\d{2}-\d{2}T/.test(e)?`"${e}"`:/[:#{}[\],&*?|>!%@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:e}function Tt(e,t,n){e.blocks.has(t)||e.order.push(t),e.blocks.set(t,[`${t}: ${H3(n)}`])}function $i(e,t,n){if(e.blocks.has(t)||e.order.push(t),n.length===0){e.blocks.set(t,[`${t}: []`]);return}e.blocks.set(t,[`${t}:`,...n.map(s=>` - ${s}`)])}function zi(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function hu(e){const t=jr(e);return{title:Rt(t,"title"),slug:Rt(t,"slug"),workspace:Rt(t,"workspace"),archived:U3(t,"archived"),archivedAt:Rt(t,"archivedAt"),archivedReason:Rt(t,"archivedReason"),tags:_i(t,"tags").join(", "),body:t.body}}function W3(e,t){const n=jr(e),s={...hu(e),...t};return Tt(n,"title",s.title),Tt(n,"slug",s.slug),Tt(n,"workspace",s.workspace||null),Tt(n,"archived",s.archived),Tt(n,"archivedAt",s.archivedAt||null),Tt(n,"archivedReason",s.archivedReason||null),$i(n,"tags",zi(s.tags)),n.body=s.body,sl(n)}function mu(e){const t=jr(e);return{title:Rt(t,"title"),slug:Rt(t,"slug"),status:Rt(t,"status"),priority:Rt(t,"priority")||"medium",assignee:Rt(t,"assignee"),dependsOn:_i(t,"dependsOn").join(", "),links:_i(t,"links").join(", "),blockedReason:Rt(t,"blockedReason"),tags:_i(t,"tags").join(", "),body:t.body}}function V3(e,t){const n=jr(e),s={...mu(e),...t};return Tt(n,"title",s.title),Tt(n,"slug",s.slug),Tt(n,"status",s.status),Tt(n,"priority",s.priority),Tt(n,"assignee",s.assignee||null),$i(n,"dependsOn",zi(s.dependsOn)),$i(n,"links",zi(s.links)),Tt(n,"blockedReason",s.blockedReason||null),$i(n,"tags",zi(s.tags)),n.body=s.body,sl(n)}function gu(e){const t=jr(e);return{assignment:Rt(t,"assignment"),status:Rt(t,"status"),body:t.body}}function q3(e,t){const n=jr(e),s={...gu(e),...t};return Tt(n,"assignment",s.assignment),Tt(n,"status",s.status),n.body=s.body,sl(n)}function xu(e){const t=jr(e);return{assignment:Rt(t,"assignment"),body:t.body}}function G3(e,t){const n=jr(e),s={...xu(e),...t};return Tt(n,"assignment",s.assignment),n.body=s.body,sl(n)}function yu(e){const t=jr(e);return{name:Rt(t,"name"),slug:Rt(t,"slug"),description:Rt(t,"description"),whenToUse:Rt(t,"when_to_use"),tags:_i(t,"tags").join(", "),body:t.body}}function K3(e,t){const n=jr(e),s={...yu(e),...t};return Tt(n,"name",s.name),Tt(n,"slug",s.slug),Tt(n,"description",s.description||null),Tt(n,"when_to_use",s.whenToUse||null),$i(n,"tags",zi(s.tags)),n.body=s.body,sl(n)}function rt(e,t,n){switch(e){case"mission":return W3(t,n);case"assignment":return V3(t,n);case"plan":return q3(t,n);case"scratchpad":return G3(t,n);case"playbook":return K3(t,n);default:return t}}function $r(e){return e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function Fd(e){return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}function ol({initialContent:e,documentType:t,mode:n="edit",onSave:s,saving:i,error:a,title:c,description:d,onCancel:p,helpTitle:h,helpBody:m,allowSlugEdit:x=!1}){const[w,b]=y.useState(e),[E,k]=y.useState(!1),[j,S]=y.useState("edit");y.useEffect(()=>{b(e)},[e]);const D=J3(t,w),A=w!==e,M=Q3(t,w),_=A?"Unsaved changes":n==="create"?"Draft":"Saved";return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"rounded-lg border border-border/70 bg-card/90 p-3 shadow-sm",children:[l.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("h1",{className:"text-lg font-semibold text-foreground",children:c}),l.jsx("span",{className:"rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-muted-foreground",children:_})]}),d?l.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:d}):null]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("button",{type:"button",onClick:p,className:"shell-action",children:[l.jsx(ev,{className:"h-4 w-4"}),l.jsx("span",{children:"Back"})]}),l.jsxs("button",{type:"button",onClick:()=>k(N=>!N),className:"shell-action",children:[l.jsx(Bj,{className:"h-4 w-4"}),l.jsx("span",{children:E?"Structured":"Raw Markdown"})]}),l.jsxs("button",{type:"button",onClick:()=>s(w),disabled:i||D.length>0,className:"inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-semibold text-background transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[l.jsx(Ff,{className:"h-4 w-4"}),l.jsx("span",{children:i?"Saving…":"Save"})]})]})]}),a?l.jsx("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:a}):null,D.length>0?l.jsx("div",{className:"mt-4 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300",children:l.jsx("ul",{className:"space-y-1",children:D.map(N=>l.jsx("li",{children:N},N))})}):null]}),l.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[l.jsx("button",{type:"button",onClick:()=>S("edit"),className:`shell-action ${j==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),l.jsxs("button",{type:"button",onClick:()=>S("preview"),className:`shell-action ${j==="preview"?"bg-foreground text-background":""}`,children:[l.jsx(Dg,{className:"h-4 w-4"}),"Preview"]})]}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]",children:[l.jsx("div",{className:j==="preview"?"hidden md:block":"",children:l.jsx("div",{className:"surface-panel space-y-3",children:E?l.jsx("textarea",{value:w,onChange:N=>b(N.target.value),className:"min-h-[720px] w-full rounded-md border border-border/70 bg-background/90 p-4 font-mono text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30",spellCheck:!1}):l.jsx(Y3,{documentType:t,content:w,onChange:b,allowSlugEdit:x})})}),l.jsx("div",{className:j==="edit"?"hidden md:block":"",children:l.jsxs("div",{className:"surface-panel sticky top-16 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Dg,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),l.jsx(zr,{content:M,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function Y3({documentType:e,content:t,onChange:n,allowSlugEdit:s}){if(e==="mission"){const a=hu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Di,{children:[l.jsx(Ke,{label:"Mission title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};s&&(a.slug===$r(a.title)||!a.slug.trim())&&(p.slug=$r(d)),n(rt(e,t,p))},className:"editor-input"})}),l.jsx(Ke,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!s,onChange:c=>n(rt(e,t,{slug:$r(c.target.value)})),className:`editor-input ${s?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:s?"The slug becomes the folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is the folder name and URL-safe identifier. It is locked after creation so links and file paths stay stable."})]})}),l.jsx(Ke,{label:"Tags",children:l.jsx("input",{value:a.tags,onChange:c=>n(rt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(X3,{value:a.workspace,onChange:c=>n(rt(e,t,{workspace:c}))})]}),l.jsx(Ke,{label:"Mission body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(rt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const a=mu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Di,{children:[l.jsx(Ke,{label:"Assignment title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};s&&(a.slug===$r(a.title)||!a.slug.trim())&&(p.slug=$r(d)),n(rt(e,t,p))},className:"editor-input"})}),l.jsx(Ke,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!s,onChange:c=>n(rt(e,t,{slug:$r(c.target.value)})),className:`editor-input ${s?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:s?"The slug becomes the assignment folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is locked after creation because assignment paths and dependency references use it as a stable identifier."})]})}),l.jsx(Ke,{label:"Status",children:l.jsxs("select",{value:a.status,onChange:c=>n(rt(e,t,{status:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"pending",children:"Pending"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"blocked",children:"Blocked"}),l.jsx("option",{value:"review",children:"Review"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"failed",children:"Failed"})]})}),l.jsx(Ke,{label:"Priority",children:l.jsxs("select",{value:a.priority,onChange:c=>n(rt(e,t,{priority:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"low",children:"Low"}),l.jsx("option",{value:"medium",children:"Medium"}),l.jsx("option",{value:"high",children:"High"}),l.jsx("option",{value:"critical",children:"Critical"})]})}),l.jsx(Ke,{label:"Assignee",children:l.jsx("input",{value:a.assignee,onChange:c=>n(rt(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),l.jsx(Ke,{label:"Depends on",className:"md:col-span-2",children:l.jsx("input",{value:a.dependsOn,onChange:c=>n(rt(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),l.jsx(Ke,{label:"Links",className:"md:col-span-2",children:l.jsx("input",{value:a.links,onChange:c=>n(rt(e,t,{links:c.target.value})),placeholder:"Comma-separated: missionSlug/assignmentSlug",className:"editor-input"})}),l.jsx(Ke,{label:"Blocked reason",className:"md:col-span-2",children:l.jsx("input",{value:a.blockedReason,onChange:c=>n(rt(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),l.jsx(Ke,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:a.tags,onChange:c=>n(rt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),l.jsx(Ke,{label:"Assignment body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(rt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const a=gu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Di,{children:[l.jsx(Ke,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),l.jsx(Ke,{label:"Plan status",children:l.jsxs("select",{value:a.status,onChange:c=>n(rt(e,t,{status:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"draft",children:"Draft"}),l.jsx("option",{value:"approved",children:"Approved"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"})]})})]}),l.jsx(Ke,{label:"Plan body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(rt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const a=xu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsx(Di,{children:l.jsx(Ke,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),l.jsx(Ke,{label:"Scratchpad body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(rt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=yu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Di,{children:[l.jsx(Ke,{label:"Playbook name",children:l.jsx("input",{value:i.name,onChange:a=>{const c=a.target.value,d={name:c};s&&(i.slug===$r(i.name)||!i.slug.trim())&&(d.slug=$r(c)),n(rt(e,t,d))},className:"editor-input"})}),l.jsx(Ke,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:i.slug,disabled:!s,onChange:a=>n(rt(e,t,{slug:$r(a.target.value)})),className:`editor-input ${s?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:s?"The slug becomes the filename. It is auto-generated from the name until you change it.":"The slug is locked after creation because it is the filename."})]})}),l.jsx(Ke,{label:"Description",className:"md:col-span-2",children:l.jsx("input",{value:i.description,onChange:a=>n(rt(e,t,{description:a.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),l.jsx(Ke,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:i.tags,onChange:a=>n(rt(e,t,{tags:a.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(Ke,{label:"When to use",className:"md:col-span-2",children:l.jsx("input",{value:i.whenToUse,onChange:a=>n(rt(e,t,{whenToUse:a.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),l.jsx(Ke,{label:"Playbook rules",children:l.jsx("textarea",{value:i.body,onChange:a=>n(rt(e,t,{body:a.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function Di({children:e}){return l.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function Ke({label:e,children:t,className:n}){return l.jsxs("label",{className:`block space-y-2 ${n??""}`,children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:e}),t]})}function X3({value:e,onChange:t}){const{data:n}=Wf(),s=(n==null?void 0:n.workspaces)??[];return l.jsx(Ke,{label:"Workspace",children:l.jsxs("select",{value:e,onChange:i=>t(i.target.value),className:"editor-input",children:[l.jsx("option",{value:"",children:"Ungrouped"}),s.map(i=>l.jsx("option",{value:i,children:i},i))]})})}function Q3(e,t){switch(e){case"mission":return hu(t).body;case"assignment":return mu(t).body;case"plan":return gu(t).body;case"scratchpad":return xu(t).body;case"playbook":return yu(t).body}}function J3(e,t){switch(e){case"mission":{const n=hu(t);return[n.title.trim()?null:"Mission title is required.",n.slug.trim()?null:"Mission slug is required.",n.slug.trim()&&!Fd(n.slug)?"Mission slug must be lowercase letters, numbers, and hyphens only.":null].filter(s=>!!s)}case"assignment":{const n=mu(t);return[n.title.trim()?null:"Assignment title is required.",n.slug.trim()?null:"Assignment slug is required.",n.slug.trim()&&!Fd(n.slug)?"Assignment slug must be lowercase letters, numbers, and hyphens only.":null].filter(s=>!!s)}case"plan":return gu(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return xu(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=yu(t);return[n.name.trim()?null:"Playbook name is required.",n.slug.trim()?null:"Playbook slug is required.",n.slug.trim()&&!Fd(n.slug)?"Playbook slug must be lowercase letters, numbers, and hyphens only.":null].filter(s=>!!s)}}}function Qx(){const e=Hn(),{workspace:t}=Pt(),n=At(),[s,i]=y.useState(null),[a,c]=y.useState(!0),[d,p]=y.useState(!1),[h,m]=y.useState(null);y.useEffect(()=>{fetch("/api/templates/mission").then(w=>w.json()).then(w=>{let b=w.content;t&&t!=="_ungrouped"&&(b=b.replace(/^(tags: \[\])$/m,`$1
|
|
456
|
+
workspace: ${t}`)),i(b),c(!1)}).catch(w=>{m(w.message),c(!1)})},[t]);async function x(w){p(!0),m(null);try{const b=await fetch("/api/missions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:w})}),E=await b.json();if(!b.ok){m(E.error||`HTTP ${b.status}`),p(!1);return}e(`${n}/missions/${E.slug}`)}catch(b){m(b.message),p(!1);return}p(!1)}return a?l.jsx(kt,{label:"Loading mission template…"}):h&&!s?l.jsx(St,{error:h}):l.jsx(ol,{initialContent:s||"",documentType:"mission",mode:"create",onSave:x,saving:d,error:h,title:"Create Mission",description:"Missions hold the high-level objective, shared context, and human-authored overview. Put execution details in assignments instead of overloading mission.md.",onCancel:()=>e(`${n}/missions`),helpTitle:"Mission editing rules",helpBody:"Use this form for mission intent, slug, tags, and overview content. If you ever need less common metadata, raw markdown mode still exposes the full file.",allowSlugEdit:!0})}function Jx(){const{slug:e}=Pt(),t=At(),n=Hn(),[s,i]=y.useState(null),[a,c]=y.useState(!0),[d,p]=y.useState(!1),[h,m]=y.useState(null);y.useEffect(()=>{fetch("/api/templates/assignment").then(w=>w.json()).then(w=>{i(w.content),c(!1)}).catch(w=>{m(w.message),c(!1)})},[]);async function x(w){if(!e){m("Mission slug is required.");return}p(!0),m(null);try{const b=await fetch(`/api/missions/${e}/assignments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:w})}),E=await b.json();if(!b.ok){m(E.error||`HTTP ${b.status}`),p(!1);return}n(`${t}/missions/${e}/assignments/${E.slug}`)}catch(b){m(b.message),p(!1);return}p(!1)}return a?l.jsx(kt,{label:"Loading assignment template…"}):h&&!s?l.jsx(St,{error:h}):l.jsx(ol,{initialContent:s||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:h,title:"Create Assignment",description:"Assignments are the execution unit. Declare dependencies here, keep status pending until work starts, and use blocked later only for runtime obstacles.",onCancel:()=>n(e?`${t}/missions/${e}`:`${t}/missions`),helpTitle:"Assignment editing rules",helpBody:"Use structured fields for priority, assignee, dependencies, and tags. Status can be changed through lifecycle actions, kanban drag, or the status override.",allowSlugEdit:!0})}function vu({loadUrl:e,saveUrl:t,redirectTo:n,title:s,description:i,documentType:a,helpTitle:c,helpBody:d}){const p=Hn(),{data:h,loading:m,error:x}=Ev(e),[w,b]=y.useState(!1),[E,k]=y.useState(null);async function j(S){b(!0),k(null);try{const D=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),A=await D.json();if(!D.ok){k(A.error||`HTTP ${D.status}`),b(!1);return}p(n)}catch(D){k(D.message),b(!1);return}b(!1)}return m?l.jsx(kt,{label:`Loading ${s.toLowerCase()}…`}):x||!h?l.jsx(St,{error:x||`${s} is unavailable.`}):l.jsx(ol,{initialContent:h.content,documentType:a,onSave:j,saving:w,error:E,title:s,description:i,onCancel:()=>p(n),helpTitle:c,helpBody:d})}function Zx(){const{slug:e}=Pt(),t=At(),n=e??"";return l.jsx(vu,{loadUrl:`/api/missions/${n}/edit`,saveUrl:`/api/missions/${n}`,redirectTo:`${t}/missions/${n}`,title:"Edit Mission",description:"Mission edits change the human-authored source document. The structured form stays focused on title, slug, tags, and overview content.",documentType:"mission",helpTitle:"Editable vs derived mission fields",helpBody:"Mission status remains derived from assignment state. If you need less common frontmatter fields, switch to raw markdown mode instead of expanding the structured form."})}function ey(){const{slug:e,aslug:t}=Pt(),n=At(),s=e??"",i=t??"";return l.jsx(vu,{loadUrl:`/api/missions/${s}/assignments/${i}/edit`,saveUrl:`/api/missions/${s}/assignments/${i}`,redirectTo:`${n}/missions/${s}/assignments/${i}`,title:"Edit Assignment",description:"Edit assignment fields including status, priority, assignee, dependencies, and body.",documentType:"assignment",helpTitle:"Assignment editing",helpBody:"All fields are editable. Status can also be changed through lifecycle actions or kanban drag."})}function ty(){const{slug:e,aslug:t}=Pt(),n=At(),s=e??"",i=t??"";return l.jsx(vu,{loadUrl:`/api/missions/${s}/assignments/${i}/plan/edit`,saveUrl:`/api/missions/${s}/assignments/${i}/plan`,redirectTo:`${n}/missions/${s}/assignments/${i}?tab=plan`,title:"Edit Plan",description:"Plans are separate from assignment status, so keep implementation steps here instead of overloading the assignment body.",documentType:"plan",helpTitle:"Plan status is separate",helpBody:"Plan status tracks the plan document itself. It does not replace the assignment lifecycle state."})}function ny(){const{slug:e,aslug:t}=Pt(),n=At(),s=e??"",i=t??"";return l.jsx(vu,{loadUrl:`/api/missions/${s}/assignments/${i}/scratchpad/edit`,saveUrl:`/api/missions/${s}/assignments/${i}/scratchpad`,redirectTo:`${n}/missions/${s}/assignments/${i}?tab=scratchpad`,title:"Edit Scratchpad",description:"Scratchpad is the assignment’s working memory surface for notes, experiments, and temporary context.",documentType:"scratchpad",helpTitle:"Scratchpad usage",helpBody:"Scratchpad is for transient notes. Keep canonical objective and lifecycle data in assignment.md and plan.md."})}function Yb({loadUrl:e,saveUrl:t,redirectTo:n,title:s,description:i,helpTitle:a,helpBody:c}){const d=Hn(),{data:p,loading:h,error:m}=Ev(e),[x,w]=y.useState(""),[b,E]=y.useState(""),[k,j]=y.useState(!1),[S,D]=y.useState(null);async function A(){j(!0),D(null);try{const M=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:x,body:b})}),_=await M.json();if(!M.ok){D(_.error||`HTTP ${M.status}`),j(!1);return}d(n)}catch(M){D(M.message),j(!1);return}j(!1)}return h?l.jsx(kt,{label:`Loading ${s.toLowerCase()}…`}):m||!p?l.jsx(St,{error:m||`${s} is unavailable.`}):l.jsxs("div",{className:"space-y-4",children:[l.jsx(Le,{title:s,description:i,children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("label",{className:"block space-y-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry title"}),l.jsx("input",{value:x,onChange:M=>w(M.target.value),placeholder:"Optional title",className:"editor-input"})]}),l.jsxs("label",{className:"block space-y-2",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry body"}),l.jsx("textarea",{value:b,onChange:M=>E(M.target.value),className:"editor-textarea",spellCheck:!1})]}),S?l.jsx("p",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:S}):null,l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),l.jsx("button",{type:"button",onClick:A,disabled:k||!b.trim(),className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:k?"Appending…":"Append Entry"})]})]})}),l.jsx(Le,{title:"Current Document",children:l.jsx(zr,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function ry(){const{slug:e,aslug:t}=Pt(),n=At(),s=e??"",i=t??"";return l.jsx(Yb,{loadUrl:`/api/missions/${s}/assignments/${i}/handoff/edit`,saveUrl:`/api/missions/${s}/assignments/${i}/handoff/entries`,redirectTo:`${n}/missions/${s}/assignments/${i}?tab=handoff`,title:"Append Handoff Entry",description:"Add a new handoff without rewriting previous history.",helpTitle:"Append-only handoff history",helpBody:"Handoff log entries preserve the baton-passing trail between sessions and agents. Add a new entry instead of editing older ones."})}function sy(){const{slug:e,aslug:t}=Pt(),n=At(),s=e??"",i=t??"";return l.jsx(Yb,{loadUrl:`/api/missions/${s}/assignments/${i}/decision-record/edit`,saveUrl:`/api/missions/${s}/assignments/${i}/decision-record/entries`,redirectTo:`${n}/missions/${s}/assignments/${i}?tab=decisions`,title:"Append Decision Entry",description:"Record a new decision and rationale without editing prior entries.",helpTitle:"Append-only decision history",helpBody:"Decision records should accumulate over time so the implementation rationale remains auditable and reviewable."})}function oy(){const{workspace:e}=Pt(),{data:t}=Hf(),{data:n,loading:s,error:i,refetch:a}=Rv(),[c,d]=y.useState(!1),[p,h]=y.useState(""),[m,x]=y.useState(!1),w=(()=>{if(!e||!n)return(n==null?void 0:n.sessions)??[];if(!t)return[];const S=new Set(t.filter(D=>e==="_ungrouped"?D.workspace===null:D.workspace===e).map(D=>D.slug));return n.sessions.filter(D=>D.windows.some(A=>A.panes.some(M=>M.assignment&&S.has(M.assignment.mission))))})();async function b(S){if(S.preventDefault(),!!p.trim())try{await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p.trim()})}),h(""),d(!1),a()}catch{}}async function E(){x(!0);try{await fetch("/api/servers/refresh",{method:"POST"}),a()}finally{x(!1)}}async function k(S){await fetch(`/api/servers/${encodeURIComponent(S)}`,{method:"DELETE"}),a()}async function j(S){await fetch(`/api/servers/${encodeURIComponent(S)}/refresh`,{method:"POST"}),a()}return s?l.jsx(kt,{label:"Loading servers…"}):i?l.jsx(St,{error:i}):n?n.tmuxAvailable?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?l.jsxs("form",{onSubmit:b,className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:p,onChange:S=>h(S.target.value),placeholder:"tmux session name",className:"editor-input text-sm",autoFocus:!0}),l.jsx("button",{type:"submit",className:"shell-action",children:"Add"}),l.jsx("button",{type:"button",className:"shell-action",onClick:()=>d(!1),children:"Cancel"})]}):l.jsxs("button",{className:"shell-action",onClick:()=>d(!0),children:[l.jsx(tr,{className:"h-3.5 w-3.5"}),"Track Session"]}),l.jsxs("button",{className:"shell-action",onClick:E,disabled:m,children:[l.jsx(uv,{className:`h-3.5 w-3.5 ${m?"animate-spin":""}`}),"Refresh All"]})]}),w.length===0?l.jsx(xt,{title:"No sessions tracked",description:"Register a tmux session to start tracking your dev servers."}):l.jsx("div",{className:"mt-4 space-y-4",children:w.map(S=>l.jsx(Z3,{session:S,onRefresh:()=>j(S.name),onRemove:()=>k(S.name),onRefetch:a},S.name))})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"surface-panel mt-4 flex flex-col items-center gap-3 py-12 text-center",children:[l.jsx(aC,{className:"h-10 w-10 text-muted-foreground/40"}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:"tmux is not installed"}),l.jsxs("p",{className:"max-w-md text-sm text-muted-foreground",children:["Server tracking requires tmux. Install it with ",l.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"brew install tmux"})," to get started."]})]})}):null}function Z3({session:e,onRefresh:t,onRemove:n,onRefetch:s}){return l.jsxs("div",{className:"surface-panel",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(zf,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.name}),l.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${e.alive?"border border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-400":"border border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-900 dark:bg-rose-950/40 dark:text-rose-400"}`,children:e.alive?"alive":"dead"}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last refreshed: ",new Date(e.lastRefreshed).toLocaleString()]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{className:"shell-action",onClick:t,title:"Refresh",children:l.jsx(uv,{className:"h-3.5 w-3.5"})}),l.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:l.jsx(Io,{className:"h-3.5 w-3.5"})})]})]}),e.alive&&e.windows.length>0&&l.jsx("div",{className:"mt-3 space-y-3",children:e.windows.map(i=>l.jsxs("div",{children:[l.jsxs("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:["Window ",i.index,": ",i.name]}),l.jsx("div",{className:"space-y-1.5",children:i.panes.map(a=>l.jsx(e4,{pane:a,sessionName:e.name,windowIndex:i.index,onRefetch:s},`${i.index}:${a.index}`))})]},i.index))}),!e.alive&&l.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(sC,{className:"h-4 w-4"}),l.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function e4({pane:e,sessionName:t,windowIndex:n,onRefetch:s}){const i=At(),a=e.cwd.replace(/^\/Users\/[^/]+/,"~");return l.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[l.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground/60",children:[":",e.index]}),l.jsx("span",{className:"shrink-0 rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:e.command}),l.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[l.jsx("span",{className:"truncate",title:e.cwd,children:a}),l.jsx(vs,{value:e.cwd})]}),e.branch&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(iv,{className:"h-3 w-3"}),e.branch,e.worktree&&l.jsx("span",{className:"rounded bg-violet-100 px-1 py-0.5 text-[10px] font-medium text-violet-700 dark:bg-violet-950/40 dark:text-violet-400",children:"worktree"})]}),e.ports.length>0&&l.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:e.urls.map(c=>l.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded border border-teal-200 bg-teal-50 px-1.5 py-0.5 text-xs font-medium text-teal-700 hover:bg-teal-100 dark:border-teal-900 dark:bg-teal-950/40 dark:text-teal-400 dark:hover:bg-teal-950/60",children:[c.replace("http://localhost:",":"),l.jsx(ov,{className:"h-2.5 w-2.5"})]},c))}),l.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?l.jsxs(we,{to:`${i}/missions/${e.assignment.mission}/assignments/${e.assignment.slug}`,className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/20",children:[l.jsx(Yj,{className:"h-2.5 w-2.5"}),e.assignment.title]}):l.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function iy(){const{workspace:e}=Pt(),{data:t}=Hf(),{data:n,loading:s,error:i}=ZC(),[a,c]=y.useState(""),[d,p]=y.useState(""),[h,m]=y.useState(""),[x,w]=y.useState("started_desc"),[b,E]=y.useState(0),[k,j]=y.useState(new Set),[S,D]=y.useState(!1),[A,M]=y.useState(null),[_,N]=y.useState(null),P=(n==null?void 0:n.sessions.some(W=>W.status==="active"))??!1;y.useEffect(()=>{if(!P)return;const W=window.setInterval(()=>E(J=>J+1),3e4);return()=>window.clearInterval(W)},[P]),y.useEffect(()=>{j(W=>{if(W.size===0)return W;const J=new Set((n==null?void 0:n.sessions.map(te=>te.sessionId))??[]),G=new Set([...W].filter(te=>J.has(te)));return G.size===W.size?W:G})},[n]);const z=y.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const W=a.trim().toLowerCase();return[...n.sessions.filter(G=>{var X;if(e&&t){const oe=((X=t.find(R=>R.slug===G.missionSlug))==null?void 0:X.workspace)??null;if(e==="_ungrouped"){if(oe!==null)return!1}else if(oe!==e)return!1}const te=n4(G.started);return d&&(!te||te<d)||h&&(!te||te>h)?!1:W?[G.missionSlug??"",G.assignmentSlug??"",G.agent,G.sessionId,G.path,G.description??""].join(" ").toLowerCase().includes(W):!0})].sort((G,te)=>r4(G,te,x))},[n,a,x,d,h,b,e,t]);function q(W){j(J=>{const G=new Set(J);return G.has(W)?G.delete(W):G.add(W),G})}function T(){k.size===z.length&&z.length>0?j(new Set):j(new Set(z.map(W=>W.sessionId)))}async function I(W){M(null),D(!0);try{const J=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:W})}),G=await J.json().catch(()=>null);if(!J.ok)throw new Error((G==null?void 0:G.error)||`HTTP ${J.status}`);j(te=>new Set([...te].filter(ie=>!W.includes(ie)))),N(null)}catch(J){M(J.message)}finally{D(!1)}}if(s)return l.jsx(kt,{label:"Loading agent sessions..."});if(i)return l.jsx(St,{error:i});if(!n)return null;const B=n.sessions.length>0;return l.jsxs(l.Fragment,{children:[l.jsxs(Vf,{children:[l.jsx(qf,{value:a,onChange:c,placeholder:"Search mission, assignment, agent, session ID, path, or description"}),l.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started From",l.jsx("input",{type:"date",value:d,onChange:W=>p(W.target.value),className:"editor-input min-w-[150px]"})]}),l.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started To",l.jsx("input",{type:"date",value:h,onChange:W=>m(W.target.value),className:"editor-input min-w-[150px]"})]}),l.jsxs("select",{value:x,onChange:W=>w(W.target.value),className:"editor-input max-w-[200px]",children:[l.jsx("option",{value:"started_desc",children:"Newest first"}),l.jsx("option",{value:"started_asc",children:"Oldest first"}),l.jsx("option",{value:"assignment_asc",children:"Assignment A-Z"}),l.jsx("option",{value:"agent_asc",children:"Agent A-Z"})]})]}),A?l.jsx("div",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:A}):null,k.size>0&&l.jsxs("div",{className:"mt-4 flex items-center gap-3 rounded border border-border/40 bg-muted/30 px-4 py-2 text-sm",children:[l.jsxs("span",{className:"text-muted-foreground",children:[k.size," session",k.size!==1?"s":""," selected"]}),l.jsxs("button",{className:"shell-action text-destructive",onClick:()=>N({sessionIds:[...k],title:`Delete ${k.size} selected session${k.size===1?"":"s"}?`,description:"This removes the selected agent session records from the dashboard. This cannot be undone.",confirmLabel:k.size===1?"Delete Session":"Delete Sessions"}),disabled:S,children:[l.jsx(Io,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),l.jsx("button",{className:"shell-action",onClick:()=>j(new Set),children:"Clear Selection"})]}),B?z.length===0?l.jsx(xt,{title:"No agent sessions match these filters",description:"Adjust the status, search term, date range, or sorting controls to show sessions again."}):l.jsx("div",{className:"surface-panel mt-4 overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[1040px] text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/40 text-left text-xs uppercase tracking-wider text-muted-foreground",children:[l.jsx("th",{className:"w-8 pb-2 pr-3",children:l.jsx("button",{onClick:T,className:"text-muted-foreground hover:text-foreground",children:k.size===z.length&&z.length>0?l.jsx(br,{className:"h-4 w-4"}):l.jsx(cv,{className:"h-4 w-4"})})}),l.jsx("th",{className:"pb-2 pr-3",children:"Mission"}),l.jsx("th",{className:"pb-2 pr-3",children:"Assignment"}),l.jsx("th",{className:"pb-2 pr-3",children:"Description"}),l.jsx("th",{className:"pb-2 pr-3",children:"Agent"}),l.jsx("th",{className:"pb-2 pr-3",children:"Session ID"}),l.jsx("th",{className:"pb-2 pr-3",children:"Started"}),l.jsx("th",{className:"pb-2 pr-3",children:"Path"}),l.jsx("th",{className:"w-8 pb-2"})]})}),l.jsx("tbody",{children:z.map(W=>l.jsx(t4,{session:W,selected:k.has(W.sessionId),onToggle:()=>q(W.sessionId),onDelete:()=>N({sessionIds:[W.sessionId],title:`Delete session ${W.sessionId.slice(0,8)}...?`,description:`Remove this ${W.agent} session record${W.assignmentSlug?` for ${W.assignmentSlug}`:""}. This cannot be undone.`,confirmLabel:"Delete Session"})},W.sessionId))})]})}):l.jsx(xt,{title:"No agent sessions",description:"No agent sessions have been registered yet. Use /grab-assignment or syntaur track-session to register one."}),l.jsx(Vb,{open:_!==null,title:(_==null?void 0:_.title)??"Delete session?",description:(_==null?void 0:_.description)??"",confirmLabel:(_==null?void 0:_.confirmLabel)??"Delete",destructive:!0,loading:S,onOpenChange:W=>{W||N(null)},onConfirm:async()=>{_&&await I(_.sessionIds)}})]})}function t4({session:e,selected:t,onToggle:n,onDelete:s}){const i=At(),a=e.sessionId.length>12?e.sessionId.slice(0,8)+"...":e.sessionId,c=e.path?e.path.replace(/^\/Users\/[^/]+/,"~"):"—";return l.jsxs("tr",{className:"border-b border-border/20 last:border-0",children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:t?l.jsx(br,{className:"h-4 w-4"}):l.jsx(cv,{className:"h-4 w-4"})})}),l.jsx("td",{className:"py-2 pr-3",children:e.missionSlug?l.jsx(we,{to:`${i}/missions/${e.missionSlug}`,className:"text-primary hover:underline",children:rn(e.missionSlug)}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2 pr-3",children:e.missionSlug&&e.assignmentSlug?l.jsx(we,{to:`${i}/missions/${e.missionSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:rn(e.assignmentSlug)}):e.assignmentSlug?l.jsx("span",{children:rn(e.assignmentSlug)}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"max-w-[200px] py-2 pr-3",children:e.description?l.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.description,children:e.description.length>60?e.description.slice(0,57)+"...":e.description}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx(ru,{className:"h-3 w-3 text-muted-foreground"}),e.agent]})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx("span",{className:"font-mono text-xs text-muted-foreground",title:e.sessionId,children:a}),l.jsx(vs,{value:e.sessionId})]})}),l.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Rn(e.started)}),l.jsx("td",{className:"max-w-[240px] py-2 pr-3",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.path,children:c}),e.path&&l.jsx(vs,{value:e.path})]})}),l.jsx("td",{className:"py-2",children:l.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-destructive",title:"Delete session",children:l.jsx(Io,{className:"h-3.5 w-3.5"})})})]})}function n4(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return`${n}-${s}-${i}`}function Na(e){const t=Date.parse(e.started),n=e.ended?Date.parse(e.ended):Date.now();return Number.isNaN(t)||Number.isNaN(n)?0:Math.max(0,Math.floor((n-t)/6e4))}function r4(e,t,n){switch(n){case"started_asc":return e.started.localeCompare(t.started);case"started_desc":return t.started.localeCompare(e.started);case"duration_asc":return Na(e)-Na(t);case"duration_desc":return Na(t)-Na(e);case"assignment_asc":return(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"")||(e.missionSlug??"").localeCompare(t.missionSlug??"");case"agent_asc":return e.agent.localeCompare(t.agent)||(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"");default:return 0}}function s4(){const{data:e,loading:t,error:n}=tN(),[s,i]=y.useState(""),a=y.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!s.trim())return e.playbooks;const c=s.toLowerCase();return e.playbooks.filter(d=>d.name.toLowerCase().includes(c)||d.description.toLowerCase().includes(c)||d.slug.toLowerCase().includes(c)||d.tags.some(p=>p.toLowerCase().includes(c)))},[e,s]);return t?l.jsx(kt,{label:"Loading playbooks..."}):n?l.jsx(St,{error:n}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(su,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",placeholder:"Search playbooks...",value:s,onChange:c=>i(c.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs(we,{to:"/playbooks/create",className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[l.jsx(tr,{className:"h-4 w-4"}),"Create Playbook"]})]}),l.jsxs(we,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[l.jsx(Uj,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:"Playbook Manifest"}),l.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:"auto-generated"})]}),l.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Index of all playbooks with descriptions. Include ",l.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-[11px]",children:"~/.syntaur/playbooks/manifest.md"})," in your CLAUDE.md for agent context."]})]})]}),a.length===0?l.jsx(xt,{title:"No playbooks found",description:(e==null?void 0:e.playbooks.length)===0?"Playbooks define rules and workflows for how agents should operate. Create your first one to get started.":"No playbooks match your search.",actions:(e==null?void 0:e.playbooks.length)===0?l.jsxs(we,{to:"/playbooks/create",className:"inline-flex items-center gap-2 rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background transition hover:bg-foreground/90",children:[l.jsx(tr,{className:"h-4 w-4"}),"Create Playbook"]}):void 0}):l.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:a.map(c=>l.jsxs(we,{to:`/playbooks/${c.slug}`,className:"surface-panel group flex flex-col gap-2 p-4 transition hover:border-foreground/20",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(nv,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:c.name}),c.description?l.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:c.description}):null]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[l.jsxs("div",{className:"flex flex-wrap gap-1",children:[c.tags.slice(0,3).map(d=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:[l.jsx(dv,{className:"h-2.5 w-2.5"}),d]},d)),c.tags.length>3?l.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",c.tags.length-3]}):null]}),l.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:Br(c.updated)})]})]},c.slug))})]})}function o4(){const{slug:e}=Pt(),t=Hn(),{data:n,loading:s,error:i}=nN(e),[a,c]=y.useState(!1),[d,p]=y.useState(!1),h=e==="manifest";async function m(){if(e){p(!0);try{(await fetch(`/api/playbooks/${e}`,{method:"DELETE"})).ok&&t("/playbooks")}finally{p(!1)}}}return s?l.jsx(kt,{label:"Loading playbook..."}):i?l.jsx(St,{error:i}):n?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:h?"Playbook Manifest":n.name}),h?l.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:"auto-generated"}):null]}),!h&&n.description?l.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n.description}):null,h?l.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["This file is rebuilt automatically when playbooks are added or removed. Include"," ",l.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.syntaur/playbooks/manifest.md"})," ","in your CLAUDE.md for agent context."]}):null,!h&&n.whenToUse?l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground italic",children:["When to use: ",n.whenToUse]}):null,l.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[l.jsxs("span",{children:["Created ",Rn(n.created)]}),l.jsxs("span",{children:["Updated ",Rn(n.updated)]})]}),n.tags.length>0?l.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:n.tags.map(x=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:[l.jsx(dv,{className:"h-3 w-3"}),x]},x))}):null]}),h?null:l.jsxs("div",{className:"flex shrink-0 gap-2",children:[l.jsxs(we,{to:`/playbooks/${e}/edit`,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:[l.jsx(eC,{className:"h-3 w-3"}),"Edit"]}),a?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:m,disabled:d,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-red-600 px-3 text-xs font-medium text-white transition hover:bg-red-700 disabled:opacity-50",children:d?"Deleting...":"Confirm"}),l.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-8 items-center rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]}):l.jsxs("button",{type:"button",onClick:()=>c(!0),className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-red-600 transition hover:bg-red-50 dark:hover:bg-red-950/30",children:[l.jsx(Io,{className:"h-3 w-3"}),"Delete"]})]})]}),l.jsx("div",{className:"surface-panel p-4",children:l.jsx(zr,{content:n.body})})]}):null}function i4(){const e=Hn(),[t,n]=y.useState(null),[s,i]=y.useState(!0),[a,c]=y.useState(!1),[d,p]=y.useState(null);y.useEffect(()=>{fetch("/api/playbooks/template/new").then(m=>m.json()).then(m=>{n(m.content),i(!1)}).catch(m=>{p(m.message),i(!1)})},[]);async function h(m){c(!0),p(null);try{const x=await fetch("/api/playbooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:m})}),w=await x.json();if(!x.ok){p(w.error||`HTTP ${x.status}`),c(!1);return}e(`/playbooks/${w.slug}`)}catch(x){p(x.message),c(!1);return}c(!1)}return s?l.jsx(kt,{label:"Loading playbook template..."}):d&&!t?l.jsx(St,{error:d}):l.jsx(ol,{initialContent:t||"",documentType:"playbook",mode:"create",onSave:h,saving:a,error:d,title:"Create Playbook",description:"Playbooks define rules and workflows for how agents should operate. Keep them short, imperative, and focused on a single concern.",onCancel:()=>e("/playbooks"),allowSlugEdit:!0})}function l4(){const{slug:e}=Pt(),t=Hn(),[n,s]=y.useState(null),[i,a]=y.useState(!0),[c,d]=y.useState(!1),[p,h]=y.useState(null);y.useEffect(()=>{e&&fetch(`/api/playbooks/${e}/edit`).then(x=>x.json()).then(x=>{s(x.content),a(!1)}).catch(x=>{h(x.message),a(!1)})},[e]);async function m(x){if(e){d(!0),h(null);try{const w=await fetch(`/api/playbooks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}),b=await w.json();if(!w.ok){h(b.error||`HTTP ${w.status}`),d(!1);return}t(`/playbooks/${e}`)}catch(w){h(w.message),d(!1);return}d(!1)}}return i?l.jsx(kt,{label:"Loading playbook..."}):p&&!n?l.jsx(St,{error:p}):l.jsx(ol,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:m,saving:c,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function a4({value:e,onChange:t}){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"color",value:e||"#64748b",onChange:n=>t(n.target.value),className:"h-7 w-7 shrink-0 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5",title:"Pick a color"}),l.jsx("input",{type:"text",value:e,onChange:n=>t(n.target.value),placeholder:"#64748b",className:"editor-input w-[5.5rem] font-mono text-xs"})]})}const u4=["top","right","bottom","left"],ws=Math.min,En=Math.max,qa=Math.round,Ea=Math.floor,wr=e=>({x:e,y:e}),c4={left:"right",right:"left",bottom:"top",top:"bottom"};function xf(e,t,n){return En(e,ws(t,n))}function Ur(e,t){return typeof e=="function"?e(t):e}function Hr(e){return e.split("-")[0]}function $o(e){return e.split("-")[1]}function vp(e){return e==="x"?"y":"x"}function bp(e){return e==="y"?"height":"width"}function yr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function wp(e){return vp(yr(e))}function d4(e,t,n){n===void 0&&(n=!1);const s=$o(e),i=wp(e),a=bp(i);let c=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(c=Ga(c)),[c,Ga(c)]}function f4(e){const t=Ga(e);return[yf(e),t,yf(t)]}function yf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ly=["left","right"],ay=["right","left"],p4=["top","bottom"],h4=["bottom","top"];function m4(e,t,n){switch(e){case"top":case"bottom":return n?t?ay:ly:t?ly:ay;case"left":case"right":return t?p4:h4;default:return[]}}function g4(e,t,n,s){const i=$o(e);let a=m4(Hr(e),n==="start",s);return i&&(a=a.map(c=>c+"-"+i),t&&(a=a.concat(a.map(yf)))),a}function Ga(e){const t=Hr(e);return c4[t]+e.slice(t.length)}function x4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xb(e){return typeof e!="number"?x4(e):{top:e,right:e,bottom:e,left:e}}function Ka(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function uy(e,t,n){let{reference:s,floating:i}=e;const a=yr(t),c=wp(t),d=bp(c),p=Hr(t),h=a==="y",m=s.x+s.width/2-i.width/2,x=s.y+s.height/2-i.height/2,w=s[d]/2-i[d]/2;let b;switch(p){case"top":b={x:m,y:s.y-i.height};break;case"bottom":b={x:m,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:x};break;case"left":b={x:s.x-i.width,y:x};break;default:b={x:s.x,y:s.y}}switch($o(t)){case"start":b[c]-=w*(n&&h?-1:1);break;case"end":b[c]+=w*(n&&h?-1:1);break}return b}async function y4(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:a,rects:c,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:x="floating",altBoundary:w=!1,padding:b=0}=Ur(t,e),E=Xb(b),j=d[w?x==="floating"?"reference":"floating":x],S=Ka(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(j)))==null||n?j:j.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),D=x==="floating"?{x:s,y:i,width:c.floating.width,height:c.floating.height}:c.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d.floating)),M=await(a.isElement==null?void 0:a.isElement(A))?await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},_=Ka(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:D,offsetParent:A,strategy:p}):D);return{top:(S.top-_.top+E.top)/M.y,bottom:(_.bottom-S.bottom+E.bottom)/M.y,left:(S.left-_.left+E.left)/M.x,right:(_.right-S.right+E.right)/M.x}}const v4=50,b4=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:a=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:y4},p=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:x}=uy(h,s,p),w=s,b=0;const E={};for(let k=0;k<a.length;k++){const j=a[k];if(!j)continue;const{name:S,fn:D}=j,{x:A,y:M,data:_,reset:N}=await D({x:m,y:x,initialPlacement:s,placement:w,strategy:i,middlewareData:E,rects:h,platform:d,elements:{reference:e,floating:t}});m=A??m,x=M??x,E[S]={...E[S],..._},N&&b<v4&&(b++,typeof N=="object"&&(N.placement&&(w=N.placement),N.rects&&(h=N.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:m,y:x}=uy(h,w,p)),k=-1)}return{x:m,y:x,placement:w,strategy:i,middlewareData:E}},w4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:a,platform:c,elements:d,middlewareData:p}=t,{element:h,padding:m=0}=Ur(e,t)||{};if(h==null)return{};const x=Xb(m),w={x:n,y:s},b=wp(i),E=bp(b),k=await c.getDimensions(h),j=b==="y",S=j?"top":"left",D=j?"bottom":"right",A=j?"clientHeight":"clientWidth",M=a.reference[E]+a.reference[b]-w[b]-a.floating[E],_=w[b]-a.reference[b],N=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let P=N?N[A]:0;(!P||!await(c.isElement==null?void 0:c.isElement(N)))&&(P=d.floating[A]||a.floating[E]);const z=M/2-_/2,q=P/2-k[E]/2-1,T=ws(x[S],q),I=ws(x[D],q),B=T,W=P-k[E]-I,J=P/2-k[E]/2+z,G=xf(B,J,W),te=!p.arrow&&$o(i)!=null&&J!==G&&a.reference[E]/2-(J<B?T:I)-k[E]/2<0,ie=te?J<B?J-B:J-W:0;return{[b]:w[b]+ie,data:{[b]:G,centerOffset:J-G-ie,...te&&{alignmentOffset:ie}},reset:te}}}),k4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:a,rects:c,initialPlacement:d,platform:p,elements:h}=t,{mainAxis:m=!0,crossAxis:x=!0,fallbackPlacements:w,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:k=!0,...j}=Ur(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=Hr(i),D=yr(d),A=Hr(d)===d,M=await(p.isRTL==null?void 0:p.isRTL(h.floating)),_=w||(A||!k?[Ga(d)]:f4(d)),N=E!=="none";!w&&N&&_.push(...g4(d,k,E,M));const P=[d,..._],z=await p.detectOverflow(t,j),q=[];let T=((s=a.flip)==null?void 0:s.overflows)||[];if(m&&q.push(z[S]),x){const J=d4(i,c,M);q.push(z[J[0]],z[J[1]])}if(T=[...T,{placement:i,overflows:q}],!q.every(J=>J<=0)){var I,B;const J=(((I=a.flip)==null?void 0:I.index)||0)+1,G=P[J];if(G&&(!(x==="alignment"?D!==yr(G):!1)||T.every(X=>yr(X.placement)===D?X.overflows[0]>0:!0)))return{data:{index:J,overflows:T},reset:{placement:G}};let te=(B=T.filter(ie=>ie.overflows[0]<=0).sort((ie,X)=>ie.overflows[1]-X.overflows[1])[0])==null?void 0:B.placement;if(!te)switch(b){case"bestFit":{var W;const ie=(W=T.filter(X=>{if(N){const oe=yr(X.placement);return oe===D||oe==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(oe=>oe>0).reduce((oe,R)=>oe+R,0)]).sort((X,oe)=>X[1]-oe[1])[0])==null?void 0:W[0];ie&&(te=ie);break}case"initialPlacement":te=d;break}if(i!==te)return{reset:{placement:te}}}return{}}}};function cy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dy(e){return u4.some(t=>e[t]>=0)}const S4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...a}=Ur(e,t);switch(i){case"referenceHidden":{const c=await s.detectOverflow(t,{...a,elementContext:"reference"}),d=cy(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:dy(d)}}}case"escaped":{const c=await s.detectOverflow(t,{...a,altBoundary:!0}),d=cy(c,n.floating);return{data:{escapedOffsets:d,escaped:dy(d)}}}default:return{}}}}},Qb=new Set(["left","top"]);async function j4(e,t){const{placement:n,platform:s,elements:i}=e,a=await(s.isRTL==null?void 0:s.isRTL(i.floating)),c=Hr(n),d=$o(n),p=yr(n)==="y",h=Qb.has(c)?-1:1,m=a&&p?-1:1,x=Ur(t,e);let{mainAxis:w,crossAxis:b,alignmentAxis:E}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return d&&typeof E=="number"&&(b=d==="end"?E*-1:E),p?{x:b*m,y:w*h}:{x:w*h,y:b*m}}const C4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:a,placement:c,middlewareData:d}=t,p=await j4(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:i+p.x,y:a+p.y,data:{...p,placement:c}}}}},N4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i,platform:a}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:S=>{let{x:D,y:A}=S;return{x:D,y:A}}},...h}=Ur(e,t),m={x:n,y:s},x=await a.detectOverflow(t,h),w=yr(Hr(i)),b=vp(w);let E=m[b],k=m[w];if(c){const S=b==="y"?"top":"left",D=b==="y"?"bottom":"right",A=E+x[S],M=E-x[D];E=xf(A,E,M)}if(d){const S=w==="y"?"top":"left",D=w==="y"?"bottom":"right",A=k+x[S],M=k-x[D];k=xf(A,k,M)}const j=p.fn({...t,[b]:E,[w]:k});return{...j,data:{x:j.x-n,y:j.y-s,enabled:{[b]:c,[w]:d}}}}}},E4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:i,rects:a,middlewareData:c}=t,{offset:d=0,mainAxis:p=!0,crossAxis:h=!0}=Ur(e,t),m={x:n,y:s},x=yr(i),w=vp(x);let b=m[w],E=m[x];const k=Ur(d,t),j=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(p){const A=w==="y"?"height":"width",M=a.reference[w]-a.floating[A]+j.mainAxis,_=a.reference[w]+a.reference[A]-j.mainAxis;b<M?b=M:b>_&&(b=_)}if(h){var S,D;const A=w==="y"?"width":"height",M=Qb.has(Hr(i)),_=a.reference[x]-a.floating[A]+(M&&((S=c.offset)==null?void 0:S[x])||0)+(M?0:j.crossAxis),N=a.reference[x]+a.reference[A]+(M?0:((D=c.offset)==null?void 0:D[x])||0)-(M?j.crossAxis:0);E<_?E=_:E>N&&(E=N)}return{[w]:b,[x]:E}}}},R4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:a,platform:c,elements:d}=t,{apply:p=()=>{},...h}=Ur(e,t),m=await c.detectOverflow(t,h),x=Hr(i),w=$o(i),b=yr(i)==="y",{width:E,height:k}=a.floating;let j,S;x==="top"||x==="bottom"?(j=x,S=w===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(S=x,j=w==="end"?"top":"bottom");const D=k-m.top-m.bottom,A=E-m.left-m.right,M=ws(k-m[j],D),_=ws(E-m[S],A),N=!t.middlewareData.shift;let P=M,z=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(z=A),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(P=D),N&&!w){const T=En(m.left,0),I=En(m.right,0),B=En(m.top,0),W=En(m.bottom,0);b?z=E-2*(T!==0||I!==0?T+I:En(m.left,m.right)):P=k-2*(B!==0||W!==0?B+W:En(m.top,m.bottom))}await p({...t,availableWidth:z,availableHeight:P});const q=await c.getDimensions(d.floating);return E!==q.width||k!==q.height?{reset:{rects:!0}}:{}}}};function bu(){return typeof window<"u"}function zo(e){return Jb(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cr(e){var t;return(t=(Jb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jb(e){return bu()?e instanceof Node||e instanceof Pn(e).Node:!1}function nr(e){return bu()?e instanceof Element||e instanceof Pn(e).Element:!1}function Vr(e){return bu()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function fy(e){return!bu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}function il(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&i!=="inline"&&i!=="contents"}function T4(e){return/^(table|td|th)$/.test(zo(e))}function wu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const P4=/transform|translate|scale|rotate|perspective|filter/,A4=/paint|layout|strict|content/,zs=e=>!!e&&e!=="none";let Bd;function kp(e){const t=nr(e)?rr(e):e;return zs(t.transform)||zs(t.translate)||zs(t.scale)||zs(t.rotate)||zs(t.perspective)||!Sp()&&(zs(t.backdropFilter)||zs(t.filter))||P4.test(t.willChange||"")||A4.test(t.contain||"")}function D4(e){let t=ks(e);for(;Vr(t)&&!Po(t);){if(kp(t))return t;if(wu(t))return null;t=ks(t)}return null}function Sp(){return Bd==null&&(Bd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Bd}function Po(e){return/^(html|body|#document)$/.test(zo(e))}function rr(e){return Pn(e).getComputedStyle(e)}function ku(e){return nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ks(e){if(zo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fy(e)&&e.host||Cr(e);return fy(t)?t.host:t}function Zb(e){const t=ks(e);return Po(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&il(t)?t:Zb(t)}function qi(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Zb(e),a=i===((s=e.ownerDocument)==null?void 0:s.body),c=Pn(i);if(a){const d=vf(c);return t.concat(c,c.visualViewport||[],il(i)?i:[],d&&n?qi(d):[])}else return t.concat(i,qi(i,[],n))}function vf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ew(e){const t=rr(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=Vr(e),a=i?e.offsetWidth:n,c=i?e.offsetHeight:s,d=qa(n)!==a||qa(s)!==c;return d&&(n=a,s=c),{width:n,height:s,$:d}}function jp(e){return nr(e)?e:e.contextElement}function Ro(e){const t=jp(e);if(!Vr(t))return wr(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:a}=ew(t);let c=(a?qa(n.width):n.width)/s,d=(a?qa(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const L4=wr(0);function tw(e){const t=Pn(e);return!Sp()||!t.visualViewport?L4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pn(e)?!1:t}function Hs(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=jp(e);let c=wr(1);t&&(s?nr(s)&&(c=Ro(s)):c=Ro(e));const d=I4(a,n,s)?tw(a):wr(0);let p=(i.left+d.x)/c.x,h=(i.top+d.y)/c.y,m=i.width/c.x,x=i.height/c.y;if(a){const w=Pn(a),b=s&&nr(s)?Pn(s):s;let E=w,k=vf(E);for(;k&&s&&b!==E;){const j=Ro(k),S=k.getBoundingClientRect(),D=rr(k),A=S.left+(k.clientLeft+parseFloat(D.paddingLeft))*j.x,M=S.top+(k.clientTop+parseFloat(D.paddingTop))*j.y;p*=j.x,h*=j.y,m*=j.x,x*=j.y,p+=A,h+=M,E=Pn(k),k=vf(E)}}return Ka({width:m,height:x,x:p,y:h})}function Su(e,t){const n=ku(e).scrollLeft;return t?t.left+n:Hs(Cr(e)).left+n}function nw(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-Su(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function O4(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const a=i==="fixed",c=Cr(s),d=t?wu(t.floating):!1;if(s===c||d&&a)return n;let p={scrollLeft:0,scrollTop:0},h=wr(1);const m=wr(0),x=Vr(s);if((x||!x&&!a)&&((zo(s)!=="body"||il(c))&&(p=ku(s)),x)){const b=Hs(s);h=Ro(s),m.x=b.x+s.clientLeft,m.y=b.y+s.clientTop}const w=c&&!x&&!a?nw(c,p):wr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-p.scrollLeft*h.x+m.x+w.x,y:n.y*h.y-p.scrollTop*h.y+m.y+w.y}}function M4(e){return Array.from(e.getClientRects())}function _4(e){const t=Cr(e),n=ku(e),s=e.ownerDocument.body,i=En(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),a=En(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let c=-n.scrollLeft+Su(e);const d=-n.scrollTop;return rr(s).direction==="rtl"&&(c+=En(t.clientWidth,s.clientWidth)-i),{width:i,height:a,x:c,y:d}}const py=25;function $4(e,t){const n=Pn(e),s=Cr(e),i=n.visualViewport;let a=s.clientWidth,c=s.clientHeight,d=0,p=0;if(i){a=i.width,c=i.height;const m=Sp();(!m||m&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const h=Su(s);if(h<=0){const m=s.ownerDocument,x=m.body,w=getComputedStyle(x),b=m.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,E=Math.abs(s.clientWidth-x.clientWidth-b);E<=py&&(a-=E)}else h<=py&&(a+=h);return{width:a,height:c,x:d,y:p}}function z4(e,t){const n=Hs(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,a=Vr(e)?Ro(e):wr(1),c=e.clientWidth*a.x,d=e.clientHeight*a.y,p=i*a.x,h=s*a.y;return{width:c,height:d,x:p,y:h}}function hy(e,t,n){let s;if(t==="viewport")s=$4(e,n);else if(t==="document")s=_4(Cr(e));else if(nr(t))s=z4(t,n);else{const i=tw(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ka(s)}function rw(e,t){const n=ks(e);return n===t||!nr(n)||Po(n)?!1:rr(n).position==="fixed"||rw(n,t)}function F4(e,t){const n=t.get(e);if(n)return n;let s=qi(e,[],!1).filter(d=>nr(d)&&zo(d)!=="body"),i=null;const a=rr(e).position==="fixed";let c=a?ks(e):e;for(;nr(c)&&!Po(c);){const d=rr(c),p=kp(c);!p&&d.position==="fixed"&&(i=null),(a?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||il(c)&&!p&&rw(e,c))?s=s.filter(m=>m!==c):i=d,c=ks(c)}return t.set(e,s),s}function B4(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const c=[...n==="clippingAncestors"?wu(t)?[]:F4(t,this._c):[].concat(n),s],d=hy(t,c[0],i);let p=d.top,h=d.right,m=d.bottom,x=d.left;for(let w=1;w<c.length;w++){const b=hy(t,c[w],i);p=En(b.top,p),h=ws(b.right,h),m=ws(b.bottom,m),x=En(b.left,x)}return{width:h-x,height:m-p,x,y:p}}function U4(e){const{width:t,height:n}=ew(e);return{width:t,height:n}}function H4(e,t,n){const s=Vr(t),i=Cr(t),a=n==="fixed",c=Hs(e,!0,a,t);let d={scrollLeft:0,scrollTop:0};const p=wr(0);function h(){p.x=Su(i)}if(s||!s&&!a)if((zo(t)!=="body"||il(i))&&(d=ku(t)),s){const b=Hs(t,!0,a,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else i&&h();a&&!s&&i&&h();const m=i&&!s&&!a?nw(i,d):wr(0),x=c.left+d.scrollLeft-p.x-m.x,w=c.top+d.scrollTop-p.y-m.y;return{x,y:w,width:c.width,height:c.height}}function Ud(e){return rr(e).position==="static"}function my(e,t){if(!Vr(e)||rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Cr(e)===n&&(n=n.ownerDocument.body),n}function sw(e,t){const n=Pn(e);if(wu(e))return n;if(!Vr(e)){let i=ks(e);for(;i&&!Po(i);){if(nr(i)&&!Ud(i))return i;i=ks(i)}return n}let s=my(e,t);for(;s&&T4(s)&&Ud(s);)s=my(s,t);return s&&Po(s)&&Ud(s)&&!kp(s)?n:s||D4(e)||n}const W4=async function(e){const t=this.getOffsetParent||sw,n=this.getDimensions,s=await n(e.floating);return{reference:H4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function V4(e){return rr(e).direction==="rtl"}const q4={convertOffsetParentRelativeRectToViewportRelativeRect:O4,getDocumentElement:Cr,getClippingRect:B4,getOffsetParent:sw,getElementRects:W4,getClientRects:M4,getDimensions:U4,getScale:Ro,isElement:nr,isRTL:V4};function ow(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function G4(e,t){let n=null,s;const i=Cr(e);function a(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function c(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),a();const h=e.getBoundingClientRect(),{left:m,top:x,width:w,height:b}=h;if(d||t(),!w||!b)return;const E=Ea(x),k=Ea(i.clientWidth-(m+w)),j=Ea(i.clientHeight-(x+b)),S=Ea(m),A={rootMargin:-E+"px "+-k+"px "+-j+"px "+-S+"px",threshold:En(0,ws(1,p))||1};let M=!0;function _(N){const P=N[0].intersectionRatio;if(P!==p){if(!M)return c();P?c(!1,P):s=setTimeout(()=>{c(!1,1e-7)},1e3)}P===1&&!ow(h,e.getBoundingClientRect())&&c(),M=!1}try{n=new IntersectionObserver(_,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,A)}n.observe(e)}return c(!0),a}function K4(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=s,h=jp(e),m=i||a?[...h?qi(h):[],...t?qi(t):[]]:[];m.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const x=h&&d?G4(h,n):null;let w=-1,b=null;c&&(b=new ResizeObserver(S=>{let[D]=S;D&&D.target===h&&b&&t&&(b.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(t)})),n()}),h&&!p&&b.observe(h),t&&b.observe(t));let E,k=p?Hs(e):null;p&&j();function j(){const S=Hs(e);k&&!ow(k,S)&&n(),k=S,E=requestAnimationFrame(j)}return n(),()=>{var S;m.forEach(D=>{i&&D.removeEventListener("scroll",n),a&&D.removeEventListener("resize",n)}),x==null||x(),(S=b)==null||S.disconnect(),b=null,p&&cancelAnimationFrame(E)}}const Y4=C4,X4=N4,Q4=k4,J4=R4,Z4=S4,gy=w4,eD=E4,tD=(e,t,n)=>{const s=new Map,i={platform:q4,...n},a={...i.platform,_c:s};return b4(e,t,{...i,platform:a})};var nD=typeof document<"u",rD=function(){},_a=nD?y.useLayoutEffect:rD;function Ya(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!Ya(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const a=i[s];if(!(a==="_owner"&&e.$$typeof)&&!Ya(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function iw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xy(e,t){const n=iw(e);return Math.round(t*n)/n}function Hd(e){const t=y.useRef(e);return _a(()=>{t.current=e}),t}function sD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:a,floating:c}={},transform:d=!0,whileElementsMounted:p,open:h}=e,[m,x]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,b]=y.useState(s);Ya(w,s)||b(s);const[E,k]=y.useState(null),[j,S]=y.useState(null),D=y.useCallback(X=>{X!==N.current&&(N.current=X,k(X))},[]),A=y.useCallback(X=>{X!==P.current&&(P.current=X,S(X))},[]),M=a||E,_=c||j,N=y.useRef(null),P=y.useRef(null),z=y.useRef(m),q=p!=null,T=Hd(p),I=Hd(i),B=Hd(h),W=y.useCallback(()=>{if(!N.current||!P.current)return;const X={placement:t,strategy:n,middleware:w};I.current&&(X.platform=I.current),tD(N.current,P.current,X).then(oe=>{const R={...oe,isPositioned:B.current!==!1};J.current&&!Ya(z.current,R)&&(z.current=R,ys.flushSync(()=>{x(R)}))})},[w,t,n,I,B]);_a(()=>{h===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,x(X=>({...X,isPositioned:!1})))},[h]);const J=y.useRef(!1);_a(()=>(J.current=!0,()=>{J.current=!1}),[]),_a(()=>{if(M&&(N.current=M),_&&(P.current=_),M&&_){if(T.current)return T.current(M,_,W);W()}},[M,_,W,T,q]);const G=y.useMemo(()=>({reference:N,floating:P,setReference:D,setFloating:A}),[D,A]),te=y.useMemo(()=>({reference:M,floating:_}),[M,_]),ie=y.useMemo(()=>{const X={position:n,left:0,top:0};if(!te.floating)return X;const oe=xy(te.floating,m.x),R=xy(te.floating,m.y);return d?{...X,transform:"translate("+oe+"px, "+R+"px)",...iw(te.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:R}},[n,d,te.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:W,refs:G,elements:te,floatingStyles:ie}),[m,W,G,te,ie])}const oD=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:i}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?gy({element:s.current,padding:i}).fn(n):{}:s?gy({element:s,padding:i}).fn(n):{}}}},iD=(e,t)=>{const n=Y4(e);return{name:n.name,fn:n.fn,options:[e,t]}},lD=(e,t)=>{const n=X4(e);return{name:n.name,fn:n.fn,options:[e,t]}},aD=(e,t)=>({fn:eD(e).fn,options:[e,t]}),uD=(e,t)=>{const n=Q4(e);return{name:n.name,fn:n.fn,options:[e,t]}},cD=(e,t)=>{const n=J4(e);return{name:n.name,fn:n.fn,options:[e,t]}},dD=(e,t)=>{const n=Z4(e);return{name:n.name,fn:n.fn,options:[e,t]}},fD=(e,t)=>{const n=oD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var pD="Arrow",lw=y.forwardRef((e,t)=>{const{children:n,width:s=10,height:i=5,...a}=e;return l.jsx(jt.svg,{...a,ref:t,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});lw.displayName=pD;var hD=lw;function mD(e){const[t,n]=y.useState(void 0);return bs(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let c,d;if("borderBoxSize"in a){const p=a.borderBoxSize,h=Array.isArray(p)?p[0]:p;c=h.inlineSize,d=h.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var Cp="Popper",[aw,uw]=Ws(Cp),[gD,cw]=aw(Cp),dw=e=>{const{__scopePopper:t,children:n}=e,[s,i]=y.useState(null);return l.jsx(gD,{scope:t,anchor:s,onAnchorChange:i,children:n})};dw.displayName=Cp;var fw="PopperAnchor",pw=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...i}=e,a=cw(fw,n),c=y.useRef(null),d=Qt(t,c),p=y.useRef(null);return y.useEffect(()=>{const h=p.current;p.current=(s==null?void 0:s.current)||c.current,h!==p.current&&a.onAnchorChange(p.current)}),s?null:l.jsx(jt.div,{...i,ref:d})});pw.displayName=fw;var Np="PopperContent",[xD,yD]=aw(Np),hw=y.forwardRef((e,t)=>{var Pe,ke,Te,ee,Ee,je;const{__scopePopper:n,side:s="bottom",sideOffset:i=0,align:a="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:x="partial",hideWhenDetached:w=!1,updatePositionStrategy:b="optimized",onPlaced:E,...k}=e,j=cw(Np,n),[S,D]=y.useState(null),A=Qt(t,Qe=>D(Qe)),[M,_]=y.useState(null),N=mD(M),P=(N==null?void 0:N.width)??0,z=(N==null?void 0:N.height)??0,q=s+(a!=="center"?"-"+a:""),T=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},I=Array.isArray(h)?h:[h],B=I.length>0,W={padding:T,boundary:I.filter(bD),altBoundary:B},{refs:J,floatingStyles:G,placement:te,isPositioned:ie,middlewareData:X}=sD({strategy:"fixed",placement:q,whileElementsMounted:(...Qe)=>K4(...Qe,{animationFrame:b==="always"}),elements:{reference:j.anchor},middleware:[iD({mainAxis:i+z,alignmentAxis:c}),p&&lD({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?aD():void 0,...W}),p&&uD({...W}),cD({...W,apply:({elements:Qe,rects:yt,availableWidth:Bt,availableHeight:Ut})=>{const{width:_t,height:vn}=yt.reference,Dt=Qe.floating.style;Dt.setProperty("--radix-popper-available-width",`${Bt}px`),Dt.setProperty("--radix-popper-available-height",`${Ut}px`),Dt.setProperty("--radix-popper-anchor-width",`${_t}px`),Dt.setProperty("--radix-popper-anchor-height",`${vn}px`)}}),M&&fD({element:M,padding:d}),wD({arrowWidth:P,arrowHeight:z}),w&&dD({strategy:"referenceHidden",...W})]}),[oe,R]=xw(te),$=Bs(E);bs(()=>{ie&&($==null||$())},[ie,$]);const Q=(Pe=X.arrow)==null?void 0:Pe.x,L=(ke=X.arrow)==null?void 0:ke.y,pe=((Te=X.arrow)==null?void 0:Te.centerOffset)!==0,[ve,de]=y.useState();return bs(()=>{S&&de(window.getComputedStyle(S).zIndex)},[S]),l.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:ie?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(ee=X.transformOrigin)==null?void 0:ee.x,(Ee=X.transformOrigin)==null?void 0:Ee.y].join(" "),...((je=X.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(xD,{scope:n,placedSide:oe,onArrowChange:_,arrowX:Q,arrowY:L,shouldHideArrow:pe,children:l.jsx(jt.div,{"data-side":oe,"data-align":R,...k,ref:A,style:{...k.style,animation:ie?void 0:"none"}})})})});hw.displayName=Np;var mw="PopperArrow",vD={top:"bottom",right:"left",bottom:"top",left:"right"},gw=y.forwardRef(function(t,n){const{__scopePopper:s,...i}=t,a=yD(mw,s),c=vD[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(hD,{...i,ref:n,style:{...i.style,display:"block"}})})});gw.displayName=mw;function bD(e){return e!==null}var wD=e=>({name:"transformOrigin",options:e,fn(t){var j,S,D;const{placement:n,rects:s,middlewareData:i}=t,c=((j=i.arrow)==null?void 0:j.centerOffset)!==0,d=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[h,m]=xw(n),x={start:"0%",center:"50%",end:"100%"}[m],w=(((S=i.arrow)==null?void 0:S.x)??0)+d/2,b=(((D=i.arrow)==null?void 0:D.y)??0)+p/2;let E="",k="";return h==="bottom"?(E=c?x:`${w}px`,k=`${-p}px`):h==="top"?(E=c?x:`${w}px`,k=`${s.floating.height+p}px`):h==="right"?(E=`${-p}px`,k=c?x:`${b}px`):h==="left"&&(E=`${s.floating.width+p}px`,k=c?x:`${b}px`),{data:{x:E,y:k}}}});function xw(e){const[t,n="center"]=e.split("-");return[t,n]}var kD=dw,SD=pw,jD=hw,CD=gw,ND=Symbol("radix.slottable");function ED(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ND,t}var RD=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),TD="VisuallyHidden",yw=y.forwardRef((e,t)=>l.jsx(jt.span,{...e,ref:t,style:{...RD,...e.style}}));yw.displayName=TD;var PD=yw,[ju]=Ws("Tooltip",[uw]),Cu=uw(),vw="TooltipProvider",AD=700,bf="tooltip.open",[DD,Ep]=ju(vw),bw=e=>{const{__scopeTooltip:t,delayDuration:n=AD,skipDelayDuration:s=300,disableHoverableContent:i=!1,children:a}=e,c=y.useRef(!0),d=y.useRef(!1),p=y.useRef(0);return y.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),l.jsx(DD,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,s)},[s]),isPointerInTransitRef:d,onPointerInTransitChange:y.useCallback(h=>{d.current=h},[]),disableHoverableContent:i,children:a})};bw.displayName=vw;var Gi="Tooltip",[LD,ll]=ju(Gi),ww=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:i,onOpenChange:a,disableHoverableContent:c,delayDuration:d}=e,p=Ep(Gi,e.__scopeTooltip),h=Cu(t),[m,x]=y.useState(null),w=So(),b=y.useRef(0),E=c??p.disableHoverableContent,k=d??p.delayDuration,j=y.useRef(!1),[S,D]=lu({prop:s,defaultProp:i??!1,onChange:P=>{P?(p.onOpen(),document.dispatchEvent(new CustomEvent(bf))):p.onClose(),a==null||a(P)},caller:Gi}),A=y.useMemo(()=>S?j.current?"delayed-open":"instant-open":"closed",[S]),M=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j.current=!1,D(!0)},[D]),_=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,D(!1)},[D]),N=y.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{j.current=!0,D(!0),b.current=0},k)},[k,D]);return y.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),l.jsx(kD,{...h,children:l.jsx(LD,{scope:t,contentId:w,open:S,stateAttribute:A,trigger:m,onTriggerChange:x,onTriggerEnter:y.useCallback(()=>{p.isOpenDelayedRef.current?N():M()},[p.isOpenDelayedRef,N,M]),onTriggerLeave:y.useCallback(()=>{E?_():(window.clearTimeout(b.current),b.current=0)},[_,E]),onOpen:M,onClose:_,disableHoverableContent:E,children:n})})};ww.displayName=Gi;var wf="TooltipTrigger",kw=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,i=ll(wf,n),a=Ep(wf,n),c=Cu(n),d=y.useRef(null),p=Qt(t,d,i.onTriggerChange),h=y.useRef(!1),m=y.useRef(!1),x=y.useCallback(()=>h.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),l.jsx(SD,{asChild:!0,...c,children:l.jsx(jt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...s,ref:p,onPointerMove:st(e.onPointerMove,w=>{w.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:st(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:st(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:st(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:st(e.onBlur,i.onClose),onClick:st(e.onClick,i.onClose)})})});kw.displayName=wf;var Rp="TooltipPortal",[ID,OD]=ju(Rp,{forceMount:void 0}),Sw=e=>{const{__scopeTooltip:t,forceMount:n,children:s,container:i}=e,a=ll(Rp,t);return l.jsx(ID,{scope:t,forceMount:n,children:l.jsx(Vs,{present:n||a.open,children:l.jsx(dp,{asChild:!0,container:i,children:s})})})};Sw.displayName=Rp;var Ao="TooltipContent",jw=y.forwardRef((e,t)=>{const n=OD(Ao,e.__scopeTooltip),{forceMount:s=n.forceMount,side:i="top",...a}=e,c=ll(Ao,e.__scopeTooltip);return l.jsx(Vs,{present:s||c.open,children:c.disableHoverableContent?l.jsx(Cw,{side:i,...a,ref:t}):l.jsx(MD,{side:i,...a,ref:t})})}),MD=y.forwardRef((e,t)=>{const n=ll(Ao,e.__scopeTooltip),s=Ep(Ao,e.__scopeTooltip),i=y.useRef(null),a=Qt(t,i),[c,d]=y.useState(null),{trigger:p,onClose:h}=n,m=i.current,{onPointerInTransitChange:x}=s,w=y.useCallback(()=>{d(null),x(!1)},[x]),b=y.useCallback((E,k)=>{const j=E.currentTarget,S={x:E.clientX,y:E.clientY},D=BD(S,j.getBoundingClientRect()),A=UD(S,D),M=HD(k.getBoundingClientRect()),_=VD([...A,...M]);d(_),x(!0)},[x]);return y.useEffect(()=>()=>w(),[w]),y.useEffect(()=>{if(p&&m){const E=j=>b(j,m),k=j=>b(j,p);return p.addEventListener("pointerleave",E),m.addEventListener("pointerleave",k),()=>{p.removeEventListener("pointerleave",E),m.removeEventListener("pointerleave",k)}}},[p,m,b,w]),y.useEffect(()=>{if(c){const E=k=>{const j=k.target,S={x:k.clientX,y:k.clientY},D=(p==null?void 0:p.contains(j))||(m==null?void 0:m.contains(j)),A=!WD(S,c);D?w():A&&(w(),h())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[p,m,c,h,w]),l.jsx(Cw,{...e,ref:a})}),[_D,$D]=ju(Gi,{isInside:!1}),zD=ED("TooltipContent"),Cw=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:c,...d}=e,p=ll(Ao,n),h=Cu(n),{onClose:m}=p;return y.useEffect(()=>(document.addEventListener(bf,m),()=>document.removeEventListener(bf,m)),[m]),y.useEffect(()=>{if(p.trigger){const x=w=>{const b=w.target;b!=null&&b.contains(p.trigger)&&m()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[p.trigger,m]),l.jsx(cp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:l.jsxs(jD,{"data-state":p.stateAttribute,...h,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(zD,{children:s}),l.jsx(_D,{scope:n,isInside:!0,children:l.jsx(PD,{id:p.contentId,role:"tooltip",children:i||s})})]})})});jw.displayName=Ao;var Nw="TooltipArrow",FD=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,i=Cu(n);return $D(Nw,n).isInside?null:l.jsx(CD,{...i,...s,ref:t})});FD.displayName=Nw;function BD(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,s,i,a)){case a:return"left";case i:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function UD(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function HD(e){const{top:t,right:n,bottom:s,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:s},{x:i,y:s}]}function WD(e,t){const{x:n,y:s}=e;let i=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const d=t[a],p=t[c],h=d.x,m=d.y,x=p.x,w=p.y;m>s!=w>s&&n<(x-h)*(s-m)/(w-m)+h&&(i=!i)}return i}function VD(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),qD(t)}function qD(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const i=e[s];for(;t.length>=2;){const a=t[t.length-1],c=t[t.length-2];if((a.x-c.x)*(i.y-c.y)>=(a.y-c.y)*(i.x-c.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const i=e[s];for(;n.length>=2;){const a=n[n.length-1],c=n[n.length-2];if((a.x-c.x)*(i.y-c.y)>=(a.y-c.y)*(i.x-c.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var GD=bw,KD=ww,YD=kw,XD=Sw,Ew=jw;const QD=GD,JD=KD,ZD=YD,Rw=y.forwardRef(({className:e,sideOffset:t=4,...n},s)=>l.jsx(XD,{children:l.jsx(Ew,{ref:s,sideOffset:t,className:$e("z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Rw.displayName=Ew.displayName;const kf=["missions","playbooks","todos","servers","config"];function eL(e){const t=new Set;for(const n of e.split(",").map(s=>s.trim()))kf.includes(n)&&t.add(n);return t}function yy(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function tL(){const[e,t]=y.useState(!0),[n,s]=y.useState(null),[i,a]=y.useState(""),[c,d]=y.useState(new Set(kf)),[p,h]=y.useState(!1),[m,x]=y.useState(!1),[w,b]=y.useState(null),[E,k]=y.useState(null),j=y.useCallback(async()=>{try{const N=await fetch("/api/backup");if(!N.ok)throw new Error(`HTTP ${N.status}`);const P=await N.json();s(P),a(P.repo??""),d(eL(P.categories)),h(!1)}catch(N){k({type:"error",message:`Failed to load backup config: ${N instanceof Error?N.message:String(N)}`})}finally{t(!1)}},[]);y.useEffect(()=>{j()},[j]);function S(N){d(P=>{const z=new Set(P);return z.has(N)?z.delete(N):z.add(N),z}),h(!0)}async function D(){x(!0),k(null);try{const N=Array.from(c),P=await fetch("/api/backup/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repo:i.trim()||null,categories:N})}),z=await P.json();if(!P.ok)throw new Error(z.error||`HTTP ${P.status}`);s(z),h(!1),k({type:"success",message:"Backup configuration saved."})}catch(N){k({type:"error",message:`Save failed: ${N instanceof Error?N.message:String(N)}`})}finally{x(!1)}}async function A(){b("push"),k(null);try{const N=await fetch("/api/backup/push",{method:"POST"}),P=await N.json();if(!N.ok||P.success===!1)throw new Error(P.error||P.message||`HTTP ${N.status}`);k({type:"success",message:P.message||"Backup complete."}),await j()}catch(N){k({type:"error",message:`Backup failed: ${N instanceof Error?N.message:String(N)}`})}finally{b(null)}}async function M(){if(window.confirm("Restore will overwrite local files for the selected categories with the contents of the GitHub repo. This cannot be undone. Continue?")){b("pull"),k(null);try{const P=await fetch("/api/backup/pull",{method:"POST"}),z=await P.json();if(!P.ok||z.success===!1)throw new Error(z.error||z.message||`HTTP ${P.status}`);k({type:"success",message:z.message||"Restore complete."}),await j()}catch(P){k({type:"error",message:`Restore failed: ${P instanceof Error?P.message:String(P)}`})}finally{b(null)}}}if(e)return l.jsx(Le,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})});const _=!!i.trim()&&c.size>0&&!w&&!p;return l.jsx(Le,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository and restore from it",children:l.jsxs("div",{className:"space-y-4",children:[E&&l.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${E.type==="success"?"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-400":"border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-900 dark:bg-rose-950/40 dark:text-rose-400"}`,children:E.message}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Repository URL"}),l.jsx("input",{type:"text",value:i,onChange:N=>{a(N.target.value),h(!0)},placeholder:"git@github.com:you/syntaur-backup.git",className:"editor-input w-full text-sm"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["SSH or HTTPS URL. Requires ",l.jsx("code",{className:"rounded bg-muted px-1",children:"git"})," installed and credentials configured locally."]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Categories to back up"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:kf.map(N=>{const P=c.has(N);return l.jsxs("button",{type:"button",onClick:()=>S(N),className:`shell-action text-xs ${P?"bg-primary/10 text-primary hover:bg-primary/20":"bg-muted/30 text-muted-foreground hover:bg-muted/60"}`,children:[l.jsx("span",{className:`mr-1 inline-block h-2 w-2 rounded-full ${P?"bg-primary":"bg-muted-foreground/40"}`}),N]},N)})})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs text-muted-foreground sm:grid-cols-2",children:[l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Last backup: "}),yy((n==null?void 0:n.lastBackup)??null)]}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Last restore: "}),yy((n==null?void 0:n.lastRestore)??null)]}),(n==null?void 0:n.locked)&&l.jsx("div",{className:"sm:col-span-2 text-amber-600 dark:text-amber-400",children:"⚠ A backup operation is in progress or the lock file is stale."})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[l.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:D,disabled:m||!p,children:[l.jsx(Ff,{className:"h-3.5 w-3.5"}),m?"Saving...":"Save Config"]}),l.jsxs("button",{className:"shell-action",onClick:A,disabled:!_,title:_?"Back up now":p?"Save config first":"Set repo and pick categories",children:[l.jsx(uC,{className:"h-3.5 w-3.5"}),w==="push"?"Backing up...":"Back Up Now"]}),l.jsxs("button",{className:"shell-action",onClick:M,disabled:!_,title:_?"Restore from backup":p?"Save config first":"Set repo and pick categories",children:[l.jsx(Fj,{className:"h-3.5 w-3.5"}),w==="pull"?"Restoring...":"Restore"]}),p&&l.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]}),l.jsxs("p",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-muted/20 p-3 text-xs text-muted-foreground",children:[l.jsx($j,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),l.jsxs("span",{children:["Restore never overwrites ",l.jsx("code",{className:"rounded bg-muted px-1",children:"config.md"})," (would clobber backup settings). The agent sessions database is not backed up — only markdown files."]})]})]})})}function Wd(e){return{statuses:e.statuses.map(t=>({id:t.id,label:t.label,description:t.description??"",color:t.color??"",terminal:t.terminal??!1})),order:[...e.order]}}function nL(){const[e,t]=y.useState(!0),[n,s]=y.useState(null),[i,a]=y.useState(!1),[c,d]=y.useState([]),[p,h]=y.useState([]),[m,x]=y.useState(!1),[w,b]=y.useState(null),[E,k]=y.useState(!1),j=y.useCallback(async()=>{try{const z=await fetch("/api/config/statuses");if(!z.ok)throw new Error(`HTTP ${z.status}`);const q=await z.json(),T=Wd(q);d(T.statuses),h(T.order),a(q.custom),k(!1),s(null)}catch(z){s(z instanceof Error?z.message:"Failed to load config")}finally{t(!1)}},[]);y.useEffect(()=>{j()},[j]);function S(){setTimeout(()=>b(null),3e3)}async function D(){x(!0),b(null);try{const z={statuses:c.map(B=>({id:B.id,label:B.label,...B.description?{description:B.description}:{},...B.color?{color:B.color}:{},...B.terminal?{terminal:!0}:{}})),order:p,transitions:[]},q=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)});if(!q.ok){const B=await q.json().catch(()=>({error:"Unknown error"}));throw new Error(B.error??"Save failed")}const T=await q.json(),I=Wd(T);d(I.statuses),h(I.order),a(T.custom),k(!1),Fg(),b({type:"success",message:"Status config saved"}),S()}catch(z){b({type:"error",message:z instanceof Error?z.message:"Save failed"})}finally{x(!1)}}async function A(){x(!0),b(null);try{const z=await fetch("/api/config/statuses",{method:"DELETE"});if(!z.ok)throw new Error("Reset failed");const q=await z.json(),T=Wd(q);d(T.statuses),h(T.order),a(q.custom),k(!1),Fg(),b({type:"success",message:"Reset to defaults"}),S()}catch(z){b({type:"error",message:z instanceof Error?z.message:"Reset failed"})}finally{x(!1)}}function M(z,q,T){d(I=>{const B=[...I];if(B[z]={...B[z],[q]:T},q==="id"&&typeof T=="string"){const W=I[z].id;h(J=>J.map(G=>G===W?T:G))}return B}),k(!0)}function _(){const z=`status_${c.length+1}`;d(q=>[...q,{id:z,label:"New Status",description:"",color:"",terminal:!1}]),h(q=>[...q,z]),k(!0)}function N(z){const q=c[z].id;d(T=>T.filter((I,B)=>B!==z)),h(T=>T.filter(I=>I!==q)),k(!0)}function P(z,q){const T=z+q;T<0||T>=p.length||(h(I=>{const B=[...I];return[B[z],B[T]]=[B[T],B[z]],B}),k(!0))}return e?l.jsx(kt,{label:"Loading settings..."}):n?l.jsx(St,{error:n}):l.jsx(QD,{children:l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:`flex items-center justify-between rounded-lg border px-4 py-3 text-sm ${i?"border-primary/30 bg-primary/5 text-primary":"border-border/60 bg-muted/30 text-muted-foreground"}`,children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(lv,{className:"h-4 w-4"}),i?"Using custom status configuration from ~/.syntaur/config.md":"Using default status configuration"]}),l.jsxs("button",{className:"shell-action text-xs",onClick:A,disabled:m||!i&&!E,children:[l.jsx(tC,{className:"h-3 w-3"}),"Reset to Defaults"]})]}),w&&l.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${w.type==="success"?"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-400":"border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-900 dark:bg-rose-950/40 dark:text-rose-400"}`,children:w.message}),l.jsx(Le,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:l.jsxs("button",{className:"shell-action text-xs",onClick:_,children:[l.jsx(tr,{className:"h-3 w-3"}),"Add Status"]}),children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border/50 text-left text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[l.jsx("th",{className:"pb-2 pr-3",children:"ID"}),l.jsx("th",{className:"pb-2 pr-3",children:"Label"}),l.jsx("th",{className:"pb-2 pr-3",children:"Color"}),l.jsx("th",{className:"pb-2 pr-3",children:l.jsxs(JD,{children:[l.jsx(ZD,{asChild:!0,children:l.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),l.jsx(Rw,{className:"max-w-xs text-xs font-normal normal-case tracking-normal",children:'When enabled, assignments in this status count as finished — they fill the "done" portion of progress bars and satisfy dependency requirements.'})]})}),l.jsx("th",{className:"pb-2 w-10"})]})}),l.jsx("tbody",{className:"divide-y divide-border/30",children:c.map((z,q)=>l.jsxs("tr",{children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:z.id,onChange:T=>M(q,"id",T.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:z.label,onChange:T=>M(q,"label",T.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(a4,{value:z.color,onChange:T=>M(q,"color",T)})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("button",{type:"button",role:"switch","aria-checked":z.terminal,onClick:()=>M(q,"terminal",!z.terminal),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background ${z.terminal?"bg-primary":"bg-muted"}`,children:l.jsx("span",{className:`pointer-events-none inline-block h-4 w-4 rounded-full bg-background shadow-sm ring-0 transition-transform ${z.terminal?"translate-x-4":"translate-x-0"}`})})}),l.jsx("td",{className:"py-2",children:l.jsx("button",{className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",onClick:()=>N(q),title:"Remove status",children:l.jsx(Io,{className:"h-3.5 w-3.5"})})})]},q))})]})})}),l.jsx(Le,{title:"Status Order",description:"Controls display order in the dashboard (Kanban columns, progress bars, dropdowns)",children:l.jsx("div",{className:"space-y-1",children:p.map((z,q)=>{var I;const T=((I=c.find(B=>B.id===z))==null?void 0:I.label)??z;return l.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[l.jsx("span",{className:"mr-1 font-mono text-xs text-muted-foreground/60",children:q+1}),l.jsx("span",{className:"flex-1 font-medium",children:T}),l.jsx("span",{className:"text-xs text-muted-foreground",children:z}),l.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>P(q,-1),disabled:q===0,title:"Move up",children:l.jsx(rv,{className:"h-3.5 w-3.5"})}),l.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>P(q,1),disabled:q===p.length-1,title:"Move down",children:l.jsx(Wi,{className:"h-3.5 w-3.5"})})]},q)})})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:D,disabled:m||!E,children:[l.jsx(Ff,{className:"h-3.5 w-3.5"}),m?"Saving...":"Save Configuration"]}),E&&l.jsxs(l.Fragment,{children:[l.jsx("button",{className:"shell-action text-xs",onClick:()=>{t(!0),j()},disabled:m,children:"Discard Changes"}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]}),l.jsx(tL,{})]})})}const vy=[{value:"open",icon:"○",label:"Open",color:"text-muted-foreground"},{value:"in_progress",icon:"◉",label:"In Progress",color:"text-blue-400"},{value:"completed",icon:"✓",label:"Completed",color:"text-emerald-400"},{value:"blocked",icon:"✕",label:"Blocked",color:"text-amber-400"}];function Tw({status:e,onChange:t}){const[n,s]=y.useState(!1),i=y.useRef(null);y.useEffect(()=>{if(!n)return;function c(d){i.current&&!i.current.contains(d.target)&&s(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]);const a=vy.find(c=>c.value===e);return l.jsxs("div",{className:"relative",ref:i,onClick:c=>c.stopPropagation(),children:[l.jsx("button",{onClick:()=>s(!n),className:`text-lg leading-none ${a.color} hover:opacity-70 transition`,title:a.label,children:a.icon}),n&&l.jsx("div",{className:"absolute left-0 top-full mt-1 z-20 min-w-[140px] rounded-md border border-border/70 bg-background shadow-lg py-1",children:vy.filter(c=>c.value!==e).map(c=>l.jsxs("button",{onClick:()=>{t(c.value),s(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm hover:bg-foreground/5 transition ${c.color}`,children:[l.jsx("span",{className:"text-base leading-none",children:c.icon}),l.jsx("span",{children:c.label})]},c.value))})]})}function rL(){const{data:e,loading:t,error:n,refetch:s}=Tv(),[i,a]=y.useState(""),[c,d]=y.useState(""),[p,h]=y.useState(""),[m,x]=y.useState(""),[w,b]=y.useState("_global"),[E,k]=y.useState(null);function j(T,I){T.stopPropagation(),navigator.clipboard.writeText(I),k(I),setTimeout(()=>k(B=>B===I?null:B),1500)}const S=y.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const T=[];for(const I of e.workspaces)for(const B of I.items)T.push({...B,workspace:I.workspace});return T},[e]),D=y.useMemo(()=>{const T=new Set;for(const I of S)for(const B of I.tags)T.add(B);return Array.from(T).sort()},[S]),A=y.useMemo(()=>{let T=S;if(i.trim()){const I=i.toLowerCase();T=T.filter(B=>B.description.toLowerCase().includes(I)||B.tags.some(W=>W.toLowerCase().includes(I))||B.id.includes(I))}return c&&(T=T.filter(I=>I.status===c)),p&&(T=T.filter(I=>I.tags.includes(p))),T},[S,i,c,p]),M=y.useMemo(()=>{if(!(e!=null&&e.workspaces))return{open:0,in_progress:0,completed:0,blocked:0,total:0};const T={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const I of e.workspaces)T.open+=I.counts.open,T.in_progress+=I.counts.in_progress,T.completed+=I.counts.completed,T.blocked+=I.counts.blocked,T.total+=I.counts.total;return T},[e]);async function _(){m.trim()&&(await Pv(w,m.trim()),x(""),s())}const N={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function P(T,I,B){z(T,I,N[B]||"open")}async function z(T,I,B){switch(B){case"open":await Iv(T,I);break;case"in_progress":await Lv(T,I);break;case"completed":await Av(T,I);break;case"blocked":await Dv(T,I);break}s()}async function q(T,I){await dN(T,I),s()}return t?l.jsx(kt,{label:"Loading todos..."}):n?l.jsx(St,{error:n}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[l.jsx(tt,{label:"Open",value:M.open,icon:br}),l.jsx(tt,{label:"In Progress",value:M.in_progress,icon:av,tone:"info"}),l.jsx(tt,{label:"Blocked",value:M.blocked,icon:el,tone:"warn"}),l.jsx(tt,{label:"Completed",value:M.completed,icon:br,tone:"default"})]}),l.jsx("div",{className:"surface-panel p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("select",{value:w,onChange:T=>b(T.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"_global",children:"Global"}),e==null?void 0:e.workspaces.filter(T=>T.workspace!=="_global").map(T=>l.jsx("option",{value:T.workspace,children:T.workspace},T.workspace))]}),l.jsx("input",{type:"text",placeholder:"Add a todo...",value:m,onChange:T=>x(T.target.value),onKeyDown:T=>T.key==="Enter"&&_(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),l.jsxs("button",{onClick:_,disabled:!m.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[l.jsx(tr,{className:"h-4 w-4"}),"Add"]})]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(su,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",placeholder:"Search todos...",value:i,onChange:T=>a(T.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs("select",{value:c,onChange:T=>d(T.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All statuses"}),l.jsx("option",{value:"open",children:"Open"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"blocked",children:"Blocked"})]}),D.length>0&&l.jsxs("select",{value:p,onChange:T=>h(T.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All tags"}),D.map(T=>l.jsxs("option",{value:T,children:["#",T]},T))]})]}),A.length===0?l.jsx(xt,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):l.jsx("div",{className:"space-y-1",children:A.map(T=>l.jsxs("div",{className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>P(T.workspace,T.id,T.status),children:[l.jsx(Tw,{status:T.status,onChange:I=>z(T.workspace,T.id,I)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${T.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:T.description}),T.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:T.tags.map(I=>`#${I}`).join(" ")})]}),l.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:T.workspace!=="_global"&&l.jsx(we,{to:`/w/${T.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:I=>I.stopPropagation(),children:T.workspace})}),E===T.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Mf,{className:"h-3 w-3"})," Copied to clipboard"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:I=>j(I,T.id),children:["t:",T.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:I=>j(I,T.id),children:l.jsx(_f,{className:"h-3 w-3"})})]}),l.jsx("button",{onClick:()=>q(T.workspace,T.id),className:"text-xs text-muted-foreground/40 hover:text-red-400 transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${T.workspace}-${T.id}`))})]})}function sL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>s=>{t.forEach(i=>i(s))},t)}const Nu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fo(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Tp(e){return"nodeType"in e}function yn(e){var t,n;return e?Fo(e)?e:Tp(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Pp(e){const{Document:t}=yn(e);return e instanceof t}function al(e){return Fo(e)?!1:e instanceof yn(e).HTMLElement}function Pw(e){return e instanceof yn(e).SVGElement}function Bo(e){return e?Fo(e)?e.document:Tp(e)?Pp(e)?e:al(e)||Pw(e)?e.ownerDocument:document:document:document}const Sr=Nu?y.useLayoutEffect:y.useEffect;function Ap(e){const t=y.useRef(e);return Sr(()=>{t.current=e}),y.useCallback(function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return t.current==null?void 0:t.current(...s)},[])}function oL(){const e=y.useRef(null),t=y.useCallback((s,i)=>{e.current=setInterval(s,i)},[]),n=y.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Ki(e,t){t===void 0&&(t=[e]);const n=y.useRef(e);return Sr(()=>{n.current!==e&&(n.current=e)},t),n}function ul(e,t){const n=y.useRef();return y.useMemo(()=>{const s=e(n.current);return n.current=s,s},[...t])}function Xa(e){const t=Ap(e),n=y.useRef(null),s=y.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,s]}function Sf(e){const t=y.useRef();return y.useEffect(()=>{t.current=e},[e]),t.current}let Vd={};function cl(e,t){return y.useMemo(()=>{if(t)return t;const n=Vd[e]==null?0:Vd[e]+1;return Vd[e]=n,e+"-"+n},[e,t])}function Aw(e){return function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];return s.reduce((a,c)=>{const d=Object.entries(c);for(const[p,h]of d){const m=a[p];m!=null&&(a[p]=m+e*h)}return a},{...t})}}const To=Aw(1),Qa=Aw(-1);function iL(e){return"clientX"in e&&"clientY"in e}function Dp(e){if(!e)return!1;const{KeyboardEvent:t}=yn(e.target);return t&&e instanceof t}function lL(e){if(!e)return!1;const{TouchEvent:t}=yn(e.target);return t&&e instanceof t}function jf(e){if(lL(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return iL(e)?{x:e.clientX,y:e.clientY}:null}const Yi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Yi.Translate.toString(e),Yi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:s}=e;return t+" "+n+"ms "+s}}}),by="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function aL(e){return e.matches(by)?e:e.querySelector(by)}const uL={display:"none"};function cL(e){let{id:t,value:n}=e;return ft.createElement("div",{id:t,style:uL},n)}function dL(e){let{id:t,announcement:n,ariaLiveType:s="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ft.createElement("div",{id:t,style:i,role:"status","aria-live":s,"aria-atomic":!0},n)}function fL(){const[e,t]=y.useState("");return{announce:y.useCallback(s=>{s!=null&&t(s)},[]),announcement:e}}const Dw=y.createContext(null);function pL(e){const t=y.useContext(Dw);y.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function hL(){const[e]=y.useState(()=>new Set),t=y.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[y.useCallback(s=>{let{type:i,event:a}=s;e.forEach(c=>{var d;return(d=c[i])==null?void 0:d.call(c,a)})},[e]),t]}const mL={draggable:`
|
|
457
|
+
To pick up a draggable item, press the space bar.
|
|
458
|
+
While dragging, use the arrow keys to move the item.
|
|
459
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
460
|
+
`},gL={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function xL(e){let{announcements:t=gL,container:n,hiddenTextDescribedById:s,screenReaderInstructions:i=mL}=e;const{announce:a,announcement:c}=fL(),d=cl("DndLiveRegion"),[p,h]=y.useState(!1);if(y.useEffect(()=>{h(!0)},[]),pL(y.useMemo(()=>({onDragStart(x){let{active:w}=x;a(t.onDragStart({active:w}))},onDragMove(x){let{active:w,over:b}=x;t.onDragMove&&a(t.onDragMove({active:w,over:b}))},onDragOver(x){let{active:w,over:b}=x;a(t.onDragOver({active:w,over:b}))},onDragEnd(x){let{active:w,over:b}=x;a(t.onDragEnd({active:w,over:b}))},onDragCancel(x){let{active:w,over:b}=x;a(t.onDragCancel({active:w,over:b}))}}),[a,t])),!p)return null;const m=ft.createElement(ft.Fragment,null,ft.createElement(cL,{id:s,value:i.draggable}),ft.createElement(dL,{id:d,announcement:c}));return n?ys.createPortal(m,n):m}var Et;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Et||(Et={}));function Ja(){}function wy(e,t){return y.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function yL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>[...t].filter(s=>s!=null),[...t])}const sr=Object.freeze({x:0,y:0});function vL(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function bL(e,t){let{data:{value:n}}=e,{data:{value:s}}=t;return n-s}function wL(e,t){let{data:{value:n}}=e,{data:{value:s}}=t;return s-n}function kL(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function ky(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const SL=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:s}=e;const i=ky(t,t.left,t.top),a=[];for(const c of s){const{id:d}=c,p=n.get(d);if(p){const h=vL(ky(p),i);a.push({id:d,data:{droppableContainer:c,value:h}})}}return a.sort(bL)};function jL(e,t){const n=Math.max(t.top,e.top),s=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),c=i-s,d=a-n;if(s<i&&n<a){const p=t.width*t.height,h=e.width*e.height,m=c*d,x=m/(p+h-m);return Number(x.toFixed(4))}return 0}const CL=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:s}=e;const i=[];for(const a of s){const{id:c}=a,d=n.get(c);if(d){const p=jL(d,t);p>0&&i.push({id:c,data:{droppableContainer:a,value:p}})}}return i.sort(wL)};function NL(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Lw(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:sr}function EL(e){return function(n){for(var s=arguments.length,i=new Array(s>1?s-1:0),a=1;a<s;a++)i[a-1]=arguments[a];return i.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...n})}}const RL=EL(1);function TL(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function PL(e,t,n){const s=TL(t);if(!s)return e;const{scaleX:i,scaleY:a,x:c,y:d}=s,p=e.left-c-(1-i)*parseFloat(n),h=e.top-d-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),m=i?e.width/i:e.width,x=a?e.height/a:e.height;return{width:m,height:x,top:h,right:p+m,bottom:h+x,left:p}}const AL={ignoreTransform:!1};function Uo(e,t){t===void 0&&(t=AL);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:m}=yn(e).getComputedStyle(e);h&&(n=PL(n,h,m))}const{top:s,left:i,width:a,height:c,bottom:d,right:p}=n;return{top:s,left:i,width:a,height:c,bottom:d,right:p}}function Sy(e){return Uo(e,{ignoreTransform:!0})}function DL(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function LL(e,t){return t===void 0&&(t=yn(e).getComputedStyle(e)),t.position==="fixed"}function IL(e,t){t===void 0&&(t=yn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function Lp(e,t){const n=[];function s(i){if(t!=null&&n.length>=t||!i)return n;if(Pp(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!al(i)||Pw(i)||n.includes(i))return n;const a=yn(e).getComputedStyle(i);return i!==e&&IL(i,a)&&n.push(i),LL(i,a)?n:s(i.parentNode)}return e?s(e):n}function Iw(e){const[t]=Lp(e,1);return t??null}function qd(e){return!Nu||!e?null:Fo(e)?e:Tp(e)?Pp(e)||e===Bo(e).scrollingElement?window:al(e)?e:null:null}function Ow(e){return Fo(e)?e.scrollX:e.scrollLeft}function Mw(e){return Fo(e)?e.scrollY:e.scrollTop}function Cf(e){return{x:Ow(e),y:Mw(e)}}var Mt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Mt||(Mt={}));function _w(e){return!Nu||!e?!1:e===document.scrollingElement}function $w(e){const t={x:0,y:0},n=_w(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,c=e.scrollTop>=s.y,d=e.scrollLeft>=s.x;return{isTop:i,isLeft:a,isBottom:c,isRight:d,maxScroll:s,minScroll:t}}const OL={x:.2,y:.2};function ML(e,t,n,s,i){let{top:a,left:c,right:d,bottom:p}=n;s===void 0&&(s=10),i===void 0&&(i=OL);const{isTop:h,isBottom:m,isLeft:x,isRight:w}=$w(e),b={x:0,y:0},E={x:0,y:0},k={height:t.height*i.y,width:t.width*i.x};return!h&&a<=t.top+k.height?(b.y=Mt.Backward,E.y=s*Math.abs((t.top+k.height-a)/k.height)):!m&&p>=t.bottom-k.height&&(b.y=Mt.Forward,E.y=s*Math.abs((t.bottom-k.height-p)/k.height)),!w&&d>=t.right-k.width?(b.x=Mt.Forward,E.x=s*Math.abs((t.right-k.width-d)/k.width)):!x&&c<=t.left+k.width&&(b.x=Mt.Backward,E.x=s*Math.abs((t.left+k.width-c)/k.width)),{direction:b,speed:E}}function _L(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:c}=window;return{top:0,left:0,right:a,bottom:c,width:a,height:c}}const{top:t,left:n,right:s,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:s,bottom:i,width:e.clientWidth,height:e.clientHeight}}function zw(e){return e.reduce((t,n)=>To(t,Cf(n)),sr)}function $L(e){return e.reduce((t,n)=>t+Ow(n),0)}function zL(e){return e.reduce((t,n)=>t+Mw(n),0)}function FL(e,t){if(t===void 0&&(t=Uo),!e)return;const{top:n,left:s,bottom:i,right:a}=t(e);Iw(e)&&(i<=0||a<=0||n>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const BL=[["x",["left","right"],$L],["y",["top","bottom"],zL]];class Ip{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=Lp(n),i=zw(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,c,d]of BL)for(const p of c)Object.defineProperty(this,p,{get:()=>{const h=d(s),m=i[a]-h;return this.rect[p]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Fi{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...n)})},this.target=t}add(t,n,s){var i;(i=this.target)==null||i.addEventListener(t,n,s),this.listeners.push([t,n,s])}}function UL(e){const{EventTarget:t}=yn(e);return e instanceof t?e:Bo(e)}function Gd(e,t){const n=Math.abs(e.x),s=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+s**2)>t:"x"in t&&"y"in t?n>t.x&&s>t.y:"x"in t?n>t.x:"y"in t?s>t.y:!1}var zn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(zn||(zn={}));function jy(e){e.preventDefault()}function HL(e){e.stopPropagation()}var Ue;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ue||(Ue={}));const Fw={start:[Ue.Space,Ue.Enter],cancel:[Ue.Esc],end:[Ue.Space,Ue.Enter,Ue.Tab]},WL=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ue.Right:return{...n,x:n.x+25};case Ue.Left:return{...n,x:n.x-25};case Ue.Down:return{...n,y:n.y+25};case Ue.Up:return{...n,y:n.y-25}}};class Op{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Fi(Bo(n)),this.windowListeners=new Fi(yn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(zn.Resize,this.handleCancel),this.windowListeners.add(zn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(zn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,s=t.node.current;s&&FL(s),n(sr)}handleKeyDown(t){if(Dp(t)){const{active:n,context:s,options:i}=this.props,{keyboardCodes:a=Fw,coordinateGetter:c=WL,scrollBehavior:d="smooth"}=i,{code:p}=t;if(a.end.includes(p)){this.handleEnd(t);return}if(a.cancel.includes(p)){this.handleCancel(t);return}const{collisionRect:h}=s.current,m=h?{x:h.left,y:h.top}:sr;this.referenceCoordinates||(this.referenceCoordinates=m);const x=c(t,{active:n,context:s.current,currentCoordinates:m});if(x){const w=Qa(x,m),b={x:0,y:0},{scrollableAncestors:E}=s.current;for(const k of E){const j=t.code,{isTop:S,isRight:D,isLeft:A,isBottom:M,maxScroll:_,minScroll:N}=$w(k),P=_L(k),z={x:Math.min(j===Ue.Right?P.right-P.width/2:P.right,Math.max(j===Ue.Right?P.left:P.left+P.width/2,x.x)),y:Math.min(j===Ue.Down?P.bottom-P.height/2:P.bottom,Math.max(j===Ue.Down?P.top:P.top+P.height/2,x.y))},q=j===Ue.Right&&!D||j===Ue.Left&&!A,T=j===Ue.Down&&!M||j===Ue.Up&&!S;if(q&&z.x!==x.x){const I=k.scrollLeft+w.x,B=j===Ue.Right&&I<=_.x||j===Ue.Left&&I>=N.x;if(B&&!w.y){k.scrollTo({left:I,behavior:d});return}B?b.x=k.scrollLeft-I:b.x=j===Ue.Right?k.scrollLeft-_.x:k.scrollLeft-N.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(T&&z.y!==x.y){const I=k.scrollTop+w.y,B=j===Ue.Down&&I<=_.y||j===Ue.Up&&I>=N.y;if(B&&!w.x){k.scrollTo({top:I,behavior:d});return}B?b.y=k.scrollTop-I:b.y=j===Ue.Down?k.scrollTop-_.y:k.scrollTop-N.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,To(Qa(x,this.referenceCoordinates),b))}}}handleMove(t,n){const{onMove:s}=this.props;t.preventDefault(),s(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Op.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:s=Fw,onActivation:i}=t,{active:a}=n;const{code:c}=e.nativeEvent;if(s.start.includes(c)){const d=a.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Cy(e){return!!(e&&"distance"in e)}function Ny(e){return!!(e&&"delay"in e)}class Mp{constructor(t,n,s){var i;s===void 0&&(s=UL(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:c}=a;this.props=t,this.events=n,this.document=Bo(c),this.documentListeners=new Fi(this.document),this.listeners=new Fi(s),this.windowListeners=new Fi(yn(c)),this.initialCoordinates=(i=jf(a))!=null?i:sr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:s}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(zn.Resize,this.handleCancel),this.windowListeners.add(zn.DragStart,jy),this.windowListeners.add(zn.VisibilityChange,this.handleCancel),this.windowListeners.add(zn.ContextMenu,jy),this.documentListeners.add(zn.Keydown,this.handleKeydown),n){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ny(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Cy(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:s,onPending:i}=this.props;i(s,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(zn.Click,HL,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(zn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:s,initialCoordinates:i,props:a}=this,{onMove:c,options:{activationConstraint:d}}=a;if(!i)return;const p=(n=jf(t))!=null?n:sr,h=Qa(i,p);if(!s&&d){if(Cy(d)){if(d.tolerance!=null&&Gd(h,d.tolerance))return this.handleCancel();if(Gd(h,d.distance))return this.handleStart()}if(Ny(d)&&Gd(h,d.tolerance))return this.handleCancel();this.handlePending(d,h);return}t.cancelable&&t.preventDefault(),c(p)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const VL={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class _p extends Mp{constructor(t){const{event:n}=t,s=Bo(n.target);super(t,VL,s)}}_p.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:s}=t;return!n.isPrimary||n.button!==0?!1:(s==null||s({event:n}),!0)}}];const qL={move:{name:"mousemove"},end:{name:"mouseup"}};var Nf;(function(e){e[e.RightClick=2]="RightClick"})(Nf||(Nf={}));class GL extends Mp{constructor(t){super(t,qL,Bo(t.event.target))}}GL.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:s}=t;return n.button===Nf.RightClick?!1:(s==null||s({event:n}),!0)}}];const Kd={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class KL extends Mp{constructor(t){super(t,Kd)}static setup(){return window.addEventListener(Kd.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Kd.move.name,t)};function t(){}}}KL.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:s}=t;const{touches:i}=n;return i.length>1?!1:(s==null||s({event:n}),!0)}}];var Bi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Bi||(Bi={}));var Za;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Za||(Za={}));function YL(e){let{acceleration:t,activator:n=Bi.Pointer,canScroll:s,draggingRect:i,enabled:a,interval:c=5,order:d=Za.TreeOrder,pointerCoordinates:p,scrollableAncestors:h,scrollableAncestorRects:m,delta:x,threshold:w}=e;const b=QL({delta:x,disabled:!a}),[E,k]=oL(),j=y.useRef({x:0,y:0}),S=y.useRef({x:0,y:0}),D=y.useMemo(()=>{switch(n){case Bi.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case Bi.DraggableRect:return i}},[n,i,p]),A=y.useRef(null),M=y.useCallback(()=>{const N=A.current;if(!N)return;const P=j.current.x*S.current.x,z=j.current.y*S.current.y;N.scrollBy(P,z)},[]),_=y.useMemo(()=>d===Za.TreeOrder?[...h].reverse():h,[d,h]);y.useEffect(()=>{if(!a||!h.length||!D){k();return}for(const N of _){if((s==null?void 0:s(N))===!1)continue;const P=h.indexOf(N),z=m[P];if(!z)continue;const{direction:q,speed:T}=ML(N,z,D,t,w);for(const I of["x","y"])b[I][q[I]]||(T[I]=0,q[I]=0);if(T.x>0||T.y>0){k(),A.current=N,E(M,c),j.current=T,S.current=q;return}}j.current={x:0,y:0},S.current={x:0,y:0},k()},[t,M,s,k,a,c,JSON.stringify(D),JSON.stringify(b),E,h,_,m,JSON.stringify(w)])}const XL={x:{[Mt.Backward]:!1,[Mt.Forward]:!1},y:{[Mt.Backward]:!1,[Mt.Forward]:!1}};function QL(e){let{delta:t,disabled:n}=e;const s=Sf(t);return ul(i=>{if(n||!s||!i)return XL;const a={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[Mt.Backward]:i.x[Mt.Backward]||a.x===-1,[Mt.Forward]:i.x[Mt.Forward]||a.x===1},y:{[Mt.Backward]:i.y[Mt.Backward]||a.y===-1,[Mt.Forward]:i.y[Mt.Forward]||a.y===1}}},[n,t,s])}function JL(e,t){const n=t!=null?e.get(t):void 0,s=n?n.node.current:null;return ul(i=>{var a;return t==null?null:(a=s??i)!=null?a:null},[s,t])}function ZL(e,t){return y.useMemo(()=>e.reduce((n,s)=>{const{sensor:i}=s,a=i.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,s)}));return[...n,...a]},[]),[e,t])}var Xi;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Xi||(Xi={}));var Ef;(function(e){e.Optimized="optimized"})(Ef||(Ef={}));const Ey=new Map;function eI(e,t){let{dragging:n,dependencies:s,config:i}=t;const[a,c]=y.useState(null),{frequency:d,measure:p,strategy:h}=i,m=y.useRef(e),x=j(),w=Ki(x),b=y.useCallback(function(S){S===void 0&&(S=[]),!w.current&&c(D=>D===null?S:D.concat(S.filter(A=>!D.includes(A))))},[w]),E=y.useRef(null),k=ul(S=>{if(x&&!n)return Ey;if(!S||S===Ey||m.current!==e||a!=null){const D=new Map;for(let A of e){if(!A)continue;if(a&&a.length>0&&!a.includes(A.id)&&A.rect.current){D.set(A.id,A.rect.current);continue}const M=A.node.current,_=M?new Ip(p(M),M):null;A.rect.current=_,_&&D.set(A.id,_)}return D}return S},[e,a,n,x,p]);return y.useEffect(()=>{m.current=e},[e]),y.useEffect(()=>{x||b()},[n,x]),y.useEffect(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),y.useEffect(()=>{x||typeof d!="number"||E.current!==null||(E.current=setTimeout(()=>{b(),E.current=null},d))},[d,x,b,...s]),{droppableRects:k,measureDroppableContainers:b,measuringScheduled:a!=null};function j(){switch(h){case Xi.Always:return!1;case Xi.BeforeDragging:return n;default:return!n}}}function Bw(e,t){return ul(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function tI(e,t){return Bw(e,t)}function nI(e){let{callback:t,disabled:n}=e;const s=Ap(t),i=y.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(s)},[s,n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Eu(e){let{callback:t,disabled:n}=e;const s=Ap(t),i=y.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(s)},[n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function rI(e){return new Ip(Uo(e),e)}function Ry(e,t,n){t===void 0&&(t=rI);const[s,i]=y.useState(null);function a(){i(p=>{if(!e)return null;if(e.isConnected===!1){var h;return(h=p??n)!=null?h:null}const m=t(e);return JSON.stringify(p)===JSON.stringify(m)?p:m})}const c=nI({callback(p){if(e)for(const h of p){const{type:m,target:x}=h;if(m==="childList"&&x instanceof HTMLElement&&x.contains(e)){a();break}}}}),d=Eu({callback:a});return Sr(()=>{a(),e?(d==null||d.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),c==null||c.disconnect())},[e]),s}function sI(e){const t=Bw(e);return Lw(e,t)}const Ty=[];function oI(e){const t=y.useRef(e),n=ul(s=>e?s&&s!==Ty&&e&&t.current&&e.parentNode===t.current.parentNode?s:Lp(e):Ty,[e]);return y.useEffect(()=>{t.current=e},[e]),n}function iI(e){const[t,n]=y.useState(null),s=y.useRef(e),i=y.useCallback(a=>{const c=qd(a.target);c&&n(d=>d?(d.set(c,Cf(c)),new Map(d)):null)},[]);return y.useEffect(()=>{const a=s.current;if(e!==a){c(a);const d=e.map(p=>{const h=qd(p);return h?(h.addEventListener("scroll",i,{passive:!0}),[h,Cf(h)]):null}).filter(p=>p!=null);n(d.length?new Map(d):null),s.current=e}return()=>{c(e),c(a)};function c(d){d.forEach(p=>{const h=qd(p);h==null||h.removeEventListener("scroll",i)})}},[i,e]),y.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,c)=>To(a,c),sr):zw(e):sr,[e,t])}function Py(e,t){t===void 0&&(t=[]);const n=y.useRef(null);return y.useEffect(()=>{n.current=null},t),y.useEffect(()=>{const s=e!==sr;s&&!n.current&&(n.current=e),!s&&n.current&&(n.current=null)},[e]),n.current?Qa(e,n.current):sr}function lI(e){y.useEffect(()=>{if(!Nu)return;const t=e.map(n=>{let{sensor:s}=n;return s.setup==null?void 0:s.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function aI(e,t){return y.useMemo(()=>e.reduce((n,s)=>{let{eventName:i,handler:a}=s;return n[i]=c=>{a(c,t)},n},{}),[e,t])}function Uw(e){return y.useMemo(()=>e?DL(e):null,[e])}const Ay=[];function uI(e,t){t===void 0&&(t=Uo);const[n]=e,s=Uw(n?yn(n):null),[i,a]=y.useState(Ay);function c(){a(()=>e.length?e.map(p=>_w(p)?s:new Ip(t(p),p)):Ay)}const d=Eu({callback:c});return Sr(()=>{d==null||d.disconnect(),c(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function cI(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return al(t)?t:e}function dI(e){let{measure:t}=e;const[n,s]=y.useState(null),i=y.useCallback(h=>{for(const{target:m}of h)if(al(m)){s(x=>{const w=t(m);return x?{...x,width:w.width,height:w.height}:w});break}},[t]),a=Eu({callback:i}),c=y.useCallback(h=>{const m=cI(h);a==null||a.disconnect(),m&&(a==null||a.observe(m)),s(m?t(m):null)},[t,a]),[d,p]=Xa(c);return y.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const fI=[{sensor:_p,options:{}},{sensor:Op,options:{}}],pI={current:{}},$a={draggable:{measure:Sy},droppable:{measure:Sy,strategy:Xi.WhileDragging,frequency:Ef.Optimized},dragOverlay:{measure:Uo}};class Ui extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,s;return(n=(s=this.get(t))==null?void 0:s.node.current)!=null?n:void 0}}const hI={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ui,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ja},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:$a,measureDroppableContainers:Ja,windowRect:null,measuringScheduled:!1},mI={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ja,draggableNodes:new Map,over:null,measureDroppableContainers:Ja},Ru=y.createContext(mI),Hw=y.createContext(hI);function gI(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ui}}}function xI(e,t){switch(t.type){case Et.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Et.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Et.DragEnd:case Et.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Et.RegisterDroppable:{const{element:n}=t,{id:s}=n,i=new Ui(e.droppable.containers);return i.set(s,n),{...e,droppable:{...e.droppable,containers:i}}}case Et.SetDroppableDisabled:{const{id:n,key:s,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||s!==a.key)return e;const c=new Ui(e.droppable.containers);return c.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:c}}}case Et.UnregisterDroppable:{const{id:n,key:s}=t,i=e.droppable.containers.get(n);if(!i||s!==i.key)return e;const a=new Ui(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function yI(e){let{disabled:t}=e;const{active:n,activatorEvent:s,draggableNodes:i}=y.useContext(Ru),a=Sf(s),c=Sf(n==null?void 0:n.id);return y.useEffect(()=>{if(!t&&!s&&a&&c!=null){if(!Dp(a)||document.activeElement===a.target)return;const d=i.get(c);if(!d)return;const{activatorNode:p,node:h}=d;if(!p.current&&!h.current)return;requestAnimationFrame(()=>{for(const m of[p.current,h.current]){if(!m)continue;const x=aL(m);if(x){x.focus();break}}})}},[s,t,i,c,a]),null}function vI(e,t){let{transform:n,...s}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...s}),n):n}function bI(e){return y.useMemo(()=>({draggable:{...$a.draggable,...e==null?void 0:e.draggable},droppable:{...$a.droppable,...e==null?void 0:e.droppable},dragOverlay:{...$a.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function wI(e){let{activeNode:t,measure:n,initialRect:s,config:i=!0}=e;const a=y.useRef(!1),{x:c,y:d}=typeof i=="boolean"?{x:i,y:i}:i;Sr(()=>{if(!c&&!d||!t){a.current=!1;return}if(a.current||!s)return;const h=t==null?void 0:t.node.current;if(!h||h.isConnected===!1)return;const m=n(h),x=Lw(m,s);if(c||(x.x=0),d||(x.y=0),a.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const w=Iw(h);w&&w.scrollBy({top:x.y,left:x.x})}},[t,c,d,s,n])}const Ww=y.createContext({...sr,scaleX:1,scaleY:1});var xs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(xs||(xs={}));const kI=y.memo(function(t){var n,s,i,a;let{id:c,accessibility:d,autoScroll:p=!0,children:h,sensors:m=fI,collisionDetection:x=CL,measuring:w,modifiers:b,...E}=t;const k=y.useReducer(xI,void 0,gI),[j,S]=k,[D,A]=hL(),[M,_]=y.useState(xs.Uninitialized),N=M===xs.Initialized,{draggable:{active:P,nodes:z,translate:q},droppable:{containers:T}}=j,I=P!=null?z.get(P):null,B=y.useRef({initial:null,translated:null}),W=y.useMemo(()=>{var ot;return P!=null?{id:P,data:(ot=I==null?void 0:I.data)!=null?ot:pI,rect:B}:null},[P,I]),J=y.useRef(null),[G,te]=y.useState(null),[ie,X]=y.useState(null),oe=Ki(E,Object.values(E)),R=cl("DndDescribedBy",c),$=y.useMemo(()=>T.getEnabled(),[T]),Q=bI(w),{droppableRects:L,measureDroppableContainers:pe,measuringScheduled:ve}=eI($,{dragging:N,dependencies:[q.x,q.y],config:Q.droppable}),de=JL(z,P),Pe=y.useMemo(()=>ie?jf(ie):null,[ie]),ke=Gr(),Te=tI(de,Q.draggable.measure);wI({activeNode:P!=null?z.get(P):null,config:ke.layoutShiftCompensation,initialRect:Te,measure:Q.draggable.measure});const ee=Ry(de,Q.draggable.measure,Te),Ee=Ry(de?de.parentElement:null),je=y.useRef({activatorEvent:null,active:null,activeNode:de,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:z,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Qe=T.getNodeFor((n=je.current.over)==null?void 0:n.id),yt=dI({measure:Q.dragOverlay.measure}),Bt=(s=yt.nodeRef.current)!=null?s:de,Ut=N?(i=yt.rect)!=null?i:ee:null,_t=!!(yt.nodeRef.current&&yt.rect),vn=sI(_t?null:ee),Dt=Uw(Bt?yn(Bt):null),pt=oI(N?Qe??de:null),Zt=uI(pt),An=vI(b,{transform:{x:q.x-vn.x,y:q.y-vn.y,scaleX:1,scaleY:1},activatorEvent:ie,active:W,activeNodeRect:ee,containerNodeRect:Ee,draggingNodeRect:Ut,over:je.current.over,overlayNodeRect:yt.rect,scrollableAncestors:pt,scrollableAncestorRects:Zt,windowRect:Dt}),vt=Pe?To(Pe,q):null,Nr=iI(pt),lr=Py(Nr),Z=Py(Nr,[ee]),ae=To(An,lr),be=Ut?RL(Ut,An):null,Re=W&&be?x({active:W,collisionRect:be,droppableRects:L,droppableContainers:$,pointerCoordinates:vt}):null,U=kL(Re,"id"),[se,Se]=y.useState(null),Fe=_t?An:To(An,Z),sn=NL(Fe,(a=se==null?void 0:se.rect)!=null?a:null,ee),ct=y.useRef(null),We=y.useCallback((ot,Ht)=>{let{sensor:Wt,options:Wn}=Ht;if(J.current==null)return;const en=z.get(J.current);if(!en)return;const Vt=ot.nativeEvent,on=new Wt({active:J.current,activeNode:en,event:Vt,options:Wn,context:je,onAbort(it){if(!z.get(it))return;const{onDragAbort:qt}=oe.current,Vn={id:it};qt==null||qt(Vn),D({type:"onDragAbort",event:Vn})},onPending(it,Dn,qt,Vn){if(!z.get(it))return;const{onDragPending:ar}=oe.current,bn={id:it,constraint:Dn,initialCoordinates:qt,offset:Vn};ar==null||ar(bn),D({type:"onDragPending",event:bn})},onStart(it){const Dn=J.current;if(Dn==null)return;const qt=z.get(Dn);if(!qt)return;const{onDragStart:Vn}=oe.current,qn={activatorEvent:Vt,active:{id:Dn,data:qt.data,rect:B}};ys.unstable_batchedUpdates(()=>{Vn==null||Vn(qn),_(xs.Initializing),S({type:Et.DragStart,initialCoordinates:it,active:Dn}),D({type:"onDragStart",event:qn}),te(ct.current),X(Vt)})},onMove(it){S({type:Et.DragMove,coordinates:it})},onEnd:Er(Et.DragEnd),onCancel:Er(Et.DragCancel)});ct.current=on;function Er(it){return async function(){const{active:qt,collisions:Vn,over:qn,scrollAdjustedTranslate:ar}=je.current;let bn=null;if(qt&&ar){const{cancelDrop:Rr}=oe.current;bn={activatorEvent:Vt,active:qt,collisions:Vn,delta:ar,over:qn},it===Et.DragEnd&&typeof Rr=="function"&&await Promise.resolve(Rr(bn))&&(it=Et.DragCancel)}J.current=null,ys.unstable_batchedUpdates(()=>{S({type:it}),_(xs.Uninitialized),Se(null),te(null),X(null),ct.current=null;const Rr=it===Et.DragEnd?"onDragEnd":"onDragCancel";if(bn){const Ho=oe.current[Rr];Ho==null||Ho(bn),D({type:Rr,event:bn})}})}}},[z]),qe=y.useCallback((ot,Ht)=>(Wt,Wn)=>{const en=Wt.nativeEvent,Vt=z.get(Wn);if(J.current!==null||!Vt||en.dndKit||en.defaultPrevented)return;const on={active:Vt};ot(Wt,Ht.options,on)===!0&&(en.dndKit={capturedBy:Ht.sensor},J.current=Wn,We(Wt,Ht))},[z,We]),ht=ZL(m,qe);lI(m),Sr(()=>{ee&&M===xs.Initializing&&_(xs.Initialized)},[ee,M]),y.useEffect(()=>{const{onDragMove:ot}=oe.current,{active:Ht,activatorEvent:Wt,collisions:Wn,over:en}=je.current;if(!Ht||!Wt)return;const Vt={active:Ht,activatorEvent:Wt,collisions:Wn,delta:{x:ae.x,y:ae.y},over:en};ys.unstable_batchedUpdates(()=>{ot==null||ot(Vt),D({type:"onDragMove",event:Vt})})},[ae.x,ae.y]),y.useEffect(()=>{const{active:ot,activatorEvent:Ht,collisions:Wt,droppableContainers:Wn,scrollAdjustedTranslate:en}=je.current;if(!ot||J.current==null||!Ht||!en)return;const{onDragOver:Vt}=oe.current,on=Wn.get(U),Er=on&&on.rect.current?{id:on.id,rect:on.rect.current,data:on.data,disabled:on.disabled}:null,it={active:ot,activatorEvent:Ht,collisions:Wt,delta:{x:en.x,y:en.y},over:Er};ys.unstable_batchedUpdates(()=>{Se(Er),Vt==null||Vt(it),D({type:"onDragOver",event:it})})},[U]),Sr(()=>{je.current={activatorEvent:ie,active:W,activeNode:de,collisionRect:be,collisions:Re,droppableRects:L,draggableNodes:z,draggingNode:Bt,draggingNodeRect:Ut,droppableContainers:T,over:se,scrollableAncestors:pt,scrollAdjustedTranslate:ae},B.current={initial:Ut,translated:be}},[W,de,Re,be,z,Bt,Ut,L,T,se,pt,ae]),YL({...ke,delta:q,draggingRect:be,pointerCoordinates:vt,scrollableAncestors:pt,scrollableAncestorRects:Zt});const qr=y.useMemo(()=>({active:W,activeNode:de,activeNodeRect:ee,activatorEvent:ie,collisions:Re,containerNodeRect:Ee,dragOverlay:yt,draggableNodes:z,droppableContainers:T,droppableRects:L,over:se,measureDroppableContainers:pe,scrollableAncestors:pt,scrollableAncestorRects:Zt,measuringConfiguration:Q,measuringScheduled:ve,windowRect:Dt}),[W,de,ee,ie,Re,Ee,yt,z,T,L,se,pe,pt,Zt,Q,ve,Dt]),js=y.useMemo(()=>({activatorEvent:ie,activators:ht,active:W,activeNodeRect:ee,ariaDescribedById:{draggable:R},dispatch:S,draggableNodes:z,over:se,measureDroppableContainers:pe}),[ie,ht,W,ee,S,R,z,se,pe]);return ft.createElement(Dw.Provider,{value:A},ft.createElement(Ru.Provider,{value:js},ft.createElement(Hw.Provider,{value:qr},ft.createElement(Ww.Provider,{value:sn},h)),ft.createElement(yI,{disabled:(d==null?void 0:d.restoreFocus)===!1})),ft.createElement(xL,{...d,hiddenTextDescribedById:R}));function Gr(){const ot=(G==null?void 0:G.autoScrollEnabled)===!1,Ht=typeof p=="object"?p.enabled===!1:p===!1,Wt=N&&!ot&&!Ht;return typeof p=="object"?{...p,enabled:Wt}:{enabled:Wt}}}),SI=y.createContext(null),Dy="button",jI="Draggable";function CI(e){let{id:t,data:n,disabled:s=!1,attributes:i}=e;const a=cl(jI),{activators:c,activatorEvent:d,active:p,activeNodeRect:h,ariaDescribedById:m,draggableNodes:x,over:w}=y.useContext(Ru),{role:b=Dy,roleDescription:E="draggable",tabIndex:k=0}=i??{},j=(p==null?void 0:p.id)===t,S=y.useContext(j?Ww:SI),[D,A]=Xa(),[M,_]=Xa(),N=aI(c,t),P=Ki(n);Sr(()=>(x.set(t,{id:t,key:a,node:D,activatorNode:M,data:P}),()=>{const q=x.get(t);q&&q.key===a&&x.delete(t)}),[x,t]);const z=y.useMemo(()=>({role:b,tabIndex:k,"aria-disabled":s,"aria-pressed":j&&b===Dy?!0:void 0,"aria-roledescription":E,"aria-describedby":m.draggable}),[s,b,k,j,E,m.draggable]);return{active:p,activatorEvent:d,activeNodeRect:h,attributes:z,isDragging:j,listeners:s?void 0:N,node:D,over:w,setNodeRef:A,setActivatorNodeRef:_,transform:S}}function NI(){return y.useContext(Hw)}const EI="Droppable",RI={timeout:25};function TI(e){let{data:t,disabled:n=!1,id:s,resizeObserverConfig:i}=e;const a=cl(EI),{active:c,dispatch:d,over:p,measureDroppableContainers:h}=y.useContext(Ru),m=y.useRef({disabled:n}),x=y.useRef(!1),w=y.useRef(null),b=y.useRef(null),{disabled:E,updateMeasurementsFor:k,timeout:j}={...RI,...i},S=Ki(k??s),D=y.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{h(Array.isArray(S.current)?S.current:[S.current]),b.current=null},j)},[j]),A=Eu({callback:D,disabled:E||!c}),M=y.useCallback((z,q)=>{A&&(q&&(A.unobserve(q),x.current=!1),z&&A.observe(z))},[A]),[_,N]=Xa(M),P=Ki(t);return y.useEffect(()=>{!A||!_.current||(A.disconnect(),x.current=!1,A.observe(_.current))},[_,A]),y.useEffect(()=>(d({type:Et.RegisterDroppable,element:{id:s,key:a,disabled:n,node:_,rect:w,data:P}}),()=>d({type:Et.UnregisterDroppable,key:a,id:s})),[s]),y.useEffect(()=>{n!==m.current.disabled&&(d({type:Et.SetDroppableDisabled,id:s,key:a,disabled:n}),m.current.disabled=n)},[s,a,n,d]),{active:c,rect:w,isOver:(p==null?void 0:p.id)===s,node:_,over:p,setNodeRef:N}}function $p(e,t,n){const s=e.slice();return s.splice(n<0?s.length+n:n,0,s.splice(t,1)[0]),s}function PI(e,t){return e.reduce((n,s,i)=>{const a=t.get(s);return a&&(n[i]=a),n},Array(e.length))}function Ra(e){return e!==null&&e>=0}function AI(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function DI(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Vw=e=>{let{rects:t,activeIndex:n,overIndex:s,index:i}=e;const a=$p(t,s,n),c=t[i],d=a[i];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},Ta={scaleX:1,scaleY:1},LI=e=>{var t;let{activeIndex:n,activeNodeRect:s,index:i,rects:a,overIndex:c}=e;const d=(t=a[n])!=null?t:s;if(!d)return null;if(i===n){const h=a[c];return h?{x:0,y:n<c?h.top+h.height-(d.top+d.height):h.top-d.top,...Ta}:null}const p=II(a,i,n);return i>n&&i<=c?{x:0,y:-d.height-p,...Ta}:i<n&&i>=c?{x:0,y:d.height+p,...Ta}:{x:0,y:0,...Ta}};function II(e,t,n){const s=e[t],i=e[t-1],a=e[t+1];return s?n<t?i?s.top-(i.top+i.height):a?a.top-(s.top+s.height):0:a?a.top-(s.top+s.height):i?s.top-(i.top+i.height):0:0}const qw="Sortable",Gw=ft.createContext({activeIndex:-1,containerId:qw,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Vw,disabled:{draggable:!1,droppable:!1}});function OI(e){let{children:t,id:n,items:s,strategy:i=Vw,disabled:a=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:h,measureDroppableContainers:m}=NI(),x=cl(qw,n),w=d.rect!==null,b=y.useMemo(()=>s.map(N=>typeof N=="object"&&"id"in N?N.id:N),[s]),E=c!=null,k=c?b.indexOf(c.id):-1,j=h?b.indexOf(h.id):-1,S=y.useRef(b),D=!AI(b,S.current),A=j!==-1&&k===-1||D,M=DI(a);Sr(()=>{D&&E&&m(b)},[D,b,E,m]),y.useEffect(()=>{S.current=b},[b]);const _=y.useMemo(()=>({activeIndex:k,containerId:x,disabled:M,disableTransforms:A,items:b,overIndex:j,useDragOverlay:w,sortedRects:PI(b,p),strategy:i}),[k,x,M.draggable,M.droppable,A,b,j,p,w,i]);return ft.createElement(Gw.Provider,{value:_},t)}const MI=e=>{let{id:t,items:n,activeIndex:s,overIndex:i}=e;return $p(n,s,i).indexOf(t)},_I=e=>{let{containerId:t,isSorting:n,wasDragging:s,index:i,items:a,newIndex:c,previousItems:d,previousContainerId:p,transition:h}=e;return!h||!s||d!==a&&i===c?!1:n?!0:c!==i&&t===p},$I={duration:200,easing:"ease"},Kw="transform",zI=Yi.Transition.toString({property:Kw,duration:0,easing:"linear"}),FI={roleDescription:"sortable"};function BI(e){let{disabled:t,index:n,node:s,rect:i}=e;const[a,c]=y.useState(null),d=y.useRef(n);return Sr(()=>{if(!t&&n!==d.current&&s.current){const p=i.current;if(p){const h=Uo(s.current,{ignoreTransform:!0}),m={x:p.left-h.left,y:p.top-h.top,scaleX:p.width/h.width,scaleY:p.height/h.height};(m.x||m.y)&&c(m)}}n!==d.current&&(d.current=n)},[t,n,s,i]),y.useEffect(()=>{a&&c(null)},[a]),a}function UI(e){let{animateLayoutChanges:t=_I,attributes:n,disabled:s,data:i,getNewIndex:a=MI,id:c,strategy:d,resizeObserverConfig:p,transition:h=$I}=e;const{items:m,containerId:x,activeIndex:w,disabled:b,disableTransforms:E,sortedRects:k,overIndex:j,useDragOverlay:S,strategy:D}=y.useContext(Gw),A=HI(s,b),M=m.indexOf(c),_=y.useMemo(()=>({sortable:{containerId:x,index:M,items:m},...i}),[x,i,M,m]),N=y.useMemo(()=>m.slice(m.indexOf(c)),[m,c]),{rect:P,node:z,isOver:q,setNodeRef:T}=TI({id:c,data:_,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...p}}),{active:I,activatorEvent:B,activeNodeRect:W,attributes:J,setNodeRef:G,listeners:te,isDragging:ie,over:X,setActivatorNodeRef:oe,transform:R}=CI({id:c,data:_,attributes:{...FI,...n},disabled:A.draggable}),$=sL(T,G),Q=!!I,L=Q&&!E&&Ra(w)&&Ra(j),pe=!S&&ie,ve=pe&&L?R:null,Pe=L?ve??(d??D)({rects:k,activeNodeRect:W,activeIndex:w,overIndex:j,index:M}):null,ke=Ra(w)&&Ra(j)?a({id:c,items:m,activeIndex:w,overIndex:j}):M,Te=I==null?void 0:I.id,ee=y.useRef({activeId:Te,items:m,newIndex:ke,containerId:x}),Ee=m!==ee.current.items,je=t({active:I,containerId:x,isDragging:ie,isSorting:Q,id:c,index:M,items:m,newIndex:ee.current.newIndex,previousItems:ee.current.items,previousContainerId:ee.current.containerId,transition:h,wasDragging:ee.current.activeId!=null}),Qe=BI({disabled:!je,index:M,node:z,rect:P});return y.useEffect(()=>{Q&&ee.current.newIndex!==ke&&(ee.current.newIndex=ke),x!==ee.current.containerId&&(ee.current.containerId=x),m!==ee.current.items&&(ee.current.items=m)},[Q,ke,x,m]),y.useEffect(()=>{if(Te===ee.current.activeId)return;if(Te!=null&&ee.current.activeId==null){ee.current.activeId=Te;return}const Bt=setTimeout(()=>{ee.current.activeId=Te},50);return()=>clearTimeout(Bt)},[Te]),{active:I,activeIndex:w,attributes:J,data:_,rect:P,index:M,newIndex:ke,items:m,isOver:q,isSorting:Q,isDragging:ie,listeners:te,node:z,overIndex:j,over:X,setNodeRef:$,setActivatorNodeRef:oe,setDroppableNodeRef:T,setDraggableNodeRef:G,transform:Qe??Pe,transition:yt()};function yt(){if(Qe||Ee&&ee.current.newIndex===M)return zI;if(!(pe&&!Dp(B)||!h)&&(Q||je))return Yi.Transition.toString({...h,property:Kw})}}function HI(e,t){var n,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(s=e==null?void 0:e.droppable)!=null?s:t.droppable}}Ue.Down,Ue.Right,Ue.Up,Ue.Left;function WI({item:e,copiedId:t,onCycleStatus:n,onStatusChange:s,onCopyId:i,disabled:a}){const{attributes:c,listeners:d,setNodeRef:p,setActivatorNodeRef:h,transform:m,transition:x,isDragging:w}=UI({id:e.id,disabled:a}),b={transform:Yi.Transform.toString(m),transition:x,zIndex:w?50:void 0,position:w?"relative":void 0};return l.jsxs("div",{ref:p,style:b,className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${w?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!a&&l.jsx("button",{ref:h,...c,...d,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:E=>E.stopPropagation(),children:l.jsx(Vj,{className:"h-4 w-4"})}),l.jsx(Tw,{status:e.status,onChange:E=>s(e.id,E)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(E=>`#${E}`).join(" ")}),e.session&&l.jsxs("span",{className:"ml-2 text-xs text-blue-400/60 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Mf,{className:"h-3 w-3"})," Copied to clipboard"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:E=>i(E,e.id),children:["t:",e.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:E=>i(E,e.id),children:l.jsx(_f,{className:"h-3 w-3"})})]})]})}function VI(){const{workspace:e}=Pt(),t=e||"_global",{data:n,loading:s,error:i,refetch:a}=uN(t),[c,d]=y.useState(""),[p,h]=y.useState(""),[m,x]=y.useState(""),[w,b]=y.useState(""),[E,k]=y.useState(null),j=!!(c.trim()||p||m),S=yL(wy(_p,{activationConstraint:{distance:8}}),wy(Op));function D(I,B){I.stopPropagation(),navigator.clipboard.writeText(B),k(B),setTimeout(()=>k(W=>W===B?null:W),1500)}const A=y.useMemo(()=>{if(!(n!=null&&n.items))return[];const I=new Set;for(const B of n.items)for(const W of B.tags)I.add(W);return Array.from(I).sort()},[n]),M=y.useMemo(()=>{if(!(n!=null&&n.items))return[];let I=n.items;if(c.trim()){const B=c.toLowerCase();I=I.filter(W=>W.description.toLowerCase().includes(B)||W.tags.some(J=>J.toLowerCase().includes(B))||W.id.includes(B))}return p&&(I=I.filter(B=>B.status===p)),m&&(I=I.filter(B=>B.tags.includes(m))),I},[n,c,p,m]);async function _(){w.trim()&&(await Pv(t,w.trim()),b(""),a())}const N={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function P(I,B){z(I,N[B]||"open")}async function z(I,B){switch(B){case"open":await Iv(t,I);break;case"in_progress":await Lv(t,I);break;case"completed":await Av(t,I);break;case"blocked":await Dv(t,I);break}a()}async function q(I){const{active:B,over:W}=I;if(!W||B.id===W.id||!(n!=null&&n.items))return;const J=n.items.findIndex(ie=>ie.id===B.id),G=n.items.findIndex(ie=>ie.id===W.id);if(J===-1||G===-1)return;const te=$p(n.items,J,G);await cN(t,te.map(ie=>ie.id)),a()}if(s)return l.jsx(kt,{label:"Loading todos..."});if(i)return l.jsx(St,{error:i});const T=(n==null?void 0:n.counts)||{open:0,in_progress:0,blocked:0,total:0};return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[l.jsx(tt,{label:"Open",value:T.open,icon:br}),l.jsx(tt,{label:"In Progress",value:T.in_progress,icon:br,tone:"info"}),l.jsx(tt,{label:"Blocked",value:T.blocked,icon:el,tone:"warn"}),l.jsx(tt,{label:"Total",value:T.total,icon:br})]}),l.jsx("div",{className:"surface-panel p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",placeholder:"Add a todo...",value:w,onChange:I=>b(I.target.value),onKeyDown:I=>I.key==="Enter"&&_(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),l.jsxs("button",{onClick:_,disabled:!w.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[l.jsx(tr,{className:"h-4 w-4"}),"Add"]})]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(su,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:I=>d(I.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs("select",{value:p,onChange:I=>h(I.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All statuses"}),l.jsx("option",{value:"open",children:"Open"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"blocked",children:"Blocked"})]}),A.length>0&&l.jsxs("select",{value:m,onChange:I=>x(I.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[l.jsx("option",{value:"",children:"All tags"}),A.map(I=>l.jsxs("option",{value:I,children:["#",I]},I))]})]}),M.length===0?l.jsx(xt,{title:"No todos",description:"Add your first todo above."}):l.jsx(kI,{sensors:S,collisionDetection:SL,onDragEnd:q,children:l.jsx(OI,{items:M.map(I=>I.id),strategy:LI,children:l.jsx("div",{className:"space-y-1",children:M.map(I=>l.jsx(WI,{item:I,copiedId:E,onCycleStatus:P,onStatusChange:z,onCopyId:D,disabled:j},I.id))})})})]})}function qI(){return l.jsx(bj,{children:l.jsx(YS,{children:l.jsxs(Me,{element:l.jsx(aN,{}),children:[l.jsx(Me,{path:"/",element:l.jsx(hN,{})}),l.jsx(Me,{path:"/missions",element:l.jsx(Ug,{})}),l.jsx(Me,{path:"/assignments",element:l.jsx(Yx,{})}),l.jsx(Me,{path:"/attention",element:l.jsx(mN,{})}),l.jsx(Me,{path:"/servers",element:l.jsx(oy,{})}),l.jsx(Me,{path:"/agent-sessions",element:l.jsx(iy,{})}),l.jsx(Me,{path:"/playbooks",element:l.jsx(s4,{})}),l.jsx(Me,{path:"/playbooks/create",element:l.jsx(i4,{})}),l.jsx(Me,{path:"/playbooks/:slug",element:l.jsx(o4,{})}),l.jsx(Me,{path:"/playbooks/:slug/edit",element:l.jsx(l4,{})}),l.jsx(Me,{path:"/todos",element:l.jsx(rL,{})}),l.jsx(Me,{path:"/help",element:l.jsx(xN,{})}),l.jsx(Me,{path:"/settings",element:l.jsx(nL,{})}),l.jsx(Me,{path:"/create/mission",element:l.jsx(Qx,{})}),l.jsx(Me,{path:"/missions/:slug",element:l.jsx(Ax,{})}),l.jsx(Me,{path:"/missions/:slug/edit",element:l.jsx(Zx,{})}),l.jsx(Me,{path:"/missions/:slug/create/assignment",element:l.jsx(Jx,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug",element:l.jsx(Wx,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/edit",element:l.jsx(ey,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/plan/edit",element:l.jsx(ty,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(ny,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/handoff/edit",element:l.jsx(ry,{})}),l.jsx(Me,{path:"/missions/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(sy,{})}),l.jsx(Me,{path:"/w/:workspace/missions",element:l.jsx(Ug,{})}),l.jsx(Me,{path:"/w/:workspace/assignments",element:l.jsx(Yx,{})}),l.jsx(Me,{path:"/w/:workspace/servers",element:l.jsx(oy,{})}),l.jsx(Me,{path:"/w/:workspace/agent-sessions",element:l.jsx(iy,{})}),l.jsx(Me,{path:"/w/:workspace/todos",element:l.jsx(VI,{})}),l.jsx(Me,{path:"/w/:workspace/create/mission",element:l.jsx(Qx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug",element:l.jsx(Ax,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/edit",element:l.jsx(Zx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/create/assignment",element:l.jsx(Jx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug",element:l.jsx(Wx,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/edit",element:l.jsx(ey,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/plan/edit",element:l.jsx(ty,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(ny,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/handoff/edit",element:l.jsx(ry,{})}),l.jsx(Me,{path:"/w/:workspace/missions/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(sy,{})})]})})})}VC();Yk.createRoot(document.getElementById("root")).render(l.jsx(y.StrictMode,{children:l.jsx(qC,{children:l.jsx(qI,{})})}));export{k2 as _,GI as a,eu as g};
|