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
@@ -0,0 +1,481 @@
1
+ function oj(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 c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function lc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function DO(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:{}},Ri={},wd={exports:{}},ze={};/**
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 $g;function sj(){if($g)return ze;$g=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"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),x=Symbol.iterator;function 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 j(F,J,I){this.props=F,this.context=J,this.refs=k,this.updater=I||b}j.prototype.isReactComponent={},j.prototype.setState=function(F,J){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,J,"setState")},j.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function S(){}S.prototype=j.prototype;function T(F,J,I){this.props=F,this.context=J,this.refs=k,this.updater=I||b}var A=T.prototype=new S;A.constructor=T,N(A,j.prototype),A.isPureReactComponent=!0;var L=Array.isArray,O=Object.prototype.hasOwnProperty,P={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function E(F,J,I){var de,ve={},fe=null,Ee=null;if(J!=null)for(de in J.ref!==void 0&&(Ee=J.ref),J.key!==void 0&&(fe=""+J.key),J)O.call(J,de)&&!$.hasOwnProperty(de)&&(ve[de]=J[de]);var Ne=arguments.length-2;if(Ne===1)ve.children=I;else if(1<Ne){for(var Re=Array(Ne),je=0;je<Ne;je++)Re[je]=arguments[je+2];ve.children=Re}if(F&&F.defaultProps)for(de in Ne=F.defaultProps,Ne)ve[de]===void 0&&(ve[de]=Ne[de]);return{$$typeof:e,type:F,key:fe,ref:Ee,props:ve,_owner:P.current}}function H(F,J){return{$$typeof:e,type:F.type,key:J,ref:F.ref,props:F.props,_owner:F._owner}}function Z(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function G(F){var J={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(I){return J[I]})}var q=/\/+/g;function Y(F,J){return typeof F=="object"&&F!==null&&F.key!=null?G(""+F.key):J.toString(36)}function X(F,J,I,de,ve){var fe=typeof F;(fe==="undefined"||fe==="boolean")&&(F=null);var Ee=!1;if(F===null)Ee=!0;else switch(fe){case"string":case"number":Ee=!0;break;case"object":switch(F.$$typeof){case e:case t:Ee=!0}}if(Ee)return Ee=F,ve=ve(Ee),F=de===""?"."+Y(Ee,0):de,L(ve)?(I="",F!=null&&(I=F.replace(q,"$&/")+"/"),X(ve,J,I,"",function(je){return je})):ve!=null&&(Z(ve)&&(ve=H(ve,I+(!ve.key||Ee&&Ee.key===ve.key?"":(""+ve.key).replace(q,"$&/")+"/")+F)),J.push(ve)),1;if(Ee=0,de=de===""?".":de+":",L(F))for(var Ne=0;Ne<F.length;Ne++){fe=F[Ne];var Re=de+Y(fe,Ne);Ee+=X(fe,J,I,Re,ve)}else if(Re=v(F),typeof Re=="function")for(F=Re.call(F),Ne=0;!(fe=F.next()).done;)fe=fe.value,Re=de+Y(fe,Ne++),Ee+=X(fe,J,I,Re,ve);else if(fe==="object")throw J=String(F),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Ee}function _(F,J,I){if(F==null)return F;var de=[],ve=0;return X(F,de,"","",function(fe){return J.call(I,fe,ve++)}),de}function D(F){if(F._status===-1){var J=F._result;J=J(),J.then(function(I){(F._status===0||F._status===-1)&&(F._status=1,F._result=I)},function(I){(F._status===0||F._status===-1)&&(F._status=2,F._result=I)}),F._status===-1&&(F._status=0,F._result=J)}if(F._status===1)return F._result.default;throw F._result}var V={current:null},W={transition:null},ee={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:W,ReactCurrentOwner:P};function R(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:_,forEach:function(F,J,I){_(F,function(){J.apply(this,arguments)},I)},count:function(F){var J=0;return _(F,function(){J++}),J},toArray:function(F){return _(F,function(J){return J})||[]},only:function(F){if(!Z(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},ze.Component=j,ze.Fragment=n,ze.Profiler=i,ze.PureComponent=T,ze.StrictMode=o,ze.Suspense=p,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,ze.act=R,ze.cloneElement=function(F,J,I){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var de=N({},F.props),ve=F.key,fe=F.ref,Ee=F._owner;if(J!=null){if(J.ref!==void 0&&(fe=J.ref,Ee=P.current),J.key!==void 0&&(ve=""+J.key),F.type&&F.type.defaultProps)var Ne=F.type.defaultProps;for(Re in J)O.call(J,Re)&&!$.hasOwnProperty(Re)&&(de[Re]=J[Re]===void 0&&Ne!==void 0?Ne[Re]:J[Re])}var Re=arguments.length-2;if(Re===1)de.children=I;else if(1<Re){Ne=Array(Re);for(var je=0;je<Re;je++)Ne[je]=arguments[je+2];de.children=Ne}return{$$typeof:e,type:F.type,key:ve,ref:fe,props:de,_owner:Ee}},ze.createContext=function(F){return F={$$typeof:c,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},ze.createElement=E,ze.createFactory=function(F){var J=E.bind(null,F);return J.type=F,J},ze.createRef=function(){return{current:null}},ze.forwardRef=function(F){return{$$typeof:d,render:F}},ze.isValidElement=Z,ze.lazy=function(F){return{$$typeof:m,_payload:{_status:-1,_result:F},_init:D}},ze.memo=function(F,J){return{$$typeof:h,type:F,compare:J===void 0?null:J}},ze.startTransition=function(F){var J=W.transition;W.transition={};try{F()}finally{W.transition=J}},ze.unstable_act=R,ze.useCallback=function(F,J){return V.current.useCallback(F,J)},ze.useContext=function(F){return V.current.useContext(F)},ze.useDebugValue=function(){},ze.useDeferredValue=function(F){return V.current.useDeferredValue(F)},ze.useEffect=function(F,J){return V.current.useEffect(F,J)},ze.useId=function(){return V.current.useId()},ze.useImperativeHandle=function(F,J,I){return V.current.useImperativeHandle(F,J,I)},ze.useInsertionEffect=function(F,J){return V.current.useInsertionEffect(F,J)},ze.useLayoutEffect=function(F,J){return V.current.useLayoutEffect(F,J)},ze.useMemo=function(F,J){return V.current.useMemo(F,J)},ze.useReducer=function(F,J,I){return V.current.useReducer(F,J,I)},ze.useRef=function(F){return V.current.useRef(F)},ze.useState=function(F){return V.current.useState(F)},ze.useSyncExternalStore=function(F,J,I){return V.current.useSyncExternalStore(F,J,I)},ze.useTransition=function(){return V.current.useTransition()},ze.version="18.3.1",ze}var Fg;function qf(){return Fg||(Fg=1,wd.exports=sj()),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 zg;function ij(){if(zg)return Ri;zg=1;var e=qf(),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 c(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 Ri.Fragment=n,Ri.jsx=c,Ri.jsxs=c,Ri}var Bg;function lj(){return Bg||(Bg=1,bd.exports=ij()),bd.exports}var l=lj(),g=qf();const xt=lc(g),Xy=oj({__proto__:null,default:xt},[g]);var ka={},kd={exports:{}},kn={},jd={exports:{}},Sd={};/**
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 Ug;function aj(){return Ug||(Ug=1,(function(e){function t(W,ee){var R=W.length;W.push(ee);e:for(;0<R;){var F=R-1>>>1,J=W[F];if(0<i(J,ee))W[F]=ee,W[R]=J,R=F;else break e}}function n(W){return W.length===0?null:W[0]}function o(W){if(W.length===0)return null;var ee=W[0],R=W.pop();if(R!==ee){W[0]=R;e:for(var F=0,J=W.length,I=J>>>1;F<I;){var de=2*(F+1)-1,ve=W[de],fe=de+1,Ee=W[fe];if(0>i(ve,R))fe<J&&0>i(Ee,ve)?(W[F]=Ee,W[fe]=R,F=fe):(W[F]=ve,W[de]=R,F=de);else if(fe<J&&0>i(Ee,R))W[F]=Ee,W[fe]=R,F=fe;else break e}}return ee}function i(W,ee){var R=W.sortIndex-ee.sortIndex;return R!==0?R:W.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],h=[],m=1,x=null,v=3,b=!1,N=!1,k=!1,j=typeof setTimeout=="function"?setTimeout:null,S=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(W){for(var ee=n(h);ee!==null;){if(ee.callback===null)o(h);else if(ee.startTime<=W)o(h),ee.sortIndex=ee.expirationTime,t(p,ee);else break;ee=n(h)}}function L(W){if(k=!1,A(W),!N)if(n(p)!==null)N=!0,D(O);else{var ee=n(h);ee!==null&&V(L,ee.startTime-W)}}function O(W,ee){N=!1,k&&(k=!1,S(E),E=-1),b=!0;var R=v;try{for(A(ee),x=n(p);x!==null&&(!(x.expirationTime>ee)||W&&!G());){var F=x.callback;if(typeof F=="function"){x.callback=null,v=x.priorityLevel;var J=F(x.expirationTime<=ee);ee=e.unstable_now(),typeof J=="function"?x.callback=J:x===n(p)&&o(p),A(ee)}else o(p);x=n(p)}if(x!==null)var I=!0;else{var de=n(h);de!==null&&V(L,de.startTime-ee),I=!1}return I}finally{x=null,v=R,b=!1}}var P=!1,$=null,E=-1,H=5,Z=-1;function G(){return!(e.unstable_now()-Z<H)}function q(){if($!==null){var W=e.unstable_now();Z=W;var ee=!0;try{ee=$(!0,W)}finally{ee?Y():(P=!1,$=null)}}else P=!1}var Y;if(typeof T=="function")Y=function(){T(q)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,_=X.port2;X.port1.onmessage=q,Y=function(){_.postMessage(null)}}else Y=function(){j(q,0)};function D(W){$=W,P||(P=!0,Y())}function V(W,ee){E=j(function(){W(e.unstable_now())},ee)}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(W){W.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,D(O))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function(W){switch(v){case 1:case 2:case 3:var ee=3;break;default:ee=v}var R=v;v=ee;try{return W()}finally{v=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,ee){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var R=v;v=W;try{return ee()}finally{v=R}},e.unstable_scheduleCallback=function(W,ee,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,W){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=R+J,W={id:m++,callback:ee,priorityLevel:W,startTime:R,expirationTime:J,sortIndex:-1},R>F?(W.sortIndex=R,t(h,W),n(p)===null&&W===n(h)&&(k?(S(E),E=-1):k=!0,V(L,R-F))):(W.sortIndex=J,t(p,W),N||b||(N=!0,D(O))),W},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(W){var ee=v;return function(){var R=v;v=ee;try{return W.apply(this,arguments)}finally{v=R}}}})(Sd)),Sd}var Hg;function cj(){return Hg||(Hg=1,jd.exports=aj()),jd.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 Wg;function uj(){if(Wg)return kn;Wg=1;var e=qf(),t=cj();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);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){c(r,s),c(r+"Capture",s)}function c(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,u,f){if(u!==null&&u.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function N(r,s,u,f){if(s===null||typeof s>"u"||b(r,s,u,f))return!0;if(f)return!1;if(u!==null)switch(u.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,u,f,y,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=y,this.mustUseProperty=u,this.propertyName=r,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){j[r]=new k(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];j[s]=new k(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){j[r]=new k(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){j[r]=new k(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){j[r]=new k(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){j[r]=new k(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){j[r]=new k(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){j[r]=new k(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){j[r]=new k(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function 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(S,T);j[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(S,T);j[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(S,T);j[s]=new k(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!1,!1)}),j.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,s,u,f){var y=j.hasOwnProperty(s)?j[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,u,y,f)&&(u=null),f||y===null?v(s)&&(u===null?r.removeAttribute(s):r.setAttribute(s,""+u)):y.mustUseProperty?r[y.propertyName]=u===null?y.type===3?!1:"":u:(s=y.attributeName,f=y.attributeNamespace,u===null?r.removeAttribute(s):(y=y.type,u=y===3||y===4&&u===!0?"":""+u,f?r.setAttributeNS(f,s,u):r.setAttribute(s,u))))}var L=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"),H=Symbol.for("react.profiler"),Z=Symbol.for("react.provider"),G=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),W=Symbol.iterator;function ee(r){return r===null||typeof r!="object"?null:(r=W&&r[W]||r["@@iterator"],typeof r=="function"?r:null)}var R=Object.assign,F;function J(r){if(F===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);F=s&&s[1]||""}return`
34
+ `+F+r}var I=!1;function de(r,s){if(!r||I)return"";I=!0;var u=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(te){var f=te}Reflect.construct(r,[],s)}else{try{s.call()}catch(te){f=te}r.call(s.prototype)}else{try{throw Error()}catch(te){f=te}r()}}catch(te){if(te&&f&&typeof te.stack=="string"){for(var y=te.stack.split(`
35
+ `),w=f.stack.split(`
36
+ `),C=y.length-1,M=w.length-1;1<=C&&0<=M&&y[C]!==w[M];)M--;for(;1<=C&&0<=M;C--,M--)if(y[C]!==w[M]){if(C!==1||M!==1)do if(C--,M--,0>M||y[C]!==w[M]){var z=`
37
+ `+y[C].replace(" at new "," at ");return r.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",r.displayName)),z}while(1<=C&&0<=M);break}}}finally{I=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?J(r):""}function ve(r){switch(r.tag){case 5:return J(r.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("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 H:return"Profiler";case E:return"StrictMode";case Y:return"Suspense";case X:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case G:return(r.displayName||"Context")+".Consumer";case Z: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 _: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 Ee(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 Ne(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Re(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function je(r){var s=Re(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),f=""+r[s];if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,w=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return y.call(this)},set:function(C){f=""+C,w.call(this,C)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(C){f=""+C},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function ut(r){r._valueTracker||(r._valueTracker=je(r))}function tt(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return r&&(f=Re(r)?r.checked?"true":"false":r.value),r=f,r!==u?(s.setValue(r),!0):!1}function Ue(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 Be(r,s){var u=s.checked;return R({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function St(r,s){var u=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;u=Ne(s.value!=null?s.value:u),r._wrapperState={initialChecked:f,initialValue:u,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Ot(r,s){s=s.checked,s!=null&&A(r,"checked",s,!1)}function cn(r,s){Ot(r,s);var u=Ne(s.value),f=s.type;if(u!=null)f==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Xe(r,s.type,u):s.hasOwnProperty("defaultValue")&&Xe(r,s.type,Ne(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function hn(r,s,u){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,u||s===r.value||(r.value=s),r.defaultValue=s}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Xe(r,s,u){(s!=="number"||Ue(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var nt=Array.isArray;function Wt(r,s,u,f){if(r=r.options,s){s={};for(var y=0;y<u.length;y++)s["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=s.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&f&&(r[u].defaultSelected=!0)}else{for(u=""+Ne(u),s=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,f&&(r[y].defaultSelected=!0);return}s!==null||r[y].disabled||(s=r[y])}s!==null&&(s.selected=!0)}}function Qt(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return R({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function mn(r,s){var u=s.value;if(u==null){if(u=s.children,s=s.defaultValue,u!=null){if(s!=null)throw Error(n(92));if(nt(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}r._wrapperState={initialValue:Ne(u)}}function Pn(r,s){var u=Ne(s.value),f=Ne(s.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),s.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),f!=null&&(r.defaultValue=""+f)}function Tn(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 le(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 pe,ne=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,f,y){MSApp.execUnsafeLocalFunction(function(){return r(s,u,f,y)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(pe=pe||document.createElement("div"),pe.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=pe.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function me(r,s){if(s){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.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},_t=["Webkit","ms","Moz","O"];Object.keys(ke).forEach(function(r){_t.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),ke[s]=ke[r]})});function Jt(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||ke.hasOwnProperty(r)&&ke[r]?(""+s).trim():s+"px"}function Vt(r,s){r=r.style;for(var u in s)if(s.hasOwnProperty(u)){var f=u.indexOf("--")===0,y=Jt(u,s[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,y):r[u]=y}}var U=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 ae(r,s){if(s){if(U[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 ge(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 Oe=null;function zn(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Zt=null,dt=null,Fe=null;function Ye(r){if(r=pi(r)){if(typeof Zt!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Ml(s),Zt(r.stateNode,r.type,s))}}function bt(r){dt?Fe?Fe.push(r):Fe=[r]:dt=r}function Mt(){if(dt){var r=dt,s=Fe;if(Fe=dt=null,Ye(r),s)for(r=0;r<s.length;r++)Ye(s[r])}}function qt(r,s){return r(s)}function en(){}var gn=!1;function Ar(r,s,u){if(gn)return r(s,u);gn=!0;try{return qt(r,s,u)}finally{gn=!1,(dt!==null||Fe!==null)&&(en(),Mt())}}function ft(r,s){var u=r.stateNode;if(u===null)return null;var f=Ml(u);if(f===null)return null;u=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(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var Bn=!1;if(d)try{var tn={};Object.defineProperty(tn,"passive",{get:function(){Bn=!0}}),window.addEventListener("test",tn,tn),window.removeEventListener("test",tn,tn)}catch{Bn=!1}function Qn(r,s,u,f,y,w,C,M,z){var te=Array.prototype.slice.call(arguments,3);try{s.apply(u,te)}catch(se){this.onError(se)}}var Jn=!1,pr=null,An=!1,Dr=null,Gs={onError:function(r){Jn=!0,pr=r}};function f1(r,s,u,f,y,w,C,M,z){Jn=!1,pr=null,Qn.apply(Gs,arguments)}function p1(r,s,u,f,y,w,C,M,z){if(f1.apply(this,arguments),Jn){if(Jn){var te=pr;Jn=!1,pr=null}else throw Error(n(198));An||(An=!0,Dr=te)}}function Eo(r){var s=r,u=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(u=s.return),r=s.return;while(r)}return s.tag===3?u:null}function lh(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 ah(r){if(Eo(r)!==r)throw Error(n(188))}function h1(r){var s=r.alternate;if(!s){if(s=Eo(r),s===null)throw Error(n(188));return s!==r?null:r}for(var u=r,f=s;;){var y=u.return;if(y===null)break;var w=y.alternate;if(w===null){if(f=y.return,f!==null){u=f;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===u)return ah(y),r;if(w===f)return ah(y),s;w=w.sibling}throw Error(n(188))}if(u.return!==f.return)u=y,f=w;else{for(var C=!1,M=y.child;M;){if(M===u){C=!0,u=y,f=w;break}if(M===f){C=!0,f=y,u=w;break}M=M.sibling}if(!C){for(M=w.child;M;){if(M===u){C=!0,u=w,f=y;break}if(M===f){C=!0,f=w,u=y;break}M=M.sibling}if(!C)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:s}function ch(r){return r=h1(r),r!==null?uh(r):null}function uh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=uh(r);if(s!==null)return s;r=r.sibling}return null}var dh=t.unstable_scheduleCallback,fh=t.unstable_cancelCallback,m1=t.unstable_shouldYield,g1=t.unstable_requestPaint,wt=t.unstable_now,x1=t.unstable_getCurrentPriorityLevel,zc=t.unstable_ImmediatePriority,ph=t.unstable_UserBlockingPriority,xl=t.unstable_NormalPriority,y1=t.unstable_LowPriority,hh=t.unstable_IdlePriority,yl=null,hr=null;function v1(r){if(hr&&typeof hr.onCommitFiberRoot=="function")try{hr.onCommitFiberRoot(yl,r,void 0,(r.current.flags&128)===128)}catch{}}var Zn=Math.clz32?Math.clz32:k1,b1=Math.log,w1=Math.LN2;function k1(r){return r>>>=0,r===0?32:31-(b1(r)/w1|0)|0}var vl=64,bl=4194304;function Ys(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 u=r.pendingLanes;if(u===0)return 0;var f=0,y=r.suspendedLanes,w=r.pingedLanes,C=u&268435455;if(C!==0){var M=C&~y;M!==0?f=Ys(M):(w&=C,w!==0&&(f=Ys(w)))}else C=u&~y,C!==0?f=Ys(C):w!==0&&(f=Ys(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|=u&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=f;0<s;)u=31-Zn(s),y=1<<u,f|=r[u],s&=~y;return f}function j1(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 S1(r,s){for(var u=r.suspendedLanes,f=r.pingedLanes,y=r.expirationTimes,w=r.pendingLanes;0<w;){var C=31-Zn(w),M=1<<C,z=y[C];z===-1?((M&u)===0||(M&f)!==0)&&(y[C]=j1(M,s)):z<=s&&(r.expiredLanes|=M),w&=~M}}function Bc(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function mh(){var r=vl;return vl<<=1,(vl&4194240)===0&&(vl=64),r}function Uc(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function Xs(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-Zn(s),r[s]=u}function C1(r,s){var u=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<u;){var y=31-Zn(u),w=1<<y;s[y]=0,f[y]=-1,r[y]=-1,u&=~w}}function Hc(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var f=31-Zn(u),y=1<<f;y&s|r[f]&s&&(r[f]|=s),u&=~y}}var Ke=0;function gh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var xh,Wc,yh,vh,bh,Vc=!1,kl=[],Xr=null,Qr=null,Jr=null,Qs=new Map,Js=new Map,Zr=[],N1="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 wh(r,s){switch(r){case"focusin":case"focusout":Xr=null;break;case"dragenter":case"dragleave":Qr=null;break;case"mouseover":case"mouseout":Jr=null;break;case"pointerover":case"pointerout":Qs.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(s.pointerId)}}function Zs(r,s,u,f,y,w){return r===null||r.nativeEvent!==w?(r={blockedOn:s,domEventName:u,eventSystemFlags:f,nativeEvent:w,targetContainers:[y]},s!==null&&(s=pi(s),s!==null&&Wc(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function E1(r,s,u,f,y){switch(s){case"focusin":return Xr=Zs(Xr,r,s,u,f,y),!0;case"dragenter":return Qr=Zs(Qr,r,s,u,f,y),!0;case"mouseover":return Jr=Zs(Jr,r,s,u,f,y),!0;case"pointerover":var w=y.pointerId;return Qs.set(w,Zs(Qs.get(w)||null,r,s,u,f,y)),!0;case"gotpointercapture":return w=y.pointerId,Js.set(w,Zs(Js.get(w)||null,r,s,u,f,y)),!0}return!1}function kh(r){var s=Ro(r.target);if(s!==null){var u=Eo(s);if(u!==null){if(s=u.tag,s===13){if(s=lh(u),s!==null){r.blockedOn=s,bh(r.priority,function(){yh(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function jl(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=Kc(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);Oe=f,u.target.dispatchEvent(f),Oe=null}else return s=pi(u),s!==null&&Wc(s),r.blockedOn=u,!1;s.shift()}return!0}function jh(r,s,u){jl(r)&&u.delete(s)}function R1(){Vc=!1,Xr!==null&&jl(Xr)&&(Xr=null),Qr!==null&&jl(Qr)&&(Qr=null),Jr!==null&&jl(Jr)&&(Jr=null),Qs.forEach(jh),Js.forEach(jh)}function ei(r,s){r.blockedOn===s&&(r.blockedOn=null,Vc||(Vc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,R1)))}function ti(r){function s(y){return ei(y,r)}if(0<kl.length){ei(kl[0],r);for(var u=1;u<kl.length;u++){var f=kl[u];f.blockedOn===r&&(f.blockedOn=null)}}for(Xr!==null&&ei(Xr,r),Qr!==null&&ei(Qr,r),Jr!==null&&ei(Jr,r),Qs.forEach(s),Js.forEach(s),u=0;u<Zr.length;u++)f=Zr[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<Zr.length&&(u=Zr[0],u.blockedOn===null);)kh(u),u.blockedOn===null&&Zr.shift()}var Go=L.ReactCurrentBatchConfig,Sl=!0;function P1(r,s,u,f){var y=Ke,w=Go.transition;Go.transition=null;try{Ke=1,qc(r,s,u,f)}finally{Ke=y,Go.transition=w}}function T1(r,s,u,f){var y=Ke,w=Go.transition;Go.transition=null;try{Ke=4,qc(r,s,u,f)}finally{Ke=y,Go.transition=w}}function qc(r,s,u,f){if(Sl){var y=Kc(r,s,u,f);if(y===null)uu(r,s,f,Cl,u),wh(r,f);else if(E1(y,r,s,u,f))f.stopPropagation();else if(wh(r,f),s&4&&-1<N1.indexOf(r)){for(;y!==null;){var w=pi(y);if(w!==null&&xh(w),w=Kc(r,s,u,f),w===null&&uu(r,s,f,Cl,u),w===y)break;y=w}y!==null&&f.stopPropagation()}else uu(r,s,f,null,u)}}var Cl=null;function Kc(r,s,u,f){if(Cl=null,r=zn(f),r=Ro(r),r!==null)if(s=Eo(r),s===null)r=null;else if(u=s.tag,u===13){if(r=lh(s),r!==null)return r;r=null}else if(u===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 Sh(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(x1()){case zc:return 1;case ph:return 4;case xl:case y1:return 16;case hh:return 536870912;default:return 16}default:return 16}}var eo=null,Gc=null,Nl=null;function Ch(){if(Nl)return Nl;var r,s=Gc,u=s.length,f,y="value"in eo?eo.value:eo.textContent,w=y.length;for(r=0;r<u&&s[r]===y[r];r++);var C=u-r;for(f=1;f<=C&&s[u-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 Nh(){return!1}function Dn(r){function s(u,f,y,w,C){this._reactName=u,this._targetInst=y,this.type=f,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(u=r[M],this[M]=u?u(w):w[M]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Rl:Nh,this.isPropagationStopped=Nh,this}return R(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Rl)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.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},Yc=Dn(Yo),ni=R({},Yo,{view:0,detail:0}),A1=Dn(ni),Xc,Qc,ri,Pl=R({},ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zc,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!==ri&&(ri&&r.type==="mousemove"?(Xc=r.screenX-ri.screenX,Qc=r.screenY-ri.screenY):Qc=Xc=0,ri=r),Xc)},movementY:function(r){return"movementY"in r?r.movementY:Qc}}),Eh=Dn(Pl),D1=R({},Pl,{dataTransfer:0}),I1=Dn(D1),L1=R({},ni,{relatedTarget:0}),Jc=Dn(L1),O1=R({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),_1=Dn(O1),M1=R({},Yo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),$1=Dn(M1),F1=R({},Yo,{data:0}),Rh=Dn(F1),z1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},B1={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"},U1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function H1(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=U1[r])?!!s[r]:!1}function Zc(){return H1}var W1=R({},ni,{key:function(r){if(r.key){var s=z1[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"?B1[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zc,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}}),V1=Dn(W1),q1=R({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=Dn(q1),K1=R({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zc}),G1=Dn(K1),Y1=R({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),X1=Dn(Y1),Q1=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}),J1=Dn(Q1),Z1=[9,13,27,32],eu=d&&"CompositionEvent"in window,oi=null;d&&"documentMode"in document&&(oi=document.documentMode);var ek=d&&"TextEvent"in window&&!oi,Th=d&&(!eu||oi&&8<oi&&11>=oi),Ah=" ",Dh=!1;function Ih(r,s){switch(r){case"keyup":return Z1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Xo=!1;function tk(r,s){switch(r){case"compositionend":return Lh(s);case"keypress":return s.which!==32?null:(Dh=!0,Ah);case"textInput":return r=s.data,r===Ah&&Dh?null:r;default:return null}}function nk(r,s){if(Xo)return r==="compositionend"||!eu&&Ih(r,s)?(r=Ch(),Nl=Gc=eo=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 Th&&s.locale!=="ko"?null:s.data;default:return null}}var rk={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 Oh(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!rk[r.type]:s==="textarea"}function _h(r,s,u,f){bt(f),s=Ll(s,"onChange"),0<s.length&&(u=new Yc("onChange","change",null,u,f),r.push({event:u,listeners:s}))}var si=null,ii=null;function ok(r){em(r,0)}function Tl(r){var s=ts(r);if(tt(s))return r}function sk(r,s){if(r==="change")return s}var Mh=!1;if(d){var tu;if(d){var nu="oninput"in document;if(!nu){var $h=document.createElement("div");$h.setAttribute("oninput","return;"),nu=typeof $h.oninput=="function"}tu=nu}else tu=!1;Mh=tu&&(!document.documentMode||9<document.documentMode)}function Fh(){si&&(si.detachEvent("onpropertychange",zh),ii=si=null)}function zh(r){if(r.propertyName==="value"&&Tl(ii)){var s=[];_h(s,ii,r,zn(r)),Ar(ok,s)}}function ik(r,s,u){r==="focusin"?(Fh(),si=s,ii=u,si.attachEvent("onpropertychange",zh)):r==="focusout"&&Fh()}function lk(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Tl(ii)}function ak(r,s){if(r==="click")return Tl(s)}function ck(r,s){if(r==="input"||r==="change")return Tl(s)}function uk(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var er=typeof Object.is=="function"?Object.is:uk;function li(r,s){if(er(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var u=Object.keys(r),f=Object.keys(s);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var y=u[f];if(!p.call(s,y)||!er(r[y],s[y]))return!1}return!0}function Bh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Uh(r,s){var u=Bh(r);r=0;for(var f;u;){if(u.nodeType===3){if(f=r+u.textContent.length,r<=s&&f>=s)return{node:u,offset:s-r};r=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Bh(u)}}function Hh(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Hh(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Wh(){for(var r=window,s=Ue();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=Ue(r.document)}return s}function ru(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 dk(r){var s=Wh(),u=r.focusedElem,f=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&Hh(u.ownerDocument.documentElement,u)){if(f!==null&&ru(u)){if(s=f.start,r=f.end,r===void 0&&(r=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(r,u.value.length);else if(r=(s=u.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var y=u.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=Uh(u,w);var C=Uh(u,f);y&&C&&(r.rangeCount!==1||r.anchorNode!==y.node||r.anchorOffset!==y.offset||r.focusNode!==C.node||r.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),r.removeAllRanges(),w>f?(r.addRange(s),r.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),r.addRange(s)))}}for(s=[],r=u;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<s.length;u++)r=s[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var fk=d&&"documentMode"in document&&11>=document.documentMode,Qo=null,ou=null,ai=null,su=!1;function Vh(r,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;su||Qo==null||Qo!==Ue(f)||(f=Qo,"selectionStart"in f&&ru(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}),ai&&li(ai,f)||(ai=f,f=Ll(ou,"onSelect"),0<f.length&&(s=new Yc("onSelect","select",null,s,u),r.push({event:s,listeners:f}),s.target=Qo)))}function Al(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var Jo={animationend:Al("Animation","AnimationEnd"),animationiteration:Al("Animation","AnimationIteration"),animationstart:Al("Animation","AnimationStart"),transitionend:Al("Transition","TransitionEnd")},iu={},qh={};d&&(qh=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(iu[r])return iu[r];if(!Jo[r])return r;var s=Jo[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in qh)return iu[r]=s[u];return r}var Kh=Dl("animationend"),Gh=Dl("animationiteration"),Yh=Dl("animationstart"),Xh=Dl("transitionend"),Qh=new Map,Jh="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 to(r,s){Qh.set(r,s),a(s,[r])}for(var lu=0;lu<Jh.length;lu++){var au=Jh[lu],pk=au.toLowerCase(),hk=au[0].toUpperCase()+au.slice(1);to(pk,"on"+hk)}to(Kh,"onAnimationEnd"),to(Gh,"onAnimationIteration"),to(Yh,"onAnimationStart"),to("dblclick","onDoubleClick"),to("focusin","onFocus"),to("focusout","onBlur"),to(Xh,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ci="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(" "),mk=new Set("cancel close invalid load scroll toggle".split(" ").concat(ci));function Zh(r,s,u){var f=r.type||"unknown-event";r.currentTarget=u,p1(f,s,void 0,r),r.currentTarget=null}function em(r,s){s=(s&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],y=f.event;f=f.listeners;e:{var w=void 0;if(s)for(var C=f.length-1;0<=C;C--){var M=f[C],z=M.instance,te=M.currentTarget;if(M=M.listener,z!==w&&y.isPropagationStopped())break e;Zh(y,M,te),w=z}else for(C=0;C<f.length;C++){if(M=f[C],z=M.instance,te=M.currentTarget,M=M.listener,z!==w&&y.isPropagationStopped())break e;Zh(y,M,te),w=z}}}if(An)throw r=Dr,An=!1,Dr=null,r}function rt(r,s){var u=s[gu];u===void 0&&(u=s[gu]=new Set);var f=r+"__bubble";u.has(f)||(tm(s,r,2,!1),u.add(f))}function cu(r,s,u){var f=0;s&&(f|=4),tm(u,r,f,s)}var Il="_reactListening"+Math.random().toString(36).slice(2);function ui(r){if(!r[Il]){r[Il]=!0,o.forEach(function(u){u!=="selectionchange"&&(mk.has(u)||cu(u,!1,r),cu(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Il]||(s[Il]=!0,cu("selectionchange",!1,s))}}function tm(r,s,u,f){switch(Sh(s)){case 1:var y=P1;break;case 4:y=T1;break;default:y=qc}u=y.bind(null,s,u,r),y=void 0,!Bn||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),f?y!==void 0?r.addEventListener(s,u,{capture:!0,passive:y}):r.addEventListener(s,u,!0):y!==void 0?r.addEventListener(s,u,{passive:y}):r.addEventListener(s,u,!1)}function uu(r,s,u,f,y){var w=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var C=f.tag;if(C===3||C===4){var M=f.stateNode.containerInfo;if(M===y||M.nodeType===8&&M.parentNode===y)break;if(C===4)for(C=f.return;C!==null;){var z=C.tag;if((z===3||z===4)&&(z=C.stateNode.containerInfo,z===y||z.nodeType===8&&z.parentNode===y))return;C=C.return}for(;M!==null;){if(C=Ro(M),C===null)return;if(z=C.tag,z===5||z===6){f=w=C;continue e}M=M.parentNode}}f=f.return}Ar(function(){var te=w,se=zn(u),ie=[];e:{var oe=Qh.get(r);if(oe!==void 0){var he=Yc,be=r;switch(r){case"keypress":if(El(u)===0)break e;case"keydown":case"keyup":he=V1;break;case"focusin":be="focus",he=Jc;break;case"focusout":be="blur",he=Jc;break;case"beforeblur":case"afterblur":he=Jc;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=Eh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=I1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=G1;break;case Kh:case Gh:case Yh:he=_1;break;case Xh:he=X1;break;case"scroll":he=A1;break;case"wheel":he=J1;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=Ph}var we=(s&4)!==0,kt=!we&&r==="scroll",K=we?oe!==null?oe+"Capture":null:oe;we=[];for(var B=te,Q;B!==null;){Q=B;var ue=Q.stateNode;if(Q.tag===5&&ue!==null&&(Q=ue,K!==null&&(ue=ft(B,K),ue!=null&&we.push(di(B,ue,Q)))),kt)break;B=B.return}0<we.length&&(oe=new he(oe,be,null,u,se),ie.push({event:oe,listeners:we}))}}if((s&7)===0){e:{if(oe=r==="mouseover"||r==="pointerover",he=r==="mouseout"||r==="pointerout",oe&&u!==Oe&&(be=u.relatedTarget||u.fromElement)&&(Ro(be)||be[Ir]))break e;if((he||oe)&&(oe=se.window===se?se:(oe=se.ownerDocument)?oe.defaultView||oe.parentWindow:window,he?(be=u.relatedTarget||u.toElement,he=te,be=be?Ro(be):null,be!==null&&(kt=Eo(be),be!==kt||be.tag!==5&&be.tag!==6)&&(be=null)):(he=null,be=te),he!==be)){if(we=Eh,ue="onMouseLeave",K="onMouseEnter",B="mouse",(r==="pointerout"||r==="pointerover")&&(we=Ph,ue="onPointerLeave",K="onPointerEnter",B="pointer"),kt=he==null?oe:ts(he),Q=be==null?oe:ts(be),oe=new we(ue,B+"leave",he,u,se),oe.target=kt,oe.relatedTarget=Q,ue=null,Ro(se)===te&&(we=new we(K,B+"enter",be,u,se),we.target=Q,we.relatedTarget=kt,ue=we),kt=ue,he&&be)t:{for(we=he,K=be,B=0,Q=we;Q;Q=Zo(Q))B++;for(Q=0,ue=K;ue;ue=Zo(ue))Q++;for(;0<B-Q;)we=Zo(we),B--;for(;0<Q-B;)K=Zo(K),Q--;for(;B--;){if(we===K||K!==null&&we===K.alternate)break t;we=Zo(we),K=Zo(K)}we=null}else we=null;he!==null&&nm(ie,oe,he,we,!1),be!==null&&kt!==null&&nm(ie,kt,be,we,!0)}}e:{if(oe=te?ts(te):window,he=oe.nodeName&&oe.nodeName.toLowerCase(),he==="select"||he==="input"&&oe.type==="file")var Se=sk;else if(Oh(oe))if(Mh)Se=ck;else{Se=lk;var Te=ik}else(he=oe.nodeName)&&he.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Se=ak);if(Se&&(Se=Se(r,te))){_h(ie,Se,u,se);break e}Te&&Te(r,oe,te),r==="focusout"&&(Te=oe._wrapperState)&&Te.controlled&&oe.type==="number"&&Xe(oe,"number",oe.value)}switch(Te=te?ts(te):window,r){case"focusin":(Oh(Te)||Te.contentEditable==="true")&&(Qo=Te,ou=te,ai=null);break;case"focusout":ai=ou=Qo=null;break;case"mousedown":su=!0;break;case"contextmenu":case"mouseup":case"dragend":su=!1,Vh(ie,u,se);break;case"selectionchange":if(fk)break;case"keydown":case"keyup":Vh(ie,u,se)}var Ae;if(eu)e:{switch(r){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Xo?Ih(r,u)&&(De="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(De="onCompositionStart");De&&(Th&&u.locale!=="ko"&&(Xo||De!=="onCompositionStart"?De==="onCompositionEnd"&&Xo&&(Ae=Ch()):(eo=se,Gc="value"in eo?eo.value:eo.textContent,Xo=!0)),Te=Ll(te,De),0<Te.length&&(De=new Rh(De,r,null,u,se),ie.push({event:De,listeners:Te}),Ae?De.data=Ae:(Ae=Lh(u),Ae!==null&&(De.data=Ae)))),(Ae=ek?tk(r,u):nk(r,u))&&(te=Ll(te,"onBeforeInput"),0<te.length&&(se=new Rh("onBeforeInput","beforeinput",null,u,se),ie.push({event:se,listeners:te}),se.data=Ae))}em(ie,s)})}function di(r,s,u){return{instance:r,listener:s,currentTarget:u}}function Ll(r,s){for(var u=s+"Capture",f=[];r!==null;){var y=r,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=ft(r,u),w!=null&&f.unshift(di(r,w,y)),w=ft(r,s),w!=null&&f.push(di(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 nm(r,s,u,f,y){for(var w=s._reactName,C=[];u!==null&&u!==f;){var M=u,z=M.alternate,te=M.stateNode;if(z!==null&&z===f)break;M.tag===5&&te!==null&&(M=te,y?(z=ft(u,w),z!=null&&C.unshift(di(u,z,M))):y||(z=ft(u,w),z!=null&&C.push(di(u,z,M)))),u=u.return}C.length!==0&&r.push({event:s,listeners:C})}var gk=/\r\n?/g,xk=/\u0000|\uFFFD/g;function rm(r){return(typeof r=="string"?r:""+r).replace(gk,`
38
+ `).replace(xk,"")}function Ol(r,s,u){if(s=rm(s),rm(r)!==s&&u)throw Error(n(425))}function _l(){}var du=null,fu=null;function pu(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 hu=typeof setTimeout=="function"?setTimeout:void 0,yk=typeof clearTimeout=="function"?clearTimeout:void 0,om=typeof Promise=="function"?Promise:void 0,vk=typeof queueMicrotask=="function"?queueMicrotask:typeof om<"u"?function(r){return om.resolve(null).then(r).catch(bk)}:hu;function bk(r){setTimeout(function(){throw r})}function mu(r,s){var u=s,f=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"){if(f===0){r.removeChild(y),ti(s);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=y}while(u);ti(s)}function no(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 sm(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return r;s--}else u==="/$"&&s++}r=r.previousSibling}return null}var es=Math.random().toString(36).slice(2),mr="__reactFiber$"+es,fi="__reactProps$"+es,Ir="__reactContainer$"+es,gu="__reactEvents$"+es,wk="__reactListeners$"+es,kk="__reactHandles$"+es;function Ro(r){var s=r[mr];if(s)return s;for(var u=r.parentNode;u;){if(s=u[Ir]||u[mr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=sm(r);r!==null;){if(u=r[mr])return u;r=sm(r)}return s}r=u,u=r.parentNode}return null}function pi(r){return r=r[mr]||r[Ir],!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[fi]||null}var xu=[],ns=-1;function ro(r){return{current:r}}function ot(r){0>ns||(r.current=xu[ns],xu[ns]=null,ns--)}function Qe(r,s){ns++,xu[ns]=r.current,r.current=s}var oo={},nn=ro(oo),xn=ro(!1),Po=oo;function rs(r,s){var u=r.type.contextTypes;if(!u)return oo;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in u)y[w]=s[w];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=y),y}function yn(r){return r=r.childContextTypes,r!=null}function $l(){ot(xn),ot(nn)}function im(r,s,u){if(nn.current!==oo)throw Error(n(168));Qe(nn,s),Qe(xn,u)}function lm(r,s,u){var f=r.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var y in f)if(!(y in s))throw Error(n(108,Ee(r)||"Unknown",y));return R({},u,f)}function Fl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||oo,Po=nn.current,Qe(nn,r),Qe(xn,xn.current),!0}function am(r,s,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=lm(r,s,Po),f.__reactInternalMemoizedMergedChildContext=r,ot(xn),ot(nn),Qe(nn,r)):ot(xn),Qe(xn,u)}var Lr=null,zl=!1,yu=!1;function cm(r){Lr===null?Lr=[r]:Lr.push(r)}function jk(r){zl=!0,cm(r)}function so(){if(!yu&&Lr!==null){yu=!0;var r=0,s=Ke;try{var u=Lr;for(Ke=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}Lr=null,zl=!1}catch(y){throw Lr!==null&&(Lr=Lr.slice(r+1)),dh(zc,so),y}finally{Ke=s,yu=!1}}return null}var os=[],ss=0,Bl=null,Ul=0,Un=[],Hn=0,To=null,Or=1,_r="";function Ao(r,s){os[ss++]=Ul,os[ss++]=Bl,Bl=r,Ul=s}function um(r,s,u){Un[Hn++]=Or,Un[Hn++]=_r,Un[Hn++]=To,To=r;var f=Or;r=_r;var y=32-Zn(f)-1;f&=~(1<<y),u+=1;var w=32-Zn(s)+y;if(30<w){var C=y-y%5;w=(f&(1<<C)-1).toString(32),f>>=C,y-=C,Or=1<<32-Zn(s)+y|u<<y|f,_r=w+r}else Or=1<<w|u<<y|f,_r=r}function vu(r){r.return!==null&&(Ao(r,1),um(r,1,0))}function bu(r){for(;r===Bl;)Bl=os[--ss],os[ss]=null,Ul=os[--ss],os[ss]=null;for(;r===To;)To=Un[--Hn],Un[Hn]=null,_r=Un[--Hn],Un[Hn]=null,Or=Un[--Hn],Un[Hn]=null}var In=null,Ln=null,lt=!1,tr=null;function dm(r,s){var u=Kn(5,null,null,0);u.elementType="DELETED",u.stateNode=s,u.return=r,s=r.deletions,s===null?(r.deletions=[u],r.flags|=16):s.push(u)}function fm(r,s){switch(r.tag){case 5:var u=r.type;return s=s.nodeType!==1||u.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,In=r,Ln=no(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,In=r,Ln=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=To!==null?{id:Or,overflow:_r}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=Kn(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,In=r,Ln=null,!0):!1;default:return!1}}function wu(r){return(r.mode&1)!==0&&(r.flags&128)===0}function ku(r){if(lt){var s=Ln;if(s){var u=s;if(!fm(r,s)){if(wu(r))throw Error(n(418));s=no(u.nextSibling);var f=In;s&&fm(r,s)?dm(f,u):(r.flags=r.flags&-4097|2,lt=!1,In=r)}}else{if(wu(r))throw Error(n(418));r.flags=r.flags&-4097|2,lt=!1,In=r}}}function pm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;In=r}function Hl(r){if(r!==In)return!1;if(!lt)return pm(r),lt=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!pu(r.type,r.memoizedProps)),s&&(s=Ln)){if(wu(r))throw hm(),Error(n(418));for(;s;)dm(r,s),s=no(s.nextSibling)}if(pm(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 u=r.data;if(u==="/$"){if(s===0){Ln=no(r.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}r=r.nextSibling}Ln=null}}else Ln=In?no(r.stateNode.nextSibling):null;return!0}function hm(){for(var r=Ln;r;)r=no(r.nextSibling)}function is(){Ln=In=null,lt=!1}function ju(r){tr===null?tr=[r]:tr.push(r)}var Sk=L.ReactCurrentBatchConfig;function hi(r,s,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var f=u.stateNode}if(!f)throw Error(n(147,r));var y=f,w=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(C){var M=y.refs;C===null?delete M[w]:M[w]=C},s._stringRef=w,s)}if(typeof r!="string")throw Error(n(284));if(!u._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 mm(r){var s=r._init;return s(r._payload)}function gm(r){function s(K,B){if(r){var Q=K.deletions;Q===null?(K.deletions=[B],K.flags|=16):Q.push(B)}}function u(K,B){if(!r)return null;for(;B!==null;)s(K,B),B=B.sibling;return null}function f(K,B){for(K=new Map;B!==null;)B.key!==null?K.set(B.key,B):K.set(B.index,B),B=B.sibling;return K}function y(K,B){return K=ho(K,B),K.index=0,K.sibling=null,K}function w(K,B,Q){return K.index=Q,r?(Q=K.alternate,Q!==null?(Q=Q.index,Q<B?(K.flags|=2,B):Q):(K.flags|=2,B)):(K.flags|=1048576,B)}function C(K){return r&&K.alternate===null&&(K.flags|=2),K}function M(K,B,Q,ue){return B===null||B.tag!==6?(B=hd(Q,K.mode,ue),B.return=K,B):(B=y(B,Q),B.return=K,B)}function z(K,B,Q,ue){var Se=Q.type;return Se===$?se(K,B,Q.props.children,ue,Q.key):B!==null&&(B.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===D&&mm(Se)===B.type)?(ue=y(B,Q.props),ue.ref=hi(K,B,Q),ue.return=K,ue):(ue=ha(Q.type,Q.key,Q.props,null,K.mode,ue),ue.ref=hi(K,B,Q),ue.return=K,ue)}function te(K,B,Q,ue){return B===null||B.tag!==4||B.stateNode.containerInfo!==Q.containerInfo||B.stateNode.implementation!==Q.implementation?(B=md(Q,K.mode,ue),B.return=K,B):(B=y(B,Q.children||[]),B.return=K,B)}function se(K,B,Q,ue,Se){return B===null||B.tag!==7?(B=Fo(Q,K.mode,ue,Se),B.return=K,B):(B=y(B,Q),B.return=K,B)}function ie(K,B,Q){if(typeof B=="string"&&B!==""||typeof B=="number")return B=hd(""+B,K.mode,Q),B.return=K,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return Q=ha(B.type,B.key,B.props,null,K.mode,Q),Q.ref=hi(K,null,B),Q.return=K,Q;case P:return B=md(B,K.mode,Q),B.return=K,B;case D:var ue=B._init;return ie(K,ue(B._payload),Q)}if(nt(B)||ee(B))return B=Fo(B,K.mode,Q,null),B.return=K,B;Wl(K,B)}return null}function oe(K,B,Q,ue){var Se=B!==null?B.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Se!==null?null:M(K,B,""+Q,ue);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case O:return Q.key===Se?z(K,B,Q,ue):null;case P:return Q.key===Se?te(K,B,Q,ue):null;case D:return Se=Q._init,oe(K,B,Se(Q._payload),ue)}if(nt(Q)||ee(Q))return Se!==null?null:se(K,B,Q,ue,null);Wl(K,Q)}return null}function he(K,B,Q,ue,Se){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return K=K.get(Q)||null,M(B,K,""+ue,Se);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case O:return K=K.get(ue.key===null?Q:ue.key)||null,z(B,K,ue,Se);case P:return K=K.get(ue.key===null?Q:ue.key)||null,te(B,K,ue,Se);case D:var Te=ue._init;return he(K,B,Q,Te(ue._payload),Se)}if(nt(ue)||ee(ue))return K=K.get(Q)||null,se(B,K,ue,Se,null);Wl(B,ue)}return null}function be(K,B,Q,ue){for(var Se=null,Te=null,Ae=B,De=B=0,zt=null;Ae!==null&&De<Q.length;De++){Ae.index>De?(zt=Ae,Ae=null):zt=Ae.sibling;var We=oe(K,Ae,Q[De],ue);if(We===null){Ae===null&&(Ae=zt);break}r&&Ae&&We.alternate===null&&s(K,Ae),B=w(We,B,De),Te===null?Se=We:Te.sibling=We,Te=We,Ae=zt}if(De===Q.length)return u(K,Ae),lt&&Ao(K,De),Se;if(Ae===null){for(;De<Q.length;De++)Ae=ie(K,Q[De],ue),Ae!==null&&(B=w(Ae,B,De),Te===null?Se=Ae:Te.sibling=Ae,Te=Ae);return lt&&Ao(K,De),Se}for(Ae=f(K,Ae);De<Q.length;De++)zt=he(Ae,K,De,Q[De],ue),zt!==null&&(r&&zt.alternate!==null&&Ae.delete(zt.key===null?De:zt.key),B=w(zt,B,De),Te===null?Se=zt:Te.sibling=zt,Te=zt);return r&&Ae.forEach(function(mo){return s(K,mo)}),lt&&Ao(K,De),Se}function we(K,B,Q,ue){var Se=ee(Q);if(typeof Se!="function")throw Error(n(150));if(Q=Se.call(Q),Q==null)throw Error(n(151));for(var Te=Se=null,Ae=B,De=B=0,zt=null,We=Q.next();Ae!==null&&!We.done;De++,We=Q.next()){Ae.index>De?(zt=Ae,Ae=null):zt=Ae.sibling;var mo=oe(K,Ae,We.value,ue);if(mo===null){Ae===null&&(Ae=zt);break}r&&Ae&&mo.alternate===null&&s(K,Ae),B=w(mo,B,De),Te===null?Se=mo:Te.sibling=mo,Te=mo,Ae=zt}if(We.done)return u(K,Ae),lt&&Ao(K,De),Se;if(Ae===null){for(;!We.done;De++,We=Q.next())We=ie(K,We.value,ue),We!==null&&(B=w(We,B,De),Te===null?Se=We:Te.sibling=We,Te=We);return lt&&Ao(K,De),Se}for(Ae=f(K,Ae);!We.done;De++,We=Q.next())We=he(Ae,K,De,We.value,ue),We!==null&&(r&&We.alternate!==null&&Ae.delete(We.key===null?De:We.key),B=w(We,B,De),Te===null?Se=We:Te.sibling=We,Te=We);return r&&Ae.forEach(function(rj){return s(K,rj)}),lt&&Ao(K,De),Se}function kt(K,B,Q,ue){if(typeof Q=="object"&&Q!==null&&Q.type===$&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case O:e:{for(var Se=Q.key,Te=B;Te!==null;){if(Te.key===Se){if(Se=Q.type,Se===$){if(Te.tag===7){u(K,Te.sibling),B=y(Te,Q.props.children),B.return=K,K=B;break e}}else if(Te.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===D&&mm(Se)===Te.type){u(K,Te.sibling),B=y(Te,Q.props),B.ref=hi(K,Te,Q),B.return=K,K=B;break e}u(K,Te);break}else s(K,Te);Te=Te.sibling}Q.type===$?(B=Fo(Q.props.children,K.mode,ue,Q.key),B.return=K,K=B):(ue=ha(Q.type,Q.key,Q.props,null,K.mode,ue),ue.ref=hi(K,B,Q),ue.return=K,K=ue)}return C(K);case P:e:{for(Te=Q.key;B!==null;){if(B.key===Te)if(B.tag===4&&B.stateNode.containerInfo===Q.containerInfo&&B.stateNode.implementation===Q.implementation){u(K,B.sibling),B=y(B,Q.children||[]),B.return=K,K=B;break e}else{u(K,B);break}else s(K,B);B=B.sibling}B=md(Q,K.mode,ue),B.return=K,K=B}return C(K);case D:return Te=Q._init,kt(K,B,Te(Q._payload),ue)}if(nt(Q))return be(K,B,Q,ue);if(ee(Q))return we(K,B,Q,ue);Wl(K,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,B!==null&&B.tag===6?(u(K,B.sibling),B=y(B,Q),B.return=K,K=B):(u(K,B),B=hd(Q,K.mode,ue),B.return=K,K=B),C(K)):u(K,B)}return kt}var ls=gm(!0),xm=gm(!1),Vl=ro(null),ql=null,as=null,Su=null;function Cu(){Su=as=ql=null}function Nu(r){var s=Vl.current;ot(Vl),r._currentValue=s}function Eu(r,s,u){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===u)break;r=r.return}}function cs(r,s){ql=r,Su=as=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(vn=!0),r.firstContext=null)}function Wn(r){var s=r._currentValue;if(Su!==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 Ru(r){Do===null?Do=[r]:Do.push(r)}function ym(r,s,u,f){var y=s.interleaved;return y===null?(u.next=u,Ru(s)):(u.next=y.next,y.next=u),s.interleaved=u,Mr(r,f)}function Mr(r,s){r.lanes|=s;var u=r.alternate;for(u!==null&&(u.lanes|=s),u=r,r=r.return;r!==null;)r.childLanes|=s,u=r.alternate,u!==null&&(u.childLanes|=s),u=r,r=r.return;return u.tag===3?u.stateNode:null}var io=!1;function Pu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vm(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 lo(r,s,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(He&2)!==0){var y=f.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),f.pending=s,Mr(r,u)}return y=f.interleaved,y===null?(s.next=s,Ru(f)):(s.next=y.next,y.next=s),f.interleaved=s,Mr(r,u)}function Kl(r,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194240)!==0)){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,Hc(r,u)}}function bm(r,s){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var y=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var C={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};w===null?y=w=C:w=w.next=C,u=u.next}while(u!==null);w===null?y=w=s:w=w.next=s}else y=w=s;u={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:f.shared,effects:f.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=s:r.next=s,u.lastBaseUpdate=s}function Gl(r,s,u,f){var y=r.updateQueue;io=!1;var w=y.firstBaseUpdate,C=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var z=M,te=z.next;z.next=null,C===null?w=te:C.next=te,C=z;var se=r.alternate;se!==null&&(se=se.updateQueue,M=se.lastBaseUpdate,M!==C&&(M===null?se.firstBaseUpdate=te:M.next=te,se.lastBaseUpdate=z))}if(w!==null){var ie=y.baseState;C=0,se=te=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 be=r,we=M;switch(oe=s,he=u,we.tag){case 1:if(be=we.payload,typeof be=="function"){ie=be.call(he,ie,oe);break e}ie=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=we.payload,oe=typeof be=="function"?be.call(he,ie,oe):be,oe==null)break e;ie=R({},ie,oe);break e;case 2:io=!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?(te=se=he,z=ie):se=se.next=he,C|=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=te,y.lastBaseUpdate=se,s=y.shared.interleaved,s!==null){y=s;do C|=y.lane,y=y.next;while(y!==s)}else w===null&&(y.shared.lanes=0);Oo|=C,r.lanes=C,r.memoizedState=ie}}function wm(r,s,u){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=u,typeof y!="function")throw Error(n(191,y));y.call(f)}}}var mi={},gr=ro(mi),gi=ro(mi),xi=ro(mi);function Io(r){if(r===mi)throw Error(n(174));return r}function Tu(r,s){switch(Qe(xi,s),Qe(gi,r),Qe(gr,mi),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:le(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=le(s,r)}ot(gr),Qe(gr,s)}function us(){ot(gr),ot(gi),ot(xi)}function km(r){Io(xi.current);var s=Io(gr.current),u=le(s,r.type);s!==u&&(Qe(gi,r),Qe(gr,u))}function Au(r){gi.current===r&&(ot(gr),ot(gi))}var pt=ro(0);function Yl(r){for(var s=r;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.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 Du=[];function Iu(){for(var r=0;r<Du.length;r++)Du[r]._workInProgressVersionPrimary=null;Du.length=0}var Xl=L.ReactCurrentDispatcher,Lu=L.ReactCurrentBatchConfig,Lo=0,ht=null,Pt=null,$t=null,Ql=!1,yi=!1,vi=0,Ck=0;function rn(){throw Error(n(321))}function Ou(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!er(r[u],s[u]))return!1;return!0}function _u(r,s,u,f,y,w){if(Lo=w,ht=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Xl.current=r===null||r.memoizedState===null?Pk:Tk,r=u(f,y),yi){w=0;do{if(yi=!1,vi=0,25<=w)throw Error(n(301));w+=1,$t=Pt=null,s.updateQueue=null,Xl.current=Ak,r=u(f,y)}while(yi)}if(Xl.current=ea,s=Pt!==null&&Pt.next!==null,Lo=0,$t=Pt=ht=null,Ql=!1,s)throw Error(n(300));return r}function Mu(){var r=vi!==0;return vi=0,r}function xr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?ht.memoizedState=$t=r:$t=$t.next=r,$t}function Vn(){if(Pt===null){var r=ht.alternate;r=r!==null?r.memoizedState:null}else r=Pt.next;var s=$t===null?ht.memoizedState:$t.next;if(s!==null)$t=s,Pt=r;else{if(r===null)throw Error(n(310));Pt=r,r={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},$t===null?ht.memoizedState=$t=r:$t=$t.next=r}return $t}function bi(r,s){return typeof s=="function"?s(r):s}function $u(r){var s=Vn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=Pt,y=f.baseQueue,w=u.pending;if(w!==null){if(y!==null){var C=y.next;y.next=w.next,w.next=C}f.baseQueue=y=w,u.pending=null}if(y!==null){w=y.next,f=f.baseState;var M=C=null,z=null,te=w;do{var se=te.lane;if((Lo&se)===se)z!==null&&(z=z.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),f=te.hasEagerState?te.eagerState:r(f,te.action);else{var ie={lane:se,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};z===null?(M=z=ie,C=f):z=z.next=ie,ht.lanes|=se,Oo|=se}te=te.next}while(te!==null&&te!==w);z===null?C=f:z.next=M,er(f,s.memoizedState)||(vn=!0),s.memoizedState=f,s.baseState=C,s.baseQueue=z,u.lastRenderedState=f}if(r=u.interleaved,r!==null){y=r;do w=y.lane,ht.lanes|=w,Oo|=w,y=y.next;while(y!==r)}else y===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Fu(r){var s=Vn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,y=u.pending,w=s.memoizedState;if(y!==null){u.pending=null;var C=y=y.next;do w=r(w,C.action),C=C.next;while(C!==y);er(w,s.memoizedState)||(vn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),u.lastRenderedState=w}return[w,f]}function jm(){}function Sm(r,s){var u=ht,f=Vn(),y=s(),w=!er(f.memoizedState,y);if(w&&(f.memoizedState=y,vn=!0),f=f.queue,zu(Em.bind(null,u,f,r),[r]),f.getSnapshot!==s||w||$t!==null&&$t.memoizedState.tag&1){if(u.flags|=2048,wi(9,Nm.bind(null,u,f,y,s),void 0,null),Ft===null)throw Error(n(349));(Lo&30)!==0||Cm(u,s,y)}return y}function Cm(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=ht.updateQueue,s===null?(s={lastEffect:null,stores:null},ht.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function Nm(r,s,u,f){s.value=u,s.getSnapshot=f,Rm(s)&&Pm(r)}function Em(r,s,u){return u(function(){Rm(s)&&Pm(r)})}function Rm(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!er(r,u)}catch{return!0}}function Pm(r){var s=Mr(r,1);s!==null&&sr(s,r,1,-1)}function Tm(r){var s=xr();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:r},s.queue=r,r=r.dispatch=Rk.bind(null,ht,r),[s.memoizedState,r]}function wi(r,s,u,f){return r={tag:r,create:s,destroy:u,deps:f,next:null},s=ht.updateQueue,s===null?(s={lastEffect:null,stores:null},ht.updateQueue=s,s.lastEffect=r.next=r):(u=s.lastEffect,u===null?s.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,s.lastEffect=r)),r}function Am(){return Vn().memoizedState}function Jl(r,s,u,f){var y=xr();ht.flags|=r,y.memoizedState=wi(1|s,u,void 0,f===void 0?null:f)}function Zl(r,s,u,f){var y=Vn();f=f===void 0?null:f;var w=void 0;if(Pt!==null){var C=Pt.memoizedState;if(w=C.destroy,f!==null&&Ou(f,C.deps)){y.memoizedState=wi(s,u,w,f);return}}ht.flags|=r,y.memoizedState=wi(1|s,u,w,f)}function Dm(r,s){return Jl(8390656,8,r,s)}function zu(r,s){return Zl(2048,8,r,s)}function Im(r,s){return Zl(4,2,r,s)}function Lm(r,s){return Zl(4,4,r,s)}function Om(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 _m(r,s,u){return u=u!=null?u.concat([r]):null,Zl(4,4,Om.bind(null,s,r),u)}function Bu(){}function Mm(r,s){var u=Vn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Ou(s,f[1])?f[0]:(u.memoizedState=[r,s],r)}function $m(r,s){var u=Vn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Ou(s,f[1])?f[0]:(r=r(),u.memoizedState=[r,s],r)}function Fm(r,s,u){return(Lo&21)===0?(r.baseState&&(r.baseState=!1,vn=!0),r.memoizedState=u):(er(u,s)||(u=mh(),ht.lanes|=u,Oo|=u,r.baseState=!0),s)}function Nk(r,s){var u=Ke;Ke=u!==0&&4>u?u:4,r(!0);var f=Lu.transition;Lu.transition={};try{r(!1),s()}finally{Ke=u,Lu.transition=f}}function zm(){return Vn().memoizedState}function Ek(r,s,u){var f=fo(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Bm(r))Um(s,u);else if(u=ym(r,s,u,f),u!==null){var y=dn();sr(u,r,f,y),Hm(u,s,f)}}function Rk(r,s,u){var f=fo(r),y={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Bm(r))Um(s,y);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,M=w(C,u);if(y.hasEagerState=!0,y.eagerState=M,er(M,C)){var z=s.interleaved;z===null?(y.next=y,Ru(s)):(y.next=z.next,z.next=y),s.interleaved=y;return}}catch{}finally{}u=ym(r,s,y,f),u!==null&&(y=dn(),sr(u,r,f,y),Hm(u,s,f))}}function Bm(r){var s=r.alternate;return r===ht||s!==null&&s===ht}function Um(r,s){yi=Ql=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function Hm(r,s,u){if((u&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,Hc(r,u)}}var ea={readContext:Wn,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useInsertionEffect:rn,useLayoutEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useMutableSource:rn,useSyncExternalStore:rn,useId:rn,unstable_isNewReconciler:!1},Pk={readContext:Wn,useCallback:function(r,s){return xr().memoizedState=[r,s===void 0?null:s],r},useContext:Wn,useEffect:Dm,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,Jl(4194308,4,Om.bind(null,s,r),u)},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 u=xr();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var f=xr();return s=u!==void 0?u(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=Ek.bind(null,ht,r),[f.memoizedState,r]},useRef:function(r){var s=xr();return r={current:r},s.memoizedState=r},useState:Tm,useDebugValue:Bu,useDeferredValue:function(r){return xr().memoizedState=r},useTransition:function(){var r=Tm(!1),s=r[0];return r=Nk.bind(null,r[1]),xr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var f=ht,y=xr();if(lt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),Ft===null)throw Error(n(349));(Lo&30)!==0||Cm(f,s,u)}y.memoizedState=u;var w={value:u,getSnapshot:s};return y.queue=w,Dm(Em.bind(null,f,w,r),[r]),f.flags|=2048,wi(9,Nm.bind(null,f,w,u,s),void 0,null),u},useId:function(){var r=xr(),s=Ft.identifierPrefix;if(lt){var u=_r,f=Or;u=(f&~(1<<32-Zn(f)-1)).toString(32)+u,s=":"+s+"R"+u,u=vi++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=Ck++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},Tk={readContext:Wn,useCallback:Mm,useContext:Wn,useEffect:zu,useImperativeHandle:_m,useInsertionEffect:Im,useLayoutEffect:Lm,useMemo:$m,useReducer:$u,useRef:Am,useState:function(){return $u(bi)},useDebugValue:Bu,useDeferredValue:function(r){var s=Vn();return Fm(s,Pt.memoizedState,r)},useTransition:function(){var r=$u(bi)[0],s=Vn().memoizedState;return[r,s]},useMutableSource:jm,useSyncExternalStore:Sm,useId:zm,unstable_isNewReconciler:!1},Ak={readContext:Wn,useCallback:Mm,useContext:Wn,useEffect:zu,useImperativeHandle:_m,useInsertionEffect:Im,useLayoutEffect:Lm,useMemo:$m,useReducer:Fu,useRef:Am,useState:function(){return Fu(bi)},useDebugValue:Bu,useDeferredValue:function(r){var s=Vn();return Pt===null?s.memoizedState=r:Fm(s,Pt.memoizedState,r)},useTransition:function(){var r=Fu(bi)[0],s=Vn().memoizedState;return[r,s]},useMutableSource:jm,useSyncExternalStore:Sm,useId:zm,unstable_isNewReconciler:!1};function nr(r,s){if(r&&r.defaultProps){s=R({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function Uu(r,s,u,f){s=r.memoizedState,u=u(f,s),u=u==null?s:R({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var ta={isMounted:function(r){return(r=r._reactInternals)?Eo(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var f=dn(),y=fo(r),w=$r(f,y);w.payload=s,u!=null&&(w.callback=u),s=lo(r,w,y),s!==null&&(sr(s,r,y,f),Kl(s,r,y))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var f=dn(),y=fo(r),w=$r(f,y);w.tag=1,w.payload=s,u!=null&&(w.callback=u),s=lo(r,w,y),s!==null&&(sr(s,r,y,f),Kl(s,r,y))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=dn(),f=fo(r),y=$r(u,f);y.tag=2,s!=null&&(y.callback=s),s=lo(r,y,f),s!==null&&(sr(s,r,f,u),Kl(s,r,f))}};function Wm(r,s,u,f,y,w,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,w,C):s.prototype&&s.prototype.isPureReactComponent?!li(u,f)||!li(y,w):!0}function Vm(r,s,u){var f=!1,y=oo,w=s.contextType;return typeof w=="object"&&w!==null?w=Wn(w):(y=yn(s)?Po:nn.current,f=s.contextTypes,w=(f=f!=null)?rs(r,y):oo),s=new s(u,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 qm(r,s,u,f){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,f),s.state!==r&&ta.enqueueReplaceState(s,s.state,null)}function Hu(r,s,u,f){var y=r.stateNode;y.props=u,y.state=r.memoizedState,y.refs={},Pu(r);var w=s.contextType;typeof w=="object"&&w!==null?y.context=Wn(w):(w=yn(s)?Po:nn.current,y.context=rs(r,w)),y.state=r.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(Uu(r,s,w,u),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,u,y,f),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function ds(r,s){try{var u="",f=s;do u+=ve(f),f=f.return;while(f);var y=u}catch(w){y=`
39
+ Error generating stack: `+w.message+`
40
+ `+w.stack}return{value:r,source:s,stack:y,digest:null}}function Wu(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function Vu(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var Dk=typeof WeakMap=="function"?WeakMap:Map;function Km(r,s,u){u=$r(-1,u),u.tag=3,u.payload={element:null};var f=s.value;return u.callback=function(){aa||(aa=!0,id=f),Vu(r,s)},u}function Gm(r,s,u){u=$r(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var y=s.value;u.payload=function(){return f(y)},u.callback=function(){Vu(r,s)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(u.callback=function(){Vu(r,s),typeof f!="function"&&(co===null?co=new Set([this]):co.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),u}function Ym(r,s,u){var f=r.pingCache;if(f===null){f=r.pingCache=new Dk;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(u)||(y.add(u),r=qk.bind(null,r,s,u),s.then(r,r))}function Xm(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 Qm(r,s,u,f,y){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(s=$r(-1,1),s.tag=2,lo(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=y,r)}var Ik=L.ReactCurrentOwner,vn=!1;function un(r,s,u,f){s.child=r===null?xm(s,null,u,f):ls(s,r.child,u,f)}function Jm(r,s,u,f,y){u=u.render;var w=s.ref;return cs(s,y),f=_u(r,s,u,f,w,y),u=Mu(),r!==null&&!vn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(lt&&u&&vu(s),s.flags|=1,un(r,s,f,y),s.child)}function Zm(r,s,u,f,y){if(r===null){var w=u.type;return typeof w=="function"&&!pd(w)&&w.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=w,eg(r,s,w,f,y)):(r=ha(u.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 C=w.memoizedProps;if(u=u.compare,u=u!==null?u:li,u(C,f)&&r.ref===s.ref)return Fr(r,s,y)}return s.flags|=1,r=ho(w,f),r.ref=s.ref,r.return=s,s.child=r}function eg(r,s,u,f,y){if(r!==null){var w=r.memoizedProps;if(li(w,f)&&r.ref===s.ref)if(vn=!1,s.pendingProps=f=w,(r.lanes&y)!==0)(r.flags&131072)!==0&&(vn=!0);else return s.lanes=r.lanes,Fr(r,s,y)}return qu(r,s,u,f,y)}function tg(r,s,u){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},Qe(ps,On),On|=u;else{if((u&1073741824)===0)return r=w!==null?w.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,Qe(ps,On),On|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=w!==null?w.baseLanes:u,Qe(ps,On),On|=f}else w!==null?(f=w.baseLanes|u,s.memoizedState=null):f=u,Qe(ps,On),On|=f;return un(r,s,y,u),s.child}function ng(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function qu(r,s,u,f,y){var w=yn(u)?Po:nn.current;return w=rs(s,w),cs(s,y),u=_u(r,s,u,f,w,y),f=Mu(),r!==null&&!vn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(lt&&f&&vu(s),s.flags|=1,un(r,s,u,y),s.child)}function rg(r,s,u,f,y){if(yn(u)){var w=!0;Fl(s)}else w=!1;if(cs(s,y),s.stateNode===null)ra(r,s),Vm(s,u,f),Hu(s,u,f,y),f=!0;else if(r===null){var C=s.stateNode,M=s.memoizedProps;C.props=M;var z=C.context,te=u.contextType;typeof te=="object"&&te!==null?te=Wn(te):(te=yn(u)?Po:nn.current,te=rs(s,te));var se=u.getDerivedStateFromProps,ie=typeof se=="function"||typeof C.getSnapshotBeforeUpdate=="function";ie||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(M!==f||z!==te)&&qm(s,C,f,te),io=!1;var oe=s.memoizedState;C.state=oe,Gl(s,f,C,y),z=s.memoizedState,M!==f||oe!==z||xn.current||io?(typeof se=="function"&&(Uu(s,u,se,f),z=s.memoizedState),(M=io||Wm(s,u,M,f,oe,z,te))?(ie||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=z),C.props=f,C.state=z,C.context=te,f=M):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{C=s.stateNode,vm(r,s),M=s.memoizedProps,te=s.type===s.elementType?M:nr(s.type,M),C.props=te,ie=s.pendingProps,oe=C.context,z=u.contextType,typeof z=="object"&&z!==null?z=Wn(z):(z=yn(u)?Po:nn.current,z=rs(s,z));var he=u.getDerivedStateFromProps;(se=typeof he=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(M!==ie||oe!==z)&&qm(s,C,f,z),io=!1,oe=s.memoizedState,C.state=oe,Gl(s,f,C,y);var be=s.memoizedState;M!==ie||oe!==be||xn.current||io?(typeof he=="function"&&(Uu(s,u,he,f),be=s.memoizedState),(te=io||Wm(s,u,te,f,oe,be,z)||!1)?(se||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(f,be,z),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(f,be,z)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=be),C.props=f,C.state=be,C.context=z,f=te):(typeof C.componentDidUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&oe===r.memoizedState||(s.flags|=1024),f=!1)}return Ku(r,s,u,f,w,y)}function Ku(r,s,u,f,y,w){ng(r,s);var C=(s.flags&128)!==0;if(!f&&!C)return y&&am(s,u,!1),Fr(r,s,w);f=s.stateNode,Ik.current=s;var M=C&&typeof u.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,r!==null&&C?(s.child=ls(s,r.child,null,w),s.child=ls(s,null,M,w)):un(r,s,M,w),s.memoizedState=f.state,y&&am(s,u,!0),s.child}function og(r){var s=r.stateNode;s.pendingContext?im(r,s.pendingContext,s.pendingContext!==s.context):s.context&&im(r,s.context,!1),Tu(r,s.containerInfo)}function sg(r,s,u,f,y){return is(),ju(y),s.flags|=256,un(r,s,u,f),s.child}var Gu={dehydrated:null,treeContext:null,retryLane:0};function Yu(r){return{baseLanes:r,cachePool:null,transitions:null}}function ig(r,s,u){var f=s.pendingProps,y=pt.current,w=!1,C=(s.flags&128)!==0,M;if((M=C)||(M=r!==null&&r.memoizedState===null?!1:(y&2)!==0),M?(w=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(y|=1),Qe(pt,y&1),r===null)return ku(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):(C=f.children,r=f.fallback,w?(f=s.mode,w=s.child,C={mode:"hidden",children:C},(f&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=ma(C,f,0,null),r=Fo(r,f,u,null),w.return=s,r.return=s,w.sibling=r,s.child=w,s.child.memoizedState=Yu(u),s.memoizedState=Gu,r):Xu(s,C));if(y=r.memoizedState,y!==null&&(M=y.dehydrated,M!==null))return Lk(r,s,C,f,M,y,u);if(w){w=f.fallback,C=s.mode,y=r.child,M=y.sibling;var z={mode:"hidden",children:f.children};return(C&1)===0&&s.child!==y?(f=s.child,f.childLanes=0,f.pendingProps=z,s.deletions=null):(f=ho(y,z),f.subtreeFlags=y.subtreeFlags&14680064),M!==null?w=ho(M,w):(w=Fo(w,C,u,null),w.flags|=2),w.return=s,f.return=s,f.sibling=w,s.child=f,f=w,w=s.child,C=r.child.memoizedState,C=C===null?Yu(u):{baseLanes:C.baseLanes|u,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=r.childLanes&~u,s.memoizedState=Gu,f}return w=r.child,r=w.sibling,f=ho(w,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=u),f.return=s,f.sibling=null,r!==null&&(u=s.deletions,u===null?(s.deletions=[r],s.flags|=16):u.push(r)),s.child=f,s.memoizedState=null,f}function Xu(r,s){return s=ma({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function na(r,s,u,f){return f!==null&&ju(f),ls(s,r.child,null,u),r=Xu(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function Lk(r,s,u,f,y,w,C){if(u)return s.flags&256?(s.flags&=-257,f=Wu(Error(n(422))),na(r,s,C,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,C,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,C),s.child.memoizedState=Yu(C),s.memoizedState=Gu,w);if((s.mode&1)===0)return na(r,s,C,null);if(y.data==="$!"){if(f=y.nextSibling&&y.nextSibling.dataset,f)var M=f.dgst;return f=M,w=Error(n(419)),f=Wu(w,f,void 0),na(r,s,C,f)}if(M=(C&r.childLanes)!==0,vn||M){if(f=Ft,f!==null){switch(C&-C){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|C))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,Mr(r,y),sr(f,r,y,-1))}return fd(),f=Wu(Error(n(421))),na(r,s,C,f)}return y.data==="$?"?(s.flags|=128,s.child=r.child,s=Kk.bind(null,r),y._reactRetry=s,null):(r=w.treeContext,Ln=no(y.nextSibling),In=s,lt=!0,tr=null,r!==null&&(Un[Hn++]=Or,Un[Hn++]=_r,Un[Hn++]=To,Or=r.id,_r=r.overflow,To=s),s=Xu(s,f.children),s.flags|=4096,s)}function lg(r,s,u){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),Eu(r.return,s,u)}function Qu(r,s,u,f,y){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:y}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=u,w.tailMode=y)}function ag(r,s,u){var f=s.pendingProps,y=f.revealOrder,w=f.tail;if(un(r,s,f.children,u),f=pt.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&&lg(r,u,s);else if(r.tag===19)lg(r,u,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(Qe(pt,f),(s.mode&1)===0)s.memoizedState=null;else switch(y){case"forwards":for(u=s.child,y=null;u!==null;)r=u.alternate,r!==null&&Yl(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=s.child,s.child=null):(y=u.sibling,u.sibling=null),Qu(s,!1,y,u,w);break;case"backwards":for(u=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=u,u=y,y=r}Qu(s,!0,u,null,w);break;case"together":Qu(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,u){if(r!==null&&(s.dependencies=r.dependencies),Oo|=s.lanes,(u&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,u=ho(r,r.pendingProps),s.child=u,u.return=s;r.sibling!==null;)r=r.sibling,u=u.sibling=ho(r,r.pendingProps),u.return=s;u.sibling=null}return s.child}function Ok(r,s,u){switch(s.tag){case 3:og(s),is();break;case 5:km(s);break;case 1:yn(s.type)&&Fl(s);break;case 4:Tu(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,y=s.memoizedProps.value;Qe(Vl,f._currentValue),f._currentValue=y;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(Qe(pt,pt.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?ig(r,s,u):(Qe(pt,pt.current&1),r=Fr(r,s,u),r!==null?r.sibling:null);Qe(pt,pt.current&1);break;case 19:if(f=(u&s.childLanes)!==0,(r.flags&128)!==0){if(f)return ag(r,s,u);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Qe(pt,pt.current),f)break;return null;case 22:case 23:return s.lanes=0,tg(r,s,u)}return Fr(r,s,u)}var cg,Ju,ug,dg;cg=function(r,s){for(var u=s.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Ju=function(){},ug=function(r,s,u,f){var y=r.memoizedProps;if(y!==f){r=s.stateNode,Io(gr.current);var w=null;switch(u){case"input":y=Be(r,y),f=Be(r,f),w=[];break;case"select":y=R({},y,{value:void 0}),f=R({},f,{value:void 0}),w=[];break;case"textarea":y=Qt(r,y),f=Qt(r,f),w=[];break;default:typeof y.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=_l)}ae(u,f);var C;u=null;for(te in y)if(!f.hasOwnProperty(te)&&y.hasOwnProperty(te)&&y[te]!=null)if(te==="style"){var M=y[te];for(C in M)M.hasOwnProperty(C)&&(u||(u={}),u[C]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(i.hasOwnProperty(te)?w||(w=[]):(w=w||[]).push(te,null));for(te in f){var z=f[te];if(M=y!=null?y[te]:void 0,f.hasOwnProperty(te)&&z!==M&&(z!=null||M!=null))if(te==="style")if(M){for(C in M)!M.hasOwnProperty(C)||z&&z.hasOwnProperty(C)||(u||(u={}),u[C]="");for(C in z)z.hasOwnProperty(C)&&M[C]!==z[C]&&(u||(u={}),u[C]=z[C])}else u||(w||(w=[]),w.push(te,u)),u=z;else te==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,M=M?M.__html:void 0,z!=null&&M!==z&&(w=w||[]).push(te,z)):te==="children"?typeof z!="string"&&typeof z!="number"||(w=w||[]).push(te,""+z):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(i.hasOwnProperty(te)?(z!=null&&te==="onScroll"&&rt("scroll",r),w||M===z||(w=[])):(w=w||[]).push(te,z))}u&&(w=w||[]).push("style",u);var te=w;(s.updateQueue=te)&&(s.flags|=4)}},dg=function(r,s,u,f){u!==f&&(s.flags|=4)};function ki(r,s){if(!lt)switch(r.tailMode){case"hidden":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function on(r){var s=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(s)for(var y=r.child;y!==null;)u|=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;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=f,r.childLanes=u,s}function _k(r,s,u){var f=s.pendingProps;switch(bu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(s),null;case 1:return yn(s.type)&&$l(),on(s),null;case 3:return f=s.stateNode,us(),ot(xn),ot(nn),Iu(),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,tr!==null&&(cd(tr),tr=null))),Ju(r,s),on(s),null;case 5:Au(s);var y=Io(xi.current);if(u=s.type,r!==null&&s.stateNode!=null)ug(r,s,u,f,y),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return on(s),null}if(r=Io(gr.current),Hl(s)){f=s.stateNode,u=s.type;var w=s.memoizedProps;switch(f[mr]=s,f[fi]=w,r=(s.mode&1)!==0,u){case"dialog":rt("cancel",f),rt("close",f);break;case"iframe":case"object":case"embed":rt("load",f);break;case"video":case"audio":for(y=0;y<ci.length;y++)rt(ci[y],f);break;case"source":rt("error",f);break;case"img":case"image":case"link":rt("error",f),rt("load",f);break;case"details":rt("toggle",f);break;case"input":St(f,w),rt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!w.multiple},rt("invalid",f);break;case"textarea":mn(f,w),rt("invalid",f)}ae(u,w),y=null;for(var C in w)if(w.hasOwnProperty(C)){var M=w[C];C==="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(C)&&M!=null&&C==="onScroll"&&rt("scroll",f)}switch(u){case"input":ut(f),hn(f,w,!0);break;case"textarea":ut(f),Tn(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{C=y.nodeType===9?y:y.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=re(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=C.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=C.createElement(u,{is:f.is}):(r=C.createElement(u),u==="select"&&(C=r,f.multiple?C.multiple=!0:f.size&&(C.size=f.size))):r=C.createElementNS(r,u),r[mr]=s,r[fi]=f,cg(r,s,!1,!1),s.stateNode=r;e:{switch(C=ge(u,f),u){case"dialog":rt("cancel",r),rt("close",r),y=f;break;case"iframe":case"object":case"embed":rt("load",r),y=f;break;case"video":case"audio":for(y=0;y<ci.length;y++)rt(ci[y],r);y=f;break;case"source":rt("error",r),y=f;break;case"img":case"image":case"link":rt("error",r),rt("load",r),y=f;break;case"details":rt("toggle",r),y=f;break;case"input":St(r,f),y=Be(r,f),rt("invalid",r);break;case"option":y=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},y=R({},f,{value:void 0}),rt("invalid",r);break;case"textarea":mn(r,f),y=Qt(r,f),rt("invalid",r);break;default:y=f}ae(u,y),M=y;for(w in M)if(M.hasOwnProperty(w)){var z=M[w];w==="style"?Vt(r,z):w==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&ne(r,z)):w==="children"?typeof z=="string"?(u!=="textarea"||z!=="")&&me(r,z):typeof z=="number"&&me(r,""+z):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?z!=null&&w==="onScroll"&&rt("scroll",r):z!=null&&A(r,w,z,C))}switch(u){case"input":ut(r),hn(r,f,!1);break;case"textarea":ut(r),Tn(r);break;case"option":f.value!=null&&r.setAttribute("value",""+Ne(f.value));break;case"select":r.multiple=!!f.multiple,w=f.value,w!=null?Wt(r,!!f.multiple,w,!1):f.defaultValue!=null&&Wt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof y.onClick=="function"&&(r.onclick=_l)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return on(s),null;case 6:if(r&&s.stateNode!=null)dg(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(u=Io(xi.current),Io(gr.current),Hl(s)){if(f=s.stateNode,u=s.memoizedProps,f[mr]=s,(w=f.nodeValue!==u)&&(r=In,r!==null))switch(r.tag){case 3:Ol(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ol(f.nodeValue,u,(r.mode&1)!==0)}w&&(s.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[mr]=s,s.stateNode=f}return on(s),null;case 13:if(ot(pt),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(lt&&Ln!==null&&(s.mode&1)!==0&&(s.flags&128)===0)hm(),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[mr]=s}else is(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;on(s),w=!1}else tr!==null&&(cd(tr),tr=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=u,s):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(pt.current&1)!==0?Tt===0&&(Tt=3):fd())),s.updateQueue!==null&&(s.flags|=4),on(s),null);case 4:return us(),Ju(r,s),r===null&&ui(s.stateNode.containerInfo),on(s),null;case 10:return Nu(s.type._context),on(s),null;case 17:return yn(s.type)&&$l(),on(s),null;case 19:if(ot(pt),w=s.memoizedState,w===null)return on(s),null;if(f=(s.flags&128)!==0,C=w.rendering,C===null)if(f)ki(w,!1);else{if(Tt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(C=Yl(r),C!==null){for(s.flags|=128,ki(w,!1),f=C.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=u,u=s.child;u!==null;)w=u,r=f,w.flags&=14680066,C=w.alternate,C===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=C.childLanes,w.lanes=C.lanes,w.child=C.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=C.memoizedProps,w.memoizedState=C.memoizedState,w.updateQueue=C.updateQueue,w.type=C.type,r=C.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return Qe(pt,pt.current&1|2),s.child}r=r.sibling}w.tail!==null&&wt()>hs&&(s.flags|=128,f=!0,ki(w,!1),s.lanes=4194304)}else{if(!f)if(r=Yl(C),r!==null){if(s.flags|=128,f=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),ki(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!lt)return on(s),null}else 2*wt()-w.renderingStartTime>hs&&u!==1073741824&&(s.flags|=128,f=!0,ki(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(u=w.last,u!==null?u.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=wt(),s.sibling=null,u=pt.current,Qe(pt,f?u&1|2:u&1),s):(on(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?(On&1073741824)!==0&&(on(s),s.subtreeFlags&6&&(s.flags|=8192)):on(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function Mk(r,s){switch(bu(s),s.tag){case 1:return yn(s.type)&&$l(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return us(),ot(xn),ot(nn),Iu(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Au(s),null;case 13:if(ot(pt),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 ot(pt),null;case 4:return us(),null;case 10:return Nu(s.type._context),null;case 22:case 23:return dd(),null;case 24:return null;default:return null}}var oa=!1,sn=!1,$k=typeof WeakSet=="function"?WeakSet:Set,xe=null;function fs(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){gt(r,s,f)}else u.current=null}function Zu(r,s,u){try{u()}catch(f){gt(r,s,f)}}var fg=!1;function Fk(r,s){if(du=Sl,r=Wh(),ru(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var y=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var C=0,M=-1,z=-1,te=0,se=0,ie=r,oe=null;t:for(;;){for(var he;ie!==u||y!==0&&ie.nodeType!==3||(M=C+y),ie!==w||f!==0&&ie.nodeType!==3||(z=C+f),ie.nodeType===3&&(C+=ie.nodeValue.length),(he=ie.firstChild)!==null;)oe=ie,ie=he;for(;;){if(ie===r)break t;if(oe===u&&++te===y&&(M=C),oe===w&&++se===f&&(z=C),(he=ie.nextSibling)!==null)break;ie=oe,oe=ie.parentNode}ie=he}u=M===-1||z===-1?null:{start:M,end:z}}else u=null}u=u||{start:0,end:0}}else u=null;for(fu={focusedElem:r,selectionRange:u},Sl=!1,xe=s;xe!==null;)if(s=xe,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,xe=r;else for(;xe!==null;){s=xe;try{var be=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var we=be.memoizedProps,kt=be.memoizedState,K=s.stateNode,B=K.getSnapshotBeforeUpdate(s.elementType===s.type?we:nr(s.type,we),kt);K.__reactInternalSnapshotBeforeUpdate=B}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){gt(s,s.return,ue)}if(r=s.sibling,r!==null){r.return=s.return,xe=r;break}xe=s.return}return be=fg,fg=!1,be}function ji(r,s,u){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&&Zu(s,u,w)}y=y.next}while(y!==f)}}function sa(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var u=s=s.next;do{if((u.tag&r)===r){var f=u.create;u.destroy=f()}u=u.next}while(u!==s)}}function ed(r){var s=r.ref;if(s!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof s=="function"?s(r):s.current=r}}function pg(r){var s=r.alternate;s!==null&&(r.alternate=null,pg(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[mr],delete s[fi],delete s[gu],delete s[wk],delete s[kk])),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 hg(r){return r.tag===5||r.tag===3||r.tag===4}function mg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||hg(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,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?u.nodeType===8?u.parentNode.insertBefore(r,s):u.insertBefore(r,s):(u.nodeType===8?(s=u.parentNode,s.insertBefore(r,u)):(s=u,s.appendChild(r)),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=_l));else if(f!==4&&(r=r.child,r!==null))for(td(r,s,u),r=r.sibling;r!==null;)td(r,s,u),r=r.sibling}function nd(r,s,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?u.insertBefore(r,s):u.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(nd(r,s,u),r=r.sibling;r!==null;)nd(r,s,u),r=r.sibling}var Kt=null,rr=!1;function ao(r,s,u){for(u=u.child;u!==null;)gg(r,s,u),u=u.sibling}function gg(r,s,u){if(hr&&typeof hr.onCommitFiberUnmount=="function")try{hr.onCommitFiberUnmount(yl,u)}catch{}switch(u.tag){case 5:sn||fs(u,s);case 6:var f=Kt,y=rr;Kt=null,ao(r,s,u),Kt=f,rr=y,Kt!==null&&(rr?(r=Kt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):Kt.removeChild(u.stateNode));break;case 18:Kt!==null&&(rr?(r=Kt,u=u.stateNode,r.nodeType===8?mu(r.parentNode,u):r.nodeType===1&&mu(r,u),ti(r)):mu(Kt,u.stateNode));break;case 4:f=Kt,y=rr,Kt=u.stateNode.containerInfo,rr=!0,ao(r,s,u),Kt=f,rr=y;break;case 0:case 11:case 14:case 15:if(!sn&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){y=f=f.next;do{var w=y,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&Zu(u,s,C),y=y.next}while(y!==f)}ao(r,s,u);break;case 1:if(!sn&&(fs(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(M){gt(u,s,M)}ao(r,s,u);break;case 21:ao(r,s,u);break;case 22:u.mode&1?(sn=(f=sn)||u.memoizedState!==null,ao(r,s,u),sn=f):ao(r,s,u);break;default:ao(r,s,u)}}function xg(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new $k),s.forEach(function(f){var y=Gk.bind(null,r,f);u.has(f)||(u.add(f),f.then(y,y))})}}function or(r,s){var u=s.deletions;if(u!==null)for(var f=0;f<u.length;f++){var y=u[f];try{var w=r,C=s,M=C;e:for(;M!==null;){switch(M.tag){case 5:Kt=M.stateNode,rr=!1;break e;case 3:Kt=M.stateNode.containerInfo,rr=!0;break e;case 4:Kt=M.stateNode.containerInfo,rr=!0;break e}M=M.return}if(Kt===null)throw Error(n(160));gg(w,C,y),Kt=null,rr=!1;var z=y.alternate;z!==null&&(z.return=null),y.return=null}catch(te){gt(y,s,te)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)yg(s,r),s=s.sibling}function yg(r,s){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(or(s,r),yr(r),f&4){try{ji(3,r,r.return),sa(3,r)}catch(we){gt(r,r.return,we)}try{ji(5,r,r.return)}catch(we){gt(r,r.return,we)}}break;case 1:or(s,r),yr(r),f&512&&u!==null&&fs(u,u.return);break;case 5:if(or(s,r),yr(r),f&512&&u!==null&&fs(u,u.return),r.flags&32){var y=r.stateNode;try{me(y,"")}catch(we){gt(r,r.return,we)}}if(f&4&&(y=r.stateNode,y!=null)){var w=r.memoizedProps,C=u!==null?u.memoizedProps:w,M=r.type,z=r.updateQueue;if(r.updateQueue=null,z!==null)try{M==="input"&&w.type==="radio"&&w.name!=null&&Ot(y,w),ge(M,C);var te=ge(M,w);for(C=0;C<z.length;C+=2){var se=z[C],ie=z[C+1];se==="style"?Vt(y,ie):se==="dangerouslySetInnerHTML"?ne(y,ie):se==="children"?me(y,ie):A(y,se,ie,te)}switch(M){case"input":cn(y,w);break;case"textarea":Pn(y,w);break;case"select":var oe=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var he=w.value;he!=null?Wt(y,!!w.multiple,he,!1):oe!==!!w.multiple&&(w.defaultValue!=null?Wt(y,!!w.multiple,w.defaultValue,!0):Wt(y,!!w.multiple,w.multiple?[]:"",!1))}y[fi]=w}catch(we){gt(r,r.return,we)}}break;case 6:if(or(s,r),yr(r),f&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,w=r.memoizedProps;try{y.nodeValue=w}catch(we){gt(r,r.return,we)}}break;case 3:if(or(s,r),yr(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{ti(s.containerInfo)}catch(we){gt(r,r.return,we)}break;case 4:or(s,r),yr(r);break;case 13:or(s,r),yr(r),y=r.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(sd=wt())),f&4&&xg(r);break;case 22:if(se=u!==null&&u.memoizedState!==null,r.mode&1?(sn=(te=sn)||se,or(s,r),sn=te):or(s,r),yr(r),f&8192){if(te=r.memoizedState!==null,(r.stateNode.isHidden=te)&&!se&&(r.mode&1)!==0)for(xe=r,se=r.child;se!==null;){for(ie=xe=se;xe!==null;){switch(oe=xe,he=oe.child,oe.tag){case 0:case 11:case 14:case 15:ji(4,oe,oe.return);break;case 1:fs(oe,oe.return);var be=oe.stateNode;if(typeof be.componentWillUnmount=="function"){f=oe,u=oe.return;try{s=f,be.props=s.memoizedProps,be.state=s.memoizedState,be.componentWillUnmount()}catch(we){gt(f,u,we)}}break;case 5:fs(oe,oe.return);break;case 22:if(oe.memoizedState!==null){wg(ie);continue}}he!==null?(he.return=oe,xe=he):wg(ie)}se=se.sibling}e:for(se=null,ie=r;;){if(ie.tag===5){if(se===null){se=ie;try{y=ie.stateNode,te?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(M=ie.stateNode,z=ie.memoizedProps.style,C=z!=null&&z.hasOwnProperty("display")?z.display:null,M.style.display=Jt("display",C))}catch(we){gt(r,r.return,we)}}}else if(ie.tag===6){if(se===null)try{ie.stateNode.nodeValue=te?"":ie.memoizedProps}catch(we){gt(r,r.return,we)}}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:or(s,r),yr(r),f&4&&xg(r);break;case 21:break;default:or(s,r),yr(r)}}function yr(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if(hg(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var y=f.stateNode;f.flags&32&&(me(y,""),f.flags&=-33);var w=mg(r);nd(r,w,y);break;case 3:case 4:var C=f.stateNode.containerInfo,M=mg(r);td(r,M,C);break;default:throw Error(n(161))}}catch(z){gt(r,r.return,z)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function zk(r,s,u){xe=r,vg(r)}function vg(r,s,u){for(var f=(r.mode&1)!==0;xe!==null;){var y=xe,w=y.child;if(y.tag===22&&f){var C=y.memoizedState!==null||oa;if(!C){var M=y.alternate,z=M!==null&&M.memoizedState!==null||sn;M=oa;var te=sn;if(oa=C,(sn=z)&&!te)for(xe=y;xe!==null;)C=xe,z=C.child,C.tag===22&&C.memoizedState!==null?kg(y):z!==null?(z.return=C,xe=z):kg(y);for(;w!==null;)xe=w,vg(w),w=w.sibling;xe=y,oa=M,sn=te}bg(r)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,xe=w):bg(r)}}function bg(r){for(;xe!==null;){var s=xe;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:sn||sa(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!sn)if(u===null)f.componentDidMount();else{var y=s.elementType===s.type?u.memoizedProps:nr(s.type,u.memoizedProps);f.componentDidUpdate(y,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&wm(s,w,f);break;case 3:var C=s.updateQueue;if(C!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}wm(s,C,u)}break;case 5:var M=s.stateNode;if(u===null&&s.flags&4){u=M;var z=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&u.focus();break;case"img":z.src&&(u.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var te=s.alternate;if(te!==null){var se=te.memoizedState;if(se!==null){var ie=se.dehydrated;ie!==null&&ti(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}sn||s.flags&512&&ed(s)}catch(oe){gt(s,s.return,oe)}}if(s===r){xe=null;break}if(u=s.sibling,u!==null){u.return=s.return,xe=u;break}xe=s.return}}function wg(r){for(;xe!==null;){var s=xe;if(s===r){xe=null;break}var u=s.sibling;if(u!==null){u.return=s.return,xe=u;break}xe=s.return}}function kg(r){for(;xe!==null;){var s=xe;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{sa(4,s)}catch(z){gt(s,u,z)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var y=s.return;try{f.componentDidMount()}catch(z){gt(s,y,z)}}var w=s.return;try{ed(s)}catch(z){gt(s,w,z)}break;case 5:var C=s.return;try{ed(s)}catch(z){gt(s,C,z)}}}catch(z){gt(s,s.return,z)}if(s===r){xe=null;break}var M=s.sibling;if(M!==null){M.return=s.return,xe=M;break}xe=s.return}}var Bk=Math.ceil,ia=L.ReactCurrentDispatcher,rd=L.ReactCurrentOwner,qn=L.ReactCurrentBatchConfig,He=0,Ft=null,Ct=null,Gt=0,On=0,ps=ro(0),Tt=0,Si=null,Oo=0,la=0,od=0,Ci=null,bn=null,sd=0,hs=1/0,zr=null,aa=!1,id=null,co=null,ca=!1,uo=null,ua=0,Ni=0,ld=null,da=-1,fa=0;function dn(){return(He&6)!==0?wt():da!==-1?da:da=wt()}function fo(r){return(r.mode&1)===0?1:(He&2)!==0&&Gt!==0?Gt&-Gt:Sk.transition!==null?(fa===0&&(fa=mh()),fa):(r=Ke,r!==0||(r=window.event,r=r===void 0?16:Sh(r.type)),r)}function sr(r,s,u,f){if(50<Ni)throw Ni=0,ld=null,Error(n(185));Xs(r,u,f),((He&2)===0||r!==Ft)&&(r===Ft&&((He&2)===0&&(la|=u),Tt===4&&po(r,Gt)),wn(r,f),u===1&&He===0&&(s.mode&1)===0&&(hs=wt()+500,zl&&so()))}function wn(r,s){var u=r.callbackNode;S1(r,s);var f=wl(r,r===Ft?Gt:0);if(f===0)u!==null&&fh(u),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(u!=null&&fh(u),s===1)r.tag===0?jk(Sg.bind(null,r)):cm(Sg.bind(null,r)),vk(function(){(He&6)===0&&so()}),u=null;else{switch(gh(f)){case 1:u=zc;break;case 4:u=ph;break;case 16:u=xl;break;case 536870912:u=hh;break;default:u=xl}u=Dg(u,jg.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function jg(r,s){if(da=-1,fa=0,(He&6)!==0)throw Error(n(327));var u=r.callbackNode;if(ms()&&r.callbackNode!==u)return null;var f=wl(r,r===Ft?Gt:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=pa(r,f);else{s=f;var y=He;He|=2;var w=Ng();(Ft!==r||Gt!==s)&&(zr=null,hs=wt()+500,Mo(r,s));do try{Wk();break}catch(M){Cg(r,M)}while(!0);Cu(),ia.current=w,He=y,Ct!==null?s=0:(Ft=null,Gt=0,s=Tt)}if(s!==0){if(s===2&&(y=Bc(r),y!==0&&(f=y,s=ad(r,y))),s===1)throw u=Si,Mo(r,0),po(r,f),wn(r,wt()),u;if(s===6)po(r,f);else{if(y=r.current.alternate,(f&30)===0&&!Uk(y)&&(s=pa(r,f),s===2&&(w=Bc(r),w!==0&&(f=w,s=ad(r,w))),s===1))throw u=Si,Mo(r,0),po(r,f),wn(r,wt()),u;switch(r.finishedWork=y,r.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:$o(r,bn,zr);break;case 3:if(po(r,f),(f&130023424)===f&&(s=sd+500-wt(),10<s)){if(wl(r,0)!==0)break;if(y=r.suspendedLanes,(y&f)!==f){dn(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=hu($o.bind(null,r,bn,zr),s);break}$o(r,bn,zr);break;case 4:if(po(r,f),(f&4194240)===f)break;for(s=r.eventTimes,y=-1;0<f;){var C=31-Zn(f);w=1<<C,C=s[C],C>y&&(y=C),f&=~w}if(f=y,f=wt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Bk(f/1960))-f,10<f){r.timeoutHandle=hu($o.bind(null,r,bn,zr),f);break}$o(r,bn,zr);break;case 5:$o(r,bn,zr);break;default:throw Error(n(329))}}}return wn(r,wt()),r.callbackNode===u?jg.bind(null,r):null}function ad(r,s){var u=Ci;return r.current.memoizedState.isDehydrated&&(Mo(r,s).flags|=256),r=pa(r,s),r!==2&&(s=bn,bn=u,s!==null&&cd(s)),r}function cd(r){bn===null?bn=r:bn.push.apply(bn,r)}function Uk(r){for(var s=r;;){if(s.flags&16384){var u=s.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var y=u[f],w=y.getSnapshot;y=y.value;try{if(!er(w(),y))return!1}catch{return!1}}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;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 po(r,s){for(s&=~od,s&=~la,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-Zn(s),f=1<<u;r[u]=-1,s&=~f}}function Sg(r){if((He&6)!==0)throw Error(n(327));ms();var s=wl(r,0);if((s&1)===0)return wn(r,wt()),null;var u=pa(r,s);if(r.tag!==0&&u===2){var f=Bc(r);f!==0&&(s=f,u=ad(r,f))}if(u===1)throw u=Si,Mo(r,0),po(r,s),wn(r,wt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,$o(r,bn,zr),wn(r,wt()),null}function ud(r,s){var u=He;He|=1;try{return r(s)}finally{He=u,He===0&&(hs=wt()+500,zl&&so())}}function _o(r){uo!==null&&uo.tag===0&&(He&6)===0&&ms();var s=He;He|=1;var u=qn.transition,f=Ke;try{if(qn.transition=null,Ke=1,r)return r()}finally{Ke=f,qn.transition=u,He=s,(He&6)===0&&so()}}function dd(){On=ps.current,ot(ps)}function Mo(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,yk(u)),Ct!==null)for(u=Ct.return;u!==null;){var f=u;switch(bu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&$l();break;case 3:us(),ot(xn),ot(nn),Iu();break;case 5:Au(f);break;case 4:us();break;case 13:ot(pt);break;case 19:ot(pt);break;case 10:Nu(f.type._context);break;case 22:case 23:dd()}u=u.return}if(Ft=r,Ct=r=ho(r.current,null),Gt=On=s,Tt=0,Si=null,od=la=Oo=0,bn=Ci=null,Do!==null){for(s=0;s<Do.length;s++)if(u=Do[s],f=u.interleaved,f!==null){u.interleaved=null;var y=f.next,w=u.pending;if(w!==null){var C=w.next;w.next=y,f.next=C}u.pending=f}Do=null}return r}function Cg(r,s){do{var u=Ct;try{if(Cu(),Xl.current=ea,Ql){for(var f=ht.memoizedState;f!==null;){var y=f.queue;y!==null&&(y.pending=null),f=f.next}Ql=!1}if(Lo=0,$t=Pt=ht=null,yi=!1,vi=0,rd.current=null,u===null||u.return===null){Tt=1,Si=s,Ct=null;break}e:{var w=r,C=u.return,M=u,z=s;if(s=Gt,M.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var te=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=Xm(C);if(he!==null){he.flags&=-257,Qm(he,C,M,w,s),he.mode&1&&Ym(w,te,s),s=he,z=te;var be=s.updateQueue;if(be===null){var we=new Set;we.add(z),s.updateQueue=we}else be.add(z);break e}else{if((s&1)===0){Ym(w,te,s),fd();break e}z=Error(n(426))}}else if(lt&&M.mode&1){var kt=Xm(C);if(kt!==null){(kt.flags&65536)===0&&(kt.flags|=256),Qm(kt,C,M,w,s),ju(ds(z,M));break e}}w=z=ds(z,M),Tt!==4&&(Tt=2),Ci===null?Ci=[w]:Ci.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var K=Km(w,z,s);bm(w,K);break e;case 1:M=z;var B=w.type,Q=w.stateNode;if((w.flags&128)===0&&(typeof B.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(co===null||!co.has(Q)))){w.flags|=65536,s&=-s,w.lanes|=s;var ue=Gm(w,M,s);bm(w,ue);break e}}w=w.return}while(w!==null)}Rg(u)}catch(Se){s=Se,Ct===u&&u!==null&&(Ct=u=u.return);continue}break}while(!0)}function Ng(){var r=ia.current;return ia.current=ea,r===null?ea:r}function fd(){(Tt===0||Tt===3||Tt===2)&&(Tt=4),Ft===null||(Oo&268435455)===0&&(la&268435455)===0||po(Ft,Gt)}function pa(r,s){var u=He;He|=2;var f=Ng();(Ft!==r||Gt!==s)&&(zr=null,Mo(r,s));do try{Hk();break}catch(y){Cg(r,y)}while(!0);if(Cu(),He=u,ia.current=f,Ct!==null)throw Error(n(261));return Ft=null,Gt=0,Tt}function Hk(){for(;Ct!==null;)Eg(Ct)}function Wk(){for(;Ct!==null&&!m1();)Eg(Ct)}function Eg(r){var s=Ag(r.alternate,r,On);r.memoizedProps=r.pendingProps,s===null?Rg(r):Ct=s,rd.current=null}function Rg(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=_k(u,s,On),u!==null){Ct=u;return}}else{if(u=Mk(u,s),u!==null){u.flags&=32767,Ct=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Tt=6,Ct=null;return}}if(s=s.sibling,s!==null){Ct=s;return}Ct=s=r}while(s!==null);Tt===0&&(Tt=5)}function $o(r,s,u){var f=Ke,y=qn.transition;try{qn.transition=null,Ke=1,Vk(r,s,u,f)}finally{qn.transition=y,Ke=f}return null}function Vk(r,s,u,f){do ms();while(uo!==null);if((He&6)!==0)throw Error(n(327));u=r.finishedWork;var y=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var w=u.lanes|u.childLanes;if(C1(r,w),r===Ft&&(Ct=Ft=null,Gt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||ca||(ca=!0,Dg(xl,function(){return ms(),null})),w=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||w){w=qn.transition,qn.transition=null;var C=Ke;Ke=1;var M=He;He|=4,rd.current=null,Fk(r,u),yg(u,r),dk(fu),Sl=!!du,fu=du=null,r.current=u,zk(u),g1(),He=M,Ke=C,qn.transition=w}else r.current=u;if(ca&&(ca=!1,uo=r,ua=y),w=r.pendingLanes,w===0&&(co=null),v1(u.stateNode),wn(r,wt()),s!==null)for(f=r.onRecoverableError,u=0;u<s.length;u++)y=s[u],f(y.value,{componentStack:y.stack,digest:y.digest});if(aa)throw aa=!1,r=id,id=null,r;return(ua&1)!==0&&r.tag!==0&&ms(),w=r.pendingLanes,(w&1)!==0?r===ld?Ni++:(Ni=0,ld=r):Ni=0,so(),null}function ms(){if(uo!==null){var r=gh(ua),s=qn.transition,u=Ke;try{if(qn.transition=null,Ke=16>r?16:r,uo===null)var f=!1;else{if(r=uo,uo=null,ua=0,(He&6)!==0)throw Error(n(331));var y=He;for(He|=4,xe=r.current;xe!==null;){var w=xe,C=w.child;if((xe.flags&16)!==0){var M=w.deletions;if(M!==null){for(var z=0;z<M.length;z++){var te=M[z];for(xe=te;xe!==null;){var se=xe;switch(se.tag){case 0:case 11:case 15:ji(8,se,w)}var ie=se.child;if(ie!==null)ie.return=se,xe=ie;else for(;xe!==null;){se=xe;var oe=se.sibling,he=se.return;if(pg(se),se===te){xe=null;break}if(oe!==null){oe.return=he,xe=oe;break}xe=he}}}var be=w.alternate;if(be!==null){var we=be.child;if(we!==null){be.child=null;do{var kt=we.sibling;we.sibling=null,we=kt}while(we!==null)}}xe=w}}if((w.subtreeFlags&2064)!==0&&C!==null)C.return=w,xe=C;else e:for(;xe!==null;){if(w=xe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:ji(9,w,w.return)}var K=w.sibling;if(K!==null){K.return=w.return,xe=K;break e}xe=w.return}}var B=r.current;for(xe=B;xe!==null;){C=xe;var Q=C.child;if((C.subtreeFlags&2064)!==0&&Q!==null)Q.return=C,xe=Q;else e:for(C=B;xe!==null;){if(M=xe,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:sa(9,M)}}catch(Se){gt(M,M.return,Se)}if(M===C){xe=null;break e}var ue=M.sibling;if(ue!==null){ue.return=M.return,xe=ue;break e}xe=M.return}}if(He=y,so(),hr&&typeof hr.onPostCommitFiberRoot=="function")try{hr.onPostCommitFiberRoot(yl,r)}catch{}f=!0}return f}finally{Ke=u,qn.transition=s}}return!1}function Pg(r,s,u){s=ds(u,s),s=Km(r,s,1),r=lo(r,s,1),s=dn(),r!==null&&(Xs(r,1,s),wn(r,s))}function gt(r,s,u){if(r.tag===3)Pg(r,r,u);else for(;s!==null;){if(s.tag===3){Pg(s,r,u);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(co===null||!co.has(f))){r=ds(u,r),r=Gm(s,r,1),s=lo(s,r,1),r=dn(),s!==null&&(Xs(s,1,r),wn(s,r));break}}s=s.return}}function qk(r,s,u){var f=r.pingCache;f!==null&&f.delete(s),s=dn(),r.pingedLanes|=r.suspendedLanes&u,Ft===r&&(Gt&u)===u&&(Tt===4||Tt===3&&(Gt&130023424)===Gt&&500>wt()-sd?Mo(r,0):od|=u),wn(r,s)}function Tg(r,s){s===0&&((r.mode&1)===0?s=1:(s=bl,bl<<=1,(bl&130023424)===0&&(bl=4194304)));var u=dn();r=Mr(r,s),r!==null&&(Xs(r,s,u),wn(r,u))}function Kk(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),Tg(r,u)}function Gk(r,s){var u=0;switch(r.tag){case 13:var f=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Tg(r,u)}var Ag;Ag=function(r,s,u){if(r!==null)if(r.memoizedProps!==s.pendingProps||xn.current)vn=!0;else{if((r.lanes&u)===0&&(s.flags&128)===0)return vn=!1,Ok(r,s,u);vn=(r.flags&131072)!==0}else vn=!1,lt&&(s.flags&1048576)!==0&&um(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,nn.current);cs(s,u),y=_u(null,s,f,r,y,u);var w=Mu();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,yn(f)?(w=!0,Fl(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Pu(s),y.updater=ta,s.stateNode=y,y._reactInternals=s,Hu(s,f,r,u),s=Ku(null,s,f,!0,w,u)):(s.tag=0,lt&&w&&vu(s),un(null,s,y,u),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=Xk(f),r=nr(f,r),y){case 0:s=qu(null,s,f,r,u);break e;case 1:s=rg(null,s,f,r,u);break e;case 11:s=Jm(null,s,f,r,u);break e;case 14:s=Zm(null,s,f,nr(f.type,r),u);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:nr(f,y),qu(r,s,f,y,u);case 1:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:nr(f,y),rg(r,s,f,y,u);case 3:e:{if(og(s),r===null)throw Error(n(387));f=s.pendingProps,w=s.memoizedState,y=w.element,vm(r,s),Gl(s,f,null,u);var C=s.memoizedState;if(f=C.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){y=ds(Error(n(423)),s),s=sg(r,s,f,u,y);break e}else if(f!==y){y=ds(Error(n(424)),s),s=sg(r,s,f,u,y);break e}else for(Ln=no(s.stateNode.containerInfo.firstChild),In=s,lt=!0,tr=null,u=xm(s,null,f,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(is(),f===y){s=Fr(r,s,u);break e}un(r,s,f,u)}s=s.child}return s;case 5:return km(s),r===null&&ku(s),f=s.type,y=s.pendingProps,w=r!==null?r.memoizedProps:null,C=y.children,pu(f,y)?C=null:w!==null&&pu(f,w)&&(s.flags|=32),ng(r,s),un(r,s,C,u),s.child;case 6:return r===null&&ku(s),null;case 13:return ig(r,s,u);case 4:return Tu(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=ls(s,null,f,u):un(r,s,f,u),s.child;case 11:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:nr(f,y),Jm(r,s,f,y,u);case 7:return un(r,s,s.pendingProps,u),s.child;case 8:return un(r,s,s.pendingProps.children,u),s.child;case 12:return un(r,s,s.pendingProps.children,u),s.child;case 10:e:{if(f=s.type._context,y=s.pendingProps,w=s.memoizedProps,C=y.value,Qe(Vl,f._currentValue),f._currentValue=C,w!==null)if(er(w.value,C)){if(w.children===y.children&&!xn.current){s=Fr(r,s,u);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var M=w.dependencies;if(M!==null){C=w.child;for(var z=M.firstContext;z!==null;){if(z.context===f){if(w.tag===1){z=$r(-1,u&-u),z.tag=2;var te=w.updateQueue;if(te!==null){te=te.shared;var se=te.pending;se===null?z.next=z:(z.next=se.next,se.next=z),te.pending=z}}w.lanes|=u,z=w.alternate,z!==null&&(z.lanes|=u),Eu(w.return,u,s),M.lanes|=u;break}z=z.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(n(341));C.lanes|=u,M=C.alternate,M!==null&&(M.lanes|=u),Eu(C,u,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}un(r,s,y.children,u),s=s.child}return s;case 9:return y=s.type,f=s.pendingProps.children,cs(s,u),y=Wn(y),f=f(y),s.flags|=1,un(r,s,f,u),s.child;case 14:return f=s.type,y=nr(f,s.pendingProps),y=nr(f.type,y),Zm(r,s,f,y,u);case 15:return eg(r,s,s.type,s.pendingProps,u);case 17:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:nr(f,y),ra(r,s),s.tag=1,yn(f)?(r=!0,Fl(s)):r=!1,cs(s,u),Vm(s,f,y),Hu(s,f,y,u),Ku(null,s,f,!0,r,u);case 19:return ag(r,s,u);case 22:return tg(r,s,u)}throw Error(n(156,s.tag))};function Dg(r,s){return dh(r,s)}function Yk(r,s,u,f){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=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 Kn(r,s,u,f){return new Yk(r,s,u,f)}function pd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Xk(r){if(typeof r=="function")return pd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===q)return 11;if(r===_)return 14}return 2}function ho(r,s){var u=r.alternate;return u===null?(u=Kn(r.tag,s,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=s,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,s=r.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function ha(r,s,u,f,y,w){var C=2;if(f=r,typeof r=="function")pd(r)&&(C=1);else if(typeof r=="string")C=5;else e:switch(r){case $:return Fo(u.children,y,w,s);case E:C=8,y|=8;break;case H:return r=Kn(12,u,s,y|2),r.elementType=H,r.lanes=w,r;case Y:return r=Kn(13,u,s,y),r.elementType=Y,r.lanes=w,r;case X:return r=Kn(19,u,s,y),r.elementType=X,r.lanes=w,r;case V:return ma(u,y,w,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Z:C=10;break e;case G:C=9;break e;case q:C=11;break e;case _:C=14;break e;case D:C=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=Kn(C,u,s,y),s.elementType=r,s.type=f,s.lanes=w,s}function Fo(r,s,u,f){return r=Kn(7,r,f,s),r.lanes=u,r}function ma(r,s,u,f){return r=Kn(22,r,f,s),r.elementType=V,r.lanes=u,r.stateNode={isHidden:!1},r}function hd(r,s,u){return r=Kn(6,r,null,s),r.lanes=u,r}function md(r,s,u){return s=Kn(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function Qk(r,s,u,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=Uc(0),this.expirationTimes=Uc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uc(0),this.identifierPrefix=f,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function gd(r,s,u,f,y,w,C,M,z){return r=new Qk(r,s,u,M,z),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Kn(3,null,null,s),r.current=w,w.stateNode=r,w.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pu(w),r}function Jk(r,s,u){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:u}}function Ig(r){if(!r)return oo;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(yn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(yn(u))return lm(r,u,s)}return s}function Lg(r,s,u,f,y,w,C,M,z){return r=gd(u,f,!0,r,y,w,C,M,z),r.context=Ig(null),u=r.current,f=dn(),y=fo(u),w=$r(f,y),w.callback=s??null,lo(u,w,y),r.current.lanes=y,Xs(r,y,f),wn(r,f),r}function ga(r,s,u,f){var y=s.current,w=dn(),C=fo(y);return u=Ig(u),s.context===null?s.context=u:s.pendingContext=u,s=$r(w,C),s.payload={element:r},f=f===void 0?null:f,f!==null&&(s.callback=f),r=lo(y,s,C),r!==null&&(sr(r,y,C,w),Kl(r,y,C)),C}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 Og(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function xd(r,s){Og(r,s),(r=r.alternate)&&Og(r,s)}function Zk(){return null}var _g=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[Ir]=null}};function ya(r){this._internalRoot=r}ya.prototype.unstable_scheduleHydration=function(r){if(r){var s=vh();r={blockedOn:null,target:r,priority:s};for(var u=0;u<Zr.length&&s!==0&&s<Zr[u].priority;u++);Zr.splice(u,0,r),u===0&&kh(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 Mg(){}function ej(r,s,u,f,y){if(y){if(typeof f=="function"){var w=f;f=function(){var te=xa(C);w.call(te)}}var C=Lg(s,f,r,0,null,!1,!1,"",Mg);return r._reactRootContainer=C,r[Ir]=C.current,ui(r.nodeType===8?r.parentNode:r),_o(),C}for(;y=r.lastChild;)r.removeChild(y);if(typeof f=="function"){var M=f;f=function(){var te=xa(z);M.call(te)}}var z=gd(r,0,!1,null,null,!1,!1,"",Mg);return r._reactRootContainer=z,r[Ir]=z.current,ui(r.nodeType===8?r.parentNode:r),_o(function(){ga(s,z,u,f)}),z}function ba(r,s,u,f,y){var w=u._reactRootContainer;if(w){var C=w;if(typeof y=="function"){var M=y;y=function(){var z=xa(C);M.call(z)}}ga(s,C,r,y)}else C=ej(u,s,r,y,f);return xa(C)}xh=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=Ys(s.pendingLanes);u!==0&&(Hc(s,u|1),wn(s,wt()),(He&6)===0&&(hs=wt()+500,so()))}break;case 13:_o(function(){var f=Mr(r,1);if(f!==null){var y=dn();sr(f,r,1,y)}}),xd(r,1)}},Wc=function(r){if(r.tag===13){var s=Mr(r,134217728);if(s!==null){var u=dn();sr(s,r,134217728,u)}xd(r,134217728)}},yh=function(r){if(r.tag===13){var s=fo(r),u=Mr(r,s);if(u!==null){var f=dn();sr(u,r,s,f)}xd(r,s)}},vh=function(){return Ke},bh=function(r,s){var u=Ke;try{return Ke=r,s()}finally{Ke=u}},Zt=function(r,s,u){switch(s){case"input":if(cn(r,u),s=u.name,u.type==="radio"&&s!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<u.length;s++){var f=u[s];if(f!==r&&f.form===r.form){var y=Ml(f);if(!y)throw Error(n(90));tt(f),cn(f,y)}}}break;case"textarea":Pn(r,u);break;case"select":s=u.value,s!=null&&Wt(r,!!u.multiple,s,!1)}},qt=ud,en=_o;var tj={usingClientEntryPoint:!1,Events:[pi,ts,Ml,bt,Mt,ud]},Ei={findFiberByHostInstance:Ro,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nj={bundleType:Ei.bundleType,version:Ei.version,rendererPackageName:Ei.rendererPackageName,rendererConfig:Ei.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=ch(r),r===null?null:r.stateNode},findFiberByHostInstance:Ei.findFiberByHostInstance||Zk,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(nj),hr=wa}catch{}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tj,kn.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vd(s))throw Error(n(200));return Jk(r,s,null,u)},kn.createRoot=function(r,s){if(!vd(r))throw Error(n(299));var u=!1,f="",y=_g;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=gd(r,1,!1,null,null,u,!1,f,y),r[Ir]=s.current,ui(r.nodeType===8?r.parentNode:r),new yd(s)},kn.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=ch(s),r=r===null?null:r.stateNode,r},kn.flushSync=function(r){return _o(r)},kn.hydrate=function(r,s,u){if(!va(s))throw Error(n(200));return ba(null,r,s,!0,u)},kn.hydrateRoot=function(r,s,u){if(!vd(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,y=!1,w="",C=_g;if(u!=null&&(u.unstable_strictMode===!0&&(y=!0),u.identifierPrefix!==void 0&&(w=u.identifierPrefix),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),s=Lg(s,null,r,1,u??null,y,!1,w,C),r[Ir]=s.current,ui(r),f)for(r=0;r<f.length;r++)u=f[r],y=u._getVersion,y=y(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,y]:s.mutableSourceEagerHydrationData.push(u,y);return new ya(s)},kn.render=function(r,s,u){if(!va(s))throw Error(n(200));return ba(null,r,s,!1,u)},kn.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[Ir]=null})}),!0):!1},kn.unstable_batchedUpdates=ud,kn.unstable_renderSubtreeIntoContainer=function(r,s,u,f){if(!va(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return ba(r,s,u,!1,f)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var Vg;function Qy(){if(Vg)return kd.exports;Vg=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=uj(),kd.exports}var qg;function dj(){if(qg)return ka;qg=1;var e=Qy();return ka.createRoot=e.createRoot,ka.hydrateRoot=e.hydrateRoot,ka}var fj=dj();/**
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 Kg="popstate";function Gg(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function pj(e={}){function t(o,i){var h;let a=(h=i.state)==null?void 0:h.masked,{pathname:c,search:d,hash:p}=a||o.location;return hf("",{pathname:c,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:Gi(i)}return mj(t,n,null,e)}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ir(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hj(){return Math.random().toString(36).substring(2,10)}function Yg(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 hf(e,t,n=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ls(t):t,state:n,key:t&&t.key||o||hj(),unstable_mask:i}}function Gi({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 Ls(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 mj(e,t,n,o={}){let{window:i=document.defaultView,v5Compat:a=!1}=o,c=i.history,d="POP",p=null,h=m();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function m(){return(c.state||{idx:null}).idx}function x(){d="POP";let j=m(),S=j==null?null:j-h;h=j,p&&p({action:d,location:k.location,delta:S})}function v(j,S){d="PUSH";let T=Gg(j)?j:hf(k.location,j,S);h=m()+1;let A=Yg(T,h),L=k.createHref(T.unstable_mask||T);try{c.pushState(A,"",L)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(L)}a&&p&&p({action:d,location:k.location,delta:1})}function b(j,S){d="REPLACE";let T=Gg(j)?j:hf(k.location,j,S);h=m();let A=Yg(T,h),L=k.createHref(T.unstable_mask||T);c.replaceState(A,"",L),a&&p&&p({action:d,location:k.location,delta:0})}function N(j){return gj(j)}let k={get action(){return d},get location(){return e(i,c)},listen(j){if(p)throw new Error("A history only accepts one active listener");return i.addEventListener(Kg,x),p=j,()=>{i.removeEventListener(Kg,x),p=null}},createHref(j){return t(i,j)},createURL:N,encodeLocation(j){let S=N(j);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:v,replace:b,go(j){return c.go(j)}};return k}function gj(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mt(n,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Gi(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=n+o),new URL(o,n)}function Jy(e,t,n="/"){return xj(e,t,n,!1)}function xj(e,t,n,o){let i=typeof t=="string"?Ls(t):t,a=Wr(i.pathname||"/",n);if(a==null)return null;let c=Zy(e);yj(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let h=Pj(a);d=Ej(c[p],h,o)}return d}function Zy(e,t=[],n=[],o="",i=!1){let a=(c,d,p=i,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(o)&&p)return;mt(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=jr([o,m.relativePath]),v=n.concat(m);c.children&&c.children.length>0&&(mt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Zy(c.children,t,v,x,p)),!(c.path==null&&!c.index)&&t.push({path:x,score:Cj(x,c.index),routesMeta:v})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))a(c,d);else for(let h of ev(c.path))a(c,d,!0,h)}),t}function ev(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 c=ev(o.join("/")),d=[];return d.push(...c.map(p=>p===""?a:[a,p].join("/"))),i&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function yj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Nj(t.routesMeta.map(o=>o.childrenIndex),n.routesMeta.map(o=>o.childrenIndex)))}var vj=/^:[\w-]+$/,bj=3,wj=2,kj=1,jj=10,Sj=-2,Xg=e=>e==="*";function Cj(e,t){let n=e.split("/"),o=n.length;return n.some(Xg)&&(o+=Sj),t&&(o+=wj),n.filter(i=>!Xg(i)).reduce((i,a)=>i+(vj.test(a)?bj:a===""?kj:jj),o)}function Nj(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 Ej(e,t,n=!1){let{routesMeta:o}=e,i={},a="/",c=[];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),c.push({params:i,pathname:jr([a,x.pathname]),pathnameBase:Ij(jr([a,x.pathnameBase])),route:v}),x.pathnameBase!=="/"&&(a=jr([a,x.pathnameBase]))}return c}function qa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,o]=Rj(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],c=a.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((h,{paramName:m,isOptional:x},v)=>{if(m==="*"){let N=d[v]||"";c=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:c,pattern:e}}function Rj(e,t=!1,n=!0){ir(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,(c,d,p,h,m)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let x=m.charAt(h+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function Pj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ir(!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 Wr(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 Tj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Aj(e,t="/"){let{pathname:n,search:o="",hash:i=""}=typeof e=="string"?Ls(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=Qg(n.substring(1),"/"):a=Qg(n,t)):a=t,{pathname:a,search:Lj(o),hash:Oj(i)}}function Qg(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 Dj(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tv(e){let t=Dj(e);return t.map((n,o)=>o===t.length-1?n.pathname:n.pathnameBase)}function Kf(e,t,n,o=!1){let i;typeof e=="string"?i=Ls(e):(i={...e},mt(!i.pathname||!i.pathname.includes("?"),Cd("?","pathname","search",i)),mt(!i.pathname||!i.pathname.includes("#"),Cd("#","pathname","hash",i)),mt(!i.search||!i.search.includes("#"),Cd("#","search","hash",i)));let a=e===""||i.pathname==="",c=a?"/":i.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!o&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),x-=1;i.pathname=v.join("/")}d=x>=0?t[x]:"/"}let p=Aj(i,d),h=c&&c!=="/"&&c.endsWith("/"),m=(a||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(h||m)&&(p.pathname+="/"),p}var jr=e=>e.join("/").replace(/\/\/+/g,"/"),Ij=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Oj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,_j=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 Mj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function $j(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var nv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function rv(e,t){let n=e;if(typeof n!="string"||!Tj.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let o=n,i=!1;if(nv)try{let a=new URL(window.location.href),c=n.startsWith("//")?new URL(a.protocol+n):new URL(n),d=Wr(c.pathname,t);c.origin===a.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{ir(!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 ov=["POST","PUT","PATCH","DELETE"];new Set(ov);var Fj=["GET",...ov];new Set(Fj);var Os=g.createContext(null);Os.displayName="DataRouter";var ac=g.createContext(null);ac.displayName="DataRouterState";var zj=g.createContext(!1),sv=g.createContext({isTransitioning:!1});sv.displayName="ViewTransition";var Bj=g.createContext(new Map);Bj.displayName="Fetchers";var Uj=g.createContext(null);Uj.displayName="Await";var Xn=g.createContext(null);Xn.displayName="Navigation";var nl=g.createContext(null);nl.displayName="Location";var dr=g.createContext({outlet:null,matches:[],isDataRoute:!1});dr.displayName="Route";var Gf=g.createContext(null);Gf.displayName="RouteError";var iv="REACT_ROUTER_ERROR",Hj="REDIRECT",Wj="ROUTE_ERROR_RESPONSE";function Vj(e){if(e.startsWith(`${iv}:${Hj}:{`))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 qj(e){if(e.startsWith(`${iv}:${Wj}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new _j(t.status,t.statusText,t.data)}catch{}}function Kj(e,{relative:t}={}){mt(rl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=g.useContext(Xn),{hash:i,pathname:a,search:c}=ol(e,{relative:t}),d=a;return n!=="/"&&(d=a==="/"?n:jr([n,a])),o.createHref({pathname:d,search:c,hash:i})}function rl(){return g.useContext(nl)!=null}function fn(){return mt(rl(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(nl).location}var lv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function av(e){g.useContext(Xn).static||g.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=g.useContext(dr);return e?aS():Gj()}function Gj(){mt(rl(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(Os),{basename:t,navigator:n}=g.useContext(Xn),{matches:o}=g.useContext(dr),{pathname:i}=fn(),a=JSON.stringify(tv(o)),c=g.useRef(!1);return av(()=>{c.current=!0}),g.useCallback((p,h={})=>{if(ir(c.current,lv),!c.current)return;if(typeof p=="number"){n.go(p);return}let m=Kf(p,JSON.parse(a),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:jr([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,a,i,e])}var Yj=g.createContext(null);function Xj(e){let t=g.useContext(dr).outlet;return g.useMemo(()=>t&&g.createElement(Yj.Provider,{value:e},t),[t,e])}function Et(){let{matches:e}=g.useContext(dr),t=e[e.length-1];return t?t.params:{}}function ol(e,{relative:t}={}){let{matches:n}=g.useContext(dr),{pathname:o}=fn(),i=JSON.stringify(tv(n));return g.useMemo(()=>Kf(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function Qj(e,t){return cv(e,t)}function cv(e,t,n){var j;mt(rl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Xn),{matches:i}=g.useContext(dr),a=i[i.length-1],c=a?a.params:{},d=a?a.pathname:"/",p=a?a.pathnameBase:"/",h=a&&a.route;{let S=h&&h.path||"";dv(d,!h||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
+
51
+ Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let m=fn(),x;if(t){let S=typeof t=="string"?Ls(t):t;mt(p==="/"||((j=S.pathname)==null?void 0:j.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${S.pathname}" was given in the \`location\` prop.`),x=S}else x=m;let v=x.pathname||"/",b=v;if(p!=="/"){let S=p.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(S.length).join("/")}let N=Jy(e,{pathname:b});ir(h||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),ir(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=nS(N&&N.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:jr([p,o.encodeLocation?o.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:jr([p,o.encodeLocation?o.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,n);return t&&k?g.createElement(nl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function Jj(){let e=lS(),t=Mj(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},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=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,c)}var Zj=g.createElement(Jj,null),uv=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=qj(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(dr.Provider,{value:this.props.routeContext},g.createElement(Gf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(eS,{error:e},t):t}};uv.contextType=zj;var Nd=new WeakMap;function eS({children:e,error:t}){let{basename:n}=g.useContext(Xn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=Vj(t.digest);if(o){let i=Nd.get(t);if(i)throw i;let a=rv(o.location,n);if(nv&&!Nd.get(t))if(a.isExternal||o.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:o.replace}));throw Nd.set(t,c),c}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function tS({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(dr.Provider,{value:e},n)}function nS(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);mt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,m+1))}let c=!1,d=-1;if(n&&o){c=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&&(c=!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:$j(o.matches),errorInfo:x})}:void 0;return i.reduceRight((m,x,v)=>{let b,N=!1,k=null,j=null;o&&(b=a&&x.route.id?a[x.route.id]:void 0,k=x.route.errorElement||Zj,c&&(d<0&&v===0?(dv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,j=null):d===v&&(N=!0,j=x.route.hydrateFallbackElement||null)));let S=t.concat(i.slice(0,v+1)),T=()=>{let A;return b?A=k:N?A=j:x.route.Component?A=g.createElement(x.route.Component,null):x.route.element?A=x.route.element:A=m,g.createElement(tS,{match:x,routeContext:{outlet:m,matches:S,isDataRoute:o!=null},children:A})};return o&&(x.route.ErrorBoundary||x.route.errorElement||v===0)?g.createElement(uv,{location:o.location,revalidation:o.revalidation,component:k,error:b,children:T(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:h}):T()},null)}function Yf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rS(e){let t=g.useContext(Os);return mt(t,Yf(e)),t}function oS(e){let t=g.useContext(ac);return mt(t,Yf(e)),t}function sS(e){let t=g.useContext(dr);return mt(t,Yf(e)),t}function Xf(e){let t=sS(e),n=t.matches[t.matches.length-1];return mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function iS(){return Xf("useRouteId")}function lS(){var o;let e=g.useContext(Gf),t=oS("useRouteError"),n=Xf("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[n]}function aS(){let{router:e}=rS("useNavigate"),t=Xf("useNavigate"),n=g.useRef(!1);return av(()=>{n.current=!0}),g.useCallback(async(i,a={})=>{ir(n.current,lv),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var Jg={};function dv(e,t,n){!t&&!Jg[e]&&(Jg[e]=!0,ir(!1,n))}g.memo(cS);function cS({routes:e,future:t,state:n,isStatic:o,onError:i}){return cv(e,void 0,{state:n,isStatic:o,onError:i})}function uS(e){return Xj(e.context)}function Le(e){mt(!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 dS({basename:e="/",children:t=null,location:n,navigationType:o="POP",navigator:i,static:a=!1,unstable_useTransitions:c}){mt(!rl(),"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:c,future:{}}),[d,i,a,c]);typeof n=="string"&&(n=Ls(n));let{pathname:h="/",search:m="",hash:x="",state:v=null,key:b="default",unstable_mask:N}=n,k=g.useMemo(()=>{let j=Wr(h,d);return j==null?null:{location:{pathname:j,search:m,hash:x,state:v,key:b,unstable_mask:N},navigationType:o}},[d,h,m,x,v,b,o,N]);return ir(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(Xn.Provider,{value:p},g.createElement(nl.Provider,{children:t,value:k}))}function fS({children:e,location:t}){return Qj(mf(e),t)}function mf(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,mf(o.props.children,a));return}mt(o.type===Le,`[${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>`),mt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={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&&(c.children=mf(o.props.children,a)),n.push(c)}),n}var _a="get",Ma="application/x-www-form-urlencoded";function cc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function pS(e){return cc(e)&&e.tagName.toLowerCase()==="button"}function hS(e){return cc(e)&&e.tagName.toLowerCase()==="form"}function mS(e){return cc(e)&&e.tagName.toLowerCase()==="input"}function gS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xS(e,t){return e.button===0&&(!t||t==="_self")&&!gS(e)}function gf(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 yS(e,t){let n=gf(e);return t&&t.forEach((o,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}var ja=null;function vS(){if(ja===null)try{new FormData(document.createElement("form"),0),ja=!1}catch{ja=!0}return ja}var bS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ed(e){return e!=null&&!bS.has(e)?(ir(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ma}"`),null):e}function wS(e,t){let n,o,i,a,c;if(hS(e)){let d=e.getAttribute("action");o=d?Wr(d,t):null,n=e.getAttribute("method")||_a,i=Ed(e.getAttribute("enctype"))||Ma,a=new FormData(e)}else if(pS(e)||mS(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?Wr(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),!vS()){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(cc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=_a,o=null,i=Ma,c=e}return a&&i==="text/plain"&&(c=a,a=void 0),{action:o,method:n.toLowerCase(),encType:i,formData:a,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Qf(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function kS(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&&Wr(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${o}`,i}async function jS(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 SS(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 CS(e,t,n){let o=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let c=await jS(a,n);return c.links?c.links():[]}return[]}));return PS(o.flat(1).filter(SS).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Zg(e,t,n,o,i,a){let c=(p,h)=>n[h]?p.route.id!==n[h].route.id:!0,d=(p,h)=>{var m;return n[h].pathname!==p.pathname||((m=n[h].route.path)==null?void 0:m.endsWith("*"))&&n[h].params["*"]!==p.params["*"]};return a==="assets"?t.filter((p,h)=>c(p,h)||d(p,h)):a==="data"?t.filter((p,h)=>{var x;let m=o.routes[p.route.id];if(!m||!m.hasLoader)return!1;if(c(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 NS(e,t,{includeHydrateFallback:n}={}){return ES(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 ES(e){return[...new Set(e)]}function RS(e){let t={},n=Object.keys(e).sort();for(let o of n)t[o]=e[o];return t}function PS(e,t){let n=new Set;return new Set(t),e.reduce((o,i)=>{let a=JSON.stringify(RS(i));return n.has(a)||(n.add(a),o.push({key:a,link:i})),o},[])}function fv(){let e=g.useContext(Os);return Qf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function TS(){let e=g.useContext(ac);return Qf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Jf=g.createContext(void 0);Jf.displayName="FrameworkContext";function pv(){let e=g.useContext(Jf);return Qf(e,"You must render this element inside a <HydratedRouter> element"),e}function AS(e,t){let n=g.useContext(Jf),[o,i]=g.useState(!1),[a,c]=g.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:m,onTouchStart:x}=t,v=g.useRef(null);g.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=S=>{S.forEach(T=>{c(T.isIntersecting)})},j=new IntersectionObserver(k,{threshold:.5});return v.current&&j.observe(v.current),()=>{j.disconnect()}}},[e]),g.useEffect(()=>{if(o){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[o]);let b=()=>{i(!0)},N=()=>{i(!1),c(!1)};return n?e!=="intent"?[a,v,{}]:[a,v,{onFocus:Pi(d,b),onBlur:Pi(p,N),onMouseEnter:Pi(h,b),onMouseLeave:Pi(m,N),onTouchStart:Pi(x,b)}]:[!1,v,{}]}function Pi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function DS({page:e,...t}){let{router:n}=fv(),o=g.useMemo(()=>Jy(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?g.createElement(LS,{page:e,matches:o,...t}):null}function IS(e){let{manifest:t,routeModules:n}=pv(),[o,i]=g.useState([]);return g.useEffect(()=>{let a=!1;return CS(e,t,n).then(c=>{a||i(c)}),()=>{a=!0}},[e,t,n]),o}function LS({page:e,matches:t,...n}){let o=fn(),{future:i,manifest:a,routeModules:c}=pv(),{basename:d}=fv(),{loaderData:p,matches:h}=TS(),m=g.useMemo(()=>Zg(e,t,h,a,o,"data"),[e,t,h,a,o]),x=g.useMemo(()=>Zg(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,j=!1;if(t.forEach(T=>{var L;let A=a.routes[T.route.id];!A||!A.hasLoader||(!m.some(O=>O.route.id===T.route.id)&&T.route.id in p&&((L=c[T.route.id])!=null&&L.shouldRevalidate)||A.hasClientLoader?j=!0:k.add(T.route.id))}),k.size===0)return[];let S=kS(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return j&&k.size>0&&S.searchParams.set("_routes",t.filter(T=>k.has(T.route.id)).map(T=>T.route.id).join(",")),[S.pathname+S.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,o,a,m,t,e,c]),b=g.useMemo(()=>NS(x,a),[x,a]),N=IS(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:j})=>g.createElement("link",{key:k,nonce:n.nonce,...j,crossOrigin:j.crossOrigin??n.crossOrigin})))}function OS(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var _S=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_S&&(window.__reactRouterVersion="7.13.1")}catch{}function MS({basename:e,children:t,unstable_useTransitions:n,window:o}){let i=g.useRef();i.current==null&&(i.current=pj({window:o,v5Compat:!0}));let a=i.current,[c,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(dS,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:a,unstable_useTransitions:n})}var hv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ce=g.forwardRef(function({onClick:t,discover:n="render",prefetch:o="none",relative:i,reloadDocument:a,replace:c,unstable_mask:d,state:p,target:h,to:m,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:b,...N},k){let{basename:j,navigator:S,unstable_useTransitions:T}=g.useContext(Xn),A=typeof m=="string"&&hv.test(m),L=rv(m,j);m=L.to;let O=Kj(m,{relative:i}),P=fn(),$=null;if(d){let _=Kf(d,[],P.unstable_mask?P.unstable_mask.pathname:"/",!0);j!=="/"&&(_.pathname=_.pathname==="/"?j:jr([j,_.pathname])),$=S.createHref(_)}let[E,H,Z]=AS(o,N),G=BS(m,{replace:c,unstable_mask:d,state:p,target:h,preventScrollReset:x,relative:i,viewTransition:v,unstable_defaultShouldRevalidate:b,unstable_useTransitions:T});function q(_){t&&t(_),_.defaultPrevented||G(_)}let Y=!(L.isExternal||a),X=g.createElement("a",{...N,...Z,href:(Y?$:void 0)||L.absoluteURL||O,onClick:Y?q:t,ref:OS(k,H),target:h,"data-discover":!A&&n==="render"?"true":void 0});return E&&!A?g.createElement(g.Fragment,null,X,g.createElement(DS,{page:O})):X});Ce.displayName="Link";var $S=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:o="",end:i=!1,style:a,to:c,viewTransition:d,children:p,...h},m){let x=ol(c,{relative:h.relative}),v=fn(),b=g.useContext(ac),{navigator:N,basename:k}=g.useContext(Xn),j=b!=null&&qS(x)&&d===!0,S=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,S=S.toLowerCase()),A&&k&&(A=Wr(A,k)||A);const L=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let O=T===S||!i&&T.startsWith(S)&&T.charAt(L)==="/",P=A!=null&&(A===S||!i&&A.startsWith(S)&&A.charAt(S.length)==="/"),$={isActive:O,isPending:P,isTransitioning:j},E=O?t:void 0,H;typeof o=="function"?H=o($):H=[o,O?"active":null,P?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let Z=typeof a=="function"?a($):a;return g.createElement(Ce,{...h,"aria-current":E,className:H,ref:m,style:Z,to:c,viewTransition:d},typeof p=="function"?p($):p)});$S.displayName="NavLink";var FS=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:o,replace:i,state:a,method:c=_a,action:d,onSubmit:p,relative:h,preventScrollReset:m,viewTransition:x,unstable_defaultShouldRevalidate:v,...b},N)=>{let{unstable_useTransitions:k}=g.useContext(Xn),j=WS(),S=VS(d,{relative:h}),T=c.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&hv.test(d),L=O=>{if(p&&p(O),O.defaultPrevented)return;O.preventDefault();let P=O.nativeEvent.submitter,$=(P==null?void 0:P.getAttribute("formmethod"))||c,E=()=>j(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:S,onSubmit:o?p:L,...b,"data-discover":!A&&e==="render"?"true":void 0})});FS.displayName="Form";function zS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mv(e){let t=g.useContext(Os);return mt(t,zS(e)),t}function BS(e,{target:t,replace:n,unstable_mask:o,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:h}={}){let m=Xt(),x=fn(),v=ol(e,{relative:c});return g.useCallback(b=>{if(xS(b,t)){b.preventDefault();let N=n!==void 0?n:Gi(x)===Gi(v),k=()=>m(e,{replace:N,unstable_mask:o,state:i,preventScrollReset:a,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});h?g.startTransition(()=>k()):k()}},[x,m,v,n,o,i,t,e,a,c,d,p,h])}function _s(e){ir(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(gf(e)),n=g.useRef(!1),o=fn(),i=g.useMemo(()=>yS(o.search,n.current?null:t.current),[o.search]),a=Xt(),c=g.useCallback((d,p)=>{const h=gf(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,a("?"+h,p)},[a,i]);return[i,c]}var US=0,HS=()=>`__${String(++US)}__`;function WS(){let{router:e}=mv("useSubmit"),{basename:t}=g.useContext(Xn),n=iS(),o=e.fetch,i=e.navigate;return g.useCallback(async(a,c={})=>{let{action:d,method:p,encType:h,formData:m,body:x}=wS(a,t);if(c.navigate===!1){let v=c.fetcherKey||HS();await o(v,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:m,body:x,formMethod:c.method||p,formEncType:c.encType||h,flushSync:c.flushSync})}else await i(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:m,body:x,formMethod:c.method||p,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,i,t,n])}function VS(e,{relative:t}={}){let{basename:n}=g.useContext(Xn),o=g.useContext(dr);mt(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),a={...ol(e||".",{relative:t})},c=fn();if(e==null){a.search=c.search;let d=new URLSearchParams(a.search),p=d.getAll("index");if(p.some(m=>m==="")){d.delete("index"),p.filter(x=>x).forEach(x=>d.append("index",x));let m=d.toString();a.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:jr([n,a.pathname])),Gi(a)}function qS(e,{relative:t}={}){let n=g.useContext(sv);mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=mv("useViewTransitionState"),i=ol(e,{relative:t});if(!n.isTransitioning)return!1;let a=Wr(n.currentLocation.pathname,o)||n.currentLocation.pathname,c=Wr(n.nextLocation.pathname,o)||n.nextLocation.pathname;return qa(i.pathname,c)!=null||qa(i.pathname,a)!=null}var ko=Qy();const KS=lc(ko);/**
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 GS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gv=(...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 YS={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 XS=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:c,...d},p)=>g.createElement("svg",{ref:p,...YS,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:gv("lucide",i),...d},[...c.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 ye=(e,t)=>{const n=g.forwardRef(({className:o,...i},a)=>g.createElement(XS,{ref:a,iconNode:t,className:gv(`lucide-${GS(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 uc=ye("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 xv=ye("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 QS=ye("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=ye("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 JS=ye("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 yv=ye("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 Zf=ye("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 Yi=ye("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 vv=ye("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 xf=ye("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 ep=ye("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 yf=ye("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 ZS=ye("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 eC=ye("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
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 tC=ye("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"}]]);/**
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 nC=ye("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
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 rC=ye("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
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 oC=ye("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"}]]);/**
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 tp=ye("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"}]]);/**
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 sC=ye("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"}]]);/**
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 iC=ye("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"}]]);/**
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 bv=ye("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"}]]);/**
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 ex=ye("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"}]]);/**
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 lC=ye("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"}]]);/**
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 aC=ye("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"}]]);/**
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 cC=ye("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"}]]);/**
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 uC=ye("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"}]]);/**
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 np=ye("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"}]]);/**
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 dC=ye("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
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 wv=ye("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"}]]);/**
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 fC=ye("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"}]]);/**
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 pC=ye("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"}]]);/**
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 hC=ye("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"}]]);/**
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 kv=ye("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
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 mC=ye("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"}]]);/**
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 gC=ye("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"}]]);/**
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 xC=ye("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"}]]);/**
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 jv=ye("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 yC=ye("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"}]]);/**
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 rp=ye("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"}]]);/**
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 vC=ye("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"}]]);/**
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 Rd=ye("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"}]]);/**
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 bC=ye("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"}]]);/**
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 wC=ye("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"}]]);/**
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 lr=ye("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 Sv=ye("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"}]]);/**
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 kC=ye("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
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 jC=ye("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"}]]);/**
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 op=ye("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"}]]);/**
317
+ * @license lucide-react v0.460.0 - ISC
318
+ *
319
+ * This source code is licensed under the ISC license.
320
+ * See the LICENSE file in the root directory of this source tree.
321
+ */const SC=ye("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"}]]);/**
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 sl=ye("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 CC=ye("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"}]]);/**
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 NC=ye("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"}]]);/**
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 EC=ye("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"}]]);/**
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 RC=ye("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"}]]);/**
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 Sr=ye("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"}]]);/**
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 tx=ye("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"}]]);/**
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=ye("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
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 PC=ye("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"}]]);/**
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 Nv=ye("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"}]]);/**
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 TC=ye("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
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 Ms=ye("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"}]]);/**
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 il=ye("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"}]]);/**
387
+ * @license lucide-react v0.460.0 - ISC
388
+ *
389
+ * This source code is licensed under the ISC license.
390
+ * See the LICENSE file in the root directory of this source tree.
391
+ */const AC=ye("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"}]]);/**
392
+ * @license lucide-react v0.460.0 - ISC
393
+ *
394
+ * This source code is licensed under the ISC license.
395
+ * See the LICENSE file in the root directory of this source tree.
396
+ */const Ev=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Rv(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=Rv(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function DC(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rv(e))&&(o&&(o+=" "),o+=t);return o}const sp="-",IC=e=>{const t=OC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const d=c.split(sp);return d[0]===""&&d.length!==1&&d.shift(),Pv(d,t)||LC(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&o[c]?[...p,...o[c]]:p}}},Pv=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?Pv(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(sp);return(c=t.validators.find(({validator:d})=>d(a)))==null?void 0:c.classGroupId},nx=/^\[(.+)\]$/,LC=e=>{if(nx.test(e)){const t=nx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},OC=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return MC(Object.entries(e.classGroups),n).forEach(([a,c])=>{vf(c,o,a,t)}),o},vf=(e,t,n,o)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:rx(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(_C(i)){vf(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,c])=>{vf(c,rx(t,a),n,o)})})},rx=(e,t)=>{let n=e;return t.split(sp).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},_C=e=>e.isThemeGetter,MC=(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(([c,d])=>[t+c,d])):a);return[n,i]}):e,$C=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const i=(a,c)=>{n.set(a,c),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let c=n.get(a);if(c!==void 0)return c;if((c=o.get(a))!==void 0)return i(a,c),c},set(a,c){n.has(a)?n.set(a,c):i(a,c)}}},Tv="!",FC=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,i=t[0],a=t.length,c=d=>{const p=[];let h=0,m=0,x;for(let j=0;j<d.length;j++){let S=d[j];if(h===0){if(S===i&&(o||d.slice(j,j+a)===t)){p.push(d.slice(m,j)),m=j+a;continue}if(S==="/"){x=j;continue}}S==="["?h++:S==="]"&&h--}const v=p.length===0?d:d.substring(m),b=v.startsWith(Tv),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:c}):c},zC=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},BC=e=>({cache:$C(e.cacheSize),parseClassName:FC(e),...IC(e)}),UC=/\s+/,HC=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,a=[],c=e.trim().split(UC);let d="";for(let p=c.length-1;p>=0;p-=1){const h=c[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 j=zC(m).join(":"),S=x?j+Tv:j,T=S+k;if(a.includes(T))continue;a.push(T);const A=i(k,N);for(let L=0;L<A.length;++L){const O=A[L];a.push(S+O)}d=h+(d.length>0?" "+d:d)}return d};function WC(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Av(t))&&(o&&(o+=" "),o+=n);return o}const Av=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Av(e[o]))&&(n&&(n+=" "),n+=t);return n};function VC(e,...t){let n,o,i,a=c;function c(p){const h=t.reduce((m,x)=>x(m),e());return n=BC(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=HC(p,n);return i(p,m),m}return function(){return a(WC.apply(null,arguments))}}const st=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Dv=/^\[(?:([a-z-]+):)?(.+)\]$/i,qC=/^\d+\/\d+$/,KC=new Set(["px","full","screen"]),GC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YC=/\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$/,XC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,QC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,JC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Br=e=>ks(e)||KC.has(e)||qC.test(e),go=e=>$s(e,"length",iN),ks=e=>!!e&&!Number.isNaN(Number(e)),Pd=e=>$s(e,"number",ks),Ti=e=>!!e&&Number.isInteger(Number(e)),ZC=e=>e.endsWith("%")&&ks(e.slice(0,-1)),_e=e=>Dv.test(e),xo=e=>GC.test(e),eN=new Set(["length","size","percentage"]),tN=e=>$s(e,eN,Iv),nN=e=>$s(e,"position",Iv),rN=new Set(["image","url"]),oN=e=>$s(e,rN,aN),sN=e=>$s(e,"",lN),Ai=()=>!0,$s=(e,t,n)=>{const o=Dv.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},iN=e=>YC.test(e)&&!XC.test(e),Iv=()=>!1,lN=e=>QC.test(e),aN=e=>JC.test(e),cN=()=>{const e=st("colors"),t=st("spacing"),n=st("blur"),o=st("brightness"),i=st("borderColor"),a=st("borderRadius"),c=st("borderSpacing"),d=st("borderWidth"),p=st("contrast"),h=st("grayscale"),m=st("hueRotate"),x=st("invert"),v=st("gap"),b=st("gradientColorStops"),N=st("gradientColorStopPositions"),k=st("inset"),j=st("margin"),S=st("opacity"),T=st("padding"),A=st("saturate"),L=st("scale"),O=st("sepia"),P=st("skew"),$=st("space"),E=st("translate"),H=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",_e,t],q=()=>[_e,t],Y=()=>["",Br,go],X=()=>["auto",ks,_e],_=()=>["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"],W=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",_e],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[ks,_e];return{cacheSize:500,separator:":",theme:{colors:[Ai],spacing:[Br,go],blur:["none","",xo,_e],brightness:F(),borderColor:[e],borderRadius:["none","","full",xo,_e],borderSpacing:q(),borderWidth:Y(),contrast:F(),grayscale:ee(),hueRotate:F(),invert:ee(),gap:q(),gradientColorStops:[e],gradientColorStopPositions:[ZC,go],inset:G(),margin:G(),opacity:F(),padding:q(),saturate:F(),scale:F(),sepia:ee(),skew:F(),space:q(),translate:q()},classGroups:{aspect:[{aspect:["auto","square","video",_e]}],container:["container"],columns:[{columns:[xo]}],"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:[..._(),_e]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],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",Ti,_e]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_e]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",Ti,_e]}],"grid-cols":[{"grid-cols":[Ai]}],"col-start-end":[{col:["auto",{span:["full",Ti,_e]},_e]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Ai]}],"row-start-end":[{row:["auto",{span:[Ti,_e]},_e]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_e]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"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:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[$]}],"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",_e,t]}],"min-w":[{"min-w":[_e,t,"min","max","fit"]}],"max-w":[{"max-w":[_e,t,"none","full","min","max","fit","prose",{screen:[xo]},xo]}],h:[{h:[_e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xo,go]}],"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:[Ai]}],"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",_e]}],"line-clamp":[{"line-clamp":["none",ks,Pd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Br,_e]}],"list-image":[{"list-image":["none",_e]}],"list-style-type":[{list:["none","disc","decimal",_e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Br,go]}],"underline-offset":[{"underline-offset":["auto",Br,_e]}],"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",_e]}],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",_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),nN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},oN]}],"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":[S]}],"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":[S]}],"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,_e]}],"outline-w":[{outline:[Br,go]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Br,go]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xo,sN]}],"shadow-color":[{shadow:[Ai]}],opacity:[{opacity:[S]}],"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",xo,_e]}],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":[S]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_e]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",_e]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",_e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Ti,_e]}],"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",_e]}],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",_e]}],"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",_e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Br,go,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"]}}},uN=VC(cN);function $e(...e){return uN(DC(e))}function Vr(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 dN(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function fN(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 pN(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 Cn(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 hN(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 Ov(e,t){return hN(e)===t}function mN(e){let n=Lv(e).split("/").filter(Boolean);const o=[];let i="Overview",a=null,c="";return n[0]==="w"&&n[1]&&(c=`/w/${n[1]}`,o.push({label:Cn(n[1]),path:`${c}/projects`}),n=n.slice(2)),n.length===0?{title:i,breadcrumbs:o,projectSlug:a}:(n[0]==="projects"?(o.push({label:"Projects",path:`${c}/projects`}),i="Projects",n[1]&&(a=n[1],o.push({label:Cn(n[1]),path:`${c}/projects/${n[1]}`}),i=Cn(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:Cn(n[3]),path:`${c}/projects/${n[1]}/assignments/${n[3]}`}),i=Cn(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:`${c}/servers`})):n[0]==="agent-sessions"?(i="Agent Sessions",o.push({label:"Agent Sessions",path:`${c}/agent-sessions`})):n[0]==="attention"?(i="Attention",o.push({label:"Attention",path:"/attention"})):n[0]==="assignments"?(i="Assignments",o.push({label:"Assignments",path:`${c}/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:Cn(n[1]),path:`/playbooks/${n[1]}`}),i="Edit Playbook"):n[1]&&(o.push({label:Cn(n[1]),path:`/playbooks/${n[1]}`}),i=Cn(n[1]))):n[0]==="todos"?(i="Todos",o.push({label:"Todos",path:`${c}/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:`${c}/create/project`})),{title:i,breadcrumbs:o,projectSlug:a})}function ox({items:e,onNavigate:t}){const n=fn();return l.jsx("nav",{className:"space-y-1",children:e.map(o=>{const i=o.icon,a=Ov(n.pathname,o.to)&&!n.pathname.startsWith("/w/");return l.jsxs(Ce,{to:o.to,onClick:t,className:$e("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition",a?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"),children:[l.jsx(i,{className:"h-4 w-4"}),l.jsx("span",{children:o.label})]},o.to)})})}const bf="syntaur-theme",_v=g.createContext(null);function wf(){try{const e=window.localStorage.getItem(bf);return e==="light"||e==="dark"?e:null}catch{return null}}function Mv(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function $v(e){const t=document.documentElement;t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function gN(){if(typeof document>"u")return;const e=wf();$v(e??Mv())}function xN({children:e}){const[t,n]=g.useState(()=>wf()),[o,i]=g.useState(()=>wf()??Mv());g.useEffect(()=>{$v(o)},[o]),g.useEffect(()=>{if(!window.matchMedia)return;const c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{t||i(c.matches?"dark":"light")};return d(),c.addEventListener("change",d),()=>{c.removeEventListener("change",d)}},[t]);const a={resolvedTheme:o,explicitTheme:t,setTheme:c=>{window.localStorage.setItem(bf,c),n(c),i(c)},toggleTheme:()=>{const c=o==="dark"?"light":"dark";window.localStorage.setItem(bf,c),n(c),i(c)}};return l.jsx(_v.Provider,{value:a,children:e})}function Fv(){const e=g.useContext(_v);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const $a=new Set;let Sn=null,js=null;function yN(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function zv(){Sn&&(Sn.readyState===WebSocket.OPEN||Sn.readyState===WebSocket.CONNECTING)||(Sn=new WebSocket(yN()),Sn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of $a)n(t)}catch{}},Sn.onclose=()=>{Sn=null,js&&clearTimeout(js),js=setTimeout(zv,2e3)},Sn.onerror=()=>{Sn==null||Sn.close()})}function ip(e){const t=g.useRef(e);t.current=e,g.useEffect(()=>{const n=o=>t.current(o);return $a.add(n),zv(),()=>{$a.delete(n),$a.size===0&&Sn&&(js&&clearTimeout(js),js=null,Sn.close(),Sn=null)}},[])}function pn(e,t){const[n,o]=g.useState(null),[i,a]=g.useState(!0),[c,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]),ip(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:c,refetch:m}}function dc(){return pn("/api/projects","projects")}function lp(){return pn("/api/workspaces","projects")}function Lt(){const{workspace:e}=Et();return e?`/w/${e}`:""}function vN(){return pn("/api/overview","overview")}function Bv(){return pn("/api/assignments","assignments")}function bN(){return pn("/api/attention","attention")}function Uv(){return pn("/api/help")}function Hv(e){const t=e?`/api/projects/${e}`:null;return pn(t,"project")}function wN(e,t){const n=e&&t?`/api/projects/${e}/assignments/${t}`:null;return pn(n,"assignment")}function kN(e){const t=e?`/api/assignments/${e}`:null;return pn(t,"assignment")}function Wv(e){return pn(e)}function ap(){return pn("/api/servers","servers")}function jN(){return pn("/api/agent-sessions","agent-sessions")}function SN(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return pn(n,"agent-sessions")}function Vv(){return pn("/api/playbooks","playbooks")}function CN(e){const t=e?`/api/playbooks/${e}`:null;return pn(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 NN(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=NN(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 Ss(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 EN(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[a,c]=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()),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to fetch todos")}finally{i(!1)}},[e]);return g.useEffect(()=>{d()},[d]),ip(p=>{p.type==="todos-updated"&&d()}),{data:t,loading:o,error:a,refetch:d}}function cp(){const[e,t]=g.useState(null),[n,o]=g.useState(!0),[i,a]=g.useState(null),c=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(()=>{c()},[c]),ip(d=>{d.type==="todos-updated"&&c()}),{data:e,loading:n,error:i,refetch:c}}async function qv(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 Kv(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 Gv(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 Yv(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 Xv(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function RN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function PN(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const TN=new Set(["/projects","/assignments","/servers","/todos"]);function Fa(e,t){return TN.has(e)?`${t}${e}`:e}const AN=[{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 DN(e){const t=[];for(const n of AN)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:n.projectSlug===null?`assignment-standalone-${n.id}`:`assignment-${n.projectSlug}-${n.slug}`,title:n.title,subtitle:`${n.projectTitle} · ${n.status}`,keywords:[n.projectSlug??"standalone",n.assignee??""].filter(i=>!!i),route:n.projectSlug===null?`/assignments/${n.id}`:`${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 ct(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 sx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fc(...e){return t=>{let n=!1;const o=e.map(i=>{const a=sx(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():sx(e[i],null)}}}}function ln(...e){return g.useCallback(fc(...e),e)}function IN(e,t){const n=g.createContext(t),o=a=>{const{children:c,...d}=a,p=g.useMemo(()=>d,Object.values(d));return l.jsx(n.Provider,{value:p,children:c})};o.displayName=e+"Provider";function i(a){const c=g.useContext(n);if(c)return c;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,c){const d=g.createContext(c),p=n.length;n=[...n,c];const h=x=>{var S;const{scope:v,children:b,...N}=x,k=((S=v==null?void 0:v[e])==null?void 0:S[p])||d,j=g.useMemo(()=>N,Object.values(N));return l.jsx(k.Provider,{value:j,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(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${a}\``)}return[h,m]}const i=()=>{const a=n.map(c=>g.createContext(c));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,LN(i,...t)]}function LN(...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 c=o.reduce((d,{useScope:p,scopeName:h})=>{const x=p(a)[`__scope${h}`];return{...d,...x}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var jo=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},ON=Xy[" useId ".trim().toString()]||(()=>{}),_N=0;function Cs(e){const[t,n]=g.useState(ON());return jo(()=>{n(o=>o??String(_N++))},[e]),t?`radix-${t}`:""}var MN=Xy[" useInsertionEffect ".trim().toString()]||jo;function pc({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,c]=$N({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=FN(m)?m(e):m;v!==e&&((x=c.current)==null||x.call(c,v))}else a(m)},[d,e,a,c]);return[p,h]}function $N({defaultProp:e,onChange:t}){const[n,o]=g.useState(e),i=g.useRef(n),a=g.useRef(t);return MN(()=>{a.current=t},[t]),g.useEffect(()=>{var c;i.current!==n&&((c=a.current)==null||c.call(a,n),i.current=n)},[n,i]),[n,o,a]}function FN(e){return typeof e=="function"}function zN(e){const t=BN(e),n=g.forwardRef((o,i)=>{const{children:a,...c}=o,d=g.Children.toArray(a),p=d.find(HN);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,{...c,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function BN(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const c=VN(i),d=WN(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UN=Symbol("radix.slottable");function HN(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UN}function WN(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 VN(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 qN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rt=qN.reduce((e,t)=>{const n=zN(`Primitive.${t}`),o=g.forwardRef((i,a)=>{const{asChild:c,...d}=i,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(p,{...d,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function KN(e,t){e&&ko.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 GN(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 YN="DismissableLayer",kf="dismissableLayer.update",XN="dismissableLayer.pointerDownOutside",QN="dismissableLayer.focusOutside",ix,Qv=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),up=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:d,...p}=e,h=g.useContext(Qv),[m,x]=g.useState(null),v=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=g.useState({}),N=ln(t,$=>x($)),k=Array.from(h.layers),[j]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(j),T=m?k.indexOf(m):-1,A=h.layersWithOutsidePointerEventsDisabled.size>0,L=T>=S,O=e2($=>{const E=$.target,H=[...h.branches].some(Z=>Z.contains(E));!L||H||(i==null||i($),c==null||c($),$.defaultPrevented||d==null||d())},v),P=t2($=>{const E=$.target;[...h.branches].some(Z=>Z.contains(E))||(a==null||a($),c==null||c($),$.defaultPrevented||d==null||d())},v);return GN($=>{T===h.layers.size-1&&(o==null||o($),!$.defaultPrevented&&d&&($.preventDefault(),d()))},v),g.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ix=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),lx(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ix)}},[m,v,n,h]),g.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),lx())},[m,h]),g.useEffect(()=>{const $=()=>b({});return document.addEventListener(kf,$),()=>document.removeEventListener(kf,$)},[]),l.jsx(Rt.div,{...p,ref:N,style:{pointerEvents:A?L?"auto":"none":void 0,...e.style},onFocusCapture:ct(e.onFocusCapture,P.onFocusCapture),onBlurCapture:ct(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ct(e.onPointerDownCapture,O.onPointerDownCapture)})});up.displayName=YN;var JN="DismissableLayerBranch",ZN=g.forwardRef((e,t)=>{const n=g.useContext(Qv),o=g.useRef(null),i=ln(t,o);return g.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(Rt.div,{...e,ref:i})});ZN.displayName=JN;function e2(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(){Jv(XN,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},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function t2(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&&Jv(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 lx(){const e=new CustomEvent(kf);document.dispatchEvent(e)}function Jv(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?KN(i,a):i.dispatchEvent(a)}var Ad="focusScope.autoFocusOnMount",Dd="focusScope.autoFocusOnUnmount",ax={bubbles:!1,cancelable:!0},n2="FocusScope",Zv=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...c}=e,[d,p]=g.useState(null),h=Uo(i),m=Uo(a),x=g.useRef(null),v=ln(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 L=A.target;d.contains(L)?x.current=L:bo(x.current,{select:!0})},j=function(A){if(b.paused||!d)return;const L=A.relatedTarget;L!==null&&(d.contains(L)||bo(x.current,{select:!0}))},S=function(A){if(document.activeElement===document.body)for(const O of A)O.removedNodes.length>0&&bo(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",j);const T=new MutationObserver(S);return d&&T.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",j),T.disconnect()}}},[o,d,b.paused]),g.useEffect(()=>{if(d){ux.add(b);const k=document.activeElement;if(!d.contains(k)){const S=new CustomEvent(Ad,ax);d.addEventListener(Ad,h),d.dispatchEvent(S),S.defaultPrevented||(r2(a2(e0(d)),{select:!0}),document.activeElement===k&&bo(d))}return()=>{d.removeEventListener(Ad,h),setTimeout(()=>{const S=new CustomEvent(Dd,ax);d.addEventListener(Dd,m),d.dispatchEvent(S),S.defaultPrevented||bo(k??document.body,{select:!0}),d.removeEventListener(Dd,m),ux.remove(b)},0)}}},[d,h,m,b]);const N=g.useCallback(k=>{if(!n&&!o||b.paused)return;const j=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,S=document.activeElement;if(j&&S){const T=k.currentTarget,[A,L]=o2(T);A&&L?!k.shiftKey&&S===L?(k.preventDefault(),n&&bo(A,{select:!0})):k.shiftKey&&S===A&&(k.preventDefault(),n&&bo(L,{select:!0})):S===T&&k.preventDefault()}},[n,o,b.paused]);return l.jsx(Rt.div,{tabIndex:-1,...c,ref:v,onKeyDown:N})});Zv.displayName=n2;function r2(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(bo(o,{select:t}),document.activeElement!==n)return}function o2(e){const t=e0(e),n=cx(t,e),o=cx(t.reverse(),e);return[n,o]}function e0(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 cx(e,t){for(const n of e)if(!s2(n,{upTo:t}))return n}function s2(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 i2(e){return e instanceof HTMLInputElement&&"select"in e}function bo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&i2(e)&&t&&e.select()}}var ux=l2();function l2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=dx(e,t),e.unshift(t)},remove(t){var n;e=dx(e,t),(n=e[0])==null||n.resume()}}}function dx(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function a2(e){return e.filter(t=>t.tagName!=="A")}var c2="Portal",dp=g.forwardRef((e,t)=>{var d;const{container:n,...o}=e,[i,a]=g.useState(!1);jo(()=>a(!0),[]);const c=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?KS.createPortal(l.jsx(Rt.div,{...o,ref:t}),c):null});dp.displayName=c2;function u2(e,t){return g.useReducer((n,o)=>t[n][o]??n,e)}var qo=e=>{const{present:t,children:n}=e,o=d2(t),i=typeof n=="function"?n({present:o.isPresent}):g.Children.only(n),a=ln(o.ref,f2(i));return typeof n=="function"||o.isPresent?g.cloneElement(i,{ref:a}):null};qo.displayName="Presence";function d2(e){const[t,n]=g.useState(),o=g.useRef(null),i=g.useRef(e),a=g.useRef("none"),c=e?"mounted":"unmounted",[d,p]=u2(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const h=Sa(o.current);a.current=d==="mounted"?h:"none"},[d]),jo(()=>{const h=o.current,m=i.current;if(m!==e){const v=a.current,b=Sa(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]),jo(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,x=b=>{const k=Sa(o.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(p("ANIMATION_END"),!i.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},v=b=>{b.target===t&&(a.current=Sa(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 Sa(e){return(e==null?void 0:e.animationName)||"none"}function f2(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 Id=0;function p2(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??fx()),document.body.insertAdjacentElement("beforeend",e[1]??fx()),Id++,()=>{Id===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Id--}},[])}function fx(){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 t0(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 h2(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",m2="with-scroll-bars-hidden",g2="--removed-body-scroll-bar-size";function Ld(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function x2(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 y2=typeof window<"u"?g.useLayoutEffect:g.useEffect,px=new WeakMap;function v2(e,t){var n=x2(null,function(o){return e.forEach(function(i){return Ld(i,o)})});return y2(function(){var o=px.get(n);if(o){var i=new Set(o),a=new Set(e),c=n.current;i.forEach(function(d){a.has(d)||Ld(d,null)}),a.forEach(function(d){i.has(d)||Ld(d,c)})}px.set(n,e)},[e]),n}function b2(e){return e}function w2(e,t){t===void 0&&(t=b2);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 c=t(a,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(a){for(o=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(d){return a(d)},filter:function(){return n}}},assignMedium:function(a){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(a),c=n}var p=function(){var m=c;c=[],m.forEach(a)},h=function(){return Promise.resolve().then(p)};h(),n={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),n}}}};return i}function k2(e){e===void 0&&(e={});var t=w2(null);return t.options=br({async:!0,ssr:!1},e),t}var n0=function(e){var t=e.sideCar,n=t0(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))};n0.isSideCarExport=!0;function j2(e,t){return e.useMedium(t),n0}var r0=k2(),Od=function(){},hc=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],c=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,j=e.allowPinchZoom,S=e.as,T=S===void 0?"div":S,A=e.gapMode,L=t0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=v,P=v2([n,t]),$=br(br({},L),i);return g.createElement(g.Fragment,null,m&&g.createElement(O,{sideCar:r0,removeScrollBar:h,shards:x,noRelative:b,noIsolation:N,inert:k,setCallbacks:a,allowPinchZoom:!!j,lockRef:n,gapMode:A}),c?g.cloneElement(g.Children.only(d),br(br({},$),{ref:P})):g.createElement(T,br({},$,{className:p,ref:P}),d))});hc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hc.classNames={fullWidth:Ba,zeroRight:za};var S2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function C2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=S2();return t&&e.setAttribute("nonce",t),e}function N2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function E2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var R2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=C2())&&(N2(t,n),E2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},P2=function(){var e=R2();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},o0=function(){var e=P2(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},T2={left:0,top:0,right:0,gap:0},_d=function(e){return parseInt(e||"",10)||0},A2=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)]},D2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return T2;var t=A2(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])}},I2=o0(),Ns="data-scroll-locked",L2=function(e,t,n,o){var i=e.left,a=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
397
+ .`.concat(m2,` {
398
+ overflow: hidden `).concat(o,`;
399
+ padding-right: `).concat(d,"px ").concat(o,`;
400
+ }
401
+ body[`).concat(Ns,`] {
402
+ overflow: hidden `).concat(o,`;
403
+ overscroll-behavior: contain;
404
+ `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
405
+ padding-left: `.concat(i,`px;
406
+ padding-top: `).concat(a,`px;
407
+ padding-right: `).concat(c,`px;
408
+ margin-left:0;
409
+ margin-top:0;
410
+ margin-right: `).concat(d,"px ").concat(o,`;
411
+ `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
412
+ }
413
+
414
+ .`).concat(za,` {
415
+ right: `).concat(d,"px ").concat(o,`;
416
+ }
417
+
418
+ .`).concat(Ba,` {
419
+ margin-right: `).concat(d,"px ").concat(o,`;
420
+ }
421
+
422
+ .`).concat(za," .").concat(za,` {
423
+ right: 0 `).concat(o,`;
424
+ }
425
+
426
+ .`).concat(Ba," .").concat(Ba,` {
427
+ margin-right: 0 `).concat(o,`;
428
+ }
429
+
430
+ body[`).concat(Ns,`] {
431
+ `).concat(g2,": ").concat(d,`px;
432
+ }
433
+ `)},hx=function(){var e=parseInt(document.body.getAttribute(Ns)||"0",10);return isFinite(e)?e:0},O2=function(){g.useEffect(function(){return document.body.setAttribute(Ns,(hx()+1).toString()),function(){var e=hx()-1;e<=0?document.body.removeAttribute(Ns):document.body.setAttribute(Ns,e.toString())}},[])},_2=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;O2();var a=g.useMemo(function(){return D2(i)},[i]);return g.createElement(I2,{styles:L2(a,!t,i,n?"":"!important")})},jf=!1;if(typeof window<"u")try{var Ca=Object.defineProperty({},"passive",{get:function(){return jf=!0,!0}});window.addEventListener("test",Ca,Ca),window.removeEventListener("test",Ca,Ca)}catch{jf=!1}var gs=jf?{passive:!1}:!1,M2=function(e){return e.tagName==="TEXTAREA"},s0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!M2(e)&&n[t]==="visible")},$2=function(e){return s0(e,"overflowY")},F2=function(e){return s0(e,"overflowX")},mx=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=i0(e,o);if(i){var a=l0(e,o),c=a[1],d=a[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},z2=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},B2=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},i0=function(e,t){return e==="v"?$2(t):F2(t)},l0=function(e,t){return e==="v"?z2(t):B2(t)},U2=function(e,t){return e==="h"&&t==="rtl"?-1:1},H2=function(e,t,n,o,i){var a=U2(e,window.getComputedStyle(t).direction),c=a*o,d=n.target,p=t.contains(d),h=!1,m=c>0,x=0,v=0;do{if(!d)break;var b=l0(e,d),N=b[0],k=b[1],j=b[2],S=k-j-a*N;(N||S)&&i0(e,d)&&(x+=S,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]},gx=function(e){return[e.deltaX,e.deltaY]},xx=function(e){return e&&"current"in e?e.current:e},W2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},V2=function(e){return`
434
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
435
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
436
+ `)},q2=0,xs=[];function K2(e){var t=g.useRef([]),n=g.useRef([0,0]),o=g.useRef(),i=g.useState(q2++)[0],a=g.useState(o0)[0],c=g.useRef(e);g.useEffect(function(){c.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=h2([e.lockRef.current],(e.shards||[]).map(xx),!0).filter(Boolean);return k.forEach(function(j){return j.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=g.useCallback(function(k,j){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!c.current.allowPinchZoom;var S=Na(k),T=n.current,A="deltaX"in k?k.deltaX:T[0]-S[0],L="deltaY"in k?k.deltaY:T[1]-S[1],O,P=k.target,$=Math.abs(A)>Math.abs(L)?"h":"v";if("touches"in k&&$==="h"&&P.type==="range")return!1;var E=window.getSelection(),H=E&&E.anchorNode,Z=H?H===P||H.contains(P):!1;if(Z)return!1;var G=mx($,P);if(!G)return!0;if(G?O=$:(O=$==="v"?"h":"v",G=mx($,P)),!G)return!1;if(!o.current&&"changedTouches"in k&&(A||L)&&(o.current=O),!O)return!0;var q=o.current||O;return H2(q,j,k,q==="h"?A:L)},[]),p=g.useCallback(function(k){var j=k;if(!(!xs.length||xs[xs.length-1]!==a)){var S="deltaY"in j?gx(j):Na(j),T=t.current.filter(function(O){return O.name===j.type&&(O.target===j.target||j.target===O.shadowParent)&&W2(O.delta,S)})[0];if(T&&T.should){j.cancelable&&j.preventDefault();return}if(!T){var A=(c.current.shards||[]).map(xx).filter(Boolean).filter(function(O){return O.contains(j.target)}),L=A.length>0?d(j,A[0]):!c.current.noIsolation;L&&j.cancelable&&j.preventDefault()}}},[]),h=g.useCallback(function(k,j,S,T){var A={name:k,delta:j,target:S,should:T,shadowParent:G2(S)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(L){return L!==A})},1)},[]),m=g.useCallback(function(k){n.current=Na(k),o.current=void 0},[]),x=g.useCallback(function(k){h(k.type,gx(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:V2(i)}):null,b?g.createElement(_2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function G2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Y2=j2(r0,K2);var a0=g.forwardRef(function(e,t){return g.createElement(hc,br({},e,{ref:t,sideCar:Y2}))});a0.classNames=hc.classNames;var X2=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,c0=function(e){return e&&(e.host||c0(e.parentNode))},Q2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=c0(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})},J2=function(e,t,n,o){var i=Q2(t,Array.isArray(e)?e:[e]);Ra[n]||(Ra[n]=new WeakMap);var a=Ra[n],c=[],d=new Set,p=new Set(i),h=function(x){!x||d.has(x)||(d.add(x),h(x.parentNode))};i.forEach(h);var m=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(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,j=(a.get(v)||0)+1;ys.set(v,k),a.set(v,j),c.push(v),k===1&&N&&Ea.set(v,!0),j===1&&v.setAttribute(n,"true"),N||v.setAttribute(o,"true")}catch(S){console.error("aria-hidden: cannot operate on ",v,S)}})};return m(t),d.clear(),Md++,function(){c.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={})}},Z2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=X2(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),J2(o,i,n,"aria-hidden")):function(){return null}};function eE(e){const t=tE(e),n=g.forwardRef((o,i)=>{const{children:a,...c}=o,d=g.Children.toArray(a),p=d.find(rE);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,{...c,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function tE(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const c=sE(i),d=oE(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nE=Symbol("radix.slottable");function rE(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nE}function oE(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 sE(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 mc="Dialog",[u0,d0]=Vo(mc),[iE,fr]=u0(mc),f0=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,d=g.useRef(null),p=g.useRef(null),[h,m]=pc({prop:o,defaultProp:i??!1,onChange:a,caller:mc});return l.jsx(iE,{scope:t,triggerRef:d,contentRef:p,contentId:Cs(),titleId:Cs(),descriptionId:Cs(),open:h,onOpenChange:m,onOpenToggle:g.useCallback(()=>m(x=>!x),[m]),modal:c,children:n})};f0.displayName=mc;var p0="DialogTrigger",h0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(p0,n),a=ln(t,i.triggerRef);return l.jsx(Rt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":hp(i.open),...o,ref:a,onClick:ct(e.onClick,i.onOpenToggle)})});h0.displayName=p0;var fp="DialogPortal",[lE,m0]=u0(fp,{forceMount:void 0}),g0=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,a=fr(fp,t);return l.jsx(lE,{scope:t,forceMount:n,children:g.Children.map(o,c=>l.jsx(qo,{present:n||a.open,children:l.jsx(dp,{asChild:!0,container:i,children:c})}))})};g0.displayName=fp;var Ga="DialogOverlay",x0=g.forwardRef((e,t)=>{const n=m0(Ga,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=fr(Ga,e.__scopeDialog);return a.modal?l.jsx(qo,{present:o||a.open,children:l.jsx(cE,{...i,ref:t})}):null});x0.displayName=Ga;var aE=eE("DialogOverlay.RemoveScroll"),cE=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(Ga,n);return l.jsx(a0,{as:aE,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(Rt.div,{"data-state":hp(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ho="DialogContent",y0=g.forwardRef((e,t)=>{const n=m0(Ho,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=fr(Ho,e.__scopeDialog);return l.jsx(qo,{present:o||a.open,children:a.modal?l.jsx(uE,{...i,ref:t}):l.jsx(dE,{...i,ref:t})})});y0.displayName=Ho;var uE=g.forwardRef((e,t)=>{const n=fr(Ho,e.__scopeDialog),o=g.useRef(null),i=ln(t,n.contentRef,o);return g.useEffect(()=>{const a=o.current;if(a)return Z2(a)},[]),l.jsx(v0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ct(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:ct(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&a.preventDefault()}),onFocusOutside:ct(e.onFocusOutside,a=>a.preventDefault())})}),dE=g.forwardRef((e,t)=>{const n=fr(Ho,e.__scopeDialog),o=g.useRef(!1),i=g.useRef(!1);return l.jsx(v0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,d;(c=e.onCloseAutoFocus)==null||c.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 c=a.target;((h=n.triggerRef.current)==null?void 0:h.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),v0=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...c}=e,d=fr(Ho,n),p=g.useRef(null),h=ln(t,p);return p2(),l.jsxs(l.Fragment,{children:[l.jsx(Zv,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(up,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":hp(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(pE,{titleId:d.titleId}),l.jsx(mE,{contentRef:p,descriptionId:d.descriptionId})]})]})}),pp="DialogTitle",b0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(pp,n);return l.jsx(Rt.h2,{id:i.titleId,...o,ref:t})});b0.displayName=pp;var w0="DialogDescription",k0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(w0,n);return l.jsx(Rt.p,{id:i.descriptionId,...o,ref:t})});k0.displayName=w0;var j0="DialogClose",S0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=fr(j0,n);return l.jsx(Rt.button,{type:"button",...o,ref:t,onClick:ct(e.onClick,()=>i.onOpenChange(!1))})});S0.displayName=j0;function hp(e){return e?"open":"closed"}var C0="DialogTitleWarning",[fE,N0]=IN(C0,{contentName:Ho,titleName:pp,docsSlug:"dialog"}),pE=({titleId:e})=>{const t=N0(C0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
437
+
438
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
439
+
440
+ 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},hE="DialogDescriptionWarning",mE=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${N0(hE).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},E0=f0,gE=h0,R0=g0,mp=x0,gp=y0,xp=b0,yp=k0,P0=S0;const vp=E0,xE=R0,T0=g.forwardRef(({className:e,...t},n)=>l.jsx(mp,{ref:n,className:$e("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));T0.displayName=mp.displayName;const gc=g.forwardRef(({className:e,children:t,...n},o)=>l.jsxs(xE,{children:[l.jsx(T0,{}),l.jsx(gp,{ref:o,className:$e("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...n,children:t})]}));gc.displayName=gp.displayName;function yE({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function vE({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const xc=g.forwardRef(({className:e,...t},n)=>l.jsx(xp,{ref:n,className:$e("text-lg font-semibold tracking-tight text-foreground",e),...t}));xc.displayName=xp.displayName;const bp=g.forwardRef(({className:e,...t},n)=>l.jsx(yp,{ref:n,className:$e("text-sm leading-6 text-muted-foreground",e),...t}));bp.displayName=yp.displayName;const bE=-1,wE=-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 c=0;c<e.length;c++){const d=e[c];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(wE,a*bE)),i=o,a=0,o++,p=!0;break}else a++,o++;if(!p)return-1/0}return n}const yx={page:0,project:1,assignment:2,playbook:3,server:4,todo:5};function kE(e,t,n=50){const o=e.toLowerCase();if(!o)return t.slice(0,n).map(c=>({...c,score:0}));const a=t.map(c=>{var x;const d=$d(o,c.title.toLowerCase())*1,p=c.subtitle?$d(o,c.subtitle.toLowerCase())*.5:-1/0,h=(x=c.keywords)!=null&&x.length?$d(o,c.keywords.join(" ").toLowerCase())*.3:-1/0,m=Math.max(d,p,h);return{...c,score:m}}).filter(c=>c.score>-1/0);return a.sort((c,d)=>d.score!==c.score?d.score-c.score:c.title.length!==d.title.length?c.title.length-d.title.length:c.title!==d.title?c.title<d.title?-1:1:(yx[c.type]??99)-(yx[d.type]??99)),a.slice(0,n)}const jE={page:"Page",project:"Project",assignment:"Assignment",playbook:"Playbook",server:"Server",todo:"Todo"};function SE({entries:e}){const{paletteOpen:t,closePalette:n}=Fs(),o=Xt(),[i,a]=g.useState(""),[c,d]=g.useState(0),p=g.useRef(null),h=g.useMemo(()=>kE(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="${c}"]`);v==null||v.scrollIntoView({block:"nearest"})},[c]);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[c];b&&m(b)}}return l.jsx(vp,{open:t,onOpenChange:v=>v?null:n(),children:l.jsxs(gc,{className:"max-w-xl p-0 gap-0",children:[l.jsx(xc,{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===c;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:jE[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 CE={global:"Global","list:projects":"Projects list","list:assignments":"Assignments list","list:todos":"Todos list",assignment:"Assignment detail",project:"Project detail"},NE=["global","list:projects","list:assignments","list:todos","project","assignment"];function EE(e){if(e.includes(" ")){const[t,n]=e.split(" ");return`${Ss(t)} then ${Ss(n)}`}return Ss(e)}function RE(){const{cheatsheetOpen:e,closeCheatsheet:t,listBindings:n}=Fs(),o=g.useMemo(()=>{if(!e)return new Map;const i=n(),a=new Map;for(const c of i){const d=a.get(c.scope)??[];d.push({keys:c.keys,description:c.description}),a.set(c.scope,d)}return a},[e,n]);return l.jsx(vp,{open:e,onOpenChange:i=>i?null:t(),children:l.jsxs(gc,{className:"max-w-2xl",children:[l.jsx(xc,{children:"Keyboard shortcuts"}),l.jsxs(bp,{children:["Press Esc to close. ",Ss("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:NE.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:CE[i]}),l.jsx("ul",{className:"space-y-1",children:a.map((c,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:c.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:EE(c.keys)})]},`${i}-${c.keys}-${d}`))})]},i)})})]})})}const vx=1500;function PE(e){const t=e.match(/^\/w\/([^/]+)(?:\/|$)/);return t?`/w/${t[1]}`:""}const A0=g.createContext(null);function TE({children:e}){const{toggleTheme:t}=Fv(),n=fn(),o=Xt(),i=PE(n.pathname),a=dc(),c=Bv(),d=Vv(),p=ap(),h=cp(),m=g.useMemo(()=>{var R,F,J,I;const X=a.data??[],_=((R=c.data)==null?void 0:R.assignments)??[],D=((F=d.data)==null?void 0:F.playbooks)??[],V=((J=p.data)==null?void 0:J.sessions)??[],ee=(((I=h.data)==null?void 0:I.workspaces)??[]).flatMap(de=>de.items.map(ve=>({...ve,workspace:de.workspace})));return DN({projects:X,assignments:_,playbooks:D,servers:V,todos:ee,wsPrefix:i})},[a.data,c.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),[j,S]=g.useState(!1),[T,A]=g.useState(!1),L=g.useCallback(X=>{const _=k.current++;return x.current.set(_,{...X,id:_}),_},[]),O=g.useCallback(X=>{x.current.delete(X)},[]),P=g.useCallback(X=>{v.current.push(X)},[]),$=g.useCallback(X=>{const _=v.current;for(let D=_.length-1;D>=0;D--)if(_[D]===X){_.splice(D,1);return}},[]),E=g.useCallback(()=>S(!0),[]),H=g.useCallback(()=>S(!1),[]),Z=g.useCallback(()=>A(!0),[]),G=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 X(ee){if(!(ee instanceof HTMLElement))return!1;const R=ee.tagName;return!!(R==="INPUT"||R==="TEXTAREA"||R==="SELECT"||ee.isContentEditable||ee.closest('[role="combobox"], [role="textbox"]'))}function _(){return!!(document.querySelector('[role="dialog"][data-state="open"]')||document.querySelector('[role="alertdialog"][data-state="open"]'))}function D(){const ee=v.current;return ee[ee.length-1]??"global"}function V(ee){return ee.scope==="global"?!0:ee.scope===D()}function W(ee){const R=Td(ee,"Mod+k"),F=ee.key==="Escape";if(_()&&!R&&!F||X(ee.target)&&!R&&!F)return;const J=b.current;if(J.phase==="awaiting-second")if(Date.now()-J.startedAt>vx)b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null);else{const ve=Array.from(x.current.values());for(const fe of ve){if(!V(fe))continue;const Ee=fe.keys.split(" ");if(!(Ee.length!==2||Ee[0]!=="g")&&Td(ee,Ee[1])&&!(fe.when&&!fe.when())){ee.preventDefault(),b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null),fe.handler(ee);return}}b.current={phase:"idle"},N.current!==null&&(window.clearTimeout(N.current),N.current=null)}const I=Array.from(x.current.values());for(const de of I){if(!V(de))continue;const ve=de.keys.split(" ");if(ve.length===1&&Td(ee,ve[0])&&!(de.when&&!de.when())){ee.preventDefault(),de.handler(ee);return}}ee.key==="g"&&!ee.metaKey&&!ee.ctrlKey&&!ee.altKey&&!ee.shiftKey&&Array.from(x.current.values()).some(ve=>V(ve)&&ve.keys.startsWith("g "))&&(ee.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},vx))}return window.addEventListener("keydown",W),()=>{window.removeEventListener("keydown",W),N.current!==null&&(window.clearTimeout(N.current),N.current=null)}},[]),g.useEffect(()=>{const X=L({keys:"Shift+t",handler:()=>t(),scope:"global",description:"Toggle light/dark theme"});return()=>O(X)},[L,O,t]),g.useEffect(()=>{const X=L({keys:"?",scope:"global",description:"Show keyboard shortcuts",handler:()=>Z()});return()=>O(X)},[L,O,Z]),g.useEffect(()=>{const X=L({keys:"Mod+k",scope:"global",description:"Open command palette",handler:()=>{if(j){H();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||E()}});return()=>O(X)},[L,O,E,H,j]),g.useEffect(()=>{const _=[{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=>L({keys:`g ${D.suffix}`,scope:"global",description:D.desc,handler:()=>o(Fa(D.basePath,i))}));return()=>_.forEach(O)},[L,O,o,i]);const Y=g.useMemo(()=>({register:L,unregister:O,pushScope:P,popScope:$,openPalette:E,closePalette:H,paletteOpen:j,openCheatsheet:Z,closeCheatsheet:G,cheatsheetOpen:T,listBindings:q,wsPrefix:i,paletteEntries:m}),[L,O,P,$,E,H,j,Z,G,T,q,i,m]);return l.jsxs(A0.Provider,{value:Y,children:[e,l.jsx(SE,{entries:m}),l.jsx(RE,{})]})}function Fs(){const e=g.useContext(A0);if(!e)throw new Error("useHotkeyContext must be used within HotkeyProvider");return e}function yt({keys:e,handler:t,scope:n="global",description:o,when:i,enabled:a=!0}){const{register:c,unregister:d}=Fs(),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=c({keys:e,handler:x=>p.current(x),scope:n,description:o,when:h.current?()=>h.current():void 0});return()=>d(m)},[c,d,e,n,o,a])}function zs(e){const{pushScope:t,popScope:n}=Fs();g.useEffect(()=>(t(e),()=>n(e)),[t,n,e])}function yc(e,t){const[n,o]=g.useState(e.length===0?-1:0),i=fn();g.useEffect(()=>{o(e.length===0?-1:0)},[i.pathname]),g.useEffect(()=>{o(c=>e.length===0?-1:Math.min(Math.max(0,c),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]),yt({keys:"j",scope:t.scope,description:"Select next row",handler:()=>o(c=>e.length===0?-1:Math.min(e.length-1,c<0?0:c+1))}),yt({keys:"k",scope:t.scope,description:"Select previous row",handler:()=>o(c=>e.length===0?-1:Math.max(0,c<0?0:c-1))}),yt({keys:"Enter",scope:t.scope,description:"Open selected row",handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}}),yt({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(c=>({"data-hotkey-row-index":c,"data-hotkey-selected":c===n?"true":"false"}),[n]);return{selectedIndex:n,hotkeyRowProps:a}}function AE({title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:o}){const i=Lt(),{resolvedTheme:a,toggleTheme:c}=Fv(),{openPalette:d}=Fs();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(yC,{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(Ce,{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:Ss("Mod+k")})]}),l.jsx(Ce,{className:"shell-action",to:"/help",children:"Help"}),l.jsxs(Ce,{className:"shell-action",to:`${i}/create/project`,children:[l.jsx(lr,{className:"h-4 w-4"}),l.jsx("span",{children:"New Project"})]}),n?l.jsxs(Ce,{className:"shell-action",to:`${i}/projects/${n}/create/assignment`,children:[l.jsx(lr,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}):null,l.jsxs("button",{type:"button",onClick:c,className:"shell-action","aria-label":"Toggle theme",children:[a==="dark"?l.jsx(PC,{className:"h-4 w-4"}):l.jsx(vC,{className:"h-4 w-4"}),l.jsx("span",{children:a==="dark"?"Light":"Dark"})]})]})]})})}const DE=[{to:"/",label:"Overview",icon:oC},{to:"/attention",label:"Attention",icon:il},{to:"/playbooks",label:"Playbooks",icon:yv},{to:"/todos",label:"Todos",icon:Sr}],IE=[{suffix:"/projects",label:"Projects",icon:np},{suffix:"/assignments",label:"Assignments",icon:xC},{suffix:"/servers",label:"Servers",icon:rp},{suffix:"/agent-sessions",label:"Agent Sessions",icon:uc},{suffix:"/todos",label:"Todos",icon:Sr}],LE=[{to:"/help",label:"Help",icon:mC},{to:"/settings",label:"Settings",icon:EC}],bx="syntaur.dashboard.sourceFirstNoticeDismissed";function OE({title:e,breadcrumbs:t,projectSlug:n,workspace:o,children:i}){const[a,c]=g.useState(!1);yt({keys:"Escape",scope:"global",description:"Close mobile navigation",enabled:a,handler:()=>c(!1)});const[d,p]=g.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(bx)==="1"}catch{return!1}});function h(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem(bx,"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(wx,{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(Ce,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>c(!1),children:"Syntaur"}),l.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-9 w-9 items-center justify-center rounded-md border border-border/70 bg-background/80",children:l.jsx(Ev,{className:"h-4 w-4"})})]}),l.jsx(wx,{sourceNoticeDismissed:d,onDismissSourceNotice:h,activeWorkspace:o,onNavigate:()=>c(!1)})]})}):null,l.jsxs("div",{className:"min-w-0",children:[l.jsx(AE,{title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:()=>c(!0)}),l.jsx("main",{className:"mx-auto w-full max-w-[1480px] px-4 py-4 lg:px-6 lg:py-5",children:i})]})]})})}function wx({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:o}){const{data:i}=lp(),a=(i==null?void 0:i.workspaces)??[],c=(i==null?void 0:i.hasUngrouped)??!1,d=fn(),[p,h]=g.useState(new Set),[m,x]=g.useState(!1),[v,b]=g.useState(""),N=Xt();function k(S){h(T=>{const A=new Set(T);return A.has(S)?A.delete(S):A.add(S),A})}const j=[...a,...c?["_ungrouped"]:[]];return l.jsxs("div",{className:"flex h-full flex-col gap-3",children:[l.jsx("div",{className:"space-y-3",children:l.jsxs(Ce,{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(ox,{items:DE,onNavigate:o}),l.jsx("div",{className:"border-t border-border/40"}),l.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[j.length===0&&!m&&l.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),j.map(S=>{const T=S==="_ungrouped",A=T?"Ungrouped":Cn(S),L=T?"/w/_ungrouped":`/w/${S}`,O=p.has(S),P=n===S||n===null&&T&&d.pathname.startsWith("/w/_ungrouped");return l.jsxs("div",{children:[l.jsxs("button",{type:"button",onClick:()=>k(S),className:`flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-semibold uppercase tracking-wider transition ${P?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[l.jsx(Yi,{className:`h-3 w-3 transition-transform ${O?"-rotate-90":""}`}),A]}),!O&&l.jsx("nav",{className:"ml-2 space-y-0.5",children:IE.map($=>{const E=`${L}${$.suffix}`,H=Ov(d.pathname,$.suffix)&&d.pathname.startsWith(L),Z=$.icon;return l.jsxs(Ce,{to:E,onClick:o,className:`flex items-center gap-3 rounded-md px-3 py-1.5 text-sm font-medium transition ${H?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"}`,children:[l.jsx(Z,{className:"h-4 w-4"}),l.jsx("span",{children:$.label})]},E)})})]},S)}),m?l.jsx("form",{className:"px-3 py-1.5",onSubmit:S=>{S.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:S=>b(S.target.value),onKeyDown:S=>{S.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(lr,{className:"h-3 w-3"}),"New Workspace"]})]}),l.jsx("div",{className:"border-t border-border/40"}),l.jsx(ox,{items:LE,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(Ev,{className:"h-4 w-4"})})]})})]})}function _E(){const e=fn(),{workspace:t}=Et(),{title:n,breadcrumbs:o,projectSlug:i}=mN(e.pathname);return l.jsx(OE,{title:n,breadcrumbs:o,projectSlug:i,workspace:t??null,children:l.jsx(uS,{})})}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:nC},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:jv},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:xf},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:SC},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:ep},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:xf},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:yf},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:ZS},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:yf}};function Ht({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:yf},a=i.icon,c=o&&o.total>0,d=c?Math.min(1,Math.max(0,o.checked/o.total)):0,p=c?`${i.description} (${o.checked}/${o.total} criteria)`:i.description,h=n?c?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:$e("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 D0(e){var t;return((t=Ya[e])==null?void 0:t.description)??`Status: ${e}`}const ME={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 it({label:e,value:t,description:n,icon:o,tone:i="default",to:a}){const c=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),l.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),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=$e("rounded-lg border p-3 shadow-sm",ME[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(Ce,{to:a,className:d,children:c}):l.jsx("article",{className:d,children:c})}function Pe({title:e,description:t,children:n,className:o,actions:i}){return l.jsxs("section",{className:$e("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 vt({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 Ge({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 $E({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(Pe,{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(Ce,{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 FE(){var c;const{data:e,loading:t,error:n}=vN(),{data:o}=Uv(),{data:i}=cp(),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(vt,{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(it,{label:"Active Projects",value:e.stats.activeProjects,icon:np,to:"/projects"}),l.jsx(it,{label:"In Progress",value:e.stats.inProgressAssignments,icon:dC,tone:"info",to:"/assignments?status=in_progress"}),l.jsx(it,{label:"Blocked",value:e.stats.blockedAssignments,icon:il,tone:"warn",to:"/assignments?status=blocked"}),l.jsx(it,{label:"Review",value:e.stats.reviewAssignments,icon:tC,tone:"info",to:"/assignments?status=review"}),l.jsx(it,{label:"Failed",value:e.stats.failedAssignments,icon:bC,tone:"danger",to:"/assignments?status=failed"}),l.jsx(it,{label:"Stale",value:e.stats.staleAssignments,icon:uc,to:"/assignments?stale=1"}),l.jsx(it,{label:"Open Todos",value:a,icon:Sr,to:"/todos"}),l.jsx(it,{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:rp,tone:(c=e.serverStats)!=null&&c.deadSessions?"warn":"default",to:"/servers"})]}),l.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx(Pe,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?l.jsx(Ge,{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(Ce,{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(Ht,{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(Pe,{title:"Recently Updated Projects",children:e.recentProjects.length===0?l.jsx(Ge,{title:"No projects yet",description:"Create your first project to populate the project directory, recent activity, and attention queue.",actions:l.jsx(Ce,{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(Ce,{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(Ht,{status:d.status})]})},d.slug))})}),l.jsx(Pe,{title:"Recent Activity",children:e.recentActivity.length===0?l.jsx(Ge,{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(Ce,{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:Cn(d.type)})]}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Cr(d.updated)})]},d.id))})})]})]}),e.firstRun&&l.jsx($E,{help:o})]})]})}function zE(){const{data:e,loading:t,error:n}=bN();return t?l.jsx(jt,{label:"Loading attention queue…"}):n||!e?l.jsx(vt,{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(it,{label:"Critical",value:e.summary.critical,icon:uC,tone:"danger"}),l.jsx(it,{label:"High",value:e.summary.high,icon:il,tone:"warn"}),l.jsx(it,{label:"Medium",value:e.summary.medium,icon:RC,tone:"info"}),l.jsx(it,{label:"Low",value:e.summary.low,icon:hC})]}),l.jsx(Pe,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?l.jsx(Ge,{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(Ce,{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(Ht,{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 BE({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 UE(){const{data:e,loading:t,error:n}=Uv(),{openCheatsheet:o}=Fs();return t?l.jsx(jt,{label:"Loading help…"}):n||!e?l.jsx(vt,{error:n||"Help content is unavailable."}):l.jsxs("div",{className:"space-y-5",children:[l.jsx(Pe,{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. ",Ss("Mod+k")," opens the command palette."]})]})}),l.jsx(Pe,{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(Pe,{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(Ce,{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(Pe,{title:"Core Concepts",children:[l.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(i=>l.jsx(BE,{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(Pe,{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(Ht,{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(Pe,{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(Pe,{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(Ce,{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(Pe,{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(Pe,{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(Pe,{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(Ce,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})})]})]})}function wp({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 vc=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"})]}));vc.displayName="SearchInput";function kp({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:$e("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 I0({columns:e,items:t,getItemId:n,getColumnId:o,renderCard:i,canDrop:a,onMove:c,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 j(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 S(){h(null),x(null)}function T(O,P){c&&(O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",P),h(P))}function A(O,P,$){!c||!k||!j(P).allowed||(O.preventDefault(),O.dataTransfer.dropEffect="move",x(H=>(H==null?void 0:H.columnId)===P&&H.index===$?H:{columnId:P,index:$}))}async function L(O,P,$){var q;if(O.preventDefault(),!c||!k){S();return}const E=o(k),Z=(((q=N.find(Y=>Y.column.id===E))==null?void 0:q.items)??[]).findIndex(Y=>n(Y)===n(k));if(!j(P).allowed||Z<0){S();return}if(E===P&&($===Z||$===Z+1)){S();return}try{await c({item:k,fromColumnId:E,toColumnId:P,fromIndex:Z,toIndex:$})}finally{S()}}return l.jsx("div",{className:"relative overflow-x-auto pb-2",style:{scrollbarColor:"hsl(var(--border)) transparent",scrollbarWidth:"thin"},children:l.jsx("div",{className:"grid min-w-max auto-cols-[minmax(260px,320px)] grid-flow-col gap-4",children:N.map(({column:O,items:P})=>{const $=j(O.id),E=(m==null?void 0:m.columnId)===O.id;return l.jsxs("section",{className:$e("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",k&&!$.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:H=>A(H,O.id,P.length),onDrop:H=>L(H,O.id,P.length),children:[P.length===0?l.jsx(HE,{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((H,Z)=>{const G=n(H),q=p===G;return l.jsxs(g.Fragment,{children:[l.jsx("div",{className:$e("h-2 rounded-full transition",(m==null?void 0:m.columnId)===O.id&&m.index===Z?"bg-primary/70":"bg-transparent"),onDragOver:Y=>A(Y,O.id,Z),onDrop:Y=>L(Y,O.id,Z)}),l.jsx("div",{draggable:!!c,onMouseDown:Y=>{v.current=Y.target},onDragStart:Y=>{const X=v.current;if(X!=null&&X.closest("a, button")){Y.preventDefault();return}T(Y,G)},onDragEnd:S,className:$e("transition",c?"cursor-grab active:cursor-grabbing":"",q?"scale-[0.98] opacity-50":""),children:i(H,{dragging:q})})]},G)}),P.length>0?l.jsx("div",{className:$e("mt-1 rounded-md border border-dashed px-3 py-2 text-center text-xs text-muted-foreground transition",(m==null?void 0:m.columnId)===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 HE({active:e,disabled:t,children:n}){return l.jsx("div",{className:$e("flex min-h-[128px] items-center justify-center rounded-lg border border-dashed px-4 text-center text-sm text-muted-foreground transition",e?"border-primary/60 bg-primary/10 text-foreground":"border-border/60 bg-background/50",t?"opacity-45":""),children:n})}const 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 $i=null,Bo=null;function WE(){return $i?Promise.resolve($i):Bo||(Bo=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>($i=e,Bo=null,e)).catch(()=>(Bo=null,L0)),Bo)}function bc(){const[e,t]=g.useState(()=>$i??L0);return g.useEffect(()=>{WE().then(t)},[]),e}function kx(){$i=null,Bo=null}function VE(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 qE={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"},jx=["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=bc(),i=g.useMemo(()=>{let c=0;return(o.order.length>0?o.order:Object.keys(e).filter(p=>p!=="total")).map(p=>({key:p,className:qE[p]??jx[c++%jx.length]}))},[o.order,e]),a=i.filter(c=>(e[c.key]??0)>0);return l.jsxs("div",{className:$e("space-y-2",t),children:[l.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?l.jsx("div",{className:"h-full w-full bg-muted"}):a.map(c=>l.jsx("div",{className:c.className,style:{width:`${(e[c.key]??0)/e.total*100}%`},title:`${Cn(c.key)}: ${e[c.key]??0}`},c.key))}),n?l.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(c=>l.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[l.jsx("span",{className:$e("h-2 w-2 rounded-full",c.className)}),l.jsx("span",{children:Cn(c.key)}),l.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const KE=["pending","active","blocked","failed","completed","archived"],jp=KE,GE=["pending","in_progress","blocked","review","completed","failed"];function YE(e){return e&&e.length>0?e:[...GE]}function XE(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 Sx(){const{workspace:e}=Et(),t=Lt(),n=Xt(),{data:o,loading:i,error:a,refetch:c}=dc(),d=g.useRef(null);zs("list:projects");const[p,h]=g.useState(""),[m,x]=g.useState("all"),[v,b]=g.useState("active"),[N,k]=g.useState("all"),[j,S]=g.useState("updated"),[T,A]=_s(),L=T.get("view"),O=L==="table"||L==="kanban"?L:"cards",P=D=>{A(V=>{const W=new URLSearchParams(V);return D==="cards"?W.delete("view"):W.set("view",D),W})},[$,E]=g.useState({}),H=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)=>ZE(D,V,j)):[],[o,p,m,v,N,j,e]),Z=H.map(D=>`${D.slug}:${D.status}`).join("|");g.useEffect(()=>{E(eR(H))},[Z,j]);const G=g.useMemo(()=>{const D=new Map(H.map(V=>[V.slug,V]));return jp.flatMap(V=>($[V]??H.filter(ee=>ee.status===V).map(ee=>ee.slug)).map(ee=>D.get(ee)).filter(ee=>!!ee))},[H,$]),{visibleItems:q,visibleIndexByKey:Y}=g.useMemo(()=>{const D=O==="kanban"?G:H,V=new Map;return D.forEach((W,ee)=>V.set(W.slug,ee)),{visibleItems:D,visibleIndexByKey:V}},[O,H,G]),{hotkeyRowProps:X}=yc(q,{scope:"list:projects",onOpen:D=>n(`${t}/projects/${D.slug}`)});if(yt({keys:"/",scope:"list:projects",description:"Focus filter",handler:()=>{var D;return(D=d.current)==null?void 0:D.focus()}}),yt({keys:"r",scope:"list:projects",description:"Refresh",handler:()=>c()}),i)return l.jsx(jt,{label:"Loading projects…"});if(a||!o)return l.jsx(vt,{error:a||"Project list is unavailable."});const _=Array.from(new Set(o.flatMap(D=>D.tags))).sort();return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(wp,{children:[l.jsx(vc,{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"}),_.map(D=>l.jsx("option",{value:D,children:D},D))]}),l.jsxs("select",{value:j,onChange:D=>S(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(kp,{value:O,onChange:D=>P(D),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),H.length===0?l.jsx(Ge,{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(Ce,{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:H.map((D,V)=>l.jsxs(Ce,{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",...X(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 ",Vr(D.updated)]})]}),l.jsx(Ht,{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(W=>l.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:W},W))}),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(Pe,{title:`${H.length} project${H.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:H.map((D,V)=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",...X(V),children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(Ce,{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(W=>l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:W},W))})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx(Ht,{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:Vr(D.updated)})]},D.slug))})]})})}):l.jsx(I0,{columns:JE,items:G,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:W,fromIndex:ee,toIndex:R})=>{if(V===W){const F=$[V]??H.filter(J=>J.status===V).map(J=>J.slug);E(J=>({...J,[V]:XE(F,ee,R)}));return}fetch(`/api/projects/${D.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:W})}).then(()=>{window.location.reload()})},emptyMessage:D=>`No ${D.title.toLowerCase()} projects.`,renderCard:(D,{dragging:V})=>{const W=Y.get(D.slug)??-1;return l.jsx("div",{...W>=0?X(W):{},children:l.jsx(tR,{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(kv,{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"},JE=jp.map(e=>({id:e,title:QE[e],description:D0(e)}));function ZE(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return Cx(t)-Cx(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function Cx(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.openQuestions}function eR(e){return Object.fromEntries(jp.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function tR({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(Ce,{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 ",Vr(e.updated)]})]}),l.jsx(Ht,{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 Hr({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(Zf,{className:"h-3 w-3 text-green-500"}):l.jsx(tp,{className:"h-3 w-3"})})}function Nx(e){const t=nR(e),n=g.forwardRef((o,i)=>{const{children:a,...c}=o,d=g.Children.toArray(a),p=d.find(oR);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,{...c,ref:i,children:g.isValidElement(h)?g.cloneElement(h,void 0,m):null})}return l.jsx(t,{...c,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function nR(e){const t=g.forwardRef((n,o)=>{const{children:i,...a}=n;if(g.isValidElement(i)){const c=iR(i),d=sR(a,i.props);return i.type!==g.Fragment&&(d.ref=o?fc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rR=Symbol("radix.slottable");function oR(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rR}function sR(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 iR(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 lR(e){const t=e+"CollectionProvider",[n,o]=Vo(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=k=>{const{scope:j,children:S}=k,T=xt.useRef(null),A=xt.useRef(new Map).current;return l.jsx(i,{scope:j,itemMap:A,collectionRef:T,children:S})};c.displayName=t;const d=e+"CollectionSlot",p=Nx(d),h=xt.forwardRef((k,j)=>{const{scope:S,children:T}=k,A=a(d,S),L=ln(j,A.collectionRef);return l.jsx(p,{ref:L,children:T})});h.displayName=d;const m=e+"CollectionItemSlot",x="data-radix-collection-item",v=Nx(m),b=xt.forwardRef((k,j)=>{const{scope:S,children:T,...A}=k,L=xt.useRef(null),O=ln(j,L),P=a(m,S);return xt.useEffect(()=>(P.itemMap.set(L,{ref:L,...A}),()=>void P.itemMap.delete(L))),l.jsx(v,{[x]:"",ref:O,children:T})});b.displayName=m;function N(k){const j=a(e+"CollectionConsumer",k);return xt.useCallback(()=>{const T=j.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((P,$)=>A.indexOf(P.ref.current)-A.indexOf($.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:h,ItemSlot:b},N,o]}var aR=g.createContext(void 0);function O0(e){const t=g.useContext(aR);return e||t||"ltr"}var Fd="rovingFocusGroup.onEntryFocus",cR={bubbles:!1,cancelable:!0},ll="RovingFocusGroup",[Sf,_0,uR]=lR(ll),[dR,M0]=Vo(ll,[uR]),[fR,pR]=dR(ll),$0=g.forwardRef((e,t)=>l.jsx(Sf.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Sf.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(hR,{...e,ref:t})})}));$0.displayName=ll;var hR=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...x}=e,v=g.useRef(null),b=ln(t,v),N=O0(a),[k,j]=pc({prop:c,defaultProp:d??null,onChange:p,caller:ll}),[S,T]=g.useState(!1),A=Uo(h),L=_0(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(fR,{scope:n,orientation:o,dir:N,loop:i,currentTabStopId:k,onItemFocus:g.useCallback(E=>j(E),[j]),onItemShiftTab:g.useCallback(()=>T(!0),[]),onFocusableItemAdd:g.useCallback(()=>$(E=>E+1),[]),onFocusableItemRemove:g.useCallback(()=>$(E=>E-1),[]),children:l.jsx(Rt.div,{tabIndex:S||P===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:ct(e.onMouseDown,()=>{O.current=!0}),onFocus:ct(e.onFocus,E=>{const H=!O.current;if(E.target===E.currentTarget&&H&&!S){const Z=new CustomEvent(Fd,cR);if(E.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){const G=L().filter(D=>D.focusable),q=G.find(D=>D.active),Y=G.find(D=>D.id===k),_=[q,Y,...G].filter(Boolean).map(D=>D.ref.current);B0(_,m)}}O.current=!1}),onBlur:ct(e.onBlur,()=>T(!1))})})}),F0="RovingFocusGroupItem",z0=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,children:c,...d}=e,p=Cs(),h=a||p,m=pR(F0,n),x=m.currentTabStopId===h,v=_0(n),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:k}=m;return g.useEffect(()=>{if(o)return b(),()=>N()},[o,b,N]),l.jsx(Sf.ItemSlot,{scope:n,id:h,focusable:o,active:i,children:l.jsx(Rt.span,{tabIndex:x?0:-1,"data-orientation":m.orientation,...d,ref:t,onMouseDown:ct(e.onMouseDown,j=>{o?m.onItemFocus(h):j.preventDefault()}),onFocus:ct(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:ct(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){m.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const S=xR(j,m.orientation,m.dir);if(S!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let A=v().filter(L=>L.focusable).map(L=>L.ref.current);if(S==="last")A.reverse();else if(S==="prev"||S==="next"){S==="prev"&&A.reverse();const L=A.indexOf(j.currentTarget);A=m.loop?yR(A,L+1):A.slice(L+1)}setTimeout(()=>B0(A))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:k!=null}):c})})});z0.displayName=F0;var mR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function xR(e,t,n){const o=gR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return mR[o]}function B0(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function yR(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var vR=$0,bR=z0,wc="Tabs",[wR]=Vo(wc,[M0]),U0=M0(),[kR,Sp]=wR(wc),H0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:d,activationMode:p="automatic",...h}=e,m=O0(d),[x,v]=pc({prop:o,onChange:i,defaultProp:a??"",caller:wc});return l.jsx(kR,{scope:n,baseId:Cs(),value:x,onValueChange:v,orientation:c,dir:m,activationMode:p,children:l.jsx(Rt.div,{dir:m,"data-orientation":c,...h,ref:t})})});H0.displayName=wc;var W0="TabsList",V0=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,a=Sp(W0,n),c=U0(n);return l.jsx(vR,{asChild:!0,...c,orientation:a.orientation,dir:a.dir,loop:o,children:l.jsx(Rt.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});V0.displayName=W0;var q0="TabsTrigger",K0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...a}=e,c=Sp(q0,n),d=U0(n),p=X0(c.baseId,o),h=Q0(c.baseId,o),m=o===c.value;return l.jsx(bR,{asChild:!0,...d,focusable:!i,active:m,children:l.jsx(Rt.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:ct(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?c.onValueChange(o):x.preventDefault()}),onKeyDown:ct(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(o)}),onFocus:ct(e.onFocus,()=>{const x=c.activationMode!=="manual";!m&&!i&&x&&c.onValueChange(o)})})})});K0.displayName=q0;var G0="TabsContent",Y0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:a,...c}=e,d=Sp(G0,n),p=X0(d.baseId,o),h=Q0(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(Rt.div,{"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!v,id:h,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:v&&a})})});Y0.displayName=G0;function X0(e,t){return`${e}-trigger-${t}`}function Q0(e,t){return`${e}-content-${t}`}var jR=H0,SR=V0,CR=K0,NR=Y0;function Cp({value:e,onValueChange:t,items:n,className:o}){return l.jsxs(jR,{value:e,onValueChange:t,className:o,children:[l.jsx(SR,{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(CR,{value:i.value,className:$e("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:[l.jsx("span",{children:i.label}),typeof i.count=="number"?l.jsx("span",{className:"rounded-full bg-background/20 px-2 py-0.5 text-xs data-[state=active]:bg-background/20",children:i.count}):null]},i.value))}),n.map(i=>l.jsx(NR,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const ER="modulepreload",RR=function(e){return"/"+e},Ex={},PR=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){let c=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));i=c(n.map(h=>{if(h=RR(h),h in Ex)return;Ex[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":ER,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(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&a(d.reason);return t().catch(a)})};function TR({definition:e,className:t,nodeRoutes:n={}}){const o=g.useRef(null),[i,a]=g.useState(null),[c,d]=g.useState(!0),p=Xt(),h=document.documentElement.classList.contains("dark")?"dark":"default";return g.useEffect(()=>{let m=!1;async function x(){if(o.current)try{const v=(await PR(async()=>{const{default:k}=await import("./mermaid.core-DKO1ytRW.js").then(j=>j.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,AR(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:$e("rounded-lg border border-border bg-card p-4",t),children:[l.jsxs("p",{className:"text-sm text-red-400",children:["Failed to render dependency graph: ",i]}),l.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):l.jsxs("div",{className:$e("rounded-lg border border-border bg-card p-4",t),children:[c&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),l.jsx("div",{ref:o,className:"overflow-auto"})]})}function AR(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())??"",c=t[a];if(!c)continue;i.style.cursor="pointer",i.setAttribute("role","link"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",`Open ${a}`);const d=()=>n(c);i.addEventListener("click",d),i.addEventListener("keydown",p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d())})}}function DR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const IR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OR={};function Rx(e,t){return(OR.jsx?LR:IR).test(e)}const _R=/[ \t\n\f\r]/g;function MR(e){return typeof e=="object"?e.type==="text"?Px(e.value):!1:Px(e)}function Px(e){return e.replace(_R,"")===""}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 Cf(e){return e.toLowerCase()}class En{constructor(t,n){this.attribute=n,this.property=t}}En.prototype.attribute="";En.prototype.booleanish=!1;En.prototype.boolean=!1;En.prototype.commaOrSpaceSeparated=!1;En.prototype.commaSeparated=!1;En.prototype.defined=!1;En.prototype.mustUseProperty=!1;En.prototype.number=!1;En.prototype.overloadedBoolean=!1;En.prototype.property="";En.prototype.spaceSeparated=!1;En.prototype.space=void 0;let $R=0;const Me=Ko(),Nt=Ko(),Nf=Ko(),ce=Ko(),Ze=Ko(),Es=Ko(),_n=Ko();function Ko(){return 2**++$R}const Ef=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:Nt,commaOrSpaceSeparated:_n,commaSeparated:Es,number:ce,overloadedBoolean:Nf,spaceSeparated:Ze},Symbol.toStringTag,{value:"Module"})),zd=Object.keys(Ef);class Np extends En{constructor(t,n,o,i){let a=-1;if(super(t,n),Tx(this,"space",i),typeof o=="number")for(;++a<zd.length;){const c=zd[a];Tx(this,zd[a],(o&Ef[c])===Ef[c])}}}Np.prototype.defined=!0;function Tx(e,t,n){n&&(e[t]=n)}function Bs(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const a=new Np(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,n[Cf(o)]=o,n[Cf(a.attribute)]=o}return new al(t,n,e.space)}const Z0=Bs({properties:{ariaActiveDescendant:null,ariaAtomic:Nt,ariaAutoComplete:null,ariaBusy:Nt,ariaChecked:Nt,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:Ze,ariaCurrent:null,ariaDescribedBy:Ze,ariaDetails:null,ariaDisabled:Nt,ariaDropEffect:Ze,ariaErrorMessage:null,ariaExpanded:Nt,ariaFlowTo:Ze,ariaGrabbed:Nt,ariaHasPopup:null,ariaHidden:Nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ze,ariaLevel:ce,ariaLive:null,ariaModal:Nt,ariaMultiLine:Nt,ariaMultiSelectable:Nt,ariaOrientation:null,ariaOwns:Ze,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:Nt,ariaReadOnly:Nt,ariaRelevant:null,ariaRequired:Nt,ariaRoleDescription:Ze,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:Nt,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,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 FR=Bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Es,acceptCharset:Ze,accessKey:Ze,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:Ze,autoFocus:Me,autoPlay:Me,blocking:Ze,capture:null,charSet:null,checked:Me,cite:null,className:Ze,cols:ce,colSpan:null,content:null,contentEditable:Nt,controls:Me,controlsList:Ze,coords:ce|Es,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:Nf,draggable:Nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:Ze,height:ce,hidden:Nf,high:ce,href:null,hrefLang:null,htmlFor:Ze,httpEquiv:Ze,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:Ze,itemRef:Ze,itemScope:Me,itemType:Ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,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:Me,optimum:ce,pattern:null,ping:Ze,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:Ze,required:Me,reversed:Me,rows:ce,rowSpan:ce,sandbox:Ze,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:Nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:Nt,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ze,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:Nt,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:tb}),zR=Bs({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:_n,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:Ze,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:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,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:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:_n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,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:ce,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:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_n,rev:_n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_n,requiredFeatures:_n,requiredFonts:_n,requiredFormats:_n,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:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:_n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_n,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:eb}),nb=Bs({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=Bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tb}),ob=Bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),BR={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"},UR=/[A-Z]/g,Ax=/-[a-z]/g,HR=/^data[-\w.:]+$/i;function WR(e,t){const n=Cf(t);let o=t,i=En;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&HR.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ax,qR);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ax.test(a)){let c=a.replace(UR,VR);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}i=Np}return new i(o,t)}function VR(e){return"-"+e.toLowerCase()}function qR(e){return e.charAt(1).toUpperCase()}const KR=J0([Z0,FR,nb,rb,ob],"html"),Ep=J0([Z0,zR,nb,rb,ob],"svg");function GR(e){return e.join(" ").trim()}var vs={},Bd,Dx;function YR(){if(Dx)return Bd;Dx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
441
+ `,h="/",m="*",x="",v="comment",b="declaration";function N(j,S){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];S=S||{};var T=1,A=1;function L(X){var _=X.match(t);_&&(T+=_.length);var D=X.lastIndexOf(p);A=~D?X.length-D:A+X.length}function O(){var X={line:T,column:A};return function(_){return _.position=new P(X),H(),_}}function P(X){this.start=X,this.end={line:T,column:A},this.source=S.source}P.prototype.content=j;function $(X){var _=new Error(S.source+":"+T+":"+A+": "+X);if(_.reason=X,_.filename=S.source,_.line=T,_.column=A,_.source=j,!S.silent)throw _}function E(X){var _=X.exec(j);if(_){var D=_[0];return L(D),j=j.slice(D.length),_}}function H(){E(n)}function Z(X){var _;for(X=X||[];_=G();)_!==!1&&X.push(_);return X}function G(){var X=O();if(!(h!=j.charAt(0)||m!=j.charAt(1))){for(var _=2;x!=j.charAt(_)&&(m!=j.charAt(_)||h!=j.charAt(_+1));)++_;if(_+=2,x===j.charAt(_-1))return $("End of comment missing");var D=j.slice(2,_-2);return A+=2,L(D),j=j.slice(_),A+=2,X({type:v,comment:D})}}function q(){var X=O(),_=E(o);if(_){if(G(),!E(i))return $("property missing ':'");var D=E(a),V=X({type:b,property:k(_[0].replace(e,x)),value:D?k(D[0].replace(e,x)):x});return E(c),V}}function Y(){var X=[];Z(X);for(var _;_=q();)_!==!1&&(X.push(_),Z(X));return X}return H(),Y()}function k(j){return j?j.replace(d,x):x}return Bd=N,Bd}var Ix;function XR(){if(Ix)return vs;Ix=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(YR());function n(o,i){let a=null;if(!o||typeof o!="string")return a;const c=(0,t.default)(o),d=typeof i=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:m}=p;d?i(h,m,p):m&&(a=a||{},a[h]=m)}),a}return vs}var Di={},Lx;function QR(){if(Lx)return Di;Lx=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.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)},c=function(h,m){return m.toUpperCase()},d=function(h,m){return"".concat(m,"-")},p=function(h,m){return m===void 0&&(m={}),a(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(i,d):h=h.replace(o,d),h.replace(t,c))};return Di.camelCase=p,Di}var Ii,Ox;function JR(){if(Ox)return Ii;Ox=1;var e=Ii&&Ii.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(XR()),n=QR();function o(i,a){var c={};return!i||typeof i!="string"||(0,t.default)(i,function(d,p){d&&p&&(c[(0,n.camelCase)(d,a)]=p)}),c}return o.default=o,Ii=o,Ii}var ZR=JR();const eP=lc(ZR),sb=ib("end"),Rp=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 tP(e){const t=Rp(e),n=sb(e);if(t&&n)return{start:t,end:n}}function Fi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_x(e.position):"start"in e||"end"in e?_x(e):"line"in e||"column"in e?Rf(e):""}function Rf(e){return Mx(e&&e.line)+":"+Mx(e&&e.column)}function _x(e){return Rf(e&&e.start)+"-"+Rf(e&&e.end)}function Mx(e){return e&&typeof e=="number"?e:1}class an extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",a={},c=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(c=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof 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=Fi(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=c&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}an.prototype.file="";an.prototype.name="";an.prototype.reason="";an.prototype.message="";an.prototype.stack="";an.prototype.column=void 0;an.prototype.line=void 0;an.prototype.ancestors=void 0;an.prototype.cause=void 0;an.prototype.fatal=void 0;an.prototype.place=void 0;an.prototype.ruleId=void 0;an.prototype.source=void 0;const Pp={}.hasOwnProperty,nP=new Map,rP=/[A-Z]/g,oP=new Set(["table","tbody","thead","tfoot","tr"]),sP=new Set(["td","th"]),lb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function iP(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=hP(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=pP(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"?Ep:KR,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 lP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return aP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return uP(e,t,n);if(t.type==="mdxjsEsm")return cP(e,t);if(t.type==="root")return dP(e,t,n);if(t.type==="text")return fP(e,t)}function lP(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=Ep,e.schema=i),e.ancestors.push(t);const a=ub(e,t.tagName,!1),c=mP(e,t);let d=Ap(e,t);return oP.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!MR(p):!0})),cb(e,c,a,t),Tp(c,d),e.ancestors.pop(),e.schema=o,e.create(t,a,c,n)}function aP(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)}Xi(e,t.position)}function cP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xi(e,t.position)}function uP(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=Ep,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:ub(e,t.name,!0),c=gP(e,t),d=Ap(e,t);return cb(e,c,a,t),Tp(c,d),e.ancestors.pop(),e.schema=o,e.create(t,a,c,n)}function dP(e,t,n){const o={};return Tp(o,Ap(e,t)),e.create(t,e.Fragment,o,n)}function fP(e,t){return t.value}function cb(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function Tp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function pP(e,t,n){return o;function o(i,a,c,d){const h=Array.isArray(c.children)?n:t;return d?h(a,c,d):h(a,c)}}function hP(e,t){return n;function n(o,i,a,c){const d=Array.isArray(a.children),p=Rp(o);return t(i,a,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function mP(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&Pp.call(t.properties,i)){const a=xP(e,i,t.properties[i]);if(a){const[c,d]=a;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&sP.has(t.tagName)?o=d:n[c]=d}}if(o){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function gP(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 c=a.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Xi(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 Xi(e,t.position);else a=o.value===null?!0:o.value;n[i]=a}return n}function Ap(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:nP;for(;++o<t.children.length;){const a=t.children[o];let c;if(e.passKeys){const p=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(p){const h=i.get(p)||0;c=p+"-"+h,i.set(p,h+1)}}const d=ab(e,a,c);d!==void 0&&n.push(d)}return n}function xP(e,t,n){const o=WR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?DR(n):GR(n)),o.property==="style"){let i=typeof n=="object"?n:yP(e,String(n));return e.stylePropertyNameCase==="css"&&(i=vP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?BR[o.property]||o.property:o.attribute,n]}}function yP(e,t){try{return eP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new an("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 ub(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,c;for(;++a<i.length;){const d=Rx(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(a&&d.type==="Literal"),optional:!1}:d}o=c}else o=Rx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return Pp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);Xi(e)}function Xi(e,t){const n=new an("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 vP(e){const t={};let n;for(n in e)Pp.call(e,n)&&(t[bP(n)]=e[n]);return t}function bP(e){let t=e.replace(rP,wP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function wP(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"]},kP={};function jP(e,t){const n=kP,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(SP(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 $x(e.children,t,n)}return Array.isArray(e)?$x(e,t,n):""}function $x(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=db(e[i],t,n);return o.join("")}function SP(e){return!!(e&&typeof e=="object")}const Fx=document.createElement("i");function Dp(e){const t="&"+e+";";Fx.innerHTML=t;const n=Fx.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,c;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)c=Array.from(o),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);a<o.length;)c=o.slice(a,a+1e4),c.unshift(t,0),e.splice(...c),a+=1e4,t+=1e4}function Yn(e,t){return e.length>0?(Er(e,e.length,0,t),e):t}const zx={}.hasOwnProperty;function CP(e){const t={};let n=-1;for(;++n<e.length;)NP(t,e[n]);return t}function NP(e,t){let n;for(n in t){const i=(zx.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let c;if(a)for(c in a){zx.call(i,c)||(i[c]=[]);const d=a[c];EP(i[c],Array.isArray(d)?d:d?[d]:[])}}}function EP(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]/),$n=No(/[\dA-Za-z]/),RP=No(/[#-'*+\--9=?A-Z^-~]/);function Pf(e){return e!==null&&(e<32||e===127)}const Tf=No(/\d/),PP=No(/[\dA-Fa-f]/),TP=No(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function Nn(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const AP=No(new RegExp("\\p{P}|\\p{S}","u")),DP=No(/\s/);function No(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Us(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let c="";if(a===37&&$n(e.charCodeAt(n+1))&&$n(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(c=String.fromCharCode(a));else if(a>55295&&a<57344){const d=e.charCodeAt(n+1);a<56320&&d>56319&&d<57344?(c=String.fromCharCode(a,d),i=1):c="�"}else c=String.fromCharCode(a);c&&(t.push(e.slice(o,n),encodeURIComponent(c)),o=n+i+1,c=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function et(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(p){return qe(p)?(e.enter(n),d(p)):t(p)}function d(p){return qe(p)&&a++<i?(e.consume(p),d):(e.exit(n),t(p))}}const IP={tokenize:LP};function LP(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"),et(e,t,"linePrefix")}function i(d){return e.enter("paragraph"),a(d)}function a(d){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Ie(d)?(e.consume(d),e.exit("chunkText"),a):(e.consume(d),c)}}const OP={tokenize:_P},Bx={tokenize:MP};function _P(e){const t=this,n=[];let o=0,i,a,c;return d;function d(A){if(o<n.length){const L=n[o];return t.containerState=L[1],e.attempt(L[0].continuation,p,h)(A)}return h(A)}function p(A){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const L=t.events.length;let O=L,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){P=t.events[O][1].end;break}S(o);let $=L;for(;$<t.events.length;)t.events[$][1].end={...P},$++;return Er(t.events,O+1,0,t.events.slice(L)),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(Bx,m,x)(A)}function m(A){return i&&T(),S(o),v(A)}function x(A){return t.parser.lazy[t.now().line]=o!==n.length,c=t.now().offset,N(A)}function v(A){return t.containerState={},e.attempt(Bx,b,N)(A)}function b(A){return o++,n.push([t.currentConstruct,t.containerState]),v(A)}function N(A){if(A===null){i&&T(),S(0),e.consume(A);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),k(A)}function k(A){if(A===null){j(e.exit("chunkFlow"),!0),S(0),e.consume(A);return}return Ie(A)?(e.consume(A),j(e.exit("chunkFlow")),o=0,t.interrupt=void 0,d):(e.consume(A),k)}function j(A,L){const O=t.sliceStream(A);if(L&&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<c&&(!i.events[P][1].end||i.events[P][1].end.offset>c))return;const $=t.events.length;let E=$,H,Z;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(H){Z=t.events[E][1].end;break}H=!0}for(S(o),P=$;P<t.events.length;)t.events[P][1].end={...Z},P++;Er(t.events,E+1,0,t.events.slice($)),t.events.length=P}}function S(A){let L=n.length;for(;L-- >A;){const O=n[L];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 MP(e,t,n){return et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ux(e){if(e===null||Nn(e)||DP(e))return 1;if(AP(e))return 2}function Ip(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 Af={name:"attention",resolveAll:$P,tokenize:FP};function $P(e,t){let n=-1,o,i,a,c,d,p,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(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};Hx(x,-p),Hx(v,p),c={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:{...c.start},end:{...d.end}},e[o][1].end={...c.start},e[n][1].start={...d.end},h=[],e[o][1].end.offset-e[o][1].start.offset&&(h=Yn(h,[["enter",e[o][1],t],["exit",e[o][1],t]])),h=Yn(h,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",a,t]]),h=Yn(h,Ip(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),h=Yn(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=Yn(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 FP(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=Ux(o);let a;return c;function c(p){return a=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===a)return e.consume(p),d;const h=e.exit("attentionSequence"),m=Ux(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 Hx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zP={name:"autolink",tokenize:BP};function BP(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),c):b===64?n(b):h(b)}function c(b){return b===43||b===45||b===46||$n(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||$n(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||Pf(b)?n(b):(e.consume(b),p)}function h(b){return b===64?(e.consume(b),m):RP(b)?(e.consume(b),h):n(b)}function m(b){return $n(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||$n(b))&&o++<63){const N=b===45?v:x;return e.consume(b),N}return n(b)}}const kc={partial:!0,tokenize:UP};function UP(e,t,n){return o;function o(a){return qe(a)?et(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ie(a)?t(a):n(a)}}const pb={continuation:{tokenize:WP},exit:VP,name:"blockQuote",tokenize:HP};function HP(e,t,n){const o=this;return i;function i(c){if(c===62){const d=o.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),a}return n(c)}function a(c){return qe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function WP(e,t,n){const o=this;return i;function i(c){return qe(c)?et(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return e.attempt(pb,t,n)(c)}}function VP(e){e.exit("blockQuote")}const hb={name:"characterEscape",tokenize:qP};function qP(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 TP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const mb={name:"characterReference",tokenize:KP};function KP(e,t,n){const o=this;let i=0,a,c;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),p}function p(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,c=$n,m(x))}function h(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,c=PP,m):(e.enter("characterReferenceValue"),a=7,c=Tf,m(x))}function m(x){if(x===59&&i){const v=e.exit("characterReferenceValue");return c===$n&&!Dp(o.sliceSerialize(v))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&i++<a?(e.consume(x),m):n(x)}}const Wx={partial:!0,tokenize:YP},Vx={concrete:!0,name:"codeFenced",tokenize:GP};function GP(e,t,n){const o=this,i={partial:!0,tokenize:O};let a=0,c=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?(c++,e.consume(P),m):c<3?n(P):(e.exit("codeFencedFenceSequence"),qe(P)?et(e,x,"whitespace")(P):x(P))}function x(P){return P===null||Ie(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(Wx,k,L)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(P))}function v(P){return P===null||Ie(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(P)):qe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,b,"whitespace")(P)):P===96&&P===d?n(P):(e.consume(P),v)}function b(P){return P===null||Ie(P)?x(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(P))}function N(P){return P===null||Ie(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,L,j)(P)}function j(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),S}function S(P){return a>0&&qe(P)?et(e,T,"linePrefix",a+1)(P):T(P)}function T(P){return P===null||Ie(P)?e.check(Wx,k,L)(P):(e.enter("codeFlowValue"),A(P))}function A(P){return P===null||Ie(P)?(e.exit("codeFlowValue"),T(P)):(e.consume(P),A)}function L(P){return e.exit("codeFenced"),t(P)}function O(P,$,E){let H=0;return Z;function Z(_){return P.enter("lineEnding"),P.consume(_),P.exit("lineEnding"),G}function G(_){return P.enter("codeFencedFence"),qe(_)?et(P,q,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):q(_)}function q(_){return _===d?(P.enter("codeFencedFenceSequence"),Y(_)):E(_)}function Y(_){return _===d?(H++,P.consume(_),Y):H>=c?(P.exit("codeFencedFenceSequence"),qe(_)?et(P,X,"whitespace")(_):X(_)):E(_)}function X(_){return _===null||Ie(_)?(P.exit("codeFencedFence"),$(_)):E(_)}}}function YP(e,t,n){const o=this;return i;function i(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a)}function a(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}const Hd={name:"codeIndented",tokenize:QP},XP={partial:!0,tokenize:JP};function QP(e,t,n){const o=this;return i;function i(h){return e.enter("codeIndented"),et(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?c(h):n(h)}function c(h){return h===null?p(h):Ie(h)?e.attempt(XP,c,p)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Ie(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function p(h){return e.exit("codeIndented"),t(h)}}function JP(e,t,n){const o=this;return i;function i(c){return o.parser.lazy[o.now().line]?n(c):Ie(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i):et(e,a,"linePrefix",5)(c)}function a(c){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Ie(c)?i(c):n(c)}}const ZP={name:"codeText",previous:tT,resolve:eT,tokenize:nT};function eT(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 tT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nT(e,t,n){let o=0,i,a;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),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)):Ie(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||Ie(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 rT{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,c,d,p,h;const m=new rT(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,oT(m,n)),n=t[n],h=!0);else if(o[1]._container){for(a=n,i=void 0;a--;)if(c=m.get(a),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),c[1].type="lineEnding",i=a);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;i&&(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 oT(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const a=[];let c=n._tokenizer;c||(c=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],h={};let m,x,v=-1,b=n,N=0,k=0;const j=[k];for(;b;){for(;e.get(++i)[1]!==b;);a.push(i),b._tokenizer||(m=o.sliceStream(b),b.next||m.push(null),x&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=b,b=b.next}for(b=n;++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,j.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):j.pop(),v=j.length;v--;){const S=d.slice(j[v],j[v+1]),T=a.pop();p.push([T,T+S.length-1]),e.splice(T,2,S)}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 sT={resolve:lT,tokenize:aT},iT={partial:!0,tokenize:cT};function lT(e){return gb(e),e}function aT(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):Ie(d)?e.check(iT,c,a)(d):(e.consume(d),i)}function a(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function cT(e,t,n){const o=this;return i;function i(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),et(e,a,"linePrefix")}function a(c){if(c===null||Ie(c))return n(c);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(c):e.interrupt(o.parser.constructs.flow,n,t)(c)}}function xb(e,t,n,o,i,a,c,d,p){const h=p||Number.POSITIVE_INFINITY;let m=0;return x;function x(S){return S===60?(e.enter(o),e.enter(i),e.enter(a),e.consume(S),e.exit(a),v):S===null||S===32||S===41||Pf(S)?n(S):(e.enter(o),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(S))}function v(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(i),e.exit(o),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(e.exit("chunkString"),e.exit(d),v(S)):S===null||S===60||Ie(S)?n(S):(e.consume(S),S===92?N:b)}function N(S){return S===60||S===62||S===92?(e.consume(S),b):b(S)}function k(S){return!m&&(S===null||S===41||Nn(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(o),t(S)):m<h&&S===40?(e.consume(S),m++,k):S===41?(e.consume(S),m--,k):S===null||S===32||S===40||Pf(S)?n(S):(e.consume(S),S===92?j:k)}function j(S){return S===40||S===41||S===92?(e.consume(S),k):k(S)}}function yb(e,t,n,o,i,a){const c=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 c.parser.constructs?n(b):b===93?(e.exit(a),e.enter(i),e.consume(b),e.exit(i),e.exit(o),t):Ie(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||Ie(b)||d++>999?(e.exit("chunkString"),m(b)):(e.consume(b),p||(p=!qe(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 c;return d;function d(v){return v===34||v===39||v===40?(e.enter(o),e.enter(i),e.consume(v),e.exit(i),c=v===40?41:v,p):n(v)}function p(v){return v===c?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),t):(e.enter(a),h(v))}function h(v){return v===c?(e.exit(a),p(c)):v===null?n(v):Ie(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),et(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===c||v===null||Ie(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?x:m)}function x(v){return v===c||v===92?(e.consume(v),m):m(v)}}function zi(e,t){let n;return o;function o(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):qe(i)?et(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const uT={name:"definition",tokenize:fT},dT={partial:!0,tokenize:pT};function fT(e,t,n){const o=this;let i;return a;function a(b){return e.enter("definition"),c(b)}function c(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 Nn(b)?zi(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(dT,x,x)(b)}function x(b){return qe(b)?et(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Ie(b)?(e.exit("definition"),o.parser.defined.push(i),t(b)):n(b)}}function pT(e,t,n){return o;function o(d){return Nn(d)?zi(e,i)(d):n(d)}function i(d){return vb(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function a(d){return qe(d)?et(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Ie(d)?t(d):n(d)}}const hT={name:"hardBreakEscape",tokenize:mT};function mT(e,t,n){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ie(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const gT={name:"headingAtx",resolve:xT,tokenize:yT};function xT(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 yT(e,t,n){let o=0;return i;function i(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&o++<6?(e.consume(m),c):m===null||Nn(m)?(e.exit("atxHeadingSequence"),d(m)):n(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),p(m)):m===null||Ie(m)?(e.exit("atxHeading"),t(m)):qe(m)?et(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||Nn(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const vT=["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"],qx=["pre","script","style","textarea"],bT={concrete:!0,name:"htmlFlow",resolveTo:jT,tokenize:ST},wT={partial:!0,tokenize:NT},kT={partial:!0,tokenize:CT};function jT(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 ST(e,t,n){const o=this;let i,a,c,d,p;return h;function h(I){return m(I)}function m(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),x}function x(I){return I===33?(e.consume(I),v):I===47?(e.consume(I),a=!0,k):I===63?(e.consume(I),i=3,o.interrupt?t:R):wr(I)?(e.consume(I),c=String.fromCharCode(I),j):n(I)}function v(I){return I===45?(e.consume(I),i=2,b):I===91?(e.consume(I),i=5,d=0,N):wr(I)?(e.consume(I),i=4,o.interrupt?t:R):n(I)}function b(I){return I===45?(e.consume(I),o.interrupt?t:R):n(I)}function N(I){const de="CDATA[";return I===de.charCodeAt(d++)?(e.consume(I),d===de.length?o.interrupt?t:q:N):n(I)}function k(I){return wr(I)?(e.consume(I),c=String.fromCharCode(I),j):n(I)}function j(I){if(I===null||I===47||I===62||Nn(I)){const de=I===47,ve=c.toLowerCase();return!de&&!a&&qx.includes(ve)?(i=1,o.interrupt?t(I):q(I)):vT.includes(c.toLowerCase())?(i=6,de?(e.consume(I),S):o.interrupt?t(I):q(I)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(I):a?T(I):A(I))}return I===45||$n(I)?(e.consume(I),c+=String.fromCharCode(I),j):n(I)}function S(I){return I===62?(e.consume(I),o.interrupt?t:q):n(I)}function T(I){return qe(I)?(e.consume(I),T):Z(I)}function A(I){return I===47?(e.consume(I),Z):I===58||I===95||wr(I)?(e.consume(I),L):qe(I)?(e.consume(I),A):Z(I)}function L(I){return I===45||I===46||I===58||I===95||$n(I)?(e.consume(I),L):O(I)}function O(I){return I===61?(e.consume(I),P):qe(I)?(e.consume(I),O):A(I)}function P(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),p=I,$):qe(I)?(e.consume(I),P):E(I)}function $(I){return I===p?(e.consume(I),p=null,H):I===null||Ie(I)?n(I):(e.consume(I),$)}function E(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Nn(I)?O(I):(e.consume(I),E)}function H(I){return I===47||I===62||qe(I)?A(I):n(I)}function Z(I){return I===62?(e.consume(I),G):n(I)}function G(I){return I===null||Ie(I)?q(I):qe(I)?(e.consume(I),G):n(I)}function q(I){return I===45&&i===2?(e.consume(I),D):I===60&&i===1?(e.consume(I),V):I===62&&i===4?(e.consume(I),F):I===63&&i===3?(e.consume(I),R):I===93&&i===5?(e.consume(I),ee):Ie(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(wT,J,Y)(I)):I===null||Ie(I)?(e.exit("htmlFlowData"),Y(I)):(e.consume(I),q)}function Y(I){return e.check(kT,X,J)(I)}function X(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),_}function _(I){return I===null||Ie(I)?Y(I):(e.enter("htmlFlowData"),q(I))}function D(I){return I===45?(e.consume(I),R):q(I)}function V(I){return I===47?(e.consume(I),c="",W):q(I)}function W(I){if(I===62){const de=c.toLowerCase();return qx.includes(de)?(e.consume(I),F):q(I)}return wr(I)&&c.length<8?(e.consume(I),c+=String.fromCharCode(I),W):q(I)}function ee(I){return I===93?(e.consume(I),R):q(I)}function R(I){return I===62?(e.consume(I),F):I===45&&i===2?(e.consume(I),R):q(I)}function F(I){return I===null||Ie(I)?(e.exit("htmlFlowData"),J(I)):(e.consume(I),F)}function J(I){return e.exit("htmlFlow"),t(I)}}function CT(e,t,n){const o=this;return i;function i(c){return Ie(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):n(c)}function a(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}function NT(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(kc,t,n)}}const ET={name:"htmlText",tokenize:RT};function RT(e,t,n){const o=this;let i,a,c;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),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):Ie(R)?(c=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),j):Ie(R)?(c=k,V(R)):(e.consume(R),k)}function j(R){return R===93?(e.consume(R),S):k(R)}function S(R){return R===62?D(R):R===93?(e.consume(R),S):k(R)}function T(R){return R===null||R===62?D(R):Ie(R)?(c=T,V(R)):(e.consume(R),T)}function A(R){return R===null?n(R):R===63?(e.consume(R),L):Ie(R)?(c=A,V(R)):(e.consume(R),A)}function L(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||$n(R)?(e.consume(R),P):$(R)}function $(R){return Ie(R)?(c=$,V(R)):qe(R)?(e.consume(R),$):D(R)}function E(R){return R===45||$n(R)?(e.consume(R),E):R===47||R===62||Nn(R)?H(R):n(R)}function H(R){return R===47?(e.consume(R),D):R===58||R===95||wr(R)?(e.consume(R),Z):Ie(R)?(c=H,V(R)):qe(R)?(e.consume(R),H):D(R)}function Z(R){return R===45||R===46||R===58||R===95||$n(R)?(e.consume(R),Z):G(R)}function G(R){return R===61?(e.consume(R),q):Ie(R)?(c=G,V(R)):qe(R)?(e.consume(R),G):H(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,Y):Ie(R)?(c=q,V(R)):qe(R)?(e.consume(R),q):(e.consume(R),X)}function Y(R){return R===i?(e.consume(R),i=void 0,_):R===null?n(R):Ie(R)?(c=Y,V(R)):(e.consume(R),Y)}function X(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||Nn(R)?H(R):(e.consume(R),X)}function _(R){return R===47||R===62||Nn(R)?H(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"),W}function W(R){return qe(R)?et(e,ee,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ee(R)}function ee(R){return e.enter("htmlTextData"),c(R)}}const Lp={name:"labelEnd",resolveAll:DT,resolveTo:IT,tokenize:LT},PT={tokenize:OT},TT={tokenize:_T},AT={tokenize:MT};function DT(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 IT(e,t){let n=e.length,o=0,i,a,c,d;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(c=n);const p={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[a+o+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,t],["enter",h,t]],d=Yn(d,e.slice(a+1,a+o+3)),d=Yn(d,[["enter",m,t]]),d=Yn(d,Ip(t.parser.constructs.insideSpan.null,e.slice(a+o+4,c-3),t)),d=Yn(d,[["exit",m,t],e[c-2],e[c-1],["exit",h,t]]),d=Yn(d,e.slice(c+1)),d=Yn(d,[["exit",p,t]]),Er(e,a,e.length,d),e}function LT(e,t,n){const o=this;let i=o.events.length,a,c;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):(c=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(PT,m,c?m:x)(v):v===91?e.attempt(TT,m,c?h:x)(v):c?m(v):x(v)}function h(v){return e.attempt(AT,m,x)(v)}function m(v){return t(v)}function x(v){return a._balanced=!0,n(v)}}function OT(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 Nn(x)?zi(e,a)(x):a(x)}function a(x){return x===41?m(x):xb(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Nn(x)?zi(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 Nn(x)?zi(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 _T(e,t,n){const o=this;return i;function i(d){return yb.call(o,e,a,c,"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 c(d){return n(d)}}function MT(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 $T={name:"labelStartImage",resolveAll:Lp.resolveAll,tokenize:FT};function FT(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"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):t(d)}}const zT={name:"labelStartLink",resolveAll:Lp.resolveAll,tokenize:BT};function BT(e,t,n){const o=this;return i;function i(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),a}function a(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(c):t(c)}}const Wd={name:"lineEnding",tokenize:UT};function UT(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),et(e,t,"linePrefix")}}const Ha={name:"thematicBreak",tokenize:HT};function HT(e,t,n){let o=0,i;return a;function a(h){return e.enter("thematicBreak"),c(h)}function c(h){return i=h,d(h)}function d(h){return h===i?(e.enter("thematicBreakSequence"),p(h)):o>=3&&(h===null||Ie(h))?(e.exit("thematicBreak"),t(h)):n(h)}function p(h){return h===i?(e.consume(h),o++,p):(e.exit("thematicBreakSequence"),qe(h)?et(e,d,"whitespace")(h):d(h))}}const jn={continuation:{tokenize:KT},exit:YT,name:"list",tokenize:qT},WT={partial:!0,tokenize:XT},VT={partial:!0,tokenize:GT};function qT(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,c=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:Tf(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 Tf(b)&&++c<10?(e.consume(b),p):(!o.interrupt||c<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(kc,o.interrupt?n:m,e.attempt(WT,v,x))}function m(b){return o.containerState.initialBlankLine=!0,a++,v(b)}function x(b){return qe(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 KT(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(kc,i,a);function i(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,et(e,t,"listItemIndent",o.containerState.size+1)(d)}function a(d){return o.containerState.furtherBlankLines||!qe(d)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,c(d)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(VT,t,c)(d))}function c(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,et(e,e.attempt(jn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function GT(e,t,n){const o=this;return et(e,i,"listItemIndent",o.containerState.size+1);function i(a){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?t(a):n(a)}}function YT(e){e.exit(this.containerState.type)}function XT(e,t,n){const o=this;return et(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const c=o.events[o.events.length-1];return!qe(a)&&c&&c[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Kx={name:"setextUnderline",resolveTo:QT,tokenize:JT};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 c={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",c,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end={...e[a][1].end}):e[o][1]=c,e.push(["exit",c,t]),e}function JT(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,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===i?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),qe(h)?et(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Ie(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ZT={tokenize:eA};function eA(e){const t=this,n=e.attempt(kc,o,e.attempt(this.parser.constructs.flowInitial,i,et(e,e.attempt(this.parser.constructs.flow,i,e.attempt(sT,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 tA={resolveAll:wb()},nA=bb("string"),rA=bb("text");function bb(e){return{resolveAll:wb(e==="text"?oA:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],a=n.attempt(i,c,d);return c;function c(m){return h(m)?a(m):d(m)}function d(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),p}function p(m){return h(m)?(n.exit("data"),a(m)):(n.consume(m),p)}function h(m){if(m===null)return!0;const x=i[m];let 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 oA(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,c=-1,d=0,p;for(;a--;){const h=i[a];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)p=!0,d++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?c:o.start._bufferIndex+c,_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 sA={42:jn,43:jn,45:jn,48:jn,49:jn,50:jn,51:jn,52:jn,53:jn,54:jn,55:jn,56:jn,57:jn,62:pb},iA={91:uT},lA={[-2]:Hd,[-1]:Hd,32:Hd},aA={35:gT,42:Ha,45:[Kx,Ha],60:bT,61:Kx,95:Ha,96:Vx,126:Vx},cA={38:mb,92:hb},uA={[-5]:Wd,[-4]:Wd,[-3]:Wd,33:$T,38:mb,42:Af,60:[zP,ET],91:zT,92:[hT,hb],93:Lp,95:Af,96:ZP},dA={null:[Af,tA]},fA={null:[42,95]},pA={null:[]},hA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:fA,contentInitial:iA,disable:pA,document:sA,flow:aA,flowInitial:lA,insideSpan:dA,string:cA,text:uA},Symbol.toStringTag,{value:"Module"}));function mA(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 c=[],d=[];const p={attempt:$(O),check:$(P),consume:T,enter:A,exit:L,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(G){return c=Yn(c,G),j(),c[c.length-1]!==null?[]:(E(t,0),h.events=Ip(a,h.events,h),h.events)}function v(G,q){return xA(b(G),q)}function b(G){return gA(c,G)}function N(){const{_bufferIndex:G,_index:q,line:Y,column:X,offset:_}=o;return{_bufferIndex:G,_index:q,line:Y,column:X,offset:_}}function k(G){i[G.line]=G.column,Z()}function j(){let G;for(;o._index<c.length;){const q=c[o._index];if(typeof q=="string")for(G=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===G&&o._bufferIndex<q.length;)S(q.charCodeAt(o._bufferIndex));else S(q)}}function S(G){m=m(G)}function T(G){Ie(G)?(o.line++,o.column=1,o.offset+=G===-3?2:1,Z()):G!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=G}function A(G,q){const Y=q||{};return Y.type=G,Y.start=N(),h.events.push(["enter",Y,h]),d.push(Y),Y}function L(G){const q=d.pop();return q.end=N(),h.events.push(["exit",q,h]),q}function O(G,q){E(G,q.from)}function P(G,q){q.restore()}function $(G,q){return Y;function Y(X,_,D){let V,W,ee,R;return Array.isArray(X)?J(X):"tokenize"in X?J([X]):F(X);function F(fe){return Ee;function Ee(Ne){const Re=Ne!==null&&fe[Ne],je=Ne!==null&&fe.null,ut=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(je)?je:je?[je]:[]];return J(ut)(Ne)}}function J(fe){return V=fe,W=0,fe.length===0?D:I(fe[W])}function I(fe){return Ee;function Ee(Ne){return R=H(),ee=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?ve():fe.tokenize.call(q?Object.assign(Object.create(h),q):h,p,de,ve)(Ne)}}function de(fe){return G(ee,R),_}function ve(fe){return R.restore(),++W<V.length?I(V[W]):D}}}function E(G,q){G.resolveAll&&!a.includes(G)&&a.push(G),G.resolve&&Er(h.events,q,h.events.length-q,G.resolve(h.events.slice(q),h)),G.resolveTo&&(h.events=G.resolveTo(h.events,h))}function H(){const G=N(),q=h.previous,Y=h.currentConstruct,X=h.events.length,_=Array.from(d);return{from:X,restore:D};function D(){o=G,h.previous=q,h.currentConstruct=Y,h.events.length=X,d=_,Z()}}function Z(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function gA(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let c;if(n===i)c=[e[n].slice(o,a)];else{if(c=e.slice(n,i),o>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(o):c.shift()}a>0&&c.push(e[i].slice(0,a))}return c}function xA(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const a=e[n];let c;if(typeof a=="string")c=a;else switch(a){case-5:{c="\r";break}case-4:{c=`
442
+ `;break}case-3:{c=`\r
443
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&i)continue;c=" ";break}default:c=String.fromCharCode(a)}i=a===-2,o.push(c)}return o.join("")}function yA(e){const o={constructs:CP([hA,...(e||{}).extensions||[]]),content:i(IP),defined:[],document:i(OP),flow:i(ZT),lazy:{},string:i(nA),text:i(rA)};return o;function i(a){return c;function c(d){return mA(o,a,d)}}}function vA(e){for(;!gb(e););return e}const Gx=/[\0\t\n\r]/g;function bA(){let e=1,t="",n=!0,o;return i;function i(a,c,d){const p=[];let h,m,x,v,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(c||void 0).decode(a)),x=0,t="",n&&(a.charCodeAt(0)===65279&&x++,n=void 0);x<a.length;){if(Gx.lastIndex=x,h=Gx.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 wA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function kA(e){return e.replace(wA,jA)}function jA(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 Dp(n)||e}const kb={}.hasOwnProperty;function SA(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),CA(n)(vA(yA(n).document().write(bA()(e,t,!0))))}function CA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Xe),autolinkProtocol:H,autolinkEmail:H,atxHeading:a(St),blockQuote:a(je),characterEscape:H,characterReference:H,codeFenced:a(ut),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(ut,c),codeText:a(tt,c),codeTextData:H,data:H,codeFlowValue:H,definition:a(Ue),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(Be),hardBreakEscape:a(Ot),hardBreakTrailing:a(Ot),htmlFlow:a(cn,c),htmlFlowData:H,htmlText:a(cn,c),htmlTextData:H,image:a(hn),label:c,link:a(Xe),listItem:a(Wt),listItemValue:v,listOrdered:a(nt,x),listUnordered:a(nt),paragraph:a(Qt),reference:I,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(St),strong:a(mn),thematicBreak:a(Tn)},exit:{atxHeading:p(),atxHeadingSequence:O,autolink:p(),autolinkEmail:Re,autolinkProtocol:Ne,blockQuote:p(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:fe,characterReference:Ee,codeFenced:p(j),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:Z,codeIndented:p(S),codeText:p(_),codeTextData:Z,data:Z,definition:p(),definitionDestinationString:L,definitionLabelString:T,definitionTitleString:A,emphasis:p(),hardBreakEscape:p(q),hardBreakTrailing:p(q),htmlFlow:p(Y),htmlFlowData:Z,htmlText:p(X),htmlTextData:Z,image:p(V),label:ee,labelText:W,lineEnding:G,link:p(D),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:de,resourceDestinationString:R,resourceTitleString:F,resource:J,setextHeading:p(E),setextHeadingLineSequence:$,setextHeadingText:P,strong:p(),thematicBreak:p()}};jb(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(re){let le={type:"root",children:[]};const pe={stack:[le],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:m,data:n},ne=[];let me=-1;for(;++me<re.length;)if(re[me][1].type==="listOrdered"||re[me][1].type==="listUnordered")if(re[me][0]==="enter")ne.push(me);else{const ke=ne.pop();me=i(re,ke,me)}for(me=-1;++me<re.length;){const ke=t[re[me][0]];kb.call(ke,re[me][1].type)&&ke[re[me][1].type].call(Object.assign({sliceSerialize:re[me][2].sliceSerialize},pe),re[me][1])}if(pe.tokenStack.length>0){const ke=pe.tokenStack[pe.tokenStack.length-1];(ke[1]||Yx).call(pe,void 0,ke[0])}for(le.position={start:yo(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:yo(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},me=-1;++me<t.transforms.length;)le=t.transforms[me](le)||le;return le}function i(re,le,pe){let ne=le-1,me=-1,ke=!1,_t,Jt,Vt,U;for(;++ne<=pe;){const ae=re[ne];switch(ae[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ae[0]==="enter"?me++:me--,U=void 0;break}case"lineEndingBlank":{ae[0]==="enter"&&(_t&&!U&&!me&&!Vt&&(Vt=ne),U=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:U=void 0}if(!me&&ae[0]==="enter"&&ae[1].type==="listItemPrefix"||me===-1&&ae[0]==="exit"&&(ae[1].type==="listUnordered"||ae[1].type==="listOrdered")){if(_t){let ge=ne;for(Jt=void 0;ge--;){const Oe=re[ge];if(Oe[1].type==="lineEnding"||Oe[1].type==="lineEndingBlank"){if(Oe[0]==="exit")continue;Jt&&(re[Jt][1].type="lineEndingBlank",ke=!0),Oe[1].type="lineEnding",Jt=ge}else if(!(Oe[1].type==="linePrefix"||Oe[1].type==="blockQuotePrefix"||Oe[1].type==="blockQuotePrefixWhitespace"||Oe[1].type==="blockQuoteMarker"||Oe[1].type==="listItemIndent"))break}Vt&&(!Jt||Vt<Jt)&&(_t._spread=!0),_t.end=Object.assign({},Jt?re[Jt][1].start:ae[1].end),re.splice(Jt||ne,0,["exit",_t,ae[2]]),ne++,pe++}if(ae[1].type==="listItemPrefix"){const ge={type:"listItem",_spread:!1,start:Object.assign({},ae[1].start),end:void 0};_t=ge,re.splice(ne,0,["enter",ge,ae[2]]),ne++,pe++,Vt=void 0,U=!0}}}return re[le][1]._spread=ke,pe}function a(re,le){return pe;function pe(ne){d.call(this,re(ne),ne),le&&le.call(this,ne)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(re,le,pe){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([le,pe||void 0]),re.position={start:yo(le.start),end:void 0}}function p(re){return le;function le(pe){re&&re.call(this,pe),h.call(this,pe)}}function h(re,le){const pe=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==re.type&&(le?le.call(this,re,ne[0]):(ne[1]||Yx).call(this,re,ne[0]));else throw new Error("Cannot close `"+re.type+"` ("+Fi({start:re.start,end:re.end})+"): it’s not open");pe.position.end=yo(re.end)}function m(){return jP(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function v(re){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function b(){const re=this.resume(),le=this.stack[this.stack.length-1];le.lang=re}function N(){const re=this.resume(),le=this.stack[this.stack.length-1];le.meta=re}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re.replace(/(\r?\n|\r)$/g,"")}function T(re){const le=this.resume(),pe=this.stack[this.stack.length-1];pe.label=le,pe.identifier=Rs(this.sliceSerialize(re)).toLowerCase()}function A(){const re=this.resume(),le=this.stack[this.stack.length-1];le.title=re}function L(){const re=this.resume(),le=this.stack[this.stack.length-1];le.url=re}function O(re){const le=this.stack[this.stack.length-1];if(!le.depth){const pe=this.sliceSerialize(re).length;le.depth=pe}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function $(re){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function H(re){const pe=this.stack[this.stack.length-1].children;let ne=pe[pe.length-1];(!ne||ne.type!=="text")&&(ne=Pn(),ne.position={start:yo(re.start),end:void 0},pe.push(ne)),this.stack.push(ne)}function Z(re){const le=this.stack.pop();le.value+=this.sliceSerialize(re),le.position.end=yo(re.end)}function G(re){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const pe=le.children[le.children.length-1];pe.position.end=yo(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(H.call(this,re),Z.call(this,re))}function q(){this.data.atHardBreak=!0}function Y(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function X(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function _(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function D(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=le,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 le=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=le,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function W(re){const le=this.sliceSerialize(re),pe=this.stack[this.stack.length-2];pe.label=kA(le),pe.identifier=Rs(le).toLowerCase()}function ee(){const re=this.stack[this.stack.length-1],le=this.resume(),pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,pe.type==="link"){const ne=re.children;pe.children=ne}else pe.alt=le}function R(){const re=this.resume(),le=this.stack[this.stack.length-1];le.url=re}function F(){const re=this.resume(),le=this.stack[this.stack.length-1];le.title=re}function J(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function de(re){const le=this.resume(),pe=this.stack[this.stack.length-1];pe.label=le,pe.identifier=Rs(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function ve(re){this.data.characterReferenceType=re.type}function fe(re){const le=this.sliceSerialize(re),pe=this.data.characterReferenceType;let ne;pe?(ne=fb(le,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Dp(le);const me=this.stack[this.stack.length-1];me.value+=ne}function Ee(re){const le=this.stack.pop();le.position.end=yo(re.end)}function Ne(re){Z.call(this,re);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(re)}function Re(re){Z.call(this,re);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(re)}function je(){return{type:"blockquote",children:[]}}function ut(){return{type:"code",lang:null,meta:null,value:""}}function tt(){return{type:"inlineCode",value:""}}function Ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Be(){return{type:"emphasis",children:[]}}function St(){return{type:"heading",depth:0,children:[]}}function Ot(){return{type:"break"}}function cn(){return{type:"html",value:""}}function hn(){return{type:"image",title:null,url:"",alt:null}}function Xe(){return{type:"link",title:null,url:"",children:[]}}function nt(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function Wt(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function Qt(){return{type:"paragraph",children:[]}}function mn(){return{type:"strong",children:[]}}function Pn(){return{type:"text",value:""}}function Tn(){return{type:"thematicBreak"}}}function yo(e){return{line:e.line,column:e.column,offset:e.offset}}function jb(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?jb(e,o):NA(e,o)}}function NA(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 Yx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fi({start:t.start,end:t.end})+") is still open")}function EA(e){const t=this;t.parser=n;function n(o){return SA(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function RA(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 PA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
444
+ `}]}function TA(e,t){const n=t.value?t.value+`
445
+ `:"",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 AA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=Us(o.toLowerCase()),a=e.footnoteOrder.indexOf(o);let c,d=e.footnoteCounts.get(o);d===void 0?(d=0,e.footnoteOrder.push(o),c=e.footnoteOrder.length):c=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(c)}]};e.patch(t,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,h),e.applyData(t,h)}function LA(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 OA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Sb(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 c=i[i.length-1];return c&&c.type==="text"?c.value+=o:i.push({type:"text",value:o}),i}function _A(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Sb(e,t);const i={src:Us(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 MA(e,t){const n={src:Us(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 $A(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 FA(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Sb(e,t);const i={href:Us(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 zA(e,t){const n={href:Us(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 BA(e,t,n){const o=e.all(t),i=n?UA(n):Cb(t),a={},c=[];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")&&c.push({type:"text",value:`
446
+ `}),m.type==="element"&&m.tagName==="p"&&!i?c.push(...m.children):c.push(m)}const p=o[o.length-1];p&&(i||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
447
+ `});const h={type:"element",tagName:"li",properties:a,children:c};return e.patch(t,h),e.applyData(t,h)}function UA(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 HA(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 c=o[i];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function WA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qA(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KA(e,t){const n=e.all(t),o=n.shift(),i=[];if(o){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],c),i.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Rp(t.children[1]),p=sb(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),i.push(c)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function GA(e,t,n){const o=n?n.children:void 0,a=(o?o.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let p=-1;const h=[];for(;++p<d;){const x=t.children[p],v={},b=c?c[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 YA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Xx=9,Qx=32;function XA(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const a=[];for(;o;)a.push(Jx(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return a.push(Jx(t.slice(i),i>0,!1)),a.join("")}function Jx(e,t,n){let o=0,i=e.length;if(t){let a=e.codePointAt(o);for(;a===Xx||a===Qx;)o++,a=e.codePointAt(o)}if(n){let a=e.codePointAt(i-1);for(;a===Xx||a===Qx;)i--,a=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function QA(e,t){const n={type:"text",value:XA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function JA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ZA={blockquote:RA,break:PA,code:TA,delete:AA,emphasis:DA,footnoteReference:IA,heading:LA,html:OA,imageReference:_A,image:MA,inlineCode:$A,linkReference:FA,link:zA,listItem:BA,list:HA,paragraph:WA,root:VA,strong:qA,table:KA,tableCell:YA,tableRow:GA,text:QA,thematicBreak:JA,toml:Pa,yaml:Pa,definition:Pa,footnoteDefinition:Pa};function Pa(){}const Nb=-1,jc=0,Bi=1,Qa=2,Op=3,_p=4,Mp=5,$p=6,Eb=7,Rb=8,Zx=typeof self=="object"?self:globalThis,e3=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),o=i=>{if(e.has(i))return e.get(i);const[a,c]=t[i];switch(a){case jc:case Nb:return n(c,i);case Bi:{const d=n([],i);for(const p of c)d.push(o(p));return d}case Qa:{const d=n({},i);for(const[p,h]of c)d[o(p)]=o(h);return d}case Op:return n(new Date(c),i);case _p:{const{source:d,flags:p}=c;return n(new RegExp(d,p),i)}case Mp:{const d=n(new Map,i);for(const[p,h]of c)d.set(o(p),o(h));return d}case $p:{const d=n(new Set,i);for(const p of c)d.add(o(p));return d}case Eb:{const{name:d,message:p}=c;return n(new Zx[d](p),i)}case Rb:return n(BigInt(c),i);case"BigInt":return n(Object(BigInt(c)),i);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(new Zx[a](c),i)};return o},ey=e=>e3(new Map,e)(0),bs="",{toString:t3}={},{keys:n3}=Object,Oi=e=>{const t=typeof e;if(t!=="object"||!e)return[jc,t];const n=t3.call(e).slice(8,-1);switch(n){case"Array":return[Bi,bs];case"Object":return[Qa,bs];case"Date":return[Op,bs];case"RegExp":return[_p,bs];case"Map":return[Mp,bs];case"Set":return[$p,bs];case"DataView":return[Bi,n]}return n.includes("Array")?[Bi,n]:n.includes("Error")?[Eb,n]:[Qa,n]},Ta=([e,t])=>e===jc&&(t==="function"||t==="symbol"),r3=(e,t,n,o)=>{const i=(c,d)=>{const p=o.push(c)-1;return n.set(d,p),p},a=c=>{if(n.has(c))return n.get(c);let[d,p]=Oi(c);switch(d){case jc:{let m=c;switch(p){case"bigint":d=Rb,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);m=null;break;case"undefined":return i([Nb],c)}return i([d,m],c)}case Bi:{if(p){let v=c;return p==="DataView"?v=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(c)),i([p,[...v]],c)}const m=[],x=i([d,m],c);for(const v of c)m.push(a(v));return x}case Qa:{if(p)switch(p){case"BigInt":return i([p,c.toString()],c);case"Boolean":case"Number":case"String":return i([p,c.valueOf()],c)}if(t&&"toJSON"in c)return a(c.toJSON());const m=[],x=i([d,m],c);for(const v of n3(c))(e||!Ta(Oi(c[v])))&&m.push([a(v),a(c[v])]);return x}case Op:return i([d,c.toISOString()],c);case _p:{const{source:m,flags:x}=c;return i([d,{source:m,flags:x}],c)}case Mp:{const m=[],x=i([d,m],c);for(const[v,b]of c)(e||!(Ta(Oi(v))||Ta(Oi(b))))&&m.push([a(v),a(b)]);return x}case $p:{const m=[],x=i([d,m],c);for(const v of c)(e||!Ta(Oi(v)))&&m.push(a(v));return x}}const{message:h}=c;return i([d,{name:p,message:h}],c)};return a},ty=(e,{json:t,lossy:n}={})=>{const o=[];return r3(!(t||n),!!t,new Map,o)(e),o},Ja=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ey(ty(e,t)):structuredClone(e):(e,t)=>ey(ty(e,t));function o3(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 s3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function i3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||o3,o=e.options.footnoteBackLabel||s3,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const m=e.all(h),x=String(h.identifier).toUpperCase(),v=Us(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 j=m[m.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const T=j.children[j.children.length-1];T&&T.type==="text"?T.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...N)}else m.push(...N);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(m,!0)};e.patch(h,S),d.push(S)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ja(c),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
448
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
449
+ `}]}}const Pb=(function(e){if(e==null)return u3;if(typeof e=="function")return Sc(e);if(typeof e=="object")return Array.isArray(e)?l3(e):a3(e);if(typeof e=="string")return c3(e);throw new Error("Expected function, string, or object as test")});function l3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Pb(e[n]);return Sc(o);function o(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function a3(e){const t=e;return Sc(n);function n(o){const i=o;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function c3(e){return Sc(t);function t(n){return n&&n.type===e}}function Sc(e){return t;function t(n,o,i){return!!(d3(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function u3(){return!0}function d3(e){return e!==null&&typeof e=="object"&&"type"in e}const Tb=[],f3=!0,ny=!1,p3="skip";function h3(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const a=Pb(i),c=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,j;if((!t||a(p,h,m[m.length-1]||void 0))&&(b=m3(n(p,m)),b[0]===ny))return b;if("children"in p&&p.children){const S=p;if(S.children&&b[0]!==p3)for(k=(o?S.children.length:-1)+c,j=m.concat(S);k>-1&&k<S.children.length;){const T=S.children[k];if(N=d(T,k,j)(),N[0]===ny)return N;k=typeof N[1]=="number"?N[1]:k+c}}return b}}}function m3(e){return Array.isArray(e)?e:typeof e=="number"?[f3,e]:e==null?Tb:[e]}function Ab(e,t,n,o){let i,a,c;typeof t=="function"&&typeof n!="function"?(a=void 0,c=t,i=n):(a=t,c=n,i=o),h3(e,a,d,i);function d(p,h){const m=h[h.length-1],x=m?m.children.indexOf(p):void 0;return c(p,x,m)}}const Df={}.hasOwnProperty,g3={};function x3(e,t){const n=t||g3,o=new Map,i=new Map,a=new Map,c={...ZA,...n.handlers},d={all:h,applyData:v3,definitionById:o,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:c,one:p,options:n,patch:y3,wrap:w3};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(Df.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,...j}=m,S=Ja(j);return S.children=d.all(m),S}return Ja(m)}return(d.options.unknownHandler||b3)(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=ry(N.value)),!Array.isArray(N)&&N.type==="element")){const k=N.children[0];k&&k.type==="text"&&(k.value=ry(k.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function y3(e,t){e.position&&(t.position=tP(e))}function v3(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 c="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:c}}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 b3(e,t){const n=t.data||{},o="value"in t&&!(Df.call(n,"hProperties")||Df.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 w3(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
450
+ `});++o<e.length;)o&&n.push({type:"text",value:`
451
+ `}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
452
+ `}),n}function ry(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function oy(e,t){const n=x3(e,t),o=n.one(e,void 0),i=i3(n),a=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
453
+ `},i),a}function k3(e,t){return e&&"run"in e?async function(n,o){const i=oy(n,{file:o,...t});await e.run(i,o)}:function(n,o){return oy(n,{file:o,...e||t})}}function sy(e){if(e)throw e}var Vd,iy;function j3(){if(iy)return Vd;iy=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)},c=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},d=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(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],j=1,S=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<S;++j)if(h=arguments[j],h!=null)for(m in h)x=d(k,m),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:{},c(k,{name:m,newValue:p(T,N,v)})):typeof v<"u"&&c(k,{name:m,newValue:v}));return k},Vd}var S3=j3();const qd=lc(S3);function If(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 C3(){const e=[],t={run:n,use:o};return t;function n(...i){let a=-1;const c=i.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...i);function d(p,...h){const m=e[++a];let x=-1;if(p){c(p);return}for(;++x<i.length;)(h[x]===null||h[x]===void 0)&&(h[x]=i[x]);i=h,m?N3(m,d)(...h):c(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 N3(e,t){let n;return o;function o(...c){const d=e.length>c.length;let p;d&&c.push(i);try{p=e.apply(this,c)}catch(h){const m=h;if(d&&n)throw m;return i(m)}d||(p&&p.then&&typeof p.then=="function"?p.then(a,i):p instanceof Error?i(p):a(p))}function i(c,...d){n||(n=!0,t(c,...d))}function a(c){i(null,c)}}const vr={basename:E3,dirname:R3,extname:P3,join:T3,sep:"/"};function E3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cl(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 c=-1,d=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else c<0&&(a=!0,c=i+1),d>-1&&(e.codePointAt(i)===t.codePointAt(d--)?d<0&&(o=i):(d=-1,o=c));return n===o?o=c:o<0&&(o=e.length),e.slice(n,o)}function R3(e){if(cl(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 P3(e){cl(e);let t=e.length,n=-1,o=0,i=-1,a=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){o=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function T3(...e){let t=-1,n;for(;++t<e.length;)cl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":A3(n)}function A3(e){cl(e);const t=e.codePointAt(0)===47;let n=D3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function D3(e,t){let n="",o=0,i=-1,a=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(i===c-1||a===1))if(i!==c-1&&a===2){if(n.length<2||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=c,a=0;continue}}else if(n.length>0){n="",o=0,i=c,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,c):n=e.slice(i+1,c),o=c-i-1;i=c,a=0}else d===46&&a>-1?a++:a=-1}return n}function cl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const I3={cwd:L3};function L3(){return"/"}function Lf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function O3(e){if(typeof e=="string")e=new URL(e);else if(!Lf(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 _3(e)}function _3(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?Lf(t)?n={path:t}:typeof t=="string"||M3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":I3.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"?vr.basename(this.path):void 0}set basename(t){Yd(t,"basename"),Gd(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){ly(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(Gd(t,"extname"),ly(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=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Lf(t)&&(t=O3(t)),Yd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){Yd(t,"stem"),Gd(t,"stem"),this.path=vr.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 an(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(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function Yd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ly(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function M3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $3=(function(e){const o=this.constructor.prototype,i=o[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,o),a}),F3={}.hasOwnProperty;class Fp extends $3{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=C3()}copy(){const t=new Fp;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):F3.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,c){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);U3(N)?v.value=N:v.result=N,h(m,v)});function h(m,x){m||!x?c(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),cy("processSync","process",n),o;function i(a,c){n=!0,sy(a),o=c}}run(t,n,o){ay(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(c,d){const p=Aa(n);i.run(t,p,h);function h(m,x,v){const b=x||t;m?d(m):c?c(b):o(void 0,b,v)}}}runSync(t,n){let o=!1,i;return this.run(t,n,a),cy("runSync","run",o),i;function a(c,d){sy(c),i=d,o=!0}}stringify(t,n){this.freeze();const o=Aa(n),i=this.compiler||this.Compiler;return Qd("stringify",i),ay(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):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...x]=h;p(m,x)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(i.settings=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];If(k)&&If(b)&&(b=qd(!0,k,b)),o[v]=[h,b,...N]}}}}const z3=new Fp().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 ay(e){if(!If(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Aa(e){return B3(e)?e:new Db(e)}function B3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function U3(e){return typeof e=="string"||H3(e)}function H3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const W3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",uy=[],dy={allowDangerousHtml:!0},V3=/^(https?|ircs?|mailto|xmpp)$/i,q3=[{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 K3(e){const t=G3(e),n=Y3(e);return X3(t.runSync(t.parse(n),n),e)}function G3(e){const t=e.rehypePlugins||uy,n=e.remarkPlugins||uy,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...dy}:dy;return z3().use(EA).use(n).use(k3,o).use(t)}function Y3(e){const t=e.children||"",n=new Db;return typeof t=="string"&&(n.value=t),n}function X3(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,a=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||Q3;for(const m of q3)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+W3+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),iP(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 c?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||V3.test(e.slice(0,t))?e:""}function Ut({content:e,className:t,emptyState:n="No markdown content yet."}){const o=e.replace(/<!--[\s\S]*?-->/g,"");return o.trim()?l.jsx("div",{className:$e("prose-syntaur max-w-none",t),children:l.jsx(K3,{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 fy(){const{slug:e}=Et(),t=Lt(),n=Xt();zs("project"),yt({keys:"a",scope:"project",description:"Create assignment",handler:()=>n(`${t}/projects/${e}/create/assignment`)}),yt({keys:"e",scope:"project",description:"Edit project",handler:()=>n(`${t}/projects/${e}/edit`)});const{data:o,loading:i,error:a,refetch:c}=Hv(e),d=bc(),{data:p}=lp(),[h,m]=g.useState("overview"),[x,v]=g.useState("board"),[b,N]=g.useState("all"),[k,j]=g.useState("all"),[S,T]=g.useState("all"),A=g.useMemo(()=>o?Object.fromEntries(o.assignments.flatMap(E=>{const H=`${t}/projects/${o.slug}/assignments/${E.slug}`;return[[E.slug,H],[E.title,H]]})):{},[o]);async function L(E){await fetch(`/api/projects/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:E})}),c()}async function O(E){await fetch(`/api/projects/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:E})}),c()}if(i)return l.jsx(jt,{label:"Loading project workspace…"});if(a||!o)return l.jsx(vt,{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||S!=="all"&&E.priority!==S));return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(Ht,{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:()=>L(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&&L(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(Ce,{className:"shell-action",to:`${t}/projects/${o.slug}/edit`,children:[l.jsx(tx,{className:"h-4 w-4"}),l.jsx("span",{children:"Edit Project"})]}),l.jsxs(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:[l.jsx(lr,{className:"h-4 w-4"}),l.jsx("span",{children:"New Assignment"})]}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",Vr(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(it,{label:"Assignments",value:o.progress.total}),l.jsx(it,{label:"In Progress",value:o.progress.in_progress??0,tone:"info"}),l.jsx(it,{label:"Review",value:o.progress.review??0,tone:"info"}),l.jsx(it,{label:"Blocked",value:o.progress.blocked??0,tone:"warn"}),l.jsx(it,{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(Cp,{value:h,onValueChange:m,items:[{value:"overview",label:"Overview",content:l.jsx("div",{className:"space-y-5",children:l.jsx(Pe,{title:"Project Overview",children:l.jsx(Ut,{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(Pe,{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=>j(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:S,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(kp,{value:x,onChange:E=>v(E),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:$.length===0?l.jsx(Ge,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this project.",actions:l.jsx(Ce,{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(J3,{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(Ce,{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(Ht,{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:Vr(E.updated)})]},E.slug))})]})})})})},{value:"dependencies",label:"Dependencies",content:o.dependencyGraph?l.jsx(Pe,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:l.jsx(TR,{definition:o.dependencyGraph,nodeRoutes:A})}):l.jsx(Ge,{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(Pe,{title:"Resources",description:"Shared project references.",children:o.resources.length===0?l.jsx(Ge,{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(Pe,{title:"Memories",description:"Learnings and patterns captured during the project.",children:o.memories.length===0?l.jsx(Ge,{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(Pe,{title:"Progress Summary",children:l.jsx(Xa,{progress:o.progress,showLegend:!0})}),l.jsx(Pe,{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(Pe,{title:"Quick Links",children:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/edit`,children:[l.jsx(tx,{className:"h-4 w-4"}),"Edit project source"]}),l.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/create/assignment`,children:[l.jsx(lr,{className:"h-4 w-4"}),"Create assignment"]}),l.jsxs(Ce,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[l.jsx(JS,{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(wv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),o.archived?l.jsxs(Pe,{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 J3({projectSlug:e,assignment:t}){const n=Lt();return l.jsxs(Ce,{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(Hr,{value:t.id})})]}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Vr(t.updated)]})]}),l.jsx(Ht,{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 Ib({open:e,action:t,assignmentTitle:n,loading:o=!1,onConfirm:i,onOpenChange:a}){const[c,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=c.trim()||void 0;return l.jsx(vp,{open:e,onOpenChange:v=>o?void 0:a(v),children:l.jsx(gc,{className:"max-w-xl",children:l.jsxs("form",{className:"space-y-5",onSubmit:v=>{v.preventDefault(),i(x)},children:[l.jsxs(yE,{children:[l.jsx(xc,{children:h}),l.jsx(bp,{children:t.description})]}),t.warning?l.jsx("div",{className:"rounded-lg border border-amber-300/80 bg-amber-50/80 px-4 py-3 text-sm text-amber-900 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-200",children:t.warning}):null,l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:p}),l.jsx("textarea",{value:c,onChange: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(vE,{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 Z3=Symbol("radix.slottable");function e4(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Z3,t}var Lb="AlertDialog",[t4]=Vo(Lb,[d0]),Gr=d0(),Ob=e=>{const{__scopeAlertDialog:t,...n}=e,o=Gr(t);return l.jsx(E0,{...o,...n,modal:!0})};Ob.displayName=Lb;var n4="AlertDialogTrigger",r4=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(gE,{...i,...o,ref:t})});r4.displayName=n4;var o4="AlertDialogPortal",_b=e=>{const{__scopeAlertDialog:t,...n}=e,o=Gr(t);return l.jsx(R0,{...o,...n})};_b.displayName=o4;var s4="AlertDialogOverlay",Mb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(mp,{...i,...o,ref:t})});Mb.displayName=s4;var Ps="AlertDialogContent",[i4,l4]=t4(Ps),a4=e4("AlertDialogContent"),$b=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...i}=e,a=Gr(n),c=g.useRef(null),d=ln(t,c),p=g.useRef(null);return l.jsx(fE,{contentName:Ps,titleName:Fb,docsSlug:"alert-dialog",children:l.jsx(i4,{scope:n,cancelRef:p,children:l.jsxs(gp,{role:"alertdialog",...a,...i,ref:d,onOpenAutoFocus:ct(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(a4,{children:o}),l.jsx(u4,{contentRef:c})]})})})});$b.displayName=Ps;var Fb="AlertDialogTitle",zb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(xp,{...i,...o,ref:t})});zb.displayName=Fb;var Bb="AlertDialogDescription",Ub=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(yp,{...i,...o,ref:t})});Ub.displayName=Bb;var c4="AlertDialogAction",Hb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Gr(n);return l.jsx(P0,{...i,...o,ref:t})});Hb.displayName=c4;var Wb="AlertDialogCancel",Vb=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:i}=l4(Wb,n),a=Gr(n),c=ln(t,i);return l.jsx(P0,{...a,...o,ref:c})});Vb.displayName=Wb;var u4=({contentRef:e})=>{const t=`\`${Ps}\` requires a description for the component to be accessible for screen reader users.
454
+
455
+ 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.
456
+
457
+ 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.
458
+
459
+ 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},d4=Ob,f4=_b,qb=Mb,Kb=$b,Gb=Hb,Yb=Vb,Xb=zb,Qb=Ub;const p4=d4,h4=f4,Jb=g.forwardRef(({className:e,...t},n)=>l.jsx(qb,{ref:n,className:$e("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(h4,{children:[l.jsx(Jb,{}),l.jsx(Kb,{ref:n,className:$e("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...t})]}));Zb.displayName=Kb.displayName;function m4({className:e,...t}){return l.jsx("div",{className:$e("flex flex-col space-y-2 text-left",e),...t})}function g4({className:e,...t}){return l.jsx("div",{className:$e("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:$e("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:$e("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:$e(e),...t}));nw.displayName=Gb.displayName;const rw=g.forwardRef(({className:e,...t},n)=>l.jsx(Yb,{ref:n,className:$e(e),...t}));rw.displayName=Yb.displayName;function ow({open:e,title:t,description:n,confirmLabel:o,cancelLabel:i="Cancel",loading:a=!1,destructive:c=!1,onConfirm:d,onOpenChange:p}){return l.jsx(p4,{open:e,onOpenChange:h=>a?void 0:p(h),children:l.jsxs(Zb,{children:[l.jsxs(m4,{children:[l.jsx(ew,{children:t}),l.jsx(tw,{children:n})]}),l.jsxs(g4,{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 ${c?"border-destructive/80 bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-foreground text-background hover:opacity-90"}`,onClick:h=>{h.preventDefault(),d()},children:a?"Working...":o})]})]})})}const x4=["top","right","bottom","left"],So=Math.min,Mn=Math.max,Za=Math.round,Da=Math.floor,Nr=e=>({x:e,y:e}),y4={left:"right",right:"left",bottom:"top",top:"bottom"};function Of(e,t,n){return Mn(e,So(t,n))}function qr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function Hs(e){return e.split("-")[1]}function zp(e){return e==="x"?"y":"x"}function Bp(e){return e==="y"?"height":"width"}function kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Up(e){return zp(kr(e))}function v4(e,t,n){n===void 0&&(n=!1);const o=Hs(e),i=Up(e),a=Bp(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(c=ec(c)),[c,ec(c)]}function b4(e){const t=ec(e);return[_f(e),t,_f(t)]}function _f(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const py=["left","right"],hy=["right","left"],w4=["top","bottom"],k4=["bottom","top"];function j4(e,t,n){switch(e){case"top":case"bottom":return n?t?hy:py:t?py:hy;case"left":case"right":return t?w4:k4;default:return[]}}function S4(e,t,n,o){const i=Hs(e);let a=j4(Kr(e),n==="start",o);return i&&(a=a.map(c=>c+"-"+i),t&&(a=a.concat(a.map(_f)))),a}function ec(e){const t=Kr(e);return y4[t]+e.slice(t.length)}function C4(e){return{top:0,right:0,bottom:0,left:0,...e}}function sw(e){return typeof e!="number"?C4(e):{top:e,right:e,bottom:e,left:e}}function tc(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 my(e,t,n){let{reference:o,floating:i}=e;const a=kr(t),c=Up(t),d=Bp(c),p=Kr(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(Hs(t)){case"start":b[c]-=v*(n&&h?-1:1);break;case"end":b[c]+=v*(n&&h?-1:1);break}return b}async function N4(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:c,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:x="floating",altBoundary:v=!1,padding:b=0}=qr(t,e),N=sw(b),j=d[v?x==="floating"?"reference":"floating":x],S=tc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(j)))==null||n?j:j.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),T=x==="floating"?{x:o,y:i,width:c.floating.width,height:c.floating.height}:c.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d.floating)),L=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=tc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:A,strategy:p}):T);return{top:(S.top-O.top+N.top)/L.y,bottom:(O.bottom-S.bottom+N.bottom)/L.y,left:(S.left-O.left+N.left)/L.x,right:(O.right-S.right+N.right)/L.x}}const E4=50,R4=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:N4},p=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:x}=my(h,o,p),v=o,b=0;const N={};for(let k=0;k<a.length;k++){const j=a[k];if(!j)continue;const{name:S,fn:T}=j,{x:A,y:L,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=L??x,N[S]={...N[S],...O},P&&b<E4&&(b++,typeof P=="object"&&(P.placement&&(v=P.placement),P.rects&&(h=P.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:m,y:x}=my(h,v,p)),k=-1)}return{x:m,y:x,placement:v,strategy:i,middlewareData:N}},P4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:c,elements:d,middlewareData:p}=t,{element:h,padding:m=0}=qr(e,t)||{};if(h==null)return{};const x=sw(m),v={x:n,y:o},b=Up(i),N=Bp(b),k=await c.getDimensions(h),j=b==="y",S=j?"top":"left",T=j?"bottom":"right",A=j?"clientHeight":"clientWidth",L=a.reference[N]+a.reference[b]-v[b]-a.floating[N],O=v[b]-a.reference[b],P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let $=P?P[A]:0;(!$||!await(c.isElement==null?void 0:c.isElement(P)))&&($=d.floating[A]||a.floating[N]);const E=L/2-O/2,H=$/2-k[N]/2-1,Z=So(x[S],H),G=So(x[T],H),q=Z,Y=$-k[N]-G,X=$/2-k[N]/2+E,_=Of(q,X,Y),D=!p.arrow&&Hs(i)!=null&&X!==_&&a.reference[N]/2-(X<q?Z:G)-k[N]/2<0,V=D?X<q?X-q:X-Y:0;return{[b]:v[b]+V,data:{[b]:_,centerOffset:X-_-V,...D&&{alignmentOffset:V}},reset:D}}}),T4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:c,initialPlacement:d,platform:p,elements:h}=t,{mainAxis:m=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...j}=qr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=Kr(i),T=kr(d),A=Kr(d)===d,L=await(p.isRTL==null?void 0:p.isRTL(h.floating)),O=v||(A||!k?[ec(d)]:b4(d)),P=N!=="none";!v&&P&&O.push(...S4(d,k,N,L));const $=[d,...O],E=await p.detectOverflow(t,j),H=[];let Z=((o=a.flip)==null?void 0:o.overflows)||[];if(m&&H.push(E[S]),x){const X=v4(i,c,L);H.push(E[X[0]],E[X[1]])}if(Z=[...Z,{placement:i,overflows:H}],!H.every(X=>X<=0)){var G,q;const X=(((G=a.flip)==null?void 0:G.index)||0)+1,_=$[X];if(_&&(!(x==="alignment"?T!==kr(_):!1)||Z.every(W=>kr(W.placement)===T?W.overflows[0]>0:!0)))return{data:{index:X,overflows:Z},reset:{placement:_}};let D=(q=Z.filter(V=>V.overflows[0]<=0).sort((V,W)=>V.overflows[1]-W.overflows[1])[0])==null?void 0:q.placement;if(!D)switch(b){case"bestFit":{var Y;const V=(Y=Z.filter(W=>{if(P){const ee=kr(W.placement);return ee===T||ee==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ee=>ee>0).reduce((ee,R)=>ee+R,0)]).sort((W,ee)=>W[1]-ee[1])[0])==null?void 0:Y[0];V&&(D=V);break}case"initialPlacement":D=d;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function gy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xy(e){return x4.some(t=>e[t]>=0)}const A4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:i="referenceHidden",...a}=qr(e,t);switch(i){case"referenceHidden":{const c=await o.detectOverflow(t,{...a,elementContext:"reference"}),d=gy(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:xy(d)}}}case"escaped":{const c=await o.detectOverflow(t,{...a,altBoundary:!0}),d=gy(c,n.floating);return{data:{escapedOffsets:d,escaped:xy(d)}}}default:return{}}}}},iw=new Set(["left","top"]);async function D4(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=Kr(n),d=Hs(n),p=kr(n)==="y",h=iw.has(c)?-1:1,m=a&&p?-1:1,x=qr(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 I4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:c,middlewareData:d}=t,p=await D4(t,e);return c===((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:c}}}}},L4=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:c=!0,crossAxis:d=!1,limiter:p={fn:S=>{let{x:T,y:A}=S;return{x:T,y:A}}},...h}=qr(e,t),m={x:n,y:o},x=await a.detectOverflow(t,h),v=kr(Kr(i)),b=zp(v);let N=m[b],k=m[v];if(c){const S=b==="y"?"top":"left",T=b==="y"?"bottom":"right",A=N+x[S],L=N-x[T];N=Of(A,N,L)}if(d){const S=v==="y"?"top":"left",T=v==="y"?"bottom":"right",A=k+x[S],L=k-x[T];k=Of(A,k,L)}const j=p.fn({...t,[b]:N,[v]:k});return{...j,data:{x:j.x-n,y:j.y-o,enabled:{[b]:c,[v]:d}}}}}},O4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:a,middlewareData:c}=t,{offset:d=0,mainAxis:p=!0,crossAxis:h=!0}=qr(e,t),m={x:n,y:o},x=kr(i),v=zp(x);let b=m[v],N=m[x];const k=qr(d,t),j=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(p){const A=v==="y"?"height":"width",L=a.reference[v]-a.floating[A]+j.mainAxis,O=a.reference[v]+a.reference[A]-j.mainAxis;b<L?b=L:b>O&&(b=O)}if(h){var S,T;const A=v==="y"?"width":"height",L=iw.has(Kr(i)),O=a.reference[x]-a.floating[A]+(L&&((S=c.offset)==null?void 0:S[x])||0)+(L?0:j.crossAxis),P=a.reference[x]+a.reference[A]+(L?0:((T=c.offset)==null?void 0:T[x])||0)-(L?j.crossAxis:0);N<O?N=O:N>P&&(N=P)}return{[v]:b,[x]:N}}}},_4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:c,elements:d}=t,{apply:p=()=>{},...h}=qr(e,t),m=await c.detectOverflow(t,h),x=Kr(i),v=Hs(i),b=kr(i)==="y",{width:N,height:k}=a.floating;let j,S;x==="top"||x==="bottom"?(j=x,S=v===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(S=x,j=v==="end"?"top":"bottom");const T=k-m.top-m.bottom,A=N-m.left-m.right,L=So(k-m[j],T),O=So(N-m[S],A),P=!t.middlewareData.shift;let $=L,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 Z=Mn(m.left,0),G=Mn(m.right,0),q=Mn(m.top,0),Y=Mn(m.bottom,0);b?E=N-2*(Z!==0||G!==0?Z+G:Mn(m.left,m.right)):$=k-2*(q!==0||Y!==0?q+Y:Mn(m.top,m.bottom))}await p({...t,availableWidth:E,availableHeight:$});const H=await c.getDimensions(d.floating);return N!==H.width||k!==H.height?{reset:{rects:!0}}:{}}}};function Cc(){return typeof window<"u"}function Ws(e){return lw(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(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 Cc()?e instanceof Node||e instanceof Fn(e).Node:!1}function ar(e){return Cc()?e instanceof Element||e instanceof Fn(e).Element:!1}function Yr(e){return Cc()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function yy(e){return!Cc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function ul(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function M4(e){return/^(table|td|th)$/.test(Ws(e))}function Nc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const $4=/transform|translate|scale|rotate|perspective|filter/,F4=/paint|layout|strict|content/,zo=e=>!!e&&e!=="none";let Zd;function Hp(e){const t=ar(e)?cr(e):e;return zo(t.transform)||zo(t.translate)||zo(t.scale)||zo(t.rotate)||zo(t.perspective)||!Wp()&&(zo(t.backdropFilter)||zo(t.filter))||$4.test(t.willChange||"")||F4.test(t.contain||"")}function z4(e){let t=Co(e);for(;Yr(t)&&!Ds(t);){if(Hp(t))return t;if(Nc(t))return null;t=Co(t)}return null}function Wp(){return Zd==null&&(Zd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Zd}function Ds(e){return/^(html|body|#document)$/.test(Ws(e))}function cr(e){return Fn(e).getComputedStyle(e)}function Ec(e){return ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(Ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yy(e)&&e.host||Pr(e);return yy(t)?t.host:t}function aw(e){const t=Co(e);return Ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&ul(t)?t:aw(t)}function Qi(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),c=Fn(i);if(a){const d=Mf(c);return t.concat(c,c.visualViewport||[],ul(i)?i:[],d&&n?Qi(d):[])}else return t.concat(i,Qi(i,[],n))}function Mf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cw(e){const t=cr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Yr(e),a=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=Za(n)!==a||Za(o)!==c;return d&&(n=a,o=c),{width:n,height:o,$:d}}function Vp(e){return ar(e)?e:e.contextElement}function Ts(e){const t=Vp(e);if(!Yr(t))return Nr(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:a}=cw(t);let c=(a?Za(n.width):n.width)/o,d=(a?Za(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const B4=Nr(0);function uw(e){const t=Fn(e);return!Wp()||!t.visualViewport?B4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function U4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function Wo(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Vp(e);let c=Nr(1);t&&(o?ar(o)&&(c=Ts(o)):c=Ts(e));const d=U4(a,n,o)?uw(a):Nr(0);let p=(i.left+d.x)/c.x,h=(i.top+d.y)/c.y,m=i.width/c.x,x=i.height/c.y;if(a){const v=Fn(a),b=o&&ar(o)?Fn(o):o;let N=v,k=Mf(N);for(;k&&o&&b!==N;){const j=Ts(k),S=k.getBoundingClientRect(),T=cr(k),A=S.left+(k.clientLeft+parseFloat(T.paddingLeft))*j.x,L=S.top+(k.clientTop+parseFloat(T.paddingTop))*j.y;p*=j.x,h*=j.y,m*=j.x,x*=j.y,p+=A,h+=L,N=Fn(k),k=Mf(N)}}return tc({width:m,height:x,x:p,y:h})}function Rc(e,t){const n=Ec(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-Rc(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function H4(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const a=i==="fixed",c=Pr(o),d=t?Nc(t.floating):!1;if(o===c||d&&a)return n;let p={scrollLeft:0,scrollTop:0},h=Nr(1);const m=Nr(0),x=Yr(o);if((x||!x&&!a)&&((Ws(o)!=="body"||ul(c))&&(p=Ec(o)),x)){const b=Wo(o);h=Ts(o),m.x=b.x+o.clientLeft,m.y=b.y+o.clientTop}const v=c&&!x&&!a?dw(c,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 W4(e){return Array.from(e.getClientRects())}function V4(e){const t=Pr(e),n=Ec(e),o=e.ownerDocument.body,i=Mn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Mn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+Rc(e);const d=-n.scrollTop;return cr(o).direction==="rtl"&&(c+=Mn(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:c,y:d}}const vy=25;function q4(e,t){const n=Fn(e),o=Pr(e),i=n.visualViewport;let a=o.clientWidth,c=o.clientHeight,d=0,p=0;if(i){a=i.width,c=i.height;const m=Wp();(!m||m&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const h=Rc(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<=vy&&(a-=N)}else h<=vy&&(a+=h);return{width:a,height:c,x:d,y:p}}function K4(e,t){const n=Wo(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,a=Yr(e)?Ts(e):Nr(1),c=e.clientWidth*a.x,d=e.clientHeight*a.y,p=i*a.x,h=o*a.y;return{width:c,height:d,x:p,y:h}}function by(e,t,n){let o;if(t==="viewport")o=q4(e,n);else if(t==="document")o=V4(Pr(e));else if(ar(t))o=K4(t,n);else{const i=uw(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return tc(o)}function fw(e,t){const n=Co(e);return n===t||!ar(n)||Ds(n)?!1:cr(n).position==="fixed"||fw(n,t)}function G4(e,t){const n=t.get(e);if(n)return n;let o=Qi(e,[],!1).filter(d=>ar(d)&&Ws(d)!=="body"),i=null;const a=cr(e).position==="fixed";let c=a?Co(e):e;for(;ar(c)&&!Ds(c);){const d=cr(c),p=Hp(c);!p&&d.position==="fixed"&&(i=null),(a?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||ul(c)&&!p&&fw(e,c))?o=o.filter(m=>m!==c):i=d,c=Co(c)}return t.set(e,o),o}function Y4(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?Nc(t)?[]:G4(t,this._c):[].concat(n),o],d=by(t,c[0],i);let p=d.top,h=d.right,m=d.bottom,x=d.left;for(let v=1;v<c.length;v++){const b=by(t,c[v],i);p=Mn(b.top,p),h=So(b.right,h),m=So(b.bottom,m),x=Mn(b.left,x)}return{width:h-x,height:m-p,x,y:p}}function X4(e){const{width:t,height:n}=cw(e);return{width:t,height:n}}function Q4(e,t,n){const o=Yr(t),i=Pr(t),a=n==="fixed",c=Wo(e,!0,a,t);let d={scrollLeft:0,scrollTop:0};const p=Nr(0);function h(){p.x=Rc(i)}if(o||!o&&!a)if((Ws(t)!=="body"||ul(i))&&(d=Ec(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=c.left+d.scrollLeft-p.x-m.x,v=c.top+d.scrollTop-p.y-m.y;return{x,y:v,width:c.width,height:c.height}}function ef(e){return cr(e).position==="static"}function wy(e,t){if(!Yr(e)||cr(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=Fn(e);if(Nc(e))return n;if(!Yr(e)){let i=Co(e);for(;i&&!Ds(i);){if(ar(i)&&!ef(i))return i;i=Co(i)}return n}let o=wy(e,t);for(;o&&M4(o)&&ef(o);)o=wy(o,t);return o&&Ds(o)&&ef(o)&&!Hp(o)?n:o||z4(e)||n}const J4=async function(e){const t=this.getOffsetParent||pw,n=this.getDimensions,o=await n(e.floating);return{reference:Q4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Z4(e){return cr(e).direction==="rtl"}const eD={convertOffsetParentRelativeRectToViewportRelativeRect:H4,getDocumentElement:Pr,getClippingRect:Y4,getOffsetParent:pw,getElementRects:J4,getClientRects:W4,getDimensions:X4,getScale:Ts,isElement:ar,isRTL:Z4};function hw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tD(e,t){let n=null,o;const i=Pr(e);function a(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function c(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),a();const h=e.getBoundingClientRect(),{left:m,top:x,width:v,height:b}=h;if(d||t(),!v||!b)return;const N=Da(x),k=Da(i.clientWidth-(m+v)),j=Da(i.clientHeight-(x+b)),S=Da(m),A={rootMargin:-N+"px "+-k+"px "+-j+"px "+-S+"px",threshold:Mn(0,So(1,p))||1};let L=!0;function O(P){const $=P[0].intersectionRatio;if($!==p){if(!L)return c();$?c(!1,$):o=setTimeout(()=>{c(!1,1e-7)},1e3)}$===1&&!hw(h,e.getBoundingClientRect())&&c(),L=!1}try{n=new IntersectionObserver(O,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,A)}n.observe(e)}return c(!0),a}function nD(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,h=Vp(e),m=i||a?[...h?Qi(h):[],...t?Qi(t):[]]:[];m.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const x=h&&d?tD(h,n):null;let v=-1,b=null;c&&(b=new ResizeObserver(S=>{let[T]=S;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&&j();function j(){const S=Wo(e);k&&!hw(k,S)&&n(),k=S,N=requestAnimationFrame(j)}return n(),()=>{var S;m.forEach(T=>{i&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),x==null||x(),(S=b)==null||S.disconnect(),b=null,p&&cancelAnimationFrame(N)}}const rD=I4,oD=L4,sD=T4,iD=_4,lD=A4,ky=P4,aD=O4,cD=(e,t,n)=>{const o=new Map,i={platform:eD,...n},a={...i.platform,_c:o};return R4(e,t,{...i,platform:a})};var uD=typeof document<"u",dD=function(){},Wa=uD?g.useLayoutEffect:dD;function nc(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(!nc(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)&&!nc(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 jy(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 fD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:c}={},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);nc(v,o)||b(o);const[N,k]=g.useState(null),[j,S]=g.useState(null),T=g.useCallback(W=>{W!==P.current&&(P.current=W,k(W))},[]),A=g.useCallback(W=>{W!==$.current&&($.current=W,S(W))},[]),L=a||N,O=c||j,P=g.useRef(null),$=g.useRef(null),E=g.useRef(m),H=p!=null,Z=tf(p),G=tf(i),q=tf(h),Y=g.useCallback(()=>{if(!P.current||!$.current)return;const W={placement:t,strategy:n,middleware:v};G.current&&(W.platform=G.current),cD(P.current,$.current,W).then(ee=>{const R={...ee,isPositioned:q.current!==!1};X.current&&!nc(E.current,R)&&(E.current=R,ko.flushSync(()=>{x(R)}))})},[v,t,n,G,q]);Wa(()=>{h===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,x(W=>({...W,isPositioned:!1})))},[h]);const X=g.useRef(!1);Wa(()=>(X.current=!0,()=>{X.current=!1}),[]),Wa(()=>{if(L&&(P.current=L),O&&($.current=O),L&&O){if(Z.current)return Z.current(L,O,Y);Y()}},[L,O,Y,Z,H]);const _=g.useMemo(()=>({reference:P,floating:$,setReference:T,setFloating:A}),[T,A]),D=g.useMemo(()=>({reference:L,floating:O}),[L,O]),V=g.useMemo(()=>{const W={position:n,left:0,top:0};if(!D.floating)return W;const ee=jy(D.floating,m.x),R=jy(D.floating,m.y);return d?{...W,transform:"translate("+ee+"px, "+R+"px)",...mw(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ee,top:R}},[n,d,D.floating,m.x,m.y]);return g.useMemo(()=>({...m,update:Y,refs:_,elements:D,floatingStyles:V}),[m,Y,_,D,V])}const pD=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?ky({element:o.current,padding:i}).fn(n):{}:o?ky({element:o,padding:i}).fn(n):{}}}},hD=(e,t)=>{const n=rD(e);return{name:n.name,fn:n.fn,options:[e,t]}},mD=(e,t)=>{const n=oD(e);return{name:n.name,fn:n.fn,options:[e,t]}},gD=(e,t)=>({fn:aD(e).fn,options:[e,t]}),xD=(e,t)=>{const n=sD(e);return{name:n.name,fn:n.fn,options:[e,t]}},yD=(e,t)=>{const n=iD(e);return{name:n.name,fn:n.fn,options:[e,t]}},vD=(e,t)=>{const n=lD(e);return{name:n.name,fn:n.fn,options:[e,t]}},bD=(e,t)=>{const n=pD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var wD="Arrow",gw=g.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...a}=e;return l.jsx(Rt.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=wD;var kD=gw;function jD(e){const[t,n]=g.useState(void 0);return jo(()=>{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 c,d;if("borderBoxSize"in a){const p=a.borderBoxSize,h=Array.isArray(p)?p[0]:p;c=h.inlineSize,d=h.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var qp="Popper",[xw,yw]=Vo(qp),[SD,vw]=xw(qp),bw=e=>{const{__scopePopper:t,children:n}=e,[o,i]=g.useState(null);return l.jsx(SD,{scope:t,anchor:o,onAnchorChange:i,children:n})};bw.displayName=qp;var ww="PopperAnchor",kw=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=vw(ww,n),c=g.useRef(null),d=ln(t,c),p=g.useRef(null);return g.useEffect(()=>{const h=p.current;p.current=(o==null?void 0:o.current)||c.current,h!==p.current&&a.onAnchorChange(p.current)}),o?null:l.jsx(Rt.div,{...i,ref:d})});kw.displayName=ww;var Kp="PopperContent",[CD,ND]=xw(Kp),jw=g.forwardRef((e,t)=>{var Ee,Ne,Re,je,ut,tt;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:N,...k}=e,j=vw(Kp,n),[S,T]=g.useState(null),A=ln(t,Ue=>T(Ue)),[L,O]=g.useState(null),P=jD(L),$=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,H=o+(a!=="center"?"-"+a:""),Z=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},G=Array.isArray(h)?h:[h],q=G.length>0,Y={padding:Z,boundary:G.filter(RD),altBoundary:q},{refs:X,floatingStyles:_,placement:D,isPositioned:V,middlewareData:W}=fD({strategy:"fixed",placement:H,whileElementsMounted:(...Ue)=>nD(...Ue,{animationFrame:b==="always"}),elements:{reference:j.anchor},middleware:[hD({mainAxis:i+E,alignmentAxis:c}),p&&mD({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?gD():void 0,...Y}),p&&xD({...Y}),yD({...Y,apply:({elements:Ue,rects:Be,availableWidth:St,availableHeight:Ot})=>{const{width:cn,height:hn}=Be.reference,Xe=Ue.floating.style;Xe.setProperty("--radix-popper-available-width",`${St}px`),Xe.setProperty("--radix-popper-available-height",`${Ot}px`),Xe.setProperty("--radix-popper-anchor-width",`${cn}px`),Xe.setProperty("--radix-popper-anchor-height",`${hn}px`)}}),L&&bD({element:L,padding:d}),PD({arrowWidth:$,arrowHeight:E}),v&&vD({strategy:"referenceHidden",...Y})]}),[ee,R]=Nw(D),F=Uo(N);jo(()=>{V&&(F==null||F())},[V,F]);const J=(Ee=W.arrow)==null?void 0:Ee.x,I=(Ne=W.arrow)==null?void 0:Ne.y,de=((Re=W.arrow)==null?void 0:Re.centerOffset)!==0,[ve,fe]=g.useState();return jo(()=>{S&&fe(window.getComputedStyle(S).zIndex)},[S]),l.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:V?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(je=W.transformOrigin)==null?void 0:je.x,(ut=W.transformOrigin)==null?void 0:ut.y].join(" "),...((tt=W.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(CD,{scope:n,placedSide:ee,onArrowChange:O,arrowX:J,arrowY:I,shouldHideArrow:de,children:l.jsx(Rt.div,{"data-side":ee,"data-align":R,...k,ref:A,style:{...k.style,animation:V?void 0:"none"}})})})});jw.displayName=Kp;var Sw="PopperArrow",ED={top:"bottom",right:"left",bottom:"top",left:"right"},Cw=g.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,a=ND(Sw,o),c=ED[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(kD,{...i,ref:n,style:{...i.style,display:"block"}})})});Cw.displayName=Sw;function RD(e){return e!==null}var PD=e=>({name:"transformOrigin",options:e,fn(t){var j,S,T;const{placement:n,rects:o,middlewareData:i}=t,c=((j=i.arrow)==null?void 0:j.centerOffset)!==0,d=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[h,m]=Nw(n),x={start:"0%",center:"50%",end:"100%"}[m],v=(((S=i.arrow)==null?void 0:S.x)??0)+d/2,b=(((T=i.arrow)==null?void 0:T.y)??0)+p/2;let N="",k="";return h==="bottom"?(N=c?x:`${v}px`,k=`${-p}px`):h==="top"?(N=c?x:`${v}px`,k=`${o.floating.height+p}px`):h==="right"?(N=`${-p}px`,k=c?x:`${b}px`):h==="left"&&(N=`${o.floating.width+p}px`,k=c?x:`${b}px`),{data:{x:N,y:k}}}});function Nw(e){const[t,n="center"]=e.split("-");return[t,n]}var TD=bw,AD=kw,DD=jw,ID=Cw,LD=Symbol("radix.slottable");function OD(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=LD,t}var _D=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"}),MD="VisuallyHidden",Ew=g.forwardRef((e,t)=>l.jsx(Rt.span,{...e,ref:t,style:{..._D,...e.style}}));Ew.displayName=MD;var $D=Ew,[Pc]=Vo("Tooltip",[yw]),Tc=yw(),Rw="TooltipProvider",FD=700,$f="tooltip.open",[zD,Gp]=Pc(Rw),Pw=e=>{const{__scopeTooltip:t,delayDuration:n=FD,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=e,c=g.useRef(!0),d=g.useRef(!1),p=g.useRef(0);return g.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),l.jsx(zD,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:g.useCallback(h=>{d.current=h},[]),disableHoverableContent:i,children:a})};Pw.displayName=Rw;var Ji="Tooltip",[BD,dl]=Pc(Ji),Tw=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:a,disableHoverableContent:c,delayDuration:d}=e,p=Gp(Ji,e.__scopeTooltip),h=Tc(t),[m,x]=g.useState(null),v=Cs(),b=g.useRef(0),N=c??p.disableHoverableContent,k=d??p.delayDuration,j=g.useRef(!1),[S,T]=pc({prop:o,defaultProp:i??!1,onChange:$=>{$?(p.onOpen(),document.dispatchEvent(new CustomEvent($f))):p.onClose(),a==null||a($)},caller:Ji}),A=g.useMemo(()=>S?j.current?"delayed-open":"instant-open":"closed",[S]),L=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j.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(()=>{j.current=!0,T(!0),b.current=0},k)},[k,T]);return g.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),l.jsx(TD,{...h,children:l.jsx(BD,{scope:t,contentId:v,open:S,stateAttribute:A,trigger:m,onTriggerChange:x,onTriggerEnter:g.useCallback(()=>{p.isOpenDelayedRef.current?P():L()},[p.isOpenDelayedRef,P,L]),onTriggerLeave:g.useCallback(()=>{N?O():(window.clearTimeout(b.current),b.current=0)},[O,N]),onOpen:L,onClose:O,disableHoverableContent:N,children:n})})};Tw.displayName=Ji;var Ff="TooltipTrigger",Aw=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=dl(Ff,n),a=Gp(Ff,n),c=Tc(n),d=g.useRef(null),p=ln(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(AD,{asChild:!0,...c,children:l.jsx(Rt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:p,onPointerMove:ct(e.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:ct(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:ct(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:ct(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:ct(e.onBlur,i.onClose),onClick:ct(e.onClick,i.onClose)})})});Aw.displayName=Ff;var Yp="TooltipPortal",[UD,HD]=Pc(Yp,{forceMount:void 0}),Dw=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,a=dl(Yp,t);return l.jsx(UD,{scope:t,forceMount:n,children:l.jsx(qo,{present:n||a.open,children:l.jsx(dp,{asChild:!0,container:i,children:o})})})};Dw.displayName=Yp;var Is="TooltipContent",Iw=g.forwardRef((e,t)=>{const n=HD(Is,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=e,c=dl(Is,e.__scopeTooltip);return l.jsx(qo,{present:o||c.open,children:c.disableHoverableContent?l.jsx(Lw,{side:i,...a,ref:t}):l.jsx(WD,{side:i,...a,ref:t})})}),WD=g.forwardRef((e,t)=>{const n=dl(Is,e.__scopeTooltip),o=Gp(Is,e.__scopeTooltip),i=g.useRef(null),a=ln(t,i),[c,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 j=N.currentTarget,S={x:N.clientX,y:N.clientY},T=YD(S,j.getBoundingClientRect()),A=XD(S,T),L=QD(k.getBoundingClientRect()),O=ZD([...A,...L]);d(O),x(!0)},[x]);return g.useEffect(()=>()=>v(),[v]),g.useEffect(()=>{if(p&&m){const N=j=>b(j,m),k=j=>b(j,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(c){const N=k=>{const j=k.target,S={x:k.clientX,y:k.clientY},T=(p==null?void 0:p.contains(j))||(m==null?void 0:m.contains(j)),A=!JD(S,c);T?v():A&&(v(),h())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[p,m,c,h,v]),l.jsx(Lw,{...e,ref:a})}),[VD,qD]=Pc(Ji,{isInside:!1}),KD=OD("TooltipContent"),Lw=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:c,...d}=e,p=dl(Is,n),h=Tc(n),{onClose:m}=p;return g.useEffect(()=>(document.addEventListener($f,m),()=>document.removeEventListener($f,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(up,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:l.jsxs(DD,{"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(KD,{children:o}),l.jsx(VD,{scope:n,isInside:!0,children:l.jsx($D,{id:p.contentId,role:"tooltip",children:i||o})})]})})});Iw.displayName=Is;var Ow="TooltipArrow",GD=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Tc(n);return qD(Ow,n).isInside?null:l.jsx(ID,{...i,...o,ref:t})});GD.displayName=Ow;function YD(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 XD(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 QD(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 JD(e,t){const{x:n,y:o}=e;let i=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const d=t[a],p=t[c],h=d.x,m=d.y,x=p.x,v=p.y;m>o!=v>o&&n<(x-h)*(o-m)/(v-m)+h&&(i=!i)}return i}function ZD(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),eI(t)}function eI(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],c=t[t.length-2];if((a.x-c.x)*(i.y-c.y)>=(a.y-c.y)*(i.x-c.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const a=n[n.length-1],c=n[n.length-2];if((a.x-c.x)*(i.y-c.y)>=(a.y-c.y)*(i.x-c.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var tI=Pw,nI=Tw,rI=Aw,oI=Dw,_w=Iw;const Mw=tI,$w=nI,Fw=rI,Xp=g.forwardRef(({className:e,sideOffset:t=4,...n},o)=>l.jsx(oI,{children:l.jsx(_w,{ref:o,sideOffset:t,className:$e("z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Xp.displayName=_w.displayName;function sI({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 c(d){d.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",a),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",c)}},[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(iC,{className:"h-4 w-4"})}),n&&l.jsx("div",{className:$e("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 c=a.icon,d=$e("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:[c?l.jsx(c,{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(Xp,{side:"left",children:a.disabledReason})]},a.key):l.jsx("div",{children:h},a.key)}return a.href?l.jsx(Ce,{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 iI(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 lI(e){const t=e.split(`
460
+ `),n=t.findIndex(c=>/^##\s+Acceptance Criteria\s*$/i.test(c.trim()));if(n===-1)return{acceptanceCriteria:[],summaryBody:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).map(c=>c.match(/^\s*[-*]\s+\[( |x|X)\]\s+(.*)$/)).filter(c=>!!c).map(c=>({checked:c[1].toLowerCase()==="x",text:c[2].trim()})),a=[...t.slice(0,n),...t.slice(o)].join(`
461
+ `).replace(/\n{3,}/g,`
462
+
463
+ `).trim();return{acceptanceCriteria:i,summaryBody:a}}function aI(e){const t=e.split(`
464
+ `),n=t.findIndex(c=>/^##\s+Todos\s*$/i.test(c.trim()));if(n===-1)return{hasSection:!1,todosMarkdown:"",remaining:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).join(`
465
+ `).replace(/<!--[\s\S]*?-->/g,"").replace(/\n{3,}/g,`
466
+
467
+ `).trim(),a=[...t.slice(0,n),...t.slice(o)].join(`
468
+ `).replace(/\n{3,}/g,`
469
+
470
+ `).trim();return{hasSection:!0,todosMarkdown:i,remaining:a}}function cI({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"),c=a.length===0;return c&&!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(ep,{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(Yi,{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(xf,{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(Pe,{title:"Dependencies",description:`${t.length-a.length} of ${t.length} resolved`,actions:c?l.jsx("button",{type:"button",onClick:()=>i(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Collapse"}):void 0,children:l.jsx("div",{className:"divide-y divide-border/40",children:t.map(d=>l.jsxs(Ce,{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(Ht,{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 uI({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(Pe,{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(Ce,{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(QS,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Ht,{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(Ce,{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(xv,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),l.jsx(Ht,{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}`))]})})}function dI(e){const t=new Map;for(const o of e)t.set(o.id,{entry:o,replies:[]});const n=[];for(const o of e){const i=t.get(o.id);o.replyTo&&t.has(o.replyTo)?t.get(o.replyTo).replies.push(i):n.push(i)}return n}function fI(e,t){return e===null?`/api/assignments/${encodeURIComponent(t)}/comments`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments`}function Hw({projectSlug:e,assignmentSlug:t,entries:n}){const[o,i]=g.useState(n);g.useEffect(()=>{i(n)},[n]);const a=g.useMemo(()=>dI(o),[o]),[c,d]=g.useState(""),[p,h]=g.useState("note"),[m,x]=g.useState(!1),[v,b]=g.useState(null);async function N(j){var A;if(j.preventDefault(),!c.trim())return;x(!0),b(null);const S=`tmp-${Date.now()}`,T={id:S,timestamp:new Date().toISOString(),author:"human",type:p,body:c,resolved:p==="question"?!1:void 0};i(L=>[...L,T]);try{const L=await fetch(fI(e,t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:c,type:p})});if(!L.ok){const $=await L.text();throw new Error($||`HTTP ${L.status}`)}const O=await L.json().catch(()=>null),P=(A=O==null?void 0:O.comment)==null?void 0:A.id;i($=>$.map(E=>E.id===S?{...E,id:P??E.id}:E)),d(""),window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(L){b(L instanceof Error?L.message:String(L)),i(O=>O.filter(P=>P.id!==S))}finally{x(!1)}}async function k(j,S){i(T=>T.map(A=>A.id===j?{...A,resolved:S}:A));try{const T=e===null?`/api/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`,A=await fetch(T,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({resolved:S})});if(!A.ok)throw new Error(`HTTP ${A.status}`);window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(T){b(T instanceof Error?T.message:String(T)),i(A=>A.map(L=>L.id===j?{...L,resolved:!S}:L))}}return l.jsx(Pe,{title:"Comments",description:"Threaded questions, notes, and feedback. Questions can be resolved once answered.",children:l.jsxs("div",{className:"space-y-4",children:[a.map(j=>l.jsx(Ww,{node:j,onToggleResolved:k,depth:0},j.entry.id)),l.jsxs("form",{onSubmit:N,className:"mt-6 space-y-2 border-t border-neutral-800 pt-4",children:[l.jsx("label",{className:"block text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Add comment"}),l.jsx("textarea",{value:c,onChange:j=>d(j.target.value),className:"w-full rounded border border-neutral-700 bg-neutral-900 p-2 text-sm",rows:3,placeholder:"Ask a question, leave a note, or give feedback…"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("select",{value:p,onChange:j=>h(j.target.value),className:"rounded border border-neutral-700 bg-neutral-900 px-2 py-1 text-xs",children:[l.jsx("option",{value:"note",children:"note"}),l.jsx("option",{value:"question",children:"question"}),l.jsx("option",{value:"feedback",children:"feedback"})]}),l.jsx("button",{type:"submit",disabled:m||!c.trim(),className:"shell-action",children:m?"Posting…":"Post comment"}),v?l.jsx("span",{className:"text-xs text-red-400",children:v}):null]})]})]})})}function Ww({node:e,depth:t,onToggleResolved:n}){const{entry:o,replies:i}=e,a=o.type==="question";return l.jsxs("div",{className:$e("space-y-2",t>0&&"ml-4 border-l border-neutral-800 pl-4"),children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-neutral-400",children:[l.jsx("span",{className:"font-mono",children:o.id}),l.jsx("span",{children:"·"}),l.jsx("span",{children:o.timestamp}),l.jsx("span",{children:"·"}),l.jsx("span",{className:"font-medium text-neutral-200",children:o.author}),l.jsx("span",{children:"·"}),l.jsx("span",{className:$e("rounded px-1.5 py-0.5 font-mono text-[10px] uppercase",a&&"bg-amber-900/40 text-amber-200",o.type==="feedback"&&"bg-sky-900/40 text-sky-200",o.type==="note"&&"bg-neutral-800 text-neutral-300"),children:o.type}),a?l.jsxs("button",{type:"button",onClick:()=>n(o.id,!o.resolved),className:$e("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium",o.resolved?"bg-emerald-900/40 text-emerald-200 hover:bg-emerald-900/60":"bg-neutral-800 text-neutral-300 hover:bg-neutral-700"),title:o.resolved?"Mark unresolved":"Mark resolved",children:[o.resolved?l.jsx(ep,{className:"h-3 w-3"}):l.jsx(eC,{className:"h-3 w-3"}),o.resolved?"resolved":"open"]}):null,o.replyTo?l.jsxs("span",{className:"inline-flex items-center gap-1 text-neutral-500",children:[l.jsx(kC,{className:"h-3 w-3"}),o.replyTo]}):null]}),l.jsx(Ut,{content:o.body}),i.length>0?l.jsx("div",{className:"space-y-2",children:i.map(c=>l.jsx(Ww,{node:c,depth:t+1,onToggleResolved:n},c.entry.id))}):null]})}const pI=["review","complete","unblock","start","block","fail","reopen"];function Sy(){var mn,Pn,Tn,re,le,pe;const{slug:e,aslug:t}=Et(),n=Xt(),o=Lt(),[i,a]=_s(),[c,d]=g.useState(null),[p,h]=g.useState(null),[m,x]=g.useState(null),[v,b]=g.useState(null),[N,k]=g.useState(null),[j,S]=g.useState(!1),[T,A]=g.useState(!1),[L,O]=g.useState(0),P=i.get("tab")??"summary",$=bc(),{data:E,loading:H,error:Z,refetch:G}=wN(e,t),{data:q}=Hv(e),{data:Y}=ap(),{data:X}=SN(e,t),_=g.useMemo(()=>{if(!E||!q)return[];const ne=new Map(q.assignments.map(me=>[me.slug,me]));return E.dependsOn.map(me=>{const ke=ne.get(me);return{slug:me,title:(ke==null?void 0:ke.title)??me,status:(ke==null?void 0:ke.status)??"pending",priority:(ke==null?void 0:ke.priority)??"medium",assignee:(ke==null?void 0:ke.assignee)??null}})},[E,q]),D=_.filter(ne=>ne.status!=="completed"&&ne.status!=="review");zs("assignment");const V=g.useMemo(()=>((q==null?void 0:q.assignments)??[]).map(ne=>ne.slug),[q]),W=t?V.indexOf(t):-1,ee=W>0?V[W-1]:null,R=W>=0&&W<V.length-1?V[W+1]:null,F=`${o}/projects/${e}/assignments/${t}`;yt({keys:"e",scope:"assignment",description:"Edit assignment",handler:()=>n(`${F}/edit`)}),yt({keys:"p",scope:"assignment",description:"Edit plan",handler:()=>n(`${F}/plan/edit`)}),yt({keys:"h",scope:"assignment",description:"Append handoff",handler:()=>n(`${F}/handoff/edit`)}),yt({keys:"d",scope:"assignment",description:"Append decision record",handler:()=>n(`${F}/decision-record/edit`)}),yt({keys:"s",scope:"assignment",description:"Edit scratchpad",handler:()=>n(`${F}/scratchpad/edit`)}),yt({keys:"[",scope:"assignment",description:"Previous assignment in project",enabled:!!ee,handler:()=>ee&&n(`${o}/projects/${e}/assignments/${ee}`)}),yt({keys:"]",scope:"assignment",description:"Next assignment in project",enabled:!!R,handler:()=>R&&n(`${o}/projects/${e}/assignments/${R}`)});const J=g.useMemo(()=>E?lI(E.body):{acceptanceCriteria:[],summaryBody:""},[E]),I=g.useMemo(()=>aI(J.summaryBody),[J.summaryBody]),de=J.acceptanceCriteria,ve=de.filter(ne=>ne.checked).length,fe=de.length>0&&ve===de.length,Ee=g.useRef(fe),Ne=g.useRef(!1);if(g.useEffect(()=>{if(E){if(!Ne.current){Ee.current=fe,Ne.current=!0;return}fe&&!Ee.current&&O(ne=>ne+1),Ee.current=fe}},[fe,E]),H)return l.jsx(jt,{label:"Loading assignment workspace…"});if(Z||!E||!e||!t)return l.jsx(vt,{error:Z||"Assignment not found."});const Re=e,je=t,ut=de.length>0?{checked:ve,total:de.length}:void 0,tt=E.availableTransitions??[],Ue=tt.filter(ne=>!ne.disabled&&ne.targetStatus!==E.status),Be=pI.map(ne=>Ue.find(me=>me.command===ne)).find(Boolean)??Ue[0]??null,St=[];if(Y!=null&&Y.sessions)for(const ne of Y.sessions)for(const me of ne.windows)for(const ke of me.panes)((mn=ke.assignment)==null?void 0:mn.project)===e&&((Pn=ke.assignment)==null?void 0:Pn.slug)===t&&St.push({sessionName:ne.name,command:ke.command,urls:ke.urls});async function Ot(ne){d(null);try{await Bw(Re,je,ne),G()}catch(me){d(me.message)}}async function cn(){A(!0);try{await iI(Re,je),n(`${o}/projects/${Re}`)}catch(ne){d(ne.message),A(!1),S(!1)}}async function hn(ne,me){d(null),h(ne.command);try{return await zw(Re,je,ne,me),G(),!0}catch(ke){return d(ke.message),!1}finally{h(null)}}function Xe(ne){if(Uw(ne)){x(ne);return}hn(ne)}async function nt(ne,me){b(null),k(ne);try{const ke=await fetch(`/api/projects/${Re}/assignments/${je}/acceptance-criteria/${ne}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:me})}),_t=await ke.json();if(!ke.ok)throw new Error(_t.error||`HTTP ${ke.status}`);G()}catch(ke){b(ke.message)}finally{k(null)}}const Wt=[...Ue.filter(ne=>ne!==Be).map(ne=>({key:`transition-${ne.command}`,label:ne.label,onSelect:()=>Xe(ne),disabled:p===ne.command})),...tt.filter(ne=>ne.disabled||ne.targetStatus===E.status).map(ne=>({key:`transition-${ne.command}`,label:ne.label,disabled:!0,disabledReason:ne.targetStatus===E.status?`Already ${E.status.replace(/_/g," ")}`:ne.disabledReason??ne.warning??ne.description})),...$.statuses.map(ne=>({key:`override-${ne.id}`,label:`Override → ${ne.label}`,onSelect:()=>Ot(ne.id),disabled:ne.id===E.status,disabledReason:ne.id===E.status?"Already in this status":void 0})),{key:"edit-assignment",label:"Edit assignment source",icon:aC,href:`${o}/projects/${e}/assignments/${t}/edit`},{key:"edit-plan",label:"Edit plan",icon:CC,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:pC,href:`${o}/projects/${e}/assignments/${t}/decision-record/edit`},{key:"delete",label:"Delete assignment",icon:Ms,destructive:!0,onSelect:()=>S(!0)}],Qt=(Be==null?void 0:Be.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(Ht,{status:E.status,progress:ut}),l.jsx("h1",{className:"text-lg font-semibold text-foreground",children:E.title}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",pN(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:[Be&&l.jsx("button",{type:"button",title:Be.warning||Be.description,disabled:p===Be.command,onClick:()=>Xe(Be),className:$e("shell-action disabled:cursor-not-allowed disabled:opacity-50",Be.warning&&"border-amber-300 dark:border-amber-700",Qt&&L>0&&"send-to-review-glow"),children:l.jsx("span",{children:p===Be.command?"Working…":Be.label})},Qt?`review-${L}`:Be.command),l.jsx(sI,{items:Wt,align:"end"})]})]}),c?l.jsx("p",{className:"mt-4 rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:c}):null,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]}),_.length>0&&l.jsx(cI,{projectSlug:e,dependencies:_,blockedReason:E.blockedReason}),E.enrichedLinks&&E.enrichedLinks.length>0&&l.jsx(uI,{links:E.enrichedLinks}),E.referencedBy&&E.referencedBy.length>0&&l.jsx(Pe,{title:"Referenced by",description:"Other assignments whose Todos, progress, comments, or handoffs link to this one.",children:l.jsx("ul",{className:"space-y-2",children:E.referencedBy.map(ne=>{const me=ne.sourceProjectSlug===null?`/assignments/${ne.sourceId}`:`${o}/projects/${ne.sourceProjectSlug}/assignments/${ne.sourceSlug}`;return l.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[l.jsx(Ce,{to:me,className:"text-foreground hover:text-primary",children:ne.sourceTitle}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",ne.mentions," mention",ne.mentions===1?"":"s",")"]}),ne.sourceProjectSlug===null?l.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 font-mono text-[10px] uppercase text-neutral-300",children:"Standalone"}):null]},ne.sourceId)})})}),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(Cp,{value:P,onValueChange:ne=>a({tab:ne}),items:[{value:"summary",label:"Summary",content:l.jsxs("div",{className:"space-y-5",children:[J.acceptanceCriteria.length>0?l.jsx(Pe,{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,J.acceptanceCriteria.map((ne,me)=>{const ke=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:ne.checked,disabled:ke,onChange:_t=>nt(me,_t.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":ne.checked,children:ne.text})]},`${me}-${ne.text}`)})]})}):null,I.hasSection?l.jsx(Pe,{title:"Todos",description:"Checklist of work items from assignment.md. Links point to plan files.",children:l.jsx(Ut,{content:I.todosMarkdown,emptyState:"No todos yet."})}):null,l.jsx(Pe,{title:"Assignment Summary",children:l.jsx(Ut,{content:I.remaining,emptyState:J.acceptanceCriteria.length>0||I.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(Pe,{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(Ce,{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(Ht,{status:E.plan.status})}),l.jsx(Ut,{content:E.plan.body,emptyState:"No plan content yet."})]})}):l.jsx(Ge,{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(Pe,{title:"Scratchpad",actions:l.jsxs(Ce,{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(Ut,{content:E.scratchpad.body,emptyState:"Scratchpad is empty."})}):l.jsx(Ge,{title:"No scratchpad yet",description:"Scratchpad notes appear here when you use the Edit Scratchpad action."})},{value:"handoff",label:"Handoff",count:((Tn=E.handoff)==null?void 0:Tn.handoffCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.handoff?l.jsx(Pe,{children:l.jsx(Ut,{content:E.handoff.body,emptyState:"No handoff history yet."})}):l.jsx(Ge,{title:"No handoff log yet",description:"Handoffs appear here when an agent runs /complete-assignment or you append one manually."})})},{value:"progress",label:"Progress",count:((re=E.progress)==null?void 0:re.entryCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.progress&&E.progress.entries.length>0?l.jsx(Pe,{title:"Progress",description:"Reverse-chronological log of work done on this assignment. Agents append entries via progress.md.",children:l.jsx("ol",{className:"space-y-4",children:E.progress.entries.map((ne,me)=>l.jsxs("li",{className:"border-l-2 border-neutral-700 pl-3",children:[l.jsx("div",{className:"text-xs font-mono text-neutral-400",children:ne.timestamp}),l.jsx(Ut,{content:ne.body})]},`${ne.timestamp}-${me}`))})}):l.jsx(Ge,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((le=E.comments)==null?void 0:le.entryCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.comments&&E.comments.entries.length>0?l.jsx(Hw,{projectSlug:e,assignmentSlug:t,entries:E.comments.entries}):l.jsx(Ge,{title:"No comments yet",description:"Comments appear here when agents or humans post via `syntaur comment` or the dashboard."})})},{value:"decisions",label:"Decisions",count:((pe=E.decisionRecord)==null?void 0:pe.decisionCount)??0,content:l.jsx("div",{className:"space-y-5",children:E.decisionRecord?l.jsx(Pe,{children:l.jsx(Ut,{content:E.decisionRecord.body,emptyState:"No decision history yet."})}):l.jsx(Ge,{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(Pe,{title:"Details",children:l.jsxs("dl",{className:"space-y-3 text-sm",children:[l.jsx(vo,{label:"ID",value:E.id,copyable:!0}),l.jsx(vo,{label:"Priority",value:E.priority}),E.assignee&&l.jsx(vo,{label:"Assignee",value:E.assignee}),l.jsx(vo,{label:"Updated",value:`${fN(E.updated)} · Created ${dN(E.created)}`}),E.workspace.repository&&l.jsx(vo,{label:"Repository",value:E.workspace.repository,copyable:!0}),E.workspace.worktreePath&&l.jsx(vo,{label:"Worktree",value:E.workspace.worktreePath,copyable:!0}),E.workspace.branch&&l.jsx(vo,{label:"Branch",value:E.workspace.branch,copyable:!0}),E.workspace.parentBranch&&l.jsx(vo,{label:"Parent branch",value:E.workspace.parentBranch,copyable:!0})]})}),St.length>0&&l.jsx(Pe,{title:"Servers",children:l.jsx("div",{className:"space-y-2",children:St.map((ne,me)=>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:ne.command}),l.jsx("span",{className:"text-xs text-muted-foreground",children:ne.sessionName}),ne.urls.map(ke=>l.jsxs("a",{href:ke,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-teal-600 hover:underline dark:text-teal-400",children:[ke.replace("http://localhost:",":"),l.jsx(bv,{className:"h-2.5 w-2.5"})]},ke))]},me))})}),X&&X.sessions.length>0&&l.jsx(Pe,{title:"Agent Sessions",children:l.jsx("div",{className:"space-y-2",children:X.sessions.map(ne=>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(uc,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:ne.agent}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:ne.sessionId,children:[ne.sessionId.slice(0,8),l.jsx(Hr,{value:ne.sessionId})]})]}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(Ht,{status:ne.status}),l.jsx("span",{className:"text-xs text-muted-foreground",children:Cr(ne.started)})]})]},ne.sessionId))})})]})]}),l.jsx(Ib,{open:m!==null,action:m,assignmentTitle:E.title,loading:p===(m==null?void 0:m.command),onOpenChange:ne=>{ne||x(null)},onConfirm:async ne=>{if(!m)return;await hn(m,ne)&&x(null)}}),l.jsx(ow,{open:j,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:ne=>{ne||S(!1)},onConfirm:cn})]})}function vo({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(Hr,{value:t})]})]})}function hI(){var d,p,h,m,x;const{id:e}=Et(),[t,n]=_s(),o=t.get("tab")??"summary",{data:i,loading:a,error:c}=kN(e);return a?l.jsx(jt,{}):c?l.jsx(vt,{error:c}):i?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"space-y-2",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx("span",{className:"rounded bg-neutral-800 px-2 py-0.5 font-mono text-xs uppercase tracking-wide text-neutral-300",children:"Standalone"}),l.jsx(Ht,{status:i.status}),l.jsx("span",{className:"text-xs font-mono text-neutral-500",children:i.id}),l.jsx(Ce,{to:`/assignments/${i.id}/edit`,className:"ml-auto rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Edit"})]}),l.jsx("h1",{className:"text-2xl font-semibold text-neutral-100",children:i.title}),i.blockedReason?l.jsxs("p",{className:"text-sm text-amber-300",children:["Blocked: ",i.blockedReason]}):null]}),i.referencedBy&&i.referencedBy.length>0?l.jsx(Pe,{title:"Referenced by",description:"Other assignments whose bodies link to this one.",children:l.jsx("ul",{className:"space-y-2",children:i.referencedBy.map(v=>l.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[l.jsx(Ce,{to:v.sourceProjectSlug===null?`/assignments/${v.sourceId}`:`/projects/${v.sourceProjectSlug}/assignments/${v.sourceSlug}`,className:"text-foreground hover:text-primary",children:v.sourceTitle}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",v.mentions," mention",v.mentions===1?"":"s",")"]})]},v.sourceId))})}):null,l.jsx(Cp,{value:o,onValueChange:v=>n({tab:v}),items:[{value:"summary",label:"Summary",content:l.jsx("div",{className:"space-y-5",children:l.jsx(Pe,{title:"Assignment",children:l.jsx(Ut,{content:i.body,emptyState:"This assignment does not have summary markdown yet."})})})},{value:"progress",label:"Progress",count:((d=i.progress)==null?void 0:d.entryCount)??0,content:l.jsx("div",{className:"space-y-5",children:i.progress&&i.progress.entries.length>0?l.jsx(Pe,{title:"Progress",description:"Reverse-chronological log of work done on this assignment.",children:l.jsx("ol",{className:"space-y-4",children:i.progress.entries.map((v,b)=>l.jsxs("li",{className:"border-l-2 border-neutral-700 pl-3",children:[l.jsx("div",{className:"text-xs font-mono text-neutral-400",children:v.timestamp}),l.jsx(Ut,{content:v.body})]},`${v.timestamp}-${b}`))})}):l.jsx(Ge,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((p=i.comments)==null?void 0:p.entryCount)??0,content:l.jsx("div",{className:"space-y-5",children:l.jsx(Hw,{projectSlug:null,assignmentSlug:i.id,entries:((h=i.comments)==null?void 0:h.entries)??[]})})},{value:"plan",label:"Plan",content:l.jsx("div",{className:"space-y-5",children:i.plan?l.jsxs(Pe,{children:[l.jsx(Ut,{content:i.plan.body,emptyState:"Plan file exists but is empty."}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(Ce,{to:`/assignments/${i.id}/plan/edit`,className:"rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Edit plan"})})]}):l.jsx(Ge,{title:"No plan file yet",description:"Create one via the CLI or `/plan-assignment`."})})},{value:"scratchpad",label:"Scratchpad",content:l.jsx("div",{className:"space-y-5",children:i.scratchpad?l.jsxs(Pe,{children:[l.jsx(Ut,{content:i.scratchpad.body,emptyState:"Scratchpad is empty."}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(Ce,{to:`/assignments/${i.id}/scratchpad/edit`,className:"rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Edit scratchpad"})})]}):l.jsx(Ge,{title:"No scratchpad yet",description:"Scratchpad is scaffolded at assignment creation time."})})},{value:"handoff",label:"Handoff",count:((m=i.handoff)==null?void 0:m.handoffCount)??0,content:l.jsx("div",{className:"space-y-5",children:i.handoff?l.jsxs(Pe,{children:[l.jsx(Ut,{content:i.handoff.body,emptyState:"No handoff history yet."}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(Ce,{to:`/assignments/${i.id}/handoff/edit`,className:"rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Append handoff"})})]}):l.jsx(Ge,{title:"No handoff log yet",description:"Handoffs appear here when an agent appends one."})})},{value:"decisions",label:"Decisions",count:((x=i.decisionRecord)==null?void 0:x.decisionCount)??0,content:l.jsx("div",{className:"space-y-5",children:i.decisionRecord?l.jsxs(Pe,{children:[l.jsx(Ut,{content:i.decisionRecord.body,emptyState:"No decision history yet."}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx(Ce,{to:`/assignments/${i.id}/decision-record/edit`,className:"rounded border border-neutral-700 px-2 py-1 text-xs text-neutral-300 hover:border-neutral-500 hover:text-neutral-100",children:"Append decision"})})]}):l.jsx(Ge,{title:"No decision record yet",description:"Decision records appear here once appended."})})}]})]}):l.jsx(vt,{error:"Assignment not found"})}const mI=["table","list","kanban"],Cy={critical:0,high:1,medium:2,low:3};function Ny(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function gI(e,t){return e.toString()===t.toString()}function Ey(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function xI(e,t,n){return[...e].sort((i,a)=>{let c=0;switch(t){case"title":c=i.title.localeCompare(a.title);break;case"status":c=i.status.localeCompare(a.status);break;case"priority":c=(Cy[i.priority]??99)-(Cy[a.priority]??99);break;case"assignee":c=(i.assignee??"").localeCompare(a.assignee??"");break;case"dependencies":c=i.dependsOn.length-a.dependsOn.length;break;case"updated":c=i.updated.localeCompare(a.updated);break}return n==="asc"?c:-c})}function Ry(){const{workspace:e}=Et(),t=Lt(),n=Xt(),o=g.useRef(null);zs("list:assignments");const{data:i,loading:a,error:c,refetch:d}=Bv(),p=bc(),[h,m]=_s(),x=g.useMemo(()=>YE(p.order),[p]),v=g.useMemo(()=>{const U={};for(const ae of x)U[ae]=VE(p,ae);return U},[x,p]),b=g.useMemo(()=>x.map(U=>({id:U,title:v[U]??U,description:D0(U)})),[x,v]),N=g.useMemo(()=>new Set(["all",...x]),[x]),k=h.get("view"),j=h.get("status"),S=h.get("stale"),T=k&&mI.includes(k)?k:"kanban";function A(U){return!U||!N.has(U)?"all":U}const L=g.useCallback(U=>{m(ae=>{const ge=new URLSearchParams(ae);return U==="kanban"?ge.delete("view"):ge.set("view",U),ge})},[m]),[O,P]=g.useState(""),[$,E]=g.useState(()=>A(j)),[H,Z]=g.useState("all"),[G,q]=g.useState("all"),[Y,X]=g.useState("all"),[_,D]=g.useState(()=>Ny(S)),[V,W]=g.useState("updated"),[ee,R]=g.useState("desc"),[F,J]=g.useState(()=>new Set(x)),[I,de]=g.useState([]),[ve,fe]=g.useState(null),[Ee,Ne]=g.useState(null),[Re,je]=g.useState(null),[ut,tt]=g.useState(null),[Ue,Be]=g.useState(null);g.useEffect(()=>{de((i==null?void 0:i.assignments)??[])},[i]),g.useEffect(()=>{const U=A(j);U!==$&&E(U);const ae=Ny(S);ae!==_&&D(ae)},[_,S,$,j]),g.useEffect(()=>{m(U=>{const ae=new URLSearchParams(U);return $==="all"?ae.delete("status"):ae.set("status",$),_==="all"?ae.delete("stale"):_==="stale"?ae.set("stale","1"):ae.set("stale","0"),gI(U,ae)?U:ae})},[_,m,$]);const St=g.useMemo(()=>Array.from(new Set(I.map(U=>U.status))).sort(),[I]),Ot=g.useMemo(()=>Array.from(new Set(I.map(U=>U.priority))).sort(),[I]),cn=g.useMemo(()=>Array.from(new Set(I.map(U=>U.assignee??"__unassigned__"))).sort(),[I]),hn=g.useMemo(()=>Array.from(new Map(I.filter(U=>U.projectSlug!==null).map(U=>[U.projectSlug,U.projectTitle]))).sort(([,U],[,ae])=>U.localeCompare(ae)),[I]),Xe=g.useMemo(()=>I.filter(U=>{if(e){if(e==="_ungrouped"){if(U.projectWorkspace!==null)return!1}else if(U.projectWorkspace!==e)return!1}if($!=="all"&&U.status!==$||H!=="all"&&U.priority!==H||_==="stale"&&!Ey(U.updated)||_==="fresh"&&Ey(U.updated)||G!=="all"&&(U.assignee??"__unassigned__")!==G)return!1;if(Y!=="all"){if(Y==="__standalone__"){if(U.projectSlug!==null)return!1}else if(U.projectSlug!==Y)return!1}const ae=O.trim().toLowerCase();return!(ae&&!`${U.title} ${U.slug} ${U.projectTitle??"standalone"} ${U.projectSlug??""}`.toLowerCase().includes(ae))}),[_,I,O,$,H,G,Y,e]),nt=g.useMemo(()=>xI(Xe,V,ee),[Xe,V,ee]),{visibleItems:Wt,visibleIndexByKey:Qt}=g.useMemo(()=>{const U=T==="table"?nt:x.flatMap(ge=>Xe.filter(Oe=>Oe.status===ge)),ae=new Map;return U.forEach((ge,Oe)=>ae.set(Yt(ge),Oe)),{visibleItems:U,visibleIndexByKey:ae}},[T,nt,Xe,x]),{hotkeyRowProps:mn}=yc(Wt,{scope:"list:assignments",onOpen:U=>{if(U.projectSlug===null){n(`/assignments/${U.id}`);return}const ae=U.projectWorkspace?`/w/${U.projectWorkspace}`:t;n(`${ae}/projects/${U.projectSlug}/assignments/${U.slug}`)}});if(yt({keys:"/",scope:"list:assignments",description:"Focus filter",handler:()=>{var U;return(U=o.current)==null?void 0:U.focus()}}),yt({keys:"r",scope:"list:assignments",description:"Refresh",handler:()=>d()}),a)return l.jsx(jt,{label:"Loading assignments board…"});if(c||!i)return l.jsx(vt,{error:c||"Assignments board is unavailable."});async function Pn({item:U,toColumnId:ae,action:ge,reason:Oe}){fe(null),Ne(Yt(U));const zn=I;de(Zt=>Zt.map(dt=>Yt(dt)===Yt(U)?{...dt,status:ae,blockedReason:ae==="blocked"?Oe??dt.blockedReason:null}:dt));try{if(U.projectSlug===null){if(!ge)throw new Error("Standalone assignments require a transition action, not status override.");const dt=await fetch(`/api/assignments/${encodeURIComponent(U.id)}/transitions/${encodeURIComponent(ge.command)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Oe?{reason:Oe}:{})});if(!dt.ok)throw new Error((await dt.json()).error??`HTTP ${dt.status}`);const Ye=(await dt.json()).assignment;de(bt=>bt.map(Mt=>Yt(Mt)===Yt(U)?{...Mt,status:Ye.status,blockedReason:Ye.blockedReason,availableTransitions:Ye.availableTransitions,updated:Ye.updated}:Mt));return}const Zt=ge?await zw(U.projectSlug,U.slug,ge,Oe):await Bw(U.projectSlug,U.slug,ae);return de(dt=>dt.map(Fe=>Yt(Fe)===Yt(U)?{...Fe,status:Zt.status,blockedReason:Zt.blockedReason,availableTransitions:Zt.availableTransitions,updated:Zt.updated}:Fe)),d(),!0}catch(Zt){return de(zn),fe(Zt.message),!1}finally{Ne(null)}}async function Tn({item:U,toColumnId:ae}){if(U.status===ae)return;const ge=_i(U,ae);if(ge!=null&&ge.disabled){fe(ge.disabledReason||`Cannot move this assignment to ${ae}.`);return}if(ge&&Uw(ge)){Be({item:U,toColumnId:ae,action:ge});return}await Pn({item:U,toColumnId:ae,action:ge})}function re(U){J(ae=>{const ge=new Set(ae);return ge.has(U)?ge.delete(U):ge.add(U),ge})}function le(U){V===U?R(ae=>ae==="asc"?"desc":"asc"):(W(U),R("asc"))}const pe=Re?I.find(U=>Yt(U)===Re)??null:null;function ne(U,ae){U.dataTransfer.effectAllowed="move",U.dataTransfer.setData("text/plain",ae),je(ae)}function me(){je(null),tt(null)}function ke(U,ae){if(!pe)return;const ge=_i(pe,ae);pe.status===ae||ge!=null&&ge.disabled||(U.preventDefault(),U.dataTransfer.dropEffect="move",tt(ae))}function _t(U,ae){ut===ae&&!U.currentTarget.contains(U.relatedTarget)&&tt(null)}function Jt(U,ae){if(U.preventDefault(),!pe||pe.status===ae){me();return}me(),Tn({item:pe,toColumnId:ae})}function Vt({field:U,children:ae}){const ge=V===U;return l.jsx("th",{className:"pb-3 font-medium",children:l.jsxs("button",{type:"button",onClick:()=>le(U),className:"inline-flex items-center gap-1 hover:text-foreground",children:[ae,ge?ee==="asc"?l.jsx(vv,{className:"h-3 w-3"}):l.jsx(Yi,{className:"h-3 w-3"}):null]})})}return l.jsxs("div",{className:"space-y-5",children:[l.jsxs(wp,{children:[l.jsx(vc,{ref:o,value:O,onChange:P,placeholder:"Search assignments or projects"}),l.jsxs("select",{value:$,onChange:U=>E(A(U.target.value)),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All statuses"}),St.map(U=>l.jsx("option",{value:U,children:v[U]??U},U))]}),l.jsxs("select",{value:H,onChange:U=>Z(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All priorities"}),Ot.map(U=>l.jsx("option",{value:U,className:"capitalize",children:U},U))]}),l.jsxs("select",{value:G,onChange:U=>q(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All assignees"}),cn.map(U=>l.jsx("option",{value:U,children:U==="__unassigned__"?"Unassigned":U},U))]}),l.jsxs("select",{value:Y,onChange:U=>X(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All projects"}),l.jsx("option",{value:"__standalone__",children:"Standalone"}),hn.map(([U,ae])=>l.jsx("option",{value:U,children:ae},U))]}),l.jsxs("select",{value:_,onChange:U=>D(U.target.value),className:"editor-input max-w-[180px]",children:[l.jsx("option",{value:"all",children:"All activity"}),l.jsx("option",{value:"stale",children:"Stale only"}),l.jsx("option",{value:"fresh",children:"Fresh only"})]}),l.jsx(kp,{value:T,onChange:U=>L(U),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),ve?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:ve}):null,i.assignments.length===0?l.jsx(Ge,{title:"No assignments yet",description:"Assignments appear here once projects contain concrete work items.",actions:l.jsxs(Ce,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects`,children:[l.jsx(np,{className:"h-4 w-4"}),l.jsx("span",{children:"Browse Projects"})]})}):Xe.length===0?l.jsx(Ge,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all projects again."}):T==="table"?l.jsx(Pe,{title:`${nt.length} assignment${nt.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(Vt,{field:"title",children:"Assignment"}),l.jsx(Vt,{field:"status",children:"Status"}),l.jsx(Vt,{field:"priority",children:"Priority"}),l.jsx(Vt,{field:"assignee",children:"Assignee"}),l.jsx(Vt,{field:"dependencies",children:"Dependencies"}),l.jsx(Vt,{field:"updated",children:"Updated"})]})}),l.jsx("tbody",{children:nt.map((U,ae)=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",...mn(ae),children:[l.jsxs("td",{className:"py-4 pr-4",children:[l.jsx(Ce,{to:U.projectSlug===null?`/assignments/${U.id}`:`${t}/projects/${U.projectSlug}/assignments/${U.slug}`,className:"font-semibold text-foreground hover:text-primary",children:U.title}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:U.projectTitle??l.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 font-mono text-[10px] uppercase text-neutral-300",children:"Standalone"})}),l.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:U.id,children:[U.id.slice(0,8),l.jsx(Hr,{value:U.id})]})]}),l.jsx("td",{className:"py-4 pr-4",children:l.jsx("select",{value:U.status,disabled:Ee===Yt(U),onChange:ge=>Tn({item:U,toColumnId:ge.target.value}),className:$e("appearance-none rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-wide outline-none","cursor-pointer bg-[length:12px] bg-[right_6px_center] bg-no-repeat pr-6",`bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E")]`,(Ya[U.status]??Ya.pending).className,Ee===Yt(U)&&"animate-pulse opacity-60"),children:x.map(ge=>{const Oe=U.status===ge?void 0:_i(U,ge),zn=(Oe==null?void 0:Oe.disabled)??!1;return l.jsx("option",{value:ge,disabled:zn,title:zn?(Oe==null?void 0:Oe.disabledReason)??void 0:void 0,children:v[ge]},ge)})})}),l.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:U.priority}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:U.assignee??"Unassigned"}),l.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:U.dependsOn.length}),l.jsx("td",{className:"py-4 text-muted-foreground",children:Vr(U.updated)})]},Yt(U)))})]})})}):T==="list"?l.jsx("div",{className:"space-y-3",children:x.map(U=>{var dt;const ae=Xe.filter(Fe=>Fe.status===U);if(ae.length===0&&!pe)return null;const ge=F.has(U),Oe=pe?pe.status!==U&&!((dt=_i(pe,U))!=null&&dt.disabled):!1,zn=pe?pe.status!==U&&!Oe:!1,Zt=ut===U;return l.jsxs("div",{className:$e("rounded-lg border border-border/60 bg-card/90 transition",Zt&&Oe&&"ring-2 ring-ring/30",zn&&"border-dashed opacity-65"),onDragOver:Fe=>ke(Fe,U),onDragLeave:Fe=>_t(Fe,U),onDrop:Fe=>Jt(Fe,U),children:[l.jsxs("button",{type:"button",onClick:()=>re(U),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[l.jsx(Yi,{className:`h-4 w-4 text-muted-foreground transition-transform ${ge?"":"-rotate-90"}`}),l.jsx("span",{className:"font-semibold text-foreground",children:v[U]}),l.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:ae.length})]}),ge&&ae.length>0&&l.jsx("div",{className:"space-y-3 px-4 pb-4",children:ae.map(Fe=>{const Ye=Yt(Fe),bt=Re===Ye,Mt=Qt.get(Ye)??-1;return l.jsx("div",{draggable:!0,onDragStart:qt=>ne(qt,Ye),onDragEnd:me,...Mt>=0?mn(Mt):{},className:$e("cursor-grab transition active:cursor-grabbing",bt&&"scale-[0.98] opacity-50"),children:l.jsx(Py,{assignment:Fe,dragging:bt,transitioning:Ee===Ye})},Ye)})})]},U)})}):l.jsx(I0,{columns:b,items:Xe,getItemId:Yt,getColumnId:U=>U.status,canDrop:({item:U,fromColumnId:ae,toColumnId:ge})=>{if(ae===ge)return{allowed:!0};const Oe=_i(U,ge);return Oe!=null&&Oe.disabled?{allowed:!1,reason:Oe.disabledReason||Oe.description}:{allowed:!0,reason:Oe?Oe.warning||Oe.description:`Move to ${ge} (direct status change).`}},onMove:({item:U,toColumnId:ae})=>Tn({item:U,toColumnId:ae}),emptyMessage:U=>`No ${U.title.toLowerCase()} assignments.`,renderCard:(U,{dragging:ae})=>{const ge=Qt.get(Yt(U))??-1;return l.jsx("div",{...ge>=0?mn(ge):{},children:l.jsx(Py,{assignment:U,dragging:ae,transitioning:Ee===Yt(U)})})}}),l.jsx(Ib,{open:Ue!==null,action:(Ue==null?void 0:Ue.action)??null,assignmentTitle:(Ue==null?void 0:Ue.item.title)??"Assignment",loading:Ee===(Ue?Yt(Ue.item):null),onOpenChange:U=>{U||Be(null)},onConfirm:async U=>{if(!Ue)return;const ae=Ue;await Pn({item:ae.item,toColumnId:ae.toColumnId,action:ae.action,reason:U})&&Be(null)}})]})}function Py({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(Ce,{to:e.projectSlug===null?`/assignments/${e.id}`:`${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.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 font-mono text-[10px] uppercase text-neutral-300",children:"Standalone"})}),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(Hr,{value:e.id})]})]}),l.jsx(Ht,{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:Vr(e.updated)})]})]})}function _i(e,t){return e.availableTransitions.find(n=>n.targetStatus===t)}function Yt(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(`
471
+ `),a=[],c=new Map;let d=null,p=[];const h=()=>{d&&(a.push(d),c.set(d,p))};for(const m of i){const x=m.match(/^([A-Za-z_][A-Za-z0-9_-]*):/);if(x&&!m.startsWith(" ")){h(),d=x[1],p=[m];continue}d&&p.push(m)}return h(),{order:a,blocks:c,body:o}}function fl(e){return`---
472
+ ${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
473
+ `)}
474
+ ---
475
+
476
+ ${e.body.replace(/^\n+/,"")}`}function Dt(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 yI(e,t){return Dt(e,t)==="true"}function Ui(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 vI(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 It(e,t,n){e.blocks.has(t)||e.order.push(t),e.blocks.set(t,[`${t}: ${vI(n)}`])}function Hi(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 Wi(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function Ac(e){const t=Tr(e);return{title:Dt(t,"title"),slug:Dt(t,"slug"),workspace:Dt(t,"workspace"),archived:yI(t,"archived"),archivedAt:Dt(t,"archivedAt"),archivedReason:Dt(t,"archivedReason"),tags:Ui(t,"tags").join(", "),body:t.body}}function bI(e,t){const n=Tr(e),o={...Ac(e),...t};return It(n,"title",o.title),It(n,"slug",o.slug),It(n,"workspace",o.workspace||null),It(n,"archived",o.archived),It(n,"archivedAt",o.archivedAt||null),It(n,"archivedReason",o.archivedReason||null),Hi(n,"tags",Wi(o.tags)),n.body=o.body,fl(n)}function Dc(e){const t=Tr(e);return{title:Dt(t,"title"),slug:Dt(t,"slug"),status:Dt(t,"status"),priority:Dt(t,"priority")||"medium",assignee:Dt(t,"assignee"),dependsOn:Ui(t,"dependsOn").join(", "),links:Ui(t,"links").join(", "),blockedReason:Dt(t,"blockedReason"),tags:Ui(t,"tags").join(", "),body:t.body}}function wI(e,t){const n=Tr(e),o={...Dc(e),...t};return It(n,"title",o.title),It(n,"slug",o.slug),It(n,"status",o.status),It(n,"priority",o.priority),It(n,"assignee",o.assignee||null),Hi(n,"dependsOn",Wi(o.dependsOn)),Hi(n,"links",Wi(o.links)),It(n,"blockedReason",o.blockedReason||null),Hi(n,"tags",Wi(o.tags)),n.body=o.body,fl(n)}function Ic(e){const t=Tr(e);return{assignment:Dt(t,"assignment"),status:Dt(t,"status"),body:t.body}}function kI(e,t){const n=Tr(e),o={...Ic(e),...t};return It(n,"assignment",o.assignment),It(n,"status",o.status),n.body=o.body,fl(n)}function Lc(e){const t=Tr(e);return{assignment:Dt(t,"assignment"),body:t.body}}function jI(e,t){const n=Tr(e),o={...Lc(e),...t};return It(n,"assignment",o.assignment),n.body=o.body,fl(n)}function Oc(e){const t=Tr(e);return{name:Dt(t,"name"),slug:Dt(t,"slug"),description:Dt(t,"description"),whenToUse:Dt(t,"when_to_use"),tags:Ui(t,"tags").join(", "),body:t.body}}function SI(e,t){const n=Tr(e),o={...Oc(e),...t};return It(n,"name",o.name),It(n,"slug",o.slug),It(n,"description",o.description||null),It(n,"when_to_use",o.whenToUse||null),Hi(n,"tags",Wi(o.tags)),n.body=o.body,fl(n)}function at(e,t,n){switch(e){case"project":return bI(t,n);case"assignment":return wI(t,n);case"plan":return kI(t,n);case"scratchpad":return jI(t,n);case"playbook":return SI(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:c,description:d,onCancel:p,helpTitle:h,helpBody:m,allowSlugEdit:x=!1}){const[v,b]=g.useState(e),[N,k]=g.useState(!1),[j,S]=g.useState("edit");g.useEffect(()=>{b(e)},[e]);const T=RI(t,v),A=v!==e,L=EI(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:c}),l.jsx("span",{className:"rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-muted-foreground",children: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(xv,{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(lC,{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(op,{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:()=>S("edit"),className:`shell-action ${j==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),l.jsxs("button",{type:"button",onClick:()=>S("preview"),className:`shell-action ${j==="preview"?"bg-foreground text-background":""}`,children:[l.jsx(ex,{className:"h-4 w-4"}),"Preview"]})]}),l.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]",children:[l.jsx("div",{className:j==="preview"?"hidden md:block":"",children:l.jsx("div",{className:"surface-panel space-y-3",children: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(CI,{documentType:t,content:v,onChange:b,allowSlugEdit:x})})}),l.jsx("div",{className:j==="edit"?"hidden md:block":"",children:l.jsxs("div",{className:"surface-panel sticky top-16 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ex,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),l.jsx(Ut,{content:L,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function CI({documentType:e,content:t,onChange:n,allowSlugEdit:o}){if(e==="project"){const a=Ac(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Mi,{children:[l.jsx(Je,{label:"Project title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(a.slug===Ur(a.title)||!a.slug.trim())&&(p.slug=Ur(d)),n(at(e,t,p))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:c=>n(at(e,t,{slug:Ur(c.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(Je,{label:"Tags",children:l.jsx("input",{value:a.tags,onChange:c=>n(at(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(NI,{value:a.workspace,onChange:c=>n(at(e,t,{workspace:c}))})]}),l.jsx(Je,{label:"Project body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(at(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const a=Dc(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Mi,{children:[l.jsx(Je,{label:"Assignment title",children:l.jsx("input",{value:a.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(a.slug===Ur(a.title)||!a.slug.trim())&&(p.slug=Ur(d)),n(at(e,t,p))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:a.slug,disabled:!o,onChange:c=>n(at(e,t,{slug:Ur(c.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(Je,{label:"Status",children:l.jsxs("select",{value:a.status,onChange:c=>n(at(e,t,{status:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"pending",children:"Pending"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"blocked",children:"Blocked"}),l.jsx("option",{value:"review",children:"Review"}),l.jsx("option",{value:"completed",children:"Completed"}),l.jsx("option",{value:"failed",children:"Failed"})]})}),l.jsx(Je,{label:"Priority",children:l.jsxs("select",{value:a.priority,onChange:c=>n(at(e,t,{priority:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"low",children:"Low"}),l.jsx("option",{value:"medium",children:"Medium"}),l.jsx("option",{value:"high",children:"High"}),l.jsx("option",{value:"critical",children:"Critical"})]})}),l.jsx(Je,{label:"Assignee",children:l.jsx("input",{value:a.assignee,onChange:c=>n(at(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),l.jsx(Je,{label:"Depends on",className:"md:col-span-2",children:l.jsx("input",{value:a.dependsOn,onChange:c=>n(at(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),l.jsx(Je,{label:"Links",className:"md:col-span-2",children:l.jsx("input",{value:a.links,onChange:c=>n(at(e,t,{links:c.target.value})),placeholder:"Comma-separated: projectSlug/assignmentSlug",className:"editor-input"})}),l.jsx(Je,{label:"Blocked reason",className:"md:col-span-2",children:l.jsx("input",{value:a.blockedReason,onChange:c=>n(at(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),l.jsx(Je,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:a.tags,onChange:c=>n(at(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),l.jsx(Je,{label:"Assignment body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(at(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const a=Ic(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Mi,{children:[l.jsx(Je,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),l.jsx(Je,{label:"Plan status",children:l.jsxs("select",{value:a.status,onChange:c=>n(at(e,t,{status:c.target.value})),className:"editor-input",children:[l.jsx("option",{value:"draft",children:"Draft"}),l.jsx("option",{value:"approved",children:"Approved"}),l.jsx("option",{value:"in_progress",children:"In Progress"}),l.jsx("option",{value:"completed",children:"Completed"})]})})]}),l.jsx(Je,{label:"Plan body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(at(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const a=Lc(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsx(Mi,{children:l.jsx(Je,{label:"Assignment",children:l.jsx("input",{value:a.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),l.jsx(Je,{label:"Scratchpad body",children:l.jsx("textarea",{value:a.body,onChange:c=>n(at(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=Oc(t);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Mi,{children:[l.jsx(Je,{label:"Playbook name",children:l.jsx("input",{value:i.name,onChange:a=>{const c=a.target.value,d={name:c};o&&(i.slug===Ur(i.name)||!i.slug.trim())&&(d.slug=Ur(c)),n(at(e,t,d))},className:"editor-input"})}),l.jsx(Je,{label:"Slug",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("input",{value:i.slug,disabled:!o,onChange:a=>n(at(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(Je,{label:"Description",className:"md:col-span-2",children:l.jsx("input",{value:i.description,onChange:a=>n(at(e,t,{description:a.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),l.jsx(Je,{label:"Tags",className:"md:col-span-2",children:l.jsx("input",{value:i.tags,onChange:a=>n(at(e,t,{tags:a.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),l.jsx(Je,{label:"When to use",className:"md:col-span-2",children:l.jsx("input",{value:i.whenToUse,onChange:a=>n(at(e,t,{whenToUse:a.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),l.jsx(Je,{label:"Playbook rules",children:l.jsx("textarea",{value:i.body,onChange:a=>n(at(e,t,{body:a.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function Mi({children:e}){return l.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function Je({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 NI({value:e,onChange:t}){const{data:n}=lp(),o=(n==null?void 0:n.workspaces)??[];return l.jsx(Je,{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 EI(e,t){switch(e){case"project":return Ac(t).body;case"assignment":return Dc(t).body;case"plan":return Ic(t).body;case"scratchpad":return Lc(t).body;case"playbook":return Oc(t).body}}function RI(e,t){switch(e){case"project":{const n=Ac(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=Dc(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 Ic(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return Lc(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=Oc(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 Ty(){const e=Xt(),{workspace:t}=Et(),n=Lt(),[o,i]=g.useState(null),[a,c]=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
477
+ workspace: ${t}`)),i(b),c(!1)}).catch(v=>{m(v.message),c(!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(vt,{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 Ay(){const{slug:e}=Et(),t=Lt(),n=Xt(),[o,i]=g.useState(null),[a,c]=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),c(!1)}).catch(v=>{m(v.message),c(!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(vt,{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 _c({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,documentType:a,helpTitle:c,helpBody:d}){const p=Xt(),{data:h,loading:m,error:x}=Wv(e),[v,b]=g.useState(!1),[N,k]=g.useState(null);async function j(S){b(!0),k(null);try{const T=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),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(vt,{error:x||`${o} is unavailable.`}):l.jsx(pl,{initialContent:h.content,documentType:a,onSave:j,saving:v,error:N,title:o,description:i,onCancel:()=>p(n),helpTitle:c,helpBody:d})}function Dy(){const{slug:e}=Et(),t=Lt(),n=e??"";return l.jsx(_c,{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 rf(){const{slug:e,aslug:t,id:n}=Et(),o=Lt(),i=!!n,a=i?`/api/assignments/${n}/edit`:`/api/projects/${e}/assignments/${t}/edit`,c=i?`/api/assignments/${n}`:`/api/projects/${e}/assignments/${t}`,d=i?`/assignments/${n}`:`${o}/projects/${e}/assignments/${t}`;return l.jsx(_c,{loadUrl:a,saveUrl:c,redirectTo:d,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 of(){const{slug:e,aslug:t,id:n}=Et(),o=Lt(),i=!!n,a=i?`/api/assignments/${n}/plan/edit`:`/api/projects/${e}/assignments/${t}/plan/edit`,c=i?`/api/assignments/${n}/plan`:`/api/projects/${e}/assignments/${t}/plan`,d=i?`/assignments/${n}?tab=plan`:`${o}/projects/${e}/assignments/${t}?tab=plan`;return l.jsx(_c,{loadUrl:a,saveUrl:c,redirectTo:d,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 sf(){const{slug:e,aslug:t,id:n}=Et(),o=Lt(),i=!!n,a=i?`/api/assignments/${n}/scratchpad/edit`:`/api/projects/${e}/assignments/${t}/scratchpad/edit`,c=i?`/api/assignments/${n}/scratchpad`:`/api/projects/${e}/assignments/${t}/scratchpad`,d=i?`/assignments/${n}?tab=scratchpad`:`${o}/projects/${e}/assignments/${t}?tab=scratchpad`;return l.jsx(_c,{loadUrl:a,saveUrl:c,redirectTo:d,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 Vw({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,helpTitle:a,helpBody:c}){const d=Xt(),{data:p,loading:h,error:m}=Wv(e),[x,v]=g.useState(""),[b,N]=g.useState(""),[k,j]=g.useState(!1),[S,T]=g.useState(null);async function A(){j(!0),T(null);try{const L=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:x,body:b})}),O=await L.json();if(!L.ok){T(O.error||`HTTP ${L.status}`),j(!1);return}d(n)}catch(L){T(L.message),j(!1);return}j(!1)}return h?l.jsx(jt,{label:`Loading ${o.toLowerCase()}…`}):m||!p?l.jsx(vt,{error:m||`${o} is unavailable.`}):l.jsxs("div",{className:"space-y-4",children:[l.jsx(Pe,{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:L=>v(L.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:L=>N(L.target.value),className:"editor-textarea",spellCheck:!1})]}),S?l.jsx("p",{className:"rounded-md border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700 dark:border-rose-900 dark:bg-rose-950/30 dark:text-rose-300",children:S}):null,l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),l.jsx("button",{type:"button",onClick:A,disabled:k||!b.trim(),className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:k?"Appending…":"Append Entry"})]})]})}),l.jsx(Pe,{title:"Current Document",children:l.jsx(Ut,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function lf(){const{slug:e,aslug:t,id:n}=Et(),o=Lt(),i=!!n,a=i?`/api/assignments/${n}/handoff/edit`:`/api/projects/${e}/assignments/${t}/handoff/edit`,c=i?`/api/assignments/${n}/handoff/entries`:`/api/projects/${e}/assignments/${t}/handoff/entries`,d=i?`/assignments/${n}?tab=handoff`:`${o}/projects/${e}/assignments/${t}?tab=handoff`;return l.jsx(Vw,{loadUrl:a,saveUrl:c,redirectTo:d,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 af(){const{slug:e,aslug:t,id:n}=Et(),o=Lt(),i=!!n,a=i?`/api/assignments/${n}/decision-record/edit`:`/api/projects/${e}/assignments/${t}/decision-record/edit`,c=i?`/api/assignments/${n}/decision-record/entries`:`/api/projects/${e}/assignments/${t}/decision-record/entries`,d=i?`/assignments/${n}?tab=decisions`:`${o}/projects/${e}/assignments/${t}?tab=decisions`;return l.jsx(Vw,{loadUrl:a,saveUrl:c,redirectTo:d,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 Iy(){const{workspace:e}=Et(),{data:t}=dc(),{data:n,loading:o,error:i,refetch:a}=ap(),[c,d]=g.useState(!1),[p,h]=g.useState(""),[m,x]=g.useState(!1),v=fn();g.useEffect(()=>{const T=v.hash.match(/^#server-(.+)/);if(!T)return;const A=decodeURIComponent(T[1]),L=document.querySelector(`[data-server-name="${window.CSS.escape(A)}"]`);if(!L)return;L.scrollIntoView({block:"nearest"}),L.classList.add("ring-2","ring-primary/60");const O=window.setTimeout(()=>L.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(L=>L.panes.some(O=>O.assignment&&O.assignment.project!==null&&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 j(T){await fetch(`/api/servers/${encodeURIComponent(T)}`,{method:"DELETE"}),a()}async function S(T){await fetch(`/api/servers/${encodeURIComponent(T)}/refresh`,{method:"POST"}),a()}return o?l.jsx(jt,{label:"Loading servers…"}):i?l.jsx(vt,{error:i}):n?n.tmuxAvailable?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?l.jsxs("form",{onSubmit: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(lr,{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(Ge,{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(PI,{session:T,onRefresh:()=>S(T.name),onRemove:()=>j(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(TC,{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 PI({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(rp,{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(Ms,{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(TI,{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(NC,{className:"h-4 w-4"}),l.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function TI({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(Hr,{value:e.cwd})]}),e.branch&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(wv,{className:"h-3 w-3"}),e.branch,e.worktree&&l.jsx("span",{className:"rounded bg-violet-100 px-1 py-0.5 text-[10px] font-medium text-violet-700 dark:bg-violet-950/40 dark:text-violet-400",children:"worktree"})]}),e.ports.length>0&&l.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:e.urls.map(c=>l.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded border border-teal-200 bg-teal-50 px-1.5 py-0.5 text-xs font-medium text-teal-700 hover:bg-teal-100 dark:border-teal-900 dark:bg-teal-950/40 dark:text-teal-400 dark:hover:bg-teal-950/60",children:[c.replace("http://localhost:",":"),l.jsx(bv,{className:"h-2.5 w-2.5"})]},c))}),l.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?l.jsxs(Ce,{to:e.assignment.project===null?`/assignments/${e.assignment.slug}`:`${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(gC,{className:"h-2.5 w-2.5"}),e.assignment.title,e.assignment.project===null?l.jsx("span",{className:"ml-1 rounded bg-neutral-800/70 px-1 py-0.5 text-[9px] uppercase tracking-wide text-neutral-400",children:"Standalone"}):null]}):l.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function Ly(){const{workspace:e}=Et(),{data:t}=dc(),{data:n,loading:o,error:i}=jN(),[a,c]=g.useState(""),[d,p]=g.useState(""),[h,m]=g.useState(""),[x,v]=g.useState("started_desc"),[b,N]=g.useState(0),[k,j]=g.useState(new Set),[S,T]=g.useState(!1),[A,L]=g.useState(null),[O,P]=g.useState(null),$=(n==null?void 0:n.sessions.some(Y=>Y.status==="active"))??!1;g.useEffect(()=>{if(!$)return;const Y=window.setInterval(()=>N(X=>X+1),3e4);return()=>window.clearInterval(Y)},[$]),g.useEffect(()=>{j(Y=>{if(Y.size===0)return Y;const X=new Set((n==null?void 0:n.sessions.map(D=>D.sessionId))??[]),_=new Set([...Y].filter(D=>X.has(D)));return _.size===Y.size?Y:_})},[n]);const E=g.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const Y=a.trim().toLowerCase();return[...n.sessions.filter(_=>{var W;if(e&&t){const ee=((W=t.find(R=>R.slug===_.projectSlug))==null?void 0:W.workspace)??null;if(e==="_ungrouped"){if(ee!==null)return!1}else if(ee!==e)return!1}const D=DI(_.started);return d&&(!D||D<d)||h&&(!D||D>h)?!1:Y?[_.projectSlug??"",_.assignmentSlug??"",_.agent,_.sessionId,_.path,_.description??"",_.transcriptPath??""].join(" ").toLowerCase().includes(Y):!0})].sort((_,D)=>II(_,D,x))},[n,a,x,d,h,b,e,t]);function H(Y){j(X=>{const _=new Set(X);return _.has(Y)?_.delete(Y):_.add(Y),_})}function Z(){k.size===E.length&&E.length>0?j(new Set):j(new Set(E.map(Y=>Y.sessionId)))}async function G(Y){L(null),T(!0);try{const X=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:Y})}),_=await X.json().catch(()=>null);if(!X.ok)throw new Error((_==null?void 0:_.error)||`HTTP ${X.status}`);j(D=>new Set([...D].filter(V=>!Y.includes(V)))),P(null)}catch(X){L(X.message)}finally{T(!1)}}if(o)return l.jsx(jt,{label:"Loading agent sessions..."});if(i)return l.jsx(vt,{error:i});if(!n)return null;const q=n.sessions.length>0;return l.jsxs(l.Fragment,{children:[l.jsxs(wp,{children:[l.jsx(vc,{value:a,onChange:c,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:Y=>p(Y.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:Y=>m(Y.target.value),className:"editor-input min-w-[150px]"})]}),l.jsxs("select",{value:x,onChange:Y=>v(Y.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:S,children:[l.jsx(Ms,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),l.jsx("button",{className:"shell-action",onClick:()=>j(new Set),children:"Clear Selection"})]}),q?E.length===0?l.jsx(Ge,{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:Z,className:"text-muted-foreground hover:text-foreground",children:k.size===E.length&&E.length>0?l.jsx(Sr,{className:"h-4 w-4"}):l.jsx(Cv,{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:"pb-2 pr-3",children:"Transcript"}),l.jsx("th",{className:"w-8 pb-2"})]})}),l.jsx("tbody",{children:E.map(Y=>l.jsx(AI,{session:Y,selected:k.has(Y.sessionId),onToggle:()=>H(Y.sessionId),onDelete:()=>P({sessionIds:[Y.sessionId],title:`Delete session ${Y.sessionId.slice(0,8)}...?`,description:`Remove this ${Y.agent} session record${Y.assignmentSlug?` for ${Y.assignmentSlug}`:""}. This cannot be undone.`,confirmLabel:"Delete Session"})},Y.sessionId))})]})}):l.jsx(Ge,{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:S,onOpenChange:Y=>{Y||P(null)},onConfirm:async()=>{O&&await G(O.sessionIds)}})]})}function AI({session:e,selected:t,onToggle:n,onDelete:o}){const i=Lt(),a=e.sessionId.length>12?e.sessionId.slice(0,8)+"...":e.sessionId,c=e.path?e.path.replace(/^\/Users\/[^/]+/,"~"):"—",d=e.transcriptPath?e.transcriptPath.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(Sr,{className:"h-4 w-4"}):l.jsx(Cv,{className:"h-4 w-4"})})}),l.jsx("td",{className:"py-2 pr-3",children:e.projectSlug?l.jsx(Ce,{to:`${i}/projects/${e.projectSlug}`,className:"text-primary hover:underline",children:Cn(e.projectSlug)}):e.assignmentSlug?l.jsx("span",{className:"rounded bg-neutral-800 px-1.5 py-0.5 text-[10px] font-mono uppercase tracking-wide text-neutral-300",children:"Standalone"}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-2 pr-3",children:e.projectSlug&&e.assignmentSlug?l.jsx(Ce,{to:`${i}/projects/${e.projectSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:Cn(e.assignmentSlug)}):e.assignmentSlug?l.jsx(Ce,{to:`/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline font-mono",children: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(uc,{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(Hr,{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:c}),e.path&&l.jsx(Hr,{value:e.path})]})}),l.jsx("td",{className:"max-w-[260px] py-2 pr-3",children:e.transcriptPath?l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:e.transcriptPath,children:d}),l.jsx(Hr,{value:e.transcriptPath})]}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),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(Ms,{className:"h-3.5 w-3.5"})})})]})}function DI(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 Ia(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 II(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 Ia(e)-Ia(t);case"duration_desc":return Ia(t)-Ia(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 LI(){const{data:e,loading:t,error:n}=Vv(),[o,i]=g.useState(""),a=g.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!o.trim())return e.playbooks;const c=o.toLowerCase();return e.playbooks.filter(d=>d.name.toLowerCase().includes(c)||d.description.toLowerCase().includes(c)||d.slug.toLowerCase().includes(c)||d.tags.some(p=>p.toLowerCase().includes(c)))},[e,o]);return t?l.jsx(jt,{label:"Loading playbooks..."}):n?l.jsx(vt,{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:c=>i(c.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),l.jsxs(Ce,{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(lr,{className:"h-4 w-4"}),"Create Playbook"]})]}),l.jsxs(Ce,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[l.jsx(cC,{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(Ge,{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(Ce,{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(lr,{className:"h-4 w-4"}),"Create Playbook"]}):void 0}):l.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:a.map(c=>l.jsxs(Ce,{to:`/playbooks/${c.slug}`,className:"surface-panel group flex flex-col gap-2 p-4 transition hover:border-foreground/20",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(yv,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:c.name}),c.description?l.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:c.description}):null]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[l.jsxs("div",{className:"flex flex-wrap gap-1",children:[c.tags.slice(0,3).map(d=>l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:[l.jsx(Nv,{className:"h-2.5 w-2.5"}),d]},d)),c.tags.length>3?l.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",c.tags.length-3]}):null]}),l.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:Vr(c.updated)})]})]},c.slug))})]})}function OI(){const{slug:e}=Et(),t=Xt(),{data:n,loading:o,error:i}=CN(e),[a,c]=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(vt,{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(Nv,{className:"h-3 w-3"}),x]},x))}):null]}),h?null:l.jsxs("div",{className:"flex shrink-0 gap-2",children:[l.jsxs(Ce,{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(wC,{className:"h-3 w-3"}),"Edit"]}),a?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:m,disabled:d,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-red-600 px-3 text-xs font-medium text-white transition hover:bg-red-700 disabled:opacity-50",children:d?"Deleting...":"Confirm"}),l.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-8 items-center rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]}):l.jsxs("button",{type:"button",onClick:()=>c(!0),className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-red-600 transition hover:bg-red-50 dark:hover:bg-red-950/30",children:[l.jsx(Ms,{className:"h-3 w-3"}),"Delete"]})]})]}),l.jsx("div",{className:"surface-panel p-4",children:l.jsx(Ut,{content:n.body})})]}):null}function _I(){const e=Xt(),[t,n]=g.useState(null),[o,i]=g.useState(!0),[a,c]=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){c(!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}`),c(!1);return}e(`/playbooks/${v.slug}`)}catch(x){p(x.message),c(!1);return}c(!1)}return o?l.jsx(jt,{label:"Loading playbook template..."}):d&&!t?l.jsx(vt,{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 MI(){const{slug:e}=Et(),t=Xt(),[n,o]=g.useState(null),[i,a]=g.useState(!0),[c,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(vt,{error:p}):l.jsx(pl,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:m,saving:c,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function $I({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 zf=["projects","playbooks","todos","servers","config"];function FI(e){const t=new Set;for(const n of e.split(",").map(o=>o.trim()))zf.includes(n)&&t.add(n);return t}function Oy(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function zI(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,a]=g.useState(""),[c,d]=g.useState(new Set(zf)),[p,h]=g.useState(!1),[m,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(null),j=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(FI($.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(()=>{j()},[j]);function S(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(c),$=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 j()}catch(P){k({type:"error",message:`Backup failed: ${P instanceof Error?P.message:String(P)}`})}finally{b(null)}}async function L(){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 j()}catch($){k({type:"error",message:`Restore failed: ${$ instanceof Error?$.message:String($)}`})}finally{b(null)}}}if(e)return l.jsx(Pe,{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()&&c.size>0&&!v&&!p;return l.jsx(Pe,{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:zf.map(P=>{const $=c.has(P);return l.jsxs("button",{type:"button",onClick:()=>S(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: "}),Oy((n==null?void 0:n.lastBackup)??null)]}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Last restore: "}),Oy((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(op,{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(AC,{className:"h-3.5 w-3.5"}),v==="push"?"Backing up...":"Back Up Now"]}),l.jsxs("button",{className:"shell-action",onClick:L,disabled:!O,title:O?"Restore from backup":p?"Save config first":"Set repo and pick categories",children:[l.jsx(sC,{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(rC,{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 cf(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 BI(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,a]=g.useState(!1),[c,d]=g.useState([]),[p,h]=g.useState([]),[m,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(!1),j=g.useCallback(async()=>{try{const E=await fetch("/api/config/statuses");if(!E.ok)throw new Error(`HTTP ${E.status}`);const H=await E.json(),Z=cf(H);d(Z.statuses),h(Z.order),a(H.custom),k(!1),o(null)}catch(E){o(E instanceof Error?E.message:"Failed to load config")}finally{t(!1)}},[]);g.useEffect(()=>{j()},[j]);function S(){setTimeout(()=>b(null),3e3)}async function T(){x(!0),b(null);try{const E={statuses:c.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:[]},H=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)});if(!H.ok){const q=await H.json().catch(()=>({error:"Unknown error"}));throw new Error(q.error??"Save failed")}const Z=await H.json(),G=cf(Z);d(G.statuses),h(G.order),a(Z.custom),k(!1),kx(),b({type:"success",message:"Status config saved"}),S()}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 H=await E.json(),Z=cf(H);d(Z.statuses),h(Z.order),a(H.custom),k(!1),kx(),b({type:"success",message:"Reset to defaults"}),S()}catch(E){b({type:"error",message:E instanceof Error?E.message:"Reset failed"})}finally{x(!1)}}function L(E,H,Z){d(G=>{const q=[...G];if(q[E]={...q[E],[H]:Z},H==="id"&&typeof Z=="string"){const Y=G[E].id;h(X=>X.map(_=>_===Y?Z:_))}return q}),k(!0)}function O(){const E=`status_${c.length+1}`;d(H=>[...H,{id:E,label:"New Status",description:"",color:"",terminal:!1}]),h(H=>[...H,E]),k(!0)}function P(E){const H=c[E].id;d(Z=>Z.filter((G,q)=>q!==E)),h(Z=>Z.filter(G=>G!==H)),k(!0)}function $(E,H){const Z=E+H;Z<0||Z>=p.length||(h(G=>{const q=[...G];return[q[E],q[Z]]=[q[Z],q[E]],q}),k(!0))}return e?l.jsx(jt,{label:"Loading settings..."}):n?l.jsx(vt,{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(kv,{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(jC,{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(Pe,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:l.jsxs("button",{className:"shell-action text-xs",onClick:O,children:[l.jsx(lr,{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(Xp,{className:"max-w-xs text-xs font-normal normal-case tracking-normal",children:'When enabled, assignments in this status count as finished — they fill the "done" portion of progress bars and satisfy dependency requirements.'})]})}),l.jsx("th",{className:"pb-2 w-10"})]})}),l.jsx("tbody",{className:"divide-y divide-border/30",children:c.map((E,H)=>l.jsxs("tr",{children:[l.jsx("td",{className:"py-2 pr-3",children:l.jsx("input",{type:"text",value:E.id,onChange:Z=>L(H,"id",Z.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:Z=>L(H,"label",Z.target.value),className:"editor-input w-full text-sm"})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx($I,{value:E.color,onChange:Z=>L(H,"color",Z)})}),l.jsx("td",{className:"py-2 pr-3",children:l.jsx("button",{type:"button",role:"switch","aria-checked":E.terminal,onClick:()=>L(H,"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(H),title:"Remove status",children:l.jsx(Ms,{className:"h-3.5 w-3.5"})})})]},H))})]})})}),l.jsx(Pe,{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,H)=>{var G;const Z=((G=c.find(q=>q.id===E))==null?void 0:G.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:H+1}),l.jsx("span",{className:"flex-1 font-medium",children:Z}),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:()=>$(H,-1),disabled:H===0,title:"Move up",children:l.jsx(vv,{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:()=>$(H,1),disabled:H===p.length-1,title:"Move down",children:l.jsx(Yi,{className:"h-3.5 w-3.5"})})]},H)})})}),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(op,{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),j()},disabled:m,children:"Discard Changes"}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]}),l.jsx(zI,{})]})})}const _y=[{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 qw({status:e,onChange:t}){const[n,o]=g.useState(!1),i=g.useRef(null);g.useEffect(()=>{if(!n)return;function c(d){i.current&&!i.current.contains(d.target)&&o(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]);const a=_y.find(c=>c.value===e);return l.jsxs("div",{className:"relative",ref:i,onClick:c=>c.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:_y.filter(c=>c.value!==e).map(c=>l.jsxs("button",{onClick:()=>{t(c.value),o(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm hover:bg-foreground/5 transition ${c.color}`,children:[l.jsx("span",{className:"text-base leading-none",children:c.icon}),l.jsx("span",{children:c.label})]},c.value))})]})}function UI(){const{data:e,loading:t,error:n,refetch:o}=cp(),[i,a]=g.useState(""),c=g.useRef(null);zs("list:todos");const[d,p]=g.useState(""),[h,m]=g.useState(""),[x,v]=g.useState(""),[b,N]=g.useState("_global"),[k,j]=g.useState(null);function S(_,D){_.stopPropagation(),navigator.clipboard.writeText(D),j(D),setTimeout(()=>j(V=>V===D?null:V),1500)}const T=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const _=[];for(const D of e.workspaces)for(const V of D.items)_.push({...V,workspace:D.workspace});return _},[e]),A=g.useMemo(()=>{const _=new Set;for(const D of T)for(const V of D.tags)_.add(V);return Array.from(_).sort()},[T]),L=g.useMemo(()=>{let _=T;if(i.trim()){const D=i.toLowerCase();_=_.filter(V=>V.description.toLowerCase().includes(D)||V.tags.some(W=>W.toLowerCase().includes(D))||V.id.includes(D))}return d&&(_=_.filter(D=>D.status===d)),h&&(_=_.filter(D=>D.tags.includes(h))),_},[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 _={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const D of e.workspaces)_.open+=D.counts.open,_.in_progress+=D.counts.in_progress,_.completed+=D.counts.completed,_.blocked+=D.counts.blocked,_.total+=D.counts.total;return _},[e]);async function P(){x.trim()&&(await qv(b,x.trim()),v(""),o())}const $={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function E(_,D,V){H(_,D,$[V]||"open")}async function H(_,D,V){switch(V){case"open":await Xv(_,D);break;case"in_progress":await Yv(_,D);break;case"completed":await Kv(_,D);break;case"blocked":await Gv(_,D);break}o()}async function Z(_,D){await PN(_,D),o()}const{hotkeyRowProps:G}=yc(L,{scope:"list:todos",bindO:!1,onOpen:_=>E(_.workspace,_.id,_.status)});yt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var _;return(_=c.current)==null?void 0:_.focus()}}),yt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>o()});const[q,Y]=_s(),X=q.get("focus");return g.useEffect(()=>{if(!X)return;const _=document.querySelector(`[data-todo-id="${CSS.escape(X)}"]`);if(!_)return;_.scrollIntoView({block:"nearest"}),_.classList.add("ring-2","ring-primary/60");const D=window.setTimeout(()=>{_.classList.remove("ring-2","ring-primary/60"),Y(V=>{const W=new URLSearchParams(V);return W.delete("focus"),W})},1500);return()=>window.clearTimeout(D)},[X,L.length,Y]),t?l.jsx(jt,{label:"Loading todos..."}):n?l.jsx(vt,{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(it,{label:"Open",value:O.open,icon:Sr}),l.jsx(it,{label:"In Progress",value:O.in_progress,icon:jv,tone:"info"}),l.jsx(it,{label:"Blocked",value:O.blocked,icon:il,tone:"warn"}),l.jsx(it,{label:"Completed",value:O.completed,icon:Sr,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:_=>N(_.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(_=>_.workspace!=="_global").map(_=>l.jsx("option",{value:_.workspace,children:_.workspace},_.workspace))]}),l.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:_=>v(_.target.value),onKeyDown:_=>_.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(lr,{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:c,type:"text",placeholder:"Search todos...",value:i,onChange:_=>a(_.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:_=>p(_.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:_=>m(_.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(_=>l.jsxs("option",{value:_,children:["#",_]},_))]})]}),L.length===0?l.jsx(Ge,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):l.jsx("div",{className:"space-y-1",children:L.map((_,D)=>l.jsxs("div",{"data-todo-id":_.id,...G(D),className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>E(_.workspace,_.id,_.status),children:[l.jsx(qw,{status:_.status,onChange:V=>H(_.workspace,_.id,V)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:`text-sm ${_.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:_.description}),_.tags.length>0&&l.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:_.tags.map(V=>`#${V}`).join(" ")})]}),l.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:_.workspace!=="_global"&&l.jsx(Ce,{to:`/w/${_.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:V=>V.stopPropagation(),children:_.workspace})}),k===_.id?l.jsxs("span",{className:"text-xs text-emerald-400 flex items-center gap-1",children:[l.jsx(Zf,{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=>S(V,_.id),children:["t:",_.id]}),l.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:V=>S(V,_.id),children:l.jsx(tp,{className:"h-3 w-3"})})]}),l.jsx("button",{onClick:()=>Z(_.workspace,_.id),className:"text-xs text-muted-foreground/40 hover:text-red-400 transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${_.workspace}-${_.id}`))})]})}function HI(){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 Mc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vs(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Qp(e){return"nodeType"in e}function Rn(e){var t,n;return e?Vs(e)?e:Qp(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Jp(e){const{Document:t}=Rn(e);return e instanceof t}function hl(e){return Vs(e)?!1:e instanceof Rn(e).HTMLElement}function Kw(e){return e instanceof Rn(e).SVGElement}function qs(e){return e?Vs(e)?e.document:Qp(e)?Jp(e)?e:hl(e)||Kw(e)?e.ownerDocument:document:document:document}const Rr=Mc?g.useLayoutEffect:g.useEffect;function Zp(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 WI(){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 Zi(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 rc(e){const t=Zp(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 Bf(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let uf={};function gl(e,t){return g.useMemo(()=>{if(t)return t;const n=uf[e]==null?0:uf[e]+1;return uf[e]=n,e+"-"+n},[e,t])}function Gw(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,c)=>{const d=Object.entries(c);for(const[p,h]of d){const m=a[p];m!=null&&(a[p]=m+e*h)}return a},{...t})}}const As=Gw(1),oc=Gw(-1);function VI(e){return"clientX"in e&&"clientY"in e}function eh(e){if(!e)return!1;const{KeyboardEvent:t}=Rn(e.target);return t&&e instanceof t}function qI(e){if(!e)return!1;const{TouchEvent:t}=Rn(e.target);return t&&e instanceof t}function Uf(e){if(qI(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 VI(e)?{x:e.clientX,y:e.clientY}:null}const el=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[el.Translate.toString(e),el.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),My="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function KI(e){return e.matches(My)?e:e.querySelector(My)}const GI={display:"none"};function YI(e){let{id:t,value:n}=e;return xt.createElement("div",{id:t,style:GI},n)}function XI(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 xt.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function QI(){const[e,t]=g.useState("");return{announce:g.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const Yw=g.createContext(null);function JI(e){const t=g.useContext(Yw);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function ZI(){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(c=>{var d;return(d=c[i])==null?void 0:d.call(c,a)})},[e]),t]}const eL={draggable:`
478
+ To pick up a draggable item, press the space bar.
479
+ While dragging, use the arrow keys to move the item.
480
+ Press space again to drop the item in its new position, or press escape to cancel.
481
+ `},tL={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 nL(e){let{announcements:t=tL,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=eL}=e;const{announce:a,announcement:c}=QI(),d=gl("DndLiveRegion"),[p,h]=g.useState(!1);if(g.useEffect(()=>{h(!0)},[]),JI(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=xt.createElement(xt.Fragment,null,xt.createElement(YI,{id:o,value:i.draggable}),xt.createElement(XI,{id:d,announcement:c}));return n?ko.createPortal(m,n):m}var At;(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"})(At||(At={}));function sc(){}function $y(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function rL(){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 oL(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function sL(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function iL(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function lL(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Fy(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 aL=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=Fy(t,t.left,t.top),a=[];for(const c of o){const{id:d}=c,p=n.get(d);if(p){const h=oL(Fy(p),i);a.push({id:d,data:{droppableContainer:c,value:h}})}}return a.sort(sL)};function cL(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),c=i-o,d=a-n;if(o<i&&n<a){const p=t.width*t.height,h=e.width*e.height,m=c*d,x=m/(p+h-m);return Number(x.toFixed(4))}return 0}const uL=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const a of o){const{id:c}=a,d=n.get(c);if(d){const p=cL(d,t);p>0&&i.push({id:c,data:{droppableContainer:a,value:p}})}}return i.sort(iL)};function dL(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Xw(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ur}function fL(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((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...n})}}const pL=fL(1);function hL(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 mL(e,t,n){const o=hL(t);if(!o)return e;const{scaleX:i,scaleY:a,x:c,y:d}=o,p=e.left-c-(1-i)*parseFloat(n),h=e.top-d-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),m=i?e.width/i:e.width,x=a?e.height/a:e.height;return{width:m,height:x,top:h,right:p+m,bottom:h+x,left:p}}const gL={ignoreTransform:!1};function Ks(e,t){t===void 0&&(t=gL);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:m}=Rn(e).getComputedStyle(e);h&&(n=mL(n,h,m))}const{top:o,left:i,width:a,height:c,bottom:d,right:p}=n;return{top:o,left:i,width:a,height:c,bottom:d,right:p}}function zy(e){return Ks(e,{ignoreTransform:!0})}function xL(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function yL(e,t){return t===void 0&&(t=Rn(e).getComputedStyle(e)),t.position==="fixed"}function vL(e,t){t===void 0&&(t=Rn(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 th(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(Jp(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!hl(i)||Kw(i)||n.includes(i))return n;const a=Rn(e).getComputedStyle(i);return i!==e&&vL(i,a)&&n.push(i),yL(i,a)?n:o(i.parentNode)}return e?o(e):n}function Qw(e){const[t]=th(e,1);return t??null}function df(e){return!Mc||!e?null:Vs(e)?e:Qp(e)?Jp(e)||e===qs(e).scrollingElement?window:hl(e)?e:null:null}function Jw(e){return Vs(e)?e.scrollX:e.scrollLeft}function Zw(e){return Vs(e)?e.scrollY:e.scrollTop}function Hf(e){return{x:Jw(e),y:Zw(e)}}var Bt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Bt||(Bt={}));function e1(e){return!Mc||!e?!1:e===document.scrollingElement}function t1(e){const t={x:0,y:0},n=e1(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,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:i,isLeft:a,isBottom:c,isRight:d,maxScroll:o,minScroll:t}}const bL={x:.2,y:.2};function wL(e,t,n,o,i){let{top:a,left:c,right:d,bottom:p}=n;o===void 0&&(o=10),i===void 0&&(i=bL);const{isTop:h,isBottom:m,isLeft:x,isRight:v}=t1(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=Bt.Backward,N.y=o*Math.abs((t.top+k.height-a)/k.height)):!m&&p>=t.bottom-k.height&&(b.y=Bt.Forward,N.y=o*Math.abs((t.bottom-k.height-p)/k.height)),!v&&d>=t.right-k.width?(b.x=Bt.Forward,N.x=o*Math.abs((t.right-k.width-d)/k.width)):!x&&c<=t.left+k.width&&(b.x=Bt.Backward,N.x=o*Math.abs((t.left+k.width-c)/k.width)),{direction:b,speed:N}}function kL(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:c}=window;return{top:0,left:0,right:a,bottom:c,width:a,height:c}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function n1(e){return e.reduce((t,n)=>As(t,Hf(n)),ur)}function jL(e){return e.reduce((t,n)=>t+Jw(n),0)}function SL(e){return e.reduce((t,n)=>t+Zw(n),0)}function CL(e,t){if(t===void 0&&(t=Ks),!e)return;const{top:n,left:o,bottom:i,right:a}=t(e);Qw(e)&&(i<=0||a<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const NL=[["x",["left","right"],jL],["y",["top","bottom"],SL]];class nh{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=th(n),i=n1(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,c,d]of NL)for(const p of c)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 Vi{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 EL(e){const{EventTarget:t}=Rn(e);return e instanceof t?e:qs(e)}function ff(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 Gn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Gn||(Gn={}));function By(e){e.preventDefault()}function RL(e){e.stopPropagation()}var Ve;(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"})(Ve||(Ve={}));const r1={start:[Ve.Space,Ve.Enter],cancel:[Ve.Esc],end:[Ve.Space,Ve.Enter,Ve.Tab]},PL=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ve.Right:return{...n,x:n.x+25};case Ve.Left:return{...n,x:n.x-25};case Ve.Down:return{...n,y:n.y+25};case Ve.Up:return{...n,y:n.y-25}}};class rh{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 Vi(qs(n)),this.windowListeners=new Vi(Rn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Gn.Resize,this.handleCancel),this.windowListeners.add(Gn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Gn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&CL(o),n(ur)}handleKeyDown(t){if(eh(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:a=r1,coordinateGetter:c=PL,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=c(t,{active:n,context:o.current,currentCoordinates:m});if(x){const v=oc(x,m),b={x:0,y:0},{scrollableAncestors:N}=o.current;for(const k of N){const j=t.code,{isTop:S,isRight:T,isLeft:A,isBottom:L,maxScroll:O,minScroll:P}=t1(k),$=kL(k),E={x:Math.min(j===Ve.Right?$.right-$.width/2:$.right,Math.max(j===Ve.Right?$.left:$.left+$.width/2,x.x)),y:Math.min(j===Ve.Down?$.bottom-$.height/2:$.bottom,Math.max(j===Ve.Down?$.top:$.top+$.height/2,x.y))},H=j===Ve.Right&&!T||j===Ve.Left&&!A,Z=j===Ve.Down&&!L||j===Ve.Up&&!S;if(H&&E.x!==x.x){const G=k.scrollLeft+v.x,q=j===Ve.Right&&G<=O.x||j===Ve.Left&&G>=P.x;if(q&&!v.y){k.scrollTo({left:G,behavior:d});return}q?b.x=k.scrollLeft-G:b.x=j===Ve.Right?k.scrollLeft-O.x:k.scrollLeft-P.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(Z&&E.y!==x.y){const G=k.scrollTop+v.y,q=j===Ve.Down&&G<=O.y||j===Ve.Up&&G>=P.y;if(q&&!v.x){k.scrollTo({top:G,behavior:d});return}q?b.y=k.scrollTop-G:b.y=j===Ve.Down?k.scrollTop-O.y:k.scrollTop-P.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,As(oc(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()}}rh.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=r1,onActivation:i}=t,{active:a}=n;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=a.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Uy(e){return!!(e&&"distance"in e)}function Hy(e){return!!(e&&"delay"in e)}class oh{constructor(t,n,o){var i;o===void 0&&(o=EL(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:c}=a;this.props=t,this.events=n,this.document=qs(c),this.documentListeners=new Vi(this.document),this.listeners=new Vi(o),this.windowListeners=new Vi(Rn(c)),this.initialCoordinates=(i=Uf(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(Gn.Resize,this.handleCancel),this.windowListeners.add(Gn.DragStart,By),this.windowListeners.add(Gn.VisibilityChange,this.handleCancel),this.windowListeners.add(Gn.ContextMenu,By),this.documentListeners.add(Gn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Hy(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Uy(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(Gn.Click,RL,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Gn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:a}=this,{onMove:c,options:{activationConstraint:d}}=a;if(!i)return;const p=(n=Uf(t))!=null?n:ur,h=oc(i,p);if(!o&&d){if(Uy(d)){if(d.tolerance!=null&&ff(h,d.tolerance))return this.handleCancel();if(ff(h,d.distance))return this.handleStart()}if(Hy(d)&&ff(h,d.tolerance))return this.handleCancel();this.handlePending(d,h);return}t.cancelable&&t.preventDefault(),c(p)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ve.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const TL={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class sh extends oh{constructor(t){const{event:n}=t,o=qs(n.target);super(t,TL,o)}}sh.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 AL={move:{name:"mousemove"},end:{name:"mouseup"}};var Wf;(function(e){e[e.RightClick=2]="RightClick"})(Wf||(Wf={}));class DL extends oh{constructor(t){super(t,AL,qs(t.event.target))}}DL.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===Wf.RightClick?!1:(o==null||o({event:n}),!0)}}];const pf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class IL extends oh{constructor(t){super(t,pf)}static setup(){return window.addEventListener(pf.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(pf.move.name,t)};function t(){}}}IL.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 qi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(qi||(qi={}));var ic;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ic||(ic={}));function LL(e){let{acceleration:t,activator:n=qi.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:c=5,order:d=ic.TreeOrder,pointerCoordinates:p,scrollableAncestors:h,scrollableAncestorRects:m,delta:x,threshold:v}=e;const b=_L({delta:x,disabled:!a}),[N,k]=WI(),j=g.useRef({x:0,y:0}),S=g.useRef({x:0,y:0}),T=g.useMemo(()=>{switch(n){case qi.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case qi.DraggableRect:return i}},[n,i,p]),A=g.useRef(null),L=g.useCallback(()=>{const P=A.current;if(!P)return;const $=j.current.x*S.current.x,E=j.current.y*S.current.y;P.scrollBy($,E)},[]),O=g.useMemo(()=>d===ic.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:H,speed:Z}=wL(P,E,T,t,v);for(const G of["x","y"])b[G][H[G]]||(Z[G]=0,H[G]=0);if(Z.x>0||Z.y>0){k(),A.current=P,N(L,c),j.current=Z,S.current=H;return}}j.current={x:0,y:0},S.current={x:0,y:0},k()},[t,L,o,k,a,c,JSON.stringify(T),JSON.stringify(b),N,h,O,m,JSON.stringify(v)])}const OL={x:{[Bt.Backward]:!1,[Bt.Forward]:!1},y:{[Bt.Backward]:!1,[Bt.Forward]:!1}};function _L(e){let{delta:t,disabled:n}=e;const o=Bf(t);return ml(i=>{if(n||!o||!i)return OL;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Bt.Backward]:i.x[Bt.Backward]||a.x===-1,[Bt.Forward]:i.x[Bt.Forward]||a.x===1},y:{[Bt.Backward]:i.y[Bt.Backward]||a.y===-1,[Bt.Forward]:i.y[Bt.Forward]||a.y===1}}},[n,t,o])}function ML(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 $L(e,t){return g.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,a=i.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,o)}));return[...n,...a]},[]),[e,t])}var tl;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(tl||(tl={}));var Vf;(function(e){e.Optimized="optimized"})(Vf||(Vf={}));const Wy=new Map;function FL(e,t){let{dragging:n,dependencies:o,config:i}=t;const[a,c]=g.useState(null),{frequency:d,measure:p,strategy:h}=i,m=g.useRef(e),x=j(),v=Zi(x),b=g.useCallback(function(S){S===void 0&&(S=[]),!v.current&&c(T=>T===null?S:T.concat(S.filter(A=>!T.includes(A))))},[v]),N=g.useRef(null),k=ml(S=>{if(x&&!n)return Wy;if(!S||S===Wy||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 L=A.node.current,O=L?new nh(p(L),L):null;A.rect.current=O,O&&T.set(A.id,O)}return T}return S},[e,a,n,x,p]);return g.useEffect(()=>{m.current=e},[e]),g.useEffect(()=>{x||b()},[n,x]),g.useEffect(()=>{a&&a.length>0&&c(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 j(){switch(h){case tl.Always:return!1;case tl.BeforeDragging:return n;default:return!n}}}function o1(e,t){return ml(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function zL(e,t){return o1(e,t)}function BL(e){let{callback:t,disabled:n}=e;const o=Zp(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 $c(e){let{callback:t,disabled:n}=e;const o=Zp(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 UL(e){return new nh(Ks(e),e)}function Vy(e,t,n){t===void 0&&(t=UL);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 c=BL({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=$c({callback:a});return Rr(()=>{a(),e?(d==null||d.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),c==null||c.disconnect())},[e]),o}function HL(e){const t=o1(e);return Xw(e,t)}const qy=[];function WL(e){const t=g.useRef(e),n=ml(o=>e?o&&o!==qy&&e&&t.current&&e.parentNode===t.current.parentNode?o:th(e):qy,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function VL(e){const[t,n]=g.useState(null),o=g.useRef(e),i=g.useCallback(a=>{const c=df(a.target);c&&n(d=>d?(d.set(c,Hf(c)),new Map(d)):null)},[]);return g.useEffect(()=>{const a=o.current;if(e!==a){c(a);const d=e.map(p=>{const h=df(p);return h?(h.addEventListener("scroll",i,{passive:!0}),[h,Hf(h)]):null}).filter(p=>p!=null);n(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(a)};function c(d){d.forEach(p=>{const h=df(p);h==null||h.removeEventListener("scroll",i)})}},[i,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,c)=>As(a,c),ur):n1(e):ur,[e,t])}function Ky(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?oc(e,n.current):ur}function qL(e){g.useEffect(()=>{if(!Mc)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 KL(e,t){return g.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:a}=o;return n[i]=c=>{a(c,t)},n},{}),[e,t])}function s1(e){return g.useMemo(()=>e?xL(e):null,[e])}const Gy=[];function GL(e,t){t===void 0&&(t=Ks);const[n]=e,o=s1(n?Rn(n):null),[i,a]=g.useState(Gy);function c(){a(()=>e.length?e.map(p=>e1(p)?o:new nh(t(p),p)):Gy)}const d=$c({callback:c});return Rr(()=>{d==null||d.disconnect(),c(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function YL(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return hl(t)?t:e}function XL(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=$c({callback:i}),c=g.useCallback(h=>{const m=YL(h);a==null||a.disconnect(),m&&(a==null||a.observe(m)),o(m?t(m):null)},[t,a]),[d,p]=rc(c);return g.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const QL=[{sensor:sh,options:{}},{sensor:rh,options:{}}],JL={current:{}},Va={draggable:{measure:zy},droppable:{measure:zy,strategy:tl.WhileDragging,frequency:Vf.Optimized},dragOverlay:{measure:Ks}};class Ki 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 ZL={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ki,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:sc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Va,measureDroppableContainers:sc,windowRect:null,measuringScheduled:!1},eO={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:sc,draggableNodes:new Map,over:null,measureDroppableContainers:sc},Fc=g.createContext(eO),i1=g.createContext(ZL);function tO(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ki}}}function nO(e,t){switch(t.type){case At.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case At.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 At.DragEnd:case At.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case At.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new Ki(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case At.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||o!==a.key)return e;const c=new Ki(e.droppable.containers);return c.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:c}}}case At.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const a=new Ki(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function rO(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=g.useContext(Fc),a=Bf(o),c=Bf(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!o&&a&&c!=null){if(!eh(a)||document.activeElement===a.target)return;const d=i.get(c);if(!d)return;const{activatorNode:p,node:h}=d;if(!p.current&&!h.current)return;requestAnimationFrame(()=>{for(const m of[p.current,h.current]){if(!m)continue;const x=KI(m);if(x){x.focus();break}}})}},[o,t,i,c,a]),null}function oO(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...o}),n):n}function sO(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 iO(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const a=g.useRef(!1),{x:c,y:d}=typeof i=="boolean"?{x:i,y:i}:i;Rr(()=>{if(!c&&!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=Xw(m,o);if(c||(x.x=0),d||(x.y=0),a.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const v=Qw(h);v&&v.scrollBy({top:x.y,left:x.x})}},[t,c,d,o,n])}const l1=g.createContext({...ur,scaleX:1,scaleY:1});var wo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(wo||(wo={}));const lO=g.memo(function(t){var n,o,i,a;let{id:c,accessibility:d,autoScroll:p=!0,children:h,sensors:m=QL,collisionDetection:x=uL,measuring:v,modifiers:b,...N}=t;const k=g.useReducer(nO,void 0,tO),[j,S]=k,[T,A]=ZI(),[L,O]=g.useState(wo.Uninitialized),P=L===wo.Initialized,{draggable:{active:$,nodes:E,translate:H},droppable:{containers:Z}}=j,G=$!=null?E.get($):null,q=g.useRef({initial:null,translated:null}),Y=g.useMemo(()=>{var Fe;return $!=null?{id:$,data:(Fe=G==null?void 0:G.data)!=null?Fe:JL,rect:q}:null},[$,G]),X=g.useRef(null),[_,D]=g.useState(null),[V,W]=g.useState(null),ee=Zi(N,Object.values(N)),R=gl("DndDescribedBy",c),F=g.useMemo(()=>Z.getEnabled(),[Z]),J=sO(v),{droppableRects:I,measureDroppableContainers:de,measuringScheduled:ve}=FL(F,{dragging:P,dependencies:[H.x,H.y],config:J.droppable}),fe=ML(E,$),Ee=g.useMemo(()=>V?Uf(V):null,[V]),Ne=dt(),Re=zL(fe,J.draggable.measure);iO({activeNode:$!=null?E.get($):null,config:Ne.layoutShiftCompensation,initialRect:Re,measure:J.draggable.measure});const je=Vy(fe,J.draggable.measure,Re),ut=Vy(fe?fe.parentElement:null),tt=g.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:Z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=Z.getNodeFor((n=tt.current.over)==null?void 0:n.id),Be=XL({measure:J.dragOverlay.measure}),St=(o=Be.nodeRef.current)!=null?o:fe,Ot=P?(i=Be.rect)!=null?i:je:null,cn=!!(Be.nodeRef.current&&Be.rect),hn=HL(cn?null:je),Xe=s1(St?Rn(St):null),nt=WL(P?Ue??fe:null),Wt=GL(nt),Qt=oO(b,{transform:{x:H.x-hn.x,y:H.y-hn.y,scaleX:1,scaleY:1},activatorEvent:V,active:Y,activeNodeRect:je,containerNodeRect:ut,draggingNodeRect:Ot,over:tt.current.over,overlayNodeRect:Be.rect,scrollableAncestors:nt,scrollableAncestorRects:Wt,windowRect:Xe}),mn=Ee?As(Ee,H):null,Pn=VL(nt),Tn=Ky(Pn),re=Ky(Pn,[je]),le=As(Qt,Tn),pe=Ot?pL(Ot,Qt):null,ne=Y&&pe?x({active:Y,collisionRect:pe,droppableRects:I,droppableContainers:F,pointerCoordinates:mn}):null,me=lL(ne,"id"),[ke,_t]=g.useState(null),Jt=cn?Qt:As(Qt,re),Vt=dL(Jt,(a=ke==null?void 0:ke.rect)!=null?a:null,je),U=g.useRef(null),ae=g.useCallback((Fe,Ye)=>{let{sensor:bt,options:Mt}=Ye;if(X.current==null)return;const qt=E.get(X.current);if(!qt)return;const en=Fe.nativeEvent,gn=new bt({active:X.current,activeNode:qt,event:en,options:Mt,context:tt,onAbort(ft){if(!E.get(ft))return;const{onDragAbort:tn}=ee.current,Qn={id:ft};tn==null||tn(Qn),T({type:"onDragAbort",event:Qn})},onPending(ft,Bn,tn,Qn){if(!E.get(ft))return;const{onDragPending:pr}=ee.current,An={id:ft,constraint:Bn,initialCoordinates:tn,offset:Qn};pr==null||pr(An),T({type:"onDragPending",event:An})},onStart(ft){const Bn=X.current;if(Bn==null)return;const tn=E.get(Bn);if(!tn)return;const{onDragStart:Qn}=ee.current,Jn={activatorEvent:en,active:{id:Bn,data:tn.data,rect:q}};ko.unstable_batchedUpdates(()=>{Qn==null||Qn(Jn),O(wo.Initializing),S({type:At.DragStart,initialCoordinates:ft,active:Bn}),T({type:"onDragStart",event:Jn}),D(U.current),W(en)})},onMove(ft){S({type:At.DragMove,coordinates:ft})},onEnd:Ar(At.DragEnd),onCancel:Ar(At.DragCancel)});U.current=gn;function Ar(ft){return async function(){const{active:tn,collisions:Qn,over:Jn,scrollAdjustedTranslate:pr}=tt.current;let An=null;if(tn&&pr){const{cancelDrop:Dr}=ee.current;An={activatorEvent:en,active:tn,collisions:Qn,delta:pr,over:Jn},ft===At.DragEnd&&typeof Dr=="function"&&await Promise.resolve(Dr(An))&&(ft=At.DragCancel)}X.current=null,ko.unstable_batchedUpdates(()=>{S({type:ft}),O(wo.Uninitialized),_t(null),D(null),W(null),U.current=null;const Dr=ft===At.DragEnd?"onDragEnd":"onDragCancel";if(An){const Gs=ee.current[Dr];Gs==null||Gs(An),T({type:Dr,event:An})}})}}},[E]),ge=g.useCallback((Fe,Ye)=>(bt,Mt)=>{const qt=bt.nativeEvent,en=E.get(Mt);if(X.current!==null||!en||qt.dndKit||qt.defaultPrevented)return;const gn={active:en};Fe(bt,Ye.options,gn)===!0&&(qt.dndKit={capturedBy:Ye.sensor},X.current=Mt,ae(bt,Ye))},[E,ae]),Oe=$L(m,ge);qL(m),Rr(()=>{je&&L===wo.Initializing&&O(wo.Initialized)},[je,L]),g.useEffect(()=>{const{onDragMove:Fe}=ee.current,{active:Ye,activatorEvent:bt,collisions:Mt,over:qt}=tt.current;if(!Ye||!bt)return;const en={active:Ye,activatorEvent:bt,collisions:Mt,delta:{x:le.x,y:le.y},over:qt};ko.unstable_batchedUpdates(()=>{Fe==null||Fe(en),T({type:"onDragMove",event:en})})},[le.x,le.y]),g.useEffect(()=>{const{active:Fe,activatorEvent:Ye,collisions:bt,droppableContainers:Mt,scrollAdjustedTranslate:qt}=tt.current;if(!Fe||X.current==null||!Ye||!qt)return;const{onDragOver:en}=ee.current,gn=Mt.get(me),Ar=gn&&gn.rect.current?{id:gn.id,rect:gn.rect.current,data:gn.data,disabled:gn.disabled}:null,ft={active:Fe,activatorEvent:Ye,collisions:bt,delta:{x:qt.x,y:qt.y},over:Ar};ko.unstable_batchedUpdates(()=>{_t(Ar),en==null||en(ft),T({type:"onDragOver",event:ft})})},[me]),Rr(()=>{tt.current={activatorEvent:V,active:Y,activeNode:fe,collisionRect:pe,collisions:ne,droppableRects:I,draggableNodes:E,draggingNode:St,draggingNodeRect:Ot,droppableContainers:Z,over:ke,scrollableAncestors:nt,scrollAdjustedTranslate:le},q.current={initial:Ot,translated:pe}},[Y,fe,ne,pe,E,St,Ot,I,Z,ke,nt,le]),LL({...Ne,delta:H,draggingRect:pe,pointerCoordinates:mn,scrollableAncestors:nt,scrollableAncestorRects:Wt});const zn=g.useMemo(()=>({active:Y,activeNode:fe,activeNodeRect:je,activatorEvent:V,collisions:ne,containerNodeRect:ut,dragOverlay:Be,draggableNodes:E,droppableContainers:Z,droppableRects:I,over:ke,measureDroppableContainers:de,scrollableAncestors:nt,scrollableAncestorRects:Wt,measuringConfiguration:J,measuringScheduled:ve,windowRect:Xe}),[Y,fe,je,V,ne,ut,Be,E,Z,I,ke,de,nt,Wt,J,ve,Xe]),Zt=g.useMemo(()=>({activatorEvent:V,activators:Oe,active:Y,activeNodeRect:je,ariaDescribedById:{draggable:R},dispatch:S,draggableNodes:E,over:ke,measureDroppableContainers:de}),[V,Oe,Y,je,S,R,E,ke,de]);return xt.createElement(Yw.Provider,{value:A},xt.createElement(Fc.Provider,{value:Zt},xt.createElement(i1.Provider,{value:zn},xt.createElement(l1.Provider,{value:Vt},h)),xt.createElement(rO,{disabled:(d==null?void 0:d.restoreFocus)===!1})),xt.createElement(nL,{...d,hiddenTextDescribedById:R}));function dt(){const Fe=(_==null?void 0:_.autoScrollEnabled)===!1,Ye=typeof p=="object"?p.enabled===!1:p===!1,bt=P&&!Fe&&!Ye;return typeof p=="object"?{...p,enabled:bt}:{enabled:bt}}}),aO=g.createContext(null),Yy="button",cO="Draggable";function uO(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const a=gl(cO),{activators:c,activatorEvent:d,active:p,activeNodeRect:h,ariaDescribedById:m,draggableNodes:x,over:v}=g.useContext(Fc),{role:b=Yy,roleDescription:N="draggable",tabIndex:k=0}=i??{},j=(p==null?void 0:p.id)===t,S=g.useContext(j?l1:aO),[T,A]=rc(),[L,O]=rc(),P=KL(c,t),$=Zi(n);Rr(()=>(x.set(t,{id:t,key:a,node:T,activatorNode:L,data:$}),()=>{const H=x.get(t);H&&H.key===a&&x.delete(t)}),[x,t]);const E=g.useMemo(()=>({role:b,tabIndex:k,"aria-disabled":o,"aria-pressed":j&&b===Yy?!0:void 0,"aria-roledescription":N,"aria-describedby":m.draggable}),[o,b,k,j,N,m.draggable]);return{active:p,activatorEvent:d,activeNodeRect:h,attributes:E,isDragging:j,listeners:o?void 0:P,node:T,over:v,setNodeRef:A,setActivatorNodeRef:O,transform:S}}function dO(){return g.useContext(i1)}const fO="Droppable",pO={timeout:25};function hO(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const a=gl(fO),{active:c,dispatch:d,over:p,measureDroppableContainers:h}=g.useContext(Fc),m=g.useRef({disabled:n}),x=g.useRef(!1),v=g.useRef(null),b=g.useRef(null),{disabled:N,updateMeasurementsFor:k,timeout:j}={...pO,...i},S=Zi(k??o),T=g.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{h(Array.isArray(S.current)?S.current:[S.current]),b.current=null},j)},[j]),A=$c({callback:T,disabled:N||!c}),L=g.useCallback((E,H)=>{A&&(H&&(A.unobserve(H),x.current=!1),E&&A.observe(E))},[A]),[O,P]=rc(L),$=Zi(t);return g.useEffect(()=>{!A||!O.current||(A.disconnect(),x.current=!1,A.observe(O.current))},[O,A]),g.useEffect(()=>(d({type:At.RegisterDroppable,element:{id:o,key:a,disabled:n,node:O,rect:v,data:$}}),()=>d({type:At.UnregisterDroppable,key:a,id:o})),[o]),g.useEffect(()=>{n!==m.current.disabled&&(d({type:At.SetDroppableDisabled,id:o,key:a,disabled:n}),m.current.disabled=n)},[o,a,n,d]),{active:c,rect:v,isOver:(p==null?void 0:p.id)===o,node:O,over:p,setNodeRef:P}}function ih(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function mO(e,t){return e.reduce((n,o,i)=>{const a=t.get(o);return a&&(n[i]=a),n},Array(e.length))}function La(e){return e!==null&&e>=0}function gO(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 xO(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const a1=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const a=ih(t,o,n),c=t[i],d=a[i];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},Oa={scaleX:1,scaleY:1},yO=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:a,overIndex:c}=e;const d=(t=a[n])!=null?t:o;if(!d)return null;if(i===n){const h=a[c];return h?{x:0,y:n<c?h.top+h.height-(d.top+d.height):h.top-d.top,...Oa}:null}const p=vO(a,i,n);return i>n&&i<=c?{x:0,y:-d.height-p,...Oa}:i<n&&i>=c?{x:0,y:d.height+p,...Oa}:{x:0,y:0,...Oa}};function vO(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 c1="Sortable",u1=xt.createContext({activeIndex:-1,containerId:c1,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:a1,disabled:{draggable:!1,droppable:!1}});function bO(e){let{children:t,id:n,items:o,strategy:i=a1,disabled:a=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:h,measureDroppableContainers:m}=dO(),x=gl(c1,n),v=d.rect!==null,b=g.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),N=c!=null,k=c?b.indexOf(c.id):-1,j=h?b.indexOf(h.id):-1,S=g.useRef(b),T=!gO(b,S.current),A=j!==-1&&k===-1||T,L=xO(a);Rr(()=>{T&&N&&m(b)},[T,b,N,m]),g.useEffect(()=>{S.current=b},[b]);const O=g.useMemo(()=>({activeIndex:k,containerId:x,disabled:L,disableTransforms:A,items:b,overIndex:j,useDragOverlay:v,sortedRects:mO(b,p),strategy:i}),[k,x,L.draggable,L.droppable,A,b,j,p,v,i]);return xt.createElement(u1.Provider,{value:O},t)}const wO=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return ih(n,o,i).indexOf(t)},kO=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:a,newIndex:c,previousItems:d,previousContainerId:p,transition:h}=e;return!h||!o||d!==a&&i===c?!1:n?!0:c!==i&&t===p},jO={duration:200,easing:"ease"},d1="transform",SO=el.Transition.toString({property:d1,duration:0,easing:"linear"}),CO={roleDescription:"sortable"};function NO(e){let{disabled:t,index:n,node:o,rect:i}=e;const[a,c]=g.useState(null),d=g.useRef(n);return Rr(()=>{if(!t&&n!==d.current&&o.current){const p=i.current;if(p){const h=Ks(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)&&c(m)}}n!==d.current&&(d.current=n)},[t,n,o,i]),g.useEffect(()=>{a&&c(null)},[a]),a}function EO(e){let{animateLayoutChanges:t=kO,attributes:n,disabled:o,data:i,getNewIndex:a=wO,id:c,strategy:d,resizeObserverConfig:p,transition:h=jO}=e;const{items:m,containerId:x,activeIndex:v,disabled:b,disableTransforms:N,sortedRects:k,overIndex:j,useDragOverlay:S,strategy:T}=g.useContext(u1),A=RO(o,b),L=m.indexOf(c),O=g.useMemo(()=>({sortable:{containerId:x,index:L,items:m},...i}),[x,i,L,m]),P=g.useMemo(()=>m.slice(m.indexOf(c)),[m,c]),{rect:$,node:E,isOver:H,setNodeRef:Z}=hO({id:c,data:O,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...p}}),{active:G,activatorEvent:q,activeNodeRect:Y,attributes:X,setNodeRef:_,listeners:D,isDragging:V,over:W,setActivatorNodeRef:ee,transform:R}=uO({id:c,data:O,attributes:{...CO,...n},disabled:A.draggable}),F=HI(Z,_),J=!!G,I=J&&!N&&La(v)&&La(j),de=!S&&V,ve=de&&I?R:null,Ee=I?ve??(d??T)({rects:k,activeNodeRect:Y,activeIndex:v,overIndex:j,index:L}):null,Ne=La(v)&&La(j)?a({id:c,items:m,activeIndex:v,overIndex:j}):L,Re=G==null?void 0:G.id,je=g.useRef({activeId:Re,items:m,newIndex:Ne,containerId:x}),ut=m!==je.current.items,tt=t({active:G,containerId:x,isDragging:V,isSorting:J,id:c,index:L,items:m,newIndex:je.current.newIndex,previousItems:je.current.items,previousContainerId:je.current.containerId,transition:h,wasDragging:je.current.activeId!=null}),Ue=NO({disabled:!tt,index:L,node:E,rect:$});return g.useEffect(()=>{J&&je.current.newIndex!==Ne&&(je.current.newIndex=Ne),x!==je.current.containerId&&(je.current.containerId=x),m!==je.current.items&&(je.current.items=m)},[J,Ne,x,m]),g.useEffect(()=>{if(Re===je.current.activeId)return;if(Re!=null&&je.current.activeId==null){je.current.activeId=Re;return}const St=setTimeout(()=>{je.current.activeId=Re},50);return()=>clearTimeout(St)},[Re]),{active:G,activeIndex:v,attributes:X,data:O,rect:$,index:L,newIndex:Ne,items:m,isOver:H,isSorting:J,isDragging:V,listeners:D,node:E,overIndex:j,over:W,setNodeRef:F,setActivatorNodeRef:ee,setDroppableNodeRef:Z,setDraggableNodeRef:_,transform:Ue??Ee,transition:Be()};function Be(){if(Ue||ut&&je.current.newIndex===L)return SO;if(!(de&&!eh(q)||!h)&&(J||tt))return el.Transition.toString({...h,property:d1})}}function RO(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}}Ve.Down,Ve.Right,Ve.Up,Ve.Left;function PO({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,disabled:a,hotkeyRowProps:c}){const{attributes:d,listeners:p,setNodeRef:h,setActivatorNodeRef:m,transform:x,transition:v,isDragging:b}=EO({id:e.id,disabled:a}),N={transform:el.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,...c??{},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(fC,{className:"h-4 w-4"})}),l.jsx(qw,{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(Zf,{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(tp,{className:"h-3 w-3"})})]})]})}function TO(){const{workspace:e}=Et(),t=e||"_global",{data:n,loading:o,error:i,refetch:a}=EN(t),[c,d]=g.useState(""),[p,h]=g.useState(""),[m,x]=g.useState(""),[v,b]=g.useState(""),[N,k]=g.useState(null),j=g.useRef(null);zs("list:todos");const S=!!(c.trim()||p||m),T=rL($y(sh,{activationConstraint:{distance:8}}),$y(rh));function A(D,V){D.stopPropagation(),navigator.clipboard.writeText(V),k(V),setTimeout(()=>k(W=>W===V?null:W),1500)}const L=g.useMemo(()=>{if(!(n!=null&&n.items))return[];const D=new Set;for(const V of n.items)for(const W of V.tags)D.add(W);return Array.from(D).sort()},[n]),O=g.useMemo(()=>{if(!(n!=null&&n.items))return[];let D=n.items;if(c.trim()){const V=c.toLowerCase();D=D.filter(W=>W.description.toLowerCase().includes(V)||W.tags.some(ee=>ee.toLowerCase().includes(V))||W.id.includes(V))}return p&&(D=D.filter(V=>V.status===p)),m&&(D=D.filter(V=>V.tags.includes(m))),D},[n,c,p,m]);async function P(){v.trim()&&(await qv(t,v.trim()),b(""),a())}const $={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function E(D,V){H(D,$[V]||"open")}async function H(D,V){switch(V){case"open":await Xv(t,D);break;case"in_progress":await Yv(t,D);break;case"completed":await Kv(t,D);break;case"blocked":await Gv(t,D);break}a()}const{hotkeyRowProps:Z}=yc(O,{scope:"list:todos",bindO:!1,onOpen:D=>E(D.id,D.status)});yt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var D;return(D=j.current)==null?void 0:D.focus()}}),yt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>a()});const[G,q]=_s(),Y=G.get("focus");g.useEffect(()=>{if(!Y)return;const D=document.querySelector(`[data-todo-id="${window.CSS.escape(Y)}"]`);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(W=>{const ee=new URLSearchParams(W);return ee.delete("focus"),ee})},1500);return()=>window.clearTimeout(V)},[Y,O.length,q]);async function X(D){const{active:V,over:W}=D;if(!W||V.id===W.id||!(n!=null&&n.items))return;const ee=n.items.findIndex(J=>J.id===V.id),R=n.items.findIndex(J=>J.id===W.id);if(ee===-1||R===-1)return;const F=ih(n.items,ee,R);await RN(t,F.map(J=>J.id)),a()}if(o)return l.jsx(jt,{label:"Loading todos..."});if(i)return l.jsx(vt,{error:i});const _=(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(it,{label:"Open",value:_.open,icon:Sr}),l.jsx(it,{label:"In Progress",value:_.in_progress,icon:Sr,tone:"info"}),l.jsx(it,{label:"Blocked",value:_.blocked,icon:il,tone:"warn"}),l.jsx(it,{label:"Total",value:_.total,icon:Sr})]}),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(lr,{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:j,type:"text",placeholder:"Search...",value:c,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"})]}),L.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"}),L.map(D=>l.jsxs("option",{value:D,children:["#",D]},D))]})]}),O.length===0?l.jsx(Ge,{title:"No todos",description:"Add your first todo above."}):l.jsx(lO,{sensors:T,collisionDetection:aL,onDragEnd:X,children:l.jsx(bO,{items:O.map(D=>D.id),strategy:yO,children:l.jsx("div",{className:"space-y-1",children:O.map((D,V)=>l.jsx(PO,{item:D,copiedId:N,onCycleStatus:E,onStatusChange:H,onCopyId:A,disabled:S,hotkeyRowProps:Z(V)},D.id))})})})]})}function AO(){return l.jsx(MS,{children:l.jsx(TE,{children:l.jsx(fS,{children:l.jsxs(Le,{element:l.jsx(_E,{}),children:[l.jsx(Le,{path:"/",element:l.jsx(FE,{})}),l.jsx(Le,{path:"/projects",element:l.jsx(Sx,{})}),l.jsx(Le,{path:"/assignments",element:l.jsx(Ry,{})}),l.jsx(Le,{path:"/assignments/:id",element:l.jsx(hI,{})}),l.jsx(Le,{path:"/assignments/:id/edit",element:l.jsx(rf,{})}),l.jsx(Le,{path:"/assignments/:id/plan/edit",element:l.jsx(of,{})}),l.jsx(Le,{path:"/assignments/:id/scratchpad/edit",element:l.jsx(sf,{})}),l.jsx(Le,{path:"/assignments/:id/handoff/edit",element:l.jsx(lf,{})}),l.jsx(Le,{path:"/assignments/:id/decision-record/edit",element:l.jsx(af,{})}),l.jsx(Le,{path:"/attention",element:l.jsx(zE,{})}),l.jsx(Le,{path:"/servers",element:l.jsx(Iy,{})}),l.jsx(Le,{path:"/agent-sessions",element:l.jsx(Ly,{})}),l.jsx(Le,{path:"/playbooks",element:l.jsx(LI,{})}),l.jsx(Le,{path:"/playbooks/create",element:l.jsx(_I,{})}),l.jsx(Le,{path:"/playbooks/:slug",element:l.jsx(OI,{})}),l.jsx(Le,{path:"/playbooks/:slug/edit",element:l.jsx(MI,{})}),l.jsx(Le,{path:"/todos",element:l.jsx(UI,{})}),l.jsx(Le,{path:"/help",element:l.jsx(UE,{})}),l.jsx(Le,{path:"/settings",element:l.jsx(BI,{})}),l.jsx(Le,{path:"/create/project",element:l.jsx(Ty,{})}),l.jsx(Le,{path:"/projects/:slug",element:l.jsx(fy,{})}),l.jsx(Le,{path:"/projects/:slug/edit",element:l.jsx(Dy,{})}),l.jsx(Le,{path:"/projects/:slug/create/assignment",element:l.jsx(Ay,{})}),l.jsx(Le,{path:"/projects/:slug/assignments/:aslug",element:l.jsx(Sy,{})}),l.jsx(Le,{path:"/projects/:slug/assignments/:aslug/edit",element:l.jsx(rf,{})}),l.jsx(Le,{path:"/projects/:slug/assignments/:aslug/plan/edit",element:l.jsx(of,{})}),l.jsx(Le,{path:"/projects/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(sf,{})}),l.jsx(Le,{path:"/projects/:slug/assignments/:aslug/handoff/edit",element:l.jsx(lf,{})}),l.jsx(Le,{path:"/projects/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(af,{})}),l.jsx(Le,{path:"/w/:workspace/projects",element:l.jsx(Sx,{})}),l.jsx(Le,{path:"/w/:workspace/assignments",element:l.jsx(Ry,{})}),l.jsx(Le,{path:"/w/:workspace/servers",element:l.jsx(Iy,{})}),l.jsx(Le,{path:"/w/:workspace/agent-sessions",element:l.jsx(Ly,{})}),l.jsx(Le,{path:"/w/:workspace/todos",element:l.jsx(TO,{})}),l.jsx(Le,{path:"/w/:workspace/create/project",element:l.jsx(Ty,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug",element:l.jsx(fy,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug/edit",element:l.jsx(Dy,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug/create/assignment",element:l.jsx(Ay,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug",element:l.jsx(Sy,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/edit",element:l.jsx(rf,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/plan/edit",element:l.jsx(of,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/scratchpad/edit",element:l.jsx(sf,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/handoff/edit",element:l.jsx(lf,{})}),l.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/decision-record/edit",element:l.jsx(af,{})})]})})})})}gN();fj.createRoot(document.getElementById("root")).render(l.jsx(g.StrictMode,{children:l.jsx(xN,{children:l.jsx(AO,{})})}));export{PR as _,DO as a,lc as g};