syntaur 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dashboard/dist/assets/{_basePickBy-CHKX1r7P.js → _basePickBy-BhaCV7eH.js} +1 -1
  2. package/dashboard/dist/assets/{_baseUniq-CTxTc4MS.js → _baseUniq-CDPcqrs2.js} +1 -1
  3. package/dashboard/dist/assets/{arc-BUo5zftd.js → arc-BP0RxLwl.js} +1 -1
  4. package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-CrJLm-P0.js → architectureDiagram-2XIMDMQ5-BDzvaeJp.js} +1 -1
  5. package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-BK60lBBJ.js → blockDiagram-WCTKOSBZ-ZeL9mROo.js} +1 -1
  6. package/dashboard/dist/assets/{c4Diagram-IC4MRINW-C7oJEvA0.js → c4Diagram-IC4MRINW-7S5bvFLp.js} +1 -1
  7. package/dashboard/dist/assets/channel-CcB_wcgb.js +1 -0
  8. package/dashboard/dist/assets/{chunk-4BX2VUAB-CjUPlzHz.js → chunk-4BX2VUAB-Ca7R4nv5.js} +1 -1
  9. package/dashboard/dist/assets/{chunk-55IACEB6-6HmWguiO.js → chunk-55IACEB6-flEv13FB.js} +1 -1
  10. package/dashboard/dist/assets/{chunk-FMBD7UC4-CLuJnd1b.js → chunk-FMBD7UC4-CfcYWBM6.js} +1 -1
  11. package/dashboard/dist/assets/{chunk-JSJVCQXG-B4d62qWV.js → chunk-JSJVCQXG-Dw4yL0VS.js} +1 -1
  12. package/dashboard/dist/assets/{chunk-KX2RTZJC-AsEKRPq2.js → chunk-KX2RTZJC-B2cDe40G.js} +1 -1
  13. package/dashboard/dist/assets/{chunk-NQ4KR5QH-DQhHHvwY.js → chunk-NQ4KR5QH-LZVm0IWg.js} +1 -1
  14. package/dashboard/dist/assets/{chunk-QZHKN3VN-Ds1TtI3E.js → chunk-QZHKN3VN-Dg0EeHNI.js} +1 -1
  15. package/dashboard/dist/assets/{chunk-WL4C6EOR-C7jE3-cR.js → chunk-WL4C6EOR-v3rXNwXc.js} +1 -1
  16. package/dashboard/dist/assets/classDiagram-VBA2DB6C-BJr38z2g.js +1 -0
  17. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BJr38z2g.js +1 -0
  18. package/dashboard/dist/assets/clone-Cfs2GUGt.js +1 -0
  19. package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-C9ka5v1m.js → cose-bilkent-S5V4N54A-D-3JzLoS.js} +1 -1
  20. package/dashboard/dist/assets/{dagre-KLK3FWXG-BbgPQBKy.js → dagre-KLK3FWXG-d_mbczhU.js} +1 -1
  21. package/dashboard/dist/assets/{diagram-E7M64L7V-DpdeZFD4.js → diagram-E7M64L7V-BUyAp8pW.js} +1 -1
  22. package/dashboard/dist/assets/{diagram-IFDJBPK2-FlHLQzOV.js → diagram-IFDJBPK2-C8doXcyQ.js} +1 -1
  23. package/dashboard/dist/assets/{diagram-P4PSJMXO-B22NkEF_.js → diagram-P4PSJMXO-BUSmHa55.js} +1 -1
  24. package/dashboard/dist/assets/{erDiagram-INFDFZHY-zSqmtDid.js → erDiagram-INFDFZHY-Bn5_0LPU.js} +1 -1
  25. package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-BP_0XmVV.js → flowDiagram-PKNHOUZH-CnEjerQM.js} +1 -1
  26. package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-8uRyYgZV.js → ganttDiagram-A5KZAMGK-CL94fbyy.js} +1 -1
  27. package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-JFqg8sv4.js → gitGraphDiagram-K3NZZRJ6-4i_PeG8V.js} +1 -1
  28. package/dashboard/dist/assets/{graph-a-PAH599.js → graph-BtoFhoAd.js} +1 -1
  29. package/dashboard/dist/assets/index-DZUGYrvE.css +1 -0
  30. package/dashboard/dist/assets/index-Dv_-SxuL.js +481 -0
  31. package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-C3kq7Nbv.js → infoDiagram-LFFYTUFH-CdUsuNgZ.js} +1 -1
  32. package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-Kqi4EZ-n.js → ishikawaDiagram-PHBUUO56-BjggRlUx.js} +1 -1
  33. package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-CTfv0Wcr.js → journeyDiagram-4ABVD52K-V4AgexlR.js} +1 -1
  34. package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-Dmx0lgvR.js → kanban-definition-K7BYSVSG-ChlylQRf.js} +1 -1
  35. package/dashboard/dist/assets/{layout-KKRbT2Od.js → layout-DLcz9AmA.js} +1 -1
  36. package/dashboard/dist/assets/{linear-5egaBiw7.js → linear-l2xnSHze.js} +1 -1
  37. package/dashboard/dist/assets/{mermaid.core-C9pF_oFQ.js → mermaid.core-DKO1ytRW.js} +4 -4
  38. package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-C7HXYEXt.js → mindmap-definition-YRQLILUH-DTmTPHrT.js} +1 -1
  39. package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-DkdZm-YP.js → pieDiagram-SKSYHLDU-CwK80y8Y.js} +1 -1
  40. package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-DkcRJs5F.js → quadrantDiagram-337W2JSQ-Be1xqW_w.js} +1 -1
  41. package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-BaTDVYTl.js → requirementDiagram-Z7DCOOCP-JcspXCs0.js} +1 -1
  42. package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-DvPLbGV5.js → sankeyDiagram-WA2Y5GQK-nJb1BInq.js} +1 -1
  43. package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-DQoZ2xMK.js → sequenceDiagram-2WXFIKYE-DUrclEgA.js} +1 -1
  44. package/dashboard/dist/assets/{stateDiagram-RAJIS63D-CS4l0OjM.js → stateDiagram-RAJIS63D-CjinnNtF.js} +1 -1
  45. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-yfclw-nM.js +1 -0
  46. package/dashboard/dist/assets/{timeline-definition-YZTLITO2-aC0iCFCW.js → timeline-definition-YZTLITO2-kM-oVLNz.js} +1 -1
  47. package/dashboard/dist/assets/{treemap-KZPCXAKY-Ie-PFjgx.js → treemap-KZPCXAKY-CYziFlrQ.js} +1 -1
  48. package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-CJN3ExTQ.js → vennDiagram-LZ73GAT5-DX0DbxBN.js} +1 -1
  49. package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-DSiDu1CN.js → xychartDiagram-JWTSCODW-BGqM42ZM.js} +1 -1
  50. package/dashboard/dist/index.html +2 -2
  51. package/dist/dashboard/server.d.ts +5 -0
  52. package/dist/dashboard/server.js +2579 -1185
  53. package/dist/dashboard/server.js.map +1 -1
  54. package/dist/index.js +2092 -650
  55. package/dist/index.js.map +1 -1
  56. package/examples/playbooks/keep-records-updated.md +14 -8
  57. package/examples/playbooks/read-before-plan.md +8 -5
  58. package/examples/sample-project/_status.md +1 -1
  59. package/examples/sample-project/assignments/design-auth-schema/assignment.md +4 -17
  60. package/examples/sample-project/assignments/design-auth-schema/comments.md +26 -0
  61. package/examples/sample-project/assignments/design-auth-schema/progress.md +20 -0
  62. package/examples/sample-project/assignments/implement-jwt-middleware/assignment.md +4 -17
  63. package/examples/sample-project/assignments/implement-jwt-middleware/comments.md +17 -0
  64. package/examples/sample-project/assignments/implement-jwt-middleware/progress.md +20 -0
  65. package/examples/sample-project/assignments/write-auth-tests/assignment.md +4 -8
  66. package/examples/sample-project/assignments/write-auth-tests/comments.md +10 -0
  67. package/examples/sample-project/assignments/write-auth-tests/progress.md +10 -0
  68. package/package.json +1 -1
  69. package/platforms/claude-code/agents/syntaur-expert.md +40 -12
  70. package/platforms/claude-code/references/file-ownership.md +15 -3
  71. package/platforms/claude-code/references/protocol-summary.md +19 -5
  72. package/platforms/claude-code/skills/complete-assignment/SKILL.md +14 -0
  73. package/platforms/claude-code/skills/create-assignment/SKILL.md +12 -10
  74. package/platforms/claude-code/skills/syntaur-protocol/SKILL.md +21 -11
  75. package/platforms/codex/agents/syntaur-operator.md +33 -21
  76. package/platforms/codex/references/file-ownership.md +14 -3
  77. package/platforms/codex/references/protocol-summary.md +19 -5
  78. package/platforms/codex/skills/complete-assignment/SKILL.md +1 -0
  79. package/platforms/codex/skills/create-assignment/SKILL.md +13 -8
  80. package/platforms/codex/skills/syntaur-protocol/SKILL.md +26 -13
  81. package/dashboard/dist/assets/channel-DdltvFFH.js +0 -1
  82. package/dashboard/dist/assets/classDiagram-VBA2DB6C-BHqdFE-8.js +0 -1
  83. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BHqdFE-8.js +0 -1
  84. package/dashboard/dist/assets/clone-CBJOOeOm.js +0 -1
  85. package/dashboard/dist/assets/index-CoVCLSh2.css +0 -1
  86. package/dashboard/dist/assets/index-yyAIuzrP.js +0 -471
  87. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-DkBtE1WJ.js +0 -1
@@ -1,471 +0,0 @@
1
- function nS(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(o,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>o[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"]'))o(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).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 o(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function lu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jO(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?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(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),n}var bd={exports:{}},Ei={},wd={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 Ag;function rS(){if(Ag)return $e;Ag=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=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 v(F){return F===null||typeof F!="object"?null:(F=x&&F[x]||F["@@iterator"],typeof F=="function"?F:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function S(F,Z,L){this.props=F,this.context=Z,this.refs=k,this.updater=L||b}S.prototype.isReactComponent={},S.prototype.setState=function(F,Z){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,Z,"setState")},S.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function C(){}C.prototype=S.prototype;function T(F,Z,L){this.props=F,this.context=Z,this.refs=k,this.updater=L||b}var A=T.prototype=new C;A.constructor=T,N(A,S.prototype),A.isPureReactComponent=!0;var _=Array.isArray,O=Object.prototype.hasOwnProperty,P={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function E(F,Z,L){var de,ge={},fe=null,je=null;if(Z!=null)for(de in Z.ref!==void 0&&(je=Z.ref),Z.key!==void 0&&(fe=""+Z.key),Z)O.call(Z,de)&&!$.hasOwnProperty(de)&&(ge[de]=Z[de]);var Se=arguments.length-2;if(Se===1)ge.children=L;else if(1<Se){for(var Ce=Array(Se),we=0;we<Se;we++)Ce[we]=arguments[we+2];ge.children=Ce}if(F&&F.defaultProps)for(de in Se=F.defaultProps,Se)ge[de]===void 0&&(ge[de]=Se[de]);return{$$typeof:e,type:F,key:fe,ref:je,props:ge,_owner:P.current}}function U(F,Z){return{$$typeof:e,type:F.type,key:Z,ref:F.ref,props:F.props,_owner:F._owner}}function ee(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function Y(F){var Z={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(L){return Z[L]})}var q=/\/+/g;function X(F,Z){return typeof F=="object"&&F!==null&&F.key!=null?Y(""+F.key):Z.toString(36)}function Q(F,Z,L,de,ge){var fe=typeof F;(fe==="undefined"||fe==="boolean")&&(F=null);var je=!1;if(F===null)je=!0;else switch(fe){case"string":case"number":je=!0;break;case"object":switch(F.$$typeof){case e:case t:je=!0}}if(je)return je=F,ge=ge(je),F=de===""?"."+X(je,0):de,_(ge)?(L="",F!=null&&(L=F.replace(q,"$&/")+"/"),Q(ge,Z,L,"",function(we){return we})):ge!=null&&(ee(ge)&&(ge=U(ge,L+(!ge.key||je&&je.key===ge.key?"":(""+ge.key).replace(q,"$&/")+"/")+F)),Z.push(ge)),1;if(je=0,de=de===""?".":de+":",_(F))for(var Se=0;Se<F.length;Se++){fe=F[Se];var Ce=de+X(fe,Se);je+=Q(fe,Z,L,Ce,ge)}else if(Ce=v(F),typeof Ce=="function")for(F=Ce.call(F),Se=0;!(fe=F.next()).done;)fe=fe.value,Ce=de+X(fe,Se++),je+=Q(fe,Z,L,Ce,ge);else if(fe==="object")throw Z=String(F),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return je}function I(F,Z,L){if(F==null)return F;var de=[],ge=0;return Q(F,de,"","",function(fe){return Z.call(L,fe,ge++)}),de}function D(F){if(F._status===-1){var Z=F._result;Z=Z(),Z.then(function(L){(F._status===0||F._status===-1)&&(F._status=1,F._result=L)},function(L){(F._status===0||F._status===-1)&&(F._status=2,F._result=L)}),F._status===-1&&(F._status=0,F._result=Z)}if(F._status===1)return F._result.default;throw F._result}var V={current:null},H={transition:null},te={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:H,ReactCurrentOwner:P};function R(){throw Error("act(...) is not supported in production builds of React.")}return $e.Children={map:I,forEach:function(F,Z,L){I(F,function(){Z.apply(this,arguments)},L)},count:function(F){var Z=0;return I(F,function(){Z++}),Z},toArray:function(F){return I(F,function(Z){return Z})||[]},only:function(F){if(!ee(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},$e.Component=S,$e.Fragment=n,$e.Profiler=i,$e.PureComponent=T,$e.StrictMode=o,$e.Suspense=p,$e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,$e.act=R,$e.cloneElement=function(F,Z,L){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var de=N({},F.props),ge=F.key,fe=F.ref,je=F._owner;if(Z!=null){if(Z.ref!==void 0&&(fe=Z.ref,je=P.current),Z.key!==void 0&&(ge=""+Z.key),F.type&&F.type.defaultProps)var Se=F.type.defaultProps;for(Ce in Z)O.call(Z,Ce)&&!$.hasOwnProperty(Ce)&&(de[Ce]=Z[Ce]===void 0&&Se!==void 0?Se[Ce]:Z[Ce])}var Ce=arguments.length-2;if(Ce===1)de.children=L;else if(1<Ce){Se=Array(Ce);for(var we=0;we<Ce;we++)Se[we]=arguments[we+2];de.children=Se}return{$$typeof:e,type:F.type,key:ge,ref:fe,props:de,_owner:je}},$e.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},$e.createElement=E,$e.createFactory=function(F){var Z=E.bind(null,F);return Z.type=F,Z},$e.createRef=function(){return{current:null}},$e.forwardRef=function(F){return{$$typeof:d,render:F}},$e.isValidElement=ee,$e.lazy=function(F){return{$$typeof:m,_payload:{_status:-1,_result:F},_init:D}},$e.memo=function(F,Z){return{$$typeof:h,type:F,compare:Z===void 0?null:Z}},$e.startTransition=function(F){var Z=H.transition;H.transition={};try{F()}finally{H.transition=Z}},$e.unstable_act=R,$e.useCallback=function(F,Z){return V.current.useCallback(F,Z)},$e.useContext=function(F){return V.current.useContext(F)},$e.useDebugValue=function(){},$e.useDeferredValue=function(F){return V.current.useDeferredValue(F)},$e.useEffect=function(F,Z){return V.current.useEffect(F,Z)},$e.useId=function(){return V.current.useId()},$e.useImperativeHandle=function(F,Z,L){return V.current.useImperativeHandle(F,Z,L)},$e.useInsertionEffect=function(F,Z){return V.current.useInsertionEffect(F,Z)},$e.useLayoutEffect=function(F,Z){return V.current.useLayoutEffect(F,Z)},$e.useMemo=function(F,Z){return V.current.useMemo(F,Z)},$e.useReducer=function(F,Z,L){return V.current.useReducer(F,Z,L)},$e.useRef=function(F){return V.current.useRef(F)},$e.useState=function(F){return V.current.useState(F)},$e.useSyncExternalStore=function(F,Z,L){return V.current.useSyncExternalStore(F,Z,L)},$e.useTransition=function(){return V.current.useTransition()},$e.version="18.3.1",$e}var Dg;function Bf(){return Dg||(Dg=1,wd.exports=rS()),wd.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 Lg;function oS(){if(Lg)return Ei;Lg=1;var e=Bf(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=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 u(d,p,h){var m,x={},v=null,b=null;h!==void 0&&(v=""+h),p.key!==void 0&&(v=""+p.key),p.ref!==void 0&&(b=p.ref);for(m in p)o.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:v,ref:b,props:x,_owner:i.current}}return Ei.Fragment=n,Ei.jsx=u,Ei.jsxs=u,Ei}var Ig;function sS(){return Ig||(Ig=1,bd.exports=oS()),bd.exports}var l=sS(),g=Bf();const mt=lu(g),Gy=nS({__proto__:null,default:mt},[g]);var ka={},kd={exports:{}},wn={},Sd={exports:{}},jd={};/**
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 Og;function iS(){return Og||(Og=1,(function(e){function t(H,te){var R=H.length;H.push(te);e:for(;0<R;){var F=R-1>>>1,Z=H[F];if(0<i(Z,te))H[F]=te,H[R]=Z,R=F;else break e}}function n(H){return H.length===0?null:H[0]}function o(H){if(H.length===0)return null;var te=H[0],R=H.pop();if(R!==te){H[0]=R;e:for(var F=0,Z=H.length,L=Z>>>1;F<L;){var de=2*(F+1)-1,ge=H[de],fe=de+1,je=H[fe];if(0>i(ge,R))fe<Z&&0>i(je,ge)?(H[F]=je,H[fe]=R,F=fe):(H[F]=ge,H[de]=R,F=de);else if(fe<Z&&0>i(je,R))H[F]=je,H[fe]=R,F=fe;else break e}}return te}function i(H,te){var R=H.sortIndex-te.sortIndex;return R!==0?R:H.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var p=[],h=[],m=1,x=null,v=3,b=!1,N=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,T=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(H){for(var te=n(h);te!==null;){if(te.callback===null)o(h);else if(te.startTime<=H)o(h),te.sortIndex=te.expirationTime,t(p,te);else break;te=n(h)}}function _(H){if(k=!1,A(H),!N)if(n(p)!==null)N=!0,D(O);else{var te=n(h);te!==null&&V(_,te.startTime-H)}}function O(H,te){N=!1,k&&(k=!1,C(E),E=-1),b=!0;var R=v;try{for(A(te),x=n(p);x!==null&&(!(x.expirationTime>te)||H&&!Y());){var F=x.callback;if(typeof F=="function"){x.callback=null,v=x.priorityLevel;var Z=F(x.expirationTime<=te);te=e.unstable_now(),typeof Z=="function"?x.callback=Z:x===n(p)&&o(p),A(te)}else o(p);x=n(p)}if(x!==null)var L=!0;else{var de=n(h);de!==null&&V(_,de.startTime-te),L=!1}return L}finally{x=null,v=R,b=!1}}var P=!1,$=null,E=-1,U=5,ee=-1;function Y(){return!(e.unstable_now()-ee<U)}function q(){if($!==null){var H=e.unstable_now();ee=H;var te=!0;try{te=$(!0,H)}finally{te?X():(P=!1,$=null)}}else P=!1}var X;if(typeof T=="function")X=function(){T(q)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,I=Q.port2;Q.port1.onmessage=q,X=function(){I.postMessage(null)}}else X=function(){S(q,0)};function D(H){$=H,P||(P=!0,X())}function V(H,te){E=S(function(){H(e.unstable_now())},te)}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(H){H.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,D(O))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function(H){switch(v){case 1:case 2:case 3:var te=3;break;default:te=v}var R=v;v=te;try{return H()}finally{v=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,te){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var R=v;v=H;try{return te()}finally{v=R}},e.unstable_scheduleCallback=function(H,te,R){var F=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?F+R:F):R=F,H){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=R+Z,H={id:m++,callback:te,priorityLevel:H,startTime:R,expirationTime:Z,sortIndex:-1},R>F?(H.sortIndex=R,t(h,H),n(p)===null&&H===n(h)&&(k?(C(E),E=-1):k=!0,V(_,R-F))):(H.sortIndex=Z,t(p,H),N||b||(N=!0,D(O))),H},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(H){var te=v;return function(){var R=v;v=te;try{return H.apply(this,arguments)}finally{v=R}}}})(jd)),jd}var _g;function lS(){return _g||(_g=1,Sd.exports=iS()),Sd.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 Mg;function aS(){if(Mg)return wn;Mg=1;var e=Bf(),t=lS();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function a(r,s){u(r,s),u(r+"Capture",s)}function u(r,s){for(i[r]=s,r=0;r<s.length;r++)o.add(s[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 v(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,s,c,f){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:c!==null?!c.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function N(r,s,c,f){if(s===null||typeof s>"u"||b(r,s,c,f))return!0;if(f)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(r,s,c,f,y,w,j){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=y,this.mustUseProperty=c,this.propertyName=r,this.type=s,this.sanitizeURL=w,this.removeEmptyString=j}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){S[r]=new k(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];S[s]=new k(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){S[r]=new k(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){S[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){S[r]=new k(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){S[r]=new k(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){S[r]=new k(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){S[r]=new k(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){S[r]=new k(r,5,!1,r.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function T(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 s=r.replace(C,T);S[s]=new k(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(C,T);S[s]=new k(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(C,T);S[s]=new k(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){S[r]=new k(r,1,!1,r.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){S[r]=new k(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,s,c,f){var y=S.hasOwnProperty(s)?S[s]:null;(y!==null?y.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(N(s,c,y,f)&&(c=null),f||y===null?v(s)&&(c===null?r.removeAttribute(s):r.setAttribute(s,""+c)):y.mustUseProperty?r[y.propertyName]=c===null?y.type===3?!1:"":c:(s=y.attributeName,f=y.attributeNamespace,c===null?r.removeAttribute(s):(y=y.type,c=y===3||y===4&&c===!0?"":""+c,f?r.setAttributeNS(f,s,c):r.setAttribute(s,c))))}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),P=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),Y=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),H=Symbol.iterator;function te(r){return r===null||typeof r!="object"?null:(r=H&&r[H]||r["@@iterator"],typeof r=="function"?r:null)}var R=Object.assign,F;function Z(r){if(F===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);F=s&&s[1]||""}return`
34
- `+F+r}var L=!1;function de(r,s){if(!r||L)return"";L=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(ne){var f=ne}Reflect.construct(r,[],s)}else{try{s.call()}catch(ne){f=ne}r.call(s.prototype)}else{try{throw Error()}catch(ne){f=ne}r()}}catch(ne){if(ne&&f&&typeof ne.stack=="string"){for(var y=ne.stack.split(`
35
- `),w=f.stack.split(`
36
- `),j=y.length-1,M=w.length-1;1<=j&&0<=M&&y[j]!==w[M];)M--;for(;1<=j&&0<=M;j--,M--)if(y[j]!==w[M]){if(j!==1||M!==1)do if(j--,M--,0>M||y[j]!==w[M]){var z=`
37
- `+y[j].replace(" at new "," at ");return r.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",r.displayName)),z}while(1<=j&&0<=M);break}}}finally{L=!1,Error.prepareStackTrace=c}return(r=r?r.displayName||r.name:"")?Z(r):""}function ge(r){switch(r.tag){case 5:return Z(r.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return r=de(r.type,!1),r;case 11:return r=de(r.type.render,!1),r;case 1:return r=de(r.type,!0),r;default:return""}}function fe(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 $:return"Fragment";case P:return"Portal";case U:return"Profiler";case E:return"StrictMode";case X:return"Suspense";case Q:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Y:return(r.displayName||"Context")+".Consumer";case ee:return(r._context.displayName||"Context")+".Provider";case q:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case I:return s=r.displayName||null,s!==null?s:fe(r.type)||"Memo";case D:s=r._payload,r=r._init;try{return fe(r(s))}catch{}}return null}function je(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fe(s);case 8:return s===E?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Se(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Ce(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function we(r){var s=Ce(r)?"checked":"value",c=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),f=""+r[s];if(!r.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,w=c.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return y.call(this)},set:function(j){f=""+j,w.call(this,j)}}),Object.defineProperty(r,s,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(j){f=""+j},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function at(r){r._valueTracker||(r._valueTracker=we(r))}function Ze(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var c=s.getValue(),f="";return r&&(f=Ce(r)?r.checked?"true":"false":r.value),r=f,r!==c?(s.setValue(r),!0):!1}function Be(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 ze(r,s){var c=s.checked;return R({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??r._wrapperState.initialChecked})}function bt(r,s){var c=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;c=Se(s.value!=null?s.value:c),r._wrapperState={initialChecked:f,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function It(r,s){s=s.checked,s!=null&&A(r,"checked",s,!1)}function on(r,s){It(r,s);var c=Se(s.value),f=s.type;if(c!=null)f==="number"?(c===0&&r.value===""||r.value!=c)&&(r.value=""+c):r.value!==""+c&&(r.value=""+c);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Ge(r,s.type,c):s.hasOwnProperty("defaultValue")&&Ge(r,s.type,Se(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function dn(r,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,c||s===r.value||(r.value=s),r.defaultValue=s}c=r.name,c!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,c!==""&&(r.name=c)}function Ge(r,s,c){(s!=="number"||Be(r.ownerDocument)!==r)&&(c==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+c&&(r.defaultValue=""+c))}var et=Array.isArray;function zt(r,s,c,f){if(r=r.options,s){s={};for(var y=0;y<c.length;y++)s["$"+c[y]]=!0;for(c=0;c<r.length;c++)y=s.hasOwnProperty("$"+r[c].value),r[c].selected!==y&&(r[c].selected=y),y&&f&&(r[c].defaultSelected=!0)}else{for(c=""+Se(c),s=null,y=0;y<r.length;y++){if(r[y].value===c){r[y].selected=!0,f&&(r[y].defaultSelected=!0);return}s!==null||r[y].disabled||(s=r[y])}s!==null&&(s.selected=!0)}}function Kt(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return R({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function fn(r,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(et(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}r._wrapperState={initialValue:Se(c)}}function Rn(r,s){var c=Se(s.value),f=Se(s.defaultValue);c!=null&&(c=""+c,c!==r.value&&(r.value=c),s.defaultValue==null&&r.defaultValue!==c&&(r.defaultValue=c)),f!=null&&(r.defaultValue=""+f)}function Pn(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function re(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 K(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?re(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var ae,pe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,f,y){MSApp.execUnsafeLocalFunction(function(){return r(s,c,f,y)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(ae=ae||document.createElement("div"),ae.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=ae.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function Ae(r,s){if(s){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=s;return}}r.textContent=s}var Ke={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},pn=["Webkit","ms","Moz","O"];Object.keys(Ke).forEach(function(r){pn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),Ke[s]=Ke[r]})});function Gt(r,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||Ke.hasOwnProperty(r)&&Ke[r]?(""+s).trim():s+"px"}function Bt(r,s){r=r.style;for(var c in s)if(s.hasOwnProperty(c)){var f=c.indexOf("--")===0,y=Gt(c,s[c],f);c==="float"&&(c="cssFloat"),f?r.setProperty(c,y):r[c]=y}}var W=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 le(r,s){if(s){if(W[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function xe(r,s){if(r.indexOf("-")===-1)return typeof s.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 Le=null;function Fn(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Yt=null,Ot=null,Me=null;function pt(r){if(r=fi(r)){if(typeof Yt!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Ml(s),Yt(r.stateNode,r.type,s))}}function Nt(r){Ot?Me?Me.push(r):Me=[r]:Ot=r}function hn(){if(Ot){var r=Ot,s=Me;if(Me=Ot=null,pt(r),s)for(r=0;r<s.length;r++)pt(s[r])}}function Ut(r,s){return r(s)}function Xt(){}var mn=!1;function Ar(r,s,c){if(mn)return r(s,c);mn=!0;try{return Ut(r,s,c)}finally{mn=!1,(Ot!==null||Me!==null)&&(Xt(),hn())}}function ut(r,s){var c=r.stateNode;if(c===null)return null;var f=Ml(c);if(f===null)return null;c=f[s];e:switch(s){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(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var zn=!1;if(d)try{var Qt={};Object.defineProperty(Qt,"passive",{get:function(){zn=!0}}),window.addEventListener("test",Qt,Qt),window.removeEventListener("test",Qt,Qt)}catch{zn=!1}function Xn(r,s,c,f,y,w,j,M,z){var ne=Array.prototype.slice.call(arguments,3);try{s.apply(c,ne)}catch(se){this.onError(se)}}var Qn=!1,fr=null,Tn=!1,Dr=null,Ks={onError:function(r){Qn=!0,fr=r}};function c1(r,s,c,f,y,w,j,M,z){Qn=!1,fr=null,Xn.apply(Ks,arguments)}function d1(r,s,c,f,y,w,j,M,z){if(c1.apply(this,arguments),Qn){if(Qn){var ne=fr;Qn=!1,fr=null}else throw Error(n(198));Tn||(Tn=!0,Dr=ne)}}function Eo(r){var s=r,c=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(c=s.return),r=s.return;while(r)}return s.tag===3?c:null}function eh(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function th(r){if(Eo(r)!==r)throw Error(n(188))}function f1(r){var s=r.alternate;if(!s){if(s=Eo(r),s===null)throw Error(n(188));return s!==r?null:r}for(var c=r,f=s;;){var y=c.return;if(y===null)break;var w=y.alternate;if(w===null){if(f=y.return,f!==null){c=f;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===c)return th(y),r;if(w===f)return th(y),s;w=w.sibling}throw Error(n(188))}if(c.return!==f.return)c=y,f=w;else{for(var j=!1,M=y.child;M;){if(M===c){j=!0,c=y,f=w;break}if(M===f){j=!0,f=y,c=w;break}M=M.sibling}if(!j){for(M=w.child;M;){if(M===c){j=!0,c=w,f=y;break}if(M===f){j=!0,f=w,c=y;break}M=M.sibling}if(!j)throw Error(n(189))}}if(c.alternate!==f)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?r:s}function nh(r){return r=f1(r),r!==null?rh(r):null}function rh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=rh(r);if(s!==null)return s;r=r.sibling}return null}var oh=t.unstable_scheduleCallback,sh=t.unstable_cancelCallback,p1=t.unstable_shouldYield,h1=t.unstable_requestPaint,xt=t.unstable_now,m1=t.unstable_getCurrentPriorityLevel,zu=t.unstable_ImmediatePriority,ih=t.unstable_UserBlockingPriority,xl=t.unstable_NormalPriority,g1=t.unstable_LowPriority,lh=t.unstable_IdlePriority,yl=null,pr=null;function x1(r){if(pr&&typeof pr.onCommitFiberRoot=="function")try{pr.onCommitFiberRoot(yl,r,void 0,(r.current.flags&128)===128)}catch{}}var Jn=Math.clz32?Math.clz32:b1,y1=Math.log,v1=Math.LN2;function b1(r){return r>>>=0,r===0?32:31-(y1(r)/v1|0)|0}var vl=64,bl=4194304;function Gs(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 wl(r,s){var c=r.pendingLanes;if(c===0)return 0;var f=0,y=r.suspendedLanes,w=r.pingedLanes,j=c&268435455;if(j!==0){var M=j&~y;M!==0?f=Gs(M):(w&=j,w!==0&&(f=Gs(w)))}else j=c&~y,j!==0?f=Gs(j):w!==0&&(f=Gs(w));if(f===0)return 0;if(s!==0&&s!==f&&(s&y)===0&&(y=f&-f,w=s&-s,y>=w||y===16&&(w&4194240)!==0))return s;if((f&4)!==0&&(f|=c&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=f;0<s;)c=31-Jn(s),y=1<<c,f|=r[c],s&=~y;return f}function w1(r,s){switch(r){case 1:case 2:case 4:return s+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 s+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 k1(r,s){for(var c=r.suspendedLanes,f=r.pingedLanes,y=r.expirationTimes,w=r.pendingLanes;0<w;){var j=31-Jn(w),M=1<<j,z=y[j];z===-1?((M&c)===0||(M&f)!==0)&&(y[j]=w1(M,s)):z<=s&&(r.expiredLanes|=M),w&=~M}}function Bu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function ah(){var r=vl;return vl<<=1,(vl&4194240)===0&&(vl=64),r}function Uu(r){for(var s=[],c=0;31>c;c++)s.push(r);return s}function Ys(r,s,c){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-Jn(s),r[s]=c}function S1(r,s){var c=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<c;){var y=31-Jn(c),w=1<<y;s[y]=0,f[y]=-1,r[y]=-1,c&=~w}}function Hu(r,s){var c=r.entangledLanes|=s;for(r=r.entanglements;c;){var f=31-Jn(c),y=1<<f;y&s|r[f]&s&&(r[f]|=s),c&=~y}}var qe=0;function uh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var ch,Wu,dh,fh,ph,Vu=!1,kl=[],Yr=null,Xr=null,Qr=null,Xs=new Map,Qs=new Map,Jr=[],j1="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 hh(r,s){switch(r){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":Xs.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qs.delete(s.pointerId)}}function Js(r,s,c,f,y,w){return r===null||r.nativeEvent!==w?(r={blockedOn:s,domEventName:c,eventSystemFlags:f,nativeEvent:w,targetContainers:[y]},s!==null&&(s=fi(s),s!==null&&Wu(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function C1(r,s,c,f,y){switch(s){case"focusin":return Yr=Js(Yr,r,s,c,f,y),!0;case"dragenter":return Xr=Js(Xr,r,s,c,f,y),!0;case"mouseover":return Qr=Js(Qr,r,s,c,f,y),!0;case"pointerover":var w=y.pointerId;return Xs.set(w,Js(Xs.get(w)||null,r,s,c,f,y)),!0;case"gotpointercapture":return w=y.pointerId,Qs.set(w,Js(Qs.get(w)||null,r,s,c,f,y)),!0}return!1}function mh(r){var s=Ro(r.target);if(s!==null){var c=Eo(s);if(c!==null){if(s=c.tag,s===13){if(s=eh(c),s!==null){r.blockedOn=s,ph(r.priority,function(){dh(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Sl(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var c=Ku(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(c===null){c=r.nativeEvent;var f=new c.constructor(c.type,c);Le=f,c.target.dispatchEvent(f),Le=null}else return s=fi(c),s!==null&&Wu(s),r.blockedOn=c,!1;s.shift()}return!0}function gh(r,s,c){Sl(r)&&c.delete(s)}function N1(){Vu=!1,Yr!==null&&Sl(Yr)&&(Yr=null),Xr!==null&&Sl(Xr)&&(Xr=null),Qr!==null&&Sl(Qr)&&(Qr=null),Xs.forEach(gh),Qs.forEach(gh)}function Zs(r,s){r.blockedOn===s&&(r.blockedOn=null,Vu||(Vu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,N1)))}function ei(r){function s(y){return Zs(y,r)}if(0<kl.length){Zs(kl[0],r);for(var c=1;c<kl.length;c++){var f=kl[c];f.blockedOn===r&&(f.blockedOn=null)}}for(Yr!==null&&Zs(Yr,r),Xr!==null&&Zs(Xr,r),Qr!==null&&Zs(Qr,r),Xs.forEach(s),Qs.forEach(s),c=0;c<Jr.length;c++)f=Jr[c],f.blockedOn===r&&(f.blockedOn=null);for(;0<Jr.length&&(c=Jr[0],c.blockedOn===null);)mh(c),c.blockedOn===null&&Jr.shift()}var Go=_.ReactCurrentBatchConfig,jl=!0;function E1(r,s,c,f){var y=qe,w=Go.transition;Go.transition=null;try{qe=1,qu(r,s,c,f)}finally{qe=y,Go.transition=w}}function R1(r,s,c,f){var y=qe,w=Go.transition;Go.transition=null;try{qe=4,qu(r,s,c,f)}finally{qe=y,Go.transition=w}}function qu(r,s,c,f){if(jl){var y=Ku(r,s,c,f);if(y===null)cc(r,s,f,Cl,c),hh(r,f);else if(C1(y,r,s,c,f))f.stopPropagation();else if(hh(r,f),s&4&&-1<j1.indexOf(r)){for(;y!==null;){var w=fi(y);if(w!==null&&ch(w),w=Ku(r,s,c,f),w===null&&cc(r,s,f,Cl,c),w===y)break;y=w}y!==null&&f.stopPropagation()}else cc(r,s,f,null,c)}}var Cl=null;function Ku(r,s,c,f){if(Cl=null,r=Fn(f),r=Ro(r),r!==null)if(s=Eo(r),s===null)r=null;else if(c=s.tag,c===13){if(r=eh(s),r!==null)return r;r=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Cl=r,null}function xh(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(m1()){case zu:return 1;case ih:return 4;case xl:case g1:return 16;case lh:return 536870912;default:return 16}default:return 16}}var Zr=null,Gu=null,Nl=null;function yh(){if(Nl)return Nl;var r,s=Gu,c=s.length,f,y="value"in Zr?Zr.value:Zr.textContent,w=y.length;for(r=0;r<c&&s[r]===y[r];r++);var j=c-r;for(f=1;f<=j&&s[c-f]===y[w-f];f++);return Nl=y.slice(r,1<f?1-f:void 0)}function El(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Rl(){return!0}function vh(){return!1}function An(r){function s(c,f,y,w,j){this._reactName=c,this._targetInst=y,this.type=f,this.nativeEvent=w,this.target=j,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(c=r[M],this[M]=c?c(w):w[M]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Rl:vh,this.isPropagationStopped=vh,this}return R(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Rl)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Rl)},persist:function(){},isPersistent:Rl}),s}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yu=An(Yo),ti=R({},Yo,{view:0,detail:0}),P1=An(ti),Xu,Qu,ni,Pl=R({},ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zu,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!==ni&&(ni&&r.type==="mousemove"?(Xu=r.screenX-ni.screenX,Qu=r.screenY-ni.screenY):Qu=Xu=0,ni=r),Xu)},movementY:function(r){return"movementY"in r?r.movementY:Qu}}),bh=An(Pl),T1=R({},Pl,{dataTransfer:0}),A1=An(T1),D1=R({},ti,{relatedTarget:0}),Ju=An(D1),L1=R({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),I1=An(L1),O1=R({},Yo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),_1=An(O1),M1=R({},Yo,{data:0}),wh=An(M1),$1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},F1={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"},z1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B1(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=z1[r])?!!s[r]:!1}function Zu(){return B1}var U1=R({},ti,{key:function(r){if(r.key){var s=$1[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=El(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?F1[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zu,charCode:function(r){return r.type==="keypress"?El(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?El(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),H1=An(U1),W1=R({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kh=An(W1),V1=R({},ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zu}),q1=An(V1),K1=R({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),G1=An(K1),Y1=R({},Pl,{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}),X1=An(Y1),Q1=[9,13,27,32],ec=d&&"CompositionEvent"in window,ri=null;d&&"documentMode"in document&&(ri=document.documentMode);var J1=d&&"TextEvent"in window&&!ri,Sh=d&&(!ec||ri&&8<ri&&11>=ri),jh=" ",Ch=!1;function Nh(r,s){switch(r){case"keyup":return Q1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Xo=!1;function Z1(r,s){switch(r){case"compositionend":return Eh(s);case"keypress":return s.which!==32?null:(Ch=!0,jh);case"textInput":return r=s.data,r===jh&&Ch?null:r;default:return null}}function ek(r,s){if(Xo)return r==="compositionend"||!ec&&Nh(r,s)?(r=yh(),Nl=Gu=Zr=null,Xo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Sh&&s.locale!=="ko"?null:s.data;default:return null}}var tk={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 Rh(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!tk[r.type]:s==="textarea"}function Ph(r,s,c,f){Nt(f),s=Il(s,"onChange"),0<s.length&&(c=new Yu("onChange","change",null,c,f),r.push({event:c,listeners:s}))}var oi=null,si=null;function nk(r){Kh(r,0)}function Tl(r){var s=ts(r);if(Ze(s))return r}function rk(r,s){if(r==="change")return s}var Th=!1;if(d){var tc;if(d){var nc="oninput"in document;if(!nc){var Ah=document.createElement("div");Ah.setAttribute("oninput","return;"),nc=typeof Ah.oninput=="function"}tc=nc}else tc=!1;Th=tc&&(!document.documentMode||9<document.documentMode)}function Dh(){oi&&(oi.detachEvent("onpropertychange",Lh),si=oi=null)}function Lh(r){if(r.propertyName==="value"&&Tl(si)){var s=[];Ph(s,si,r,Fn(r)),Ar(nk,s)}}function ok(r,s,c){r==="focusin"?(Dh(),oi=s,si=c,oi.attachEvent("onpropertychange",Lh)):r==="focusout"&&Dh()}function sk(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Tl(si)}function ik(r,s){if(r==="click")return Tl(s)}function lk(r,s){if(r==="input"||r==="change")return Tl(s)}function ak(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var Zn=typeof Object.is=="function"?Object.is:ak;function ii(r,s){if(Zn(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var c=Object.keys(r),f=Object.keys(s);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var y=c[f];if(!p.call(s,y)||!Zn(r[y],s[y]))return!1}return!0}function Ih(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Oh(r,s){var c=Ih(r);r=0;for(var f;c;){if(c.nodeType===3){if(f=r+c.textContent.length,r<=s&&f>=s)return{node:c,offset:s-r};r=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Ih(c)}}function _h(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?_h(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Mh(){for(var r=window,s=Be();s instanceof r.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)r=s.contentWindow;else break;s=Be(r.document)}return s}function rc(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function uk(r){var s=Mh(),c=r.focusedElem,f=r.selectionRange;if(s!==c&&c&&c.ownerDocument&&_h(c.ownerDocument.documentElement,c)){if(f!==null&&rc(c)){if(s=f.start,r=f.end,r===void 0&&(r=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(r,c.value.length);else if(r=(s=c.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var y=c.textContent.length,w=Math.min(f.start,y);f=f.end===void 0?w:Math.min(f.end,y),!r.extend&&w>f&&(y=f,f=w,w=y),y=Oh(c,w);var j=Oh(c,f);y&&j&&(r.rangeCount!==1||r.anchorNode!==y.node||r.anchorOffset!==y.offset||r.focusNode!==j.node||r.focusOffset!==j.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),r.removeAllRanges(),w>f?(r.addRange(s),r.extend(j.node,j.offset)):(s.setEnd(j.node,j.offset),r.addRange(s)))}}for(s=[],r=c;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)r=s[c],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var ck=d&&"documentMode"in document&&11>=document.documentMode,Qo=null,oc=null,li=null,sc=!1;function $h(r,s,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;sc||Qo==null||Qo!==Be(f)||(f=Qo,"selectionStart"in f&&rc(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}),li&&ii(li,f)||(li=f,f=Il(oc,"onSelect"),0<f.length&&(s=new Yu("onSelect","select",null,s,c),r.push({event:s,listeners:f}),s.target=Qo)))}function Al(r,s){var c={};return c[r.toLowerCase()]=s.toLowerCase(),c["Webkit"+r]="webkit"+s,c["Moz"+r]="moz"+s,c}var Jo={animationend:Al("Animation","AnimationEnd"),animationiteration:Al("Animation","AnimationIteration"),animationstart:Al("Animation","AnimationStart"),transitionend:Al("Transition","TransitionEnd")},ic={},Fh={};d&&(Fh=document.createElement("div").style,"AnimationEvent"in window||(delete Jo.animationend.animation,delete Jo.animationiteration.animation,delete Jo.animationstart.animation),"TransitionEvent"in window||delete Jo.transitionend.transition);function Dl(r){if(ic[r])return ic[r];if(!Jo[r])return r;var s=Jo[r],c;for(c in s)if(s.hasOwnProperty(c)&&c in Fh)return ic[r]=s[c];return r}var zh=Dl("animationend"),Bh=Dl("animationiteration"),Uh=Dl("animationstart"),Hh=Dl("transitionend"),Wh=new Map,Vh="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 eo(r,s){Wh.set(r,s),a(s,[r])}for(var lc=0;lc<Vh.length;lc++){var ac=Vh[lc],dk=ac.toLowerCase(),fk=ac[0].toUpperCase()+ac.slice(1);eo(dk,"on"+fk)}eo(zh,"onAnimationEnd"),eo(Bh,"onAnimationIteration"),eo(Uh,"onAnimationStart"),eo("dblclick","onDoubleClick"),eo("focusin","onFocus"),eo("focusout","onBlur"),eo(Hh,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("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 ai="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(" "),pk=new Set("cancel close invalid load scroll toggle".split(" ").concat(ai));function qh(r,s,c){var f=r.type||"unknown-event";r.currentTarget=c,d1(f,s,void 0,r),r.currentTarget=null}function Kh(r,s){s=(s&4)!==0;for(var c=0;c<r.length;c++){var f=r[c],y=f.event;f=f.listeners;e:{var w=void 0;if(s)for(var j=f.length-1;0<=j;j--){var M=f[j],z=M.instance,ne=M.currentTarget;if(M=M.listener,z!==w&&y.isPropagationStopped())break e;qh(y,M,ne),w=z}else for(j=0;j<f.length;j++){if(M=f[j],z=M.instance,ne=M.currentTarget,M=M.listener,z!==w&&y.isPropagationStopped())break e;qh(y,M,ne),w=z}}}if(Tn)throw r=Dr,Tn=!1,Dr=null,r}function tt(r,s){var c=s[gc];c===void 0&&(c=s[gc]=new Set);var f=r+"__bubble";c.has(f)||(Gh(s,r,2,!1),c.add(f))}function uc(r,s,c){var f=0;s&&(f|=4),Gh(c,r,f,s)}var Ll="_reactListening"+Math.random().toString(36).slice(2);function ui(r){if(!r[Ll]){r[Ll]=!0,o.forEach(function(c){c!=="selectionchange"&&(pk.has(c)||uc(c,!1,r),uc(c,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Ll]||(s[Ll]=!0,uc("selectionchange",!1,s))}}function Gh(r,s,c,f){switch(xh(s)){case 1:var y=E1;break;case 4:y=R1;break;default:y=qu}c=y.bind(null,s,c,r),y=void 0,!zn||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),f?y!==void 0?r.addEventListener(s,c,{capture:!0,passive:y}):r.addEventListener(s,c,!0):y!==void 0?r.addEventListener(s,c,{passive:y}):r.addEventListener(s,c,!1)}function cc(r,s,c,f,y){var w=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var j=f.tag;if(j===3||j===4){var M=f.stateNode.containerInfo;if(M===y||M.nodeType===8&&M.parentNode===y)break;if(j===4)for(j=f.return;j!==null;){var z=j.tag;if((z===3||z===4)&&(z=j.stateNode.containerInfo,z===y||z.nodeType===8&&z.parentNode===y))return;j=j.return}for(;M!==null;){if(j=Ro(M),j===null)return;if(z=j.tag,z===5||z===6){f=w=j;continue e}M=M.parentNode}}f=f.return}Ar(function(){var ne=w,se=Fn(c),ie=[];e:{var oe=Wh.get(r);if(oe!==void 0){var he=Yu,ye=r;switch(r){case"keypress":if(El(c)===0)break e;case"keydown":case"keyup":he=H1;break;case"focusin":ye="focus",he=Ju;break;case"focusout":ye="blur",he=Ju;break;case"beforeblur":case"afterblur":he=Ju;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=A1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=q1;break;case zh:case Bh:case Uh:he=I1;break;case Hh:he=G1;break;case"scroll":he=P1;break;case"wheel":he=X1;break;case"copy":case"cut":case"paste":he=_1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=kh}var be=(s&4)!==0,yt=!be&&r==="scroll",G=be?oe!==null?oe+"Capture":null:oe;be=[];for(var B=ne,J;B!==null;){J=B;var ce=J.stateNode;if(J.tag===5&&ce!==null&&(J=ce,G!==null&&(ce=ut(B,G),ce!=null&&be.push(ci(B,ce,J)))),yt)break;B=B.return}0<be.length&&(oe=new he(oe,ye,null,c,se),ie.push({event:oe,listeners:be}))}}if((s&7)===0){e:{if(oe=r==="mouseover"||r==="pointerover",he=r==="mouseout"||r==="pointerout",oe&&c!==Le&&(ye=c.relatedTarget||c.fromElement)&&(Ro(ye)||ye[Lr]))break e;if((he||oe)&&(oe=se.window===se?se:(oe=se.ownerDocument)?oe.defaultView||oe.parentWindow:window,he?(ye=c.relatedTarget||c.toElement,he=ne,ye=ye?Ro(ye):null,ye!==null&&(yt=Eo(ye),ye!==yt||ye.tag!==5&&ye.tag!==6)&&(ye=null)):(he=null,ye=ne),he!==ye)){if(be=bh,ce="onMouseLeave",G="onMouseEnter",B="mouse",(r==="pointerout"||r==="pointerover")&&(be=kh,ce="onPointerLeave",G="onPointerEnter",B="pointer"),yt=he==null?oe:ts(he),J=ye==null?oe:ts(ye),oe=new be(ce,B+"leave",he,c,se),oe.target=yt,oe.relatedTarget=J,ce=null,Ro(se)===ne&&(be=new be(G,B+"enter",ye,c,se),be.target=J,be.relatedTarget=yt,ce=be),yt=ce,he&&ye)t:{for(be=he,G=ye,B=0,J=be;J;J=Zo(J))B++;for(J=0,ce=G;ce;ce=Zo(ce))J++;for(;0<B-J;)be=Zo(be),B--;for(;0<J-B;)G=Zo(G),J--;for(;B--;){if(be===G||G!==null&&be===G.alternate)break t;be=Zo(be),G=Zo(G)}be=null}else be=null;he!==null&&Yh(ie,oe,he,be,!1),ye!==null&&yt!==null&&Yh(ie,yt,ye,be,!0)}}e:{if(oe=ne?ts(ne):window,he=oe.nodeName&&oe.nodeName.toLowerCase(),he==="select"||he==="input"&&oe.type==="file")var ke=rk;else if(Rh(oe))if(Th)ke=lk;else{ke=sk;var Ne=ok}else(he=oe.nodeName)&&he.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(ke=ik);if(ke&&(ke=ke(r,ne))){Ph(ie,ke,c,se);break e}Ne&&Ne(r,oe,ne),r==="focusout"&&(Ne=oe._wrapperState)&&Ne.controlled&&oe.type==="number"&&Ge(oe,"number",oe.value)}switch(Ne=ne?ts(ne):window,r){case"focusin":(Rh(Ne)||Ne.contentEditable==="true")&&(Qo=Ne,oc=ne,li=null);break;case"focusout":li=oc=Qo=null;break;case"mousedown":sc=!0;break;case"contextmenu":case"mouseup":case"dragend":sc=!1,$h(ie,c,se);break;case"selectionchange":if(ck)break;case"keydown":case"keyup":$h(ie,c,se)}var Ee;if(ec)e:{switch(r){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else Xo?Nh(r,c)&&(Pe="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(Pe="onCompositionStart");Pe&&(Sh&&c.locale!=="ko"&&(Xo||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&Xo&&(Ee=yh()):(Zr=se,Gu="value"in Zr?Zr.value:Zr.textContent,Xo=!0)),Ne=Il(ne,Pe),0<Ne.length&&(Pe=new wh(Pe,r,null,c,se),ie.push({event:Pe,listeners:Ne}),Ee?Pe.data=Ee:(Ee=Eh(c),Ee!==null&&(Pe.data=Ee)))),(Ee=J1?Z1(r,c):ek(r,c))&&(ne=Il(ne,"onBeforeInput"),0<ne.length&&(se=new wh("onBeforeInput","beforeinput",null,c,se),ie.push({event:se,listeners:ne}),se.data=Ee))}Kh(ie,s)})}function ci(r,s,c){return{instance:r,listener:s,currentTarget:c}}function Il(r,s){for(var c=s+"Capture",f=[];r!==null;){var y=r,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=ut(r,c),w!=null&&f.unshift(ci(r,w,y)),w=ut(r,s),w!=null&&f.push(ci(r,w,y))),r=r.return}return f}function Zo(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Yh(r,s,c,f,y){for(var w=s._reactName,j=[];c!==null&&c!==f;){var M=c,z=M.alternate,ne=M.stateNode;if(z!==null&&z===f)break;M.tag===5&&ne!==null&&(M=ne,y?(z=ut(c,w),z!=null&&j.unshift(ci(c,z,M))):y||(z=ut(c,w),z!=null&&j.push(ci(c,z,M)))),c=c.return}j.length!==0&&r.push({event:s,listeners:j})}var hk=/\r\n?/g,mk=/\u0000|\uFFFD/g;function Xh(r){return(typeof r=="string"?r:""+r).replace(hk,`
38
- `).replace(mk,"")}function Ol(r,s,c){if(s=Xh(s),Xh(r)!==s&&c)throw Error(n(425))}function _l(){}var dc=null,fc=null;function pc(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var hc=typeof setTimeout=="function"?setTimeout:void 0,gk=typeof clearTimeout=="function"?clearTimeout:void 0,Qh=typeof Promise=="function"?Promise:void 0,xk=typeof queueMicrotask=="function"?queueMicrotask:typeof Qh<"u"?function(r){return Qh.resolve(null).then(r).catch(yk)}:hc;function yk(r){setTimeout(function(){throw r})}function mc(r,s){var c=s,f=0;do{var y=c.nextSibling;if(r.removeChild(c),y&&y.nodeType===8)if(c=y.data,c==="/$"){if(f===0){r.removeChild(y),ei(s);return}f--}else c!=="$"&&c!=="$?"&&c!=="$!"||f++;c=y}while(c);ei(s)}function to(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function Jh(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return r;s--}else c==="/$"&&s++}r=r.previousSibling}return null}var es=Math.random().toString(36).slice(2),hr="__reactFiber$"+es,di="__reactProps$"+es,Lr="__reactContainer$"+es,gc="__reactEvents$"+es,vk="__reactListeners$"+es,bk="__reactHandles$"+es;function Ro(r){var s=r[hr];if(s)return s;for(var c=r.parentNode;c;){if(s=c[Lr]||c[hr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(r=Jh(r);r!==null;){if(c=r[hr])return c;r=Jh(r)}return s}r=c,c=r.parentNode}return null}function fi(r){return r=r[hr]||r[Lr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function ts(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Ml(r){return r[di]||null}var xc=[],ns=-1;function no(r){return{current:r}}function nt(r){0>ns||(r.current=xc[ns],xc[ns]=null,ns--)}function Ye(r,s){ns++,xc[ns]=r.current,r.current=s}var ro={},Jt=no(ro),gn=no(!1),Po=ro;function rs(r,s){var c=r.type.contextTypes;if(!c)return ro;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in c)y[w]=s[w];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=y),y}function xn(r){return r=r.childContextTypes,r!=null}function $l(){nt(gn),nt(Jt)}function Zh(r,s,c){if(Jt.current!==ro)throw Error(n(168));Ye(Jt,s),Ye(gn,c)}function em(r,s,c){var f=r.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return c;f=f.getChildContext();for(var y in f)if(!(y in s))throw Error(n(108,je(r)||"Unknown",y));return R({},c,f)}function Fl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ro,Po=Jt.current,Ye(Jt,r),Ye(gn,gn.current),!0}function tm(r,s,c){var f=r.stateNode;if(!f)throw Error(n(169));c?(r=em(r,s,Po),f.__reactInternalMemoizedMergedChildContext=r,nt(gn),nt(Jt),Ye(Jt,r)):nt(gn),Ye(gn,c)}var Ir=null,zl=!1,yc=!1;function nm(r){Ir===null?Ir=[r]:Ir.push(r)}function wk(r){zl=!0,nm(r)}function oo(){if(!yc&&Ir!==null){yc=!0;var r=0,s=qe;try{var c=Ir;for(qe=1;r<c.length;r++){var f=c[r];do f=f(!0);while(f!==null)}Ir=null,zl=!1}catch(y){throw Ir!==null&&(Ir=Ir.slice(r+1)),oh(zu,oo),y}finally{qe=s,yc=!1}}return null}var os=[],ss=0,Bl=null,Ul=0,Bn=[],Un=0,To=null,Or=1,_r="";function Ao(r,s){os[ss++]=Ul,os[ss++]=Bl,Bl=r,Ul=s}function rm(r,s,c){Bn[Un++]=Or,Bn[Un++]=_r,Bn[Un++]=To,To=r;var f=Or;r=_r;var y=32-Jn(f)-1;f&=~(1<<y),c+=1;var w=32-Jn(s)+y;if(30<w){var j=y-y%5;w=(f&(1<<j)-1).toString(32),f>>=j,y-=j,Or=1<<32-Jn(s)+y|c<<y|f,_r=w+r}else Or=1<<w|c<<y|f,_r=r}function vc(r){r.return!==null&&(Ao(r,1),rm(r,1,0))}function bc(r){for(;r===Bl;)Bl=os[--ss],os[ss]=null,Ul=os[--ss],os[ss]=null;for(;r===To;)To=Bn[--Un],Bn[Un]=null,_r=Bn[--Un],Bn[Un]=null,Or=Bn[--Un],Bn[Un]=null}var Dn=null,Ln=null,st=!1,er=null;function om(r,s){var c=qn(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=r,s=r.deletions,s===null?(r.deletions=[c],r.flags|=16):s.push(c)}function sm(r,s){switch(r.tag){case 5:var c=r.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,Dn=r,Ln=to(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,Dn=r,Ln=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=To!==null?{id:Or,overflow:_r}:null,r.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=qn(18,null,null,0),c.stateNode=s,c.return=r,r.child=c,Dn=r,Ln=null,!0):!1;default:return!1}}function wc(r){return(r.mode&1)!==0&&(r.flags&128)===0}function kc(r){if(st){var s=Ln;if(s){var c=s;if(!sm(r,s)){if(wc(r))throw Error(n(418));s=to(c.nextSibling);var f=Dn;s&&sm(r,s)?om(f,c):(r.flags=r.flags&-4097|2,st=!1,Dn=r)}}else{if(wc(r))throw Error(n(418));r.flags=r.flags&-4097|2,st=!1,Dn=r}}}function im(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Dn=r}function Hl(r){if(r!==Dn)return!1;if(!st)return im(r),st=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!pc(r.type,r.memoizedProps)),s&&(s=Ln)){if(wc(r))throw lm(),Error(n(418));for(;s;)om(r,s),s=to(s.nextSibling)}if(im(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"){if(s===0){Ln=to(r.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}r=r.nextSibling}Ln=null}}else Ln=Dn?to(r.stateNode.nextSibling):null;return!0}function lm(){for(var r=Ln;r;)r=to(r.nextSibling)}function is(){Ln=Dn=null,st=!1}function Sc(r){er===null?er=[r]:er.push(r)}var kk=_.ReactCurrentBatchConfig;function pi(r,s,c){if(r=c.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var f=c.stateNode}if(!f)throw Error(n(147,r));var y=f,w=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(j){var M=y.refs;j===null?delete M[w]:M[w]=j},s._stringRef=w,s)}if(typeof r!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,r))}return r}function Wl(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function am(r){var s=r._init;return s(r._payload)}function um(r){function s(G,B){if(r){var J=G.deletions;J===null?(G.deletions=[B],G.flags|=16):J.push(B)}}function c(G,B){if(!r)return null;for(;B!==null;)s(G,B),B=B.sibling;return null}function f(G,B){for(G=new Map;B!==null;)B.key!==null?G.set(B.key,B):G.set(B.index,B),B=B.sibling;return G}function y(G,B){return G=po(G,B),G.index=0,G.sibling=null,G}function w(G,B,J){return G.index=J,r?(J=G.alternate,J!==null?(J=J.index,J<B?(G.flags|=2,B):J):(G.flags|=2,B)):(G.flags|=1048576,B)}function j(G){return r&&G.alternate===null&&(G.flags|=2),G}function M(G,B,J,ce){return B===null||B.tag!==6?(B=hd(J,G.mode,ce),B.return=G,B):(B=y(B,J),B.return=G,B)}function z(G,B,J,ce){var ke=J.type;return ke===$?se(G,B,J.props.children,ce,J.key):B!==null&&(B.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===D&&am(ke)===B.type)?(ce=y(B,J.props),ce.ref=pi(G,B,J),ce.return=G,ce):(ce=ha(J.type,J.key,J.props,null,G.mode,ce),ce.ref=pi(G,B,J),ce.return=G,ce)}function ne(G,B,J,ce){return B===null||B.tag!==4||B.stateNode.containerInfo!==J.containerInfo||B.stateNode.implementation!==J.implementation?(B=md(J,G.mode,ce),B.return=G,B):(B=y(B,J.children||[]),B.return=G,B)}function se(G,B,J,ce,ke){return B===null||B.tag!==7?(B=Fo(J,G.mode,ce,ke),B.return=G,B):(B=y(B,J),B.return=G,B)}function ie(G,B,J){if(typeof B=="string"&&B!==""||typeof B=="number")return B=hd(""+B,G.mode,J),B.return=G,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return J=ha(B.type,B.key,B.props,null,G.mode,J),J.ref=pi(G,null,B),J.return=G,J;case P:return B=md(B,G.mode,J),B.return=G,B;case D:var ce=B._init;return ie(G,ce(B._payload),J)}if(et(B)||te(B))return B=Fo(B,G.mode,J,null),B.return=G,B;Wl(G,B)}return null}function oe(G,B,J,ce){var ke=B!==null?B.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return ke!==null?null:M(G,B,""+J,ce);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case O:return J.key===ke?z(G,B,J,ce):null;case P:return J.key===ke?ne(G,B,J,ce):null;case D:return ke=J._init,oe(G,B,ke(J._payload),ce)}if(et(J)||te(J))return ke!==null?null:se(G,B,J,ce,null);Wl(G,J)}return null}function he(G,B,J,ce,ke){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return G=G.get(J)||null,M(B,G,""+ce,ke);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case O:return G=G.get(ce.key===null?J:ce.key)||null,z(B,G,ce,ke);case P:return G=G.get(ce.key===null?J:ce.key)||null,ne(B,G,ce,ke);case D:var Ne=ce._init;return he(G,B,J,Ne(ce._payload),ke)}if(et(ce)||te(ce))return G=G.get(J)||null,se(B,G,ce,ke,null);Wl(B,ce)}return null}function ye(G,B,J,ce){for(var ke=null,Ne=null,Ee=B,Pe=B=0,$t=null;Ee!==null&&Pe<J.length;Pe++){Ee.index>Pe?($t=Ee,Ee=null):$t=Ee.sibling;var He=oe(G,Ee,J[Pe],ce);if(He===null){Ee===null&&(Ee=$t);break}r&&Ee&&He.alternate===null&&s(G,Ee),B=w(He,B,Pe),Ne===null?ke=He:Ne.sibling=He,Ne=He,Ee=$t}if(Pe===J.length)return c(G,Ee),st&&Ao(G,Pe),ke;if(Ee===null){for(;Pe<J.length;Pe++)Ee=ie(G,J[Pe],ce),Ee!==null&&(B=w(Ee,B,Pe),Ne===null?ke=Ee:Ne.sibling=Ee,Ne=Ee);return st&&Ao(G,Pe),ke}for(Ee=f(G,Ee);Pe<J.length;Pe++)$t=he(Ee,G,Pe,J[Pe],ce),$t!==null&&(r&&$t.alternate!==null&&Ee.delete($t.key===null?Pe:$t.key),B=w($t,B,Pe),Ne===null?ke=$t:Ne.sibling=$t,Ne=$t);return r&&Ee.forEach(function(ho){return s(G,ho)}),st&&Ao(G,Pe),ke}function be(G,B,J,ce){var ke=te(J);if(typeof ke!="function")throw Error(n(150));if(J=ke.call(J),J==null)throw Error(n(151));for(var Ne=ke=null,Ee=B,Pe=B=0,$t=null,He=J.next();Ee!==null&&!He.done;Pe++,He=J.next()){Ee.index>Pe?($t=Ee,Ee=null):$t=Ee.sibling;var ho=oe(G,Ee,He.value,ce);if(ho===null){Ee===null&&(Ee=$t);break}r&&Ee&&ho.alternate===null&&s(G,Ee),B=w(ho,B,Pe),Ne===null?ke=ho:Ne.sibling=ho,Ne=ho,Ee=$t}if(He.done)return c(G,Ee),st&&Ao(G,Pe),ke;if(Ee===null){for(;!He.done;Pe++,He=J.next())He=ie(G,He.value,ce),He!==null&&(B=w(He,B,Pe),Ne===null?ke=He:Ne.sibling=He,Ne=He);return st&&Ao(G,Pe),ke}for(Ee=f(G,Ee);!He.done;Pe++,He=J.next())He=he(Ee,G,Pe,He.value,ce),He!==null&&(r&&He.alternate!==null&&Ee.delete(He.key===null?Pe:He.key),B=w(He,B,Pe),Ne===null?ke=He:Ne.sibling=He,Ne=He);return r&&Ee.forEach(function(tS){return s(G,tS)}),st&&Ao(G,Pe),ke}function yt(G,B,J,ce){if(typeof J=="object"&&J!==null&&J.type===$&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case O:e:{for(var ke=J.key,Ne=B;Ne!==null;){if(Ne.key===ke){if(ke=J.type,ke===$){if(Ne.tag===7){c(G,Ne.sibling),B=y(Ne,J.props.children),B.return=G,G=B;break e}}else if(Ne.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===D&&am(ke)===Ne.type){c(G,Ne.sibling),B=y(Ne,J.props),B.ref=pi(G,Ne,J),B.return=G,G=B;break e}c(G,Ne);break}else s(G,Ne);Ne=Ne.sibling}J.type===$?(B=Fo(J.props.children,G.mode,ce,J.key),B.return=G,G=B):(ce=ha(J.type,J.key,J.props,null,G.mode,ce),ce.ref=pi(G,B,J),ce.return=G,G=ce)}return j(G);case P:e:{for(Ne=J.key;B!==null;){if(B.key===Ne)if(B.tag===4&&B.stateNode.containerInfo===J.containerInfo&&B.stateNode.implementation===J.implementation){c(G,B.sibling),B=y(B,J.children||[]),B.return=G,G=B;break e}else{c(G,B);break}else s(G,B);B=B.sibling}B=md(J,G.mode,ce),B.return=G,G=B}return j(G);case D:return Ne=J._init,yt(G,B,Ne(J._payload),ce)}if(et(J))return ye(G,B,J,ce);if(te(J))return be(G,B,J,ce);Wl(G,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,B!==null&&B.tag===6?(c(G,B.sibling),B=y(B,J),B.return=G,G=B):(c(G,B),B=hd(J,G.mode,ce),B.return=G,G=B),j(G)):c(G,B)}return yt}var ls=um(!0),cm=um(!1),Vl=no(null),ql=null,as=null,jc=null;function Cc(){jc=as=ql=null}function Nc(r){var s=Vl.current;nt(Vl),r._currentValue=s}function Ec(r,s,c){for(;r!==null;){var f=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),r===c)break;r=r.return}}function us(r,s){ql=r,jc=as=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(yn=!0),r.firstContext=null)}function Hn(r){var s=r._currentValue;if(jc!==r)if(r={context:r,memoizedValue:s,next:null},as===null){if(ql===null)throw Error(n(308));as=r,ql.dependencies={lanes:0,firstContext:r}}else as=as.next=r;return s}var Do=null;function Rc(r){Do===null?Do=[r]:Do.push(r)}function dm(r,s,c,f){var y=s.interleaved;return y===null?(c.next=c,Rc(s)):(c.next=y.next,y.next=c),s.interleaved=c,Mr(r,f)}function Mr(r,s){r.lanes|=s;var c=r.alternate;for(c!==null&&(c.lanes|=s),c=r,r=r.return;r!==null;)r.childLanes|=s,c=r.alternate,c!==null&&(c.childLanes|=s),c=r,r=r.return;return c.tag===3?c.stateNode:null}var so=!1;function Pc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fm(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function $r(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function io(r,s,c){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(Ue&2)!==0){var y=f.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),f.pending=s,Mr(r,c)}return y=f.interleaved,y===null?(s.next=s,Rc(f)):(s.next=y.next,y.next=s),f.interleaved=s,Mr(r,c)}function Kl(r,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var f=s.lanes;f&=r.pendingLanes,c|=f,s.lanes=c,Hu(r,c)}}function pm(r,s){var c=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var y=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var j={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?y=w=j:w=w.next=j,c=c.next}while(c!==null);w===null?y=w=s:w=w.next=s}else y=w=s;c={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:f.shared,effects:f.effects},r.updateQueue=c;return}r=c.lastBaseUpdate,r===null?c.firstBaseUpdate=s:r.next=s,c.lastBaseUpdate=s}function Gl(r,s,c,f){var y=r.updateQueue;so=!1;var w=y.firstBaseUpdate,j=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var z=M,ne=z.next;z.next=null,j===null?w=ne:j.next=ne,j=z;var se=r.alternate;se!==null&&(se=se.updateQueue,M=se.lastBaseUpdate,M!==j&&(M===null?se.firstBaseUpdate=ne:M.next=ne,se.lastBaseUpdate=z))}if(w!==null){var ie=y.baseState;j=0,se=ne=z=null,M=w;do{var oe=M.lane,he=M.eventTime;if((f&oe)===oe){se!==null&&(se=se.next={eventTime:he,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var ye=r,be=M;switch(oe=s,he=c,be.tag){case 1:if(ye=be.payload,typeof ye=="function"){ie=ye.call(he,ie,oe);break e}ie=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=be.payload,oe=typeof ye=="function"?ye.call(he,ie,oe):ye,oe==null)break e;ie=R({},ie,oe);break e;case 2:so=!0}}M.callback!==null&&M.lane!==0&&(r.flags|=64,oe=y.effects,oe===null?y.effects=[M]:oe.push(M))}else he={eventTime:he,lane:oe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},se===null?(ne=se=he,z=ie):se=se.next=he,j|=oe;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;oe=M,M=oe.next,oe.next=null,y.lastBaseUpdate=oe,y.shared.pending=null}}while(!0);if(se===null&&(z=ie),y.baseState=z,y.firstBaseUpdate=ne,y.lastBaseUpdate=se,s=y.shared.interleaved,s!==null){y=s;do j|=y.lane,y=y.next;while(y!==s)}else w===null&&(y.shared.lanes=0);Oo|=j,r.lanes=j,r.memoizedState=ie}}function hm(r,s,c){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var f=r[s],y=f.callback;if(y!==null){if(f.callback=null,f=c,typeof y!="function")throw Error(n(191,y));y.call(f)}}}var hi={},mr=no(hi),mi=no(hi),gi=no(hi);function Lo(r){if(r===hi)throw Error(n(174));return r}function Tc(r,s){switch(Ye(gi,s),Ye(mi,r),Ye(mr,hi),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:K(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=K(s,r)}nt(mr),Ye(mr,s)}function cs(){nt(mr),nt(mi),nt(gi)}function mm(r){Lo(gi.current);var s=Lo(mr.current),c=K(s,r.type);s!==c&&(Ye(mi,r),Ye(mr,c))}function Ac(r){mi.current===r&&(nt(mr),nt(mi))}var ct=no(0);function Yl(r){for(var s=r;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Dc=[];function Lc(){for(var r=0;r<Dc.length;r++)Dc[r]._workInProgressVersionPrimary=null;Dc.length=0}var Xl=_.ReactCurrentDispatcher,Ic=_.ReactCurrentBatchConfig,Io=0,dt=null,Et=null,_t=null,Ql=!1,xi=!1,yi=0,Sk=0;function Zt(){throw Error(n(321))}function Oc(r,s){if(s===null)return!1;for(var c=0;c<s.length&&c<r.length;c++)if(!Zn(r[c],s[c]))return!1;return!0}function _c(r,s,c,f,y,w){if(Io=w,dt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Xl.current=r===null||r.memoizedState===null?Ek:Rk,r=c(f,y),xi){w=0;do{if(xi=!1,yi=0,25<=w)throw Error(n(301));w+=1,_t=Et=null,s.updateQueue=null,Xl.current=Pk,r=c(f,y)}while(xi)}if(Xl.current=ea,s=Et!==null&&Et.next!==null,Io=0,_t=Et=dt=null,Ql=!1,s)throw Error(n(300));return r}function Mc(){var r=yi!==0;return yi=0,r}function gr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?dt.memoizedState=_t=r:_t=_t.next=r,_t}function Wn(){if(Et===null){var r=dt.alternate;r=r!==null?r.memoizedState:null}else r=Et.next;var s=_t===null?dt.memoizedState:_t.next;if(s!==null)_t=s,Et=r;else{if(r===null)throw Error(n(310));Et=r,r={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},_t===null?dt.memoizedState=_t=r:_t=_t.next=r}return _t}function vi(r,s){return typeof s=="function"?s(r):s}function $c(r){var s=Wn(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=r;var f=Et,y=f.baseQueue,w=c.pending;if(w!==null){if(y!==null){var j=y.next;y.next=w.next,w.next=j}f.baseQueue=y=w,c.pending=null}if(y!==null){w=y.next,f=f.baseState;var M=j=null,z=null,ne=w;do{var se=ne.lane;if((Io&se)===se)z!==null&&(z=z.next={lane:0,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),f=ne.hasEagerState?ne.eagerState:r(f,ne.action);else{var ie={lane:se,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null};z===null?(M=z=ie,j=f):z=z.next=ie,dt.lanes|=se,Oo|=se}ne=ne.next}while(ne!==null&&ne!==w);z===null?j=f:z.next=M,Zn(f,s.memoizedState)||(yn=!0),s.memoizedState=f,s.baseState=j,s.baseQueue=z,c.lastRenderedState=f}if(r=c.interleaved,r!==null){y=r;do w=y.lane,dt.lanes|=w,Oo|=w,y=y.next;while(y!==r)}else y===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Fc(r){var s=Wn(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=r;var f=c.dispatch,y=c.pending,w=s.memoizedState;if(y!==null){c.pending=null;var j=y=y.next;do w=r(w,j.action),j=j.next;while(j!==y);Zn(w,s.memoizedState)||(yn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),c.lastRenderedState=w}return[w,f]}function gm(){}function xm(r,s){var c=dt,f=Wn(),y=s(),w=!Zn(f.memoizedState,y);if(w&&(f.memoizedState=y,yn=!0),f=f.queue,zc(bm.bind(null,c,f,r),[r]),f.getSnapshot!==s||w||_t!==null&&_t.memoizedState.tag&1){if(c.flags|=2048,bi(9,vm.bind(null,c,f,y,s),void 0,null),Mt===null)throw Error(n(349));(Io&30)!==0||ym(c,s,y)}return y}function ym(r,s,c){r.flags|=16384,r={getSnapshot:s,value:c},s=dt.updateQueue,s===null?(s={lastEffect:null,stores:null},dt.updateQueue=s,s.stores=[r]):(c=s.stores,c===null?s.stores=[r]:c.push(r))}function vm(r,s,c,f){s.value=c,s.getSnapshot=f,wm(s)&&km(r)}function bm(r,s,c){return c(function(){wm(s)&&km(r)})}function wm(r){var s=r.getSnapshot;r=r.value;try{var c=s();return!Zn(r,c)}catch{return!0}}function km(r){var s=Mr(r,1);s!==null&&or(s,r,1,-1)}function Sm(r){var s=gr();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:r},s.queue=r,r=r.dispatch=Nk.bind(null,dt,r),[s.memoizedState,r]}function bi(r,s,c,f){return r={tag:r,create:s,destroy:c,deps:f,next:null},s=dt.updateQueue,s===null?(s={lastEffect:null,stores:null},dt.updateQueue=s,s.lastEffect=r.next=r):(c=s.lastEffect,c===null?s.lastEffect=r.next=r:(f=c.next,c.next=r,r.next=f,s.lastEffect=r)),r}function jm(){return Wn().memoizedState}function Jl(r,s,c,f){var y=gr();dt.flags|=r,y.memoizedState=bi(1|s,c,void 0,f===void 0?null:f)}function Zl(r,s,c,f){var y=Wn();f=f===void 0?null:f;var w=void 0;if(Et!==null){var j=Et.memoizedState;if(w=j.destroy,f!==null&&Oc(f,j.deps)){y.memoizedState=bi(s,c,w,f);return}}dt.flags|=r,y.memoizedState=bi(1|s,c,w,f)}function Cm(r,s){return Jl(8390656,8,r,s)}function zc(r,s){return Zl(2048,8,r,s)}function Nm(r,s){return Zl(4,2,r,s)}function Em(r,s){return Zl(4,4,r,s)}function Rm(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function Pm(r,s,c){return c=c!=null?c.concat([r]):null,Zl(4,4,Rm.bind(null,s,r),c)}function Bc(){}function Tm(r,s){var c=Wn();s=s===void 0?null:s;var f=c.memoizedState;return f!==null&&s!==null&&Oc(s,f[1])?f[0]:(c.memoizedState=[r,s],r)}function Am(r,s){var c=Wn();s=s===void 0?null:s;var f=c.memoizedState;return f!==null&&s!==null&&Oc(s,f[1])?f[0]:(r=r(),c.memoizedState=[r,s],r)}function Dm(r,s,c){return(Io&21)===0?(r.baseState&&(r.baseState=!1,yn=!0),r.memoizedState=c):(Zn(c,s)||(c=ah(),dt.lanes|=c,Oo|=c,r.baseState=!0),s)}function jk(r,s){var c=qe;qe=c!==0&&4>c?c:4,r(!0);var f=Ic.transition;Ic.transition={};try{r(!1),s()}finally{qe=c,Ic.transition=f}}function Lm(){return Wn().memoizedState}function Ck(r,s,c){var f=co(r);if(c={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null},Im(r))Om(s,c);else if(c=dm(r,s,c,f),c!==null){var y=ln();or(c,r,f,y),_m(c,s,f)}}function Nk(r,s,c){var f=co(r),y={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null};if(Im(r))Om(s,y);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var j=s.lastRenderedState,M=w(j,c);if(y.hasEagerState=!0,y.eagerState=M,Zn(M,j)){var z=s.interleaved;z===null?(y.next=y,Rc(s)):(y.next=z.next,z.next=y),s.interleaved=y;return}}catch{}finally{}c=dm(r,s,y,f),c!==null&&(y=ln(),or(c,r,f,y),_m(c,s,f))}}function Im(r){var s=r.alternate;return r===dt||s!==null&&s===dt}function Om(r,s){xi=Ql=!0;var c=r.pending;c===null?s.next=s:(s.next=c.next,c.next=s),r.pending=s}function _m(r,s,c){if((c&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,c|=f,s.lanes=c,Hu(r,c)}}var ea={readContext:Hn,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useInsertionEffect:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useSyncExternalStore:Zt,useId:Zt,unstable_isNewReconciler:!1},Ek={readContext:Hn,useCallback:function(r,s){return gr().memoizedState=[r,s===void 0?null:s],r},useContext:Hn,useEffect:Cm,useImperativeHandle:function(r,s,c){return c=c!=null?c.concat([r]):null,Jl(4194308,4,Rm.bind(null,s,r),c)},useLayoutEffect:function(r,s){return Jl(4194308,4,r,s)},useInsertionEffect:function(r,s){return Jl(4,2,r,s)},useMemo:function(r,s){var c=gr();return s=s===void 0?null:s,r=r(),c.memoizedState=[r,s],r},useReducer:function(r,s,c){var f=gr();return s=c!==void 0?c(s):s,f.memoizedState=f.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},f.queue=r,r=r.dispatch=Ck.bind(null,dt,r),[f.memoizedState,r]},useRef:function(r){var s=gr();return r={current:r},s.memoizedState=r},useState:Sm,useDebugValue:Bc,useDeferredValue:function(r){return gr().memoizedState=r},useTransition:function(){var r=Sm(!1),s=r[0];return r=jk.bind(null,r[1]),gr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,c){var f=dt,y=gr();if(st){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Mt===null)throw Error(n(349));(Io&30)!==0||ym(f,s,c)}y.memoizedState=c;var w={value:c,getSnapshot:s};return y.queue=w,Cm(bm.bind(null,f,w,r),[r]),f.flags|=2048,bi(9,vm.bind(null,f,w,c,s),void 0,null),c},useId:function(){var r=gr(),s=Mt.identifierPrefix;if(st){var c=_r,f=Or;c=(f&~(1<<32-Jn(f)-1)).toString(32)+c,s=":"+s+"R"+c,c=yi++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=Sk++,s=":"+s+"r"+c.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},Rk={readContext:Hn,useCallback:Tm,useContext:Hn,useEffect:zc,useImperativeHandle:Pm,useInsertionEffect:Nm,useLayoutEffect:Em,useMemo:Am,useReducer:$c,useRef:jm,useState:function(){return $c(vi)},useDebugValue:Bc,useDeferredValue:function(r){var s=Wn();return Dm(s,Et.memoizedState,r)},useTransition:function(){var r=$c(vi)[0],s=Wn().memoizedState;return[r,s]},useMutableSource:gm,useSyncExternalStore:xm,useId:Lm,unstable_isNewReconciler:!1},Pk={readContext:Hn,useCallback:Tm,useContext:Hn,useEffect:zc,useImperativeHandle:Pm,useInsertionEffect:Nm,useLayoutEffect:Em,useMemo:Am,useReducer:Fc,useRef:jm,useState:function(){return Fc(vi)},useDebugValue:Bc,useDeferredValue:function(r){var s=Wn();return Et===null?s.memoizedState=r:Dm(s,Et.memoizedState,r)},useTransition:function(){var r=Fc(vi)[0],s=Wn().memoizedState;return[r,s]},useMutableSource:gm,useSyncExternalStore:xm,useId:Lm,unstable_isNewReconciler:!1};function tr(r,s){if(r&&r.defaultProps){s=R({},s),r=r.defaultProps;for(var c in r)s[c]===void 0&&(s[c]=r[c]);return s}return s}function Uc(r,s,c,f){s=r.memoizedState,c=c(f,s),c=c==null?s:R({},s,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var ta={isMounted:function(r){return(r=r._reactInternals)?Eo(r)===r:!1},enqueueSetState:function(r,s,c){r=r._reactInternals;var f=ln(),y=co(r),w=$r(f,y);w.payload=s,c!=null&&(w.callback=c),s=io(r,w,y),s!==null&&(or(s,r,y,f),Kl(s,r,y))},enqueueReplaceState:function(r,s,c){r=r._reactInternals;var f=ln(),y=co(r),w=$r(f,y);w.tag=1,w.payload=s,c!=null&&(w.callback=c),s=io(r,w,y),s!==null&&(or(s,r,y,f),Kl(s,r,y))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var c=ln(),f=co(r),y=$r(c,f);y.tag=2,s!=null&&(y.callback=s),s=io(r,y,f),s!==null&&(or(s,r,f,c),Kl(s,r,f))}};function Mm(r,s,c,f,y,w,j){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,w,j):s.prototype&&s.prototype.isPureReactComponent?!ii(c,f)||!ii(y,w):!0}function $m(r,s,c){var f=!1,y=ro,w=s.contextType;return typeof w=="object"&&w!==null?w=Hn(w):(y=xn(s)?Po:Jt.current,f=s.contextTypes,w=(f=f!=null)?rs(r,y):ro),s=new s(c,w),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ta,r.stateNode=s,s._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=y,r.__reactInternalMemoizedMaskedChildContext=w),s}function Fm(r,s,c,f){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,f),s.state!==r&&ta.enqueueReplaceState(s,s.state,null)}function Hc(r,s,c,f){var y=r.stateNode;y.props=c,y.state=r.memoizedState,y.refs={},Pc(r);var w=s.contextType;typeof w=="object"&&w!==null?y.context=Hn(w):(w=xn(s)?Po:Jt.current,y.context=rs(r,w)),y.state=r.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Uc(r,s,w,c),y.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(s=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),s!==y.state&&ta.enqueueReplaceState(y,y.state,null),Gl(r,c,y,f),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function ds(r,s){try{var c="",f=s;do c+=ge(f),f=f.return;while(f);var y=c}catch(w){y=`
39
- Error generating stack: `+w.message+`
40
- `+w.stack}return{value:r,source:s,stack:y,digest:null}}function Wc(r,s,c){return{value:r,source:null,stack:c??null,digest:s??null}}function Vc(r,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var Tk=typeof WeakMap=="function"?WeakMap:Map;function zm(r,s,c){c=$r(-1,c),c.tag=3,c.payload={element:null};var f=s.value;return c.callback=function(){aa||(aa=!0,id=f),Vc(r,s)},c}function Bm(r,s,c){c=$r(-1,c),c.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var y=s.value;c.payload=function(){return f(y)},c.callback=function(){Vc(r,s)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(c.callback=function(){Vc(r,s),typeof f!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var j=s.stack;this.componentDidCatch(s.value,{componentStack:j!==null?j:""})}),c}function Um(r,s,c){var f=r.pingCache;if(f===null){f=r.pingCache=new Tk;var y=new Set;f.set(s,y)}else y=f.get(s),y===void 0&&(y=new Set,f.set(s,y));y.has(c)||(y.add(c),r=Wk.bind(null,r,s,c),s.then(r,r))}function Hm(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function Wm(r,s,c,f,y){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=$r(-1,1),s.tag=2,io(c,s,1))),c.lanes|=1),r):(r.flags|=65536,r.lanes=y,r)}var Ak=_.ReactCurrentOwner,yn=!1;function sn(r,s,c,f){s.child=r===null?cm(s,null,c,f):ls(s,r.child,c,f)}function Vm(r,s,c,f,y){c=c.render;var w=s.ref;return us(s,y),f=_c(r,s,c,f,w,y),c=Mc(),r!==null&&!yn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(st&&c&&vc(s),s.flags|=1,sn(r,s,f,y),s.child)}function qm(r,s,c,f,y){if(r===null){var w=c.type;return typeof w=="function"&&!pd(w)&&w.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=w,Km(r,s,w,f,y)):(r=ha(c.type,null,f,s,s.mode,y),r.ref=s.ref,r.return=s,s.child=r)}if(w=r.child,(r.lanes&y)===0){var j=w.memoizedProps;if(c=c.compare,c=c!==null?c:ii,c(j,f)&&r.ref===s.ref)return Fr(r,s,y)}return s.flags|=1,r=po(w,f),r.ref=s.ref,r.return=s,s.child=r}function Km(r,s,c,f,y){if(r!==null){var w=r.memoizedProps;if(ii(w,f)&&r.ref===s.ref)if(yn=!1,s.pendingProps=f=w,(r.lanes&y)!==0)(r.flags&131072)!==0&&(yn=!0);else return s.lanes=r.lanes,Fr(r,s,y)}return qc(r,s,c,f,y)}function Gm(r,s,c){var f=s.pendingProps,y=f.children,w=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ye(ps,In),In|=c;else{if((c&1073741824)===0)return r=w!==null?w.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,Ye(ps,In),In|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=w!==null?w.baseLanes:c,Ye(ps,In),In|=f}else w!==null?(f=w.baseLanes|c,s.memoizedState=null):f=c,Ye(ps,In),In|=f;return sn(r,s,y,c),s.child}function Ym(r,s){var c=s.ref;(r===null&&c!==null||r!==null&&r.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function qc(r,s,c,f,y){var w=xn(c)?Po:Jt.current;return w=rs(s,w),us(s,y),c=_c(r,s,c,f,w,y),f=Mc(),r!==null&&!yn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(st&&f&&vc(s),s.flags|=1,sn(r,s,c,y),s.child)}function Xm(r,s,c,f,y){if(xn(c)){var w=!0;Fl(s)}else w=!1;if(us(s,y),s.stateNode===null)ra(r,s),$m(s,c,f),Hc(s,c,f,y),f=!0;else if(r===null){var j=s.stateNode,M=s.memoizedProps;j.props=M;var z=j.context,ne=c.contextType;typeof ne=="object"&&ne!==null?ne=Hn(ne):(ne=xn(c)?Po:Jt.current,ne=rs(s,ne));var se=c.getDerivedStateFromProps,ie=typeof se=="function"||typeof j.getSnapshotBeforeUpdate=="function";ie||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(M!==f||z!==ne)&&Fm(s,j,f,ne),so=!1;var oe=s.memoizedState;j.state=oe,Gl(s,f,j,y),z=s.memoizedState,M!==f||oe!==z||gn.current||so?(typeof se=="function"&&(Uc(s,c,se,f),z=s.memoizedState),(M=so||Mm(s,c,M,f,oe,z,ne))?(ie||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=z),j.props=f,j.state=z,j.context=ne,f=M):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{j=s.stateNode,fm(r,s),M=s.memoizedProps,ne=s.type===s.elementType?M:tr(s.type,M),j.props=ne,ie=s.pendingProps,oe=j.context,z=c.contextType,typeof z=="object"&&z!==null?z=Hn(z):(z=xn(c)?Po:Jt.current,z=rs(s,z));var he=c.getDerivedStateFromProps;(se=typeof he=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(M!==ie||oe!==z)&&Fm(s,j,f,z),so=!1,oe=s.memoizedState,j.state=oe,Gl(s,f,j,y);var ye=s.memoizedState;M!==ie||oe!==ye||gn.current||so?(typeof he=="function"&&(Uc(s,c,he,f),ye=s.memoizedState),(ne=so||Mm(s,c,ne,f,oe,ye,z)||!1)?(se||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(f,ye,z),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(f,ye,z)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=ye),j.props=f,j.state=ye,j.context=z,f=ne):(typeof j.componentDidUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=1024),f=!1)}return Kc(r,s,c,f,w,y)}function Kc(r,s,c,f,y,w){Ym(r,s);var j=(s.flags&128)!==0;if(!f&&!j)return y&&tm(s,c,!1),Fr(r,s,w);f=s.stateNode,Ak.current=s;var M=j&&typeof c.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,r!==null&&j?(s.child=ls(s,r.child,null,w),s.child=ls(s,null,M,w)):sn(r,s,M,w),s.memoizedState=f.state,y&&tm(s,c,!0),s.child}function Qm(r){var s=r.stateNode;s.pendingContext?Zh(r,s.pendingContext,s.pendingContext!==s.context):s.context&&Zh(r,s.context,!1),Tc(r,s.containerInfo)}function Jm(r,s,c,f,y){return is(),Sc(y),s.flags|=256,sn(r,s,c,f),s.child}var Gc={dehydrated:null,treeContext:null,retryLane:0};function Yc(r){return{baseLanes:r,cachePool:null,transitions:null}}function Zm(r,s,c){var f=s.pendingProps,y=ct.current,w=!1,j=(s.flags&128)!==0,M;if((M=j)||(M=r!==null&&r.memoizedState===null?!1:(y&2)!==0),M?(w=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(y|=1),Ye(ct,y&1),r===null)return kc(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(j=f.children,r=f.fallback,w?(f=s.mode,w=s.child,j={mode:"hidden",children:j},(f&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=j):w=ma(j,f,0,null),r=Fo(r,f,c,null),w.return=s,r.return=s,w.sibling=r,s.child=w,s.child.memoizedState=Yc(c),s.memoizedState=Gc,r):Xc(s,j));if(y=r.memoizedState,y!==null&&(M=y.dehydrated,M!==null))return Dk(r,s,j,f,M,y,c);if(w){w=f.fallback,j=s.mode,y=r.child,M=y.sibling;var z={mode:"hidden",children:f.children};return(j&1)===0&&s.child!==y?(f=s.child,f.childLanes=0,f.pendingProps=z,s.deletions=null):(f=po(y,z),f.subtreeFlags=y.subtreeFlags&14680064),M!==null?w=po(M,w):(w=Fo(w,j,c,null),w.flags|=2),w.return=s,f.return=s,f.sibling=w,s.child=f,f=w,w=s.child,j=r.child.memoizedState,j=j===null?Yc(c):{baseLanes:j.baseLanes|c,cachePool:null,transitions:j.transitions},w.memoizedState=j,w.childLanes=r.childLanes&~c,s.memoizedState=Gc,f}return w=r.child,r=w.sibling,f=po(w,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=c),f.return=s,f.sibling=null,r!==null&&(c=s.deletions,c===null?(s.deletions=[r],s.flags|=16):c.push(r)),s.child=f,s.memoizedState=null,f}function Xc(r,s){return s=ma({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function na(r,s,c,f){return f!==null&&Sc(f),ls(s,r.child,null,c),r=Xc(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function Dk(r,s,c,f,y,w,j){if(c)return s.flags&256?(s.flags&=-257,f=Wc(Error(n(422))),na(r,s,j,f)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(w=f.fallback,y=s.mode,f=ma({mode:"visible",children:f.children},y,0,null),w=Fo(w,y,j,null),w.flags|=2,f.return=s,w.return=s,f.sibling=w,s.child=f,(s.mode&1)!==0&&ls(s,r.child,null,j),s.child.memoizedState=Yc(j),s.memoizedState=Gc,w);if((s.mode&1)===0)return na(r,s,j,null);if(y.data==="$!"){if(f=y.nextSibling&&y.nextSibling.dataset,f)var M=f.dgst;return f=M,w=Error(n(419)),f=Wc(w,f,void 0),na(r,s,j,f)}if(M=(j&r.childLanes)!==0,yn||M){if(f=Mt,f!==null){switch(j&-j){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(f.suspendedLanes|j))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,Mr(r,y),or(f,r,y,-1))}return fd(),f=Wc(Error(n(421))),na(r,s,j,f)}return y.data==="$?"?(s.flags|=128,s.child=r.child,s=Vk.bind(null,r),y._reactRetry=s,null):(r=w.treeContext,Ln=to(y.nextSibling),Dn=s,st=!0,er=null,r!==null&&(Bn[Un++]=Or,Bn[Un++]=_r,Bn[Un++]=To,Or=r.id,_r=r.overflow,To=s),s=Xc(s,f.children),s.flags|=4096,s)}function eg(r,s,c){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),Ec(r.return,s,c)}function Qc(r,s,c,f,y){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:y}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=c,w.tailMode=y)}function tg(r,s,c){var f=s.pendingProps,y=f.revealOrder,w=f.tail;if(sn(r,s,f.children,c),f=ct.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&eg(r,c,s);else if(r.tag===19)eg(r,c,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(Ye(ct,f),(s.mode&1)===0)s.memoizedState=null;else switch(y){case"forwards":for(c=s.child,y=null;c!==null;)r=c.alternate,r!==null&&Yl(r)===null&&(y=c),c=c.sibling;c=y,c===null?(y=s.child,s.child=null):(y=c.sibling,c.sibling=null),Qc(s,!1,y,c,w);break;case"backwards":for(c=null,y=s.child,s.child=null;y!==null;){if(r=y.alternate,r!==null&&Yl(r)===null){s.child=y;break}r=y.sibling,y.sibling=c,c=y,y=r}Qc(s,!0,c,null,w);break;case"together":Qc(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ra(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Fr(r,s,c){if(r!==null&&(s.dependencies=r.dependencies),Oo|=s.lanes,(c&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,c=po(r,r.pendingProps),s.child=c,c.return=s;r.sibling!==null;)r=r.sibling,c=c.sibling=po(r,r.pendingProps),c.return=s;c.sibling=null}return s.child}function Lk(r,s,c){switch(s.tag){case 3:Qm(s),is();break;case 5:mm(s);break;case 1:xn(s.type)&&Fl(s);break;case 4:Tc(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,y=s.memoizedProps.value;Ye(Vl,f._currentValue),f._currentValue=y;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(Ye(ct,ct.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?Zm(r,s,c):(Ye(ct,ct.current&1),r=Fr(r,s,c),r!==null?r.sibling:null);Ye(ct,ct.current&1);break;case 19:if(f=(c&s.childLanes)!==0,(r.flags&128)!==0){if(f)return tg(r,s,c);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Ye(ct,ct.current),f)break;return null;case 22:case 23:return s.lanes=0,Gm(r,s,c)}return Fr(r,s,c)}var ng,Jc,rg,og;ng=function(r,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)r.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Jc=function(){},rg=function(r,s,c,f){var y=r.memoizedProps;if(y!==f){r=s.stateNode,Lo(mr.current);var w=null;switch(c){case"input":y=ze(r,y),f=ze(r,f),w=[];break;case"select":y=R({},y,{value:void 0}),f=R({},f,{value:void 0}),w=[];break;case"textarea":y=Kt(r,y),f=Kt(r,f),w=[];break;default:typeof y.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=_l)}le(c,f);var j;c=null;for(ne in y)if(!f.hasOwnProperty(ne)&&y.hasOwnProperty(ne)&&y[ne]!=null)if(ne==="style"){var M=y[ne];for(j in M)M.hasOwnProperty(j)&&(c||(c={}),c[j]="")}else ne!=="dangerouslySetInnerHTML"&&ne!=="children"&&ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(i.hasOwnProperty(ne)?w||(w=[]):(w=w||[]).push(ne,null));for(ne in f){var z=f[ne];if(M=y!=null?y[ne]:void 0,f.hasOwnProperty(ne)&&z!==M&&(z!=null||M!=null))if(ne==="style")if(M){for(j in M)!M.hasOwnProperty(j)||z&&z.hasOwnProperty(j)||(c||(c={}),c[j]="");for(j in z)z.hasOwnProperty(j)&&M[j]!==z[j]&&(c||(c={}),c[j]=z[j])}else c||(w||(w=[]),w.push(ne,c)),c=z;else ne==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,M=M?M.__html:void 0,z!=null&&M!==z&&(w=w||[]).push(ne,z)):ne==="children"?typeof z!="string"&&typeof z!="number"||(w=w||[]).push(ne,""+z):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&(i.hasOwnProperty(ne)?(z!=null&&ne==="onScroll"&&tt("scroll",r),w||M===z||(w=[])):(w=w||[]).push(ne,z))}c&&(w=w||[]).push("style",c);var ne=w;(s.updateQueue=ne)&&(s.flags|=4)}},og=function(r,s,c,f){c!==f&&(s.flags|=4)};function wi(r,s){if(!st)switch(r.tailMode){case"hidden":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?r.tail=null:c.sibling=null;break;case"collapsed":c=r.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function en(r){var s=r.alternate!==null&&r.alternate.child===r.child,c=0,f=0;if(s)for(var y=r.child;y!==null;)c|=y.lanes|y.childLanes,f|=y.subtreeFlags&14680064,f|=y.flags&14680064,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)c|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=f,r.childLanes=c,s}function Ik(r,s,c){var f=s.pendingProps;switch(bc(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return en(s),null;case 1:return xn(s.type)&&$l(),en(s),null;case 3:return f=s.stateNode,cs(),nt(gn),nt(Jt),Lc(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(Hl(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,er!==null&&(ud(er),er=null))),Jc(r,s),en(s),null;case 5:Ac(s);var y=Lo(gi.current);if(c=s.type,r!==null&&s.stateNode!=null)rg(r,s,c,f,y),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return en(s),null}if(r=Lo(mr.current),Hl(s)){f=s.stateNode,c=s.type;var w=s.memoizedProps;switch(f[hr]=s,f[di]=w,r=(s.mode&1)!==0,c){case"dialog":tt("cancel",f),tt("close",f);break;case"iframe":case"object":case"embed":tt("load",f);break;case"video":case"audio":for(y=0;y<ai.length;y++)tt(ai[y],f);break;case"source":tt("error",f);break;case"img":case"image":case"link":tt("error",f),tt("load",f);break;case"details":tt("toggle",f);break;case"input":bt(f,w),tt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!w.multiple},tt("invalid",f);break;case"textarea":fn(f,w),tt("invalid",f)}le(c,w),y=null;for(var j in w)if(w.hasOwnProperty(j)){var M=w[j];j==="children"?typeof M=="string"?f.textContent!==M&&(w.suppressHydrationWarning!==!0&&Ol(f.textContent,M,r),y=["children",M]):typeof M=="number"&&f.textContent!==""+M&&(w.suppressHydrationWarning!==!0&&Ol(f.textContent,M,r),y=["children",""+M]):i.hasOwnProperty(j)&&M!=null&&j==="onScroll"&&tt("scroll",f)}switch(c){case"input":at(f),dn(f,w,!0);break;case"textarea":at(f),Pn(f);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(f.onclick=_l)}f=y,s.updateQueue=f,f!==null&&(s.flags|=4)}else{j=y.nodeType===9?y:y.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=re(c)),r==="http://www.w3.org/1999/xhtml"?c==="script"?(r=j.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=j.createElement(c,{is:f.is}):(r=j.createElement(c),c==="select"&&(j=r,f.multiple?j.multiple=!0:f.size&&(j.size=f.size))):r=j.createElementNS(r,c),r[hr]=s,r[di]=f,ng(r,s,!1,!1),s.stateNode=r;e:{switch(j=xe(c,f),c){case"dialog":tt("cancel",r),tt("close",r),y=f;break;case"iframe":case"object":case"embed":tt("load",r),y=f;break;case"video":case"audio":for(y=0;y<ai.length;y++)tt(ai[y],r);y=f;break;case"source":tt("error",r),y=f;break;case"img":case"image":case"link":tt("error",r),tt("load",r),y=f;break;case"details":tt("toggle",r),y=f;break;case"input":bt(r,f),y=ze(r,f),tt("invalid",r);break;case"option":y=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},y=R({},f,{value:void 0}),tt("invalid",r);break;case"textarea":fn(r,f),y=Kt(r,f),tt("invalid",r);break;default:y=f}le(c,y),M=y;for(w in M)if(M.hasOwnProperty(w)){var z=M[w];w==="style"?Bt(r,z):w==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&pe(r,z)):w==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&Ae(r,z):typeof z=="number"&&Ae(r,""+z):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?z!=null&&w==="onScroll"&&tt("scroll",r):z!=null&&A(r,w,z,j))}switch(c){case"input":at(r),dn(r,f,!1);break;case"textarea":at(r),Pn(r);break;case"option":f.value!=null&&r.setAttribute("value",""+Se(f.value));break;case"select":r.multiple=!!f.multiple,w=f.value,w!=null?zt(r,!!f.multiple,w,!1):f.defaultValue!=null&&zt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof y.onClick=="function"&&(r.onclick=_l)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return en(s),null;case 6:if(r&&s.stateNode!=null)og(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(c=Lo(gi.current),Lo(mr.current),Hl(s)){if(f=s.stateNode,c=s.memoizedProps,f[hr]=s,(w=f.nodeValue!==c)&&(r=Dn,r!==null))switch(r.tag){case 3:Ol(f.nodeValue,c,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ol(f.nodeValue,c,(r.mode&1)!==0)}w&&(s.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[hr]=s,s.stateNode=f}return en(s),null;case 13:if(nt(ct),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(st&&Ln!==null&&(s.mode&1)!==0&&(s.flags&128)===0)lm(),is(),s.flags|=98560,w=!1;else if(w=Hl(s),f!==null&&f.dehydrated!==null){if(r===null){if(!w)throw Error(n(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[hr]=s}else is(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;en(s),w=!1}else er!==null&&(ud(er),er=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(ct.current&1)!==0?Rt===0&&(Rt=3):fd())),s.updateQueue!==null&&(s.flags|=4),en(s),null);case 4:return cs(),Jc(r,s),r===null&&ui(s.stateNode.containerInfo),en(s),null;case 10:return Nc(s.type._context),en(s),null;case 17:return xn(s.type)&&$l(),en(s),null;case 19:if(nt(ct),w=s.memoizedState,w===null)return en(s),null;if(f=(s.flags&128)!==0,j=w.rendering,j===null)if(f)wi(w,!1);else{if(Rt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(j=Yl(r),j!==null){for(s.flags|=128,wi(w,!1),f=j.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=c,c=s.child;c!==null;)w=c,r=f,w.flags&=14680066,j=w.alternate,j===null?(w.childLanes=0,w.lanes=r,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=j.childLanes,w.lanes=j.lanes,w.child=j.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=j.memoizedProps,w.memoizedState=j.memoizedState,w.updateQueue=j.updateQueue,w.type=j.type,r=j.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),c=c.sibling;return Ye(ct,ct.current&1|2),s.child}r=r.sibling}w.tail!==null&&xt()>hs&&(s.flags|=128,f=!0,wi(w,!1),s.lanes=4194304)}else{if(!f)if(r=Yl(j),r!==null){if(s.flags|=128,f=!0,c=r.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),wi(w,!0),w.tail===null&&w.tailMode==="hidden"&&!j.alternate&&!st)return en(s),null}else 2*xt()-w.renderingStartTime>hs&&c!==1073741824&&(s.flags|=128,f=!0,wi(w,!1),s.lanes=4194304);w.isBackwards?(j.sibling=s.child,s.child=j):(c=w.last,c!==null?c.sibling=j:s.child=j,w.last=j)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=xt(),s.sibling=null,c=ct.current,Ye(ct,f?c&1|2:c&1),s):(en(s),null);case 22:case 23:return dd(),f=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(In&1073741824)!==0&&(en(s),s.subtreeFlags&6&&(s.flags|=8192)):en(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function Ok(r,s){switch(bc(s),s.tag){case 1:return xn(s.type)&&$l(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return cs(),nt(gn),nt(Jt),Lc(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Ac(s),null;case 13:if(nt(ct),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));is()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return nt(ct),null;case 4:return cs(),null;case 10:return Nc(s.type._context),null;case 22:case 23:return dd(),null;case 24:return null;default:return null}}var oa=!1,tn=!1,_k=typeof WeakSet=="function"?WeakSet:Set,me=null;function fs(r,s){var c=r.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){ht(r,s,f)}else c.current=null}function Zc(r,s,c){try{c()}catch(f){ht(r,s,f)}}var sg=!1;function Mk(r,s){if(dc=jl,r=Mh(),rc(r)){if("selectionStart"in r)var c={start:r.selectionStart,end:r.selectionEnd};else e:{c=(c=r.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var y=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var j=0,M=-1,z=-1,ne=0,se=0,ie=r,oe=null;t:for(;;){for(var he;ie!==c||y!==0&&ie.nodeType!==3||(M=j+y),ie!==w||f!==0&&ie.nodeType!==3||(z=j+f),ie.nodeType===3&&(j+=ie.nodeValue.length),(he=ie.firstChild)!==null;)oe=ie,ie=he;for(;;){if(ie===r)break t;if(oe===c&&++ne===y&&(M=j),oe===w&&++se===f&&(z=j),(he=ie.nextSibling)!==null)break;ie=oe,oe=ie.parentNode}ie=he}c=M===-1||z===-1?null:{start:M,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(fc={focusedElem:r,selectionRange:c},jl=!1,me=s;me!==null;)if(s=me,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,me=r;else for(;me!==null;){s=me;try{var ye=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var be=ye.memoizedProps,yt=ye.memoizedState,G=s.stateNode,B=G.getSnapshotBeforeUpdate(s.elementType===s.type?be:tr(s.type,be),yt);G.__reactInternalSnapshotBeforeUpdate=B}break;case 3:var J=s.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){ht(s,s.return,ce)}if(r=s.sibling,r!==null){r.return=s.return,me=r;break}me=s.return}return ye=sg,sg=!1,ye}function ki(r,s,c){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&r)===r){var w=y.destroy;y.destroy=void 0,w!==void 0&&Zc(s,c,w)}y=y.next}while(y!==f)}}function sa(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&r)===r){var f=c.create;c.destroy=f()}c=c.next}while(c!==s)}}function ed(r){var s=r.ref;if(s!==null){var c=r.stateNode;switch(r.tag){case 5:r=c;break;default:r=c}typeof s=="function"?s(r):s.current=r}}function ig(r){var s=r.alternate;s!==null&&(r.alternate=null,ig(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[hr],delete s[di],delete s[gc],delete s[vk],delete s[bk])),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 lg(r){return r.tag===5||r.tag===3||r.tag===4}function ag(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||lg(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 td(r,s,c){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(r,s):c.insertBefore(r,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(r,c)):(s=c,s.appendChild(r)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=_l));else if(f!==4&&(r=r.child,r!==null))for(td(r,s,c),r=r.sibling;r!==null;)td(r,s,c),r=r.sibling}function nd(r,s,c){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?c.insertBefore(r,s):c.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(nd(r,s,c),r=r.sibling;r!==null;)nd(r,s,c),r=r.sibling}var Ht=null,nr=!1;function lo(r,s,c){for(c=c.child;c!==null;)ug(r,s,c),c=c.sibling}function ug(r,s,c){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(yl,c)}catch{}switch(c.tag){case 5:tn||fs(c,s);case 6:var f=Ht,y=nr;Ht=null,lo(r,s,c),Ht=f,nr=y,Ht!==null&&(nr?(r=Ht,c=c.stateNode,r.nodeType===8?r.parentNode.removeChild(c):r.removeChild(c)):Ht.removeChild(c.stateNode));break;case 18:Ht!==null&&(nr?(r=Ht,c=c.stateNode,r.nodeType===8?mc(r.parentNode,c):r.nodeType===1&&mc(r,c),ei(r)):mc(Ht,c.stateNode));break;case 4:f=Ht,y=nr,Ht=c.stateNode.containerInfo,nr=!0,lo(r,s,c),Ht=f,nr=y;break;case 0:case 11:case 14:case 15:if(!tn&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){y=f=f.next;do{var w=y,j=w.destroy;w=w.tag,j!==void 0&&((w&2)!==0||(w&4)!==0)&&Zc(c,s,j),y=y.next}while(y!==f)}lo(r,s,c);break;case 1:if(!tn&&(fs(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(M){ht(c,s,M)}lo(r,s,c);break;case 21:lo(r,s,c);break;case 22:c.mode&1?(tn=(f=tn)||c.memoizedState!==null,lo(r,s,c),tn=f):lo(r,s,c);break;default:lo(r,s,c)}}function cg(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var c=r.stateNode;c===null&&(c=r.stateNode=new _k),s.forEach(function(f){var y=qk.bind(null,r,f);c.has(f)||(c.add(f),f.then(y,y))})}}function rr(r,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var y=c[f];try{var w=r,j=s,M=j;e:for(;M!==null;){switch(M.tag){case 5:Ht=M.stateNode,nr=!1;break e;case 3:Ht=M.stateNode.containerInfo,nr=!0;break e;case 4:Ht=M.stateNode.containerInfo,nr=!0;break e}M=M.return}if(Ht===null)throw Error(n(160));ug(w,j,y),Ht=null,nr=!1;var z=y.alternate;z!==null&&(z.return=null),y.return=null}catch(ne){ht(y,s,ne)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)dg(s,r),s=s.sibling}function dg(r,s){var c=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(rr(s,r),xr(r),f&4){try{ki(3,r,r.return),sa(3,r)}catch(be){ht(r,r.return,be)}try{ki(5,r,r.return)}catch(be){ht(r,r.return,be)}}break;case 1:rr(s,r),xr(r),f&512&&c!==null&&fs(c,c.return);break;case 5:if(rr(s,r),xr(r),f&512&&c!==null&&fs(c,c.return),r.flags&32){var y=r.stateNode;try{Ae(y,"")}catch(be){ht(r,r.return,be)}}if(f&4&&(y=r.stateNode,y!=null)){var w=r.memoizedProps,j=c!==null?c.memoizedProps:w,M=r.type,z=r.updateQueue;if(r.updateQueue=null,z!==null)try{M==="input"&&w.type==="radio"&&w.name!=null&&It(y,w),xe(M,j);var ne=xe(M,w);for(j=0;j<z.length;j+=2){var se=z[j],ie=z[j+1];se==="style"?Bt(y,ie):se==="dangerouslySetInnerHTML"?pe(y,ie):se==="children"?Ae(y,ie):A(y,se,ie,ne)}switch(M){case"input":on(y,w);break;case"textarea":Rn(y,w);break;case"select":var oe=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var he=w.value;he!=null?zt(y,!!w.multiple,he,!1):oe!==!!w.multiple&&(w.defaultValue!=null?zt(y,!!w.multiple,w.defaultValue,!0):zt(y,!!w.multiple,w.multiple?[]:"",!1))}y[di]=w}catch(be){ht(r,r.return,be)}}break;case 6:if(rr(s,r),xr(r),f&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,w=r.memoizedProps;try{y.nodeValue=w}catch(be){ht(r,r.return,be)}}break;case 3:if(rr(s,r),xr(r),f&4&&c!==null&&c.memoizedState.isDehydrated)try{ei(s.containerInfo)}catch(be){ht(r,r.return,be)}break;case 4:rr(s,r),xr(r);break;case 13:rr(s,r),xr(r),y=r.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(sd=xt())),f&4&&cg(r);break;case 22:if(se=c!==null&&c.memoizedState!==null,r.mode&1?(tn=(ne=tn)||se,rr(s,r),tn=ne):rr(s,r),xr(r),f&8192){if(ne=r.memoizedState!==null,(r.stateNode.isHidden=ne)&&!se&&(r.mode&1)!==0)for(me=r,se=r.child;se!==null;){for(ie=me=se;me!==null;){switch(oe=me,he=oe.child,oe.tag){case 0:case 11:case 14:case 15:ki(4,oe,oe.return);break;case 1:fs(oe,oe.return);var ye=oe.stateNode;if(typeof ye.componentWillUnmount=="function"){f=oe,c=oe.return;try{s=f,ye.props=s.memoizedProps,ye.state=s.memoizedState,ye.componentWillUnmount()}catch(be){ht(f,c,be)}}break;case 5:fs(oe,oe.return);break;case 22:if(oe.memoizedState!==null){hg(ie);continue}}he!==null?(he.return=oe,me=he):hg(ie)}se=se.sibling}e:for(se=null,ie=r;;){if(ie.tag===5){if(se===null){se=ie;try{y=ie.stateNode,ne?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(M=ie.stateNode,z=ie.memoizedProps.style,j=z!=null&&z.hasOwnProperty("display")?z.display:null,M.style.display=Gt("display",j))}catch(be){ht(r,r.return,be)}}}else if(ie.tag===6){if(se===null)try{ie.stateNode.nodeValue=ne?"":ie.memoizedProps}catch(be){ht(r,r.return,be)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===r)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===r)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===r)break e;se===ie&&(se=null),ie=ie.return}se===ie&&(se=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:rr(s,r),xr(r),f&4&&cg(r);break;case 21:break;default:rr(s,r),xr(r)}}function xr(r){var s=r.flags;if(s&2){try{e:{for(var c=r.return;c!==null;){if(lg(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var y=f.stateNode;f.flags&32&&(Ae(y,""),f.flags&=-33);var w=ag(r);nd(r,w,y);break;case 3:case 4:var j=f.stateNode.containerInfo,M=ag(r);td(r,M,j);break;default:throw Error(n(161))}}catch(z){ht(r,r.return,z)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function $k(r,s,c){me=r,fg(r)}function fg(r,s,c){for(var f=(r.mode&1)!==0;me!==null;){var y=me,w=y.child;if(y.tag===22&&f){var j=y.memoizedState!==null||oa;if(!j){var M=y.alternate,z=M!==null&&M.memoizedState!==null||tn;M=oa;var ne=tn;if(oa=j,(tn=z)&&!ne)for(me=y;me!==null;)j=me,z=j.child,j.tag===22&&j.memoizedState!==null?mg(y):z!==null?(z.return=j,me=z):mg(y);for(;w!==null;)me=w,fg(w),w=w.sibling;me=y,oa=M,tn=ne}pg(r)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,me=w):pg(r)}}function pg(r){for(;me!==null;){var s=me;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:tn||sa(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!tn)if(c===null)f.componentDidMount();else{var y=s.elementType===s.type?c.memoizedProps:tr(s.type,c.memoizedProps);f.componentDidUpdate(y,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&hm(s,w,f);break;case 3:var j=s.updateQueue;if(j!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}hm(s,j,c)}break;case 5:var M=s.stateNode;if(c===null&&s.flags&4){c=M;var z=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var ne=s.alternate;if(ne!==null){var se=ne.memoizedState;if(se!==null){var ie=se.dehydrated;ie!==null&&ei(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}tn||s.flags&512&&ed(s)}catch(oe){ht(s,s.return,oe)}}if(s===r){me=null;break}if(c=s.sibling,c!==null){c.return=s.return,me=c;break}me=s.return}}function hg(r){for(;me!==null;){var s=me;if(s===r){me=null;break}var c=s.sibling;if(c!==null){c.return=s.return,me=c;break}me=s.return}}function mg(r){for(;me!==null;){var s=me;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{sa(4,s)}catch(z){ht(s,c,z)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var y=s.return;try{f.componentDidMount()}catch(z){ht(s,y,z)}}var w=s.return;try{ed(s)}catch(z){ht(s,w,z)}break;case 5:var j=s.return;try{ed(s)}catch(z){ht(s,j,z)}}}catch(z){ht(s,s.return,z)}if(s===r){me=null;break}var M=s.sibling;if(M!==null){M.return=s.return,me=M;break}me=s.return}}var Fk=Math.ceil,ia=_.ReactCurrentDispatcher,rd=_.ReactCurrentOwner,Vn=_.ReactCurrentBatchConfig,Ue=0,Mt=null,wt=null,Wt=0,In=0,ps=no(0),Rt=0,Si=null,Oo=0,la=0,od=0,ji=null,vn=null,sd=0,hs=1/0,zr=null,aa=!1,id=null,ao=null,ua=!1,uo=null,ca=0,Ci=0,ld=null,da=-1,fa=0;function ln(){return(Ue&6)!==0?xt():da!==-1?da:da=xt()}function co(r){return(r.mode&1)===0?1:(Ue&2)!==0&&Wt!==0?Wt&-Wt:kk.transition!==null?(fa===0&&(fa=ah()),fa):(r=qe,r!==0||(r=window.event,r=r===void 0?16:xh(r.type)),r)}function or(r,s,c,f){if(50<Ci)throw Ci=0,ld=null,Error(n(185));Ys(r,c,f),((Ue&2)===0||r!==Mt)&&(r===Mt&&((Ue&2)===0&&(la|=c),Rt===4&&fo(r,Wt)),bn(r,f),c===1&&Ue===0&&(s.mode&1)===0&&(hs=xt()+500,zl&&oo()))}function bn(r,s){var c=r.callbackNode;k1(r,s);var f=wl(r,r===Mt?Wt:0);if(f===0)c!==null&&sh(c),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(c!=null&&sh(c),s===1)r.tag===0?wk(xg.bind(null,r)):nm(xg.bind(null,r)),xk(function(){(Ue&6)===0&&oo()}),c=null;else{switch(uh(f)){case 1:c=zu;break;case 4:c=ih;break;case 16:c=xl;break;case 536870912:c=lh;break;default:c=xl}c=Cg(c,gg.bind(null,r))}r.callbackPriority=s,r.callbackNode=c}}function gg(r,s){if(da=-1,fa=0,(Ue&6)!==0)throw Error(n(327));var c=r.callbackNode;if(ms()&&r.callbackNode!==c)return null;var f=wl(r,r===Mt?Wt:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=pa(r,f);else{s=f;var y=Ue;Ue|=2;var w=vg();(Mt!==r||Wt!==s)&&(zr=null,hs=xt()+500,Mo(r,s));do try{Uk();break}catch(M){yg(r,M)}while(!0);Cc(),ia.current=w,Ue=y,wt!==null?s=0:(Mt=null,Wt=0,s=Rt)}if(s!==0){if(s===2&&(y=Bu(r),y!==0&&(f=y,s=ad(r,y))),s===1)throw c=Si,Mo(r,0),fo(r,f),bn(r,xt()),c;if(s===6)fo(r,f);else{if(y=r.current.alternate,(f&30)===0&&!zk(y)&&(s=pa(r,f),s===2&&(w=Bu(r),w!==0&&(f=w,s=ad(r,w))),s===1))throw c=Si,Mo(r,0),fo(r,f),bn(r,xt()),c;switch(r.finishedWork=y,r.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:$o(r,vn,zr);break;case 3:if(fo(r,f),(f&130023424)===f&&(s=sd+500-xt(),10<s)){if(wl(r,0)!==0)break;if(y=r.suspendedLanes,(y&f)!==f){ln(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=hc($o.bind(null,r,vn,zr),s);break}$o(r,vn,zr);break;case 4:if(fo(r,f),(f&4194240)===f)break;for(s=r.eventTimes,y=-1;0<f;){var j=31-Jn(f);w=1<<j,j=s[j],j>y&&(y=j),f&=~w}if(f=y,f=xt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Fk(f/1960))-f,10<f){r.timeoutHandle=hc($o.bind(null,r,vn,zr),f);break}$o(r,vn,zr);break;case 5:$o(r,vn,zr);break;default:throw Error(n(329))}}}return bn(r,xt()),r.callbackNode===c?gg.bind(null,r):null}function ad(r,s){var c=ji;return r.current.memoizedState.isDehydrated&&(Mo(r,s).flags|=256),r=pa(r,s),r!==2&&(s=vn,vn=c,s!==null&&ud(s)),r}function ud(r){vn===null?vn=r:vn.push.apply(vn,r)}function zk(r){for(var s=r;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var y=c[f],w=y.getSnapshot;y=y.value;try{if(!Zn(w(),y))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function fo(r,s){for(s&=~od,s&=~la,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var c=31-Jn(s),f=1<<c;r[c]=-1,s&=~f}}function xg(r){if((Ue&6)!==0)throw Error(n(327));ms();var s=wl(r,0);if((s&1)===0)return bn(r,xt()),null;var c=pa(r,s);if(r.tag!==0&&c===2){var f=Bu(r);f!==0&&(s=f,c=ad(r,f))}if(c===1)throw c=Si,Mo(r,0),fo(r,s),bn(r,xt()),c;if(c===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,$o(r,vn,zr),bn(r,xt()),null}function cd(r,s){var c=Ue;Ue|=1;try{return r(s)}finally{Ue=c,Ue===0&&(hs=xt()+500,zl&&oo())}}function _o(r){uo!==null&&uo.tag===0&&(Ue&6)===0&&ms();var s=Ue;Ue|=1;var c=Vn.transition,f=qe;try{if(Vn.transition=null,qe=1,r)return r()}finally{qe=f,Vn.transition=c,Ue=s,(Ue&6)===0&&oo()}}function dd(){In=ps.current,nt(ps)}function Mo(r,s){r.finishedWork=null,r.finishedLanes=0;var c=r.timeoutHandle;if(c!==-1&&(r.timeoutHandle=-1,gk(c)),wt!==null)for(c=wt.return;c!==null;){var f=c;switch(bc(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&$l();break;case 3:cs(),nt(gn),nt(Jt),Lc();break;case 5:Ac(f);break;case 4:cs();break;case 13:nt(ct);break;case 19:nt(ct);break;case 10:Nc(f.type._context);break;case 22:case 23:dd()}c=c.return}if(Mt=r,wt=r=po(r.current,null),Wt=In=s,Rt=0,Si=null,od=la=Oo=0,vn=ji=null,Do!==null){for(s=0;s<Do.length;s++)if(c=Do[s],f=c.interleaved,f!==null){c.interleaved=null;var y=f.next,w=c.pending;if(w!==null){var j=w.next;w.next=y,f.next=j}c.pending=f}Do=null}return r}function yg(r,s){do{var c=wt;try{if(Cc(),Xl.current=ea,Ql){for(var f=dt.memoizedState;f!==null;){var y=f.queue;y!==null&&(y.pending=null),f=f.next}Ql=!1}if(Io=0,_t=Et=dt=null,xi=!1,yi=0,rd.current=null,c===null||c.return===null){Rt=1,Si=s,wt=null;break}e:{var w=r,j=c.return,M=c,z=s;if(s=Wt,M.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var ne=z,se=M,ie=se.tag;if((se.mode&1)===0&&(ie===0||ie===11||ie===15)){var oe=se.alternate;oe?(se.updateQueue=oe.updateQueue,se.memoizedState=oe.memoizedState,se.lanes=oe.lanes):(se.updateQueue=null,se.memoizedState=null)}var he=Hm(j);if(he!==null){he.flags&=-257,Wm(he,j,M,w,s),he.mode&1&&Um(w,ne,s),s=he,z=ne;var ye=s.updateQueue;if(ye===null){var be=new Set;be.add(z),s.updateQueue=be}else ye.add(z);break e}else{if((s&1)===0){Um(w,ne,s),fd();break e}z=Error(n(426))}}else if(st&&M.mode&1){var yt=Hm(j);if(yt!==null){(yt.flags&65536)===0&&(yt.flags|=256),Wm(yt,j,M,w,s),Sc(ds(z,M));break e}}w=z=ds(z,M),Rt!==4&&(Rt=2),ji===null?ji=[w]:ji.push(w),w=j;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var G=zm(w,z,s);pm(w,G);break e;case 1:M=z;var B=w.type,J=w.stateNode;if((w.flags&128)===0&&(typeof B.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(ao===null||!ao.has(J)))){w.flags|=65536,s&=-s,w.lanes|=s;var ce=Bm(w,M,s);pm(w,ce);break e}}w=w.return}while(w!==null)}wg(c)}catch(ke){s=ke,wt===c&&c!==null&&(wt=c=c.return);continue}break}while(!0)}function vg(){var r=ia.current;return ia.current=ea,r===null?ea:r}function fd(){(Rt===0||Rt===3||Rt===2)&&(Rt=4),Mt===null||(Oo&268435455)===0&&(la&268435455)===0||fo(Mt,Wt)}function pa(r,s){var c=Ue;Ue|=2;var f=vg();(Mt!==r||Wt!==s)&&(zr=null,Mo(r,s));do try{Bk();break}catch(y){yg(r,y)}while(!0);if(Cc(),Ue=c,ia.current=f,wt!==null)throw Error(n(261));return Mt=null,Wt=0,Rt}function Bk(){for(;wt!==null;)bg(wt)}function Uk(){for(;wt!==null&&!p1();)bg(wt)}function bg(r){var s=jg(r.alternate,r,In);r.memoizedProps=r.pendingProps,s===null?wg(r):wt=s,rd.current=null}function wg(r){var s=r;do{var c=s.alternate;if(r=s.return,(s.flags&32768)===0){if(c=Ik(c,s,In),c!==null){wt=c;return}}else{if(c=Ok(c,s),c!==null){c.flags&=32767,wt=c;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Rt=6,wt=null;return}}if(s=s.sibling,s!==null){wt=s;return}wt=s=r}while(s!==null);Rt===0&&(Rt=5)}function $o(r,s,c){var f=qe,y=Vn.transition;try{Vn.transition=null,qe=1,Hk(r,s,c,f)}finally{Vn.transition=y,qe=f}return null}function Hk(r,s,c,f){do ms();while(uo!==null);if((Ue&6)!==0)throw Error(n(327));c=r.finishedWork;var y=r.finishedLanes;if(c===null)return null;if(r.finishedWork=null,r.finishedLanes=0,c===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var w=c.lanes|c.childLanes;if(S1(r,w),r===Mt&&(wt=Mt=null,Wt=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||ua||(ua=!0,Cg(xl,function(){return ms(),null})),w=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||w){w=Vn.transition,Vn.transition=null;var j=qe;qe=1;var M=Ue;Ue|=4,rd.current=null,Mk(r,c),dg(c,r),uk(fc),jl=!!dc,fc=dc=null,r.current=c,$k(c),h1(),Ue=M,qe=j,Vn.transition=w}else r.current=c;if(ua&&(ua=!1,uo=r,ca=y),w=r.pendingLanes,w===0&&(ao=null),x1(c.stateNode),bn(r,xt()),s!==null)for(f=r.onRecoverableError,c=0;c<s.length;c++)y=s[c],f(y.value,{componentStack:y.stack,digest:y.digest});if(aa)throw aa=!1,r=id,id=null,r;return(ca&1)!==0&&r.tag!==0&&ms(),w=r.pendingLanes,(w&1)!==0?r===ld?Ci++:(Ci=0,ld=r):Ci=0,oo(),null}function ms(){if(uo!==null){var r=uh(ca),s=Vn.transition,c=qe;try{if(Vn.transition=null,qe=16>r?16:r,uo===null)var f=!1;else{if(r=uo,uo=null,ca=0,(Ue&6)!==0)throw Error(n(331));var y=Ue;for(Ue|=4,me=r.current;me!==null;){var w=me,j=w.child;if((me.flags&16)!==0){var M=w.deletions;if(M!==null){for(var z=0;z<M.length;z++){var ne=M[z];for(me=ne;me!==null;){var se=me;switch(se.tag){case 0:case 11:case 15:ki(8,se,w)}var ie=se.child;if(ie!==null)ie.return=se,me=ie;else for(;me!==null;){se=me;var oe=se.sibling,he=se.return;if(ig(se),se===ne){me=null;break}if(oe!==null){oe.return=he,me=oe;break}me=he}}}var ye=w.alternate;if(ye!==null){var be=ye.child;if(be!==null){ye.child=null;do{var yt=be.sibling;be.sibling=null,be=yt}while(be!==null)}}me=w}}if((w.subtreeFlags&2064)!==0&&j!==null)j.return=w,me=j;else e:for(;me!==null;){if(w=me,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:ki(9,w,w.return)}var G=w.sibling;if(G!==null){G.return=w.return,me=G;break e}me=w.return}}var B=r.current;for(me=B;me!==null;){j=me;var J=j.child;if((j.subtreeFlags&2064)!==0&&J!==null)J.return=j,me=J;else e:for(j=B;me!==null;){if(M=me,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:sa(9,M)}}catch(ke){ht(M,M.return,ke)}if(M===j){me=null;break e}var ce=M.sibling;if(ce!==null){ce.return=M.return,me=ce;break e}me=M.return}}if(Ue=y,oo(),pr&&typeof pr.onPostCommitFiberRoot=="function")try{pr.onPostCommitFiberRoot(yl,r)}catch{}f=!0}return f}finally{qe=c,Vn.transition=s}}return!1}function kg(r,s,c){s=ds(c,s),s=zm(r,s,1),r=io(r,s,1),s=ln(),r!==null&&(Ys(r,1,s),bn(r,s))}function ht(r,s,c){if(r.tag===3)kg(r,r,c);else for(;s!==null;){if(s.tag===3){kg(s,r,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(ao===null||!ao.has(f))){r=ds(c,r),r=Bm(s,r,1),s=io(s,r,1),r=ln(),s!==null&&(Ys(s,1,r),bn(s,r));break}}s=s.return}}function Wk(r,s,c){var f=r.pingCache;f!==null&&f.delete(s),s=ln(),r.pingedLanes|=r.suspendedLanes&c,Mt===r&&(Wt&c)===c&&(Rt===4||Rt===3&&(Wt&130023424)===Wt&&500>xt()-sd?Mo(r,0):od|=c),bn(r,s)}function Sg(r,s){s===0&&((r.mode&1)===0?s=1:(s=bl,bl<<=1,(bl&130023424)===0&&(bl=4194304)));var c=ln();r=Mr(r,s),r!==null&&(Ys(r,s,c),bn(r,c))}function Vk(r){var s=r.memoizedState,c=0;s!==null&&(c=s.retryLane),Sg(r,c)}function qk(r,s){var c=0;switch(r.tag){case 13:var f=r.stateNode,y=r.memoizedState;y!==null&&(c=y.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Sg(r,c)}var jg;jg=function(r,s,c){if(r!==null)if(r.memoizedProps!==s.pendingProps||gn.current)yn=!0;else{if((r.lanes&c)===0&&(s.flags&128)===0)return yn=!1,Lk(r,s,c);yn=(r.flags&131072)!==0}else yn=!1,st&&(s.flags&1048576)!==0&&rm(s,Ul,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;ra(r,s),r=s.pendingProps;var y=rs(s,Jt.current);us(s,c),y=_c(null,s,f,r,y,c);var w=Mc();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,xn(f)?(w=!0,Fl(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Pc(s),y.updater=ta,s.stateNode=y,y._reactInternals=s,Hc(s,f,r,c),s=Kc(null,s,f,!0,w,c)):(s.tag=0,st&&w&&vc(s),sn(null,s,y,c),s=s.child),s;case 16:f=s.elementType;e:{switch(ra(r,s),r=s.pendingProps,y=f._init,f=y(f._payload),s.type=f,y=s.tag=Gk(f),r=tr(f,r),y){case 0:s=qc(null,s,f,r,c);break e;case 1:s=Xm(null,s,f,r,c);break e;case 11:s=Vm(null,s,f,r,c);break e;case 14:s=qm(null,s,f,tr(f.type,r),c);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:tr(f,y),qc(r,s,f,y,c);case 1:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:tr(f,y),Xm(r,s,f,y,c);case 3:e:{if(Qm(s),r===null)throw Error(n(387));f=s.pendingProps,w=s.memoizedState,y=w.element,fm(r,s),Gl(s,f,null,c);var j=s.memoizedState;if(f=j.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){y=ds(Error(n(423)),s),s=Jm(r,s,f,c,y);break e}else if(f!==y){y=ds(Error(n(424)),s),s=Jm(r,s,f,c,y);break e}else for(Ln=to(s.stateNode.containerInfo.firstChild),Dn=s,st=!0,er=null,c=cm(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(is(),f===y){s=Fr(r,s,c);break e}sn(r,s,f,c)}s=s.child}return s;case 5:return mm(s),r===null&&kc(s),f=s.type,y=s.pendingProps,w=r!==null?r.memoizedProps:null,j=y.children,pc(f,y)?j=null:w!==null&&pc(f,w)&&(s.flags|=32),Ym(r,s),sn(r,s,j,c),s.child;case 6:return r===null&&kc(s),null;case 13:return Zm(r,s,c);case 4:return Tc(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=ls(s,null,f,c):sn(r,s,f,c),s.child;case 11:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:tr(f,y),Vm(r,s,f,y,c);case 7:return sn(r,s,s.pendingProps,c),s.child;case 8:return sn(r,s,s.pendingProps.children,c),s.child;case 12:return sn(r,s,s.pendingProps.children,c),s.child;case 10:e:{if(f=s.type._context,y=s.pendingProps,w=s.memoizedProps,j=y.value,Ye(Vl,f._currentValue),f._currentValue=j,w!==null)if(Zn(w.value,j)){if(w.children===y.children&&!gn.current){s=Fr(r,s,c);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var M=w.dependencies;if(M!==null){j=w.child;for(var z=M.firstContext;z!==null;){if(z.context===f){if(w.tag===1){z=$r(-1,c&-c),z.tag=2;var ne=w.updateQueue;if(ne!==null){ne=ne.shared;var se=ne.pending;se===null?z.next=z:(z.next=se.next,se.next=z),ne.pending=z}}w.lanes|=c,z=w.alternate,z!==null&&(z.lanes|=c),Ec(w.return,c,s),M.lanes|=c;break}z=z.next}}else if(w.tag===10)j=w.type===s.type?null:w.child;else if(w.tag===18){if(j=w.return,j===null)throw Error(n(341));j.lanes|=c,M=j.alternate,M!==null&&(M.lanes|=c),Ec(j,c,s),j=w.sibling}else j=w.child;if(j!==null)j.return=w;else for(j=w;j!==null;){if(j===s){j=null;break}if(w=j.sibling,w!==null){w.return=j.return,j=w;break}j=j.return}w=j}sn(r,s,y.children,c),s=s.child}return s;case 9:return y=s.type,f=s.pendingProps.children,us(s,c),y=Hn(y),f=f(y),s.flags|=1,sn(r,s,f,c),s.child;case 14:return f=s.type,y=tr(f,s.pendingProps),y=tr(f.type,y),qm(r,s,f,y,c);case 15:return Km(r,s,s.type,s.pendingProps,c);case 17:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:tr(f,y),ra(r,s),s.tag=1,xn(f)?(r=!0,Fl(s)):r=!1,us(s,c),$m(s,f,y),Hc(s,f,y,c),Kc(null,s,f,!0,r,c);case 19:return tg(r,s,c);case 22:return Gm(r,s,c)}throw Error(n(156,s.tag))};function Cg(r,s){return oh(r,s)}function Kk(r,s,c,f){this.tag=r,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,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 qn(r,s,c,f){return new Kk(r,s,c,f)}function pd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Gk(r){if(typeof r=="function")return pd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===q)return 11;if(r===I)return 14}return 2}function po(r,s){var c=r.alternate;return c===null?(c=qn(r.tag,s,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=s,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&14680064,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,s=r.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c}function ha(r,s,c,f,y,w){var j=2;if(f=r,typeof r=="function")pd(r)&&(j=1);else if(typeof r=="string")j=5;else e:switch(r){case $:return Fo(c.children,y,w,s);case E:j=8,y|=8;break;case U:return r=qn(12,c,s,y|2),r.elementType=U,r.lanes=w,r;case X:return r=qn(13,c,s,y),r.elementType=X,r.lanes=w,r;case Q:return r=qn(19,c,s,y),r.elementType=Q,r.lanes=w,r;case V:return ma(c,y,w,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ee:j=10;break e;case Y:j=9;break e;case q:j=11;break e;case I:j=14;break e;case D:j=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=qn(j,c,s,y),s.elementType=r,s.type=f,s.lanes=w,s}function Fo(r,s,c,f){return r=qn(7,r,f,s),r.lanes=c,r}function ma(r,s,c,f){return r=qn(22,r,f,s),r.elementType=V,r.lanes=c,r.stateNode={isHidden:!1},r}function hd(r,s,c){return r=qn(6,r,null,s),r.lanes=c,r}function md(r,s,c){return s=qn(4,r.children!==null?r.children:[],r.key,s),s.lanes=c,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function Yk(r,s,c,f,y){this.tag=s,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=Uu(0),this.expirationTimes=Uu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uu(0),this.identifierPrefix=f,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function gd(r,s,c,f,y,w,j,M,z){return r=new Yk(r,s,c,M,z),s===1?(s=1,w===!0&&(s|=8)):s=0,w=qn(3,null,null,s),r.current=w,w.stateNode=r,w.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pc(w),r}function Xk(r,s,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:f==null?null:""+f,children:r,containerInfo:s,implementation:c}}function Ng(r){if(!r)return ro;r=r._reactInternals;e:{if(Eo(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(xn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var c=r.type;if(xn(c))return em(r,c,s)}return s}function Eg(r,s,c,f,y,w,j,M,z){return r=gd(c,f,!0,r,y,w,j,M,z),r.context=Ng(null),c=r.current,f=ln(),y=co(c),w=$r(f,y),w.callback=s??null,io(c,w,y),r.current.lanes=y,Ys(r,y,f),bn(r,f),r}function ga(r,s,c,f){var y=s.current,w=ln(),j=co(y);return c=Ng(c),s.context===null?s.context=c:s.pendingContext=c,s=$r(w,j),s.payload={element:r},f=f===void 0?null:f,f!==null&&(s.callback=f),r=io(y,s,j),r!==null&&(or(r,y,j,w),Kl(r,y,j)),j}function xa(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 Rg(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<s?c:s}}function xd(r,s){Rg(r,s),(r=r.alternate)&&Rg(r,s)}function Qk(){return null}var Pg=typeof reportError=="function"?reportError:function(r){console.error(r)};function yd(r){this._internalRoot=r}ya.prototype.render=yd.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));ga(r,s,null,null)},ya.prototype.unmount=yd.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;_o(function(){ga(null,r,null,null)}),s[Lr]=null}};function ya(r){this._internalRoot=r}ya.prototype.unstable_scheduleHydration=function(r){if(r){var s=fh();r={blockedOn:null,target:r,priority:s};for(var c=0;c<Jr.length&&s!==0&&s<Jr[c].priority;c++);Jr.splice(c,0,r),c===0&&mh(r)}};function vd(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function va(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Tg(){}function Jk(r,s,c,f,y){if(y){if(typeof f=="function"){var w=f;f=function(){var ne=xa(j);w.call(ne)}}var j=Eg(s,f,r,0,null,!1,!1,"",Tg);return r._reactRootContainer=j,r[Lr]=j.current,ui(r.nodeType===8?r.parentNode:r),_o(),j}for(;y=r.lastChild;)r.removeChild(y);if(typeof f=="function"){var M=f;f=function(){var ne=xa(z);M.call(ne)}}var z=gd(r,0,!1,null,null,!1,!1,"",Tg);return r._reactRootContainer=z,r[Lr]=z.current,ui(r.nodeType===8?r.parentNode:r),_o(function(){ga(s,z,c,f)}),z}function ba(r,s,c,f,y){var w=c._reactRootContainer;if(w){var j=w;if(typeof y=="function"){var M=y;y=function(){var z=xa(j);M.call(z)}}ga(s,j,r,y)}else j=Jk(c,s,r,y,f);return xa(j)}ch=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var c=Gs(s.pendingLanes);c!==0&&(Hu(s,c|1),bn(s,xt()),(Ue&6)===0&&(hs=xt()+500,oo()))}break;case 13:_o(function(){var f=Mr(r,1);if(f!==null){var y=ln();or(f,r,1,y)}}),xd(r,1)}},Wu=function(r){if(r.tag===13){var s=Mr(r,134217728);if(s!==null){var c=ln();or(s,r,134217728,c)}xd(r,134217728)}},dh=function(r){if(r.tag===13){var s=co(r),c=Mr(r,s);if(c!==null){var f=ln();or(c,r,s,f)}xd(r,s)}},fh=function(){return qe},ph=function(r,s){var c=qe;try{return qe=r,s()}finally{qe=c}},Yt=function(r,s,c){switch(s){case"input":if(on(r,c),s=c.name,c.type==="radio"&&s!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==r&&f.form===r.form){var y=Ml(f);if(!y)throw Error(n(90));Ze(f),on(f,y)}}}break;case"textarea":Rn(r,c);break;case"select":s=c.value,s!=null&&zt(r,!!c.multiple,s,!1)}},Ut=cd,Xt=_o;var Zk={usingClientEntryPoint:!1,Events:[fi,ts,Ml,Nt,hn,cd]},Ni={findFiberByHostInstance:Ro,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},eS={bundleType:Ni.bundleType,version:Ni.version,rendererPackageName:Ni.rendererPackageName,rendererConfig:Ni.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=nh(r),r===null?null:r.stateNode},findFiberByHostInstance:Ni.findFiberByHostInstance||Qk,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 wa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wa.isDisabled&&wa.supportsFiber)try{yl=wa.inject(eS),pr=wa}catch{}}return wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zk,wn.createPortal=function(r,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vd(s))throw Error(n(200));return Xk(r,s,null,c)},wn.createRoot=function(r,s){if(!vd(r))throw Error(n(299));var c=!1,f="",y=Pg;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=gd(r,1,!1,null,null,c,!1,f,y),r[Lr]=s.current,ui(r.nodeType===8?r.parentNode:r),new yd(s)},wn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=nh(s),r=r===null?null:r.stateNode,r},wn.flushSync=function(r){return _o(r)},wn.hydrate=function(r,s,c){if(!va(s))throw Error(n(200));return ba(null,r,s,!0,c)},wn.hydrateRoot=function(r,s,c){if(!vd(r))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,y=!1,w="",j=Pg;if(c!=null&&(c.unstable_strictMode===!0&&(y=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onRecoverableError!==void 0&&(j=c.onRecoverableError)),s=Eg(s,null,r,1,c??null,y,!1,w,j),r[Lr]=s.current,ui(r),f)for(r=0;r<f.length;r++)c=f[r],y=c._getVersion,y=y(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,y]:s.mutableSourceEagerHydrationData.push(c,y);return new ya(s)},wn.render=function(r,s,c){if(!va(s))throw Error(n(200));return ba(null,r,s,!1,c)},wn.unmountComponentAtNode=function(r){if(!va(r))throw Error(n(40));return r._reactRootContainer?(_o(function(){ba(null,null,r,!1,function(){r._reactRootContainer=null,r[Lr]=null})}),!0):!1},wn.unstable_batchedUpdates=cd,wn.unstable_renderSubtreeIntoContainer=function(r,s,c,f){if(!va(c))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return ba(r,s,c,!1,f)},wn.version="18.3.1-next-f1338f8080-20240426",wn}var $g;function Yy(){if($g)return kd.exports;$g=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(),kd.exports=aS(),kd.exports}var Fg;function uS(){if(Fg)return ka;Fg=1;var e=Yy();return ka.createRoot=e.createRoot,ka.hydrateRoot=e.hydrateRoot,ka}var cS=uS();/**
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 zg="popstate";function Bg(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function dS(e={}){function t(o,i){var h;let a=(h=i.state)==null?void 0:h.masked,{pathname:u,search:d,hash:p}=a||o.location;return uf("",{pathname:u,search:d,hash:p},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function n(o,i){return typeof i=="string"?i:Ki(i)}return pS(t,n,null,e)}function ft(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function sr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fS(){return Math.random().toString(36).substring(2,10)}function Ug(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 uf(e,t,n=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Is(t):t,state:n,key:t&&t.key||o||fS(),unstable_mask:i}}function Ki({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 Is(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function pS(e,t,n,o={}){let{window:i=document.defaultView,v5Compat:a=!1}=o,u=i.history,d="POP",p=null,h=m();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function m(){return(u.state||{idx:null}).idx}function x(){d="POP";let S=m(),C=S==null?null:S-h;h=S,p&&p({action:d,location:k.location,delta:C})}function v(S,C){d="PUSH";let T=Bg(S)?S:uf(k.location,S,C);h=m()+1;let A=Ug(T,h),_=k.createHref(T.unstable_mask||T);try{u.pushState(A,"",_)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(_)}a&&p&&p({action:d,location:k.location,delta:1})}function b(S,C){d="REPLACE";let T=Bg(S)?S:uf(k.location,S,C);h=m();let A=Ug(T,h),_=k.createHref(T.unstable_mask||T);u.replaceState(A,"",_),a&&p&&p({action:d,location:k.location,delta:0})}function N(S){return hS(S)}let k={get action(){return d},get location(){return e(i,u)},listen(S){if(p)throw new Error("A history only accepts one active listener");return i.addEventListener(zg,x),p=S,()=>{i.removeEventListener(zg,x),p=null}},createHref(S){return t(i,S)},createURL:N,encodeLocation(S){let C=N(S);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:v,replace:b,go(S){return u.go(S)}};return k}function hS(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ft(n,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Ki(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=n+o),new URL(o,n)}function Xy(e,t,n="/"){return mS(e,t,n,!1)}function mS(e,t,n,o){let i=typeof t=="string"?Is(t):t,a=Hr(i.pathname||"/",n);if(a==null)return null;let u=Qy(e);gS(u);let d=null;for(let p=0;d==null&&p<u.length;++p){let h=ES(a);d=CS(u[p],h,o)}return d}function Qy(e,t=[],n=[],o="",i=!1){let a=(u,d,p=i,h)=>{let m={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(o)&&p)return;ft(m.relativePath.startsWith(o),`Absolute route path "${m.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(o.length)}let x=Sr([o,m.relativePath]),v=n.concat(m);u.children&&u.children.length>0&&(ft(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Qy(u.children,t,v,x,p)),!(u.path==null&&!u.index)&&t.push({path:x,score:SS(x,u.index),routesMeta:v})};return e.forEach((u,d)=>{var p;if(u.path===""||!((p=u.path)!=null&&p.includes("?")))a(u,d);else for(let h of Jy(u.path))a(u,d,!0,h)}),t}function Jy(e){let t=e.split("/");if(t.length===0)return[];let[n,...o]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(o.length===0)return i?[a,""]:[a];let u=Jy(o.join("/")),d=[];return d.push(...u.map(p=>p===""?a:[a,p].join("/"))),i&&d.push(...u),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function gS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jS(t.routesMeta.map(o=>o.childrenIndex),n.routesMeta.map(o=>o.childrenIndex)))}var xS=/^:[\w-]+$/,yS=3,vS=2,bS=1,wS=10,kS=-2,Hg=e=>e==="*";function SS(e,t){let n=e.split("/"),o=n.length;return n.some(Hg)&&(o+=kS),t&&(o+=vS),n.filter(i=>!Hg(i)).reduce((i,a)=>i+(xS.test(a)?yS:a===""?bS:wS),o)}function jS(e,t){return e.length===t.length&&e.slice(0,-1).every((o,i)=>o===t[i])?e[e.length-1]-t[t.length-1]:0}function CS(e,t,n=!1){let{routesMeta:o}=e,i={},a="/",u=[];for(let d=0;d<o.length;++d){let p=o[d],h=d===o.length-1,m=a==="/"?t:t.slice(a.length)||"/",x=qa({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},m),v=p.route;if(!x&&h&&n&&!o[o.length-1].route.index&&(x=qa({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},m)),!x)return null;Object.assign(i,x.params),u.push({params:i,pathname:Sr([a,x.pathname]),pathnameBase:AS(Sr([a,x.pathnameBase])),route:v}),x.pathnameBase!=="/"&&(a=Sr([a,x.pathnameBase]))}return u}function qa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,o]=NS(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],u=a.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((h,{paramName:m,isOptional:x},v)=>{if(m==="*"){let N=d[v]||"";u=a.slice(0,a.length-N.length).replace(/(.)\/+$/,"$1")}const b=d[v];return x&&!b?h[m]=void 0:h[m]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:u,pattern:e}}function NS(e,t=!1,n=!0){sr(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 o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,p,h,m)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let x=m.charAt(h+u.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function ES(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return sr(!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 Hr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,o=e.charAt(n);return o&&o!=="/"?null:e.slice(n)||"/"}var RS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function PS(e,t="/"){let{pathname:n,search:o="",hash:i=""}=typeof e=="string"?Is(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=Wg(n.substring(1),"/"):a=Wg(n,t)):a=t,{pathname:a,search:DS(o),hash:LS(i)}}function Wg(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 Cd(e,t,n,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. 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 TS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Zy(e){let t=TS(e);return t.map((n,o)=>o===t.length-1?n.pathname:n.pathnameBase)}function Uf(e,t,n,o=!1){let i;typeof e=="string"?i=Is(e):(i={...e},ft(!i.pathname||!i.pathname.includes("?"),Cd("?","pathname","search",i)),ft(!i.pathname||!i.pathname.includes("#"),Cd("#","pathname","hash",i)),ft(!i.search||!i.search.includes("#"),Cd("#","search","hash",i)));let a=e===""||i.pathname==="",u=a?"/":i.pathname,d;if(u==null)d=n;else{let x=t.length-1;if(!o&&u.startsWith("..")){let v=u.split("/");for(;v[0]==="..";)v.shift(),x-=1;i.pathname=v.join("/")}d=x>=0?t[x]:"/"}let p=PS(i,d),h=u&&u!=="/"&&u.endsWith("/"),m=(a||u===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(h||m)&&(p.pathname+="/"),p}var Sr=e=>e.join("/").replace(/\/\/+/g,"/"),AS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),DS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,LS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,IS=class{constructor(e,t,n,o=!1){this.status=e,this.statusText=t||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function OS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function _S(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ev=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tv(e,t){let n=e;if(typeof n!="string"||!RS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let o=n,i=!1;if(ev)try{let a=new URL(window.location.href),u=n.startsWith("//")?new URL(a.protocol+n):new URL(n),d=Hr(u.pathname,t);u.origin===a.origin&&d!=null?n=d+u.search+u.hash:i=!0}catch{sr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var nv=["POST","PUT","PATCH","DELETE"];new Set(nv);var MS=["GET",...nv];new Set(MS);var Os=g.createContext(null);Os.displayName="DataRouter";var au=g.createContext(null);au.displayName="DataRouterState";var $S=g.createContext(!1),rv=g.createContext({isTransitioning:!1});rv.displayName="ViewTransition";var FS=g.createContext(new Map);FS.displayName="Fetchers";var zS=g.createContext(null);zS.displayName="Await";var Yn=g.createContext(null);Yn.displayName="Navigation";var tl=g.createContext(null);tl.displayName="Location";var cr=g.createContext({outlet:null,matches:[],isDataRoute:!1});cr.displayName="Route";var Hf=g.createContext(null);Hf.displayName="RouteError";var ov="REACT_ROUTER_ERROR",BS="REDIRECT",US="ROUTE_ERROR_RESPONSE";function HS(e){if(e.startsWith(`${ov}:${BS}:{`))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 WS(e){if(e.startsWith(`${ov}:${US}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new IS(t.status,t.statusText,t.data)}catch{}}function VS(e,{relative:t}={}){ft(nl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=g.useContext(Yn),{hash:i,pathname:a,search:u}=rl(e,{relative:t}),d=a;return n!=="/"&&(d=a==="/"?n:Sr([n,a])),o.createHref({pathname:d,search:u,hash:i})}function nl(){return g.useContext(tl)!=null}function cn(){return ft(nl(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(tl).location}var sv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function iv(e){g.useContext(Yn).static||g.useLayoutEffect(e)}function qt(){let{isDataRoute:e}=g.useContext(cr);return e?ij():qS()}function qS(){ft(nl(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(Os),{basename:t,navigator:n}=g.useContext(Yn),{matches:o}=g.useContext(cr),{pathname:i}=cn(),a=JSON.stringify(Zy(o)),u=g.useRef(!1);return iv(()=>{u.current=!0}),g.useCallback((p,h={})=>{if(sr(u.current,sv),!u.current)return;if(typeof p=="number"){n.go(p);return}let m=Uf(p,JSON.parse(a),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Sr([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,a,i,e])}var KS=g.createContext(null);function GS(e){let t=g.useContext(cr).outlet;return g.useMemo(()=>t&&g.createElement(KS.Provider,{value:e},t),[t,e])}function Dt(){let{matches:e}=g.useContext(cr),t=e[e.length-1];return t?t.params:{}}function rl(e,{relative:t}={}){let{matches:n}=g.useContext(cr),{pathname:o}=cn(),i=JSON.stringify(Zy(n));return g.useMemo(()=>Uf(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function YS(e,t){return lv(e,t)}function lv(e,t,n){var S;ft(nl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Yn),{matches:i}=g.useContext(cr),a=i[i.length-1],u=a?a.params:{},d=a?a.pathname:"/",p=a?a.pathnameBase:"/",h=a&&a.route;{let C=h&&h.path||"";uv(d,!h||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${C}">) 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="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let m=cn(),x;if(t){let C=typeof t=="string"?Is(t):t;ft(p==="/"||((S=C.pathname)==null?void 0:S.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 "${C.pathname}" was given in the \`location\` prop.`),x=C}else x=m;let v=x.pathname||"/",b=v;if(p!=="/"){let C=p.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(C.length).join("/")}let N=Xy(e,{pathname:b});sr(h||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),sr(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=ej(N&&N.map(C=>Object.assign({},C,{params:Object.assign({},u,C.params),pathname:Sr([p,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?p:Sr([p,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),i,n);return t&&k?g.createElement(tl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function XS(){let e=sj(),t=OS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},a={padding:"2px 4px",backgroundColor:o},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:a},"ErrorBoundary")," or"," ",g.createElement("code",{style:a},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,u)}var QS=g.createElement(XS,null),av=class extends g.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=WS(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(cr.Provider,{value:this.props.routeContext},g.createElement(Hf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(JS,{error:e},t):t}};av.contextType=$S;var Nd=new WeakMap;function JS({children:e,error:t}){let{basename:n}=g.useContext(Yn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=HS(t.digest);if(o){let i=Nd.get(t);if(i)throw i;let a=tv(o.location,n);if(ev&&!Nd.get(t))if(a.isExternal||o.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:o.replace}));throw Nd.set(t,u),u}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function ZS({routeContext:e,match:t,children:n}){let o=g.useContext(Os);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(cr.Provider,{value:e},n)}function ej(e,t=[],n){let o=n==null?void 0:n.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let i=e,a=o==null?void 0:o.errors;if(a!=null){let m=i.findIndex(x=>x.route.id&&(a==null?void 0:a[x.route.id])!==void 0);ft(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 u=!1,d=-1;if(n&&o){u=o.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:v,errors:b}=o,N=x.route.loader&&!v.hasOwnProperty(x.route.id)&&(!b||b[x.route.id]===void 0);if(x.route.lazy||N){n.isStatic&&(u=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let p=n==null?void 0:n.onError,h=o&&p?(m,x)=>{var v,b;p(m,{location:o.location,params:((b=(v=o.matches)==null?void 0:v[0])==null?void 0:b.params)??{},unstable_pattern:_S(o.matches),errorInfo:x})}:void 0;return i.reduceRight((m,x,v)=>{let b,N=!1,k=null,S=null;o&&(b=a&&x.route.id?a[x.route.id]:void 0,k=x.route.errorElement||QS,u&&(d<0&&v===0?(uv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,S=null):d===v&&(N=!0,S=x.route.hydrateFallbackElement||null)));let C=t.concat(i.slice(0,v+1)),T=()=>{let A;return b?A=k:N?A=S:x.route.Component?A=g.createElement(x.route.Component,null):x.route.element?A=x.route.element:A=m,g.createElement(ZS,{match:x,routeContext:{outlet:m,matches:C,isDataRoute:o!=null},children:A})};return o&&(x.route.ErrorBoundary||x.route.errorElement||v===0)?g.createElement(av,{location:o.location,revalidation:o.revalidation,component:k,error:b,children:T(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:h}):T()},null)}function Wf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tj(e){let t=g.useContext(Os);return ft(t,Wf(e)),t}function nj(e){let t=g.useContext(au);return ft(t,Wf(e)),t}function rj(e){let t=g.useContext(cr);return ft(t,Wf(e)),t}function Vf(e){let t=rj(e),n=t.matches[t.matches.length-1];return ft(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function oj(){return Vf("useRouteId")}function sj(){var o;let e=g.useContext(Hf),t=nj("useRouteError"),n=Vf("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[n]}function ij(){let{router:e}=tj("useNavigate"),t=Vf("useNavigate"),n=g.useRef(!1);return iv(()=>{n.current=!0}),g.useCallback(async(i,a={})=>{sr(n.current,sv),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var Vg={};function uv(e,t,n){!t&&!Vg[e]&&(Vg[e]=!0,sr(!1,n))}g.memo(lj);function lj({routes:e,future:t,state:n,isStatic:o,onError:i}){return lv(e,void 0,{state:n,isStatic:o,onError:i})}function aj(e){return GS(e.context)}function _e(e){ft(!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 uj({basename:e="/",children:t=null,location:n,navigationType:o="POP",navigator:i,static:a=!1,unstable_useTransitions:u}){ft(!nl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=g.useMemo(()=>({basename:d,navigator:i,static:a,unstable_useTransitions:u,future:{}}),[d,i,a,u]);typeof n=="string"&&(n=Is(n));let{pathname:h="/",search:m="",hash:x="",state:v=null,key:b="default",unstable_mask:N}=n,k=g.useMemo(()=>{let S=Hr(h,d);return S==null?null:{location:{pathname:S,search:m,hash:x,state:v,key:b,unstable_mask:N},navigationType:o}},[d,h,m,x,v,b,o,N]);return sr(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:g.createElement(Yn.Provider,{value:p},g.createElement(tl.Provider,{children:t,value:k}))}function cj({children:e,location:t}){return YS(cf(e),t)}function cf(e,t=[]){let n=[];return g.Children.forEach(e,(o,i)=>{if(!g.isValidElement(o))return;let a=[...t,i];if(o.type===g.Fragment){n.push.apply(n,cf(o.props.children,a));return}ft(o.type===_e,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ft(!o.props.index||!o.props.children,"An index route cannot have child routes.");let u={id:o.props.id||a.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(u.children=cf(o.props.children,a)),n.push(u)}),n}var _a="get",Ma="application/x-www-form-urlencoded";function uu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function dj(e){return uu(e)&&e.tagName.toLowerCase()==="button"}function fj(e){return uu(e)&&e.tagName.toLowerCase()==="form"}function pj(e){return uu(e)&&e.tagName.toLowerCase()==="input"}function hj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mj(e,t){return e.button===0&&(!t||t==="_self")&&!hj(e)}function df(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let o=e[n];return t.concat(Array.isArray(o)?o.map(i=>[n,i]):[[n,o]])},[]))}function gj(e,t){let n=df(e);return t&&t.forEach((o,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}var Sa=null;function xj(){if(Sa===null)try{new FormData(document.createElement("form"),0),Sa=!1}catch{Sa=!0}return Sa}var yj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ed(e){return e!=null&&!yj.has(e)?(sr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ma}"`),null):e}function vj(e,t){let n,o,i,a,u;if(fj(e)){let d=e.getAttribute("action");o=d?Hr(d,t):null,n=e.getAttribute("method")||_a,i=Ed(e.getAttribute("enctype"))||Ma,a=new FormData(e)}else if(dj(e)||pj(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(o=p?Hr(p,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||_a,i=Ed(e.getAttribute("formenctype"))||Ed(d.getAttribute("enctype"))||Ma,a=new FormData(d,e),!xj()){let{name:h,type:m,value:x}=e;if(m==="image"){let v=h?`${h}.`:"";a.append(`${v}x`,"0"),a.append(`${v}y`,"0")}else h&&a.append(h,x)}}else{if(uu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=_a,o=null,i=Ma,u=e}return a&&i==="text/plain"&&(u=a,a=void 0),{action:o,method:n.toLowerCase(),encType:i,formData:a,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qf(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function bj(e,t,n,o){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}_.${o}`:i.pathname=`${i.pathname}.${o}`:i.pathname==="/"?i.pathname=`_root.${o}`:t&&Hr(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${o}`,i}async function wj(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 kj(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 Sj(e,t,n){let o=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let u=await wj(a,n);return u.links?u.links():[]}return[]}));return Ej(o.flat(1).filter(kj).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function qg(e,t,n,o,i,a){let u=(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)=>u(p,h)||d(p,h)):a==="data"?t.filter((p,h)=>{var x;let m=o.routes[p.route.id];if(!m||!m.hasLoader)return!1;if(u(p,h)||d(p,h))return!0;if(p.route.shouldRevalidate){let v=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 v=="boolean")return v}return!0}):[]}function jj(e,t,{includeHydrateFallback:n}={}){return Cj(e.map(o=>{let i=t.routes[o.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 Nj(e){let t={},n=Object.keys(e).sort();for(let o of n)t[o]=e[o];return t}function Ej(e,t){let n=new Set;return new Set(t),e.reduce((o,i)=>{let a=JSON.stringify(Nj(i));return n.has(a)||(n.add(a),o.push({key:a,link:i})),o},[])}function cv(){let e=g.useContext(Os);return qf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Rj(){let e=g.useContext(au);return qf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Kf=g.createContext(void 0);Kf.displayName="FrameworkContext";function dv(){let e=g.useContext(Kf);return qf(e,"You must render this element inside a <HydratedRouter> element"),e}function Pj(e,t){let n=g.useContext(Kf),[o,i]=g.useState(!1),[a,u]=g.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:m,onTouchStart:x}=t,v=g.useRef(null);g.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let k=C=>{C.forEach(T=>{u(T.isIntersecting)})},S=new IntersectionObserver(k,{threshold:.5});return v.current&&S.observe(v.current),()=>{S.disconnect()}}},[e]),g.useEffect(()=>{if(o){let k=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(k)}}},[o]);let b=()=>{i(!0)},N=()=>{i(!1),u(!1)};return n?e!=="intent"?[a,v,{}]:[a,v,{onFocus:Ri(d,b),onBlur:Ri(p,N),onMouseEnter:Ri(h,b),onMouseLeave:Ri(m,N),onTouchStart:Ri(x,b)}]:[!1,v,{}]}function Ri(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Tj({page:e,...t}){let{router:n}=cv(),o=g.useMemo(()=>Xy(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?g.createElement(Dj,{page:e,matches:o,...t}):null}function Aj(e){let{manifest:t,routeModules:n}=dv(),[o,i]=g.useState([]);return g.useEffect(()=>{let a=!1;return Sj(e,t,n).then(u=>{a||i(u)}),()=>{a=!0}},[e,t,n]),o}function Dj({page:e,matches:t,...n}){let o=cn(),{future:i,manifest:a,routeModules:u}=dv(),{basename:d}=cv(),{loaderData:p,matches:h}=Rj(),m=g.useMemo(()=>qg(e,t,h,a,o,"data"),[e,t,h,a,o]),x=g.useMemo(()=>qg(e,t,h,a,o,"assets"),[e,t,h,a,o]),v=g.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let k=new Set,S=!1;if(t.forEach(T=>{var _;let A=a.routes[T.route.id];!A||!A.hasLoader||(!m.some(O=>O.route.id===T.route.id)&&T.route.id in p&&((_=u[T.route.id])!=null&&_.shouldRevalidate)||A.hasClientLoader?S=!0:k.add(T.route.id))}),k.size===0)return[];let C=bj(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return S&&k.size>0&&C.searchParams.set("_routes",t.filter(T=>k.has(T.route.id)).map(T=>T.route.id).join(",")),[C.pathname+C.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,o,a,m,t,e,u]),b=g.useMemo(()=>jj(x,a),[x,a]),N=Aj(x);return g.createElement(g.Fragment,null,v.map(k=>g.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),b.map(k=>g.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),N.map(({key:k,link:S})=>g.createElement("link",{key:k,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function Lj(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Ij=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ij&&(window.__reactRouterVersion="7.13.1")}catch{}function Oj({basename:e,children:t,unstable_useTransitions:n,window:o}){let i=g.useRef();i.current==null&&(i.current=dS({window:o,v5Compat:!0}));let a=i.current,[u,d]=g.useState({action:a.action,location:a.location}),p=g.useCallback(h=>{n===!1?d(h):g.startTransition(()=>d(h))},[n]);return g.useLayoutEffect(()=>a.listen(p),[a,p]),g.createElement(uj,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:a,unstable_useTransitions:n})}var fv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Re=g.forwardRef(function({onClick:t,discover:n="render",prefetch:o="none",relative:i,reloadDocument:a,replace:u,unstable_mask:d,state:p,target:h,to:m,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:b,...N},k){let{basename:S,navigator:C,unstable_useTransitions:T}=g.useContext(Yn),A=typeof m=="string"&&fv.test(m),_=tv(m,S);m=_.to;let O=VS(m,{relative:i}),P=cn(),$=null;if(d){let I=Uf(d,[],P.unstable_mask?P.unstable_mask.pathname:"/",!0);S!=="/"&&(I.pathname=I.pathname==="/"?S:Sr([S,I.pathname])),$=C.createHref(I)}let[E,U,ee]=Pj(o,N),Y=Fj(m,{replace:u,unstable_mask:d,state:p,target:h,preventScrollReset:x,relative:i,viewTransition:v,unstable_defaultShouldRevalidate:b,unstable_useTransitions:T});function q(I){t&&t(I),I.defaultPrevented||Y(I)}let X=!(_.isExternal||a),Q=g.createElement("a",{...N,...ee,href:(X?$:void 0)||_.absoluteURL||O,onClick:X?q:t,ref:Lj(k,U),target:h,"data-discover":!A&&n==="render"?"true":void 0});return E&&!A?g.createElement(g.Fragment,null,Q,g.createElement(Tj,{page:O})):Q});Re.displayName="Link";var _j=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:o="",end:i=!1,style:a,to:u,viewTransition:d,children:p,...h},m){let x=rl(u,{relative:h.relative}),v=cn(),b=g.useContext(au),{navigator:N,basename:k}=g.useContext(Yn),S=b!=null&&Wj(x)&&d===!0,C=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,T=v.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(T=T.toLowerCase(),A=A?A.toLowerCase():null,C=C.toLowerCase()),A&&k&&(A=Hr(A,k)||A);const _=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let O=T===C||!i&&T.startsWith(C)&&T.charAt(_)==="/",P=A!=null&&(A===C||!i&&A.startsWith(C)&&A.charAt(C.length)==="/"),$={isActive:O,isPending:P,isTransitioning:S},E=O?t:void 0,U;typeof o=="function"?U=o($):U=[o,O?"active":null,P?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let ee=typeof a=="function"?a($):a;return g.createElement(Re,{...h,"aria-current":E,className:U,ref:m,style:ee,to:u,viewTransition:d},typeof p=="function"?p($):p)});_j.displayName="NavLink";var Mj=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:o,replace:i,state:a,method:u=_a,action:d,onSubmit:p,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:v,...b},N)=>{let{unstable_useTransitions:k}=g.useContext(Yn),S=Uj(),C=Hj(d,{relative:h}),T=u.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&fv.test(d),_=O=>{if(p&&p(O),O.defaultPrevented)return;O.preventDefault();let P=O.nativeEvent.submitter,$=(P==null?void 0:P.getAttribute("formmethod"))||u,E=()=>S(P||O.currentTarget,{fetcherKey:t,method:$,navigate:n,replace:i,state:a,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:v});k&&n!==!1?g.startTransition(()=>E()):E()};return g.createElement("form",{ref:N,method:T,action:C,onSubmit:o?p:_,...b,"data-discover":!A&&e==="render"?"true":void 0})});Mj.displayName="Form";function $j(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pv(e){let t=g.useContext(Os);return ft(t,$j(e)),t}function Fj(e,{target:t,replace:n,unstable_mask:o,state:i,preventScrollReset:a,relative:u,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:h}={}){let m=qt(),x=cn(),v=rl(e,{relative:u});return g.useCallback(b=>{if(mj(b,t)){b.preventDefault();let N=n!==void 0?n:Ki(x)===Ki(v),k=()=>m(e,{replace:N,unstable_mask:o,state:i,preventScrollReset:a,relative:u,viewTransition:d,unstable_defaultShouldRevalidate:p});h?g.startTransition(()=>k()):k()}},[x,m,v,n,o,i,t,e,a,u,d,p,h])}function ol(e){sr(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=g.useRef(df(e)),n=g.useRef(!1),o=cn(),i=g.useMemo(()=>gj(o.search,n.current?null:t.current),[o.search]),a=qt(),u=g.useCallback((d,p)=>{const h=df(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,a("?"+h,p)},[a,i]);return[i,u]}var zj=0,Bj=()=>`__${String(++zj)}__`;function Uj(){let{router:e}=pv("useSubmit"),{basename:t}=g.useContext(Yn),n=oj(),o=e.fetch,i=e.navigate;return g.useCallback(async(a,u={})=>{let{action:d,method:p,encType:h,formData:m,body:x}=vj(a,t);if(u.navigate===!1){let v=u.fetcherKey||Bj();await o(v,n,u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:x,formMethod:u.method||p,formEncType:u.encType||h,flushSync:u.flushSync})}else await i(u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:x,formMethod:u.method||p,formEncType:u.encType||h,replace:u.replace,state:u.state,fromRouteId:n,flushSync:u.flushSync,viewTransition:u.viewTransition})},[o,i,t,n])}function Hj(e,{relative:t}={}){let{basename:n}=g.useContext(Yn),o=g.useContext(cr);ft(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),a={...rl(e||".",{relative:t})},u=cn();if(e==null){a.search=u.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:Sr([n,a.pathname])),Ki(a)}function Wj(e,{relative:t}={}){let n=g.useContext(rv);ft(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=pv("useViewTransitionState"),i=rl(e,{relative:t});if(!n.isTransitioning)return!1;let a=Hr(n.currentLocation.pathname,o)||n.currentLocation.pathname,u=Hr(n.nextLocation.pathname,o)||n.nextLocation.pathname;return qa(i.pathname,u)!=null||qa(i.pathname,a)!=null}var wo=Yy();const Vj=lu(wo);/**
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 qj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hv=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.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 Kj={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 Gj=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:u,...d},p)=>g.createElement("svg",{ref:p,...Kj,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:hv("lucide",i),...d},[...u.map(([h,m])=>g.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 ve=(e,t)=>{const n=g.forwardRef(({className:o,...i},a)=>g.createElement(Gj,{ref:a,iconNode:t,className:hv(`lucide-${qj(e)}`,o),...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 cu=ve("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 mv=ve("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 Yj=ve("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 Ka=ve("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 Xj=ve("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 gv=ve("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 Gf=ve("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 Gi=ve("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 xv=ve("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 ff=ve("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 yv=ve("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 pf=ve("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 Qj=ve("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 Jj=ve("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 Zj=ve("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 eC=ve("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 tC=ve("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 Yf=ve("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 nC=ve("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 rC=ve("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
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 vv=ve("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"}]]);/**
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 Kg=ve("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"}]]);/**
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 oC=ve("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"}]]);/**
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 sC=ve("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"}]]);/**
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 iC=ve("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"}]]);/**
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 lC=ve("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"}]]);/**
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 Xf=ve("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"}]]);/**
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 aC=ve("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
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 bv=ve("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"}]]);/**
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 uC=ve("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"}]]);/**
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 cC=ve("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"}]]);/**
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 dC=ve("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"}]]);/**
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 wv=ve("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
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 fC=ve("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"}]]);/**
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 pC=ve("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"}]]);/**
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 hC=ve("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"}]]);/**
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 kv=ve("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 mC=ve("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"}]]);/**
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 Qf=ve("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"}]]);/**
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 gC=ve("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"}]]);/**
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 Rd=ve("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"}]]);/**
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 xC=ve("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"}]]);/**
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 yC=ve("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"}]]);/**
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 ir=ve("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 Sv=ve("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"}]]);/**
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 vC=ve("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"}]]);/**
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 Jf=ve("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"}]]);/**
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 bC=ve("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"}]]);/**
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 sl=ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 wC=ve("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"}]]);/**
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 kC=ve("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"}]]);/**
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 SC=ve("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"}]]);/**
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 jC=ve("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"}]]);/**
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 jr=ve("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"}]]);/**
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 Gg=ve("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"}]]);/**
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 jv=ve("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
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 CC=ve("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"}]]);/**
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 Cv=ve("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"}]]);/**
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 NC=ve("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
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 _s=ve("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"}]]);/**
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 il=ve("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"}]]);/**
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 EC=ve("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"}]]);/**
382
- * @license lucide-react v0.460.0 - ISC
383
- *
384
- * This source code is licensed under the ISC license.
385
- * See the LICENSE file in the root directory of this source tree.
386
- */const Nv=ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ev(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ev(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function RC(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ev(e))&&(o&&(o+=" "),o+=t);return o}const Zf="-",PC=e=>{const t=AC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:u=>{const d=u.split(Zf);return d[0]===""&&d.length!==1&&d.shift(),Rv(d,t)||TC(u)},getConflictingClassGroupIds:(u,d)=>{const p=n[u]||[];return d&&o[u]?[...p,...o[u]]:p}}},Rv=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?Rv(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Zf);return(u=t.validators.find(({validator:d})=>d(a)))==null?void 0:u.classGroupId},Yg=/^\[(.+)\]$/,TC=e=>{if(Yg.test(e)){const t=Yg.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},AC=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return LC(Object.entries(e.classGroups),n).forEach(([a,u])=>{hf(u,o,a,t)}),o},hf=(e,t,n,o)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:Xg(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(DC(i)){hf(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,u])=>{hf(u,Xg(t,a),n,o)})})},Xg=(e,t)=>{let n=e;return t.split(Zf).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},DC=e=>e.isThemeGetter,LC=(e,t)=>t?e.map(([n,o])=>{const i=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([u,d])=>[t+u,d])):a);return[n,i]}):e,IC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const i=(a,u)=>{n.set(a,u),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let u=n.get(a);if(u!==void 0)return u;if((u=o.get(a))!==void 0)return i(a,u),u},set(a,u){n.has(a)?n.set(a,u):i(a,u)}}},Pv="!",OC=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,i=t[0],a=t.length,u=d=>{const p=[];let h=0,m=0,x;for(let S=0;S<d.length;S++){let C=d[S];if(h===0){if(C===i&&(o||d.slice(S,S+a)===t)){p.push(d.slice(m,S)),m=S+a;continue}if(C==="/"){x=S;continue}}C==="["?h++:C==="]"&&h--}const v=p.length===0?d:d.substring(m),b=v.startsWith(Pv),N=b?v.substring(1):v,k=x&&x>m?x-m:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:k}};return n?d=>n({className:d,parseClassName:u}):u},_C=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},MC=e=>({cache:IC(e.cacheSize),parseClassName:OC(e),...PC(e)}),$C=/\s+/,FC=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,a=[],u=e.trim().split($C);let d="";for(let p=u.length-1;p>=0;p-=1){const h=u[p],{modifiers:m,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:b}=n(h);let N=!!b,k=o(N?v.substring(0,b):v);if(!k){if(!N){d=h+(d.length>0?" "+d:d);continue}if(k=o(v),!k){d=h+(d.length>0?" "+d:d);continue}N=!1}const S=_C(m).join(":"),C=x?S+Pv:S,T=C+k;if(a.includes(T))continue;a.push(T);const A=i(k,N);for(let _=0;_<A.length;++_){const O=A[_];a.push(C+O)}d=h+(d.length>0?" "+d:d)}return d};function zC(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Tv(t))&&(o&&(o+=" "),o+=n);return o}const Tv=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Tv(e[o]))&&(n&&(n+=" "),n+=t);return n};function BC(e,...t){let n,o,i,a=u;function u(p){const h=t.reduce((m,x)=>x(m),e());return n=MC(h),o=n.cache.get,i=n.cache.set,a=d,d(p)}function d(p){const h=o(p);if(h)return h;const m=FC(p,n);return i(p,m),m}return function(){return a(zC.apply(null,arguments))}}const rt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Av=/^\[(?:([a-z-]+):)?(.+)\]$/i,UC=/^\d+\/\d+$/,HC=new Set(["px","full","screen"]),WC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VC=/\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$/,qC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,KC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Br=e=>ks(e)||HC.has(e)||UC.test(e),mo=e=>Ms(e,"length",nN),ks=e=>!!e&&!Number.isNaN(Number(e)),Pd=e=>Ms(e,"number",ks),Pi=e=>!!e&&Number.isInteger(Number(e)),YC=e=>e.endsWith("%")&&ks(e.slice(0,-1)),Ie=e=>Av.test(e),go=e=>WC.test(e),XC=new Set(["length","size","percentage"]),QC=e=>Ms(e,XC,Dv),JC=e=>Ms(e,"position",Dv),ZC=new Set(["image","url"]),eN=e=>Ms(e,ZC,oN),tN=e=>Ms(e,"",rN),Ti=()=>!0,Ms=(e,t,n)=>{const o=Av.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},nN=e=>VC.test(e)&&!qC.test(e),Dv=()=>!1,rN=e=>KC.test(e),oN=e=>GC.test(e),sN=()=>{const e=rt("colors"),t=rt("spacing"),n=rt("blur"),o=rt("brightness"),i=rt("borderColor"),a=rt("borderRadius"),u=rt("borderSpacing"),d=rt("borderWidth"),p=rt("contrast"),h=rt("grayscale"),m=rt("hueRotate"),x=rt("invert"),v=rt("gap"),b=rt("gradientColorStops"),N=rt("gradientColorStopPositions"),k=rt("inset"),S=rt("margin"),C=rt("opacity"),T=rt("padding"),A=rt("saturate"),_=rt("scale"),O=rt("sepia"),P=rt("skew"),$=rt("space"),E=rt("translate"),U=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",Ie,t],q=()=>[Ie,t],X=()=>["",Br,mo],Q=()=>["auto",ks,Ie],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",Ie],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[ks,Ie];return{cacheSize:500,separator:":",theme:{colors:[Ti],spacing:[Br,mo],blur:["none","",go,Ie],brightness:F(),borderColor:[e],borderRadius:["none","","full",go,Ie],borderSpacing:q(),borderWidth:X(),contrast:F(),grayscale:te(),hueRotate:F(),invert:te(),gap:q(),gradientColorStops:[e],gradientColorStopPositions:[YC,mo],inset:Y(),margin:Y(),opacity:F(),padding:q(),saturate:F(),scale:F(),sepia:te(),skew:F(),space:q(),translate:q()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[go]}],"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:[...I(),Ie]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],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",Pi,Ie]}],basis:[{basis:Y()}],"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:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",Pi,Ie]}],"grid-cols":[{"grid-cols":[Ti]}],"col-start-end":[{col:["auto",{span:["full",Pi,Ie]},Ie]}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":[Ti]}],"row-start-end":[{row:["auto",{span:[Pi,Ie]},Ie]}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"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:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"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:[go]},go]}],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",go,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pd]}],"font-family":[{font:[Ti]}],"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",ks,Pd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Br,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":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Br,mo]}],"underline-offset":[{"underline-offset":["auto",Br,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:q()}],"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":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),JC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",QC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},eN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"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":[C]}],"border-style":[{border:[...D(),"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":[C]}],"divide-style":[{divide:D()}],"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:["",...D()]}],"outline-offset":[{"outline-offset":[Br,Ie]}],"outline-w":[{outline:[Br,mo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[Br,mo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",go,tN]}],"shadow-color":[{shadow:[Ti]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",go,Ie]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[x]}],saturate:[{saturate:[A]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"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":[C]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ie]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Pi,Ie]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"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":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"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:[Br,mo,Pd]}],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"]}}},iN=BC(sN);function Fe(...e){return iN(RC(e))}function Wr(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 Cr(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 lN(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function aN(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function uN(e){if(!e)return"—";const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=Math.floor((Date.now()-t.getTime())/1e3);if(n<60)return"just now";const o=Math.floor(n/60);if(o<60)return`${o}m ago`;const i=Math.floor(o/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function un(e){return e.split(/[_\s-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Lv(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function cN(e){let t=Lv(e);const n=t.match(/^\/w\/[^/]+(\/.*)?$/);return n&&(t=n[1]||"/"),t==="/"?"/":t.startsWith("/projects")?/^\/projects\/[^/]+\/assignments\//.test(t)?"/assignments":"/projects":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 Iv(e,t){return cN(e)===t}function dN(e){let n=Lv(e).split("/").filter(Boolean);const o=[];let i="Overview",a=null,u="";return n[0]==="w"&&n[1]&&(u=`/w/${n[1]}`,o.push({label:un(n[1]),path:`${u}/projects`}),n=n.slice(2)),n.length===0?{title:i,breadcrumbs:o,projectSlug:a}:(n[0]==="projects"?(o.push({label:"Projects",path:`${u}/projects`}),i="Projects",n[1]&&(a=n[1],o.push({label:un(n[1]),path:`${u}/projects/${n[1]}`}),i=un(n[1])),n[2]==="edit"?i="Edit Project":n[2]==="create"&&n[3]==="assignment"?i="Create Assignment":n[2]==="assignments"&&n[3]&&(o.push({label:un(n[3]),path:`${u}/projects/${n[1]}/assignments/${n[3]}`}),i=un(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",o.push({label:"Servers",path:`${u}/servers`})):n[0]==="agent-sessions"?(i="Agent Sessions",o.push({label:"Agent Sessions",path:`${u}/agent-sessions`})):n[0]==="attention"?(i="Attention",o.push({label:"Attention",path:"/attention"})):n[0]==="assignments"?(i="Assignments",o.push({label:"Assignments",path:`${u}/assignments`})):n[0]==="playbooks"?(o.push({label:"Playbooks",path:"/playbooks"}),i="Playbooks",n[1]==="create"?i="Create Playbook":n[1]&&n[2]==="edit"?(o.push({label:un(n[1]),path:`/playbooks/${n[1]}`}),i="Edit Playbook"):n[1]&&(o.push({label:un(n[1]),path:`/playbooks/${n[1]}`}),i=un(n[1]))):n[0]==="todos"?(i="Todos",o.push({label:"Todos",path:`${u}/todos`})):n[0]==="help"?(i="Help",o.push({label:"Help",path:"/help"})):n[0]==="settings"?(i="Settings",o.push({label:"Settings",path:"/settings"})):n[0]==="create"&&n[1]==="project"&&(i="Create Project",o.push({label:"Create Project",path:`${u}/create/project`})),{title:i,breadcrumbs:o,projectSlug:a})}function Qg({items:e,onNavigate:t}){const n=cn();return l.jsx("nav",{className:"space-y-1",children:e.map(o=>{const i=o.icon,a=Iv(n.pathname,o.to)&&!n.pathname.startsWith("/w/");return l.jsxs(Re,{to:o.to,onClick:t,className:Fe("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:o.label})]},o.to)})})}const mf="syntaur-theme",Ov=g.createContext(null);function gf(){try{const e=window.localStorage.getItem(mf);return e==="light"||e==="dark"?e:null}catch{return null}}function _v(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Mv(e){const t=document.documentElement;t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function fN(){if(typeof document>"u")return;const e=gf();Mv(e??_v())}function pN({children:e}){const[t,n]=g.useState(()=>gf()),[o,i]=g.useState(()=>gf()??_v());g.useEffect(()=>{Mv(o)},[o]),g.useEffect(()=>{if(!window.matchMedia)return;const u=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{t||i(u.matches?"dark":"light")};return d(),u.addEventListener("change",d),()=>{u.removeEventListener("change",d)}},[t]);const a={resolvedTheme:o,explicitTheme:t,setTheme:u=>{window.localStorage.setItem(mf,u),n(u),i(u)},toggleTheme:()=>{const u=o==="dark"?"light":"dark";window.localStorage.setItem(mf,u),n(u),i(u)}};return l.jsx(Ov.Provider,{value:a,children:e})}function $v(){const e=g.useContext(Ov);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const $a=new Set;let Sn=null,Ss=null;function hN(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function Fv(){Sn&&(Sn.readyState===WebSocket.OPEN||Sn.readyState===WebSocket.CONNECTING)||(Sn=new WebSocket(hN()),Sn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of $a)n(t)}catch{}},Sn.onclose=()=>{Sn=null,Ss&&clearTimeout(Ss),Ss=setTimeout(Fv,2e3)},Sn.onerror=()=>{Sn==null||Sn.close()})}function ep(e){const t=g.useRef(e);t.current=e,g.useEffect(()=>{const n=o=>t.current(o);return $a.add(n),Fv(),()=>{$a.delete(n),$a.size===0&&Sn&&(Ss&&clearTimeout(Ss),Ss=null,Sn.close(),Sn=null)}},[])}function Cn(e,t){const[n,o]=g.useState(null),[i,a]=g.useState(!0),[u,d]=g.useState(null),[p,h]=g.useState(0),m=g.useCallback(()=>{h(x=>x+1)},[]);return g.useEffect(()=>{if(!e){a(!1),o(null);return}let x=!1;return a(!0),d(null),fetch(e).then(async v=>{if(!v.ok){const b=await v.json().catch(()=>null);throw new Error((b==null?void 0:b.error)||`HTTP ${v.status}`)}return v.json()}).then(v=>{x||(o(v),a(!1))}).catch(v=>{x||(d(v.message),a(!1))}),()=>{x=!0}},[e,p]),ep(x=>{t&&((x.type==="project-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:u,refetch:m}}function du(){return Cn("/api/projects","projects")}function tp(){return Cn("/api/workspaces","projects")}function Lt(){const{workspace:e}=Dt();return e?`/w/${e}`:""}function mN(){return Cn("/api/overview","overview")}function zv(){return Cn("/api/assignments","assignments")}function gN(){return Cn("/api/attention","attention")}function Bv(){return Cn("/api/help")}function Uv(e){const t=e?`/api/projects/${e}`:null;return Cn(t,"project")}function xN(e,t){const n=e&&t?`/api/projects/${e}/assignments/${t}`:null;return Cn(n,"assignment")}function Hv(e){return Cn(e)}function np(){return Cn("/api/servers","servers")}function yN(){return Cn("/api/agent-sessions","agent-sessions")}function vN(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return Cn(n,"agent-sessions")}function Wv(){return Cn("/api/playbooks","playbooks")}function bN(e){const t=e?`/api/playbooks/${e}`:null;return Cn(t,"playbooks")}function ws(){if(typeof navigator>"u")return!1;const e=navigator.platform||"",t=navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/.test(e)||/Mac OS X/.test(t)}function wN(e){const t=e.split("+").map(i=>i.trim()),n=t[t.length-1]??"",o=new Set(t.slice(0,-1).map(i=>i.toLowerCase()));return{key:n.toLowerCase(),mod:o.has("mod"),shift:o.has("shift"),alt:o.has("alt"),ctrl:o.has("ctrl")}}function Td(e,t){const n=wN(t);if(e.key.toLowerCase()!==n.key)return!1;const i=ws()?e.metaKey:e.ctrlKey;return!(n.mod&&!i||!n.mod&&!n.ctrl&&i||n.ctrl&&!e.ctrlKey||n.shift&&!e.shiftKey||!n.shift&&!(n.key.length===1&&!/^[a-z0-9]$/.test(n.key))&&e.shiftKey||n.alt&&!e.altKey||!n.alt&&e.altKey)}function js(e){return e.split("+").map(n=>{const o=n.toLowerCase();return o==="mod"?ws()?"⌘":"Ctrl":o==="shift"?ws()?"⇧":"Shift":o==="alt"?ws()?"⌥":"Alt":o==="ctrl"?ws()?"⌃":"Ctrl":o==="enter"?"↵":o==="escape"?"Esc":o==="arrowup"?"↑":o==="arrowdown"?"↓":n.length===1?n.toUpperCase():n}).join(ws()?"":"+")}function kN(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[a,u]=g.useState(null),d=g.useCallback(async()=>{try{const p=await fetch(`/api/todos/${encodeURIComponent(e)}`);if(!p.ok)throw new Error(`HTTP ${p.status}`);n(await p.json()),u(null)}catch(p){u(p instanceof Error?p.message:"Failed to fetch todos")}finally{i(!1)}},[e]);return g.useEffect(()=>{d()},[d]),ep(p=>{p.type==="todos-updated"&&d()}),{data:t,loading:o,error:a,refetch:d}}function rp(){const[e,t]=g.useState(null),[n,o]=g.useState(!0),[i,a]=g.useState(null),u=g.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{o(!1)}},[]);return g.useEffect(()=>{u()},[u]),ep(d=>{d.type==="todos-updated"&&u()}),{data:e,loading:n,error:i,refetch:u}}async function Vv(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 qv(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 Kv(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 Gv(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 Yv(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function SN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function jN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const CN=new Set(["/projects","/assignments","/servers","/todos"]);function Fa(e,t){return CN.has(e)?`${t}${e}`:e}const NN=[{id:"page-overview",title:"Overview",basePath:"/",keywords:["home","dashboard"]},{id:"page-projects",title:"Projects",basePath:"/projects",keywords:[]},{id:"page-assignments",title:"Assignments",basePath:"/assignments",keywords:[]},{id:"page-todos",title:"Todos",basePath:"/todos",keywords:["tasks"]},{id:"page-servers",title:"Servers",basePath:"/servers",keywords:["sessions"]},{id:"page-attention",title:"Attention",basePath:"/attention",keywords:["alerts"]},{id:"page-playbooks",title:"Playbooks",basePath:"/playbooks",keywords:[]},{id:"page-settings",title:"Settings",basePath:"/settings",keywords:[]},{id:"page-help",title:"Help",basePath:"/help",keywords:["shortcuts"]}];function EN(e){const t=[];for(const n of NN)t.push({type:"page",id:n.id,title:n.title,keywords:[...n.keywords],route:Fa(n.basePath,e.wsPrefix)});for(const n of e.projects??[]){const o=n.workspace?`/w/${n.workspace}`:"";t.push({type:"project",id:`project-${n.slug}`,title:n.title,subtitle:n.slug,keywords:n.tags,route:`${o}/projects/${n.slug}`})}for(const n of e.assignments??[]){const o=n.projectWorkspace?`/w/${n.projectWorkspace}`:"";t.push({type:"assignment",id:`assignment-${n.projectSlug}-${n.slug}`,title:n.title,subtitle:`${n.projectTitle} · ${n.status}`,keywords:[n.projectSlug,n.assignee??""].filter(Boolean),route:`${o}/projects/${n.projectSlug}/assignments/${n.slug}`})}for(const n of e.playbooks??[])t.push({type:"playbook",id:`playbook-${n.slug}`,title:n.name,subtitle:n.description,keywords:n.tags,route:`/playbooks/${n.slug}`});for(const n of e.servers??[])t.push({type:"server",id:`server-${n.name}`,title:n.name,subtitle:n.alive?"alive":"dead",route:`${Fa("/servers",e.wsPrefix)}#server-${encodeURIComponent(n.name)}`});for(const n of e.todos??[]){const o=n.workspace&&n.workspace!=="_ungrouped"?`/w/${n.workspace}`:e.wsPrefix,i=Fa("/todos",o);t.push({type:"todo",id:`todo-${n.id}`,title:n.description,subtitle:n.status,keywords:n.tags,route:`${i}?focus=${encodeURIComponent(n.id)}`})}return t}function lt(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 Jg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fu(...e){return t=>{let n=!1;const o=e.map(i=>{const a=Jg(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<o.length;i++){const a=o[i];typeof a=="function"?a():Jg(e[i],null)}}}}function nn(...e){return g.useCallback(fu(...e),e)}function RN(e,t){const n=g.createContext(t),o=a=>{const{children:u,...d}=a,p=g.useMemo(()=>d,Object.values(d));return l.jsx(n.Provider,{value:p,children:u})};o.displayName=e+"Provider";function i(a){const u=g.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,i]}function Vo(e,t=[]){let n=[];function o(a,u){const d=g.createContext(u),p=n.length;n=[...n,u];const h=x=>{var C;const{scope:v,children:b,...N}=x,k=((C=v==null?void 0:v[e])==null?void 0:C[p])||d,S=g.useMemo(()=>N,Object.values(N));return l.jsx(k.Provider,{value:S,children:b})};h.displayName=a+"Provider";function m(x,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[p])||d,N=g.useContext(b);if(N)return N;if(u!==void 0)return u;throw new Error(`\`${x}\` must be used within \`${a}\``)}return[h,m]}const i=()=>{const a=n.map(u=>g.createContext(u));return function(d){const p=(d==null?void 0:d[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[o,PN(i,...t)]}function PN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const u=o.reduce((d,{useScope:p,scopeName:h})=>{const x=p(a)[`__scope${h}`];return{...d,...x}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var ko=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},TN=Gy[" useId ".trim().toString()]||(()=>{}),AN=0;function Cs(e){const[t,n]=g.useState(TN());return ko(()=>{n(o=>o??String(AN++))},[e]),t?`radix-${t}`:""}var DN=Gy[" useInsertionEffect ".trim().toString()]||ko;function pu({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,u]=LN({defaultProp:t,onChange:n}),d=e!==void 0,p=d?e:i;{const m=g.useRef(e!==void 0);g.useEffect(()=>{const x=m.current;x!==d&&console.warn(`${o} 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,o])}const h=g.useCallback(m=>{var x;if(d){const v=IN(m)?m(e):m;v!==e&&((x=u.current)==null||x.call(u,v))}else a(m)},[d,e,a,u]);return[p,h]}function LN({defaultProp:e,onChange:t}){const[n,o]=g.useState(e),i=g.useRef(n),a=g.useRef(t);return DN(()=>{a.current=t},[t]),g.useEffect(()=>{var u;i.current!==n&&((u=a.current)==null||u.call(a,n),i.current=n)},[n,i]),[n,o,a]}function IN(e){return typeof e=="function"}function ON(e){const t=_N(e),n=g.forwardRef((o,i)=>{const{children:a,...u}=o,d=g.Children.toArray(a),p=d.find($N);if(p){const h=p.props.children,m=d.map(x=>x===p?g.Children.count(h)>1?g.Children.only(null):g.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...u,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return l.jsx(t,{...u,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function _N(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const u=zN(i),d=FN(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fu(o,u):u),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var MN=Symbol("radix.slottable");function $N(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MN}function FN(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function zN(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.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 BN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],St=BN.reduce((e,t)=>{const n=ON(`Primitive.${t}`),o=g.forwardRef((i,a)=>{const{asChild:u,...d}=i,p=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(p,{...d,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function UN(e,t){e&&wo.flushSync(()=>e.dispatchEvent(t))}function Uo(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function HN(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e);g.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var WN="DismissableLayer",xf="dismissableLayer.update",VN="dismissableLayer.pointerDownOutside",qN="dismissableLayer.focusOutside",Zg,Xv=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),op=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:u,onDismiss:d,...p}=e,h=g.useContext(Xv),[m,x]=g.useState(null),v=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=g.useState({}),N=nn(t,$=>x($)),k=Array.from(h.layers),[S]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),C=k.indexOf(S),T=m?k.indexOf(m):-1,A=h.layersWithOutsidePointerEventsDisabled.size>0,_=T>=C,O=YN($=>{const E=$.target,U=[...h.branches].some(ee=>ee.contains(E));!_||U||(i==null||i($),u==null||u($),$.defaultPrevented||d==null||d())},v),P=XN($=>{const E=$.target;[...h.branches].some(ee=>ee.contains(E))||(a==null||a($),u==null||u($),$.defaultPrevented||d==null||d())},v);return HN($=>{T===h.layers.size-1&&(o==null||o($),!$.defaultPrevented&&d&&($.preventDefault(),d()))},v),g.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Zg=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),ex(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Zg)}},[m,v,n,h]),g.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),ex())},[m,h]),g.useEffect(()=>{const $=()=>b({});return document.addEventListener(xf,$),()=>document.removeEventListener(xf,$)},[]),l.jsx(St.div,{...p,ref:N,style:{pointerEvents:A?_?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,P.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,O.onPointerDownCapture)})});op.displayName=WN;var KN="DismissableLayerBranch",GN=g.forwardRef((e,t)=>{const n=g.useContext(Xv),o=g.useRef(null),i=nn(t,o);return g.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(St.div,{...e,ref:i})});GN.displayName=KN;function YN(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e),o=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const a=d=>{if(d.target&&!o.current){let p=function(){Qv(VN,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);o.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function XN(e,t=globalThis==null?void 0:globalThis.document){const n=Uo(e),o=g.useRef(!1);return g.useEffect(()=>{const i=a=>{a.target&&!o.current&&Qv(qN,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ex(){const e=new CustomEvent(xf);document.dispatchEvent(e)}function Qv(e,t,n,{discrete:o}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?UN(i,a):i.dispatchEvent(a)}var Ad="focusScope.autoFocusOnMount",Dd="focusScope.autoFocusOnUnmount",tx={bubbles:!1,cancelable:!0},QN="FocusScope",Jv=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...u}=e,[d,p]=g.useState(null),h=Uo(i),m=Uo(a),x=g.useRef(null),v=nn(t,k=>p(k)),b=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(o){let k=function(A){if(b.paused||!d)return;const _=A.target;d.contains(_)?x.current=_:vo(x.current,{select:!0})},S=function(A){if(b.paused||!d)return;const _=A.relatedTarget;_!==null&&(d.contains(_)||vo(x.current,{select:!0}))},C=function(A){if(document.activeElement===document.body)for(const O of A)O.removedNodes.length>0&&vo(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const T=new MutationObserver(C);return d&&T.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),T.disconnect()}}},[o,d,b.paused]),g.useEffect(()=>{if(d){rx.add(b);const k=document.activeElement;if(!d.contains(k)){const C=new CustomEvent(Ad,tx);d.addEventListener(Ad,h),d.dispatchEvent(C),C.defaultPrevented||(JN(r2(Zv(d)),{select:!0}),document.activeElement===k&&vo(d))}return()=>{d.removeEventListener(Ad,h),setTimeout(()=>{const C=new CustomEvent(Dd,tx);d.addEventListener(Dd,m),d.dispatchEvent(C),C.defaultPrevented||vo(k??document.body,{select:!0}),d.removeEventListener(Dd,m),rx.remove(b)},0)}}},[d,h,m,b]);const N=g.useCallback(k=>{if(!n&&!o||b.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,C=document.activeElement;if(S&&C){const T=k.currentTarget,[A,_]=ZN(T);A&&_?!k.shiftKey&&C===_?(k.preventDefault(),n&&vo(A,{select:!0})):k.shiftKey&&C===A&&(k.preventDefault(),n&&vo(_,{select:!0})):C===T&&k.preventDefault()}},[n,o,b.paused]);return l.jsx(St.div,{tabIndex:-1,...u,ref:v,onKeyDown:N})});Jv.displayName=QN;function JN(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(vo(o,{select:t}),document.activeElement!==n)return}function ZN(e){const t=Zv(e),n=nx(t,e),o=nx(t.reverse(),e);return[n,o]}function Zv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function nx(e,t){for(const n of e)if(!e2(n,{upTo:t}))return n}function e2(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 t2(e){return e instanceof HTMLInputElement&&"select"in e}function vo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&t2(e)&&t&&e.select()}}var rx=n2();function n2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ox(e,t),e.unshift(t)},remove(t){var n;e=ox(e,t),(n=e[0])==null||n.resume()}}}function ox(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function r2(e){return e.filter(t=>t.tagName!=="A")}var o2="Portal",sp=g.forwardRef((e,t)=>{var d;const{container:n,...o}=e,[i,a]=g.useState(!1);ko(()=>a(!0),[]);const u=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return u?Vj.createPortal(l.jsx(St.div,{...o,ref:t}),u):null});sp.displayName=o2;function s2(e,t){return g.useReducer((n,o)=>t[n][o]??n,e)}var qo=e=>{const{present:t,children:n}=e,o=i2(t),i=typeof n=="function"?n({present:o.isPresent}):g.Children.only(n),a=nn(o.ref,l2(i));return typeof n=="function"||o.isPresent?g.cloneElement(i,{ref:a}):null};qo.displayName="Presence";function i2(e){const[t,n]=g.useState(),o=g.useRef(null),i=g.useRef(e),a=g.useRef("none"),u=e?"mounted":"unmounted",[d,p]=s2(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const h=ja(o.current);a.current=d==="mounted"?h:"none"},[d]),ko(()=>{const h=o.current,m=i.current;if(m!==e){const v=a.current,b=ja(h);e?p("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?p("UNMOUNT"):p(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),ko(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,x=b=>{const k=ja(o.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(p("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(a.current=ja(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(h=>{o.current=h?getComputedStyle(h):null,n(h)},[])}}function ja(e){return(e==null?void 0:e.animationName)||"none"}function l2(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.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 Ld=0;function a2(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sx()),document.body.insertAdjacentElement("beforeend",e[1]??sx()),Ld++,()=>{Ld===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ld--}},[])}function sx(){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 br=function(){return br=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},br.apply(this,arguments)};function e0(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n}function u2(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,a;o<i;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var za="right-scroll-bar-position",Ba="width-before-scroll-bar",c2="with-scroll-bars-hidden",d2="--removed-body-scroll-bar-size";function Id(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function f2(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=t,n.facade}var p2=typeof window<"u"?g.useLayoutEffect:g.useEffect,ix=new WeakMap;function h2(e,t){var n=f2(null,function(o){return e.forEach(function(i){return Id(i,o)})});return p2(function(){var o=ix.get(n);if(o){var i=new Set(o),a=new Set(e),u=n.current;i.forEach(function(d){a.has(d)||Id(d,null)}),a.forEach(function(d){i.has(d)||Id(d,u)})}ix.set(n,e)},[e]),n}function m2(e){return e}function g2(e,t){t===void 0&&(t=m2);var n=[],o=!1,i={read:function(){if(o)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 u=t(a,o);return n.push(u),function(){n=n.filter(function(d){return d!==u})}},assignSyncMedium:function(a){for(o=!0;n.length;){var u=n;n=[],u.forEach(a)}n={push:function(d){return a(d)},filter:function(){return n}}},assignMedium:function(a){o=!0;var u=[];if(n.length){var d=n;n=[],d.forEach(a),u=n}var p=function(){var m=u;u=[],m.forEach(a)},h=function(){return Promise.resolve().then(p)};h(),n={push:function(m){u.push(m),h()},filter:function(m){return u=u.filter(m),n}}}};return i}function x2(e){e===void 0&&(e={});var t=g2(null);return t.options=br({async:!0,ssr:!1},e),t}var t0=function(e){var t=e.sideCar,n=e0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return g.createElement(o,br({},n))};t0.isSideCarExport=!0;function y2(e,t){return e.useMedium(t),t0}var n0=x2(),Od=function(){},hu=g.forwardRef(function(e,t){var n=g.useRef(null),o=g.useState({onScrollCapture:Od,onWheelCapture:Od,onTouchMoveCapture:Od}),i=o[0],a=o[1],u=e.forwardProps,d=e.children,p=e.className,h=e.removeScrollBar,m=e.enabled,x=e.shards,v=e.sideCar,b=e.noRelative,N=e.noIsolation,k=e.inert,S=e.allowPinchZoom,C=e.as,T=C===void 0?"div":C,A=e.gapMode,_=e0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=v,P=h2([n,t]),$=br(br({},_),i);return g.createElement(g.Fragment,null,m&&g.createElement(O,{sideCar:n0,removeScrollBar:h,shards:x,noRelative:b,noIsolation:N,inert:k,setCallbacks:a,allowPinchZoom:!!S,lockRef:n,gapMode:A}),u?g.cloneElement(g.Children.only(d),br(br({},$),{ref:P})):g.createElement(T,br({},$,{className:p,ref:P}),d))});hu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hu.classNames={fullWidth:Ba,zeroRight:za};var v2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=v2();return t&&e.setAttribute("nonce",t),e}function w2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function k2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var S2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=b2())&&(w2(t,n),k2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},j2=function(){var e=S2();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},r0=function(){var e=j2(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},C2={left:0,top:0,right:0,gap:0},_d=function(e){return parseInt(e||"",10)||0},N2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[_d(n),_d(o),_d(i)]},E2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return C2;var t=N2(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},R2=r0(),Ns="data-scroll-locked",P2=function(e,t,n,o){var i=e.left,a=e.top,u=e.right,d=e.gap;return n===void 0&&(n="margin"),`
387
- .`.concat(c2,` {
388
- overflow: hidden `).concat(o,`;
389
- padding-right: `).concat(d,"px ").concat(o,`;
390
- }
391
- body[`).concat(Ns,`] {
392
- overflow: hidden `).concat(o,`;
393
- overscroll-behavior: contain;
394
- `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
395
- padding-left: `.concat(i,`px;
396
- padding-top: `).concat(a,`px;
397
- padding-right: `).concat(u,`px;
398
- margin-left:0;
399
- margin-top:0;
400
- margin-right: `).concat(d,"px ").concat(o,`;
401
- `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
402
- }
403
-
404
- .`).concat(za,` {
405
- right: `).concat(d,"px ").concat(o,`;
406
- }
407
-
408
- .`).concat(Ba,` {
409
- margin-right: `).concat(d,"px ").concat(o,`;
410
- }
411
-
412
- .`).concat(za," .").concat(za,` {
413
- right: 0 `).concat(o,`;
414
- }
415
-
416
- .`).concat(Ba," .").concat(Ba,` {
417
- margin-right: 0 `).concat(o,`;
418
- }
419
-
420
- body[`).concat(Ns,`] {
421
- `).concat(d2,": ").concat(d,`px;
422
- }
423
- `)},lx=function(){var e=parseInt(document.body.getAttribute(Ns)||"0",10);return isFinite(e)?e:0},T2=function(){g.useEffect(function(){return document.body.setAttribute(Ns,(lx()+1).toString()),function(){var e=lx()-1;e<=0?document.body.removeAttribute(Ns):document.body.setAttribute(Ns,e.toString())}},[])},A2=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;T2();var a=g.useMemo(function(){return E2(i)},[i]);return g.createElement(R2,{styles:P2(a,!t,i,n?"":"!important")})},yf=!1;if(typeof window<"u")try{var Ca=Object.defineProperty({},"passive",{get:function(){return yf=!0,!0}});window.addEventListener("test",Ca,Ca),window.removeEventListener("test",Ca,Ca)}catch{yf=!1}var gs=yf?{passive:!1}:!1,D2=function(e){return e.tagName==="TEXTAREA"},o0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!D2(e)&&n[t]==="visible")},L2=function(e){return o0(e,"overflowY")},I2=function(e){return o0(e,"overflowX")},ax=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=s0(e,o);if(i){var a=i0(e,o),u=a[1],d=a[2];if(u>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},O2=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},_2=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},s0=function(e,t){return e==="v"?L2(t):I2(t)},i0=function(e,t){return e==="v"?O2(t):_2(t)},M2=function(e,t){return e==="h"&&t==="rtl"?-1:1},$2=function(e,t,n,o,i){var a=M2(e,window.getComputedStyle(t).direction),u=a*o,d=n.target,p=t.contains(d),h=!1,m=u>0,x=0,v=0;do{if(!d)break;var b=i0(e,d),N=b[0],k=b[1],S=b[2],C=k-S-a*N;(N||C)&&s0(e,d)&&(x+=C,v+=N);var T=d.parentNode;d=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!p&&d!==document.body||p&&(t.contains(d)||t===d));return(m&&Math.abs(x)<1||!m&&Math.abs(v)<1)&&(h=!0),h},Na=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ux=function(e){return[e.deltaX,e.deltaY]},cx=function(e){return e&&"current"in e?e.current:e},F2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},z2=function(e){return`
424
- .block-interactivity-`.concat(e,` {pointer-events: none;}
425
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
426
- `)},B2=0,xs=[];function U2(e){var t=g.useRef([]),n=g.useRef([0,0]),o=g.useRef(),i=g.useState(B2++)[0],a=g.useState(r0)[0],u=g.useRef(e);g.useEffect(function(){u.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=u2([e.lockRef.current],(e.shards||[]).map(cx),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=g.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var C=Na(k),T=n.current,A="deltaX"in k?k.deltaX:T[0]-C[0],_="deltaY"in k?k.deltaY:T[1]-C[1],O,P=k.target,$=Math.abs(A)>Math.abs(_)?"h":"v";if("touches"in k&&$==="h"&&P.type==="range")return!1;var E=window.getSelection(),U=E&&E.anchorNode,ee=U?U===P||U.contains(P):!1;if(ee)return!1;var Y=ax($,P);if(!Y)return!0;if(Y?O=$:(O=$==="v"?"h":"v",Y=ax($,P)),!Y)return!1;if(!o.current&&"changedTouches"in k&&(A||_)&&(o.current=O),!O)return!0;var q=o.current||O;return $2(q,S,k,q==="h"?A:_)},[]),p=g.useCallback(function(k){var S=k;if(!(!xs.length||xs[xs.length-1]!==a)){var C="deltaY"in S?ux(S):Na(S),T=t.current.filter(function(O){return O.name===S.type&&(O.target===S.target||S.target===O.shadowParent)&&F2(O.delta,C)})[0];if(T&&T.should){S.cancelable&&S.preventDefault();return}if(!T){var A=(u.current.shards||[]).map(cx).filter(Boolean).filter(function(O){return O.contains(S.target)}),_=A.length>0?d(S,A[0]):!u.current.noIsolation;_&&S.cancelable&&S.preventDefault()}}},[]),h=g.useCallback(function(k,S,C,T){var A={name:k,delta:S,target:C,should:T,shadowParent:H2(C)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(_){return _!==A})},1)},[]),m=g.useCallback(function(k){n.current=Na(k),o.current=void 0},[]),x=g.useCallback(function(k){h(k.type,ux(k),k.target,d(k,e.lockRef.current))},[]),v=g.useCallback(function(k){h(k.type,Na(k),k.target,d(k,e.lockRef.current))},[]);g.useEffect(function(){return xs.push(a),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:v}),document.addEventListener("wheel",p,gs),document.addEventListener("touchmove",p,gs),document.addEventListener("touchstart",m,gs),function(){xs=xs.filter(function(k){return k!==a}),document.removeEventListener("wheel",p,gs),document.removeEventListener("touchmove",p,gs),document.removeEventListener("touchstart",m,gs)}},[]);var b=e.removeScrollBar,N=e.inert;return g.createElement(g.Fragment,null,N?g.createElement(a,{styles:z2(i)}):null,b?g.createElement(A2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function H2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const W2=y2(n0,U2);var l0=g.forwardRef(function(e,t){return g.createElement(hu,br({},e,{ref:t,sideCar:W2}))});l0.classNames=hu.classNames;var V2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ys=new WeakMap,Ea=new WeakMap,Ra={},Md=0,a0=function(e){return e&&(e.host||a0(e.parentNode))},q2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=a0(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},K2=function(e,t,n,o){var i=q2(t,Array.isArray(e)?e:[e]);Ra[n]||(Ra[n]=new WeakMap);var a=Ra[n],u=[],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(v){if(d.has(v))m(v);else try{var b=v.getAttribute(o),N=b!==null&&b!=="false",k=(ys.get(v)||0)+1,S=(a.get(v)||0)+1;ys.set(v,k),a.set(v,S),u.push(v),k===1&&N&&Ea.set(v,!0),S===1&&v.setAttribute(n,"true"),N||v.setAttribute(o,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return m(t),d.clear(),Md++,function(){u.forEach(function(x){var v=ys.get(x)-1,b=a.get(x)-1;ys.set(x,v),a.set(x,b),v||(Ea.has(x)||x.removeAttribute(o),Ea.delete(x)),b||x.removeAttribute(n)}),Md--,Md||(ys=new WeakMap,ys=new WeakMap,Ea=new WeakMap,Ra={})}},G2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=V2(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),K2(o,i,n,"aria-hidden")):function(){return null}};function Y2(e){const t=X2(e),n=g.forwardRef((o,i)=>{const{children:a,...u}=o,d=g.Children.toArray(a),p=d.find(J2);if(p){const h=p.props.children,m=d.map(x=>x===p?g.Children.count(h)>1?g.Children.only(null):g.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...u,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return l.jsx(t,{...u,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function X2(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const u=eE(i),d=Z2(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fu(o,u):u),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Q2=Symbol("radix.slottable");function J2(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q2}function Z2(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function eE(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.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 mu="Dialog",[u0,c0]=Vo(mu),[tE,dr]=u0(mu),d0=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:u=!0}=e,d=g.useRef(null),p=g.useRef(null),[h,m]=pu({prop:o,defaultProp:i??!1,onChange:a,caller:mu});return l.jsx(tE,{scope:t,triggerRef:d,contentRef:p,contentId:Cs(),titleId:Cs(),descriptionId:Cs(),open:h,onOpenChange:m,onOpenToggle:g.useCallback(()=>m(x=>!x),[m]),modal:u,children:n})};d0.displayName=mu;var f0="DialogTrigger",p0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=dr(f0,n),a=nn(t,i.triggerRef);return l.jsx(St.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ap(i.open),...o,ref:a,onClick:lt(e.onClick,i.onOpenToggle)})});p0.displayName=f0;var ip="DialogPortal",[nE,h0]=u0(ip,{forceMount:void 0}),m0=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,a=dr(ip,t);return l.jsx(nE,{scope:t,forceMount:n,children:g.Children.map(o,u=>l.jsx(qo,{present:n||a.open,children:l.jsx(sp,{asChild:!0,container:i,children:u})}))})};m0.displayName=ip;var Ga="DialogOverlay",g0=g.forwardRef((e,t)=>{const n=h0(Ga,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=dr(Ga,e.__scopeDialog);return a.modal?l.jsx(qo,{present:o||a.open,children:l.jsx(oE,{...i,ref:t})}):null});g0.displayName=Ga;var rE=Y2("DialogOverlay.RemoveScroll"),oE=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=dr(Ga,n);return l.jsx(l0,{as:rE,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(St.div,{"data-state":ap(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ho="DialogContent",x0=g.forwardRef((e,t)=>{const n=h0(Ho,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=dr(Ho,e.__scopeDialog);return l.jsx(qo,{present:o||a.open,children:a.modal?l.jsx(sE,{...i,ref:t}):l.jsx(iE,{...i,ref:t})})});x0.displayName=Ho;var sE=g.forwardRef((e,t)=>{const n=dr(Ho,e.__scopeDialog),o=g.useRef(null),i=nn(t,n.contentRef,o);return g.useEffect(()=>{const a=o.current;if(a)return G2(a)},[]),l.jsx(y0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:lt(e.onCloseAutoFocus,a=>{var u;a.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:lt(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&a.preventDefault()}),onFocusOutside:lt(e.onFocusOutside,a=>a.preventDefault())})}),iE=g.forwardRef((e,t)=>{const n=dr(Ho,e.__scopeDialog),o=g.useRef(!1),i=g.useRef(!1);return l.jsx(y0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var u,d;(u=e.onCloseAutoFocus)==null||u.call(e,a),a.defaultPrevented||(o.current||(d=n.triggerRef.current)==null||d.focus(),a.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:a=>{var p,h;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=a.target;((h=n.triggerRef.current)==null?void 0:h.contains(u))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),y0=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...u}=e,d=dr(Ho,n),p=g.useRef(null),h=nn(t,p);return a2(),l.jsxs(l.Fragment,{children:[l.jsx(Jv,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(op,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":ap(d.open),...u,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(aE,{titleId:d.titleId}),l.jsx(cE,{contentRef:p,descriptionId:d.descriptionId})]})]})}),lp="DialogTitle",v0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=dr(lp,n);return l.jsx(St.h2,{id:i.titleId,...o,ref:t})});v0.displayName=lp;var b0="DialogDescription",w0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=dr(b0,n);return l.jsx(St.p,{id:i.descriptionId,...o,ref:t})});w0.displayName=b0;var k0="DialogClose",S0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=dr(k0,n);return l.jsx(St.button,{type:"button",...o,ref:t,onClick:lt(e.onClick,()=>i.onOpenChange(!1))})});S0.displayName=k0;function ap(e){return e?"open":"closed"}var j0="DialogTitleWarning",[lE,C0]=RN(j0,{contentName:Ho,titleName:lp,docsSlug:"dialog"}),aE=({titleId:e})=>{const t=C0(j0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
427
-
428
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
429
-
430
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},uE="DialogDescriptionWarning",cE=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${C0(uE).contentName}}.`;return g.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},N0=d0,dE=p0,E0=m0,up=g0,cp=x0,dp=v0,fp=w0,R0=S0;const pp=N0,fE=E0,P0=g.forwardRef(({className:e,...t},n)=>l.jsx(up,{ref:n,className:Fe("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));P0.displayName=up.displayName;const gu=g.forwardRef(({className:e,children:t,...n},o)=>l.jsxs(fE,{children:[l.jsx(P0,{}),l.jsx(cp,{ref:o,className:Fe("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})]}));gu.displayName=cp.displayName;function pE({className:e,...t}){return l.jsx("div",{className:Fe("flex flex-col space-y-2 text-left",e),...t})}function hE({className:e,...t}){return l.jsx("div",{className:Fe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const xu=g.forwardRef(({className:e,...t},n)=>l.jsx(dp,{ref:n,className:Fe("text-lg font-semibold tracking-tight text-foreground",e),...t}));xu.displayName=dp.displayName;const hp=g.forwardRef(({className:e,...t},n)=>l.jsx(fp,{ref:n,className:Fe("text-sm leading-6 text-muted-foreground",e),...t}));hp.displayName=fp.displayName;const mE=-1,gE=-40;function $d(e,t){if(e.length===0)return 0;if(t.length===0)return-1/0;let n=0,o=0,i=-2,a=0;for(let u=0;u<e.length;u++){const d=e[u];let p=!1;for(;o<t.length;)if(t[o]===d){if(n+=100,o===i+1&&(n+=20),o===0)n+=30;else{const h=t[o-1];(h===" "||h==="-"||h==="_"||h==="/")&&(n+=15)}a>0&&(n+=Math.max(gE,a*mE)),i=o,a=0,o++,p=!0;break}else a++,o++;if(!p)return-1/0}return n}const dx={page:0,project:1,assignment:2,playbook:3,server:4,todo:5};function xE(e,t,n=50){const o=e.toLowerCase();if(!o)return t.slice(0,n).map(u=>({...u,score:0}));const a=t.map(u=>{var x;const d=$d(o,u.title.toLowerCase())*1,p=u.subtitle?$d(o,u.subtitle.toLowerCase())*.5:-1/0,h=(x=u.keywords)!=null&&x.length?$d(o,u.keywords.join(" ").toLowerCase())*.3:-1/0,m=Math.max(d,p,h);return{...u,score:m}}).filter(u=>u.score>-1/0);return a.sort((u,d)=>d.score!==u.score?d.score-u.score:u.title.length!==d.title.length?u.title.length-d.title.length:u.title!==d.title?u.title<d.title?-1:1:(dx[u.type]??99)-(dx[d.type]??99)),a.slice(0,n)}const yE={page:"Page",project:"Project",assignment:"Assignment",playbook:"Playbook",server:"Server",todo:"Todo"};function vE({entries:e}){const{paletteOpen:t,closePalette:n}=$s(),o=qt(),[i,a]=g.useState(""),[u,d]=g.useState(0),p=g.useRef(null),h=g.useMemo(()=>xE(i,e,50),[i,e]);g.useEffect(()=>{d(0)},[i,t]),g.useEffect(()=>{t||a("")},[t]),g.useEffect(()=>{var b;const v=(b=p.current)==null?void 0:b.querySelector(`[data-palette-idx="${u}"]`);v==null||v.scrollIntoView({block:"nearest"})},[u]);function m(v){o(v.route),n()}function x(v){if(v.key==="ArrowDown")v.preventDefault(),d(b=>Math.min(h.length-1,b+1));else if(v.key==="ArrowUp")v.preventDefault(),d(b=>Math.max(0,b-1));else if(v.key==="Enter"){v.preventDefault();const b=h[u];b&&m(b)}}return l.jsx(pp,{open:t,onOpenChange:v=>v?null:n(),children:l.jsxs(gu,{className:"max-w-xl p-0 gap-0",children:[l.jsx(xu,{className:"sr-only",children:"Command palette"}),l.jsx("input",{autoFocus:!0,type:"text",value:i,onChange:v=>a(v.target.value),onKeyDown:x,placeholder:"Search projects, assignments, playbooks, servers, todos…",className:"w-full rounded-t-xl border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0"}),l.jsx("div",{ref:p,className:"max-h-[60vh] overflow-y-auto p-1",children:h.length===0?l.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:i?"No matches":"Start typing to search"}):h.map((v,b)=>{const N=b===u;return l.jsxs("button",{type:"button","data-palette-idx":b,onClick:()=>m(v),onMouseEnter:()=>d(b),className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors ${N?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[l.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:yE[v.type]??v.type}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:v.title}),v.subtitle?l.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:v.subtitle}):null]},v.id)})}),l.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[l.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," open ","·"," Esc close"]}),l.jsxs("span",{children:[h.length," result",h.length===1?"":"s"]})]})]})})}const bE={global:"Global","list:projects":"Projects list","list:assignments":"Assignments list","list:todos":"Todos list",assignment:"Assignment detail",project:"Project detail"},wE=["global","list:projects","list:assignments","list:todos","project","assignment"];function kE(e){if(e.includes(" ")){const[t,n]=e.split(" ");return`${js(t)} then ${js(n)}`}return js(e)}function SE(){const{cheatsheetOpen:e,closeCheatsheet:t,listBindings:n}=$s(),o=g.useMemo(()=>{if(!e)return new Map;const i=n(),a=new Map;for(const u of i){const d=a.get(u.scope)??[];d.push({keys:u.keys,description:u.description}),a.set(u.scope,d)}return a},[e,n]);return l.jsx(pp,{open:e,onOpenChange:i=>i?null:t(),children:l.jsxs(gu,{className:"max-w-2xl",children:[l.jsx(xu,{children:"Keyboard shortcuts"}),l.jsxs(hp,{children:["Press Esc to close. ",js("Mod+k")," opens the command palette. Press g twice to restart the chord timer."]}),l.jsx("div",{className:"mt-2 max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:wE.map(i=>{const a=o.get(i);return!a||a.length===0?null:l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:bE[i]}),l.jsx("ul",{className:"space-y-1",children:a.map((u,d)=>l.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-1.5 text-sm",children:[l.jsx("span",{className:"text-foreground",children:u.description}),l.jsx("kbd",{className:"shrink-0 rounded border border-border/70 bg-muted px-2 py-0.5 font-mono text-xs text-muted-foreground",children:kE(u.keys)})]},`${i}-${u.keys}-${d}`))})]},i)})})]})})}const fx=1500;function jE(e){const t=e.match(/^\/w\/([^/]+)(?:\/|$)/);return t?`/w/${t[1]}`:""}const T0=g.createContext(null);function CE({children:e}){const{toggleTheme:t}=$v(),n=cn(),o=qt(),i=jE(n.pathname),a=du(),u=zv(),d=Wv(),p=np(),h=rp(),m=g.useMemo(()=>{var R,F,Z,L;const Q=a.data??[],I=((R=u.data)==null?void 0:R.assignments)??[],D=((F=d.data)==null?void 0:F.playbooks)??[],V=((Z=p.data)==null?void 0:Z.sessions)??[],te=(((L=h.data)==null?void 0:L.workspaces)??[]).flatMap(de=>de.items.map(ge=>({...ge,workspace:de.workspace})));return EN({projects:Q,assignments:I,playbooks:D,servers:V,todos:te,wsPrefix:i})},[a.data,u.data,d.data,p.data,h.data,i]),x=g.useRef(new Map),v=g.useRef(["global"]),b=g.useRef({phase:"idle"}),N=g.useRef(null),k=g.useRef(1),[S,C]=g.useState(!1),[T,A]=g.useState(!1),_=g.useCallback(Q=>{const I=k.current++;return x.current.set(I,{...Q,id:I}),I},[]),O=g.useCallback(Q=>{x.current.delete(Q)},[]),P=g.useCallback(Q=>{v.current.push(Q)},[]),$=g.useCallback(Q=>{const I=v.current;for(let D=I.length-1;D>=0;D--)if(I[D]===Q){I.splice(D,1);return}},[]),E=g.useCallback(()=>C(!0),[]),U=g.useCallback(()=>C(!1),[]),ee=g.useCallback(()=>A(!0),[]),Y=g.useCallback(()=>A(!1),[]),q=g.useCallback(()=>Array.from(x.current.values()),[]);g.useEffect(()=>{b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[n.pathname]),g.useEffect(()=>{function Q(te){if(!(te instanceof HTMLElement))return!1;const R=te.tagName;return!!(R==="INPUT"||R==="TEXTAREA"||R==="SELECT"||te.isContentEditable||te.closest('[role="combobox"], [role="textbox"]'))}function I(){return!!(document.querySelector('[role="dialog"][data-state="open"]')||document.querySelector('[role="alertdialog"][data-state="open"]'))}function D(){const te=v.current;return te[te.length-1]??"global"}function V(te){return te.scope==="global"?!0:te.scope===D()}function H(te){const R=Td(te,"Mod+k"),F=te.key==="Escape";if(I()&&!R&&!F||Q(te.target)&&!R&&!F)return;const Z=b.current;if(Z.phase==="awaiting-second")if(Date.now()-Z.startedAt>fx)b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null);else{const ge=Array.from(x.current.values());for(const fe of ge){if(!V(fe))continue;const je=fe.keys.split(" ");if(!(je.length!==2||je[0]!=="g")&&Td(te,je[1])&&!(fe.when&&!fe.when())){te.preventDefault(),b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null),fe.handler(te);return}}b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null)}const L=Array.from(x.current.values());for(const de of L){if(!V(de))continue;const ge=de.keys.split(" ");if(ge.length===1&&Td(te,ge[0])&&!(de.when&&!de.when())){te.preventDefault(),de.handler(te);return}}te.key==="g"&&!te.metaKey&&!te.ctrlKey&&!te.altKey&&!te.shiftKey&&Array.from(x.current.values()).some(ge=>V(ge)&&ge.keys.startsWith("g "))&&(te.preventDefault(),b.current={phase:"awaiting-second",startedAt:Date.now()},N.current!==null&&window.clearTimeout(N.current),N.current=window.setTimeout(()=>{b.current={phase:"idle"},N.current=null},fx))}return window.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H),N.current!==null&&(window.clearTimeout(N.current),N.current=null)}},[]),g.useEffect(()=>{const Q=_({keys:"Shift+t",handler:()=>t(),scope:"global",description:"Toggle light/dark theme"});return()=>O(Q)},[_,O,t]),g.useEffect(()=>{const Q=_({keys:"?",scope:"global",description:"Show keyboard shortcuts",handler:()=>ee()});return()=>O(Q)},[_,O,ee]),g.useEffect(()=>{const Q=_({keys:"Mod+k",scope:"global",description:"Open command palette",handler:()=>{if(S){U();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||E()}});return()=>O(Q)},[_,O,E,U,S]),g.useEffect(()=>{const I=[{suffix:"o",basePath:"/",desc:"Go to Overview"},{suffix:"m",basePath:"/projects",desc:"Go to Projects"},{suffix:"a",basePath:"/assignments",desc:"Go to Assignments"},{suffix:"t",basePath:"/todos",desc:"Go to Todos"},{suffix:"s",basePath:"/servers",desc:"Go to Servers"},{suffix:"!",basePath:"/attention",desc:"Go to Attention"},{suffix:",",basePath:"/settings",desc:"Go to Settings"}].map(D=>_({keys:`g ${D.suffix}`,scope:"global",description:D.desc,handler:()=>o(Fa(D.basePath,i))}));return()=>I.forEach(O)},[_,O,o,i]);const X=g.useMemo(()=>({register:_,unregister:O,pushScope:P,popScope:$,openPalette:E,closePalette:U,paletteOpen:S,openCheatsheet:ee,closeCheatsheet:Y,cheatsheetOpen:T,listBindings:q,wsPrefix:i,paletteEntries:m}),[_,O,P,$,E,U,S,ee,Y,T,q,i,m]);return l.jsxs(T0.Provider,{value:X,children:[e,l.jsx(vE,{entries:m}),l.jsx(SE,{})]})}function $s(){const e=g.useContext(T0);if(!e)throw new Error("useHotkeyContext must be used within HotkeyProvider");return e}function gt({keys:e,handler:t,scope:n="global",description:o,when:i,enabled:a=!0}){const{register:u,unregister:d}=$s(),p=g.useRef(t),h=g.useRef(i);g.useEffect(()=>{p.current=t,h.current=i},[t,i]),g.useEffect(()=>{if(!a)return;const m=u({keys:e,handler:x=>p.current(x),scope:n,description:o,when:h.current?()=>h.current():void 0});return()=>d(m)},[u,d,e,n,o,a])}function Fs(e){const{pushScope:t,popScope:n}=$s();g.useEffect(()=>(t(e),()=>n(e)),[t,n,e])}function yu(e,t){const[n,o]=g.useState(e.length===0?-1:0),i=cn();g.useEffect(()=>{o(e.length===0?-1:0)},[i.pathname]),g.useEffect(()=>{o(u=>e.length===0?-1:Math.min(Math.max(0,u),e.length-1))},[e.length]),g.useEffect(()=>{if(document.querySelectorAll("[data-hotkey-row-index]").forEach(d=>{const p=Number(d.getAttribute("data-hotkey-row-index"));d.setAttribute("data-hotkey-selected",p===n?"true":"false")}),n>=0){const d=document.querySelector(`[data-hotkey-row-index="${n}"]`);d==null||d.scrollIntoView({block:"nearest"})}},[n,e.length]),gt({keys:"j",scope:t.scope,description:"Select next row",handler:()=>o(u=>e.length===0?-1:Math.min(e.length-1,u<0?0:u+1))}),gt({keys:"k",scope:t.scope,description:"Select previous row",handler:()=>o(u=>e.length===0?-1:Math.max(0,u<0?0:u-1))}),gt({keys:"Enter",scope:t.scope,description:"Open selected row",handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}}),gt({keys:"o",scope:t.scope,description:"Open selected row",enabled:t.bindO??!0,handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}});const a=g.useCallback(u=>({"data-hotkey-row-index":u,"data-hotkey-selected":u===n?"true":"false"}),[n]);return{selectedIndex:n,hotkeyRowProps:a}}function NE({title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:o}){const i=Lt(),{resolvedTheme:a,toggleTheme:u}=$v(),{openPalette:d}=$s();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:o,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(mC,{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((p,h)=>l.jsxs("span",{className:"flex items-center gap-1.5",children:[h>0?l.jsx("span",{children:"/"}):null,l.jsx(Re,{to:p.path,className:"hover:text-foreground",children:p.label})]},p.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.jsxs("button",{type:"button",onClick:d,className:"shell-action","aria-label":"Open command palette",children:[l.jsx(sl,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline font-mono text-xs",children:js("Mod+k")})]}),l.jsx(Re,{className:"shell-action",to:"/help",children:"Help"}),l.jsxs(Re,{className:"shell-action",to:`${i}/create/project`,children:[l.jsx(ir,{className:"h-4 w-4"}),l.jsx("span",{children:"New Project"})]}),n?l.jsxs(Re,{className:"shell-action",to:`${i}/projects/${n}/create/assignment`,children:[l.jsx(ir,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}):null,l.jsxs("button",{type:"button",onClick:u,className:"shell-action","aria-label":"Toggle theme",children:[a==="dark"?l.jsx(CC,{className:"h-4 w-4"}):l.jsx(gC,{className:"h-4 w-4"}),l.jsx("span",{children:a==="dark"?"Light":"Dark"})]})]})]})})}const EE=[{to:"/",label:"Overview",icon:tC},{to:"/attention",label:"Attention",icon:il},{to:"/playbooks",label:"Playbooks",icon:gv},{to:"/todos",label:"Todos",icon:jr}],RE=[{suffix:"/projects",label:"Projects",icon:Xf},{suffix:"/assignments",label:"Assignments",icon:hC},{suffix:"/servers",label:"Servers",icon:Qf},{suffix:"/agent-sessions",label:"Agent Sessions",icon:cu},{suffix:"/todos",label:"Todos",icon:jr}],PE=[{to:"/help",label:"Help",icon:fC},{to:"/settings",label:"Settings",icon:SC}],px="syntaur.dashboard.sourceFirstNoticeDismissed";function TE({title:e,breadcrumbs:t,projectSlug:n,workspace:o,children:i}){const[a,u]=g.useState(!1);gt({keys:"Escape",scope:"global",description:"Close mobile navigation",enabled:a,handler:()=>u(!1)});const[d,p]=g.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(px)==="1"}catch{return!1}});function h(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem(px,"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(hx,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:o})}),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(Re,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>u(!1),children:"Syntaur"}),l.jsx("button",{type:"button",onClick:()=>u(!1),className:"inline-flex h-9 w-9 items-center justify-center rounded-md border border-border/70 bg-background/80",children:l.jsx(Nv,{className:"h-4 w-4"})})]}),l.jsx(hx,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:o,onNavigate:()=>u(!1)})]})}):null,l.jsxs("div",{className:"min-w-0",children:[l.jsx(NE,{title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:()=>u(!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 hx({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:o}){const{data:i}=tp(),a=(i==null?void 0:i.workspaces)??[],u=(i==null?void 0:i.hasUngrouped)??!1,d=cn(),[p,h]=g.useState(new Set),[m,x]=g.useState(!1),[v,b]=g.useState(""),N=qt();function k(C){h(T=>{const A=new Set(T);return A.has(C)?A.delete(C):A.add(C),A})}const S=[...a,...u?["_ungrouped"]:[]];return l.jsxs("div",{className:"flex h-full flex-col gap-3",children:[l.jsx("div",{className:"space-y-3",children:l.jsxs(Re,{to:"/",className:"inline-flex items-center gap-3",onClick:o,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 project control"})]})]})}),l.jsx(Qg,{items:EE,onNavigate:o}),l.jsx("div",{className:"border-t border-border/40"}),l.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[S.length===0&&!m&&l.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),S.map(C=>{const T=C==="_ungrouped",A=T?"Ungrouped":un(C),_=T?"/w/_ungrouped":`/w/${C}`,O=p.has(C),P=n===C||n===null&&T&&d.pathname.startsWith("/w/_ungrouped");return l.jsxs("div",{children:[l.jsxs("button",{type:"button",onClick:()=>k(C),className:`flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-semibold uppercase tracking-wider transition ${P?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[l.jsx(Gi,{className:`h-3 w-3 transition-transform ${O?"-rotate-90":""}`}),A]}),!O&&l.jsx("nav",{className:"ml-2 space-y-0.5",children:RE.map($=>{const E=`${_}${$.suffix}`,U=Iv(d.pathname,$.suffix)&&d.pathname.startsWith(_),ee=$.icon;return l.jsxs(Re,{to:E,onClick:o,className:`flex items-center gap-3 rounded-md px-3 py-1.5 text-sm font-medium transition ${U?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"}`,children:[l.jsx(ee,{className:"h-4 w-4"}),l.jsx("span",{children:$.label})]},E)})})]},C)}),m?l.jsx("form",{className:"px-3 py-1.5",onSubmit:C=>{C.preventDefault();const T=v.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");T&&(x(!1),b(""),fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:T})}).then(()=>{o==null||o(),N(`/w/${T}/projects`)}))},children:l.jsx("input",{autoFocus:!0,type:"text",value:v,onChange:C=>b(C.target.value),onKeyDown:C=>{C.key==="Escape"&&(x(!1),b(""))},onBlur:()=>{v.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(ir,{className:"h-3 w-3"}),"New Workspace"]})]}),l.jsx("div",{className:"border-t border-border/40"}),l.jsx(Qg,{items:PE,onNavigate:o}),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:"Project 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(Nv,{className:"h-4 w-4"})})]})})]})}function AE(){const e=cn(),{workspace:t}=Dt(),{title:n,breadcrumbs:o,projectSlug:i}=dN(e.pathname);return l.jsx(TE,{title:n,breadcrumbs:o,projectSlug:i,workspace:t??null,children:l.jsx(aj,{})})}const Ya={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:Zj},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:kv},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:ff},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:bC},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:yv},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:ff},active:{label:"Active",description:"The project 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:pf},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:Qj},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:pf}};function Vt({status:e,className:t,showIcon:n=!0,progress:o}){const i=Ya[e]??{label:e.replace(/_/g," ").replace(/\b\w/g,m=>m.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:pf},a=i.icon,u=o&&o.total>0,d=u?Math.min(1,Math.max(0,o.checked/o.total)):0,p=u?`${i.description} (${o.checked}/${o.total} criteria)`:i.description,h=n?u?l.jsxs("span",{className:"relative inline-flex h-3.5 w-3.5 items-center justify-center",children:[l.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"absolute inset-0 h-full w-full -rotate-90",children:[l.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"1.5"}),l.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:2*Math.PI*7,strokeDashoffset:2*Math.PI*7*(1-d)})]}),l.jsx(a,{className:"h-2.5 w-2.5"})]}):l.jsx(a,{className:"h-3.5 w-3.5"}):null;return l.jsxs("span",{title:p,className:Fe("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold tracking-wide",i.className,t),children:[h,l.jsx("span",{children:i.label})]})}function A0(e){var t;return((t=Ya[e])==null?void 0:t.description)??`Status: ${e}`}const DE={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 ot({label:e,value:t,description:n,icon:o,tone:i="default",to:a}){const u=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})]}),o?l.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:l.jsx(o,{className:"h-5 w-5"})}):null]}),n?l.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=Fe("rounded-lg border p-3 shadow-sm",DE[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(Re,{to:a,className:d,children:u}):l.jsx("article",{className:d,children:u})}function De({title:e,description:t,children:n,className:o,actions:i}){return l.jsxs("section",{className:Fe("surface-panel space-y-3",o),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 jt({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 Ct({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 vt({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 Ua({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 LE({help:e,compact:t=!1}){const n=t?(e==null?void 0:e.firstProjectChecklist.slice(0,3))??[]:(e==null?void 0:e.firstProjectChecklist)??[];return l.jsx(De,{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(Re,{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((o,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:o.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:o.detail}),o.command?l.jsx(Ua,{command:o.command.command,example:o.command.example}):null]})]})},o.title))})})}function IE(){var u;const{data:e,loading:t,error:n}=mN(),{data:o}=Bv(),{data:i}=rp(),a=i!=null&&i.workspaces?i.workspaces.reduce((d,p)=>d+p.counts.open+p.counts.in_progress,0):0;return t?l.jsx(jt,{label:"Loading overview…"}):n||!e?l.jsx(Ct,{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(ot,{label:"Active Projects",value:e.stats.activeProjects,icon:Xf,to:"/projects"}),l.jsx(ot,{label:"In Progress",value:e.stats.inProgressAssignments,icon:aC,tone:"info",to:"/assignments?status=in_progress"}),l.jsx(ot,{label:"Blocked",value:e.stats.blockedAssignments,icon:il,tone:"warn",to:"/assignments?status=blocked"}),l.jsx(ot,{label:"Review",value:e.stats.reviewAssignments,icon:Jj,tone:"info",to:"/assignments?status=review"}),l.jsx(ot,{label:"Failed",value:e.stats.failedAssignments,icon:xC,tone:"danger",to:"/assignments?status=failed"}),l.jsx(ot,{label:"Stale",value:e.stats.staleAssignments,icon:cu,to:"/assignments?stale=1"}),l.jsx(ot,{label:"Open Todos",value:a,icon:jr,to:"/todos"}),l.jsx(ot,{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:Qf,tone:(u=e.serverStats)!=null&&u.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(De,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?l.jsx(vt,{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(Re,{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.projectTitle})]}),l.jsx(Vt,{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 ",Cr(d.updated)]})]},d.id))})}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(De,{title:"Recently Updated Projects",children:e.recentProjects.length===0?l.jsx(vt,{title:"No projects yet",description:"Create your first project to populate the project directory, recent activity, and attention queue.",actions:l.jsx(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:"/create/project",children:"Create Project"})}):l.jsx("div",{className:"space-y-3",children:e.recentProjects.map(d=>l.jsx(Re,{to:`/projects/${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:Cr(d.updated)})]}),l.jsx(Vt,{status:d.status})]})},d.slug))})}),l.jsx(De,{title:"Recent Activity",children:e.recentActivity.length===0?l.jsx(vt,{title:"No activity yet",description:"Once projects 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(Re,{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:un(d.type)})]}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Cr(d.updated)})]},d.id))})})]})]}),e.firstRun&&l.jsx(LE,{help:o})]})]})}function OE(){const{data:e,loading:t,error:n}=gN();return t?l.jsx(jt,{label:"Loading attention queue…"}):n||!e?l.jsx(Ct,{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(ot,{label:"Critical",value:e.summary.critical,icon:lC,tone:"danger"}),l.jsx(ot,{label:"High",value:e.summary.high,icon:il,tone:"warn"}),l.jsx(ot,{label:"Medium",value:e.summary.medium,icon:jC,tone:"info"}),l.jsx(ot,{label:"Low",value:e.summary.low,icon:dC})]}),l.jsx(De,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?l.jsx(vt,{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(o=>l.jsxs(Re,{to:o.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:o.assignmentTitle}),l.jsx("p",{className:"text-sm text-muted-foreground",children:o.projectTitle})]}),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:o.severity}),l.jsx(Vt,{status:o.status})]})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:o.reason}),l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",Cr(o.updated)]})]},o.id))})})]})}function _E({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 ME(){const{data:e,loading:t,error:n}=Bv(),{openCheatsheet:o}=$s();return t?l.jsx(jt,{label:"Loading help…"}):n||!e?l.jsx(Ct,{error:n||"Help content is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsx(De,{title:"Keyboard Shortcuts",description:"Navigate the dashboard without reaching for the mouse.",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 rounded-md border border-border/70 bg-background/80 px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent",children:"Open shortcuts cheatsheet"}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["or press ",l.jsx("kbd",{className:"rounded border border-border/70 bg-muted px-1.5 py-0.5 font-mono text-[11px]",children:"?"})," ","anywhere. ",js("Mod+k")," opens the command palette."]})]})}),l.jsx(De,{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(i=>l.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3 text-sm leading-6 text-muted-foreground",children:i},i))})}),l.jsx(De,{title:"Getting Started",children:l.jsx("div",{className:"space-y-3",children:e.workflow.map((i,a)=>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:a+1}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?l.jsx(Ua,{command:i.command.command,description:i.command.description,example:i.command.example}):null,i.href?l.jsx(Re,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsxs(De,{title:"Core Concepts",children:[l.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(i=>l.jsx(_E,{term:i.term,description:i.description},i.term))}),l.jsx("div",{className:"grid gap-3 pt-2",children:e.coreConcepts.map(i=>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:i.term}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.term))})]}),l.jsx(De,{title:"Status Guide",children:l.jsx("div",{className:"space-y-3",children:e.statusGuide.map(i=>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(Vt,{status:i.status}),l.jsx("p",{className:"font-semibold text-foreground",children:i.meaning})]}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:i.useWhen})]},i.status))})})]}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsx(De,{title:"Ownership And File Rules",children:l.jsx("div",{className:"space-y-3",children:e.ownershipRules.map(i=>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:i.label}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description}),l.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:i.files.map(a=>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:a},a))})]},i.label))})}),l.jsx(De,{title:"How To Navigate The Dashboard",children:l.jsx("div",{className:"space-y-3",children:e.navigation.map(i=>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:i.label}),l.jsx(Re,{className:"text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open"})]}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.label))})})]}),l.jsx(De,{title:"CLI Quick Reference",children:l.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(i=>l.jsx(Ua,{command:i.command,description:i.description,example:i.example},i.command))})}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[l.jsx(De,{title:"FAQ",children:l.jsx("div",{className:"space-y-3",children:e.faq.map(i=>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:i.question}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.answer})]},i.question))})}),l.jsx(De,{title:"First Project Checklist",children:l.jsx("div",{className:"space-y-3",children:e.firstProjectChecklist.map((i,a)=>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:a+1}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?l.jsx(Ua,{command:i.command.command,example:i.command.example}):null,i.href?l.jsx(Re,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})})]})]})}function mp({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})}const vu=g.forwardRef(({value:e,onChange:t,placeholder:n="Search"},o)=>l.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[l.jsx(sl,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),l.jsx("input",{ref:o,value:e,onChange:i=>t(i.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"})]}));vu.displayName="SearchInput";function gp({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(o=>l.jsx("button",{type:"button",onClick:()=>n(o.value),className:Fe("rounded-sm px-2.5 py-1.5 text-sm font-medium transition",e===o.value?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),children:o.label},o.value))})}function D0({columns:e,items:t,getItemId:n,getColumnId:o,renderCard:i,canDrop:a,onMove:u,emptyMessage:d="No cards in this column."}){const[p,h]=g.useState(null),[m,x]=g.useState(null),v=g.useRef(null),b=g.useMemo(()=>new Map(t.map(O=>[n(O),O])),[n,t]),N=g.useMemo(()=>e.map(O=>({column:O,items:t.filter(P=>o(P)===O.id)})),[e,o,t]),k=p?b.get(p)??null:null;function S(O){if(!k)return{allowed:!1};const P=o(k);return(a==null?void 0:a({item:k,fromColumnId:P,toColumnId:O}))??{allowed:!0}}function C(){h(null),x(null)}function T(O,P){u&&(O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",P),h(P))}function A(O,P,$){!u||!k||!S(P).allowed||(O.preventDefault(),O.dataTransfer.dropEffect="move",x(U=>(U==null?void 0:U.columnId)===P&&U.index===$?U:{columnId:P,index:$}))}async function _(O,P,$){var q;if(O.preventDefault(),!u||!k){C();return}const E=o(k),ee=(((q=N.find(X=>X.column.id===E))==null?void 0:q.items)??[]).findIndex(X=>n(X)===n(k));if(!S(P).allowed||ee<0){C();return}if(E===P&&($===ee||$===ee+1)){C();return}try{await u({item:k,fromColumnId:E,toColumnId:P,fromIndex:ee,toIndex:$})}finally{C()}}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:N.map(({column:O,items:P})=>{const $=S(O.id),E=(m==null?void 0:m.columnId)===O.id;return l.jsxs("section",{className:Fe("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",k&&!$.allowed?"border-dashed opacity-65":"",k&&$.allowed?"border-primary/30 bg-accent/30":"",E?"ring-2 ring-ring/30":""),title:k&&!$.allowed?$.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:O.title}),O.description?l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:O.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:P.length})]}),l.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:U=>A(U,O.id,P.length),onDrop:U=>_(U,O.id,P.length),children:[P.length===0?l.jsx($E,{active:(m==null?void 0:m.columnId)===O.id&&m.index===0,disabled:!!k&&!$.allowed,children:typeof d=="function"?d(O):d}):null,P.map((U,ee)=>{const Y=n(U),q=p===Y;return l.jsxs(g.Fragment,{children:[l.jsx("div",{className:Fe("h-2 rounded-full transition",(m==null?void 0:m.columnId)===O.id&&m.index===ee?"bg-primary/70":"bg-transparent"),onDragOver:X=>A(X,O.id,ee),onDrop:X=>_(X,O.id,ee)}),l.jsx("div",{draggable:!!u,onMouseDown:X=>{v.current=X.target},onDragStart:X=>{const Q=v.current;if(Q!=null&&Q.closest("a, button")){X.preventDefault();return}T(X,Y)},onDragEnd:C,className:Fe("transition",u?"cursor-grab active:cursor-grabbing":"",q?"scale-[0.98] opacity-50":""),children:i(U,{dragging:q})})]},Y)}),P.length>0?l.jsx("div",{className:Fe("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)===O.id&&m.index===P.length?"border-primary/50 bg-primary/10 text-foreground":"border-border/60",k&&!$.allowed?"opacity-40":""),children:"Drop here to place at the end"}):null]})]},O.id)})})})}function $E({active:e,disabled:t,children:n}){return l.jsx("div",{className:Fe("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 L0={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 Mi=null,Bo=null;function FE(){return Mi?Promise.resolve(Mi):Bo||(Bo=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(Mi=e,Bo=null,e)).catch(()=>(Bo=null,L0)),Bo)}function bu(){const[e,t]=g.useState(()=>Mi??L0);return g.useEffect(()=>{FE().then(t)},[]),e}function mx(){Mi=null,Bo=null}function zE(e,t){const n=e.statuses.find(o=>o.id===t);return(n==null?void 0:n.label)??t.replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())}const BE={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"},gx=["bg-cyan-500","bg-indigo-500","bg-orange-500","bg-pink-500","bg-lime-500","bg-fuchsia-500"];function Xa({progress:e,className:t,showLegend:n=!1}){const o=bu(),i=g.useMemo(()=>{let u=0;return(o.order.length>0?o.order:Object.keys(e).filter(p=>p!=="total")).map(p=>({key:p,className:BE[p]??gx[u++%gx.length]}))},[o.order,e]),a=i.filter(u=>(e[u.key]??0)>0);return l.jsxs("div",{className:Fe("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(u=>l.jsx("div",{className:u.className,style:{width:`${(e[u.key]??0)/e.total*100}%`},title:`${un(u.key)}: ${e[u.key]??0}`},u.key))}),n?l.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(u=>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:Fe("h-2 w-2 rounded-full",u.className)}),l.jsx("span",{children:un(u.key)}),l.jsx("span",{className:"font-medium text-foreground",children:e[u.key]??0})]},u.key))}):null]})}const UE=["pending","active","blocked","failed","completed","archived"],xp=UE,HE=["pending","in_progress","blocked","review","completed","failed"];function WE(e){return e&&e.length>0?e:[...HE]}function VE(e,t,n){if(t<0||t>=e.length)return e;const o=[...e],[i]=o.splice(t,1),a=t<n?n-1:n;return o.splice(Math.max(0,Math.min(a,o.length)),0,i),o}function xx(){const{workspace:e}=Dt(),t=Lt(),n=qt(),{data:o,loading:i,error:a,refetch:u}=du(),d=g.useRef(null);Fs("list:projects");const[p,h]=g.useState(""),[m,x]=g.useState("all"),[v,b]=g.useState("active"),[N,k]=g.useState("all"),[S,C]=g.useState("updated"),[T,A]=ol(),_=T.get("view"),O=_==="table"||_==="kanban"?_:"cards",P=D=>{A(V=>{const H=new URLSearchParams(V);return D==="cards"?H.delete("view"):H.set("view",D),H})},[$,E]=g.useState({}),U=g.useMemo(()=>o?o.filter(D=>{if(e){if(e==="_ungrouped"){if(D.workspace!==null)return!1}else if(D.workspace!==e)return!1}return v==="active"&&D.archived||v==="archived"&&!D.archived||m!=="all"&&D.status!==m||N!=="all"&&!D.tags.includes(N)?!1:p.trim()?`${D.title} ${D.tags.join(" ")} ${D.slug}`.toLowerCase().includes(p.toLowerCase()):!0}).sort((D,V)=>GE(D,V,S)):[],[o,p,m,v,N,S,e]),ee=U.map(D=>`${D.slug}:${D.status}`).join("|");g.useEffect(()=>{E(YE(U))},[ee,S]);const Y=g.useMemo(()=>{const D=new Map(U.map(V=>[V.slug,V]));return xp.flatMap(V=>($[V]??U.filter(te=>te.status===V).map(te=>te.slug)).map(te=>D.get(te)).filter(te=>!!te))},[U,$]),{visibleItems:q,visibleIndexByKey:X}=g.useMemo(()=>{const D=O==="kanban"?Y:U,V=new Map;return D.forEach((H,te)=>V.set(H.slug,te)),{visibleItems:D,visibleIndexByKey:V}},[O,U,Y]),{hotkeyRowProps:Q}=yu(q,{scope:"list:projects",onOpen:D=>n(`${t}/projects/${D.slug}`)});if(gt({keys:"/",scope:"list:projects",description:"Focus filter",handler:()=>{var D;return(D=d.current)==null?void 0:D.focus()}}),gt({keys:"r",scope:"list:projects",description:"Refresh",handler:()=>u()}),i)return l.jsx(jt,{label:"Loading projects…"});if(a||!o)return l.jsx(Ct,{error:a||"Project list is unavailable."});const I=Array.from(new Set(o.flatMap(D=>D.tags))).sort();return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(mp,{children:[l.jsx(vu,{ref:d,value:p,onChange:h,placeholder:"Search by project title or tag"}),l.jsxs("select",{value:m,onChange:D=>x(D.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:v,onChange:D=>b(D.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"active",children:"Hide archived"}),l.jsx("option",{value:"all",children:"All projects"}),l.jsx("option",{value:"archived",children:"Archived only"})]}),l.jsxs("select",{value:N,onChange:D=>k(D.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All tags"}),I.map(D=>l.jsx("option",{value:D,children:D},D))]}),l.jsxs("select",{value:S,onChange:D=>C(D.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(gp,{value:O,onChange:D=>P(D),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),U.length===0?l.jsx(vt,{title:o.length===0?"No projects yet":"No projects match these filters",description:o.length===0?"A project 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 project.",actions:l.jsx(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/create/project`,children:"Create Project"})}):O==="cards"?l.jsx("div",{className:"grid gap-3 lg:grid-cols-2 2xl:grid-cols-3",children:U.map((D,V)=>l.jsxs(Re,{to:`${t}/projects/${D.slug}`,className:"block rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm transition hover:border-primary/40 hover:shadow-md",...Q(V),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:D.title}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Wr(D.updated)]})]}),l.jsx(Vt,{status:D.status})]}),l.jsxs("div",{className:"mt-4 space-y-3",children:[l.jsx(Xa,{progress:D.progress,showLegend:!0}),l.jsx("div",{className:"flex flex-wrap gap-2",children:D.tags.map(H=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:H},H))}),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:D.needsAttention.blockedCount+D.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:D.progress.total})]})]})]})]},D.slug))}):O==="table"?l.jsx(De,{title:`${U.length} project${U.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:"Project"}),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:U.map((D,V)=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",...Q(V),children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(Re,{to:`${t}/projects/${D.slug}`,className:"font-semibold text-foreground hover:text-primary",children:D.title}),l.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:D.tags.map(H=>l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:H},H))})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx(Vt,{status:D.status})}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("div",{className:"min-w-[220px]",children:l.jsx(Xa,{progress:D.progress})})}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:D.needsAttention.blockedCount+D.needsAttention.failedCount}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Wr(D.updated)})]},D.slug))})]})})}):l.jsx(D0,{columns:KE,items:Y,getItemId:D=>D.slug,getColumnId:D=>D.status,canDrop:({fromColumnId:D,toColumnId:V})=>({allowed:!0,reason:D===V?void 0:"This will set a manual status override on the project."}),onMove:({item:D,fromColumnId:V,toColumnId:H,fromIndex:te,toIndex:R})=>{if(V===H){const F=$[V]??U.filter(Z=>Z.status===V).map(Z=>Z.slug);E(Z=>({...Z,[V]:VE(F,te,R)}));return}fetch(`/api/projects/${D.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:H})}).then(()=>{window.location.reload()})},emptyMessage:D=>`No ${D.title.toLowerCase()} projects.`,renderCard:(D,{dragging:V})=>{const H=X.get(D.slug)??-1;return l.jsx("div",{...H>=0?Q(H):{},children:l.jsx(XE,{project:D,dragging:V})})}}),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(wv,{className:"mt-0.5 h-4 w-4"}),l.jsxs("p",{children:["Project status is derived from assignment state by default.",O==="kanban"?" Drag projects between columns or use":" Use"," the status override on the project detail page to set a manual status."]})]})})]})}const qE={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},KE=xp.map(e=>({id:e,title:qE[e],description:A0(e)}));function GE(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return yx(t)-yx(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function yx(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.openQuestions}function YE(e){return Object.fromEntries(xp.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function XE({project:e,dragging:t}){const n=Lt();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(Re,{to:`${n}/projects/${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 ",Wr(e.updated)]})]}),l.jsx(Vt,{status:e.status})]}),l.jsx("div",{className:"mt-4",children:l.jsx(Xa,{progress:e.progress})}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.tags.map(o=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:o},o)),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 project lane"})]})}function So({value:e}){const[t,n]=g.useState(!1);function o(){navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}return l.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-foreground",title:t?"Copied!":`Copy: ${e}`,children:t?l.jsx(Gf,{className:"h-3 w-3 text-green-500"}):l.jsx(Yf,{className:"h-3 w-3"})})}function vx(e){const t=QE(e),n=g.forwardRef((o,i)=>{const{children:a,...u}=o,d=g.Children.toArray(a),p=d.find(ZE);if(p){const h=p.props.children,m=d.map(x=>x===p?g.Children.count(h)>1?g.Children.only(null):g.isValidElement(h)?h.props.children:null:x);return l.jsx(t,{...u,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return l.jsx(t,{...u,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function QE(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const u=tR(i),d=eR(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fu(o,u):u),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JE=Symbol("radix.slottable");function ZE(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JE}function eR(e,t){const n={...t};for(const o in t){const i=e[o],a=t[o];/^on[A-Z]/.test(o)?i&&a?n[o]=(...d)=>{const p=a(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...a}:o==="className"&&(n[o]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function tR(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.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 nR(e){const t=e+"CollectionProvider",[n,o]=Vo(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=k=>{const{scope:S,children:C}=k,T=mt.useRef(null),A=mt.useRef(new Map).current;return l.jsx(i,{scope:S,itemMap:A,collectionRef:T,children:C})};u.displayName=t;const d=e+"CollectionSlot",p=vx(d),h=mt.forwardRef((k,S)=>{const{scope:C,children:T}=k,A=a(d,C),_=nn(S,A.collectionRef);return l.jsx(p,{ref:_,children:T})});h.displayName=d;const m=e+"CollectionItemSlot",x="data-radix-collection-item",v=vx(m),b=mt.forwardRef((k,S)=>{const{scope:C,children:T,...A}=k,_=mt.useRef(null),O=nn(S,_),P=a(m,C);return mt.useEffect(()=>(P.itemMap.set(_,{ref:_,...A}),()=>void P.itemMap.delete(_))),l.jsx(v,{[x]:"",ref:O,children:T})});b.displayName=m;function N(k){const S=a(e+"CollectionConsumer",k);return mt.useCallback(()=>{const T=S.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${x}]`));return Array.from(S.itemMap.values()).sort((P,$)=>A.indexOf(P.ref.current)-A.indexOf($.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:u,Slot:h,ItemSlot:b},N,o]}var rR=g.createContext(void 0);function I0(e){const t=g.useContext(rR);return e||t||"ltr"}var Fd="rovingFocusGroup.onEntryFocus",oR={bubbles:!1,cancelable:!0},ll="RovingFocusGroup",[vf,O0,sR]=nR(ll),[iR,_0]=Vo(ll,[sR]),[lR,aR]=iR(ll),M0=g.forwardRef((e,t)=>l.jsx(vf.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(vf.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(uR,{...e,ref:t})})}));M0.displayName=ll;var uR=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...x}=e,v=g.useRef(null),b=nn(t,v),N=I0(a),[k,S]=pu({prop:u,defaultProp:d??null,onChange:p,caller:ll}),[C,T]=g.useState(!1),A=Uo(h),_=O0(n),O=g.useRef(!1),[P,$]=g.useState(0);return g.useEffect(()=>{const E=v.current;if(E)return E.addEventListener(Fd,A),()=>E.removeEventListener(Fd,A)},[A]),l.jsx(lR,{scope:n,orientation:o,dir:N,loop:i,currentTabStopId:k,onItemFocus:g.useCallback(E=>S(E),[S]),onItemShiftTab:g.useCallback(()=>T(!0),[]),onFocusableItemAdd:g.useCallback(()=>$(E=>E+1),[]),onFocusableItemRemove:g.useCallback(()=>$(E=>E-1),[]),children:l.jsx(St.div,{tabIndex:C||P===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,()=>{O.current=!0}),onFocus:lt(e.onFocus,E=>{const U=!O.current;if(E.target===E.currentTarget&&U&&!C){const ee=new CustomEvent(Fd,oR);if(E.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const Y=_().filter(D=>D.focusable),q=Y.find(D=>D.active),X=Y.find(D=>D.id===k),I=[q,X,...Y].filter(Boolean).map(D=>D.ref.current);z0(I,m)}}O.current=!1}),onBlur:lt(e.onBlur,()=>T(!1))})})}),$0="RovingFocusGroupItem",F0=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,children:u,...d}=e,p=Cs(),h=a||p,m=aR($0,n),x=m.currentTabStopId===h,v=O0(n),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:k}=m;return g.useEffect(()=>{if(o)return b(),()=>N()},[o,b,N]),l.jsx(vf.ItemSlot,{scope:n,id:h,focusable:o,active:i,children:l.jsx(St.span,{tabIndex:x?0:-1,"data-orientation":m.orientation,...d,ref:t,onMouseDown:lt(e.onMouseDown,S=>{o?m.onItemFocus(h):S.preventDefault()}),onFocus:lt(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:lt(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){m.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const C=fR(S,m.orientation,m.dir);if(C!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let A=v().filter(_=>_.focusable).map(_=>_.ref.current);if(C==="last")A.reverse();else if(C==="prev"||C==="next"){C==="prev"&&A.reverse();const _=A.indexOf(S.currentTarget);A=m.loop?pR(A,_+1):A.slice(_+1)}setTimeout(()=>z0(A))}}),children:typeof u=="function"?u({isCurrentTabStop:x,hasTabStop:k!=null}):u})})});F0.displayName=$0;var cR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fR(e,t,n){const o=dR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return cR[o]}function z0(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function pR(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var hR=M0,mR=F0,wu="Tabs",[gR]=Vo(wu,[_0]),B0=_0(),[xR,yp]=gR(wu),U0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:a,orientation:u="horizontal",dir:d,activationMode:p="automatic",...h}=e,m=I0(d),[x,v]=pu({prop:o,onChange:i,defaultProp:a??"",caller:wu});return l.jsx(xR,{scope:n,baseId:Cs(),value:x,onValueChange:v,orientation:u,dir:m,activationMode:p,children:l.jsx(St.div,{dir:m,"data-orientation":u,...h,ref:t})})});U0.displayName=wu;var H0="TabsList",W0=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,a=yp(H0,n),u=B0(n);return l.jsx(hR,{asChild:!0,...u,orientation:a.orientation,dir:a.dir,loop:o,children:l.jsx(St.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});W0.displayName=H0;var V0="TabsTrigger",q0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...a}=e,u=yp(V0,n),d=B0(n),p=Y0(u.baseId,o),h=X0(u.baseId,o),m=o===u.value;return l.jsx(mR,{asChild:!0,...d,focusable:!i,active:m,children:l.jsx(St.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:lt(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?u.onValueChange(o):x.preventDefault()}),onKeyDown:lt(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&u.onValueChange(o)}),onFocus:lt(e.onFocus,()=>{const x=u.activationMode!=="manual";!m&&!i&&x&&u.onValueChange(o)})})})});q0.displayName=V0;var K0="TabsContent",G0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:a,...u}=e,d=yp(K0,n),p=Y0(d.baseId,o),h=X0(d.baseId,o),m=o===d.value,x=g.useRef(m);return g.useEffect(()=>{const v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),l.jsx(qo,{present:i||m,children:({present:v})=>l.jsx(St.div,{"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!v,id:h,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:v&&a})})});G0.displayName=K0;function Y0(e,t){return`${e}-trigger-${t}`}function X0(e,t){return`${e}-content-${t}`}var yR=U0,vR=W0,bR=q0,wR=G0;function Q0({value:e,onValueChange:t,items:n,className:o}){return l.jsxs(yR,{value:e,onValueChange:t,className:o,children:[l.jsx(vR,{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(bR,{value:i.value,className:Fe("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(wR,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const kR="modulepreload",SR=function(e){return"/"+e},bx={},jR=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){let u=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=u(n.map(h=>{if(h=SR(h),h in bx)return;bx[h]=!0;const m=h.endsWith(".css"),x=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${x}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":kR,m||(v.as="script"),v.crossOrigin="",v.href=h,p&&v.setAttribute("nonce",p),document.head.appendChild(v),m)return new Promise((b,N)=>{v.addEventListener("load",b),v.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${h}`)))})}))}function a(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return i.then(u=>{for(const d of u||[])d.status==="rejected"&&a(d.reason);return t().catch(a)})};function CR({definition:e,className:t,nodeRoutes:n={}}){const o=g.useRef(null),[i,a]=g.useState(null),[u,d]=g.useState(!0),p=qt(),h=document.documentElement.classList.contains("dark")?"dark":"default";return g.useEffect(()=>{let m=!1;async function x(){if(o.current)try{const v=(await jR(async()=>{const{default:k}=await import("./mermaid.core-C9pF_oFQ.js").then(S=>S.bF);return{default:k}},[])).default;if(v.initialize({startOnLoad:!1,theme:h}),m)return;const b=`mermaid-${Date.now()}`,{svg:N}=await v.render(b,e);if(m||!o.current)return;o.current.innerHTML=N,NR(o.current,n,p),d(!1)}catch(v){m||(a(v instanceof Error?v.message:"Failed to render graph"),d(!1))}}return d(!0),a(null),x(),()=>{m=!0}},[e,p,n,h]),i?l.jsxs("div",{className:Fe("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:Fe("rounded-lg border border-border bg-card p-4",t),children:[u&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),l.jsx("div",{ref:o,className:"overflow-auto"})]})}function NR(e,t,n){var o;for(const i of e.querySelectorAll(".node")){const a=((o=i.textContent)==null?void 0:o.replace(/\s+/g," ").trim())??"",u=t[a];if(!u)continue;i.style.cursor="pointer",i.setAttribute("role","link"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",`Open ${a}`);const d=()=>n(u);i.addEventListener("click",d),i.addEventListener("keydown",p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d())})}}function ER(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const RR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TR={};function wx(e,t){return(TR.jsx?PR:RR).test(e)}const AR=/[ \t\n\f\r]/g;function DR(e){return typeof e=="object"?e.type==="text"?kx(e.value):!1:kx(e)}function kx(e){return e.replace(AR,"")===""}class al{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}al.prototype.normal={};al.prototype.property={};al.prototype.space=void 0;function J0(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new al(n,o,t)}function bf(e){return e.toLowerCase()}class Nn{constructor(t,n){this.attribute=n,this.property=t}}Nn.prototype.attribute="";Nn.prototype.booleanish=!1;Nn.prototype.boolean=!1;Nn.prototype.commaOrSpaceSeparated=!1;Nn.prototype.commaSeparated=!1;Nn.prototype.defined=!1;Nn.prototype.mustUseProperty=!1;Nn.prototype.number=!1;Nn.prototype.overloadedBoolean=!1;Nn.prototype.property="";Nn.prototype.spaceSeparated=!1;Nn.prototype.space=void 0;let LR=0;const Oe=Ko(),kt=Ko(),wf=Ko(),ue=Ko(),Qe=Ko(),Es=Ko(),On=Ko();function Ko(){return 2**++LR}const kf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:kt,commaOrSpaceSeparated:On,commaSeparated:Es,number:ue,overloadedBoolean:wf,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),zd=Object.keys(kf);class vp extends Nn{constructor(t,n,o,i){let a=-1;if(super(t,n),Sx(this,"space",i),typeof o=="number")for(;++a<zd.length;){const u=zd[a];Sx(this,zd[a],(o&kf[u])===kf[u])}}}vp.prototype.defined=!0;function Sx(e,t,n){n&&(e[t]=n)}function zs(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const a=new vp(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,n[bf(o)]=o,n[bf(a.attribute)]=o}return new al(t,n,e.space)}const Z0=zs({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:Qe,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:ue,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:Qe,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:kt,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 eb(e,t){return t in e?e[t]:t}function tb(e,t){return eb(e,t.toLowerCase())}const IR=zs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Es,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:Qe,autoFocus:Oe,autoPlay:Oe,blocking:Qe,capture:null,charSet:null,checked:Oe,cite:null,className:Qe,cols:ue,colSpan:null,content:null,contentEditable:kt,controls:Oe,controlsList:Qe,coords:ue|Es,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:wf,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:Qe,height:ue,hidden:wf,high:ue,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Oe,itemType:Qe,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:Qe,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:Qe,required:Oe,reversed:Oe,rows:ue,rowSpan:ue,sandbox:Qe,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:kt,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:kt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,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:kt,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:tb}),OR=zs({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:On,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:Qe,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:Es,g2:Es,glyphName:Es,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:On,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:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:On,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:On,rev:On,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:On,requiredFeatures:On,requiredFonts:On,requiredFormats:On,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:On,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:On,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:On,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:eb}),nb=zs({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()}}),rb=zs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tb}),ob=zs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_R={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"},MR=/[A-Z]/g,jx=/-[a-z]/g,$R=/^data[-\w.:]+$/i;function FR(e,t){const n=bf(t);let o=t,i=Nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$R.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(jx,BR);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!jx.test(a)){let u=a.replace(MR,zR);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}i=vp}return new i(o,t)}function zR(e){return"-"+e.toLowerCase()}function BR(e){return e.charAt(1).toUpperCase()}const UR=J0([Z0,IR,nb,rb,ob],"html"),bp=J0([Z0,OR,nb,rb,ob],"svg");function HR(e){return e.join(" ").trim()}var vs={},Bd,Cx;function WR(){if(Cx)return Bd;Cx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
431
- `,h="/",m="*",x="",v="comment",b="declaration";function N(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var T=1,A=1;function _(Q){var I=Q.match(t);I&&(T+=I.length);var D=Q.lastIndexOf(p);A=~D?Q.length-D:A+Q.length}function O(){var Q={line:T,column:A};return function(I){return I.position=new P(Q),U(),I}}function P(Q){this.start=Q,this.end={line:T,column:A},this.source=C.source}P.prototype.content=S;function $(Q){var I=new Error(C.source+":"+T+":"+A+": "+Q);if(I.reason=Q,I.filename=C.source,I.line=T,I.column=A,I.source=S,!C.silent)throw I}function E(Q){var I=Q.exec(S);if(I){var D=I[0];return _(D),S=S.slice(D.length),I}}function U(){E(n)}function ee(Q){var I;for(Q=Q||[];I=Y();)I!==!1&&Q.push(I);return Q}function Y(){var Q=O();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var I=2;x!=S.charAt(I)&&(m!=S.charAt(I)||h!=S.charAt(I+1));)++I;if(I+=2,x===S.charAt(I-1))return $("End of comment missing");var D=S.slice(2,I-2);return A+=2,_(D),S=S.slice(I),A+=2,Q({type:v,comment:D})}}function q(){var Q=O(),I=E(o);if(I){if(Y(),!E(i))return $("property missing ':'");var D=E(a),V=Q({type:b,property:k(I[0].replace(e,x)),value:D?k(D[0].replace(e,x)):x});return E(u),V}}function X(){var Q=[];ee(Q);for(var I;I=q();)I!==!1&&(Q.push(I),ee(Q));return Q}return U(),X()}function k(S){return S?S.replace(d,x):x}return Bd=N,Bd}var Nx;function VR(){if(Nx)return vs;Nx=1;var e=vs&&vs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=n;const t=e(WR());function n(o,i){let a=null;if(!o||typeof o!="string")return a;const u=(0,t.default)(o),d=typeof i=="function";return u.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 vs}var Ai={},Ex;function qR(){if(Ex)return Ai;Ex=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=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(o,d),h.replace(t,u))};return Ai.camelCase=p,Ai}var Di,Rx;function KR(){if(Rx)return Di;Rx=1;var e=Di&&Di.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(VR()),n=qR();function o(i,a){var u={};return!i||typeof i!="string"||(0,t.default)(i,function(d,p){d&&p&&(u[(0,n.camelCase)(d,a)]=p)}),u}return o.default=o,Di=o,Di}var GR=KR();const YR=lu(GR),sb=ib("end"),wp=ib("start");function ib(e){return t;function t(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function XR(e){const t=wp(e),n=sb(e);if(t&&n)return{start:t,end:n}}function $i(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Px(e.position):"start"in e||"end"in e?Px(e):"line"in e||"column"in e?Sf(e):""}function Sf(e){return Tx(e&&e.line)+":"+Tx(e&&e.column)}function Px(e){return Sf(e&&e.start)+"-"+Sf(e&&e.end)}function Tx(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",a={},u=!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&&(u=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?a.ruleId=o:(a.source=o.slice(0,p),a.ruleId=o.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=$i(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=u&&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}}rn.prototype.file="";rn.prototype.name="";rn.prototype.reason="";rn.prototype.message="";rn.prototype.stack="";rn.prototype.column=void 0;rn.prototype.line=void 0;rn.prototype.ancestors=void 0;rn.prototype.cause=void 0;rn.prototype.fatal=void 0;rn.prototype.place=void 0;rn.prototype.ruleId=void 0;rn.prototype.source=void 0;const kp={}.hasOwnProperty,QR=new Map,JR=/[A-Z]/g,ZR=new Set(["table","tbody","thead","tfoot","tr"]),eP=new Set(["td","th"]),lb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=uP(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");o=aP(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,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"?bp:UR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ab(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ab(e,t,n){if(t.type==="element")return nP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return sP(e,t,n);if(t.type==="mdxjsEsm")return oP(e,t);if(t.type==="root")return iP(e,t,n);if(t.type==="text")return lP(e,t)}function nP(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=bp,e.schema=i),e.ancestors.push(t);const a=cb(e,t.tagName,!1),u=cP(e,t);let d=jp(e,t);return ZR.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!DR(p):!0})),ub(e,u,a,t),Sp(u,d),e.ancestors.pop(),e.schema=o,e.create(t,a,u,n)}function rP(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Yi(e,t.position)}function oP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yi(e,t.position)}function sP(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=bp,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:cb(e,t.name,!0),u=dP(e,t),d=jp(e,t);return ub(e,u,a,t),Sp(u,d),e.ancestors.pop(),e.schema=o,e.create(t,a,u,n)}function iP(e,t,n){const o={};return Sp(o,jp(e,t)),e.create(t,e.Fragment,o,n)}function lP(e,t){return t.value}function ub(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function Sp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function aP(e,t,n){return o;function o(i,a,u,d){const h=Array.isArray(u.children)?n:t;return d?h(a,u,d):h(a,u)}}function uP(e,t){return n;function n(o,i,a,u){const d=Array.isArray(a.children),p=wp(o);return t(i,a,u,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function cP(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&kp.call(t.properties,i)){const a=fP(e,i,t.properties[i]);if(a){const[u,d]=a;e.tableCellAlignToStyle&&u==="align"&&typeof d=="string"&&eP.has(t.tagName)?o=d:n[u]=d}}if(o){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function dP(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const a=o.data.estree.body[0];a.type;const u=a.expression;u.type;const d=u.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Yi(e,t.position);else{const i=o.name;let a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const d=o.value.data.estree.body[0];d.type,a=e.evaluater.evaluateExpression(d.expression)}else Yi(e,t.position);else a=o.value===null?!0:o.value;n[i]=a}return n}function jp(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:QR;for(;++o<t.children.length;){const a=t.children[o];let u;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;u=p+"-"+h,i.set(p,h+1)}}const d=ab(e,a,u);d!==void 0&&n.push(d)}return n}function fP(e,t,n){const o=FR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?ER(n):HR(n)),o.property==="style"){let i=typeof n=="object"?n:pP(e,String(n));return e.stylePropertyNameCase==="css"&&(i=hP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?_R[o.property]||o.property:o.attribute,n]}}function pP(e,t){try{return YR(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=lb+"#cannot-parse-style-attribute",i}}function cb(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,u;for(;++a<i.length;){const d=wx(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};u=u?{type:"MemberExpression",object:u,property:d,computed:!!(a&&d.type==="Literal"),optional:!1}:d}o=u}else o=wx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return kp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);Yi(e)}function Yi(e,t){const n=new rn("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=lb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function hP(e){const t={};let n;for(n in e)kp.call(e,n)&&(t[mP(n)]=e[n]);return t}function mP(e){let t=e.replace(JR,gP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function gP(e){return"-"+e.toLowerCase()}const Ud={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"]},xP={};function yP(e,t){const n=xP,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return db(e,o,i)}function db(e,t,n){if(vP(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 Ax(e.children,t,n)}return Array.isArray(e)?Ax(e,t,n):""}function Ax(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=db(e[i],t,n);return o.join("")}function vP(e){return!!(e&&typeof e=="object")}const Dx=document.createElement("i");function Cp(e){const t="&"+e+";";Dx.innerHTML=t;const n=Dx.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Er(e,t,n,o){const i=e.length;let a=0,u;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)u=Array.from(o),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<o.length;)u=o.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Gn(e,t){return e.length>0?(Er(e,e.length,0,t),e):t}const Lx={}.hasOwnProperty;function bP(e){const t={};let n=-1;for(;++n<e.length;)wP(t,e[n]);return t}function wP(e,t){let n;for(n in t){const i=(Lx.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){Lx.call(i,u)||(i[u]=[]);const d=a[u];kP(i[u],Array.isArray(d)?d:d?[d]:[])}}}function kP(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Er(e,0,0,o)}function fb(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 Rs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wr=No(/[A-Za-z]/),Mn=No(/[\dA-Za-z]/),SP=No(/[#-'*+\--9=?A-Z^-~]/);function jf(e){return e!==null&&(e<32||e===127)}const Cf=No(/\d/),jP=No(/[\dA-Fa-f]/),CP=No(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function jn(e){return e!==null&&(e<0||e===32)}function Ve(e){return e===-2||e===-1||e===32}const NP=No(new RegExp("\\p{P}|\\p{S}","u")),EP=No(/\s/);function No(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bs(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Mn(e.charCodeAt(n+1))&&Mn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const d=e.charCodeAt(n+1);a<56320&&d>56319&&d<57344?(u=String.fromCharCode(a,d),i=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(o,n),encodeURIComponent(u)),o=n+i+1,u=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function Je(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(p){return Ve(p)?(e.enter(n),d(p)):t(p)}function d(p){return Ve(p)&&a++<i?(e.consume(p),d):(e.exit(n),t(p))}}const RP={tokenize:PP};function PP(e){const t=e.attempt(this.parser.constructs.contentInitial,o,i);let n;return t;function o(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Je(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,u(d)}function u(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Te(d)?(e.consume(d),e.exit("chunkText"),a):(e.consume(d),u)}}const TP={tokenize:AP},Ix={tokenize:DP};function AP(e){const t=this,n=[];let o=0,i,a,u;return d;function d(A){if(o<n.length){const _=n[o];return t.containerState=_[1],e.attempt(_[0].continuation,p,h)(A)}return h(A)}function p(A){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const _=t.events.length;let O=_,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){P=t.events[O][1].end;break}C(o);let $=_;for(;$<t.events.length;)t.events[$][1].end={...P},$++;return Er(t.events,O+1,0,t.events.slice(_)),t.events.length=$,h(A)}return d(A)}function h(A){if(o===n.length){if(!i)return v(A);if(i.currentConstruct&&i.currentConstruct.concrete)return N(A);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ix,m,x)(A)}function m(A){return i&&T(),C(o),v(A)}function x(A){return t.parser.lazy[t.now().line]=o!==n.length,u=t.now().offset,N(A)}function v(A){return t.containerState={},e.attempt(Ix,b,N)(A)}function b(A){return o++,n.push([t.currentConstruct,t.containerState]),v(A)}function N(A){if(A===null){i&&T(),C(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){S(e.exit("chunkFlow"),!0),C(0),e.consume(A);return}return Te(A)?(e.consume(A),S(e.exit("chunkFlow")),o=0,t.interrupt=void 0,d):(e.consume(A),k)}function S(A,_){const O=t.sliceStream(A);if(_&&O.push(null),A.previous=a,a&&(a.next=A),a=A,i.defineSkip(A.start),i.write(O),t.parser.lazy[A.start.line]){let P=i.events.length;for(;P--;)if(i.events[P][1].start.offset<u&&(!i.events[P][1].end||i.events[P][1].end.offset>u))return;const $=t.events.length;let E=$,U,ee;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(U){ee=t.events[E][1].end;break}U=!0}for(C(o),P=$;P<t.events.length;)t.events[P][1].end={...ee},P++;Er(t.events,E+1,0,t.events.slice($)),t.events.length=P}}function C(A){let _=n.length;for(;_-- >A;){const O=n[_];t.containerState=O[1],O[0].exit.call(t,e)}n.length=A}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function DP(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ox(e){if(e===null||jn(e)||EP(e))return 1;if(NP(e))return 2}function Np(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!o.includes(a)&&(t=a(t,n),o.push(a))}return t}const Nf={name:"attention",resolveAll:LP,tokenize:IP};function LP(e,t){let n=-1,o,i,a,u,d,p,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;p=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const x={...e[o][1].end},v={...e[n][1].start};_x(x,-p),_x(v,p),u={type:p>1?"strongSequence":"emphasisSequence",start:x,end:{...e[o][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},a={type:p>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},i={type:p>1?"strong":"emphasis",start:{...u.start},end:{...d.end}},e[o][1].end={...u.start},e[n][1].start={...d.end},h=[],e[o][1].end.offset-e[o][1].start.offset&&(h=Gn(h,[["enter",e[o][1],t],["exit",e[o][1],t]])),h=Gn(h,[["enter",i,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Gn(h,Np(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),h=Gn(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=Gn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Er(e,o-1,n-o+3,h),n=o+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function IP(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=Ox(o);let a;return u;function u(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=Ox(p),x=!m||m===2&&i||n.includes(p),v=!i||i===2&&m||n.includes(o);return h._open=!!(a===42?x:x&&(i||!v)),h._close=!!(a===42?v:v&&(m||!x)),t(p)}}function _x(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const OP={name:"autolink",tokenize:_P};function _P(e,t,n){let o=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 wr(b)?(e.consume(b),u):b===64?n(b):h(b)}function u(b){return b===43||b===45||b===46||Mn(b)?(o=1,d(b)):h(b)}function d(b){return b===58?(e.consume(b),o=0,p):(b===43||b===45||b===46||Mn(b))&&o++<32?(e.consume(b),d):(o=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||jf(b)?n(b):(e.consume(b),p)}function h(b){return b===64?(e.consume(b),m):SP(b)?(e.consume(b),h):n(b)}function m(b){return Mn(b)?x(b):n(b)}function x(b){return b===46?(e.consume(b),o=0,m):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||Mn(b))&&o++<63){const N=b===45?v:x;return e.consume(b),N}return n(b)}}const ku={partial:!0,tokenize:MP};function MP(e,t,n){return o;function o(a){return Ve(a)?Je(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Te(a)?t(a):n(a)}}const pb={continuation:{tokenize:FP},exit:zP,name:"blockQuote",tokenize:$P};function $P(e,t,n){const o=this;return i;function i(u){if(u===62){const d=o.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ve(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function FP(e,t,n){const o=this;return i;function i(u){return Ve(u)?Je(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(pb,t,n)(u)}}function zP(e){e.exit("blockQuote")}const hb={name:"characterEscape",tokenize:BP};function BP(e,t,n){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return CP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const mb={name:"characterReference",tokenize:UP};function UP(e,t,n){const o=this;let i=0,a,u;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,u=Mn,m(x))}function h(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=jP,m):(e.enter("characterReferenceValue"),a=7,u=Cf,m(x))}function m(x){if(x===59&&i){const v=e.exit("characterReferenceValue");return u===Mn&&!Cp(o.sliceSerialize(v))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(x)&&i++<a?(e.consume(x),m):n(x)}}const Mx={partial:!0,tokenize:WP},$x={concrete:!0,name:"codeFenced",tokenize:HP};function HP(e,t,n){const o=this,i={partial:!0,tokenize:O};let a=0,u=0,d;return p;function p(P){return h(P)}function h(P){const $=o.events[o.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,d=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(P)}function m(P){return P===d?(u++,e.consume(P),m):u<3?n(P):(e.exit("codeFencedFenceSequence"),Ve(P)?Je(e,x,"whitespace")(P):x(P))}function x(P){return P===null||Te(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(Mx,k,_)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(P))}function v(P){return P===null||Te(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(P)):Ve(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,b,"whitespace")(P)):P===96&&P===d?n(P):(e.consume(P),v)}function b(P){return P===null||Te(P)?x(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(P))}function N(P){return P===null||Te(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(P)):P===96&&P===d?n(P):(e.consume(P),N)}function k(P){return e.attempt(i,_,S)(P)}function S(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),C}function C(P){return a>0&&Ve(P)?Je(e,T,"linePrefix",a+1)(P):T(P)}function T(P){return P===null||Te(P)?e.check(Mx,k,_)(P):(e.enter("codeFlowValue"),A(P))}function A(P){return P===null||Te(P)?(e.exit("codeFlowValue"),T(P)):(e.consume(P),A)}function _(P){return e.exit("codeFenced"),t(P)}function O(P,$,E){let U=0;return ee;function ee(I){return P.enter("lineEnding"),P.consume(I),P.exit("lineEnding"),Y}function Y(I){return P.enter("codeFencedFence"),Ve(I)?Je(P,q,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):q(I)}function q(I){return I===d?(P.enter("codeFencedFenceSequence"),X(I)):E(I)}function X(I){return I===d?(U++,P.consume(I),X):U>=u?(P.exit("codeFencedFenceSequence"),Ve(I)?Je(P,Q,"whitespace")(I):Q(I)):E(I)}function Q(I){return I===null||Te(I)?(P.exit("codeFencedFence"),$(I)):E(I)}}}function WP(e,t,n){const o=this;return i;function i(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return o.parser.lazy[o.now().line]?n(u):t(u)}}const Hd={name:"codeIndented",tokenize:qP},VP={partial:!0,tokenize:KP};function qP(e,t,n){const o=this;return i;function i(h){return e.enter("codeIndented"),Je(e,a,"linePrefix",5)(h)}function a(h){const m=o.events[o.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?p(h):Te(h)?e.attempt(VP,u,p)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Te(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),d)}function p(h){return e.exit("codeIndented"),t(h)}}function KP(e,t,n){const o=this;return i;function i(u){return o.parser.lazy[o.now().line]?n(u):Te(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),i):Je(e,a,"linePrefix",5)(u)}function a(u){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(u):Te(u)?i(u):n(u)}}const GP={name:"codeText",previous:XP,resolve:YP,tokenize:QP};function YP(e){let t=e.length-4,n=3,o,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)i===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(i=o):(o===t||e[o][1].type==="lineEnding")&&(e[i][1].type="codeTextData",o!==i+2&&(e[i][1].end=e[o-1][1].end,e.splice(i+2,o-i-2),t-=o-i-2,o=i+2),i=void 0);return e}function XP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function QP(e,t,n){let o=0,i,a;return u;function u(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),o++,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)):Te(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||Te(x)?(e.exit("codeTextData"),p(x)):(e.consume(x),h)}function m(x){return x===96?(e.consume(x),i++,m):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(a.type="codeTextData",h(x))}}class JP{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 o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&Li(this.left,o),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),Li(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Li(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);Li(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Li(this.left,n.reverse())}}}function Li(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 gb(e){const t={};let n=-1,o,i,a,u,d,p,h;const m=new JP(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(o=m.get(n),n&&o[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(p=o[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(o[0]==="enter")o[1].contentType&&(Object.assign(t,ZP(m,n)),n=t[n],h=!0);else if(o[1]._container){for(a=n,i=void 0;a--;)if(u=m.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),u[1].type="lineEnding",i=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;i&&(o[1].end={...m.get(i)[1].start},d=m.slice(i,n),d.unshift(o),m.splice(i,n-i+1,d))}}return Er(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function ZP(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const a=[];let u=n._tokenizer;u||(u=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const d=u.events,p=[],h={};let m,x,v=-1,b=n,N=0,k=0;const S=[k];for(;b;){for(;e.get(++i)[1]!==b;);a.push(i),b._tokenizer||(m=o.sliceStream(b),b.next||m.push(null),x&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),x=b,b=b.next}for(b=n;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(k=v+1,S.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):S.pop(),v=S.length;v--;){const C=d.slice(S[v],S[v+1]),T=a.pop();p.push([T,T+C.length-1]),e.splice(T,2,C)}for(p.reverse(),v=-1;++v<p.length;)h[N+p[v][0]]=N+p[v][1],N+=p[v][1]-p[v][0]-1;return h}const eT={resolve:nT,tokenize:rT},tT={partial:!0,tokenize:oT};function nT(e){return gb(e),e}function rT(e,t){let n;return o;function o(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(d)}function i(d){return d===null?a(d):Te(d)?e.check(tT,u,a)(d):(e.consume(d),i)}function a(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function u(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function oT(e,t,n){const o=this;return i;function i(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,a,"linePrefix")}function a(u){if(u===null||Te(u))return n(u);const d=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(u):e.interrupt(o.parser.constructs.flow,n,t)(u)}}function xb(e,t,n,o,i,a,u,d,p){const h=p||Number.POSITIVE_INFINITY;let m=0;return x;function x(C){return C===60?(e.enter(o),e.enter(i),e.enter(a),e.consume(C),e.exit(a),v):C===null||C===32||C===41||jf(C)?n(C):(e.enter(o),e.enter(u),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(C))}function v(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(i),e.exit(o),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(C))}function b(C){return C===62?(e.exit("chunkString"),e.exit(d),v(C)):C===null||C===60||Te(C)?n(C):(e.consume(C),C===92?N:b)}function N(C){return C===60||C===62||C===92?(e.consume(C),b):b(C)}function k(C){return!m&&(C===null||C===41||jn(C))?(e.exit("chunkString"),e.exit(d),e.exit(u),e.exit(o),t(C)):m<h&&C===40?(e.consume(C),m++,k):C===41?(e.consume(C),m--,k):C===null||C===32||C===40||jf(C)?n(C):(e.consume(C),C===92?S:k)}function S(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function yb(e,t,n,o,i,a){const u=this;let d=0,p;return h;function h(b){return e.enter(o),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 u.parser.constructs?n(b):b===93?(e.exit(a),e.enter(i),e.consume(b),e.exit(i),e.exit(o),t):Te(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||Te(b)||d++>999?(e.exit("chunkString"),m(b)):(e.consume(b),p||(p=!Ve(b)),b===92?v:x)}function v(b){return b===91||b===92||b===93?(e.consume(b),d++,x):x(b)}}function vb(e,t,n,o,i,a){let u;return d;function d(v){return v===34||v===39||v===40?(e.enter(o),e.enter(i),e.consume(v),e.exit(i),u=v===40?41:v,p):n(v)}function p(v){return v===u?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),t):(e.enter(a),h(v))}function h(v){return v===u?(e.exit(a),p(u)):v===null?n(v):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===u||v===null||Te(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?x:m)}function x(v){return v===u||v===92?(e.consume(v),m):m(v)}}function Fi(e,t){let n;return o;function o(i){return Te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):Ve(i)?Je(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const sT={name:"definition",tokenize:lT},iT={partial:!0,tokenize:aT};function lT(e,t,n){const o=this;let i;return a;function a(b){return e.enter("definition"),u(b)}function u(b){return yb.call(o,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return i=Rs(o.sliceSerialize(o.events[o.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 jn(b)?Fi(e,h)(b):h(b)}function h(b){return xb(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(iT,x,x)(b)}function x(b){return Ve(b)?Je(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Te(b)?(e.exit("definition"),o.parser.defined.push(i),t(b)):n(b)}}function aT(e,t,n){return o;function o(d){return jn(d)?Fi(e,i)(d):n(d)}function i(d){return vb(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function a(d){return Ve(d)?Je(e,u,"whitespace")(d):u(d)}function u(d){return d===null||Te(d)?t(d):n(d)}}const uT={name:"hardBreakEscape",tokenize:cT};function cT(e,t,n){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Te(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const dT={name:"headingAtx",resolve:fT,tokenize:pT};function fT(e,t){let n=e.length-2,o=3,i,a;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},a={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Er(e,o,n-o+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function pT(e,t,n){let o=0;return i;function i(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&o++<6?(e.consume(m),u):m===null||jn(m)?(e.exit("atxHeadingSequence"),d(m)):n(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),p(m)):m===null||Te(m)?(e.exit("atxHeading"),t(m)):Ve(m)?Je(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||jn(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const hT=["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"],Fx=["pre","script","style","textarea"],mT={concrete:!0,name:"htmlFlow",resolveTo:yT,tokenize:vT},gT={partial:!0,tokenize:wT},xT={partial:!0,tokenize:bT};function yT(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 vT(e,t,n){const o=this;let i,a,u,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),v):L===47?(e.consume(L),a=!0,k):L===63?(e.consume(L),i=3,o.interrupt?t:R):wr(L)?(e.consume(L),u=String.fromCharCode(L),S):n(L)}function v(L){return L===45?(e.consume(L),i=2,b):L===91?(e.consume(L),i=5,d=0,N):wr(L)?(e.consume(L),i=4,o.interrupt?t:R):n(L)}function b(L){return L===45?(e.consume(L),o.interrupt?t:R):n(L)}function N(L){const de="CDATA[";return L===de.charCodeAt(d++)?(e.consume(L),d===de.length?o.interrupt?t:q:N):n(L)}function k(L){return wr(L)?(e.consume(L),u=String.fromCharCode(L),S):n(L)}function S(L){if(L===null||L===47||L===62||jn(L)){const de=L===47,ge=u.toLowerCase();return!de&&!a&&Fx.includes(ge)?(i=1,o.interrupt?t(L):q(L)):hT.includes(u.toLowerCase())?(i=6,de?(e.consume(L),C):o.interrupt?t(L):q(L)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(L):a?T(L):A(L))}return L===45||Mn(L)?(e.consume(L),u+=String.fromCharCode(L),S):n(L)}function C(L){return L===62?(e.consume(L),o.interrupt?t:q):n(L)}function T(L){return Ve(L)?(e.consume(L),T):ee(L)}function A(L){return L===47?(e.consume(L),ee):L===58||L===95||wr(L)?(e.consume(L),_):Ve(L)?(e.consume(L),A):ee(L)}function _(L){return L===45||L===46||L===58||L===95||Mn(L)?(e.consume(L),_):O(L)}function O(L){return L===61?(e.consume(L),P):Ve(L)?(e.consume(L),O):A(L)}function P(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),p=L,$):Ve(L)?(e.consume(L),P):E(L)}function $(L){return L===p?(e.consume(L),p=null,U):L===null||Te(L)?n(L):(e.consume(L),$)}function E(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||jn(L)?O(L):(e.consume(L),E)}function U(L){return L===47||L===62||Ve(L)?A(L):n(L)}function ee(L){return L===62?(e.consume(L),Y):n(L)}function Y(L){return L===null||Te(L)?q(L):Ve(L)?(e.consume(L),Y):n(L)}function q(L){return L===45&&i===2?(e.consume(L),D):L===60&&i===1?(e.consume(L),V):L===62&&i===4?(e.consume(L),F):L===63&&i===3?(e.consume(L),R):L===93&&i===5?(e.consume(L),te):Te(L)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(gT,Z,X)(L)):L===null||Te(L)?(e.exit("htmlFlowData"),X(L)):(e.consume(L),q)}function X(L){return e.check(xT,Q,Z)(L)}function Q(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),I}function I(L){return L===null||Te(L)?X(L):(e.enter("htmlFlowData"),q(L))}function D(L){return L===45?(e.consume(L),R):q(L)}function V(L){return L===47?(e.consume(L),u="",H):q(L)}function H(L){if(L===62){const de=u.toLowerCase();return Fx.includes(de)?(e.consume(L),F):q(L)}return wr(L)&&u.length<8?(e.consume(L),u+=String.fromCharCode(L),H):q(L)}function te(L){return L===93?(e.consume(L),R):q(L)}function R(L){return L===62?(e.consume(L),F):L===45&&i===2?(e.consume(L),R):q(L)}function F(L){return L===null||Te(L)?(e.exit("htmlFlowData"),Z(L)):(e.consume(L),F)}function Z(L){return e.exit("htmlFlow"),t(L)}}function bT(e,t,n){const o=this;return i;function i(u){return Te(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return o.parser.lazy[o.now().line]?n(u):t(u)}}function wT(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ku,t,n)}}const kT={name:"htmlText",tokenize:ST};function ST(e,t,n){const o=this;let i,a,u;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),O):R===63?(e.consume(R),A):wr(R)?(e.consume(R),E):n(R)}function h(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),a=0,N):wr(R)?(e.consume(R),T):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),v):Te(R)?(u=x,V(R)):(e.consume(R),x)}function v(R){return R===45?(e.consume(R),b):x(R)}function b(R){return R===62?D(R):R===45?v(R):x(R)}function N(R){const F="CDATA[";return R===F.charCodeAt(a++)?(e.consume(R),a===F.length?k:N):n(R)}function k(R){return R===null?n(R):R===93?(e.consume(R),S):Te(R)?(u=k,V(R)):(e.consume(R),k)}function S(R){return R===93?(e.consume(R),C):k(R)}function C(R){return R===62?D(R):R===93?(e.consume(R),C):k(R)}function T(R){return R===null||R===62?D(R):Te(R)?(u=T,V(R)):(e.consume(R),T)}function A(R){return R===null?n(R):R===63?(e.consume(R),_):Te(R)?(u=A,V(R)):(e.consume(R),A)}function _(R){return R===62?D(R):A(R)}function O(R){return wr(R)?(e.consume(R),P):n(R)}function P(R){return R===45||Mn(R)?(e.consume(R),P):$(R)}function $(R){return Te(R)?(u=$,V(R)):Ve(R)?(e.consume(R),$):D(R)}function E(R){return R===45||Mn(R)?(e.consume(R),E):R===47||R===62||jn(R)?U(R):n(R)}function U(R){return R===47?(e.consume(R),D):R===58||R===95||wr(R)?(e.consume(R),ee):Te(R)?(u=U,V(R)):Ve(R)?(e.consume(R),U):D(R)}function ee(R){return R===45||R===46||R===58||R===95||Mn(R)?(e.consume(R),ee):Y(R)}function Y(R){return R===61?(e.consume(R),q):Te(R)?(u=Y,V(R)):Ve(R)?(e.consume(R),Y):U(R)}function q(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,X):Te(R)?(u=q,V(R)):Ve(R)?(e.consume(R),q):(e.consume(R),Q)}function X(R){return R===i?(e.consume(R),i=void 0,I):R===null?n(R):Te(R)?(u=X,V(R)):(e.consume(R),X)}function Q(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||jn(R)?U(R):(e.consume(R),Q)}function I(R){return R===47||R===62||jn(R)?U(R):n(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function V(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),H}function H(R){return Ve(R)?Je(e,te,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):te(R)}function te(R){return e.enter("htmlTextData"),u(R)}}const Ep={name:"labelEnd",resolveAll:ET,resolveTo:RT,tokenize:PT},jT={tokenize:TT},CT={tokenize:AT},NT={tokenize:DT};function ET(e){let t=-1;const n=[];for(;++t<e.length;){const o=e[t][1];if(n.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const i=o.type==="labelImage"?4:2;o.type="data",t+=i}}return e.length!==n.length&&Er(e,0,e.length,n),e}function RT(e,t){let n=e.length,o=0,i,a,u,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(u){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(u=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[u][1].end}},m={type:"labelText",start:{...e[a+o+2][1].end},end:{...e[u-2][1].start}};return d=[["enter",p,t],["enter",h,t]],d=Gn(d,e.slice(a+1,a+o+3)),d=Gn(d,[["enter",m,t]]),d=Gn(d,Np(t.parser.constructs.insideSpan.null,e.slice(a+o+4,u-3),t)),d=Gn(d,[["exit",m,t],e[u-2],e[u-1],["exit",h,t]]),d=Gn(d,e.slice(u+1)),d=Gn(d,[["exit",p,t]]),Er(e,a,e.length,d),e}function PT(e,t,n){const o=this;let i=o.events.length,a,u;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){a=o.events[i][1];break}return d;function d(v){return a?a._inactive?x(v):(u=o.parser.defined.includes(Rs(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),p):n(v)}function p(v){return v===40?e.attempt(jT,m,u?m:x)(v):v===91?e.attempt(CT,m,u?h:x)(v):u?m(v):x(v)}function h(v){return e.attempt(NT,m,x)(v)}function m(v){return t(v)}function x(v){return a._balanced=!0,n(v)}}function TT(e,t,n){return o;function o(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),i}function i(x){return jn(x)?Fi(e,a)(x):a(x)}function a(x){return x===41?m(x):xb(e,u,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function u(x){return jn(x)?Fi(e,p)(x):m(x)}function d(x){return n(x)}function p(x){return x===34||x===39||x===40?vb(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):m(x)}function h(x){return jn(x)?Fi(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 AT(e,t,n){const o=this;return i;function i(d){return yb.call(o,e,a,u,"reference","referenceMarker","referenceString")(d)}function a(d){return o.parser.defined.includes(Rs(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function u(d){return n(d)}}function DT(e,t,n){return o;function o(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 LT={name:"labelStartImage",resolveAll:Ep.resolveAll,tokenize:IT};function IT(e,t,n){const o=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"),u):n(d)}function u(d){return d===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):t(d)}}const OT={name:"labelStartLink",resolveAll:Ep.resolveAll,tokenize:_T};function _T(e,t,n){const o=this;return i;function i(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(u):t(u)}}const Wd={name:"lineEnding",tokenize:MT};function MT(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const Ha={name:"thematicBreak",tokenize:$T};function $T(e,t,n){let o=0,i;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return i=h,d(h)}function d(h){return h===i?(e.enter("thematicBreakSequence"),p(h)):o>=3&&(h===null||Te(h))?(e.exit("thematicBreak"),t(h)):n(h)}function p(h){return h===i?(e.consume(h),o++,p):(e.exit("thematicBreakSequence"),Ve(h)?Je(e,d,"whitespace")(h):d(h))}}const kn={continuation:{tokenize:UT},exit:WT,name:"list",tokenize:BT},FT={partial:!0,tokenize:VT},zT={partial:!0,tokenize:HT};function BT(e,t,n){const o=this,i=o.events[o.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,u=0;return d;function d(b){const N=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:Cf(b)){if(o.containerState.type||(o.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Ha,n,h)(b):h(b);if(!o.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return n(b)}function p(b){return Cf(b)&&++u<10?(e.consume(b),p):(!o.interrupt||u<2)&&(o.containerState.marker?b===o.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"),o.containerState.marker=o.containerState.marker||b,e.check(ku,o.interrupt?n:m,e.attempt(FT,v,x))}function m(b){return o.containerState.initialBlankLine=!0,a++,v(b)}function x(b){return Ve(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):n(b)}function v(b){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function UT(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(ku,i,a);function i(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Je(e,t,"listItemIndent",o.containerState.size+1)(d)}function a(d){return o.containerState.furtherBlankLines||!Ve(d)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,u(d)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(zT,t,u)(d))}function u(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,Je(e,e.attempt(kn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function HT(e,t,n){const o=this;return Je(e,i,"listItemIndent",o.containerState.size+1);function i(a){const u=o.events[o.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===o.containerState.size?t(a):n(a)}}function WT(e){e.exit(this.containerState.type)}function VT(e,t,n){const o=this;return Je(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const u=o.events[o.events.length-1];return!Ve(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const zx={name:"setextUnderline",resolveTo:qT,tokenize:KT};function qT(e,t){let n=e.length,o,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=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 u={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",u,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end={...e[a][1].end}):e[o][1]=u,e.push(["exit",u,t]),e}function KT(e,t,n){const o=this;let i;return a;function a(h){let m=o.events.length,x;for(;m--;)if(o.events[m][1].type!=="lineEnding"&&o.events[m][1].type!=="linePrefix"&&o.events[m][1].type!=="content"){x=o.events[m][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||x)?(e.enter("setextHeadingLine"),i=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===i?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),Ve(h)?Je(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const GT={tokenize:YT};function YT(e){const t=this,n=e.attempt(ku,o,e.attempt(this.parser.constructs.flowInitial,i,Je(e,e.attempt(this.parser.constructs.flow,i,e.attempt(eT,i)),"linePrefix")));return n;function o(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 XT={resolveAll:wb()},QT=bb("string"),JT=bb("text");function bb(e){return{resolveAll:wb(e==="text"?ZT:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],a=n.attempt(i,u,d);return u;function u(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 v=-1;if(x)for(;++v<x.length;){const b=x[v];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function wb(e){return t;function t(n,o){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,o):n}}function ZT(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 o=e[n-1][1],i=t.sliceStream(o);let a=i.length,u=-1,d=0,p;for(;a--;){const h=i[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)d++,u--;if(u)break;u=-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?u:o.start._bufferIndex+u,_index:o.start._index+a,line:o.end.line,column:o.end.column-d,offset:o.end.offset-d},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const eA={42:kn,43:kn,45:kn,48:kn,49:kn,50:kn,51:kn,52:kn,53:kn,54:kn,55:kn,56:kn,57:kn,62:pb},tA={91:sT},nA={[-2]:Hd,[-1]:Hd,32:Hd},rA={35:dT,42:Ha,45:[zx,Ha],60:mT,61:zx,95:Ha,96:$x,126:$x},oA={38:mb,92:hb},sA={[-5]:Wd,[-4]:Wd,[-3]:Wd,33:LT,38:mb,42:Nf,60:[OP,kT],91:OT,92:[uT,hb],93:Ep,95:Nf,96:GP},iA={null:[Nf,XT]},lA={null:[42,95]},aA={null:[]},uA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:lA,contentInitial:tA,disable:aA,document:eA,flow:rA,flowInitial:nA,insideSpan:iA,string:oA,text:sA},Symbol.toStringTag,{value:"Module"}));function cA(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let u=[],d=[];const p={attempt:$(O),check:$(P),consume:T,enter:A,exit:_,interrupt:$(P,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:N,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:x};let m=t.tokenize.call(h,p);return t.resolveAll&&a.push(t),h;function x(Y){return u=Gn(u,Y),S(),u[u.length-1]!==null?[]:(E(t,0),h.events=Np(a,h.events,h),h.events)}function v(Y,q){return fA(b(Y),q)}function b(Y){return dA(u,Y)}function N(){const{_bufferIndex:Y,_index:q,line:X,column:Q,offset:I}=o;return{_bufferIndex:Y,_index:q,line:X,column:Q,offset:I}}function k(Y){i[Y.line]=Y.column,ee()}function S(){let Y;for(;o._index<u.length;){const q=u[o._index];if(typeof q=="string")for(Y=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===Y&&o._bufferIndex<q.length;)C(q.charCodeAt(o._bufferIndex));else C(q)}}function C(Y){m=m(Y)}function T(Y){Te(Y)?(o.line++,o.column=1,o.offset+=Y===-3?2:1,ee()):Y!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===u[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=Y}function A(Y,q){const X=q||{};return X.type=Y,X.start=N(),h.events.push(["enter",X,h]),d.push(X),X}function _(Y){const q=d.pop();return q.end=N(),h.events.push(["exit",q,h]),q}function O(Y,q){E(Y,q.from)}function P(Y,q){q.restore()}function $(Y,q){return X;function X(Q,I,D){let V,H,te,R;return Array.isArray(Q)?Z(Q):"tokenize"in Q?Z([Q]):F(Q);function F(fe){return je;function je(Se){const Ce=Se!==null&&fe[Se],we=Se!==null&&fe.null,at=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(we)?we:we?[we]:[]];return Z(at)(Se)}}function Z(fe){return V=fe,H=0,fe.length===0?D:L(fe[H])}function L(fe){return je;function je(Se){return R=U(),te=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?ge():fe.tokenize.call(q?Object.assign(Object.create(h),q):h,p,de,ge)(Se)}}function de(fe){return Y(te,R),I}function ge(fe){return R.restore(),++H<V.length?L(V[H]):D}}}function E(Y,q){Y.resolveAll&&!a.includes(Y)&&a.push(Y),Y.resolve&&Er(h.events,q,h.events.length-q,Y.resolve(h.events.slice(q),h)),Y.resolveTo&&(h.events=Y.resolveTo(h.events,h))}function U(){const Y=N(),q=h.previous,X=h.currentConstruct,Q=h.events.length,I=Array.from(d);return{from:Q,restore:D};function D(){o=Y,h.previous=q,h.currentConstruct=X,h.events.length=Q,d=I,ee()}}function ee(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function dA(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let u;if(n===i)u=[e[n].slice(o,a)];else{if(u=e.slice(n,i),o>-1){const d=u[0];typeof d=="string"?u[0]=d.slice(o):u.shift()}a>0&&u.push(e[i].slice(0,a))}return u}function fA(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
432
- `;break}case-3:{u=`\r
433
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&i)continue;u=" ";break}default:u=String.fromCharCode(a)}i=a===-2,o.push(u)}return o.join("")}function pA(e){const o={constructs:bP([uA,...(e||{}).extensions||[]]),content:i(RP),defined:[],document:i(TP),flow:i(GT),lazy:{},string:i(QT),text:i(JT)};return o;function i(a){return u;function u(d){return cA(o,a,d)}}}function hA(e){for(;!gb(e););return e}const Bx=/[\0\t\n\r]/g;function mA(){let e=1,t="",n=!0,o;return i;function i(a,u,d){const p=[];let h,m,x,v,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),x=0,t="",n&&(a.charCodeAt(0)===65279&&x++,n=void 0);x<a.length;){if(Bx.lastIndex=x,h=Bx.exec(a),v=h&&h.index!==void 0?h.index:a.length,b=a.charCodeAt(v),!h){t=a.slice(x);break}if(b===10&&x===v&&o)p.push(-3),o=void 0;else switch(o&&(p.push(-5),o=void 0),x<v&&(p.push(a.slice(x,v)),e+=v-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:o=!0,e=1}x=v+1}return d&&(o&&p.push(-5),t&&p.push(t),p.push(null)),p}}const gA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xA(e){return e.replace(gA,yA)}function yA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return fb(n.slice(a?2:1),a?16:10)}return Cp(n)||e}const kb={}.hasOwnProperty;function vA(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),bA(n)(hA(pA(n).document().write(mA()(e,t,!0))))}function bA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ge),autolinkProtocol:U,autolinkEmail:U,atxHeading:a(bt),blockQuote:a(we),characterEscape:U,characterReference:U,codeFenced:a(at),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(at,u),codeText:a(Ze,u),codeTextData:U,data:U,codeFlowValue:U,definition:a(Be),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(ze),hardBreakEscape:a(It),hardBreakTrailing:a(It),htmlFlow:a(on,u),htmlFlowData:U,htmlText:a(on,u),htmlTextData:U,image:a(dn),label:u,link:a(Ge),listItem:a(zt),listItemValue:v,listOrdered:a(et,x),listUnordered:a(et),paragraph:a(Kt),reference:L,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(bt),strong:a(fn),thematicBreak:a(Pn)},exit:{atxHeading:p(),atxHeadingSequence:O,autolink:p(),autolinkEmail:Ce,autolinkProtocol:Se,blockQuote:p(),characterEscapeValue:ee,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:fe,characterReference:je,codeFenced:p(S),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:ee,codeIndented:p(C),codeText:p(I),codeTextData:ee,data:ee,definition:p(),definitionDestinationString:_,definitionLabelString:T,definitionTitleString:A,emphasis:p(),hardBreakEscape:p(q),hardBreakTrailing:p(q),htmlFlow:p(X),htmlFlowData:ee,htmlText:p(Q),htmlTextData:ee,image:p(V),label:te,labelText:H,lineEnding:Y,link:p(D),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:de,resourceDestinationString:R,resourceTitleString:F,resource:Z,setextHeading:p(E),setextHeadingLineSequence:$,setextHeadingText:P,strong:p(),thematicBreak:p()}};Sb(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(re){let K={type:"root",children:[]};const ae={stack:[K],tokenStack:[],config:t,enter:d,exit:h,buffer:u,resume:m,data:n},pe=[];let Ae=-1;for(;++Ae<re.length;)if(re[Ae][1].type==="listOrdered"||re[Ae][1].type==="listUnordered")if(re[Ae][0]==="enter")pe.push(Ae);else{const Ke=pe.pop();Ae=i(re,Ke,Ae)}for(Ae=-1;++Ae<re.length;){const Ke=t[re[Ae][0]];kb.call(Ke,re[Ae][1].type)&&Ke[re[Ae][1].type].call(Object.assign({sliceSerialize:re[Ae][2].sliceSerialize},ae),re[Ae][1])}if(ae.tokenStack.length>0){const Ke=ae.tokenStack[ae.tokenStack.length-1];(Ke[1]||Ux).call(ae,void 0,Ke[0])}for(K.position={start:xo(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:xo(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},Ae=-1;++Ae<t.transforms.length;)K=t.transforms[Ae](K)||K;return K}function i(re,K,ae){let pe=K-1,Ae=-1,Ke=!1,pn,Gt,Bt,W;for(;++pe<=ae;){const le=re[pe];switch(le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{le[0]==="enter"?Ae++:Ae--,W=void 0;break}case"lineEndingBlank":{le[0]==="enter"&&(pn&&!W&&!Ae&&!Bt&&(Bt=pe),W=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:W=void 0}if(!Ae&&le[0]==="enter"&&le[1].type==="listItemPrefix"||Ae===-1&&le[0]==="exit"&&(le[1].type==="listUnordered"||le[1].type==="listOrdered")){if(pn){let xe=pe;for(Gt=void 0;xe--;){const Le=re[xe];if(Le[1].type==="lineEnding"||Le[1].type==="lineEndingBlank"){if(Le[0]==="exit")continue;Gt&&(re[Gt][1].type="lineEndingBlank",Ke=!0),Le[1].type="lineEnding",Gt=xe}else if(!(Le[1].type==="linePrefix"||Le[1].type==="blockQuotePrefix"||Le[1].type==="blockQuotePrefixWhitespace"||Le[1].type==="blockQuoteMarker"||Le[1].type==="listItemIndent"))break}Bt&&(!Gt||Bt<Gt)&&(pn._spread=!0),pn.end=Object.assign({},Gt?re[Gt][1].start:le[1].end),re.splice(Gt||pe,0,["exit",pn,le[2]]),pe++,ae++}if(le[1].type==="listItemPrefix"){const xe={type:"listItem",_spread:!1,start:Object.assign({},le[1].start),end:void 0};pn=xe,re.splice(pe,0,["enter",xe,le[2]]),pe++,ae++,Bt=void 0,W=!0}}}return re[K][1]._spread=Ke,ae}function a(re,K){return ae;function ae(pe){d.call(this,re(pe),pe),K&&K.call(this,pe)}}function u(){this.stack.push({type:"fragment",children:[]})}function d(re,K,ae){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([K,ae||void 0]),re.position={start:xo(K.start),end:void 0}}function p(re){return K;function K(ae){re&&re.call(this,ae),h.call(this,ae)}}function h(re,K){const ae=this.stack.pop(),pe=this.tokenStack.pop();if(pe)pe[0].type!==re.type&&(K?K.call(this,re,pe[0]):(pe[1]||Ux).call(this,re,pe[0]));else throw new Error("Cannot close `"+re.type+"` ("+$i({start:re.start,end:re.end})+"): it’s not open");ae.position.end=xo(re.end)}function m(){return yP(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function v(re){if(this.data.expectingFirstListItemValue){const K=this.stack[this.stack.length-2];K.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function b(){const re=this.resume(),K=this.stack[this.stack.length-1];K.lang=re}function N(){const re=this.resume(),K=this.stack[this.stack.length-1];K.meta=re}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const re=this.resume(),K=this.stack[this.stack.length-1];K.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const re=this.resume(),K=this.stack[this.stack.length-1];K.value=re.replace(/(\r?\n|\r)$/g,"")}function T(re){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.label=K,ae.identifier=Rs(this.sliceSerialize(re)).toLowerCase()}function A(){const re=this.resume(),K=this.stack[this.stack.length-1];K.title=re}function _(){const re=this.resume(),K=this.stack[this.stack.length-1];K.url=re}function O(re){const K=this.stack[this.stack.length-1];if(!K.depth){const ae=this.sliceSerialize(re).length;K.depth=ae}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function $(re){const K=this.stack[this.stack.length-1];K.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function U(re){const ae=this.stack[this.stack.length-1].children;let pe=ae[ae.length-1];(!pe||pe.type!=="text")&&(pe=Rn(),pe.position={start:xo(re.start),end:void 0},ae.push(pe)),this.stack.push(pe)}function ee(re){const K=this.stack.pop();K.value+=this.sliceSerialize(re),K.position.end=xo(re.end)}function Y(re){const K=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ae=K.children[K.children.length-1];ae.position.end=xo(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(K.type)&&(U.call(this,re),ee.call(this,re))}function q(){this.data.atHardBreak=!0}function X(){const re=this.resume(),K=this.stack[this.stack.length-1];K.value=re}function Q(){const re=this.resume(),K=this.stack[this.stack.length-1];K.value=re}function I(){const re=this.resume(),K=this.stack[this.stack.length-1];K.value=re}function D(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=K,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function V(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=K,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function H(re){const K=this.sliceSerialize(re),ae=this.stack[this.stack.length-2];ae.label=xA(K),ae.identifier=Rs(K).toLowerCase()}function te(){const re=this.stack[this.stack.length-1],K=this.resume(),ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,ae.type==="link"){const pe=re.children;ae.children=pe}else ae.alt=K}function R(){const re=this.resume(),K=this.stack[this.stack.length-1];K.url=re}function F(){const re=this.resume(),K=this.stack[this.stack.length-1];K.title=re}function Z(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function de(re){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.label=K,ae.identifier=Rs(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function ge(re){this.data.characterReferenceType=re.type}function fe(re){const K=this.sliceSerialize(re),ae=this.data.characterReferenceType;let pe;ae?(pe=fb(K,ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):pe=Cp(K);const Ae=this.stack[this.stack.length-1];Ae.value+=pe}function je(re){const K=this.stack.pop();K.position.end=xo(re.end)}function Se(re){ee.call(this,re);const K=this.stack[this.stack.length-1];K.url=this.sliceSerialize(re)}function Ce(re){ee.call(this,re);const K=this.stack[this.stack.length-1];K.url="mailto:"+this.sliceSerialize(re)}function we(){return{type:"blockquote",children:[]}}function at(){return{type:"code",lang:null,meta:null,value:""}}function Ze(){return{type:"inlineCode",value:""}}function Be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ze(){return{type:"emphasis",children:[]}}function bt(){return{type:"heading",depth:0,children:[]}}function It(){return{type:"break"}}function on(){return{type:"html",value:""}}function dn(){return{type:"image",title:null,url:"",alt:null}}function Ge(){return{type:"link",title:null,url:"",children:[]}}function et(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function zt(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function Kt(){return{type:"paragraph",children:[]}}function fn(){return{type:"strong",children:[]}}function Rn(){return{type:"text",value:""}}function Pn(){return{type:"thematicBreak"}}}function xo(e){return{line:e.line,column:e.column,offset:e.offset}}function Sb(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?Sb(e,o):wA(e,o)}}function wA(e,t){let n;for(n in t)if(kb.call(t,n))switch(n){case"canContainEols":{const o=t[n];o&&e[n].push(...o);break}case"transforms":{const o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{const o=t[n];o&&Object.assign(e[n],o);break}}}function Ux(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$i({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$i({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$i({start:t.start,end:t.end})+") is still open")}function kA(e){const t=this;t.parser=n;function n(o){return vA(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function SA(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 jA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
434
- `}]}function CA(e,t){const n=t.value?t.value+`
435
- `:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:o,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 NA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function EA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=Bs(o.toLowerCase()),a=e.footnoteOrder.indexOf(o);let u,d=e.footnoteCounts.get(o);d===void 0?(d=0,e.footnoteOrder.push(o),u=e.footnoteOrder.length):u=a+1,d+=1,e.footnoteCounts.set(o,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(u)}]};e.patch(t,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,h),e.applyData(t,h)}function PA(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 TA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function jb(e,t){const n=t.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const u=i[i.length-1];return u&&u.type==="text"?u.value+=o:i.push({type:"text",value:o}),i}function AA(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return jb(e,t);const i={src:Bs(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function DA(e,t){const n={src:Bs(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 o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function LA(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,o),e.applyData(t,o)}function IA(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return jb(e,t);const i={href:Bs(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function OA(e,t){const n={href:Bs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function _A(e,t,n){const o=e.all(t),i=n?MA(n):Cb(t),a={},u=[];if(typeof t.checked=="boolean"){const m=o[0];let x;m&&m.type==="element"&&m.tagName==="p"?x=m:(x={type:"element",tagName:"p",properties:{},children:[]},o.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<o.length;){const m=o[d];(i||d!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
436
- `}),m.type==="element"&&m.tagName==="p"&&!i?u.push(...m.children):u.push(m)}const p=o[o.length-1];p&&(i||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
437
- `});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function MA(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let o=-1;for(;!t&&++o<n.length;)t=Cb(n[o])}return t}function Cb(e){const t=e.spread;return t??e.children.length>1}function $A(e,t){const n={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<o.length;){const u=o[i];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.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(o,!0)};return e.patch(t,a),e.applyData(t,a)}function FA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function BA(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UA(e,t){const n=e.all(t),o=n.shift(),i=[];if(o){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],u),i.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=wp(t.children[1]),p=sb(t.children[t.children.length-1]);d&&p&&(u.position={start:d,end:p}),i.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function HA(e,t,n){const o=n?n.children:void 0,a=(o?o.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,d=u?u.length:t.children.length;let p=-1;const h=[];for(;++p<d;){const x=t.children[p],v={},b=u?u[p]:void 0;b&&(v.align=b);let N={type:"element",tagName:a,properties:v,children:[]};x&&(N.children=e.all(x),e.patch(x,N),N=e.applyData(x,N)),h.push(N)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function WA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Hx=9,Wx=32;function VA(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const a=[];for(;o;)a.push(Vx(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return a.push(Vx(t.slice(i),i>0,!1)),a.join("")}function Vx(e,t,n){let o=0,i=e.length;if(t){let a=e.codePointAt(o);for(;a===Hx||a===Wx;)o++,a=e.codePointAt(o)}if(n){let a=e.codePointAt(i-1);for(;a===Hx||a===Wx;)i--,a=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function qA(e,t){const n={type:"text",value:VA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function KA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const GA={blockquote:SA,break:jA,code:CA,delete:NA,emphasis:EA,footnoteReference:RA,heading:PA,html:TA,imageReference:AA,image:DA,inlineCode:LA,linkReference:IA,link:OA,listItem:_A,list:$A,paragraph:FA,root:zA,strong:BA,table:UA,tableCell:WA,tableRow:HA,text:qA,thematicBreak:KA,toml:Pa,yaml:Pa,definition:Pa,footnoteDefinition:Pa};function Pa(){}const Nb=-1,Su=0,zi=1,Qa=2,Rp=3,Pp=4,Tp=5,Ap=6,Eb=7,Rb=8,qx=typeof self=="object"?self:globalThis,YA=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),o=i=>{if(e.has(i))return e.get(i);const[a,u]=t[i];switch(a){case Su:case Nb:return n(u,i);case zi:{const d=n([],i);for(const p of u)d.push(o(p));return d}case Qa:{const d=n({},i);for(const[p,h]of u)d[o(p)]=o(h);return d}case Rp:return n(new Date(u),i);case Pp:{const{source:d,flags:p}=u;return n(new RegExp(d,p),i)}case Tp:{const d=n(new Map,i);for(const[p,h]of u)d.set(o(p),o(h));return d}case Ap:{const d=n(new Set,i);for(const p of u)d.add(o(p));return d}case Eb:{const{name:d,message:p}=u;return n(new qx[d](p),i)}case Rb:return n(BigInt(u),i);case"BigInt":return n(Object(BigInt(u)),i);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:d}=new Uint8Array(u);return n(new DataView(d),u)}}return n(new qx[a](u),i)};return o},Kx=e=>YA(new Map,e)(0),bs="",{toString:XA}={},{keys:QA}=Object,Ii=e=>{const t=typeof e;if(t!=="object"||!e)return[Su,t];const n=XA.call(e).slice(8,-1);switch(n){case"Array":return[zi,bs];case"Object":return[Qa,bs];case"Date":return[Rp,bs];case"RegExp":return[Pp,bs];case"Map":return[Tp,bs];case"Set":return[Ap,bs];case"DataView":return[zi,n]}return n.includes("Array")?[zi,n]:n.includes("Error")?[Eb,n]:[Qa,n]},Ta=([e,t])=>e===Su&&(t==="function"||t==="symbol"),JA=(e,t,n,o)=>{const i=(u,d)=>{const p=o.push(u)-1;return n.set(d,p),p},a=u=>{if(n.has(u))return n.get(u);let[d,p]=Ii(u);switch(d){case Su:{let m=u;switch(p){case"bigint":d=Rb,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);m=null;break;case"undefined":return i([Nb],u)}return i([d,m],u)}case zi:{if(p){let v=u;return p==="DataView"?v=new Uint8Array(u.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(u)),i([p,[...v]],u)}const m=[],x=i([d,m],u);for(const v of u)m.push(a(v));return x}case Qa:{if(p)switch(p){case"BigInt":return i([p,u.toString()],u);case"Boolean":case"Number":case"String":return i([p,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const m=[],x=i([d,m],u);for(const v of QA(u))(e||!Ta(Ii(u[v])))&&m.push([a(v),a(u[v])]);return x}case Rp:return i([d,u.toISOString()],u);case Pp:{const{source:m,flags:x}=u;return i([d,{source:m,flags:x}],u)}case Tp:{const m=[],x=i([d,m],u);for(const[v,b]of u)(e||!(Ta(Ii(v))||Ta(Ii(b))))&&m.push([a(v),a(b)]);return x}case Ap:{const m=[],x=i([d,m],u);for(const v of u)(e||!Ta(Ii(v)))&&m.push(a(v));return x}}const{message:h}=u;return i([d,{name:p,message:h}],u)};return a},Gx=(e,{json:t,lossy:n}={})=>{const o=[];return JA(!(t||n),!!t,new Map,o)(e),o},Ja=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kx(Gx(e,t)):structuredClone(e):(e,t)=>Kx(Gx(e,t));function ZA(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 e3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function t3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ZA,o=e.options.footnoteBackLabel||e3,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=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(),v=Bs(x.toLowerCase());let b=0;const N=[],k=e.footnoteCounts.get(x);for(;k!==void 0&&++b<=k;){N.length>0&&N.push({type:"text",value:" "});let T=typeof n=="string"?n:n(p,b);typeof T=="string"&&(T={type:"text",value:T}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(p,b),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const S=m[m.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const T=S.children[S.children.length-1];T&&T.type==="text"?T.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...N)}else m.push(...N);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(m,!0)};e.patch(h,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ja(u),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
438
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
439
- `}]}}const Pb=(function(e){if(e==null)return s3;if(typeof e=="function")return ju(e);if(typeof e=="object")return Array.isArray(e)?n3(e):r3(e);if(typeof e=="string")return o3(e);throw new Error("Expected function, string, or object as test")});function n3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Pb(e[n]);return ju(o);function o(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function r3(e){const t=e;return ju(n);function n(o){const i=o;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function o3(e){return ju(t);function t(n){return n&&n.type===e}}function ju(e){return t;function t(n,o,i){return!!(i3(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function s3(){return!0}function i3(e){return e!==null&&typeof e=="object"&&"type"in e}const Tb=[],l3=!0,Yx=!1,a3="skip";function u3(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const a=Pb(i),u=o?-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(v,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=Tb,N,k,S;if((!t||a(p,h,m[m.length-1]||void 0))&&(b=c3(n(p,m)),b[0]===Yx))return b;if("children"in p&&p.children){const C=p;if(C.children&&b[0]!==a3)for(k=(o?C.children.length:-1)+u,S=m.concat(C);k>-1&&k<C.children.length;){const T=C.children[k];if(N=d(T,k,S)(),N[0]===Yx)return N;k=typeof N[1]=="number"?N[1]:k+u}}return b}}}function c3(e){return Array.isArray(e)?e:typeof e=="number"?[l3,e]:e==null?Tb:[e]}function Ab(e,t,n,o){let i,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,i=n):(a=t,u=n,i=o),u3(e,a,d,i);function d(p,h){const m=h[h.length-1],x=m?m.children.indexOf(p):void 0;return u(p,x,m)}}const Ef={}.hasOwnProperty,d3={};function f3(e,t){const n=t||d3,o=new Map,i=new Map,a=new Map,u={...GA,...n.handlers},d={all:h,applyData:h3,definitionById:o,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:u,one:p,options:n,patch:p3,wrap:g3};return Ab(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const x=m.type==="definition"?o:i,v=String(m.identifier).toUpperCase();x.has(v)||x.set(v,m)}}),d;function p(m,x){const v=m.type,b=d.handlers[v];if(Ef.call(d.handlers,v)&&b)return b(d,m,x);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in m){const{children:k,...S}=m,C=Ja(S);return C.children=d.all(m),C}return Ja(m)}return(d.options.unknownHandler||m3)(d,m,x)}function h(m){const x=[];if("children"in m){const v=m.children;let b=-1;for(;++b<v.length;){const N=d.one(v[b],m);if(N){if(b&&v[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=Xx(N.value)),!Array.isArray(N)&&N.type==="element")){const k=N.children[0];k&&k.type==="text"&&(k.value=Xx(k.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function p3(e,t){e.position&&(t.position=XR(e))}function h3(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const u="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Ja(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function m3(e,t){const n=t.data||{},o="value"in t&&!(Ef.call(n,"hProperties")||Ef.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function g3(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
440
- `});++o<e.length;)o&&n.push({type:"text",value:`
441
- `}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
442
- `}),n}function Xx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qx(e,t){const n=f3(e,t),o=n.one(e,void 0),i=t3(n),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
443
- `},i),a}function x3(e,t){return e&&"run"in e?async function(n,o){const i=Qx(n,{file:o,...t});await e.run(i,o)}:function(n,o){return Qx(n,{file:o,...e||t})}}function Jx(e){if(e)throw e}var Vd,Zx;function y3(){if(Zx)return Vd;Zx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,o=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 v;for(v in h);return typeof v>"u"||e.call(h,v)},u=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(o)return o(h,m).value}else return;return h[m]};return Vd=function p(){var h,m,x,v,b,N,k=arguments[0],S=1,C=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},S=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});S<C;++S)if(h=arguments[S],h!=null)for(m in h)x=d(k,m),v=d(h,m),k!==v&&(T&&v&&(a(v)||(b=i(v)))?(b?(b=!1,N=x&&i(x)?x:[]):N=x&&a(x)?x:{},u(k,{name:m,newValue:p(T,N,v)})):typeof v<"u"&&u(k,{name:m,newValue:v}));return k},Vd}var v3=y3();const qd=lu(v3);function Rf(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 b3(){const e=[],t={run:n,use:o};return t;function n(...i){let a=-1;const u=i.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);d(null,...i);function d(p,...h){const m=e[++a];let x=-1;if(p){u(p);return}for(;++x<i.length;)(h[x]===null||h[x]===void 0)&&(h[x]=i[x]);i=h,m?w3(m,d)(...h):u(null,...h)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function w3(e,t){let n;return o;function o(...u){const d=e.length>u.length;let p;d&&u.push(i);try{p=e.apply(this,u)}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(u,...d){n||(n=!0,t(u,...d))}function a(u){i(null,u)}}const yr={basename:k3,dirname:S3,extname:j3,join:C3,sep:"/"};function k3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ul(e);let n=0,o=-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 o<0&&(a=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let u=-1,d=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else u<0&&(a=!0,u=i+1),d>-1&&(e.codePointAt(i)===t.codePointAt(d--)?d<0&&(o=i):(d=-1,o=u));return n===o?o=u:o<0&&(o=e.length),e.slice(n,o)}function S3(e){if(ul(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function j3(e){ul(e);let t=e.length,n=-1,o=0,i=-1,a=0,u;for(;t--;){const d=e.codePointAt(t);if(d===47){if(u){o=t+1;break}continue}n<0&&(u=!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===o+1?"":e.slice(i,n)}function C3(...e){let t=-1,n;for(;++t<e.length;)ul(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":N3(n)}function N3(e){ul(e);const t=e.codePointAt(0)===47;let n=E3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function E3(e,t){let n="",o=0,i=-1,a=0,u=-1,d,p;for(;++u<=e.length;){if(u<e.length)d=e.codePointAt(u);else{if(d===47)break;d=47}if(d===47){if(!(i===u-1||a===1))if(i!==u-1&&a===2){if(n.length<2||o!==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="",o=0):(n=n.slice(0,p),o=n.length-1-n.lastIndexOf("/")),i=u,a=0;continue}}else if(n.length>0){n="",o=0,i=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,u):n=e.slice(i+1,u),o=u-i-1;i=u,a=0}else d===46&&a>-1?a++:a=-1}return n}function ul(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const R3={cwd:P3};function P3(){return"/"}function Pf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function T3(e){if(typeof e=="string")e=new URL(e);else if(!Pf(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 A3(e)}function A3(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const o=t.codePointAt(n+2);if(o===70||o===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 Kd=["history","path","basename","stem","extname","dirname"];class Db{constructor(t){let n;t?Pf(t)?n={path:t}:typeof t=="string"||D3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":R3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Kd.length;){const a=Kd[o];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Kd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?yr.basename(this.path):void 0}set basename(t){Yd(t,"basename"),Gd(t,"basename"),this.path=yr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?yr.dirname(this.path):void 0}set dirname(t){ey(this.basename,"dirname"),this.path=yr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?yr.extname(this.path):void 0}set extname(t){if(Gd(t,"extname"),ey(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=yr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pf(t)&&(t=T3(t)),Yd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?yr.basename(this.path,this.extname):void 0}set stem(t){Yd(t,"stem"),Gd(t,"stem"),this.path=yr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const i=this.message(t,n,o);throw i.fatal=!0,i}info(t,n,o){const i=this.message(t,n,o);return i.fatal=void 0,i}message(t,n,o){const i=new rn(t,n,o);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 Gd(e,t){if(e&&e.includes(yr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+yr.sep+"`")}function Yd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ey(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function D3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const L3=(function(e){const o=this.constructor.prototype,i=o[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,o),a}),I3={}.hasOwnProperty;class Dp extends L3{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=b3()}copy(){const t=new Dp;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(qd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Jd("data",this.frozen),this.namespace[t]=n,this):I3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Jd("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,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const i=n.call(t,...o);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Aa(t),o=this.parser||this.Parser;return Xd("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),Xd("process",this.parser||this.Parser),Qd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,u){const d=Aa(t),p=o.parse(d);o.run(p,d,function(m,x,v){if(m||!x||!v)return h(m);const b=x,N=o.stringify(b,v);M3(N)?v.value=N:v.result=N,h(m,v)});function h(m,x){m||!x?u(m):a?a(x):n(void 0,x)}}}processSync(t){let n=!1,o;return this.freeze(),Xd("processSync",this.parser||this.Parser),Qd("processSync",this.compiler||this.Compiler),this.process(t,i),ny("processSync","process",n),o;function i(a,u){n=!0,Jx(a),o=u}}run(t,n,o){ty(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?a(void 0,o):new Promise(a);function a(u,d){const p=Aa(n);i.run(t,p,h);function h(m,x,v){const b=x||t;m?d(m):u?u(b):o(void 0,b,v)}}}runSync(t,n){let o=!1,i;return this.run(t,n,a),ny("runSync","run",o),i;function a(u,d){Jx(u),i=d,o=!0}}stringify(t,n){this.freeze();const o=Aa(n),i=this.compiler||this.Compiler;return Qd("stringify",i),ty(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(Jd("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):u(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 u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(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=qd(!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,v=-1;for(;++x<o.length;)if(o[x][0]===h){v=x;break}if(v===-1)o.push([h,...m]);else if(m.length>0){let[b,...N]=m;const k=o[v][1];Rf(k)&&Rf(b)&&(b=qd(!0,k,b)),o[v]=[h,b,...N]}}}}const O3=new Dp().freeze();function Xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Jd(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 ty(e){if(!Rf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ny(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Aa(e){return _3(e)?e:new Db(e)}function _3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function M3(e){return typeof e=="string"||$3(e)}function $3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const F3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ry=[],oy={allowDangerousHtml:!0},z3=/^(https?|ircs?|mailto|xmpp)$/i,B3=[{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 U3(e){const t=H3(e),n=W3(e);return V3(t.runSync(t.parse(n),n),e)}function H3(e){const t=e.rehypePlugins||ry,n=e.remarkPlugins||ry,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...oy}:oy;return O3().use(kA).use(n).use(x3,o).use(t)}function W3(e){const t=e.children||"",n=new Db;return typeof t=="string"&&(n.value=t),n}function V3(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,a=t.disallowedElements,u=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||q3;for(const m of B3)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+F3+m.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Ab(e,h),tP(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function h(m,x,v){if(m.type==="raw"&&v&&typeof x=="number")return u?v.children.splice(x,1):v.children[x]={type:"text",value:m.value},x;if(m.type==="element"){let b;for(b in Ud)if(Object.hasOwn(Ud,b)&&Object.hasOwn(m.properties,b)){const N=m.properties[b],k=Ud[b];(k===null||k.includes(m.tagName))&&(m.properties[b]=p(String(N||""),b,m))}}if(m.type==="element"){let b=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!b&&o&&typeof x=="number"&&(b=!o(m,x,v)),b&&v&&typeof x=="number")return d&&m.children?v.children.splice(x,1,...m.children):v.children.splice(x,1),x}}}function q3(e){const t=e.indexOf(":"),n=e.indexOf("?"),o=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||o!==-1&&t>o||z3.test(e.slice(0,t))?e:""}function vr({content:e,className:t,emptyState:n="No markdown content yet."}){const o=e.replace(/<!--[\s\S]*?-->/g,"");return o.trim()?l.jsx("div",{className:Fe("prose-syntaur max-w-none",t),children:l.jsx(U3,{children:o})}):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 sy(){const{slug:e}=Dt(),t=Lt(),n=qt();Fs("project"),gt({keys:"a",scope:"project",description:"Create assignment",handler:()=>n(`${t}/projects/${e}/create/assignment`)}),gt({keys:"e",scope:"project",description:"Edit project",handler:()=>n(`${t}/projects/${e}/edit`)});const{data:o,loading:i,error:a,refetch:u}=Uv(e),d=bu(),{data:p}=tp(),[h,m]=g.useState("overview"),[x,v]=g.useState("board"),[b,N]=g.useState("all"),[k,S]=g.useState("all"),[C,T]=g.useState("all"),A=g.useMemo(()=>o?Object.fromEntries(o.assignments.flatMap(E=>{const U=`${t}/projects/${o.slug}/assignments/${E.slug}`;return[[E.slug,U],[E.title,U]]})):{},[o]);async function _(E){await fetch(`/api/projects/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:E})}),u()}async function O(E){await fetch(`/api/projects/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:E})}),u()}if(i)return l.jsx(jt,{label:"Loading project workspace…"});if(a||!o)return l.jsx(Ct,{error:a||"Project not found."});const P=Array.from(new Set(o.assignments.map(E=>E.assignee).filter(Boolean))).sort(),$=o.assignments.filter(E=>!(b!=="all"&&E.status!==b||k!=="all"&&E.assignee!==k||C!=="all"&&E.priority!==C));return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Vt,{status:o.status}),o.statusOverride&&l.jsx("button",{type:"button",className:"shell-action border-amber-300 text-amber-700 dark:border-amber-700 dark:text-amber-300",onClick:()=>_(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:E=>{E.target.value&&_(E.target.value)},title:"Override project status",children:[l.jsx("option",{value:"",children:"Set Status…"}),d.statuses.map(E=>l.jsx("option",{value:E.id,children:E.label},E.id)),l.jsx("option",{value:"active",children:"Active"})]}),p&&p.workspaces.length>0&&l.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:E=>{E.target.value==="_ungrouped"?O(null):E.target.value&&O(E.target.value)},title:"Move project to a different workspace",children:[l.jsx("option",{value:"",children:"Move to Workspace…"}),p.workspaces.filter(E=>E!==o.workspace).map(E=>l.jsx("option",{value:E,children:E},E)),o.workspace&&l.jsx("option",{value:"_ungrouped",children:"Ungrouped"})]}),l.jsxs(Re,{className:"shell-action",to:`${t}/projects/${o.slug}/edit`,children:[l.jsx(Gg,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Project"})]}),l.jsxs(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:[l.jsx(ir,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",Wr(o.created),". Last source update ",Cr(o.updated),"."]})]}),l.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:[l.jsx(ot,{label:"Assignments",value:o.progress.total}),l.jsx(ot,{label:"In Progress",value:o.progress.in_progress??0,tone:"info"}),l.jsx(ot,{label:"Review",value:o.progress.review??0,tone:"info"}),l.jsx(ot,{label:"Blocked",value:o.progress.blocked??0,tone:"warn"}),l.jsx(ot,{label:"Completed",value:o.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(Q0,{value:h,onValueChange:m,items:[{value:"overview",label:"Overview",content:l.jsx("div",{className:"space-y-5",children:l.jsx(De,{title:"Project Overview",children:l.jsx(vr,{content:o.body,emptyState:"This project does not have overview content yet."})})})},{value:"assignments",label:"Assignments",count:o.assignments.length,content:l.jsx("div",{className:"space-y-5",children:l.jsx(De,{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:b,onChange:E=>N(E.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),d.statuses.map(E=>l.jsx("option",{value:E.id,children:E.label},E.id))]}),l.jsxs("select",{value:k,onChange:E=>S(E.target.value),className:"editor-input max-w-[170px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),P.map(E=>l.jsx("option",{value:E??"",children:E},E))]}),l.jsxs("select",{value:C,onChange:E=>T(E.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(gp,{value:x,onChange:E=>v(E),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:$.length===0?l.jsx(vt,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this project.",actions:l.jsx(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:"Create Assignment"})}):x==="board"?l.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:$.map(E=>l.jsx(K3,{projectSlug:o.slug,assignment:E},E.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:$.map(E=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsx("td",{className:"py-4",children:l.jsx(Re,{to:`${t}/projects/${o.slug}/assignments/${E.slug}`,className:"font-semibold text-foreground hover:text-primary",children:E.title})}),l.jsx("td",{className:"py-4",children:l.jsx(Vt,{status:E.status})}),l.jsx("td",{className:"py-4 capitalize text-muted-foreground",children:E.priority}),l.jsx("td",{className:"py-4 text-muted-foreground",children:E.assignee??"—"}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Wr(E.updated)})]},E.slug))})]})})})})},{value:"dependencies",label:"Dependencies",content:o.dependencyGraph?l.jsx(De,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:l.jsx(CR,{definition:o.dependencyGraph,nodeRoutes:A})}):l.jsx(vt,{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(De,{title:"Resources",description:"Shared project references.",children:o.resources.length===0?l.jsx(vt,{title:"No resources yet",description:"Resources live at the project level and stay available to every assignment."}):l.jsx("div",{className:"space-y-3",children:o.resources.map(E=>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:E.name}),l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[E.category," · ",E.source]})]},E.slug))})}),l.jsx(De,{title:"Memories",description:"Learnings and patterns captured during the project.",children:o.memories.length===0?l.jsx(vt,{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:o.memories.map(E=>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:E.name}),l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[E.scope," · ",E.source]})]},E.slug))})})]})}]})}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(De,{title:"Progress Summary",children:l.jsx(Xa,{progress:o.progress,showLegend:!0})}),l.jsx(De,{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:o.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:o.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:o.needsAttention.openQuestions})]})]})}),l.jsx(De,{title:"Quick Links",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(Re,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/edit`,children:[l.jsx(Gg,{className:"h-4 w-4"}),"Edit project source"]}),l.jsxs(Re,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/create/assignment`,children:[l.jsx(ir,{className:"h-4 w-4"}),"Create assignment"]}),l.jsxs(Re,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(Xj,{className:"h-4 w-4"}),"Review project rules"]}),l.jsxs("button",{type:"button",onClick:()=>m("dependencies"),className:"flex items-center gap-2 text-primary hover:underline",children:[l.jsx(bv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),o.archived?l.jsxs(De,{title:"Archive Metadata",children:[l.jsxs("p",{className:"text-sm leading-6 text-muted-foreground",children:["Archived ",o.archivedAt?Cr(o.archivedAt):"with no timestamp recorded","."]}),o.archivedReason?l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.archivedReason}):null]}):null]})]})]})}function K3({projectSlug:e,assignment:t}){const n=Lt();return l.jsxs(Re,{to:`${n}/projects/${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:o=>{o.preventDefault(),o.stopPropagation()},children:l.jsx(So,{value:t.id})})]}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Wr(t.updated)]})]}),l.jsx(Vt,{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 Lb({open:e,action:t,assignmentTitle:n,loading:o=!1,onConfirm:i,onOpenChange:a}){const[u,d]=g.useState("");g.useEffect(()=>{e||d("")},[e,t==null?void 0:t.command]);const p=g.useMemo(()=>t&&t.command==="block"?"Blocked Reason":"Reason",[t]);if(!t)return null;const h=`${t.label} "${n}"`,m=o?"Applying...":t.label,x=u.trim()||void 0;return l.jsx(pp,{open:e,onOpenChange:v=>o?void 0:a(v),children:l.jsx(gu,{className:"max-w-xl",children:l.jsxs("form",{className:"space-y-5",onSubmit:v=>{v.preventDefault(),i(x)},children:[l.jsxs(pE,{children:[l.jsx(xu,{children:h}),l.jsx(hp,{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:u,onChange:v=>d(v.target.value),autoFocus:!0,rows:4,disabled:o,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(hE,{children:[l.jsx("button",{type:"button",onClick:()=>a(!1),disabled:o,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),l.jsx("button",{type:"submit",disabled:o,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 Y3(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=G3,t}var Ib="AlertDialog",[X3]=Vo(Ib,[c0]),Kr=c0(),Ob=e=>{const{__scopeAlertDialog:t,...n}=e,o=Kr(t);return l.jsx(N0,{...o,...n,modal:!0})};Ob.displayName=Ib;var Q3="AlertDialogTrigger",J3=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return l.jsx(dE,{...i,...o,ref:t})});J3.displayName=Q3;var Z3="AlertDialogPortal",_b=e=>{const{__scopeAlertDialog:t,...n}=e,o=Kr(t);return l.jsx(E0,{...o,...n})};_b.displayName=Z3;var eD="AlertDialogOverlay",Mb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return l.jsx(up,{...i,...o,ref:t})});Mb.displayName=eD;var Ps="AlertDialogContent",[tD,nD]=X3(Ps),rD=Y3("AlertDialogContent"),$b=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...i}=e,a=Kr(n),u=g.useRef(null),d=nn(t,u),p=g.useRef(null);return l.jsx(lE,{contentName:Ps,titleName:Fb,docsSlug:"alert-dialog",children:l.jsx(tD,{scope:n,cancelRef:p,children:l.jsxs(cp,{role:"alertdialog",...a,...i,ref:d,onOpenAutoFocus:lt(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(rD,{children:o}),l.jsx(sD,{contentRef:u})]})})})});$b.displayName=Ps;var Fb="AlertDialogTitle",zb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return l.jsx(dp,{...i,...o,ref:t})});zb.displayName=Fb;var Bb="AlertDialogDescription",Ub=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return l.jsx(fp,{...i,...o,ref:t})});Ub.displayName=Bb;var oD="AlertDialogAction",Hb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return l.jsx(R0,{...i,...o,ref:t})});Hb.displayName=oD;var Wb="AlertDialogCancel",Vb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:i}=nD(Wb,n),a=Kr(n),u=nn(t,i);return l.jsx(R0,{...a,...o,ref:u})});Vb.displayName=Wb;var sD=({contentRef:e})=>{const t=`\`${Ps}\` requires a description for the component to be accessible for screen reader users.
444
-
445
- You can add a description to the \`${Ps}\` by passing a \`${Bb}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
446
-
447
- 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 \`${Ps}\`. 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.
448
-
449
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},iD=Ob,lD=_b,qb=Mb,Kb=$b,Gb=Hb,Yb=Vb,Xb=zb,Qb=Ub;const aD=iD,uD=lD,Jb=g.forwardRef(({className:e,...t},n)=>l.jsx(qb,{ref:n,className:Fe("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));Jb.displayName=qb.displayName;const Zb=g.forwardRef(({className:e,...t},n)=>l.jsxs(uD,{children:[l.jsx(Jb,{}),l.jsx(Kb,{ref:n,className:Fe("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})]}));Zb.displayName=Kb.displayName;function cD({className:e,...t}){return l.jsx("div",{className:Fe("flex flex-col space-y-2 text-left",e),...t})}function dD({className:e,...t}){return l.jsx("div",{className:Fe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const ew=g.forwardRef(({className:e,...t},n)=>l.jsx(Xb,{ref:n,className:Fe("text-lg font-semibold tracking-tight text-foreground",e),...t}));ew.displayName=Xb.displayName;const tw=g.forwardRef(({className:e,...t},n)=>l.jsx(Qb,{ref:n,className:Fe("text-sm leading-6 text-muted-foreground",e),...t}));tw.displayName=Qb.displayName;const nw=g.forwardRef(({className:e,...t},n)=>l.jsx(Gb,{ref:n,className:Fe(e),...t}));nw.displayName=Gb.displayName;const rw=g.forwardRef(({className:e,...t},n)=>l.jsx(Yb,{ref:n,className:Fe(e),...t}));rw.displayName=Yb.displayName;function ow({open:e,title:t,description:n,confirmLabel:o,cancelLabel:i="Cancel",loading:a=!1,destructive:u=!1,onConfirm:d,onOpenChange:p}){return l.jsx(aD,{open:e,onOpenChange:h=>a?void 0:p(h),children:l.jsxs(Zb,{children:[l.jsxs(cD,{children:[l.jsx(ew,{children:t}),l.jsx(tw,{children:n})]}),l.jsxs(dD,{children:[l.jsx(rw,{disabled:a,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:i}),l.jsx(nw,{disabled:a,className:`shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50 ${u?"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...":o})]})]})})}const fD=["top","right","bottom","left"],jo=Math.min,_n=Math.max,Za=Math.round,Da=Math.floor,Nr=e=>({x:e,y:e}),pD={left:"right",right:"left",bottom:"top",top:"bottom"};function Tf(e,t,n){return _n(e,jo(t,n))}function Vr(e,t){return typeof e=="function"?e(t):e}function qr(e){return e.split("-")[0]}function Us(e){return e.split("-")[1]}function Lp(e){return e==="x"?"y":"x"}function Ip(e){return e==="y"?"height":"width"}function kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Op(e){return Lp(kr(e))}function hD(e,t,n){n===void 0&&(n=!1);const o=Us(e),i=Op(e),a=Ip(i);let u=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=eu(u)),[u,eu(u)]}function mD(e){const t=eu(e);return[Af(e),t,Af(t)]}function Af(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const iy=["left","right"],ly=["right","left"],gD=["top","bottom"],xD=["bottom","top"];function yD(e,t,n){switch(e){case"top":case"bottom":return n?t?ly:iy:t?iy:ly;case"left":case"right":return t?gD:xD;default:return[]}}function vD(e,t,n,o){const i=Us(e);let a=yD(qr(e),n==="start",o);return i&&(a=a.map(u=>u+"-"+i),t&&(a=a.concat(a.map(Af)))),a}function eu(e){const t=qr(e);return pD[t]+e.slice(t.length)}function bD(e){return{top:0,right:0,bottom:0,left:0,...e}}function sw(e){return typeof e!="number"?bD(e):{top:e,right:e,bottom:e,left:e}}function tu(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function ay(e,t,n){let{reference:o,floating:i}=e;const a=kr(t),u=Op(t),d=Ip(u),p=qr(t),h=a==="y",m=o.x+o.width/2-i.width/2,x=o.y+o.height/2-i.height/2,v=o[d]/2-i[d]/2;let b;switch(p){case"top":b={x:m,y:o.y-i.height};break;case"bottom":b={x:m,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:x};break;case"left":b={x:o.x-i.width,y:x};break;default:b={x:o.x,y:o.y}}switch(Us(t)){case"start":b[u]-=v*(n&&h?-1:1);break;case"end":b[u]+=v*(n&&h?-1:1);break}return b}async function wD(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:u,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:x="floating",altBoundary:v=!1,padding:b=0}=Vr(t,e),N=sw(b),S=d[v?x==="floating"?"reference":"floating":x],C=tu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),T=x==="floating"?{x:o,y:i,width:u.floating.width,height:u.floating.height}:u.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d.floating)),_=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},O=tu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:A,strategy:p}):T);return{top:(C.top-O.top+N.top)/_.y,bottom:(O.bottom-C.bottom+N.bottom)/_.y,left:(C.left-O.left+N.left)/_.x,right:(O.right-C.right+N.right)/_.x}}const kD=50,SD=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:u}=n,d=u.detectOverflow?u:{...u,detectOverflow:wD},p=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:x}=ay(h,o,p),v=o,b=0;const N={};for(let k=0;k<a.length;k++){const S=a[k];if(!S)continue;const{name:C,fn:T}=S,{x:A,y:_,data:O,reset:P}=await T({x:m,y:x,initialPlacement:o,placement:v,strategy:i,middlewareData:N,rects:h,platform:d,elements:{reference:e,floating:t}});m=A??m,x=_??x,N[C]={...N[C],...O},P&&b<kD&&(b++,typeof P=="object"&&(P.placement&&(v=P.placement),P.rects&&(h=P.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:m,y:x}=ay(h,v,p)),k=-1)}return{x:m,y:x,placement:v,strategy:i,middlewareData:N}},jD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:u,elements:d,middlewareData:p}=t,{element:h,padding:m=0}=Vr(e,t)||{};if(h==null)return{};const x=sw(m),v={x:n,y:o},b=Op(i),N=Ip(b),k=await u.getDimensions(h),S=b==="y",C=S?"top":"left",T=S?"bottom":"right",A=S?"clientHeight":"clientWidth",_=a.reference[N]+a.reference[b]-v[b]-a.floating[N],O=v[b]-a.reference[b],P=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let $=P?P[A]:0;(!$||!await(u.isElement==null?void 0:u.isElement(P)))&&($=d.floating[A]||a.floating[N]);const E=_/2-O/2,U=$/2-k[N]/2-1,ee=jo(x[C],U),Y=jo(x[T],U),q=ee,X=$-k[N]-Y,Q=$/2-k[N]/2+E,I=Tf(q,Q,X),D=!p.arrow&&Us(i)!=null&&Q!==I&&a.reference[N]/2-(Q<q?ee:Y)-k[N]/2<0,V=D?Q<q?Q-q:Q-X:0;return{[b]:v[b]+V,data:{[b]:I,centerOffset:Q-I-V,...D&&{alignmentOffset:V}},reset:D}}}),CD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:u,initialPlacement:d,platform:p,elements:h}=t,{mainAxis:m=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...S}=Vr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const C=qr(i),T=kr(d),A=qr(d)===d,_=await(p.isRTL==null?void 0:p.isRTL(h.floating)),O=v||(A||!k?[eu(d)]:mD(d)),P=N!=="none";!v&&P&&O.push(...vD(d,k,N,_));const $=[d,...O],E=await p.detectOverflow(t,S),U=[];let ee=((o=a.flip)==null?void 0:o.overflows)||[];if(m&&U.push(E[C]),x){const Q=hD(i,u,_);U.push(E[Q[0]],E[Q[1]])}if(ee=[...ee,{placement:i,overflows:U}],!U.every(Q=>Q<=0)){var Y,q;const Q=(((Y=a.flip)==null?void 0:Y.index)||0)+1,I=$[Q];if(I&&(!(x==="alignment"?T!==kr(I):!1)||ee.every(H=>kr(H.placement)===T?H.overflows[0]>0:!0)))return{data:{index:Q,overflows:ee},reset:{placement:I}};let D=(q=ee.filter(V=>V.overflows[0]<=0).sort((V,H)=>V.overflows[1]-H.overflows[1])[0])==null?void 0:q.placement;if(!D)switch(b){case"bestFit":{var X;const V=(X=ee.filter(H=>{if(P){const te=kr(H.placement);return te===T||te==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(te=>te>0).reduce((te,R)=>te+R,0)]).sort((H,te)=>H[1]-te[1])[0])==null?void 0:X[0];V&&(D=V);break}case"initialPlacement":D=d;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function uy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cy(e){return fD.some(t=>e[t]>=0)}const ND=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:i="referenceHidden",...a}=Vr(e,t);switch(i){case"referenceHidden":{const u=await o.detectOverflow(t,{...a,elementContext:"reference"}),d=uy(u,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:cy(d)}}}case"escaped":{const u=await o.detectOverflow(t,{...a,altBoundary:!0}),d=uy(u,n.floating);return{data:{escapedOffsets:d,escaped:cy(d)}}}default:return{}}}}},iw=new Set(["left","top"]);async function ED(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),u=qr(n),d=Us(n),p=kr(n)==="y",h=iw.has(u)?-1:1,m=a&&p?-1:1,x=Vr(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:N}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return d&&typeof N=="number"&&(b=d==="end"?N*-1:N),p?{x:b*m,y:v*h}:{x:v*h,y:b*m}}const RD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:u,middlewareData:d}=t,p=await ED(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+p.x,y:a+p.y,data:{...p,placement:u}}}}},PD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:a}=t,{mainAxis:u=!0,crossAxis:d=!1,limiter:p={fn:C=>{let{x:T,y:A}=C;return{x:T,y:A}}},...h}=Vr(e,t),m={x:n,y:o},x=await a.detectOverflow(t,h),v=kr(qr(i)),b=Lp(v);let N=m[b],k=m[v];if(u){const C=b==="y"?"top":"left",T=b==="y"?"bottom":"right",A=N+x[C],_=N-x[T];N=Tf(A,N,_)}if(d){const C=v==="y"?"top":"left",T=v==="y"?"bottom":"right",A=k+x[C],_=k-x[T];k=Tf(A,k,_)}const S=p.fn({...t,[b]:N,[v]:k});return{...S,data:{x:S.x-n,y:S.y-o,enabled:{[b]:u,[v]:d}}}}}},TD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:a,middlewareData:u}=t,{offset:d=0,mainAxis:p=!0,crossAxis:h=!0}=Vr(e,t),m={x:n,y:o},x=kr(i),v=Lp(x);let b=m[v],N=m[x];const k=Vr(d,t),S=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(p){const A=v==="y"?"height":"width",_=a.reference[v]-a.floating[A]+S.mainAxis,O=a.reference[v]+a.reference[A]-S.mainAxis;b<_?b=_:b>O&&(b=O)}if(h){var C,T;const A=v==="y"?"width":"height",_=iw.has(qr(i)),O=a.reference[x]-a.floating[A]+(_&&((C=u.offset)==null?void 0:C[x])||0)+(_?0:S.crossAxis),P=a.reference[x]+a.reference[A]+(_?0:((T=u.offset)==null?void 0:T[x])||0)-(_?S.crossAxis:0);N<O?N=O:N>P&&(N=P)}return{[v]:b,[x]:N}}}},AD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:u,elements:d}=t,{apply:p=()=>{},...h}=Vr(e,t),m=await u.detectOverflow(t,h),x=qr(i),v=Us(i),b=kr(i)==="y",{width:N,height:k}=a.floating;let S,C;x==="top"||x==="bottom"?(S=x,C=v===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(C=x,S=v==="end"?"top":"bottom");const T=k-m.top-m.bottom,A=N-m.left-m.right,_=jo(k-m[S],T),O=jo(N-m[C],A),P=!t.middlewareData.shift;let $=_,E=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=A),(o=t.middlewareData.shift)!=null&&o.enabled.y&&($=T),P&&!v){const ee=_n(m.left,0),Y=_n(m.right,0),q=_n(m.top,0),X=_n(m.bottom,0);b?E=N-2*(ee!==0||Y!==0?ee+Y:_n(m.left,m.right)):$=k-2*(q!==0||X!==0?q+X:_n(m.top,m.bottom))}await p({...t,availableWidth:E,availableHeight:$});const U=await u.getDimensions(d.floating);return N!==U.width||k!==U.height?{reset:{rects:!0}}:{}}}};function Cu(){return typeof window<"u"}function Hs(e){return lw(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(lw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lw(e){return Cu()?e instanceof Node||e instanceof $n(e).Node:!1}function lr(e){return Cu()?e instanceof Element||e instanceof $n(e).Element:!1}function Gr(e){return Cu()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function dy(e){return!Cu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function cl(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function DD(e){return/^(table|td|th)$/.test(Hs(e))}function Nu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const LD=/transform|translate|scale|rotate|perspective|filter/,ID=/paint|layout|strict|content/,zo=e=>!!e&&e!=="none";let Zd;function _p(e){const t=lr(e)?ar(e):e;return zo(t.transform)||zo(t.translate)||zo(t.scale)||zo(t.rotate)||zo(t.perspective)||!Mp()&&(zo(t.backdropFilter)||zo(t.filter))||LD.test(t.willChange||"")||ID.test(t.contain||"")}function OD(e){let t=Co(e);for(;Gr(t)&&!Ds(t);){if(_p(t))return t;if(Nu(t))return null;t=Co(t)}return null}function Mp(){return Zd==null&&(Zd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Zd}function Ds(e){return/^(html|body|#document)$/.test(Hs(e))}function ar(e){return $n(e).getComputedStyle(e)}function Eu(e){return lr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(Hs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dy(e)&&e.host||Pr(e);return dy(t)?t.host:t}function aw(e){const t=Co(e);return Ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&cl(t)?t:aw(t)}function Xi(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=aw(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),u=$n(i);if(a){const d=Df(u);return t.concat(u,u.visualViewport||[],cl(i)?i:[],d&&n?Xi(d):[])}else return t.concat(i,Xi(i,[],n))}function Df(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uw(e){const t=ar(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Gr(e),a=i?e.offsetWidth:n,u=i?e.offsetHeight:o,d=Za(n)!==a||Za(o)!==u;return d&&(n=a,o=u),{width:n,height:o,$:d}}function $p(e){return lr(e)?e:e.contextElement}function Ts(e){const t=$p(e);if(!Gr(t))return Nr(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=uw(t);let u=(a?Za(n.width):n.width)/o,d=(a?Za(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const _D=Nr(0);function cw(e){const t=$n(e);return!Mp()||!t.visualViewport?_D:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function MD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function Wo(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=$p(e);let u=Nr(1);t&&(o?lr(o)&&(u=Ts(o)):u=Ts(e));const d=MD(a,n,o)?cw(a):Nr(0);let p=(i.left+d.x)/u.x,h=(i.top+d.y)/u.y,m=i.width/u.x,x=i.height/u.y;if(a){const v=$n(a),b=o&&lr(o)?$n(o):o;let N=v,k=Df(N);for(;k&&o&&b!==N;){const S=Ts(k),C=k.getBoundingClientRect(),T=ar(k),A=C.left+(k.clientLeft+parseFloat(T.paddingLeft))*S.x,_=C.top+(k.clientTop+parseFloat(T.paddingTop))*S.y;p*=S.x,h*=S.y,m*=S.x,x*=S.y,p+=A,h+=_,N=$n(k),k=Df(N)}}return tu({width:m,height:x,x:p,y:h})}function Ru(e,t){const n=Eu(e).scrollLeft;return t?t.left+n:Wo(Pr(e)).left+n}function dw(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Ru(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function $D(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",u=Pr(o),d=t?Nu(t.floating):!1;if(o===u||d&&a)return n;let p={scrollLeft:0,scrollTop:0},h=Nr(1);const m=Nr(0),x=Gr(o);if((x||!x&&!a)&&((Hs(o)!=="body"||cl(u))&&(p=Eu(o)),x)){const b=Wo(o);h=Ts(o),m.x=b.x+o.clientLeft,m.y=b.y+o.clientTop}const v=u&&!x&&!a?dw(u,p):Nr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-p.scrollLeft*h.x+m.x+v.x,y:n.y*h.y-p.scrollTop*h.y+m.y+v.y}}function FD(e){return Array.from(e.getClientRects())}function zD(e){const t=Pr(e),n=Eu(e),o=e.ownerDocument.body,i=_n(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=_n(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let u=-n.scrollLeft+Ru(e);const d=-n.scrollTop;return ar(o).direction==="rtl"&&(u+=_n(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:u,y:d}}const fy=25;function BD(e,t){const n=$n(e),o=Pr(e),i=n.visualViewport;let a=o.clientWidth,u=o.clientHeight,d=0,p=0;if(i){a=i.width,u=i.height;const m=Mp();(!m||m&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const h=Ru(o);if(h<=0){const m=o.ownerDocument,x=m.body,v=getComputedStyle(x),b=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,N=Math.abs(o.clientWidth-x.clientWidth-b);N<=fy&&(a-=N)}else h<=fy&&(a+=h);return{width:a,height:u,x:d,y:p}}function UD(e,t){const n=Wo(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=Gr(e)?Ts(e):Nr(1),u=e.clientWidth*a.x,d=e.clientHeight*a.y,p=i*a.x,h=o*a.y;return{width:u,height:d,x:p,y:h}}function py(e,t,n){let o;if(t==="viewport")o=BD(e,n);else if(t==="document")o=zD(Pr(e));else if(lr(t))o=UD(t,n);else{const i=cw(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return tu(o)}function fw(e,t){const n=Co(e);return n===t||!lr(n)||Ds(n)?!1:ar(n).position==="fixed"||fw(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let o=Xi(e,[],!1).filter(d=>lr(d)&&Hs(d)!=="body"),i=null;const a=ar(e).position==="fixed";let u=a?Co(e):e;for(;lr(u)&&!Ds(u);){const d=ar(u),p=_p(u);!p&&d.position==="fixed"&&(i=null),(a?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||cl(u)&&!p&&fw(e,u))?o=o.filter(m=>m!==u):i=d,u=Co(u)}return t.set(e,o),o}function WD(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const u=[...n==="clippingAncestors"?Nu(t)?[]:HD(t,this._c):[].concat(n),o],d=py(t,u[0],i);let p=d.top,h=d.right,m=d.bottom,x=d.left;for(let v=1;v<u.length;v++){const b=py(t,u[v],i);p=_n(b.top,p),h=jo(b.right,h),m=jo(b.bottom,m),x=_n(b.left,x)}return{width:h-x,height:m-p,x,y:p}}function VD(e){const{width:t,height:n}=uw(e);return{width:t,height:n}}function qD(e,t,n){const o=Gr(t),i=Pr(t),a=n==="fixed",u=Wo(e,!0,a,t);let d={scrollLeft:0,scrollTop:0};const p=Nr(0);function h(){p.x=Ru(i)}if(o||!o&&!a)if((Hs(t)!=="body"||cl(i))&&(d=Eu(t)),o){const b=Wo(t,!0,a,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else i&&h();a&&!o&&i&&h();const m=i&&!o&&!a?dw(i,d):Nr(0),x=u.left+d.scrollLeft-p.x-m.x,v=u.top+d.scrollTop-p.y-m.y;return{x,y:v,width:u.width,height:u.height}}function ef(e){return ar(e).position==="static"}function hy(e,t){if(!Gr(e)||ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function pw(e,t){const n=$n(e);if(Nu(e))return n;if(!Gr(e)){let i=Co(e);for(;i&&!Ds(i);){if(lr(i)&&!ef(i))return i;i=Co(i)}return n}let o=hy(e,t);for(;o&&DD(o)&&ef(o);)o=hy(o,t);return o&&Ds(o)&&ef(o)&&!_p(o)?n:o||OD(e)||n}const KD=async function(e){const t=this.getOffsetParent||pw,n=this.getDimensions,o=await n(e.floating);return{reference:qD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function GD(e){return ar(e).direction==="rtl"}const YD={convertOffsetParentRelativeRectToViewportRelativeRect:$D,getDocumentElement:Pr,getClippingRect:WD,getOffsetParent:pw,getElementRects:KD,getClientRects:FD,getDimensions:VD,getScale:Ts,isElement:lr,isRTL:GD};function hw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function XD(e,t){let n=null,o;const i=Pr(e);function a(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function u(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),a();const h=e.getBoundingClientRect(),{left:m,top:x,width:v,height:b}=h;if(d||t(),!v||!b)return;const N=Da(x),k=Da(i.clientWidth-(m+v)),S=Da(i.clientHeight-(x+b)),C=Da(m),A={rootMargin:-N+"px "+-k+"px "+-S+"px "+-C+"px",threshold:_n(0,jo(1,p))||1};let _=!0;function O(P){const $=P[0].intersectionRatio;if($!==p){if(!_)return u();$?u(!1,$):o=setTimeout(()=>{u(!1,1e-7)},1e3)}$===1&&!hw(h,e.getBoundingClientRect())&&u(),_=!1}try{n=new IntersectionObserver(O,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,A)}n.observe(e)}return u(!0),a}function QD(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,h=$p(e),m=i||a?[...h?Xi(h):[],...t?Xi(t):[]]:[];m.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const x=h&&d?XD(h,n):null;let v=-1,b=null;u&&(b=new ResizeObserver(C=>{let[T]=C;T&&T.target===h&&b&&t&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(t)})),n()}),h&&!p&&b.observe(h),t&&b.observe(t));let N,k=p?Wo(e):null;p&&S();function S(){const C=Wo(e);k&&!hw(k,C)&&n(),k=C,N=requestAnimationFrame(S)}return n(),()=>{var C;m.forEach(T=>{i&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),x==null||x(),(C=b)==null||C.disconnect(),b=null,p&&cancelAnimationFrame(N)}}const JD=RD,ZD=PD,e4=CD,t4=AD,n4=ND,my=jD,r4=TD,o4=(e,t,n)=>{const o=new Map,i={platform:YD,...n},a={...i.platform,_c:o};return SD(e,t,{...i,platform:a})};var s4=typeof document<"u",i4=function(){},Wa=s4?g.useLayoutEffect:i4;function nu(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,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!nu(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const a=i[o];if(!(a==="_owner"&&e.$$typeof)&&!nu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function mw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gy(e,t){const n=mw(e);return Math.round(t*n)/n}function tf(e){const t=g.useRef(e);return Wa(()=>{t.current=e}),t}function l4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:u}={},transform:d=!0,whileElementsMounted:p,open:h}=e,[m,x]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=g.useState(o);nu(v,o)||b(o);const[N,k]=g.useState(null),[S,C]=g.useState(null),T=g.useCallback(H=>{H!==P.current&&(P.current=H,k(H))},[]),A=g.useCallback(H=>{H!==$.current&&($.current=H,C(H))},[]),_=a||N,O=u||S,P=g.useRef(null),$=g.useRef(null),E=g.useRef(m),U=p!=null,ee=tf(p),Y=tf(i),q=tf(h),X=g.useCallback(()=>{if(!P.current||!$.current)return;const H={placement:t,strategy:n,middleware:v};Y.current&&(H.platform=Y.current),o4(P.current,$.current,H).then(te=>{const R={...te,isPositioned:q.current!==!1};Q.current&&!nu(E.current,R)&&(E.current=R,wo.flushSync(()=>{x(R)}))})},[v,t,n,Y,q]);Wa(()=>{h===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,x(H=>({...H,isPositioned:!1})))},[h]);const Q=g.useRef(!1);Wa(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Wa(()=>{if(_&&(P.current=_),O&&($.current=O),_&&O){if(ee.current)return ee.current(_,O,X);X()}},[_,O,X,ee,U]);const I=g.useMemo(()=>({reference:P,floating:$,setReference:T,setFloating:A}),[T,A]),D=g.useMemo(()=>({reference:_,floating:O}),[_,O]),V=g.useMemo(()=>{const H={position:n,left:0,top:0};if(!D.floating)return H;const te=gy(D.floating,m.x),R=gy(D.floating,m.y);return d?{...H,transform:"translate("+te+"px, "+R+"px)",...mw(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:R}},[n,d,D.floating,m.x,m.y]);return g.useMemo(()=>({...m,update:X,refs:I,elements:D,floatingStyles:V}),[m,X,I,D,V])}const a4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?my({element:o.current,padding:i}).fn(n):{}:o?my({element:o,padding:i}).fn(n):{}}}},u4=(e,t)=>{const n=JD(e);return{name:n.name,fn:n.fn,options:[e,t]}},c4=(e,t)=>{const n=ZD(e);return{name:n.name,fn:n.fn,options:[e,t]}},d4=(e,t)=>({fn:r4(e).fn,options:[e,t]}),f4=(e,t)=>{const n=e4(e);return{name:n.name,fn:n.fn,options:[e,t]}},p4=(e,t)=>{const n=t4(e);return{name:n.name,fn:n.fn,options:[e,t]}},h4=(e,t)=>{const n=n4(e);return{name:n.name,fn:n.fn,options:[e,t]}},m4=(e,t)=>{const n=a4(e);return{name:n.name,fn:n.fn,options:[e,t]}};var g4="Arrow",gw=g.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...a}=e;return l.jsx(St.svg,{...a,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});gw.displayName=g4;var x4=gw;function y4(e){const[t,n]=g.useState(void 0);return ko(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let u,d;if("borderBoxSize"in a){const p=a.borderBoxSize,h=Array.isArray(p)?p[0]:p;u=h.inlineSize,d=h.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Fp="Popper",[xw,yw]=Vo(Fp),[v4,vw]=xw(Fp),bw=e=>{const{__scopePopper:t,children:n}=e,[o,i]=g.useState(null);return l.jsx(v4,{scope:t,anchor:o,onAnchorChange:i,children:n})};bw.displayName=Fp;var ww="PopperAnchor",kw=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=vw(ww,n),u=g.useRef(null),d=nn(t,u),p=g.useRef(null);return g.useEffect(()=>{const h=p.current;p.current=(o==null?void 0:o.current)||u.current,h!==p.current&&a.onAnchorChange(p.current)}),o?null:l.jsx(St.div,{...i,ref:d})});kw.displayName=ww;var zp="PopperContent",[b4,w4]=xw(zp),Sw=g.forwardRef((e,t)=>{var je,Se,Ce,we,at,Ze;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:N,...k}=e,S=vw(zp,n),[C,T]=g.useState(null),A=nn(t,Be=>T(Be)),[_,O]=g.useState(null),P=y4(_),$=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,U=o+(a!=="center"?"-"+a:""),ee=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Y=Array.isArray(h)?h:[h],q=Y.length>0,X={padding:ee,boundary:Y.filter(S4),altBoundary:q},{refs:Q,floatingStyles:I,placement:D,isPositioned:V,middlewareData:H}=l4({strategy:"fixed",placement:U,whileElementsMounted:(...Be)=>QD(...Be,{animationFrame:b==="always"}),elements:{reference:S.anchor},middleware:[u4({mainAxis:i+E,alignmentAxis:u}),p&&c4({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?d4():void 0,...X}),p&&f4({...X}),p4({...X,apply:({elements:Be,rects:ze,availableWidth:bt,availableHeight:It})=>{const{width:on,height:dn}=ze.reference,Ge=Be.floating.style;Ge.setProperty("--radix-popper-available-width",`${bt}px`),Ge.setProperty("--radix-popper-available-height",`${It}px`),Ge.setProperty("--radix-popper-anchor-width",`${on}px`),Ge.setProperty("--radix-popper-anchor-height",`${dn}px`)}}),_&&m4({element:_,padding:d}),j4({arrowWidth:$,arrowHeight:E}),v&&h4({strategy:"referenceHidden",...X})]}),[te,R]=Nw(D),F=Uo(N);ko(()=>{V&&(F==null||F())},[V,F]);const Z=(je=H.arrow)==null?void 0:je.x,L=(Se=H.arrow)==null?void 0:Se.y,de=((Ce=H.arrow)==null?void 0:Ce.centerOffset)!==0,[ge,fe]=g.useState();return ko(()=>{C&&fe(window.getComputedStyle(C).zIndex)},[C]),l.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:V?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(we=H.transformOrigin)==null?void 0:we.x,(at=H.transformOrigin)==null?void 0:at.y].join(" "),...((Ze=H.hide)==null?void 0:Ze.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(b4,{scope:n,placedSide:te,onArrowChange:O,arrowX:Z,arrowY:L,shouldHideArrow:de,children:l.jsx(St.div,{"data-side":te,"data-align":R,...k,ref:A,style:{...k.style,animation:V?void 0:"none"}})})})});Sw.displayName=zp;var jw="PopperArrow",k4={top:"bottom",right:"left",bottom:"top",left:"right"},Cw=g.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,a=w4(jw,o),u=k4[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[u]: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(x4,{...i,ref:n,style:{...i.style,display:"block"}})})});Cw.displayName=jw;function S4(e){return e!==null}var j4=e=>({name:"transformOrigin",options:e,fn(t){var S,C,T;const{placement:n,rects:o,middlewareData:i}=t,u=((S=i.arrow)==null?void 0:S.centerOffset)!==0,d=u?0:e.arrowWidth,p=u?0:e.arrowHeight,[h,m]=Nw(n),x={start:"0%",center:"50%",end:"100%"}[m],v=(((C=i.arrow)==null?void 0:C.x)??0)+d/2,b=(((T=i.arrow)==null?void 0:T.y)??0)+p/2;let N="",k="";return h==="bottom"?(N=u?x:`${v}px`,k=`${-p}px`):h==="top"?(N=u?x:`${v}px`,k=`${o.floating.height+p}px`):h==="right"?(N=`${-p}px`,k=u?x:`${b}px`):h==="left"&&(N=`${o.floating.width+p}px`,k=u?x:`${b}px`),{data:{x:N,y:k}}}});function Nw(e){const[t,n="center"]=e.split("-");return[t,n]}var C4=bw,N4=kw,E4=Sw,R4=Cw,P4=Symbol("radix.slottable");function T4(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=P4,t}var A4=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"}),D4="VisuallyHidden",Ew=g.forwardRef((e,t)=>l.jsx(St.span,{...e,ref:t,style:{...A4,...e.style}}));Ew.displayName=D4;var L4=Ew,[Pu]=Vo("Tooltip",[yw]),Tu=yw(),Rw="TooltipProvider",I4=700,Lf="tooltip.open",[O4,Bp]=Pu(Rw),Pw=e=>{const{__scopeTooltip:t,delayDuration:n=I4,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=e,u=g.useRef(!0),d=g.useRef(!1),p=g.useRef(0);return g.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),l.jsx(O4,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(p.current),u.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>u.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:g.useCallback(h=>{d.current=h},[]),disableHoverableContent:i,children:a})};Pw.displayName=Rw;var Qi="Tooltip",[_4,dl]=Pu(Qi),Tw=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:a,disableHoverableContent:u,delayDuration:d}=e,p=Bp(Qi,e.__scopeTooltip),h=Tu(t),[m,x]=g.useState(null),v=Cs(),b=g.useRef(0),N=u??p.disableHoverableContent,k=d??p.delayDuration,S=g.useRef(!1),[C,T]=pu({prop:o,defaultProp:i??!1,onChange:$=>{$?(p.onOpen(),document.dispatchEvent(new CustomEvent(Lf))):p.onClose(),a==null||a($)},caller:Qi}),A=g.useMemo(()=>C?S.current?"delayed-open":"instant-open":"closed",[C]),_=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,S.current=!1,T(!0)},[T]),O=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,T(!1)},[T]),P=g.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{S.current=!0,T(!0),b.current=0},k)},[k,T]);return g.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),l.jsx(C4,{...h,children:l.jsx(_4,{scope:t,contentId:v,open:C,stateAttribute:A,trigger:m,onTriggerChange:x,onTriggerEnter:g.useCallback(()=>{p.isOpenDelayedRef.current?P():_()},[p.isOpenDelayedRef,P,_]),onTriggerLeave:g.useCallback(()=>{N?O():(window.clearTimeout(b.current),b.current=0)},[O,N]),onOpen:_,onClose:O,disableHoverableContent:N,children:n})})};Tw.displayName=Qi;var If="TooltipTrigger",Aw=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=dl(If,n),a=Bp(If,n),u=Tu(n),d=g.useRef(null),p=nn(t,d,i.onTriggerChange),h=g.useRef(!1),m=g.useRef(!1),x=g.useCallback(()=>h.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),l.jsx(N4,{asChild:!0,...u,children:l.jsx(St.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:p,onPointerMove:lt(e.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:lt(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:lt(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:lt(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:lt(e.onBlur,i.onClose),onClick:lt(e.onClick,i.onClose)})})});Aw.displayName=If;var Up="TooltipPortal",[M4,$4]=Pu(Up,{forceMount:void 0}),Dw=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,a=dl(Up,t);return l.jsx(M4,{scope:t,forceMount:n,children:l.jsx(qo,{present:n||a.open,children:l.jsx(sp,{asChild:!0,container:i,children:o})})})};Dw.displayName=Up;var Ls="TooltipContent",Lw=g.forwardRef((e,t)=>{const n=$4(Ls,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=e,u=dl(Ls,e.__scopeTooltip);return l.jsx(qo,{present:o||u.open,children:u.disableHoverableContent?l.jsx(Iw,{side:i,...a,ref:t}):l.jsx(F4,{side:i,...a,ref:t})})}),F4=g.forwardRef((e,t)=>{const n=dl(Ls,e.__scopeTooltip),o=Bp(Ls,e.__scopeTooltip),i=g.useRef(null),a=nn(t,i),[u,d]=g.useState(null),{trigger:p,onClose:h}=n,m=i.current,{onPointerInTransitChange:x}=o,v=g.useCallback(()=>{d(null),x(!1)},[x]),b=g.useCallback((N,k)=>{const S=N.currentTarget,C={x:N.clientX,y:N.clientY},T=W4(C,S.getBoundingClientRect()),A=V4(C,T),_=q4(k.getBoundingClientRect()),O=G4([...A,..._]);d(O),x(!0)},[x]);return g.useEffect(()=>()=>v(),[v]),g.useEffect(()=>{if(p&&m){const N=S=>b(S,m),k=S=>b(S,p);return p.addEventListener("pointerleave",N),m.addEventListener("pointerleave",k),()=>{p.removeEventListener("pointerleave",N),m.removeEventListener("pointerleave",k)}}},[p,m,b,v]),g.useEffect(()=>{if(u){const N=k=>{const S=k.target,C={x:k.clientX,y:k.clientY},T=(p==null?void 0:p.contains(S))||(m==null?void 0:m.contains(S)),A=!K4(C,u);T?v():A&&(v(),h())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[p,m,u,h,v]),l.jsx(Iw,{...e,ref:a})}),[z4,B4]=Pu(Qi,{isInside:!1}),U4=T4("TooltipContent"),Iw=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:u,...d}=e,p=dl(Ls,n),h=Tu(n),{onClose:m}=p;return g.useEffect(()=>(document.addEventListener(Lf,m),()=>document.removeEventListener(Lf,m)),[m]),g.useEffect(()=>{if(p.trigger){const x=v=>{const b=v.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(op,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:l.jsxs(E4,{"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(U4,{children:o}),l.jsx(z4,{scope:n,isInside:!0,children:l.jsx(L4,{id:p.contentId,role:"tooltip",children:i||o})})]})})});Lw.displayName=Ls;var Ow="TooltipArrow",H4=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Tu(n);return B4(Ow,n).isInside?null:l.jsx(R4,{...i,...o,ref:t})});H4.displayName=Ow;function W4(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,i,a)){case a:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function V4(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function q4(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function K4(e,t){const{x:n,y:o}=e;let i=!1;for(let a=0,u=t.length-1;a<t.length;u=a++){const d=t[a],p=t[u],h=d.x,m=d.y,x=p.x,v=p.y;m>o!=v>o&&n<(x-h)*(o-m)/(v-m)+h&&(i=!i)}return i}function G4(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Y4(t)}function Y4(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const a=t[t.length-1],u=t[t.length-2];if((a.x-u.x)*(i.y-u.y)>=(a.y-u.y)*(i.x-u.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const a=n[n.length-1],u=n[n.length-2];if((a.x-u.x)*(i.y-u.y)>=(a.y-u.y)*(i.x-u.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 X4=Pw,Q4=Tw,J4=Aw,Z4=Dw,_w=Lw;const Mw=X4,$w=Q4,Fw=J4,Hp=g.forwardRef(({className:e,sideOffset:t=4,...n},o)=>l.jsx(Z4,{children:l.jsx(_w,{ref:o,sideOffset:t,className:Fe("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})}));Hp.displayName=_w.displayName;function eL({items:e,align:t="end"}){const[n,o]=g.useState(!1),i=g.useRef(null);return g.useEffect(()=>{if(!n)return;function a(d){i.current&&!i.current.contains(d.target)&&o(!1)}function u(d){d.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",a),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",u)}},[n]),e.length===0?null:l.jsxs("div",{className:"relative",ref:i,children:[l.jsx("button",{type:"button",onClick:()=>o(a=>!a),className:"shell-action",title:"More actions","aria-haspopup":"true","aria-expanded":n,children:l.jsx(rC,{className:"h-4 w-4"})}),n&&l.jsx("div",{className:Fe("absolute top-full mt-1 z-30 min-w-[220px] rounded-md border border-border/70 bg-background shadow-lg py-1",t==="end"?"right-0":"left-0"),children:l.jsx(Mw,{delayDuration:200,children:e.map(a=>{const u=a.icon,d=Fe("flex w-full items-center gap-2 px-3 py-1.5 text-sm text-left transition",a.disabled?"opacity-50 cursor-not-allowed":a.destructive?"text-destructive hover:bg-destructive/10":"hover:bg-foreground/5"),p=l.jsxs(l.Fragment,{children:[u?l.jsx(u,{className:"h-4 w-4 shrink-0"}):null,l.jsx("span",{className:"truncate",children:a.label})]});if(a.disabled){const h=l.jsx("span",{tabIndex:0,className:"inline-block w-full outline-none focus-visible:ring-1 focus-visible:ring-ring",children:l.jsx("button",{type:"button",disabled:!0,className:d,children:p})});return a.disabledReason?l.jsxs($w,{children:[l.jsx(Fw,{asChild:!0,children:h}),l.jsx(Hp,{side:"left",children:a.disabledReason})]},a.key):l.jsx("div",{children:h},a.key)}return a.href?l.jsx(Re,{to:a.href,className:d,onClick:()=>o(!1),children:p},a.key):l.jsx("button",{type:"button",className:d,onClick:()=>{var h;(h=a.onSelect)==null||h.call(a),o(!1)},children:p},a.key)})})})]})}async function zw(e,t,n,o){const i=await fetch(`/api/projects/${e}/assignments/${t}/transitions/${n.command}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o?{reason:o}:{})}),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 Bw(e,t,n){const o=await fetch(`/api/projects/${e}/assignments/${t}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:n})}),i=await o.json().catch(()=>null);if(!o.ok)throw new Error((i==null?void 0:i.error)||`HTTP ${o.status}`);return i.assignment}async function tL(e,t){const n=await fetch(`/api/projects/${e}/assignments/${t}`,{method:"DELETE"}),o=await n.json().catch(()=>null);if(!n.ok)throw new Error((o==null?void 0:o.error)||`HTTP ${n.status}`)}function Uw(e){return e.requiresReason||e.command==="block"}function nL(e){const t=e.split(`
450
- `),n=t.findIndex(u=>/^##\s+Acceptance Criteria\s*$/i.test(u.trim()));if(n===-1)return{acceptanceCriteria:[],summaryBody:e};let o=t.length;for(let u=n+1;u<t.length;u+=1)if(/^#{1,2}\s+\S/.test(t[u].trim())){o=u;break}const i=t.slice(n+1,o).map(u=>u.match(/^\s*[-*]\s+\[( |x|X)\]\s+(.*)$/)).filter(u=>!!u).map(u=>({checked:u[1].toLowerCase()==="x",text:u[2].trim()})),a=[...t.slice(0,n),...t.slice(o)].join(`
451
- `).replace(/\n{3,}/g,`
452
-
453
- `).trim();return{acceptanceCriteria:i,summaryBody:a}}function rL(e){const t=e.split(`
454
- `),n=t.findIndex(u=>/^##\s+Todos\s*$/i.test(u.trim()));if(n===-1)return{hasSection:!1,todosMarkdown:"",remaining:e};let o=t.length;for(let u=n+1;u<t.length;u+=1)if(/^#{1,2}\s+\S/.test(t[u].trim())){o=u;break}const i=t.slice(n+1,o).join(`
455
- `).replace(/<!--[\s\S]*?-->/g,"").replace(/\n{3,}/g,`
456
-
457
- `).trim(),a=[...t.slice(0,n),...t.slice(o)].join(`
458
- `).replace(/\n{3,}/g,`
459
-
460
- `).trim();return{hasSection:!0,todosMarkdown:i,remaining:a}}function oL({projectSlug:e,dependencies:t,blockedReason:n}){const[o,i]=g.useState(!1);if(t.length===0)return null;const a=t.filter(d=>d.status!=="completed"&&d.status!=="review"),u=a.length===0;return u&&!o?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(yv,{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(Gi,{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(ff,{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(De,{title:"Dependencies",description:`${t.length-a.length} of ${t.length} resolved`,actions:u?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(Re,{to:`/projects/${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(Vt,{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(Ka,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function sL({links:e}){const t=Lt();if(e.length===0)return null;const n=e.filter(i=>!i.isReverse),o=e.filter(i=>i.isReverse);return l.jsx(De,{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(Re,{to:`${t}/projects/${i.projectSlug}/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(Yj,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Vt,{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(Ka,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`fwd-${i.slug}`)),o.map(i=>l.jsxs(Re,{to:`${t}/projects/${i.projectSlug}/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(mv,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Vt,{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(Ka,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`rev-${i.slug}`))]})})}const iL=["review","complete","unblock","start","block","fail","reopen"];function xy(){var fn,Rn,Pn,re;const{slug:e,aslug:t}=Dt(),n=qt(),o=Lt(),[i,a]=ol(),[u,d]=g.useState(null),[p,h]=g.useState(null),[m,x]=g.useState(null),[v,b]=g.useState(null),[N,k]=g.useState(null),[S,C]=g.useState(!1),[T,A]=g.useState(!1),[_,O]=g.useState(0),P=i.get("tab")??"summary",$=bu(),{data:E,loading:U,error:ee,refetch:Y}=xN(e,t),{data:q}=Uv(e),{data:X}=np(),{data:Q}=vN(e,t),I=g.useMemo(()=>{if(!E||!q)return[];const K=new Map(q.assignments.map(ae=>[ae.slug,ae]));return E.dependsOn.map(ae=>{const pe=K.get(ae);return{slug:ae,title:(pe==null?void 0:pe.title)??ae,status:(pe==null?void 0:pe.status)??"pending",priority:(pe==null?void 0:pe.priority)??"medium",assignee:(pe==null?void 0:pe.assignee)??null}})},[E,q]),D=I.filter(K=>K.status!=="completed"&&K.status!=="review");Fs("assignment");const V=g.useMemo(()=>((q==null?void 0:q.assignments)??[]).map(K=>K.slug),[q]),H=t?V.indexOf(t):-1,te=H>0?V[H-1]:null,R=H>=0&&H<V.length-1?V[H+1]:null,F=`${o}/projects/${e}/assignments/${t}`;gt({keys:"e",scope:"assignment",description:"Edit assignment",handler:()=>n(`${F}/edit`)}),gt({keys:"p",scope:"assignment",description:"Edit plan",handler:()=>n(`${F}/plan/edit`)}),gt({keys:"h",scope:"assignment",description:"Append handoff",handler:()=>n(`${F}/handoff/edit`)}),gt({keys:"d",scope:"assignment",description:"Append decision record",handler:()=>n(`${F}/decision-record/edit`)}),gt({keys:"s",scope:"assignment",description:"Edit scratchpad",handler:()=>n(`${F}/scratchpad/edit`)}),gt({keys:"[",scope:"assignment",description:"Previous assignment in project",enabled:!!te,handler:()=>te&&n(`${o}/projects/${e}/assignments/${te}`)}),gt({keys:"]",scope:"assignment",description:"Next assignment in project",enabled:!!R,handler:()=>R&&n(`${o}/projects/${e}/assignments/${R}`)});const Z=g.useMemo(()=>E?nL(E.body):{acceptanceCriteria:[],summaryBody:""},[E]),L=g.useMemo(()=>rL(Z.summaryBody),[Z.summaryBody]),de=Z.acceptanceCriteria,ge=de.filter(K=>K.checked).length,fe=de.length>0&&ge===de.length,je=g.useRef(fe),Se=g.useRef(!1);if(g.useEffect(()=>{if(E){if(!Se.current){je.current=fe,Se.current=!0;return}fe&&!je.current&&O(K=>K+1),je.current=fe}},[fe,E]),U)return l.jsx(jt,{label:"Loading assignment workspace…"});if(ee||!E||!e||!t)return l.jsx(Ct,{error:ee||"Assignment not found."});const Ce=e,we=t,at=de.length>0?{checked:ge,total:de.length}:void 0,Ze=E.availableTransitions??[],Be=Ze.filter(K=>!K.disabled&&K.targetStatus!==E.status),ze=iL.map(K=>Be.find(ae=>ae.command===K)).find(Boolean)??Be[0]??null,bt=[];if(X!=null&&X.sessions)for(const K of X.sessions)for(const ae of K.windows)for(const pe of ae.panes)((fn=pe.assignment)==null?void 0:fn.project)===e&&((Rn=pe.assignment)==null?void 0:Rn.slug)===t&&bt.push({sessionName:K.name,command:pe.command,urls:pe.urls});async function It(K){d(null);try{await Bw(Ce,we,K),Y()}catch(ae){d(ae.message)}}async function on(){A(!0);try{await tL(Ce,we),n(`${o}/projects/${Ce}`)}catch(K){d(K.message),A(!1),C(!1)}}async function dn(K,ae){d(null),h(K.command);try{return await zw(Ce,we,K,ae),Y(),!0}catch(pe){return d(pe.message),!1}finally{h(null)}}function Ge(K){if(Uw(K)){x(K);return}dn(K)}async function et(K,ae){b(null),k(K);try{const pe=await fetch(`/api/projects/${Ce}/assignments/${we}/acceptance-criteria/${K}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:ae})}),Ae=await pe.json();if(!pe.ok)throw new Error(Ae.error||`HTTP ${pe.status}`);Y()}catch(pe){b(pe.message)}finally{k(null)}}const zt=[...Be.filter(K=>K!==ze).map(K=>({key:`transition-${K.command}`,label:K.label,onSelect:()=>Ge(K),disabled:p===K.command})),...Ze.filter(K=>K.disabled||K.targetStatus===E.status).map(K=>({key:`transition-${K.command}`,label:K.label,disabled:!0,disabledReason:K.targetStatus===E.status?`Already ${E.status.replace(/_/g," ")}`:K.disabledReason??K.warning??K.description})),...$.statuses.map(K=>({key:`override-${K.id}`,label:`Override → ${K.label}`,onSelect:()=>It(K.id),disabled:K.id===E.status,disabledReason:K.id===E.status?"Already in this status":void 0})),{key:"edit-assignment",label:"Edit assignment source",icon:sC,href:`${o}/projects/${e}/assignments/${t}/edit`},{key:"edit-plan",label:"Edit plan",icon:wC,href:`${o}/projects/${e}/assignments/${t}/plan/edit`},{key:"edit-scratchpad",label:"Edit scratchpad",icon:Rd,href:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`},{key:"append-handoff",label:"Append handoff",icon:Ka,href:`${o}/projects/${e}/assignments/${t}/handoff/edit`},{key:"append-decision",label:"Append decision",icon:cC,href:`${o}/projects/${e}/assignments/${t}/decision-record/edit`},{key:"delete",label:"Delete assignment",icon:_s,destructive:!0,onSelect:()=>C(!0)}],Kt=(ze==null?void 0:ze.command)==="review";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(Vt,{status:E.status,progress:at}),l.jsx("h1",{className:"text-lg font-semibold text-foreground",children:E.title}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",uN(E.updated)]}),D.length>0&&l.jsxs("span",{className:"text-xs text-amber-700 dark:text-amber-300",children:["⚠ ",D.length," unmet dep",D.length===1?"":"s"]}),l.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[ze&&l.jsx("button",{type:"button",title:ze.warning||ze.description,disabled:p===ze.command,onClick:()=>Ge(ze),className:Fe("shell-action disabled:cursor-not-allowed disabled:opacity-50",ze.warning&&"border-amber-300 dark:border-amber-700",Kt&&_>0&&"send-to-review-glow"),children:l.jsx("span",{children:p===ze.command?"Working…":ze.label})},Kt?`review-${_}`:ze.command),l.jsx(eL,{items:zt,align:"end"})]})]}),u?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:u}):null,E.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:"})," ",E.blockedReason]}):null]}),I.length>0&&l.jsx(oL,{projectSlug:e,dependencies:I,blockedReason:E.blockedReason}),E.enrichedLinks&&E.enrichedLinks.length>0&&l.jsx(sL,{links:E.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(Q0,{value:P,onValueChange:K=>a({tab:K}),items:[{value:"summary",label:"Summary",content:l.jsxs("div",{className:"space-y-5",children:[Z.acceptanceCriteria.length>0?l.jsx(De,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:l.jsxs("div",{className:"space-y-3",children:[v?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:v}):null,Z.acceptanceCriteria.map((K,ae)=>{const pe=N!==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:K.checked,disabled:pe,onChange:Ae=>et(ae,Ae.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),l.jsx("span",{className:"criterion-label text-sm leading-6","data-checked":K.checked,children:K.text})]},`${ae}-${K.text}`)})]})}):null,L.hasSection?l.jsx(De,{title:"Todos",description:"Checklist of work items from assignment.md. Links point to plan files.",children:l.jsx(vr,{content:L.todosMarkdown,emptyState:"No todos yet."})}):null,l.jsx(De,{title:"Assignment Summary",children:l.jsx(vr,{content:L.remaining,emptyState:Z.acceptanceCriteria.length>0||L.hasSection?"No additional summary markdown beyond the acceptance criteria and todos.":"This assignment does not have summary markdown yet."})})]})},{value:"plan",label:"Plan",count:E.plan?1:0,content:E.plan?l.jsx("div",{className:"space-y-5",children:l.jsxs(De,{title:"Plan",description:"Shows plan.md only. Versioned plans (plan-v2.md, ...) linked from the Todos section are not yet rendered here — open them from the filesystem.",actions:l.jsxs(Re,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/plan/edit`,children:[l.jsx(Rd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Plan"})]}),children:[l.jsx("div",{className:"mb-4",children:l.jsx(Vt,{status:E.plan.status})}),l.jsx(vr,{content:E.plan.body,emptyState:"No plan content yet."})]})}):l.jsx(vt,{title:"No plan yet",description:"Plan files are optional and versioned. Run /plan-assignment to create plan.md (or plan-v2.md, ...) and link it from the Todos section."})},{value:"scratchpad",label:"Scratchpad",count:E.scratchpad?1:0,content:E.scratchpad?l.jsx(De,{title:"Scratchpad",actions:l.jsxs(Re,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`,children:[l.jsx(Rd,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Scratchpad"})]}),children:l.jsx(vr,{content:E.scratchpad.body,emptyState:"Scratchpad is empty."})}):l.jsx(vt,{title:"No scratchpad yet",description:"Scratchpad notes appear here when you use the Edit Scratchpad action."})},{value:"handoff",label:"Handoff",count:((Pn=E.handoff)==null?void 0:Pn.handoffCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.handoff?l.jsx(De,{children:l.jsx(vr,{content:E.handoff.body,emptyState:"No handoff history yet."})}):l.jsx(vt,{title:"No handoff log yet",description:"Handoffs appear here when an agent runs /complete-assignment or you append one manually."})})},{value:"decisions",label:"Decisions",count:((re=E.decisionRecord)==null?void 0:re.decisionCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.decisionRecord?l.jsx(De,{children:l.jsx(vr,{content:E.decisionRecord.body,emptyState:"No decision history yet."})}):l.jsx(vt,{title:"No decision record yet",description:"Decision records appear here when you append one via the Append Decision action."})})}]})}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(De,{title:"Details",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(yo,{label:"ID",value:E.id,copyable:!0}),l.jsx(yo,{label:"Priority",value:E.priority}),E.assignee&&l.jsx(yo,{label:"Assignee",value:E.assignee}),l.jsx(yo,{label:"Updated",value:`${aN(E.updated)} · Created ${lN(E.created)}`}),E.workspace.repository&&l.jsx(yo,{label:"Repository",value:E.workspace.repository,copyable:!0}),E.workspace.worktreePath&&l.jsx(yo,{label:"Worktree",value:E.workspace.worktreePath,copyable:!0}),E.workspace.branch&&l.jsx(yo,{label:"Branch",value:E.workspace.branch,copyable:!0}),E.workspace.parentBranch&&l.jsx(yo,{label:"Parent branch",value:E.workspace.parentBranch,copyable:!0})]})}),bt.length>0&&l.jsx(De,{title:"Servers",children:l.jsx("div",{className:"space-y-2",children:bt.map((K,ae)=>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:K.command}),l.jsx("span",{className:"text-xs text-muted-foreground",children:K.sessionName}),K.urls.map(pe=>l.jsxs("a",{href:pe,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-teal-600 hover:underline dark:text-teal-400",children:[pe.replace("http://localhost:",":"),l.jsx(vv,{className:"h-2.5 w-2.5"})]},pe))]},ae))})}),Q&&Q.sessions.length>0&&l.jsx(De,{title:"Agent Sessions",children:l.jsx("div",{className:"space-y-2",children:Q.sessions.map(K=>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(cu,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:K.agent}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:K.sessionId,children:[K.sessionId.slice(0,8),l.jsx(So,{value:K.sessionId})]})]}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(Vt,{status:K.status}),l.jsx("span",{className:"text-xs text-muted-foreground",children:Cr(K.started)})]})]},K.sessionId))})})]})]}),l.jsx(Lb,{open:m!==null,action:m,assignmentTitle:E.title,loading:p===(m==null?void 0:m.command),onOpenChange:K=>{K||x(null)},onConfirm:async K=>{if(!m)return;await dn(m,K)&&x(null)}}),l.jsx(ow,{open:S,title:"Delete assignment?",description:`This will permanently delete "${E.title}" and all its files (plan, scratchpad, handoff, decision record). This cannot be undone.`,confirmLabel:"Delete Assignment",destructive:!0,loading:T,onOpenChange:K=>{K||C(!1)},onConfirm:on})]})}function yo({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(So,{value:t})]})]})}const lL=["table","list","kanban"],yy={critical:0,high:1,medium:2,low:3};function vy(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function aL(e,t){return e.toString()===t.toString()}function by(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function uL(e,t,n){return[...e].sort((i,a)=>{let u=0;switch(t){case"title":u=i.title.localeCompare(a.title);break;case"status":u=i.status.localeCompare(a.status);break;case"priority":u=(yy[i.priority]??99)-(yy[a.priority]??99);break;case"assignee":u=(i.assignee??"").localeCompare(a.assignee??"");break;case"dependencies":u=i.dependsOn.length-a.dependsOn.length;break;case"updated":u=i.updated.localeCompare(a.updated);break}return n==="asc"?u:-u})}function wy(){const{workspace:e}=Dt(),t=Lt(),n=qt(),o=g.useRef(null);Fs("list:assignments");const{data:i,loading:a,error:u,refetch:d}=zv(),p=bu(),[h,m]=ol(),x=g.useMemo(()=>WE(p.order),[p]),v=g.useMemo(()=>{const W={};for(const le of x)W[le]=zE(p,le);return W},[x,p]),b=g.useMemo(()=>x.map(W=>({id:W,title:v[W]??W,description:A0(W)})),[x,v]),N=g.useMemo(()=>new Set(["all",...x]),[x]),k=h.get("view"),S=h.get("status"),C=h.get("stale"),T=k&&lL.includes(k)?k:"kanban";function A(W){return!W||!N.has(W)?"all":W}const _=g.useCallback(W=>{m(le=>{const xe=new URLSearchParams(le);return W==="kanban"?xe.delete("view"):xe.set("view",W),xe})},[m]),[O,P]=g.useState(""),[$,E]=g.useState(()=>A(S)),[U,ee]=g.useState("all"),[Y,q]=g.useState("all"),[X,Q]=g.useState("all"),[I,D]=g.useState(()=>vy(C)),[V,H]=g.useState("updated"),[te,R]=g.useState("desc"),[F,Z]=g.useState(()=>new Set(x)),[L,de]=g.useState([]),[ge,fe]=g.useState(null),[je,Se]=g.useState(null),[Ce,we]=g.useState(null),[at,Ze]=g.useState(null),[Be,ze]=g.useState(null);g.useEffect(()=>{de((i==null?void 0:i.assignments)??[])},[i]),g.useEffect(()=>{const W=A(S);W!==$&&E(W);const le=vy(C);le!==I&&D(le)},[I,C,$,S]),g.useEffect(()=>{m(W=>{const le=new URLSearchParams(W);return $==="all"?le.delete("status"):le.set("status",$),I==="all"?le.delete("stale"):I==="stale"?le.set("stale","1"):le.set("stale","0"),aL(W,le)?W:le})},[I,m,$]);const bt=g.useMemo(()=>Array.from(new Set(L.map(W=>W.status))).sort(),[L]),It=g.useMemo(()=>Array.from(new Set(L.map(W=>W.priority))).sort(),[L]),on=g.useMemo(()=>Array.from(new Set(L.map(W=>W.assignee??"__unassigned__"))).sort(),[L]),dn=g.useMemo(()=>Array.from(new Map(L.map(W=>[W.projectSlug,W.projectTitle]))).sort(([,W],[,le])=>W.localeCompare(le)),[L]),Ge=g.useMemo(()=>L.filter(W=>{if(e){if(e==="_ungrouped"){if(W.projectWorkspace!==null)return!1}else if(W.projectWorkspace!==e)return!1}if($!=="all"&&W.status!==$||U!=="all"&&W.priority!==U||I==="stale"&&!by(W.updated)||I==="fresh"&&by(W.updated)||Y!=="all"&&(W.assignee??"__unassigned__")!==Y||X!=="all"&&W.projectSlug!==X)return!1;const le=O.trim().toLowerCase();return!(le&&!`${W.title} ${W.slug} ${W.projectTitle} ${W.projectSlug}`.toLowerCase().includes(le))}),[I,L,O,$,U,Y,X,e]),et=g.useMemo(()=>uL(Ge,V,te),[Ge,V,te]),{visibleItems:zt,visibleIndexByKey:Kt}=g.useMemo(()=>{const W=T==="table"?et:x.flatMap(xe=>Ge.filter(Le=>Le.status===xe)),le=new Map;return W.forEach((xe,Le)=>le.set(an(xe),Le)),{visibleItems:W,visibleIndexByKey:le}},[T,et,Ge,x]),{hotkeyRowProps:fn}=yu(zt,{scope:"list:assignments",onOpen:W=>{const le=W.projectWorkspace?`/w/${W.projectWorkspace}`:t;n(`${le}/projects/${W.projectSlug}/assignments/${W.slug}`)}});if(gt({keys:"/",scope:"list:assignments",description:"Focus filter",handler:()=>{var W;return(W=o.current)==null?void 0:W.focus()}}),gt({keys:"r",scope:"list:assignments",description:"Refresh",handler:()=>d()}),a)return l.jsx(jt,{label:"Loading assignments board…"});if(u||!i)return l.jsx(Ct,{error:u||"Assignments board is unavailable."});async function Rn({item:W,toColumnId:le,action:xe,reason:Le}){fe(null),Se(an(W));const Fn=L;de(Yt=>Yt.map(Ot=>an(Ot)===an(W)?{...Ot,status:le,blockedReason:le==="blocked"?Le??Ot.blockedReason:null}:Ot));try{const Yt=xe?await zw(W.projectSlug,W.slug,xe,Le):await Bw(W.projectSlug,W.slug,le);return de(Ot=>Ot.map(Me=>an(Me)===an(W)?{...Me,status:Yt.status,blockedReason:Yt.blockedReason,availableTransitions:Yt.availableTransitions,updated:Yt.updated}:Me)),d(),!0}catch(Yt){return de(Fn),fe(Yt.message),!1}finally{Se(null)}}async function Pn({item:W,toColumnId:le}){if(W.status===le)return;const xe=Oi(W,le);if(xe!=null&&xe.disabled){fe(xe.disabledReason||`Cannot move this assignment to ${le}.`);return}if(xe&&Uw(xe)){ze({item:W,toColumnId:le,action:xe});return}await Rn({item:W,toColumnId:le,action:xe})}function re(W){Z(le=>{const xe=new Set(le);return xe.has(W)?xe.delete(W):xe.add(W),xe})}function K(W){V===W?R(le=>le==="asc"?"desc":"asc"):(H(W),R("asc"))}const ae=Ce?L.find(W=>an(W)===Ce)??null:null;function pe(W,le){W.dataTransfer.effectAllowed="move",W.dataTransfer.setData("text/plain",le),we(le)}function Ae(){we(null),Ze(null)}function Ke(W,le){if(!ae)return;const xe=Oi(ae,le);ae.status===le||xe!=null&&xe.disabled||(W.preventDefault(),W.dataTransfer.dropEffect="move",Ze(le))}function pn(W,le){at===le&&!W.currentTarget.contains(W.relatedTarget)&&Ze(null)}function Gt(W,le){if(W.preventDefault(),!ae||ae.status===le){Ae();return}Ae(),Pn({item:ae,toColumnId:le})}function Bt({field:W,children:le}){const xe=V===W;return l.jsx("th",{className:"pb-3 font-medium",children:l.jsxs("button",{type:"button",onClick:()=>K(W),className:"inline-flex items-center gap-1 hover:text-foreground",children:[le,xe?te==="asc"?l.jsx(xv,{className:"h-3 w-3"}):l.jsx(Gi,{className:"h-3 w-3"}):null]})})}return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(mp,{children:[l.jsx(vu,{ref:o,value:O,onChange:P,placeholder:"Search assignments or projects"}),l.jsxs("select",{value:$,onChange:W=>E(A(W.target.value)),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),bt.map(W=>l.jsx("option",{value:W,children:v[W]??W},W))]}),l.jsxs("select",{value:U,onChange:W=>ee(W.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All priorities"}),It.map(W=>l.jsx("option",{value:W,className:"capitalize",children:W},W))]}),l.jsxs("select",{value:Y,onChange:W=>q(W.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),on.map(W=>l.jsx("option",{value:W,children:W==="__unassigned__"?"Unassigned":W},W))]}),l.jsxs("select",{value:X,onChange:W=>Q(W.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All projects"}),dn.map(([W,le])=>l.jsx("option",{value:W,children:le},W))]}),l.jsxs("select",{value:I,onChange:W=>D(W.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(gp,{value:T,onChange:W=>_(W),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),ge?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:ge}):null,i.assignments.length===0?l.jsx(vt,{title:"No assignments yet",description:"Assignments appear here once projects contain concrete work items.",actions:l.jsxs(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects`,children:[l.jsx(Xf,{className:"h-4 w-4"}),l.jsx("span",{children:"Browse Projects"})]})}):Ge.length===0?l.jsx(vt,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all projects again."}):T==="table"?l.jsx(De,{title:`${et.length} assignment${et.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(Bt,{field:"title",children:"Assignment"}),l.jsx(Bt,{field:"status",children:"Status"}),l.jsx(Bt,{field:"priority",children:"Priority"}),l.jsx(Bt,{field:"assignee",children:"Assignee"}),l.jsx(Bt,{field:"dependencies",children:"Dependencies"}),l.jsx(Bt,{field:"updated",children:"Updated"})]})}),l.jsx("tbody",{children:et.map((W,le)=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",...fn(le),children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(Re,{to:`${t}/projects/${W.projectSlug}/assignments/${W.slug}`,className:"font-semibold text-foreground hover:text-primary",children:W.title}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:W.projectTitle}),l.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:W.id,children:[W.id.slice(0,8),l.jsx(So,{value:W.id})]})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("select",{value:W.status,disabled:je===an(W),onChange:xe=>Pn({item:W,toColumnId:xe.target.value}),className:Fe("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")]`,(Ya[W.status]??Ya.pending).className,je===an(W)&&"animate-pulse opacity-60"),children:x.map(xe=>{const Le=W.status===xe?void 0:Oi(W,xe),Fn=(Le==null?void 0:Le.disabled)??!1;return l.jsx("option",{value:xe,disabled:Fn,title:Fn?(Le==null?void 0:Le.disabledReason)??void 0:void 0,children:v[xe]},xe)})})}),l.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:W.priority}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:W.assignee??"Unassigned"}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:W.dependsOn.length}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Wr(W.updated)})]},an(W)))})]})})}):T==="list"?l.jsx("div",{className:"space-y-3",children:x.map(W=>{var Ot;const le=Ge.filter(Me=>Me.status===W);if(le.length===0&&!ae)return null;const xe=F.has(W),Le=ae?ae.status!==W&&!((Ot=Oi(ae,W))!=null&&Ot.disabled):!1,Fn=ae?ae.status!==W&&!Le:!1,Yt=at===W;return l.jsxs("div",{className:Fe("rounded-lg border border-border/60 bg-card/90 transition",Yt&&Le&&"ring-2 ring-ring/30",Fn&&"border-dashed opacity-65"),onDragOver:Me=>Ke(Me,W),onDragLeave:Me=>pn(Me,W),onDrop:Me=>Gt(Me,W),children:[l.jsxs("button",{type:"button",onClick:()=>re(W),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[l.jsx(Gi,{className:`h-4 w-4 text-muted-foreground transition-transform ${xe?"":"-rotate-90"}`}),l.jsx("span",{className:"font-semibold text-foreground",children:v[W]}),l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:le.length})]}),xe&&le.length>0&&l.jsx("div",{className:"space-y-3 px-4 pb-4",children:le.map(Me=>{const pt=an(Me),Nt=Ce===pt,hn=Kt.get(pt)??-1;return l.jsx("div",{draggable:!0,onDragStart:Ut=>pe(Ut,pt),onDragEnd:Ae,...hn>=0?fn(hn):{},className:Fe("cursor-grab transition active:cursor-grabbing",Nt&&"scale-[0.98] opacity-50"),children:l.jsx(ky,{assignment:Me,dragging:Nt,transitioning:je===pt})},pt)})})]},W)})}):l.jsx(D0,{columns:b,items:Ge,getItemId:an,getColumnId:W=>W.status,canDrop:({item:W,fromColumnId:le,toColumnId:xe})=>{if(le===xe)return{allowed:!0};const Le=Oi(W,xe);return Le!=null&&Le.disabled?{allowed:!1,reason:Le.disabledReason||Le.description}:{allowed:!0,reason:Le?Le.warning||Le.description:`Move to ${xe} (direct status change).`}},onMove:({item:W,toColumnId:le})=>Pn({item:W,toColumnId:le}),emptyMessage:W=>`No ${W.title.toLowerCase()} assignments.`,renderCard:(W,{dragging:le})=>{const xe=Kt.get(an(W))??-1;return l.jsx("div",{...xe>=0?fn(xe):{},children:l.jsx(ky,{assignment:W,dragging:le,transitioning:je===an(W)})})}}),l.jsx(Lb,{open:Be!==null,action:(Be==null?void 0:Be.action)??null,assignmentTitle:(Be==null?void 0:Be.item.title)??"Assignment",loading:je===(Be?an(Be.item):null),onOpenChange:W=>{W||ze(null)},onConfirm:async W=>{if(!Be)return;const le=Be;await Rn({item:le.item,toColumnId:le.toColumnId,action:le.action,reason:W})&&ze(null)}})]})}function ky({assignment:e,dragging:t,transitioning:n}){var i;const o=Lt();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(Re,{to:`${o}/projects/${e.projectSlug}/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.projectTitle}),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(So,{value:e.id})]})]}),l.jsx(Vt,{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:Wr(e.updated)})]})]})}function Oi(e,t){return e.availableTransitions.find(n=>n.targetStatus===t)}function an(e){return e.id||e.slug||"unknown"}function Tr(e){const t=e.match(/^---\n([\s\S]*?)\n---\n?/);if(!t)return{order:[],blocks:new Map,body:e};const n=t[1],o=e.slice(t[0].length),i=n.split(`
461
- `),a=[],u=new Map;let d=null,p=[];const h=()=>{d&&(a.push(d),u.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:u,body:o}}function fl(e){return`---
462
- ${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
463
- `)}
464
- ---
465
-
466
- ${e.body.replace(/^\n+/,"")}`}function Tt(e,t){const n=e.blocks.get(t);if(!(n!=null&&n[0]))return"";const o=n[0].match(/^[^:]+:\s*(.*)$/);if(!o)return"";const i=o[1].trim();return i==="null"?"":i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'")?i.slice(1,-1):i}function cL(e,t){return Tt(e,t)==="true"}function Bi(e,t){const n=e.blocks.get(t);return n!=null&&n.length?n[0].trim().endsWith("[]")?[]:n.slice(1).map(o=>o.trim()).filter(o=>o.startsWith("- ")).map(o=>o.slice(2).trim()):[]}function dL(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 At(e,t,n){e.blocks.has(t)||e.order.push(t),e.blocks.set(t,[`${t}: ${dL(n)}`])}function Ui(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(o=>` - ${o}`)])}function Hi(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function Au(e){const t=Tr(e);return{title:Tt(t,"title"),slug:Tt(t,"slug"),workspace:Tt(t,"workspace"),archived:cL(t,"archived"),archivedAt:Tt(t,"archivedAt"),archivedReason:Tt(t,"archivedReason"),tags:Bi(t,"tags").join(", "),body:t.body}}function fL(e,t){const n=Tr(e),o={...Au(e),...t};return At(n,"title",o.title),At(n,"slug",o.slug),At(n,"workspace",o.workspace||null),At(n,"archived",o.archived),At(n,"archivedAt",o.archivedAt||null),At(n,"archivedReason",o.archivedReason||null),Ui(n,"tags",Hi(o.tags)),n.body=o.body,fl(n)}function Du(e){const t=Tr(e);return{title:Tt(t,"title"),slug:Tt(t,"slug"),status:Tt(t,"status"),priority:Tt(t,"priority")||"medium",assignee:Tt(t,"assignee"),dependsOn:Bi(t,"dependsOn").join(", "),links:Bi(t,"links").join(", "),blockedReason:Tt(t,"blockedReason"),tags:Bi(t,"tags").join(", "),body:t.body}}function pL(e,t){const n=Tr(e),o={...Du(e),...t};return At(n,"title",o.title),At(n,"slug",o.slug),At(n,"status",o.status),At(n,"priority",o.priority),At(n,"assignee",o.assignee||null),Ui(n,"dependsOn",Hi(o.dependsOn)),Ui(n,"links",Hi(o.links)),At(n,"blockedReason",o.blockedReason||null),Ui(n,"tags",Hi(o.tags)),n.body=o.body,fl(n)}function Lu(e){const t=Tr(e);return{assignment:Tt(t,"assignment"),status:Tt(t,"status"),body:t.body}}function hL(e,t){const n=Tr(e),o={...Lu(e),...t};return At(n,"assignment",o.assignment),At(n,"status",o.status),n.body=o.body,fl(n)}function Iu(e){const t=Tr(e);return{assignment:Tt(t,"assignment"),body:t.body}}function mL(e,t){const n=Tr(e),o={...Iu(e),...t};return At(n,"assignment",o.assignment),n.body=o.body,fl(n)}function Ou(e){const t=Tr(e);return{name:Tt(t,"name"),slug:Tt(t,"slug"),description:Tt(t,"description"),whenToUse:Tt(t,"when_to_use"),tags:Bi(t,"tags").join(", "),body:t.body}}function gL(e,t){const n=Tr(e),o={...Ou(e),...t};return At(n,"name",o.name),At(n,"slug",o.slug),At(n,"description",o.description||null),At(n,"when_to_use",o.whenToUse||null),Ui(n,"tags",Hi(o.tags)),n.body=o.body,fl(n)}function it(e,t,n){switch(e){case"project":return fL(t,n);case"assignment":return pL(t,n);case"plan":return hL(t,n);case"scratchpad":return mL(t,n);case"playbook":return gL(t,n);default:return t}}function Ur(e){return e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function nf(e){return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}function pl({initialContent:e,documentType:t,mode:n="edit",onSave:o,saving:i,error:a,title:u,description:d,onCancel:p,helpTitle:h,helpBody:m,allowSlugEdit:x=!1}){const[v,b]=g.useState(e),[N,k]=g.useState(!1),[S,C]=g.useState("edit");g.useEffect(()=>{b(e)},[e]);const T=bL(t,v),A=v!==e,_=vL(t,v),O=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:u}),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:O})]}),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(mv,{className:"h-4 w-4"}),l.jsx("span",{children:"Back"})]}),l.jsxs("button",{type:"button",onClick:()=>k(P=>!P),className:"shell-action",children:[l.jsx(oC,{className:"h-4 w-4"}),l.jsx("span",{children:N?"Structured":"Raw Markdown"})]}),l.jsxs("button",{type:"button",onClick:()=>o(v),disabled:i||T.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(Jf,{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,T.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:T.map(P=>l.jsx("li",{children:P},P))})}):null]}),l.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[l.jsx("button",{type:"button",onClick:()=>C("edit"),className:`shell-action ${S==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),l.jsxs("button",{type:"button",onClick:()=>C("preview"),className:`shell-action ${S==="preview"?"bg-foreground text-background":""}`,children:[l.jsx(Kg,{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:S==="preview"?"hidden md:block":"",children:l.jsx("div",{className:"surface-panel space-y-3",children:N?l.jsx("textarea",{value:v,onChange:P=>b(P.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(xL,{documentType:t,content:v,onChange:b,allowSlugEdit:x})})}),l.jsx("div",{className:S==="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(Kg,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),l.jsx(vr,{content:_,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function xL({documentType:e,content:t,onChange:n,allowSlugEdit:o}){if(e==="project"){const a=Au(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(_i,{children:[l.jsx(Xe,{label:"Project title",children:l.jsx("input",{value:a.title,onChange:u=>{const d=u.target.value,p={title:d};o&&(a.slug===Ur(a.title)||!a.slug.trim())&&(p.slug=Ur(d)),n(it(e,t,p))},className:"editor-input"})}),l.jsx(Xe,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:u=>n(it(e,t,{slug:Ur(u.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"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(Xe,{label:"Tags",children:l.jsx("input",{value:a.tags,onChange:u=>n(it(e,t,{tags:u.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(yL,{value:a.workspace,onChange:u=>n(it(e,t,{workspace:u}))})]}),l.jsx(Xe,{label:"Project body",children:l.jsx("textarea",{value:a.body,onChange:u=>n(it(e,t,{body:u.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const a=Du(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(_i,{children:[l.jsx(Xe,{label:"Assignment title",children:l.jsx("input",{value:a.title,onChange:u=>{const d=u.target.value,p={title:d};o&&(a.slug===Ur(a.title)||!a.slug.trim())&&(p.slug=Ur(d)),n(it(e,t,p))},className:"editor-input"})}),l.jsx(Xe,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:u=>n(it(e,t,{slug:Ur(u.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"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(Xe,{label:"Status",children:l.jsxs("select",{value:a.status,onChange:u=>n(it(e,t,{status:u.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(Xe,{label:"Priority",children:l.jsxs("select",{value:a.priority,onChange:u=>n(it(e,t,{priority:u.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(Xe,{label:"Assignee",children:l.jsx("input",{value:a.assignee,onChange:u=>n(it(e,t,{assignee:u.target.value})),placeholder:"Agent name",className:"editor-input"})}),l.jsx(Xe,{label:"Depends on",className:"md:col-span-2",children:l.jsx("input",{value:a.dependsOn,onChange:u=>n(it(e,t,{dependsOn:u.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),l.jsx(Xe,{label:"Links",className:"md:col-span-2",children:l.jsx("input",{value:a.links,onChange:u=>n(it(e,t,{links:u.target.value})),placeholder:"Comma-separated: projectSlug/assignmentSlug",className:"editor-input"})}),l.jsx(Xe,{label:"Blocked reason",className:"md:col-span-2",children:l.jsx("input",{value:a.blockedReason,onChange:u=>n(it(e,t,{blockedReason:u.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),l.jsx(Xe,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:a.tags,onChange:u=>n(it(e,t,{tags:u.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),l.jsx(Xe,{label:"Assignment body",children:l.jsx("textarea",{value:a.body,onChange:u=>n(it(e,t,{body:u.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const a=Lu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(_i,{children:[l.jsx(Xe,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),l.jsx(Xe,{label:"Plan status",children:l.jsxs("select",{value:a.status,onChange:u=>n(it(e,t,{status:u.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(Xe,{label:"Plan body",children:l.jsx("textarea",{value:a.body,onChange:u=>n(it(e,t,{body:u.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const a=Iu(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsx(_i,{children:l.jsx(Xe,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),l.jsx(Xe,{label:"Scratchpad body",children:l.jsx("textarea",{value:a.body,onChange:u=>n(it(e,t,{body:u.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=Ou(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(_i,{children:[l.jsx(Xe,{label:"Playbook name",children:l.jsx("input",{value:i.name,onChange:a=>{const u=a.target.value,d={name:u};o&&(i.slug===Ur(i.name)||!i.slug.trim())&&(d.slug=Ur(u)),n(it(e,t,d))},className:"editor-input"})}),l.jsx(Xe,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:i.slug,disabled:!o,onChange:a=>n(it(e,t,{slug:Ur(a.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"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(Xe,{label:"Description",className:"md:col-span-2",children:l.jsx("input",{value:i.description,onChange:a=>n(it(e,t,{description:a.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),l.jsx(Xe,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:i.tags,onChange:a=>n(it(e,t,{tags:a.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(Xe,{label:"When to use",className:"md:col-span-2",children:l.jsx("input",{value:i.whenToUse,onChange:a=>n(it(e,t,{whenToUse:a.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),l.jsx(Xe,{label:"Playbook rules",children:l.jsx("textarea",{value:i.body,onChange:a=>n(it(e,t,{body:a.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function _i({children:e}){return l.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function Xe({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 yL({value:e,onChange:t}){const{data:n}=tp(),o=(n==null?void 0:n.workspaces)??[];return l.jsx(Xe,{label:"Workspace",children:l.jsxs("select",{value:e,onChange:i=>t(i.target.value),className:"editor-input",children:[l.jsx("option",{value:"",children:"Ungrouped"}),o.map(i=>l.jsx("option",{value:i,children:i},i))]})})}function vL(e,t){switch(e){case"project":return Au(t).body;case"assignment":return Du(t).body;case"plan":return Lu(t).body;case"scratchpad":return Iu(t).body;case"playbook":return Ou(t).body}}function bL(e,t){switch(e){case"project":{const n=Au(t);return[n.title.trim()?null:"Project title is required.",n.slug.trim()?null:"Project slug is required.",n.slug.trim()&&!nf(n.slug)?"Project slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"assignment":{const n=Du(t);return[n.title.trim()?null:"Assignment title is required.",n.slug.trim()?null:"Assignment slug is required.",n.slug.trim()&&!nf(n.slug)?"Assignment slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"plan":return Lu(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return Iu(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=Ou(t);return[n.name.trim()?null:"Playbook name is required.",n.slug.trim()?null:"Playbook slug is required.",n.slug.trim()&&!nf(n.slug)?"Playbook slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}}}function Sy(){const e=qt(),{workspace:t}=Dt(),n=Lt(),[o,i]=g.useState(null),[a,u]=g.useState(!0),[d,p]=g.useState(!1),[h,m]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/project").then(v=>v.json()).then(v=>{let b=v.content;t&&t!=="_ungrouped"&&(b=b.replace(/^(tags: \[\])$/m,`$1
467
- workspace: ${t}`)),i(b),u(!1)}).catch(v=>{m(v.message),u(!1)})},[t]);async function x(v){p(!0),m(null);try{const b=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),N=await b.json();if(!b.ok){m(N.error||`HTTP ${b.status}`),p(!1);return}e(`${n}/projects/${N.slug}`)}catch(b){m(b.message),p(!1);return}p(!1)}return a?l.jsx(jt,{label:"Loading project template…"}):h&&!o?l.jsx(Ct,{error:h}):l.jsx(pl,{initialContent:o||"",documentType:"project",mode:"create",onSave:x,saving:d,error:h,title:"Create Project",description:"Projects hold the high-level objective, shared context, and human-authored overview. Put execution details in assignments instead of overloading project.md.",onCancel:()=>e(`${n}/projects`),helpTitle:"Project editing rules",helpBody:"Use this form for project intent, slug, tags, and overview content. If you ever need less common metadata, raw markdown mode still exposes the full file.",allowSlugEdit:!0})}function jy(){const{slug:e}=Dt(),t=Lt(),n=qt(),[o,i]=g.useState(null),[a,u]=g.useState(!0),[d,p]=g.useState(!1),[h,m]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/assignment").then(v=>v.json()).then(v=>{i(v.content),u(!1)}).catch(v=>{m(v.message),u(!1)})},[]);async function x(v){if(!e){m("Project slug is required.");return}p(!0),m(null);try{const b=await fetch(`/api/projects/${e}/assignments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),N=await b.json();if(!b.ok){m(N.error||`HTTP ${b.status}`),p(!1);return}n(`${t}/projects/${e}/assignments/${N.slug}`)}catch(b){m(b.message),p(!1);return}p(!1)}return a?l.jsx(jt,{label:"Loading assignment template…"}):h&&!o?l.jsx(Ct,{error:h}):l.jsx(pl,{initialContent:o||"",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}/projects/${e}`:`${t}/projects`),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 _u({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,documentType:a,helpTitle:u,helpBody:d}){const p=qt(),{data:h,loading:m,error:x}=Hv(e),[v,b]=g.useState(!1),[N,k]=g.useState(null);async function S(C){b(!0),k(null);try{const T=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:C})}),A=await T.json();if(!T.ok){k(A.error||`HTTP ${T.status}`),b(!1);return}p(n)}catch(T){k(T.message),b(!1);return}b(!1)}return m?l.jsx(jt,{label:`Loading ${o.toLowerCase()}…`}):x||!h?l.jsx(Ct,{error:x||`${o} is unavailable.`}):l.jsx(pl,{initialContent:h.content,documentType:a,onSave:S,saving:v,error:N,title:o,description:i,onCancel:()=>p(n),helpTitle:u,helpBody:d})}function Cy(){const{slug:e}=Dt(),t=Lt(),n=e??"";return l.jsx(_u,{loadUrl:`/api/projects/${n}/edit`,saveUrl:`/api/projects/${n}`,redirectTo:`${t}/projects/${n}`,title:"Edit Project",description:"Project edits change the human-authored source document. The structured form stays focused on title, slug, tags, and overview content.",documentType:"project",helpTitle:"Editable vs derived project fields",helpBody:"Project 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 Ny(){const{slug:e,aslug:t}=Dt(),n=Lt(),o=e??"",i=t??"";return l.jsx(_u,{loadUrl:`/api/projects/${o}/assignments/${i}/edit`,saveUrl:`/api/projects/${o}/assignments/${i}`,redirectTo:`${n}/projects/${o}/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 Ey(){const{slug:e,aslug:t}=Dt(),n=Lt(),o=e??"",i=t??"";return l.jsx(_u,{loadUrl:`/api/projects/${o}/assignments/${i}/plan/edit`,saveUrl:`/api/projects/${o}/assignments/${i}/plan`,redirectTo:`${n}/projects/${o}/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 Ry(){const{slug:e,aslug:t}=Dt(),n=Lt(),o=e??"",i=t??"";return l.jsx(_u,{loadUrl:`/api/projects/${o}/assignments/${i}/scratchpad/edit`,saveUrl:`/api/projects/${o}/assignments/${i}/scratchpad`,redirectTo:`${n}/projects/${o}/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 any active plan files (plan.md, plan-v2.md, ...)."})}function Hw({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,helpTitle:a,helpBody:u}){const d=qt(),{data:p,loading:h,error:m}=Hv(e),[x,v]=g.useState(""),[b,N]=g.useState(""),[k,S]=g.useState(!1),[C,T]=g.useState(null);async function A(){S(!0),T(null);try{const _=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:x,body:b})}),O=await _.json();if(!_.ok){T(O.error||`HTTP ${_.status}`),S(!1);return}d(n)}catch(_){T(_.message),S(!1);return}S(!1)}return h?l.jsx(jt,{label:`Loading ${o.toLowerCase()}…`}):m||!p?l.jsx(Ct,{error:m||`${o} is unavailable.`}):l.jsxs("div",{className:"space-y-4",children:[l.jsx(De,{title:o,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:_=>v(_.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:_=>N(_.target.value),className:"editor-textarea",spellCheck:!1})]}),C?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:C}):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(De,{title:"Current Document",children:l.jsx(vr,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function Py(){const{slug:e,aslug:t}=Dt(),n=Lt(),o=e??"",i=t??"";return l.jsx(Hw,{loadUrl:`/api/projects/${o}/assignments/${i}/handoff/edit`,saveUrl:`/api/projects/${o}/assignments/${i}/handoff/entries`,redirectTo:`${n}/projects/${o}/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 Ty(){const{slug:e,aslug:t}=Dt(),n=Lt(),o=e??"",i=t??"";return l.jsx(Hw,{loadUrl:`/api/projects/${o}/assignments/${i}/decision-record/edit`,saveUrl:`/api/projects/${o}/assignments/${i}/decision-record/entries`,redirectTo:`${n}/projects/${o}/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 Ay(){const{workspace:e}=Dt(),{data:t}=du(),{data:n,loading:o,error:i,refetch:a}=np(),[u,d]=g.useState(!1),[p,h]=g.useState(""),[m,x]=g.useState(!1),v=cn();g.useEffect(()=>{const T=v.hash.match(/^#server-(.+)/);if(!T)return;const A=decodeURIComponent(T[1]),_=document.querySelector(`[data-server-name="${window.CSS.escape(A)}"]`);if(!_)return;_.scrollIntoView({block:"nearest"}),_.classList.add("ring-2","ring-primary/60");const O=window.setTimeout(()=>_.classList.remove("ring-2","ring-primary/60"),1500);return()=>window.clearTimeout(O)},[v.hash,n]);const b=(()=>{if(!e||!n)return(n==null?void 0:n.sessions)??[];if(!t)return[];const T=new Set(t.filter(A=>e==="_ungrouped"?A.workspace===null:A.workspace===e).map(A=>A.slug));return n.sessions.filter(A=>A.windows.some(_=>_.panes.some(O=>O.assignment&&T.has(O.assignment.project))))})();async function N(T){if(T.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 k(){x(!0);try{await fetch("/api/servers/refresh",{method:"POST"}),a()}finally{x(!1)}}async function S(T){await fetch(`/api/servers/${encodeURIComponent(T)}`,{method:"DELETE"}),a()}async function C(T){await fetch(`/api/servers/${encodeURIComponent(T)}/refresh`,{method:"POST"}),a()}return o?l.jsx(jt,{label:"Loading servers…"}):i?l.jsx(Ct,{error:i}):n?n.tmuxAvailable?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u?l.jsxs("form",{onSubmit:N,className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:p,onChange:T=>h(T.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(ir,{className:"h-3.5 w-3.5"}),"Track Session"]}),l.jsxs("button",{className:"shell-action",onClick:k,disabled:m,children:[l.jsx(Sv,{className:`h-3.5 w-3.5 ${m?"animate-spin":""}`}),"Refresh All"]})]}),b.length===0?l.jsx(vt,{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:b.map(T=>l.jsx(wL,{session:T,onRefresh:()=>C(T.name),onRemove:()=>S(T.name),onRefetch:a},T.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(NC,{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 wL({session:e,onRefresh:t,onRemove:n,onRefetch:o}){return l.jsxs("div",{className:"surface-panel","data-server-name":e.name,children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Qf,{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(Sv,{className:"h-3.5 w-3.5"})}),l.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:l.jsx(_s,{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(kL,{pane:a,sessionName:e.name,windowIndex:i.index,onRefetch:o},`${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(kC,{className:"h-4 w-4"}),l.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function kL({pane:e,sessionName:t,windowIndex:n,onRefetch:o}){const i=Lt(),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(So,{value:e.cwd})]}),e.branch&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(bv,{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(u=>l.jsxs("a",{href:u,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:[u.replace("http://localhost:",":"),l.jsx(vv,{className:"h-2.5 w-2.5"})]},u))}),l.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?l.jsxs(Re,{to:`${i}/projects/${e.assignment.project}/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(pC,{className:"h-2.5 w-2.5"}),e.assignment.title]}):l.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function Dy(){const{workspace:e}=Dt(),{data:t}=du(),{data:n,loading:o,error:i}=yN(),[a,u]=g.useState(""),[d,p]=g.useState(""),[h,m]=g.useState(""),[x,v]=g.useState("started_desc"),[b,N]=g.useState(0),[k,S]=g.useState(new Set),[C,T]=g.useState(!1),[A,_]=g.useState(null),[O,P]=g.useState(null),$=(n==null?void 0:n.sessions.some(X=>X.status==="active"))??!1;g.useEffect(()=>{if(!$)return;const X=window.setInterval(()=>N(Q=>Q+1),3e4);return()=>window.clearInterval(X)},[$]),g.useEffect(()=>{S(X=>{if(X.size===0)return X;const Q=new Set((n==null?void 0:n.sessions.map(D=>D.sessionId))??[]),I=new Set([...X].filter(D=>Q.has(D)));return I.size===X.size?X:I})},[n]);const E=g.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const X=a.trim().toLowerCase();return[...n.sessions.filter(I=>{var H;if(e&&t){const te=((H=t.find(R=>R.slug===I.projectSlug))==null?void 0:H.workspace)??null;if(e==="_ungrouped"){if(te!==null)return!1}else if(te!==e)return!1}const D=jL(I.started);return d&&(!D||D<d)||h&&(!D||D>h)?!1:X?[I.projectSlug??"",I.assignmentSlug??"",I.agent,I.sessionId,I.path,I.description??""].join(" ").toLowerCase().includes(X):!0})].sort((I,D)=>CL(I,D,x))},[n,a,x,d,h,b,e,t]);function U(X){S(Q=>{const I=new Set(Q);return I.has(X)?I.delete(X):I.add(X),I})}function ee(){k.size===E.length&&E.length>0?S(new Set):S(new Set(E.map(X=>X.sessionId)))}async function Y(X){_(null),T(!0);try{const Q=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:X})}),I=await Q.json().catch(()=>null);if(!Q.ok)throw new Error((I==null?void 0:I.error)||`HTTP ${Q.status}`);S(D=>new Set([...D].filter(V=>!X.includes(V)))),P(null)}catch(Q){_(Q.message)}finally{T(!1)}}if(o)return l.jsx(jt,{label:"Loading agent sessions..."});if(i)return l.jsx(Ct,{error:i});if(!n)return null;const q=n.sessions.length>0;return l.jsxs(l.Fragment,{children:[l.jsxs(mp,{children:[l.jsx(vu,{value:a,onChange:u,placeholder:"Search project, 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:X=>p(X.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:X=>m(X.target.value),className:"editor-input min-w-[150px]"})]}),l.jsxs("select",{value:x,onChange:X=>v(X.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:()=>P({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:C,children:[l.jsx(_s,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),l.jsx("button",{className:"shell-action",onClick:()=>S(new Set),children:"Clear Selection"})]}),q?E.length===0?l.jsx(vt,{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:ee,className:"text-muted-foreground hover:text-foreground",children:k.size===E.length&&E.length>0?l.jsx(jr,{className:"h-4 w-4"}):l.jsx(jv,{className:"h-4 w-4"})})}),l.jsx("th",{className:"pb-2 pr-3",children:"Project"}),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:E.map(X=>l.jsx(SL,{session:X,selected:k.has(X.sessionId),onToggle:()=>U(X.sessionId),onDelete:()=>P({sessionIds:[X.sessionId],title:`Delete session ${X.sessionId.slice(0,8)}...?`,description:`Remove this ${X.agent} session record${X.assignmentSlug?` for ${X.assignmentSlug}`:""}. This cannot be undone.`,confirmLabel:"Delete Session"})},X.sessionId))})]})}):l.jsx(vt,{title:"No agent sessions",description:"No agent sessions have been registered yet. Use /grab-assignment or syntaur track-session to register one."}),l.jsx(ow,{open:O!==null,title:(O==null?void 0:O.title)??"Delete session?",description:(O==null?void 0:O.description)??"",confirmLabel:(O==null?void 0:O.confirmLabel)??"Delete",destructive:!0,loading:C,onOpenChange:X=>{X||P(null)},onConfirm:async()=>{O&&await Y(O.sessionIds)}})]})}function SL({session:e,selected:t,onToggle:n,onDelete:o}){const i=Lt(),a=e.sessionId.length>12?e.sessionId.slice(0,8)+"...":e.sessionId,u=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(jr,{className:"h-4 w-4"}):l.jsx(jv,{className:"h-4 w-4"})})}),l.jsx("td",{className:"py-2 pr-3",children:e.projectSlug?l.jsx(Re,{to:`${i}/projects/${e.projectSlug}`,className:"text-primary hover:underline",children:un(e.projectSlug)}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2 pr-3",children:e.projectSlug&&e.assignmentSlug?l.jsx(Re,{to:`${i}/projects/${e.projectSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:un(e.assignmentSlug)}):e.assignmentSlug?l.jsx("span",{children:un(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(cu,{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(So,{value:e.sessionId})]})}),l.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Cr(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:u}),e.path&&l.jsx(So,{value:e.path})]})}),l.jsx("td",{className:"py-2",children:l.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-destructive",title:"Delete session",children:l.jsx(_s,{className:"h-3.5 w-3.5"})})})]})}function jL(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return`${n}-${o}-${i}`}function La(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 CL(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 La(e)-La(t);case"duration_desc":return La(t)-La(e);case"assignment_asc":return(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"")||(e.projectSlug??"").localeCompare(t.projectSlug??"");case"agent_asc":return e.agent.localeCompare(t.agent)||(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"");default:return 0}}function NL(){const{data:e,loading:t,error:n}=Wv(),[o,i]=g.useState(""),a=g.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!o.trim())return e.playbooks;const u=o.toLowerCase();return e.playbooks.filter(d=>d.name.toLowerCase().includes(u)||d.description.toLowerCase().includes(u)||d.slug.toLowerCase().includes(u)||d.tags.some(p=>p.toLowerCase().includes(u)))},[e,o]);return t?l.jsx(jt,{label:"Loading playbooks..."}):n?l.jsx(Ct,{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(sl,{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:o,onChange:u=>i(u.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(Re,{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(ir,{className:"h-4 w-4"}),"Create Playbook"]})]}),l.jsxs(Re,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[l.jsx(iC,{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(vt,{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(Re,{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(ir,{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(u=>l.jsxs(Re,{to:`/playbooks/${u.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(gv,{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:u.name}),u.description?l.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:u.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:[u.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(Cv,{className:"h-2.5 w-2.5"}),d]},d)),u.tags.length>3?l.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",u.tags.length-3]}):null]}),l.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:Wr(u.updated)})]})]},u.slug))})]})}function EL(){const{slug:e}=Dt(),t=qt(),{data:n,loading:o,error:i}=bN(e),[a,u]=g.useState(!1),[d,p]=g.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 o?l.jsx(jt,{label:"Loading playbook..."}):i?l.jsx(Ct,{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 ",Cr(n.created)]}),l.jsxs("span",{children:["Updated ",Cr(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(Cv,{className:"h-3 w-3"}),x]},x))}):null]}),h?null:l.jsxs("div",{className:"flex shrink-0 gap-2",children:[l.jsxs(Re,{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(yC,{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:()=>u(!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:()=>u(!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(_s,{className:"h-3 w-3"}),"Delete"]})]})]}),l.jsx("div",{className:"surface-panel p-4",children:l.jsx(vr,{content:n.body})})]}):null}function RL(){const e=qt(),[t,n]=g.useState(null),[o,i]=g.useState(!0),[a,u]=g.useState(!1),[d,p]=g.useState(null);g.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){u(!0),p(null);try{const x=await fetch("/api/playbooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:m})}),v=await x.json();if(!x.ok){p(v.error||`HTTP ${x.status}`),u(!1);return}e(`/playbooks/${v.slug}`)}catch(x){p(x.message),u(!1);return}u(!1)}return o?l.jsx(jt,{label:"Loading playbook template..."}):d&&!t?l.jsx(Ct,{error:d}):l.jsx(pl,{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 PL(){const{slug:e}=Dt(),t=qt(),[n,o]=g.useState(null),[i,a]=g.useState(!0),[u,d]=g.useState(!1),[p,h]=g.useState(null);g.useEffect(()=>{e&&fetch(`/api/playbooks/${e}/edit`).then(x=>x.json()).then(x=>{o(x.content),a(!1)}).catch(x=>{h(x.message),a(!1)})},[e]);async function m(x){if(e){d(!0),h(null);try{const v=await fetch(`/api/playbooks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}),b=await v.json();if(!v.ok){h(b.error||`HTTP ${v.status}`),d(!1);return}t(`/playbooks/${e}`)}catch(v){h(v.message),d(!1);return}d(!1)}}return i?l.jsx(jt,{label:"Loading playbook..."}):p&&!n?l.jsx(Ct,{error:p}):l.jsx(pl,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:m,saving:u,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function TL({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 Of=["projects","playbooks","todos","servers","config"];function AL(e){const t=new Set;for(const n of e.split(",").map(o=>o.trim()))Of.includes(n)&&t.add(n);return t}function Ly(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function DL(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,a]=g.useState(""),[u,d]=g.useState(new Set(Of)),[p,h]=g.useState(!1),[m,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(null),S=g.useCallback(async()=>{try{const P=await fetch("/api/backup");if(!P.ok)throw new Error(`HTTP ${P.status}`);const $=await P.json();o($),a($.repo??""),d(AL($.categories)),h(!1)}catch(P){k({type:"error",message:`Failed to load backup config: ${P instanceof Error?P.message:String(P)}`})}finally{t(!1)}},[]);g.useEffect(()=>{S()},[S]);function C(P){d($=>{const E=new Set($);return E.has(P)?E.delete(P):E.add(P),E}),h(!0)}async function T(){x(!0),k(null);try{const P=Array.from(u),$=await fetch("/api/backup/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repo:i.trim()||null,categories:P})}),E=await $.json();if(!$.ok)throw new Error(E.error||`HTTP ${$.status}`);o(E),h(!1),k({type:"success",message:"Backup configuration saved."})}catch(P){k({type:"error",message:`Save failed: ${P instanceof Error?P.message:String(P)}`})}finally{x(!1)}}async function A(){b("push"),k(null);try{const P=await fetch("/api/backup/push",{method:"POST"}),$=await P.json();if(!P.ok||$.success===!1)throw new Error($.error||$.message||`HTTP ${P.status}`);k({type:"success",message:$.message||"Backup complete."}),await S()}catch(P){k({type:"error",message:`Backup failed: ${P instanceof Error?P.message:String(P)}`})}finally{b(null)}}async function _(){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 $=await fetch("/api/backup/pull",{method:"POST"}),E=await $.json();if(!$.ok||E.success===!1)throw new Error(E.error||E.message||`HTTP ${$.status}`);k({type:"success",message:E.message||"Restore complete."}),await S()}catch($){k({type:"error",message:`Restore failed: ${$ instanceof Error?$.message:String($)}`})}finally{b(null)}}}if(e)return l.jsx(De,{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 O=!!i.trim()&&u.size>0&&!v&&!p;return l.jsx(De,{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:[N&&l.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${N.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:N.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:P=>{a(P.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:Of.map(P=>{const $=u.has(P);return l.jsxs("button",{type:"button",onClick:()=>C(P),className:`shell-action text-xs ${$?"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 ${$?"bg-primary":"bg-muted-foreground/40"}`}),P]},P)})})]}),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: "}),Ly((n==null?void 0:n.lastBackup)??null)]}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Last restore: "}),Ly((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:T,disabled:m||!p,children:[l.jsx(Jf,{className:"h-3.5 w-3.5"}),m?"Saving...":"Save Config"]}),l.jsxs("button",{className:"shell-action",onClick:A,disabled:!O,title:O?"Back up now":p?"Save config first":"Set repo and pick categories",children:[l.jsx(EC,{className:"h-3.5 w-3.5"}),v==="push"?"Backing up...":"Back Up Now"]}),l.jsxs("button",{className:"shell-action",onClick:_,disabled:!O,title:O?"Restore from backup":p?"Save config first":"Set repo and pick categories",children:[l.jsx(nC,{className:"h-3.5 w-3.5"}),v==="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(eC,{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 rf(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 LL(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,a]=g.useState(!1),[u,d]=g.useState([]),[p,h]=g.useState([]),[m,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(!1),S=g.useCallback(async()=>{try{const E=await fetch("/api/config/statuses");if(!E.ok)throw new Error(`HTTP ${E.status}`);const U=await E.json(),ee=rf(U);d(ee.statuses),h(ee.order),a(U.custom),k(!1),o(null)}catch(E){o(E instanceof Error?E.message:"Failed to load config")}finally{t(!1)}},[]);g.useEffect(()=>{S()},[S]);function C(){setTimeout(()=>b(null),3e3)}async function T(){x(!0),b(null);try{const E={statuses:u.map(q=>({id:q.id,label:q.label,...q.description?{description:q.description}:{},...q.color?{color:q.color}:{},...q.terminal?{terminal:!0}:{}})),order:p,transitions:[]},U=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)});if(!U.ok){const q=await U.json().catch(()=>({error:"Unknown error"}));throw new Error(q.error??"Save failed")}const ee=await U.json(),Y=rf(ee);d(Y.statuses),h(Y.order),a(ee.custom),k(!1),mx(),b({type:"success",message:"Status config saved"}),C()}catch(E){b({type:"error",message:E instanceof Error?E.message:"Save failed"})}finally{x(!1)}}async function A(){x(!0),b(null);try{const E=await fetch("/api/config/statuses",{method:"DELETE"});if(!E.ok)throw new Error("Reset failed");const U=await E.json(),ee=rf(U);d(ee.statuses),h(ee.order),a(U.custom),k(!1),mx(),b({type:"success",message:"Reset to defaults"}),C()}catch(E){b({type:"error",message:E instanceof Error?E.message:"Reset failed"})}finally{x(!1)}}function _(E,U,ee){d(Y=>{const q=[...Y];if(q[E]={...q[E],[U]:ee},U==="id"&&typeof ee=="string"){const X=Y[E].id;h(Q=>Q.map(I=>I===X?ee:I))}return q}),k(!0)}function O(){const E=`status_${u.length+1}`;d(U=>[...U,{id:E,label:"New Status",description:"",color:"",terminal:!1}]),h(U=>[...U,E]),k(!0)}function P(E){const U=u[E].id;d(ee=>ee.filter((Y,q)=>q!==E)),h(ee=>ee.filter(Y=>Y!==U)),k(!0)}function $(E,U){const ee=E+U;ee<0||ee>=p.length||(h(Y=>{const q=[...Y];return[q[E],q[ee]]=[q[ee],q[E]],q}),k(!0))}return e?l.jsx(jt,{label:"Loading settings..."}):n?l.jsx(Ct,{error:n}):l.jsx(Mw,{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(wv,{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&&!N,children:[l.jsx(vC,{className:"h-3 w-3"}),"Reset to Defaults"]})]}),v&&l.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${v.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:v.message}),l.jsx(De,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:l.jsxs("button",{className:"shell-action text-xs",onClick:O,children:[l.jsx(ir,{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($w,{children:[l.jsx(Fw,{asChild:!0,children:l.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),l.jsx(Hp,{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:u.map((E,U)=>l.jsxs("tr",{children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:E.id,onChange:ee=>_(U,"id",ee.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:E.label,onChange:ee=>_(U,"label",ee.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx(TL,{value:E.color,onChange:ee=>_(U,"color",ee)})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("button",{type:"button",role:"switch","aria-checked":E.terminal,onClick:()=>_(U,"terminal",!E.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 ${E.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 ${E.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:()=>P(U),title:"Remove status",children:l.jsx(_s,{className:"h-3.5 w-3.5"})})})]},U))})]})})}),l.jsx(De,{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((E,U)=>{var Y;const ee=((Y=u.find(q=>q.id===E))==null?void 0:Y.label)??E;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:U+1}),l.jsx("span",{className:"flex-1 font-medium",children:ee}),l.jsx("span",{className:"text-xs text-muted-foreground",children:E}),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:()=>$(U,-1),disabled:U===0,title:"Move up",children:l.jsx(xv,{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:()=>$(U,1),disabled:U===p.length-1,title:"Move down",children:l.jsx(Gi,{className:"h-3.5 w-3.5"})})]},U)})})}),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:T,disabled:m||!N,children:[l.jsx(Jf,{className:"h-3.5 w-3.5"}),m?"Saving...":"Save Configuration"]}),N&&l.jsxs(l.Fragment,{children:[l.jsx("button",{className:"shell-action text-xs",onClick:()=>{t(!0),S()},disabled:m,children:"Discard Changes"}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]}),l.jsx(DL,{})]})})}const Iy=[{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 Ww({status:e,onChange:t}){const[n,o]=g.useState(!1),i=g.useRef(null);g.useEffect(()=>{if(!n)return;function u(d){i.current&&!i.current.contains(d.target)&&o(!1)}return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[n]);const a=Iy.find(u=>u.value===e);return l.jsxs("div",{className:"relative",ref:i,onClick:u=>u.stopPropagation(),children:[l.jsx("button",{onClick:()=>o(!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:Iy.filter(u=>u.value!==e).map(u=>l.jsxs("button",{onClick:()=>{t(u.value),o(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm hover:bg-foreground/5 transition ${u.color}`,children:[l.jsx("span",{className:"text-base leading-none",children:u.icon}),l.jsx("span",{children:u.label})]},u.value))})]})}function IL(){const{data:e,loading:t,error:n,refetch:o}=rp(),[i,a]=g.useState(""),u=g.useRef(null);Fs("list:todos");const[d,p]=g.useState(""),[h,m]=g.useState(""),[x,v]=g.useState(""),[b,N]=g.useState("_global"),[k,S]=g.useState(null);function C(I,D){I.stopPropagation(),navigator.clipboard.writeText(D),S(D),setTimeout(()=>S(V=>V===D?null:V),1500)}const T=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const I=[];for(const D of e.workspaces)for(const V of D.items)I.push({...V,workspace:D.workspace});return I},[e]),A=g.useMemo(()=>{const I=new Set;for(const D of T)for(const V of D.tags)I.add(V);return Array.from(I).sort()},[T]),_=g.useMemo(()=>{let I=T;if(i.trim()){const D=i.toLowerCase();I=I.filter(V=>V.description.toLowerCase().includes(D)||V.tags.some(H=>H.toLowerCase().includes(D))||V.id.includes(D))}return d&&(I=I.filter(D=>D.status===d)),h&&(I=I.filter(D=>D.tags.includes(h))),I},[T,i,d,h]),O=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return{open:0,in_progress:0,completed:0,blocked:0,total:0};const I={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const D of e.workspaces)I.open+=D.counts.open,I.in_progress+=D.counts.in_progress,I.completed+=D.counts.completed,I.blocked+=D.counts.blocked,I.total+=D.counts.total;return I},[e]);async function P(){x.trim()&&(await Vv(b,x.trim()),v(""),o())}const $={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function E(I,D,V){U(I,D,$[V]||"open")}async function U(I,D,V){switch(V){case"open":await Yv(I,D);break;case"in_progress":await Gv(I,D);break;case"completed":await qv(I,D);break;case"blocked":await Kv(I,D);break}o()}async function ee(I,D){await jN(I,D),o()}const{hotkeyRowProps:Y}=yu(_,{scope:"list:todos",bindO:!1,onOpen:I=>E(I.workspace,I.id,I.status)});gt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var I;return(I=u.current)==null?void 0:I.focus()}}),gt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>o()});const[q,X]=ol(),Q=q.get("focus");return g.useEffect(()=>{if(!Q)return;const I=document.querySelector(`[data-todo-id="${CSS.escape(Q)}"]`);if(!I)return;I.scrollIntoView({block:"nearest"}),I.classList.add("ring-2","ring-primary/60");const D=window.setTimeout(()=>{I.classList.remove("ring-2","ring-primary/60"),X(V=>{const H=new URLSearchParams(V);return H.delete("focus"),H})},1500);return()=>window.clearTimeout(D)},[Q,_.length,X]),t?l.jsx(jt,{label:"Loading todos..."}):n?l.jsx(Ct,{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(ot,{label:"Open",value:O.open,icon:jr}),l.jsx(ot,{label:"In Progress",value:O.in_progress,icon:kv,tone:"info"}),l.jsx(ot,{label:"Blocked",value:O.blocked,icon:il,tone:"warn"}),l.jsx(ot,{label:"Completed",value:O.completed,icon:jr,tone:"default"})]}),l.jsx("div",{className:"surface-panel p-3",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("select",{value:b,onChange:I=>N(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:"_global",children:"Global"}),e==null?void 0:e.workspaces.filter(I=>I.workspace!=="_global").map(I=>l.jsx("option",{value:I.workspace,children:I.workspace},I.workspace))]}),l.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:I=>v(I.target.value),onKeyDown:I=>I.key==="Enter"&&P(),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:P,disabled:!x.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(ir,{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(sl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{ref:u,type:"text",placeholder:"Search todos...",value:i,onChange:I=>a(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:d,onChange:I=>p(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:h,onChange:I=>m(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))]})]}),_.length===0?l.jsx(vt,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):l.jsx("div",{className:"space-y-1",children:_.map((I,D)=>l.jsxs("div",{"data-todo-id":I.id,...Y(D),className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>E(I.workspace,I.id,I.status),children:[l.jsx(Ww,{status:I.status,onChange:V=>U(I.workspace,I.id,V)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${I.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:I.description}),I.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:I.tags.map(V=>`#${V}`).join(" ")})]}),l.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:I.workspace!=="_global"&&l.jsx(Re,{to:`/w/${I.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:V=>V.stopPropagation(),children:I.workspace})}),k===I.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Gf,{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:V=>C(V,I.id),children:["t:",I.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:V=>C(V,I.id),children:l.jsx(Yf,{className:"h-3 w-3"})})]}),l.jsx("button",{onClick:()=>ee(I.workspace,I.id),className:"text-xs text-muted-foreground/40 hover:text-red-400 transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${I.workspace}-${I.id}`))})]})}function OL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>o=>{t.forEach(i=>i(o))},t)}const Mu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ws(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Wp(e){return"nodeType"in e}function En(e){var t,n;return e?Ws(e)?e:Wp(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Vp(e){const{Document:t}=En(e);return e instanceof t}function hl(e){return Ws(e)?!1:e instanceof En(e).HTMLElement}function Vw(e){return e instanceof En(e).SVGElement}function Vs(e){return e?Ws(e)?e.document:Wp(e)?Vp(e)?e:hl(e)||Vw(e)?e.ownerDocument:document:document:document}const Rr=Mu?g.useLayoutEffect:g.useEffect;function qp(e){const t=g.useRef(e);return Rr(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function _L(){const e=g.useRef(null),t=g.useCallback((o,i)=>{e.current=setInterval(o,i)},[]),n=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Ji(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Rr(()=>{n.current!==e&&(n.current=e)},t),n}function ml(e,t){const n=g.useRef();return g.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function ru(e){const t=qp(e),n=g.useRef(null),o=g.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,o]}function _f(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let of={};function gl(e,t){return g.useMemo(()=>{if(t)return t;const n=of[e]==null?0:of[e]+1;return of[e]=n,e+"-"+n},[e,t])}function qw(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((a,u)=>{const d=Object.entries(u);for(const[p,h]of d){const m=a[p];m!=null&&(a[p]=m+e*h)}return a},{...t})}}const As=qw(1),ou=qw(-1);function ML(e){return"clientX"in e&&"clientY"in e}function Kp(e){if(!e)return!1;const{KeyboardEvent:t}=En(e.target);return t&&e instanceof t}function $L(e){if(!e)return!1;const{TouchEvent:t}=En(e.target);return t&&e instanceof t}function Mf(e){if($L(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 ML(e)?{x:e.clientX,y:e.clientY}:null}const Zi=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[Zi.Translate.toString(e),Zi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),Oy="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function FL(e){return e.matches(Oy)?e:e.querySelector(Oy)}const zL={display:"none"};function BL(e){let{id:t,value:n}=e;return mt.createElement("div",{id:t,style:zL},n)}function UL(e){let{id:t,announcement:n,ariaLiveType:o="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 mt.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function HL(){const[e,t]=g.useState("");return{announce:g.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const Kw=g.createContext(null);function WL(e){const t=g.useContext(Kw);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function VL(){const[e]=g.useState(()=>new Set),t=g.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[g.useCallback(o=>{let{type:i,event:a}=o;e.forEach(u=>{var d;return(d=u[i])==null?void 0:d.call(u,a)})},[e]),t]}const qL={draggable:`
468
- To pick up a draggable item, press the space bar.
469
- While dragging, use the arrow keys to move the item.
470
- Press space again to drop the item in its new position, or press escape to cancel.
471
- `},KL={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 GL(e){let{announcements:t=KL,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=qL}=e;const{announce:a,announcement:u}=HL(),d=gl("DndLiveRegion"),[p,h]=g.useState(!1);if(g.useEffect(()=>{h(!0)},[]),WL(g.useMemo(()=>({onDragStart(x){let{active:v}=x;a(t.onDragStart({active:v}))},onDragMove(x){let{active:v,over:b}=x;t.onDragMove&&a(t.onDragMove({active:v,over:b}))},onDragOver(x){let{active:v,over:b}=x;a(t.onDragOver({active:v,over:b}))},onDragEnd(x){let{active:v,over:b}=x;a(t.onDragEnd({active:v,over:b}))},onDragCancel(x){let{active:v,over:b}=x;a(t.onDragCancel({active:v,over:b}))}}),[a,t])),!p)return null;const m=mt.createElement(mt.Fragment,null,mt.createElement(BL,{id:o,value:i.draggable}),mt.createElement(UL,{id:d,announcement:u}));return n?wo.createPortal(m,n):m}var Pt;(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"})(Pt||(Pt={}));function su(){}function _y(e,t){return g.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 g.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const ur=Object.freeze({x:0,y:0});function XL(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function QL(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function JL(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function ZL(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function My(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 eI=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=My(t,t.left,t.top),a=[];for(const u of o){const{id:d}=u,p=n.get(d);if(p){const h=XL(My(p),i);a.push({id:d,data:{droppableContainer:u,value:h}})}}return a.sort(QL)};function tI(e,t){const n=Math.max(t.top,e.top),o=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),u=i-o,d=a-n;if(o<i&&n<a){const p=t.width*t.height,h=e.width*e.height,m=u*d,x=m/(p+h-m);return Number(x.toFixed(4))}return 0}const nI=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const a of o){const{id:u}=a,d=n.get(u);if(d){const p=tI(d,t);p>0&&i.push({id:u,data:{droppableContainer:a,value:p}})}}return i.sort(JL)};function rI(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Gw(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ur}function oI(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return i.reduce((u,d)=>({...u,top:u.top+e*d.y,bottom:u.bottom+e*d.y,left:u.left+e*d.x,right:u.right+e*d.x}),{...n})}}const sI=oI(1);function iI(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 lI(e,t,n){const o=iI(t);if(!o)return e;const{scaleX:i,scaleY:a,x:u,y:d}=o,p=e.left-u-(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 aI={ignoreTransform:!1};function qs(e,t){t===void 0&&(t=aI);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:m}=En(e).getComputedStyle(e);h&&(n=lI(n,h,m))}const{top:o,left:i,width:a,height:u,bottom:d,right:p}=n;return{top:o,left:i,width:a,height:u,bottom:d,right:p}}function $y(e){return qs(e,{ignoreTransform:!0})}function uI(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function cI(e,t){return t===void 0&&(t=En(e).getComputedStyle(e)),t.position==="fixed"}function dI(e,t){t===void 0&&(t=En(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 Gp(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(Vp(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!hl(i)||Vw(i)||n.includes(i))return n;const a=En(e).getComputedStyle(i);return i!==e&&dI(i,a)&&n.push(i),cI(i,a)?n:o(i.parentNode)}return e?o(e):n}function Yw(e){const[t]=Gp(e,1);return t??null}function sf(e){return!Mu||!e?null:Ws(e)?e:Wp(e)?Vp(e)||e===Vs(e).scrollingElement?window:hl(e)?e:null:null}function Xw(e){return Ws(e)?e.scrollX:e.scrollLeft}function Qw(e){return Ws(e)?e.scrollY:e.scrollTop}function $f(e){return{x:Xw(e),y:Qw(e)}}var Ft;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ft||(Ft={}));function Jw(e){return!Mu||!e?!1:e===document.scrollingElement}function Zw(e){const t={x:0,y:0},n=Jw(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,u=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:i,isLeft:a,isBottom:u,isRight:d,maxScroll:o,minScroll:t}}const fI={x:.2,y:.2};function pI(e,t,n,o,i){let{top:a,left:u,right:d,bottom:p}=n;o===void 0&&(o=10),i===void 0&&(i=fI);const{isTop:h,isBottom:m,isLeft:x,isRight:v}=Zw(e),b={x:0,y:0},N={x:0,y:0},k={height:t.height*i.y,width:t.width*i.x};return!h&&a<=t.top+k.height?(b.y=Ft.Backward,N.y=o*Math.abs((t.top+k.height-a)/k.height)):!m&&p>=t.bottom-k.height&&(b.y=Ft.Forward,N.y=o*Math.abs((t.bottom-k.height-p)/k.height)),!v&&d>=t.right-k.width?(b.x=Ft.Forward,N.x=o*Math.abs((t.right-k.width-d)/k.width)):!x&&u<=t.left+k.width&&(b.x=Ft.Backward,N.x=o*Math.abs((t.left+k.width-u)/k.width)),{direction:b,speed:N}}function hI(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:u}=window;return{top:0,left:0,right:a,bottom:u,width:a,height:u}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function e1(e){return e.reduce((t,n)=>As(t,$f(n)),ur)}function mI(e){return e.reduce((t,n)=>t+Xw(n),0)}function gI(e){return e.reduce((t,n)=>t+Qw(n),0)}function xI(e,t){if(t===void 0&&(t=qs),!e)return;const{top:n,left:o,bottom:i,right:a}=t(e);Yw(e)&&(i<=0||a<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const yI=[["x",["left","right"],mI],["y",["top","bottom"],gI]];class Yp{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 o=Gp(n),i=e1(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,u,d]of yI)for(const p of u)Object.defineProperty(this,p,{get:()=>{const h=d(o),m=i[a]-h;return this.rect[p]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Wi{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var i;(i=this.target)==null||i.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function vI(e){const{EventTarget:t}=En(e);return e instanceof t?e:Vs(e)}function lf(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var Kn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Kn||(Kn={}));function Fy(e){e.preventDefault()}function bI(e){e.stopPropagation()}var We;(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"})(We||(We={}));const t1={start:[We.Space,We.Enter],cancel:[We.Esc],end:[We.Space,We.Enter,We.Tab]},wI=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case We.Right:return{...n,x:n.x+25};case We.Left:return{...n,x:n.x-25};case We.Down:return{...n,y:n.y+25};case We.Up:return{...n,y:n.y-25}}};class Xp{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 Wi(Vs(n)),this.windowListeners=new Wi(En(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kn.Resize,this.handleCancel),this.windowListeners.add(Kn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Kn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&xI(o),n(ur)}handleKeyDown(t){if(Kp(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:a=t1,coordinateGetter:u=wI,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}=o.current,m=h?{x:h.left,y:h.top}:ur;this.referenceCoordinates||(this.referenceCoordinates=m);const x=u(t,{active:n,context:o.current,currentCoordinates:m});if(x){const v=ou(x,m),b={x:0,y:0},{scrollableAncestors:N}=o.current;for(const k of N){const S=t.code,{isTop:C,isRight:T,isLeft:A,isBottom:_,maxScroll:O,minScroll:P}=Zw(k),$=hI(k),E={x:Math.min(S===We.Right?$.right-$.width/2:$.right,Math.max(S===We.Right?$.left:$.left+$.width/2,x.x)),y:Math.min(S===We.Down?$.bottom-$.height/2:$.bottom,Math.max(S===We.Down?$.top:$.top+$.height/2,x.y))},U=S===We.Right&&!T||S===We.Left&&!A,ee=S===We.Down&&!_||S===We.Up&&!C;if(U&&E.x!==x.x){const Y=k.scrollLeft+v.x,q=S===We.Right&&Y<=O.x||S===We.Left&&Y>=P.x;if(q&&!v.y){k.scrollTo({left:Y,behavior:d});return}q?b.x=k.scrollLeft-Y:b.x=S===We.Right?k.scrollLeft-O.x:k.scrollLeft-P.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(ee&&E.y!==x.y){const Y=k.scrollTop+v.y,q=S===We.Down&&Y<=O.y||S===We.Up&&Y>=P.y;if(q&&!v.x){k.scrollTo({top:Y,behavior:d});return}q?b.y=k.scrollTop-Y:b.y=S===We.Down?k.scrollTop-O.y:k.scrollTop-P.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,As(ou(x,this.referenceCoordinates),b))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(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()}}Xp.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=t1,onActivation:i}=t,{active:a}=n;const{code:u}=e.nativeEvent;if(o.start.includes(u)){const d=a.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function zy(e){return!!(e&&"distance"in e)}function By(e){return!!(e&&"delay"in e)}class Qp{constructor(t,n,o){var i;o===void 0&&(o=vI(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:u}=a;this.props=t,this.events=n,this.document=Vs(u),this.documentListeners=new Wi(this.document),this.listeners=new Wi(o),this.windowListeners=new Wi(En(u)),this.initialCoordinates=(i=Mf(a))!=null?i:ur,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:o}}}=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(Kn.Resize,this.handleCancel),this.windowListeners.add(Kn.DragStart,Fy),this.windowListeners.add(Kn.VisibilityChange,this.handleCancel),this.windowListeners.add(Kn.ContextMenu,Fy),this.documentListeners.add(Kn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(By(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(zy(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:o,onPending:i}=this.props;i(o,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Kn.Click,bI,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:a}=this,{onMove:u,options:{activationConstraint:d}}=a;if(!i)return;const p=(n=Mf(t))!=null?n:ur,h=ou(i,p);if(!o&&d){if(zy(d)){if(d.tolerance!=null&&lf(h,d.tolerance))return this.handleCancel();if(lf(h,d.distance))return this.handleStart()}if(By(d)&&lf(h,d.tolerance))return this.handleCancel();this.handlePending(d,h);return}t.cancelable&&t.preventDefault(),u(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===We.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const kI={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Jp extends Qp{constructor(t){const{event:n}=t,o=Vs(n.target);super(t,kI,o)}}Jp.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const SI={move:{name:"mousemove"},end:{name:"mouseup"}};var Ff;(function(e){e[e.RightClick=2]="RightClick"})(Ff||(Ff={}));class jI extends Qp{constructor(t){super(t,SI,Vs(t.event.target))}}jI.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===Ff.RightClick?!1:(o==null||o({event:n}),!0)}}];const af={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class CI extends Qp{constructor(t){super(t,af)}static setup(){return window.addEventListener(af.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(af.move.name,t)};function t(){}}}CI.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return i.length>1?!1:(o==null||o({event:n}),!0)}}];var Vi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Vi||(Vi={}));var iu;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(iu||(iu={}));function NI(e){let{acceleration:t,activator:n=Vi.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:u=5,order:d=iu.TreeOrder,pointerCoordinates:p,scrollableAncestors:h,scrollableAncestorRects:m,delta:x,threshold:v}=e;const b=RI({delta:x,disabled:!a}),[N,k]=_L(),S=g.useRef({x:0,y:0}),C=g.useRef({x:0,y:0}),T=g.useMemo(()=>{switch(n){case Vi.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case Vi.DraggableRect:return i}},[n,i,p]),A=g.useRef(null),_=g.useCallback(()=>{const P=A.current;if(!P)return;const $=S.current.x*C.current.x,E=S.current.y*C.current.y;P.scrollBy($,E)},[]),O=g.useMemo(()=>d===iu.TreeOrder?[...h].reverse():h,[d,h]);g.useEffect(()=>{if(!a||!h.length||!T){k();return}for(const P of O){if((o==null?void 0:o(P))===!1)continue;const $=h.indexOf(P),E=m[$];if(!E)continue;const{direction:U,speed:ee}=pI(P,E,T,t,v);for(const Y of["x","y"])b[Y][U[Y]]||(ee[Y]=0,U[Y]=0);if(ee.x>0||ee.y>0){k(),A.current=P,N(_,u),S.current=ee,C.current=U;return}}S.current={x:0,y:0},C.current={x:0,y:0},k()},[t,_,o,k,a,u,JSON.stringify(T),JSON.stringify(b),N,h,O,m,JSON.stringify(v)])}const EI={x:{[Ft.Backward]:!1,[Ft.Forward]:!1},y:{[Ft.Backward]:!1,[Ft.Forward]:!1}};function RI(e){let{delta:t,disabled:n}=e;const o=_f(t);return ml(i=>{if(n||!o||!i)return EI;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Ft.Backward]:i.x[Ft.Backward]||a.x===-1,[Ft.Forward]:i.x[Ft.Forward]||a.x===1},y:{[Ft.Backward]:i.y[Ft.Backward]||a.y===-1,[Ft.Forward]:i.y[Ft.Forward]||a.y===1}}},[n,t,o])}function PI(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return ml(i=>{var a;return t==null?null:(a=o??i)!=null?a:null},[o,t])}function TI(e,t){return g.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,a=i.activators.map(u=>({eventName:u.eventName,handler:t(u.handler,o)}));return[...n,...a]},[]),[e,t])}var el;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(el||(el={}));var zf;(function(e){e.Optimized="optimized"})(zf||(zf={}));const Uy=new Map;function AI(e,t){let{dragging:n,dependencies:o,config:i}=t;const[a,u]=g.useState(null),{frequency:d,measure:p,strategy:h}=i,m=g.useRef(e),x=S(),v=Ji(x),b=g.useCallback(function(C){C===void 0&&(C=[]),!v.current&&u(T=>T===null?C:T.concat(C.filter(A=>!T.includes(A))))},[v]),N=g.useRef(null),k=ml(C=>{if(x&&!n)return Uy;if(!C||C===Uy||m.current!==e||a!=null){const T=new Map;for(let A of e){if(!A)continue;if(a&&a.length>0&&!a.includes(A.id)&&A.rect.current){T.set(A.id,A.rect.current);continue}const _=A.node.current,O=_?new Yp(p(_),_):null;A.rect.current=O,O&&T.set(A.id,O)}return T}return C},[e,a,n,x,p]);return g.useEffect(()=>{m.current=e},[e]),g.useEffect(()=>{x||b()},[n,x]),g.useEffect(()=>{a&&a.length>0&&u(null)},[JSON.stringify(a)]),g.useEffect(()=>{x||typeof d!="number"||N.current!==null||(N.current=setTimeout(()=>{b(),N.current=null},d))},[d,x,b,...o]),{droppableRects:k,measureDroppableContainers:b,measuringScheduled:a!=null};function S(){switch(h){case el.Always:return!1;case el.BeforeDragging:return n;default:return!n}}}function n1(e,t){return ml(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function DI(e,t){return n1(e,t)}function LI(e){let{callback:t,disabled:n}=e;const o=qp(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(o)},[o,n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function $u(e){let{callback:t,disabled:n}=e;const o=qp(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(o)},[n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function II(e){return new Yp(qs(e),e)}function Hy(e,t,n){t===void 0&&(t=II);const[o,i]=g.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 u=LI({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=$u({callback:a});return Rr(()=>{a(),e?(d==null||d.observe(e),u==null||u.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),u==null||u.disconnect())},[e]),o}function OI(e){const t=n1(e);return Gw(e,t)}const Wy=[];function _I(e){const t=g.useRef(e),n=ml(o=>e?o&&o!==Wy&&e&&t.current&&e.parentNode===t.current.parentNode?o:Gp(e):Wy,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function MI(e){const[t,n]=g.useState(null),o=g.useRef(e),i=g.useCallback(a=>{const u=sf(a.target);u&&n(d=>d?(d.set(u,$f(u)),new Map(d)):null)},[]);return g.useEffect(()=>{const a=o.current;if(e!==a){u(a);const d=e.map(p=>{const h=sf(p);return h?(h.addEventListener("scroll",i,{passive:!0}),[h,$f(h)]):null}).filter(p=>p!=null);n(d.length?new Map(d):null),o.current=e}return()=>{u(e),u(a)};function u(d){d.forEach(p=>{const h=sf(p);h==null||h.removeEventListener("scroll",i)})}},[i,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,u)=>As(a,u),ur):e1(e):ur,[e,t])}function Vy(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const o=e!==ur;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?ou(e,n.current):ur}function $I(e){g.useEffect(()=>{if(!Mu)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function FI(e,t){return g.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:a}=o;return n[i]=u=>{a(u,t)},n},{}),[e,t])}function r1(e){return g.useMemo(()=>e?uI(e):null,[e])}const qy=[];function zI(e,t){t===void 0&&(t=qs);const[n]=e,o=r1(n?En(n):null),[i,a]=g.useState(qy);function u(){a(()=>e.length?e.map(p=>Jw(p)?o:new Yp(t(p),p)):qy)}const d=$u({callback:u});return Rr(()=>{d==null||d.disconnect(),u(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function BI(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return hl(t)?t:e}function UI(e){let{measure:t}=e;const[n,o]=g.useState(null),i=g.useCallback(h=>{for(const{target:m}of h)if(hl(m)){o(x=>{const v=t(m);return x?{...x,width:v.width,height:v.height}:v});break}},[t]),a=$u({callback:i}),u=g.useCallback(h=>{const m=BI(h);a==null||a.disconnect(),m&&(a==null||a.observe(m)),o(m?t(m):null)},[t,a]),[d,p]=ru(u);return g.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const HI=[{sensor:Jp,options:{}},{sensor:Xp,options:{}}],WI={current:{}},Va={draggable:{measure:$y},droppable:{measure:$y,strategy:el.WhileDragging,frequency:zf.Optimized},dragOverlay:{measure:qs}};class qi 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,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const VI={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new qi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:su},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Va,measureDroppableContainers:su,windowRect:null,measuringScheduled:!1},qI={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:su,draggableNodes:new Map,over:null,measureDroppableContainers:su},Fu=g.createContext(qI),o1=g.createContext(VI);function KI(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new qi}}}function GI(e,t){switch(t.type){case Pt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Pt.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 Pt.DragEnd:case Pt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Pt.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new qi(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case Pt.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||o!==a.key)return e;const u=new qi(e.droppable.containers);return u.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:u}}}case Pt.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const a=new qi(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:o,draggableNodes:i}=g.useContext(Fu),a=_f(o),u=_f(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!o&&a&&u!=null){if(!Kp(a)||document.activeElement===a.target)return;const d=i.get(u);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=FL(m);if(x){x.focus();break}}})}},[o,t,i,u,a]),null}function XI(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...o}),n):n}function QI(e){return g.useMemo(()=>({draggable:{...Va.draggable,...e==null?void 0:e.draggable},droppable:{...Va.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Va.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 JI(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const a=g.useRef(!1),{x:u,y:d}=typeof i=="boolean"?{x:i,y:i}:i;Rr(()=>{if(!u&&!d||!t){a.current=!1;return}if(a.current||!o)return;const h=t==null?void 0:t.node.current;if(!h||h.isConnected===!1)return;const m=n(h),x=Gw(m,o);if(u||(x.x=0),d||(x.y=0),a.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const v=Yw(h);v&&v.scrollBy({top:x.y,left:x.x})}},[t,u,d,o,n])}const s1=g.createContext({...ur,scaleX:1,scaleY:1});var bo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(bo||(bo={}));const ZI=g.memo(function(t){var n,o,i,a;let{id:u,accessibility:d,autoScroll:p=!0,children:h,sensors:m=HI,collisionDetection:x=nI,measuring:v,modifiers:b,...N}=t;const k=g.useReducer(GI,void 0,KI),[S,C]=k,[T,A]=VL(),[_,O]=g.useState(bo.Uninitialized),P=_===bo.Initialized,{draggable:{active:$,nodes:E,translate:U},droppable:{containers:ee}}=S,Y=$!=null?E.get($):null,q=g.useRef({initial:null,translated:null}),X=g.useMemo(()=>{var Me;return $!=null?{id:$,data:(Me=Y==null?void 0:Y.data)!=null?Me:WI,rect:q}:null},[$,Y]),Q=g.useRef(null),[I,D]=g.useState(null),[V,H]=g.useState(null),te=Ji(N,Object.values(N)),R=gl("DndDescribedBy",u),F=g.useMemo(()=>ee.getEnabled(),[ee]),Z=QI(v),{droppableRects:L,measureDroppableContainers:de,measuringScheduled:ge}=AI(F,{dragging:P,dependencies:[U.x,U.y],config:Z.droppable}),fe=PI(E,$),je=g.useMemo(()=>V?Mf(V):null,[V]),Se=Ot(),Ce=DI(fe,Z.draggable.measure);JI({activeNode:$!=null?E.get($):null,config:Se.layoutShiftCompensation,initialRect:Ce,measure:Z.draggable.measure});const we=Hy(fe,Z.draggable.measure,Ce),at=Hy(fe?fe.parentElement:null),Ze=g.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:ee,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Be=ee.getNodeFor((n=Ze.current.over)==null?void 0:n.id),ze=UI({measure:Z.dragOverlay.measure}),bt=(o=ze.nodeRef.current)!=null?o:fe,It=P?(i=ze.rect)!=null?i:we:null,on=!!(ze.nodeRef.current&&ze.rect),dn=OI(on?null:we),Ge=r1(bt?En(bt):null),et=_I(P?Be??fe:null),zt=zI(et),Kt=XI(b,{transform:{x:U.x-dn.x,y:U.y-dn.y,scaleX:1,scaleY:1},activatorEvent:V,active:X,activeNodeRect:we,containerNodeRect:at,draggingNodeRect:It,over:Ze.current.over,overlayNodeRect:ze.rect,scrollableAncestors:et,scrollableAncestorRects:zt,windowRect:Ge}),fn=je?As(je,U):null,Rn=MI(et),Pn=Vy(Rn),re=Vy(Rn,[we]),K=As(Kt,Pn),ae=It?sI(It,Kt):null,pe=X&&ae?x({active:X,collisionRect:ae,droppableRects:L,droppableContainers:F,pointerCoordinates:fn}):null,Ae=ZL(pe,"id"),[Ke,pn]=g.useState(null),Gt=on?Kt:As(Kt,re),Bt=rI(Gt,(a=Ke==null?void 0:Ke.rect)!=null?a:null,we),W=g.useRef(null),le=g.useCallback((Me,pt)=>{let{sensor:Nt,options:hn}=pt;if(Q.current==null)return;const Ut=E.get(Q.current);if(!Ut)return;const Xt=Me.nativeEvent,mn=new Nt({active:Q.current,activeNode:Ut,event:Xt,options:hn,context:Ze,onAbort(ut){if(!E.get(ut))return;const{onDragAbort:Qt}=te.current,Xn={id:ut};Qt==null||Qt(Xn),T({type:"onDragAbort",event:Xn})},onPending(ut,zn,Qt,Xn){if(!E.get(ut))return;const{onDragPending:fr}=te.current,Tn={id:ut,constraint:zn,initialCoordinates:Qt,offset:Xn};fr==null||fr(Tn),T({type:"onDragPending",event:Tn})},onStart(ut){const zn=Q.current;if(zn==null)return;const Qt=E.get(zn);if(!Qt)return;const{onDragStart:Xn}=te.current,Qn={activatorEvent:Xt,active:{id:zn,data:Qt.data,rect:q}};wo.unstable_batchedUpdates(()=>{Xn==null||Xn(Qn),O(bo.Initializing),C({type:Pt.DragStart,initialCoordinates:ut,active:zn}),T({type:"onDragStart",event:Qn}),D(W.current),H(Xt)})},onMove(ut){C({type:Pt.DragMove,coordinates:ut})},onEnd:Ar(Pt.DragEnd),onCancel:Ar(Pt.DragCancel)});W.current=mn;function Ar(ut){return async function(){const{active:Qt,collisions:Xn,over:Qn,scrollAdjustedTranslate:fr}=Ze.current;let Tn=null;if(Qt&&fr){const{cancelDrop:Dr}=te.current;Tn={activatorEvent:Xt,active:Qt,collisions:Xn,delta:fr,over:Qn},ut===Pt.DragEnd&&typeof Dr=="function"&&await Promise.resolve(Dr(Tn))&&(ut=Pt.DragCancel)}Q.current=null,wo.unstable_batchedUpdates(()=>{C({type:ut}),O(bo.Uninitialized),pn(null),D(null),H(null),W.current=null;const Dr=ut===Pt.DragEnd?"onDragEnd":"onDragCancel";if(Tn){const Ks=te.current[Dr];Ks==null||Ks(Tn),T({type:Dr,event:Tn})}})}}},[E]),xe=g.useCallback((Me,pt)=>(Nt,hn)=>{const Ut=Nt.nativeEvent,Xt=E.get(hn);if(Q.current!==null||!Xt||Ut.dndKit||Ut.defaultPrevented)return;const mn={active:Xt};Me(Nt,pt.options,mn)===!0&&(Ut.dndKit={capturedBy:pt.sensor},Q.current=hn,le(Nt,pt))},[E,le]),Le=TI(m,xe);$I(m),Rr(()=>{we&&_===bo.Initializing&&O(bo.Initialized)},[we,_]),g.useEffect(()=>{const{onDragMove:Me}=te.current,{active:pt,activatorEvent:Nt,collisions:hn,over:Ut}=Ze.current;if(!pt||!Nt)return;const Xt={active:pt,activatorEvent:Nt,collisions:hn,delta:{x:K.x,y:K.y},over:Ut};wo.unstable_batchedUpdates(()=>{Me==null||Me(Xt),T({type:"onDragMove",event:Xt})})},[K.x,K.y]),g.useEffect(()=>{const{active:Me,activatorEvent:pt,collisions:Nt,droppableContainers:hn,scrollAdjustedTranslate:Ut}=Ze.current;if(!Me||Q.current==null||!pt||!Ut)return;const{onDragOver:Xt}=te.current,mn=hn.get(Ae),Ar=mn&&mn.rect.current?{id:mn.id,rect:mn.rect.current,data:mn.data,disabled:mn.disabled}:null,ut={active:Me,activatorEvent:pt,collisions:Nt,delta:{x:Ut.x,y:Ut.y},over:Ar};wo.unstable_batchedUpdates(()=>{pn(Ar),Xt==null||Xt(ut),T({type:"onDragOver",event:ut})})},[Ae]),Rr(()=>{Ze.current={activatorEvent:V,active:X,activeNode:fe,collisionRect:ae,collisions:pe,droppableRects:L,draggableNodes:E,draggingNode:bt,draggingNodeRect:It,droppableContainers:ee,over:Ke,scrollableAncestors:et,scrollAdjustedTranslate:K},q.current={initial:It,translated:ae}},[X,fe,pe,ae,E,bt,It,L,ee,Ke,et,K]),NI({...Se,delta:U,draggingRect:ae,pointerCoordinates:fn,scrollableAncestors:et,scrollableAncestorRects:zt});const Fn=g.useMemo(()=>({active:X,activeNode:fe,activeNodeRect:we,activatorEvent:V,collisions:pe,containerNodeRect:at,dragOverlay:ze,draggableNodes:E,droppableContainers:ee,droppableRects:L,over:Ke,measureDroppableContainers:de,scrollableAncestors:et,scrollableAncestorRects:zt,measuringConfiguration:Z,measuringScheduled:ge,windowRect:Ge}),[X,fe,we,V,pe,at,ze,E,ee,L,Ke,de,et,zt,Z,ge,Ge]),Yt=g.useMemo(()=>({activatorEvent:V,activators:Le,active:X,activeNodeRect:we,ariaDescribedById:{draggable:R},dispatch:C,draggableNodes:E,over:Ke,measureDroppableContainers:de}),[V,Le,X,we,C,R,E,Ke,de]);return mt.createElement(Kw.Provider,{value:A},mt.createElement(Fu.Provider,{value:Yt},mt.createElement(o1.Provider,{value:Fn},mt.createElement(s1.Provider,{value:Bt},h)),mt.createElement(YI,{disabled:(d==null?void 0:d.restoreFocus)===!1})),mt.createElement(GL,{...d,hiddenTextDescribedById:R}));function Ot(){const Me=(I==null?void 0:I.autoScrollEnabled)===!1,pt=typeof p=="object"?p.enabled===!1:p===!1,Nt=P&&!Me&&!pt;return typeof p=="object"?{...p,enabled:Nt}:{enabled:Nt}}}),eO=g.createContext(null),Ky="button",tO="Draggable";function nO(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const a=gl(tO),{activators:u,activatorEvent:d,active:p,activeNodeRect:h,ariaDescribedById:m,draggableNodes:x,over:v}=g.useContext(Fu),{role:b=Ky,roleDescription:N="draggable",tabIndex:k=0}=i??{},S=(p==null?void 0:p.id)===t,C=g.useContext(S?s1:eO),[T,A]=ru(),[_,O]=ru(),P=FI(u,t),$=Ji(n);Rr(()=>(x.set(t,{id:t,key:a,node:T,activatorNode:_,data:$}),()=>{const U=x.get(t);U&&U.key===a&&x.delete(t)}),[x,t]);const E=g.useMemo(()=>({role:b,tabIndex:k,"aria-disabled":o,"aria-pressed":S&&b===Ky?!0:void 0,"aria-roledescription":N,"aria-describedby":m.draggable}),[o,b,k,S,N,m.draggable]);return{active:p,activatorEvent:d,activeNodeRect:h,attributes:E,isDragging:S,listeners:o?void 0:P,node:T,over:v,setNodeRef:A,setActivatorNodeRef:O,transform:C}}function rO(){return g.useContext(o1)}const oO="Droppable",sO={timeout:25};function iO(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const a=gl(oO),{active:u,dispatch:d,over:p,measureDroppableContainers:h}=g.useContext(Fu),m=g.useRef({disabled:n}),x=g.useRef(!1),v=g.useRef(null),b=g.useRef(null),{disabled:N,updateMeasurementsFor:k,timeout:S}={...sO,...i},C=Ji(k??o),T=g.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{h(Array.isArray(C.current)?C.current:[C.current]),b.current=null},S)},[S]),A=$u({callback:T,disabled:N||!u}),_=g.useCallback((E,U)=>{A&&(U&&(A.unobserve(U),x.current=!1),E&&A.observe(E))},[A]),[O,P]=ru(_),$=Ji(t);return g.useEffect(()=>{!A||!O.current||(A.disconnect(),x.current=!1,A.observe(O.current))},[O,A]),g.useEffect(()=>(d({type:Pt.RegisterDroppable,element:{id:o,key:a,disabled:n,node:O,rect:v,data:$}}),()=>d({type:Pt.UnregisterDroppable,key:a,id:o})),[o]),g.useEffect(()=>{n!==m.current.disabled&&(d({type:Pt.SetDroppableDisabled,id:o,key:a,disabled:n}),m.current.disabled=n)},[o,a,n,d]),{active:u,rect:v,isOver:(p==null?void 0:p.id)===o,node:O,over:p,setNodeRef:P}}function Zp(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function lO(e,t){return e.reduce((n,o,i)=>{const a=t.get(o);return a&&(n[i]=a),n},Array(e.length))}function Ia(e){return e!==null&&e>=0}function aO(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 uO(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const i1=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const a=Zp(t,o,n),u=t[i],d=a[i];return!d||!u?null:{x:d.left-u.left,y:d.top-u.top,scaleX:d.width/u.width,scaleY:d.height/u.height}},Oa={scaleX:1,scaleY:1},cO=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:a,overIndex:u}=e;const d=(t=a[n])!=null?t:o;if(!d)return null;if(i===n){const h=a[u];return h?{x:0,y:n<u?h.top+h.height-(d.top+d.height):h.top-d.top,...Oa}:null}const p=dO(a,i,n);return i>n&&i<=u?{x:0,y:-d.height-p,...Oa}:i<n&&i>=u?{x:0,y:d.height+p,...Oa}:{x:0,y:0,...Oa}};function dO(e,t,n){const o=e[t],i=e[t-1],a=e[t+1];return o?n<t?i?o.top-(i.top+i.height):a?a.top-(o.top+o.height):0:a?a.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const l1="Sortable",a1=mt.createContext({activeIndex:-1,containerId:l1,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:i1,disabled:{draggable:!1,droppable:!1}});function fO(e){let{children:t,id:n,items:o,strategy:i=i1,disabled:a=!1}=e;const{active:u,dragOverlay:d,droppableRects:p,over:h,measureDroppableContainers:m}=rO(),x=gl(l1,n),v=d.rect!==null,b=g.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),N=u!=null,k=u?b.indexOf(u.id):-1,S=h?b.indexOf(h.id):-1,C=g.useRef(b),T=!aO(b,C.current),A=S!==-1&&k===-1||T,_=uO(a);Rr(()=>{T&&N&&m(b)},[T,b,N,m]),g.useEffect(()=>{C.current=b},[b]);const O=g.useMemo(()=>({activeIndex:k,containerId:x,disabled:_,disableTransforms:A,items:b,overIndex:S,useDragOverlay:v,sortedRects:lO(b,p),strategy:i}),[k,x,_.draggable,_.droppable,A,b,S,p,v,i]);return mt.createElement(a1.Provider,{value:O},t)}const pO=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return Zp(n,o,i).indexOf(t)},hO=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:a,newIndex:u,previousItems:d,previousContainerId:p,transition:h}=e;return!h||!o||d!==a&&i===u?!1:n?!0:u!==i&&t===p},mO={duration:200,easing:"ease"},u1="transform",gO=Zi.Transition.toString({property:u1,duration:0,easing:"linear"}),xO={roleDescription:"sortable"};function yO(e){let{disabled:t,index:n,node:o,rect:i}=e;const[a,u]=g.useState(null),d=g.useRef(n);return Rr(()=>{if(!t&&n!==d.current&&o.current){const p=i.current;if(p){const h=qs(o.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)&&u(m)}}n!==d.current&&(d.current=n)},[t,n,o,i]),g.useEffect(()=>{a&&u(null)},[a]),a}function vO(e){let{animateLayoutChanges:t=hO,attributes:n,disabled:o,data:i,getNewIndex:a=pO,id:u,strategy:d,resizeObserverConfig:p,transition:h=mO}=e;const{items:m,containerId:x,activeIndex:v,disabled:b,disableTransforms:N,sortedRects:k,overIndex:S,useDragOverlay:C,strategy:T}=g.useContext(a1),A=bO(o,b),_=m.indexOf(u),O=g.useMemo(()=>({sortable:{containerId:x,index:_,items:m},...i}),[x,i,_,m]),P=g.useMemo(()=>m.slice(m.indexOf(u)),[m,u]),{rect:$,node:E,isOver:U,setNodeRef:ee}=iO({id:u,data:O,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...p}}),{active:Y,activatorEvent:q,activeNodeRect:X,attributes:Q,setNodeRef:I,listeners:D,isDragging:V,over:H,setActivatorNodeRef:te,transform:R}=nO({id:u,data:O,attributes:{...xO,...n},disabled:A.draggable}),F=OL(ee,I),Z=!!Y,L=Z&&!N&&Ia(v)&&Ia(S),de=!C&&V,ge=de&&L?R:null,je=L?ge??(d??T)({rects:k,activeNodeRect:X,activeIndex:v,overIndex:S,index:_}):null,Se=Ia(v)&&Ia(S)?a({id:u,items:m,activeIndex:v,overIndex:S}):_,Ce=Y==null?void 0:Y.id,we=g.useRef({activeId:Ce,items:m,newIndex:Se,containerId:x}),at=m!==we.current.items,Ze=t({active:Y,containerId:x,isDragging:V,isSorting:Z,id:u,index:_,items:m,newIndex:we.current.newIndex,previousItems:we.current.items,previousContainerId:we.current.containerId,transition:h,wasDragging:we.current.activeId!=null}),Be=yO({disabled:!Ze,index:_,node:E,rect:$});return g.useEffect(()=>{Z&&we.current.newIndex!==Se&&(we.current.newIndex=Se),x!==we.current.containerId&&(we.current.containerId=x),m!==we.current.items&&(we.current.items=m)},[Z,Se,x,m]),g.useEffect(()=>{if(Ce===we.current.activeId)return;if(Ce!=null&&we.current.activeId==null){we.current.activeId=Ce;return}const bt=setTimeout(()=>{we.current.activeId=Ce},50);return()=>clearTimeout(bt)},[Ce]),{active:Y,activeIndex:v,attributes:Q,data:O,rect:$,index:_,newIndex:Se,items:m,isOver:U,isSorting:Z,isDragging:V,listeners:D,node:E,overIndex:S,over:H,setNodeRef:F,setActivatorNodeRef:te,setDroppableNodeRef:ee,setDraggableNodeRef:I,transform:Be??je,transition:ze()};function ze(){if(Be||at&&we.current.newIndex===_)return gO;if(!(de&&!Kp(q)||!h)&&(Z||Ze))return Zi.Transition.toString({...h,property:u1})}}function bO(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(o=e==null?void 0:e.droppable)!=null?o:t.droppable}}We.Down,We.Right,We.Up,We.Left;function wO({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,disabled:a,hotkeyRowProps:u}){const{attributes:d,listeners:p,setNodeRef:h,setActivatorNodeRef:m,transform:x,transition:v,isDragging:b}=vO({id:e.id,disabled:a}),N={transform:Zi.Transform.toString(x),transition:v,zIndex:b?50:void 0,position:b?"relative":void 0};return l.jsxs("div",{ref:h,style:N,"data-todo-id":e.id,...u??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${b?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!a&&l.jsx("button",{ref:m,...d,...p,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:k=>k.stopPropagation(),children:l.jsx(uC,{className:"h-4 w-4"})}),l.jsx(Ww,{status:e.status,onChange:k=>o(e.id,k)}),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(k=>`#${k}`).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(Gf,{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:k=>i(k,e.id),children:["t:",e.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:k=>i(k,e.id),children:l.jsx(Yf,{className:"h-3 w-3"})})]})]})}function kO(){const{workspace:e}=Dt(),t=e||"_global",{data:n,loading:o,error:i,refetch:a}=kN(t),[u,d]=g.useState(""),[p,h]=g.useState(""),[m,x]=g.useState(""),[v,b]=g.useState(""),[N,k]=g.useState(null),S=g.useRef(null);Fs("list:todos");const C=!!(u.trim()||p||m),T=YL(_y(Jp,{activationConstraint:{distance:8}}),_y(Xp));function A(D,V){D.stopPropagation(),navigator.clipboard.writeText(V),k(V),setTimeout(()=>k(H=>H===V?null:H),1500)}const _=g.useMemo(()=>{if(!(n!=null&&n.items))return[];const D=new Set;for(const V of n.items)for(const H of V.tags)D.add(H);return Array.from(D).sort()},[n]),O=g.useMemo(()=>{if(!(n!=null&&n.items))return[];let D=n.items;if(u.trim()){const V=u.toLowerCase();D=D.filter(H=>H.description.toLowerCase().includes(V)||H.tags.some(te=>te.toLowerCase().includes(V))||H.id.includes(V))}return p&&(D=D.filter(V=>V.status===p)),m&&(D=D.filter(V=>V.tags.includes(m))),D},[n,u,p,m]);async function P(){v.trim()&&(await Vv(t,v.trim()),b(""),a())}const $={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function E(D,V){U(D,$[V]||"open")}async function U(D,V){switch(V){case"open":await Yv(t,D);break;case"in_progress":await Gv(t,D);break;case"completed":await qv(t,D);break;case"blocked":await Kv(t,D);break}a()}const{hotkeyRowProps:ee}=yu(O,{scope:"list:todos",bindO:!1,onOpen:D=>E(D.id,D.status)});gt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var D;return(D=S.current)==null?void 0:D.focus()}}),gt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>a()});const[Y,q]=ol(),X=Y.get("focus");g.useEffect(()=>{if(!X)return;const D=document.querySelector(`[data-todo-id="${window.CSS.escape(X)}"]`);if(!D)return;D.scrollIntoView({block:"nearest"}),D.classList.add("ring-2","ring-primary/60");const V=window.setTimeout(()=>{D.classList.remove("ring-2","ring-primary/60"),q(H=>{const te=new URLSearchParams(H);return te.delete("focus"),te})},1500);return()=>window.clearTimeout(V)},[X,O.length,q]);async function Q(D){const{active:V,over:H}=D;if(!H||V.id===H.id||!(n!=null&&n.items))return;const te=n.items.findIndex(Z=>Z.id===V.id),R=n.items.findIndex(Z=>Z.id===H.id);if(te===-1||R===-1)return;const F=Zp(n.items,te,R);await SN(t,F.map(Z=>Z.id)),a()}if(o)return l.jsx(jt,{label:"Loading todos..."});if(i)return l.jsx(Ct,{error:i});const I=(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(ot,{label:"Open",value:I.open,icon:jr}),l.jsx(ot,{label:"In Progress",value:I.in_progress,icon:jr,tone:"info"}),l.jsx(ot,{label:"Blocked",value:I.blocked,icon:il,tone:"warn"}),l.jsx(ot,{label:"Total",value:I.total,icon:jr})]}),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:v,onChange:D=>b(D.target.value),onKeyDown:D=>D.key==="Enter"&&P(),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:P,disabled:!v.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(ir,{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(sl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{ref:S,type:"text",placeholder:"Search...",value:u,onChange:D=>d(D.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:D=>h(D.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"})]}),_.length>0&&l.jsxs("select",{value:m,onChange:D=>x(D.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"}),_.map(D=>l.jsxs("option",{value:D,children:["#",D]},D))]})]}),O.length===0?l.jsx(vt,{title:"No todos",description:"Add your first todo above."}):l.jsx(ZI,{sensors:T,collisionDetection:eI,onDragEnd:Q,children:l.jsx(fO,{items:O.map(D=>D.id),strategy:cO,children:l.jsx("div",{className:"space-y-1",children:O.map((D,V)=>l.jsx(wO,{item:D,copiedId:N,onCycleStatus:E,onStatusChange:U,onCopyId:A,disabled:C,hotkeyRowProps:ee(V)},D.id))})})})]})}function SO(){return l.jsx(Oj,{children:l.jsx(CE,{children:l.jsx(cj,{children:l.jsxs(_e,{element:l.jsx(AE,{}),children:[l.jsx(_e,{path:"/",element:l.jsx(IE,{})}),l.jsx(_e,{path:"/projects",element:l.jsx(xx,{})}),l.jsx(_e,{path:"/assignments",element:l.jsx(wy,{})}),l.jsx(_e,{path:"/attention",element:l.jsx(OE,{})}),l.jsx(_e,{path:"/servers",element:l.jsx(Ay,{})}),l.jsx(_e,{path:"/agent-sessions",element:l.jsx(Dy,{})}),l.jsx(_e,{path:"/playbooks",element:l.jsx(NL,{})}),l.jsx(_e,{path:"/playbooks/create",element:l.jsx(RL,{})}),l.jsx(_e,{path:"/playbooks/:slug",element:l.jsx(EL,{})}),l.jsx(_e,{path:"/playbooks/:slug/edit",element:l.jsx(PL,{})}),l.jsx(_e,{path:"/todos",element:l.jsx(IL,{})}),l.jsx(_e,{path:"/help",element:l.jsx(ME,{})}),l.jsx(_e,{path:"/settings",element:l.jsx(LL,{})}),l.jsx(_e,{path:"/create/project",element:l.jsx(Sy,{})}),l.jsx(_e,{path:"/projects/:slug",element:l.jsx(sy,{})}),l.jsx(_e,{path:"/projects/:slug/edit",element:l.jsx(Cy,{})}),l.jsx(_e,{path:"/projects/:slug/create/assignment",element:l.jsx(jy,{})}),l.jsx(_e,{path:"/projects/:slug/assignments/:aslug",element:l.jsx(xy,{})}),l.jsx(_e,{path:"/projects/:slug/assignments/:aslug/edit",element:l.jsx(Ny,{})}),l.jsx(_e,{path:"/projects/:slug/assignments/:aslug/plan/edit",element:l.jsx(Ey,{})}),l.jsx(_e,{path:"/projects/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(Ry,{})}),l.jsx(_e,{path:"/projects/:slug/assignments/:aslug/handoff/edit",element:l.jsx(Py,{})}),l.jsx(_e,{path:"/projects/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(Ty,{})}),l.jsx(_e,{path:"/w/:workspace/projects",element:l.jsx(xx,{})}),l.jsx(_e,{path:"/w/:workspace/assignments",element:l.jsx(wy,{})}),l.jsx(_e,{path:"/w/:workspace/servers",element:l.jsx(Ay,{})}),l.jsx(_e,{path:"/w/:workspace/agent-sessions",element:l.jsx(Dy,{})}),l.jsx(_e,{path:"/w/:workspace/todos",element:l.jsx(kO,{})}),l.jsx(_e,{path:"/w/:workspace/create/project",element:l.jsx(Sy,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug",element:l.jsx(sy,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug/edit",element:l.jsx(Cy,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug/create/assignment",element:l.jsx(jy,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug/assignments/:aslug",element:l.jsx(xy,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug/assignments/:aslug/edit",element:l.jsx(Ny,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug/assignments/:aslug/plan/edit",element:l.jsx(Ey,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(Ry,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug/assignments/:aslug/handoff/edit",element:l.jsx(Py,{})}),l.jsx(_e,{path:"/w/:workspace/projects/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(Ty,{})})]})})})})}fN();cS.createRoot(document.getElementById("root")).render(l.jsx(g.StrictMode,{children:l.jsx(pN,{children:l.jsx(SO,{})})}));export{jR as _,jO as a,lu as g};