dreamcontext 0.5.3 → 0.6.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 (109) hide show
  1. package/LICENSE +201 -21
  2. package/NOTICE +7 -0
  3. package/README.md +77 -12
  4. package/agents/dreamcontext-explore.md +1 -1
  5. package/agents/sleep-product.md +29 -8
  6. package/agents/sleep-tasks.md +44 -9
  7. package/dist/agents/dreamcontext-explore.md +1 -1
  8. package/dist/agents/sleep-product.md +29 -8
  9. package/dist/agents/sleep-tasks.md +44 -9
  10. package/dist/dashboard/assets/{BrainCanvas3D-1HMiA14F.js → BrainCanvas3D-LLqVeXtb.js} +1 -1
  11. package/dist/dashboard/assets/{_baseUniq-C7pfRmXz.js → _baseUniq-DW0uA0ty.js} +1 -1
  12. package/dist/dashboard/assets/{arc-B5x_GF9Q.js → arc-fVUGtlbL.js} +1 -1
  13. package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-CWmjaqno.js → architectureDiagram-Q4EWVU46-Dz2PKBsS.js} +1 -1
  14. package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-B7SyUIdV.js → blockDiagram-DXYQGD6D-ByWKxzhL.js} +1 -1
  15. package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-OeJBWXHU.js → c4Diagram-AHTNJAMY-dpHsVM3D.js} +1 -1
  16. package/dist/dashboard/assets/channel-zrLwggBX.js +1 -0
  17. package/dist/dashboard/assets/{chunk-4BX2VUAB-2Oop1B0M.js → chunk-4BX2VUAB-HEXb6Yg5.js} +1 -1
  18. package/dist/dashboard/assets/{chunk-4TB4RGXK-Bh7qSu_X.js → chunk-4TB4RGXK-DeVy5g6H.js} +1 -1
  19. package/dist/dashboard/assets/{chunk-55IACEB6-gNeHRO_i.js → chunk-55IACEB6-DGy3ZgDZ.js} +1 -1
  20. package/dist/dashboard/assets/{chunk-EDXVE4YY-BRniAH53.js → chunk-EDXVE4YY-CYJehjz4.js} +1 -1
  21. package/dist/dashboard/assets/{chunk-FMBD7UC4-B5r8U2gJ.js → chunk-FMBD7UC4-DKTOmvgZ.js} +1 -1
  22. package/dist/dashboard/assets/{chunk-OYMX7WX6-Dd1c17fm.js → chunk-OYMX7WX6-mmtWyiDA.js} +1 -1
  23. package/dist/dashboard/assets/{chunk-QZHKN3VN-BIw-OdTn.js → chunk-QZHKN3VN-DSdV0iwY.js} +1 -1
  24. package/dist/dashboard/assets/{chunk-YZCP3GAM-Dl9MlwCW.js → chunk-YZCP3GAM-DbY-KoDn.js} +1 -1
  25. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BvejNiwH.js +1 -0
  26. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BvejNiwH.js +1 -0
  27. package/dist/dashboard/assets/clone-BFVdml6g.js +1 -0
  28. package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-DlrROH5K.js → cose-bilkent-S5V4N54A-p0t1DY88.js} +1 -1
  29. package/dist/dashboard/assets/{dagre-KV5264BT-B0GpPXKL.js → dagre-KV5264BT-DYE0WzHM.js} +1 -1
  30. package/dist/dashboard/assets/{diagram-5BDNPKRD-BBYcDW2Z.js → diagram-5BDNPKRD-D9EiQCOP.js} +1 -1
  31. package/dist/dashboard/assets/{diagram-G4DWMVQ6-BxHxugdp.js → diagram-G4DWMVQ6-poDXSAfu.js} +1 -1
  32. package/dist/dashboard/assets/{diagram-MMDJMWI5-C9Jc19Wo.js → diagram-MMDJMWI5-CHZ7wgN1.js} +1 -1
  33. package/dist/dashboard/assets/{diagram-TYMM5635-Vmo5GAAU.js → diagram-TYMM5635-DVk6fYG7.js} +1 -1
  34. package/dist/dashboard/assets/{erDiagram-SMLLAGMA-pskr9x-V.js → erDiagram-SMLLAGMA-D2sqkGin.js} +1 -1
  35. package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-B1D7Ky0W.js → flowDiagram-DWJPFMVM-DrMlKBYA.js} +1 -1
  36. package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-BVJZZV1M.js → ganttDiagram-T4ZO3ILL-Cf4FbEFp.js} +1 -1
  37. package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-BiOGN6We.js → gitGraphDiagram-UUTBAWPF-BsbOq1C9.js} +1 -1
  38. package/dist/dashboard/assets/{graph-D58deEXr.js → graph-CUxxgCtS.js} +1 -1
  39. package/dist/dashboard/assets/index-CqSkXBSu.css +1 -0
  40. package/dist/dashboard/assets/index-flRpQtDj.js +476 -0
  41. package/dist/dashboard/assets/{infoDiagram-42DDH7IO-DgJYg1X1.js → infoDiagram-42DDH7IO-DTkMnZiD.js} +1 -1
  42. package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-arJgr-8P.js → ishikawaDiagram-UXIWVN3A-CahQ348K.js} +1 -1
  43. package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-B3DCvb8p.js → journeyDiagram-VCZTEJTY-BDY2Nslc.js} +1 -1
  44. package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-B--dN6Ma.js → kanban-definition-6JOO6SKY-CgrwoTjI.js} +1 -1
  45. package/dist/dashboard/assets/{layout-z2qEbZWC.js → layout-IaUxkFkm.js} +1 -1
  46. package/dist/dashboard/assets/{linear-BQu1dwrM.js → linear-shc0iNFn.js} +1 -1
  47. package/dist/dashboard/assets/{min-DkF5b2sh.js → min-BIL7YgTN.js} +1 -1
  48. package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-Bw04koyq.js → mindmap-definition-QFDTVHPH-GmO0JRtA.js} +1 -1
  49. package/dist/dashboard/assets/{pieDiagram-DEJITSTG-vNqz64o8.js → pieDiagram-DEJITSTG-Bfm_toYA.js} +1 -1
  50. package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-TuVP5Gi6.js → quadrantDiagram-34T5L4WZ-DIjTM3lm.js} +1 -1
  51. package/dist/dashboard/assets/{requirementDiagram-MS252O5E-D3mS8_ke.js → requirementDiagram-MS252O5E-B9AEoGYh.js} +1 -1
  52. package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-BmVRers6.js → sankeyDiagram-XADWPNL6-C_O5XLXm.js} +1 -1
  53. package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-CTYCgk5P.js → sequenceDiagram-FGHM5R23-CHSxSvmJ.js} +1 -1
  54. package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-DNbP2aCg.js → stateDiagram-FHFEXIEX-B0URrhHw.js} +1 -1
  55. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-FdAb9MBo.js +1 -0
  56. package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-DKHJd4z8.js → timeline-definition-GMOUNBTQ-CycU2gVC.js} +1 -1
  57. package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-ChotNMNq.js → vennDiagram-DHZGUBPP-DcU2536G.js} +1 -1
  58. package/dist/dashboard/assets/{wardley-RL74JXVD-Dmo2_ksP.js → wardley-RL74JXVD-BWqqaX3S.js} +1 -1
  59. package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-Z6Wbiv2H.js → wardleyDiagram-NUSXRM2D-CUnIHJgd.js} +1 -1
  60. package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-BJa0AHtN.js → xychartDiagram-5P7HB3ND-b9fcOYTj.js} +1 -1
  61. package/dist/dashboard/index.html +2 -2
  62. package/dist/dashboard/media/README.md +29 -0
  63. package/dist/dashboard/media/brain-hero.png +0 -0
  64. package/dist/dashboard/media/brain.mp4 +0 -0
  65. package/dist/dashboard/media/brain.webm +0 -0
  66. package/dist/dashboard/media/shot-disabled.png +0 -0
  67. package/dist/dashboard/media/shot-enabled.png +0 -0
  68. package/dist/index.js +3408 -2051
  69. package/dist/skill-packs/catalog.json +44 -0
  70. package/dist/skill-packs/excalidraw/SKILL.md +123 -0
  71. package/dist/skill-packs/excalidraw/examples/hello.spec.json +14 -0
  72. package/dist/skill-packs/excalidraw/examples/sample.png +0 -0
  73. package/dist/skill-packs/excalidraw/examples/style_board.js +31 -0
  74. package/dist/skill-packs/excalidraw/package.json +5 -0
  75. package/dist/skill-packs/excalidraw/reference/format.md +93 -0
  76. package/dist/skill-packs/excalidraw/scripts/build_excalidraw.js +357 -0
  77. package/dist/skill-packs/excalidraw/scripts/lib/fractional-indexing.LICENSE +121 -0
  78. package/dist/skill-packs/excalidraw/scripts/lib/fractional-indexing.js +311 -0
  79. package/dist/skill-packs/excalidraw/scripts/lib/imagesize.js +65 -0
  80. package/dist/skill-packs/excalidraw/scripts/lib/style.js +130 -0
  81. package/dist/skill-packs/video-watching/SKILL.md +151 -0
  82. package/dist/skill-packs/video-watching/scripts/build_frame_index.py +95 -0
  83. package/dist/skill-packs/video-watching/scripts/gap_fill.py +45 -0
  84. package/dist/skill-packs/video-watching/scripts/transcribe.sh +136 -0
  85. package/package.json +4 -2
  86. package/skill/SKILL.md +5 -0
  87. package/skill-packs/catalog.json +44 -0
  88. package/skill-packs/excalidraw/SKILL.md +123 -0
  89. package/skill-packs/excalidraw/examples/hello.spec.json +14 -0
  90. package/skill-packs/excalidraw/examples/sample.png +0 -0
  91. package/skill-packs/excalidraw/examples/style_board.js +31 -0
  92. package/skill-packs/excalidraw/package.json +5 -0
  93. package/skill-packs/excalidraw/reference/format.md +93 -0
  94. package/skill-packs/excalidraw/scripts/build_excalidraw.js +357 -0
  95. package/skill-packs/excalidraw/scripts/lib/fractional-indexing.LICENSE +121 -0
  96. package/skill-packs/excalidraw/scripts/lib/fractional-indexing.js +311 -0
  97. package/skill-packs/excalidraw/scripts/lib/imagesize.js +65 -0
  98. package/skill-packs/excalidraw/scripts/lib/style.js +130 -0
  99. package/skill-packs/video-watching/SKILL.md +151 -0
  100. package/skill-packs/video-watching/scripts/build_frame_index.py +95 -0
  101. package/skill-packs/video-watching/scripts/gap_fill.py +45 -0
  102. package/skill-packs/video-watching/scripts/transcribe.sh +136 -0
  103. package/dist/dashboard/assets/channel-CbuTKKsM.js +0 -1
  104. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-HXl3A_sM.js +0 -1
  105. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-HXl3A_sM.js +0 -1
  106. package/dist/dashboard/assets/clone-NKHOtdi8.js +0 -1
  107. package/dist/dashboard/assets/index-DK_2-eWY.css +0 -1
  108. package/dist/dashboard/assets/index-Ds-JXWtr.js +0 -476
  109. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-CfN6kjo8.js +0 -1
@@ -0,0 +1,476 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-DYE0WzHM.js","assets/graph-CUxxgCtS.js","assets/_baseUniq-DW0uA0ty.js","assets/layout-IaUxkFkm.js","assets/min-BIL7YgTN.js","assets/clone-BFVdml6g.js","assets/cose-bilkent-S5V4N54A-p0t1DY88.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-dpHsVM3D.js","assets/chunk-YZCP3GAM-DbY-KoDn.js","assets/flowDiagram-DWJPFMVM-DrMlKBYA.js","assets/chunk-FMBD7UC4-DKTOmvgZ.js","assets/chunk-55IACEB6-DGy3ZgDZ.js","assets/chunk-EDXVE4YY-CYJehjz4.js","assets/channel-zrLwggBX.js","assets/erDiagram-SMLLAGMA-D2sqkGin.js","assets/gitGraphDiagram-UUTBAWPF-BsbOq1C9.js","assets/chunk-4BX2VUAB-HEXb6Yg5.js","assets/chunk-QZHKN3VN-DSdV0iwY.js","assets/wardley-RL74JXVD-BWqqaX3S.js","assets/ganttDiagram-T4ZO3ILL-Cf4FbEFp.js","assets/linear-shc0iNFn.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-DTkMnZiD.js","assets/pieDiagram-DEJITSTG-Bfm_toYA.js","assets/arc-fVUGtlbL.js","assets/quadrantDiagram-34T5L4WZ-DIjTM3lm.js","assets/xychartDiagram-5P7HB3ND-b9fcOYTj.js","assets/requirementDiagram-MS252O5E-B9AEoGYh.js","assets/sequenceDiagram-FGHM5R23-CHSxSvmJ.js","assets/classDiagram-6PBFFD2Q-BvejNiwH.js","assets/chunk-4TB4RGXK-DeVy5g6H.js","assets/classDiagram-v2-HSJHXN6E-BvejNiwH.js","assets/stateDiagram-FHFEXIEX-B0URrhHw.js","assets/chunk-OYMX7WX6-mmtWyiDA.js","assets/stateDiagram-v2-QKLJ7IA2-FdAb9MBo.js","assets/journeyDiagram-VCZTEJTY-BDY2Nslc.js","assets/timeline-definition-GMOUNBTQ-CycU2gVC.js","assets/mindmap-definition-QFDTVHPH-GmO0JRtA.js","assets/kanban-definition-6JOO6SKY-CgrwoTjI.js","assets/diagram-TYMM5635-DVk6fYG7.js","assets/diagram-MMDJMWI5-CHZ7wgN1.js","assets/blockDiagram-DXYQGD6D-ByWKxzhL.js","assets/diagram-5BDNPKRD-D9EiQCOP.js","assets/architectureDiagram-Q4EWVU46-Dz2PKBsS.js","assets/diagram-G4DWMVQ6-poDXSAfu.js","assets/wardleyDiagram-NUSXRM2D-CUnIHJgd.js"])))=>i.map(i=>d[i]);
2
+ var _6=Object.defineProperty;var O_=i=>{throw TypeError(i)};var w6=(i,e,r)=>e in i?_6(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var Ht=(i,e,r)=>w6(i,typeof e!="symbol"?e+"":e,r),S0=(i,e,r)=>e.has(i)||O_("Cannot "+r);var Z=(i,e,r)=>(S0(i,e,"read from private field"),r?r.call(i):e.get(i)),Ut=(i,e,r)=>e.has(i)?O_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,r),Mt=(i,e,r,n)=>(S0(i,e,"write to private field"),n?n.call(i,r):e.set(i,r),r),he=(i,e,r)=>(S0(i,e,"access private method"),r);var rp=(i,e,r,n)=>({set _(a){Mt(i,e,a,r)},get _(){return Z(i,e,n)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function qg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Rrt(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var e=i.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var a=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return i[n]}})}),r}var T0={exports:{}},hu={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var R_;function S6(){if(R_)return hu;R_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var h in a)h!=="key"&&(o[h]=a[h])}else o=a;return a=o.ref,{$$typeof:i,type:n,key:c,ref:a!==void 0?a:null,props:o}}return hu.Fragment=e,hu.jsx=r,hu.jsxs=r,hu}var D_;function T6(){return D_||(D_=1,T0.exports=S6()),T0.exports}var x=T6(),B0={exports:{}},ne={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var F_;function B6(){if(F_)return ne;F_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function y(H){return H===null||typeof H!="object"?null:(H=b&&H[b]||H["@@iterator"],typeof H=="function"?H:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function w(H,tt,ot){this.props=H,this.context=tt,this.refs=_,this.updater=ot||v}w.prototype.isReactComponent={},w.prototype.setState=function(H,tt){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,tt,"setState")},w.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function T(){}T.prototype=w.prototype;function B(H,tt,ot){this.props=H,this.context=tt,this.refs=_,this.updater=ot||v}var E=B.prototype=new T;E.constructor=B,C(E,w.prototype),E.isPureReactComponent=!0;var N=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function G(H,tt,ot){var st=ot.ref;return{$$typeof:i,type:H,key:tt,ref:st!==void 0?st:null,props:ot}}function $(H,tt){return G(H.type,tt,H.props)}function z(H){return typeof H=="object"&&H!==null&&H.$$typeof===i}function K(H){var tt={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(ot){return tt[ot]})}var W=/\/+/g;function D(H,tt){return typeof H=="object"&&H!==null&&H.key!=null?K(""+H.key):tt.toString(36)}function U(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(O,O):(H.status="pending",H.then(function(tt){H.status==="pending"&&(H.status="fulfilled",H.value=tt)},function(tt){H.status==="pending"&&(H.status="rejected",H.reason=tt)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function R(H,tt,ot,st,bt){var kt=typeof H;(kt==="undefined"||kt==="boolean")&&(H=null);var Lt=!1;if(H===null)Lt=!0;else switch(kt){case"bigint":case"string":case"number":Lt=!0;break;case"object":switch(H.$$typeof){case i:case e:Lt=!0;break;case p:return Lt=H._init,R(Lt(H._payload),tt,ot,st,bt)}}if(Lt)return bt=bt(H),Lt=st===""?"."+D(H,0):st,N(bt)?(ot="",Lt!=null&&(ot=Lt.replace(W,"$&/")+"/"),R(bt,tt,ot,"",function(gt){return gt})):bt!=null&&(z(bt)&&(bt=$(bt,ot+(bt.key==null||H&&H.key===bt.key?"":(""+bt.key).replace(W,"$&/")+"/")+Lt)),tt.push(bt)),1;Lt=0;var at=st===""?".":st+":";if(N(H))for(var Ct=0;Ct<H.length;Ct++)st=H[Ct],kt=at+D(st,Ct),Lt+=R(st,tt,ot,kt,bt);else if(Ct=y(H),typeof Ct=="function")for(H=Ct.call(H),Ct=0;!(st=H.next()).done;)st=st.value,kt=at+D(st,Ct++),Lt+=R(st,tt,ot,kt,bt);else if(kt==="object"){if(typeof H.then=="function")return R(U(H),tt,ot,st,bt);throw tt=String(H),Error("Objects are not valid as a React child (found: "+(tt==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":tt)+"). If you meant to render a collection of children, use an array instead.")}return Lt}function I(H,tt,ot){if(H==null)return H;var st=[],bt=0;return R(H,st,"","",function(kt){return tt.call(ot,kt,bt++)}),st}function P(H){if(H._status===-1){var tt=H._result;tt=tt(),tt.then(function(ot){(H._status===0||H._status===-1)&&(H._status=1,H._result=ot)},function(ot){(H._status===0||H._status===-1)&&(H._status=2,H._result=ot)}),H._status===-1&&(H._status=0,H._result=tt)}if(H._status===1)return H._result.default;throw H._result}var V=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var tt=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(tt))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},J={map:I,forEach:function(H,tt,ot){I(H,function(){tt.apply(this,arguments)},ot)},count:function(H){var tt=0;return I(H,function(){tt++}),tt},toArray:function(H){return I(H,function(tt){return tt})||[]},only:function(H){if(!z(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return ne.Activity=g,ne.Children=J,ne.Component=w,ne.Fragment=r,ne.Profiler=a,ne.PureComponent=B,ne.StrictMode=n,ne.Suspense=u,ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,ne.__COMPILER_RUNTIME={__proto__:null,c:function(H){return M.H.useMemoCache(H)}},ne.cache=function(H){return function(){return H.apply(null,arguments)}},ne.cacheSignal=function(){return null},ne.cloneElement=function(H,tt,ot){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var st=C({},H.props),bt=H.key;if(tt!=null)for(kt in tt.key!==void 0&&(bt=""+tt.key),tt)!j.call(tt,kt)||kt==="key"||kt==="__self"||kt==="__source"||kt==="ref"&&tt.ref===void 0||(st[kt]=tt[kt]);var kt=arguments.length-2;if(kt===1)st.children=ot;else if(1<kt){for(var Lt=Array(kt),at=0;at<kt;at++)Lt[at]=arguments[at+2];st.children=Lt}return G(H.type,bt,st)},ne.createContext=function(H){return H={$$typeof:c,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:o,_context:H},H},ne.createElement=function(H,tt,ot){var st,bt={},kt=null;if(tt!=null)for(st in tt.key!==void 0&&(kt=""+tt.key),tt)j.call(tt,st)&&st!=="key"&&st!=="__self"&&st!=="__source"&&(bt[st]=tt[st]);var Lt=arguments.length-2;if(Lt===1)bt.children=ot;else if(1<Lt){for(var at=Array(Lt),Ct=0;Ct<Lt;Ct++)at[Ct]=arguments[Ct+2];bt.children=at}if(H&&H.defaultProps)for(st in Lt=H.defaultProps,Lt)bt[st]===void 0&&(bt[st]=Lt[st]);return G(H,kt,bt)},ne.createRef=function(){return{current:null}},ne.forwardRef=function(H){return{$$typeof:h,render:H}},ne.isValidElement=z,ne.lazy=function(H){return{$$typeof:p,_payload:{_status:-1,_result:H},_init:P}},ne.memo=function(H,tt){return{$$typeof:f,type:H,compare:tt===void 0?null:tt}},ne.startTransition=function(H){var tt=M.T,ot={};M.T=ot;try{var st=H(),bt=M.S;bt!==null&&bt(ot,st),typeof st=="object"&&st!==null&&typeof st.then=="function"&&st.then(O,V)}catch(kt){V(kt)}finally{tt!==null&&ot.types!==null&&(tt.types=ot.types),M.T=tt}},ne.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},ne.use=function(H){return M.H.use(H)},ne.useActionState=function(H,tt,ot){return M.H.useActionState(H,tt,ot)},ne.useCallback=function(H,tt){return M.H.useCallback(H,tt)},ne.useContext=function(H){return M.H.useContext(H)},ne.useDebugValue=function(){},ne.useDeferredValue=function(H,tt){return M.H.useDeferredValue(H,tt)},ne.useEffect=function(H,tt){return M.H.useEffect(H,tt)},ne.useEffectEvent=function(H){return M.H.useEffectEvent(H)},ne.useId=function(){return M.H.useId()},ne.useImperativeHandle=function(H,tt,ot){return M.H.useImperativeHandle(H,tt,ot)},ne.useInsertionEffect=function(H,tt){return M.H.useInsertionEffect(H,tt)},ne.useLayoutEffect=function(H,tt){return M.H.useLayoutEffect(H,tt)},ne.useMemo=function(H,tt){return M.H.useMemo(H,tt)},ne.useOptimistic=function(H,tt){return M.H.useOptimistic(H,tt)},ne.useReducer=function(H,tt,ot){return M.H.useReducer(H,tt,ot)},ne.useRef=function(H){return M.H.useRef(H)},ne.useState=function(H){return M.H.useState(H)},ne.useSyncExternalStore=function(H,tt,ot){return M.H.useSyncExternalStore(H,tt,ot)},ne.useTransition=function(){return M.H.useTransition()},ne.version="19.2.4",ne}var $_;function xv(){return $_||($_=1,B0.exports=B6()),B0.exports}var X=xv();const A6=qg(X);var A0={exports:{}},uu={},E0={exports:{}},M0={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var z_;function E6(){return z_||(z_=1,(function(i){function e(R,I){var P=R.length;R.push(I);t:for(;0<P;){var V=P-1>>>1,J=R[V];if(0<a(J,I))R[V]=I,R[P]=J,P=V;else break t}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var I=R[0],P=R.pop();if(P!==I){R[0]=P;t:for(var V=0,J=R.length,H=J>>>1;V<H;){var tt=2*(V+1)-1,ot=R[tt],st=tt+1,bt=R[st];if(0>a(ot,P))st<J&&0>a(bt,ot)?(R[V]=bt,R[st]=P,V=st):(R[V]=ot,R[tt]=P,V=tt);else if(st<J&&0>a(bt,P))R[V]=bt,R[st]=P,V=st;else break t}}return I}function a(R,I){var P=R.sortIndex-I.sortIndex;return P!==0?P:R.id-I.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;i.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();i.unstable_now=function(){return c.now()-h}}var u=[],f=[],p=1,g=null,b=3,y=!1,v=!1,C=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function E(R){for(var I=r(f);I!==null;){if(I.callback===null)n(f);else if(I.startTime<=R)n(f),I.sortIndex=I.expirationTime,e(u,I);else break;I=r(f)}}function N(R){if(C=!1,E(R),!v)if(r(u)!==null)v=!0,O||(O=!0,K());else{var I=r(f);I!==null&&U(N,I.startTime-R)}}var O=!1,M=-1,j=5,G=-1;function $(){return _?!0:!(i.unstable_now()-G<j)}function z(){if(_=!1,O){var R=i.unstable_now();G=R;var I=!0;try{t:{v=!1,C&&(C=!1,T(M),M=-1),y=!0;var P=b;try{e:{for(E(R),g=r(u);g!==null&&!(g.expirationTime>R&&$());){var V=g.callback;if(typeof V=="function"){g.callback=null,b=g.priorityLevel;var J=V(g.expirationTime<=R);if(R=i.unstable_now(),typeof J=="function"){g.callback=J,E(R),I=!0;break e}g===r(u)&&n(u),E(R)}else n(u);g=r(u)}if(g!==null)I=!0;else{var H=r(f);H!==null&&U(N,H.startTime-R),I=!1}}break t}finally{g=null,b=P,y=!1}I=void 0}}finally{I?K():O=!1}}}var K;if(typeof B=="function")K=function(){B(z)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,D=W.port2;W.port1.onmessage=z,K=function(){D.postMessage(null)}}else K=function(){w(z,0)};function U(R,I){M=w(function(){R(i.unstable_now())},I)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(R){R.callback=null},i.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<R?Math.floor(1e3/R):5},i.unstable_getCurrentPriorityLevel=function(){return b},i.unstable_next=function(R){switch(b){case 1:case 2:case 3:var I=3;break;default:I=b}var P=b;b=I;try{return R()}finally{b=P}},i.unstable_requestPaint=function(){_=!0},i.unstable_runWithPriority=function(R,I){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var P=b;b=R;try{return I()}finally{b=P}},i.unstable_scheduleCallback=function(R,I,P){var V=i.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?V+P:V):P=V,R){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=P+J,R={id:p++,callback:I,priorityLevel:R,startTime:P,expirationTime:J,sortIndex:-1},P>V?(R.sortIndex=P,e(f,R),r(u)===null&&R===r(f)&&(C?(T(M),M=-1):C=!0,U(N,P-V))):(R.sortIndex=J,e(u,R),v||y||(v=!0,O||(O=!0,K()))),R},i.unstable_shouldYield=$,i.unstable_wrapCallback=function(R){var I=b;return function(){var P=b;b=I;try{return R.apply(this,arguments)}finally{b=P}}}})(M0)),M0}var I_;function M6(){return I_||(I_=1,E0.exports=E6()),E0.exports}var L0={exports:{}},Ji={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var q_;function L6(){if(q_)return Ji;q_=1;var i=xv();function e(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(u,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:u,containerInfo:f,implementation:p}}var c=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Ji.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Ji.createPortal=function(u,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return o(u,f,null,p)},Ji.flushSync=function(u){var f=c.T,p=n.p;try{if(c.T=null,n.p=2,u)return u()}finally{c.T=f,n.p=p,n.d.f()}},Ji.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,n.d.C(u,f))},Ji.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},Ji.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?n.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:y}):p==="script"&&n.d.X(u,{crossOrigin:g,integrity:b,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Ji.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=h(f.as,f.crossOrigin);n.d.M(u,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&n.d.M(u)},Ji.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin);n.d.L(u,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Ji.preloadModule=function(u,f){if(typeof u=="string")if(f){var p=h(f.as,f.crossOrigin);n.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else n.d.m(u)},Ji.requestFormReset=function(u){n.d.r(u)},Ji.unstable_batchedUpdates=function(u,f){return u(f)},Ji.useFormState=function(u,f,p){return c.H.useFormState(u,f,p)},Ji.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ji.version="19.2.4",Ji}var P_;function N6(){if(P_)return L0.exports;P_=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),L0.exports=L6(),L0.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var H_;function j6(){if(H_)return uu;H_=1;var i=M6(),e=xv(),r=N6();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function c(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function h(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(n(188))}function f(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(n(188));return l!==s?null:s}for(var d=s,m=l;;){var k=d.return;if(k===null)break;var S=k.alternate;if(S===null){if(m=k.return,m!==null){d=m;continue}break}if(k.child===S.child){for(S=k.child;S;){if(S===d)return u(k),s;if(S===m)return u(k),l;S=S.sibling}throw Error(n(188))}if(d.return!==m.return)d=k,m=S;else{for(var L=!1,q=k.child;q;){if(q===d){L=!0,d=k,m=S;break}if(q===m){L=!0,m=k,d=S;break}q=q.sibling}if(!L){for(q=S.child;q;){if(q===d){L=!0,d=S,m=k;break}if(q===m){L=!0,m=S,d=k;break}q=q.sibling}if(!L)throw Error(n(189))}}if(d.alternate!==m)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?s:l}function p(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=p(s),l!==null)return l;s=s.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),B=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function K(s){return s===null||typeof s!="object"?null:(s=z&&s[z]||s["@@iterator"],typeof s=="function"?s:null)}var W=Symbol.for("react.client.reference");function D(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===W?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case C:return"Fragment";case w:return"Profiler";case _:return"StrictMode";case N:return"Suspense";case O:return"SuspenseList";case G:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case v:return"Portal";case B:return s.displayName||"Context";case T:return(s._context.displayName||"Context")+".Consumer";case E:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case M:return l=s.displayName||null,l!==null?l:D(s.type)||"Memo";case j:l=s._payload,s=s._init;try{return D(s(l))}catch{}}return null}var U=Array.isArray,R=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},V=[],J=-1;function H(s){return{current:s}}function tt(s){0>J||(s.current=V[J],V[J]=null,J--)}function ot(s,l){J++,V[J]=s.current,s.current=l}var st=H(null),bt=H(null),kt=H(null),Lt=H(null);function at(s,l){switch(ot(kt,l),ot(bt,s),ot(st,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?r_(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=r_(l),s=n_(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}tt(st),ot(st,s)}function Ct(){tt(st),tt(bt),tt(kt)}function gt(s){s.memoizedState!==null&&ot(Lt,s);var l=st.current,d=n_(l,s.type);l!==d&&(ot(bt,s),ot(st,d))}function Bt(s){bt.current===s&&(tt(st),tt(bt)),Lt.current===s&&(tt(Lt),su._currentValue=P)}var Wt,Yt;function Zt(s){if(Wt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);Wt=l&&l[1]||"",Yt=-1<d.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+Wt+s+Yt}var Et=!1;function Vt(s,l){if(!s||Et)return"";Et=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var vt=function(){throw Error()};if(Object.defineProperty(vt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(vt,[])}catch(dt){var ht=dt}Reflect.construct(s,[],vt)}else{try{vt.call()}catch(dt){ht=dt}s.call(vt.prototype)}}else{try{throw Error()}catch(dt){ht=dt}(vt=s())&&typeof vt.catch=="function"&&vt.catch(function(){})}}catch(dt){if(dt&&ht&&typeof dt.stack=="string")return[dt.stack,ht.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var k=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");k&&k.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=m.DetermineComponentFrameRoot(),L=S[0],q=S[1];if(L&&q){var Q=L.split(`
45
+ `),ct=q.split(`
46
+ `);for(k=m=0;m<Q.length&&!Q[m].includes("DetermineComponentFrameRoot");)m++;for(;k<ct.length&&!ct[k].includes("DetermineComponentFrameRoot");)k++;if(m===Q.length||k===ct.length)for(m=Q.length-1,k=ct.length-1;1<=m&&0<=k&&Q[m]!==ct[k];)k--;for(;1<=m&&0<=k;m--,k--)if(Q[m]!==ct[k]){if(m!==1||k!==1)do if(m--,k--,0>k||Q[m]!==ct[k]){var yt=`
47
+ `+Q[m].replace(" at new "," at ");return s.displayName&&yt.includes("<anonymous>")&&(yt=yt.replace("<anonymous>",s.displayName)),yt}while(1<=m&&0<=k);break}}}finally{Et=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?Zt(d):""}function Se(s,l){switch(s.tag){case 26:case 27:case 5:return Zt(s.type);case 16:return Zt("Lazy");case 13:return s.child!==l&&l!==null?Zt("Suspense Fallback"):Zt("Suspense");case 19:return Zt("SuspenseList");case 0:case 15:return Vt(s.type,!1);case 11:return Vt(s.type.render,!1);case 1:return Vt(s.type,!0);case 31:return Zt("Activity");default:return""}}function ni(s){try{var l="",d=null;do l+=Se(s,d),d=s,s=s.return;while(s);return l}catch(m){return`
48
+ Error generating stack: `+m.message+`
49
+ `+m.stack}}var Ii=Object.prototype.hasOwnProperty,ue=i.unstable_scheduleCallback,ke=i.unstable_cancelCallback,De=i.unstable_shouldYield,Ni=i.unstable_requestPaint,Pe=i.unstable_now,or=i.unstable_getCurrentPriorityLevel,Gn=i.unstable_ImmediatePriority,Jr=i.unstable_UserBlockingPriority,Fr=i.unstable_NormalPriority,Yn=i.unstable_LowPriority,lr=i.unstable_IdlePriority,Mo=i.log,$l=i.unstable_setDisableYieldValue,Zi=null,Si=null;function $r(s){if(typeof Mo=="function"&&$l(s),Si&&typeof Si.setStrictMode=="function")try{Si.setStrictMode(Zi,s)}catch{}}var mi=Math.clz32?Math.clz32:Vn,vs=Math.log,_r=Math.LN2;function Vn(s){return s>>>=0,s===0?32:31-(vs(s)/_r|0)|0}var Xn=256,Qn=262144,Cs=4194304;function zr(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Zn(s,l,d){var m=s.pendingLanes;if(m===0)return 0;var k=0,S=s.suspendedLanes,L=s.pingedLanes;s=s.warmLanes;var q=m&134217727;return q!==0?(m=q&~S,m!==0?k=zr(m):(L&=q,L!==0?k=zr(L):d||(d=q&~s,d!==0&&(k=zr(d))))):(q=m&~S,q!==0?k=zr(q):L!==0?k=zr(L):d||(d=m&~s,d!==0&&(k=zr(d)))),k===0?0:l!==0&&l!==k&&(l&S)===0&&(S=k&-k,d=l&-l,S>=d||S===32&&(d&4194048)!==0)?l:k}function Cn(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Kn(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ks(){var s=Cs;return Cs<<=1,(Cs&62914560)===0&&(Cs=4194304),s}function _s(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function Fe(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Jn(s,l,d,m,k,S){var L=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var q=s.entanglements,Q=s.expirationTimes,ct=s.hiddenUpdates;for(d=L&~d;0<d;){var yt=31-mi(d),vt=1<<yt;q[yt]=0,Q[yt]=-1;var ht=ct[yt];if(ht!==null)for(ct[yt]=null,yt=0;yt<ht.length;yt++){var dt=ht[yt];dt!==null&&(dt.lane&=-536870913)}d&=~vt}m!==0&&ws(s,m,0),S!==0&&k===0&&s.tag!==0&&(s.suspendedLanes|=S&~(L&~l))}function ws(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var m=31-mi(l);s.entangledLanes|=l,s.entanglements[m]=s.entanglements[m]|1073741824|d&261930}function Ss(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var m=31-mi(d),k=1<<m;k&l|s[m]&l&&(s[m]|=l),d&=~k}}function kn(s,l){var d=l&-l;return d=(d&42)!==0?1:Ts(d),(d&(s.suspendedLanes|l))!==0?0:d}function Ts(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Bs(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function _n(){var s=I.p;return s!==0?s:(s=window.event,s===void 0?32:B_(s.type))}function Ki(s,l){var d=I.p;try{return I.p=s,l()}finally{I.p=d}}var ji=Math.random().toString(36).slice(2),ai="__reactFiber$"+ji,yi="__reactProps$"+ji,wn="__reactContainer$"+ji,ta="__reactEvents$"+ji,ea="__reactListeners$"+ji,As="__reactHandles$"+ji,cr="__reactResources$"+ji,ia="__reactMarker$"+ji;function Es(s){delete s[ai],delete s[yi],delete s[ta],delete s[ea],delete s[As]}function ra(s){var l=s[ai];if(l)return l;for(var d=s.parentNode;d;){if(l=d[wn]||d[ai]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=u_(s);s!==null;){if(d=s[ai])return d;s=u_(s)}return l}s=d,d=s.parentNode}return null}function tn(s){if(s=s[ai]||s[wn]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Sn(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function qi(s){var l=s[cr];return l||(l=s[cr]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function He(s){s[ia]=!0}var Ot=new Set,Y={};function mt(s,l){At(s,l),At(s+"Capture",l)}function At(s,l){for(Y[s]=l,s=0;s<l.length;s++)Ot.add(l[s])}var ye=RegExp("^[: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]*$"),se={},Me={};function Pi(s){return Ii.call(Me,s)?!0:Ii.call(se,s)?!1:ye.test(s)?Me[s]=!0:(se[s]=!0,!1)}function Oi(s,l,d){if(Pi(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var m=l.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function Xe(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function Ri(s,l,d,m){if(m===null)s.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+m)}}function we(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Tn(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Ma(s,l,d){var m=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var k=m.get,S=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return k.call(this)},set:function(L){d=""+L,S.call(this,L)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function(L){d=""+L},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function Ms(s){if(!s._valueTracker){var l=Tn(s)?"checked":"value";s._valueTracker=Ma(s,l,""+s[l])}}function Ch(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return s&&(m=Tn(s)?s.checked?"true":"false":s.value),s=m,s!==d?(l.setValue(s),!0):!1}function Lo(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var kh=/[\n"\\]/g;function hr(s){return s.replace(kh,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function na(s,l,d,m,k,S,L,q){s.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?s.type=L:s.removeAttribute("type"),l!=null?L==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+we(l)):s.value!==""+we(l)&&(s.value=""+we(l)):L!=="submit"&&L!=="reset"||s.removeAttribute("value"),l!=null?wt(s,L,we(l)):d!=null?wt(s,L,we(d)):m!=null&&s.removeAttribute("value"),k==null&&S!=null&&(s.defaultChecked=!!S),k!=null&&(s.checked=k&&typeof k!="function"&&typeof k!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?s.name=""+we(q):s.removeAttribute("name")}function ut(s,l,d,m,k,S,L,q){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.type=S),l!=null||d!=null){if(!(S!=="submit"&&S!=="reset"||l!=null)){Ms(s);return}d=d!=null?""+we(d):"",l=l!=null?""+we(l):d,q||l===s.value||(s.value=l),s.defaultValue=l}m=m??k,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=q?s.checked:!!m,s.defaultChecked=!!m,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(s.name=L),Ms(s)}function wt(s,l,d){l==="number"&&Lo(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function St(s,l,d,m){if(s=s.options,l){l={};for(var k=0;k<d.length;k++)l["$"+d[k]]=!0;for(d=0;d<s.length;d++)k=l.hasOwnProperty("$"+s[d].value),s[d].selected!==k&&(s[d].selected=k),k&&m&&(s[d].defaultSelected=!0)}else{for(d=""+we(d),l=null,k=0;k<s.length;k++){if(s[k].value===d){s[k].selected=!0,m&&(s[k].defaultSelected=!0);return}l!==null||s[k].disabled||(l=s[k])}l!==null&&(l.selected=!0)}}function Nt(s,l,d){if(l!=null&&(l=""+we(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+we(d):""}function fe(s,l,d,m){if(l==null){if(m!=null){if(d!=null)throw Error(n(92));if(U(m)){if(1<m.length)throw Error(n(93));m=m[0]}d=m}d==null&&(d=""),l=d}d=we(l),s.defaultValue=d,m=s.textContent,m===d&&m!==""&&m!==null&&(s.value=m),Ms(s)}function _e(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var $e=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xi(s,l,d){var m=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?m?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":m?s.setProperty(l,d):typeof d!="number"||d===0||$e.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function La(s,l,d){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,d!=null){for(var m in d)!d.hasOwnProperty(m)||l!=null&&l.hasOwnProperty(m)||(m.indexOf("--")===0?s.setProperty(m,""):m==="float"?s.cssFloat="":s[m]="");for(var k in l)m=l[k],l.hasOwnProperty(k)&&d[k]!==m&&xi(s,k,m)}else for(var S in l)l.hasOwnProperty(S)&&xi(s,S,l[S])}function Bn(s){if(s.indexOf("-")===-1)return!1;switch(s){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 Gf=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Yf=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Vf(s){return Yf.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Na(){}var km=null;function _m(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var zl=null,Il=null;function iC(s){var l=tn(s);if(l&&(s=l.stateNode)){var d=s[yi]||null;t:switch(s=l.stateNode,l.type){case"input":if(na(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+hr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==s&&m.form===s.form){var k=m[yi]||null;if(!k)throw Error(n(90));na(m,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name)}}for(l=0;l<d.length;l++)m=d[l],m.form===s.form&&Ch(m)}break t;case"textarea":Nt(s,d.value,d.defaultValue);break t;case"select":l=d.value,l!=null&&St(s,!!d.multiple,l,!1)}}}var wm=!1;function rC(s,l,d){if(wm)return s(l,d);wm=!0;try{var m=s(l);return m}finally{if(wm=!1,(zl!==null||Il!==null)&&(Rd(),zl&&(l=zl,s=Il,Il=zl=null,iC(l),s)))for(l=0;l<s.length;l++)iC(s[l])}}function _h(s,l){var d=s.stateNode;if(d===null)return null;var m=d[yi]||null;if(m===null)return null;d=m[l];t:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break t;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(n(231,l,typeof d));return d}var ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sm=!1;if(ja)try{var wh={};Object.defineProperty(wh,"passive",{get:function(){Sm=!0}}),window.addEventListener("test",wh,wh),window.removeEventListener("test",wh,wh)}catch{Sm=!1}var Ls=null,Tm=null,Xf=null;function nC(){if(Xf)return Xf;var s,l=Tm,d=l.length,m,k="value"in Ls?Ls.value:Ls.textContent,S=k.length;for(s=0;s<d&&l[s]===k[s];s++);var L=d-s;for(m=1;m<=L&&l[d-m]===k[S-m];m++);return Xf=k.slice(s,1<m?1-m:void 0)}function Qf(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function Zf(){return!0}function aC(){return!1}function wr(s){function l(d,m,k,S,L){this._reactName=d,this._targetInst=k,this.type=m,this.nativeEvent=S,this.target=L,this.currentTarget=null;for(var q in s)s.hasOwnProperty(q)&&(d=s[q],this[q]=d?d(S):S[q]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Zf:aC,this.isPropagationStopped=aC,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Zf)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Zf)},persist:function(){},isPersistent:Zf}),l}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kf=wr(No),Sh=g({},No,{view:0,detail:0}),CO=wr(Sh),Bm,Am,Th,Jf=g({},Sh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Th&&(Th&&s.type==="mousemove"?(Bm=s.screenX-Th.screenX,Am=s.screenY-Th.screenY):Am=Bm=0,Th=s),Bm)},movementY:function(s){return"movementY"in s?s.movementY:Am}}),sC=wr(Jf),kO=g({},Jf,{dataTransfer:0}),_O=wr(kO),wO=g({},Sh,{relatedTarget:0}),Em=wr(wO),SO=g({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),TO=wr(SO),BO=g({},No,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),AO=wr(BO),EO=g({},No,{data:0}),oC=wr(EO),MO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},LO={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"},NO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jO(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=NO[s])?!!l[s]:!1}function Mm(){return jO}var OO=g({},Sh,{key:function(s){if(s.key){var l=MO[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=Qf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?LO[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mm,charCode:function(s){return s.type==="keypress"?Qf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Qf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),RO=wr(OO),DO=g({},Jf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lC=wr(DO),FO=g({},Sh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mm}),$O=wr(FO),zO=g({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),IO=wr(zO),qO=g({},Jf,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),PO=wr(qO),HO=g({},No,{newState:0,oldState:0}),UO=wr(HO),WO=[9,13,27,32],Lm=ja&&"CompositionEvent"in window,Bh=null;ja&&"documentMode"in document&&(Bh=document.documentMode);var GO=ja&&"TextEvent"in window&&!Bh,cC=ja&&(!Lm||Bh&&8<Bh&&11>=Bh),hC=" ",uC=!1;function fC(s,l){switch(s){case"keyup":return WO.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dC(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ql=!1;function YO(s,l){switch(s){case"compositionend":return dC(l);case"keypress":return l.which!==32?null:(uC=!0,hC);case"textInput":return s=l.data,s===hC&&uC?null:s;default:return null}}function VO(s,l){if(ql)return s==="compositionend"||!Lm&&fC(s,l)?(s=nC(),Xf=Tm=Ls=null,ql=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return cC&&l.locale!=="ko"?null:l.data;default:return null}}var XO={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 pC(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!XO[s.type]:l==="textarea"}function gC(s,l,d,m){zl?Il?Il.push(m):Il=[m]:zl=m,l=Pd(l,"onChange"),0<l.length&&(d=new Kf("onChange","change",null,d,m),s.push({event:d,listeners:l}))}var Ah=null,Eh=null;function QO(s){Zk(s,0)}function td(s){var l=Sn(s);if(Ch(l))return s}function mC(s,l){if(s==="change")return l}var yC=!1;if(ja){var Nm;if(ja){var jm="oninput"in document;if(!jm){var xC=document.createElement("div");xC.setAttribute("oninput","return;"),jm=typeof xC.oninput=="function"}Nm=jm}else Nm=!1;yC=Nm&&(!document.documentMode||9<document.documentMode)}function bC(){Ah&&(Ah.detachEvent("onpropertychange",vC),Eh=Ah=null)}function vC(s){if(s.propertyName==="value"&&td(Eh)){var l=[];gC(l,Eh,s,_m(s)),rC(QO,l)}}function ZO(s,l,d){s==="focusin"?(bC(),Ah=l,Eh=d,Ah.attachEvent("onpropertychange",vC)):s==="focusout"&&bC()}function KO(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return td(Eh)}function JO(s,l){if(s==="click")return td(l)}function t4(s,l){if(s==="input"||s==="change")return td(l)}function e4(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Ir=typeof Object.is=="function"?Object.is:e4;function Mh(s,l){if(Ir(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var k=d[m];if(!Ii.call(l,k)||!Ir(s[k],l[k]))return!1}return!0}function CC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function kC(s,l){var d=CC(s);s=0;for(var m;d;){if(d.nodeType===3){if(m=s+d.textContent.length,s<=l&&m>=l)return{node:d,offset:l-s};s=m}t:{for(;d;){if(d.nextSibling){d=d.nextSibling;break t}d=d.parentNode}d=void 0}d=CC(d)}}function _C(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?_C(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function wC(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Lo(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=Lo(s.document)}return l}function Om(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var i4=ja&&"documentMode"in document&&11>=document.documentMode,Pl=null,Rm=null,Lh=null,Dm=!1;function SC(s,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Dm||Pl==null||Pl!==Lo(m)||(m=Pl,"selectionStart"in m&&Om(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Lh&&Mh(Lh,m)||(Lh=m,m=Pd(Rm,"onSelect"),0<m.length&&(l=new Kf("onSelect","select",null,l,d),s.push({event:l,listeners:m}),l.target=Pl)))}function jo(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var Hl={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionrun:jo("Transition","TransitionRun"),transitionstart:jo("Transition","TransitionStart"),transitioncancel:jo("Transition","TransitionCancel"),transitionend:jo("Transition","TransitionEnd")},Fm={},TC={};ja&&(TC=document.createElement("div").style,"AnimationEvent"in window||(delete Hl.animationend.animation,delete Hl.animationiteration.animation,delete Hl.animationstart.animation),"TransitionEvent"in window||delete Hl.transitionend.transition);function Oo(s){if(Fm[s])return Fm[s];if(!Hl[s])return s;var l=Hl[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in TC)return Fm[s]=l[d];return s}var BC=Oo("animationend"),AC=Oo("animationiteration"),EC=Oo("animationstart"),r4=Oo("transitionrun"),n4=Oo("transitionstart"),a4=Oo("transitioncancel"),MC=Oo("transitionend"),LC=new Map,$m="abort auxClick beforeToggle 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(" ");$m.push("scrollEnd");function An(s,l){LC.set(s,l),mt(l,[s])}var ed=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},en=[],Ul=0,zm=0;function id(){for(var s=Ul,l=zm=Ul=0;l<s;){var d=en[l];en[l++]=null;var m=en[l];en[l++]=null;var k=en[l];en[l++]=null;var S=en[l];if(en[l++]=null,m!==null&&k!==null){var L=m.pending;L===null?k.next=k:(k.next=L.next,L.next=k),m.pending=k}S!==0&&NC(d,k,S)}}function rd(s,l,d,m){en[Ul++]=s,en[Ul++]=l,en[Ul++]=d,en[Ul++]=m,zm|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function Im(s,l,d,m){return rd(s,l,d,m),nd(s)}function Ro(s,l){return rd(s,null,null,l),nd(s)}function NC(s,l,d){s.lanes|=d;var m=s.alternate;m!==null&&(m.lanes|=d);for(var k=!1,S=s.return;S!==null;)S.childLanes|=d,m=S.alternate,m!==null&&(m.childLanes|=d),S.tag===22&&(s=S.stateNode,s===null||s._visibility&1||(k=!0)),s=S,S=S.return;return s.tag===3?(S=s.stateNode,k&&l!==null&&(k=31-mi(d),s=S.hiddenUpdates,m=s[k],m===null?s[k]=[l]:m.push(l),l.lane=d|536870912),S):null}function nd(s){if(50<Jh)throw Jh=0,Xy=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Wl={};function s4(s,l,d,m){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qr(s,l,d,m){return new s4(s,l,d,m)}function qm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Oa(s,l){var d=s.alternate;return d===null?(d=qr(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function jC(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function ad(s,l,d,m,k,S){var L=0;if(m=s,typeof s=="function")qm(s)&&(L=1);else if(typeof s=="string")L=u6(s,d,st.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case G:return s=qr(31,d,l,k),s.elementType=G,s.lanes=S,s;case C:return Do(d.children,k,S,l);case _:L=8,k|=24;break;case w:return s=qr(12,d,l,k|2),s.elementType=w,s.lanes=S,s;case N:return s=qr(13,d,l,k),s.elementType=N,s.lanes=S,s;case O:return s=qr(19,d,l,k),s.elementType=O,s.lanes=S,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case B:L=10;break t;case T:L=9;break t;case E:L=11;break t;case M:L=14;break t;case j:L=16,m=null;break t}L=29,d=Error(n(130,s===null?"null":typeof s,"")),m=null}return l=qr(L,d,l,k),l.elementType=s,l.type=m,l.lanes=S,l}function Do(s,l,d,m){return s=qr(7,s,m,l),s.lanes=d,s}function Pm(s,l,d){return s=qr(6,s,null,l),s.lanes=d,s}function OC(s){var l=qr(18,null,null,0);return l.stateNode=s,l}function Hm(s,l,d){return l=qr(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var RC=new WeakMap;function rn(s,l){if(typeof s=="object"&&s!==null){var d=RC.get(s);return d!==void 0?d:(l={value:s,source:l,stack:ni(l)},RC.set(s,l),l)}return{value:s,source:l,stack:ni(l)}}var Gl=[],Yl=0,sd=null,Nh=0,nn=[],an=0,Ns=null,aa=1,sa="";function Ra(s,l){Gl[Yl++]=Nh,Gl[Yl++]=sd,sd=s,Nh=l}function DC(s,l,d){nn[an++]=aa,nn[an++]=sa,nn[an++]=Ns,Ns=s;var m=aa;s=sa;var k=32-mi(m)-1;m&=~(1<<k),d+=1;var S=32-mi(l)+k;if(30<S){var L=k-k%5;S=(m&(1<<L)-1).toString(32),m>>=L,k-=L,aa=1<<32-mi(l)+k|d<<k|m,sa=S+s}else aa=1<<S|d<<k|m,sa=s}function Um(s){s.return!==null&&(Ra(s,1),DC(s,1,0))}function Wm(s){for(;s===sd;)sd=Gl[--Yl],Gl[Yl]=null,Nh=Gl[--Yl],Gl[Yl]=null;for(;s===Ns;)Ns=nn[--an],nn[an]=null,sa=nn[--an],nn[an]=null,aa=nn[--an],nn[an]=null}function FC(s,l){nn[an++]=aa,nn[an++]=sa,nn[an++]=Ns,aa=l.id,sa=l.overflow,Ns=s}var Hi=null,Qe=null,xe=!1,js=null,sn=!1,Gm=Error(n(519));function Os(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw jh(rn(l,s)),Gm}function $C(s){var l=s.stateNode,d=s.type,m=s.memoizedProps;switch(l[ai]=s,l[yi]=m,d){case"dialog":pe("cancel",l),pe("close",l);break;case"iframe":case"object":case"embed":pe("load",l);break;case"video":case"audio":for(d=0;d<eu.length;d++)pe(eu[d],l);break;case"source":pe("error",l);break;case"img":case"image":case"link":pe("error",l),pe("load",l);break;case"details":pe("toggle",l);break;case"input":pe("invalid",l),ut(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":pe("invalid",l);break;case"textarea":pe("invalid",l),fe(l,m.value,m.defaultValue,m.children)}d=m.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||m.suppressHydrationWarning===!0||e_(l.textContent,d)?(m.popover!=null&&(pe("beforetoggle",l),pe("toggle",l)),m.onScroll!=null&&pe("scroll",l),m.onScrollEnd!=null&&pe("scrollend",l),m.onClick!=null&&(l.onclick=Na),l=!0):l=!1,l||Os(s,!0)}function zC(s){for(Hi=s.return;Hi;)switch(Hi.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:Hi=Hi.return}}function Vl(s){if(s!==Hi)return!1;if(!xe)return zC(s),xe=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||h0(s.type,s.memoizedProps)),d=!d),d&&Qe&&Os(s),zC(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Qe=h_(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Qe=h_(s)}else l===27?(l=Qe,Vs(s.type)?(s=g0,g0=null,Qe=s):Qe=l):Qe=Hi?ln(s.stateNode.nextSibling):null;return!0}function Fo(){Qe=Hi=null,xe=!1}function Ym(){var s=js;return s!==null&&(Ar===null?Ar=s:Ar.push.apply(Ar,s),js=null),s}function jh(s){js===null?js=[s]:js.push(s)}var Vm=H(null),$o=null,Da=null;function Rs(s,l,d){ot(Vm,l._currentValue),l._currentValue=d}function Fa(s){s._currentValue=Vm.current,tt(Vm)}function Xm(s,l,d){for(;s!==null;){var m=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),s===d)break;s=s.return}}function Qm(s,l,d,m){var k=s.child;for(k!==null&&(k.return=s);k!==null;){var S=k.dependencies;if(S!==null){var L=k.child;S=S.firstContext;t:for(;S!==null;){var q=S;S=k;for(var Q=0;Q<l.length;Q++)if(q.context===l[Q]){S.lanes|=d,q=S.alternate,q!==null&&(q.lanes|=d),Xm(S.return,d,s),m||(L=null);break t}S=q.next}}else if(k.tag===18){if(L=k.return,L===null)throw Error(n(341));L.lanes|=d,S=L.alternate,S!==null&&(S.lanes|=d),Xm(L,d,s),L=null}else L=k.child;if(L!==null)L.return=k;else for(L=k;L!==null;){if(L===s){L=null;break}if(k=L.sibling,k!==null){k.return=L.return,L=k;break}L=L.return}k=L}}function Xl(s,l,d,m){s=null;for(var k=l,S=!1;k!==null;){if(!S){if((k.flags&524288)!==0)S=!0;else if((k.flags&262144)!==0)break}if(k.tag===10){var L=k.alternate;if(L===null)throw Error(n(387));if(L=L.memoizedProps,L!==null){var q=k.type;Ir(k.pendingProps.value,L.value)||(s!==null?s.push(q):s=[q])}}else if(k===Lt.current){if(L=k.alternate,L===null)throw Error(n(387));L.memoizedState.memoizedState!==k.memoizedState.memoizedState&&(s!==null?s.push(su):s=[su])}k=k.return}s!==null&&Qm(l,s,d,m),l.flags|=262144}function od(s){for(s=s.firstContext;s!==null;){if(!Ir(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function zo(s){$o=s,Da=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Ui(s){return IC($o,s)}function ld(s,l){return $o===null&&zo(s),IC(s,l)}function IC(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Da===null){if(s===null)throw Error(n(308));Da=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else Da=Da.next=l;return d}var o4=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,m){s.push(m)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},l4=i.unstable_scheduleCallback,c4=i.unstable_NormalPriority,bi={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zm(){return{controller:new o4,data:new Map,refCount:0}}function Oh(s){s.refCount--,s.refCount===0&&l4(c4,function(){s.controller.abort()})}var Rh=null,Km=0,Ql=0,Zl=null;function h4(s,l){if(Rh===null){var d=Rh=[];Km=0,Ql=e0(),Zl={status:"pending",value:void 0,then:function(m){d.push(m)}}}return Km++,l.then(qC,qC),l}function qC(){if(--Km===0&&Rh!==null){Zl!==null&&(Zl.status="fulfilled");var s=Rh;Rh=null,Ql=0,Zl=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function u4(s,l){var d=[],m={status:"pending",value:null,reason:null,then:function(k){d.push(k)}};return s.then(function(){m.status="fulfilled",m.value=l;for(var k=0;k<d.length;k++)(0,d[k])(l)},function(k){for(m.status="rejected",m.reason=k,k=0;k<d.length;k++)(0,d[k])(void 0)}),m}var PC=R.S;R.S=function(s,l){Sk=Pe(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&h4(s,l),PC!==null&&PC(s,l)};var Io=H(null);function Jm(){var s=Io.current;return s!==null?s:Ye.pooledCache}function cd(s,l){l===null?ot(Io,Io.current):ot(Io,l.pool)}function HC(){var s=Jm();return s===null?null:{parent:bi._currentValue,pool:s}}var Kl=Error(n(460)),ty=Error(n(474)),hd=Error(n(542)),ud={then:function(){}};function UC(s){return s=s.status,s==="fulfilled"||s==="rejected"}function WC(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(Na,Na),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,YC(s),s;default:if(typeof l.status=="string")l.then(Na,Na);else{if(s=Ye,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=l,s.status="pending",s.then(function(m){if(l.status==="pending"){var k=l;k.status="fulfilled",k.value=m}},function(m){if(l.status==="pending"){var k=l;k.status="rejected",k.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,YC(s),s}throw Po=l,Kl}}function qo(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Po=d,Kl):d}}var Po=null;function GC(){if(Po===null)throw Error(n(459));var s=Po;return Po=null,s}function YC(s){if(s===Kl||s===hd)throw Error(n(483))}var Jl=null,Dh=0;function fd(s){var l=Dh;return Dh+=1,Jl===null&&(Jl=[]),WC(Jl,s,l)}function Fh(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function dd(s,l){throw l.$$typeof===b?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function VC(s){function l(nt,et){if(s){var lt=nt.deletions;lt===null?(nt.deletions=[et],nt.flags|=16):lt.push(et)}}function d(nt,et){if(!s)return null;for(;et!==null;)l(nt,et),et=et.sibling;return null}function m(nt){for(var et=new Map;nt!==null;)nt.key!==null?et.set(nt.key,nt):et.set(nt.index,nt),nt=nt.sibling;return et}function k(nt,et){return nt=Oa(nt,et),nt.index=0,nt.sibling=null,nt}function S(nt,et,lt){return nt.index=lt,s?(lt=nt.alternate,lt!==null?(lt=lt.index,lt<et?(nt.flags|=67108866,et):lt):(nt.flags|=67108866,et)):(nt.flags|=1048576,et)}function L(nt){return s&&nt.alternate===null&&(nt.flags|=67108866),nt}function q(nt,et,lt,xt){return et===null||et.tag!==6?(et=Pm(lt,nt.mode,xt),et.return=nt,et):(et=k(et,lt),et.return=nt,et)}function Q(nt,et,lt,xt){var Gt=lt.type;return Gt===C?yt(nt,et,lt.props.children,xt,lt.key):et!==null&&(et.elementType===Gt||typeof Gt=="object"&&Gt!==null&&Gt.$$typeof===j&&qo(Gt)===et.type)?(et=k(et,lt.props),Fh(et,lt),et.return=nt,et):(et=ad(lt.type,lt.key,lt.props,null,nt.mode,xt),Fh(et,lt),et.return=nt,et)}function ct(nt,et,lt,xt){return et===null||et.tag!==4||et.stateNode.containerInfo!==lt.containerInfo||et.stateNode.implementation!==lt.implementation?(et=Hm(lt,nt.mode,xt),et.return=nt,et):(et=k(et,lt.children||[]),et.return=nt,et)}function yt(nt,et,lt,xt,Gt){return et===null||et.tag!==7?(et=Do(lt,nt.mode,xt,Gt),et.return=nt,et):(et=k(et,lt),et.return=nt,et)}function vt(nt,et,lt){if(typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint")return et=Pm(""+et,nt.mode,lt),et.return=nt,et;if(typeof et=="object"&&et!==null){switch(et.$$typeof){case y:return lt=ad(et.type,et.key,et.props,null,nt.mode,lt),Fh(lt,et),lt.return=nt,lt;case v:return et=Hm(et,nt.mode,lt),et.return=nt,et;case j:return et=qo(et),vt(nt,et,lt)}if(U(et)||K(et))return et=Do(et,nt.mode,lt,null),et.return=nt,et;if(typeof et.then=="function")return vt(nt,fd(et),lt);if(et.$$typeof===B)return vt(nt,ld(nt,et),lt);dd(nt,et)}return null}function ht(nt,et,lt,xt){var Gt=et!==null?et.key:null;if(typeof lt=="string"&&lt!==""||typeof lt=="number"||typeof lt=="bigint")return Gt!==null?null:q(nt,et,""+lt,xt);if(typeof lt=="object"&&lt!==null){switch(lt.$$typeof){case y:return lt.key===Gt?Q(nt,et,lt,xt):null;case v:return lt.key===Gt?ct(nt,et,lt,xt):null;case j:return lt=qo(lt),ht(nt,et,lt,xt)}if(U(lt)||K(lt))return Gt!==null?null:yt(nt,et,lt,xt,null);if(typeof lt.then=="function")return ht(nt,et,fd(lt),xt);if(lt.$$typeof===B)return ht(nt,et,ld(nt,lt),xt);dd(nt,lt)}return null}function dt(nt,et,lt,xt,Gt){if(typeof xt=="string"&&xt!==""||typeof xt=="number"||typeof xt=="bigint")return nt=nt.get(lt)||null,q(et,nt,""+xt,Gt);if(typeof xt=="object"&&xt!==null){switch(xt.$$typeof){case y:return nt=nt.get(xt.key===null?lt:xt.key)||null,Q(et,nt,xt,Gt);case v:return nt=nt.get(xt.key===null?lt:xt.key)||null,ct(et,nt,xt,Gt);case j:return xt=qo(xt),dt(nt,et,lt,xt,Gt)}if(U(xt)||K(xt))return nt=nt.get(lt)||null,yt(et,nt,xt,Gt,null);if(typeof xt.then=="function")return dt(nt,et,lt,fd(xt),Gt);if(xt.$$typeof===B)return dt(nt,et,lt,ld(et,xt),Gt);dd(et,xt)}return null}function Rt(nt,et,lt,xt){for(var Gt=null,Te=null,zt=et,le=et=0,me=null;zt!==null&&le<lt.length;le++){zt.index>le?(me=zt,zt=null):me=zt.sibling;var Be=ht(nt,zt,lt[le],xt);if(Be===null){zt===null&&(zt=me);break}s&&zt&&Be.alternate===null&&l(nt,zt),et=S(Be,et,le),Te===null?Gt=Be:Te.sibling=Be,Te=Be,zt=me}if(le===lt.length)return d(nt,zt),xe&&Ra(nt,le),Gt;if(zt===null){for(;le<lt.length;le++)zt=vt(nt,lt[le],xt),zt!==null&&(et=S(zt,et,le),Te===null?Gt=zt:Te.sibling=zt,Te=zt);return xe&&Ra(nt,le),Gt}for(zt=m(zt);le<lt.length;le++)me=dt(zt,nt,le,lt[le],xt),me!==null&&(s&&me.alternate!==null&&zt.delete(me.key===null?le:me.key),et=S(me,et,le),Te===null?Gt=me:Te.sibling=me,Te=me);return s&&zt.forEach(function(Js){return l(nt,Js)}),xe&&Ra(nt,le),Gt}function Kt(nt,et,lt,xt){if(lt==null)throw Error(n(151));for(var Gt=null,Te=null,zt=et,le=et=0,me=null,Be=lt.next();zt!==null&&!Be.done;le++,Be=lt.next()){zt.index>le?(me=zt,zt=null):me=zt.sibling;var Js=ht(nt,zt,Be.value,xt);if(Js===null){zt===null&&(zt=me);break}s&&zt&&Js.alternate===null&&l(nt,zt),et=S(Js,et,le),Te===null?Gt=Js:Te.sibling=Js,Te=Js,zt=me}if(Be.done)return d(nt,zt),xe&&Ra(nt,le),Gt;if(zt===null){for(;!Be.done;le++,Be=lt.next())Be=vt(nt,Be.value,xt),Be!==null&&(et=S(Be,et,le),Te===null?Gt=Be:Te.sibling=Be,Te=Be);return xe&&Ra(nt,le),Gt}for(zt=m(zt);!Be.done;le++,Be=lt.next())Be=dt(zt,nt,le,Be.value,xt),Be!==null&&(s&&Be.alternate!==null&&zt.delete(Be.key===null?le:Be.key),et=S(Be,et,le),Te===null?Gt=Be:Te.sibling=Be,Te=Be);return s&&zt.forEach(function(k6){return l(nt,k6)}),xe&&Ra(nt,le),Gt}function Ge(nt,et,lt,xt){if(typeof lt=="object"&&lt!==null&&lt.type===C&&lt.key===null&&(lt=lt.props.children),typeof lt=="object"&&lt!==null){switch(lt.$$typeof){case y:t:{for(var Gt=lt.key;et!==null;){if(et.key===Gt){if(Gt=lt.type,Gt===C){if(et.tag===7){d(nt,et.sibling),xt=k(et,lt.props.children),xt.return=nt,nt=xt;break t}}else if(et.elementType===Gt||typeof Gt=="object"&&Gt!==null&&Gt.$$typeof===j&&qo(Gt)===et.type){d(nt,et.sibling),xt=k(et,lt.props),Fh(xt,lt),xt.return=nt,nt=xt;break t}d(nt,et);break}else l(nt,et);et=et.sibling}lt.type===C?(xt=Do(lt.props.children,nt.mode,xt,lt.key),xt.return=nt,nt=xt):(xt=ad(lt.type,lt.key,lt.props,null,nt.mode,xt),Fh(xt,lt),xt.return=nt,nt=xt)}return L(nt);case v:t:{for(Gt=lt.key;et!==null;){if(et.key===Gt)if(et.tag===4&&et.stateNode.containerInfo===lt.containerInfo&&et.stateNode.implementation===lt.implementation){d(nt,et.sibling),xt=k(et,lt.children||[]),xt.return=nt,nt=xt;break t}else{d(nt,et);break}else l(nt,et);et=et.sibling}xt=Hm(lt,nt.mode,xt),xt.return=nt,nt=xt}return L(nt);case j:return lt=qo(lt),Ge(nt,et,lt,xt)}if(U(lt))return Rt(nt,et,lt,xt);if(K(lt)){if(Gt=K(lt),typeof Gt!="function")throw Error(n(150));return lt=Gt.call(lt),Kt(nt,et,lt,xt)}if(typeof lt.then=="function")return Ge(nt,et,fd(lt),xt);if(lt.$$typeof===B)return Ge(nt,et,ld(nt,lt),xt);dd(nt,lt)}return typeof lt=="string"&&lt!==""||typeof lt=="number"||typeof lt=="bigint"?(lt=""+lt,et!==null&&et.tag===6?(d(nt,et.sibling),xt=k(et,lt),xt.return=nt,nt=xt):(d(nt,et),xt=Pm(lt,nt.mode,xt),xt.return=nt,nt=xt),L(nt)):d(nt,et)}return function(nt,et,lt,xt){try{Dh=0;var Gt=Ge(nt,et,lt,xt);return Jl=null,Gt}catch(zt){if(zt===Kl||zt===hd)throw zt;var Te=qr(29,zt,null,nt.mode);return Te.lanes=xt,Te.return=nt,Te}finally{}}}var Ho=VC(!0),XC=VC(!1),Ds=!1;function ey(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iy(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Fs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function $s(s,l,d){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,(Le&2)!==0){var k=m.pending;return k===null?l.next=l:(l.next=k.next,k.next=l),m.pending=l,l=nd(s),NC(s,null,d),l}return rd(s,m,l,d),nd(s)}function $h(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,Ss(s,d)}}function ry(s,l){var d=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var k=null,S=null;if(d=d.firstBaseUpdate,d!==null){do{var L={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};S===null?k=S=L:S=S.next=L,d=d.next}while(d!==null);S===null?k=S=l:S=S.next=l}else k=S=l;d={baseState:m.baseState,firstBaseUpdate:k,lastBaseUpdate:S,shared:m.shared,callbacks:m.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var ny=!1;function zh(){if(ny){var s=Zl;if(s!==null)throw s}}function Ih(s,l,d,m){ny=!1;var k=s.updateQueue;Ds=!1;var S=k.firstBaseUpdate,L=k.lastBaseUpdate,q=k.shared.pending;if(q!==null){k.shared.pending=null;var Q=q,ct=Q.next;Q.next=null,L===null?S=ct:L.next=ct,L=Q;var yt=s.alternate;yt!==null&&(yt=yt.updateQueue,q=yt.lastBaseUpdate,q!==L&&(q===null?yt.firstBaseUpdate=ct:q.next=ct,yt.lastBaseUpdate=Q))}if(S!==null){var vt=k.baseState;L=0,yt=ct=Q=null,q=S;do{var ht=q.lane&-536870913,dt=ht!==q.lane;if(dt?(ge&ht)===ht:(m&ht)===ht){ht!==0&&ht===Ql&&(ny=!0),yt!==null&&(yt=yt.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var Rt=s,Kt=q;ht=l;var Ge=d;switch(Kt.tag){case 1:if(Rt=Kt.payload,typeof Rt=="function"){vt=Rt.call(Ge,vt,ht);break t}vt=Rt;break t;case 3:Rt.flags=Rt.flags&-65537|128;case 0:if(Rt=Kt.payload,ht=typeof Rt=="function"?Rt.call(Ge,vt,ht):Rt,ht==null)break t;vt=g({},vt,ht);break t;case 2:Ds=!0}}ht=q.callback,ht!==null&&(s.flags|=64,dt&&(s.flags|=8192),dt=k.callbacks,dt===null?k.callbacks=[ht]:dt.push(ht))}else dt={lane:ht,tag:q.tag,payload:q.payload,callback:q.callback,next:null},yt===null?(ct=yt=dt,Q=vt):yt=yt.next=dt,L|=ht;if(q=q.next,q===null){if(q=k.shared.pending,q===null)break;dt=q,q=dt.next,dt.next=null,k.lastBaseUpdate=dt,k.shared.pending=null}}while(!0);yt===null&&(Q=vt),k.baseState=Q,k.firstBaseUpdate=ct,k.lastBaseUpdate=yt,S===null&&(k.shared.lanes=0),Hs|=L,s.lanes=L,s.memoizedState=vt}}function QC(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function ZC(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)QC(d[s],l)}var tc=H(null),pd=H(0);function KC(s,l){s=Ga,ot(pd,s),ot(tc,l),Ga=s|l.baseLanes}function ay(){ot(pd,Ga),ot(tc,tc.current)}function sy(){Ga=pd.current,tt(tc),tt(pd)}var Pr=H(null),on=null;function zs(s){var l=s.alternate;ot(di,di.current&1),ot(Pr,s),on===null&&(l===null||tc.current!==null||l.memoizedState!==null)&&(on=s)}function oy(s){ot(di,di.current),ot(Pr,s),on===null&&(on=s)}function JC(s){s.tag===22?(ot(di,di.current),ot(Pr,s),on===null&&(on=s)):Is()}function Is(){ot(di,di.current),ot(Pr,Pr.current)}function Hr(s){tt(Pr),on===s&&(on=null),tt(di)}var di=H(0);function gd(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d0(d)||p0(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var $a=0,oe=null,Ue=null,vi=null,md=!1,ec=!1,Uo=!1,yd=0,qh=0,ic=null,f4=0;function li(){throw Error(n(321))}function ly(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!Ir(s[d],l[d]))return!1;return!0}function cy(s,l,d,m,k,S){return $a=S,oe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,R.H=s===null||s.memoizedState===null?D2:wy,Uo=!1,S=d(m,k),Uo=!1,ec&&(S=e2(l,d,m,k)),t2(s),S}function t2(s){R.H=Uh;var l=Ue!==null&&Ue.next!==null;if($a=0,vi=Ue=oe=null,md=!1,qh=0,ic=null,l)throw Error(n(300));s===null||Ci||(s=s.dependencies,s!==null&&od(s)&&(Ci=!0))}function e2(s,l,d,m){oe=s;var k=0;do{if(ec&&(ic=null),qh=0,ec=!1,25<=k)throw Error(n(301));if(k+=1,vi=Ue=null,s.updateQueue!=null){var S=s.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}R.H=F2,S=l(d,m)}while(ec);return S}function d4(){var s=R.H,l=s.useState()[0];return l=typeof l.then=="function"?Ph(l):l,s=s.useState()[0],(Ue!==null?Ue.memoizedState:null)!==s&&(oe.flags|=1024),l}function hy(){var s=yd!==0;return yd=0,s}function uy(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function fy(s){if(md){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}md=!1}$a=0,vi=Ue=oe=null,ec=!1,qh=yd=0,ic=null}function ur(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vi===null?oe.memoizedState=vi=s:vi=vi.next=s,vi}function pi(){if(Ue===null){var s=oe.alternate;s=s!==null?s.memoizedState:null}else s=Ue.next;var l=vi===null?oe.memoizedState:vi.next;if(l!==null)vi=l,Ue=s;else{if(s===null)throw oe.alternate===null?Error(n(467)):Error(n(310));Ue=s,s={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},vi===null?oe.memoizedState=vi=s:vi=vi.next=s}return vi}function xd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ph(s){var l=qh;return qh+=1,ic===null&&(ic=[]),s=WC(ic,s,l),l=oe,(vi===null?l.memoizedState:vi.next)===null&&(l=l.alternate,R.H=l===null||l.memoizedState===null?D2:wy),s}function bd(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Ph(s);if(s.$$typeof===B)return Ui(s)}throw Error(n(438,String(s)))}function dy(s){var l=null,d=oe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var m=oe.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(k){return k.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=xd(),oe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),m=0;m<s;m++)d[m]=$;return l.index++,d}function za(s,l){return typeof l=="function"?l(s):l}function vd(s){var l=pi();return py(l,Ue,s)}function py(s,l,d){var m=s.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=d;var k=s.baseQueue,S=m.pending;if(S!==null){if(k!==null){var L=k.next;k.next=S.next,S.next=L}l.baseQueue=k=S,m.pending=null}if(S=s.baseState,k===null)s.memoizedState=S;else{l=k.next;var q=L=null,Q=null,ct=l,yt=!1;do{var vt=ct.lane&-536870913;if(vt!==ct.lane?(ge&vt)===vt:($a&vt)===vt){var ht=ct.revertLane;if(ht===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null}),vt===Ql&&(yt=!0);else if(($a&ht)===ht){ct=ct.next,ht===Ql&&(yt=!0);continue}else vt={lane:0,revertLane:ct.revertLane,gesture:null,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null},Q===null?(q=Q=vt,L=S):Q=Q.next=vt,oe.lanes|=ht,Hs|=ht;vt=ct.action,Uo&&d(S,vt),S=ct.hasEagerState?ct.eagerState:d(S,vt)}else ht={lane:vt,revertLane:ct.revertLane,gesture:ct.gesture,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null},Q===null?(q=Q=ht,L=S):Q=Q.next=ht,oe.lanes|=vt,Hs|=vt;ct=ct.next}while(ct!==null&&ct!==l);if(Q===null?L=S:Q.next=q,!Ir(S,s.memoizedState)&&(Ci=!0,yt&&(d=Zl,d!==null)))throw d;s.memoizedState=S,s.baseState=L,s.baseQueue=Q,m.lastRenderedState=S}return k===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function gy(s){var l=pi(),d=l.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var m=d.dispatch,k=d.pending,S=l.memoizedState;if(k!==null){d.pending=null;var L=k=k.next;do S=s(S,L.action),L=L.next;while(L!==k);Ir(S,l.memoizedState)||(Ci=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),d.lastRenderedState=S}return[S,m]}function i2(s,l,d){var m=oe,k=pi(),S=xe;if(S){if(d===void 0)throw Error(n(407));d=d()}else d=l();var L=!Ir((Ue||k).memoizedState,d);if(L&&(k.memoizedState=d,Ci=!0),k=k.queue,xy(a2.bind(null,m,k,s),[s]),k.getSnapshot!==l||L||vi!==null&&vi.memoizedState.tag&1){if(m.flags|=2048,rc(9,{destroy:void 0},n2.bind(null,m,k,d,l),null),Ye===null)throw Error(n(349));S||($a&127)!==0||r2(m,l,d)}return d}function r2(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=oe.updateQueue,l===null?(l=xd(),oe.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function n2(s,l,d,m){l.value=d,l.getSnapshot=m,s2(l)&&o2(s)}function a2(s,l,d){return d(function(){s2(l)&&o2(s)})}function s2(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!Ir(s,d)}catch{return!0}}function o2(s){var l=Ro(s,2);l!==null&&Er(l,s,2)}function my(s){var l=ur();if(typeof s=="function"){var d=s;if(s=d(),Uo){$r(!0);try{d()}finally{$r(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:za,lastRenderedState:s},l}function l2(s,l,d,m){return s.baseState=d,py(s,Ue,typeof m=="function"?m:za)}function p4(s,l,d,m,k){if(_d(s))throw Error(n(485));if(s=l.action,s!==null){var S={payload:k,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){S.listeners.push(L)}};R.T!==null?d(!0):S.isTransition=!1,m(S),d=l.pending,d===null?(S.next=l.pending=S,c2(l,S)):(S.next=d.next,l.pending=d.next=S)}}function c2(s,l){var d=l.action,m=l.payload,k=s.state;if(l.isTransition){var S=R.T,L={};R.T=L;try{var q=d(k,m),Q=R.S;Q!==null&&Q(L,q),h2(s,l,q)}catch(ct){yy(s,l,ct)}finally{S!==null&&L.types!==null&&(S.types=L.types),R.T=S}}else try{S=d(k,m),h2(s,l,S)}catch(ct){yy(s,l,ct)}}function h2(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){u2(s,l,m)},function(m){return yy(s,l,m)}):u2(s,l,d)}function u2(s,l,d){l.status="fulfilled",l.value=d,f2(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,c2(s,d)))}function yy(s,l,d){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=d,f2(l),l=l.next;while(l!==m)}s.action=null}function f2(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function d2(s,l){return l}function p2(s,l){if(xe){var d=Ye.formState;if(d!==null){t:{var m=oe;if(xe){if(Qe){e:{for(var k=Qe,S=sn;k.nodeType!==8;){if(!S){k=null;break e}if(k=ln(k.nextSibling),k===null){k=null;break e}}S=k.data,k=S==="F!"||S==="F"?k:null}if(k){Qe=ln(k.nextSibling),m=k.data==="F!";break t}}Os(m)}m=!1}m&&(l=d[0])}}return d=ur(),d.memoizedState=d.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d2,lastRenderedState:l},d.queue=m,d=j2.bind(null,oe,m),m.dispatch=d,m=my(!1),S=_y.bind(null,oe,!1,m.queue),m=ur(),k={state:l,dispatch:null,action:s,pending:null},m.queue=k,d=p4.bind(null,oe,k,S,d),k.dispatch=d,m.memoizedState=s,[l,d,!1]}function g2(s){var l=pi();return m2(l,Ue,s)}function m2(s,l,d){if(l=py(s,l,d2)[0],s=vd(za)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=Ph(l)}catch(L){throw L===Kl?hd:L}else m=l;l=pi();var k=l.queue,S=k.dispatch;return d!==l.memoizedState&&(oe.flags|=2048,rc(9,{destroy:void 0},g4.bind(null,k,d),null)),[m,S,s]}function g4(s,l){s.action=l}function y2(s){var l=pi(),d=Ue;if(d!==null)return m2(l,d,s);pi(),l=l.memoizedState,d=pi();var m=d.queue.dispatch;return d.memoizedState=s,[l,m,!1]}function rc(s,l,d,m){return s={tag:s,create:d,deps:m,inst:l,next:null},l=oe.updateQueue,l===null&&(l=xd(),oe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(m=d.next,d.next=s,s.next=m,l.lastEffect=s),s}function x2(){return pi().memoizedState}function Cd(s,l,d,m){var k=ur();oe.flags|=s,k.memoizedState=rc(1|l,{destroy:void 0},d,m===void 0?null:m)}function kd(s,l,d,m){var k=pi();m=m===void 0?null:m;var S=k.memoizedState.inst;Ue!==null&&m!==null&&ly(m,Ue.memoizedState.deps)?k.memoizedState=rc(l,S,d,m):(oe.flags|=s,k.memoizedState=rc(1|l,S,d,m))}function b2(s,l){Cd(8390656,8,s,l)}function xy(s,l){kd(2048,8,s,l)}function m4(s){oe.flags|=4;var l=oe.updateQueue;if(l===null)l=xd(),oe.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function v2(s){var l=pi().memoizedState;return m4({ref:l,nextImpl:s}),function(){if((Le&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function C2(s,l){return kd(4,2,s,l)}function k2(s,l){return kd(4,4,s,l)}function _2(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function w2(s,l,d){d=d!=null?d.concat([s]):null,kd(4,4,_2.bind(null,l,s),d)}function by(){}function S2(s,l){var d=pi();l=l===void 0?null:l;var m=d.memoizedState;return l!==null&&ly(l,m[1])?m[0]:(d.memoizedState=[s,l],s)}function T2(s,l){var d=pi();l=l===void 0?null:l;var m=d.memoizedState;if(l!==null&&ly(l,m[1]))return m[0];if(m=s(),Uo){$r(!0);try{s()}finally{$r(!1)}}return d.memoizedState=[m,l],m}function vy(s,l,d){return d===void 0||($a&1073741824)!==0&&(ge&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=Bk(),oe.lanes|=s,Hs|=s,d)}function B2(s,l,d,m){return Ir(d,l)?d:tc.current!==null?(s=vy(s,d,m),Ir(s,l)||(Ci=!0),s):($a&42)===0||($a&1073741824)!==0&&(ge&261930)===0?(Ci=!0,s.memoizedState=d):(s=Bk(),oe.lanes|=s,Hs|=s,l)}function A2(s,l,d,m,k){var S=I.p;I.p=S!==0&&8>S?S:8;var L=R.T,q={};R.T=q,_y(s,!1,l,d);try{var Q=k(),ct=R.S;if(ct!==null&&ct(q,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var yt=u4(Q,m);Hh(s,l,yt,Gr(s))}else Hh(s,l,m,Gr(s))}catch(vt){Hh(s,l,{then:function(){},status:"rejected",reason:vt},Gr())}finally{I.p=S,L!==null&&q.types!==null&&(L.types=q.types),R.T=L}}function y4(){}function Cy(s,l,d,m){if(s.tag!==5)throw Error(n(476));var k=E2(s).queue;A2(s,k,l,P,d===null?y4:function(){return M2(s),d(m)})}function E2(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:za,lastRenderedState:P},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:za,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function M2(s){var l=E2(s);l.next===null&&(l=s.alternate.memoizedState),Hh(s,l.next.queue,{},Gr())}function ky(){return Ui(su)}function L2(){return pi().memoizedState}function N2(){return pi().memoizedState}function x4(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=Gr();s=Fs(d);var m=$s(l,s,d);m!==null&&(Er(m,l,d),$h(m,l,d)),l={cache:Zm()},s.payload=l;return}l=l.return}}function b4(s,l,d){var m=Gr();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},_d(s)?O2(l,d):(d=Im(s,l,d,m),d!==null&&(Er(d,s,m),R2(d,l,m)))}function j2(s,l,d){var m=Gr();Hh(s,l,d,m)}function Hh(s,l,d,m){var k={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(_d(s))O2(l,k);else{var S=s.alternate;if(s.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var L=l.lastRenderedState,q=S(L,d);if(k.hasEagerState=!0,k.eagerState=q,Ir(q,L))return rd(s,l,k,0),Ye===null&&id(),!1}catch{}finally{}if(d=Im(s,l,k,m),d!==null)return Er(d,s,m),R2(d,l,m),!0}return!1}function _y(s,l,d,m){if(m={lane:2,revertLane:e0(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},_d(s)){if(l)throw Error(n(479))}else l=Im(s,d,m,2),l!==null&&Er(l,s,2)}function _d(s){var l=s.alternate;return s===oe||l!==null&&l===oe}function O2(s,l){ec=md=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function R2(s,l,d){if((d&4194048)!==0){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,Ss(s,d)}}var Uh={readContext:Ui,use:bd,useCallback:li,useContext:li,useEffect:li,useImperativeHandle:li,useLayoutEffect:li,useInsertionEffect:li,useMemo:li,useReducer:li,useRef:li,useState:li,useDebugValue:li,useDeferredValue:li,useTransition:li,useSyncExternalStore:li,useId:li,useHostTransitionStatus:li,useFormState:li,useActionState:li,useOptimistic:li,useMemoCache:li,useCacheRefresh:li};Uh.useEffectEvent=li;var D2={readContext:Ui,use:bd,useCallback:function(s,l){return ur().memoizedState=[s,l===void 0?null:l],s},useContext:Ui,useEffect:b2,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,Cd(4194308,4,_2.bind(null,l,s),d)},useLayoutEffect:function(s,l){return Cd(4194308,4,s,l)},useInsertionEffect:function(s,l){Cd(4,2,s,l)},useMemo:function(s,l){var d=ur();l=l===void 0?null:l;var m=s();if(Uo){$r(!0);try{s()}finally{$r(!1)}}return d.memoizedState=[m,l],m},useReducer:function(s,l,d){var m=ur();if(d!==void 0){var k=d(l);if(Uo){$r(!0);try{d(l)}finally{$r(!1)}}}else k=l;return m.memoizedState=m.baseState=k,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:k},m.queue=s,s=s.dispatch=b4.bind(null,oe,s),[m.memoizedState,s]},useRef:function(s){var l=ur();return s={current:s},l.memoizedState=s},useState:function(s){s=my(s);var l=s.queue,d=j2.bind(null,oe,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:by,useDeferredValue:function(s,l){var d=ur();return vy(d,s,l)},useTransition:function(){var s=my(!1);return s=A2.bind(null,oe,s.queue,!0,!1),ur().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var m=oe,k=ur();if(xe){if(d===void 0)throw Error(n(407));d=d()}else{if(d=l(),Ye===null)throw Error(n(349));(ge&127)!==0||r2(m,l,d)}k.memoizedState=d;var S={value:d,getSnapshot:l};return k.queue=S,b2(a2.bind(null,m,S,s),[s]),m.flags|=2048,rc(9,{destroy:void 0},n2.bind(null,m,S,d,l),null),d},useId:function(){var s=ur(),l=Ye.identifierPrefix;if(xe){var d=sa,m=aa;d=(m&~(1<<32-mi(m)-1)).toString(32)+d,l="_"+l+"R_"+d,d=yd++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=f4++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:ky,useFormState:p2,useActionState:p2,useOptimistic:function(s){var l=ur();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=_y.bind(null,oe,!0,d),d.dispatch=l,[s,l]},useMemoCache:dy,useCacheRefresh:function(){return ur().memoizedState=x4.bind(null,oe)},useEffectEvent:function(s){var l=ur(),d={impl:s};return l.memoizedState=d,function(){if((Le&2)!==0)throw Error(n(440));return d.impl.apply(void 0,arguments)}}},wy={readContext:Ui,use:bd,useCallback:S2,useContext:Ui,useEffect:xy,useImperativeHandle:w2,useInsertionEffect:C2,useLayoutEffect:k2,useMemo:T2,useReducer:vd,useRef:x2,useState:function(){return vd(za)},useDebugValue:by,useDeferredValue:function(s,l){var d=pi();return B2(d,Ue.memoizedState,s,l)},useTransition:function(){var s=vd(za)[0],l=pi().memoizedState;return[typeof s=="boolean"?s:Ph(s),l]},useSyncExternalStore:i2,useId:L2,useHostTransitionStatus:ky,useFormState:g2,useActionState:g2,useOptimistic:function(s,l){var d=pi();return l2(d,Ue,s,l)},useMemoCache:dy,useCacheRefresh:N2};wy.useEffectEvent=v2;var F2={readContext:Ui,use:bd,useCallback:S2,useContext:Ui,useEffect:xy,useImperativeHandle:w2,useInsertionEffect:C2,useLayoutEffect:k2,useMemo:T2,useReducer:gy,useRef:x2,useState:function(){return gy(za)},useDebugValue:by,useDeferredValue:function(s,l){var d=pi();return Ue===null?vy(d,s,l):B2(d,Ue.memoizedState,s,l)},useTransition:function(){var s=gy(za)[0],l=pi().memoizedState;return[typeof s=="boolean"?s:Ph(s),l]},useSyncExternalStore:i2,useId:L2,useHostTransitionStatus:ky,useFormState:y2,useActionState:y2,useOptimistic:function(s,l){var d=pi();return Ue!==null?l2(d,Ue,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:dy,useCacheRefresh:N2};F2.useEffectEvent=v2;function Sy(s,l,d,m){l=s.memoizedState,d=d(m,l),d=d==null?l:g({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var Ty={enqueueSetState:function(s,l,d){s=s._reactInternals;var m=Gr(),k=Fs(m);k.payload=l,d!=null&&(k.callback=d),l=$s(s,k,m),l!==null&&(Er(l,s,m),$h(l,s,m))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var m=Gr(),k=Fs(m);k.tag=1,k.payload=l,d!=null&&(k.callback=d),l=$s(s,k,m),l!==null&&(Er(l,s,m),$h(l,s,m))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=Gr(),m=Fs(d);m.tag=2,l!=null&&(m.callback=l),l=$s(s,m,d),l!==null&&(Er(l,s,d),$h(l,s,d))}};function $2(s,l,d,m,k,S,L){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,S,L):l.prototype&&l.prototype.isPureReactComponent?!Mh(d,m)||!Mh(k,S):!0}function z2(s,l,d,m){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==s&&Ty.enqueueReplaceState(l,l.state,null)}function Wo(s,l){var d=l;if("ref"in l){d={};for(var m in l)m!=="ref"&&(d[m]=l[m])}if(s=s.defaultProps){d===l&&(d=g({},d));for(var k in s)d[k]===void 0&&(d[k]=s[k])}return d}function I2(s){ed(s)}function q2(s){console.error(s)}function P2(s){ed(s)}function wd(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function H2(s,l,d){try{var m=s.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(k){setTimeout(function(){throw k})}}function By(s,l,d){return d=Fs(d),d.tag=3,d.payload={element:null},d.callback=function(){wd(s,l)},d}function U2(s){return s=Fs(s),s.tag=3,s}function W2(s,l,d,m){var k=d.type.getDerivedStateFromError;if(typeof k=="function"){var S=m.value;s.payload=function(){return k(S)},s.callback=function(){H2(l,d,m)}}var L=d.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(s.callback=function(){H2(l,d,m),typeof k!="function"&&(Us===null?Us=new Set([this]):Us.add(this));var q=m.stack;this.componentDidCatch(m.value,{componentStack:q!==null?q:""})})}function v4(s,l,d,m,k){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=d.alternate,l!==null&&Xl(l,d,k,!0),d=Pr.current,d!==null){switch(d.tag){case 31:case 13:return on===null?Dd():d.alternate===null&&ci===0&&(ci=3),d.flags&=-257,d.flags|=65536,d.lanes=k,m===ud?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([m]):l.add(m),Ky(s,m,k)),!1;case 22:return d.flags|=65536,m===ud?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([m])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([m]):d.add(m)),Ky(s,m,k)),!1}throw Error(n(435,d.tag))}return Ky(s,m,k),Dd(),!1}if(xe)return l=Pr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=k,m!==Gm&&(s=Error(n(422),{cause:m}),jh(rn(s,d)))):(m!==Gm&&(l=Error(n(423),{cause:m}),jh(rn(l,d))),s=s.current.alternate,s.flags|=65536,k&=-k,s.lanes|=k,m=rn(m,d),k=By(s.stateNode,m,k),ry(s,k),ci!==4&&(ci=2)),!1;var S=Error(n(520),{cause:m});if(S=rn(S,d),Kh===null?Kh=[S]:Kh.push(S),ci!==4&&(ci=2),l===null)return!0;m=rn(m,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=k&-k,d.lanes|=s,s=By(d.stateNode,m,s),ry(d,s),!1;case 1:if(l=d.type,S=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Us===null||!Us.has(S))))return d.flags|=65536,k&=-k,d.lanes|=k,k=U2(k),W2(k,s,d,m),ry(d,k),!1}d=d.return}while(d!==null);return!1}var Ay=Error(n(461)),Ci=!1;function Wi(s,l,d,m){l.child=s===null?XC(l,null,d,m):Ho(l,s.child,d,m)}function G2(s,l,d,m,k){d=d.render;var S=l.ref;if("ref"in m){var L={};for(var q in m)q!=="ref"&&(L[q]=m[q])}else L=m;return zo(l),m=cy(s,l,d,L,S,k),q=hy(),s!==null&&!Ci?(uy(s,l,k),Ia(s,l,k)):(xe&&q&&Um(l),l.flags|=1,Wi(s,l,m,k),l.child)}function Y2(s,l,d,m,k){if(s===null){var S=d.type;return typeof S=="function"&&!qm(S)&&S.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=S,V2(s,l,S,m,k)):(s=ad(d.type,null,m,l,l.mode,k),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!Dy(s,k)){var L=S.memoizedProps;if(d=d.compare,d=d!==null?d:Mh,d(L,m)&&s.ref===l.ref)return Ia(s,l,k)}return l.flags|=1,s=Oa(S,m),s.ref=l.ref,s.return=l,l.child=s}function V2(s,l,d,m,k){if(s!==null){var S=s.memoizedProps;if(Mh(S,m)&&s.ref===l.ref)if(Ci=!1,l.pendingProps=m=S,Dy(s,k))(s.flags&131072)!==0&&(Ci=!0);else return l.lanes=s.lanes,Ia(s,l,k)}return Ey(s,l,d,m,k)}function X2(s,l,d,m){var k=m.children,S=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((l.flags&128)!==0){if(S=S!==null?S.baseLanes|d:d,s!==null){for(m=l.child=s.child,k=0;m!==null;)k=k|m.lanes|m.childLanes,m=m.sibling;m=k&~S}else m=0,l.child=null;return Q2(s,l,S,d,m)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&cd(l,S!==null?S.cachePool:null),S!==null?KC(l,S):ay(),JC(l);else return m=l.lanes=536870912,Q2(s,l,S!==null?S.baseLanes|d:d,d,m)}else S!==null?(cd(l,S.cachePool),KC(l,S),Is(),l.memoizedState=null):(s!==null&&cd(l,null),ay(),Is());return Wi(s,l,k,d),l.child}function Wh(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Q2(s,l,d,m,k){var S=Jm();return S=S===null?null:{parent:bi._currentValue,pool:S},l.memoizedState={baseLanes:d,cachePool:S},s!==null&&cd(l,null),ay(),JC(l),s!==null&&Xl(s,l,m,!0),l.childLanes=k,null}function Sd(s,l){return l=Bd({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function Z2(s,l,d){return Ho(l,s.child,null,d),s=Sd(l,l.pendingProps),s.flags|=2,Hr(l),l.memoizedState=null,s}function C4(s,l,d){var m=l.pendingProps,k=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(xe){if(m.mode==="hidden")return s=Sd(l,m),l.lanes=536870912,Wh(null,s);if(oy(l),(s=Qe)?(s=c_(s,sn),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Ns!==null?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},d=OC(s),d.return=l,l.child=d,Hi=l,Qe=null)):s=null,s===null)throw Os(l);return l.lanes=536870912,null}return Sd(l,m)}var S=s.memoizedState;if(S!==null){var L=S.dehydrated;if(oy(l),k)if(l.flags&256)l.flags&=-257,l=Z2(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(Ci||Xl(s,l,d,!1),k=(d&s.childLanes)!==0,Ci||k){if(m=Ye,m!==null&&(L=kn(m,d),L!==0&&L!==S.retryLane))throw S.retryLane=L,Ro(s,L),Er(m,s,L),Ay;Dd(),l=Z2(s,l,d)}else s=S.treeContext,Qe=ln(L.nextSibling),Hi=l,xe=!0,js=null,sn=!1,s!==null&&FC(l,s),l=Sd(l,m),l.flags|=4096;return l}return s=Oa(s.child,{mode:m.mode,children:m.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Td(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(n(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function Ey(s,l,d,m,k){return zo(l),d=cy(s,l,d,m,void 0,k),m=hy(),s!==null&&!Ci?(uy(s,l,k),Ia(s,l,k)):(xe&&m&&Um(l),l.flags|=1,Wi(s,l,d,k),l.child)}function K2(s,l,d,m,k,S){return zo(l),l.updateQueue=null,d=e2(l,m,d,k),t2(s),m=hy(),s!==null&&!Ci?(uy(s,l,S),Ia(s,l,S)):(xe&&m&&Um(l),l.flags|=1,Wi(s,l,d,S),l.child)}function J2(s,l,d,m,k){if(zo(l),l.stateNode===null){var S=Wl,L=d.contextType;typeof L=="object"&&L!==null&&(S=Ui(L)),S=new d(m,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=Ty,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=m,S.state=l.memoizedState,S.refs={},ey(l),L=d.contextType,S.context=typeof L=="object"&&L!==null?Ui(L):Wl,S.state=l.memoizedState,L=d.getDerivedStateFromProps,typeof L=="function"&&(Sy(l,d,L,m),S.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(L=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),L!==S.state&&Ty.enqueueReplaceState(S,S.state,null),Ih(l,m,S,k),zh(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(s===null){S=l.stateNode;var q=l.memoizedProps,Q=Wo(d,q);S.props=Q;var ct=S.context,yt=d.contextType;L=Wl,typeof yt=="object"&&yt!==null&&(L=Ui(yt));var vt=d.getDerivedStateFromProps;yt=typeof vt=="function"||typeof S.getSnapshotBeforeUpdate=="function",q=l.pendingProps!==q,yt||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(q||ct!==L)&&z2(l,S,m,L),Ds=!1;var ht=l.memoizedState;S.state=ht,Ih(l,m,S,k),zh(),ct=l.memoizedState,q||ht!==ct||Ds?(typeof vt=="function"&&(Sy(l,d,vt,m),ct=l.memoizedState),(Q=Ds||$2(l,d,Q,m,ht,ct,L))?(yt||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=ct),S.props=m,S.state=ct,S.context=L,m=Q):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{S=l.stateNode,iy(s,l),L=l.memoizedProps,yt=Wo(d,L),S.props=yt,vt=l.pendingProps,ht=S.context,ct=d.contextType,Q=Wl,typeof ct=="object"&&ct!==null&&(Q=Ui(ct)),q=d.getDerivedStateFromProps,(ct=typeof q=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==vt||ht!==Q)&&z2(l,S,m,Q),Ds=!1,ht=l.memoizedState,S.state=ht,Ih(l,m,S,k),zh();var dt=l.memoizedState;L!==vt||ht!==dt||Ds||s!==null&&s.dependencies!==null&&od(s.dependencies)?(typeof q=="function"&&(Sy(l,d,q,m),dt=l.memoizedState),(yt=Ds||$2(l,d,yt,m,ht,dt,Q)||s!==null&&s.dependencies!==null&&od(s.dependencies))?(ct||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(m,dt,Q),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(m,dt,Q)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||L===s.memoizedProps&&ht===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===s.memoizedProps&&ht===s.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=dt),S.props=m,S.state=dt,S.context=Q,m=yt):(typeof S.componentDidUpdate!="function"||L===s.memoizedProps&&ht===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===s.memoizedProps&&ht===s.memoizedState||(l.flags|=1024),m=!1)}return S=m,Td(s,l),m=(l.flags&128)!==0,S||m?(S=l.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,s!==null&&m?(l.child=Ho(l,s.child,null,k),l.child=Ho(l,null,d,k)):Wi(s,l,d,k),l.memoizedState=S.state,s=l.child):s=Ia(s,l,k),s}function tk(s,l,d,m){return Fo(),l.flags|=256,Wi(s,l,d,m),l.child}var My={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ly(s){return{baseLanes:s,cachePool:HC()}}function Ny(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Wr),s}function ek(s,l,d){var m=l.pendingProps,k=!1,S=(l.flags&128)!==0,L;if((L=S)||(L=s!==null&&s.memoizedState===null?!1:(di.current&2)!==0),L&&(k=!0,l.flags&=-129),L=(l.flags&32)!==0,l.flags&=-33,s===null){if(xe){if(k?zs(l):Is(),(s=Qe)?(s=c_(s,sn),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Ns!==null?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},d=OC(s),d.return=l,l.child=d,Hi=l,Qe=null)):s=null,s===null)throw Os(l);return p0(s)?l.lanes=32:l.lanes=536870912,null}var q=m.children;return m=m.fallback,k?(Is(),k=l.mode,q=Bd({mode:"hidden",children:q},k),m=Do(m,k,d,null),q.return=l,m.return=l,q.sibling=m,l.child=q,m=l.child,m.memoizedState=Ly(d),m.childLanes=Ny(s,L,d),l.memoizedState=My,Wh(null,m)):(zs(l),jy(l,q))}var Q=s.memoizedState;if(Q!==null&&(q=Q.dehydrated,q!==null)){if(S)l.flags&256?(zs(l),l.flags&=-257,l=Oy(s,l,d)):l.memoizedState!==null?(Is(),l.child=s.child,l.flags|=128,l=null):(Is(),q=m.fallback,k=l.mode,m=Bd({mode:"visible",children:m.children},k),q=Do(q,k,d,null),q.flags|=2,m.return=l,q.return=l,m.sibling=q,l.child=m,Ho(l,s.child,null,d),m=l.child,m.memoizedState=Ly(d),m.childLanes=Ny(s,L,d),l.memoizedState=My,l=Wh(null,m));else if(zs(l),p0(q)){if(L=q.nextSibling&&q.nextSibling.dataset,L)var ct=L.dgst;L=ct,m=Error(n(419)),m.stack="",m.digest=L,jh({value:m,source:null,stack:null}),l=Oy(s,l,d)}else if(Ci||Xl(s,l,d,!1),L=(d&s.childLanes)!==0,Ci||L){if(L=Ye,L!==null&&(m=kn(L,d),m!==0&&m!==Q.retryLane))throw Q.retryLane=m,Ro(s,m),Er(L,s,m),Ay;d0(q)||Dd(),l=Oy(s,l,d)}else d0(q)?(l.flags|=192,l.child=s.child,l=null):(s=Q.treeContext,Qe=ln(q.nextSibling),Hi=l,xe=!0,js=null,sn=!1,s!==null&&FC(l,s),l=jy(l,m.children),l.flags|=4096);return l}return k?(Is(),q=m.fallback,k=l.mode,Q=s.child,ct=Q.sibling,m=Oa(Q,{mode:"hidden",children:m.children}),m.subtreeFlags=Q.subtreeFlags&65011712,ct!==null?q=Oa(ct,q):(q=Do(q,k,d,null),q.flags|=2),q.return=l,m.return=l,m.sibling=q,l.child=m,Wh(null,m),m=l.child,q=s.child.memoizedState,q===null?q=Ly(d):(k=q.cachePool,k!==null?(Q=bi._currentValue,k=k.parent!==Q?{parent:Q,pool:Q}:k):k=HC(),q={baseLanes:q.baseLanes|d,cachePool:k}),m.memoizedState=q,m.childLanes=Ny(s,L,d),l.memoizedState=My,Wh(s.child,m)):(zs(l),d=s.child,s=d.sibling,d=Oa(d,{mode:"visible",children:m.children}),d.return=l,d.sibling=null,s!==null&&(L=l.deletions,L===null?(l.deletions=[s],l.flags|=16):L.push(s)),l.child=d,l.memoizedState=null,d)}function jy(s,l){return l=Bd({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Bd(s,l){return s=qr(22,s,null,l),s.lanes=0,s}function Oy(s,l,d){return Ho(l,s.child,null,d),s=jy(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function ik(s,l,d){s.lanes|=l;var m=s.alternate;m!==null&&(m.lanes|=l),Xm(s.return,l,d)}function Ry(s,l,d,m,k,S){var L=s.memoizedState;L===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:k,treeForkCount:S}:(L.isBackwards=l,L.rendering=null,L.renderingStartTime=0,L.last=m,L.tail=d,L.tailMode=k,L.treeForkCount=S)}function rk(s,l,d){var m=l.pendingProps,k=m.revealOrder,S=m.tail;m=m.children;var L=di.current,q=(L&2)!==0;if(q?(L=L&1|2,l.flags|=128):L&=1,ot(di,L),Wi(s,l,m,d),m=xe?Nh:0,!q&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&ik(s,d,l);else if(s.tag===19)ik(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break t;for(;s.sibling===null;){if(s.return===null||s.return===l)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(k){case"forwards":for(d=l.child,k=null;d!==null;)s=d.alternate,s!==null&&gd(s)===null&&(k=d),d=d.sibling;d=k,d===null?(k=l.child,l.child=null):(k=d.sibling,d.sibling=null),Ry(l,!1,k,d,S,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,k=l.child,l.child=null;k!==null;){if(s=k.alternate,s!==null&&gd(s)===null){l.child=k;break}s=k.sibling,k.sibling=d,d=k,k=s}Ry(l,!0,d,null,S,m);break;case"together":Ry(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function Ia(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),Hs|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Xl(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,d=Oa(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=Oa(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function Dy(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&od(s)))}function k4(s,l,d){switch(l.tag){case 3:at(l,l.stateNode.containerInfo),Rs(l,bi,s.memoizedState.cache),Fo();break;case 27:case 5:gt(l);break;case 4:at(l,l.stateNode.containerInfo);break;case 10:Rs(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,oy(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(zs(l),l.flags|=128,null):(d&l.child.childLanes)!==0?ek(s,l,d):(zs(l),s=Ia(s,l,d),s!==null?s.sibling:null);zs(l);break;case 19:var k=(s.flags&128)!==0;if(m=(d&l.childLanes)!==0,m||(Xl(s,l,d,!1),m=(d&l.childLanes)!==0),k){if(m)return rk(s,l,d);l.flags|=128}if(k=l.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),ot(di,di.current),m)break;return null;case 22:return l.lanes=0,X2(s,l,d,l.pendingProps);case 24:Rs(l,bi,s.memoizedState.cache)}return Ia(s,l,d)}function nk(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)Ci=!0;else{if(!Dy(s,d)&&(l.flags&128)===0)return Ci=!1,k4(s,l,d);Ci=(s.flags&131072)!==0}else Ci=!1,xe&&(l.flags&1048576)!==0&&DC(l,Nh,l.index);switch(l.lanes=0,l.tag){case 16:t:{var m=l.pendingProps;if(s=qo(l.elementType),l.type=s,typeof s=="function")qm(s)?(m=Wo(s,m),l.tag=1,l=J2(null,l,s,m,d)):(l.tag=0,l=Ey(null,l,s,m,d));else{if(s!=null){var k=s.$$typeof;if(k===E){l.tag=11,l=G2(null,l,s,m,d);break t}else if(k===M){l.tag=14,l=Y2(null,l,s,m,d);break t}}throw l=D(s)||s,Error(n(306,l,""))}}return l;case 0:return Ey(s,l,l.type,l.pendingProps,d);case 1:return m=l.type,k=Wo(m,l.pendingProps),J2(s,l,m,k,d);case 3:t:{if(at(l,l.stateNode.containerInfo),s===null)throw Error(n(387));m=l.pendingProps;var S=l.memoizedState;k=S.element,iy(s,l),Ih(l,m,null,d);var L=l.memoizedState;if(m=L.cache,Rs(l,bi,m),m!==S.cache&&Qm(l,[bi],d,!0),zh(),m=L.element,S.isDehydrated)if(S={element:m,isDehydrated:!1,cache:L.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=tk(s,l,m,d);break t}else if(m!==k){k=rn(Error(n(424)),l),jh(k),l=tk(s,l,m,d);break t}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Qe=ln(s.firstChild),Hi=l,xe=!0,js=null,sn=!0,d=XC(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Fo(),m===k){l=Ia(s,l,d);break t}Wi(s,l,m,d)}l=l.child}return l;case 26:return Td(s,l),s===null?(d=g_(l.type,null,l.pendingProps,null))?l.memoizedState=d:xe||(d=l.type,s=l.pendingProps,m=Hd(kt.current).createElement(d),m[ai]=l,m[yi]=s,Gi(m,d,s),He(m),l.stateNode=m):l.memoizedState=g_(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return gt(l),s===null&&xe&&(m=l.stateNode=f_(l.type,l.pendingProps,kt.current),Hi=l,sn=!0,k=Qe,Vs(l.type)?(g0=k,Qe=ln(m.firstChild)):Qe=k),Wi(s,l,l.pendingProps.children,d),Td(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&xe&&((k=m=Qe)&&(m=K4(m,l.type,l.pendingProps,sn),m!==null?(l.stateNode=m,Hi=l,Qe=ln(m.firstChild),sn=!1,k=!0):k=!1),k||Os(l)),gt(l),k=l.type,S=l.pendingProps,L=s!==null?s.memoizedProps:null,m=S.children,h0(k,S)?m=null:L!==null&&h0(k,L)&&(l.flags|=32),l.memoizedState!==null&&(k=cy(s,l,d4,null,null,d),su._currentValue=k),Td(s,l),Wi(s,l,m,d),l.child;case 6:return s===null&&xe&&((s=d=Qe)&&(d=J4(d,l.pendingProps,sn),d!==null?(l.stateNode=d,Hi=l,Qe=null,s=!0):s=!1),s||Os(l)),null;case 13:return ek(s,l,d);case 4:return at(l,l.stateNode.containerInfo),m=l.pendingProps,s===null?l.child=Ho(l,null,m,d):Wi(s,l,m,d),l.child;case 11:return G2(s,l,l.type,l.pendingProps,d);case 7:return Wi(s,l,l.pendingProps,d),l.child;case 8:return Wi(s,l,l.pendingProps.children,d),l.child;case 12:return Wi(s,l,l.pendingProps.children,d),l.child;case 10:return m=l.pendingProps,Rs(l,l.type,m.value),Wi(s,l,m.children,d),l.child;case 9:return k=l.type._context,m=l.pendingProps.children,zo(l),k=Ui(k),m=m(k),l.flags|=1,Wi(s,l,m,d),l.child;case 14:return Y2(s,l,l.type,l.pendingProps,d);case 15:return V2(s,l,l.type,l.pendingProps,d);case 19:return rk(s,l,d);case 31:return C4(s,l,d);case 22:return X2(s,l,d,l.pendingProps);case 24:return zo(l),m=Ui(bi),s===null?(k=Jm(),k===null&&(k=Ye,S=Zm(),k.pooledCache=S,S.refCount++,S!==null&&(k.pooledCacheLanes|=d),k=S),l.memoizedState={parent:m,cache:k},ey(l),Rs(l,bi,k)):((s.lanes&d)!==0&&(iy(s,l),Ih(l,null,null,d),zh()),k=s.memoizedState,S=l.memoizedState,k.parent!==m?(k={parent:m,cache:m},l.memoizedState=k,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=k),Rs(l,bi,m)):(m=S.cache,Rs(l,bi,m),m!==k.cache&&Qm(l,[bi],d,!0))),Wi(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function qa(s){s.flags|=4}function Fy(s,l,d,m,k){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(k&335544128)===k)if(s.stateNode.complete)s.flags|=8192;else if(Lk())s.flags|=8192;else throw Po=ud,ty}else s.flags&=-16777217}function ak(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!v_(l))if(Lk())s.flags|=8192;else throw Po=ud,ty}function Ad(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?ks():536870912,s.lanes|=l,oc|=l)}function Gh(s,l){if(!xe)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function Ze(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,m=0;if(l)for(var k=s.child;k!==null;)d|=k.lanes|k.childLanes,m|=k.subtreeFlags&65011712,m|=k.flags&65011712,k.return=s,k=k.sibling;else for(k=s.child;k!==null;)d|=k.lanes|k.childLanes,m|=k.subtreeFlags,m|=k.flags,k.return=s,k=k.sibling;return s.subtreeFlags|=m,s.childLanes=d,l}function _4(s,l,d){var m=l.pendingProps;switch(Wm(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(l),null;case 1:return Ze(l),null;case 3:return d=l.stateNode,m=null,s!==null&&(m=s.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),Fa(bi),Ct(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Vl(l)?qa(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Ym())),Ze(l),null;case 26:var k=l.type,S=l.memoizedState;return s===null?(qa(l),S!==null?(Ze(l),ak(l,S)):(Ze(l),Fy(l,k,null,m,d))):S?S!==s.memoizedState?(qa(l),Ze(l),ak(l,S)):(Ze(l),l.flags&=-16777217):(s=s.memoizedProps,s!==m&&qa(l),Ze(l),Fy(l,k,s,m,d)),null;case 27:if(Bt(l),d=kt.current,k=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&qa(l);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Ze(l),null}s=st.current,Vl(l)?$C(l):(s=f_(k,m,d),l.stateNode=s,qa(l))}return Ze(l),null;case 5:if(Bt(l),k=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&qa(l);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Ze(l),null}if(S=st.current,Vl(l))$C(l);else{var L=Hd(kt.current);switch(S){case 1:S=L.createElementNS("http://www.w3.org/2000/svg",k);break;case 2:S=L.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;default:switch(k){case"svg":S=L.createElementNS("http://www.w3.org/2000/svg",k);break;case"math":S=L.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;case"script":S=L.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof m.is=="string"?L.createElement("select",{is:m.is}):L.createElement("select"),m.multiple?S.multiple=!0:m.size&&(S.size=m.size);break;default:S=typeof m.is=="string"?L.createElement(k,{is:m.is}):L.createElement(k)}}S[ai]=l,S[yi]=m;t:for(L=l.child;L!==null;){if(L.tag===5||L.tag===6)S.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===l)break t;for(;L.sibling===null;){if(L.return===null||L.return===l)break t;L=L.return}L.sibling.return=L.return,L=L.sibling}l.stateNode=S;t:switch(Gi(S,k,m),k){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break t;case"img":m=!0;break t;default:m=!1}m&&qa(l)}}return Ze(l),Fy(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==m&&qa(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(n(166));if(s=kt.current,Vl(l)){if(s=l.stateNode,d=l.memoizedProps,m=null,k=Hi,k!==null)switch(k.tag){case 27:case 5:m=k.memoizedProps}s[ai]=l,s=!!(s.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||e_(s.nodeValue,d)),s||Os(l,!0)}else s=Hd(s).createTextNode(m),s[ai]=l,l.stateNode=s}return Ze(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(m=Vl(l),d!==null){if(s===null){if(!m)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[ai]=l}else Fo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ze(l),s=!1}else d=Ym(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Hr(l),l):(Hr(l),null);if((l.flags&128)!==0)throw Error(n(558))}return Ze(l),null;case 13:if(m=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(k=Vl(l),m!==null&&m.dehydrated!==null){if(s===null){if(!k)throw Error(n(318));if(k=l.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(n(317));k[ai]=l}else Fo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ze(l),k=!1}else k=Ym(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=k),k=!0;if(!k)return l.flags&256?(Hr(l),l):(Hr(l),null)}return Hr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=m!==null,s=s!==null&&s.memoizedState!==null,d&&(m=l.child,k=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(k=m.alternate.memoizedState.cachePool.pool),S=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(S=m.memoizedState.cachePool.pool),S!==k&&(m.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),Ad(l,l.updateQueue),Ze(l),null);case 4:return Ct(),s===null&&a0(l.stateNode.containerInfo),Ze(l),null;case 10:return Fa(l.type),Ze(l),null;case 19:if(tt(di),m=l.memoizedState,m===null)return Ze(l),null;if(k=(l.flags&128)!==0,S=m.rendering,S===null)if(k)Gh(m,!1);else{if(ci!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=gd(s),S!==null){for(l.flags|=128,Gh(m,!1),s=S.updateQueue,l.updateQueue=s,Ad(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)jC(d,s),d=d.sibling;return ot(di,di.current&1|2),xe&&Ra(l,m.treeForkCount),l.child}s=s.sibling}m.tail!==null&&Pe()>jd&&(l.flags|=128,k=!0,Gh(m,!1),l.lanes=4194304)}else{if(!k)if(s=gd(S),s!==null){if(l.flags|=128,k=!0,s=s.updateQueue,l.updateQueue=s,Ad(l,s),Gh(m,!0),m.tail===null&&m.tailMode==="hidden"&&!S.alternate&&!xe)return Ze(l),null}else 2*Pe()-m.renderingStartTime>jd&&d!==536870912&&(l.flags|=128,k=!0,Gh(m,!1),l.lanes=4194304);m.isBackwards?(S.sibling=l.child,l.child=S):(s=m.last,s!==null?s.sibling=S:l.child=S,m.last=S)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=Pe(),s.sibling=null,d=di.current,ot(di,k?d&1|2:d&1),xe&&Ra(l,m.treeForkCount),s):(Ze(l),null);case 22:case 23:return Hr(l),sy(),m=l.memoizedState!==null,s!==null?s.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(d&536870912)!==0&&(l.flags&128)===0&&(Ze(l),l.subtreeFlags&6&&(l.flags|=8192)):Ze(l),d=l.updateQueue,d!==null&&Ad(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048),s!==null&&tt(Io),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Fa(bi),Ze(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function w4(s,l){switch(Wm(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return Fa(bi),Ct(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Bt(l),null;case 31:if(l.memoizedState!==null){if(Hr(l),l.alternate===null)throw Error(n(340));Fo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Hr(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Fo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return tt(di),null;case 4:return Ct(),null;case 10:return Fa(l.type),null;case 22:case 23:return Hr(l),sy(),s!==null&&tt(Io),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return Fa(bi),null;case 25:return null;default:return null}}function sk(s,l){switch(Wm(l),l.tag){case 3:Fa(bi),Ct();break;case 26:case 27:case 5:Bt(l);break;case 4:Ct();break;case 31:l.memoizedState!==null&&Hr(l);break;case 13:Hr(l);break;case 19:tt(di);break;case 10:Fa(l.type);break;case 22:case 23:Hr(l),sy(),s!==null&&tt(Io);break;case 24:Fa(bi)}}function Yh(s,l){try{var d=l.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var k=m.next;d=k;do{if((d.tag&s)===s){m=void 0;var S=d.create,L=d.inst;m=S(),L.destroy=m}d=d.next}while(d!==k)}}catch(q){Ie(l,l.return,q)}}function qs(s,l,d){try{var m=l.updateQueue,k=m!==null?m.lastEffect:null;if(k!==null){var S=k.next;m=S;do{if((m.tag&s)===s){var L=m.inst,q=L.destroy;if(q!==void 0){L.destroy=void 0,k=l;var Q=d,ct=q;try{ct()}catch(yt){Ie(k,Q,yt)}}}m=m.next}while(m!==S)}}catch(yt){Ie(l,l.return,yt)}}function ok(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{ZC(l,d)}catch(m){Ie(s,s.return,m)}}}function lk(s,l,d){d.props=Wo(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(m){Ie(s,l,m)}}function Vh(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var m=s.stateNode;break;case 30:m=s.stateNode;break;default:m=s.stateNode}typeof d=="function"?s.refCleanup=d(m):d.current=m}}catch(k){Ie(s,l,k)}}function oa(s,l){var d=s.ref,m=s.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(k){Ie(s,l,k)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(k){Ie(s,l,k)}else d.current=null}function ck(s){var l=s.type,d=s.memoizedProps,m=s.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&m.focus();break t;case"img":d.src?m.src=d.src:d.srcSet&&(m.srcset=d.srcSet)}}catch(k){Ie(s,s.return,k)}}function $y(s,l,d){try{var m=s.stateNode;G4(m,s.type,d,l),m[yi]=l}catch(k){Ie(s,s.return,k)}}function hk(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Vs(s.type)||s.tag===4}function zy(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||hk(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Vs(s.type)||s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Iy(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Na));else if(m!==4&&(m===27&&Vs(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(Iy(s,l,d),s=s.sibling;s!==null;)Iy(s,l,d),s=s.sibling}function Ed(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(m!==4&&(m===27&&Vs(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(Ed(s,l,d),s=s.sibling;s!==null;)Ed(s,l,d),s=s.sibling}function uk(s){var l=s.stateNode,d=s.memoizedProps;try{for(var m=s.type,k=l.attributes;k.length;)l.removeAttributeNode(k[0]);Gi(l,m,d),l[ai]=s,l[yi]=d}catch(S){Ie(s,s.return,S)}}var Pa=!1,ki=!1,qy=!1,fk=typeof WeakSet=="function"?WeakSet:Set,Di=null;function S4(s,l){if(s=s.containerInfo,l0=Qd,s=wC(s),Om(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else t:{d=(d=s.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var k=m.anchorOffset,S=m.focusNode;m=m.focusOffset;try{d.nodeType,S.nodeType}catch{d=null;break t}var L=0,q=-1,Q=-1,ct=0,yt=0,vt=s,ht=null;e:for(;;){for(var dt;vt!==d||k!==0&&vt.nodeType!==3||(q=L+k),vt!==S||m!==0&&vt.nodeType!==3||(Q=L+m),vt.nodeType===3&&(L+=vt.nodeValue.length),(dt=vt.firstChild)!==null;)ht=vt,vt=dt;for(;;){if(vt===s)break e;if(ht===d&&++ct===k&&(q=L),ht===S&&++yt===m&&(Q=L),(dt=vt.nextSibling)!==null)break;vt=ht,ht=vt.parentNode}vt=dt}d=q===-1||Q===-1?null:{start:q,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(c0={focusedElem:s,selectionRange:d},Qd=!1,Di=l;Di!==null;)if(l=Di,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Di=s;else for(;Di!==null;){switch(l=Di,S=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)k=s[d],k.ref.impl=k.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&S!==null){s=void 0,d=l,k=S.memoizedProps,S=S.memoizedState,m=d.stateNode;try{var Rt=Wo(d.type,k);s=m.getSnapshotBeforeUpdate(Rt,S),m.__reactInternalSnapshotBeforeUpdate=s}catch(Kt){Ie(d,d.return,Kt)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)f0(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":f0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=l.sibling,s!==null){s.return=l.return,Di=s;break}Di=l.return}}function dk(s,l,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:Ua(s,d),m&4&&Yh(5,d);break;case 1:if(Ua(s,d),m&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(L){Ie(d,d.return,L)}else{var k=Wo(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(k,l,s.__reactInternalSnapshotBeforeUpdate)}catch(L){Ie(d,d.return,L)}}m&64&&ok(d),m&512&&Vh(d,d.return);break;case 3:if(Ua(s,d),m&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{ZC(s,l)}catch(L){Ie(d,d.return,L)}}break;case 27:l===null&&m&4&&uk(d);case 26:case 5:Ua(s,d),l===null&&m&4&&ck(d),m&512&&Vh(d,d.return);break;case 12:Ua(s,d);break;case 31:Ua(s,d),m&4&&mk(s,d);break;case 13:Ua(s,d),m&4&&yk(s,d),m&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=O4.bind(null,d),t6(s,d))));break;case 22:if(m=d.memoizedState!==null||Pa,!m){l=l!==null&&l.memoizedState!==null||ki,k=Pa;var S=ki;Pa=m,(ki=l)&&!S?Wa(s,d,(d.subtreeFlags&8772)!==0):Ua(s,d),Pa=k,ki=S}break;case 30:break;default:Ua(s,d)}}function pk(s){var l=s.alternate;l!==null&&(s.alternate=null,pk(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&Es(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var ti=null,Sr=!1;function Ha(s,l,d){for(d=d.child;d!==null;)gk(s,l,d),d=d.sibling}function gk(s,l,d){if(Si&&typeof Si.onCommitFiberUnmount=="function")try{Si.onCommitFiberUnmount(Zi,d)}catch{}switch(d.tag){case 26:ki||oa(d,l),Ha(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:ki||oa(d,l);var m=ti,k=Sr;Vs(d.type)&&(ti=d.stateNode,Sr=!1),Ha(s,l,d),ru(d.stateNode),ti=m,Sr=k;break;case 5:ki||oa(d,l);case 6:if(m=ti,k=Sr,ti=null,Ha(s,l,d),ti=m,Sr=k,ti!==null)if(Sr)try{(ti.nodeType===9?ti.body:ti.nodeName==="HTML"?ti.ownerDocument.body:ti).removeChild(d.stateNode)}catch(S){Ie(d,l,S)}else try{ti.removeChild(d.stateNode)}catch(S){Ie(d,l,S)}break;case 18:ti!==null&&(Sr?(s=ti,o_(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),gc(s)):o_(ti,d.stateNode));break;case 4:m=ti,k=Sr,ti=d.stateNode.containerInfo,Sr=!0,Ha(s,l,d),ti=m,Sr=k;break;case 0:case 11:case 14:case 15:qs(2,d,l),ki||qs(4,d,l),Ha(s,l,d);break;case 1:ki||(oa(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"&&lk(d,l,m)),Ha(s,l,d);break;case 21:Ha(s,l,d);break;case 22:ki=(m=ki)||d.memoizedState!==null,Ha(s,l,d),ki=m;break;default:Ha(s,l,d)}}function mk(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{gc(s)}catch(d){Ie(l,l.return,d)}}}function yk(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{gc(s)}catch(d){Ie(l,l.return,d)}}function T4(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new fk),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new fk),l;default:throw Error(n(435,s.tag))}}function Md(s,l){var d=T4(s);l.forEach(function(m){if(!d.has(m)){d.add(m);var k=R4.bind(null,s,m);m.then(k,k)}})}function Tr(s,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var k=d[m],S=s,L=l,q=L;t:for(;q!==null;){switch(q.tag){case 27:if(Vs(q.type)){ti=q.stateNode,Sr=!1;break t}break;case 5:ti=q.stateNode,Sr=!1;break t;case 3:case 4:ti=q.stateNode.containerInfo,Sr=!0;break t}q=q.return}if(ti===null)throw Error(n(160));gk(S,L,k),ti=null,Sr=!1,S=k.alternate,S!==null&&(S.return=null),k.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)xk(l,s),l=l.sibling}var En=null;function xk(s,l){var d=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Tr(l,s),Br(s),m&4&&(qs(3,s,s.return),Yh(3,s),qs(5,s,s.return));break;case 1:Tr(l,s),Br(s),m&512&&(ki||d===null||oa(d,d.return)),m&64&&Pa&&(s=s.updateQueue,s!==null&&(m=s.callbacks,m!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?m:d.concat(m))));break;case 26:var k=En;if(Tr(l,s),Br(s),m&512&&(ki||d===null||oa(d,d.return)),m&4){var S=d!==null?d.memoizedState:null;if(m=s.memoizedState,d===null)if(m===null)if(s.stateNode===null){t:{m=s.type,d=s.memoizedProps,k=k.ownerDocument||k;e:switch(m){case"title":S=k.getElementsByTagName("title")[0],(!S||S[ia]||S[ai]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=k.createElement(m),k.head.insertBefore(S,k.querySelector("head > title"))),Gi(S,m,d),S[ai]=s,He(S),m=S;break t;case"link":var L=x_("link","href",k).get(m+(d.href||""));if(L){for(var q=0;q<L.length;q++)if(S=L[q],S.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&S.getAttribute("rel")===(d.rel==null?null:d.rel)&&S.getAttribute("title")===(d.title==null?null:d.title)&&S.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){L.splice(q,1);break e}}S=k.createElement(m),Gi(S,m,d),k.head.appendChild(S);break;case"meta":if(L=x_("meta","content",k).get(m+(d.content||""))){for(q=0;q<L.length;q++)if(S=L[q],S.getAttribute("content")===(d.content==null?null:""+d.content)&&S.getAttribute("name")===(d.name==null?null:d.name)&&S.getAttribute("property")===(d.property==null?null:d.property)&&S.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&S.getAttribute("charset")===(d.charSet==null?null:d.charSet)){L.splice(q,1);break e}}S=k.createElement(m),Gi(S,m,d),k.head.appendChild(S);break;default:throw Error(n(468,m))}S[ai]=s,He(S),m=S}s.stateNode=m}else b_(k,s.type,s.stateNode);else s.stateNode=y_(k,m,s.memoizedProps);else S!==m?(S===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):S.count--,m===null?b_(k,s.type,s.stateNode):y_(k,m,s.memoizedProps)):m===null&&s.stateNode!==null&&$y(s,s.memoizedProps,d.memoizedProps)}break;case 27:Tr(l,s),Br(s),m&512&&(ki||d===null||oa(d,d.return)),d!==null&&m&4&&$y(s,s.memoizedProps,d.memoizedProps);break;case 5:if(Tr(l,s),Br(s),m&512&&(ki||d===null||oa(d,d.return)),s.flags&32){k=s.stateNode;try{_e(k,"")}catch(Rt){Ie(s,s.return,Rt)}}m&4&&s.stateNode!=null&&(k=s.memoizedProps,$y(s,k,d!==null?d.memoizedProps:k)),m&1024&&(qy=!0);break;case 6:if(Tr(l,s),Br(s),m&4){if(s.stateNode===null)throw Error(n(162));m=s.memoizedProps,d=s.stateNode;try{d.nodeValue=m}catch(Rt){Ie(s,s.return,Rt)}}break;case 3:if(Gd=null,k=En,En=Ud(l.containerInfo),Tr(l,s),En=k,Br(s),m&4&&d!==null&&d.memoizedState.isDehydrated)try{gc(l.containerInfo)}catch(Rt){Ie(s,s.return,Rt)}qy&&(qy=!1,bk(s));break;case 4:m=En,En=Ud(s.stateNode.containerInfo),Tr(l,s),Br(s),En=m;break;case 12:Tr(l,s),Br(s);break;case 31:Tr(l,s),Br(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Md(s,m)));break;case 13:Tr(l,s),Br(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Nd=Pe()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Md(s,m)));break;case 22:k=s.memoizedState!==null;var Q=d!==null&&d.memoizedState!==null,ct=Pa,yt=ki;if(Pa=ct||k,ki=yt||Q,Tr(l,s),ki=yt,Pa=ct,Br(s),m&8192)t:for(l=s.stateNode,l._visibility=k?l._visibility&-2:l._visibility|1,k&&(d===null||Q||Pa||ki||Go(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){Q=d=l;try{if(S=Q.stateNode,k)L=S.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{q=Q.stateNode;var vt=Q.memoizedProps.style,ht=vt!=null&&vt.hasOwnProperty("display")?vt.display:null;q.style.display=ht==null||typeof ht=="boolean"?"":(""+ht).trim()}}catch(Rt){Ie(Q,Q.return,Rt)}}}else if(l.tag===6){if(d===null){Q=l;try{Q.stateNode.nodeValue=k?"":Q.memoizedProps}catch(Rt){Ie(Q,Q.return,Rt)}}}else if(l.tag===18){if(d===null){Q=l;try{var dt=Q.stateNode;k?l_(dt,!0):l_(Q.stateNode,!1)}catch(Rt){Ie(Q,Q.return,Rt)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break t;for(;l.sibling===null;){if(l.return===null||l.return===s)break t;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}m&4&&(m=s.updateQueue,m!==null&&(d=m.retryQueue,d!==null&&(m.retryQueue=null,Md(s,d))));break;case 19:Tr(l,s),Br(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Md(s,m)));break;case 30:break;case 21:break;default:Tr(l,s),Br(s)}}function Br(s){var l=s.flags;if(l&2){try{for(var d,m=s.return;m!==null;){if(hk(m)){d=m;break}m=m.return}if(d==null)throw Error(n(160));switch(d.tag){case 27:var k=d.stateNode,S=zy(s);Ed(s,S,k);break;case 5:var L=d.stateNode;d.flags&32&&(_e(L,""),d.flags&=-33);var q=zy(s);Ed(s,q,L);break;case 3:case 4:var Q=d.stateNode.containerInfo,ct=zy(s);Iy(s,ct,Q);break;default:throw Error(n(161))}}catch(yt){Ie(s,s.return,yt)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function bk(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;bk(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Ua(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)dk(s,l.alternate,l),l=l.sibling}function Go(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:qs(4,l,l.return),Go(l);break;case 1:oa(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&lk(l,l.return,d),Go(l);break;case 27:ru(l.stateNode);case 26:case 5:oa(l,l.return),Go(l);break;case 22:l.memoizedState===null&&Go(l);break;case 30:Go(l);break;default:Go(l)}s=s.sibling}}function Wa(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,k=s,S=l,L=S.flags;switch(S.tag){case 0:case 11:case 15:Wa(k,S,d),Yh(4,S);break;case 1:if(Wa(k,S,d),m=S,k=m.stateNode,typeof k.componentDidMount=="function")try{k.componentDidMount()}catch(ct){Ie(m,m.return,ct)}if(m=S,k=m.updateQueue,k!==null){var q=m.stateNode;try{var Q=k.shared.hiddenCallbacks;if(Q!==null)for(k.shared.hiddenCallbacks=null,k=0;k<Q.length;k++)QC(Q[k],q)}catch(ct){Ie(m,m.return,ct)}}d&&L&64&&ok(S),Vh(S,S.return);break;case 27:uk(S);case 26:case 5:Wa(k,S,d),d&&m===null&&L&4&&ck(S),Vh(S,S.return);break;case 12:Wa(k,S,d);break;case 31:Wa(k,S,d),d&&L&4&&mk(k,S);break;case 13:Wa(k,S,d),d&&L&4&&yk(k,S);break;case 22:S.memoizedState===null&&Wa(k,S,d),Vh(S,S.return);break;case 30:break;default:Wa(k,S,d)}l=l.sibling}}function Py(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Oh(d))}function Hy(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Oh(s))}function Mn(s,l,d,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)vk(s,l,d,m),l=l.sibling}function vk(s,l,d,m){var k=l.flags;switch(l.tag){case 0:case 11:case 15:Mn(s,l,d,m),k&2048&&Yh(9,l);break;case 1:Mn(s,l,d,m);break;case 3:Mn(s,l,d,m),k&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Oh(s)));break;case 12:if(k&2048){Mn(s,l,d,m),s=l.stateNode;try{var S=l.memoizedProps,L=S.id,q=S.onPostCommit;typeof q=="function"&&q(L,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Q){Ie(l,l.return,Q)}}else Mn(s,l,d,m);break;case 31:Mn(s,l,d,m);break;case 13:Mn(s,l,d,m);break;case 23:break;case 22:S=l.stateNode,L=l.alternate,l.memoizedState!==null?S._visibility&2?Mn(s,l,d,m):Xh(s,l):S._visibility&2?Mn(s,l,d,m):(S._visibility|=2,nc(s,l,d,m,(l.subtreeFlags&10256)!==0||!1)),k&2048&&Py(L,l);break;case 24:Mn(s,l,d,m),k&2048&&Hy(l.alternate,l);break;default:Mn(s,l,d,m)}}function nc(s,l,d,m,k){for(k=k&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=s,L=l,q=d,Q=m,ct=L.flags;switch(L.tag){case 0:case 11:case 15:nc(S,L,q,Q,k),Yh(8,L);break;case 23:break;case 22:var yt=L.stateNode;L.memoizedState!==null?yt._visibility&2?nc(S,L,q,Q,k):Xh(S,L):(yt._visibility|=2,nc(S,L,q,Q,k)),k&&ct&2048&&Py(L.alternate,L);break;case 24:nc(S,L,q,Q,k),k&&ct&2048&&Hy(L.alternate,L);break;default:nc(S,L,q,Q,k)}l=l.sibling}}function Xh(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,m=l,k=m.flags;switch(m.tag){case 22:Xh(d,m),k&2048&&Py(m.alternate,m);break;case 24:Xh(d,m),k&2048&&Hy(m.alternate,m);break;default:Xh(d,m)}l=l.sibling}}var Qh=8192;function ac(s,l,d){if(s.subtreeFlags&Qh)for(s=s.child;s!==null;)Ck(s,l,d),s=s.sibling}function Ck(s,l,d){switch(s.tag){case 26:ac(s,l,d),s.flags&Qh&&s.memoizedState!==null&&f6(d,En,s.memoizedState,s.memoizedProps);break;case 5:ac(s,l,d);break;case 3:case 4:var m=En;En=Ud(s.stateNode.containerInfo),ac(s,l,d),En=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=Qh,Qh=16777216,ac(s,l,d),Qh=m):ac(s,l,d));break;default:ac(s,l,d)}}function kk(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function Zh(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];Di=m,wk(m,s)}kk(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)_k(s),s=s.sibling}function _k(s){switch(s.tag){case 0:case 11:case 15:Zh(s),s.flags&2048&&qs(9,s,s.return);break;case 3:Zh(s);break;case 12:Zh(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Ld(s)):Zh(s);break;default:Zh(s)}}function Ld(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];Di=m,wk(m,s)}kk(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:qs(8,l,l.return),Ld(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Ld(l));break;default:Ld(l)}s=s.sibling}}function wk(s,l){for(;Di!==null;){var d=Di;switch(d.tag){case 0:case 11:case 15:qs(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var m=d.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Oh(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,Di=m;else t:for(d=s;Di!==null;){m=Di;var k=m.sibling,S=m.return;if(pk(m),m===d){Di=null;break t}if(k!==null){k.return=S,Di=k;break t}Di=S}}}var B4={getCacheForType:function(s){var l=Ui(bi),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return Ui(bi).controller.signal}},A4=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ye=null,de=null,ge=0,ze=0,Ur=null,Ps=!1,sc=!1,Uy=!1,Ga=0,ci=0,Hs=0,Yo=0,Wy=0,Wr=0,oc=0,Kh=null,Ar=null,Gy=!1,Nd=0,Sk=0,jd=1/0,Od=null,Us=null,Ti=0,Ws=null,lc=null,Ya=0,Yy=0,Vy=null,Tk=null,Jh=0,Xy=null;function Gr(){return(Le&2)!==0&&ge!==0?ge&-ge:R.T!==null?e0():_n()}function Bk(){if(Wr===0)if((ge&536870912)===0||xe){var s=Qn;Qn<<=1,(Qn&3932160)===0&&(Qn=262144),Wr=s}else Wr=536870912;return s=Pr.current,s!==null&&(s.flags|=32),Wr}function Er(s,l,d){(s===Ye&&(ze===2||ze===9)||s.cancelPendingCommit!==null)&&(cc(s,0),Gs(s,ge,Wr,!1)),Fe(s,d),((Le&2)===0||s!==Ye)&&(s===Ye&&((Le&2)===0&&(Yo|=d),ci===4&&Gs(s,ge,Wr,!1)),la(s))}function Ak(s,l,d){if((Le&6)!==0)throw Error(n(327));var m=!d&&(l&127)===0&&(l&s.expiredLanes)===0||Cn(s,l),k=m?L4(s,l):Zy(s,l,!0),S=m;do{if(k===0){sc&&!m&&Gs(s,l,0,!1);break}else{if(d=s.current.alternate,S&&!E4(d)){k=Zy(s,l,!1),S=!1;continue}if(k===2){if(S=l,s.errorRecoveryDisabledLanes&S)var L=0;else L=s.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){l=L;t:{var q=s;k=Kh;var Q=q.current.memoizedState.isDehydrated;if(Q&&(cc(q,L).flags|=256),L=Zy(q,L,!1),L!==2){if(Uy&&!Q){q.errorRecoveryDisabledLanes|=S,Yo|=S,k=4;break t}S=Ar,Ar=k,S!==null&&(Ar===null?Ar=S:Ar.push.apply(Ar,S))}k=L}if(S=!1,k!==2)continue}}if(k===1){cc(s,0),Gs(s,l,0,!0);break}t:{switch(m=s,S=k,S){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:Gs(m,l,Wr,!Ps);break t;case 2:Ar=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(k=Nd+300-Pe(),10<k)){if(Gs(m,l,Wr,!Ps),Zn(m,0,!0)!==0)break t;Ya=l,m.timeoutHandle=a_(Ek.bind(null,m,d,Ar,Od,Gy,l,Wr,Yo,oc,Ps,S,"Throttled",-0,0),k);break t}Ek(m,d,Ar,Od,Gy,l,Wr,Yo,oc,Ps,S,null,-0,0)}}break}while(!0);la(s)}function Ek(s,l,d,m,k,S,L,q,Q,ct,yt,vt,ht,dt){if(s.timeoutHandle=-1,vt=l.subtreeFlags,vt&8192||(vt&16785408)===16785408){vt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Na},Ck(l,S,vt);var Rt=(S&62914560)===S?Nd-Pe():(S&4194048)===S?Sk-Pe():0;if(Rt=d6(vt,Rt),Rt!==null){Ya=S,s.cancelPendingCommit=Rt(Fk.bind(null,s,l,S,d,m,k,L,q,Q,yt,vt,null,ht,dt)),Gs(s,S,L,!ct);return}}Fk(s,l,S,d,m,k,L,q,Q)}function E4(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var m=0;m<d.length;m++){var k=d[m],S=k.getSnapshot;k=k.value;try{if(!Ir(S(),k))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Gs(s,l,d,m){l&=~Wy,l&=~Yo,s.suspendedLanes|=l,s.pingedLanes&=~l,m&&(s.warmLanes|=l),m=s.expirationTimes;for(var k=l;0<k;){var S=31-mi(k),L=1<<S;m[S]=-1,k&=~L}d!==0&&ws(s,d,l)}function Rd(){return(Le&6)===0?(tu(0),!1):!0}function Qy(){if(de!==null){if(ze===0)var s=de.return;else s=de,Da=$o=null,fy(s),Jl=null,Dh=0,s=de;for(;s!==null;)sk(s.alternate,s),s=s.return;de=null}}function cc(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,X4(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),Ya=0,Qy(),Ye=s,de=d=Oa(s.current,null),ge=l,ze=0,Ur=null,Ps=!1,sc=Cn(s,l),Uy=!1,oc=Wr=Wy=Yo=Hs=ci=0,Ar=Kh=null,Gy=!1,(l&8)!==0&&(l|=l&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=l;0<m;){var k=31-mi(m),S=1<<k;l|=s[k],m&=~S}return Ga=l,id(),d}function Mk(s,l){oe=null,R.H=Uh,l===Kl||l===hd?(l=GC(),ze=3):l===ty?(l=GC(),ze=4):ze=l===Ay?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Ur=l,de===null&&(ci=1,wd(s,rn(l,s.current)))}function Lk(){var s=Pr.current;return s===null?!0:(ge&4194048)===ge?on===null:(ge&62914560)===ge||(ge&536870912)!==0?s===on:!1}function Nk(){var s=R.H;return R.H=Uh,s===null?Uh:s}function jk(){var s=R.A;return R.A=B4,s}function Dd(){ci=4,Ps||(ge&4194048)!==ge&&Pr.current!==null||(sc=!0),(Hs&134217727)===0&&(Yo&134217727)===0||Ye===null||Gs(Ye,ge,Wr,!1)}function Zy(s,l,d){var m=Le;Le|=2;var k=Nk(),S=jk();(Ye!==s||ge!==l)&&(Od=null,cc(s,l)),l=!1;var L=ci;t:do try{if(ze!==0&&de!==null){var q=de,Q=Ur;switch(ze){case 8:Qy(),L=6;break t;case 3:case 2:case 9:case 6:Pr.current===null&&(l=!0);var ct=ze;if(ze=0,Ur=null,hc(s,q,Q,ct),d&&sc){L=0;break t}break;default:ct=ze,ze=0,Ur=null,hc(s,q,Q,ct)}}M4(),L=ci;break}catch(yt){Mk(s,yt)}while(!0);return l&&s.shellSuspendCounter++,Da=$o=null,Le=m,R.H=k,R.A=S,de===null&&(Ye=null,ge=0,id()),L}function M4(){for(;de!==null;)Ok(de)}function L4(s,l){var d=Le;Le|=2;var m=Nk(),k=jk();Ye!==s||ge!==l?(Od=null,jd=Pe()+500,cc(s,l)):sc=Cn(s,l);t:do try{if(ze!==0&&de!==null){l=de;var S=Ur;e:switch(ze){case 1:ze=0,Ur=null,hc(s,l,S,1);break;case 2:case 9:if(UC(S)){ze=0,Ur=null,Rk(l);break}l=function(){ze!==2&&ze!==9||Ye!==s||(ze=7),la(s)},S.then(l,l);break t;case 3:ze=7;break t;case 4:ze=5;break t;case 7:UC(S)?(ze=0,Ur=null,Rk(l)):(ze=0,Ur=null,hc(s,l,S,7));break;case 5:var L=null;switch(de.tag){case 26:L=de.memoizedState;case 5:case 27:var q=de;if(L?v_(L):q.stateNode.complete){ze=0,Ur=null;var Q=q.sibling;if(Q!==null)de=Q;else{var ct=q.return;ct!==null?(de=ct,Fd(ct)):de=null}break e}}ze=0,Ur=null,hc(s,l,S,5);break;case 6:ze=0,Ur=null,hc(s,l,S,6);break;case 8:Qy(),ci=6;break t;default:throw Error(n(462))}}N4();break}catch(yt){Mk(s,yt)}while(!0);return Da=$o=null,R.H=m,R.A=k,Le=d,de!==null?0:(Ye=null,ge=0,id(),ci)}function N4(){for(;de!==null&&!De();)Ok(de)}function Ok(s){var l=nk(s.alternate,s,Ga);s.memoizedProps=s.pendingProps,l===null?Fd(s):de=l}function Rk(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=K2(d,l,l.pendingProps,l.type,void 0,ge);break;case 11:l=K2(d,l,l.pendingProps,l.type.render,l.ref,ge);break;case 5:fy(l);default:sk(d,l),l=de=jC(l,Ga),l=nk(d,l,Ga)}s.memoizedProps=s.pendingProps,l===null?Fd(s):de=l}function hc(s,l,d,m){Da=$o=null,fy(l),Jl=null,Dh=0;var k=l.return;try{if(v4(s,k,l,d,ge)){ci=1,wd(s,rn(d,s.current)),de=null;return}}catch(S){if(k!==null)throw de=k,S;ci=1,wd(s,rn(d,s.current)),de=null;return}l.flags&32768?(xe||m===1?s=!0:sc||(ge&536870912)!==0?s=!1:(Ps=s=!0,(m===2||m===9||m===3||m===6)&&(m=Pr.current,m!==null&&m.tag===13&&(m.flags|=16384))),Dk(l,s)):Fd(l)}function Fd(s){var l=s;do{if((l.flags&32768)!==0){Dk(l,Ps);return}s=l.return;var d=_4(l.alternate,l,Ga);if(d!==null){de=d;return}if(l=l.sibling,l!==null){de=l;return}de=l=s}while(l!==null);ci===0&&(ci=5)}function Dk(s,l){do{var d=w4(s.alternate,s);if(d!==null){d.flags&=32767,de=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){de=s;return}de=s=d}while(s!==null);ci=6,de=null}function Fk(s,l,d,m,k,S,L,q,Q){s.cancelPendingCommit=null;do $d();while(Ti!==0);if((Le&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=zm,Jn(s,d,S,L,q,Q),s===Ye&&(de=Ye=null,ge=0),lc=l,Ws=s,Ya=d,Yy=S,Vy=k,Tk=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,D4(Fr,function(){return Pk(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=R.T,R.T=null,k=I.p,I.p=2,L=Le,Le|=4;try{S4(s,l,d)}finally{Le=L,I.p=k,R.T=m}}Ti=1,$k(),zk(),Ik()}}function $k(){if(Ti===1){Ti=0;var s=Ws,l=lc,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=R.T,R.T=null;var m=I.p;I.p=2;var k=Le;Le|=4;try{xk(l,s);var S=c0,L=wC(s.containerInfo),q=S.focusedElem,Q=S.selectionRange;if(L!==q&&q&&q.ownerDocument&&_C(q.ownerDocument.documentElement,q)){if(Q!==null&&Om(q)){var ct=Q.start,yt=Q.end;if(yt===void 0&&(yt=ct),"selectionStart"in q)q.selectionStart=ct,q.selectionEnd=Math.min(yt,q.value.length);else{var vt=q.ownerDocument||document,ht=vt&&vt.defaultView||window;if(ht.getSelection){var dt=ht.getSelection(),Rt=q.textContent.length,Kt=Math.min(Q.start,Rt),Ge=Q.end===void 0?Kt:Math.min(Q.end,Rt);!dt.extend&&Kt>Ge&&(L=Ge,Ge=Kt,Kt=L);var nt=kC(q,Kt),et=kC(q,Ge);if(nt&&et&&(dt.rangeCount!==1||dt.anchorNode!==nt.node||dt.anchorOffset!==nt.offset||dt.focusNode!==et.node||dt.focusOffset!==et.offset)){var lt=vt.createRange();lt.setStart(nt.node,nt.offset),dt.removeAllRanges(),Kt>Ge?(dt.addRange(lt),dt.extend(et.node,et.offset)):(lt.setEnd(et.node,et.offset),dt.addRange(lt))}}}}for(vt=[],dt=q;dt=dt.parentNode;)dt.nodeType===1&&vt.push({element:dt,left:dt.scrollLeft,top:dt.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<vt.length;q++){var xt=vt[q];xt.element.scrollLeft=xt.left,xt.element.scrollTop=xt.top}}Qd=!!l0,c0=l0=null}finally{Le=k,I.p=m,R.T=d}}s.current=l,Ti=2}}function zk(){if(Ti===2){Ti=0;var s=Ws,l=lc,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=R.T,R.T=null;var m=I.p;I.p=2;var k=Le;Le|=4;try{dk(s,l.alternate,l)}finally{Le=k,I.p=m,R.T=d}}Ti=3}}function Ik(){if(Ti===4||Ti===3){Ti=0,Ni();var s=Ws,l=lc,d=Ya,m=Tk;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Ti=5:(Ti=0,lc=Ws=null,qk(s,s.pendingLanes));var k=s.pendingLanes;if(k===0&&(Us=null),Bs(d),l=l.stateNode,Si&&typeof Si.onCommitFiberRoot=="function")try{Si.onCommitFiberRoot(Zi,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=R.T,k=I.p,I.p=2,R.T=null;try{for(var S=s.onRecoverableError,L=0;L<m.length;L++){var q=m[L];S(q.value,{componentStack:q.stack})}}finally{R.T=l,I.p=k}}(Ya&3)!==0&&$d(),la(s),k=s.pendingLanes,(d&261930)!==0&&(k&42)!==0?s===Xy?Jh++:(Jh=0,Xy=s):Jh=0,tu(0)}}function qk(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Oh(l)))}function $d(){return $k(),zk(),Ik(),Pk()}function Pk(){if(Ti!==5)return!1;var s=Ws,l=Yy;Yy=0;var d=Bs(Ya),m=R.T,k=I.p;try{I.p=32>d?32:d,R.T=null,d=Vy,Vy=null;var S=Ws,L=Ya;if(Ti=0,lc=Ws=null,Ya=0,(Le&6)!==0)throw Error(n(331));var q=Le;if(Le|=4,_k(S.current),vk(S,S.current,L,d),Le=q,tu(0,!1),Si&&typeof Si.onPostCommitFiberRoot=="function")try{Si.onPostCommitFiberRoot(Zi,S)}catch{}return!0}finally{I.p=k,R.T=m,qk(s,l)}}function Hk(s,l,d){l=rn(d,l),l=By(s.stateNode,l,2),s=$s(s,l,2),s!==null&&(Fe(s,2),la(s))}function Ie(s,l,d){if(s.tag===3)Hk(s,s,d);else for(;l!==null;){if(l.tag===3){Hk(l,s,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Us===null||!Us.has(m))){s=rn(d,s),d=U2(2),m=$s(l,d,2),m!==null&&(W2(d,m,l,s),Fe(m,2),la(m));break}}l=l.return}}function Ky(s,l,d){var m=s.pingCache;if(m===null){m=s.pingCache=new A4;var k=new Set;m.set(l,k)}else k=m.get(l),k===void 0&&(k=new Set,m.set(l,k));k.has(d)||(Uy=!0,k.add(d),s=j4.bind(null,s,l,d),l.then(s,s))}function j4(s,l,d){var m=s.pingCache;m!==null&&m.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,Ye===s&&(ge&d)===d&&(ci===4||ci===3&&(ge&62914560)===ge&&300>Pe()-Nd?(Le&2)===0&&cc(s,0):Wy|=d,oc===ge&&(oc=0)),la(s)}function Uk(s,l){l===0&&(l=ks()),s=Ro(s,l),s!==null&&(Fe(s,l),la(s))}function O4(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),Uk(s,d)}function R4(s,l){var d=0;switch(s.tag){case 31:case 13:var m=s.stateNode,k=s.memoizedState;k!==null&&(d=k.retryLane);break;case 19:m=s.stateNode;break;case 22:m=s.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(l),Uk(s,d)}function D4(s,l){return ue(s,l)}var zd=null,uc=null,Jy=!1,Id=!1,t0=!1,Ys=0;function la(s){s!==uc&&s.next===null&&(uc===null?zd=uc=s:uc=uc.next=s),Id=!0,Jy||(Jy=!0,$4())}function tu(s,l){if(!t0&&Id){t0=!0;do for(var d=!1,m=zd;m!==null;){if(s!==0){var k=m.pendingLanes;if(k===0)var S=0;else{var L=m.suspendedLanes,q=m.pingedLanes;S=(1<<31-mi(42|s)+1)-1,S&=k&~(L&~q),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(d=!0,Vk(m,S))}else S=ge,S=Zn(m,m===Ye?S:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(S&3)===0||Cn(m,S)||(d=!0,Vk(m,S));m=m.next}while(d);t0=!1}}function F4(){Wk()}function Wk(){Id=Jy=!1;var s=0;Ys!==0&&V4()&&(s=Ys);for(var l=Pe(),d=null,m=zd;m!==null;){var k=m.next,S=Gk(m,l);S===0?(m.next=null,d===null?zd=k:d.next=k,k===null&&(uc=d)):(d=m,(s!==0||(S&3)!==0)&&(Id=!0)),m=k}Ti!==0&&Ti!==5||tu(s),Ys!==0&&(Ys=0)}function Gk(s,l){for(var d=s.suspendedLanes,m=s.pingedLanes,k=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var L=31-mi(S),q=1<<L,Q=k[L];Q===-1?((q&d)===0||(q&m)!==0)&&(k[L]=Kn(q,l)):Q<=l&&(s.expiredLanes|=q),S&=~q}if(l=Ye,d=ge,d=Zn(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,d===0||s===l&&(ze===2||ze===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&ke(m),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||Cn(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(m!==null&&ke(m),Bs(d)){case 2:case 8:d=Jr;break;case 32:d=Fr;break;case 268435456:d=lr;break;default:d=Fr}return m=Yk.bind(null,s),d=ue(d,m),s.callbackPriority=l,s.callbackNode=d,l}return m!==null&&m!==null&&ke(m),s.callbackPriority=2,s.callbackNode=null,2}function Yk(s,l){if(Ti!==0&&Ti!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if($d()&&s.callbackNode!==d)return null;var m=ge;return m=Zn(s,s===Ye?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(Ak(s,m,l),Gk(s,Pe()),s.callbackNode!=null&&s.callbackNode===d?Yk.bind(null,s):null)}function Vk(s,l){if($d())return null;Ak(s,l,!0)}function $4(){Q4(function(){(Le&6)!==0?ue(Gn,F4):Wk()})}function e0(){if(Ys===0){var s=Ql;s===0&&(s=Xn,Xn<<=1,(Xn&261888)===0&&(Xn=256)),Ys=s}return Ys}function Xk(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Vf(""+s)}function Qk(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function z4(s,l,d,m,k){if(l==="submit"&&d&&d.stateNode===k){var S=Xk((k[yi]||null).action),L=m.submitter;L&&(l=(l=L[yi]||null)?Xk(l.formAction):L.getAttribute("formAction"),l!==null&&(S=l,L=null));var q=new Kf("action","action",null,m,k);s.push({event:q,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Ys!==0){var Q=L?Qk(k,L):new FormData(k);Cy(d,{pending:!0,data:Q,method:k.method,action:S},null,Q)}}else typeof S=="function"&&(q.preventDefault(),Q=L?Qk(k,L):new FormData(k),Cy(d,{pending:!0,data:Q,method:k.method,action:S},S,Q))},currentTarget:k}]})}}for(var i0=0;i0<$m.length;i0++){var r0=$m[i0],I4=r0.toLowerCase(),q4=r0[0].toUpperCase()+r0.slice(1);An(I4,"on"+q4)}An(BC,"onAnimationEnd"),An(AC,"onAnimationIteration"),An(EC,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(r4,"onTransitionRun"),An(n4,"onTransitionStart"),An(a4,"onTransitionCancel"),An(MC,"onTransitionEnd"),At("onMouseEnter",["mouseout","mouseover"]),At("onMouseLeave",["mouseout","mouseover"]),At("onPointerEnter",["pointerout","pointerover"]),At("onPointerLeave",["pointerout","pointerover"]),mt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mt("onBeforeInput",["compositionend","keypress","textInput","paste"]),mt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eu="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(" "),P4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(eu));function Zk(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var m=s[d],k=m.event;m=m.listeners;t:{var S=void 0;if(l)for(var L=m.length-1;0<=L;L--){var q=m[L],Q=q.instance,ct=q.currentTarget;if(q=q.listener,Q!==S&&k.isPropagationStopped())break t;S=q,k.currentTarget=ct;try{S(k)}catch(yt){ed(yt)}k.currentTarget=null,S=Q}else for(L=0;L<m.length;L++){if(q=m[L],Q=q.instance,ct=q.currentTarget,q=q.listener,Q!==S&&k.isPropagationStopped())break t;S=q,k.currentTarget=ct;try{S(k)}catch(yt){ed(yt)}k.currentTarget=null,S=Q}}}}function pe(s,l){var d=l[ta];d===void 0&&(d=l[ta]=new Set);var m=s+"__bubble";d.has(m)||(Kk(l,s,2,!1),d.add(m))}function n0(s,l,d){var m=0;l&&(m|=4),Kk(d,s,m,l)}var qd="_reactListening"+Math.random().toString(36).slice(2);function a0(s){if(!s[qd]){s[qd]=!0,Ot.forEach(function(d){d!=="selectionchange"&&(P4.has(d)||n0(d,!1,s),n0(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[qd]||(l[qd]=!0,n0("selectionchange",!1,l))}}function Kk(s,l,d,m){switch(B_(l)){case 2:var k=m6;break;case 8:k=y6;break;default:k=v0}d=k.bind(null,l,d,s),k=void 0,!Sm||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(k=!0),m?k!==void 0?s.addEventListener(l,d,{capture:!0,passive:k}):s.addEventListener(l,d,!0):k!==void 0?s.addEventListener(l,d,{passive:k}):s.addEventListener(l,d,!1)}function s0(s,l,d,m,k){var S=m;if((l&1)===0&&(l&2)===0&&m!==null)t:for(;;){if(m===null)return;var L=m.tag;if(L===3||L===4){var q=m.stateNode.containerInfo;if(q===k)break;if(L===4)for(L=m.return;L!==null;){var Q=L.tag;if((Q===3||Q===4)&&L.stateNode.containerInfo===k)return;L=L.return}for(;q!==null;){if(L=ra(q),L===null)return;if(Q=L.tag,Q===5||Q===6||Q===26||Q===27){m=S=L;continue t}q=q.parentNode}}m=m.return}rC(function(){var ct=S,yt=_m(d),vt=[];t:{var ht=LC.get(s);if(ht!==void 0){var dt=Kf,Rt=s;switch(s){case"keypress":if(Qf(d)===0)break t;case"keydown":case"keyup":dt=RO;break;case"focusin":Rt="focus",dt=Em;break;case"focusout":Rt="blur",dt=Em;break;case"beforeblur":case"afterblur":dt=Em;break;case"click":if(d.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":dt=sC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":dt=_O;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":dt=$O;break;case BC:case AC:case EC:dt=TO;break;case MC:dt=IO;break;case"scroll":case"scrollend":dt=CO;break;case"wheel":dt=PO;break;case"copy":case"cut":case"paste":dt=AO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":dt=lC;break;case"toggle":case"beforetoggle":dt=UO}var Kt=(l&4)!==0,Ge=!Kt&&(s==="scroll"||s==="scrollend"),nt=Kt?ht!==null?ht+"Capture":null:ht;Kt=[];for(var et=ct,lt;et!==null;){var xt=et;if(lt=xt.stateNode,xt=xt.tag,xt!==5&&xt!==26&&xt!==27||lt===null||nt===null||(xt=_h(et,nt),xt!=null&&Kt.push(iu(et,xt,lt))),Ge)break;et=et.return}0<Kt.length&&(ht=new dt(ht,Rt,null,d,yt),vt.push({event:ht,listeners:Kt}))}}if((l&7)===0){t:{if(ht=s==="mouseover"||s==="pointerover",dt=s==="mouseout"||s==="pointerout",ht&&d!==km&&(Rt=d.relatedTarget||d.fromElement)&&(ra(Rt)||Rt[wn]))break t;if((dt||ht)&&(ht=yt.window===yt?yt:(ht=yt.ownerDocument)?ht.defaultView||ht.parentWindow:window,dt?(Rt=d.relatedTarget||d.toElement,dt=ct,Rt=Rt?ra(Rt):null,Rt!==null&&(Ge=o(Rt),Kt=Rt.tag,Rt!==Ge||Kt!==5&&Kt!==27&&Kt!==6)&&(Rt=null)):(dt=null,Rt=ct),dt!==Rt)){if(Kt=sC,xt="onMouseLeave",nt="onMouseEnter",et="mouse",(s==="pointerout"||s==="pointerover")&&(Kt=lC,xt="onPointerLeave",nt="onPointerEnter",et="pointer"),Ge=dt==null?ht:Sn(dt),lt=Rt==null?ht:Sn(Rt),ht=new Kt(xt,et+"leave",dt,d,yt),ht.target=Ge,ht.relatedTarget=lt,xt=null,ra(yt)===ct&&(Kt=new Kt(nt,et+"enter",Rt,d,yt),Kt.target=lt,Kt.relatedTarget=Ge,xt=Kt),Ge=xt,dt&&Rt)e:{for(Kt=H4,nt=dt,et=Rt,lt=0,xt=nt;xt;xt=Kt(xt))lt++;xt=0;for(var Gt=et;Gt;Gt=Kt(Gt))xt++;for(;0<lt-xt;)nt=Kt(nt),lt--;for(;0<xt-lt;)et=Kt(et),xt--;for(;lt--;){if(nt===et||et!==null&&nt===et.alternate){Kt=nt;break e}nt=Kt(nt),et=Kt(et)}Kt=null}else Kt=null;dt!==null&&Jk(vt,ht,dt,Kt,!1),Rt!==null&&Ge!==null&&Jk(vt,Ge,Rt,Kt,!0)}}t:{if(ht=ct?Sn(ct):window,dt=ht.nodeName&&ht.nodeName.toLowerCase(),dt==="select"||dt==="input"&&ht.type==="file")var Te=mC;else if(pC(ht))if(yC)Te=t4;else{Te=KO;var zt=ZO}else dt=ht.nodeName,!dt||dt.toLowerCase()!=="input"||ht.type!=="checkbox"&&ht.type!=="radio"?ct&&Bn(ct.elementType)&&(Te=mC):Te=JO;if(Te&&(Te=Te(s,ct))){gC(vt,Te,d,yt);break t}zt&&zt(s,ht,ct),s==="focusout"&&ct&&ht.type==="number"&&ct.memoizedProps.value!=null&&wt(ht,"number",ht.value)}switch(zt=ct?Sn(ct):window,s){case"focusin":(pC(zt)||zt.contentEditable==="true")&&(Pl=zt,Rm=ct,Lh=null);break;case"focusout":Lh=Rm=Pl=null;break;case"mousedown":Dm=!0;break;case"contextmenu":case"mouseup":case"dragend":Dm=!1,SC(vt,d,yt);break;case"selectionchange":if(i4)break;case"keydown":case"keyup":SC(vt,d,yt)}var le;if(Lm)t:{switch(s){case"compositionstart":var me="onCompositionStart";break t;case"compositionend":me="onCompositionEnd";break t;case"compositionupdate":me="onCompositionUpdate";break t}me=void 0}else ql?fC(s,d)&&(me="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(me="onCompositionStart");me&&(cC&&d.locale!=="ko"&&(ql||me!=="onCompositionStart"?me==="onCompositionEnd"&&ql&&(le=nC()):(Ls=yt,Tm="value"in Ls?Ls.value:Ls.textContent,ql=!0)),zt=Pd(ct,me),0<zt.length&&(me=new oC(me,s,null,d,yt),vt.push({event:me,listeners:zt}),le?me.data=le:(le=dC(d),le!==null&&(me.data=le)))),(le=GO?YO(s,d):VO(s,d))&&(me=Pd(ct,"onBeforeInput"),0<me.length&&(zt=new oC("onBeforeInput","beforeinput",null,d,yt),vt.push({event:zt,listeners:me}),zt.data=le)),z4(vt,s,ct,d,yt)}Zk(vt,l)})}function iu(s,l,d){return{instance:s,listener:l,currentTarget:d}}function Pd(s,l){for(var d=l+"Capture",m=[];s!==null;){var k=s,S=k.stateNode;if(k=k.tag,k!==5&&k!==26&&k!==27||S===null||(k=_h(s,d),k!=null&&m.unshift(iu(s,k,S)),k=_h(s,l),k!=null&&m.push(iu(s,k,S))),s.tag===3)return m;s=s.return}return[]}function H4(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function Jk(s,l,d,m,k){for(var S=l._reactName,L=[];d!==null&&d!==m;){var q=d,Q=q.alternate,ct=q.stateNode;if(q=q.tag,Q!==null&&Q===m)break;q!==5&&q!==26&&q!==27||ct===null||(Q=ct,k?(ct=_h(d,S),ct!=null&&L.unshift(iu(d,ct,Q))):k||(ct=_h(d,S),ct!=null&&L.push(iu(d,ct,Q)))),d=d.return}L.length!==0&&s.push({event:l,listeners:L})}var U4=/\r\n?/g,W4=/\u0000|\uFFFD/g;function t_(s){return(typeof s=="string"?s:""+s).replace(U4,`
50
+ `).replace(W4,"")}function e_(s,l){return l=t_(l),t_(s)===l}function We(s,l,d,m,k,S){switch(d){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||_e(s,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&_e(s,""+m);break;case"className":Xe(s,"class",m);break;case"tabIndex":Xe(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Xe(s,d,m);break;case"style":La(s,m,S);break;case"data":if(l!=="object"){Xe(s,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=Vf(""+m),s.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="function"){s.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(d==="formAction"?(l!=="input"&&We(s,l,"name",k.name,k,null),We(s,l,"formEncType",k.formEncType,k,null),We(s,l,"formMethod",k.formMethod,k,null),We(s,l,"formTarget",k.formTarget,k,null)):(We(s,l,"encType",k.encType,k,null),We(s,l,"method",k.method,k,null),We(s,l,"target",k.target,k,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=Vf(""+m),s.setAttribute(d,m);break;case"onClick":m!=null&&(s.onclick=Na);break;case"onScroll":m!=null&&pe("scroll",s);break;case"onScrollEnd":m!=null&&pe("scrollend",s);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(k.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"multiple":s.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":s.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){s.removeAttribute("xlink:href");break}d=Vf(""+m),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""+m):s.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":m===!0?s.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,m):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?s.setAttribute(d,m):s.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?s.removeAttribute(d):s.setAttribute(d,m);break;case"popover":pe("beforetoggle",s),pe("toggle",s),Oi(s,"popover",m);break;case"xlinkActuate":Ri(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Ri(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Ri(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Ri(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Ri(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Ri(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Ri(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Ri(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Ri(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Oi(s,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=Gf.get(d)||d,Oi(s,d,m))}}function o0(s,l,d,m,k,S){switch(d){case"style":La(s,m,S);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(k.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"children":typeof m=="string"?_e(s,m):(typeof m=="number"||typeof m=="bigint")&&_e(s,""+m);break;case"onScroll":m!=null&&pe("scroll",s);break;case"onScrollEnd":m!=null&&pe("scrollend",s);break;case"onClick":m!=null&&(s.onclick=Na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Y.hasOwnProperty(d))t:{if(d[0]==="o"&&d[1]==="n"&&(k=d.endsWith("Capture"),l=d.slice(2,k?d.length-7:void 0),S=s[yi]||null,S=S!=null?S[d]:null,typeof S=="function"&&s.removeEventListener(l,S,k),typeof m=="function")){typeof S!="function"&&S!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,m,k);break t}d in s?s[d]=m:m===!0?s.setAttribute(d,""):Oi(s,d,m)}}}function Gi(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",s),pe("load",s);var m=!1,k=!1,S;for(S in d)if(d.hasOwnProperty(S)){var L=d[S];if(L!=null)switch(S){case"src":m=!0;break;case"srcSet":k=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:We(s,l,S,L,d,null)}}k&&We(s,l,"srcSet",d.srcSet,d,null),m&&We(s,l,"src",d.src,d,null);return;case"input":pe("invalid",s);var q=S=L=k=null,Q=null,ct=null;for(m in d)if(d.hasOwnProperty(m)){var yt=d[m];if(yt!=null)switch(m){case"name":k=yt;break;case"type":L=yt;break;case"checked":Q=yt;break;case"defaultChecked":ct=yt;break;case"value":S=yt;break;case"defaultValue":q=yt;break;case"children":case"dangerouslySetInnerHTML":if(yt!=null)throw Error(n(137,l));break;default:We(s,l,m,yt,d,null)}}ut(s,S,q,Q,ct,L,k,!1);return;case"select":pe("invalid",s),m=L=S=null;for(k in d)if(d.hasOwnProperty(k)&&(q=d[k],q!=null))switch(k){case"value":S=q;break;case"defaultValue":L=q;break;case"multiple":m=q;default:We(s,l,k,q,d,null)}l=S,d=L,s.multiple=!!m,l!=null?St(s,!!m,l,!1):d!=null&&St(s,!!m,d,!0);return;case"textarea":pe("invalid",s),S=k=m=null;for(L in d)if(d.hasOwnProperty(L)&&(q=d[L],q!=null))switch(L){case"value":m=q;break;case"defaultValue":k=q;break;case"children":S=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(n(91));break;default:We(s,l,L,q,d,null)}fe(s,m,k,S);return;case"option":for(Q in d)if(d.hasOwnProperty(Q)&&(m=d[Q],m!=null))switch(Q){case"selected":s.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:We(s,l,Q,m,d,null)}return;case"dialog":pe("beforetoggle",s),pe("toggle",s),pe("cancel",s),pe("close",s);break;case"iframe":case"object":pe("load",s);break;case"video":case"audio":for(m=0;m<eu.length;m++)pe(eu[m],s);break;case"image":pe("error",s),pe("load",s);break;case"details":pe("toggle",s);break;case"embed":case"source":case"link":pe("error",s),pe("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ct in d)if(d.hasOwnProperty(ct)&&(m=d[ct],m!=null))switch(ct){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:We(s,l,ct,m,d,null)}return;default:if(Bn(l)){for(yt in d)d.hasOwnProperty(yt)&&(m=d[yt],m!==void 0&&o0(s,l,yt,m,d,void 0));return}}for(q in d)d.hasOwnProperty(q)&&(m=d[q],m!=null&&We(s,l,q,m,d,null))}function G4(s,l,d,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var k=null,S=null,L=null,q=null,Q=null,ct=null,yt=null;for(dt in d){var vt=d[dt];if(d.hasOwnProperty(dt)&&vt!=null)switch(dt){case"checked":break;case"value":break;case"defaultValue":Q=vt;default:m.hasOwnProperty(dt)||We(s,l,dt,null,m,vt)}}for(var ht in m){var dt=m[ht];if(vt=d[ht],m.hasOwnProperty(ht)&&(dt!=null||vt!=null))switch(ht){case"type":S=dt;break;case"name":k=dt;break;case"checked":ct=dt;break;case"defaultChecked":yt=dt;break;case"value":L=dt;break;case"defaultValue":q=dt;break;case"children":case"dangerouslySetInnerHTML":if(dt!=null)throw Error(n(137,l));break;default:dt!==vt&&We(s,l,ht,dt,m,vt)}}na(s,L,q,Q,ct,yt,S,k);return;case"select":dt=L=q=ht=null;for(S in d)if(Q=d[S],d.hasOwnProperty(S)&&Q!=null)switch(S){case"value":break;case"multiple":dt=Q;default:m.hasOwnProperty(S)||We(s,l,S,null,m,Q)}for(k in m)if(S=m[k],Q=d[k],m.hasOwnProperty(k)&&(S!=null||Q!=null))switch(k){case"value":ht=S;break;case"defaultValue":q=S;break;case"multiple":L=S;default:S!==Q&&We(s,l,k,S,m,Q)}l=q,d=L,m=dt,ht!=null?St(s,!!d,ht,!1):!!m!=!!d&&(l!=null?St(s,!!d,l,!0):St(s,!!d,d?[]:"",!1));return;case"textarea":dt=ht=null;for(q in d)if(k=d[q],d.hasOwnProperty(q)&&k!=null&&!m.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:We(s,l,q,null,m,k)}for(L in m)if(k=m[L],S=d[L],m.hasOwnProperty(L)&&(k!=null||S!=null))switch(L){case"value":ht=k;break;case"defaultValue":dt=k;break;case"children":break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(n(91));break;default:k!==S&&We(s,l,L,k,m,S)}Nt(s,ht,dt);return;case"option":for(var Rt in d)if(ht=d[Rt],d.hasOwnProperty(Rt)&&ht!=null&&!m.hasOwnProperty(Rt))switch(Rt){case"selected":s.selected=!1;break;default:We(s,l,Rt,null,m,ht)}for(Q in m)if(ht=m[Q],dt=d[Q],m.hasOwnProperty(Q)&&ht!==dt&&(ht!=null||dt!=null))switch(Q){case"selected":s.selected=ht&&typeof ht!="function"&&typeof ht!="symbol";break;default:We(s,l,Q,ht,m,dt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Kt in d)ht=d[Kt],d.hasOwnProperty(Kt)&&ht!=null&&!m.hasOwnProperty(Kt)&&We(s,l,Kt,null,m,ht);for(ct in m)if(ht=m[ct],dt=d[ct],m.hasOwnProperty(ct)&&ht!==dt&&(ht!=null||dt!=null))switch(ct){case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(n(137,l));break;default:We(s,l,ct,ht,m,dt)}return;default:if(Bn(l)){for(var Ge in d)ht=d[Ge],d.hasOwnProperty(Ge)&&ht!==void 0&&!m.hasOwnProperty(Ge)&&o0(s,l,Ge,void 0,m,ht);for(yt in m)ht=m[yt],dt=d[yt],!m.hasOwnProperty(yt)||ht===dt||ht===void 0&&dt===void 0||o0(s,l,yt,ht,m,dt);return}}for(var nt in d)ht=d[nt],d.hasOwnProperty(nt)&&ht!=null&&!m.hasOwnProperty(nt)&&We(s,l,nt,null,m,ht);for(vt in m)ht=m[vt],dt=d[vt],!m.hasOwnProperty(vt)||ht===dt||ht==null&&dt==null||We(s,l,vt,ht,m,dt)}function i_(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Y4(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var k=d[m],S=k.transferSize,L=k.initiatorType,q=k.duration;if(S&&q&&i_(L)){for(L=0,q=k.responseEnd,m+=1;m<d.length;m++){var Q=d[m],ct=Q.startTime;if(ct>q)break;var yt=Q.transferSize,vt=Q.initiatorType;yt&&i_(vt)&&(Q=Q.responseEnd,L+=yt*(Q<q?1:(q-ct)/(Q-ct)))}if(--m,l+=8*(S+L)/(k.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var l0=null,c0=null;function Hd(s){return s.nodeType===9?s:s.ownerDocument}function r_(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function n_(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function h0(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var u0=null;function V4(){var s=window.event;return s&&s.type==="popstate"?s===u0?!1:(u0=s,!0):(u0=null,!1)}var a_=typeof setTimeout=="function"?setTimeout:void 0,X4=typeof clearTimeout=="function"?clearTimeout:void 0,s_=typeof Promise=="function"?Promise:void 0,Q4=typeof queueMicrotask=="function"?queueMicrotask:typeof s_<"u"?function(s){return s_.resolve(null).then(s).catch(Z4)}:a_;function Z4(s){setTimeout(function(){throw s})}function Vs(s){return s==="head"}function o_(s,l){var d=l,m=0;do{var k=d.nextSibling;if(s.removeChild(d),k&&k.nodeType===8)if(d=k.data,d==="/$"||d==="/&"){if(m===0){s.removeChild(k),gc(l);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")ru(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,ru(d);for(var S=d.firstChild;S;){var L=S.nextSibling,q=S.nodeName;S[ia]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&S.rel.toLowerCase()==="stylesheet"||d.removeChild(S),S=L}}else d==="body"&&ru(s.ownerDocument.body);d=k}while(d);gc(l)}function l_(s,l){var d=s;s=0;do{var m=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=m}while(d)}function f0(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":f0(d),Es(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function K4(s,l,d,m){for(;s.nodeType===1;){var k=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[ia])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(S=s.getAttribute("rel"),S==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(S!==k.rel||s.getAttribute("href")!==(k.href==null||k.href===""?null:k.href)||s.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin)||s.getAttribute("title")!==(k.title==null?null:k.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(S=s.getAttribute("src"),(S!==(k.src==null?null:k.src)||s.getAttribute("type")!==(k.type==null?null:k.type)||s.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin))&&S&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var S=k.name==null?null:""+k.name;if(k.type==="hidden"&&s.getAttribute("name")===S)return s}else return s;if(s=ln(s.nextSibling),s===null)break}return null}function J4(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ln(s.nextSibling),s===null))return null;return s}function c_(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ln(s.nextSibling),s===null))return null;return s}function d0(s){return s.data==="$?"||s.data==="$~"}function p0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function t6(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var m=function(){l(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),s._reactRetry=m}}function ln(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var g0=null;function h_(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ln(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function u_(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function f_(s,l,d){switch(l=Hd(d),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function ru(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Es(s)}var cn=new Map,d_=new Set;function Ud(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Va=I.d;I.d={f:e6,r:i6,D:r6,C:n6,L:a6,m:s6,X:l6,S:o6,M:c6};function e6(){var s=Va.f(),l=Rd();return s||l}function i6(s){var l=tn(s);l!==null&&l.tag===5&&l.type==="form"?M2(l):Va.r(s)}var fc=typeof document>"u"?null:document;function p_(s,l,d){var m=fc;if(m&&typeof l=="string"&&l){var k=hr(l);k='link[rel="'+s+'"][href="'+k+'"]',typeof d=="string"&&(k+='[crossorigin="'+d+'"]'),d_.has(k)||(d_.add(k),s={rel:s,crossOrigin:d,href:l},m.querySelector(k)===null&&(l=m.createElement("link"),Gi(l,"link",s),He(l),m.head.appendChild(l)))}}function r6(s){Va.D(s),p_("dns-prefetch",s,null)}function n6(s,l){Va.C(s,l),p_("preconnect",s,l)}function a6(s,l,d){Va.L(s,l,d);var m=fc;if(m&&s&&l){var k='link[rel="preload"][as="'+hr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(k+='[imagesrcset="'+hr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(k+='[imagesizes="'+hr(d.imageSizes)+'"]')):k+='[href="'+hr(s)+'"]';var S=k;switch(l){case"style":S=dc(s);break;case"script":S=pc(s)}cn.has(S)||(s=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),cn.set(S,s),m.querySelector(k)!==null||l==="style"&&m.querySelector(nu(S))||l==="script"&&m.querySelector(au(S))||(l=m.createElement("link"),Gi(l,"link",s),He(l),m.head.appendChild(l)))}}function s6(s,l){Va.m(s,l);var d=fc;if(d&&s){var m=l&&typeof l.as=="string"?l.as:"script",k='link[rel="modulepreload"][as="'+hr(m)+'"][href="'+hr(s)+'"]',S=k;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=pc(s)}if(!cn.has(S)&&(s=g({rel:"modulepreload",href:s},l),cn.set(S,s),d.querySelector(k)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(au(S)))return}m=d.createElement("link"),Gi(m,"link",s),He(m),d.head.appendChild(m)}}}function o6(s,l,d){Va.S(s,l,d);var m=fc;if(m&&s){var k=qi(m).hoistableStyles,S=dc(s);l=l||"default";var L=k.get(S);if(!L){var q={loading:0,preload:null};if(L=m.querySelector(nu(S)))q.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},d),(d=cn.get(S))&&m0(s,d);var Q=L=m.createElement("link");He(Q),Gi(Q,"link",s),Q._p=new Promise(function(ct,yt){Q.onload=ct,Q.onerror=yt}),Q.addEventListener("load",function(){q.loading|=1}),Q.addEventListener("error",function(){q.loading|=2}),q.loading|=4,Wd(L,l,m)}L={type:"stylesheet",instance:L,count:1,state:q},k.set(S,L)}}}function l6(s,l){Va.X(s,l);var d=fc;if(d&&s){var m=qi(d).hoistableScripts,k=pc(s),S=m.get(k);S||(S=d.querySelector(au(k)),S||(s=g({src:s,async:!0},l),(l=cn.get(k))&&y0(s,l),S=d.createElement("script"),He(S),Gi(S,"link",s),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(k,S))}}function c6(s,l){Va.M(s,l);var d=fc;if(d&&s){var m=qi(d).hoistableScripts,k=pc(s),S=m.get(k);S||(S=d.querySelector(au(k)),S||(s=g({src:s,async:!0,type:"module"},l),(l=cn.get(k))&&y0(s,l),S=d.createElement("script"),He(S),Gi(S,"link",s),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(k,S))}}function g_(s,l,d,m){var k=(k=kt.current)?Ud(k):null;if(!k)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=dc(d.href),d=qi(k).hoistableStyles,m=d.get(l),m||(m={type:"style",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=dc(d.href);var S=qi(k).hoistableStyles,L=S.get(s);if(L||(k=k.ownerDocument||k,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(s,L),(S=k.querySelector(nu(s)))&&!S._p&&(L.instance=S,L.state.loading=5),cn.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},cn.set(s,d),S||h6(k,s,d,L.state))),l&&m===null)throw Error(n(528,""));return L}if(l&&m!==null)throw Error(n(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=pc(d),d=qi(k).hoistableScripts,m=d.get(l),m||(m={type:"script",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function dc(s){return'href="'+hr(s)+'"'}function nu(s){return'link[rel="stylesheet"]['+s+"]"}function m_(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function h6(s,l,d,m){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=s.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),Gi(l,"link",d),He(l),s.head.appendChild(l))}function pc(s){return'[src="'+hr(s)+'"]'}function au(s){return"script[async]"+s}function y_(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var m=s.querySelector('style[data-href~="'+hr(d.href)+'"]');if(m)return l.instance=m,He(m),m;var k=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),He(m),Gi(m,"style",k),Wd(m,d.precedence,s),l.instance=m;case"stylesheet":k=dc(d.href);var S=s.querySelector(nu(k));if(S)return l.state.loading|=4,l.instance=S,He(S),S;m=m_(d),(k=cn.get(k))&&m0(m,k),S=(s.ownerDocument||s).createElement("link"),He(S);var L=S;return L._p=new Promise(function(q,Q){L.onload=q,L.onerror=Q}),Gi(S,"link",m),l.state.loading|=4,Wd(S,d.precedence,s),l.instance=S;case"script":return S=pc(d.src),(k=s.querySelector(au(S)))?(l.instance=k,He(k),k):(m=d,(k=cn.get(S))&&(m=g({},d),y0(m,k)),s=s.ownerDocument||s,k=s.createElement("script"),He(k),Gi(k,"link",m),s.head.appendChild(k),l.instance=k);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,Wd(m,d.precedence,s));return l.instance}function Wd(s,l,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=m.length?m[m.length-1]:null,S=k,L=0;L<m.length;L++){var q=m[L];if(q.dataset.precedence===l)S=q;else if(S!==k)break}S?S.parentNode.insertBefore(s,S.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function m0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function y0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Gd=null;function x_(s,l,d){if(Gd===null){var m=new Map,k=Gd=new Map;k.set(d,m)}else k=Gd,m=k.get(d),m||(m=new Map,k.set(d,m));if(m.has(s))return m;for(m.set(s,null),d=d.getElementsByTagName(s),k=0;k<d.length;k++){var S=d[k];if(!(S[ia]||S[ai]||s==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var L=S.getAttribute(l)||"";L=s+L;var q=m.get(L);q?q.push(S):m.set(L,[S])}}return m}function b_(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function u6(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function v_(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function f6(s,l,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var k=dc(m.href),S=l.querySelector(nu(k));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Yd.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=S,He(S);return}S=l.ownerDocument||l,m=m_(m),(k=cn.get(k))&&m0(m,k),S=S.createElement("link"),He(S);var L=S;L._p=new Promise(function(q,Q){L.onload=q,L.onerror=Q}),Gi(S,"link",m),d.instance=S}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=Yd.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var x0=0;function d6(s,l){return s.stylesheets&&s.count===0&&Xd(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var m=setTimeout(function(){if(s.stylesheets&&Xd(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&x0===0&&(x0=62500*Y4());var k=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Xd(s,s.stylesheets),s.unsuspend)){var S=s.unsuspend;s.unsuspend=null,S()}},(s.imgBytes>x0?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(k)}}:null}function Yd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Vd=null;function Xd(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Vd=new Map,l.forEach(p6,s),Vd=null,Yd.call(s))}function p6(s,l){if(!(l.state.loading&4)){var d=Vd.get(s);if(d)var m=d.get(null);else{d=new Map,Vd.set(s,d);for(var k=s.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<k.length;S++){var L=k[S];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(d.set(L.dataset.precedence,L),m=L)}m&&d.set(null,m)}k=l.instance,L=k.getAttribute("data-precedence"),S=d.get(L)||m,S===m&&d.set(null,k),d.set(L,k),this.count++,m=Yd.bind(this),k.addEventListener("load",m),k.addEventListener("error",m),S?S.parentNode.insertBefore(k,S.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(k,s.firstChild)),l.state.loading|=4}}var su={$$typeof:B,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function g6(s,l,d,m,k,S,L,q,Q){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_s(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_s(0),this.hiddenUpdates=_s(null),this.identifierPrefix=m,this.onUncaughtError=k,this.onCaughtError=S,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function C_(s,l,d,m,k,S,L,q,Q,ct,yt,vt){return s=new g6(s,l,d,L,Q,ct,yt,vt,q),l=1,S===!0&&(l|=24),S=qr(3,null,null,l),s.current=S,S.stateNode=s,l=Zm(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:m,isDehydrated:d,cache:l},ey(S),s}function k_(s){return s?(s=Wl,s):Wl}function __(s,l,d,m,k,S){k=k_(k),m.context===null?m.context=k:m.pendingContext=k,m=Fs(l),m.payload={element:d},S=S===void 0?null:S,S!==null&&(m.callback=S),d=$s(s,m,l),d!==null&&(Er(d,s,l),$h(d,s,l))}function w_(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function b0(s,l){w_(s,l),(s=s.alternate)&&w_(s,l)}function S_(s){if(s.tag===13||s.tag===31){var l=Ro(s,67108864);l!==null&&Er(l,s,67108864),b0(s,67108864)}}function T_(s){if(s.tag===13||s.tag===31){var l=Gr();l=Ts(l);var d=Ro(s,l);d!==null&&Er(d,s,l),b0(s,l)}}var Qd=!0;function m6(s,l,d,m){var k=R.T;R.T=null;var S=I.p;try{I.p=2,v0(s,l,d,m)}finally{I.p=S,R.T=k}}function y6(s,l,d,m){var k=R.T;R.T=null;var S=I.p;try{I.p=8,v0(s,l,d,m)}finally{I.p=S,R.T=k}}function v0(s,l,d,m){if(Qd){var k=C0(m);if(k===null)s0(s,l,m,Zd,d),A_(s,m);else if(b6(k,s,l,d,m))m.stopPropagation();else if(A_(s,m),l&4&&-1<x6.indexOf(s)){for(;k!==null;){var S=tn(k);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var L=zr(S.pendingLanes);if(L!==0){var q=S;for(q.pendingLanes|=2,q.entangledLanes|=2;L;){var Q=1<<31-mi(L);q.entanglements[1]|=Q,L&=~Q}la(S),(Le&6)===0&&(jd=Pe()+500,tu(0))}}break;case 31:case 13:q=Ro(S,2),q!==null&&Er(q,S,2),Rd(),b0(S,2)}if(S=C0(m),S===null&&s0(s,l,m,Zd,d),S===k)break;k=S}k!==null&&m.stopPropagation()}else s0(s,l,m,null,d)}}function C0(s){return s=_m(s),k0(s)}var Zd=null;function k0(s){if(Zd=null,s=ra(s),s!==null){var l=o(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=c(l),s!==null)return s;s=null}else if(d===31){if(s=h(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return Zd=s,null}function B_(s){switch(s){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(or()){case Gn:return 2;case Jr:return 8;case Fr:case Yn:return 32;case lr:return 268435456;default:return 32}default:return 32}}var _0=!1,Xs=null,Qs=null,Zs=null,ou=new Map,lu=new Map,Ks=[],x6="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".split(" ");function A_(s,l){switch(s){case"focusin":case"focusout":Xs=null;break;case"dragenter":case"dragleave":Qs=null;break;case"mouseover":case"mouseout":Zs=null;break;case"pointerover":case"pointerout":ou.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":lu.delete(l.pointerId)}}function cu(s,l,d,m,k,S){return s===null||s.nativeEvent!==S?(s={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:S,targetContainers:[k]},l!==null&&(l=tn(l),l!==null&&S_(l)),s):(s.eventSystemFlags|=m,l=s.targetContainers,k!==null&&l.indexOf(k)===-1&&l.push(k),s)}function b6(s,l,d,m,k){switch(l){case"focusin":return Xs=cu(Xs,s,l,d,m,k),!0;case"dragenter":return Qs=cu(Qs,s,l,d,m,k),!0;case"mouseover":return Zs=cu(Zs,s,l,d,m,k),!0;case"pointerover":var S=k.pointerId;return ou.set(S,cu(ou.get(S)||null,s,l,d,m,k)),!0;case"gotpointercapture":return S=k.pointerId,lu.set(S,cu(lu.get(S)||null,s,l,d,m,k)),!0}return!1}function E_(s){var l=ra(s.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=c(d),l!==null){s.blockedOn=l,Ki(s.priority,function(){T_(d)});return}}else if(l===31){if(l=h(d),l!==null){s.blockedOn=l,Ki(s.priority,function(){T_(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Kd(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=C0(s.nativeEvent);if(d===null){d=s.nativeEvent;var m=new d.constructor(d.type,d);km=m,d.target.dispatchEvent(m),km=null}else return l=tn(d),l!==null&&S_(l),s.blockedOn=d,!1;l.shift()}return!0}function M_(s,l,d){Kd(s)&&d.delete(l)}function v6(){_0=!1,Xs!==null&&Kd(Xs)&&(Xs=null),Qs!==null&&Kd(Qs)&&(Qs=null),Zs!==null&&Kd(Zs)&&(Zs=null),ou.forEach(M_),lu.forEach(M_)}function Jd(s,l){s.blockedOn===l&&(s.blockedOn=null,_0||(_0=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,v6)))}var tp=null;function L_(s){tp!==s&&(tp=s,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){tp===s&&(tp=null);for(var l=0;l<s.length;l+=3){var d=s[l],m=s[l+1],k=s[l+2];if(typeof m!="function"){if(k0(m||d)===null)continue;break}var S=tn(d);S!==null&&(s.splice(l,3),l-=3,Cy(S,{pending:!0,data:k,method:d.method,action:m},m,k))}}))}function gc(s){function l(Q){return Jd(Q,s)}Xs!==null&&Jd(Xs,s),Qs!==null&&Jd(Qs,s),Zs!==null&&Jd(Zs,s),ou.forEach(l),lu.forEach(l);for(var d=0;d<Ks.length;d++){var m=Ks[d];m.blockedOn===s&&(m.blockedOn=null)}for(;0<Ks.length&&(d=Ks[0],d.blockedOn===null);)E_(d),d.blockedOn===null&&Ks.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var k=d[m],S=d[m+1],L=k[yi]||null;if(typeof S=="function")L||L_(d);else if(L){var q=null;if(S&&S.hasAttribute("formAction")){if(k=S,L=S[yi]||null)q=L.formAction;else if(k0(k)!==null)continue}else q=L.action;typeof q=="function"?d[m+1]=q:(d.splice(m,3),m-=3),L_(d)}}}function N_(){function s(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(L){return k=L})},focusReset:"manual",scroll:"manual"})}function l(){k!==null&&(k(),k=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,k=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),k!==null&&(k(),k=null)}}}function w0(s){this._internalRoot=s}ep.prototype.render=w0.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var d=l.current,m=Gr();__(d,m,s,l,null,null)},ep.prototype.unmount=w0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;__(s.current,2,null,s,null,null),Rd(),l[wn]=null}};function ep(s){this._internalRoot=s}ep.prototype.unstable_scheduleHydration=function(s){if(s){var l=_n();s={blockedOn:null,target:s,priority:l};for(var d=0;d<Ks.length&&l!==0&&l<Ks[d].priority;d++);Ks.splice(d,0,s),d===0&&E_(s)}};var j_=e.version;if(j_!=="19.2.4")throw Error(n(527,j_,"19.2.4"));I.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=f(l),s=s!==null?p(s):null,s=s===null?null:s.stateNode,s};var C6={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ip=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ip.isDisabled&&ip.supportsFiber)try{Zi=ip.inject(C6),Si=ip}catch{}}return uu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var d=!1,m="",k=I2,S=q2,L=P2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(k=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(L=l.onRecoverableError)),l=C_(s,1,!1,null,null,d,m,null,k,S,L,N_),s[wn]=l.current,a0(s),new w0(l)},uu.hydrateRoot=function(s,l,d){if(!a(s))throw Error(n(299));var m=!1,k="",S=I2,L=q2,q=P2,Q=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(k=d.identifierPrefix),d.onUncaughtError!==void 0&&(S=d.onUncaughtError),d.onCaughtError!==void 0&&(L=d.onCaughtError),d.onRecoverableError!==void 0&&(q=d.onRecoverableError),d.formState!==void 0&&(Q=d.formState)),l=C_(s,1,!0,l,d??null,m,k,Q,S,L,q,N_),l.context=k_(null),d=l.current,m=Gr(),m=Ts(m),k=Fs(m),k.callback=null,$s(d,k,m),d=m,l.current.lanes=d,Fe(l,d),la(l),s[wn]=l.current,a0(s),new ep(l)},uu.version="19.2.4",uu}var U_;function O6(){if(U_)return A0.exports;U_=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),A0.exports=j6(),A0.exports}var R6=O6(),gh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},D6={setTimeout:(i,e)=>setTimeout(i,e),clearTimeout:i=>clearTimeout(i),setInterval:(i,e)=>setInterval(i,e),clearInterval:i=>clearInterval(i)},oo,yv,WB,F6=(WB=class{constructor(){Ut(this,oo,D6);Ut(this,yv,!1)}setTimeoutProvider(i){Mt(this,oo,i)}setTimeout(i,e){return Z(this,oo).setTimeout(i,e)}clearTimeout(i){Z(this,oo).clearTimeout(i)}setInterval(i,e){return Z(this,oo).setInterval(i,e)}clearInterval(i){Z(this,oo).clearInterval(i)}},oo=new WeakMap,yv=new WeakMap,WB),il=new F6;function $6(i){setTimeout(i,0)}var bl=typeof window>"u"||"Deno"in globalThis;function pr(){}function z6(i,e){return typeof i=="function"?i(e):i}function Ex(i){return typeof i=="number"&&i>=0&&i!==1/0}function iA(i,e){return Math.max(i+(e||0)-Date.now(),0)}function bo(i,e){return typeof i=="function"?i(e):i}function mn(i,e){return typeof i=="function"?i(e):i}function W_(i,e){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=i;if(c){if(n){if(e.queryHash!==bv(c,e.options))return!1}else if(!lf(e.queryKey,c))return!1}if(r!=="all"){const u=e.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof h=="boolean"&&e.isStale()!==h||a&&a!==e.state.fetchStatus||o&&!o(e))}function G_(i,e){const{exact:r,status:n,predicate:a,mutationKey:o}=i;if(o){if(!e.options.mutationKey)return!1;if(r){if(vl(e.options.mutationKey)!==vl(o))return!1}else if(!lf(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function bv(i,e){return((e==null?void 0:e.queryKeyHashFn)||vl)(i)}function vl(i){return JSON.stringify(i,(e,r)=>Mx(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function lf(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?Object.keys(e).every(r=>lf(i[r],e[r])):!1}var I6=Object.prototype.hasOwnProperty;function rA(i,e,r=0){if(i===e)return i;if(r>500)return e;const n=Y_(i)&&Y_(e);if(!n&&!(Mx(i)&&Mx(e)))return e;const o=(n?i:Object.keys(i)).length,c=n?e:Object.keys(e),h=c.length,u=n?new Array(h):{};let f=0;for(let p=0;p<h;p++){const g=n?p:c[p],b=i[g],y=e[g];if(b===y){u[g]=b,(n?p<o:I6.call(i,g))&&f++;continue}if(b===null||y===null||typeof b!="object"||typeof y!="object"){u[g]=y;continue}const v=rA(b,y,r+1);u[g]=v,v===b&&f++}return o===h&&f===o?i:u}function Yp(i,e){if(!e||Object.keys(i).length!==Object.keys(e).length)return!1;for(const r in i)if(i[r]!==e[r])return!1;return!0}function Y_(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function Mx(i){if(!V_(i))return!1;const e=i.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!V_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function V_(i){return Object.prototype.toString.call(i)==="[object Object]"}function q6(i){return new Promise(e=>{il.setTimeout(e,i)})}function Lx(i,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(i,e):r.structuralSharing!==!1?rA(i,e):e}function P6(i,e,r=0){const n=[...i,e];return r&&n.length>r?n.slice(1):n}function H6(i,e,r=0){const n=[e,...i];return r&&n.length>r?n.slice(0,-1):n}var vv=Symbol();function nA(i,e){return!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===vv?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}function Cv(i,e){return typeof i=="function"?i(...e):!!i}function U6(i,e,r){let n=!1,a;return Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(a??(a=e()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),i}var ol,lo,Rc,GB,W6=(GB=class extends gh{constructor(){super();Ut(this,ol);Ut(this,lo);Ut(this,Rc);Mt(this,Rc,e=>{if(!bl&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){Z(this,lo)||this.setEventListener(Z(this,Rc))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,lo))==null||e.call(this),Mt(this,lo,void 0))}setEventListener(e){var r;Mt(this,Rc,e),(r=Z(this,lo))==null||r.call(this),Mt(this,lo,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){Z(this,ol)!==e&&(Mt(this,ol,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof Z(this,ol)=="boolean"?Z(this,ol):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ol=new WeakMap,lo=new WeakMap,Rc=new WeakMap,GB),kv=new W6;function Nx(){let i,e;const r=new Promise((a,o)=>{i=a,e=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),i(a)},r.reject=a=>{n({status:"rejected",reason:a}),e(a)},r}var G6=$6;function Y6(){let i=[],e=0,r=h=>{h()},n=h=>{h()},a=G6;const o=h=>{e?i.push(h):a(()=>{r(h)})},c=()=>{const h=i;i=[],h.length&&a(()=>{n(()=>{h.forEach(u=>{r(u)})})})};return{batch:h=>{let u;e++;try{u=h()}finally{e--,e||c()}return u},batchCalls:h=>(...u)=>{o(()=>{h(...u)})},schedule:o,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{n=h},setScheduler:h=>{a=h}}}var Ai=Y6(),Dc,co,Fc,YB,V6=(YB=class extends gh{constructor(){super();Ut(this,Dc,!0);Ut(this,co);Ut(this,Fc);Mt(this,Fc,e=>{if(!bl&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){Z(this,co)||this.setEventListener(Z(this,Fc))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,co))==null||e.call(this),Mt(this,co,void 0))}setEventListener(e){var r;Mt(this,Fc,e),(r=Z(this,co))==null||r.call(this),Mt(this,co,e(this.setOnline.bind(this)))}setOnline(e){Z(this,Dc)!==e&&(Mt(this,Dc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return Z(this,Dc)}},Dc=new WeakMap,co=new WeakMap,Fc=new WeakMap,YB),Vp=new V6;function X6(i){return Math.min(1e3*2**i,3e4)}function aA(i){return(i??"online")==="online"?Vp.isOnline():!0}var jx=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function sA(i){let e=!1,r=0,n;const a=Nx(),o=()=>a.status!=="pending",c=C=>{var _;if(!o()){const w=new jx(C);b(w),(_=i.onCancel)==null||_.call(i,w)}},h=()=>{e=!0},u=()=>{e=!1},f=()=>kv.isFocused()&&(i.networkMode==="always"||Vp.isOnline())&&i.canRun(),p=()=>aA(i.networkMode)&&i.canRun(),g=C=>{o()||(n==null||n(),a.resolve(C))},b=C=>{o()||(n==null||n(),a.reject(C))},y=()=>new Promise(C=>{var _;n=w=>{(o()||f())&&C(w)},(_=i.onPause)==null||_.call(i)}).then(()=>{var C;n=void 0,o()||(C=i.onContinue)==null||C.call(i)}),v=()=>{if(o())return;let C;const _=r===0?i.initialPromise:void 0;try{C=_??i.fn()}catch(w){C=Promise.reject(w)}Promise.resolve(C).then(g).catch(w=>{var O;if(o())return;const T=i.retry??(bl?0:3),B=i.retryDelay??X6,E=typeof B=="function"?B(r,w):B,N=T===!0||typeof T=="number"&&r<T||typeof T=="function"&&T(r,w);if(e||!N){b(w);return}r++,(O=i.onFail)==null||O.call(i,r,w),q6(E).then(()=>f()?void 0:y()).then(()=>{e?b(w):v()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(n==null||n(),a),cancelRetry:h,continueRetry:u,canStart:p,start:()=>(p()?v():y().then(v),a)}}var ll,VB,oA=(VB=class{constructor(){Ut(this,ll)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ex(this.gcTime)&&Mt(this,ll,il.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(bl?1/0:300*1e3))}clearGcTimeout(){Z(this,ll)&&(il.clearTimeout(Z(this,ll)),Mt(this,ll,void 0))}},ll=new WeakMap,VB),cl,$c,gn,hl,Fi,Sf,ul,Nn,ts,XB,Q6=(XB=class extends oA{constructor(e){super();Ut(this,Nn);Ut(this,cl);Ut(this,$c);Ut(this,gn);Ut(this,hl);Ut(this,Fi);Ut(this,Sf);Ut(this,ul);Mt(this,ul,!1),Mt(this,Sf,e.defaultOptions),this.setOptions(e.options),this.observers=[],Mt(this,hl,e.client),Mt(this,gn,Z(this,hl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Mt(this,cl,Q_(this.options)),this.state=e.state??Z(this,cl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Z(this,Fi))==null?void 0:e.promise}setOptions(e){if(this.options={...Z(this,Sf),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Q_(this.options);r.data!==void 0&&(this.setState(X_(r.data,r.dataUpdatedAt)),Mt(this,cl,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,gn).remove(this)}setData(e,r){const n=Lx(this.state.data,e,this.options);return he(this,Nn,ts).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){he(this,Nn,ts).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,a;const r=(n=Z(this,Fi))==null?void 0:n.promise;return(a=Z(this,Fi))==null||a.cancel(e),r?r.then(pr).catch(pr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Z(this,cl))}isActive(){return this.observers.some(e=>mn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>bo(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!iA(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=Z(this,Fi))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=Z(this,Fi))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Z(this,gn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(Z(this,Fi)&&(Z(this,ul)?Z(this,Fi).cancel({revert:!0}):Z(this,Fi).cancelRetry()),this.scheduleGc()),Z(this,gn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,Nn,ts).call(this,{type:"invalidate"})}async fetch(e,r){var u,f,p,g,b,y,v,C,_,w,T,B;if(this.state.fetchStatus!=="idle"&&((u=Z(this,Fi))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(Z(this,Fi))return Z(this,Fi).continueRetry(),Z(this,Fi).promise}if(e&&this.setOptions(e),!this.options.queryFn){const E=this.observers.find(N=>N.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,a=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Mt(this,ul,!0),n.signal)})},o=()=>{const E=nA(this.options,r),O=(()=>{const M={client:Z(this,hl),queryKey:this.queryKey,meta:this.meta};return a(M),M})();return Mt(this,ul,!1),this.options.persister?this.options.persister(E,O,this):E(O)},h=(()=>{const E={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:Z(this,hl),state:this.state,fetchFn:o};return a(E),E})();(f=this.options.behavior)==null||f.onFetch(h,this),Mt(this,$c,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=h.fetchOptions)==null?void 0:p.meta))&&he(this,Nn,ts).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),Mt(this,Fi,sA({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,onCancel:E=>{E instanceof jx&&E.revert&&this.setState({...Z(this,$c),fetchStatus:"idle"}),n.abort()},onFail:(E,N)=>{he(this,Nn,ts).call(this,{type:"failed",failureCount:E,error:N})},onPause:()=>{he(this,Nn,ts).call(this,{type:"pause"})},onContinue:()=>{he(this,Nn,ts).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const E=await Z(this,Fi).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(y=(b=Z(this,gn).config).onSuccess)==null||y.call(b,E,this),(C=(v=Z(this,gn).config).onSettled)==null||C.call(v,E,this.state.error,this),E}catch(E){if(E instanceof jx){if(E.silent)return Z(this,Fi).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw he(this,Nn,ts).call(this,{type:"error",error:E}),(w=(_=Z(this,gn).config).onError)==null||w.call(_,E,this),(B=(T=Z(this,gn).config).onSettled)==null||B.call(T,this.state.data,E,this),E}finally{this.scheduleGc()}}},cl=new WeakMap,$c=new WeakMap,gn=new WeakMap,hl=new WeakMap,Fi=new WeakMap,Sf=new WeakMap,ul=new WeakMap,Nn=new WeakSet,ts=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...lA(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...X_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Mt(this,$c,e.manual?a:void 0),a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),Ai.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),Z(this,gn).notify({query:this,type:"updated",action:e})})},XB);function lA(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aA(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function X_(i,e){return{data:i,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Q_(i){const e=typeof i.initialData=="function"?i.initialData():i.initialData,r=e!==void 0,n=r?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Lr,be,Tf,dr,fl,zc,rs,ho,Bf,Ic,qc,dl,pl,uo,Pc,Oe,Fu,Ox,Rx,Dx,Fx,$x,zx,Ix,cA,QB,Z6=(QB=class extends gh{constructor(e,r){super();Ut(this,Oe);Ut(this,Lr);Ut(this,be);Ut(this,Tf);Ut(this,dr);Ut(this,fl);Ut(this,zc);Ut(this,rs);Ut(this,ho);Ut(this,Bf);Ut(this,Ic);Ut(this,qc);Ut(this,dl);Ut(this,pl);Ut(this,uo);Ut(this,Pc,new Set);this.options=r,Mt(this,Lr,e),Mt(this,ho,null),Mt(this,rs,Nx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Z(this,be).addObserver(this),Z_(Z(this,be),this.options)?he(this,Oe,Fu).call(this):this.updateResult(),he(this,Oe,Fx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qx(Z(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qx(Z(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,Oe,$x).call(this),he(this,Oe,zx).call(this),Z(this,be).removeObserver(this)}setOptions(e){const r=this.options,n=Z(this,be);if(this.options=Z(this,Lr).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof mn(this.options.enabled,Z(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,Oe,Ix).call(this),Z(this,be).setOptions(this.options),r._defaulted&&!Yp(this.options,r)&&Z(this,Lr).getQueryCache().notify({type:"observerOptionsUpdated",query:Z(this,be),observer:this});const a=this.hasListeners();a&&K_(Z(this,be),n,this.options,r)&&he(this,Oe,Fu).call(this),this.updateResult(),a&&(Z(this,be)!==n||mn(this.options.enabled,Z(this,be))!==mn(r.enabled,Z(this,be))||bo(this.options.staleTime,Z(this,be))!==bo(r.staleTime,Z(this,be)))&&he(this,Oe,Ox).call(this);const o=he(this,Oe,Rx).call(this);a&&(Z(this,be)!==n||mn(this.options.enabled,Z(this,be))!==mn(r.enabled,Z(this,be))||o!==Z(this,uo))&&he(this,Oe,Dx).call(this,o)}getOptimisticResult(e){const r=Z(this,Lr).getQueryCache().build(Z(this,Lr),e),n=this.createResult(r,e);return J6(this,n)&&(Mt(this,dr,n),Mt(this,zc,this.options),Mt(this,fl,Z(this,be).state)),n}getCurrentResult(){return Z(this,dr)}trackResult(e,r){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Z(this,rs).status==="pending"&&Z(this,rs).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){Z(this,Pc).add(e)}getCurrentQuery(){return Z(this,be)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=Z(this,Lr).defaultQueryOptions(e),n=Z(this,Lr).getQueryCache().build(Z(this,Lr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return he(this,Oe,Fu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Z(this,dr)))}createResult(e,r){var G;const n=Z(this,be),a=this.options,o=Z(this,dr),c=Z(this,fl),h=Z(this,zc),f=e!==n?e.state:Z(this,Tf),{state:p}=e;let g={...p},b=!1,y;if(r._optimisticResults){const $=this.hasListeners(),z=!$&&Z_(e,r),K=$&&K_(e,n,r,a);(z||K)&&(g={...g,...lA(p.data,e.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:C,status:_}=g;y=g.data;let w=!1;if(r.placeholderData!==void 0&&y===void 0&&_==="pending"){let $;o!=null&&o.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?($=o.data,w=!0):$=typeof r.placeholderData=="function"?r.placeholderData((G=Z(this,qc))==null?void 0:G.state.data,Z(this,qc)):r.placeholderData,$!==void 0&&(_="success",y=Lx(o==null?void 0:o.data,$,r),b=!0)}if(r.select&&y!==void 0&&!w)if(o&&y===(c==null?void 0:c.data)&&r.select===Z(this,Bf))y=Z(this,Ic);else try{Mt(this,Bf,r.select),y=r.select(y),y=Lx(o==null?void 0:o.data,y,r),Mt(this,Ic,y),Mt(this,ho,null)}catch($){Mt(this,ho,$)}Z(this,ho)&&(v=Z(this,ho),y=Z(this,Ic),C=Date.now(),_="error");const T=g.fetchStatus==="fetching",B=_==="pending",E=_==="error",N=B&&T,O=y!==void 0,j={status:_,fetchStatus:g.fetchStatus,isPending:B,isSuccess:_==="success",isError:E,isInitialLoading:N,isLoading:N,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:C,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:T,isRefetching:T&&!B,isLoadingError:E&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:E&&O,isStale:_v(e,r),refetch:this.refetch,promise:Z(this,rs),isEnabled:mn(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const $=j.data!==void 0,z=j.status==="error"&&!$,K=U=>{z?U.reject(j.error):$&&U.resolve(j.data)},W=()=>{const U=Mt(this,rs,j.promise=Nx());K(U)},D=Z(this,rs);switch(D.status){case"pending":e.queryHash===n.queryHash&&K(D);break;case"fulfilled":(z||j.data!==D.value)&&W();break;case"rejected":(!z||j.error!==D.reason)&&W();break}}return j}updateResult(){const e=Z(this,dr),r=this.createResult(Z(this,be),this.options);if(Mt(this,fl,Z(this,be).state),Mt(this,zc,this.options),Z(this,fl).data!==void 0&&Mt(this,qc,Z(this,be)),Yp(r,e))return;Mt(this,dr,r);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!Z(this,Pc).size)return!0;const c=new Set(o??Z(this,Pc));return this.options.throwOnError&&c.add("error"),Object.keys(Z(this,dr)).some(h=>{const u=h;return Z(this,dr)[u]!==e[u]&&c.has(u)})};he(this,Oe,cA).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,Oe,Fx).call(this)}},Lr=new WeakMap,be=new WeakMap,Tf=new WeakMap,dr=new WeakMap,fl=new WeakMap,zc=new WeakMap,rs=new WeakMap,ho=new WeakMap,Bf=new WeakMap,Ic=new WeakMap,qc=new WeakMap,dl=new WeakMap,pl=new WeakMap,uo=new WeakMap,Pc=new WeakMap,Oe=new WeakSet,Fu=function(e){he(this,Oe,Ix).call(this);let r=Z(this,be).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(pr)),r},Ox=function(){he(this,Oe,$x).call(this);const e=bo(this.options.staleTime,Z(this,be));if(bl||Z(this,dr).isStale||!Ex(e))return;const n=iA(Z(this,dr).dataUpdatedAt,e)+1;Mt(this,dl,il.setTimeout(()=>{Z(this,dr).isStale||this.updateResult()},n))},Rx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Z(this,be)):this.options.refetchInterval)??!1},Dx=function(e){he(this,Oe,zx).call(this),Mt(this,uo,e),!(bl||mn(this.options.enabled,Z(this,be))===!1||!Ex(Z(this,uo))||Z(this,uo)===0)&&Mt(this,pl,il.setInterval(()=>{(this.options.refetchIntervalInBackground||kv.isFocused())&&he(this,Oe,Fu).call(this)},Z(this,uo)))},Fx=function(){he(this,Oe,Ox).call(this),he(this,Oe,Dx).call(this,he(this,Oe,Rx).call(this))},$x=function(){Z(this,dl)&&(il.clearTimeout(Z(this,dl)),Mt(this,dl,void 0))},zx=function(){Z(this,pl)&&(il.clearInterval(Z(this,pl)),Mt(this,pl,void 0))},Ix=function(){const e=Z(this,Lr).getQueryCache().build(Z(this,Lr),this.options);if(e===Z(this,be))return;const r=Z(this,be);Mt(this,be,e),Mt(this,Tf,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},cA=function(e){Ai.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(Z(this,dr))}),Z(this,Lr).getQueryCache().notify({query:Z(this,be),type:"observerResultsUpdated"})})},QB);function K6(i,e){return mn(e.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&e.retryOnMount===!1)}function Z_(i,e){return K6(i,e)||i.state.data!==void 0&&qx(i,e,e.refetchOnMount)}function qx(i,e,r){if(mn(e.enabled,i)!==!1&&bo(e.staleTime,i)!=="static"){const n=typeof r=="function"?r(i):r;return n==="always"||n!==!1&&_v(i,e)}return!1}function K_(i,e,r,n){return(i!==e||mn(n.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&_v(i,r)}function _v(i,e){return mn(e.enabled,i)!==!1&&i.isStaleByTime(bo(e.staleTime,i))}function J6(i,e){return!Yp(i.getCurrentResult(),e)}function J_(i){return{onFetch:(e,r)=>{var p,g,b,y,v;const n=e.options,a=(b=(g=(p=e.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:b.direction,o=((y=e.state.data)==null?void 0:y.pages)||[],c=((v=e.state.data)==null?void 0:v.pageParams)||[];let h={pages:[],pageParams:[]},u=0;const f=async()=>{let C=!1;const _=B=>{U6(B,()=>e.signal,()=>C=!0)},w=nA(e.options,e.fetchOptions),T=async(B,E,N)=>{if(C)return Promise.reject();if(E==null&&B.pages.length)return Promise.resolve(B);const M=(()=>{const z={client:e.client,queryKey:e.queryKey,pageParam:E,direction:N?"backward":"forward",meta:e.options.meta};return _(z),z})(),j=await w(M),{maxPages:G}=e.options,$=N?H6:P6;return{pages:$(B.pages,j,G),pageParams:$(B.pageParams,E,G)}};if(a&&o.length){const B=a==="backward",E=B?tR:tw,N={pages:o,pageParams:c},O=E(n,N);h=await T(N,O,B)}else{const B=i??o.length;do{const E=u===0?c[0]??n.initialPageParam:tw(n,h);if(u>0&&E==null)break;h=await T(h,E),u++}while(u<B)}return h};e.options.persister?e.fetchFn=()=>{var C,_;return(_=(C=e.options).persister)==null?void 0:_.call(C,f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=f}}}function tw(i,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?i.getNextPageParam(e[n],e,r[n],r):void 0}function tR(i,{pages:e,pageParams:r}){var n;return e.length>0?(n=i.getPreviousPageParam)==null?void 0:n.call(i,e[0],e,r[0],r):void 0}var Af,xa,rr,gl,ba,ro,ZB,eR=(ZB=class extends oA{constructor(e){super();Ut(this,ba);Ut(this,Af);Ut(this,xa);Ut(this,rr);Ut(this,gl);Mt(this,Af,e.client),this.mutationId=e.mutationId,Mt(this,rr,e.mutationCache),Mt(this,xa,[]),this.state=e.state||hA(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Z(this,xa).includes(e)||(Z(this,xa).push(e),this.clearGcTimeout(),Z(this,rr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Mt(this,xa,Z(this,xa).filter(r=>r!==e)),this.scheduleGc(),Z(this,rr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Z(this,xa).length||(this.state.status==="pending"?this.scheduleGc():Z(this,rr).remove(this))}continue(){var e;return((e=Z(this,gl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,h,u,f,p,g,b,y,v,C,_,w,T,B,E,N,O,M;const r=()=>{he(this,ba,ro).call(this,{type:"continue"})},n={client:Z(this,Af),meta:this.options.meta,mutationKey:this.options.mutationKey};Mt(this,gl,sA({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(j,G)=>{he(this,ba,ro).call(this,{type:"failed",failureCount:j,error:G})},onPause:()=>{he(this,ba,ro).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,rr).canRun(this)}));const a=this.state.status==="pending",o=!Z(this,gl).canStart();try{if(a)r();else{he(this,ba,ro).call(this,{type:"pending",variables:e,isPaused:o}),Z(this,rr).config.onMutate&&await Z(this,rr).config.onMutate(e,this,n);const G=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));G!==this.state.context&&he(this,ba,ro).call(this,{type:"pending",context:G,variables:e,isPaused:o})}const j=await Z(this,gl).start();return await((f=(u=Z(this,rr).config).onSuccess)==null?void 0:f.call(u,j,e,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,j,e,this.state.context,n)),await((y=(b=Z(this,rr).config).onSettled)==null?void 0:y.call(b,j,null,this.state.variables,this.state.context,this,n)),await((C=(v=this.options).onSettled)==null?void 0:C.call(v,j,null,e,this.state.context,n)),he(this,ba,ro).call(this,{type:"success",data:j}),j}catch(j){try{await((w=(_=Z(this,rr).config).onError)==null?void 0:w.call(_,j,e,this.state.context,this,n))}catch(G){Promise.reject(G)}try{await((B=(T=this.options).onError)==null?void 0:B.call(T,j,e,this.state.context,n))}catch(G){Promise.reject(G)}try{await((N=(E=Z(this,rr).config).onSettled)==null?void 0:N.call(E,void 0,j,this.state.variables,this.state.context,this,n))}catch(G){Promise.reject(G)}try{await((M=(O=this.options).onSettled)==null?void 0:M.call(O,void 0,j,e,this.state.context,n))}catch(G){Promise.reject(G)}throw he(this,ba,ro).call(this,{type:"error",error:j}),j}finally{Z(this,rr).runNext(this)}}},Af=new WeakMap,xa=new WeakMap,rr=new WeakMap,gl=new WeakMap,ba=new WeakSet,ro=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ai.batch(()=>{Z(this,xa).forEach(n=>{n.onMutationUpdate(e)}),Z(this,rr).notify({mutation:this,type:"updated",action:e})})},ZB);function hA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ns,jn,Ef,KB,iR=(KB=class extends gh{constructor(e={}){super();Ut(this,ns);Ut(this,jn);Ut(this,Ef);this.config=e,Mt(this,ns,new Set),Mt(this,jn,new Map),Mt(this,Ef,0)}build(e,r,n){const a=new eR({client:e,mutationCache:this,mutationId:++rp(this,Ef)._,options:e.defaultMutationOptions(r),state:n});return this.add(a),a}add(e){Z(this,ns).add(e);const r=np(e);if(typeof r=="string"){const n=Z(this,jn).get(r);n?n.push(e):Z(this,jn).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Z(this,ns).delete(e)){const r=np(e);if(typeof r=="string"){const n=Z(this,jn).get(r);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&Z(this,jn).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=np(e);if(typeof r=="string"){const n=Z(this,jn).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const r=np(e);if(typeof r=="string"){const a=(n=Z(this,jn).get(r))==null?void 0:n.find(o=>o!==e&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ai.batch(()=>{Z(this,ns).forEach(e=>{this.notify({type:"removed",mutation:e})}),Z(this,ns).clear(),Z(this,jn).clear()})}getAll(){return Array.from(Z(this,ns))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>G_(r,n))}findAll(e={}){return this.getAll().filter(r=>G_(e,r))}notify(e){Ai.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return Ai.batch(()=>Promise.all(e.map(r=>r.continue().catch(pr))))}},ns=new WeakMap,jn=new WeakMap,Ef=new WeakMap,KB);function np(i){var e;return(e=i.options.scope)==null?void 0:e.id}var as,fo,Nr,ss,ds,Mp,Px,JB,rR=(JB=class extends gh{constructor(r,n){super();Ut(this,ds);Ut(this,as);Ut(this,fo);Ut(this,Nr);Ut(this,ss);Mt(this,as,r),this.setOptions(n),this.bindMethods(),he(this,ds,Mp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var a;const n=this.options;this.options=Z(this,as).defaultMutationOptions(r),Yp(this.options,n)||Z(this,as).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Z(this,Nr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&vl(n.mutationKey)!==vl(this.options.mutationKey)?this.reset():((a=Z(this,Nr))==null?void 0:a.state.status)==="pending"&&Z(this,Nr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=Z(this,Nr))==null||r.removeObserver(this)}onMutationUpdate(r){he(this,ds,Mp).call(this),he(this,ds,Px).call(this,r)}getCurrentResult(){return Z(this,fo)}reset(){var r;(r=Z(this,Nr))==null||r.removeObserver(this),Mt(this,Nr,void 0),he(this,ds,Mp).call(this),he(this,ds,Px).call(this)}mutate(r,n){var a;return Mt(this,ss,n),(a=Z(this,Nr))==null||a.removeObserver(this),Mt(this,Nr,Z(this,as).getMutationCache().build(Z(this,as),this.options)),Z(this,Nr).addObserver(this),Z(this,Nr).execute(r)}},as=new WeakMap,fo=new WeakMap,Nr=new WeakMap,ss=new WeakMap,ds=new WeakSet,Mp=function(){var n;const r=((n=Z(this,Nr))==null?void 0:n.state)??hA();Mt(this,fo,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Px=function(r){Ai.batch(()=>{var n,a,o,c,h,u,f,p;if(Z(this,ss)&&this.hasListeners()){const g=Z(this,fo).variables,b=Z(this,fo).context,y={client:Z(this,as),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(a=(n=Z(this,ss)).onSuccess)==null||a.call(n,r.data,g,b,y)}catch(v){Promise.reject(v)}try{(c=(o=Z(this,ss)).onSettled)==null||c.call(o,r.data,null,g,b,y)}catch(v){Promise.reject(v)}}else if((r==null?void 0:r.type)==="error"){try{(u=(h=Z(this,ss)).onError)==null||u.call(h,r.error,g,b,y)}catch(v){Promise.reject(v)}try{(p=(f=Z(this,ss)).onSettled)==null||p.call(f,void 0,r.error,g,b,y)}catch(v){Promise.reject(v)}}}this.listeners.forEach(g=>{g(Z(this,fo))})})},JB),va,tA,nR=(tA=class extends gh{constructor(e={}){super();Ut(this,va);this.config=e,Mt(this,va,new Map)}build(e,r,n){const a=r.queryKey,o=r.queryHash??bv(a,r);let c=this.get(o);return c||(c=new Q6({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){Z(this,va).has(e.queryHash)||(Z(this,va).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=Z(this,va).get(e.queryHash);r&&(e.destroy(),r===e&&Z(this,va).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ai.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Z(this,va).get(e)}getAll(){return[...Z(this,va).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>W_(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>W_(e,n)):r}notify(e){Ai.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Ai.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ai.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},va=new WeakMap,tA),fi,po,go,Hc,Uc,mo,Wc,Gc,eA,aR=(eA=class{constructor(i={}){Ut(this,fi);Ut(this,po);Ut(this,go);Ut(this,Hc);Ut(this,Uc);Ut(this,mo);Ut(this,Wc);Ut(this,Gc);Mt(this,fi,i.queryCache||new nR),Mt(this,po,i.mutationCache||new iR),Mt(this,go,i.defaultOptions||{}),Mt(this,Hc,new Map),Mt(this,Uc,new Map),Mt(this,mo,0)}mount(){rp(this,mo)._++,Z(this,mo)===1&&(Mt(this,Wc,kv.subscribe(async i=>{i&&(await this.resumePausedMutations(),Z(this,fi).onFocus())})),Mt(this,Gc,Vp.subscribe(async i=>{i&&(await this.resumePausedMutations(),Z(this,fi).onOnline())})))}unmount(){var i,e;rp(this,mo)._--,Z(this,mo)===0&&((i=Z(this,Wc))==null||i.call(this),Mt(this,Wc,void 0),(e=Z(this,Gc))==null||e.call(this),Mt(this,Gc,void 0))}isFetching(i){return Z(this,fi).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return Z(this,po).findAll({...i,status:"pending"}).length}getQueryData(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=Z(this,fi).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(i){const e=this.defaultQueryOptions(i),r=Z(this,fi).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(i):(i.revalidateIfStale&&r.isStaleByTime(bo(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(i){return Z(this,fi).findAll(i).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(i,e,r){const n=this.defaultQueryOptions({queryKey:i}),a=Z(this,fi).get(n.queryHash),o=a==null?void 0:a.state.data,c=z6(e,o);if(c!==void 0)return Z(this,fi).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(i,e,r){return Ai.batch(()=>Z(this,fi).findAll(i).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=Z(this,fi).get(e.queryHash))==null?void 0:r.state}removeQueries(i){const e=Z(this,fi);Ai.batch(()=>{e.findAll(i).forEach(r=>{e.remove(r)})})}resetQueries(i,e){const r=Z(this,fi);return Ai.batch(()=>(r.findAll(i).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...i},e)))}cancelQueries(i,e={}){const r={revert:!0,...e},n=Ai.batch(()=>Z(this,fi).findAll(i).map(a=>a.cancel(r)));return Promise.all(n).then(pr).catch(pr)}invalidateQueries(i,e={}){return Ai.batch(()=>(Z(this,fi).findAll(i).forEach(r=>{r.invalidate()}),(i==null?void 0:i.refetchType)==="none"?Promise.resolve():this.refetchQueries({...i,type:(i==null?void 0:i.refetchType)??(i==null?void 0:i.type)??"active"},e)))}refetchQueries(i,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=Ai.batch(()=>Z(this,fi).findAll(i).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(pr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(pr)}fetchQuery(i){const e=this.defaultQueryOptions(i);e.retry===void 0&&(e.retry=!1);const r=Z(this,fi).build(this,e);return r.isStaleByTime(bo(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(pr).catch(pr)}fetchInfiniteQuery(i){return i.behavior=J_(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(pr).catch(pr)}ensureInfiniteQueryData(i){return i.behavior=J_(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return Vp.isOnline()?Z(this,po).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,fi)}getMutationCache(){return Z(this,po)}getDefaultOptions(){return Z(this,go)}setDefaultOptions(i){Mt(this,go,i)}setQueryDefaults(i,e){Z(this,Hc).set(vl(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...Z(this,Hc).values()],r={};return e.forEach(n=>{lf(i,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(i,e){Z(this,Uc).set(vl(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...Z(this,Uc).values()],r={};return e.forEach(n=>{lf(i,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(i){if(i._defaulted)return i;const e={...Z(this,go).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=bv(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===vv&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...Z(this,go).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){Z(this,fi).clear(),Z(this,po).clear()}},fi=new WeakMap,po=new WeakMap,go=new WeakMap,Hc=new WeakMap,Uc=new WeakMap,mo=new WeakMap,Wc=new WeakMap,Gc=new WeakMap,eA),uA=X.createContext(void 0),Kr=i=>{const e=X.useContext(uA);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},sR=({client:i,children:e})=>(X.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),x.jsx(uA.Provider,{value:i,children:e})),fA=X.createContext(!1),oR=()=>X.useContext(fA);fA.Provider;function lR(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var cR=X.createContext(lR()),hR=()=>X.useContext(cR),uR=(i,e,r)=>{const n=r!=null&&r.state.error&&typeof i.throwOnError=="function"?Cv(i.throwOnError,[r.state.error,r]):i.throwOnError;(i.suspense||i.experimental_prefetchInRender||n)&&(e.isReset()||(i.retryOnMount=!1))},fR=i=>{X.useEffect(()=>{i.clearReset()},[i])},dR=({result:i,errorResetBoundary:e,throwOnError:r,query:n,suspense:a})=>i.isError&&!e.isReset()&&!i.isFetching&&n&&(a&&i.data===void 0||Cv(r,[i.error,n])),pR=i=>{if(i.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=i.staleTime;i.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof i.gcTime=="number"&&(i.gcTime=Math.max(i.gcTime,1e3))}},gR=(i,e)=>i.isLoading&&i.isFetching&&!e,mR=(i,e)=>(i==null?void 0:i.suspense)&&e.isPending,ew=(i,e,r)=>e.fetchOptimistic(i).catch(()=>{r.clearReset()});function yR(i,e,r){var b,y,v,C;const n=oR(),a=hR(),o=Kr(),c=o.defaultQueryOptions(i);(y=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||y.call(b,c);const h=o.getQueryCache().get(c.queryHash);c._optimisticResults=n?"isRestoring":"optimistic",pR(c),uR(c,a,h),fR(a);const u=!o.getQueryCache().get(c.queryHash),[f]=X.useState(()=>new e(o,c)),p=f.getOptimisticResult(c),g=!n&&i.subscribed!==!1;if(X.useSyncExternalStore(X.useCallback(_=>{const w=g?f.subscribe(Ai.batchCalls(_)):pr;return f.updateResult(),w},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),X.useEffect(()=>{f.setOptions(c)},[c,f]),mR(c,p))throw ew(c,f,a);if(dR({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw p.error;if((C=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||C.call(v,c,p),c.experimental_prefetchInRender&&!bl&&gR(p,n)){const _=u?ew(c,f,a):h==null?void 0:h.promise;_==null||_.catch(pr).finally(()=>{f.updateResult()})}return c.notifyOnChangeProps?p:f.trackResult(p)}function zi(i,e){return yR(i,Z6)}function Ta(i,e){const r=Kr(),[n]=X.useState(()=>new rR(r,i));X.useEffect(()=>{n.setOptions(i)},[n,i]);const a=X.useSyncExternalStore(X.useCallback(c=>n.subscribe(Ai.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=X.useCallback((c,h)=>{n.mutate(c,h).catch(pr)},[n]);if(a.error&&Cv(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const dA=X.createContext(null);function pA(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function iw(i){return i==="system"?pA():i}function xR({children:i}){const[e,r]=X.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=X.useState(()=>iw(e)),o=c=>{r(c),localStorage.setItem("dreamcontext-theme",c)};return X.useEffect(()=>{const c=iw(e);a(c),document.documentElement.setAttribute("data-theme",c)},[e]),X.useEffect(()=>{if(e!=="system")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const u=pA();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),x.jsx(dA.Provider,{value:{theme:e,resolved:n,setTheme:o},children:i})}function Pg(){const i=X.useContext(dA);if(!i)throw new Error("useTheme must be used within ThemeProvider");return i}const bR={en:{"nav.brain":"Brain","nav.tasks":"Tasks","nav.core":"Core Files","nav.knowledge":"Knowledge","nav.features":"Features","nav.sleep":"Sleep State","nav.council":"Council","nav.settings":"Settings","nav.packs":"Packs","nav.about":"What is this?","nav.group.workspace":"Workspace","nav.group.control":"Control Panel","nav.collapse":"Collapse","nav.expand":"Expand","council.title":"Council","council.tab.verdict":"Verdict","council.tab.matrix":"Matrix","council.tab.transcript":"Transcript","council.search.placeholder":"Search sessions…","council.search.matrix":"Filter cells by text…","council.search.transcript":"Search transcript…","council.filter.all":"All","council.filter.status":"Status","council.inspector.empty":"Select a persona or cell to inspect.","council.inspector.selectCell":"Select a cell in the matrix for round details.","council.verdict.awaitingSynthesis":"Awaiting synthesis","council.verdict.synthPending":"The final report will appear here once the synthesizer runs.","council.empty.list":"No council sessions yet.","council.empty.detail":"Select a council session from the list.","tasks.title":"Tasks","tasks.create":"New Task","tasks.filter":"Filter","tasks.todo":"To Do","tasks.in_progress":"In Progress","tasks.in_review":"In Review","tasks.completed":"Completed","tasks.name":"Task Name","tasks.description":"Description","tasks.priority":"Priority","tasks.tags":"Tags","tasks.save":"Create Task","tasks.cancel":"Cancel","tasks.changelog":"Changelog","tasks.add_entry":"Add Entry","rice.title":"RICE","rice.reach":"Reach","rice.impact":"Impact","rice.confidence":"Confidence","rice.effort":"Effort","rice.score":"Score","rice.clear":"Clear RICE","rice.tooltip.reach":"How many people / sessions / units affected (1–10)","rice.tooltip.impact":"How much per affected unit (1=minimal, 5=massive)","rice.tooltip.confidence":"How sure are you? (25, 50, 75, 100)","rice.tooltip.effort":"Person-weeks (0.5–8 typical, max 52)","rice.empty":"Not rated","sort.rice":"RICE score","filter.min_rice":"Min RICE","priority.critical":"Critical","priority.high":"High","priority.medium":"Medium","priority.low":"Low","sleep.title":"Sleep State","sleep.debt":"Debt","sleep.level":"Level","sleep.last_sleep":"Last Sleep","sleep.sessions":"Sessions","sleep.alert":"Alert","sleep.drowsy":"Drowsy","sleep.sleepy":"Sleepy","sleep.must_sleep":"Must Sleep","sleep.changelog":"Changelog","sleep.changelog.pending":"Will fold into next sleep","sleep.changelog.breaking":"BREAKING","sleep.changelog.earlier":"earlier entries not shown","core.title":"Core Files","knowledge.title":"Knowledge","knowledge.pin":"Pin","knowledge.unpin":"Unpin","knowledge.search":"Search knowledge...","features.title":"Features","settings.title":"Settings","settings.platforms":"Platforms","settings.save":"Save","settings.saving":"Saving...","settings.saved":"Saved","settings.no_config":"No configuration file found. Saving will create one with your selections.","settings.platform.claude":"Claude (Anthropic)","settings.platform.codex":"Codex (OpenAI)","settings.packs.installed":"Installed","settings.memory":"Memory","settings.native_memory.label":"Disable Claude's native memory","settings.native_memory.hint":"Recommended — dreamcontext becomes the single source of project memory instead of Claude Code’s built-in MEMORY.md.","packs.title":"Skill Packs","packs.section.packs":"Packs","packs.section.standalone":"Standalone Skills","packs.detail.base":"Base Skill","packs.detail.subskills":"Sub-Skills","packs.detail.agents":"Related Agents","packs.detail.close":"Close","packs.action.install":"Install","packs.action.remove":"Remove","packs.action.installing":"Installing…","packs.action.removing":"Removing…","packs.action.error":"Action failed","update.available":"Update available","update.title":"Update Available","update.dismiss":"Dismiss","update.managePacks":"Manage packs →","common.loading":"Loading...","common.error":"Error","common.empty":"Nothing here yet.","common.close":"Close"}},gA=X.createContext(null);function vR({children:i}){const[e,r]=X.useState("en"),n=a=>{var o;return((o=bR[e])==null?void 0:o[a])??a};return x.jsx(gA.Provider,{value:{locale:e,setLocale:r,t:n},children:i})}function oi(){const i=X.useContext(gA);if(!i)throw new Error("useI18n must be used within I18nProvider");return i}const CR="/api";class kR{async request(e,r){const n=await fetch(`${CR}${e}`,{...r,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers}});if(!n.ok){let a=`Request failed: ${n.status}`;try{const o=await n.json();o.message&&(a=o.message)}catch{}throw new Error(a)}return await n.json()}get(e){return this.request(e)}post(e,r){return this.request(e,{method:"POST",body:JSON.stringify(r)})}patch(e,r){return this.request(e,{method:"PATCH",body:JSON.stringify(r)})}put(e,r){return this.request(e,{method:"PUT",body:JSON.stringify(r)})}del(e){return this.request(e,{method:"DELETE"})}}const qe=new kR,mA=X.createContext({projectId:"",contextRoot:""});function _R(i){let e=0;for(let r=0;r<i.length;r++)e=(e<<5)-e+i.charCodeAt(r)|0;return Math.abs(e).toString(36)}function wR({children:i}){const[e,r]=X.useState({kind:"loading"});return X.useEffect(()=>{qe.get("/health").then(n=>{r({kind:"ready",value:{contextRoot:n.contextRoot,projectId:_R(n.contextRoot)}})}).catch(()=>{r({kind:"ready",value:{projectId:"",contextRoot:""}})})},[]),e.kind==="loading"?x.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",color:"var(--color-text-secondary, #888)",fontSize:"14px"},children:"Loading project…"}):x.jsx(mA.Provider,{value:e.value,children:i})}function yA(){return X.useContext(mA)}function xA(i){return i<=3?"Alert":i<=6?"Drowsy":i<=9?"Sleepy":"Must Sleep"}function bA(i){return i<=3?"alert":i<=6?"drowsy":i<=9?"sleepy":"must_sleep"}function vA(){return zi({queryKey:["sleep"],queryFn:()=>qe.get("/sleep")})}function SR(){return zi({queryKey:["version-check"],queryFn:()=>qe.get("/version-check")})}function wv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nl=wv();function CA(i){Nl=i}var Xu={exec:()=>null};function Re(i,e=""){let r=typeof i=="string"?i:i.source;const n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(mr.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,e)};return n}var mr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},TR=/^(?:[ \t]*(?:\n|$))+/,BR=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,AR=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Mf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ER=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Sv=/(?:[*+-]|\d{1,9}[.)])/,kA=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_A=Re(kA).replace(/bull/g,Sv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),MR=Re(kA).replace(/bull/g,Sv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Tv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,LR=/^[^\n]+/,Bv=/(?!\s*\])(?:\\.|[^\[\]\\])+/,NR=Re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jR=Re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Sv).getRegex(),Hg="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Av=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,OR=Re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Av).replace("tag",Hg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wA=Re(Tv).replace("hr",Mf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex(),RR=Re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wA).getRegex(),Ev={blockquote:RR,code:BR,def:NR,fences:AR,heading:ER,hr:Mf,html:OR,lheading:_A,list:jR,newline:TR,paragraph:wA,table:Xu,text:LR},rw=Re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Mf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex(),DR={...Ev,lheading:MR,table:rw,paragraph:Re(Tv).replace("hr",Mf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rw).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex()},FR={...Ev,html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Av).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Xu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Re(Tv).replace("hr",Mf).replace("heading",` *#{1,6} *[^
51
+ ]`).replace("lheading",_A).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$R=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,SA=/^( {2,}|\\)\n(?!\s*$)/,IR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ug=/[\p{P}\p{S}]/u,Mv=/[\s\p{P}\p{S}]/u,TA=/[^\s\p{P}\p{S}]/u,qR=Re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Mv).getRegex(),BA=/(?!~)[\p{P}\p{S}]/u,PR=/(?!~)[\s\p{P}\p{S}]/u,HR=/(?:[^\s\p{P}\p{S}]|~)/u,UR=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,AA=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,WR=Re(AA,"u").replace(/punct/g,Ug).getRegex(),GR=Re(AA,"u").replace(/punct/g,BA).getRegex(),EA="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",YR=Re(EA,"gu").replace(/notPunctSpace/g,TA).replace(/punctSpace/g,Mv).replace(/punct/g,Ug).getRegex(),VR=Re(EA,"gu").replace(/notPunctSpace/g,HR).replace(/punctSpace/g,PR).replace(/punct/g,BA).getRegex(),XR=Re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,TA).replace(/punctSpace/g,Mv).replace(/punct/g,Ug).getRegex(),QR=Re(/\\(punct)/,"gu").replace(/punct/g,Ug).getRegex(),ZR=Re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),KR=Re(Av).replace("(?:-->|$)","-->").getRegex(),JR=Re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",KR).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xp=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,tD=Re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Xp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),MA=Re(/^!?\[(label)\]\[(ref)\]/).replace("label",Xp).replace("ref",Bv).getRegex(),LA=Re(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bv).getRegex(),eD=Re("reflink|nolink(?!\\()","g").replace("reflink",MA).replace("nolink",LA).getRegex(),Lv={_backpedal:Xu,anyPunctuation:QR,autolink:ZR,blockSkip:UR,br:SA,code:zR,del:Xu,emStrongLDelim:WR,emStrongRDelimAst:YR,emStrongRDelimUnd:XR,escape:$R,link:tD,nolink:LA,punctuation:qR,reflink:MA,reflinkSearch:eD,tag:JR,text:IR,url:Xu},iD={...Lv,link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",Xp).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xp).getRegex()},Hx={...Lv,emStrongRDelimAst:VR,emStrongLDelim:GR,url:Re(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},rD={...Hx,br:Re(SA).replace("{2,}","*").getRegex(),text:Re(Hx.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ap={normal:Ev,gfm:DR,pedantic:FR},fu={normal:Lv,gfm:Hx,breaks:rD,pedantic:iD},nD={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nw=i=>nD[i];function ha(i,e){if(e){if(mr.escapeTest.test(i))return i.replace(mr.escapeReplace,nw)}else if(mr.escapeTestNoEncode.test(i))return i.replace(mr.escapeReplaceNoEncode,nw);return i}function aw(i){try{i=encodeURI(i).replace(mr.percentDecode,"%")}catch{return null}return i}function sw(i,e){var o;const r=i.replace(mr.findPipe,(c,h,u)=>{let f=!1,p=h;for(;--p>=0&&u[p]==="\\";)f=!f;return f?"|":" |"}),n=r.split(mr.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(mr.slashPipe,"|");return n}function du(i,e,r){const n=i.length;if(n===0)return"";let a=0;for(;a<n&&i.charAt(n-a-1)===e;)a++;return i.slice(0,n-a)}function aD(i,e){if(i.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])r++;else if(i[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function ow(i,e,r,n,a){const o=e.href,c=e.title||null,h=i[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:i[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function sD(i,e,r){const n=i.match(r.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
52
+ `).map(o=>{const c=o.match(r.other.beginningSpace);if(c===null)return o;const[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
53
+ `)}var Qp=class{constructor(i){Ht(this,"options");Ht(this,"rules");Ht(this,"lexer");this.options=i||Nl}space(i){const e=this.rules.block.newline.exec(i);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(i){const e=this.rules.block.code.exec(i);if(e){const r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:du(r,`
54
+ `)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const r=e[0],n=sD(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(i){const e=this.rules.block.heading.exec(i);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){const n=du(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(i){const e=this.rules.block.hr.exec(i);if(e)return{type:"hr",raw:du(e[0],`
55
+ `)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let r=du(e[0],`
56
+ `).split(`
57
+ `),n="",a="";const o=[];for(;r.length>0;){let c=!1;const h=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))h.push(r[u]),c=!0;else if(!c)h.push(r[u]);else break;r=r.slice(u);const f=h.join(`
58
+ `),p=f.replace(this.rules.other.blockquoteSetextReplace,`
59
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
60
+ ${f}`:f,a=a?`${a}
61
+ ${p}`:p;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=g,r.length===0)break;const b=o.at(-1);if((b==null?void 0:b.type)==="code")break;if((b==null?void 0:b.type)==="blockquote"){const y=b,v=y.raw+`
62
+ `+r.join(`
63
+ `),C=this.blockquote(v);o[o.length-1]=C,n=n.substring(0,n.length-y.raw.length)+C.raw,a=a.substring(0,a.length-y.text.length)+C.text;break}else if((b==null?void 0:b.type)==="list"){const y=b,v=y.raw+`
64
+ `+r.join(`
65
+ `),C=this.list(v);o[o.length-1]=C,n=n.substring(0,n.length-b.raw.length)+C.raw,a=a.substring(0,a.length-y.raw.length)+C.raw,r=v.substring(o.at(-1).raw.length).split(`
66
+ `);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(i){let e=this.rules.block.list.exec(i);if(e){let r=e[1].trim();const n=r.length>1,a={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const o=this.rules.other.listItemRegex(r);let c=!1;for(;i;){let u=!1,f="",p="";if(!(e=o.exec(i))||this.rules.block.hr.test(i))break;f=e[0],i=i.substring(f.length);let g=e[2].split(`
67
+ `,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),b=i.split(`
68
+ `,1)[0],y=!g.trim(),v=0;if(this.options.pedantic?(v=2,p=g.trimStart()):y?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,p=g.slice(v),v+=e[1].length),y&&this.rules.other.blankLine.test(b)&&(f+=b+`
69
+ `,i=i.substring(b.length+1),u=!0),!u){const w=this.rules.other.nextBulletRegex(v),T=this.rules.other.hrRegex(v),B=this.rules.other.fencesBeginRegex(v),E=this.rules.other.headingBeginRegex(v),N=this.rules.other.htmlBeginRegex(v);for(;i;){const O=i.split(`
70
+ `,1)[0];let M;if(b=O,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),M=b):M=b.replace(this.rules.other.tabCharGlobal," "),B.test(b)||E.test(b)||N.test(b)||w.test(b)||T.test(b))break;if(M.search(this.rules.other.nonSpaceChar)>=v||!b.trim())p+=`
71
+ `+M.slice(v);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||B.test(g)||E.test(g)||T.test(g))break;p+=`
72
+ `+b}!y&&!b.trim()&&(y=!0),f+=O+`
73
+ `,i=i.substring(O.length+1),g=M.slice(v)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0));let C=null,_;this.options.gfm&&(C=this.rules.other.listIsTask.exec(p),C&&(_=C[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:f,task:!!C,checked:_,loose:!1,text:p,tokens:[]}),a.raw+=f}const h=a.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const f=a.items[u].tokens.filter(g=>g.type==="space"),p=f.length>0&&f.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=p}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(i){const e=this.rules.block.html.exec(i);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(i){const e=this.rules.block.def.exec(i);if(e){const r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:a}}}table(i){var c;const e=this.rules.block.table.exec(i);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const r=sw(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=e[3])!=null&&c.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
74
+ `):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const h of n)this.rules.other.tableAlignRight.test(h)?o.align.push("right"):this.rules.other.tableAlignCenter.test(h)?o.align.push("center"):this.rules.other.tableAlignLeft.test(h)?o.align.push("left"):o.align.push(null);for(let h=0;h<r.length;h++)o.header.push({text:r[h],tokens:this.lexer.inline(r[h]),header:!0,align:o.align[h]});for(const h of a)o.rows.push(sw(h,o.header.length).map((u,f)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[f]})));return o}}lheading(i){const e=this.rules.block.lheading.exec(i);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(i){const e=this.rules.block.paragraph.exec(i);if(e){const r=e[1].charAt(e[1].length-1)===`
75
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(i){const e=this.rules.block.text.exec(i);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(i){const e=this.rules.inline.escape.exec(i);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(i){const e=this.rules.inline.tag.exec(i);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(i){const e=this.rules.inline.link.exec(i);if(e){const r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const o=du(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=aD(e[2],"()");if(o===-2)return;if(o>-1){const h=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let n=e[2],a="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),ow(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(i,e){let r;if((r=this.rules.inline.reflink.exec(i))||(r=this.rules.inline.nolink.exec(i))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[n.toLowerCase()];if(!a){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return ow(r,a,r[0],this.lexer,this.rules)}}emStrong(i,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(i);if(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const o=[...n[0]].length-1;let c,h,u=o,f=0;const p=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*i.length+o);(n=p.exec(e))!=null;){if(c=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!c)continue;if(h=[...c].length,n[3]||n[4]){u+=h;continue}else if((n[5]||n[6])&&o%3&&!((o+h)%3)){f+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+f);const g=[...n[0]][0].length,b=i.slice(0,o+n.index+g+h);if(Math.min(o,h)%2){const v=b.slice(1,-1);return{type:"em",raw:b,text:v,tokens:this.lexer.inlineTokens(v)}}const y=b.slice(2,-2);return{type:"strong",raw:b,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(i){const e=this.rules.inline.code.exec(i);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&a&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(i){const e=this.rules.inline.br.exec(i);if(e)return{type:"br",raw:e[0]}}del(i){const e=this.rules.inline.del.exec(i);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(i){const e=this.rules.inline.autolink.exec(i);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(i){var r;let e;if(e=this.rules.inline.url.exec(i)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let o;do o=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(o!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(i){const e=this.rules.inline.text.exec(i);if(e){const r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},os=class Ux{constructor(e){Ht(this,"tokens");Ht(this,"options");Ht(this,"state");Ht(this,"tokenizer");Ht(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Nl,this.options.tokenizer=this.options.tokenizer||new Qp,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:mr,block:ap.normal,inline:fu.normal};this.options.pedantic?(r.block=ap.pedantic,r.inline=fu.pedantic):this.options.gfm&&(r.block=ap.gfm,this.options.breaks?r.inline=fu.breaks:r.inline=fu.gfm),this.tokenizer.rules=r}static get rules(){return{block:ap,inline:fu}}static lex(e,r){return new Ux(r).lex(e)}static lexInline(e,r){return new Ux(r).inlineTokens(e)}lex(e){e=e.replace(mr.carriageReturn,`
76
+ `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(mr.tabCharGlobal," ").replace(mr.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(f=>(h=f.call({lexer:this},e,r))?(e=e.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);const f=r.at(-1);h.raw.length===1&&f!==void 0?f.raw+=`
77
+ `:r.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);const f=r.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=`
78
+ `+h.raw,f.text+=`
79
+ `+h.text,this.inlineQueue.at(-1).src=f.text):r.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);const f=r.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=`
80
+ `+h.raw,f.text+=`
81
+ `+h.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title});continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let f=1/0;const p=e.slice(1);let g;this.options.extensions.startBlock.forEach(b=>{g=b.call({lexer:this},p),typeof g=="number"&&g>=0&&(f=Math.min(f,g))}),f<1/0&&f>=0&&(u=e.substring(0,f+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){const f=r.at(-1);n&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=`
82
+ `+h.raw,f.text+=`
83
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);const f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=`
84
+ `+h.raw,f.text+=`
85
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(h);continue}if(e){const f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var h,u,f;let n=e,a=null;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)p.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,c="";for(;e;){o||(c=""),o=!1;let p;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(b=>(p=b.call({lexer:this},e,r))?(e=e.substring(p.raw.length),r.push(p),!0):!1))continue;if(p=this.tokenizer.escape(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.tag(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.link(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(p.raw.length);const b=r.at(-1);p.type==="text"&&(b==null?void 0:b.type)==="text"?(b.raw+=p.raw,b.text+=p.text):r.push(p);continue}if(p=this.tokenizer.emStrong(e,n,c)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.codespan(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.br(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.del(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.autolink(e)){e=e.substring(p.raw.length),r.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(e))){e=e.substring(p.raw.length),r.push(p);continue}let g=e;if((f=this.options.extensions)!=null&&f.startInline){let b=1/0;const y=e.slice(1);let v;this.options.extensions.startInline.forEach(C=>{v=C.call({lexer:this},y),typeof v=="number"&&v>=0&&(b=Math.min(b,v))}),b<1/0&&b>=0&&(g=e.substring(0,b+1))}if(p=this.tokenizer.inlineText(g)){e=e.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(c=p.raw.slice(-1)),o=!0;const b=r.at(-1);(b==null?void 0:b.type)==="text"?(b.raw+=p.raw,b.text+=p.text):r.push(p);continue}if(e){const b="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return r}},Zp=class{constructor(i){Ht(this,"options");Ht(this,"parser");this.options=i||Nl}space(i){return""}code({text:i,lang:e,escaped:r}){var o;const n=(o=(e||"").match(mr.notSpaceStart))==null?void 0:o[0],a=i.replace(mr.endingNewline,"")+`
86
+ `;return n?'<pre><code class="language-'+ha(n)+'">'+(r?a:ha(a,!0))+`</code></pre>
87
+ `:"<pre><code>"+(r?a:ha(a,!0))+`</code></pre>
88
+ `}blockquote({tokens:i}){return`<blockquote>
89
+ ${this.parser.parse(i)}</blockquote>
90
+ `}html({text:i}){return i}heading({tokens:i,depth:e}){return`<h${e}>${this.parser.parseInline(i)}</h${e}>
91
+ `}hr(i){return`<hr>
92
+ `}list(i){const e=i.ordered,r=i.start;let n="";for(let c=0;c<i.items.length;c++){const h=i.items[c];n+=this.listitem(h)}const a=e?"ol":"ul",o=e&&r!==1?' start="'+r+'"':"";return"<"+a+o+`>
93
+ `+n+"</"+a+`>
94
+ `}listitem(i){var r;let e="";if(i.task){const n=this.checkbox({checked:!!i.checked});i.loose?((r=i.tokens[0])==null?void 0:r.type)==="paragraph"?(i.tokens[0].text=n+" "+i.tokens[0].text,i.tokens[0].tokens&&i.tokens[0].tokens.length>0&&i.tokens[0].tokens[0].type==="text"&&(i.tokens[0].tokens[0].text=n+" "+ha(i.tokens[0].tokens[0].text),i.tokens[0].tokens[0].escaped=!0)):i.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(i.tokens,!!i.loose),`<li>${e}</li>
95
+ `}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
96
+ `}table(i){let e="",r="";for(let a=0;a<i.header.length;a++)r+=this.tablecell(i.header[a]);e+=this.tablerow({text:r});let n="";for(let a=0;a<i.rows.length;a++){const o=i.rows[a];r="";for(let c=0;c<o.length;c++)r+=this.tablecell(o[c]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
97
+ <thead>
98
+ `+e+`</thead>
99
+ `+n+`</table>
100
+ `}tablerow({text:i}){return`<tr>
101
+ ${i}</tr>
102
+ `}tablecell(i){const e=this.parser.parseInline(i.tokens),r=i.header?"th":"td";return(i.align?`<${r} align="${i.align}">`:`<${r}>`)+e+`</${r}>
103
+ `}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${ha(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:e,tokens:r}){const n=this.parser.parseInline(r),a=aw(i);if(a===null)return n;i=a;let o='<a href="'+i+'"';return e&&(o+=' title="'+ha(e)+'"'),o+=">"+n+"</a>",o}image({href:i,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const a=aw(i);if(a===null)return ha(r);i=a;let o=`<img src="${i}" alt="${r}"`;return e&&(o+=` title="${ha(e)}"`),o+=">",o}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:ha(i.text)}},Nv=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}},ls=class Wx{constructor(e){Ht(this,"options");Ht(this,"renderer");Ht(this,"textRenderer");this.options=e||Nl,this.options.renderer=this.options.renderer||new Zp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Nv}static parse(e,r){return new Wx(r).parse(e)}static parseInline(e,r){return new Wx(r).parseInline(e)}parse(e,r=!0){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const f=h,p=this.options.extensions.renderers[f.type].call({parser:this},f);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(f.type)){n+=p||"";continue}}const u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let f=u,p=this.renderer.text(f);for(;c+1<e.length&&e[c+1].type==="text";)f=e[++c],p+=`
104
+ `+this.renderer.text(f);r?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{const f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(e,r=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const f=this.options.extensions.renderers[h.type].call({parser:this},h);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=f||"";continue}}const u=h;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{const f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}},Ax,Lp=(Ax=class{constructor(i){Ht(this,"options");Ht(this,"block");this.options=i||Nl}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?os.lex:os.lexInline}provideParser(){return this.block?ls.parse:ls.parseInline}},Ht(Ax,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ax),oD=class{constructor(...i){Ht(this,"defaults",wv());Ht(this,"options",this.setOptions);Ht(this,"parse",this.parseMarkdown(!0));Ht(this,"parseInline",this.parseMarkdown(!1));Ht(this,"Parser",ls);Ht(this,"Renderer",Zp);Ht(this,"TextRenderer",Nv);Ht(this,"Lexer",os);Ht(this,"Tokenizer",Qp);Ht(this,"Hooks",Lp);this.use(...i)}walkTokens(i,e){var n,a;let r=[];for(const o of i)switch(r=r.concat(e.call(this,o)),o.type){case"table":{const c=o;for(const h of c.header)r=r.concat(this.walkTokens(h.tokens,e));for(const h of c.rows)for(const u of h)r=r.concat(this.walkTokens(u.tokens,e));break}case"list":{const c=o;r=r.concat(this.walkTokens(c.items,e));break}default:{const c=o;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(h=>{const u=c[h].flat(1/0);r=r.concat(this.walkTokens(u,e))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,e)))}}return r}use(...i){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=e.renderers[a.name];o?e.renderers[a.name]=function(...c){let h=a.renderer.apply(this,c);return h===!1&&(h=o.apply(this,c)),h}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=e[a.level];o?o.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),n.extensions=e),r.renderer){const a=this.defaults.renderer||new Zp(this.defaults);for(const o in r.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const c=o,h=r.renderer[c],u=a[c];a[c]=(...f)=>{let p=h.apply(a,f);return p===!1&&(p=u.apply(a,f)),p||""}}n.renderer=a}if(r.tokenizer){const a=this.defaults.tokenizer||new Qp(this.defaults);for(const o in r.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const c=o,h=r.tokenizer[c],u=a[c];a[c]=(...f)=>{let p=h.apply(a,f);return p===!1&&(p=u.apply(a,f)),p}}n.tokenizer=a}if(r.hooks){const a=this.defaults.hooks||new Lp;for(const o in r.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const c=o,h=r.hooks[c],u=a[c];Lp.passThroughHooks.has(o)?a[c]=f=>{if(this.defaults.async)return Promise.resolve(h.call(a,f)).then(g=>u.call(a,g));const p=h.call(a,f);return u.call(a,p)}:a[c]=(...f)=>{let p=h.apply(a,f);return p===!1&&(p=u.apply(a,f)),p}}n.hooks=a}if(r.walkTokens){const a=this.defaults.walkTokens,o=r.walkTokens;n.walkTokens=function(c){let h=[];return h.push(o.call(this,c)),a&&(h=h.concat(a.call(this,c))),h}}this.defaults={...this.defaults,...n}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,e){return os.lex(i,e??this.defaults)}parser(i,e){return ls.parse(i,e??this.defaults)}parseMarkdown(i){return(r,n)=>{const a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=i);const h=o.hooks?o.hooks.provideLexer():i?os.lex:os.lexInline,u=o.hooks?o.hooks.provideParser():i?ls.parse:ls.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(f=>h(f,o)).then(f=>o.hooks?o.hooks.processAllTokens(f):f).then(f=>o.walkTokens?Promise.all(this.walkTokens(f,o.walkTokens)).then(()=>f):f).then(f=>u(f,o)).then(f=>o.hooks?o.hooks.postprocess(f):f).catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let f=h(r,o);o.hooks&&(f=o.hooks.processAllTokens(f)),o.walkTokens&&this.walkTokens(f,o.walkTokens);let p=u(f,o);return o.hooks&&(p=o.hooks.postprocess(p)),p}catch(f){return c(f)}}}onError(i,e){return r=>{if(r.message+=`
105
+ Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An error occurred:</p><pre>"+ha(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Cl=new oD;function ae(i,e){return Cl.parse(i,e)}ae.options=ae.setOptions=function(i){return Cl.setOptions(i),ae.defaults=Cl.defaults,CA(ae.defaults),ae};ae.getDefaults=wv;ae.defaults=Nl;ae.use=function(...i){return Cl.use(...i),ae.defaults=Cl.defaults,CA(ae.defaults),ae};ae.walkTokens=function(i,e){return Cl.walkTokens(i,e)};ae.parseInline=Cl.parseInline;ae.Parser=ls;ae.parser=ls.parse;ae.Renderer=Zp;ae.TextRenderer=Nv;ae.Lexer=os;ae.lexer=os.lex;ae.Tokenizer=Qp;ae.Hooks=Lp;ae.parse=ae;ae.options;ae.setOptions;ae.use;ae.walkTokens;ae.parseInline;ls.parse;os.lex;/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function lw(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function lD(i){if(Array.isArray(i))return i}function cD(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function hD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
106
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uD(i,e){return lD(i)||cD(i,e)||fD(i,e)||hD()}function fD(i,e){if(i){if(typeof i=="string")return lw(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lw(i,e):void 0}}const NA=Object.entries,cw=Object.setPrototypeOf,dD=Object.isFrozen,pD=Object.getPrototypeOf,gD=Object.getOwnPropertyDescriptor;let br=Object.freeze,bn=Object.seal,Sc=Object.create,jA=typeof Reflect<"u"&&Reflect,Gx=jA.apply,Yx=jA.construct;br||(br=function(e){return e});bn||(bn=function(e){return e});Gx||(Gx=function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];return e.apply(r,a)});Yx||(Yx=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return new e(...n)});const mc=wi(Array.prototype.forEach),mD=wi(Array.prototype.lastIndexOf),hw=wi(Array.prototype.pop),yc=wi(Array.prototype.push),yD=wi(Array.prototype.splice),fr=Array.isArray,$u=wi(String.prototype.toLowerCase),N0=wi(String.prototype.toString),uw=wi(String.prototype.match),xc=wi(String.prototype.replace),fw=wi(String.prototype.indexOf),xD=wi(String.prototype.trim),bD=wi(Number.prototype.toString),vD=wi(Boolean.prototype.toString),dw=typeof BigInt>"u"?null:wi(BigInt.prototype.toString),pw=typeof Symbol>"u"?null:wi(Symbol.prototype.toString),ui=wi(Object.prototype.hasOwnProperty),pu=wi(Object.prototype.toString),Yi=wi(RegExp.prototype.test),gu=CD(TypeError);function wi(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return Gx(i,e,n)}}function CD(i){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Yx(i,r)}}function ce(i,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$u;if(cw&&cw(i,null),!fr(e))return i;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const o=r(a);o!==a&&(dD(e)||(e[n]=o),a=o)}i[a]=!0}return i}function kD(i){for(let e=0;e<i.length;e++)ui(i,e)||(i[e]=null);return i}function er(i){const e=Sc(null);for(const n of NA(i)){var r=uD(n,2);const a=r[0],o=r[1];ui(i,a)&&(fr(o)?e[a]=kD(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=er(o):e[a]=o)}return e}function _D(i){switch(typeof i){case"string":return i;case"number":return bD(i);case"boolean":return vD(i);case"bigint":return dw?dw(i):"0";case"symbol":return pw?pw(i):"Symbol()";case"undefined":return pu(i);case"function":case"object":{if(i===null)return pu(i);const e=i,r=ua(e,"toString");if(typeof r=="function"){const n=r(e);return typeof n=="string"?n:pu(n)}return pu(i)}default:return pu(i)}}function ua(i,e){for(;i!==null;){const n=gD(i,e);if(n){if(n.get)return wi(n.get);if(typeof n.value=="function")return wi(n.value)}i=pD(i)}function r(){return null}return r}function wD(i){try{return Yi(i,""),!0}catch{return!1}}const gw=br(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j0=br(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O0=br(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),SD=br(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R0=br(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),TD=br(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mw=br(["#text"]),yw=br(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),D0=br(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xw=br(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),sp=br(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),BD=bn(/{{[\w\W]*|^[\w\W]*}}/g),AD=bn(/<%[\w\W]*|^[\w\W]*%>/g),ED=bn(/\${[\w\W]*/g),MD=bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),LD=bn(/^aria-[\-\w]+$/),bw=bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ND=bn(/^(?:\w+script|data):/i),jD=bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),OD=bn(/^html$/i),RD=bn(/^[a-z][.\w]*(-[.\w]+)+$/i),ca={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},DD=function(){return typeof window>"u"?null:window},FD=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(n=r.getAttribute(a));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},vw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function OA(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DD();const e=Ot=>OA(Ot);if(e.version="3.4.7",e.removed=[],!i||!i.document||i.document.nodeType!==ca.document||!i.Element)return e.isSupported=!1,e;let r=i.document;const n=r,a=n.currentScript;i.DocumentFragment;const o=i.HTMLTemplateElement,c=i.Node,h=i.Element,u=i.NodeFilter,f=i.NamedNodeMap;f===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const p=i.DOMParser,g=i.trustedTypes,b=h.prototype,y=ua(b,"cloneNode"),v=ua(b,"remove"),C=ua(b,"nextSibling"),_=ua(b,"childNodes"),w=ua(b,"parentNode"),T=ua(b,"shadowRoot"),B=ua(b,"attributes"),E=c&&c.prototype?ua(c.prototype,"nodeType"):null,N=c&&c.prototype?ua(c.prototype,"nodeName"):null;if(typeof o=="function"){const Ot=r.createElement("template");Ot.content&&Ot.content.ownerDocument&&(r=Ot.content.ownerDocument)}let O,M="";const j=r,G=j.implementation,$=j.createNodeIterator,z=j.createDocumentFragment,K=j.getElementsByTagName,W=n.importNode;let D=vw();e.isSupported=typeof NA=="function"&&typeof w=="function"&&G&&G.createHTMLDocument!==void 0;const U=BD,R=AD,I=ED,P=MD,V=LD,J=ND,H=jD,tt=RD;let ot=bw,st=null;const bt=ce({},[...gw,...j0,...O0,...R0,...mw]);let kt=null;const Lt=ce({},[...yw,...D0,...xw,...sp]);let at=Object.seal(Sc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,gt=null;const Bt=Object.seal(Sc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Wt=!0,Yt=!0,Zt=!1,Et=!0,Vt=!1,Se=!0,ni=!1,Ii=!1,ue=!1,ke=!1,De=!1,Ni=!1,Pe=!0,or=!1;const Gn="user-content-";let Jr=!0,Fr=!1,Yn={},lr=null;const Mo=ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $l=null;const Zi=ce({},["audio","video","img","source","image","track"]);let Si=null;const $r=ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",vs="http://www.w3.org/2000/svg",_r="http://www.w3.org/1999/xhtml";let Vn=_r,Xn=!1,Qn=null;const Cs=ce({},[mi,vs,_r],N0);let zr=ce({},["mi","mo","mn","ms","mtext"]),Zn=ce({},["annotation-xml"]);const Cn=ce({},["title","style","font","a","script"]);let Kn=null;const ks=["application/xhtml+xml","text/html"],_s="text/html";let Fe=null,Jn=null;const ws=r.createElement("form"),Ss=function(Y){return Y instanceof RegExp||Y instanceof Function},kn=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Jn&&Jn===Y)return;(!Y||typeof Y!="object")&&(Y={}),Y=er(Y),Kn=ks.indexOf(Y.PARSER_MEDIA_TYPE)===-1?_s:Y.PARSER_MEDIA_TYPE,Fe=Kn==="application/xhtml+xml"?N0:$u,st=ui(Y,"ALLOWED_TAGS")&&fr(Y.ALLOWED_TAGS)?ce({},Y.ALLOWED_TAGS,Fe):bt,kt=ui(Y,"ALLOWED_ATTR")&&fr(Y.ALLOWED_ATTR)?ce({},Y.ALLOWED_ATTR,Fe):Lt,Qn=ui(Y,"ALLOWED_NAMESPACES")&&fr(Y.ALLOWED_NAMESPACES)?ce({},Y.ALLOWED_NAMESPACES,N0):Cs,Si=ui(Y,"ADD_URI_SAFE_ATTR")&&fr(Y.ADD_URI_SAFE_ATTR)?ce(er($r),Y.ADD_URI_SAFE_ATTR,Fe):$r,$l=ui(Y,"ADD_DATA_URI_TAGS")&&fr(Y.ADD_DATA_URI_TAGS)?ce(er(Zi),Y.ADD_DATA_URI_TAGS,Fe):Zi,lr=ui(Y,"FORBID_CONTENTS")&&fr(Y.FORBID_CONTENTS)?ce({},Y.FORBID_CONTENTS,Fe):Mo,Ct=ui(Y,"FORBID_TAGS")&&fr(Y.FORBID_TAGS)?ce({},Y.FORBID_TAGS,Fe):er({}),gt=ui(Y,"FORBID_ATTR")&&fr(Y.FORBID_ATTR)?ce({},Y.FORBID_ATTR,Fe):er({}),Yn=ui(Y,"USE_PROFILES")?Y.USE_PROFILES&&typeof Y.USE_PROFILES=="object"?er(Y.USE_PROFILES):Y.USE_PROFILES:!1,Wt=Y.ALLOW_ARIA_ATTR!==!1,Yt=Y.ALLOW_DATA_ATTR!==!1,Zt=Y.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=Y.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Vt=Y.SAFE_FOR_TEMPLATES||!1,Se=Y.SAFE_FOR_XML!==!1,ni=Y.WHOLE_DOCUMENT||!1,ke=Y.RETURN_DOM||!1,De=Y.RETURN_DOM_FRAGMENT||!1,Ni=Y.RETURN_TRUSTED_TYPE||!1,ue=Y.FORCE_BODY||!1,Pe=Y.SANITIZE_DOM!==!1,or=Y.SANITIZE_NAMED_PROPS||!1,Jr=Y.KEEP_CONTENT!==!1,Fr=Y.IN_PLACE||!1,ot=wD(Y.ALLOWED_URI_REGEXP)?Y.ALLOWED_URI_REGEXP:bw,Vn=typeof Y.NAMESPACE=="string"?Y.NAMESPACE:_r,zr=ui(Y,"MATHML_TEXT_INTEGRATION_POINTS")&&Y.MATHML_TEXT_INTEGRATION_POINTS&&typeof Y.MATHML_TEXT_INTEGRATION_POINTS=="object"?er(Y.MATHML_TEXT_INTEGRATION_POINTS):ce({},["mi","mo","mn","ms","mtext"]),Zn=ui(Y,"HTML_INTEGRATION_POINTS")&&Y.HTML_INTEGRATION_POINTS&&typeof Y.HTML_INTEGRATION_POINTS=="object"?er(Y.HTML_INTEGRATION_POINTS):ce({},["annotation-xml"]);const mt=ui(Y,"CUSTOM_ELEMENT_HANDLING")&&Y.CUSTOM_ELEMENT_HANDLING&&typeof Y.CUSTOM_ELEMENT_HANDLING=="object"?er(Y.CUSTOM_ELEMENT_HANDLING):Sc(null);if(at=Sc(null),ui(mt,"tagNameCheck")&&Ss(mt.tagNameCheck)&&(at.tagNameCheck=mt.tagNameCheck),ui(mt,"attributeNameCheck")&&Ss(mt.attributeNameCheck)&&(at.attributeNameCheck=mt.attributeNameCheck),ui(mt,"allowCustomizedBuiltInElements")&&typeof mt.allowCustomizedBuiltInElements=="boolean"&&(at.allowCustomizedBuiltInElements=mt.allowCustomizedBuiltInElements),Vt&&(Yt=!1),De&&(ke=!0),Yn&&(st=ce({},mw),kt=Sc(null),Yn.html===!0&&(ce(st,gw),ce(kt,yw)),Yn.svg===!0&&(ce(st,j0),ce(kt,D0),ce(kt,sp)),Yn.svgFilters===!0&&(ce(st,O0),ce(kt,D0),ce(kt,sp)),Yn.mathMl===!0&&(ce(st,R0),ce(kt,xw),ce(kt,sp))),Bt.tagCheck=null,Bt.attributeCheck=null,ui(Y,"ADD_TAGS")&&(typeof Y.ADD_TAGS=="function"?Bt.tagCheck=Y.ADD_TAGS:fr(Y.ADD_TAGS)&&(st===bt&&(st=er(st)),ce(st,Y.ADD_TAGS,Fe))),ui(Y,"ADD_ATTR")&&(typeof Y.ADD_ATTR=="function"?Bt.attributeCheck=Y.ADD_ATTR:fr(Y.ADD_ATTR)&&(kt===Lt&&(kt=er(kt)),ce(kt,Y.ADD_ATTR,Fe))),ui(Y,"ADD_URI_SAFE_ATTR")&&fr(Y.ADD_URI_SAFE_ATTR)&&ce(Si,Y.ADD_URI_SAFE_ATTR,Fe),ui(Y,"FORBID_CONTENTS")&&fr(Y.FORBID_CONTENTS)&&(lr===Mo&&(lr=er(lr)),ce(lr,Y.FORBID_CONTENTS,Fe)),ui(Y,"ADD_FORBID_CONTENTS")&&fr(Y.ADD_FORBID_CONTENTS)&&(lr===Mo&&(lr=er(lr)),ce(lr,Y.ADD_FORBID_CONTENTS,Fe)),Jr&&(st["#text"]=!0),ni&&ce(st,["html","head","body"]),st.table&&(ce(st,["tbody"]),delete Ct.tbody),Y.TRUSTED_TYPES_POLICY){if(typeof Y.TRUSTED_TYPES_POLICY.createHTML!="function")throw gu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Y.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw gu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');O=Y.TRUSTED_TYPES_POLICY,M=O.createHTML("")}else O===void 0&&(O=FD(g,a)),O!==null&&typeof M=="string"&&(M=O.createHTML(""));(D.uponSanitizeElement.length>0||D.uponSanitizeAttribute.length>0)&&st===bt&&(st=er(st)),D.uponSanitizeAttribute.length>0&&kt===Lt&&(kt=er(kt)),br&&br(Y),Jn=Y},Ts=ce({},[...j0,...O0,...SD]),Bs=ce({},[...R0,...TD]),_n=function(Y){let mt=w(Y);(!mt||!mt.tagName)&&(mt={namespaceURI:Vn,tagName:"template"});const At=$u(Y.tagName),ye=$u(mt.tagName);return Qn[Y.namespaceURI]?Y.namespaceURI===vs?mt.namespaceURI===_r?At==="svg":mt.namespaceURI===mi?At==="svg"&&(ye==="annotation-xml"||zr[ye]):!!Ts[At]:Y.namespaceURI===mi?mt.namespaceURI===_r?At==="math":mt.namespaceURI===vs?At==="math"&&Zn[ye]:!!Bs[At]:Y.namespaceURI===_r?mt.namespaceURI===vs&&!Zn[ye]||mt.namespaceURI===mi&&!zr[ye]?!1:!Bs[At]&&(Cn[At]||!Ts[At]):!!(Kn==="application/xhtml+xml"&&Qn[Y.namespaceURI]):!1},Ki=function(Y){yc(e.removed,{element:Y});try{w(Y).removeChild(Y)}catch{v(Y)}},ji=function(Y,mt){try{yc(e.removed,{attribute:mt.getAttributeNode(Y),from:mt})}catch{yc(e.removed,{attribute:null,from:mt})}if(mt.removeAttribute(Y),Y==="is")if(ke||De)try{Ki(mt)}catch{}else try{mt.setAttribute(Y,"")}catch{}},ai=function(Y){let mt=null,At=null;if(ue)Y="<remove></remove>"+Y;else{const Me=uw(Y,/^[\r\n\t ]+/);At=Me&&Me[0]}Kn==="application/xhtml+xml"&&Vn===_r&&(Y='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Y+"</body></html>");const ye=O?O.createHTML(Y):Y;if(Vn===_r)try{mt=new p().parseFromString(ye,Kn)}catch{}if(!mt||!mt.documentElement){mt=G.createDocument(Vn,"template",null);try{mt.documentElement.innerHTML=Xn?M:ye}catch{}}const se=mt.body||mt.documentElement;return Y&&At&&se.insertBefore(r.createTextNode(At),se.childNodes[0]||null),Vn===_r?K.call(mt,ni?"html":"body")[0]:ni?mt.documentElement:se},yi=function(Y){return $.call(Y.ownerDocument||Y,Y,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},wn=function(Y){Y.normalize();const mt=$.call(Y.ownerDocument||Y,Y,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let At=mt.nextNode();for(;At;){let ye=At.data;mc([U,R,I],se=>{ye=xc(ye,se," ")}),At.data=ye,At=mt.nextNode()}},ta=function(Y){const mt=N?N(Y):null;return typeof mt!="string"||Fe(mt)!=="form"?!1:typeof Y.nodeName!="string"||typeof Y.textContent!="string"||typeof Y.removeChild!="function"||Y.attributes!==B(Y)||typeof Y.removeAttribute!="function"||typeof Y.setAttribute!="function"||typeof Y.namespaceURI!="string"||typeof Y.insertBefore!="function"||typeof Y.hasChildNodes!="function"||Y.nodeType!==E(Y)||Y.childNodes!==_(Y)},ea=function(Y){if(!E||typeof Y!="object"||Y===null)return!1;try{return E(Y)===ca.documentFragment}catch{return!1}},As=function(Y){if(!E||typeof Y!="object"||Y===null)return!1;try{return typeof E(Y)=="number"}catch{return!1}};function cr(Ot,Y,mt){mc(Ot,At=>{At.call(e,Y,mt,Jn)})}const ia=function(Y){let mt=null;if(cr(D.beforeSanitizeElements,Y,null),ta(Y))return Ki(Y),!0;const At=Fe(Y.nodeName);if(cr(D.uponSanitizeElement,Y,{tagName:At,allowedTags:st}),Se&&Y.hasChildNodes()&&!As(Y.firstElementChild)&&Yi(/<[/\w!]/g,Y.innerHTML)&&Yi(/<[/\w!]/g,Y.textContent)||Se&&Y.namespaceURI===_r&&At==="style"&&As(Y.firstElementChild)||Y.nodeType===ca.progressingInstruction||Se&&Y.nodeType===ca.comment&&Yi(/<[/\w]/g,Y.data))return Ki(Y),!0;if(Ct[At]||!(Bt.tagCheck instanceof Function&&Bt.tagCheck(At))&&!st[At]){if(!Ct[At]&&tn(At)&&(at.tagNameCheck instanceof RegExp&&Yi(at.tagNameCheck,At)||at.tagNameCheck instanceof Function&&at.tagNameCheck(At)))return!1;if(Jr&&!lr[At]){const se=w(Y),Me=_(Y);if(Me&&se){const Pi=Me.length;for(let Oi=Pi-1;Oi>=0;--Oi){const Xe=y(Me[Oi],!0);se.insertBefore(Xe,C(Y))}}}return Ki(Y),!0}return(E?E(Y):Y.nodeType)===ca.element&&!_n(Y)||(At==="noscript"||At==="noembed"||At==="noframes")&&Yi(/<\/no(script|embed|frames)/i,Y.innerHTML)?(Ki(Y),!0):(Vt&&Y.nodeType===ca.text&&(mt=Y.textContent,mc([U,R,I],se=>{mt=xc(mt,se," ")}),Y.textContent!==mt&&(yc(e.removed,{element:Y.cloneNode()}),Y.textContent=mt)),cr(D.afterSanitizeElements,Y,null),!1)},Es=function(Y,mt,At){if(gt[mt]||Pe&&(mt==="id"||mt==="name")&&(At in r||At in ws))return!1;const ye=kt[mt]||Bt.attributeCheck instanceof Function&&Bt.attributeCheck(mt,Y);if(!(Yt&&!gt[mt]&&Yi(P,mt))){if(!(Wt&&Yi(V,mt))){if(!ye||gt[mt]){if(!(tn(Y)&&(at.tagNameCheck instanceof RegExp&&Yi(at.tagNameCheck,Y)||at.tagNameCheck instanceof Function&&at.tagNameCheck(Y))&&(at.attributeNameCheck instanceof RegExp&&Yi(at.attributeNameCheck,mt)||at.attributeNameCheck instanceof Function&&at.attributeNameCheck(mt,Y))||mt==="is"&&at.allowCustomizedBuiltInElements&&(at.tagNameCheck instanceof RegExp&&Yi(at.tagNameCheck,At)||at.tagNameCheck instanceof Function&&at.tagNameCheck(At))))return!1}else if(!Si[mt]){if(!Yi(ot,xc(At,H,""))){if(!((mt==="src"||mt==="xlink:href"||mt==="href")&&Y!=="script"&&fw(At,"data:")===0&&$l[Y])){if(!(Zt&&!Yi(J,xc(At,H,"")))){if(At)return!1}}}}}}return!0},ra=ce({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),tn=function(Y){return!ra[$u(Y)]&&Yi(tt,Y)},Sn=function(Y){cr(D.beforeSanitizeAttributes,Y,null);const mt=Y.attributes;if(!mt||ta(Y))return;const At={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt,forceKeepAttr:void 0};let ye=mt.length;for(;ye--;){const se=mt[ye],Me=se.name,Pi=se.namespaceURI,Oi=se.value,Xe=Fe(Me),Ri=Oi;let we=Me==="value"?Ri:xD(Ri);if(At.attrName=Xe,At.attrValue=we,At.keepAttr=!0,At.forceKeepAttr=void 0,cr(D.uponSanitizeAttribute,Y,At),we=At.attrValue,or&&(Xe==="id"||Xe==="name")&&fw(we,Gn)!==0&&(ji(Me,Y),we=Gn+we),Se&&Yi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,we)){ji(Me,Y);continue}if(Xe==="attributename"&&uw(we,"href")){ji(Me,Y);continue}if(At.forceKeepAttr)continue;if(!At.keepAttr){ji(Me,Y);continue}if(!Et&&Yi(/\/>/i,we)){ji(Me,Y);continue}Vt&&mc([U,R,I],Ma=>{we=xc(we,Ma," ")});const Tn=Fe(Y.nodeName);if(!Es(Tn,Xe,we)){ji(Me,Y);continue}if(O&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Pi)switch(g.getAttributeType(Tn,Xe)){case"TrustedHTML":{we=O.createHTML(we);break}case"TrustedScriptURL":{we=O.createScriptURL(we);break}}if(we!==Ri)try{Pi?Y.setAttributeNS(Pi,Me,we):Y.setAttribute(Me,we),ta(Y)?Ki(Y):hw(e.removed)}catch{ji(Me,Y)}}cr(D.afterSanitizeAttributes,Y,null)},qi=function(Y){let mt=null;const At=yi(Y);for(cr(D.beforeSanitizeShadowDOM,Y,null);mt=At.nextNode();)if(cr(D.uponSanitizeShadowNode,mt,null),ia(mt),Sn(mt),ea(mt.content)&&qi(mt.content),(E?E(mt):mt.nodeType)===ca.element){const se=T?T(mt):mt.shadowRoot;ea(se)&&(He(se),qi(se))}cr(D.afterSanitizeShadowDOM,Y,null)},He=function(Y){const mt=E?E(Y):Y.nodeType;if(mt===ca.element){const se=T?T(Y):Y.shadowRoot;ea(se)&&(He(se),qi(se))}const At=_?_(Y):Y.childNodes;if(!At)return;const ye=[];mc(At,se=>{yc(ye,se)});for(const se of ye)He(se);if(mt===ca.element){const se=N?N(Y):null;if(typeof se=="string"&&Fe(se)==="template"){const Me=Y.content;ea(Me)&&He(Me)}}};return e.sanitize=function(Ot){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},mt=null,At=null,ye=null,se=null;if(Xn=!Ot,Xn&&(Ot="<!-->"),typeof Ot!="string"&&!As(Ot)&&(Ot=_D(Ot),typeof Ot!="string"))throw gu("dirty is not a string, aborting");if(!e.isSupported)return Ot;if(Ii||kn(Y),e.removed=[],typeof Ot=="string"&&(Fr=!1),Fr){const Oi=N?N(Ot):Ot.nodeName;if(typeof Oi=="string"){const Xe=Fe(Oi);if(!st[Xe]||Ct[Xe])throw gu("root node is forbidden and cannot be sanitized in-place")}if(ta(Ot))throw gu("root node is clobbered and cannot be sanitized in-place");He(Ot)}else if(As(Ot))mt=ai("<!---->"),At=mt.ownerDocument.importNode(Ot,!0),At.nodeType===ca.element&&At.nodeName==="BODY"||At.nodeName==="HTML"?mt=At:mt.appendChild(At),He(At);else{if(!ke&&!Vt&&!ni&&Ot.indexOf("<")===-1)return O&&Ni?O.createHTML(Ot):Ot;if(mt=ai(Ot),!mt)return ke?null:Ni?M:""}mt&&ue&&Ki(mt.firstChild);const Me=yi(Fr?Ot:mt);for(;ye=Me.nextNode();)ia(ye),Sn(ye),ea(ye.content)&&qi(ye.content);if(Fr)return Vt&&wn(Ot),Ot;if(ke){if(Vt&&wn(mt),De)for(se=z.call(mt.ownerDocument);mt.firstChild;)se.appendChild(mt.firstChild);else se=mt;return(kt.shadowroot||kt.shadowrootmode)&&(se=W.call(n,se,!0)),se}let Pi=ni?mt.outerHTML:mt.innerHTML;return ni&&st["!doctype"]&&mt.ownerDocument&&mt.ownerDocument.doctype&&mt.ownerDocument.doctype.name&&Yi(OD,mt.ownerDocument.doctype.name)&&(Pi="<!DOCTYPE "+mt.ownerDocument.doctype.name+`>
107
+ `+Pi),Vt&&mc([U,R,I],Oi=>{Pi=xc(Pi,Oi," ")}),O&&Ni?O.createHTML(Pi):Pi},e.setConfig=function(){let Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kn(Ot),Ii=!0},e.clearConfig=function(){Jn=null,Ii=!1},e.isValidAttribute=function(Ot,Y,mt){Jn||kn({});const At=Fe(Ot),ye=Fe(Y);return Es(At,ye,mt)},e.addHook=function(Ot,Y){typeof Y=="function"&&yc(D[Ot],Y)},e.removeHook=function(Ot,Y){if(Y!==void 0){const mt=mD(D[Ot],Y);return mt===-1?void 0:yD(D[Ot],mt,1)[0]}return hw(D[Ot])},e.removeHooks=function(Ot){D[Ot]=[]},e.removeAllHooks=function(){D=vw()},e}var kl=OA();const $D="modulepreload",zD=function(i){return"/"+i},Cw={},Ce=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let c=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),u=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(r.map(f=>{if(f=zD(f),f in Cw)return;Cw[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const b=document.createElement("link");if(b.rel=p?"stylesheet":$D,p||(b.as="script"),b.crossOrigin="",b.href=f,u&&b.setAttribute("nonce",u),document.head.appendChild(b),p)return new Promise((y,v)=>{b.addEventListener("load",y),b.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return a.then(c=>{for(const h of c||[])h.status==="rejected"&&o(h.reason);return e().catch(o)})};var Np={exports:{}},ID=Np.exports,kw;function qD(){return kw||(kw=1,(function(i,e){(function(r,n){i.exports=n()})(ID,(function(){var r=1e3,n=6e4,a=36e5,o="millisecond",c="second",h="minute",u="hour",f="day",p="week",g="month",b="quarter",y="year",v="date",C="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var U=["th","st","nd","rd"],R=D%100;return"["+D+(U[(R-20)%10]||U[R]||U[0])+"]"}},B=function(D,U,R){var I=String(D);return!I||I.length>=U?D:""+Array(U+1-I.length).join(R)+D},E={s:B,z:function(D){var U=-D.utcOffset(),R=Math.abs(U),I=Math.floor(R/60),P=R%60;return(U<=0?"+":"-")+B(I,2,"0")+":"+B(P,2,"0")},m:function D(U,R){if(U.date()<R.date())return-D(R,U);var I=12*(R.year()-U.year())+(R.month()-U.month()),P=U.clone().add(I,g),V=R-P<0,J=U.clone().add(I+(V?-1:1),g);return+(-(I+(R-P)/(V?P-J:J-P))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:g,y,w:p,d:f,D:v,h:u,m:h,s:c,ms:o,Q:b}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},N="en",O={};O[N]=T;var M="$isDayjsObject",j=function(D){return D instanceof K||!(!D||!D[M])},G=function D(U,R,I){var P;if(!U)return N;if(typeof U=="string"){var V=U.toLowerCase();O[V]&&(P=V),R&&(O[V]=R,P=V);var J=U.split("-");if(!P&&J.length>1)return D(J[0])}else{var H=U.name;O[H]=U,P=H}return!I&&P&&(N=P),P||!I&&N},$=function(D,U){if(j(D))return D.clone();var R=typeof U=="object"?U:{};return R.date=D,R.args=arguments,new K(R)},z=E;z.l=G,z.i=j,z.w=function(D,U){return $(D,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var K=(function(){function D(R){this.$L=G(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[M]=!0}var U=D.prototype;return U.parse=function(R){this.$d=(function(I){var P=I.date,V=I.utc;if(P===null)return new Date(NaN);if(z.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var J=P.match(_);if(J){var H=J[2]-1||0,tt=(J[7]||"0").substring(0,3);return V?new Date(Date.UTC(J[1],H,J[3]||1,J[4]||0,J[5]||0,J[6]||0,tt)):new Date(J[1],H,J[3]||1,J[4]||0,J[5]||0,J[6]||0,tt)}}return new Date(P)})(R),this.init()},U.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},U.$utils=function(){return z},U.isValid=function(){return this.$d.toString()!==C},U.isSame=function(R,I){var P=$(R);return this.startOf(I)<=P&&P<=this.endOf(I)},U.isAfter=function(R,I){return $(R)<this.startOf(I)},U.isBefore=function(R,I){return this.endOf(I)<$(R)},U.$g=function(R,I,P){return z.u(R)?this[I]:this.set(P,R)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(R,I){var P=this,V=!!z.u(I)||I,J=z.p(R),H=function(Ct,gt){var Bt=z.w(P.$u?Date.UTC(P.$y,gt,Ct):new Date(P.$y,gt,Ct),P);return V?Bt:Bt.endOf(f)},tt=function(Ct,gt){return z.w(P.toDate()[Ct].apply(P.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(gt)),P)},ot=this.$W,st=this.$M,bt=this.$D,kt="set"+(this.$u?"UTC":"");switch(J){case y:return V?H(1,0):H(31,11);case g:return V?H(1,st):H(0,st+1);case p:var Lt=this.$locale().weekStart||0,at=(ot<Lt?ot+7:ot)-Lt;return H(V?bt-at:bt+(6-at),st);case f:case v:return tt(kt+"Hours",0);case u:return tt(kt+"Minutes",1);case h:return tt(kt+"Seconds",2);case c:return tt(kt+"Milliseconds",3);default:return this.clone()}},U.endOf=function(R){return this.startOf(R,!1)},U.$set=function(R,I){var P,V=z.p(R),J="set"+(this.$u?"UTC":""),H=(P={},P[f]=J+"Date",P[v]=J+"Date",P[g]=J+"Month",P[y]=J+"FullYear",P[u]=J+"Hours",P[h]=J+"Minutes",P[c]=J+"Seconds",P[o]=J+"Milliseconds",P)[V],tt=V===f?this.$D+(I-this.$W):I;if(V===g||V===y){var ot=this.clone().set(v,1);ot.$d[H](tt),ot.init(),this.$d=ot.set(v,Math.min(this.$D,ot.daysInMonth())).$d}else H&&this.$d[H](tt);return this.init(),this},U.set=function(R,I){return this.clone().$set(R,I)},U.get=function(R){return this[z.p(R)]()},U.add=function(R,I){var P,V=this;R=Number(R);var J=z.p(I),H=function(st){var bt=$(V);return z.w(bt.date(bt.date()+Math.round(st*R)),V)};if(J===g)return this.set(g,this.$M+R);if(J===y)return this.set(y,this.$y+R);if(J===f)return H(1);if(J===p)return H(7);var tt=(P={},P[h]=n,P[u]=a,P[c]=r,P)[J]||1,ot=this.$d.getTime()+R*tt;return z.w(ot,this)},U.subtract=function(R,I){return this.add(-1*R,I)},U.format=function(R){var I=this,P=this.$locale();if(!this.isValid())return P.invalidDate||C;var V=R||"YYYY-MM-DDTHH:mm:ssZ",J=z.z(this),H=this.$H,tt=this.$m,ot=this.$M,st=P.weekdays,bt=P.months,kt=P.meridiem,Lt=function(gt,Bt,Wt,Yt){return gt&&(gt[Bt]||gt(I,V))||Wt[Bt].slice(0,Yt)},at=function(gt){return z.s(H%12||12,gt,"0")},Ct=kt||function(gt,Bt,Wt){var Yt=gt<12?"AM":"PM";return Wt?Yt.toLowerCase():Yt};return V.replace(w,(function(gt,Bt){return Bt||(function(Wt){switch(Wt){case"YY":return String(I.$y).slice(-2);case"YYYY":return z.s(I.$y,4,"0");case"M":return ot+1;case"MM":return z.s(ot+1,2,"0");case"MMM":return Lt(P.monthsShort,ot,bt,3);case"MMMM":return Lt(bt,ot);case"D":return I.$D;case"DD":return z.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Lt(P.weekdaysMin,I.$W,st,2);case"ddd":return Lt(P.weekdaysShort,I.$W,st,3);case"dddd":return st[I.$W];case"H":return String(H);case"HH":return z.s(H,2,"0");case"h":return at(1);case"hh":return at(2);case"a":return Ct(H,tt,!0);case"A":return Ct(H,tt,!1);case"m":return String(tt);case"mm":return z.s(tt,2,"0");case"s":return String(I.$s);case"ss":return z.s(I.$s,2,"0");case"SSS":return z.s(I.$ms,3,"0");case"Z":return J}return null})(gt)||J.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(R,I,P){var V,J=this,H=z.p(I),tt=$(R),ot=(tt.utcOffset()-this.utcOffset())*n,st=this-tt,bt=function(){return z.m(J,tt)};switch(H){case y:V=bt()/12;break;case g:V=bt();break;case b:V=bt()/3;break;case p:V=(st-ot)/6048e5;break;case f:V=(st-ot)/864e5;break;case u:V=st/a;break;case h:V=st/n;break;case c:V=st/r;break;default:V=st}return P?V:z.a(V)},U.daysInMonth=function(){return this.endOf(g).$D},U.$locale=function(){return O[this.$L]},U.locale=function(R,I){if(!R)return this.$L;var P=this.clone(),V=G(R,I,!0);return V&&(P.$L=V),P},U.clone=function(){return z.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},D})(),W=K.prototype;return $.prototype=W,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",f],["$M",g],["$y",y],["$D",v]].forEach((function(D){W[D[1]]=function(U){return this.$g(U,D[0],D[1])}})),$.extend=function(D,U){return D.$i||(D(U,K,$),D.$i=!0),$},$.locale=G,$.isDayjs=j,$.unix=function(D){return $(1e3*D)},$.en=O[N],$.Ls=O,$.p={},$}))})(Np)),Np.exports}var PD=qD();const HD=qg(PD);var RA=Object.defineProperty,A=(i,e)=>RA(i,"name",{value:e,configurable:!0}),UD=(i,e)=>{for(var r in e)RA(i,r,{get:e[r],enumerable:!0})},Xa={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},_t={trace:A((...i)=>{},"trace"),debug:A((...i)=>{},"debug"),info:A((...i)=>{},"info"),warn:A((...i)=>{},"warn"),error:A((...i)=>{},"error"),fatal:A((...i)=>{},"fatal")},jv=A(function(i="fatal"){let e=Xa.fatal;typeof i=="string"?i.toLowerCase()in Xa&&(e=Xa[i]):typeof i=="number"&&(e=i),_t.trace=()=>{},_t.debug=()=>{},_t.info=()=>{},_t.warn=()=>{},_t.error=()=>{},_t.fatal=()=>{},e<=Xa.fatal&&(_t.fatal=console.error?console.error.bind(console,hn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",hn("FATAL"))),e<=Xa.error&&(_t.error=console.error?console.error.bind(console,hn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",hn("ERROR"))),e<=Xa.warn&&(_t.warn=console.warn?console.warn.bind(console,hn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",hn("WARN"))),e<=Xa.info&&(_t.info=console.info?console.info.bind(console,hn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",hn("INFO"))),e<=Xa.debug&&(_t.debug=console.debug?console.debug.bind(console,hn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",hn("DEBUG"))),e<=Xa.trace&&(_t.trace=console.debug?console.debug.bind(console,hn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",hn("TRACE")))},"setLogLevel"),hn=A(i=>`%c${HD().format("ss.SSS")} : ${i} : `,"format");const jp={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:i=>i>=255?255:i<0?0:i,g:i=>i>=255?255:i<0?0:i,b:i=>i>=255?255:i<0?0:i,h:i=>i%360,s:i=>i>=100?100:i<0?0:i,l:i=>i>=100?100:i<0?0:i,a:i=>i>=1?1:i<0?0:i},toLinear:i=>{const e=i/255;return i>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(i,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?i+(e-i)*6*r:r<1/2?e:r<2/3?i+(e-i)*(2/3-r)*6:i),hsl2rgb:({h:i,s:e,l:r},n)=>{if(!e)return r*2.55;i/=360,e/=100,r/=100;const a=r<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(n){case"r":return jp.hue2rgb(o,a,i+1/3)*255;case"g":return jp.hue2rgb(o,a,i)*255;case"b":return jp.hue2rgb(o,a,i-1/3)*255}},rgb2hsl:({r:i,g:e,b:r},n)=>{i/=255,e/=255,r/=255;const a=Math.max(i,e,r),o=Math.min(i,e,r),c=(a+o)/2;if(n==="l")return c*100;if(a===o)return 0;const h=a-o,u=c>.5?h/(2-a-o):h/(a+o);if(n==="s")return u*100;switch(a){case i:return((e-r)/h+(e<r?6:0))*60;case e:return((r-i)/h+2)*60;case r:return((i-e)/h+4)*60;default:return-1}}},WD={clamp:(i,e,r)=>e>r?Math.min(e,Math.max(r,i)):Math.min(r,Math.max(e,i)),round:i=>Math.round(i*1e10)/1e10},GD={dec2hex:i=>{const e=Math.round(i).toString(16);return e.length>1?e:`0${e}`}},re={channel:jp,lang:WD,unit:GD},no={};for(let i=0;i<=255;i++)no[i]=re.unit.dec2hex(i);const ir={ALL:0,RGB:1,HSL:2};class YD{constructor(){this.type=ir.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=ir.ALL}is(e){return this.type===e}}class VD{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new YD}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=ir.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:a}=e;r===void 0&&(e.h=re.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=re.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=re.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:a}=e;r===void 0&&(e.r=re.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=re.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=re.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ir.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ir.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ir.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ir.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ir.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ir.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Wg=new VD({r:0,g:0,b:0,a:0},"transparent"),Lc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(i.charCodeAt(0)!==35)return;const e=i.match(Lc.re);if(!e)return;const r=e[1],n=parseInt(r,16),a=r.length,o=a%4===0,c=a>4,h=c?1:17,u=c?8:4,f=o?0:-1,p=c?255:15;return Wg.set({r:(n>>u*(f+3)&p)*h,g:(n>>u*(f+2)&p)*h,b:(n>>u*(f+1)&p)*h,a:o?(n&p)*h/255:1},i)},stringify:i=>{const{r:e,g:r,b:n,a}=i;return a<1?`#${no[Math.round(e)]}${no[Math.round(r)]}${no[Math.round(n)]}${no[Math.round(a*255)]}`:`#${no[Math.round(e)]}${no[Math.round(r)]}${no[Math.round(n)]}`}},rl={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:i=>{const e=i.match(rl.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return re.channel.clamp.h(parseFloat(r)*.9);case"rad":return re.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return re.channel.clamp.h(parseFloat(r)*360)}}return re.channel.clamp.h(parseFloat(i))},parse:i=>{const e=i.charCodeAt(0);if(e!==104&&e!==72)return;const r=i.match(rl.re);if(!r)return;const[,n,a,o,c,h]=r;return Wg.set({h:rl._hue2deg(n),s:re.channel.clamp.s(parseFloat(a)),l:re.channel.clamp.l(parseFloat(o)),a:c?re.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},i)},stringify:i=>{const{h:e,s:r,l:n,a}=i;return a<1?`hsla(${re.lang.round(e)}, ${re.lang.round(r)}%, ${re.lang.round(n)}%, ${a})`:`hsl(${re.lang.round(e)}, ${re.lang.round(r)}%, ${re.lang.round(n)}%)`}},Qu={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:i=>{i=i.toLowerCase();const e=Qu.colors[i];if(e)return Lc.parse(e)},stringify:i=>{const e=Lc.stringify(i);for(const r in Qu.colors)if(Qu.colors[r]===e)return r}},zu={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:i=>{const e=i.charCodeAt(0);if(e!==114&&e!==82)return;const r=i.match(zu.re);if(!r)return;const[,n,a,o,c,h,u,f,p]=r;return Wg.set({r:re.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:re.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:re.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:f?re.channel.clamp.a(p?parseFloat(f)/100:parseFloat(f)):1},i)},stringify:i=>{const{r:e,g:r,b:n,a}=i;return a<1?`rgba(${re.lang.round(e)}, ${re.lang.round(r)}, ${re.lang.round(n)}, ${re.lang.round(a)})`:`rgb(${re.lang.round(e)}, ${re.lang.round(r)}, ${re.lang.round(n)})`}},_a={format:{keyword:Qu,hex:Lc,rgb:zu,rgba:zu,hsl:rl,hsla:rl},parse:i=>{if(typeof i!="string")return i;const e=Lc.parse(i)||zu.parse(i)||rl.parse(i)||Qu.parse(i);if(e)return e;throw new Error(`Unsupported color format: "${i}"`)},stringify:i=>!i.changed&&i.color?i.color:i.type.is(ir.HSL)||i.data.r===void 0?rl.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?zu.stringify(i):Lc.stringify(i)},DA=(i,e)=>{const r=_a.parse(i);for(const n in e)r[n]=re.channel.clamp[n](e[n]);return _a.stringify(r)},vo=(i,e,r=0,n=1)=>{if(typeof i!="number")return DA(i,{a:e});const a=Wg.set({r:re.channel.clamp.r(i),g:re.channel.clamp.g(e),b:re.channel.clamp.b(r),a:re.channel.clamp.a(n)});return _a.stringify(a)},XD=i=>{const{r:e,g:r,b:n}=_a.parse(i),a=.2126*re.channel.toLinear(e)+.7152*re.channel.toLinear(r)+.0722*re.channel.toLinear(n);return re.lang.round(a)},QD=i=>XD(i)>=.5,Hn=i=>!QD(i),FA=(i,e,r)=>{const n=_a.parse(i),a=n[e],o=re.channel.clamp[e](a+r);return a!==o&&(n[e]=o),_a.stringify(n)},pt=(i,e)=>FA(i,"l",e),ft=(i,e)=>FA(i,"l",-e),F=(i,e)=>{const r=_a.parse(i),n={};for(const a in e)e[a]&&(n[a]=r[a]+e[a]);return DA(i,n)},ZD=(i,e,r=50)=>{const{r:n,g:a,b:o,a:c}=_a.parse(i),{r:h,g:u,b:f,a:p}=_a.parse(e),g=r/100,b=g*2-1,y=c-p,C=((b*y===-1?b:(b+y)/(1+b*y))+1)/2,_=1-C,w=n*C+h*_,T=a*C+u*_,B=o*C+f*_,E=c*g+p*(1-g);return vo(w,T,B,E)},rt=(i,e=100)=>{const r=_a.parse(i);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ZD(r,i,e)};var $A=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Zu=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,KD=/\s*%%.*\n/gm,Yc,zA=(Yc=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},A(Yc,"UnknownDiagramError"),Yc),_l={},Ov=A(function(i,e){i=i.replace($A,"").replace(Zu,"").replace(KD,`
108
+ `);for(const[r,{detector:n}]of Object.entries(_l))if(n(i,e))return r;throw new zA(`No diagram type detected matching given configuration for text: ${i}`)},"detectType"),Vx=A((...i)=>{for(const{id:e,detector:r,loader:n}of i)IA(e,r,n)},"registerLazyLoadedDiagrams"),IA=A((i,e,r)=>{_l[i]&&_t.warn(`Detector with key ${i} already exists. Overwriting.`),_l[i]={detector:e,loader:r},_t.debug(`Detector with key ${i} added${r?" with loader":""}`)},"addDetector"),JD=A(i=>_l[i].loader,"getDiagramLoader"),Xx=A((i,e,{depth:r=2,clobber:n=!1}={})=>{const a={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(i)?(e.forEach(o=>Xx(i,o,a)),i):Array.isArray(e)&&Array.isArray(i)?(e.forEach(o=>{i.includes(o)||i.push(o)}),i):i===void 0||r<=0?i!=null&&typeof i=="object"&&typeof e=="object"?Object.assign(i,e):e:(e!==void 0&&typeof i=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&e[o]!==null&&(i[o]===void 0||typeof i[o]=="object")?(i[o]===void 0&&(i[o]=Array.isArray(e[o])?[]:{}),i[o]=Xx(i[o],e[o],{depth:r-1,clobber:n})):(n||typeof i[o]!="object"&&typeof e[o]!="object")&&(i[o]=e[o])}),i)},"assignWithDepth"),Ei=Xx,Ba="#ffffff",Aa="#f2f2f2",ee=A((i,e)=>e?F(i,{s:-40,l:10}):F(i,{s:-40,l:-10}),"mkBorder"),Vc,tF=(Vc=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,n,a,o,c,h,u,f,p,g,b,y,v,C,_,w,T,B,E,N,O,M;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ft(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10)):(this.rowOdd=this.rowOdd||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||pt(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let j=0;j<this.THEME_COLOR_LIMIT;j++)this["cScale"+j]=ft(this["cScale"+j],75);else for(let j=0;j<this.THEME_COLOR_LIMIT;j++)this["cScale"+j]=ft(this["cScale"+j],25);for(let j=0;j<this.THEME_COLOR_LIMIT;j++)this["cScaleInv"+j]=this["cScaleInv"+j]||rt(this["cScale"+j]);for(let j=0;j<this.THEME_COLOR_LIMIT;j++)this.darkMode?this["cScalePeer"+j]=this["cScalePeer"+j]||pt(this["cScale"+j],10):this["cScalePeer"+j]=this["cScalePeer"+j]||ft(this["cScale"+j],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let j=0;j<this.THEME_COLOR_LIMIT;j++)this["cScaleLabel"+j]=this["cScaleLabel"+j]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let j=0;j<5;j++)this["surface"+j]=this["surface"+j]||F(this.mainBkg,{h:180,s:-15,l:e*(5+j*3)}),this["surfacePeer"+j]=this["surfacePeer"+j]||F(this.mainBkg,{h:180,s:-15,l:e*(8+j*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((n=this.radar)==null?void 0:n.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((h=this.radar)==null?void 0:h.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.graticuleStrokeWidth)||1,graticuleOpacity:((f=this.radar)==null?void 0:f.graticuleOpacity)||.3,legendBoxSize:((p=this.radar)==null?void 0:p.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((b=this.xyChart)==null?void 0:b.backgroundColor)||this.background,titleColor:((y=this.xyChart)==null?void 0:y.titleColor)||this.primaryTextColor,dataLabelColor:((v=this.xyChart)==null?void 0:v.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((C=this.xyChart)==null?void 0:C.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((w=this.xyChart)==null?void 0:w.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((B=this.xyChart)==null?void 0:B.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(Vc,"Theme"),Vc),eF=A(i=>{const e=new tF;return e.calculate(i),e},"getThemeVariables"),Xc,iF=(Xc=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.lineColor=rt(this.background),this.textColor=rt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(rt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=vo(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=ft("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ft(this.sectionBkgColor,10),this.taskBorderColor=vo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=vo(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||pt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var e,r,n,a,o,c,h,u,f,p,g,b,y,v,C,_,w,T,B,E,N,O;this.secondBkg=pt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=pt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=pt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=rt(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||rt(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScalePeer"+M]=this["cScalePeer"+M]||pt(this["cScale"+M],10);for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||F(this.mainBkg,{h:30,s:-30,l:-(-10+M*4)}),this["surfacePeer"+M]=this["surfacePeer"+M]||F(this.mainBkg,{h:30,s:-30,l:-(-7+M*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let M=0;M<8;M++)this["venn"+(M+1)]=this["venn"+(M+1)]??pt(this["cScale"+M],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((N=this.radar)==null?void 0:N.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=pt(this.secondaryColor,20),this.git1=pt(this.pie2||this.secondaryColor,20),this.git2=pt(this.pie3||this.tertiaryColor,20),this.git3=pt(this.pie4||F(this.primaryColor,{h:-30}),20),this.git4=pt(this.pie5||F(this.primaryColor,{h:-60}),20),this.git5=pt(this.pie6||F(this.primaryColor,{h:-90}),10),this.git6=pt(this.pie7||F(this.primaryColor,{h:60}),10),this.git7=pt(this.pie8||F(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||rt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||rt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||pt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||pt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(Xc,"Theme"),Xc),rF=A(i=>{const e=new iF;return e.calculate(i),e},"getThemeVariables"),Qc,nF=(Qc=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=F(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.lineColor=rt(this.background),this.textColor=rt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=vo(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var e,r,n,a,o,c,h,u,f,p,g,b,y,v,C,_,w,T,B,E,N,O;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=ft(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||F(this["cScale"+M],{h:180});for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||F(this.mainBkg,{h:30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||F(this.mainBkg,{h:30,l:-(7+M*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||rt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||rt(this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||pt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||pt(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||F(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-30}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||F(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((b=this.xyChart)==null?void 0:b.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((B=this.xyChart)==null?void 0:B.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||ft(rt(this.git0),25),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||rt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||rt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(Qc,"Theme"),Qc),aF=A(i=>{const e=new nF;return e.calculate(i),e},"getThemeVariables"),Zc,sF=(Zc=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=pt("#cde498",10),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.primaryColor),this.lineColor=rt(this.background),this.textColor=rt(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var e,r,n,a,o,c,h,u,f,p,g,b,y,v,C,_,w,T,B,E,N,O;this.actorBorder=ft(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=ft(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||F(this["cScale"+M],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||F(this.mainBkg,{h:30,s:-30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||F(this.mainBkg,{h:30,s:-30,l:-(8+M*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||pt(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-30}),this.pie5=this.pie5||F(this.secondaryColor,{l:-30}),this.pie6=this.pie6||F(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((b=this.xyChart)==null?void 0:b.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((B=this.xyChart)==null?void 0:B.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((O=this.xyChart)==null?void 0:O.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||rt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||rt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(Zc,"Theme"),Zc),oF=A(i=>{const e=new sF;return e.calculate(i),e},"getThemeVariables"),Kc,lF=(Kc=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=pt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.lineColor=rt(this.background),this.textColor=rt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var e,r,n,a,o,c,h,u,f,p,g,b,y,v,C,_,w,T,B,E,N,O;this.secondBkg=pt(this.contrast,55),this.border2=this.contrast,this.actorBorder=pt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||rt(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this.darkMode?this["cScalePeer"+M]=this["cScalePeer"+M]||pt(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||F(this.mainBkg,{l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||F(this.mainBkg,{l:-(8+M*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=pt(this.contrast,30),this.sectionBkgColor2=pt(this.contrast,30),this.taskBorderColor=ft(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=pt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ft(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let M=0;M<8;M++)this["venn"+(M+1)]=this["venn"+(M+1)]??this["cScale"+M];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((N=this.radar)==null?void 0:N.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ft(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||F(this.primaryColor,{h:-30}),this.git4=this.pie5||F(this.primaryColor,{h:-60}),this.git5=this.pie6||F(this.primaryColor,{h:-90}),this.git6=this.pie7||F(this.primaryColor,{h:60}),this.git7=this.pie8||F(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(Kc,"Theme"),Kc),cF=A(i=>{const e=new lF;return e.calculate(i),e},"getThemeVariables"),Jc,hF=(Jc=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var o,c,h,u,f,p,g,b,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=F(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||F(e,{h:30}),this.cScale4=this.cScale4||F(e,{h:60}),this.cScale5=this.cScale5||F(e,{h:90}),this.cScale6=this.cScale6||F(e,{h:120}),this.cScale7=this.cScale7||F(e,{h:150}),this.cScale8=this.cScale8||F(e,{h:210,l:150}),this.cScale9=this.cScale9||F(e,{h:270}),this.cScale10=this.cScale10||F(e,{h:300}),this.cScale11=this.cScale11||F(e,{h:330}),this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=ft(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=ft(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||rt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||pt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||ft(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||F(e,{h:64}),this.fillType3=this.fillType3||F(r,{h:64}),this.fillType4=this.fillType4||F(e,{h:-64}),this.fillType5=this.fillType5||F(r,{h:-64}),this.fillType6=this.fillType6||F(e,{h:128}),this.fillType7=this.fillType7||F(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||F(e,{l:-10}),this.pie5=this.pie5||F(r,{l:-10}),this.pie6=this.pie6||F(n,{l:-10}),this.pie7=this.pie7||F(e,{h:60,l:-10}),this.pie8=this.pie8||F(e,{h:-60,l:-10}),this.pie9=this.pie9||F(e,{h:120,l:0}),this.pie10=this.pie10||F(e,{h:60,l:-20}),this.pie11=this.pie11||F(e,{h:-60,l:-20}),this.pie12=this.pie12||F(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||F(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||F(e,{h:-30}),this.git4=this.git4||F(e,{h:-60}),this.git5=this.git5||F(e,{h:-90}),this.git6=this.git6||F(e,{h:60}),this.git7=this.git7||F(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(Jc,"Theme"),Jc),uF=A(i=>{const e=new hF;return e.calculate(i),e},"getThemeVariables"),th,fF=(th=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(rt("#323D47"),10),this.border1="#ccc",this.border2=vo(255,255,255,.25),this.arrowheadColor=rt(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,n,a,o,c,h,u,f,p,g,b;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||rt(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||F(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||F(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(th,"Theme"),th),dF=A(i=>{const e=new fF;return e.calculate(i),e},"getThemeVariables"),eh,pF=(eh=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ee("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,c,h,u,f,p,g,b,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=F(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=this.mainBkg;if(this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=ft(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=ft(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||rt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||pt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||ft(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||F(e,{h:64}),this.fillType3=this.fillType3||F(r,{h:64}),this.fillType4=this.fillType4||F(e,{h:-64}),this.fillType5=this.fillType5||F(r,{h:-64}),this.fillType6=this.fillType6||F(e,{h:128}),this.fillType7=this.fillType7||F(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||F(e,{l:-10}),this.pie5=this.pie5||F(r,{l:-10}),this.pie6=this.pie6||F(n,{l:-10}),this.pie7=this.pie7||F(e,{h:60,l:-10}),this.pie8=this.pie8||F(e,{h:-60,l:-10}),this.pie9=this.pie9||F(e,{h:120,l:0}),this.pie10=this.pie10||F(e,{h:60,l:-20}),this.pie11=this.pie11||F(e,{h:-60,l:-20}),this.pie12=this.pie12||F(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||F(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||F(e,{h:-30}),this.git4=this.git4||F(e,{h:-60}),this.git5=this.git5||F(e,{h:-90}),this.git6=this.git6||F(e,{h:60}),this.git7=this.git7||F(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(eh,"Theme"),eh),gF=A(i=>{const e=new pF;return e.calculate(i),e},"getThemeVariables"),ih,mF=(ih=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(rt("#323D47"),10),this.border1="#ccc",this.border2=vo(255,255,255,.25),this.arrowheadColor=rt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,n,a,o,c,h,u,f,p,g,b;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||rt(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||F(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||F(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(ih,"Theme"),ih),yF=A(i=>{const e=new mF;return e.calculate(i),e},"getThemeVariables"),rh,xF=(rh=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var o,c,h,u,f,p,g,b,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=F(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||rt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||pt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||ft(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||F(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||F(e,{h:64}),this.fillType3=this.fillType3||F(r,{h:64}),this.fillType4=this.fillType4||F(e,{h:-64}),this.fillType5=this.fillType5||F(r,{h:-64}),this.fillType6=this.fillType6||F(e,{h:128}),this.fillType7=this.fillType7||F(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||F(e,{l:-10}),this.pie5=this.pie5||F(r,{l:-10}),this.pie6=this.pie6||F(n,{l:-10}),this.pie7=this.pie7||F(e,{h:60,l:-10}),this.pie8=this.pie8||F(e,{h:-60,l:-10}),this.pie9=this.pie9||F(e,{h:120,l:0}),this.pie10=this.pie10||F(e,{h:60,l:-20}),this.pie11=this.pie11||F(e,{h:-60,l:-20}),this.pie12=this.pie12||F(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||F(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||F(e,{h:-30}),this.git4=this.git4||F(e,{h:-60}),this.git5=this.git5||F(e,{h:-90}),this.git6=this.git6||F(e,{h:60}),this.git7=this.git7||F(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(rh,"Theme"),rh),bF=A(i=>{const e=new xF;return e.calculate(i),e},"getThemeVariables"),nh,vF=(nh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(rt("#323D47"),10),this.border1="#ccc",this.border2=vo(255,255,255,.25),this.arrowheadColor=rt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,n,a,o,c,h,u,f,p,g,b;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||rt(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=ft(this["cScale"+y],75);const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||F(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||F(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Hn(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ba,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},A(nh,"Theme"),nh),CF=A(i=>{const e=new vF;return e.calculate(i),e},"getThemeVariables"),hs={base:{getThemeVariables:eF},dark:{getThemeVariables:rF},default:{getThemeVariables:aF},forest:{getThemeVariables:oF},neutral:{getThemeVariables:cF},neo:{getThemeVariables:uF},"neo-dark":{getThemeVariables:dF},redux:{getThemeVariables:gF},"redux-dark":{getThemeVariables:yF},"redux-color":{getThemeVariables:bF},"redux-dark-color":{getThemeVariables:CF}},Yr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},qA={...Yr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:hs.default.getThemeVariables(),sequence:{...Yr.sequence,messageFont:A(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:A(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:A(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Yr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yr.c4,useWidth:void 0,personFont:A(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yr.flowchart,inheritDir:!1},external_personFont:A(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:A(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:A(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:A(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:A(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:A(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:A(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:A(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:A(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:A(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:A(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:A(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:A(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:A(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:A(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:A(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:A(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:A(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:A(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:A(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:A(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Yr.pie,useWidth:984},xyChart:{...Yr.xyChart,useWidth:void 0},requirement:{...Yr.requirement,useWidth:void 0},packet:{...Yr.packet},treeView:{...Yr.treeView,useWidth:void 0},radar:{...Yr.radar},ishikawa:{...Yr.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Yr.venn}},PA=A((i,e="")=>Object.keys(i).reduce((r,n)=>Array.isArray(i[n])?r:typeof i[n]=="object"&&i[n]!==null?[...r,e+n,...PA(i[n],"")]:[...r,e+n],[]),"keyify"),kF=new Set(PA(qA,"")),HA=qA,Kp=A(i=>{if(_t.debug("sanitizeDirective called with",i),!(typeof i!="object"||i==null)){if(Array.isArray(i)){i.forEach(e=>Kp(e));return}for(const e of Object.keys(i)){if(_t.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!kF.has(e)||i[e]==null){_t.debug("sanitize deleting key: ",e),delete i[e];continue}if(typeof i[e]=="object"){_t.debug("sanitizing object",e),Kp(i[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(_t.debug("sanitizing css option",e),i[e]=_F(i[e]))}if(i.themeVariables)for(const e of Object.keys(i.themeVariables)){const r=i.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(i.themeVariables[e]="")}_t.debug("After sanitization",i)}},"sanitizeDirective"),_F=A(i=>{let e=0,r=0;for(const n of i){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":i},"sanitizeCss"),oh=Object.freeze(HA),ms=A(i=>!(i===!1||["false","null","0"].includes(String(i).trim().toLowerCase())),"evaluate"),jr=Ei({},oh),Jp,wl=[],Ku=Ei({},oh),Gg=A((i,e)=>{let r=Ei({},i),n={};for(const a of e)GA(a),n=Ei(n,a);if(r=Ei(r,n),n.theme&&n.theme in hs){const a=Ei({},Jp),o=Ei(a.themeVariables||{},n.themeVariables);r.theme&&r.theme in hs&&(r.themeVariables=hs[r.theme].getThemeVariables(o))}return Ku=r,VA(Ku),Ku},"updateCurrentConfig"),wF=A(i=>(jr=Ei({},oh),jr=Ei(jr,i),i.theme&&hs[i.theme]&&(jr.themeVariables=hs[i.theme].getThemeVariables(i.themeVariables)),Gg(jr,wl),jr),"setSiteConfig"),SF=A(i=>{Jp=Ei({},i)},"saveConfigFromInitialize"),TF=A(i=>(jr=Ei(jr,i),Gg(jr,wl),jr),"updateSiteConfig"),UA=A(()=>Ei({},jr),"getSiteConfig"),WA=A(i=>(VA(i),Ei(Ku,i),si()),"setConfig"),si=A(()=>Ei({},Ku),"getConfig"),GA=A(i=>{i&&(["secure",...jr.secure??[]].forEach(e=>{Object.hasOwn(i,e)&&(_t.debug(`Denied attempt to modify a secure key ${e}`,i[e]),delete i[e])}),Object.keys(i).forEach(e=>{e.startsWith("__")&&delete i[e]}),Object.keys(i).forEach(e=>{typeof i[e]=="string"&&(i[e].includes("<")||i[e].includes(">")||i[e].includes("url(data:"))&&delete i[e],typeof i[e]=="object"&&GA(i[e])}))},"sanitize"),BF=A(i=>{var e;Kp(i),i.fontFamily&&!((e=i.themeVariables)!=null&&e.fontFamily)&&(i.themeVariables={...i.themeVariables,fontFamily:i.fontFamily}),wl.push(i),Gg(jr,wl)},"addDirective"),tg=A((i=jr)=>{wl=[],Gg(i,wl)},"reset"),AF={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},_w={},YA=A(i=>{_w[i]||(_t.warn(AF[i]),_w[i]=!0)},"issueWarning"),VA=A(i=>{i&&(i.lazyLoadedDiagrams||i.loadExternalDiagramsAtStartup)&&YA("LAZY_LOAD_DEPRECATED")},"checkConfig"),Frt=A(()=>{let i={};Jp&&(i=Ei(i,Jp));for(const e of wl)i=Ei(i,e);return i},"getUserDefinedConfig"),vr=A(i=>{var e,r;return((e=i.flowchart)==null?void 0:e.htmlLabels)!=null&&YA("FLOWCHART_HTML_LABELS_DEPRECATED"),ms(i.htmlLabels??((r=i.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Lf=/<br\s*\/?>/gi,EF=A(i=>i?ZA(i).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),MF=(()=>{let i=!1;return()=>{i||(XA(),i=!0)}})();function XA(){const i="data-temp-href-target";kl.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(i,e.getAttribute("target")??"")}),kl.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(i)&&(e.setAttribute("target",e.getAttribute(i)??""),e.removeAttribute(i),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}A(XA,"setupDompurifyHooks");var QA=A(i=>(MF(),kl.sanitize(i)),"removeScript"),ww=A((i,e)=>{if(vr(e)){const r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?i=QA(i):r!=="loose"&&(i=ZA(i),i=i.replace(/</g,"&lt;").replace(/>/g,"&gt;"),i=i.replace(/=/g,"&equals;"),i=OF(i))}return i},"sanitizeMore"),qn=A((i,e)=>i&&(e.dompurifyConfig?i=kl.sanitize(ww(i,e),e.dompurifyConfig).toString():i=kl.sanitize(ww(i,e),{FORBID_TAGS:["style"]}).toString(),i),"sanitizeText"),LF=A((i,e)=>typeof i=="string"?qn(i,e):i.flat().map(r=>qn(r,e)),"sanitizeTextOrArray"),NF=A(i=>Lf.test(i),"hasBreaks"),jF=A(i=>i.split(Lf),"splitBreaks"),OF=A(i=>i.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ZA=A(i=>i.replace(Lf,"#br#"),"breakToPlaceholder"),RF=A(i=>{let e="";return i&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),DF=A(function(...i){const e=i.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),FF=A(function(...i){const e=i.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),Sw=A(function(i){const e=i.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let a=e[n];if(a===","&&n>0&&n+1<e.length){const o=e[n-1],c=e[n+1];$F(o,c)&&(a=o+","+c,n++,r.pop())}r.push(zF(a))}return r.join("")},"parseGenericTypes"),Qx=A((i,e)=>Math.max(0,i.split(e).length-1),"countOccurrence"),$F=A((i,e)=>{const r=Qx(i,"~"),n=Qx(e,"~");return r===1&&n===1},"shouldCombineSets"),zF=A(i=>{const e=Qx(i,"~");let r=!1;if(e<=1)return i;e%2!==0&&i.startsWith("~")&&(i=i.substring(1),r=!0);const n=[...i];let a=n.indexOf("~"),o=n.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)n[a]="<",n[o]=">",a=n.indexOf("~"),o=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Tw=A(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Zx=/\$\$(.*)\$\$/g,cf=A(i=>{var e;return(((e=i.match(Zx))==null?void 0:e.length)??0)>0},"hasKatex"),$rt=A(async(i,e)=>{const r=document.createElement("div");r.innerHTML=await KA(i,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),IF=A(async(i,e)=>{if(!cf(i))return i;if(!(Tw()||e.legacyMathML||e.forceLegacyMathML))return i.replace(Zx,"MathML is unsupported in this environment.");{const{default:r}=await Ce(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),n=e.forceLegacyMathML||!Tw()&&e.legacyMathML?"htmlAndMathml":"mathml";return i.split(Lf).map(a=>cf(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Zx,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),KA=A(async(i,e)=>qn(await IF(i,e),e),"renderKatexSanitized"),Nf={getRows:EF,sanitizeText:qn,sanitizeTextOrArray:LF,hasBreaks:NF,splitBreaks:jF,lineBreakRegex:Lf,removeScript:QA,getUrl:RF,evaluate:ms,getMax:DF,getMin:FF},qF=A(function(i,e){for(let r of e)i.attr(r[0],r[1])},"d3Attrs"),PF=A(function(i,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",i),n.set("width",e)),n},"calculateSvgSizeAttrs"),JA=A(function(i,e,r,n){const a=PF(e,r,n);qF(i,a)},"configureSvgSize"),HF=A(function(i,e,r,n){const a=e.node().getBBox(),o=a.width,c=a.height;_t.info(`SVG bounds: ${o}x${c}`,a);let h=0,u=0;_t.info(`Graph bounds: ${h}x${u}`,i),h=o+r*2,u=c+r*2,_t.info(`Calculated bounds: ${h}x${u}`),JA(e,u,h,n);const f=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",f)},"setupGraphViewbox"),Op={},UF=A((i,e,r,n)=>{let a="";return i in Op&&Op[i]?a=Op[i]({...r,svgId:n}):_t.warn(`No theme found for ${i}`),` & {
109
+ font-family: ${r.fontFamily};
110
+ font-size: ${r.fontSize};
111
+ fill: ${r.textColor}
112
+ }
113
+ @keyframes edge-animation-frame {
114
+ from {
115
+ stroke-dashoffset: 0;
116
+ }
117
+ }
118
+ @keyframes dash {
119
+ to {
120
+ stroke-dashoffset: 0;
121
+ }
122
+ }
123
+ & .edge-animation-slow {
124
+ stroke-dasharray: 9,5 !important;
125
+ stroke-dashoffset: 900;
126
+ animation: dash 50s linear infinite;
127
+ stroke-linecap: round;
128
+ }
129
+ & .edge-animation-fast {
130
+ stroke-dasharray: 9,5 !important;
131
+ stroke-dashoffset: 900;
132
+ animation: dash 20s linear infinite;
133
+ stroke-linecap: round;
134
+ }
135
+ /* Classes common for multiple diagrams */
136
+
137
+ & .error-icon {
138
+ fill: ${r.errorBkgColor};
139
+ }
140
+ & .error-text {
141
+ fill: ${r.errorTextColor};
142
+ stroke: ${r.errorTextColor};
143
+ }
144
+
145
+ & .edge-thickness-normal {
146
+ stroke-width: ${r.strokeWidth??1}px;
147
+ }
148
+ & .edge-thickness-thick {
149
+ stroke-width: 3.5px
150
+ }
151
+ & .edge-pattern-solid {
152
+ stroke-dasharray: 0;
153
+ }
154
+ & .edge-thickness-invisible {
155
+ stroke-width: 0;
156
+ fill: none;
157
+ }
158
+ & .edge-pattern-dashed{
159
+ stroke-dasharray: 3;
160
+ }
161
+ .edge-pattern-dotted {
162
+ stroke-dasharray: 2;
163
+ }
164
+
165
+ & .marker {
166
+ fill: ${r.lineColor};
167
+ stroke: ${r.lineColor};
168
+ }
169
+ & .marker.cross {
170
+ stroke: ${r.lineColor};
171
+ }
172
+
173
+ & svg {
174
+ font-family: ${r.fontFamily};
175
+ font-size: ${r.fontSize};
176
+ }
177
+ & p {
178
+ margin: 0
179
+ }
180
+
181
+ ${a}
182
+ .node .neo-node {
183
+ stroke: ${r.nodeBorder};
184
+ }
185
+
186
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
187
+ stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
188
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
189
+ }
190
+
191
+
192
+ [data-look="neo"].node path {
193
+ stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
194
+ stroke-width: ${r.strokeWidth??1}px;
195
+ }
196
+
197
+ [data-look="neo"].node .outer-path {
198
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
199
+ }
200
+
201
+ [data-look="neo"].node .neo-line path {
202
+ stroke: ${r.nodeBorder};
203
+ filter: none;
204
+ }
205
+
206
+ [data-look="neo"].node circle{
207
+ stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
208
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
209
+ }
210
+
211
+ [data-look="neo"].node circle .state-start{
212
+ fill: #000000;
213
+ }
214
+
215
+ [data-look="neo"].icon-shape .icon {
216
+ fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
217
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
218
+ }
219
+
220
+ [data-look="neo"].icon-shape .icon-neo path {
221
+ stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
222
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
223
+ }
224
+
225
+ ${e}
226
+ `},"getStyles"),WF=A((i,e)=>{e!==void 0&&(Op[i]=e)},"addStylesForDiagram"),GF=UF,tE={};UD(tE,{clear:()=>YF,getAccDescription:()=>ZF,getAccTitle:()=>XF,getDiagramTitle:()=>JF,setAccDescription:()=>QF,setAccTitle:()=>VF,setDiagramTitle:()=>KF});var Rv="",Dv="",Fv="",$v=A(i=>qn(i,si()),"sanitizeText"),YF=A(()=>{Rv="",Fv="",Dv=""},"clear"),VF=A(i=>{Rv=$v(i).replace(/^\s+/g,"")},"setAccTitle"),XF=A(()=>Rv,"getAccTitle"),QF=A(i=>{Fv=$v(i).replace(/\n\s+/g,`
227
+ `)},"setAccDescription"),ZF=A(()=>Fv,"getAccDescription"),KF=A(i=>{Dv=$v(i)},"setDiagramTitle"),JF=A(()=>Dv,"getDiagramTitle"),Bw=_t,t8=jv,Ae=si,zrt=WA,Irt=oh,zv=A(i=>qn(i,Ae()),"sanitizeText"),e8=HF,i8=A(()=>tE,"getCommonDb"),eg={},ig=A((i,e,r)=>{var n;eg[i]&&Bw.warn(`Diagram with id ${i} already registered. Overwriting.`),eg[i]=e,r&&IA(i,r),WF(i,e.styles),(n=e.injectUtils)==null||n.call(e,Bw,t8,Ae,zv,e8,i8(),()=>{})},"registerDiagram"),Kx=A(i=>{if(i in eg)return eg[i];throw new r8(i)},"getDiagram"),ah,r8=(ah=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},A(ah,"DiagramNotFoundError"),ah);class Aw extends Map{constructor(e,r=s8){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(Ew(this,e))}has(e){return super.has(Ew(this,e))}set(e,r){return super.set(n8(this,e),r)}delete(e){return super.delete(a8(this,e))}}function Ew({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):r}function n8({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):(i.set(n,r),r)}function a8({_intern:i,_key:e},r){const n=e(r);return i.has(n)&&(r=i.get(n),i.delete(n)),r}function s8(i){return i!==null&&typeof i=="object"?i.valueOf():i}function Mw(i,e){let r;if(e===void 0)for(const n of i)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of i)(a=e(a,++n,i))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function Lw(i,e){let r;if(e===void 0)for(const n of i)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of i)(a=e(a,++n,i))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function o8(i,e){let r=0;for(let n of i)(n=+n)&&(r+=n);return r}var l8={value:()=>{}};function jf(){for(var i=0,e=arguments.length,r={},n;i<e;++i){if(!(n=arguments[i]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Rp(r)}function Rp(i){this._=i}function c8(i,e){return i.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");if(a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Rp.prototype=jf.prototype={constructor:Rp,on:function(i,e){var r=this._,n=c8(i+"",r),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(i=n[o]).type)&&(a=h8(r[a],i.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<c;)if(a=(i=n[o]).type)r[a]=Nw(r[a],i.name,e);else if(e==null)for(a in r)r[a]=Nw(r[a],i.name,null);return this},copy:function(){var i={},e=this._;for(var r in e)i[r]=e[r].slice();return new Rp(i)},call:function(i,e){if((a=arguments.length-2)>0)for(var r=new Array(a),n=0,a,o;n<a;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(o=this._[i],n=0,a=o.length;n<a;++n)o[n].value.apply(e,r)},apply:function(i,e,r){if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(var n=this._[i],a=0,o=n.length;a<o;++a)n[a].value.apply(e,r)}};function h8(i,e){for(var r=0,n=i.length,a;r<n;++r)if((a=i[r]).name===e)return a.value}function Nw(i,e,r){for(var n=0,a=i.length;n<a;++n)if(i[n].name===e){i[n]=l8,i=i.slice(0,n).concat(i.slice(n+1));break}return r!=null&&i.push({name:e,value:r}),i}var Jx="http://www.w3.org/1999/xhtml";const jw={svg:"http://www.w3.org/2000/svg",xhtml:Jx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yg(i){var e=i+="",r=e.indexOf(":");return r>=0&&(e=i.slice(0,r))!=="xmlns"&&(i=i.slice(r+1)),jw.hasOwnProperty(e)?{space:jw[e],local:i}:i}function u8(i){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Jx&&e.documentElement.namespaceURI===Jx?e.createElement(i):e.createElementNS(r,i)}}function f8(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function eE(i){var e=Yg(i);return(e.local?f8:u8)(e)}function d8(){}function Iv(i){return i==null?d8:function(){return this.querySelector(i)}}function p8(i){typeof i!="function"&&(i=Iv(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=new Array(c),u,f,p=0;p<c;++p)(u=o[p])&&(f=i.call(u,u.__data__,p,o))&&("__data__"in u&&(f.__data__=u.__data__),h[p]=f);return new Zr(n,this._parents)}function g8(i){return i==null?[]:Array.isArray(i)?i:Array.from(i)}function m8(){return[]}function iE(i){return i==null?m8:function(){return this.querySelectorAll(i)}}function y8(i){return function(){return g8(i.apply(this,arguments))}}function x8(i){typeof i=="function"?i=y8(i):i=iE(i);for(var e=this._groups,r=e.length,n=[],a=[],o=0;o<r;++o)for(var c=e[o],h=c.length,u,f=0;f<h;++f)(u=c[f])&&(n.push(i.call(u,u.__data__,f,c)),a.push(u));return new Zr(n,a)}function rE(i){return function(){return this.matches(i)}}function nE(i){return function(e){return e.matches(i)}}var b8=Array.prototype.find;function v8(i){return function(){return b8.call(this.children,i)}}function C8(){return this.firstElementChild}function k8(i){return this.select(i==null?C8:v8(typeof i=="function"?i:nE(i)))}var _8=Array.prototype.filter;function w8(){return Array.from(this.children)}function S8(i){return function(){return _8.call(this.children,i)}}function T8(i){return this.selectAll(i==null?w8:S8(typeof i=="function"?i:nE(i)))}function B8(i){typeof i!="function"&&(i=rE(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,f=0;f<c;++f)(u=o[f])&&i.call(u,u.__data__,f,o)&&h.push(u);return new Zr(n,this._parents)}function aE(i){return new Array(i.length)}function A8(){return new Zr(this._enter||this._groups.map(aE),this._parents)}function rg(i,e){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=e}rg.prototype={constructor:rg,appendChild:function(i){return this._parent.insertBefore(i,this._next)},insertBefore:function(i,e){return this._parent.insertBefore(i,e)},querySelector:function(i){return this._parent.querySelector(i)},querySelectorAll:function(i){return this._parent.querySelectorAll(i)}};function E8(i){return function(){return i}}function M8(i,e,r,n,a,o){for(var c=0,h,u=e.length,f=o.length;c<f;++c)(h=e[c])?(h.__data__=o[c],n[c]=h):r[c]=new rg(i,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function L8(i,e,r,n,a,o,c){var h,u,f=new Map,p=e.length,g=o.length,b=new Array(p),y;for(h=0;h<p;++h)(u=e[h])&&(b[h]=y=c.call(u,u.__data__,h,e)+"",f.has(y)?a[h]=u:f.set(y,u));for(h=0;h<g;++h)y=c.call(i,o[h],h,o)+"",(u=f.get(y))?(n[h]=u,u.__data__=o[h],f.delete(y)):r[h]=new rg(i,o[h]);for(h=0;h<p;++h)(u=e[h])&&f.get(b[h])===u&&(a[h]=u)}function N8(i){return i.__data__}function j8(i,e){if(!arguments.length)return Array.from(this,N8);var r=e?L8:M8,n=this._parents,a=this._groups;typeof i!="function"&&(i=E8(i));for(var o=a.length,c=new Array(o),h=new Array(o),u=new Array(o),f=0;f<o;++f){var p=n[f],g=a[f],b=g.length,y=O8(i.call(p,p&&p.__data__,f,n)),v=y.length,C=h[f]=new Array(v),_=c[f]=new Array(v),w=u[f]=new Array(b);r(p,g,C,_,w,y,e);for(var T=0,B=0,E,N;T<v;++T)if(E=C[T]){for(T>=B&&(B=T+1);!(N=_[B])&&++B<v;);E._next=N||null}}return c=new Zr(c,n),c._enter=h,c._exit=u,c}function O8(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function R8(){return new Zr(this._exit||this._groups.map(aE),this._parents)}function D8(i,e,r){var n=this.enter(),a=this,o=this.exit();return typeof i=="function"?(n=i(n),n&&(n=n.selection())):n=n.append(i+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?o.remove():r(o),n&&a?n.merge(a).order():a}function F8(i){for(var e=i.selection?i.selection():i,r=this._groups,n=e._groups,a=r.length,o=n.length,c=Math.min(a,o),h=new Array(a),u=0;u<c;++u)for(var f=r[u],p=n[u],g=f.length,b=h[u]=new Array(g),y,v=0;v<g;++v)(y=f[v]||p[v])&&(b[v]=y);for(;u<a;++u)h[u]=r[u];return new Zr(h,this._parents)}function $8(){for(var i=this._groups,e=-1,r=i.length;++e<r;)for(var n=i[e],a=n.length-1,o=n[a],c;--a>=0;)(c=n[a])&&(o&&c.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(c,o),o=c);return this}function z8(i){i||(i=I8);function e(g,b){return g&&b?i(g.__data__,b.__data__):!g-!b}for(var r=this._groups,n=r.length,a=new Array(n),o=0;o<n;++o){for(var c=r[o],h=c.length,u=a[o]=new Array(h),f,p=0;p<h;++p)(f=c[p])&&(u[p]=f);u.sort(e)}return new Zr(a,this._parents).order()}function I8(i,e){return i<e?-1:i>e?1:i>=e?0:NaN}function q8(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function P8(){return Array.from(this)}function H8(){for(var i=this._groups,e=0,r=i.length;e<r;++e)for(var n=i[e],a=0,o=n.length;a<o;++a){var c=n[a];if(c)return c}return null}function U8(){let i=0;for(const e of this)++i;return i}function W8(){return!this.node()}function G8(i){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],o=0,c=a.length,h;o<c;++o)(h=a[o])&&i.call(h,h.__data__,o,a);return this}function Y8(i){return function(){this.removeAttribute(i)}}function V8(i){return function(){this.removeAttributeNS(i.space,i.local)}}function X8(i,e){return function(){this.setAttribute(i,e)}}function Q8(i,e){return function(){this.setAttributeNS(i.space,i.local,e)}}function Z8(i,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(i):this.setAttribute(i,r)}}function K8(i,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(i.space,i.local):this.setAttributeNS(i.space,i.local,r)}}function J8(i,e){var r=Yg(i);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?V8:Y8:typeof e=="function"?r.local?K8:Z8:r.local?Q8:X8)(r,e))}function sE(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function t$(i){return function(){this.style.removeProperty(i)}}function e$(i,e,r){return function(){this.style.setProperty(i,e,r)}}function i$(i,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(i):this.style.setProperty(i,n,r)}}function r$(i,e,r){return arguments.length>1?this.each((e==null?t$:typeof e=="function"?i$:e$)(i,e,r??"")):lh(this.node(),i)}function lh(i,e){return i.style.getPropertyValue(e)||sE(i).getComputedStyle(i,null).getPropertyValue(e)}function n$(i){return function(){delete this[i]}}function a$(i,e){return function(){this[i]=e}}function s$(i,e){return function(){var r=e.apply(this,arguments);r==null?delete this[i]:this[i]=r}}function o$(i,e){return arguments.length>1?this.each((e==null?n$:typeof e=="function"?s$:a$)(i,e)):this.node()[i]}function oE(i){return i.trim().split(/^|\s+/)}function qv(i){return i.classList||new lE(i)}function lE(i){this._node=i,this._names=oE(i.getAttribute("class")||"")}lE.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function cE(i,e){for(var r=qv(i),n=-1,a=e.length;++n<a;)r.add(e[n])}function hE(i,e){for(var r=qv(i),n=-1,a=e.length;++n<a;)r.remove(e[n])}function l$(i){return function(){cE(this,i)}}function c$(i){return function(){hE(this,i)}}function h$(i,e){return function(){(e.apply(this,arguments)?cE:hE)(this,i)}}function u$(i,e){var r=oE(i+"");if(arguments.length<2){for(var n=qv(this.node()),a=-1,o=r.length;++a<o;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?h$:e?l$:c$)(r,e))}function f$(){this.textContent=""}function d$(i){return function(){this.textContent=i}}function p$(i){return function(){var e=i.apply(this,arguments);this.textContent=e??""}}function g$(i){return arguments.length?this.each(i==null?f$:(typeof i=="function"?p$:d$)(i)):this.node().textContent}function m$(){this.innerHTML=""}function y$(i){return function(){this.innerHTML=i}}function x$(i){return function(){var e=i.apply(this,arguments);this.innerHTML=e??""}}function b$(i){return arguments.length?this.each(i==null?m$:(typeof i=="function"?x$:y$)(i)):this.node().innerHTML}function v$(){this.nextSibling&&this.parentNode.appendChild(this)}function C$(){return this.each(v$)}function k$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _$(){return this.each(k$)}function w$(i){var e=typeof i=="function"?i:eE(i);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function S$(){return null}function T$(i,e){var r=typeof i=="function"?i:eE(i),n=e==null?S$:typeof e=="function"?e:Iv(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function B$(){var i=this.parentNode;i&&i.removeChild(this)}function A$(){return this.each(B$)}function E$(){var i=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function M$(){var i=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function L$(i){return this.select(i?M$:E$)}function N$(i){return arguments.length?this.property("__data__",i):this.node().__data__}function j$(i){return function(e){i.call(this,e,this.__data__)}}function O$(i){return i.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function R$(i){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,o;r<a;++r)o=e[r],(!i.type||o.type===i.type)&&o.name===i.name?this.removeEventListener(o.type,o.listener,o.options):e[++n]=o;++n?e.length=n:delete this.__on}}}function D$(i,e,r){return function(){var n=this.__on,a,o=j$(e);if(n){for(var c=0,h=n.length;c<h;++c)if((a=n[c]).type===i.type&&a.name===i.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=r),a.value=e;return}}this.addEventListener(i.type,o,r),a={type:i.type,name:i.name,value:e,listener:o,options:r},n?n.push(a):this.__on=[a]}}function F$(i,e,r){var n=O$(i+""),a,o=n.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var u=0,f=h.length,p;u<f;++u)for(a=0,p=h[u];a<o;++a)if((c=n[a]).type===p.type&&c.name===p.name)return p.value}return}for(h=e?D$:R$,a=0;a<o;++a)this.each(h(n[a],e,r));return this}function uE(i,e,r){var n=sE(i),a=n.CustomEvent;typeof a=="function"?a=new a(e,r):(a=n.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),i.dispatchEvent(a)}function $$(i,e){return function(){return uE(this,i,e)}}function z$(i,e){return function(){return uE(this,i,e.apply(this,arguments))}}function I$(i,e){return this.each((typeof e=="function"?z$:$$)(i,e))}function*q$(){for(var i=this._groups,e=0,r=i.length;e<r;++e)for(var n=i[e],a=0,o=n.length,c;a<o;++a)(c=n[a])&&(yield c)}var fE=[null];function Zr(i,e){this._groups=i,this._parents=e}function Of(){return new Zr([[document.documentElement]],fE)}function P$(){return this}Zr.prototype=Of.prototype={constructor:Zr,select:p8,selectAll:x8,selectChild:k8,selectChildren:T8,filter:B8,data:j8,enter:A8,exit:R8,join:D8,merge:F8,selection:P$,order:$8,sort:z8,call:q8,nodes:P8,node:H8,size:U8,empty:W8,each:G8,attr:J8,style:r$,property:o$,classed:u$,text:g$,html:b$,raise:C$,lower:_$,append:w$,insert:T$,remove:A$,clone:L$,datum:N$,on:F$,dispatch:I$,[Symbol.iterator]:q$};function Xt(i){return typeof i=="string"?new Zr([[document.querySelector(i)]],[document.documentElement]):new Zr([[i]],fE)}function H$(i){let e;for(;e=i.sourceEvent;)i=e;return i}function ma(i,e){if(i=H$(i),e===void 0&&(e=i.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=i.clientX,n.y=i.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[i.clientX-a.left-e.clientLeft,i.clientY-a.top-e.clientTop]}}return[i.pageX,i.pageY]}const U$={passive:!1},hf={capture:!0,passive:!1};function F0(i){i.stopImmediatePropagation()}function Nc(i){i.preventDefault(),i.stopImmediatePropagation()}function dE(i){var e=i.document.documentElement,r=Xt(i).on("dragstart.drag",Nc,hf);"onselectstart"in e?r.on("selectstart.drag",Nc,hf):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function pE(i,e){var r=i.document.documentElement,n=Xt(i).on("dragstart.drag",null);e&&(n.on("click.drag",Nc,hf),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const op=i=>()=>i;function tb(i,{sourceEvent:e,subject:r,target:n,identifier:a,active:o,x:c,y:h,dx:u,dy:f,dispatch:p}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:p}})}tb.prototype.on=function(){var i=this._.on.apply(this._,arguments);return i===this._?this:i};function W$(i){return!i.ctrlKey&&!i.button}function G$(){return this.parentNode}function Y$(i,e){return e??{x:i.x,y:i.y}}function V$(){return navigator.maxTouchPoints||"ontouchstart"in this}function X$(){var i=W$,e=G$,r=Y$,n=V$,a={},o=jf("start","drag","end"),c=0,h,u,f,p,g=0;function b(E){E.on("mousedown.drag",y).filter(n).on("touchstart.drag",_).on("touchmove.drag",w,U$).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(E,N){if(!(p||!i.call(this,E,N))){var O=B(this,e.call(this,E,N),E,N,"mouse");O&&(Xt(E.view).on("mousemove.drag",v,hf).on("mouseup.drag",C,hf),dE(E.view),F0(E),f=!1,h=E.clientX,u=E.clientY,O("start",E))}}function v(E){if(Nc(E),!f){var N=E.clientX-h,O=E.clientY-u;f=N*N+O*O>g}a.mouse("drag",E)}function C(E){Xt(E.view).on("mousemove.drag mouseup.drag",null),pE(E.view,f),Nc(E),a.mouse("end",E)}function _(E,N){if(i.call(this,E,N)){var O=E.changedTouches,M=e.call(this,E,N),j=O.length,G,$;for(G=0;G<j;++G)($=B(this,M,E,N,O[G].identifier,O[G]))&&(F0(E),$("start",E,O[G]))}}function w(E){var N=E.changedTouches,O=N.length,M,j;for(M=0;M<O;++M)(j=a[N[M].identifier])&&(Nc(E),j("drag",E,N[M]))}function T(E){var N=E.changedTouches,O=N.length,M,j;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),M=0;M<O;++M)(j=a[N[M].identifier])&&(F0(E),j("end",E,N[M]))}function B(E,N,O,M,j,G){var $=o.copy(),z=ma(G||O,N),K,W,D;if((D=r.call(E,new tb("beforestart",{sourceEvent:O,target:b,identifier:j,active:c,x:z[0],y:z[1],dx:0,dy:0,dispatch:$}),M))!=null)return K=D.x-z[0]||0,W=D.y-z[1]||0,function U(R,I,P){var V=z,J;switch(R){case"start":a[j]=U,J=c++;break;case"end":delete a[j],--c;case"drag":z=ma(P||I,N),J=c;break}$.call(R,E,new tb(R,{sourceEvent:I,subject:D,target:b,identifier:j,active:J,x:z[0]+K,y:z[1]+W,dx:z[0]-V[0],dy:z[1]-V[1],dispatch:$}),M)}}return b.filter=function(E){return arguments.length?(i=typeof E=="function"?E:op(!!E),b):i},b.container=function(E){return arguments.length?(e=typeof E=="function"?E:op(E),b):e},b.subject=function(E){return arguments.length?(r=typeof E=="function"?E:op(E),b):r},b.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:op(!!E),b):n},b.on=function(){var E=o.on.apply(o,arguments);return E===o?b:E},b.clickDistance=function(E){return arguments.length?(g=(E=+E)*E,b):Math.sqrt(g)},b}function Pv(i,e,r){i.prototype=e.prototype=r,r.constructor=i}function gE(i,e){var r=Object.create(i.prototype);for(var n in e)r[n]=e[n];return r}function Rf(){}var uf=.7,ng=1/uf,jc="\\s*([+-]?\\d+)\\s*",ff="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ka="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q$=/^#([0-9a-f]{3,8})$/,Z$=new RegExp(`^rgb\\(${jc},${jc},${jc}\\)$`),K$=new RegExp(`^rgb\\(${ka},${ka},${ka}\\)$`),J$=new RegExp(`^rgba\\(${jc},${jc},${jc},${ff}\\)$`),tz=new RegExp(`^rgba\\(${ka},${ka},${ka},${ff}\\)$`),ez=new RegExp(`^hsl\\(${ff},${ka},${ka}\\)$`),iz=new RegExp(`^hsla\\(${ff},${ka},${ka},${ff}\\)$`),Ow={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Pv(Rf,df,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:Rw,formatHex:Rw,formatHex8:rz,formatHsl:nz,formatRgb:Dw,toString:Dw});function Rw(){return this.rgb().formatHex()}function rz(){return this.rgb().formatHex8()}function nz(){return mE(this).formatHsl()}function Dw(){return this.rgb().formatRgb()}function df(i){var e,r;return i=(i+"").trim().toLowerCase(),(e=Q$.exec(i))?(r=e[1].length,e=parseInt(e[1],16),r===6?Fw(e):r===3?new Rr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?lp(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?lp(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Z$.exec(i))?new Rr(e[1],e[2],e[3],1):(e=K$.exec(i))?new Rr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=J$.exec(i))?lp(e[1],e[2],e[3],e[4]):(e=tz.exec(i))?lp(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ez.exec(i))?Iw(e[1],e[2]/100,e[3]/100,1):(e=iz.exec(i))?Iw(e[1],e[2]/100,e[3]/100,e[4]):Ow.hasOwnProperty(i)?Fw(Ow[i]):i==="transparent"?new Rr(NaN,NaN,NaN,0):null}function Fw(i){return new Rr(i>>16&255,i>>8&255,i&255,1)}function lp(i,e,r,n){return n<=0&&(i=e=r=NaN),new Rr(i,e,r,n)}function az(i){return i instanceof Rf||(i=df(i)),i?(i=i.rgb(),new Rr(i.r,i.g,i.b,i.opacity)):new Rr}function eb(i,e,r,n){return arguments.length===1?az(i):new Rr(i,e,r,n??1)}function Rr(i,e,r,n){this.r=+i,this.g=+e,this.b=+r,this.opacity=+n}Pv(Rr,eb,gE(Rf,{brighter(i){return i=i==null?ng:Math.pow(ng,i),new Rr(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?uf:Math.pow(uf,i),new Rr(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new Rr(ml(this.r),ml(this.g),ml(this.b),ag(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$w,formatHex:$w,formatHex8:sz,formatRgb:zw,toString:zw}));function $w(){return`#${nl(this.r)}${nl(this.g)}${nl(this.b)}`}function sz(){return`#${nl(this.r)}${nl(this.g)}${nl(this.b)}${nl((isNaN(this.opacity)?1:this.opacity)*255)}`}function zw(){const i=ag(this.opacity);return`${i===1?"rgb(":"rgba("}${ml(this.r)}, ${ml(this.g)}, ${ml(this.b)}${i===1?")":`, ${i})`}`}function ag(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function ml(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function nl(i){return i=ml(i),(i<16?"0":"")+i.toString(16)}function Iw(i,e,r,n){return n<=0?i=e=r=NaN:r<=0||r>=1?i=e=NaN:e<=0&&(i=NaN),new Dn(i,e,r,n)}function mE(i){if(i instanceof Dn)return new Dn(i.h,i.s,i.l,i.opacity);if(i instanceof Rf||(i=df(i)),!i)return new Dn;if(i instanceof Dn)return i;i=i.rgb();var e=i.r/255,r=i.g/255,n=i.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),c=NaN,h=o-a,u=(o+a)/2;return h?(e===o?c=(r-n)/h+(r<n)*6:r===o?c=(n-e)/h+2:c=(e-r)/h+4,h/=u<.5?o+a:2-o-a,c*=60):h=u>0&&u<1?0:c,new Dn(c,h,u,i.opacity)}function oz(i,e,r,n){return arguments.length===1?mE(i):new Dn(i,e,r,n??1)}function Dn(i,e,r,n){this.h=+i,this.s=+e,this.l=+r,this.opacity=+n}Pv(Dn,oz,gE(Rf,{brighter(i){return i=i==null?ng:Math.pow(ng,i),new Dn(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?uf:Math.pow(uf,i),new Dn(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new Rr($0(i>=240?i-240:i+120,a,n),$0(i,a,n),$0(i<120?i+240:i-120,a,n),this.opacity)},clamp(){return new Dn(qw(this.h),cp(this.s),cp(this.l),ag(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=ag(this.opacity);return`${i===1?"hsl(":"hsla("}${qw(this.h)}, ${cp(this.s)*100}%, ${cp(this.l)*100}%${i===1?")":`, ${i})`}`}}));function qw(i){return i=(i||0)%360,i<0?i+360:i}function cp(i){return Math.max(0,Math.min(1,i||0))}function $0(i,e,r){return(i<60?e+(r-e)*i/60:i<180?r:i<240?e+(r-e)*(240-i)/60:e)*255}const Hv=i=>()=>i;function yE(i,e){return function(r){return i+r*e}}function lz(i,e,r){return i=Math.pow(i,r),e=Math.pow(e,r)-i,r=1/r,function(n){return Math.pow(i+n*e,r)}}function qrt(i,e){var r=e-i;return r?yE(i,r>180||r<-180?r-360*Math.round(r/360):r):Hv(isNaN(i)?e:i)}function cz(i){return(i=+i)==1?xE:function(e,r){return r-e?lz(e,r,i):Hv(isNaN(e)?r:e)}}function xE(i,e){var r=e-i;return r?yE(i,r):Hv(isNaN(i)?e:i)}const Pw=(function i(e){var r=cz(e);function n(a,o){var c=r((a=eb(a)).r,(o=eb(o)).r),h=r(a.g,o.g),u=r(a.b,o.b),f=xE(a.opacity,o.opacity);return function(p){return a.r=c(p),a.g=h(p),a.b=u(p),a.opacity=f(p),a+""}}return n.gamma=i,n})(1);function ao(i,e){return i=+i,e=+e,function(r){return i*(1-r)+e*r}}var ib=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,z0=new RegExp(ib.source,"g");function hz(i){return function(){return i}}function uz(i){return function(e){return i(e)+""}}function fz(i,e){var r=ib.lastIndex=z0.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(i=i+"",e=e+"";(n=ib.exec(i))&&(a=z0.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),h[c]?h[c]+=o:h[++c]=o),(n=n[0])===(a=a[0])?h[c]?h[c]+=a:h[++c]=a:(h[++c]=null,u.push({i:c,x:ao(n,a)})),r=z0.lastIndex;return r<e.length&&(o=e.slice(r),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?uz(u[0].x):hz(e):(e=u.length,function(f){for(var p=0,g;p<e;++p)h[(g=u[p]).i]=g.x(f);return h.join("")})}var Hw=180/Math.PI,rb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bE(i,e,r,n,a,o){var c,h,u;return(c=Math.sqrt(i*i+e*e))&&(i/=c,e/=c),(u=i*r+e*n)&&(r-=i*u,n-=e*u),(h=Math.sqrt(r*r+n*n))&&(r/=h,n/=h,u/=h),i*n<e*r&&(i=-i,e=-e,u=-u,c=-c),{translateX:a,translateY:o,rotate:Math.atan2(e,i)*Hw,skewX:Math.atan(u)*Hw,scaleX:c,scaleY:h}}var hp;function dz(i){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(i+"");return e.isIdentity?rb:bE(e.a,e.b,e.c,e.d,e.e,e.f)}function pz(i){return i==null||(hp||(hp=document.createElementNS("http://www.w3.org/2000/svg","g")),hp.setAttribute("transform",i),!(i=hp.transform.baseVal.consolidate()))?rb:(i=i.matrix,bE(i.a,i.b,i.c,i.d,i.e,i.f))}function vE(i,e,r,n){function a(f){return f.length?f.pop()+" ":""}function o(f,p,g,b,y,v){if(f!==g||p!==b){var C=y.push("translate(",null,e,null,r);v.push({i:C-4,x:ao(f,g)},{i:C-2,x:ao(p,b)})}else(g||b)&&y.push("translate("+g+e+b+r)}function c(f,p,g,b){f!==p?(f-p>180?p+=360:p-f>180&&(f+=360),b.push({i:g.push(a(g)+"rotate(",null,n)-2,x:ao(f,p)})):p&&g.push(a(g)+"rotate("+p+n)}function h(f,p,g,b){f!==p?b.push({i:g.push(a(g)+"skewX(",null,n)-2,x:ao(f,p)}):p&&g.push(a(g)+"skewX("+p+n)}function u(f,p,g,b,y,v){if(f!==g||p!==b){var C=y.push(a(y)+"scale(",null,",",null,")");v.push({i:C-4,x:ao(f,g)},{i:C-2,x:ao(p,b)})}else(g!==1||b!==1)&&y.push(a(y)+"scale("+g+","+b+")")}return function(f,p){var g=[],b=[];return f=i(f),p=i(p),o(f.translateX,f.translateY,p.translateX,p.translateY,g,b),c(f.rotate,p.rotate,g,b),h(f.skewX,p.skewX,g,b),u(f.scaleX,f.scaleY,p.scaleX,p.scaleY,g,b),f=p=null,function(y){for(var v=-1,C=b.length,_;++v<C;)g[(_=b[v]).i]=_.x(y);return g.join("")}}}var gz=vE(dz,"px, ","px)","deg)"),mz=vE(pz,", ",")",")"),yz=1e-12;function Uw(i){return((i=Math.exp(i))+1/i)/2}function xz(i){return((i=Math.exp(i))-1/i)/2}function bz(i){return((i=Math.exp(2*i))-1)/(i+1)}const vz=(function i(e,r,n){function a(o,c){var h=o[0],u=o[1],f=o[2],p=c[0],g=c[1],b=c[2],y=p-h,v=g-u,C=y*y+v*v,_,w;if(C<yz)w=Math.log(b/f)/e,_=function(M){return[h+M*y,u+M*v,f*Math.exp(e*M*w)]};else{var T=Math.sqrt(C),B=(b*b-f*f+n*C)/(2*f*r*T),E=(b*b-f*f-n*C)/(2*b*r*T),N=Math.log(Math.sqrt(B*B+1)-B),O=Math.log(Math.sqrt(E*E+1)-E);w=(O-N)/e,_=function(M){var j=M*w,G=Uw(N),$=f/(r*T)*(G*bz(e*j+N)-xz(N));return[h+$*y,u+$*v,f*G/Uw(e*j+N)]}}return _.duration=w*1e3*e/Math.SQRT2,_}return a.rho=function(o){var c=Math.max(.001,+o),h=c*c,u=h*h;return i(c,h,u)},a})(Math.SQRT2,2,4);var ch=0,Iu=0,mu=0,CE=1e3,sg,qu,og=0,Sl=0,Vg=0,pf=typeof performance=="object"&&performance.now?performance:Date,kE=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function Uv(){return Sl||(kE(Cz),Sl=pf.now()+Vg)}function Cz(){Sl=0}function lg(){this._call=this._time=this._next=null}lg.prototype=Wv.prototype={constructor:lg,restart:function(i,e,r){if(typeof i!="function")throw new TypeError("callback is not a function");r=(r==null?Uv():+r)+(e==null?0:+e),!this._next&&qu!==this&&(qu?qu._next=this:sg=this,qu=this),this._call=i,this._time=r,nb()},stop:function(){this._call&&(this._call=null,this._time=1/0,nb())}};function Wv(i,e,r){var n=new lg;return n.restart(i,e,r),n}function kz(){Uv(),++ch;for(var i=sg,e;i;)(e=Sl-i._time)>=0&&i._call.call(void 0,e),i=i._next;--ch}function Ww(){Sl=(og=pf.now())+Vg,ch=Iu=0;try{kz()}finally{ch=0,wz(),Sl=0}}function _z(){var i=pf.now(),e=i-og;e>CE&&(Vg-=e,og=i)}function wz(){for(var i,e=sg,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),i=e,e=e._next):(r=e._next,e._next=null,e=i?i._next=r:sg=r);qu=i,nb(n)}function nb(i){if(!ch){Iu&&(Iu=clearTimeout(Iu));var e=i-Sl;e>24?(i<1/0&&(Iu=setTimeout(Ww,i-pf.now()-Vg)),mu&&(mu=clearInterval(mu))):(mu||(og=pf.now(),mu=setInterval(_z,CE)),ch=1,kE(Ww))}}function Gw(i,e,r){var n=new lg;return e=e==null?0:+e,n.restart(a=>{n.stop(),i(a+e)},e,r),n}var Sz=jf("start","end","cancel","interrupt"),Tz=[],_E=0,Yw=1,ab=2,Dp=3,Vw=4,sb=5,Fp=6;function Xg(i,e,r,n,a,o){var c=i.__transition;if(!c)i.__transition={};else if(r in c)return;Bz(i,r,{name:e,index:n,group:a,on:Sz,tween:Tz,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:_E})}function Gv(i,e){var r=Un(i,e);if(r.state>_E)throw new Error("too late; already scheduled");return r}function Ea(i,e){var r=Un(i,e);if(r.state>Dp)throw new Error("too late; already running");return r}function Un(i,e){var r=i.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Bz(i,e,r){var n=i.__transition,a;n[e]=r,r.timer=Wv(o,0,r.time);function o(f){r.state=Yw,r.timer.restart(c,r.delay,r.time),r.delay<=f&&c(f-r.delay)}function c(f){var p,g,b,y;if(r.state!==Yw)return u();for(p in n)if(y=n[p],y.name===r.name){if(y.state===Dp)return Gw(c);y.state===Vw?(y.state=Fp,y.timer.stop(),y.on.call("interrupt",i,i.__data__,y.index,y.group),delete n[p]):+p<e&&(y.state=Fp,y.timer.stop(),y.on.call("cancel",i,i.__data__,y.index,y.group),delete n[p])}if(Gw(function(){r.state===Dp&&(r.state=Vw,r.timer.restart(h,r.delay,r.time),h(f))}),r.state=ab,r.on.call("start",i,i.__data__,r.index,r.group),r.state===ab){for(r.state=Dp,a=new Array(b=r.tween.length),p=0,g=-1;p<b;++p)(y=r.tween[p].value.call(i,i.__data__,r.index,r.group))&&(a[++g]=y);a.length=g+1}}function h(f){for(var p=f<r.duration?r.ease.call(null,f/r.duration):(r.timer.restart(u),r.state=sb,1),g=-1,b=a.length;++g<b;)a[g].call(i,p);r.state===sb&&(r.on.call("end",i,i.__data__,r.index,r.group),u())}function u(){r.state=Fp,r.timer.stop(),delete n[e];for(var f in n)return;delete i.__transition}}function $p(i,e){var r=i.__transition,n,a,o=!0,c;if(r){e=e==null?null:e+"";for(c in r){if((n=r[c]).name!==e){o=!1;continue}a=n.state>ab&&n.state<sb,n.state=Fp,n.timer.stop(),n.on.call(a?"interrupt":"cancel",i,i.__data__,n.index,n.group),delete r[c]}o&&delete i.__transition}}function Az(i){return this.each(function(){$p(this,i)})}function Ez(i,e){var r,n;return function(){var a=Ea(this,i),o=a.tween;if(o!==r){n=r=o;for(var c=0,h=n.length;c<h;++c)if(n[c].name===e){n=n.slice(),n.splice(c,1);break}}a.tween=n}}function Mz(i,e,r){var n,a;if(typeof r!="function")throw new Error;return function(){var o=Ea(this,i),c=o.tween;if(c!==n){a=(n=c).slice();for(var h={name:e,value:r},u=0,f=a.length;u<f;++u)if(a[u].name===e){a[u]=h;break}u===f&&a.push(h)}o.tween=a}}function Lz(i,e){var r=this._id;if(i+="",arguments.length<2){for(var n=Un(this.node(),r).tween,a=0,o=n.length,c;a<o;++a)if((c=n[a]).name===i)return c.value;return null}return this.each((e==null?Ez:Mz)(r,i,e))}function Yv(i,e,r){var n=i._id;return i.each(function(){var a=Ea(this,n);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return Un(a,n).value[e]}}function wE(i,e){var r;return(typeof e=="number"?ao:e instanceof df?Pw:(r=df(e))?(e=r,Pw):fz)(i,e)}function Nz(i){return function(){this.removeAttribute(i)}}function jz(i){return function(){this.removeAttributeNS(i.space,i.local)}}function Oz(i,e,r){var n,a=r+"",o;return function(){var c=this.getAttribute(i);return c===a?null:c===n?o:o=e(n=c,r)}}function Rz(i,e,r){var n,a=r+"",o;return function(){var c=this.getAttributeNS(i.space,i.local);return c===a?null:c===n?o:o=e(n=c,r)}}function Dz(i,e,r){var n,a,o;return function(){var c,h=r(this),u;return h==null?void this.removeAttribute(i):(c=this.getAttribute(i),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Fz(i,e,r){var n,a,o;return function(){var c,h=r(this),u;return h==null?void this.removeAttributeNS(i.space,i.local):(c=this.getAttributeNS(i.space,i.local),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function $z(i,e){var r=Yg(i),n=r==="transform"?mz:wE;return this.attrTween(i,typeof e=="function"?(r.local?Fz:Dz)(r,n,Yv(this,"attr."+i,e)):e==null?(r.local?jz:Nz)(r):(r.local?Rz:Oz)(r,n,e))}function zz(i,e){return function(r){this.setAttribute(i,e.call(this,r))}}function Iz(i,e){return function(r){this.setAttributeNS(i.space,i.local,e.call(this,r))}}function qz(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&Iz(i,o)),r}return a._value=e,a}function Pz(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&zz(i,o)),r}return a._value=e,a}function Hz(i,e){var r="attr."+i;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=Yg(i);return this.tween(r,(n.local?qz:Pz)(n,e))}function Uz(i,e){return function(){Gv(this,i).delay=+e.apply(this,arguments)}}function Wz(i,e){return e=+e,function(){Gv(this,i).delay=e}}function Gz(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?Uz:Wz)(e,i)):Un(this.node(),e).delay}function Yz(i,e){return function(){Ea(this,i).duration=+e.apply(this,arguments)}}function Vz(i,e){return e=+e,function(){Ea(this,i).duration=e}}function Xz(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?Yz:Vz)(e,i)):Un(this.node(),e).duration}function Qz(i,e){if(typeof e!="function")throw new Error;return function(){Ea(this,i).ease=e}}function Zz(i){var e=this._id;return arguments.length?this.each(Qz(e,i)):Un(this.node(),e).ease}function Kz(i,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Ea(this,i).ease=r}}function Jz(i){if(typeof i!="function")throw new Error;return this.each(Kz(this._id,i))}function t7(i){typeof i!="function"&&(i=rE(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,f=0;f<c;++f)(u=o[f])&&i.call(u,u.__data__,f,o)&&h.push(u);return new ps(n,this._parents,this._name,this._id)}function e7(i){if(i._id!==this._id)throw new Error;for(var e=this._groups,r=i._groups,n=e.length,a=r.length,o=Math.min(n,a),c=new Array(n),h=0;h<o;++h)for(var u=e[h],f=r[h],p=u.length,g=c[h]=new Array(p),b,y=0;y<p;++y)(b=u[y]||f[y])&&(g[y]=b);for(;h<n;++h)c[h]=e[h];return new ps(c,this._parents,this._name,this._id)}function i7(i){return(i+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function r7(i,e,r){var n,a,o=i7(e)?Gv:Ea;return function(){var c=o(this,i),h=c.on;h!==n&&(a=(n=h).copy()).on(e,r),c.on=a}}function n7(i,e){var r=this._id;return arguments.length<2?Un(this.node(),r).on.on(i):this.each(r7(r,i,e))}function a7(i){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==i)return;e&&e.removeChild(this)}}function s7(){return this.on("end.remove",a7(this._id))}function o7(i){var e=this._name,r=this._id;typeof i!="function"&&(i=Iv(i));for(var n=this._groups,a=n.length,o=new Array(a),c=0;c<a;++c)for(var h=n[c],u=h.length,f=o[c]=new Array(u),p,g,b=0;b<u;++b)(p=h[b])&&(g=i.call(p,p.__data__,b,h))&&("__data__"in p&&(g.__data__=p.__data__),f[b]=g,Xg(f[b],e,r,b,f,Un(p,r)));return new ps(o,this._parents,e,r)}function l7(i){var e=this._name,r=this._id;typeof i!="function"&&(i=iE(i));for(var n=this._groups,a=n.length,o=[],c=[],h=0;h<a;++h)for(var u=n[h],f=u.length,p,g=0;g<f;++g)if(p=u[g]){for(var b=i.call(p,p.__data__,g,u),y,v=Un(p,r),C=0,_=b.length;C<_;++C)(y=b[C])&&Xg(y,e,r,C,b,v);o.push(b),c.push(p)}return new ps(o,c,e,r)}var c7=Of.prototype.constructor;function h7(){return new c7(this._groups,this._parents)}function u7(i,e){var r,n,a;return function(){var o=lh(this,i),c=(this.style.removeProperty(i),lh(this,i));return o===c?null:o===r&&c===n?a:a=e(r=o,n=c)}}function SE(i){return function(){this.style.removeProperty(i)}}function f7(i,e,r){var n,a=r+"",o;return function(){var c=lh(this,i);return c===a?null:c===n?o:o=e(n=c,r)}}function d7(i,e,r){var n,a,o;return function(){var c=lh(this,i),h=r(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(i),lh(this,i))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function p7(i,e){var r,n,a,o="style."+e,c="end."+o,h;return function(){var u=Ea(this,i),f=u.on,p=u.value[o]==null?h||(h=SE(e)):void 0;(f!==r||a!==p)&&(n=(r=f).copy()).on(c,a=p),u.on=n}}function g7(i,e,r){var n=(i+="")=="transform"?gz:wE;return e==null?this.styleTween(i,u7(i,n)).on("end.style."+i,SE(i)):typeof e=="function"?this.styleTween(i,d7(i,n,Yv(this,"style."+i,e))).each(p7(this._id,i)):this.styleTween(i,f7(i,n,e),r).on("end.style."+i,null)}function m7(i,e,r){return function(n){this.style.setProperty(i,e.call(this,n),r)}}function y7(i,e,r){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&m7(i,c,r)),n}return o._value=e,o}function x7(i,e,r){var n="style."+(i+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,y7(i,e,r??""))}function b7(i){return function(){this.textContent=i}}function v7(i){return function(){var e=i(this);this.textContent=e??""}}function C7(i){return this.tween("text",typeof i=="function"?v7(Yv(this,"text",i)):b7(i==null?"":i+""))}function k7(i){return function(e){this.textContent=i.call(this,e)}}function _7(i){var e,r;function n(){var a=i.apply(this,arguments);return a!==r&&(e=(r=a)&&k7(a)),e}return n._value=i,n}function w7(i){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(i==null)return this.tween(e,null);if(typeof i!="function")throw new Error;return this.tween(e,_7(i))}function S7(){for(var i=this._name,e=this._id,r=TE(),n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,f=0;f<h;++f)if(u=c[f]){var p=Un(u,e);Xg(u,i,r,f,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new ps(n,this._parents,i,r)}function T7(){var i,e,r=this,n=r._id,a=r.size();return new Promise(function(o,c){var h={value:c},u={value:function(){--a===0&&o()}};r.each(function(){var f=Ea(this,n),p=f.on;p!==i&&(e=(i=p).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(u)),f.on=e}),a===0&&o()})}var B7=0;function ps(i,e,r,n){this._groups=i,this._parents=e,this._name=r,this._id=n}function TE(){return++B7}var Qa=Of.prototype;ps.prototype={constructor:ps,select:o7,selectAll:l7,selectChild:Qa.selectChild,selectChildren:Qa.selectChildren,filter:t7,merge:e7,selection:h7,transition:S7,call:Qa.call,nodes:Qa.nodes,node:Qa.node,size:Qa.size,empty:Qa.empty,each:Qa.each,on:n7,attr:$z,attrTween:Hz,style:g7,styleTween:x7,text:C7,textTween:w7,remove:s7,tween:Lz,delay:Gz,duration:Xz,ease:Zz,easeVarying:Jz,end:T7,[Symbol.iterator]:Qa[Symbol.iterator]};function A7(i){return((i*=2)<=1?i*i*i:(i-=2)*i*i+2)/2}var E7={time:null,delay:0,duration:250,ease:A7};function M7(i,e){for(var r;!(r=i.__transition)||!(r=r[e]);)if(!(i=i.parentNode))throw new Error(`transition ${e} not found`);return r}function L7(i){var e,r;i instanceof ps?(e=i._id,i=i._name):(e=TE(),(r=E7).time=Uv(),i=i==null?null:i+"");for(var n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,f=0;f<h;++f)(u=c[f])&&Xg(u,i,e,f,c,r||M7(u,e));return new ps(n,this._parents,i,e)}Of.prototype.interrupt=Az;Of.prototype.transition=L7;const ob=Math.PI,lb=2*ob,Ko=1e-6,N7=lb-Ko;function BE(i){this._+=i[0];for(let e=1,r=i.length;e<r;++e)this._+=arguments[e]+i[e]}function j7(i){let e=Math.floor(i);if(!(e>=0))throw new Error(`invalid digits: ${i}`);if(e>15)return BE;const r=10**e;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class O7{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?BE:j7(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,a){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,r,n,a,o,c){this._append`C${+e},${+r},${+n},${+a},${this._x1=+o},${this._y1=+c}`}arcTo(e,r,n,a,o){if(e=+e,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,h=this._y1,u=n-e,f=a-r,p=c-e,g=h-r,b=p*p+g*g;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(b>Ko)if(!(Math.abs(g*u-f*p)>Ko)||!o)this._append`L${this._x1=e},${this._y1=r}`;else{let y=n-c,v=a-h,C=u*u+f*f,_=y*y+v*v,w=Math.sqrt(C),T=Math.sqrt(b),B=o*Math.tan((ob-Math.acos((C+b-_)/(2*w*T)))/2),E=B/T,N=B/w;Math.abs(E-1)>Ko&&this._append`L${e+E*p},${r+E*g}`,this._append`A${o},${o},0,0,${+(g*y>p*v)},${this._x1=e+N*u},${this._y1=r+N*f}`}}arc(e,r,n,a,o,c){if(e=+e,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let h=n*Math.cos(a),u=n*Math.sin(a),f=e+h,p=r+u,g=1^c,b=c?a-o:o-a;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>Ko||Math.abs(this._y1-p)>Ko)&&this._append`L${f},${p}`,n&&(b<0&&(b=b%lb+lb),b>N7?this._append`A${n},${n},0,1,${g},${e-h},${r-u}A${n},${n},0,1,${g},${this._x1=f},${this._y1=p}`:b>Ko&&this._append`A${n},${n},0,${+(b>=ob)},${g},${this._x1=e+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(e,r,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function R7(i){const e=+this._x.call(null,i),r=+this._y.call(null,i);return AE(this.cover(e,r),e,r,i)}function AE(i,e,r,n){if(isNaN(e)||isNaN(r))return i;var a,o=i._root,c={data:n},h=i._x0,u=i._y0,f=i._x1,p=i._y1,g,b,y,v,C,_,w,T;if(!o)return i._root=c,i;for(;o.length;)if((C=e>=(g=(h+f)/2))?h=g:f=g,(_=r>=(b=(u+p)/2))?u=b:p=b,a=o,!(o=o[w=_<<1|C]))return a[w]=c,i;if(y=+i._x.call(null,o.data),v=+i._y.call(null,o.data),e===y&&r===v)return c.next=o,a?a[w]=c:i._root=c,i;do a=a?a[w]=new Array(4):i._root=new Array(4),(C=e>=(g=(h+f)/2))?h=g:f=g,(_=r>=(b=(u+p)/2))?u=b:p=b;while((w=_<<1|C)===(T=(v>=b)<<1|y>=g));return a[T]=o,a[w]=c,i}function D7(i){var e,r,n=i.length,a,o,c=new Array(n),h=new Array(n),u=1/0,f=1/0,p=-1/0,g=-1/0;for(r=0;r<n;++r)isNaN(a=+this._x.call(null,e=i[r]))||isNaN(o=+this._y.call(null,e))||(c[r]=a,h[r]=o,a<u&&(u=a),a>p&&(p=a),o<f&&(f=o),o>g&&(g=o));if(u>p||f>g)return this;for(this.cover(u,f).cover(p,g),r=0;r<n;++r)AE(this,c[r],h[r],i[r]);return this}function F7(i,e){if(isNaN(i=+i)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(i))+1,o=(n=Math.floor(e))+1;else{for(var c=a-r||1,h=this._root,u,f;r>i||i>=a||n>e||e>=o;)switch(f=(e<n)<<1|i<r,u=new Array(4),u[f]=h,h=u,c*=2,f){case 0:a=r+c,o=n+c;break;case 1:r=a-c,o=n+c;break;case 2:a=r+c,n=o-c;break;case 3:r=a-c,n=o-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=n,this._x1=a,this._y1=o,this}function $7(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function z7(i){return arguments.length?this.cover(+i[0][0],+i[0][1]).cover(+i[1][0],+i[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function gr(i,e,r,n,a){this.node=i,this.x0=e,this.y0=r,this.x1=n,this.y1=a}function I7(i,e,r){var n,a=this._x0,o=this._y0,c,h,u,f,p=this._x1,g=this._y1,b=[],y=this._root,v,C;for(y&&b.push(new gr(y,a,o,p,g)),r==null?r=1/0:(a=i-r,o=e-r,p=i+r,g=e+r,r*=r);v=b.pop();)if(!(!(y=v.node)||(c=v.x0)>p||(h=v.y0)>g||(u=v.x1)<a||(f=v.y1)<o))if(y.length){var _=(c+u)/2,w=(h+f)/2;b.push(new gr(y[3],_,w,u,f),new gr(y[2],c,w,_,f),new gr(y[1],_,h,u,w),new gr(y[0],c,h,_,w)),(C=(e>=w)<<1|i>=_)&&(v=b[b.length-1],b[b.length-1]=b[b.length-1-C],b[b.length-1-C]=v)}else{var T=i-+this._x.call(null,y.data),B=e-+this._y.call(null,y.data),E=T*T+B*B;if(E<r){var N=Math.sqrt(r=E);a=i-N,o=e-N,p=i+N,g=e+N,n=y.data}}return n}function q7(i){if(isNaN(p=+this._x.call(null,i))||isNaN(g=+this._y.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._y0,u=this._x1,f=this._y1,p,g,b,y,v,C,_,w;if(!r)return this;if(r.length)for(;;){if((v=p>=(b=(c+u)/2))?c=b:u=b,(C=g>=(y=(h+f)/2))?h=y:f=y,e=r,!(r=r[_=C<<1|v]))return this;if(!r.length)break;(e[_+1&3]||e[_+2&3]||e[_+3&3])&&(n=e,w=_)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[_]=o:delete e[_],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[w]=r:this._root=r),this):(this._root=o,this)}function P7(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function H7(){return this._root}function U7(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function W7(i){var e=[],r,n=this._root,a,o,c,h,u;for(n&&e.push(new gr(n,this._x0,this._y0,this._x1,this._y1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.y0,h=r.x1,u=r.y1)&&n.length){var f=(o+h)/2,p=(c+u)/2;(a=n[3])&&e.push(new gr(a,f,p,h,u)),(a=n[2])&&e.push(new gr(a,o,p,f,u)),(a=n[1])&&e.push(new gr(a,f,c,h,p)),(a=n[0])&&e.push(new gr(a,o,c,f,p))}return this}function G7(i){var e=[],r=[],n;for(this._root&&e.push(new gr(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.x1,f=n.y1,p=(c+u)/2,g=(h+f)/2;(o=a[0])&&e.push(new gr(o,c,h,p,g)),(o=a[1])&&e.push(new gr(o,p,h,u,g)),(o=a[2])&&e.push(new gr(o,c,g,p,f)),(o=a[3])&&e.push(new gr(o,p,g,u,f))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.y0,n.x1,n.y1);return this}function Y7(i){return i[0]}function V7(i){return arguments.length?(this._x=i,this):this._x}function X7(i){return i[1]}function Q7(i){return arguments.length?(this._y=i,this):this._y}function Vv(i,e,r){var n=new Xv(e??Y7,r??X7,NaN,NaN,NaN,NaN);return i==null?n:n.addAll(i)}function Xv(i,e,r,n,a,o){this._x=i,this._y=e,this._x0=r,this._y0=n,this._x1=a,this._y1=o,this._root=void 0}function Xw(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var kr=Vv.prototype=Xv.prototype;kr.copy=function(){var i=new Xv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=Xw(e),i;for(r=[{source:e,target:i._root=new Array(4)}];e=r.pop();)for(var a=0;a<4;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(4)}):e.target[a]=Xw(n));return i};kr.add=R7;kr.addAll=D7;kr.cover=F7;kr.data=$7;kr.extent=z7;kr.find=I7;kr.remove=q7;kr.removeAll=P7;kr.root=H7;kr.size=U7;kr.visit=W7;kr.visitAfter=G7;kr.x=V7;kr.y=Q7;function Z7(i,e){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(e).domain(i);break}return this}const Qw=Symbol("implicit");function EE(){var i=new Aw,e=[],r=[],n=Qw;function a(o){let c=i.get(o);if(c===void 0){if(n!==Qw)return n;i.set(o,c=e.push(o)-1)}return r[c%r.length]}return a.domain=function(o){if(!arguments.length)return e.slice();e=[],i=new Aw;for(const c of o)i.has(c)||i.set(c,e.push(c)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return EE(e,r).unknown(n)},Z7.apply(a,arguments),a}function K7(i){for(var e=i.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+i.slice(n*6,++n*6);return r}const J7=K7("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function bc(i){return function(){return i}}const Prt=Math.abs,Hrt=Math.atan2,Urt=Math.cos,Wrt=Math.max,Grt=Math.min,Yrt=Math.sin,Vrt=Math.sqrt,Zw=1e-12,Qv=Math.PI,Kw=Qv/2,Xrt=2*Qv;function Qrt(i){return i>1?0:i<-1?Qv:Math.acos(i)}function Zrt(i){return i>=1?Kw:i<=-1?-Kw:Math.asin(i)}function t9(i){let e=3;return i.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return i},()=>new O7(e)}function e9(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function ME(i){this._context=i}ME.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;default:this._context.lineTo(i,e);break}}};function Ju(i){return new ME(i)}function i9(i){return i[0]}function r9(i){return i[1]}function n9(i,e){var r=bc(!0),n=null,a=Ju,o=null,c=t9(h);i=typeof i=="function"?i:i===void 0?i9:bc(i),e=typeof e=="function"?e:e===void 0?r9:bc(e);function h(u){var f,p=(u=e9(u)).length,g,b=!1,y;for(n==null&&(o=a(y=c())),f=0;f<=p;++f)!(f<p&&r(g=u[f],f,u))===b&&((b=!b)?o.lineStart():o.lineEnd()),b&&o.point(+i(g,f,u),+e(g,f,u));if(y)return o=null,y+""||null}return h.x=function(u){return arguments.length?(i=typeof u=="function"?u:bc(+u),h):i},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:bc(+u),h):e},h.defined=function(u){return arguments.length?(r=typeof u=="function"?u:bc(!!u),h):r},h.curve=function(u){return arguments.length?(a=u,n!=null&&(o=a(n)),h):a},h.context=function(u){return arguments.length?(u==null?n=o=null:o=a(n=u),h):n},h}class LE{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function NE(i){return new LE(i,!0)}function jE(i){return new LE(i,!1)}function _o(){}function cg(i,e,r){i._context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+e)/6,(i._y0+4*i._y1+r)/6)}function Qg(i){this._context=i}Qg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:cg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:cg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function cb(i){return new Qg(i)}function OE(i){this._context=i}OE.prototype={areaStart:_o,areaEnd:_o,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._x2=i,this._y2=e;break;case 1:this._point=2,this._x3=i,this._y3=e;break;case 2:this._point=3,this._x4=i,this._y4=e,this._context.moveTo((this._x0+4*this._x1+i)/6,(this._y0+4*this._y1+e)/6);break;default:cg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function a9(i){return new OE(i)}function RE(i){this._context=i}RE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+i)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:cg(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function s9(i){return new RE(i)}function DE(i,e){this._basis=new Qg(i),this._beta=e}DE.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var i=this._x,e=this._y,r=i.length-1;if(r>0)for(var n=i[0],a=e[0],o=i[r]-n,c=e[r]-a,h=-1,u;++h<=r;)u=h/r,this._basis.point(this._beta*i[h]+(1-this._beta)*(n+u*o),this._beta*e[h]+(1-this._beta)*(a+u*c));this._x=this._y=null,this._basis.lineEnd()},point:function(i,e){this._x.push(+i),this._y.push(+e)}};const o9=(function i(e){function r(n){return e===1?new Qg(n):new DE(n,e)}return r.beta=function(n){return i(+n)},r})(.85);function hg(i,e,r){i._context.bezierCurveTo(i._x1+i._k*(i._x2-i._x0),i._y1+i._k*(i._y2-i._y0),i._x2+i._k*(i._x1-e),i._y2+i._k*(i._y1-r),i._x2,i._y2)}function Zv(i,e){this._context=i,this._k=(1-e)/6}Zv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:hg(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2,this._x1=i,this._y1=e;break;case 2:this._point=3;default:hg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const FE=(function i(e){function r(n){return new Zv(n,e)}return r.tension=function(n){return i(+n)},r})(0);function Kv(i,e){this._context=i,this._k=(1-e)/6}Kv.prototype={areaStart:_o,areaEnd:_o,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._x3=i,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=e);break;case 2:this._point=3,this._x5=i,this._y5=e;break;default:hg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const l9=(function i(e){function r(n){return new Kv(n,e)}return r.tension=function(n){return i(+n)},r})(0);function Jv(i,e){this._context=i,this._k=(1-e)/6}Jv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:hg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const c9=(function i(e){function r(n){return new Jv(n,e)}return r.tension=function(n){return i(+n)},r})(0);function t1(i,e,r){var n=i._x1,a=i._y1,o=i._x2,c=i._y2;if(i._l01_a>Zw){var h=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,u=3*i._l01_a*(i._l01_a+i._l12_a);n=(n*h-i._x0*i._l12_2a+i._x2*i._l01_2a)/u,a=(a*h-i._y0*i._l12_2a+i._y2*i._l01_2a)/u}if(i._l23_a>Zw){var f=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,p=3*i._l23_a*(i._l23_a+i._l12_a);o=(o*f+i._x1*i._l23_2a-e*i._l12_2a)/p,c=(c*f+i._y1*i._l23_2a-r*i._l12_2a)/p}i._context.bezierCurveTo(n,a,o,c,i._x2,i._y2)}function $E(i,e){this._context=i,this._alpha=e}$E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;break;case 2:this._point=3;default:t1(this,i,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zE=(function i(e){function r(n){return e?new $E(n,e):new Zv(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function IE(i,e){this._context=i,this._alpha=e}IE.prototype={areaStart:_o,areaEnd:_o,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=e);break;case 2:this._point=3,this._x5=i,this._y5=e;break;default:t1(this,i,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const h9=(function i(e){function r(n){return e?new IE(n,e):new Kv(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function qE(i,e){this._context=i,this._alpha=e}qE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:t1(this,i,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const u9=(function i(e){function r(n){return e?new qE(n,e):new Jv(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function PE(i){this._context=i}PE.prototype={areaStart:_o,areaEnd:_o,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(i,e){i=+i,e=+e,this._point?this._context.lineTo(i,e):(this._point=1,this._context.moveTo(i,e))}};function f9(i){return new PE(i)}function Jw(i){return i<0?-1:1}function tS(i,e,r){var n=i._x1-i._x0,a=e-i._x1,o=(i._y1-i._y0)/(n||a<0&&-0),c=(r-i._y1)/(a||n<0&&-0),h=(o*a+c*n)/(n+a);return(Jw(o)+Jw(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function eS(i,e){var r=i._x1-i._x0;return r?(3*(i._y1-i._y0)/r-e)/2:e}function I0(i,e,r){var n=i._x0,a=i._y0,o=i._x1,c=i._y1,h=(o-n)/3;i._context.bezierCurveTo(n+h,a+h*e,o-h,c-h*r,o,c)}function ug(i){this._context=i}ug.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:I0(this,this._t0,eS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){var r=NaN;if(i=+i,e=+e,!(i===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;break;case 2:this._point=3,I0(this,eS(this,r=tS(this,i,e)),r);break;default:I0(this,this._t0,r=tS(this,i,e));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e,this._t0=r}}};function HE(i){this._context=new UE(i)}(HE.prototype=Object.create(ug.prototype)).point=function(i,e){ug.prototype.point.call(this,e,i)};function UE(i){this._context=i}UE.prototype={moveTo:function(i,e){this._context.moveTo(e,i)},closePath:function(){this._context.closePath()},lineTo:function(i,e){this._context.lineTo(e,i)},bezierCurveTo:function(i,e,r,n,a,o){this._context.bezierCurveTo(e,i,n,r,o,a)}};function WE(i){return new ug(i)}function GE(i){return new HE(i)}function YE(i){this._context=i}YE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var i=this._x,e=this._y,r=i.length;if(r)if(this._line?this._context.lineTo(i[0],e[0]):this._context.moveTo(i[0],e[0]),r===2)this._context.lineTo(i[1],e[1]);else for(var n=iS(i),a=iS(e),o=0,c=1;c<r;++o,++c)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],i[c],e[c]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(i,e){this._x.push(+i),this._y.push(+e)}};function iS(i){var e,r=i.length-1,n,a=new Array(r),o=new Array(r),c=new Array(r);for(a[0]=0,o[0]=2,c[0]=i[0]+2*i[1],e=1;e<r-1;++e)a[e]=1,o[e]=4,c[e]=4*i[e]+2*i[e+1];for(a[r-1]=2,o[r-1]=7,c[r-1]=8*i[r-1]+i[r],e=1;e<r;++e)n=a[e]/o[e-1],o[e]-=n,c[e]-=n*c[e-1];for(a[r-1]=c[r-1]/o[r-1],e=r-2;e>=0;--e)a[e]=(c[e]-a[e+1])/o[e];for(o[r-1]=(i[r]+a[r-1])/2,e=0;e<r-1;++e)o[e]=2*i[e+1]-a[e+1];return[a,o]}function VE(i){return new YE(i)}function Zg(i,e){this._context=i,this._t=e}Zg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(i,e);else{var r=this._x*(1-this._t)+i*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=i,this._y=e}};function XE(i){return new Zg(i,.5)}function QE(i){return new Zg(i,0)}function ZE(i){return new Zg(i,1)}const up=i=>()=>i;function d9(i,{sourceEvent:e,target:r,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function cs(i,e,r){this.k=i,this.x=e,this.y=r}cs.prototype={constructor:cs,scale:function(i){return i===1?this:new cs(this.k*i,this.x,this.y)},translate:function(i,e){return i===0&e===0?this:new cs(this.k,this.x+this.k*i,this.y+this.k*e)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var e1=new cs(1,0,0);pa.prototype=cs.prototype;function pa(i){for(;!i.__zoom;)if(!(i=i.parentNode))return e1;return i.__zoom}function q0(i){i.stopImmediatePropagation()}function yu(i){i.preventDefault(),i.stopImmediatePropagation()}function p9(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function g9(){var i=this;return i instanceof SVGElement?(i=i.ownerSVGElement||i,i.hasAttribute("viewBox")?(i=i.viewBox.baseVal,[[i.x,i.y],[i.x+i.width,i.y+i.height]]):[[0,0],[i.width.baseVal.value,i.height.baseVal.value]]):[[0,0],[i.clientWidth,i.clientHeight]]}function rS(){return this.__zoom||e1}function m9(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function y9(){return navigator.maxTouchPoints||"ontouchstart"in this}function x9(i,e,r){var n=i.invertX(e[0][0])-r[0][0],a=i.invertX(e[1][0])-r[1][0],o=i.invertY(e[0][1])-r[0][1],c=i.invertY(e[1][1])-r[1][1];return i.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c))}function b9(){var i=p9,e=g9,r=x9,n=m9,a=y9,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=vz,f=jf("start","zoom","end"),p,g,b,y=500,v=150,C=0,_=10;function w(D){D.property("__zoom",rS).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",G).on("dblclick.zoom",$).filter(a).on("touchstart.zoom",z).on("touchmove.zoom",K).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(D,U,R,I){var P=D.selection?D.selection():D;P.property("__zoom",rS),D!==P?N(D,U,R,I):P.interrupt().each(function(){O(this,arguments).event(I).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},w.scaleBy=function(D,U,R,I){w.scaleTo(D,function(){var P=this.__zoom.k,V=typeof U=="function"?U.apply(this,arguments):U;return P*V},R,I)},w.scaleTo=function(D,U,R,I){w.transform(D,function(){var P=e.apply(this,arguments),V=this.__zoom,J=R==null?E(P):typeof R=="function"?R.apply(this,arguments):R,H=V.invert(J),tt=typeof U=="function"?U.apply(this,arguments):U;return r(B(T(V,tt),J,H),P,c)},R,I)},w.translateBy=function(D,U,R,I){w.transform(D,function(){return r(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof R=="function"?R.apply(this,arguments):R),e.apply(this,arguments),c)},null,I)},w.translateTo=function(D,U,R,I,P){w.transform(D,function(){var V=e.apply(this,arguments),J=this.__zoom,H=I==null?E(V):typeof I=="function"?I.apply(this,arguments):I;return r(e1.translate(H[0],H[1]).scale(J.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof R=="function"?-R.apply(this,arguments):-R),V,c)},I,P)};function T(D,U){return U=Math.max(o[0],Math.min(o[1],U)),U===D.k?D:new cs(U,D.x,D.y)}function B(D,U,R){var I=U[0]-R[0]*D.k,P=U[1]-R[1]*D.k;return I===D.x&&P===D.y?D:new cs(D.k,I,P)}function E(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function N(D,U,R,I){D.on("start.zoom",function(){O(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(I).end()}).tween("zoom",function(){var P=this,V=arguments,J=O(P,V).event(I),H=e.apply(P,V),tt=R==null?E(H):typeof R=="function"?R.apply(P,V):R,ot=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),st=P.__zoom,bt=typeof U=="function"?U.apply(P,V):U,kt=u(st.invert(tt).concat(ot/st.k),bt.invert(tt).concat(ot/bt.k));return function(Lt){if(Lt===1)Lt=bt;else{var at=kt(Lt),Ct=ot/at[2];Lt=new cs(Ct,tt[0]-at[0]*Ct,tt[1]-at[1]*Ct)}J.zoom(null,Lt)}})}function O(D,U,R){return!R&&D.__zooming||new M(D,U)}function M(D,U){this.that=D,this.args=U,this.active=0,this.sourceEvent=null,this.extent=e.apply(D,U),this.taps=0}M.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,U){return this.mouse&&D!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var U=Xt(this.that).datum();f.call(D,this.that,new d9(D,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:f}),U)}};function j(D,...U){if(!i.apply(this,arguments))return;var R=O(this,U).event(D),I=this.__zoom,P=Math.max(o[0],Math.min(o[1],I.k*Math.pow(2,n.apply(this,arguments)))),V=ma(D);if(R.wheel)(R.mouse[0][0]!==V[0]||R.mouse[0][1]!==V[1])&&(R.mouse[1]=I.invert(R.mouse[0]=V)),clearTimeout(R.wheel);else{if(I.k===P)return;R.mouse=[V,I.invert(V)],$p(this),R.start()}yu(D),R.wheel=setTimeout(J,v),R.zoom("mouse",r(B(T(I,P),R.mouse[0],R.mouse[1]),R.extent,c));function J(){R.wheel=null,R.end()}}function G(D,...U){if(b||!i.apply(this,arguments))return;var R=D.currentTarget,I=O(this,U,!0).event(D),P=Xt(D.view).on("mousemove.zoom",tt,!0).on("mouseup.zoom",ot,!0),V=ma(D,R),J=D.clientX,H=D.clientY;dE(D.view),q0(D),I.mouse=[V,this.__zoom.invert(V)],$p(this),I.start();function tt(st){if(yu(st),!I.moved){var bt=st.clientX-J,kt=st.clientY-H;I.moved=bt*bt+kt*kt>C}I.event(st).zoom("mouse",r(B(I.that.__zoom,I.mouse[0]=ma(st,R),I.mouse[1]),I.extent,c))}function ot(st){P.on("mousemove.zoom mouseup.zoom",null),pE(st.view,I.moved),yu(st),I.event(st).end()}}function $(D,...U){if(i.apply(this,arguments)){var R=this.__zoom,I=ma(D.changedTouches?D.changedTouches[0]:D,this),P=R.invert(I),V=R.k*(D.shiftKey?.5:2),J=r(B(T(R,V),I,P),e.apply(this,U),c);yu(D),h>0?Xt(this).transition().duration(h).call(N,J,I,D):Xt(this).call(w.transform,J,I,D)}}function z(D,...U){if(i.apply(this,arguments)){var R=D.touches,I=R.length,P=O(this,U,D.changedTouches.length===I).event(D),V,J,H,tt;for(q0(D),J=0;J<I;++J)H=R[J],tt=ma(H,this),tt=[tt,this.__zoom.invert(tt),H.identifier],P.touch0?!P.touch1&&P.touch0[2]!==tt[2]&&(P.touch1=tt,P.taps=0):(P.touch0=tt,V=!0,P.taps=1+!!p);p&&(p=clearTimeout(p)),V&&(P.taps<2&&(g=tt[0],p=setTimeout(function(){p=null},y)),$p(this),P.start())}}function K(D,...U){if(this.__zooming){var R=O(this,U).event(D),I=D.changedTouches,P=I.length,V,J,H,tt;for(yu(D),V=0;V<P;++V)J=I[V],H=ma(J,this),R.touch0&&R.touch0[2]===J.identifier?R.touch0[0]=H:R.touch1&&R.touch1[2]===J.identifier&&(R.touch1[0]=H);if(J=R.that.__zoom,R.touch1){var ot=R.touch0[0],st=R.touch0[1],bt=R.touch1[0],kt=R.touch1[1],Lt=(Lt=bt[0]-ot[0])*Lt+(Lt=bt[1]-ot[1])*Lt,at=(at=kt[0]-st[0])*at+(at=kt[1]-st[1])*at;J=T(J,Math.sqrt(Lt/at)),H=[(ot[0]+bt[0])/2,(ot[1]+bt[1])/2],tt=[(st[0]+kt[0])/2,(st[1]+kt[1])/2]}else if(R.touch0)H=R.touch0[0],tt=R.touch0[1];else return;R.zoom("touch",r(B(J,H,tt),R.extent,c))}}function W(D,...U){if(this.__zooming){var R=O(this,U).event(D),I=D.changedTouches,P=I.length,V,J;for(q0(D),b&&clearTimeout(b),b=setTimeout(function(){b=null},y),V=0;V<P;++V)J=I[V],R.touch0&&R.touch0[2]===J.identifier?delete R.touch0:R.touch1&&R.touch1[2]===J.identifier&&delete R.touch1;if(R.touch1&&!R.touch0&&(R.touch0=R.touch1,delete R.touch1),R.touch0)R.touch0[1]=this.__zoom.invert(R.touch0[0]);else if(R.end(),R.taps===2&&(J=ma(J,this),Math.hypot(g[0]-J[0],g[1]-J[1])<_)){var H=Xt(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return w.wheelDelta=function(D){return arguments.length?(n=typeof D=="function"?D:up(+D),w):n},w.filter=function(D){return arguments.length?(i=typeof D=="function"?D:up(!!D),w):i},w.touchable=function(D){return arguments.length?(a=typeof D=="function"?D:up(!!D),w):a},w.extent=function(D){return arguments.length?(e=typeof D=="function"?D:up([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),w):e},w.scaleExtent=function(D){return arguments.length?(o[0]=+D[0],o[1]=+D[1],w):[o[0],o[1]]},w.translateExtent=function(D){return arguments.length?(c[0][0]=+D[0][0],c[1][0]=+D[1][0],c[0][1]=+D[0][1],c[1][1]=+D[1][1],w):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},w.constrain=function(D){return arguments.length?(r=D,w):r},w.duration=function(D){return arguments.length?(h=+D,w):h},w.interpolate=function(D){return arguments.length?(u=D,w):u},w.on=function(){var D=f.on.apply(f,arguments);return D===f?w:D},w.clickDistance=function(D){return arguments.length?(C=(D=+D)*D,w):Math.sqrt(C)},w.tapDistance=function(D){return arguments.length?(_=+D,w):_},w}var v9=A(i=>{var a;const{securityLevel:e}=Ae();let r=Xt("body");if(e==="sandbox"){const c=((a=Xt(`#i${i}`).node())==null?void 0:a.contentDocument)??document;r=Xt(c.body)}return r.select(`#${i}`)},"selectSvgElement");function i1(i){return typeof i>"u"||i===null}A(i1,"isNothing");function KE(i){return typeof i=="object"&&i!==null}A(KE,"isObject");function JE(i){return Array.isArray(i)?i:i1(i)?[]:[i]}A(JE,"toArray");function t3(i,e){var r,n,a,o;if(e)for(o=Object.keys(e),r=0,n=o.length;r<n;r+=1)a=o[r],i[a]=e[a];return i}A(t3,"extend");function e3(i,e){var r="",n;for(n=0;n<e;n+=1)r+=i;return r}A(e3,"repeat");function i3(i){return i===0&&Number.NEGATIVE_INFINITY===1/i}A(i3,"isNegativeZero");var C9=i1,k9=KE,_9=JE,w9=e3,S9=i3,T9=t3,Mi={isNothing:C9,isObject:k9,toArray:_9,repeat:w9,isNegativeZero:S9,extend:T9};function r1(i,e){var r="",n=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(r+='in "'+i.mark.name+'" '),r+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!e&&i.mark.snippet&&(r+=`
228
+
229
+ `+i.mark.snippet),n+" "+r):n}A(r1,"formatError");function hh(i,e){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=e,this.message=r1(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}A(hh,"YAMLException$1");hh.prototype=Object.create(Error.prototype);hh.prototype.constructor=hh;hh.prototype.toString=A(function(e){return this.name+": "+r1(this,e)},"toString");var Or=hh;function zp(i,e,r,n,a){var o="",c="",h=Math.floor(a/2)-1;return n-e>h&&(o=" ... ",e=n-h+o.length),r-n>h&&(c=" ...",r=n+h-c.length),{str:o+i.slice(e,r).replace(/\t/g,"→")+c,pos:n-e+o.length}}A(zp,"getLine");function Ip(i,e){return Mi.repeat(" ",e-i.length)+i}A(Ip,"padStart");function r3(i,e){if(e=Object.create(e||null),!i.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],a=[],o,c=-1;o=r.exec(i.buffer);)a.push(o.index),n.push(o.index+o[0].length),i.position<=o.index&&c<0&&(c=n.length-2);c<0&&(c=n.length-1);var h="",u,f,p=Math.min(i.line+e.linesAfter,a.length).toString().length,g=e.maxLength-(e.indent+p+3);for(u=1;u<=e.linesBefore&&!(c-u<0);u++)f=zp(i.buffer,n[c-u],a[c-u],i.position-(n[c]-n[c-u]),g),h=Mi.repeat(" ",e.indent)+Ip((i.line-u+1).toString(),p)+" | "+f.str+`
230
+ `+h;for(f=zp(i.buffer,n[c],a[c],i.position,g),h+=Mi.repeat(" ",e.indent)+Ip((i.line+1).toString(),p)+" | "+f.str+`
231
+ `,h+=Mi.repeat("-",e.indent+p+3+f.pos)+`^
232
+ `,u=1;u<=e.linesAfter&&!(c+u>=a.length);u++)f=zp(i.buffer,n[c+u],a[c+u],i.position-(n[c]-n[c+u]),g),h+=Mi.repeat(" ",e.indent)+Ip((i.line+u+1).toString(),p)+" | "+f.str+`
233
+ `;return h.replace(/\n$/,"")}A(r3,"makeSnippet");var B9=r3,A9=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],E9=["scalar","sequence","mapping"];function n3(i){var e={};return i!==null&&Object.keys(i).forEach(function(r){i[r].forEach(function(n){e[String(n)]=r})}),e}A(n3,"compileStyleAliases");function a3(i,e){if(e=e||{},Object.keys(e).forEach(function(r){if(A9.indexOf(r)===-1)throw new Or('Unknown option "'+r+'" is met in definition of "'+i+'" YAML type.')}),this.options=e,this.tag=i,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=n3(e.styleAliases||null),E9.indexOf(this.kind)===-1)throw new Or('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}A(a3,"Type$1");var ar=a3;function hb(i,e){var r=[];return i[e].forEach(function(n){var a=r.length;r.forEach(function(o,c){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(a=c)}),r[a]=n}),r}A(hb,"compileList");function s3(){var i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(a){a.multi?(i.multi[a.kind].push(a),i.multi.fallback.push(a)):i[a.kind][a.tag]=i.fallback[a.tag]=a}for(A(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return i}A(s3,"compileMap");function fg(i){return this.extend(i)}A(fg,"Schema$1");fg.prototype.extend=A(function(e){var r=[],n=[];if(e instanceof ar)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Or("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof ar))throw new Or("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Or("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Or("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof ar))throw new Or("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(fg.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=hb(a,"implicit"),a.compiledExplicit=hb(a,"explicit"),a.compiledTypeMap=s3(a.compiledImplicit,a.compiledExplicit),a},"extend");var M9=fg,L9=new ar("tag:yaml.org,2002:str",{kind:"scalar",construct:A(function(i){return i!==null?i:""},"construct")}),N9=new ar("tag:yaml.org,2002:seq",{kind:"sequence",construct:A(function(i){return i!==null?i:[]},"construct")}),j9=new ar("tag:yaml.org,2002:map",{kind:"mapping",construct:A(function(i){return i!==null?i:{}},"construct")}),O9=new M9({explicit:[L9,N9,j9]});function o3(i){if(i===null)return!0;var e=i.length;return e===1&&i==="~"||e===4&&(i==="null"||i==="Null"||i==="NULL")}A(o3,"resolveYamlNull");function l3(){return null}A(l3,"constructYamlNull");function c3(i){return i===null}A(c3,"isNull");var R9=new ar("tag:yaml.org,2002:null",{kind:"scalar",resolve:o3,construct:l3,predicate:c3,represent:{canonical:A(function(){return"~"},"canonical"),lowercase:A(function(){return"null"},"lowercase"),uppercase:A(function(){return"NULL"},"uppercase"),camelcase:A(function(){return"Null"},"camelcase"),empty:A(function(){return""},"empty")},defaultStyle:"lowercase"});function h3(i){if(i===null)return!1;var e=i.length;return e===4&&(i==="true"||i==="True"||i==="TRUE")||e===5&&(i==="false"||i==="False"||i==="FALSE")}A(h3,"resolveYamlBoolean");function u3(i){return i==="true"||i==="True"||i==="TRUE"}A(u3,"constructYamlBoolean");function f3(i){return Object.prototype.toString.call(i)==="[object Boolean]"}A(f3,"isBoolean");var D9=new ar("tag:yaml.org,2002:bool",{kind:"scalar",resolve:h3,construct:u3,predicate:f3,represent:{lowercase:A(function(i){return i?"true":"false"},"lowercase"),uppercase:A(function(i){return i?"TRUE":"FALSE"},"uppercase"),camelcase:A(function(i){return i?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function d3(i){return 48<=i&&i<=57||65<=i&&i<=70||97<=i&&i<=102}A(d3,"isHexCode");function p3(i){return 48<=i&&i<=55}A(p3,"isOctCode");function g3(i){return 48<=i&&i<=57}A(g3,"isDecCode");function m3(i){if(i===null)return!1;var e=i.length,r=0,n=!1,a;if(!e)return!1;if(a=i[r],(a==="-"||a==="+")&&(a=i[++r]),a==="0"){if(r+1===e)return!0;if(a=i[++r],a==="b"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!d3(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!p3(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;r<e;r++)if(a=i[r],a!=="_"){if(!g3(i.charCodeAt(r)))return!1;n=!0}return!(!n||a==="_")}A(m3,"resolveYamlInteger");function y3(i){var e=i,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}A(y3,"constructYamlInteger");function x3(i){return Object.prototype.toString.call(i)==="[object Number]"&&i%1===0&&!Mi.isNegativeZero(i)}A(x3,"isInteger");var F9=new ar("tag:yaml.org,2002:int",{kind:"scalar",resolve:m3,construct:y3,predicate:x3,represent:{binary:A(function(i){return i>=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},"binary"),octal:A(function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},"octal"),decimal:A(function(i){return i.toString(10)},"decimal"),hexadecimal:A(function(i){return i>=0?"0x"+i.toString(16).toUpperCase():"-0x"+i.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),$9=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function b3(i){return!(i===null||!$9.test(i)||i[i.length-1]==="_")}A(b3,"resolveYamlFloat");function v3(i){var e,r;return e=i.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}A(v3,"constructYamlFloat");var z9=/^[-+]?[0-9]+e/;function C3(i,e){var r;if(isNaN(i))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===i)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===i)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Mi.isNegativeZero(i))return"-0.0";return r=i.toString(10),z9.test(r)?r.replace("e",".e"):r}A(C3,"representYamlFloat");function k3(i){return Object.prototype.toString.call(i)==="[object Number]"&&(i%1!==0||Mi.isNegativeZero(i))}A(k3,"isFloat");var I9=new ar("tag:yaml.org,2002:float",{kind:"scalar",resolve:b3,construct:v3,predicate:k3,represent:C3,defaultStyle:"lowercase"}),_3=O9.extend({implicit:[R9,D9,F9,I9]}),q9=_3,w3=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),S3=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function T3(i){return i===null?!1:w3.exec(i)!==null||S3.exec(i)!==null}A(T3,"resolveYamlTimestamp");function B3(i){var e,r,n,a,o,c,h,u=0,f=null,p,g,b;if(e=w3.exec(i),e===null&&(e=S3.exec(i)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,n,a));if(o=+e[4],c=+e[5],h=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(p=+e[10],g=+(e[11]||0),f=(p*60+g)*6e4,e[9]==="-"&&(f=-f)),b=new Date(Date.UTC(r,n,a,o,c,h,u)),f&&b.setTime(b.getTime()-f),b}A(B3,"constructYamlTimestamp");function A3(i){return i.toISOString()}A(A3,"representYamlTimestamp");var P9=new ar("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:T3,construct:B3,instanceOf:Date,represent:A3});function E3(i){return i==="<<"||i===null}A(E3,"resolveYamlMerge");var H9=new ar("tag:yaml.org,2002:merge",{kind:"scalar",resolve:E3}),n1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
234
+ \r`;function M3(i){if(i===null)return!1;var e,r,n=0,a=i.length,o=n1;for(r=0;r<a;r++)if(e=o.indexOf(i.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}A(M3,"resolveYamlBinary");function L3(i){var e,r,n=i.replace(/[\r\n=]/g,""),a=n.length,o=n1,c=0,h=[];for(e=0;e<a;e++)e%4===0&&e&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|o.indexOf(n.charAt(e));return r=a%4*6,r===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):r===18?(h.push(c>>10&255),h.push(c>>2&255)):r===12&&h.push(c>>4&255),new Uint8Array(h)}A(L3,"constructYamlBinary");function N3(i){var e="",r=0,n,a,o=i.length,c=n1;for(n=0;n<o;n++)n%3===0&&n&&(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+i[n];return a=o%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}A(N3,"representYamlBinary");function j3(i){return Object.prototype.toString.call(i)==="[object Uint8Array]"}A(j3,"isBinary");var U9=new ar("tag:yaml.org,2002:binary",{kind:"scalar",resolve:M3,construct:L3,predicate:j3,represent:N3}),W9=Object.prototype.hasOwnProperty,G9=Object.prototype.toString;function O3(i){if(i===null)return!0;var e=[],r,n,a,o,c,h=i;for(r=0,n=h.length;r<n;r+=1){if(a=h[r],c=!1,G9.call(a)!=="[object Object]")return!1;for(o in a)if(W9.call(a,o))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}A(O3,"resolveYamlOmap");function R3(i){return i!==null?i:[]}A(R3,"constructYamlOmap");var Y9=new ar("tag:yaml.org,2002:omap",{kind:"sequence",resolve:O3,construct:R3}),V9=Object.prototype.toString;function D3(i){if(i===null)return!0;var e,r,n,a,o,c=i;for(o=new Array(c.length),e=0,r=c.length;e<r;e+=1){if(n=c[e],V9.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}A(D3,"resolveYamlPairs");function F3(i){if(i===null)return[];var e,r,n,a,o,c=i;for(o=new Array(c.length),e=0,r=c.length;e<r;e+=1)n=c[e],a=Object.keys(n),o[e]=[a[0],n[a[0]]];return o}A(F3,"constructYamlPairs");var X9=new ar("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:D3,construct:F3}),Q9=Object.prototype.hasOwnProperty;function $3(i){if(i===null)return!0;var e,r=i;for(e in r)if(Q9.call(r,e)&&r[e]!==null)return!1;return!0}A($3,"resolveYamlSet");function z3(i){return i!==null?i:{}}A(z3,"constructYamlSet");var Z9=new ar("tag:yaml.org,2002:set",{kind:"mapping",resolve:$3,construct:z3}),I3=q9.extend({implicit:[P9,H9],explicit:[U9,Y9,X9,Z9]}),wo=Object.prototype.hasOwnProperty,dg=1,q3=2,P3=3,pg=4,P0=1,K9=2,nS=3,J9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tI=/[\x85\u2028\u2029]/,eI=/[,\[\]\{\}]/,H3=/^(?:!|!!|![a-z\-]+!)$/i,U3=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ub(i){return Object.prototype.toString.call(i)}A(ub,"_class");function zn(i){return i===10||i===13}A(zn,"is_EOL");function Co(i){return i===9||i===32}A(Co,"is_WHITE_SPACE");function yr(i){return i===9||i===32||i===10||i===13}A(yr,"is_WS_OR_EOL");function al(i){return i===44||i===91||i===93||i===123||i===125}A(al,"is_FLOW_INDICATOR");function W3(i){var e;return 48<=i&&i<=57?i-48:(e=i|32,97<=e&&e<=102?e-97+10:-1)}A(W3,"fromHexCode");function G3(i){return i===120?2:i===117?4:i===85?8:0}A(G3,"escapedHexLen");function Y3(i){return 48<=i&&i<=57?i-48:-1}A(Y3,"fromDecimalCode");function fb(i){return i===48?"\0":i===97?"\x07":i===98?"\b":i===116||i===9?" ":i===110?`
235
+ `:i===118?"\v":i===102?"\f":i===114?"\r":i===101?"\x1B":i===32?" ":i===34?'"':i===47?"/":i===92?"\\":i===78?"…":i===95?" ":i===76?"\u2028":i===80?"\u2029":""}A(fb,"simpleEscapeSequence");function V3(i){return i<=65535?String.fromCharCode(i):String.fromCharCode((i-65536>>10)+55296,(i-65536&1023)+56320)}A(V3,"charFromCodepoint");function a1(i,e,r){e==="__proto__"?Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):i[e]=r}A(a1,"setProperty");var X3=new Array(256),Q3=new Array(256);for(Vo=0;Vo<256;Vo++)X3[Vo]=fb(Vo)?1:0,Q3[Vo]=fb(Vo);var Vo;function Z3(i,e){this.input=i,this.filename=e.filename||null,this.schema=e.schema||I3,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=i.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}A(Z3,"State$1");function s1(i,e){var r={name:i.filename,buffer:i.input.slice(0,-1),position:i.position,line:i.line,column:i.position-i.lineStart};return r.snippet=B9(r),new Or(e,r)}A(s1,"generateError");function qt(i,e){throw s1(i,e)}A(qt,"throwError");function gf(i,e){i.onWarning&&i.onWarning.call(null,s1(i,e))}A(gf,"throwWarning");var aS={YAML:A(function(e,r,n){var a,o,c;e.version!==null&&qt(e,"duplication of %YAML directive"),n.length!==1&&qt(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&qt(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&qt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&gf(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:A(function(e,r,n){var a,o;n.length!==2&&qt(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],H3.test(a)||qt(e,"ill-formed tag handle (first argument) of the TAG directive"),wo.call(e.tagMap,a)&&qt(e,'there is a previously declared suffix for "'+a+'" tag handle'),U3.test(o)||qt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{qt(e,"tag prefix is malformed: "+o)}e.tagMap[a]=o},"handleTagDirective")};function us(i,e,r,n){var a,o,c,h;if(e<r){if(h=i.input.slice(e,r),n)for(a=0,o=h.length;a<o;a+=1)c=h.charCodeAt(a),c===9||32<=c&&c<=1114111||qt(i,"expected valid JSON character");else J9.test(h)&&qt(i,"the stream contains non-printable characters");i.result+=h}}A(us,"captureSegment");function db(i,e,r,n){var a,o,c,h;for(Mi.isObject(r)||qt(i,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),c=0,h=a.length;c<h;c+=1)o=a[c],wo.call(e,o)||(a1(e,o,r[o]),n[o]=!0)}A(db,"mergeMappings");function sl(i,e,r,n,a,o,c,h,u){var f,p;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),f=0,p=a.length;f<p;f+=1)Array.isArray(a[f])&&qt(i,"nested arrays are not supported inside keys"),typeof a=="object"&&ub(a[f])==="[object Object]"&&(a[f]="[object Object]");if(typeof a=="object"&&ub(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(f=0,p=o.length;f<p;f+=1)db(i,e,o[f],r);else db(i,e,o,r);else!i.json&&!wo.call(r,a)&&wo.call(e,a)&&(i.line=c||i.line,i.lineStart=h||i.lineStart,i.position=u||i.position,qt(i,"duplicated mapping key")),a1(e,a,o),delete r[a];return e}A(sl,"storeMappingPair");function Kg(i){var e;e=i.input.charCodeAt(i.position),e===10?i.position++:e===13?(i.position++,i.input.charCodeAt(i.position)===10&&i.position++):qt(i,"a line break is expected"),i.line+=1,i.lineStart=i.position,i.firstTabInLine=-1}A(Kg,"readLineBreak");function gi(i,e,r){for(var n=0,a=i.input.charCodeAt(i.position);a!==0;){for(;Co(a);)a===9&&i.firstTabInLine===-1&&(i.firstTabInLine=i.position),a=i.input.charCodeAt(++i.position);if(e&&a===35)do a=i.input.charCodeAt(++i.position);while(a!==10&&a!==13&&a!==0);if(zn(a))for(Kg(i),a=i.input.charCodeAt(i.position),n++,i.lineIndent=0;a===32;)i.lineIndent++,a=i.input.charCodeAt(++i.position);else break}return r!==-1&&n!==0&&i.lineIndent<r&&gf(i,"deficient indentation"),n}A(gi,"skipSeparationSpace");function Df(i){var e=i.position,r;return r=i.input.charCodeAt(e),!!((r===45||r===46)&&r===i.input.charCodeAt(e+1)&&r===i.input.charCodeAt(e+2)&&(e+=3,r=i.input.charCodeAt(e),r===0||yr(r)))}A(Df,"testDocumentSeparator");function Jg(i,e){e===1?i.result+=" ":e>1&&(i.result+=Mi.repeat(`
236
+ `,e-1))}A(Jg,"writeFoldedLines");function K3(i,e,r){var n,a,o,c,h,u,f,p,g=i.kind,b=i.result,y;if(y=i.input.charCodeAt(i.position),yr(y)||al(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(a=i.input.charCodeAt(i.position+1),yr(a)||r&&al(a)))return!1;for(i.kind="scalar",i.result="",o=c=i.position,h=!1;y!==0;){if(y===58){if(a=i.input.charCodeAt(i.position+1),yr(a)||r&&al(a))break}else if(y===35){if(n=i.input.charCodeAt(i.position-1),yr(n))break}else{if(i.position===i.lineStart&&Df(i)||r&&al(y))break;if(zn(y))if(u=i.line,f=i.lineStart,p=i.lineIndent,gi(i,!1,-1),i.lineIndent>=e){h=!0,y=i.input.charCodeAt(i.position);continue}else{i.position=c,i.line=u,i.lineStart=f,i.lineIndent=p;break}}h&&(us(i,o,c,!1),Jg(i,i.line-u),o=c=i.position,h=!1),Co(y)||(c=i.position+1),y=i.input.charCodeAt(++i.position)}return us(i,o,c,!1),i.result?!0:(i.kind=g,i.result=b,!1)}A(K3,"readPlainScalar");function J3(i,e){var r,n,a;if(r=i.input.charCodeAt(i.position),r!==39)return!1;for(i.kind="scalar",i.result="",i.position++,n=a=i.position;(r=i.input.charCodeAt(i.position))!==0;)if(r===39)if(us(i,n,i.position,!0),r=i.input.charCodeAt(++i.position),r===39)n=i.position,i.position++,a=i.position;else return!0;else zn(r)?(us(i,n,a,!0),Jg(i,gi(i,!1,e)),n=a=i.position):i.position===i.lineStart&&Df(i)?qt(i,"unexpected end of the document within a single quoted scalar"):(i.position++,a=i.position);qt(i,"unexpected end of the stream within a single quoted scalar")}A(J3,"readSingleQuotedScalar");function t5(i,e){var r,n,a,o,c,h;if(h=i.input.charCodeAt(i.position),h!==34)return!1;for(i.kind="scalar",i.result="",i.position++,r=n=i.position;(h=i.input.charCodeAt(i.position))!==0;){if(h===34)return us(i,r,i.position,!0),i.position++,!0;if(h===92){if(us(i,r,i.position,!0),h=i.input.charCodeAt(++i.position),zn(h))gi(i,!1,e);else if(h<256&&X3[h])i.result+=Q3[h],i.position++;else if((c=G3(h))>0){for(a=c,o=0;a>0;a--)h=i.input.charCodeAt(++i.position),(c=W3(h))>=0?o=(o<<4)+c:qt(i,"expected hexadecimal character");i.result+=V3(o),i.position++}else qt(i,"unknown escape sequence");r=n=i.position}else zn(h)?(us(i,r,n,!0),Jg(i,gi(i,!1,e)),r=n=i.position):i.position===i.lineStart&&Df(i)?qt(i,"unexpected end of the document within a double quoted scalar"):(i.position++,n=i.position)}qt(i,"unexpected end of the stream within a double quoted scalar")}A(t5,"readDoubleQuotedScalar");function e5(i,e){var r=!0,n,a,o,c=i.tag,h,u=i.anchor,f,p,g,b,y,v=Object.create(null),C,_,w,T;if(T=i.input.charCodeAt(i.position),T===91)p=93,y=!1,h=[];else if(T===123)p=125,y=!0,h={};else return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=h),T=i.input.charCodeAt(++i.position);T!==0;){if(gi(i,!0,e),T=i.input.charCodeAt(i.position),T===p)return i.position++,i.tag=c,i.anchor=u,i.kind=y?"mapping":"sequence",i.result=h,!0;r?T===44&&qt(i,"expected the node content, but found ','"):qt(i,"missed comma between flow collection entries"),_=C=w=null,g=b=!1,T===63&&(f=i.input.charCodeAt(i.position+1),yr(f)&&(g=b=!0,i.position++,gi(i,!0,e))),n=i.line,a=i.lineStart,o=i.position,Tl(i,e,dg,!1,!0),_=i.tag,C=i.result,gi(i,!0,e),T=i.input.charCodeAt(i.position),(b||i.line===n)&&T===58&&(g=!0,T=i.input.charCodeAt(++i.position),gi(i,!0,e),Tl(i,e,dg,!1,!0),w=i.result),y?sl(i,h,v,_,C,w,n,a,o):g?h.push(sl(i,null,v,_,C,w,n,a,o)):h.push(C),gi(i,!0,e),T=i.input.charCodeAt(i.position),T===44?(r=!0,T=i.input.charCodeAt(++i.position)):r=!1}qt(i,"unexpected end of the stream within a flow collection")}A(e5,"readFlowCollection");function i5(i,e){var r,n,a=P0,o=!1,c=!1,h=e,u=0,f=!1,p,g;if(g=i.input.charCodeAt(i.position),g===124)n=!1;else if(g===62)n=!0;else return!1;for(i.kind="scalar",i.result="";g!==0;)if(g=i.input.charCodeAt(++i.position),g===43||g===45)P0===a?a=g===43?nS:K9:qt(i,"repeat of a chomping mode identifier");else if((p=Y3(g))>=0)p===0?qt(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?qt(i,"repeat of an indentation width identifier"):(h=e+p-1,c=!0);else break;if(Co(g)){do g=i.input.charCodeAt(++i.position);while(Co(g));if(g===35)do g=i.input.charCodeAt(++i.position);while(!zn(g)&&g!==0)}for(;g!==0;){for(Kg(i),i.lineIndent=0,g=i.input.charCodeAt(i.position);(!c||i.lineIndent<h)&&g===32;)i.lineIndent++,g=i.input.charCodeAt(++i.position);if(!c&&i.lineIndent>h&&(h=i.lineIndent),zn(g)){u++;continue}if(i.lineIndent<h){a===nS?i.result+=Mi.repeat(`
237
+ `,o?1+u:u):a===P0&&o&&(i.result+=`
238
+ `);break}for(n?Co(g)?(f=!0,i.result+=Mi.repeat(`
239
+ `,o?1+u:u)):f?(f=!1,i.result+=Mi.repeat(`
240
+ `,u+1)):u===0?o&&(i.result+=" "):i.result+=Mi.repeat(`
241
+ `,u):i.result+=Mi.repeat(`
242
+ `,o?1+u:u),o=!0,c=!0,u=0,r=i.position;!zn(g)&&g!==0;)g=i.input.charCodeAt(++i.position);us(i,r,i.position,!1)}return!0}A(i5,"readBlockScalar");function pb(i,e){var r,n=i.tag,a=i.anchor,o=[],c,h=!1,u;if(i.firstTabInLine!==-1)return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=o),u=i.input.charCodeAt(i.position);u!==0&&(i.firstTabInLine!==-1&&(i.position=i.firstTabInLine,qt(i,"tab characters must not be used in indentation")),!(u!==45||(c=i.input.charCodeAt(i.position+1),!yr(c))));){if(h=!0,i.position++,gi(i,!0,-1)&&i.lineIndent<=e){o.push(null),u=i.input.charCodeAt(i.position);continue}if(r=i.line,Tl(i,e,P3,!1,!0),o.push(i.result),gi(i,!0,-1),u=i.input.charCodeAt(i.position),(i.line===r||i.lineIndent>e)&&u!==0)qt(i,"bad indentation of a sequence entry");else if(i.lineIndent<e)break}return h?(i.tag=n,i.anchor=a,i.kind="sequence",i.result=o,!0):!1}A(pb,"readBlockSequence");function r5(i,e,r){var n,a,o,c,h,u,f=i.tag,p=i.anchor,g={},b=Object.create(null),y=null,v=null,C=null,_=!1,w=!1,T;if(i.firstTabInLine!==-1)return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=g),T=i.input.charCodeAt(i.position);T!==0;){if(!_&&i.firstTabInLine!==-1&&(i.position=i.firstTabInLine,qt(i,"tab characters must not be used in indentation")),n=i.input.charCodeAt(i.position+1),o=i.line,(T===63||T===58)&&yr(n))T===63?(_&&(sl(i,g,b,y,v,null,c,h,u),y=v=C=null),w=!0,_=!0,a=!0):_?(_=!1,a=!0):qt(i,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),i.position+=1,T=n;else{if(c=i.line,h=i.lineStart,u=i.position,!Tl(i,r,q3,!1,!0))break;if(i.line===o){for(T=i.input.charCodeAt(i.position);Co(T);)T=i.input.charCodeAt(++i.position);if(T===58)T=i.input.charCodeAt(++i.position),yr(T)||qt(i,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(sl(i,g,b,y,v,null,c,h,u),y=v=C=null),w=!0,_=!1,a=!1,y=i.tag,v=i.result;else if(w)qt(i,"can not read an implicit mapping pair; a colon is missed");else return i.tag=f,i.anchor=p,!0}else if(w)qt(i,"can not read a block mapping entry; a multiline key may not be an implicit key");else return i.tag=f,i.anchor=p,!0}if((i.line===o||i.lineIndent>e)&&(_&&(c=i.line,h=i.lineStart,u=i.position),Tl(i,e,pg,!0,a)&&(_?v=i.result:C=i.result),_||(sl(i,g,b,y,v,C,c,h,u),y=v=C=null),gi(i,!0,-1),T=i.input.charCodeAt(i.position)),(i.line===o||i.lineIndent>e)&&T!==0)qt(i,"bad indentation of a mapping entry");else if(i.lineIndent<e)break}return _&&sl(i,g,b,y,v,null,c,h,u),w&&(i.tag=f,i.anchor=p,i.kind="mapping",i.result=g),w}A(r5,"readBlockMapping");function n5(i){var e,r=!1,n=!1,a,o,c;if(c=i.input.charCodeAt(i.position),c!==33)return!1;if(i.tag!==null&&qt(i,"duplication of a tag property"),c=i.input.charCodeAt(++i.position),c===60?(r=!0,c=i.input.charCodeAt(++i.position)):c===33?(n=!0,a="!!",c=i.input.charCodeAt(++i.position)):a="!",e=i.position,r){do c=i.input.charCodeAt(++i.position);while(c!==0&&c!==62);i.position<i.length?(o=i.input.slice(e,i.position),c=i.input.charCodeAt(++i.position)):qt(i,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!yr(c);)c===33&&(n?qt(i,"tag suffix cannot contain exclamation marks"):(a=i.input.slice(e-1,i.position+1),H3.test(a)||qt(i,"named tag handle cannot contain such characters"),n=!0,e=i.position+1)),c=i.input.charCodeAt(++i.position);o=i.input.slice(e,i.position),eI.test(o)&&qt(i,"tag suffix cannot contain flow indicator characters")}o&&!U3.test(o)&&qt(i,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{qt(i,"tag name is malformed: "+o)}return r?i.tag=o:wo.call(i.tagMap,a)?i.tag=i.tagMap[a]+o:a==="!"?i.tag="!"+o:a==="!!"?i.tag="tag:yaml.org,2002:"+o:qt(i,'undeclared tag handle "'+a+'"'),!0}A(n5,"readTagProperty");function a5(i){var e,r;if(r=i.input.charCodeAt(i.position),r!==38)return!1;for(i.anchor!==null&&qt(i,"duplication of an anchor property"),r=i.input.charCodeAt(++i.position),e=i.position;r!==0&&!yr(r)&&!al(r);)r=i.input.charCodeAt(++i.position);return i.position===e&&qt(i,"name of an anchor node must contain at least one character"),i.anchor=i.input.slice(e,i.position),!0}A(a5,"readAnchorProperty");function s5(i){var e,r,n;if(n=i.input.charCodeAt(i.position),n!==42)return!1;for(n=i.input.charCodeAt(++i.position),e=i.position;n!==0&&!yr(n)&&!al(n);)n=i.input.charCodeAt(++i.position);return i.position===e&&qt(i,"name of an alias node must contain at least one character"),r=i.input.slice(e,i.position),wo.call(i.anchorMap,r)||qt(i,'unidentified alias "'+r+'"'),i.result=i.anchorMap[r],gi(i,!0,-1),!0}A(s5,"readAlias");function Tl(i,e,r,n,a){var o,c,h,u=1,f=!1,p=!1,g,b,y,v,C,_;if(i.listener!==null&&i.listener("open",i),i.tag=null,i.anchor=null,i.kind=null,i.result=null,o=c=h=pg===r||P3===r,n&&gi(i,!0,-1)&&(f=!0,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)),u===1)for(;n5(i)||a5(i);)gi(i,!0,-1)?(f=!0,h=o,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)):h=!1;if(h&&(h=f||a),(u===1||pg===r)&&(dg===r||q3===r?C=e:C=e+1,_=i.position-i.lineStart,u===1?h&&(pb(i,_)||r5(i,_,C))||e5(i,C)?p=!0:(c&&i5(i,C)||J3(i,C)||t5(i,C)?p=!0:s5(i)?(p=!0,(i.tag!==null||i.anchor!==null)&&qt(i,"alias node should not have any properties")):K3(i,C,dg===r)&&(p=!0,i.tag===null&&(i.tag="?")),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):u===0&&(p=h&&pb(i,_))),i.tag===null)i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);else if(i.tag==="?"){for(i.result!==null&&i.kind!=="scalar"&&qt(i,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+i.kind+'"'),g=0,b=i.implicitTypes.length;g<b;g+=1)if(v=i.implicitTypes[g],v.resolve(i.result)){i.result=v.construct(i.result),i.tag=v.tag,i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);break}}else if(i.tag!=="!"){if(wo.call(i.typeMap[i.kind||"fallback"],i.tag))v=i.typeMap[i.kind||"fallback"][i.tag];else for(v=null,y=i.typeMap.multi[i.kind||"fallback"],g=0,b=y.length;g<b;g+=1)if(i.tag.slice(0,y[g].tag.length)===y[g].tag){v=y[g];break}v||qt(i,"unknown tag !<"+i.tag+">"),i.result!==null&&v.kind!==i.kind&&qt(i,"unacceptable node kind for !<"+i.tag+'> tag; it should be "'+v.kind+'", not "'+i.kind+'"'),v.resolve(i.result,i.tag)?(i.result=v.construct(i.result,i.tag),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):qt(i,"cannot resolve a node with !<"+i.tag+"> explicit tag")}return i.listener!==null&&i.listener("close",i),i.tag!==null||i.anchor!==null||p}A(Tl,"composeNode");function o5(i){var e=i.position,r,n,a,o=!1,c;for(i.version=null,i.checkLineBreaks=i.legacy,i.tagMap=Object.create(null),i.anchorMap=Object.create(null);(c=i.input.charCodeAt(i.position))!==0&&(gi(i,!0,-1),c=i.input.charCodeAt(i.position),!(i.lineIndent>0||c!==37));){for(o=!0,c=i.input.charCodeAt(++i.position),r=i.position;c!==0&&!yr(c);)c=i.input.charCodeAt(++i.position);for(n=i.input.slice(r,i.position),a=[],n.length<1&&qt(i,"directive name must not be less than one character in length");c!==0;){for(;Co(c);)c=i.input.charCodeAt(++i.position);if(c===35){do c=i.input.charCodeAt(++i.position);while(c!==0&&!zn(c));break}if(zn(c))break;for(r=i.position;c!==0&&!yr(c);)c=i.input.charCodeAt(++i.position);a.push(i.input.slice(r,i.position))}c!==0&&Kg(i),wo.call(aS,n)?aS[n](i,n,a):gf(i,'unknown document directive "'+n+'"')}if(gi(i,!0,-1),i.lineIndent===0&&i.input.charCodeAt(i.position)===45&&i.input.charCodeAt(i.position+1)===45&&i.input.charCodeAt(i.position+2)===45?(i.position+=3,gi(i,!0,-1)):o&&qt(i,"directives end mark is expected"),Tl(i,i.lineIndent-1,pg,!1,!0),gi(i,!0,-1),i.checkLineBreaks&&tI.test(i.input.slice(e,i.position))&&gf(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&Df(i)){i.input.charCodeAt(i.position)===46&&(i.position+=3,gi(i,!0,-1));return}if(i.position<i.length-1)qt(i,"end of the stream or a document separator is expected");else return}A(o5,"readDocument");function o1(i,e){i=String(i),e=e||{},i.length!==0&&(i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
243
+ `),i.charCodeAt(0)===65279&&(i=i.slice(1)));var r=new Z3(i,e),n=i.indexOf("\0");for(n!==-1&&(r.position=n,qt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)o5(r);return r.documents}A(o1,"loadDocuments");function iI(i,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=o1(i,r);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}A(iI,"loadAll$1");function l5(i,e){var r=o1(i,e);if(r.length!==0){if(r.length===1)return r[0];throw new Or("expected a single document in the stream, but found more")}}A(l5,"load$1");var rI=l5,nI={load:rI},c5=Object.prototype.toString,h5=Object.prototype.hasOwnProperty,l1=65279,aI=9,mf=10,sI=13,oI=32,lI=33,cI=34,gb=35,hI=37,uI=38,fI=39,dI=42,u5=44,pI=45,gg=58,gI=61,mI=62,yI=63,xI=64,f5=91,d5=93,bI=96,p5=123,vI=124,g5=125,sr={};sr[0]="\\0";sr[7]="\\a";sr[8]="\\b";sr[9]="\\t";sr[10]="\\n";sr[11]="\\v";sr[12]="\\f";sr[13]="\\r";sr[27]="\\e";sr[34]='\\"';sr[92]="\\\\";sr[133]="\\N";sr[160]="\\_";sr[8232]="\\L";sr[8233]="\\P";var CI=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],kI=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function m5(i,e){var r,n,a,o,c,h,u;if(e===null)return{};for(r={},n=Object.keys(e),a=0,o=n.length;a<o;a+=1)c=n[a],h=String(e[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),u=i.compiledTypeMap.fallback[c],u&&h5.call(u.styleAliases,h)&&(h=u.styleAliases[h]),r[c]=h;return r}A(m5,"compileStyleMap");function y5(i){var e,r,n;if(e=i.toString(16).toUpperCase(),i<=255)r="x",n=2;else if(i<=65535)r="u",n=4;else if(i<=4294967295)r="U",n=8;else throw new Or("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Mi.repeat("0",n-e.length)+e}A(y5,"encodeHex");var _I=1,yf=2;function x5(i){this.schema=i.schema||I3,this.indent=Math.max(1,i.indent||2),this.noArrayIndent=i.noArrayIndent||!1,this.skipInvalid=i.skipInvalid||!1,this.flowLevel=Mi.isNothing(i.flowLevel)?-1:i.flowLevel,this.styleMap=m5(this.schema,i.styles||null),this.sortKeys=i.sortKeys||!1,this.lineWidth=i.lineWidth||80,this.noRefs=i.noRefs||!1,this.noCompatMode=i.noCompatMode||!1,this.condenseFlow=i.condenseFlow||!1,this.quotingType=i.quotingType==='"'?yf:_I,this.forceQuotes=i.forceQuotes||!1,this.replacer=typeof i.replacer=="function"?i.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}A(x5,"State");function mb(i,e){for(var r=Mi.repeat(" ",e),n=0,a=-1,o="",c,h=i.length;n<h;)a=i.indexOf(`
244
+ `,n),a===-1?(c=i.slice(n),n=h):(c=i.slice(n,a+1),n=a+1),c.length&&c!==`
245
+ `&&(o+=r),o+=c;return o}A(mb,"indentString");function mg(i,e){return`
246
+ `+Mi.repeat(" ",i.indent*e)}A(mg,"generateNextLine");function b5(i,e){var r,n,a;for(r=0,n=i.implicitTypes.length;r<n;r+=1)if(a=i.implicitTypes[r],a.resolve(e))return!0;return!1}A(b5,"testImplicitResolving");function xf(i){return i===oI||i===aI}A(xf,"isWhitespace");function uh(i){return 32<=i&&i<=126||161<=i&&i<=55295&&i!==8232&&i!==8233||57344<=i&&i<=65533&&i!==l1||65536<=i&&i<=1114111}A(uh,"isPrintable");function yb(i){return uh(i)&&i!==l1&&i!==sI&&i!==mf}A(yb,"isNsCharOrWhitespace");function xb(i,e,r){var n=yb(i),a=n&&!xf(i);return(r?n:n&&i!==u5&&i!==f5&&i!==d5&&i!==p5&&i!==g5)&&i!==gb&&!(e===gg&&!a)||yb(e)&&!xf(e)&&i===gb||e===gg&&a}A(xb,"isPlainSafe");function v5(i){return uh(i)&&i!==l1&&!xf(i)&&i!==pI&&i!==yI&&i!==gg&&i!==u5&&i!==f5&&i!==d5&&i!==p5&&i!==g5&&i!==gb&&i!==uI&&i!==dI&&i!==lI&&i!==vI&&i!==gI&&i!==mI&&i!==fI&&i!==cI&&i!==hI&&i!==xI&&i!==bI}A(v5,"isPlainSafeFirst");function C5(i){return!xf(i)&&i!==gg}A(C5,"isPlainSafeLast");function Mc(i,e){var r=i.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<i.length&&(n=i.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}A(Mc,"codePointAt");function c1(i){var e=/^\n* /;return e.test(i)}A(c1,"needIndentIndicator");var k5=1,bb=2,_5=3,w5=4,Tc=5;function S5(i,e,r,n,a,o,c,h){var u,f=0,p=null,g=!1,b=!1,y=n!==-1,v=-1,C=v5(Mc(i,0))&&C5(Mc(i,i.length-1));if(e||c)for(u=0;u<i.length;f>=65536?u+=2:u++){if(f=Mc(i,u),!uh(f))return Tc;C=C&&xb(f,p,h),p=f}else{for(u=0;u<i.length;f>=65536?u+=2:u++){if(f=Mc(i,u),f===mf)g=!0,y&&(b=b||u-v-1>n&&i[v+1]!==" ",v=u);else if(!uh(f))return Tc;C=C&&xb(f,p,h),p=f}b=b||y&&u-v-1>n&&i[v+1]!==" "}return!g&&!b?C&&!c&&!a(i)?k5:o===yf?Tc:bb:r>9&&c1(i)?Tc:c?o===yf?Tc:bb:b?w5:_5}A(S5,"chooseScalarStyle");function T5(i,e,r,n,a){i.dump=(function(){if(e.length===0)return i.quotingType===yf?'""':"''";if(!i.noCompatMode&&(CI.indexOf(e)!==-1||kI.test(e)))return i.quotingType===yf?'"'+e+'"':"'"+e+"'";var o=i.indent*Math.max(1,r),c=i.lineWidth===-1?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-o),h=n||i.flowLevel>-1&&r>=i.flowLevel;function u(f){return b5(i,f)}switch(A(u,"testAmbiguity"),S5(e,h,i.indent,c,u,i.quotingType,i.forceQuotes&&!n,a)){case k5:return e;case bb:return"'"+e.replace(/'/g,"''")+"'";case _5:return"|"+vb(e,i.indent)+Cb(mb(e,o));case w5:return">"+vb(e,i.indent)+Cb(mb(B5(e,c),o));case Tc:return'"'+A5(e)+'"';default:throw new Or("impossible error: invalid scalar style")}})()}A(T5,"writeScalar");function vb(i,e){var r=c1(i)?String(e):"",n=i[i.length-1]===`
247
+ `,a=n&&(i[i.length-2]===`
248
+ `||i===`
249
+ `),o=a?"+":n?"":"-";return r+o+`
250
+ `}A(vb,"blockHeader");function Cb(i){return i[i.length-1]===`
251
+ `?i.slice(0,-1):i}A(Cb,"dropEndingNewline");function B5(i,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var f=i.indexOf(`
252
+ `);return f=f!==-1?f:i.length,r.lastIndex=f,kb(i.slice(0,f),e)})(),a=i[0]===`
253
+ `||i[0]===" ",o,c;c=r.exec(i);){var h=c[1],u=c[2];o=u[0]===" ",n+=h+(!a&&!o&&u!==""?`
254
+ `:"")+kb(u,e),a=o}return n}A(B5,"foldString");function kb(i,e){if(i===""||i[0]===" ")return i;for(var r=/ [^ ]/g,n,a=0,o,c=0,h=0,u="";n=r.exec(i);)h=n.index,h-a>e&&(o=c>a?c:h,u+=`
255
+ `+i.slice(a,o),a=o+1),c=h;return u+=`
256
+ `,i.length-a>e&&c>a?u+=i.slice(a,c)+`
257
+ `+i.slice(c+1):u+=i.slice(a),u.slice(1)}A(kb,"foldLine");function A5(i){for(var e="",r=0,n,a=0;a<i.length;r>=65536?a+=2:a++)r=Mc(i,a),n=sr[r],!n&&uh(r)?(e+=i[a],r>=65536&&(e+=i[a+1])):e+=n||y5(r);return e}A(A5,"escapeString");function E5(i,e,r){var n="",a=i.tag,o,c,h;for(o=0,c=r.length;o<c;o+=1)h=r[o],i.replacer&&(h=i.replacer.call(r,String(o),h)),(wa(i,e,h,!1,!1)||typeof h>"u"&&wa(i,e,null,!1,!1))&&(n!==""&&(n+=","+(i.condenseFlow?"":" ")),n+=i.dump);i.tag=a,i.dump="["+n+"]"}A(E5,"writeFlowSequence");function _b(i,e,r,n){var a="",o=i.tag,c,h,u;for(c=0,h=r.length;c<h;c+=1)u=r[c],i.replacer&&(u=i.replacer.call(r,String(c),u)),(wa(i,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&wa(i,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=mg(i,e)),i.dump&&mf===i.dump.charCodeAt(0)?a+="-":a+="- ",a+=i.dump);i.tag=o,i.dump=a||"[]"}A(_b,"writeBlockSequence");function M5(i,e,r){var n="",a=i.tag,o=Object.keys(r),c,h,u,f,p;for(c=0,h=o.length;c<h;c+=1)p="",n!==""&&(p+=", "),i.condenseFlow&&(p+='"'),u=o[c],f=r[u],i.replacer&&(f=i.replacer.call(r,u,f)),wa(i,e,u,!1,!1)&&(i.dump.length>1024&&(p+="? "),p+=i.dump+(i.condenseFlow?'"':"")+":"+(i.condenseFlow?"":" "),wa(i,e,f,!1,!1)&&(p+=i.dump,n+=p));i.tag=a,i.dump="{"+n+"}"}A(M5,"writeFlowMapping");function L5(i,e,r,n){var a="",o=i.tag,c=Object.keys(r),h,u,f,p,g,b;if(i.sortKeys===!0)c.sort();else if(typeof i.sortKeys=="function")c.sort(i.sortKeys);else if(i.sortKeys)throw new Or("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)b="",(!n||a!=="")&&(b+=mg(i,e)),f=c[h],p=r[f],i.replacer&&(p=i.replacer.call(r,f,p)),wa(i,e+1,f,!0,!0,!0)&&(g=i.tag!==null&&i.tag!=="?"||i.dump&&i.dump.length>1024,g&&(i.dump&&mf===i.dump.charCodeAt(0)?b+="?":b+="? "),b+=i.dump,g&&(b+=mg(i,e)),wa(i,e+1,p,!0,g)&&(i.dump&&mf===i.dump.charCodeAt(0)?b+=":":b+=": ",b+=i.dump,a+=b));i.tag=o,i.dump=a||"{}"}A(L5,"writeBlockMapping");function wb(i,e,r){var n,a,o,c,h,u;for(a=r?i.explicitTypes:i.implicitTypes,o=0,c=a.length;o<c;o+=1)if(h=a[o],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof e=="object"&&e instanceof h.instanceOf)&&(!h.predicate||h.predicate(e))){if(r?h.multi&&h.representName?i.tag=h.representName(e):i.tag=h.tag:i.tag="?",h.represent){if(u=i.styleMap[h.tag]||h.defaultStyle,c5.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(h5.call(h.represent,u))n=h.represent[u](e,u);else throw new Or("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');i.dump=n}return!0}return!1}A(wb,"detectType");function wa(i,e,r,n,a,o,c){i.tag=null,i.dump=r,wb(i,r,!1)||wb(i,r,!0);var h=c5.call(i.dump),u=n,f;n&&(n=i.flowLevel<0||i.flowLevel>e);var p=h==="[object Object]"||h==="[object Array]",g,b;if(p&&(g=i.duplicates.indexOf(r),b=g!==-1),(i.tag!==null&&i.tag!=="?"||b||i.indent!==2&&e>0)&&(a=!1),b&&i.usedDuplicates[g])i.dump="*ref_"+g;else{if(p&&b&&!i.usedDuplicates[g]&&(i.usedDuplicates[g]=!0),h==="[object Object]")n&&Object.keys(i.dump).length!==0?(L5(i,e,i.dump,a),b&&(i.dump="&ref_"+g+i.dump)):(M5(i,e,i.dump),b&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object Array]")n&&i.dump.length!==0?(i.noArrayIndent&&!c&&e>0?_b(i,e-1,i.dump,a):_b(i,e,i.dump,a),b&&(i.dump="&ref_"+g+i.dump)):(E5(i,e,i.dump),b&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object String]")i.tag!=="?"&&T5(i,i.dump,e,o,u);else{if(h==="[object Undefined]")return!1;if(i.skipInvalid)return!1;throw new Or("unacceptable kind of an object to dump "+h)}i.tag!==null&&i.tag!=="?"&&(f=encodeURI(i.tag[0]==="!"?i.tag.slice(1):i.tag).replace(/!/g,"%21"),i.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",i.dump=f+" "+i.dump)}return!0}A(wa,"writeNode");function N5(i,e){var r=[],n=[],a,o;for(yg(i,r,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(r[n[a]]);e.usedDuplicates=new Array(o)}A(N5,"getDuplicateReferences");function yg(i,e,r){var n,a,o;if(i!==null&&typeof i=="object")if(a=e.indexOf(i),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(i),Array.isArray(i))for(a=0,o=i.length;a<o;a+=1)yg(i[a],e,r);else for(n=Object.keys(i),a=0,o=n.length;a<o;a+=1)yg(i[n[a]],e,r)}A(yg,"inspectNode");function wI(i,e){e=e||{};var r=new x5(e);r.noRefs||N5(i,r);var n=i;return r.replacer&&(n=r.replacer.call({"":n},"",n)),wa(r,0,n,!0,!0)?r.dump+`
258
+ `:""}A(wI,"dump$1");function SI(i,e){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}A(SI,"renamed");var TI=_3,BI=nI.load;/*! Bundled license information:
259
+
260
+ js-yaml/dist/js-yaml.mjs:
261
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
262
+ */var xu=A((i,e)=>{if(e)return"translate("+-i.width/2+", "+-i.height/2+")";const r=i.x??0,n=i.y??0;return"translate("+-(r+i.width/2)+", "+-(n+i.height/2)+")"},"computeLabelTransform"),nr={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},sS={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Pu(i,e){if(i===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};i=ei(i),e=ei(e);const[r,n]=[i.x,i.y],[a,o]=[e.x,e.y],c=a-r,h=o-n;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}A(Pu,"calculateDeltaAndAngle");var ei=A(i=>Array.isArray(i)?{x:i[0],y:i[1]}:i,"pointTransformer"),AI=A(i=>({x:A(function(e,r,n){let a=0;const o=ei(n[0]).x<ei(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(nr,i.arrowTypeStart)){const{angle:y,deltaX:v}=Pu(n[0],n[1]);a=nr[i.arrowTypeStart]*Math.cos(y)*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(nr,i.arrowTypeEnd)){const{angle:y,deltaX:v}=Pu(n[n.length-1],n[n.length-2]);a=nr[i.arrowTypeEnd]*Math.cos(y)*(v>=0?1:-1)}const c=Math.abs(ei(e).x-ei(n[n.length-1]).x),h=Math.abs(ei(e).y-ei(n[n.length-1]).y),u=Math.abs(ei(e).x-ei(n[0]).x),f=Math.abs(ei(e).y-ei(n[0]).y),p=nr[i.arrowTypeStart],g=nr[i.arrowTypeEnd],b=1;if(c<g&&c>0&&h<g){let y=g+b-c;y*=o==="right"?-1:1,a-=y}if(u<p&&u>0&&f<p){let y=p+b-u;y*=o==="right"?-1:1,a+=y}return ei(e).x+a},"x"),y:A(function(e,r,n){let a=0;const o=ei(n[0]).y<ei(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(nr,i.arrowTypeStart)){const{angle:y,deltaY:v}=Pu(n[0],n[1]);a=nr[i.arrowTypeStart]*Math.abs(Math.sin(y))*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(nr,i.arrowTypeEnd)){const{angle:y,deltaY:v}=Pu(n[n.length-1],n[n.length-2]);a=nr[i.arrowTypeEnd]*Math.abs(Math.sin(y))*(v>=0?1:-1)}const c=Math.abs(ei(e).y-ei(n[n.length-1]).y),h=Math.abs(ei(e).x-ei(n[n.length-1]).x),u=Math.abs(ei(e).y-ei(n[0]).y),f=Math.abs(ei(e).x-ei(n[0]).x),p=nr[i.arrowTypeStart],g=nr[i.arrowTypeEnd],b=1;if(c<g&&c>0&&h<g){let y=g+b-c;y*=o==="up"?-1:1,a-=y}if(u<p&&u>0&&f<p){let y=p+b-u;y*=o==="up"?-1:1,a+=y}return ei(e).y+a},"y")}),"getLineFunctionsWithOffset"),fp={},Bi={},oS;function EI(){return oS||(oS=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.BLANK_URL=Bi.relativeFirstCharacters=Bi.whitespaceEscapeCharsRegex=Bi.urlSchemeRegex=Bi.ctrlCharactersRegex=Bi.htmlCtrlEntityRegex=Bi.htmlEntitiesRegex=Bi.invalidProtocolRegex=void 0,Bi.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Bi.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Bi.htmlCtrlEntityRegex=/&(newline|tab);/gi,Bi.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Bi.urlSchemeRegex=/^.+(:|&colon;)/gim,Bi.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Bi.relativeFirstCharacters=[".","/"],Bi.BLANK_URL="about:blank"),Bi}var lS;function MI(){if(lS)return fp;lS=1,Object.defineProperty(fp,"__esModule",{value:!0}),fp.sanitizeUrl=o;var i=EI();function e(c){return i.relativeFirstCharacters.indexOf(c[0])>-1}function r(c){var h=c.replace(i.ctrlCharactersRegex,"");return h.replace(i.htmlEntitiesRegex,function(u,f){return String.fromCharCode(f)})}function n(c){return URL.canParse(c)}function a(c){try{return decodeURIComponent(c)}catch{return c}}function o(c){if(!c)return i.BLANK_URL;var h,u=a(c.trim());do u=r(u).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim(),u=a(u),h=u.match(i.ctrlCharactersRegex)||u.match(i.htmlEntitiesRegex)||u.match(i.htmlCtrlEntityRegex)||u.match(i.whitespaceEscapeCharsRegex);while(h&&h.length>0);var f=u;if(!f)return i.BLANK_URL;if(e(f))return f;var p=f.trimStart(),g=p.match(i.urlSchemeRegex);if(!g)return f;var b=g[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(b))return i.BLANK_URL;var y=p.replace(/\\/g,"/");if(b==="mailto:"||b.includes("://"))return y;if(b==="http:"||b==="https:"){if(!n(y))return i.BLANK_URL;var v=new URL(y);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return y}return fp}var LI=MI(),j5=typeof global=="object"&&global&&global.Object===Object&&global,NI=typeof self=="object"&&self&&self.Object===Object&&self,Wn=j5||NI||Function("return this")(),xg=Wn.Symbol,O5=Object.prototype,jI=O5.hasOwnProperty,OI=O5.toString,bu=xg?xg.toStringTag:void 0;function RI(i){var e=jI.call(i,bu),r=i[bu];try{i[bu]=void 0;var n=!0}catch{}var a=OI.call(i);return n&&(e?i[bu]=r:delete i[bu]),a}var DI=Object.prototype,FI=DI.toString;function $I(i){return FI.call(i)}var zI="[object Null]",II="[object Undefined]",cS=xg?xg.toStringTag:void 0;function jl(i){return i==null?i===void 0?II:zI:cS&&cS in Object(i)?RI(i):$I(i)}function Pn(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var qI="[object AsyncFunction]",PI="[object Function]",HI="[object GeneratorFunction]",UI="[object Proxy]";function h1(i){if(!Pn(i))return!1;var e=jl(i);return e==PI||e==HI||e==qI||e==UI}var H0=Wn["__core-js_shared__"],hS=(function(){var i=/[^.]+$/.exec(H0&&H0.keys&&H0.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function WI(i){return!!hS&&hS in i}var GI=Function.prototype,YI=GI.toString;function Ol(i){if(i!=null){try{return YI.call(i)}catch{}try{return i+""}catch{}}return""}var VI=/[\\^$.*+?()[\]{}|]/g,XI=/^\[object .+?Constructor\]$/,QI=Function.prototype,ZI=Object.prototype,KI=QI.toString,JI=ZI.hasOwnProperty,tq=RegExp("^"+KI.call(JI).replace(VI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eq(i){if(!Pn(i)||WI(i))return!1;var e=h1(i)?tq:XI;return e.test(Ol(i))}function iq(i,e){return i==null?void 0:i[e]}function Rl(i,e){var r=iq(i,e);return eq(r)?r:void 0}var bf=Rl(Object,"create");function rq(){this.__data__=bf?bf(null):{},this.size=0}function nq(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var aq="__lodash_hash_undefined__",sq=Object.prototype,oq=sq.hasOwnProperty;function lq(i){var e=this.__data__;if(bf){var r=e[i];return r===aq?void 0:r}return oq.call(e,i)?e[i]:void 0}var cq=Object.prototype,hq=cq.hasOwnProperty;function uq(i){var e=this.__data__;return bf?e[i]!==void 0:hq.call(e,i)}var fq="__lodash_hash_undefined__";function dq(i,e){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=bf&&e===void 0?fq:e,this}function Bl(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}Bl.prototype.clear=rq;Bl.prototype.delete=nq;Bl.prototype.get=lq;Bl.prototype.has=uq;Bl.prototype.set=dq;function pq(){this.__data__=[],this.size=0}function tm(i,e){return i===e||i!==i&&e!==e}function em(i,e){for(var r=i.length;r--;)if(tm(i[r][0],e))return r;return-1}var gq=Array.prototype,mq=gq.splice;function yq(i){var e=this.__data__,r=em(e,i);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():mq.call(e,r,1),--this.size,!0}function xq(i){var e=this.__data__,r=em(e,i);return r<0?void 0:e[r][1]}function bq(i){return em(this.__data__,i)>-1}function vq(i,e){var r=this.__data__,n=em(r,i);return n<0?(++this.size,r.push([i,e])):r[n][1]=e,this}function ys(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}ys.prototype.clear=pq;ys.prototype.delete=yq;ys.prototype.get=xq;ys.prototype.has=bq;ys.prototype.set=vq;var vf=Rl(Wn,"Map");function Cq(){this.size=0,this.__data__={hash:new Bl,map:new(vf||ys),string:new Bl}}function kq(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function im(i,e){var r=i.__data__;return kq(e)?r[typeof e=="string"?"string":"hash"]:r.map}function _q(i){var e=im(this,i).delete(i);return this.size-=e?1:0,e}function wq(i){return im(this,i).get(i)}function Sq(i){return im(this,i).has(i)}function Tq(i,e){var r=im(this,i),n=r.size;return r.set(i,e),this.size+=r.size==n?0:1,this}function Bo(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}Bo.prototype.clear=Cq;Bo.prototype.delete=_q;Bo.prototype.get=wq;Bo.prototype.has=Sq;Bo.prototype.set=Tq;var Bq="Expected a function";function Ff(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(Bq);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var c=i.apply(this,n);return r.cache=o.set(a,c)||o,c};return r.cache=new(Ff.Cache||Bo),r}Ff.Cache=Bo;function Aq(){this.__data__=new ys,this.size=0}function Eq(i){var e=this.__data__,r=e.delete(i);return this.size=e.size,r}function Mq(i){return this.__data__.get(i)}function Lq(i){return this.__data__.has(i)}var Nq=200;function jq(i,e){var r=this.__data__;if(r instanceof ys){var n=r.__data__;if(!vf||n.length<Nq-1)return n.push([i,e]),this.size=++r.size,this;r=this.__data__=new Bo(n)}return r.set(i,e),this.size=r.size,this}function mh(i){var e=this.__data__=new ys(i);this.size=e.size}mh.prototype.clear=Aq;mh.prototype.delete=Eq;mh.prototype.get=Mq;mh.prototype.has=Lq;mh.prototype.set=jq;var bg=(function(){try{var i=Rl(Object,"defineProperty");return i({},"",{}),i}catch{}})();function u1(i,e,r){e=="__proto__"&&bg?bg(i,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):i[e]=r}function Sb(i,e,r){(r!==void 0&&!tm(i[e],r)||r===void 0&&!(e in i))&&u1(i,e,r)}function Oq(i){return function(e,r,n){for(var a=-1,o=Object(e),c=n(e),h=c.length;h--;){var u=c[++a];if(r(o[u],u,o)===!1)break}return e}}var Rq=Oq(),R5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,uS=R5&&typeof module=="object"&&module&&!module.nodeType&&module,Dq=uS&&uS.exports===R5,fS=Dq?Wn.Buffer:void 0,dS=fS?fS.allocUnsafe:void 0;function Fq(i,e){if(e)return i.slice();var r=i.length,n=dS?dS(r):new i.constructor(r);return i.copy(n),n}var pS=Wn.Uint8Array;function $q(i){var e=new i.constructor(i.byteLength);return new pS(e).set(new pS(i)),e}function zq(i,e){var r=e?$q(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.length)}function Iq(i,e){var r=-1,n=i.length;for(e||(e=Array(n));++r<n;)e[r]=i[r];return e}var gS=Object.create,qq=(function(){function i(){}return function(e){if(!Pn(e))return{};if(gS)return gS(e);i.prototype=e;var r=new i;return i.prototype=void 0,r}})();function D5(i,e){return function(r){return i(e(r))}}var F5=D5(Object.getPrototypeOf,Object),Pq=Object.prototype;function rm(i){var e=i&&i.constructor,r=typeof e=="function"&&e.prototype||Pq;return i===r}function Hq(i){return typeof i.constructor=="function"&&!rm(i)?qq(F5(i)):{}}function yh(i){return i!=null&&typeof i=="object"}var Uq="[object Arguments]";function mS(i){return yh(i)&&jl(i)==Uq}var $5=Object.prototype,Wq=$5.hasOwnProperty,Gq=$5.propertyIsEnumerable,vg=mS((function(){return arguments})())?mS:function(i){return yh(i)&&Wq.call(i,"callee")&&!Gq.call(i,"callee")},Cg=Array.isArray,Yq=9007199254740991;function z5(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Yq}function nm(i){return i!=null&&z5(i.length)&&!h1(i)}function Vq(i){return yh(i)&&nm(i)}function Xq(){return!1}var I5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yS=I5&&typeof module=="object"&&module&&!module.nodeType&&module,Qq=yS&&yS.exports===I5,xS=Qq?Wn.Buffer:void 0,Zq=xS?xS.isBuffer:void 0,f1=Zq||Xq,Kq="[object Object]",Jq=Function.prototype,tP=Object.prototype,q5=Jq.toString,eP=tP.hasOwnProperty,iP=q5.call(Object);function rP(i){if(!yh(i)||jl(i)!=Kq)return!1;var e=F5(i);if(e===null)return!0;var r=eP.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&q5.call(r)==iP}var nP="[object Arguments]",aP="[object Array]",sP="[object Boolean]",oP="[object Date]",lP="[object Error]",cP="[object Function]",hP="[object Map]",uP="[object Number]",fP="[object Object]",dP="[object RegExp]",pP="[object Set]",gP="[object String]",mP="[object WeakMap]",yP="[object ArrayBuffer]",xP="[object DataView]",bP="[object Float32Array]",vP="[object Float64Array]",CP="[object Int8Array]",kP="[object Int16Array]",_P="[object Int32Array]",wP="[object Uint8Array]",SP="[object Uint8ClampedArray]",TP="[object Uint16Array]",BP="[object Uint32Array]",Je={};Je[bP]=Je[vP]=Je[CP]=Je[kP]=Je[_P]=Je[wP]=Je[SP]=Je[TP]=Je[BP]=!0;Je[nP]=Je[aP]=Je[yP]=Je[sP]=Je[xP]=Je[oP]=Je[lP]=Je[cP]=Je[hP]=Je[uP]=Je[fP]=Je[dP]=Je[pP]=Je[gP]=Je[mP]=!1;function AP(i){return yh(i)&&z5(i.length)&&!!Je[jl(i)]}function EP(i){return function(e){return i(e)}}var P5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tf=P5&&typeof module=="object"&&module&&!module.nodeType&&module,MP=tf&&tf.exports===P5,U0=MP&&j5.process,bS=(function(){try{var i=tf&&tf.require&&tf.require("util").types;return i||U0&&U0.binding&&U0.binding("util")}catch{}})(),vS=bS&&bS.isTypedArray,d1=vS?EP(vS):AP;function Tb(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}var LP=Object.prototype,NP=LP.hasOwnProperty;function jP(i,e,r){var n=i[e];(!(NP.call(i,e)&&tm(n,r))||r===void 0&&!(e in i))&&u1(i,e,r)}function OP(i,e,r,n){var a=!r;r||(r={});for(var o=-1,c=e.length;++o<c;){var h=e[o],u=void 0;u===void 0&&(u=i[h]),a?u1(r,h,u):jP(r,h,u)}return r}function RP(i,e){for(var r=-1,n=Array(i);++r<i;)n[r]=e(r);return n}var DP=9007199254740991,FP=/^(?:0|[1-9]\d*)$/;function H5(i,e){var r=typeof i;return e=e??DP,!!e&&(r=="number"||r!="symbol"&&FP.test(i))&&i>-1&&i%1==0&&i<e}var $P=Object.prototype,zP=$P.hasOwnProperty;function IP(i,e){var r=Cg(i),n=!r&&vg(i),a=!r&&!n&&f1(i),o=!r&&!n&&!a&&d1(i),c=r||n||a||o,h=c?RP(i.length,String):[],u=h.length;for(var f in i)(e||zP.call(i,f))&&!(c&&(f=="length"||a&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||H5(f,u)))&&h.push(f);return h}function qP(i){var e=[];if(i!=null)for(var r in Object(i))e.push(r);return e}var PP=Object.prototype,HP=PP.hasOwnProperty;function UP(i){if(!Pn(i))return qP(i);var e=rm(i),r=[];for(var n in i)n=="constructor"&&(e||!HP.call(i,n))||r.push(n);return r}function U5(i){return nm(i)?IP(i,!0):UP(i)}function WP(i){return OP(i,U5(i))}function GP(i,e,r,n,a,o,c){var h=Tb(i,r),u=Tb(e,r),f=c.get(u);if(f){Sb(i,r,f);return}var p=o?o(h,u,r+"",i,e,c):void 0,g=p===void 0;if(g){var b=Cg(u),y=!b&&f1(u),v=!b&&!y&&d1(u);p=u,b||y||v?Cg(h)?p=h:Vq(h)?p=Iq(h):y?(g=!1,p=Fq(u,!0)):v?(g=!1,p=zq(u,!0)):p=[]:rP(u)||vg(u)?(p=h,vg(h)?p=WP(h):(!Pn(h)||h1(h))&&(p=Hq(u))):g=!1}g&&(c.set(u,p),a(p,u,n,o,c),c.delete(u)),Sb(i,r,p)}function W5(i,e,r,n,a){i!==e&&Rq(e,function(o,c){if(a||(a=new mh),Pn(o))GP(i,e,c,r,W5,n,a);else{var h=n?n(Tb(i,c),o,c+"",i,e,a):void 0;h===void 0&&(h=o),Sb(i,c,h)}},U5)}function G5(i){return i}function YP(i,e,r){switch(r.length){case 0:return i.call(e);case 1:return i.call(e,r[0]);case 2:return i.call(e,r[0],r[1]);case 3:return i.call(e,r[0],r[1],r[2])}return i.apply(e,r)}var CS=Math.max;function VP(i,e,r){return e=CS(e===void 0?i.length-1:e,0),function(){for(var n=arguments,a=-1,o=CS(n.length-e,0),c=Array(o);++a<o;)c[a]=n[e+a];a=-1;for(var h=Array(e+1);++a<e;)h[a]=n[a];return h[e]=r(c),YP(i,this,h)}}function XP(i){return function(){return i}}var QP=bg?function(i,e){return bg(i,"toString",{configurable:!0,enumerable:!1,value:XP(e),writable:!0})}:G5,ZP=800,KP=16,JP=Date.now;function tH(i){var e=0,r=0;return function(){var n=JP(),a=KP-(n-r);if(r=n,a>0){if(++e>=ZP)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}var eH=tH(QP);function iH(i,e){return eH(VP(i,e,G5),i+"")}function rH(i,e,r){if(!Pn(r))return!1;var n=typeof e;return(n=="number"?nm(r)&&H5(e,r.length):n=="string"&&e in r)?tm(r[e],i):!1}function nH(i){return iH(function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,c=a>2?r[2]:void 0;for(o=i.length>3&&typeof o=="function"?(a--,o):void 0,c&&rH(r[0],r[1],c)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var h=r[n];h&&i(e,h,n,o)}return e})}var aH=nH(function(i,e,r){W5(i,e,r)}),sH="​",oH={curveBasis:cb,curveBasisClosed:a9,curveBasisOpen:s9,curveBumpX:NE,curveBumpY:jE,curveBundle:o9,curveCardinalClosed:l9,curveCardinalOpen:c9,curveCardinal:FE,curveCatmullRomClosed:h9,curveCatmullRomOpen:u9,curveCatmullRom:zE,curveLinear:Ju,curveLinearClosed:f9,curveMonotoneX:WE,curveMonotoneY:GE,curveNatural:VE,curveStep:XE,curveStepAfter:ZE,curveStepBefore:QE},lH=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,cH=A(function(i,e){const r=Y5(i,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const c=r.map(h=>h.args);Kp(c),n=Ei(n,[...c])}else n=r.args;if(!n)return;let a=Ov(i,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),Y5=A(function(i,e=null){var r,n;try{const a=new RegExp(`[%]{2}(?![{]${lH.source})(?=[}][%]{2}).*
263
+ `,"ig");i=i.trim().replace(a,"").replace(/'/gm,'"'),_t.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${i}`);let o;const c=[];for(;(o=Zu.exec(i))!==null;)if(o.index===Zu.lastIndex&&Zu.lastIndex++,o&&!e||e&&((r=o[1])!=null&&r.match(e))||e&&((n=o[2])!=null&&n.match(e))){const h=o[1]?o[1]:o[2],u=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;c.push({type:h,args:u})}return c.length===0?{type:i,args:null}:c.length===1?c[0]:c}catch(a){return _t.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${i}'`),{type:void 0,args:null}}},"detectDirective"),hH=A(function(i){return i.replace(Zu,"")},"removeDirectives"),uH=A(function(i,e){for(const[r,n]of e.entries())if(n.match(i))return r;return-1},"isSubstringInArray");function p1(i,e){if(!i)return e;const r=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return oH[r]??e}A(p1,"interpolateToCurve");function V5(i,e){const r=i.trim();if(r)return e.securityLevel!=="loose"?LI.sanitizeUrl(r):r}A(V5,"formatUrl");var fH=A((i,...e)=>{const r=i.split("."),n=r.length-1,a=r[n];let o=window;for(let c=0;c<n;c++)if(o=o[r[c]],!o){_t.error(`Function name: ${i} not found in window`);return}o[a](...e)},"runFunc");function g1(i,e){return!i||!e?0:Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}A(g1,"distance");function X5(i){let e,r=0;i.forEach(a=>{r+=g1(a,e),e=a});const n=r/2;return m1(i,n)}A(X5,"traverseEdge");function Q5(i){return i.length===1?i[0]:X5(i)}A(Q5,"calcLabelPosition");var kS=A((i,e=2)=>{const r=Math.pow(10,e);return Math.round(i*r)/r},"roundNumber"),m1=A((i,e)=>{let r,n=e;for(const a of i){if(r){const o=g1(a,r);if(o===0)return r;if(o<n)n-=o;else{const c=n/o;if(c<=0)return r;if(c>=1)return{x:a.x,y:a.y};if(c>0&&c<1)return{x:kS((1-c)*r.x+c*a.x,5),y:kS((1-c)*r.y+c*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),dH=A((i,e,r)=>{_t.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const a=m1(e,25),o=i?10:5,c=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(c)*o+(e[0].x+a.x)/2,h.y=-Math.cos(c)*o+(e[0].y+a.y)/2,h},"calcCardinalityPosition");function Z5(i,e,r){const n=structuredClone(r);_t.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const a=25+i,o=m1(n,a),c=10+i*.5,h=Math.atan2(n[0].y-o.y,n[0].x-o.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*c+(n[0].y+o.y)/2):e==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(n[0].y+o.y)/2-5):e==="end_left"?(u.x=Math.sin(h)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2-5):(u.x=Math.sin(h)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2),u}A(Z5,"calcTerminalLabelPosition");function K5(i){let e="",r="";for(const n of i)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}A(K5,"getStylesFromArray");var _S=0,pH=A(()=>(_S++,"id-"+Math.random().toString(36).substr(2,12)+"-"+_S),"generateId");function J5(i){let e="";const r="0123456789abcdef",n=r.length;for(let a=0;a<i;a++)e+=r.charAt(Math.floor(Math.random()*n));return e}A(J5,"makeRandomHex");var gH=A(i=>J5(i.length),"random"),mH=A(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),yH=A(function(i,e){const r=e.text.replace(Nf.lineBreakRegex," "),[,n]=am(e.fontSize),a=i.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),e.class!==void 0&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(r),a},"drawSimpleText"),xH=Ff((i,e,r)=>{if(!i||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Nf.lineBreakRegex.test(i)))return i;const n=i.split(" ").filter(Boolean),a=[];let o="";return n.forEach((c,h)=>{const u=gs(`${c} `,r),f=gs(o,r);if(u>e){const{hyphenatedStrings:b,remainingWord:y}=bH(c,e,"-",r);a.push(o,...b),o=y}else f+u>=e?(a.push(o),o=c):o=[o,c].filter(Boolean).join(" ");h+1===n.length&&a.push(o)}),a.filter(c=>c!=="").join(r.joinWith)},(i,e,r)=>`${i}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),bH=Ff((i,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const a=[...i],o=[];let c="";return a.forEach((h,u)=>{const f=`${c}${h}`;if(gs(f,n)>=e){const g=u+1,b=a.length===g,y=`${f}${r}`;o.push(b?f:y),c=""}else c=f}),{hyphenatedStrings:o,remainingWord:c}},(i,e,r="-",n)=>`${i}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function tM(i,e){return y1(i,e).height}A(tM,"calculateTextHeight");function gs(i,e){return y1(i,e).width}A(gs,"calculateTextWidth");var y1=Ff((i,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!i)return{width:0,height:0};const[,o]=am(r),c=["sans-serif",n],h=i.split(Nf.lineBreakRegex),u=[],f=Xt("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const p=f.append("svg");for(const b of c){let y=0;const v={width:0,height:0,lineHeight:0};for(const C of h){const _=mH();_.text=C||sH;const w=yH(p,_).style("font-size",o).style("font-weight",a).style("font-family",b),T=(w._groups||w)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,T.width)),y=Math.round(T.height),v.height+=y,v.lineHeight=Math.round(Math.max(v.lineHeight,y))}u.push(v)}p.remove();const g=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[g]},(i,e)=>`${i}${e.fontSize}${e.fontWeight}${e.fontFamily}`),sh,vH=(sh=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},A(sh,"InitIDGenerator"),sh),dp,CH=A(function(i){return dp=dp||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),dp.innerHTML=i,unescape(dp.textContent)},"entityDecode");function x1(i){return"str"in i}A(x1,"isDetailedError");var kH=A((i,e,r,n)=>{var o;if(!n)return;const a=(o=i.node())==null?void 0:o.getBBox();a&&i.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),am=A(i=>{if(typeof i=="number")return[i,i+"px"];const e=parseInt(i??"",10);return Number.isNaN(e)?[void 0,void 0]:i===String(e)?[e,i+"px"]:[e,i]},"parseFontSize");function b1(i,e){return aH({},i,e)}A(b1,"cleanAndMerge");var Fn={assignWithDepth:Ei,wrapLabel:xH,calculateTextHeight:tM,calculateTextWidth:gs,calculateTextDimensions:y1,cleanAndMerge:b1,detectInit:cH,detectDirective:Y5,isSubstringInArray:uH,interpolateToCurve:p1,calcLabelPosition:Q5,calcCardinalityPosition:dH,calcTerminalLabelPosition:Z5,formatUrl:V5,getStylesFromArray:K5,generateId:pH,random:gH,runFunc:fH,entityDecode:CH,insertTitle:kH,isLabelCoordinateInPath:eM,parseFontSize:am,InitIDGenerator:vH},_H=A(function(i){let e=i;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),Al=A(function(i){return i.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Krt=A((i,e,{counter:r=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${i}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function $i(i){return i??null}A($i,"handleUndefinedAttr");function eM(i,e){const r=Math.round(i.x),n=Math.round(i.y),a=e.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(r.toString())||a.includes(n.toString())}A(eM,"isLabelCoordinateInPath");var v1=A(({flowchart:i})=>{var a,o;const e=((a=i==null?void 0:i.subGraphTitleMargin)==null?void 0:a.top)??0,r=((o=i==null?void 0:i.subGraphTitleMargin)==null?void 0:o.bottom)??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");async function iM(i,e){const r=i.getElementsByTagName("img");if(!r||r.length===0)return;const n=e.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(o=>{function c(){if(a.style.display="flex",a.style.flexDirection="column",n){const h=Ae().fontSize?Ae().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[f=HA.fontSize]=am(h),p=f*u+"px";a.style.minWidth=p,a.style.maxWidth=p}else a.style.width="100%";o(a)}A(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}A(iM,"configureLabelImages");var wH=A(i=>{const{handDrawnSeed:e}=Ae();return{fill:i,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:i,seed:e}},"solidStateFill"),xh=A(i=>{const e=SH([...i.cssCompiledStyles||[],...i.cssStyles||[],...i.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),SH=A(i=>{const e=new Map;return i.forEach(r=>{const[n,a]=r.split(":");e.set(n.trim(),a==null?void 0:a.trim())}),e},"styles2Map"),rM=A(i=>i==="color"||i==="font-size"||i==="font-family"||i==="font-weight"||i==="font-style"||i==="text-decoration"||i==="text-align"||i==="text-transform"||i==="line-height"||i==="letter-spacing"||i==="word-spacing"||i==="text-shadow"||i==="text-overflow"||i==="white-space"||i==="word-wrap"||i==="word-break"||i==="overflow-wrap"||i==="hyphens","isLabelStyle"),$t=A(i=>{const{stylesArray:e}=xh(i),r=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];rM(h)?r.push(c.join(":")+" !important"):(n.push(c.join(":")+" !important"),h.includes("stroke")&&a.push(c.join(":")+" !important"),h==="fill"&&o.push(c.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:o}},"styles2String"),Ft=A((i,e)=>{var u;const{themeVariables:r,handDrawnSeed:n}=Ae(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:c}=xh(i);return Object.assign({roughness:.7,fill:c.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||a,seed:n,strokeWidth:((u=c.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:TH(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),TH=A(i=>{if(!i)return[0,0];const e=i.trim().split(/\s+/).map(Number);if(e.length===1){const a=isNaN(e[0])?0:e[0];return[a,a]}const r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray");const BH=Object.freeze({left:0,top:0,width:16,height:16}),kg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),nM=Object.freeze({...BH,...kg}),AH=Object.freeze({...nM,body:"",hidden:!1}),EH=Object.freeze({width:null,height:null}),MH=Object.freeze({...EH,...kg}),LH=(i,e,r,n="")=>{const a=i.split(":");if(i.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const h=a.pop(),u=a.pop(),f={provider:a.length>0?a[0]:n,prefix:u,name:h};return W0(f)?f:null}const o=a[0],c=o.split("-");if(c.length>1){const h={provider:n,prefix:c.shift(),name:c.join("-")};return W0(h)?h:null}if(r&&n===""){const h={provider:n,prefix:"",name:o};return W0(h,r)?h:null}return null},W0=(i,e)=>i?!!((e&&i.prefix===""||i.prefix)&&i.name):!1;function NH(i,e){const r={};!i.hFlip!=!e.hFlip&&(r.hFlip=!0),!i.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((i.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function wS(i,e){const r=NH(i,e);for(const n in AH)n in kg?n in i&&!(n in r)&&(r[n]=kg[n]):n in e?r[n]=e[n]:n in i&&(r[n]=i[n]);return r}function jH(i,e){const r=i.icons,n=i.aliases||Object.create(null),a=Object.create(null);function o(c){if(r[c])return a[c]=[];if(!(c in a)){a[c]=null;const h=n[c]&&n[c].parent,u=h&&o(h);u&&(a[c]=[h].concat(u))}return a[c]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(o),a}function SS(i,e,r){const n=i.icons,a=i.aliases||Object.create(null);let o={};function c(h){o=wS(n[h]||a[h],o)}return c(e),r.forEach(c),wS(i,o)}function OH(i,e){if(i.icons[e])return SS(i,e,[]);const r=jH(i,[e])[e];return r?SS(i,e,r):null}const RH=/(-?[0-9.]*[0-9]+[0-9.]*)/g,DH=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function TS(i,e,r){if(e===1)return i;if(r=r||100,typeof i=="number")return Math.ceil(i*e*r)/r;if(typeof i!="string")return i;const n=i.split(RH);if(n===null||!n.length)return i;const a=[];let o=n.shift(),c=DH.test(o);for(;;){if(c){const h=parseFloat(o);isNaN(h)?a.push(o):a.push(Math.ceil(h*e*r)/r)}else a.push(o);if(o=n.shift(),o===void 0)return a.join("");c=!c}}function FH(i,e="defs"){let r="";const n=i.indexOf("<"+e);for(;n>=0;){const a=i.indexOf(">",n),o=i.indexOf("</"+e);if(a===-1||o===-1)break;const c=i.indexOf(">",o);if(c===-1)break;r+=i.slice(a+1,o).trim(),i=i.slice(0,n).trim()+i.slice(c+1)}return{defs:r,content:i}}function $H(i,e){return i?"<defs>"+i+"</defs>"+e:e}function zH(i,e,r){const n=FH(i);return $H(n.defs,e+n.content+r)}const IH=i=>i==="unset"||i==="undefined"||i==="none";function qH(i,e){const r={...nM,...i},n={...MH,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(C=>{const _=[],w=C.hFlip,T=C.vFlip;let B=C.rotate;w?T?B+=2:(_.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),_.push("scale(-1 1)"),a.top=a.left=0):T&&(_.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),_.push("scale(1 -1)"),a.top=a.left=0);let E;switch(B<0&&(B-=Math.floor(B/4)*4),B=B%4,B){case 1:E=a.height/2+a.top,_.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:_.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:E=a.width/2+a.left,_.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}B%2===1&&(a.left!==a.top&&(E=a.left,a.left=a.top,a.top=E),a.width!==a.height&&(E=a.width,a.width=a.height,a.height=E)),_.length&&(o=zH(o,'<g transform="'+_.join(" ")+'">',"</g>"))});const c=n.width,h=n.height,u=a.width,f=a.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?f:h,p=TS(g,u/f)):(p=c==="auto"?u:c,g=h===null?TS(p,f/u):h==="auto"?f:h);const b={},y=(C,_)=>{IH(_)||(b[C]=_.toString())};y("width",p),y("height",g);const v=[a.left,a.top,u,f];return b.viewBox=v.join(" "),{attributes:b,viewBox:v,body:o}}const PH=/\sid="(\S+)"/g,BS=new Map;function HH(i){i=i.replace(/[0-9]+$/,"")||"a";const e=BS.get(i)||0;return BS.set(i,e+1),e?`${i}${e}`:i}function UH(i){const e=[];let r;for(;r=PH.exec(i);)e.push(r[1]);if(!e.length)return i;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(a=>{const o=HH(a),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),i=i.replace(new RegExp(n,"g"),""),i}function WH(i,e){let r=i.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+i+"</svg>"}function C1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Dl=C1();function aM(i){Dl=i}var ef={exec:()=>null};function Ee(i,e=""){let r=typeof i=="string"?i:i.source,n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(xr.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,e)};return n}var GH=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),xr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},YH=/^(?:[ \t]*(?:\n|$))+/,VH=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,XH=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$f=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,QH=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,k1=/(?:[*+-]|\d{1,9}[.)])/,sM=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,oM=Ee(sM).replace(/bull/g,k1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ZH=Ee(sM).replace(/bull/g,k1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,KH=/^[^\n]+/,w1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,JH=Ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",w1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tU=Ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,k1).getRegex(),sm="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,eU=Ee("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",S1).replace("tag",sm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lM=Ee(_1).replace("hr",$f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sm).getRegex(),iU=Ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lM).getRegex(),T1={blockquote:iU,code:VH,def:JH,fences:XH,heading:QH,hr:$f,html:eU,lheading:oM,list:tU,newline:YH,paragraph:lM,table:ef,text:KH},AS=Ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sm).getRegex(),rU={...T1,lheading:ZH,table:AS,paragraph:Ee(_1).replace("hr",$f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",AS).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sm).getRegex()},nU={...T1,html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",S1).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ef,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ee(_1).replace("hr",$f).replace("heading",` *#{1,6} *[^
264
+ ]`).replace("lheading",oM).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},aU=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,sU=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cM=/^( {2,}|\\)\n(?!\s*$)/,oU=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,om=/[\p{P}\p{S}]/u,B1=/[\s\p{P}\p{S}]/u,hM=/[^\s\p{P}\p{S}]/u,lU=Ee(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,B1).getRegex(),uM=/(?!~)[\p{P}\p{S}]/u,cU=/(?!~)[\s\p{P}\p{S}]/u,hU=/(?:[^\s\p{P}\p{S}]|~)/u,uU=Ee(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",GH?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),fM=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fU=Ee(fM,"u").replace(/punct/g,om).getRegex(),dU=Ee(fM,"u").replace(/punct/g,uM).getRegex(),dM="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pU=Ee(dM,"gu").replace(/notPunctSpace/g,hM).replace(/punctSpace/g,B1).replace(/punct/g,om).getRegex(),gU=Ee(dM,"gu").replace(/notPunctSpace/g,hU).replace(/punctSpace/g,cU).replace(/punct/g,uM).getRegex(),mU=Ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hM).replace(/punctSpace/g,B1).replace(/punct/g,om).getRegex(),yU=Ee(/\\(punct)/,"gu").replace(/punct/g,om).getRegex(),xU=Ee(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bU=Ee(S1).replace("(?:-->|$)","-->").getRegex(),vU=Ee("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bU).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_g=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,CU=Ee(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_g).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pM=Ee(/^!?\[(label)\]\[(ref)\]/).replace("label",_g).replace("ref",w1).getRegex(),gM=Ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",w1).getRegex(),kU=Ee("reflink|nolink(?!\\()","g").replace("reflink",pM).replace("nolink",gM).getRegex(),ES=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,A1={_backpedal:ef,anyPunctuation:yU,autolink:xU,blockSkip:uU,br:cM,code:sU,del:ef,emStrongLDelim:fU,emStrongRDelimAst:pU,emStrongRDelimUnd:mU,escape:aU,link:CU,nolink:gM,punctuation:lU,reflink:pM,reflinkSearch:kU,tag:vU,text:oU,url:ef},_U={...A1,link:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",_g).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_g).getRegex()},Bb={...A1,emStrongRDelimAst:gU,emStrongLDelim:dU,url:Ee(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ES).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ee(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ES).getRegex()},wU={...Bb,br:Ee(cM).replace("{2,}","*").getRegex(),text:Ee(Bb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},pp={normal:T1,gfm:rU,pedantic:nU},vu={normal:A1,gfm:Bb,breaks:wU,pedantic:_U},SU={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},MS=i=>SU[i];function fa(i,e){if(e){if(xr.escapeTest.test(i))return i.replace(xr.escapeReplace,MS)}else if(xr.escapeTestNoEncode.test(i))return i.replace(xr.escapeReplaceNoEncode,MS);return i}function LS(i){try{i=encodeURI(i).replace(xr.percentDecode,"%")}catch{return null}return i}function NS(i,e){var o;let r=i.replace(xr.findPipe,(c,h,u)=>{let f=!1,p=h;for(;--p>=0&&u[p]==="\\";)f=!f;return f?"|":" |"}),n=r.split(xr.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(xr.slashPipe,"|");return n}function Cu(i,e,r){let n=i.length;if(n===0)return"";let a=0;for(;a<n&&i.charAt(n-a-1)===e;)a++;return i.slice(0,n-a)}function TU(i,e){if(i.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])r++;else if(i[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function jS(i,e,r,n,a){let o=e.href,c=e.title||null,h=i[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:i[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function BU(i,e,r){let n=i.match(r.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
265
+ `).map(o=>{let c=o.match(r.other.beginningSpace);if(c===null)return o;let[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
266
+ `)}var wg=class{constructor(e){Ht(this,"options");Ht(this,"rules");Ht(this,"lexer");this.options=e||Dl}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Cu(n,`
267
+ `)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],a=BU(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let a=Cu(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Cu(r[0],`
268
+ `)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Cu(r[0],`
269
+ `).split(`
270
+ `),a="",o="",c=[];for(;n.length>0;){let h=!1,u=[],f;for(f=0;f<n.length;f++)if(this.rules.other.blockquoteStart.test(n[f]))u.push(n[f]),h=!0;else if(!h)u.push(n[f]);else break;n=n.slice(f);let p=u.join(`
271
+ `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
272
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
273
+ ${p}`:p,o=o?`${o}
274
+ ${g}`:g;let b=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=b,n.length===0)break;let y=c.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let v=y,C=v.raw+`
275
+ `+n.join(`
276
+ `),_=this.blockquote(C);c[c.length-1]=_,a=a.substring(0,a.length-v.raw.length)+_.raw,o=o.substring(0,o.length-v.text.length)+_.text;break}else if((y==null?void 0:y.type)==="list"){let v=y,C=v.raw+`
277
+ `+n.join(`
278
+ `),_=this.list(C);c[c.length-1]=_,a=a.substring(0,a.length-y.raw.length)+_.raw,o=o.substring(0,o.length-v.raw.length)+_.raw,n=C.substring(c.at(-1).raw.length).split(`
279
+ `);continue}}return{type:"blockquote",raw:a,tokens:c,text:o}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),a=n.length>1,o={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let c=this.rules.other.listItemRegex(n),h=!1;for(;e;){let f=!1,p="",g="";if(!(r=c.exec(e))||this.rules.block.hr.test(e))break;p=r[0],e=e.substring(p.length);let b=r[2].split(`
280
+ `,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),y=e.split(`
281
+ `,1)[0],v=!b.trim(),C=0;if(this.options.pedantic?(C=2,g=b.trimStart()):v?C=r[1].length+1:(C=r[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=b.slice(C),C+=r[1].length),v&&this.rules.other.blankLine.test(y)&&(p+=y+`
282
+ `,e=e.substring(y.length+1),f=!0),!f){let T=this.rules.other.nextBulletRegex(C),B=this.rules.other.hrRegex(C),E=this.rules.other.fencesBeginRegex(C),N=this.rules.other.headingBeginRegex(C),O=this.rules.other.htmlBeginRegex(C);for(;e;){let M=e.split(`
283
+ `,1)[0],j;if(y=M,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),j=y):j=y.replace(this.rules.other.tabCharGlobal," "),E.test(y)||N.test(y)||O.test(y)||T.test(y)||B.test(y))break;if(j.search(this.rules.other.nonSpaceChar)>=C||!y.trim())g+=`
284
+ `+j.slice(C);else{if(v||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(b)||N.test(b)||B.test(b))break;g+=`
285
+ `+y}!v&&!y.trim()&&(v=!0),p+=M+`
286
+ `,e=e.substring(M.length+1),b=j.slice(C)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let _=null,w;this.options.gfm&&(_=this.rules.other.listIsTask.exec(g),_&&(w=_[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:p,task:!!_,checked:w,loose:!1,text:g,tokens:[]}),o.raw+=p}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let f=0;f<o.items.length;f++)if(this.lexer.state.top=!1,o.items[f].tokens=this.lexer.blockTokens(o.items[f].text,[]),!o.loose){let p=o.items[f].tokens.filter(b=>b.type==="space"),g=p.length>0&&p.some(b=>this.rules.other.anyLine.test(b.raw));o.loose=g}if(o.loose)for(let f=0;f<o.items.length;f++)o.items[f].loose=!0;return o}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:a,title:o}}}table(e){var h;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=NS(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=r[3])!=null&&h.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
287
+ `):[],c={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let u of a)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<n.length;u++)c.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:c.align[u]});for(let u of o)c.rows.push(NS(u,c.header.length).map((f,p)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:c.align[p]})));return c}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
288
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let c=Cu(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=TU(r[2],"()");if(c===-2)return;if(c>-1){let h=(r[0].indexOf("!")===0?5:4)+r[1].length+c;r[2]=r[2].substring(0,c),r[0]=r[0].substring(0,h).trim(),r[3]=""}}let a=r[2],o="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(a);c&&(a=c[1],o=c[3])}else o=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),jS(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[a.toLowerCase()];if(!o){let c=n[0].charAt(0);return{type:"text",raw:c,text:c}}return jS(n,o,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...a[0]].length-1,c,h,u=o,f=0,p=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,r=r.slice(-1*e.length+o);(a=p.exec(r))!=null;){if(c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!c)continue;if(h=[...c].length,a[3]||a[4]){u+=h;continue}else if((a[5]||a[6])&&o%3&&!((o+h)%3)){f+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+f);let g=[...a[0]][0].length,b=e.slice(0,o+a.index+g+h);if(Math.min(o,h)%2){let v=b.slice(1,-1);return{type:"em",raw:b,text:v,tokens:this.lexer.inlineTokens(v)}}let y=b.slice(2,-2);return{type:"strong",raw:b,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,a;return r[2]==="@"?(n=r[1],a="mailto:"+n):(n=r[1],a=n),{type:"link",raw:r[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let a,o;if(r[2]==="@")a=r[0],o="mailto:"+a;else{let c;do c=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(c!==r[0]);a=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},On=class Ab{constructor(e){Ht(this,"tokens");Ht(this,"options");Ht(this,"state");Ht(this,"tokenizer");Ht(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Dl,this.options.tokenizer=this.options.tokenizer||new wg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:xr,block:pp.normal,inline:vu.normal};this.options.pedantic?(r.block=pp.pedantic,r.inline=vu.pedantic):this.options.gfm&&(r.block=pp.gfm,this.options.breaks?r.inline=vu.breaks:r.inline=vu.gfm),this.tokenizer.rules=r}static get rules(){return{block:pp,inline:vu}}static lex(e,r){return new Ab(r).lex(e)}static lexInline(e,r){return new Ab(r).inlineTokens(e)}lex(e){e=e.replace(xr.carriageReturn,`
289
+ `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(xr.tabCharGlobal," ").replace(xr.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(f=>(h=f.call({lexer:this},e,r))?(e=e.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);let f=r.at(-1);h.raw.length===1&&f!==void 0?f.raw+=`
290
+ `:r.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);let f=r.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
291
+ `)?"":`
292
+ `)+h.raw,f.text+=`
293
+ `+h.text,this.inlineQueue.at(-1).src=f.text):r.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);let f=r.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
294
+ `)?"":`
295
+ `)+h.raw,f.text+=`
296
+ `+h.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},r.push(h));continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let f=1/0,p=e.slice(1),g;this.options.extensions.startBlock.forEach(b=>{g=b.call({lexer:this},p),typeof g=="number"&&g>=0&&(f=Math.min(f,g))}),f<1/0&&f>=0&&(u=e.substring(0,f+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){let f=r.at(-1);n&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=(f.raw.endsWith(`
297
+ `)?"":`
298
+ `)+h.raw,f.text+=`
299
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
300
+ `)?"":`
301
+ `)+h.raw,f.text+=`
302
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(h);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var u,f,p,g,b;let n=e,a=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)y.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=a[2]?a[2].length:0,n=n.slice(0,a.index+o)+"["+"a".repeat(a[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((f=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:f.call({lexer:this},n))??n;let c=!1,h="";for(;e;){c||(h=""),c=!1;let y;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(C=>(y=C.call({lexer:this},e,r))?(e=e.substring(y.raw.length),r.push(y),!0):!1))continue;if(y=this.tokenizer.escape(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.tag(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.link(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(y.raw.length);let C=r.at(-1);y.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(y=this.tokenizer.emStrong(e,n,h)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.codespan(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.br(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.del(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.autolink(e)){e=e.substring(y.raw.length),r.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(e))){e=e.substring(y.raw.length),r.push(y);continue}let v=e;if((b=this.options.extensions)!=null&&b.startInline){let C=1/0,_=e.slice(1),w;this.options.extensions.startInline.forEach(T=>{w=T.call({lexer:this},_),typeof w=="number"&&w>=0&&(C=Math.min(C,w))}),C<1/0&&C>=0&&(v=e.substring(0,C+1))}if(y=this.tokenizer.inlineText(v)){e=e.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(h=y.raw.slice(-1)),c=!0;let C=r.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(e){let C="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return r}},Sg=class{constructor(e){Ht(this,"options");Ht(this,"parser");this.options=e||Dl}space(e){return""}code({text:e,lang:r,escaped:n}){var c;let a=(c=(r||"").match(xr.notSpaceStart))==null?void 0:c[0],o=e.replace(xr.endingNewline,"")+`
303
+ `;return a?'<pre><code class="language-'+fa(a)+'">'+(n?o:fa(o,!0))+`</code></pre>
304
+ `:"<pre><code>"+(n?o:fa(o,!0))+`</code></pre>
305
+ `}blockquote({tokens:e}){return`<blockquote>
306
+ ${this.parser.parse(e)}</blockquote>
307
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
308
+ `}hr(e){return`<hr>
309
+ `}list(e){let r=e.ordered,n=e.start,a="";for(let h=0;h<e.items.length;h++){let u=e.items[h];a+=this.listitem(u)}let o=r?"ol":"ul",c=r&&n!==1?' start="'+n+'"':"";return"<"+o+c+`>
310
+ `+a+"</"+o+`>
311
+ `}listitem(e){var n;let r="";if(e.task){let a=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=a+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=a+" "+fa(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
312
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
313
+ `}table(e){let r="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);r+=this.tablerow({text:n});let a="";for(let o=0;o<e.rows.length;o++){let c=e.rows[o];n="";for(let h=0;h<c.length;h++)n+=this.tablecell(c[h]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
314
+ <thead>
315
+ `+r+`</thead>
316
+ `+a+`</table>
317
+ `}tablerow({text:e}){return`<tr>
318
+ ${e}</tr>
319
+ `}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
320
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${fa(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let a=this.parser.parseInline(n),o=LS(e);if(o===null)return a;e=o;let c='<a href="'+e+'"';return r&&(c+=' title="'+fa(r)+'"'),c+=">"+a+"</a>",c}image({href:e,title:r,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let o=LS(e);if(o===null)return fa(n);e=o;let c=`<img src="${e}" alt="${n}"`;return r&&(c+=` title="${fa(r)}"`),c+=">",c}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:fa(e.text)}},E1=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Rn=class Eb{constructor(e){Ht(this,"options");Ht(this,"renderer");Ht(this,"textRenderer");this.options=e||Dl,this.options.renderer=this.options.renderer||new Sg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new E1}static parse(e,r){return new Eb(r).parse(e)}static parseInline(e,r){return new Eb(r).parseInline(e)}parse(e,r=!0){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let f=h,p=this.options.extensions.renderers[f.type].call({parser:this},f);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){n+=p||"";continue}}let u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"def":{n+=this.renderer.def(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let f=u,p=this.renderer.text(f);for(;c+1<e.length&&e[c+1].type==="text";)f=e[++c],p+=`
321
+ `+this.renderer.text(f);r?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(e,r=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let f=this.options.extensions.renderers[h.type].call({parser:this},h);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=f||"";continue}}let u=h;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}},Ep,Hu=(Ep=class{constructor(e){Ht(this,"options");Ht(this,"block");this.options=e||Dl}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?On.lex:On.lexInline}provideParser(){return this.block?Rn.parse:Rn.parseInline}},Ht(Ep,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ht(Ep,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ep),AU=class{constructor(...e){Ht(this,"defaults",C1());Ht(this,"options",this.setOptions);Ht(this,"parse",this.parseMarkdown(!0));Ht(this,"parseInline",this.parseMarkdown(!1));Ht(this,"Parser",Rn);Ht(this,"Renderer",Sg);Ht(this,"TextRenderer",E1);Ht(this,"Lexer",On);Ht(this,"Tokenizer",wg);Ht(this,"Hooks",Hu);this.use(...e)}walkTokens(e,r){var a,o;let n=[];for(let c of e)switch(n=n.concat(r.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)n=n.concat(this.walkTokens(u.tokens,r));for(let u of h.rows)for(let f of u)n=n.concat(this.walkTokens(f.tokens,r));break}case"list":{let h=c;n=n.concat(this.walkTokens(h.items,r));break}default:{let h=c;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let f=h[u].flat(1/0);n=n.concat(this.walkTokens(f,r))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let c=r.renderers[o.name];c?r.renderers[o.name]=function(...h){let u=o.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=r[o.level];c?c.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),a.extensions=r),n.renderer){let o=this.defaults.renderer||new Sg(this.defaults);for(let c in n.renderer){if(!(c in o))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=n.renderer[h],f=o[h];o[h]=(...p)=>{let g=u.apply(o,p);return g===!1&&(g=f.apply(o,p)),g||""}}a.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new wg(this.defaults);for(let c in n.tokenizer){if(!(c in o))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=n.tokenizer[h],f=o[h];o[h]=(...p)=>{let g=u.apply(o,p);return g===!1&&(g=f.apply(o,p)),g}}a.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Hu;for(let c in n.hooks){if(!(c in o))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=n.hooks[h],f=o[h];Hu.passThroughHooks.has(c)?o[h]=p=>{if(this.defaults.async&&Hu.passThroughHooksRespectAsync.has(c))return(async()=>{let b=await u.call(o,p);return f.call(o,b)})();let g=u.call(o,p);return f.call(o,g)}:o[h]=(...p)=>{if(this.defaults.async)return(async()=>{let b=await u.apply(o,p);return b===!1&&(b=await f.apply(o,p)),b})();let g=u.apply(o,p);return g===!1&&(g=f.apply(o,p)),g}}a.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,c=n.walkTokens;a.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),o&&(u=u.concat(o.call(this,h))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return On.lex(e,r??this.defaults)}parser(e,r){return Rn.parse(e,r??this.defaults)}parseMarkdown(e){return(r,n)=>{let a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(r):r,u=await(o.hooks?await o.hooks.provideLexer():e?On.lex:On.lexInline)(h,o),f=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(f,o.walkTokens));let p=await(o.hooks?await o.hooks.provideParser():e?Rn.parse:Rn.parseInline)(f,o);return o.hooks?await o.hooks.postprocess(p):p})().catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let h=(o.hooks?o.hooks.provideLexer():e?On.lex:On.lexInline)(r,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():e?Rn.parse:Rn.parseInline)(h,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(e,r){return n=>{if(n.message+=`
322
+ Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+fa(n.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(n);throw n}}},El=new AU;function je(i,e){return El.parse(i,e)}je.options=je.setOptions=function(i){return El.setOptions(i),je.defaults=El.defaults,aM(je.defaults),je};je.getDefaults=C1;je.defaults=Dl;je.use=function(...i){return El.use(...i),je.defaults=El.defaults,aM(je.defaults),je};je.walkTokens=function(i,e){return El.walkTokens(i,e)};je.parseInline=El.parseInline;je.Parser=Rn;je.parser=Rn.parse;je.Renderer=Sg;je.TextRenderer=E1;je.Lexer=On;je.lexer=On.lex;je.Tokenizer=wg;je.Hooks=Hu;je.parse=je;je.options;je.setOptions;je.use;je.walkTokens;je.parseInline;Rn.parse;On.lex;function mM(i){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof i=="string"?[i]:i);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var a=n.reduce(function(h,u){var f=u.match(/\n([\t ]+|(?!\s).)/g);return f?h.concat(f.map(function(p){var g,b;return(b=(g=p.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&b!==void 0?b:0})):h},[]);if(a.length){var o=new RegExp(`
323
+ [ ]{`+Math.min.apply(Math,a)+"}","g");n=n.map(function(h){return h.replace(o,`
324
+ `)})}n[0]=n[0].replace(/^\r?\n/,"");var c=n[0];return e.forEach(function(h,u){var f=c.match(/(?:^|\n)( *)$/),p=f?f[1]:"",g=h;typeof h=="string"&&h.includes(`
325
+ `)&&(g=String(h).split(`
326
+ `).map(function(b,y){return y===0?b:""+p+b}).join(`
327
+ `)),c+=g+n[u+1]}),c}var EU={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Mb=new Map,yM=new Map,MU=A(i=>{for(const e of i){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(_t.debug("Registering icon pack:",e.name),"loader"in e)yM.set(e.name,e.loader);else if("icons"in e)Mb.set(e.name,e.icons);else throw _t.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),xM=A(async(i,e)=>{const r=LH(i,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${i}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${i}`);let a=Mb.get(n);if(!a){const c=yM.get(n);if(!c)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await c(),prefix:n},Mb.set(n,a)}catch(h){throw _t.error(h),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=OH(a,r.name);if(!o)throw new Error(`Icon not found: ${i}`);return o},"getRegisteredIconData"),LU=A(async i=>{try{return await xM(i),!0}catch{return!1}},"isIconAvailable"),zf=A(async(i,e,r)=>{let n;try{n=await xM(i,e==null?void 0:e.fallbackPrefix)}catch(c){_t.error(c),n=EU}const a=qH(n,e),o=WH(UH(a.body),{...a.attributes,...r});return qn(o,si())},"getIconSVG");function bM(i,{markdownAutoWrap:e}){const n=i.replace(/<br\/>/g,`
328
+ `).replace(/\n{2,}/g,`
329
+ `);return mM(n)}A(bM,"preprocessMarkdown");function vM(i){return i.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var r;return((r=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(n=>({content:n,type:"normal"})))??[]})}A(vM,"nonMarkdownToLines");function CM(i,e={}){const r=bM(i,e),n=je.lexer(r),a=[[]];let o=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
330
+ `).forEach((p,g)=>{g!==0&&(o++,a.push([])),p.split(" ").forEach(b=>{b=b.replace(/&#39;/g,"'"),b&&a[o].push({content:b,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(f=>{c(f,h.type)}):h.type==="html"&&a[o].push({content:h.text,type:"normal"})}return A(c,"processNode"),n.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(f=>{c(f)}):h.type==="html"?a[o].push({content:h.text,type:"normal"}):a[o].push({content:h.raw,type:"normal"})}),a}A(CM,"markdownToLines");function kM(i){return i?`<p>${i.replace(/\\n|\n/g,"<br />")}</p>`:""}A(kM,"nonMarkdownToHTML");function _M(i,{markdownAutoWrap:e}={}){const r=je.lexer(i);function n(a){var o,c,h;return a.type==="text"?e===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(n).join("")}</strong>`:a.type==="em"?`<em>${(c=a.tokens)==null?void 0:c.map(n).join("")}</em>`:a.type==="paragraph"?`<p>${(h=a.tokens)==null?void 0:h.map(n).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(_t.warn(`Unsupported markdown: ${a.type}`),a.raw)}return A(n,"output"),r.map(n).join("")}A(_M,"markdownToHTML");function wM(i){return Intl.Segmenter?[...new Intl.Segmenter().segment(i)].map(e=>e.segment):[...i]}A(wM,"splitTextToChars");function SM(i,e){const r=wM(e.content);return M1(i,[],r,e.type)}A(SM,"splitWordToFitWidth");function M1(i,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[a,...o]=r,c=[...e,a];return i([{content:c.join(""),type:n}])?M1(i,c,o,n):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}A(M1,"splitWordToFitWidthRecursion");function TM(i,e){if(i.some(({content:r})=>r.includes(`
331
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Tg(i,e)}A(TM,"splitLineToFitWidth");function Tg(i,e,r=[],n=[]){if(i.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let a="";i[0].content===" "&&(a=" ",i.shift());const o=i.shift()??{content:" ",type:"normal"},c=[...n];if(a!==""&&c.push({content:a,type:"normal"}),c.push(o),e(c))return Tg(i,e,r,c);if(n.length>0)r.push(n),i.unshift(o);else if(o.content){const[h,u]=SM(e,o);r.push([h]),u.content&&i.unshift(u)}return Tg(i,e,r)}A(Tg,"splitLineToFitWidthRecursion");function Lb(i,e){e&&i.attr("style",e)}A(Lb,"applyStyle");var OS=16384;async function BM(i,e,r,n,a=!1,o=si()){const c=i.append("foreignObject");c.attr("width",`${Math.min(10*r,OS)}px`),c.attr("height",`${Math.min(10*r,OS)}px`);const h=c.append("xhtml:div"),u=cf(e.label)?await KA(e.label.replace(Nf.lineBreakRegex,`
332
+ `),o):qn(e.label,o),f=e.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(u),Lb(p,e.labelStyle),p.attr("class",`${f} ${n}`),Lb(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===r&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px"),g=h.node().getBoundingClientRect()),c.node()}A(BM,"addHtmlSpan");function lm(i,e,r,n=!1){const a=i.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return n&&a.attr("text-anchor","middle"),a}A(lm,"createTspan");function AM(i,e,r){const n=i.append("text"),a=lm(n,1,e);cm(a,r);const o=a.node().getComputedTextLength();return n.remove(),o}A(AM,"computeWidthOfText");function NU(i,e,r){var c;const n=i.append("text"),a=lm(n,1,e);cm(a,[{content:r,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}A(NU,"computeDimensionOfText");function EM(i,e,r,n=!1,a=!1){const c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),u=c.append("text").attr("y","-10.1");a&&u.attr("text-anchor","middle");let f=0;for(const p of r){const g=A(y=>AM(c,1.1,y)<=i,"checkWidth"),b=g(p)?[p]:TM(p,g);for(const y of b){const v=lm(u,f,1.1,a);cm(v,y),f++}}if(n){const p=u.node().getBBox(),g=2;return h.attr("x",p.x-g).attr("y",p.y-g).attr("width",p.width+2*g).attr("height",p.height+2*g),c.node()}else return u.node()}A(EM,"createFormattedText");function Nb(i){const e=/&(amp|lt|gt);/g;return i.replace(e,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}A(Nb,"decodeHTMLEntities");function cm(i,e){i.text(""),e.forEach((r,n)=>{const a=i.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?a.text(Nb(r.content)):a.text(" "+Nb(r.content))})}A(cm,"updateTextContentAndStyles");async function MM(i,e={}){const r=[];i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(r.push((async()=>{const h=`${o}:${c}`;return await LU(h)?await zf(h,void 0,{class:"label-icon"}):`<i class='${qn(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(r);return i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}A(MM,"replaceIconSubstring");var xs=A(async(i,e="",{style:r="",isTitle:n=!1,classes:a="",useHtmlLabels:o=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:f=!1}={},p)=>{if(_t.debug("XYZ createText",e,r,n,a,o,h,"addSvgBackground: ",f),o){const g=c?_M(e,p):kM(e),b=await MM(Al(g),p),y=e.replace(/\\\\/g,"\\"),v={isNode:h,label:cf(e)?y:b,labelStyle:r.replace("fill:","color:")};return await BM(i,v,u,a,f,p)}else{const g=Al(e.replace(/<br\s*\/?>/g,"<br/>")),b=c?CM(g.replace("<br>","<br/>"),p):vM(g),y=EM(u,i,b,e?f:!1,!h);if(h){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(y).attr("style",v)}else{const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Xt(y).select("rect").attr("style",v.replace(/background:/g,"fill:"));const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(y).select("text").attr("style",C)}return n?Xt(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Xt(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function G0(i,e,r){if(i&&i.length){const[n,a]=e,o=Math.PI/180*r,c=Math.cos(o),h=Math.sin(o);for(const u of i){const[f,p]=u;u[0]=(f-n)*c-(p-a)*h+n,u[1]=(f-n)*h+(p-a)*c+a}}}function jU(i,e){return i[0]===e[0]&&i[1]===e[1]}function OU(i,e,r,n=1){const a=r,o=Math.max(e,.1),c=i[0]&&i[0][0]&&typeof i[0][0]=="number"?[i]:i,h=[0,0];if(a)for(const f of c)G0(f,h,a);const u=(function(f,p,g){const b=[];for(const T of f){const B=[...T];jU(B[0],B[B.length-1])||B.push([B[0][0],B[0][1]]),B.length>2&&b.push(B)}const y=[];p=Math.max(p,.1);const v=[];for(const T of b)for(let B=0;B<T.length-1;B++){const E=T[B],N=T[B+1];if(E[1]!==N[1]){const O=Math.min(E[1],N[1]);v.push({ymin:O,ymax:Math.max(E[1],N[1]),x:O===E[1]?E[0]:N[0],islope:(N[0]-E[0])/(N[1]-E[1])})}}if(v.sort(((T,B)=>T.ymin<B.ymin?-1:T.ymin>B.ymin?1:T.x<B.x?-1:T.x>B.x?1:T.ymax===B.ymax?0:(T.ymax-B.ymax)/Math.abs(T.ymax-B.ymax))),!v.length)return y;let C=[],_=v[0].ymin,w=0;for(;C.length||v.length;){if(v.length){let T=-1;for(let B=0;B<v.length&&!(v[B].ymin>_);B++)T=B;v.splice(0,T+1).forEach((B=>{C.push({s:_,edge:B})}))}if(C=C.filter((T=>!(T.edge.ymax<=_))),C.sort(((T,B)=>T.edge.x===B.edge.x?0:(T.edge.x-B.edge.x)/Math.abs(T.edge.x-B.edge.x))),(g!==1||w%p==0)&&C.length>1)for(let T=0;T<C.length;T+=2){const B=T+1;if(B>=C.length)break;const E=C[T].edge,N=C[B].edge;y.push([[Math.round(E.x),_],[Math.round(N.x),_]])}_+=g,C.forEach((T=>{T.edge.x=T.edge.x+g*T.edge.islope})),w++}return y})(c,o,n);if(a){for(const f of c)G0(f,h,-a);(function(f,p,g){const b=[];f.forEach((y=>b.push(...y))),G0(b,p,g)})(u,h,-a)}return u}function If(i,e){var r;const n=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let o=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=a),OU(i,a,n,o||1)}let L1=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=If(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){const n=[];for(const a of e)n.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return n}};function hm(i){const e=i[0],r=i[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}let RU=class extends L1{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const a=If(e,Object.assign({},r,{hachureGap:n})),o=Math.PI/180*r.hachureAngle,c=[],h=.5*n*Math.cos(o),u=.5*n*Math.sin(o);for(const[f,p]of a)hm([f,p])&&c.push([[f[0]-h,f[1]+u],[...p]],[[f[0]+h,f[1]-u],[...p]]);return{type:"fillSketch",ops:this.renderLines(c,r)}}},DU=class extends L1{fillPolygons(e,r){const n=this._fillPolygons(e,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(e,a);return n.ops=n.ops.concat(o.ops),n}},FU=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=If(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){const n=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const c=a/4;for(const h of e){const u=hm(h),f=u/a,p=Math.ceil(f)-1,g=u-p*a,b=(h[0][0]+h[1][0])/2-a/4,y=Math.min(h[0][1],h[1][1]);for(let v=0;v<p;v++){const C=y+g+v*a,_=b-c+2*Math.random()*c,w=C-c+2*Math.random()*c,T=this.helper.ellipse(_,w,o,o,r);n.push(...T.ops)}}return{type:"fillSketch",ops:n}}},$U=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=If(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){const n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return e.forEach((c=>{const h=hm(c),u=Math.floor(h/(n+a)),f=(h+a-u*(n+a))/2;let p=c[0],g=c[1];p[0]>g[0]&&(p=c[1],g=c[0]);const b=Math.atan((g[1]-p[1])/(g[0]-p[0]));for(let y=0;y<u;y++){const v=y*(n+a),C=v+n,_=[p[0]+v*Math.cos(b)+f*Math.cos(b),p[1]+v*Math.sin(b)+f*Math.sin(b)],w=[p[0]+C*Math.cos(b)+f*Math.cos(b),p[1]+C*Math.sin(b)+f*Math.sin(b)];o.push(...this.helper.doubleLineOps(_[0],_[1],w[0],w[1],r))}})),o}},zU=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?n:r.zigzagOffset,o=If(e,r=Object.assign({},r,{hachureGap:n+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,r)}}zigzagLines(e,r,n){const a=[];return e.forEach((o=>{const c=hm(o),h=Math.round(c/(2*r));let u=o[0],f=o[1];u[0]>f[0]&&(u=o[1],f=o[0]);const p=Math.atan((f[1]-u[1])/(f[0]-u[0]));for(let g=0;g<h;g++){const b=2*g*r,y=2*(g+1)*r,v=Math.sqrt(2*Math.pow(r,2)),C=[u[0]+b*Math.cos(p),u[1]+b*Math.sin(p)],_=[u[0]+y*Math.cos(p),u[1]+y*Math.sin(p)],w=[C[0]+v*Math.cos(p+Math.PI/4),C[1]+v*Math.sin(p+Math.PI/4)];a.push(...this.helper.doubleLineOps(C[0],C[1],w[0],w[1],n),...this.helper.doubleLineOps(w[0],w[1],_[0],_[1],n))}})),a}};const Mr={};let IU=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};const qU=0,Y0=1,RS=2,gp={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function V0(i,e){return i.type===e}function N1(i){const e=[],r=(function(c){const h=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:qU,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:Y0,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:RS,text:""},h})(i);let n="BOD",a=0,o=r[a];for(;!V0(o,RS);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return N1("M0,0"+i);a++,c=gp[o.text],n=o.text}else V0(o,Y0)?c=gp[n]:(a++,c=gp[o.text],n=o.text);if(!(a+c<r.length))throw new Error("Path data ended short");for(let u=a;u<a+c;u++){const f=r[u];if(!V0(f,Y0))throw new Error("Param not a number: "+n+","+f.text);h[h.length]=+f.text}if(typeof gp[n]!="number")throw new Error("Bad segment: "+n);{const u={key:n,data:h};e.push(u),a+=c,o=r[a],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function LM(i){let e=0,r=0,n=0,a=0;const o=[];for(const{key:c,data:h}of i)switch(c){case"M":o.push({key:"M",data:[...h]}),[e,r]=h,[n,a]=h;break;case"m":e+=h[0],r+=h[1],o.push({key:"M",data:[e,r]}),n=e,a=r;break;case"L":o.push({key:"L",data:[...h]}),[e,r]=h;break;case"l":e+=h[0],r+=h[1],o.push({key:"L",data:[e,r]});break;case"C":o.push({key:"C",data:[...h]}),e=h[4],r=h[5];break;case"c":{const u=h.map(((f,p)=>p%2?f+r:f+e));o.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":o.push({key:"Q",data:[...h]}),e=h[2],r=h[3];break;case"q":{const u=h.map(((f,p)=>p%2?f+r:f+e));o.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":o.push({key:"A",data:[...h]}),e=h[5],r=h[6];break;case"a":e+=h[5],r+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,r]});break;case"H":o.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...h]}),r=h[0];break;case"v":r+=h[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...h]}),e=h[2],r=h[3];break;case"s":{const u=h.map(((f,p)=>p%2?f+r:f+e));o.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":o.push({key:"T",data:[...h]}),e=h[0],r=h[1];break;case"t":e+=h[0],r+=h[1],o.push({key:"T",data:[e,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=n,r=a}return o}function NM(i){const e=[];let r="",n=0,a=0,o=0,c=0,h=0,u=0;for(const{key:f,data:p}of i){switch(f){case"M":e.push({key:"M",data:[...p]}),[n,a]=p,[o,c]=p;break;case"C":e.push({key:"C",data:[...p]}),n=p[4],a=p[5],h=p[2],u=p[3];break;case"L":e.push({key:"L",data:[...p]}),[n,a]=p;break;case"H":n=p[0],e.push({key:"L",data:[n,a]});break;case"V":a=p[0],e.push({key:"L",data:[n,a]});break;case"S":{let g=0,b=0;r==="C"||r==="S"?(g=n+(n-h),b=a+(a-u)):(g=n,b=a),e.push({key:"C",data:[g,b,...p]}),h=p[0],u=p[1],n=p[2],a=p[3];break}case"T":{const[g,b]=p;let y=0,v=0;r==="Q"||r==="T"?(y=n+(n-h),v=a+(a-u)):(y=n,v=a);const C=n+2*(y-n)/3,_=a+2*(v-a)/3,w=g+2*(y-g)/3,T=b+2*(v-b)/3;e.push({key:"C",data:[C,_,w,T,g,b]}),h=y,u=v,n=g,a=b;break}case"Q":{const[g,b,y,v]=p,C=n+2*(g-n)/3,_=a+2*(b-a)/3,w=y+2*(g-y)/3,T=v+2*(b-v)/3;e.push({key:"C",data:[C,_,w,T,y,v]}),h=g,u=b,n=y,a=v;break}case"A":{const g=Math.abs(p[0]),b=Math.abs(p[1]),y=p[2],v=p[3],C=p[4],_=p[5],w=p[6];g===0||b===0?(e.push({key:"C",data:[n,a,_,w,_,w]}),n=_,a=w):(n!==_||a!==w)&&(jM(n,a,_,w,g,b,y,v,C).forEach((function(T){e.push({key:"C",data:T})})),n=_,a=w);break}case"Z":e.push({key:"Z",data:[]}),n=o,a=c}r=f}return e}function ku(i,e,r){return[i*Math.cos(r)-e*Math.sin(r),i*Math.sin(r)+e*Math.cos(r)]}function jM(i,e,r,n,a,o,c,h,u,f){const p=(g=c,Math.PI*g/180);var g;let b=[],y=0,v=0,C=0,_=0;if(f)[y,v,C,_]=f;else{[i,e]=ku(i,e,-p),[r,n]=ku(r,n,-p);const W=(i-r)/2,D=(e-n)/2;let U=W*W/(a*a)+D*D/(o*o);U>1&&(U=Math.sqrt(U),a*=U,o*=U);const R=a*a,I=o*o,P=R*I-R*D*D-I*W*W,V=R*D*D+I*W*W,J=(h===u?-1:1)*Math.sqrt(Math.abs(P/V));C=J*a*D/o+(i+r)/2,_=J*-o*W/a+(e+n)/2,y=Math.asin(parseFloat(((e-_)/o).toFixed(9))),v=Math.asin(parseFloat(((n-_)/o).toFixed(9))),i<C&&(y=Math.PI-y),r<C&&(v=Math.PI-v),y<0&&(y=2*Math.PI+y),v<0&&(v=2*Math.PI+v),u&&y>v&&(y-=2*Math.PI),!u&&v>y&&(v-=2*Math.PI)}let w=v-y;if(Math.abs(w)>120*Math.PI/180){const W=v,D=r,U=n;v=u&&v>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,b=jM(r=C+a*Math.cos(v),n=_+o*Math.sin(v),D,U,a,o,c,0,u,[v,W,C,_])}w=v-y;const T=Math.cos(y),B=Math.sin(y),E=Math.cos(v),N=Math.sin(v),O=Math.tan(w/4),M=4/3*a*O,j=4/3*o*O,G=[i,e],$=[i+M*B,e-j*T],z=[r+M*N,n-j*E],K=[r,n];if($[0]=2*G[0]-$[0],$[1]=2*G[1]-$[1],f)return[$,z,K].concat(b);{b=[$,z,K].concat(b);const W=[];for(let D=0;D<b.length;D+=3){const U=ku(b[D][0],b[D][1],p),R=ku(b[D+1][0],b[D+1][1],p),I=ku(b[D+2][0],b[D+2][1],p);W.push([U[0],U[1],R[0],R[1],I[0],I[1]])}return W}}const PU={randOffset:function(i,e){return te(i,e)},randOffsetWithRange:function(i,e,r){return Bg(i,e,r)},ellipse:function(i,e,r,n,a){const o=RM(r,n,a);return jb(i,e,a,o).opset},doubleLineOps:function(i,e,r,n,a){return So(i,e,r,n,a,!0)}};function OM(i,e,r,n,a){return{type:"path",ops:So(i,e,r,n,a)}}function qp(i,e,r){const n=(i||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...So(i[o][0],i[o][1],i[o+1][0],i[o+1][1],r));return e&&a.push(...So(i[n-1][0],i[n-1][1],i[0][0],i[0][1],r)),{type:"path",ops:a}}return n===2?OM(i[0][0],i[0][1],i[1][0],i[1][1],r):{type:"path",ops:[]}}function HU(i,e,r,n,a){return(function(o,c){return qp(o,!0,c)})([[i,e],[i+r,e],[i+r,e+n],[i,e+n]],a)}function DS(i,e){if(i.length){const r=typeof i[0][0]=="number"?[i]:i,n=mp(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:mp(r[0],1.5*(1+.22*e.roughness),zS(e));for(let o=1;o<r.length;o++){const c=r[o];if(c.length){const h=mp(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:mp(c,1.5*(1+.22*e.roughness),zS(e));for(const f of h)f.op!=="move"&&n.push(f);for(const f of u)f.op!=="move"&&a.push(f)}}return{type:"path",ops:n.concat(a)}}return{type:"path",ops:[]}}function RM(i,e,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(i/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/a;let c=Math.abs(i/2),h=Math.abs(e/2);const u=1-r.curveFitting;return c+=te(c*u,r),h+=te(h*u,r),{increment:o,rx:c,ry:h}}function jb(i,e,r,n){const[a,o]=IS(n.increment,i,e,n.rx,n.ry,1,n.increment*Bg(.1,Bg(.4,1,r),r),r);let c=Ag(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[h]=IS(n.increment,i,e,n.rx,n.ry,1.5,0,r),u=Ag(h,null,r);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function FS(i,e,r,n,a,o,c,h,u){const f=i,p=e;let g=Math.abs(r/2),b=Math.abs(n/2);g+=te(.01*g,u),b+=te(.01*b,u);let y=a,v=o;for(;y<0;)y+=2*Math.PI,v+=2*Math.PI;v-y>2*Math.PI&&(y=0,v=2*Math.PI);const C=2*Math.PI/u.curveStepCount,_=Math.min(C/2,(v-y)/2),w=qS(_,f,p,g,b,y,v,1,u);if(!u.disableMultiStroke){const T=qS(_,f,p,g,b,y,v,1.5,u);w.push(...T)}return c&&(h?w.push(...So(f,p,f+g*Math.cos(y),p+b*Math.sin(y),u),...So(f,p,f+g*Math.cos(v),p+b*Math.sin(v),u)):w.push({op:"lineTo",data:[f,p]},{op:"lineTo",data:[f+g*Math.cos(y),p+b*Math.sin(y)]})),{type:"path",ops:w}}function $S(i,e){const r=NM(LM(N1(i))),n=[];let a=[0,0],o=[0,0];for(const{key:c,data:h}of r)switch(c){case"M":o=[h[0],h[1]],a=[h[0],h[1]];break;case"L":n.push(...So(o[0],o[1],h[0],h[1],e)),o=[h[0],h[1]];break;case"C":{const[u,f,p,g,b,y]=h;n.push(...UU(u,f,p,g,b,y,o,e)),o=[b,y];break}case"Z":n.push(...So(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:n}}function X0(i,e){const r=[];for(const n of i)if(n.length){const a=e.maxRandomnessOffset||0,o=n.length;if(o>2){r.push({op:"move",data:[n[0][0]+te(a,e),n[0][1]+te(a,e)]});for(let c=1;c<o;c++)r.push({op:"lineTo",data:[n[c][0]+te(a,e),n[c][1]+te(a,e)]})}}return{type:"fillPath",ops:r}}function vc(i,e){return(function(r,n){let a=r.fillStyle||"hachure";if(!Mr[a])switch(a){case"zigzag":Mr[a]||(Mr[a]=new RU(n));break;case"cross-hatch":Mr[a]||(Mr[a]=new DU(n));break;case"dots":Mr[a]||(Mr[a]=new FU(n));break;case"dashed":Mr[a]||(Mr[a]=new $U(n));break;case"zigzag-line":Mr[a]||(Mr[a]=new zU(n));break;default:a="hachure",Mr[a]||(Mr[a]=new L1(n))}return Mr[a]})(e,PU).fillPolygons(i,e)}function zS(i){const e=Object.assign({},i);return e.randomizer=void 0,i.seed&&(e.seed=i.seed+1),e}function DM(i){return i.randomizer||(i.randomizer=new IU(i.seed||0)),i.randomizer.next()}function Bg(i,e,r,n=1){return r.roughness*n*(DM(r)*(e-i)+i)}function te(i,e,r=1){return Bg(-i,i,e,r)}function So(i,e,r,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=Ob(i,e,r,n,a,!0,!1);if(c)return h;const u=Ob(i,e,r,n,a,!0,!0);return h.concat(u)}function Ob(i,e,r,n,a,o,c){const h=Math.pow(i-r,2)+Math.pow(e-n,2),u=Math.sqrt(h);let f=1;f=u<200?1:u>500?.4:-.0016668*u+1.233334;let p=a.maxRandomnessOffset||0;p*p*100>h&&(p=u/10);const g=p/2,b=.2+.2*DM(a);let y=a.bowing*a.maxRandomnessOffset*(n-e)/200,v=a.bowing*a.maxRandomnessOffset*(i-r)/200;y=te(y,a,f),v=te(v,a,f);const C=[],_=()=>te(g,a,f),w=()=>te(p,a,f),T=a.preserveVertices;return c?C.push({op:"move",data:[i+(T?0:_()),e+(T?0:_())]}):C.push({op:"move",data:[i+(T?0:te(p,a,f)),e+(T?0:te(p,a,f))]}),c?C.push({op:"bcurveTo",data:[y+i+(r-i)*b+_(),v+e+(n-e)*b+_(),y+i+2*(r-i)*b+_(),v+e+2*(n-e)*b+_(),r+(T?0:_()),n+(T?0:_())]}):C.push({op:"bcurveTo",data:[y+i+(r-i)*b+w(),v+e+(n-e)*b+w(),y+i+2*(r-i)*b+w(),v+e+2*(n-e)*b+w(),r+(T?0:w()),n+(T?0:w())]}),C}function mp(i,e,r){if(!i.length)return[];const n=[];n.push([i[0][0]+te(e,r),i[0][1]+te(e,r)]),n.push([i[0][0]+te(e,r),i[0][1]+te(e,r)]);for(let a=1;a<i.length;a++)n.push([i[a][0]+te(e,r),i[a][1]+te(e,r)]),a===i.length-1&&n.push([i[a][0]+te(e,r),i[a][1]+te(e,r)]);return Ag(n,null,r)}function Ag(i,e,r){const n=i.length,a=[];if(n>3){const o=[],c=1-r.curveTightness;a.push({op:"move",data:[i[1][0],i[1][1]]});for(let h=1;h+2<n;h++){const u=i[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*i[h+1][0]-c*i[h-1][0])/6,u[1]+(c*i[h+1][1]-c*i[h-1][1])/6],o[2]=[i[h+1][0]+(c*i[h][0]-c*i[h+2][0])/6,i[h+1][1]+(c*i[h][1]-c*i[h+2][1])/6],o[3]=[i[h+1][0],i[h+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else n===3?(a.push({op:"move",data:[i[1][0],i[1][1]]}),a.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[2][0],i[2][1]]})):n===2&&a.push(...Ob(i[0][0],i[0][1],i[1][0],i[1][1],r,!0,!0));return a}function IS(i,e,r,n,a,o,c,h){const u=[],f=[];if(h.roughness===0){i/=4,f.push([e+n*Math.cos(-i),r+a*Math.sin(-i)]);for(let p=0;p<=2*Math.PI;p+=i){const g=[e+n*Math.cos(p),r+a*Math.sin(p)];u.push(g),f.push(g)}f.push([e+n*Math.cos(0),r+a*Math.sin(0)]),f.push([e+n*Math.cos(i),r+a*Math.sin(i)])}else{const p=te(.5,h)-Math.PI/2;f.push([te(o,h)+e+.9*n*Math.cos(p-i),te(o,h)+r+.9*a*Math.sin(p-i)]);const g=2*Math.PI+p-.01;for(let b=p;b<g;b+=i){const y=[te(o,h)+e+n*Math.cos(b),te(o,h)+r+a*Math.sin(b)];u.push(y),f.push(y)}f.push([te(o,h)+e+n*Math.cos(p+2*Math.PI+.5*c),te(o,h)+r+a*Math.sin(p+2*Math.PI+.5*c)]),f.push([te(o,h)+e+.98*n*Math.cos(p+c),te(o,h)+r+.98*a*Math.sin(p+c)]),f.push([te(o,h)+e+.9*n*Math.cos(p+.5*c),te(o,h)+r+.9*a*Math.sin(p+.5*c)])}return[f,u]}function qS(i,e,r,n,a,o,c,h,u){const f=o+te(.1,u),p=[];p.push([te(h,u)+e+.9*n*Math.cos(f-i),te(h,u)+r+.9*a*Math.sin(f-i)]);for(let g=f;g<=c;g+=i)p.push([te(h,u)+e+n*Math.cos(g),te(h,u)+r+a*Math.sin(g)]);return p.push([e+n*Math.cos(c),r+a*Math.sin(c)]),p.push([e+n*Math.cos(c),r+a*Math.sin(c)]),Ag(p,null,u)}function UU(i,e,r,n,a,o,c,h){const u=[],f=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let p=[0,0];const g=h.disableMultiStroke?1:2,b=h.preserveVertices;for(let y=0;y<g;y++)y===0?u.push({op:"move",data:[c[0],c[1]]}):u.push({op:"move",data:[c[0]+(b?0:te(f[0],h)),c[1]+(b?0:te(f[0],h))]}),p=b?[a,o]:[a+te(f[y],h),o+te(f[y],h)],u.push({op:"bcurveTo",data:[i+te(f[y],h),e+te(f[y],h),r+te(f[y],h),n+te(f[y],h),p[0],p[1]]});return u}function _u(i){return[...i]}function PS(i,e=0){const r=i.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(r===3)n.push(_u(i[0]),_u(i[1]),_u(i[2]),_u(i[2]));else{const a=[];a.push(i[0],i[0]);for(let h=1;h<i.length;h++)a.push(i[h]),h===i.length-1&&a.push(i[h]);const o=[],c=1-e;n.push(_u(a[0]));for(let h=1;h+2<a.length;h++){const u=a[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*a[h+1][0]-c*a[h-1][0])/6,u[1]+(c*a[h+1][1]-c*a[h-1][1])/6],o[2]=[a[h+1][0]+(c*a[h][0]-c*a[h+2][0])/6,a[h+1][1]+(c*a[h][1]-c*a[h+2][1])/6],o[3]=[a[h+1][0],a[h+1][1]],n.push(o[1],o[2],o[3])}}return n}function Pp(i,e){return Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2)}function WU(i,e,r){const n=Pp(e,r);if(n===0)return Pp(i,e);let a=((i[0]-e[0])*(r[0]-e[0])+(i[1]-e[1])*(r[1]-e[1]))/n;return a=Math.max(0,Math.min(1,a)),Pp(i,Jo(e,r,a))}function Jo(i,e,r){return[i[0]+(e[0]-i[0])*r,i[1]+(e[1]-i[1])*r]}function Rb(i,e,r,n){const a=n||[];if((function(h,u){const f=h[u+0],p=h[u+1],g=h[u+2],b=h[u+3];let y=3*p[0]-2*f[0]-b[0];y*=y;let v=3*p[1]-2*f[1]-b[1];v*=v;let C=3*g[0]-2*b[0]-f[0];C*=C;let _=3*g[1]-2*b[1]-f[1];return _*=_,y<C&&(y=C),v<_&&(v=_),y+v})(i,e)<r){const h=i[e+0];a.length?(o=a[a.length-1],c=h,Math.sqrt(Pp(o,c))>1&&a.push(h)):a.push(h),a.push(i[e+3])}else{const u=i[e+0],f=i[e+1],p=i[e+2],g=i[e+3],b=Jo(u,f,.5),y=Jo(f,p,.5),v=Jo(p,g,.5),C=Jo(b,y,.5),_=Jo(y,v,.5),w=Jo(C,_,.5);Rb([u,b,C,w],0,r,a),Rb([w,_,v,g],0,r,a)}var o,c;return a}function GU(i,e){return Eg(i,0,i.length,e)}function Eg(i,e,r,n,a){const o=a||[],c=i[e],h=i[r-1];let u=0,f=1;for(let p=e+1;p<r-1;++p){const g=WU(i[p],c,h);g>u&&(u=g,f=p)}return Math.sqrt(u)>n?(Eg(i,e,f+1,n,o),Eg(i,f,r,n,o)):(o.length||o.push(c),o.push(h)),o}function Q0(i,e=.15,r){const n=[],a=(i.length-1)/3;for(let o=0;o<a;o++)Rb(i,3*o,e,n);return r&&r>0?Eg(n,0,n.length,r):n}const Vr="none";class Mg{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,a,o){const c=this._o(o);return this._d("line",[OM(e,r,n,a,c)],c)}rectangle(e,r,n,a,o){const c=this._o(o),h=[],u=HU(e,r,n,a,c);if(c.fill){const f=[[e,r],[e+n,r],[e+n,r+a],[e,r+a]];c.fillStyle==="solid"?h.push(X0([f],c)):h.push(vc([f],c))}return c.stroke!==Vr&&h.push(u),this._d("rectangle",h,c)}ellipse(e,r,n,a,o){const c=this._o(o),h=[],u=RM(n,a,c),f=jb(e,r,c,u);if(c.fill)if(c.fillStyle==="solid"){const p=jb(e,r,c,u).opset;p.type="fillPath",h.push(p)}else h.push(vc([f.estimatedPoints],c));return c.stroke!==Vr&&h.push(f.opset),this._d("ellipse",h,c)}circle(e,r,n,a){const o=this.ellipse(e,r,n,n,a);return o.shape="circle",o}linearPath(e,r){const n=this._o(r);return this._d("linearPath",[qp(e,!1,n)],n)}arc(e,r,n,a,o,c,h=!1,u){const f=this._o(u),p=[],g=FS(e,r,n,a,o,c,h,!0,f);if(h&&f.fill)if(f.fillStyle==="solid"){const b=Object.assign({},f);b.disableMultiStroke=!0;const y=FS(e,r,n,a,o,c,!0,!1,b);y.type="fillPath",p.push(y)}else p.push((function(b,y,v,C,_,w,T){const B=b,E=y;let N=Math.abs(v/2),O=Math.abs(C/2);N+=te(.01*N,T),O+=te(.01*O,T);let M=_,j=w;for(;M<0;)M+=2*Math.PI,j+=2*Math.PI;j-M>2*Math.PI&&(M=0,j=2*Math.PI);const G=(j-M)/T.curveStepCount,$=[];for(let z=M;z<=j;z+=G)$.push([B+N*Math.cos(z),E+O*Math.sin(z)]);return $.push([B+N*Math.cos(j),E+O*Math.sin(j)]),$.push([B,E]),vc([$],T)})(e,r,n,a,o,c,f));return f.stroke!==Vr&&p.push(g),this._d("arc",p,f)}curve(e,r){const n=this._o(r),a=[],o=DS(e,n);if(n.fill&&n.fill!==Vr)if(n.fillStyle==="solid"){const c=DS(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=e;if(h.length){const u=typeof h[0][0]=="number"?[h]:h;for(const f of u)f.length<3?c.push(...f):f.length===3?c.push(...Q0(PS([f[0],f[0],f[1],f[2]]),10,(1+n.roughness)/2)):c.push(...Q0(PS(f),10,(1+n.roughness)/2))}c.length&&a.push(vc([c],n))}return n.stroke!==Vr&&a.push(o),this._d("curve",a,n)}polygon(e,r){const n=this._o(r),a=[],o=qp(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(X0([e],n)):a.push(vc([e],n))),n.stroke!==Vr&&a.push(o),this._d("polygon",a,n)}path(e,r){const n=this._o(r),a=[];if(!e)return this._d("path",a,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&n.fill!=="transparent"&&n.fill!==Vr,c=n.stroke!==Vr,h=!!(n.simplification&&n.simplification<1),u=(function(p,g,b){const y=NM(LM(N1(p))),v=[];let C=[],_=[0,0],w=[];const T=()=>{w.length>=4&&C.push(...Q0(w,g)),w=[]},B=()=>{T(),C.length&&(v.push(C),C=[])};for(const{key:N,data:O}of y)switch(N){case"M":B(),_=[O[0],O[1]],C.push(_);break;case"L":T(),C.push([O[0],O[1]]);break;case"C":if(!w.length){const M=C.length?C[C.length-1]:_;w.push([M[0],M[1]])}w.push([O[0],O[1]]),w.push([O[2],O[3]]),w.push([O[4],O[5]]);break;case"Z":T(),C.push([_[0],_[1]])}if(B(),!b)return v;const E=[];for(const N of v){const O=GU(N,b);O.length&&E.push(O)}return E})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),f=$S(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const p=$S(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else a.push(X0(u,n));else a.push(vc(u,n));return c&&(h?u.forEach((p=>{a.push(qp(p,!1,n))})):a.push(f)),this._d("path",a,n)}opsToPath(e,r){let n="";for(const a of e.ops){const o=typeof r=="number"&&r>=0?a.data.map((c=>+c.toFixed(r))):a.data;switch(a.op){case"move":n+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":n+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":n+=`L${o[0]} ${o[1]} `}}return n.trim()}toPaths(e){const r=e.sets||[],n=e.options||this.defaultOptions,a=[];for(const o of r){let c=null;switch(o.type){case"path":c={d:this.opsToPath(o),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Vr};break;case"fillPath":c={d:this.opsToPath(o),stroke:Vr,strokeWidth:0,fill:n.fill||Vr};break;case"fillSketch":c=this.fillSketch(o,n)}c&&a.push(c)}return a}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Vr,strokeWidth:n,fill:Vr}}_mergedShape(e){return e.filter(((r,n)=>n===0||r.op!=="move"))}}class YU{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Mg(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const c of r)switch(c.type){case"path":a.save(),a.strokeStyle=n.stroke==="none"?"transparent":n.stroke,a.lineWidth=n.strokeWidth,n.strokeLineDash&&a.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(a.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(a,c,o),a.restore();break;case"fillPath":{a.save(),a.fillStyle=n.fill||"";const h=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,c,o,h),a.restore();break}case"fillSketch":this.fillSketch(a,c,n)}}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=a,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,a="nonzero"){e.beginPath();for(const o of r.ops){const c=typeof n=="number"&&n>=0?o.data.map((h=>+h.toFixed(n))):o.data;switch(o.op){case"move":e.moveTo(c[0],c[1]);break;case"bcurveTo":e.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":e.lineTo(c[0],c[1])}}r.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,a,o){const c=this.gen.line(e,r,n,a,o);return this.draw(c),c}rectangle(e,r,n,a,o){const c=this.gen.rectangle(e,r,n,a,o);return this.draw(c),c}ellipse(e,r,n,a,o){const c=this.gen.ellipse(e,r,n,a,o);return this.draw(c),c}circle(e,r,n,a){const o=this.gen.circle(e,r,n,a);return this.draw(o),o}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,a,o,c,h=!1,u){const f=this.gen.arc(e,r,n,a,o,c,h,u);return this.draw(f),f}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){const n=this.gen.path(e,r);return this.draw(n),n}}const yp="http://www.w3.org/2000/svg";class VU{constructor(e,r){this.svg=e,this.gen=new Mg(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(yp,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of r){let u=null;switch(h.type){case"path":u=a.createElementNS(yp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=a.createElementNS(yp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(a,h,n)}u&&o.appendChild(u)}return o}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2);const o=e.createElementNS(yp,"path");return o.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,a,o){const c=this.gen.line(e,r,n,a,o);return this.draw(c)}rectangle(e,r,n,a,o){const c=this.gen.rectangle(e,r,n,a,o);return this.draw(c)}ellipse(e,r,n,a,o){const c=this.gen.ellipse(e,r,n,a,o);return this.draw(c)}circle(e,r,n,a){const o=this.gen.circle(e,r,n,a);return this.draw(o)}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,a,o,c,h=!1,u){const f=this.gen.arc(e,r,n,a,o,c,h,u);return this.draw(f)}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n)}path(e,r){const n=this.gen.path(e,r);return this.draw(n)}}var Dt={canvas:(i,e)=>new YU(i,e),svg:(i,e)=>new VU(i,e),generator:i=>new Mg(i),newSeed:()=>Mg.newSeed()},Jt=A(async(i,e,r)=>{var y,v;let n;const a=e.useHtmlLabels||ms((y=Ae())==null?void 0:y.htmlLabels);r?n=r:n="node default";const o=i.insert("g").attr("class",n).attr("id",e.domId||e.id),c=o.insert("g").attr("class","label").attr("style",$i(e.labelStyle));let h;e.label===void 0?h="":h=typeof e.label=="string"?e.label:e.label[0];const u=!!e.icon||!!e.img,f=e.labelType==="markdown",p=await xs(c,qn(Al(h),Ae()),{useHtmlLabels:a,width:e.width||((v=Ae().flowchart)==null?void 0:v.wrappingWidth),classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:f},Ae());let g=p.getBBox();const b=((e==null?void 0:e.padding)??0)/2;if(a){const C=p.children[0],_=Xt(p);await iM(C,h),g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height)}return a?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:g,halfPadding:b,label:c}},"labelHelper"),Z0=A(async(i,e,r)=>{var u,f;const n=r.useHtmlLabels??vr(Ae()),a=i.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await xs(a,qn(Al(e),Ae()),{useHtmlLabels:n,width:r.width||((f=(u=Ae())==null?void 0:u.flowchart)==null?void 0:f.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=o.getBBox();const h=r.padding/2;if(vr(Ae())){const p=o.children[0],g=Xt(o);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return n?a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):a.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:i,bbox:c,halfPadding:h,label:a}},"insertLabel"),It=A((i,e)=>{const r=e.node().getBBox();i.width=r.width,i.height=r.height},"updateNodeBounds"),Qt=A((i,e)=>(i.look==="handDrawn"?"rough-node":"node")+" "+i.cssClasses+" "+(e||""),"getNodeClasses");function ve(i){const e=i.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}A(ve,"createPathFromPoints");function To(i,e,r,n,a,o){const c=[],u=r-i,f=n-e,p=u/o,g=2*Math.PI/p,b=e+f/2;for(let y=0;y<=50;y++){const v=y/50,C=i+v*u,_=b+a*Math.sin(g*(C-i));c.push({x:C,y:_})}return c}A(To,"generateFullSineWavePoints");function Cf(i,e,r,n,a,o){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const b=h+g*p,y=i+r*Math.cos(b),v=e+r*Math.sin(b);c.push({x:-y,y:-v})}return c}A(Cf,"generateCirclePoints");function Db(i){const e=Array.from(i.childNodes).filter(u=>u.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",n);const a=e.find(u=>u.getAttribute("fill")!=="none"),o=e.find(u=>u.getAttribute("stroke")!=="none"),c=A((u,f)=>(u==null?void 0:u.getAttribute(f))??void 0,"getAttr");if(a){const u={fill:c(a,"fill"),"fill-opacity":c(a,"fill-opacity")??"1"};Object.entries(u).forEach(([f,p])=>{p&&r.setAttribute(f,p)})}if(o){const u={stroke:c(o,"stroke"),"stroke-width":c(o,"stroke-width")??"1","stroke-opacity":c(o,"stroke-opacity")??"1"};Object.entries(u).forEach(([f,p])=>{p&&r.setAttribute(f,p)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(r),h}A(Db,"mergePaths");var XU=A((i,e)=>{var r=i.x,n=i.y,a=e.x-r,o=e.y-n,c=i.width/2,h=i.height/2,u,f;return Math.abs(o)*c>Math.abs(a)*h?(o<0&&(h=-h),u=o===0?0:h*a/o,f=h):(a<0&&(c=-c),u=c,f=a===0?0:c*o/a),{x:r+u,y:n+f}},"intersectRect"),bh=XU,QU=A(async(i,e,r,n=!1,a=!1)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const c=Ae(),h=vr(c);return await xs(i,o,{style:r,isTitle:n,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},c)},"createLabel"),yo=QU,Ao=A((i,e,r,n,a)=>["M",i+a,e,"H",i+r-a,"A",a,a,0,0,1,i+r,e+a,"V",e+n-a,"A",a,a,0,0,1,i+r-a,e+n,"H",i+a,"A",a,a,0,0,1,i,e+n-a,"V",e+a,"A",a,a,0,0,1,i+a,e,"Z"].join(" "),"createRoundedRectPathD"),FM=A(async(i,e)=>{_t.info("Creating subgraph rect for ",e.id,e);const r=Ae(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:f,backgroundStyles:p}=$t(e),g=i.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=vr(r),y=g.insert("g").attr("class","cluster-label ");let v;e.labelType==="markdown"?v=await xs(y,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}):v=await yo(y,e.label,e.labelStyle||"",!1,!0);let C=v.getBBox();if(vr(r)){const M=v.children[0],j=Xt(v);C=M.getBoundingClientRect(),j.attr("width",C.width),j.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-_/2,B=e.y-w/2;_t.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const M=Dt.svg(g),j=Ft(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),G=M.path(Ao(T,B,_,w,0),j);E=g.insert(()=>(_t.debug("Rough node insert CXC",G),G),":first-child"),E.select("path:nth-child(2)").attr("style",f.join(";")),E.select("path").attr("style",p.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",B).attr("width",_).attr("height",w);const{subGraphTitleTopMargin:N}=v1(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+N})`),h){const M=y.select("span");M&&M.attr("style",h)}const O=E.node().getBBox();return e.offsetX=0,e.width=O.width,e.height=O.height,e.offsetY=C.height-e.padding/2,e.intersect=function(M){return bh(e,M)},{cluster:g,labelBBox:C}},"rect"),ZU=A((i,e)=>{const r=i.insert("g").attr("class","note-cluster").attr("id",e.domId),n=r.insert("rect",":first-child"),a=0*e.padding,o=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const c=n.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return bh(e,h)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),KU=A(async(i,e)=>{const r=Ae(),{themeVariables:n,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:u}=n,f=i.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=f.insert("g",":first-child"),g=f.insert("g").attr("class","cluster-label");let b=f.append("rect");const y=await yo(g,e.label,e.labelStyle,void 0,!0);let v=y.getBBox();if(vr(r)){const G=y.children[0],$=Xt(y);v=G.getBoundingClientRect(),$.attr("width",v.width),$.attr("height",v.height)}const C=0*e.padding,_=C/2,w=(e.width<=v.width+e.padding?v.width+e.padding:e.width)+C;e.width<=v.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+C,B=e.height+C-v.height-6,E=e.x-w/2,N=e.y-T/2;e.width=w;const O=e.y-e.height/2-_+v.height+2;let M;if(e.look==="handDrawn"){const G=e.cssClasses.includes("statediagram-cluster-alt"),$=Dt.svg(f),z=e.rx||e.ry?$.path(Ao(E,N,w,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):$.rectangle(E,N,w,T,{seed:a});M=f.insert(()=>z,":first-child");const K=$.rectangle(E,O,w,B,{fill:G?o:c,fillStyle:G?"hachure":"solid",stroke:u,seed:a});M=f.insert(()=>z,":first-child"),b=f.insert(()=>K)}else M=p.insert("rect",":first-child"),M.attr("class","outer").attr("x",E).attr("y",N).attr("width",w).attr("height",T).attr("data-look",e.look),b.attr("class","inner").attr("x",E).attr("y",O).attr("width",w).attr("height",B);g.attr("transform",`translate(${e.x-v.width/2}, ${N+1-(vr(r)?0:3)})`);const j=M.node().getBBox();return e.height=j.height,e.offsetX=0,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(G){return bh(e,G)},{cluster:f,labelBBox:v}},"roundedWithTitle"),JU=A(async(i,e)=>{_t.info("Creating subgraph rect for ",e.id,e);const r=Ae(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:f,backgroundStyles:p}=$t(e),g=i.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=vr(r),y=g.insert("g").attr("class","cluster-label "),v=await xs(y,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let C=v.getBBox();if(vr(r)){const M=v.children[0],j=Xt(v);C=M.getBoundingClientRect(),j.attr("width",C.width),j.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-_/2,B=e.y-w/2;_t.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const M=Dt.svg(g),j=Ft(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),G=M.path(Ao(T,B,_,w,e.rx),j);E=g.insert(()=>(_t.debug("Rough node insert CXC",G),G),":first-child"),E.select("path:nth-child(2)").attr("style",f.join(";")),E.select("path").attr("style",p.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",B).attr("width",_).attr("height",w);const{subGraphTitleTopMargin:N}=v1(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+N})`),h){const M=y.select("span");M&&M.attr("style",h)}const O=E.node().getBBox();return e.offsetX=0,e.width=O.width,e.height=O.height,e.offsetY=C.height-e.padding/2,e.intersect=function(M){return bh(e,M)},{cluster:g,labelBBox:C}},"kanbanSection"),tW=A((i,e)=>{const r=Ae(),{themeVariables:n,handDrawnSeed:a}=r,{nodeBorder:o}=n,c=i.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=c.insert("g",":first-child"),u=0*e.padding,f=e.width+u;e.diff=-e.padding;const p=e.height+u,g=e.x-f/2,b=e.y-p/2;e.width=f;let y;if(e.look==="handDrawn"){const _=Dt.svg(c).rectangle(g,b,f,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});y=c.insert(()=>_,":first-child")}else{y=h.insert("rect",":first-child");let C="outer";e.look,C="divider",y.attr("class",C).attr("x",g).attr("y",b).attr("width",f).attr("height",p).attr("data-look",e.look)}const v=y.node().getBBox();return e.height=v.height,e.offsetX=0,e.offsetY=0,e.intersect=function(C){return bh(e,C)},{cluster:c,labelBBox:{}}},"divider"),eW=FM,iW={rect:FM,squareRect:eW,roundedWithTitle:KU,noteGroup:ZU,divider:tW,kanbanSection:JU},$M=new Map,rW=A(async(i,e)=>{const r=e.shape||"rect",n=await iW[r](i,e);return $M.set(e.id,n),n},"insertCluster"),unt=A(()=>{$M=new Map},"clear");function zM(i,e){return i.intersect(e)}A(zM,"intersectNode");var nW=zM;function IM(i,e,r,n){var a=i.x,o=i.y,c=a-n.x,h=o-n.y,u=Math.sqrt(e*e*h*h+r*r*c*c),f=Math.abs(e*r*c/u);n.x<a&&(f=-f);var p=Math.abs(e*r*h/u);return n.y<o&&(p=-p),{x:a+f,y:o+p}}A(IM,"intersectEllipse");var qM=IM;function PM(i,e,r){return qM(i,e,e,r)}A(PM,"intersectCircle");var aW=PM;function HM(i,e,r,n){{const a=e.y-i.y,o=i.x-e.x,c=e.x*i.y-i.x*e.y,h=a*r.x+o*r.y+c,u=a*n.x+o*n.y+c,f=1e-6;if(h!==0&&u!==0&&Fb(h,u))return;const p=n.y-r.y,g=r.x-n.x,b=n.x*r.y-r.x*n.y,y=p*i.x+g*i.y+b,v=p*e.x+g*e.y+b;if(Math.abs(y)<f&&Math.abs(v)<f&&Fb(y,v))return;const C=a*g-p*o;if(C===0)return;const _=Math.abs(C/2);let w=o*b-g*c;const T=w<0?(w-_)/C:(w+_)/C;w=p*c-a*b;const B=w<0?(w-_)/C:(w+_)/C;return{x:T,y:B}}}A(HM,"intersectLine");function Fb(i,e){return i*e>0}A(Fb,"sameSign");var sW=HM;function UM(i,e,r){let n=i.x,a=i.y,o=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(p){c=Math.min(c,p.x),h=Math.min(h,p.y)}):(c=Math.min(c,e.x),h=Math.min(h,e.y));let u=n-i.width/2-c,f=a-i.height/2-h;for(let p=0;p<e.length;p++){let g=e[p],b=e[p<e.length-1?p+1:0],y=sW(i,r,{x:u+g.x,y:f+g.y},{x:u+b.x,y:f+b.y});y&&o.push(y)}return o.length?(o.length>1&&o.sort(function(p,g){let b=p.x-r.x,y=p.y-r.y,v=Math.sqrt(b*b+y*y),C=g.x-r.x,_=g.y-r.y,w=Math.sqrt(C*C+_*_);return v<w?-1:v===w?0:1}),o[0]):i}A(UM,"intersectPolygon");var oW=UM,jt={node:nW,circle:aW,ellipse:qM,polygon:oW,rect:bh};function WM(i,e){const{labelStyles:r}=$t(e);e.labelStyle=r;const n=Qt(e);let a=n;n||(a="anchor");const o=i.insert("g").attr("class",a).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,u=Dt.svg(o),f=Ft(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(f.roughness=0);const p=u.circle(0,0,c*2,f),g=o.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",$i(h)),It(e,g),e.intersect=function(b){return _t.info("Circle intersect",e,c,b),jt.circle(e,c,b)},o}A(WM,"anchor");function $b(i,e,r,n,a,o,c){const u=(i+r)/2,f=(e+n)/2,p=Math.atan2(n-e,r-i),g=(r-i)/2,b=(n-e)/2,y=g/a,v=b/o,C=Math.sqrt(y**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const _=Math.sqrt(1-C**2),w=u+_*o*Math.sin(p)*(c?-1:1),T=f-_*a*Math.cos(p)*(c?-1:1),B=Math.atan2((e-T)/o,(i-w)/a);let N=Math.atan2((n-T)/o,(r-w)/a)-B;c&&N<0&&(N+=2*Math.PI),!c&&N>0&&(N-=2*Math.PI);const O=[];for(let M=0;M<20;M++){const j=M/19,G=B+j*N,$=w+a*Math.cos(G),z=T+o*Math.sin(G);O.push({x:$,y:z})}return O}A($b,"generateArcPoints");function GM(i,e,r){const[n,a]=[e,r].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(i/n/2)**2))}A(GM,"calculateArcSagitta");async function YM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=A(G=>G+c,"calcTotalHeight"),u=A(G=>{const $=G/2;return[$/(2.5+G/50),$]},"calcEllipseRadius"),{shapeSvg:f,bbox:p}=await Jt(i,e,Qt(e)),g=h(e!=null&&e.height?e==null?void 0:e.height:p.height),[b,y]=u(g),v=GM(g,b,y),_=(e!=null&&e.width?e==null?void 0:e.width:p.width)+o*2+v-v,w=g,{cssStyles:T}=e,B=[{x:_/2,y:-w/2},{x:-_/2,y:-w/2},...$b(-_/2,-w/2,-_/2,w/2,b,y,!1),{x:_/2,y:w/2},...$b(_/2,w/2,_/2,-w/2,b,y,!0)],E=Dt.svg(f),N=Ft(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const O=ve(B),M=E.path(O,N),j=f.insert(()=>M,":first-child");return j.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),j.attr("transform",`translate(${b/2}, 0)`),It(e,j),e.intersect=function(G){return jt.polygon(e,B,G)},f}A(YM,"bowTieRect");function bs(i,e,r,n){return i.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}A(bs,"insertPolygonShape");var xp=12;async function VM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?28:a,c=e.look==="neo"?24:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o+xp),p=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),g=0,b=f,y=-p,v=0,C=[{x:g+xp,y},{x:b,y},{x:b,y:v},{x:g,y:v},{x:g,y:y+xp},{x:g+xp,y}];let _;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=Dt.svg(h),B=Ft(e,{}),E=ve(C),N=T.path(E,B);_=h.insert(()=>N,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),w&&_.attr("style",w)}else _=bs(h,f,p,C);return n&&_.attr("style",n),It(e,_),e.intersect=function(T){return jt.polygon(e,C,T)},h}A(VM,"card");function XM(i,e){const{nodeStyles:r}=$t(e);e.label="";const n=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),c=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],h=Dt.svg(n),u=Ft(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ve(c),p=h.path(f,u),g=n.insert(()=>p,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),r&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(b){return jt.polygon(e,c,b)},n}A(XM,"choice");async function j1(i,e,r){const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:h}=await Jt(i,e,Qt(e)),u=16,f=(r==null?void 0:r.padding)??h,p=e.look==="neo"?c.width/2+u*2:c.width/2+f;let g;const{cssStyles:b}=e;if(e.look==="handDrawn"){const y=Dt.svg(o),v=Ft(e,{}),C=y.circle(0,0,p*2,v);g=o.insert(()=>C,":first-child"),g.attr("class","basic label-container").attr("style",$i(b))}else g=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0);return It(e,g),e.calcIntersect=function(y,v){const C=y.width/2;return jt.circle(y,C,v)},e.intersect=function(y){return _t.info("Circle intersect",e,p,y),jt.circle(e,p,y)},o}A(j1,"circle");function QM(i){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=i*2,a={x:n/2*e,y:n/2*r},o={x:-(n/2)*e,y:n/2*r},c={x:-(n/2)*e,y:-(n/2)*r},h={x:n/2*e,y:-(n/2)*r};return`M ${o.x},${o.y} L ${h.x},${h.y}
333
+ M ${a.x},${a.y} L ${c.x},${c.y}`}A(QM,"createLine");function ZM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r,e.label="";const a=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:c}=e,h=Dt.svg(a),u=Ft(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,o*2,u),p=QM(o),g=h.path(p,u),b=a.insert(()=>f,":first-child");return b.insert(()=>g),b.attr("class","outer-path"),c&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",c),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),It(e,b),e.intersect=function(y){return _t.info("crossedCircle intersect",e,{radius:o,point:y}),jt.circle(e,o,y)},a}A(ZM,"crossedCircle");function es(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const b=h+g*p,y=i+r*Math.cos(b),v=e+r*Math.sin(b);c.push({x:-y,y:-v})}return c}A(es,"generateCirclePoints");async function KM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,f=o.width+h,p=o.height+u,g=Math.max(5,p*.1),{cssStyles:b}=e,y=[...es(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...es(f/2+g*2,-g,g,20,-180,-270),...es(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...es(f/2,p/2,g,20,0,90)],v=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...es(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...es(f/2+f*.1,-g,g,20,-180,-270),...es(f/2+f*.1,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...es(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2,y:p/2+g}],C=Dt.svg(a),_=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=ve(y).replace("Z",""),B=C.path(T,_),E=ve(v),N=C.path(E,{..._}),O=a.insert("g",":first-child");return O.insert(()=>N,":first-child").attr("stroke-opacity",0),O.insert(()=>B,":first-child"),O.attr("class","text"),b&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-f/2+g-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),It(e,O),e.intersect=function(M){return jt.polygon(e,v,M)},a}A(KM,"curlyBraceLeft");function is(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const b=h+g*p,y=i+r*Math.cos(b),v=e+r*Math.sin(b);c.push({x:y,y:v})}return c}A(is,"generateCirclePoints");async function JM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,f=o.width+(e.look==="neo"?h*2:h),p=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:b}=e,y=[...is(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...is(f/2+g*2,-g,g,20,-180,-270),...is(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...is(f/2,p/2,g,20,0,90)],v=[{x:-f/2,y:-p/2-g},{x:f/2,y:-p/2-g},...is(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...is(f/2+g*2,-g,g,20,-180,-270),...is(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...is(f/2,p/2,g,20,0,90),{x:f/2,y:p/2+g},{x:-f/2,y:p/2+g}],C=Dt.svg(a),_=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=ve(y).replace("Z",""),B=C.path(T,_),E=ve(v),N=C.path(E,{..._}),O=a.insert("g",":first-child");return O.insert(()=>N,":first-child").attr("stroke-opacity",0),O.insert(()=>B,":first-child"),O.attr("class","text"),b&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),It(e,O),e.intersect=function(M){return jt.polygon(e,v,M)},a}A(JM,"curlyBraceRight");function Vi(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const b=h+g*p,y=i+r*Math.cos(b),v=e+r*Math.sin(b);c.push({x:-y,y:-v})}return c}A(Vi,"generateCirclePoints");async function tL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,f=o.width+(e.look==="neo"?h*2:h),p=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:b}=e,y=[...Vi(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...Vi(f/2+g*2,-g,g,20,-180,-270),...Vi(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...Vi(f/2,p/2,g,20,0,90)],v=[...Vi(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...Vi(-f/2-g/2,-g,g,20,0,90),...Vi(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...Vi(-f/2+g+g/2,p/2,g,30,-180,-270)],C=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...Vi(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...Vi(f/2+g*2,-g,g,20,-180,-270),...Vi(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...Vi(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2-g-g/2,y:p/2+g},...Vi(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...Vi(-f/2-g/2,-g,g,20,0,90),...Vi(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...Vi(-f/2+g+g/2,p/2,g,30,-180,-270)],_=Dt.svg(a),w=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=ve(y).replace("Z",""),E=_.path(B,w),O=ve(v).replace("Z",""),M=_.path(O,w),j=ve(C),G=_.path(j,{...w}),$=a.insert("g",":first-child");return $.insert(()=>G,":first-child").attr("stroke-opacity",0),$.insert(()=>E,":first-child"),$.insert(()=>M,":first-child"),$.attr("class","text"),b&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),It(e,$),e.intersect=function(z){return jt.polygon(e,C,z)},a}A(tL,"curlyBraces");async function eL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=20,u=5,{shapeSvg:f,bbox:p}=await Jt(i,e,Qt(e)),g=Math.max(h,(p.width+o*2)*1.25,(e==null?void 0:e.width)??0),b=Math.max(u,p.height+c*2,(e==null?void 0:e.height)??0),y=b/2,{cssStyles:v}=e,C=Dt.svg(f),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=g,T=b,B=w-y,E=T/4,N=[{x:B,y:0},{x:E,y:0},{x:0,y:T/2},{x:E,y:T},{x:B,y:T},...Cf(-B,-T/2,y,50,270,90)],O=ve(N),M=C.path(O,_),j=f.insert(()=>M,":first-child");return j.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&j.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&j.selectChildren("path").attr("style",n),j.attr("transform",`translate(${-g/2}, ${-b/2})`),It(e,j),e.intersect=function(G){return jt.polygon(e,N,G)},f}A(eL,"curvedTrapezoid");var lW=A((i,e,r,n,a,o)=>[`M${i},${e+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),cW=A((i,e,r,n,a,o)=>[`M${i},${e+o}`,`M${i+r},${e+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),hW=A((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),HS=8,US=8;async function iL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?24:a,c=e.look==="neo"?24:a;if(e.width||e.height){const _=e.width??0;e.width=(e.width??0)-c,e.width<US&&(e.width=US);const T=_/2/(2.5+_/50);e.height=(e.height??0)-o-T*3,e.height<HS&&(e.height=HS)}const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=(e.width?e.width:u.width)+c,g=p/2,b=g/(2.5+p/50),y=(e.height?e.height:u.height)+o+b;let v;const{cssStyles:C}=e;if(e.look==="handDrawn"){const _=Dt.svg(h),w=cW(0,0,p,y,g,b),T=hW(0,b,p,y,g,b),B=Ft(e,{}),E=_.path(w,B),N=_.path(T,Ft(e,{fill:"none"}));v=h.insert(()=>N,":first-child"),v=h.insert(()=>E,":first-child"),v.attr("class","basic label-container"),C&&v.attr("style",C)}else{const _=lW(0,0,p,y,g,b);v=h.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",$i(C)).attr("style",n)}return v.attr("label-offset-y",b),v.attr("transform",`translate(${-p/2}, ${-(y/2+b)})`),It(e,v),f.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(_){const w=jt.rect(e,_),T=w.x-(e.x??0);if(g!=0&&(Math.abs(T)<(e.width??0)/2||Math.abs(T)==(e.width??0)/2&&Math.abs(w.y-(e.y??0))>(e.height??0)/2-b)){let B=b*b*(1-T*T/(g*g));B>0&&(B=Math.sqrt(B)),B=b-B,_.y-(e.y??0)>0&&(B=-B),w.y+=B}return w},h}A(iL,"cylinder");async function rL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=h.width+a,p=h.height+o,g=p*.2,b=-f/2,y=-p/2-g/2,{cssStyles:v}=e,C=Dt.svg(c),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x:b,y:y+g},{x:-b,y:y+g},{x:-b,y:-y},{x:b,y:-y},{x:b,y},{x:-b,y},{x:-b,y:y+g}],T=C.polygon(w.map(E=>[E.x,E.y]),_),B=c.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),u.attr("transform",`translate(${b+(e.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(e.padding??0)/2-(h.y-(h.top??0))})`),It(e,B),e.intersect=function(E){return jt.rect(e,E)},c}A(rL,"dividedRectangle");async function nL(i,e){var y,v;const{labelStyles:r,nodeStyles:n}=$t(e),a=e.look==="neo"?12:5;e.labelStyle=r;const o=e.padding??0,c=e.look==="neo"?16:o,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.width?(e==null?void 0:e.width)/2:u.width/2)+(c??0),p=f-a;let g;const{cssStyles:b}=e;if(e.look==="handDrawn"){const C=Dt.svg(h),_=Ft(e,{roughness:.2,strokeWidth:2.5}),w=Ft(e,{roughness:.2,strokeWidth:1.5}),T=C.circle(0,0,f*2,_),B=C.circle(0,0,p*2,w);g=h.insert("g",":first-child"),g.attr("class",$i(e.cssClasses)).attr("style",$i(b)),(y=g.node())==null||y.appendChild(T),(v=g.node())==null||v.appendChild(B)}else{g=h.insert("g",":first-child");const C=g.insert("circle",":first-child"),_=g.insert("circle");g.attr("class","basic label-container").attr("style",n),C.attr("class","outer-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0),_.attr("class","inner-circle").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0)}return It(e,g),e.intersect=function(C){return _t.info("DoubleCircle intersect",e,f,C),jt.circle(e,f,C)},h}A(nL,"doublecircle");function aL(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=$t(e);e.label="",e.labelStyle=n;const o=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,u=Dt.svg(o),{nodeBorder:f}=r,p=Ft(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(p.roughness=0);const g=u.circle(0,0,c*2,p),b=o.insert(()=>g,":first-child");return b.selectAll("path").attr("style",`fill: ${f} !important;`),h&&h.length>0&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",h),a&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",a),It(e,b),e.intersect=function(y){return _t.info("filledCircle intersect",e,{radius:c,point:y}),jt.circle(e,c,y)},o}A(aL,"filledCircle");var WS=10,GS=10;async function sL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.height=(e==null?void 0:e.height)??0,e.height<WS&&(e.height=WS),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<GS&&(e.width=GS));const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+(o??0),p=e!=null&&e.height?e==null?void 0:e.height:f+h.height,g=p,b=[{x:0,y:-p},{x:g,y:-p},{x:g/2,y:0}],{cssStyles:y}=e,v=Dt.svg(c),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=ve(b),w=v.path(_,C),T=c.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),e.width=f,e.height=p,It(e,T),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(B){return _t.info("Triangle intersect",e,b,B),jt.polygon(e,b,B)},c}A(sL,"flippedTriangle");function oL(i,e,{dir:r,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=$t(e);e.label="";const c=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:h}=e;let u=Math.max(70,(e==null?void 0:e.width)??0),f=Math.max(10,(e==null?void 0:e.height)??0);r==="LR"&&(u=Math.max(10,(e==null?void 0:e.width)??0),f=Math.max(70,(e==null?void 0:e.height)??0));const p=-1*u/2,g=-1*f/2,b=Dt.svg(c),y=Ft(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=b.rectangle(p,g,u,f,y),C=c.insert(()=>v,":first-child");h&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",h),o&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",o),It(e,C);const _=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=_/2||0,e.height+=_/2||0),e.intersect=function(w){return jt.rect(e,w)},c}A(oL,"forkJoin");async function lL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=15,o=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.height=((e==null?void 0:e.height)??0)-h*2,e.height<o&&(e.height=o),e.width=((e==null?void 0:e.width)??0)-c*2,e.width<a&&(e.width=a));const{shapeSvg:u,bbox:f}=await Jt(i,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:Math.max(a,f.width))+c*2,g=(e!=null&&e.height?e==null?void 0:e.height:Math.max(o,f.height))+h*2,b=g/2,{cssStyles:y}=e,v=Dt.svg(u),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-p/2,y:-g/2},{x:p/2-b,y:-g/2},...Cf(-p/2+b,0,b,50,90,270),{x:p/2-b,y:g/2},{x:-p/2,y:g/2}],w=ve(_),T=v.path(w,C),B=u.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",n),It(e,B),e.intersect=function(E){return _t.info("Pill intersect",e,{radius:b,point:E}),jt.polygon(e,_,E)},u}A(lL,"halfRoundedRectangle");var uW=A((i,e,r,n,a)=>[`M${i+a},${e}`,`L${i+r-a},${e}`,`L${i+r},${e-n/2}`,`L${i+r-a},${e-n}`,`L${i+a},${e-n}`,`L${i},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function cL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e),a=e.look==="neo"?3.5:4;e.labelStyle=r;const o=e.padding??0,c=70,h=32,u=e.look==="neo"?c:o,f=e.look==="neo"?h:o;if(e.width||e.height){const B=(e.height??0)/a;e.width=((e==null?void 0:e.width)??0)-2*B-f,e.height=(e.height??0)-u}const{shapeSvg:p,bbox:g}=await Jt(i,e,Qt(e)),b=(e!=null&&e.height?e==null?void 0:e.height:g.height)+u,y=b/a,v=(e!=null&&e.width?e==null?void 0:e.width:g.width)+2*y+f,C=[{x:y,y:0},{x:v-y,y:0},{x:v,y:-b/2},{x:v-y,y:-b},{x:y,y:-b},{x:0,y:-b/2}];let _;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=Dt.svg(p),B=Ft(e,{}),E=uW(0,0,v,b,y),N=T.path(E,B);_=p.insert(()=>N,":first-child").attr("transform",`translate(${-v/2}, ${b/2})`),w&&_.attr("style",w)}else _=bs(p,v,b,C);return n&&_.attr("style",n),e.width=v,e.height=b,It(e,_),e.intersect=function(T){return jt.polygon(e,C,T)},p}A(cL,"hexagon");async function hL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await Jt(i,e,Qt(e)),o=Math.max(30,(e==null?void 0:e.width)??0),c=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:h}=e,u=Dt.svg(a),f=Ft(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:0,y:0},{x:o,y:0},{x:0,y:c},{x:o,y:c}],g=ve(p),b=u.path(g,f),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(${-o/2}, ${-c/2})`),It(e,y),e.intersect=function(v){return _t.info("Pill intersect",e,{points:p}),jt.polygon(e,p,v)},a}A(hL,"hourglass");async function uL(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=$t(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,label:g}=await Jt(i,e,"icon-shape default"),b=e.pos==="t",y=h,v=h,{nodeBorder:C}=r,{stylesMap:_}=xh(e),w=-v/2,T=-y/2,B=e.label?8:0,E=Dt.svg(f),N=Ft(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const O=E.rectangle(w,T,v,y,N),M=Math.max(v,p.width),j=y+p.height+B,G=E.rectangle(-M/2,-j/2,M,j,{...N,fill:"transparent",stroke:"none"}),$=f.insert(()=>O,":first-child"),z=f.insert(()=>G);if(e.icon){const K=f.append("g");K.html(`<g>${await zf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const W=K.node().getBBox(),D=W.width,U=W.height,R=W.x,I=W.y;K.attr("transform",`translate(${-D/2-R},${b?p.height/2+B/2-U/2-I:-p.height/2-B/2-U/2-I})`),K.attr("style",`color: ${_.get("stroke")??C};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${b?-j/2:j/2-p.height})`),$.attr("transform",`translate(0,${b?p.height/2+B/2:-p.height/2-B/2})`),It(e,z),e.intersect=function(K){if(_t.info("iconSquare intersect",e,K),!e.label)return jt.rect(e,K);const W=e.x??0,D=e.y??0,U=e.height??0;let R=[];return b?R=[{x:W-p.width/2,y:D-U/2},{x:W+p.width/2,y:D-U/2},{x:W+p.width/2,y:D-U/2+p.height+B},{x:W+v/2,y:D-U/2+p.height+B},{x:W+v/2,y:D+U/2},{x:W-v/2,y:D+U/2},{x:W-v/2,y:D-U/2+p.height+B},{x:W-p.width/2,y:D-U/2+p.height+B}]:R=[{x:W-v/2,y:D-U/2},{x:W+v/2,y:D-U/2},{x:W+v/2,y:D-U/2+y},{x:W+p.width/2,y:D-U/2+y},{x:W+p.width/2/2,y:D+U/2},{x:W-p.width/2,y:D+U/2},{x:W-p.width/2,y:D-U/2+y},{x:W-v/2,y:D-U/2+y}],jt.polygon(e,R,K)},f}A(uL,"icon");async function fL(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=$t(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,label:g}=await Jt(i,e,"icon-shape default"),b=20,y=e.label?8:0,v=e.pos==="t",{nodeBorder:C,mainBkg:_}=r,{stylesMap:w}=xh(e),T=Dt.svg(f),B=Ft(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const E=w.get("fill");B.stroke=E??_;const N=f.append("g");e.icon&&N.html(`<g>${await zf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const O=N.node().getBBox(),M=O.width,j=O.height,G=O.x,$=O.y,z=Math.max(M,j)*Math.SQRT2+b*2,K=T.circle(0,0,z,B),W=Math.max(z,p.width),D=z+p.height+y,U=T.rectangle(-W/2,-D/2,W,D,{...B,fill:"transparent",stroke:"none"}),R=f.insert(()=>K,":first-child"),I=f.insert(()=>U);return N.attr("transform",`translate(${-M/2-G},${v?p.height/2+y/2-j/2-$:-p.height/2-y/2-j/2-$})`),N.attr("style",`color: ${w.get("stroke")??C};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${v?-D/2:D/2-p.height})`),R.attr("transform",`translate(0,${v?p.height/2+y/2:-p.height/2-y/2})`),It(e,I),e.intersect=function(P){return _t.info("iconSquare intersect",e,P),jt.rect(e,P)},f}A(fL,"iconCircle");async function dL(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=$t(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:b}=await Jt(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:w}=r,{stylesMap:T}=xh(e),B=-C/2,E=-v/2,N=e.label?8:0,O=Dt.svg(f),M=Ft(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const j=T.get("fill");M.stroke=j??w;const G=O.path(Ao(B,E,C,v,5),M),$=Math.max(C,p.width),z=v+p.height+N,K=O.rectangle(-$/2,-z/2,$,z,{...M,fill:"transparent",stroke:"none"}),W=f.insert(()=>G,":first-child").attr("class","icon-shape2"),D=f.insert(()=>K);if(e.icon){const U=f.append("g");U.html(`<g>${await zf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const R=U.node().getBBox(),I=R.width,P=R.height,V=R.x,J=R.y;U.attr("transform",`translate(${-I/2-V},${y?p.height/2+N/2-P/2-J:-p.height/2-N/2-P/2-J})`),U.attr("style",`color: ${T.get("stroke")??_};`)}return b.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-z/2:z/2-p.height})`),W.attr("transform",`translate(0,${y?p.height/2+N/2:-p.height/2-N/2})`),It(e,D),e.intersect=function(U){if(_t.info("iconSquare intersect",e,U),!e.label)return jt.rect(e,U);const R=e.x??0,I=e.y??0,P=e.height??0;let V=[];return y?V=[{x:R-p.width/2,y:I-P/2},{x:R+p.width/2,y:I-P/2},{x:R+p.width/2,y:I-P/2+p.height+N},{x:R+C/2,y:I-P/2+p.height+N},{x:R+C/2,y:I+P/2},{x:R-C/2,y:I+P/2},{x:R-C/2,y:I-P/2+p.height+N},{x:R-p.width/2,y:I-P/2+p.height+N}]:V=[{x:R-C/2,y:I-P/2},{x:R+C/2,y:I-P/2},{x:R+C/2,y:I-P/2+v},{x:R+p.width/2,y:I-P/2+v},{x:R+p.width/2/2,y:I+P/2},{x:R-p.width/2,y:I+P/2},{x:R-p.width/2,y:I-P/2+v},{x:R-C/2,y:I-P/2+v}],jt.polygon(e,V,U)},f}A(dL,"iconRounded");async function pL(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=$t(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:b}=await Jt(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:w}=r,{stylesMap:T}=xh(e),B=-C/2,E=-v/2,N=e.label?8:0,O=Dt.svg(f),M=Ft(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const j=T.get("fill");M.stroke=j??w;const G=O.path(Ao(B,E,C,v,.1),M),$=Math.max(C,p.width),z=v+p.height+N,K=O.rectangle(-$/2,-z/2,$,z,{...M,fill:"transparent",stroke:"none"}),W=f.insert(()=>G,":first-child"),D=f.insert(()=>K);if(e.icon){const U=f.append("g");U.html(`<g>${await zf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const R=U.node().getBBox(),I=R.width,P=R.height,V=R.x,J=R.y;U.attr("transform",`translate(${-I/2-V},${y?p.height/2+N/2-P/2-J:-p.height/2-N/2-P/2-J})`),U.attr("style",`color: ${T.get("stroke")??_};`)}return b.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-z/2:z/2-p.height})`),W.attr("transform",`translate(0,${y?p.height/2+N/2:-p.height/2-N/2})`),It(e,D),e.intersect=function(U){if(_t.info("iconSquare intersect",e,U),!e.label)return jt.rect(e,U);const R=e.x??0,I=e.y??0,P=e.height??0;let V=[];return y?V=[{x:R-p.width/2,y:I-P/2},{x:R+p.width/2,y:I-P/2},{x:R+p.width/2,y:I-P/2+p.height+N},{x:R+C/2,y:I-P/2+p.height+N},{x:R+C/2,y:I+P/2},{x:R-C/2,y:I+P/2},{x:R-C/2,y:I-P/2+p.height+N},{x:R-p.width/2,y:I-P/2+p.height+N}]:V=[{x:R-C/2,y:I-P/2},{x:R+C/2,y:I-P/2},{x:R+C/2,y:I-P/2+v},{x:R+p.width/2,y:I-P/2+v},{x:R+p.width/2/2,y:I+P/2},{x:R-p.width/2,y:I+P/2},{x:R-p.width/2,y:I-P/2+v},{x:R-C/2,y:I-P/2+v}],jt.polygon(e,V,U)},f}A(pL,"iconSquare");async function gL(i,e,{config:{flowchart:r}}){const n=new Image;n.src=(e==null?void 0:e.img)??"",await n.decode();const a=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:c}=$t(e);e.labelStyle=c;const h=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const u=Math.max(e.label?h??0:0,(e==null?void 0:e.assetWidth)??a),f=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:u,p=e.constraint==="on"?f/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??o;e.width=Math.max(f,h??0);const{shapeSvg:g,bbox:b,label:y}=await Jt(i,e,"image-shape default"),v=e.pos==="t",C=-f/2,_=-p/2,w=e.label?8:0,T=Dt.svg(g),B=Ft(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const E=T.rectangle(C,_,f,p,B),N=Math.max(f,b.width),O=p+b.height+w,M=T.rectangle(-N/2,-O/2,N,O,{...B,fill:"none",stroke:"none"}),j=g.insert(()=>E,":first-child"),G=g.insert(()=>M);if(e.img){const $=g.append("image");$.attr("href",e.img),$.attr("width",f),$.attr("height",p),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-f/2},${v?O/2-p:-O/2})`)}return y.attr("transform",`translate(${-b.width/2-(b.x-(b.left??0))},${v?-p/2-b.height/2-w/2:p/2-b.height/2+w/2})`),j.attr("transform",`translate(0,${v?b.height/2+w/2:-b.height/2-w/2})`),It(e,G),e.intersect=function($){if(_t.info("iconSquare intersect",e,$),!e.label)return jt.rect(e,$);const z=e.x??0,K=e.y??0,W=e.height??0;let D=[];return v?D=[{x:z-b.width/2,y:K-W/2},{x:z+b.width/2,y:K-W/2},{x:z+b.width/2,y:K-W/2+b.height+w},{x:z+f/2,y:K-W/2+b.height+w},{x:z+f/2,y:K+W/2},{x:z-f/2,y:K+W/2},{x:z-f/2,y:K-W/2+b.height+w},{x:z-b.width/2,y:K-W/2+b.height+w}]:D=[{x:z-f/2,y:K-W/2},{x:z+f/2,y:K-W/2},{x:z+f/2,y:K-W/2+p},{x:z+b.width/2,y:K-W/2+p},{x:z+b.width/2/2,y:K+W/2},{x:z-b.width/2,y:K+W/2},{x:z-b.width/2,y:K-W/2+p},{x:z-f/2,y:K-W/2+p}],jt.polygon(e,D,$)},g}A(gL,"imageSquare");async function mL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=Math.max(u.width+(c??0)*2,(e==null?void 0:e.width)??0),p=Math.max(u.height+(o??0)*2,(e==null?void 0:e.height)??0),g=[{x:0,y:0},{x:f,y:0},{x:f+3*p/6,y:-p},{x:-3*p/6,y:-p}];let b;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=Dt.svg(h),C=Ft(e,{}),_=ve(g),w=v.path(_,C);b=h.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),y&&b.attr("style",y)}else b=bs(h,f,p,g);return n&&b.attr("style",n),e.width=f,e.height=p,It(e,b),e.intersect=function(v){return jt.polygon(e,g,v)},h}A(mL,"inv_trapezoid");async function qf(i,e,r){const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n;const{shapeSvg:o,bbox:c}=await Jt(i,e,Qt(e)),h=Math.max(c.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(c.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),f=-h/2,p=-u/2;let g,{rx:b,ry:y}=e;const{cssStyles:v}=e;if(r!=null&&r.rx&&r.ry&&(b=r.rx,y=r.ry),e.look==="handDrawn"){const C=Dt.svg(o),_=Ft(e,{}),w=b||y?C.path(Ao(f,p,h,u,b||0),_):C.rectangle(f,p,h,u,_);g=o.insert(()=>w,":first-child"),g.attr("class","basic label-container").attr("style",$i(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",$i(b)).attr("ry",$i(y)).attr("x",f).attr("y",p).attr("width",h).attr("height",u);return It(e,g),e.calcIntersect=function(C,_){return jt.rect(C,_)},e.intersect=function(C){return jt.rect(e,C)},o}A(qf,"drawRect");async function yL(i,e){const{shapeSvg:r,bbox:n,label:a}=await Jt(i,e,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),It(e,o),e.intersect=function(u){return jt.rect(e,u)},r}A(yL,"labelRect");async function xL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:0,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:-(3*f)/6,y:-f}];let b;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=Dt.svg(h),C=Ft(e,{}),_=ve(g),w=v.path(_,C);b=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&b.attr("style",y)}else b=bs(h,p,f,g);return n&&b.attr("style",n),e.width=p,e.height=f,It(e,b),e.intersect=function(v){return jt.polygon(e,g,v)},h}A(xL,"lean_left");async function bL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*f/6,y:0},{x:p,y:0},{x:p+3*f/6,y:-f},{x:0,y:-f}];let b;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=Dt.svg(h),C=Ft(e,{}),_=ve(g),w=v.path(_,C);b=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&b.attr("style",y)}else b=bs(h,p,f,g);return n&&b.attr("style",n),e.width=p,e.height=f,It(e,b),e.intersect=function(v){return jt.polygon(e,g,v)},h}A(bL,"lean_right");function vL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.label="",e.labelStyle=r;const a=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=Math.max(35,(e==null?void 0:e.width)??0),h=Math.max(35,(e==null?void 0:e.height)??0),u=7,f=[{x:c,y:0},{x:0,y:h+u/2},{x:c-2*u,y:h+u/2},{x:0,y:2*h},{x:c,y:h-u/2},{x:2*u,y:h-u/2}],p=Dt.svg(a),g=Ft(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ve(f),y=p.path(b,g),v=a.insert(()=>y,":first-child");return v.attr("class","outer-path"),o&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",o),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(-${c/2},${-h})`),It(e,v),e.intersect=function(C){return _t.info("lightningBolt intersect",e,C),jt.polygon(e,f,C)},a}A(vL,"lightningBolt");var fW=A((i,e,r,n,a,o,c)=>[`M${i},${e+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${i},${e+o+c}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),dW=A((i,e,r,n,a,o,c)=>[`M${i},${e+o}`,`M${i+r},${e+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${i},${e+o+c}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),pW=A((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),YS=10,VS=10;async function CL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?24:a;if(e.width||e.height){const w=e.width??0;e.width=(e.width??0)-o,e.width<VS&&(e.width=VS);const B=w/2/(2.5+w/50);e.height=(e.height??0)-c-B*3,e.height<YS&&(e.height=YS)}const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=p/2,b=g/(2.5+p/50),y=(e!=null&&e.height?e==null?void 0:e.height:u.height)+b+c*2,v=y*.1;let C;const{cssStyles:_}=e;if(e.look==="handDrawn"){const w=Dt.svg(h),T=dW(0,0,p,y,g,b,v),B=pW(0,b,p,y,g,b),E=Ft(e,{}),N=w.path(T,E),O=w.path(B,E);h.insert(()=>O,":first-child").attr("class","line"),C=h.insert(()=>N,":first-child"),C.attr("class","basic label-container"),_&&C.attr("style",_)}else{const w=fW(0,0,p,y,g,b,v);C=h.insert("path",":first-child").attr("d",w).attr("class","basic label-container outer-path").attr("style",$i(_)).attr("style",n)}return C.attr("label-offset-y",b),C.attr("transform",`translate(${-p/2}, ${-(y/2+b)})`),It(e,C),f.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+b-(u.y-(u.top??0))})`),e.intersect=function(w){const T=jt.rect(e,w),B=T.x-(e.x??0);if(g!=0&&(Math.abs(B)<(e.width??0)/2||Math.abs(B)==(e.width??0)/2&&Math.abs(T.y-(e.y??0))>(e.height??0)/2-b)){let E=b*b*(1-B*B/(g*g));E>0&&(E=Math.sqrt(E)),E=b-E,w.y-(e.y??0)>0&&(E=-E),T.y+=E}return T},h}A(CL,"linedCylinder");async function kL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;if(e.width||e.height){const E=e.width;e.width=(E??0)*10/11-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+(o??0)*2,g=(e!=null&&e.height?e==null?void 0:e.height:u.height)+(c??0)*2,b=e.look==="neo"?g/4:g/8,y=g+b,{cssStyles:v}=e,C=Dt.svg(h),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x:-p/2-p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:y/2},...To(-p/2-p/2*.1,y/2,p/2+p/2*.1,y/2,b,.8),{x:p/2+p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:-y/2},{x:-p/2,y:-y/2},{x:-p/2,y:y/2*1.1},{x:-p/2,y:-y/2}],T=C.polygon(w.map(E=>[E.x,E.y]),_),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(0,${-b/2})`),f.attr("transform",`translate(${-p/2+(e.padding??0)+p/2*.1/2-(u.x-(u.left??0))},${-g/2+(e.padding??0)-b/2-(u.y-(u.top??0))})`),It(e,B),e.intersect=function(E){return jt.polygon(e,w,E)},h}A(kL,"linedWaveEdgedRect");async function _L(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=e.look==="neo"?10:5;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-2*h,10),e.height=Math.max(((e==null?void 0:e.height)??0)-c*2-2*h,10));const{shapeSvg:u,bbox:f,label:p}=await Jt(i,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2+2*h,b=(e!=null&&e.height?e==null?void 0:e.height:f.height)+c*2+2*h,y=g-2*h,v=b-2*h,C=-y/2,_=-v/2,{cssStyles:w}=e,T=Dt.svg(u),B=Ft(e,{}),E=[{x:C-h,y:_+h},{x:C-h,y:_+v+h},{x:C+y-h,y:_+v+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_+v-h},{x:C+y+h,y:_+v-h},{x:C+y+h,y:_-h},{x:C+h,y:_-h},{x:C+h,y:_},{x:C,y:_},{x:C,y:_+h}],N=[{x:C,y:_+h},{x:C+y-h,y:_+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_},{x:C,y:_}];e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=ve(E);let M=T.path(O,B);const j=ve(N);let G=T.path(j,B);e.look!=="handDrawn"&&(M=Db(M),G=Db(G));const $=u.insert("g",":first-child");return $.insert(()=>M),$.insert(()=>G),$.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),p.attr("transform",`translate(${-(f.width/2)-h-(f.x-(f.left??0))}, ${-(f.height/2)+h-(f.y-(f.top??0))})`),It(e,$),e.intersect=function(z){return jt.polygon(e,E,z)},u}A(_L,"multiRect");async function wL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=e.padding??0,u=e.look==="neo"?16:h,f=e.look==="neo"?12:h;let p=!0;(e.width||e.height)&&(p=!1,e.width=((e==null?void 0:e.width)??0)-u*2,e.height=((e==null?void 0:e.height)??0)-f*3);const g=Math.max(o.width,(e==null?void 0:e.width)??0)+u*2,b=Math.max(o.height,(e==null?void 0:e.height)??0)+f*3,y=e.look==="neo"?b/4:b/8,v=b+(p?y/2:-y/2),C=-g/2,_=-v/2,w=10,{cssStyles:T}=e,B=To(C-w,_+v+w,C+g-w,_+v+w,y,.8),E=B==null?void 0:B[B.length-1],N=[{x:C-w,y:_+w},{x:C-w,y:_+v+w},...B,{x:C+g-w,y:E.y-w},{x:C+g,y:E.y-w},{x:C+g,y:E.y-2*w},{x:C+g+w,y:E.y-2*w},{x:C+g+w,y:_-w},{x:C+w,y:_-w},{x:C+w,y:_},{x:C,y:_},{x:C,y:_+w}],O=[{x:C,y:_+w},{x:C+g-w,y:_+w},{x:C+g-w,y:E.y-w},{x:C+g,y:E.y-w},{x:C+g,y:_},{x:C,y:_}],M=Dt.svg(a),j=Ft(e,{});e.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");const G=ve(N),$=M.path(G,j),z=ve(O),K=M.path(z,j),W=a.insert(()=>$,":first-child");return W.insert(()=>K),W.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&W.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&W.selectAll("path").attr("style",n),W.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-(o.width/2)-w-(o.x-(o.left??0))}, ${-(o.height/2)+w-y/2-(o.y-(o.top??0))})`),It(e,W),e.intersect=function(D){return jt.polygon(e,N,D)},a}A(wL,"multiWaveEdgedRectangle");async function SL(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n,e.useHtmlLabels||vr(si())||(e.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=Math.max(h.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),p=Math.max(h.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),g=-f/2,b=-p/2,{cssStyles:y}=e,v=Dt.svg(c),C=Ft(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=v.rectangle(g,b,f,p,C),w=c.insert(()=>_,":first-child");return w.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),y&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",y),a&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",a),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),It(e,w),e.intersect=function(T){return jt.rect(e,T)},c}A(SL,"note");var gW=A((i,e,r)=>[`M${i+r/2},${e}`,`L${i+r},${e-r/2}`,`L${i+r/2},${e-r}`,`L${i},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function TL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await Jt(i,e,Qt(e)),c=o.width+(e.padding??0),h=o.height+(e.padding??0),u=c+h,f=.5,p=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let g;const{cssStyles:b}=e;if(e.look==="handDrawn"){const y=Dt.svg(a),v=Ft(e,{}),C=gW(0,0,u),_=y.path(C,v);g=a.insert(()=>_,":first-child").attr("transform",`translate(${-u/2+f}, ${u/2})`),b&&g.attr("style",b)}else g=bs(a,u,u,p),g.attr("transform",`translate(${-u/2+f}, ${u/2})`);return n&&g.attr("style",n),It(e,g),e.calcIntersect=function(y,v){const C=y.width,_=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],w=jt.polygon(y,_,v);return{x:w.x-.5,y:w.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a}A(TL,"question");async function BL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?21:a??0,c=e.look==="neo"?12:a??0,{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o),g=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),b=-p/2,y=-g/2,v=y/2,C=[{x:b+v,y},{x:b,y:0},{x:b+v,y:-y},{x:-b,y:-y},{x:-b,y}],{cssStyles:_}=e,w=Dt.svg(h),T=Ft(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=ve(C),E=w.path(B,T),N=h.insert(()=>E,":first-child");return N.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(${-v/2},0)`),f.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),It(e,N),e.intersect=function(O){return jt.polygon(e,C,O)},h}A(BL,"rect_left_inv_arrow");async function AL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";const o=i.insert("g").attr("class",a).attr("id",e.domId||e.id),c=o.insert("g"),h=o.insert("g").attr("class","label").attr("style",n),u=e.description,f=e.label,p=await yo(h,f,e.labelStyle,!0,!0);let g={width:0,height:0};if(vr(Ae())){const j=p.children[0],G=Xt(p);g=j.getBoundingClientRect(),G.attr("width",g.width),G.attr("height",g.height)}_t.info("Text 2",u);const b=u||[],y=p.getBBox(),v=await yo(h,Array.isArray(b)?b.join("<br/>"):b,e.labelStyle,!0,!0),C=v.children[0],_=Xt(v);g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height);const w=(e.padding||0)/2;Xt(v).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+w+5)+")"),Xt(p).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-w+3)+")");const T=g.width+(e.padding||0),B=g.height+(e.padding||0),E=-g.width/2-w,N=-g.height/2-w;let O,M;if(e.look==="handDrawn"){const j=Dt.svg(o),G=Ft(e,{}),$=j.path(Ao(E,N,T,B,e.rx||0),G),z=j.line(-g.width/2-w,-g.height/2-w+y.height+w,g.width/2+w,-g.height/2-w+y.height+w,G);M=o.insert(()=>(_t.debug("Rough node insert CXC",$),z),":first-child"),O=o.insert(()=>(_t.debug("Rough node insert CXC",$),$),":first-child")}else O=c.insert("rect",":first-child"),M=c.insert("line"),O.attr("class","outer title-state").attr("style",n).attr("x",-g.width/2-w).attr("y",-g.height/2-w).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),M.attr("class","divider").attr("x1",-g.width/2-w).attr("x2",g.width/2+w).attr("y1",-g.height/2-w+y.height+w).attr("y2",-g.height/2-w+y.height+w);return It(e,O),e.intersect=function(j){return jt.rect(e,j)},o}A(AL,"rectWithTitle");async function EL(i,e,{config:{themeVariables:r}}){const n=(r==null?void 0:r.radius)??5,a={rx:n,ry:n,labelPaddingX:((e==null?void 0:e.padding)??0)*1,labelPaddingY:((e==null?void 0:e.padding)??0)*1};return qf(i,e,a)}A(EL,"roundedRect");var Xo=8;async function ML(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.width)??h.width)+a*2+(e.look==="neo"?Xo:Xo*2),p=((e==null?void 0:e.height)??h.height)+o*2,g=f-Xo,b=p,y=Xo-f/2,v=-p/2,{cssStyles:C}=e,_=Dt.svg(c),w=Ft(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=[{x:y,y:v},{x:y+g,y:v},{x:y+g,y:v+b},{x:y-Xo,y:v+b},{x:y-Xo,y:v},{x:y,y:v},{x:y,y:v+b}],B=_.polygon(T.map(N=>[N.x,N.y]),w),E=c.insert(()=>B,":first-child");return E.attr("class","basic label-container outer-path").attr("style",$i(C)),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),C&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),u.attr("transform",`translate(${Xo/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),It(e,E),e.intersect=function(N){return jt.rect(e,N)},c}A(ML,"shadedProcess");async function LL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2,10),e.height=Math.max(((e==null?void 0:e.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=((e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2)*1.5,b=p,y=g/1.5,v=-b/2,C=-y/2,{cssStyles:_}=e,w=Dt.svg(h),T=Ft(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=[{x:v,y:C},{x:v,y:C+y},{x:v+b,y:C+y},{x:v+b,y:C-y/2}],E=ve(B),N=w.path(E,T),O=h.insert(()=>N,":first-child");return O.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",_),n&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",n),O.attr("transform",`translate(0, ${y/4})`),f.attr("transform",`translate(${-b/2+(e.padding??0)-(u.x-(u.left??0))}, ${-y/4+(e.padding??0)-(u.y-(u.top??0))})`),It(e,O),e.intersect=function(M){return jt.polygon(e,B,M)},h}A(LL,"slopedRect");async function NL(i,e){const r=e.padding??0,n=e.look==="neo"?16:r*2,a=e.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:e.labelPaddingX??n,labelPaddingY:a};return qf(i,e,o)}A(NL,"squareRect");async function jL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?20:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=u.height+(e.look==="neo"?c*2:c),p=u.width+f/4+(e.look==="neo"?o*2:o),g=f/2,{cssStyles:b}=e,y=Dt.svg(h),v=Ft(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:-p/2+g,y:-f/2},{x:p/2-g,y:-f/2},...Cf(-p/2+g,0,g,50,90,270),{x:p/2-g,y:f/2},...Cf(p/2-g,0,g,50,270,450)],_=ve(C),w=y.path(_,v),T=h.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",b),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),It(e,T),e.intersect=function(B){return jt.polygon(e,C,B)},h}A(jL,"stadium");async function OL(i,e){const r={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return qf(i,e,r)}A(OL,"state");function RL(i,e,{config:{themeVariables:r}}){var T,B;const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n;const{cssStyles:o}=e,{lineColor:c,stateBorder:h,nodeBorder:u,nodeShadow:f}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const p=i.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=Dt.svg(p),b=Ft(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const y=g.circle(0,0,e.width,{...b,stroke:c,strokeWidth:2}),v=h??u,C=(e.width??0)*5/14,_=g.circle(0,0,C,{...b,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),w=p.insert(()=>y,":first-child");if(w.insert(()=>_),e.look!=="handDrawn"&&w.attr("class","outer-path"),o&&w.selectAll("path").attr("style",o),a&&w.selectAll("path").attr("style",a),e.width<25&&f&&e.look!=="handDrawn"){const E=((B=(T=i.node())==null?void 0:T.ownerSVGElement)==null?void 0:B.id)??"",N=E?`${E}-drop-shadow-small`:"drop-shadow-small";w.attr("style",`filter:url(#${N})`)}return It(e,w),e.intersect=function(E){return jt.circle(e,(e.width??0)/2,E)},p}A(RL,"stateEnd");function DL(i,e,{config:{themeVariables:r}}){var h,u;const{lineColor:n,nodeShadow:a}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const o=i.insert("g").attr("class","node default").attr("id",e.domId||e.id);let c;if(e.look==="handDrawn"){const p=Dt.svg(o).circle(0,0,e.width,wH(n));c=o.insert(()=>p),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=o.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&a&&e.look!=="handDrawn"){const f=((u=(h=i.node())==null?void 0:h.ownerSVGElement)==null?void 0:u.id)??"",p=f?`${f}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${p})`)}return It(e,c),e.intersect=function(f){return jt.circle(e,(e.width??7)/2,f)},o}A(DL,"stateStart");var Cc=8;async function FL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=(e==null?void 0:e.padding)??8,o=e.look==="neo"?28:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.width)??u.width)+2*Cc+o,p=((e==null?void 0:e.height)??u.height)+c,g=f-2*Cc,b=p,y=-f/2,v=-p/2,C=[{x:0,y:0},{x:g,y:0},{x:g,y:-b},{x:0,y:-b},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-b},{x:-8,y:-b},{x:-8,y:0}];if(e.look==="handDrawn"){const _=Dt.svg(h),w=Ft(e,{}),T=_.rectangle(y,v,g+16,b,w),B=_.line(y+Cc,v,y+Cc,v+b,w),E=_.line(y+Cc+g,v,y+Cc+g,v+b,w);h.insert(()=>B,":first-child"),h.insert(()=>E,":first-child");const N=h.insert(()=>T,":first-child"),{cssStyles:O}=e;N.attr("class","basic label-container").attr("style",$i(O)),It(e,N)}else{const _=bs(h,g,b,C);n&&_.attr("style",n),It(e,_)}return e.intersect=function(_){return jt.polygon(e,C,_)},h}A(FL,"subroutine");var K0=.2;async function $L(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.height=Math.max(((e==null?void 0:e.height)??0)-c*2,10),e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-K0*(e.height+c*2),10));const{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2,p=K0*f,g=K0*f,y=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2+p-p,v=f,C=-y/2,_=-v/2,{cssStyles:w}=e,T=Dt.svg(h),B=Ft(e,{}),E=[{x:C-p/2,y:_},{x:C+y+p/2,y:_},{x:C+y+p/2,y:_+v},{x:C-p/2,y:_+v}],N=[{x:C+y-p/2,y:_+v},{x:C+y+p/2,y:_+v},{x:C+y+p/2,y:_+v-g}];e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=ve(E),M=T.path(O,B),j=ve(N),G=T.path(j,{...B,fillStyle:"solid"}),$=h.insert(()=>G,":first-child");return $.insert(()=>M,":first-child"),$.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),It(e,$),e.intersect=function(z){return jt.polygon(e,E,z)},h}A($L,"taggedRect");async function zL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),f=u/8,p=.2*h,g=.2*u,b=u+f,{cssStyles:y}=e,v=Dt.svg(a),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-h/2-h/2*.1,y:b/2},...To(-h/2-h/2*.1,b/2,h/2+h/2*.1,b/2,f,.8),{x:h/2+h/2*.1,y:-b/2},{x:-h/2-h/2*.1,y:-b/2}],w=-h/2+h/2*.1,T=-b/2-g*.4,B=[{x:w+h-p,y:(T+u)*1.3},{x:w+h,y:T+u-g},{x:w+h,y:(T+u)*.9},...To(w+h,(T+u)*1.25,w+h-p,(T+u)*1.3,-u*.02,.5)],E=ve(_),N=v.path(E,C),O=ve(B),M=v.path(O,{...C,fillStyle:"solid"}),j=a.insert(()=>M,":first-child");return j.insert(()=>N,":first-child"),j.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),j.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-f/2-(o.y-(o.top??0))})`),It(e,j),e.intersect=function(G){return jt.polygon(e,_,G)},a}A(zL,"taggedWaveEdgedRectangle");async function IL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await Jt(i,e,Qt(e)),c=Math.max(o.width+(e.padding??0),(e==null?void 0:e.width)||0),h=Math.max(o.height+(e.padding??0),(e==null?void 0:e.height)||0),u=-c/2,f=-h/2,p=a.insert("rect",":first-child");return p.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",f).attr("width",c).attr("height",h),It(e,p),e.intersect=function(g){return jt.rect(e,g)},a}A(IL,"text");var mW=A((i,e,r,n,a,o)=>`M${i},${e}
334
+ a${a},${o} 0,0,1 0,${-n}
335
+ l${r},0
336
+ a${a},${o} 0,0,1 0,${n}
337
+ M${r},${-n}
338
+ a${a},${o} 0,0,0 0,${n}
339
+ l${-r},0`,"createCylinderPathD"),yW=A((i,e,r,n,a,o)=>[`M${i},${e}`,`M${i+r},${e}`,`a${a},${o} 0,0,0 0,${-n}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),xW=A((i,e,r,n,a,o)=>[`M${i+r/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),XS=5,QS=10;async function qL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?12:a/2;if(e.width||e.height){const C=e.height??0;e.height=(e.height??0)-o,e.height<XS&&(e.height=XS);const w=C/2/(2.5+C/50);e.width=(e.width??0)-o-w*3,e.width<QS&&(e.width=QS)}const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=(e.height?e.height:h.height)+o,p=f/2,g=p/(2.5+f/50),b=(e.width?e.width:h.width)+g+o,{cssStyles:y}=e;let v;if(e.look==="handDrawn"){const C=Dt.svg(c),_=yW(0,0,b,f,g,p),w=xW(0,0,b,f,g,p),T=C.path(_,Ft(e,{})),B=C.path(w,Ft(e,{fill:"none"}));v=c.insert(()=>B,":first-child"),v=c.insert(()=>T,":first-child"),v.attr("class","basic label-container"),y&&v.attr("style",y)}else{const C=mW(0,0,b,f,g,p);v=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",$i(y)).attr("style",n),v.attr("class","basic label-container outer-path"),y&&v.selectAll("path").attr("style",y),n&&v.selectAll("path").attr("style",n)}return v.attr("label-offset-x",g),v.attr("transform",`translate(${-b/2}, ${f/2} )`),u.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),It(e,v),e.intersect=function(C){const _=jt.rect(e,C),w=_.y-(e.y??0);if(p!=0&&(Math.abs(w)<(e.height??0)/2||Math.abs(w)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-g)){let T=g*g*(1-w*w/(p*p));T!=0&&(T=Math.sqrt(Math.abs(T))),T=g-T,C.x-(e.x??0)>0&&(T=-T),_.x+=T}return _},c}A(qL,"tiltedCylinder");async function PL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=(e.look==="neo",a),c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*f/6,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:0,y:-f}];let b;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=Dt.svg(h),C=Ft(e,{}),_=ve(g),w=v.path(_,C);b=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&b.attr("style",y)}else b=bs(h,p,f,g);return n&&b.attr("style",n),e.width=p,e.height=f,It(e,b),e.intersect=function(v){return jt.polygon(e,g,v)},h}A(PL,"trapezoid");async function HL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=15,u=5;(e.width||e.height)&&(e.height=(e.height??0)-c*2,e.height<u&&(e.height=u),e.width=(e.width??0)-o*2,e.width<h&&(e.width=h));const{shapeSvg:f,bbox:p}=await Jt(i,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:p.width)+o*2,b=(e!=null&&e.height?e==null?void 0:e.height:p.height)+c*2,{cssStyles:y}=e,v=Dt.svg(f),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-g/2*.8,y:-b/2},{x:g/2*.8,y:-b/2},{x:g/2,y:-b/2*.6},{x:g/2,y:b/2},{x:-g/2,y:b/2},{x:-g/2,y:-b/2*.6}],w=ve(_),T=v.path(w,C),B=f.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",n),It(e,B),e.intersect=function(E){return jt.polygon(e,_,E)},f}A(HL,"trapezoidalPentagon");var ZS=10,KS=10;async function UL(i,e){var E;const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.width=(((e==null?void 0:e.width)??0)-o)/2,e.width<KS&&(e.width=KS),e.height=(e==null?void 0:e.height)??0,e.height<ZS&&(e.height=ZS));const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=ms((E=Ae().flowchart)==null?void 0:E.htmlLabels),p=(e!=null&&e.width?e==null?void 0:e.width:h.width)+o,g=e!=null&&e.height?e==null?void 0:e.height:p+h.height,b=g,y=[{x:0,y:0},{x:b,y:0},{x:b/2,y:-g}],{cssStyles:v}=e,C=Dt.svg(c),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=ve(y),T=C.path(w,_),B=c.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",n),e.width=p,e.height=g,It(e,B),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(e.padding??0)/(f?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(N){return _t.info("Triangle intersect",e,y,N),jt.polygon(e,y,N)},c}A(UL,"triangle");async function WL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;let h=!0;(e.width||e.height)&&(h=!1,e.width=((e==null?void 0:e.width)??0)-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10));const{shapeSvg:u,bbox:f,label:p}=await Jt(i,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:f.width)+(o??0)*2,b=(e!=null&&e.height?e==null?void 0:e.height:f.height)+(c??0)*2,y=e.look==="neo"?b/4:b/8,v=b+(h?y:-y),{cssStyles:C}=e,w=14-g,T=w>0?w/2:0,B=Dt.svg(u),E=Ft(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=[{x:-g/2-T,y:v/2},...To(-g/2-T,v/2,g/2+T,v/2,y,.8),{x:g/2+T,y:-v/2},{x:-g/2-T,y:-v/2}],O=ve(N),M=B.path(O,E),j=u.insert(()=>M,":first-child");return j.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),j.attr("transform",`translate(0,${-y/2})`),p.attr("transform",`translate(${-g/2+(e.padding??0)-(f.x-(f.left??0))},${-b/2+(e.padding??0)-y-(f.y-(f.top??0))})`),It(e,j),e.intersect=function(G){return jt.polygon(e,N,G)},u}A(WL,"waveEdgedRectangle");async function GL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?20:a;if(e.width||e.height){e.width=(e==null?void 0:e.width)??0,e.width<20&&(e.width=20),e.height=(e==null?void 0:e.height)??0,e.height<10&&(e.height=10);const E=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-c-E*(20/9)),e.width=e.width-o*2}const{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,p=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c,g=p/8,b=p+g*2,{cssStyles:y}=e,v=Dt.svg(h),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-f/2,y:b/2},...To(-f/2,b/2,f/2,b/2,g,1),{x:f/2,y:-b/2},...To(f/2,-b/2,-f/2,-b/2,g,-1)],w=ve(_),T=v.path(w,C),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),It(e,B),e.intersect=function(E){return jt.polygon(e,_,E)},h}A(GL,"waveRectangle");var hi=10;async function YL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-a*2-hi,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-hi,10));const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+a*2+hi,p=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+hi,g=f-hi,b=p-hi,y=-g/2,v=-b/2,{cssStyles:C}=e,_=Dt.svg(c),w=Ft(e,{}),T=[{x:y-hi,y:v-hi},{x:y-hi,y:v+b},{x:y+g,y:v+b},{x:y+g,y:v-hi}],B=`M${y-hi},${v-hi} L${y+g},${v-hi} L${y+g},${v+b} L${y-hi},${v+b} L${y-hi},${v-hi}
340
+ M${y-hi},${v} L${y+g},${v}
341
+ M${y},${v-hi} L${y},${v+b}`;e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const E=_.path(B,w),N=c.insert(()=>E,":first-child");return N.attr("transform",`translate(${hi/2}, ${hi/2})`),N.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(h.width/2)+hi/2-(h.x-(h.left??0))}, ${-(h.height/2)+hi/2-(h.y-(h.top??0))})`),It(e,N),e.intersect=function(O){return jt.polygon(e,T,O)},c}A(YL,"windowPane");var JS=new Set(["redux-color","redux-dark-color"]),bW=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function O1(i,e){var kt,Lt,at,Ct;const r=e;r.alias&&(e.label=r.alias);const{theme:n,themeVariables:a}=si(),{rowEven:o,rowOdd:c,nodeBorder:h,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:gt}=si(),{background:Bt}=gt,Wt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Bt}`]};await O1(i,Wt)}const f=si();e.useHtmlLabels=f.htmlLabels;let p=((kt=f.er)==null?void 0:kt.diagramPadding)??10,g=((Lt=f.er)==null?void 0:Lt.entityPadding)??6;const{cssStyles:b}=e,{labelStyles:y,nodeStyles:v}=$t(e);if(r.attributes.length===0&&e.label){const gt={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};gs(e.label,f)+gt.labelPaddingX*2<f.er.minEntityWidth&&(e.width=f.er.minEntityWidth);const Bt=await qf(i,e,gt);if(n!=null&&JS.has(n)){const Wt=r.colorIndex??0;Bt.attr("data-color-id",`color-${Wt%u.length}`)}if(!ms(f.htmlLabels)){const Wt=Bt.select("text"),Yt=(at=Wt.node())==null?void 0:at.getBBox();Wt.attr("transform",`translate(${-Yt.width/2}, 0)`)}return Bt}f.htmlLabels||(p*=1.25,g*=1.25);let C=Qt(e);C||(C="node default");const _=i.insert("g").attr("class",C).attr("id",e.domId||e.id),w=await Bc(_,e.label??"",f,0,0,["name"],y);w.height+=g;let T=0;const B=[],E=[];let N=0,O=0,M=0,j=0,G=!0,$=!0;for(const gt of r.attributes){const Bt=await Bc(_,gt.type,f,0,T,["attribute-type"],y);N=Math.max(N,Bt.width+p);const Wt=await Bc(_,gt.name,f,0,T,["attribute-name"],y);O=Math.max(O,Wt.width+p);const Yt=await Bc(_,gt.keys.join(),f,0,T,["attribute-keys"],y);M=Math.max(M,Yt.width+p);const Zt=await Bc(_,gt.comment,f,0,T,["attribute-comment"],y);j=Math.max(j,Zt.width+p);const Et=Math.max(Bt.height,Wt.height,Yt.height,Zt.height)+g;E.push({yOffset:T,rowHeight:Et}),T+=Et}let z=4;M<=p&&(G=!1,M=0,z--),j<=p&&($=!1,j=0,z--);const K=_.node().getBBox();if(w.width+p*2-(N+O+M+j)>0){const gt=w.width+p*2-(N+O+M+j);N+=gt/z,O+=gt/z,M>0&&(M+=gt/z),j>0&&(j+=gt/z)}const W=N+O+M+j,D=Dt.svg(_),U=Ft(e,{});e.look!=="handDrawn"&&(U.roughness=0,U.fillStyle="solid");let R=0;E.length>0&&(R=E.reduce((gt,Bt)=>gt+((Bt==null?void 0:Bt.rowHeight)??0),0));const I=Math.max(K.width+p*2,(e==null?void 0:e.width)||0,W),P=Math.max((R??0)+w.height,(e==null?void 0:e.height)||0),V=-I/2,J=-P/2;if(_.selectAll("g:not(:first-child)").each((gt,Bt,Wt)=>{const Yt=Xt(Wt[Bt]),Zt=Yt.attr("transform");let Et=0,Vt=0;if(Zt){const ni=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Zt);ni&&(Et=parseFloat(ni[1]),Vt=parseFloat(ni[2]),Yt.attr("class").includes("attribute-name")?Et+=N:Yt.attr("class").includes("attribute-keys")?Et+=N+O:Yt.attr("class").includes("attribute-comment")&&(Et+=N+O+M))}Yt.attr("transform",`translate(${V+p/2+Et}, ${Vt+J+w.height+g/2})`)}),_.select(".name").attr("transform","translate("+-w.width/2+", "+(J+g/2)+")"),n!=null&&JS.has(n)){const gt=r.colorIndex??0;_.attr("data-color-id",`color-${gt%u.length}`)}const H=D.rectangle(V,J,I,P,U),tt=_.insert(()=>H,":first-child").attr("class","outer-path").attr("style",b.join(""));B.push(0);for(const[gt,Bt]of E.entries()){const Yt=(gt+1)%2===0&&Bt.yOffset!==0,Zt=D.rectangle(V,w.height+J+(Bt==null?void 0:Bt.yOffset),I,Bt==null?void 0:Bt.rowHeight,{...U,fill:Yt?o:c,stroke:h});_.insert(()=>Zt,"g.label").attr("style",b.join("")).attr("class",`row-rect-${Yt?"even":"odd"}`)}const ot=1e-4;let st=Ac(V,w.height+J,I+V,w.height+J,ot),bt=D.polygon(st.map(gt=>[gt.x,gt.y]),U);if(_.insert(()=>bt).attr("class","divider"),st=Ac(N+V,w.height+J,N+V,P+J,ot),bt=D.polygon(st.map(gt=>[gt.x,gt.y]),U),_.insert(()=>bt).attr("class","divider"),G){const gt=N+O+V;st=Ac(gt,w.height+J,gt,P+J,ot),bt=D.polygon(st.map(Bt=>[Bt.x,Bt.y]),U),_.insert(()=>bt).attr("class","divider")}if($){const gt=N+O+M+V;st=Ac(gt,w.height+J,gt,P+J,ot),bt=D.polygon(st.map(Bt=>[Bt.x,Bt.y]),U),_.insert(()=>bt).attr("class","divider")}for(const gt of B){const Bt=w.height+J+gt;st=Ac(V,Bt,I+V,Bt,ot),bt=D.polygon(st.map(Wt=>[Wt.x,Wt.y]),U),_.insert(()=>bt).attr("class","divider")}if(It(e,tt),v&&e.look!=="handDrawn")if(n!=null&&bW.has(n))_.selectAll("path").attr("style",v);else{const gt=v.split(";"),Bt=(Ct=gt==null?void 0:gt.filter(Wt=>Wt.includes("stroke")))==null?void 0:Ct.map(Wt=>`${Wt}`).join("; ");_.selectAll("path").attr("style",Bt??""),_.selectAll(".row-rect-even path").attr("style",v)}return e.intersect=function(gt){return jt.rect(e,gt)},_}A(O1,"erBox");async function Bc(i,e,r,n=0,a=0,o=[],c=""){const h=i.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${a})`).attr("style",c);e!==Sw(e)&&(e=Sw(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;"));const u=h.node().appendChild(await xs(h,e,{width:gs(e,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let p=u.children[0];for(p.textContent=p.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");p.childNodes[0];)p=p.childNodes[0],p.textContent=p.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let f=u.getBBox();if(ms(r.htmlLabels)){const p=u.children[0];p.style.textAlign="start";const g=Xt(u);f=p.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return f}A(Bc,"addText");function Ac(i,e,r,n,a){return i===r?[{x:i-a/2,y:e},{x:i+a/2,y:e},{x:r+a/2,y:n},{x:r-a/2,y:n}]:[{x:i,y:e-a/2},{x:i,y:e+a/2},{x:r,y:n+a/2},{x:r,y:n-a/2}]}A(Ac,"lineToPolygon");async function VL(i,e,r,n,a=r.class.padding??12){const o=n?0:3,c=i.insert("g").attr("class",Qt(e)).attr("id",e.domId||e.id);let h=null,u=null,f=null,p=null,g=0,b=0,y=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const T=e.annotations[0];await Uu(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await Uu(u,e,0,["font-weight: bolder"]);const v=u.node().getBBox();b=v.height,f=c.insert("g").attr("class","members-group text");let C=0;for(const T of e.members){const B=await Uu(f,T,C,[T.parseClassifier()]);C+=B+o}y=f.node().getBBox().height,y<=0&&(y=a/2),p=c.insert("g").attr("class","methods-group text");let _=0;for(const T of e.methods){const B=await Uu(p,T,_,[T.parseClassifier()]);_+=B+o}let w=c.node().getBBox();if(h!==null){const T=h.node().getBBox();h.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${g})`),w=c.node().getBBox(),f.attr("transform",`translate(0, ${g+b+a*2})`),w=c.node().getBBox(),p.attr("transform",`translate(0, ${g+b+(y?y+a*4:a*2)})`),w=c.node().getBBox(),{shapeSvg:c,bbox:w}}A(VL,"textHelper");async function Uu(i,e,r,n=[]){const a=i.insert("g").attr("class","label").attr("style",n.join("; ")),o=si();let c="useHtmlLabels"in e?e.useHtmlLabels:ms(o.htmlLabels)??!0,h="";"text"in e?h=e.text:h=e.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),cf(h)&&(c=!0);const u=await xs(a,zv(Al(h)),{width:gs(h,o)+50,classes:"markdown-node-label",useHtmlLabels:c},o);let f,p=1;if(c){const g=u.children[0],b=Xt(u);p=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(p+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const v=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(C=>new Promise(_=>{function w(){var T;if(C.style.display="flex",C.style.flexDirection="column",v){const B=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,N=parseInt(B,10)*5+"px";C.style.minWidth=N,C.style.maxWidth=N}else C.style.width="100%";_(C)}A(w,"setupImage"),setTimeout(()=>{C.complete&&w()}),C.addEventListener("error",w),C.addEventListener("load",w)})))}f=g.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}else{n.includes("font-weight: bolder")&&Xt(u).selectAll("tspan").attr("font-weight",""),p=u.children.length;const g=u.children[0];(u.textContent===""||u.textContent.includes("&gt"))&&(g.textContent=h[0]+h.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),h[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),f=u.getBBox()}return a.attr("transform","translate(0,"+(-f.height/(2*p)+r)+")"),f.height}A(Uu,"addText");async function XL(i,e){var D,U;const r=Ae(),{themeVariables:n}=r,{useGradient:a}=n,o=r.class.padding??12,c=o,h=e.useHtmlLabels??ms(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:f,bbox:p}=await VL(i,e,r,h,c),{labelStyles:g,nodeStyles:b}=$t(e);e.labelStyle=g,e.cssStyles=u.styles||"";const y=((D=u.styles)==null?void 0:D.join(";"))||b||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((U=r.class)!=null&&U.hideEmptyMembersBox),C=Dt.svg(f),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=Math.max(e.width??0,p.width);let T=Math.max(e.height??0,p.height);const B=(e.height??0)>p.height;u.members.length===0&&u.methods.length===0?T+=c:u.members.length>0&&u.methods.length===0&&(T+=c*2);const E=-w/2,N=-T/2;let O=v?o*2:u.members.length===0&&u.methods.length===0?-o:0;B&&(O=o*2);const M=C.rectangle(E-o,N-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0),w+2*o,T+2*o+O,_),j=f.insert(()=>M,":first-child");j.attr("class","basic label-container outer-path");const G=j.node().getBBox(),$=f.select(".annotation-group").node().getBBox().height-(v?o/2:0)||0,z=f.select(".label-group").node().getBBox().height-(v?o/2:0)||0,K=f.select(".members-group").node().getBBox().height-(v?o/2:0)||0,W=($+z+N+o-(N-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(f.selectAll(".text").each((R,I,P)=>{var st,bt;const V=Xt(P[I]),J=V.attr("transform");let H=0;if(J){const Lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(J);Lt&&(H=parseFloat(Lt[2]))}let tt=H+N+o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(V.attr("class").includes("methods-group")){const kt=Math.max(K,c/2);B?tt=Math.max(W,$+z+kt+N+c*2+o)+c*2:tt=$+z+kt+N+c*4+o}u.members.length===0&&u.methods.length===0&&((st=r.class)!=null&&st.hideEmptyMembersBox)&&(u.annotations.length>0?tt=H-c:tt=H),h||(tt-=4);let ot=E;(V.attr("class").includes("label-group")||V.attr("class").includes("annotation-group"))&&(ot=-((bt=V.node())==null?void 0:bt.getBBox().width)/2||0,f.selectAll("text").each(function(kt,Lt,at){window.getComputedStyle(at[Lt]).textAnchor==="middle"&&(ot=0)})),V.attr("transform",`translate(${ot}, ${tt})`)}),u.members.length>0||u.methods.length>0||v){const R=$+z+N+o,I=C.line(G.x,R,G.x+G.width,R+.001,_);f.insert(()=>I).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(v||u.members.length>0||u.methods.length>0){const R=$+z+K+N+c*2+o,I=C.line(G.x,B?Math.max(W,R):R,G.x+G.width,(B?Math.max(W,R):R)+.001,_);f.insert(()=>I).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(u.look!=="handDrawn"&&f.selectAll("path").attr("style",y),j.select(":nth-child(2)").attr("style",y),f.selectAll(".divider").select("path").attr("style",y),e.labelStyle?f.selectAll("span").attr("style",e.labelStyle):f.selectAll("span").attr("style",y),!h){const R=RegExp(/color\s*:\s*([^;]*)/),I=R.exec(y);if(I){const P=I[0].replace("color","fill");f.selectAll("tspan").attr("style",P)}else if(g){const P=R.exec(g);if(P){const V=P[0].replace("color","fill");f.selectAll("tspan").attr("style",V)}}}return It(e,j),e.intersect=function(R){return jt.rect(e,R)},f}A(XL,"classBox");async function QL(i,e){var G,$;const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e,o=e,c=20,h=20,u="verifyMethod"in e,f=Qt(e),{themeVariables:p}=Ae(),{borderColorArray:g,requirementEdgeLabelBackground:b}=p,y=i.insert("g").attr("class",f).attr("id",e.domId??e.id);let v;u?v=await da(y,`&lt;&lt;${a.type}&gt;&gt;`,0,e.labelStyle):v=await da(y,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let C=v;const _=await da(y,a.name,C,e.labelStyle+"; font-weight: bold;");if(C+=_+h,u){const z=await da(y,`${a.requirementId?`ID: ${a.requirementId}`:""}`,C,e.labelStyle);C+=z;const K=await da(y,`${a.text?`Text: ${a.text}`:""}`,C,e.labelStyle);C+=K;const W=await da(y,`${a.risk?`Risk: ${a.risk}`:""}`,C,e.labelStyle);C+=W,await da(y,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,C,e.labelStyle)}else{const z=await da(y,`${o.type?`Type: ${o.type}`:""}`,C,e.labelStyle);C+=z,await da(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,e.labelStyle)}const w=(((G=y.node())==null?void 0:G.getBBox().width)??200)+c,T=((($=y.node())==null?void 0:$.getBBox().height)??200)+c,B=-w/2,E=-T/2,N=Dt.svg(y),O=Ft(e,{});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const M=N.rectangle(B,E,w,T,O),j=y.insert(()=>M,":first-child");if(j.attr("class","basic label-container outer-path").attr("style",n),g!=null&&g.length){const z=e.colorIndex??0;y.attr("data-color-id",`color-${z%g.length}`)}if(y.selectAll(".label").each((z,K,W)=>{const D=Xt(W[K]),U=D.attr("transform");let R=0,I=0;if(U){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(U);H&&(R=parseFloat(H[1]),I=parseFloat(H[2]))}const P=I-T/2;let V=B+c/2;(K===0||K===1)&&(V=R),D.attr("transform",`translate(${V}, ${P+c})`)}),C>v+_+h){const z=E+v+_+h;let K;if(e.look==="neo"){const U=[[B,z],[B+w,z],[B+w,z+.001],[B,z+.001]];K=N.polygon(U,O)}else K=N.line(B,z,B+w,z,O);y.insert(()=>K).attr("class","divider")}return It(e,j),e.intersect=function(z){return jt.rect(e,z)},n&&e.look!=="handDrawn"&&(b||g!=null&&g.length)&&y.selectAll("path").attr("style",n),y}A(QL,"requirementBox");async function da(i,e,r,n=""){if(e==="")return 0;const a=i.insert("g").attr("class","label").attr("style",n),o=Ae(),c=o.htmlLabels??!0,h=await xs(a,zv(Al(e)),{width:gs(e,o)+50,classes:"markdown-node-label",useHtmlLabels:c,style:n},o);let u;if(c){const f=h.children[0],p=Xt(h);u=f.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}else{const f=h.children[0];for(const p of f.children)n&&p.setAttribute("style",n);u=h.getBBox(),u.height+=6}return a.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}A(da,"addText");var vW=A(i=>{switch(i){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ZL(i,e,{config:r}){var K,W;const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n||"";const o=10,c=e.width;e.width=(e.width??200)-10;const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=e.padding||10;let g="",b;"ticket"in e&&e.ticket&&((K=r==null?void 0:r.kanban)!=null&&K.ticketBaseUrl)&&(g=(W=r==null?void 0:r.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",e.ticket),b=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let v,C;b?{label:v,bbox:C}=await Z0(b,"ticket"in e&&e.ticket||"",y):{label:v,bbox:C}=await Z0(h,"ticket"in e&&e.ticket||"",y);const{label:_,bbox:w}=await Z0(h,"assigned"in e&&e.assigned||"",y);e.width=c;const T=10,B=(e==null?void 0:e.width)||0,E=Math.max(C.height,w.height)/2,N=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+E,O=-B/2,M=-N/2;f.attr("transform","translate("+(p-B/2)+", "+(-E-u.height/2)+")"),v.attr("transform","translate("+(p-B/2)+", "+(-E+u.height/2)+")"),_.attr("transform","translate("+(p+B/2-w.width-2*o)+", "+(-E+u.height/2)+")");let j;const{rx:G,ry:$}=e,{cssStyles:z}=e;if(e.look==="handDrawn"){const D=Dt.svg(h),U=Ft(e,{}),R=G||$?D.path(Ao(O,M,B,N,G||0),U):D.rectangle(O,M,B,N,U);j=h.insert(()=>R,":first-child"),j.attr("class","basic label-container").attr("style",z||null)}else{j=h.insert("rect",":first-child"),j.attr("class","basic label-container __APA__").attr("style",a).attr("rx",G??5).attr("ry",$??5).attr("x",O).attr("y",M).attr("width",B).attr("height",N);const D="priority"in e&&e.priority;if(D){const U=h.append("line"),R=O+2,I=M+Math.floor((G??0)/2),P=M+N-Math.floor((G??0)/2);U.attr("x1",R).attr("y1",I).attr("x2",R).attr("y2",P).attr("stroke-width","4").attr("stroke",vW(D))}}return It(e,j),e.height=N,e.intersect=function(D){return jt.rect(e,D)},h}A(ZL,"kanbanItem");async function KL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Jt(i,e,Qt(e)),u=o.width+10*c,f=o.height+8*c,p=.15*u,{cssStyles:g}=e,b=o.width+20,y=o.height+20,v=Math.max(u,b),C=Math.max(f,y);h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let _;const w=`M0 0
342
+ a${p},${p} 1 0,0 ${v*.25},${-1*C*.1}
343
+ a${p},${p} 1 0,0 ${v*.25},0
344
+ a${p},${p} 1 0,0 ${v*.25},0
345
+ a${p},${p} 1 0,0 ${v*.25},${C*.1}
346
+
347
+ a${p},${p} 1 0,0 ${v*.15},${C*.33}
348
+ a${p*.8},${p*.8} 1 0,0 0,${C*.34}
349
+ a${p},${p} 1 0,0 ${-1*v*.15},${C*.33}
350
+
351
+ a${p},${p} 1 0,0 ${-1*v*.25},${C*.15}
352
+ a${p},${p} 1 0,0 ${-1*v*.25},0
353
+ a${p},${p} 1 0,0 ${-1*v*.25},0
354
+ a${p},${p} 1 0,0 ${-1*v*.25},${-1*C*.15}
355
+
356
+ a${p},${p} 1 0,0 ${-1*v*.1},${-1*C*.33}
357
+ a${p*.8},${p*.8} 1 0,0 0,${-1*C*.34}
358
+ a${p},${p} 1 0,0 ${v*.1},${-1*C*.33}
359
+ H0 V0 Z`;if(e.look==="handDrawn"){const T=Dt.svg(a),B=Ft(e,{}),E=T.path(w,B);_=a.insert(()=>E,":first-child"),_.attr("class","basic label-container").attr("style",$i(g))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",w);return _.attr("transform",`translate(${-v/2}, ${-C/2})`),It(e,_),e.calcIntersect=function(T,B){return jt.rect(T,B)},e.intersect=function(T){return _t.info("Bang intersect",e,T),jt.rect(e,T)},a}A(KL,"bang");async function JL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Jt(i,e,Qt(e)),u=o.width+2*c,f=o.height+2*c,p=.15*u,g=.25*u,b=.35*u,y=.2*u,{cssStyles:v}=e;let C;const _=`M0 0
360
+ a${p},${p} 0 0,1 ${u*.25},${-1*u*.1}
361
+ a${b},${b} 1 0,1 ${u*.4},${-1*u*.1}
362
+ a${g},${g} 1 0,1 ${u*.35},${u*.2}
363
+
364
+ a${p},${p} 1 0,1 ${u*.15},${f*.35}
365
+ a${y},${y} 1 0,1 ${-1*u*.15},${f*.65}
366
+
367
+ a${g},${p} 1 0,1 ${-1*u*.25},${u*.15}
368
+ a${b},${b} 1 0,1 ${-1*u*.5},0
369
+ a${p},${p} 1 0,1 ${-1*u*.25},${-1*u*.15}
370
+
371
+ a${p},${p} 1 0,1 ${-1*u*.1},${-1*f*.35}
372
+ a${y},${y} 1 0,1 ${u*.1},${-1*f*.65}
373
+ H0 V0 Z`;if(e.look==="handDrawn"){const w=Dt.svg(a),T=Ft(e,{}),B=w.path(_,T);C=a.insert(()=>B,":first-child"),C.attr("class","basic label-container").attr("style",$i(v))}else C=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",_);return h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),C.attr("transform",`translate(${-u/2}, ${-f/2})`),It(e,C),e.calcIntersect=function(w,T){return jt.rect(w,T)},e.intersect=function(w){return _t.info("Cloud intersect",e,w),jt.rect(e,w)},a}A(JL,"cloud");async function tN(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Jt(i,e,Qt(e)),u=o.width+8*c,f=o.height+2*c,p=5,g=e.look==="neo"?`
374
+ M${-u/2} ${f/2-p}
375
+ v${-f+2*p}
376
+ q0,-${p} ${p},-${p}
377
+ h${u-2*p}
378
+ q${p},0 ${p},${p}
379
+ v${f-p}
380
+ H${-u/2}
381
+ Z
382
+ `:`
383
+ M${-u/2} ${f/2-p}
384
+ v${-f+2*p}
385
+ q0,-${p} ${p},-${p}
386
+ h${u-2*p}
387
+ q${p},0 ${p},${p}
388
+ v${f-2*p}
389
+ q0,${p} ${-p},${p}
390
+ h${-(u-2*p)}
391
+ q${-p},0 ${-p},${-p}
392
+ Z
393
+ `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const b=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",g);return a.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",f/2).attr("x2",u/2).attr("y2",f/2),h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>h.node()),It(e,b),e.calcIntersect=function(y,v){return jt.rect(y,v)},e.intersect=function(y){return jt.rect(e,y)},a}A(tN,"defaultMindmapNode");async function eN(i,e){const r={padding:e.padding??0};return j1(i,e,r)}A(eN,"mindmapCircle");var CW=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:NL},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:EL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:jL},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:FL},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:iL},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:j1},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:KL},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:JL},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:TL},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:cL},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bL},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:xL},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:PL},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:mL},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:nL},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:IL},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:VM},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:ML},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:DL},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:RL},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:oL},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:hL},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:KM},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:JM},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tL},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:vL},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:WL},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:lL},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:qL},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:CL},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:eL},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:rL},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:UL},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:YL},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:aL},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:HL},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:sL},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:LL},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:wL},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:_L},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:YM},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ZM},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:zL},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:$L},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:GL},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:BL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:kL}],kW=A(()=>{const e=[...Object.entries({state:OL,choice:XM,note:SL,rectWithTitle:AL,labelRect:yL,iconSquare:pL,iconCircle:fL,icon:uL,iconRounded:dL,imageSquare:gL,anchor:WM,kanbanItem:ZL,mindmapCircle:eN,defaultMindmapNode:tN,classBox:XL,erBox:O1,requirementBox:QL}),...CW.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),iN=kW();function _W(i){return i in iN}A(_W,"isValidShape");var um=new Map;async function rN(i,e,r){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?iN[e.shape]:void 0;if(!o)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;r.config.securityLevel==="sandbox"?c="_top":e.linkTarget&&(c=e.linkTarget||"_blank"),n=i.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),a=await o(n,e,r)}else a=await o(i,e,r),n=a;return n.attr("data-look",$i(e.look)),e.tooltip&&a.attr("title",e.tooltip),um.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}A(rN,"insertNode");var fnt=A((i,e)=>{um.set(e.id,i)},"setNodeElem"),dnt=A(()=>{um.clear()},"clear"),pnt=A(i=>{const e=um.get(i.id);_t.trace("Transforming node",i.diff,i,"translate("+(i.x-i.width/2-5)+", "+i.width/2+")");const r=8,n=i.diff||0;return i.clusterNode?e.attr("transform","translate("+(i.x+n-i.width/2)+", "+(i.y-i.height/2-r)+")"):e.attr("transform","translate("+i.x+", "+i.y+")"),n},"positionNode"),wW=A((i,e,r,n,a,o=!1,c)=>{e.arrowTypeStart&&tT(i,"start",e.arrowTypeStart,r,n,a,o,c),e.arrowTypeEnd&&tT(i,"end",e.arrowTypeEnd,r,n,a,o,c)},"addEdgeMarkers"),SW={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},TW=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],tT=A((i,e,r,n,a,o,c=!1,h)=>{var v;const u=SW[r],f=u&&TW.includes(u.type);if(!u){_t.warn(`Unknown arrow type: ${r}`);return}const p=u.type,y=`${a}_${o}-${p}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(h&&h.trim()!==""){const C=h.replace(/[^\dA-Za-z]/g,"_"),_=`${y}_${C}`;if(!document.getElementById(_)){const w=document.getElementById(y);if(w){const T=w.cloneNode(!0);T.id=_,T.querySelectorAll("path, circle, line").forEach(E=>{E.setAttribute("stroke",h),u.fill&&E.setAttribute("fill",h)}),(v=w.parentNode)==null||v.appendChild(T)}}i.attr(`marker-${e}`,`url(${n}#${_})`)}else i.attr(`marker-${e}`,`url(${n}#${y})`)},"addEdgeMarker"),BW=A(i=>{var e,r;return typeof i=="string"?i:(r=(e=Ae())==null?void 0:e.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Lg=new Map,Xi=new Map,gnt=A(()=>{Lg.clear(),Xi.clear()},"clear"),wu=A(i=>i?typeof i=="string"?i:i.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),AW=A(async(i,e)=>{const r=Ae();let n=vr(r);const{labelStyles:a}=$t(e);e.labelStyle=a;const o=i.insert("g").attr("class","edgeLabel"),c=o.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",f=await xs(i,e.label,{style:wu(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},r);c.node().appendChild(f),_t.info("abc82",e,e.labelType);let p=f.getBBox(),g=p;if(n){const y=f.children[0],v=Xt(f);p=y.getBoundingClientRect(),g=p,v.attr("width",p.width),v.attr("height",p.height)}else{const y=Xt(f).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",xu(g,n)),Lg.set(e.id,o),e.width=p.width,e.height=p.height;let b;if(e.startLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await yo(v,e.startLabelLeft,wu(e.labelStyle)||"",!1,!1);b=C;let _=C.getBBox();if(n){const w=C.children[0],T=Xt(C);_=w.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",xu(_,n)),Xi.get(e.id)||Xi.set(e.id,{}),Xi.get(e.id).startLeft=y,Wu(b,e.startLabelLeft)}if(e.startLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await yo(v,e.startLabelRight,wu(e.labelStyle)||"",!1,!1);b=C,v.node().appendChild(C);let _=C.getBBox();if(n){const w=C.children[0],T=Xt(C);_=w.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",xu(_,n)),Xi.get(e.id)||Xi.set(e.id,{}),Xi.get(e.id).startRight=y,Wu(b,e.startLabelRight)}if(e.endLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await yo(v,e.endLabelLeft,wu(e.labelStyle)||"",!1,!1);b=C;let _=C.getBBox();if(n){const w=C.children[0],T=Xt(C);_=w.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",xu(_,n)),y.node().appendChild(C),Xi.get(e.id)||Xi.set(e.id,{}),Xi.get(e.id).endLeft=y,Wu(b,e.endLabelLeft)}if(e.endLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await yo(v,e.endLabelRight,wu(e.labelStyle)||"",!1,!1);b=C;let _=C.getBBox();if(n){const w=C.children[0],T=Xt(C);_=w.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",xu(_,n)),y.node().appendChild(C),Xi.get(e.id)||Xi.set(e.id,{}),Xi.get(e.id).endRight=y,Wu(b,e.endLabelRight)}return f},"insertEdgeLabel");function Wu(i,e){vr(Ae())&&i&&(i.style.width=e.length*9+"px",i.style.height="12px")}A(Wu,"setTerminalWidth");var EW=A((i,e)=>{_t.debug("Moving label abc88 ",i.id,i.label,Lg.get(i.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=Ae(),{subGraphTitleTotalMargin:a}=v1(n);if(i.label){const o=Lg.get(i.id);let c=i.x,h=i.y;if(r){const u=Fn.calcLabelPosition(r);_t.debug("Moving label "+i.label+" from (",c,",",h,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(c=u.x,h=u.y)}o.attr("transform",`translate(${c}, ${h+a/2})`)}if(i.startLabelLeft){const o=Xi.get(i.id).startLeft;let c=i.x,h=i.y;if(r){const u=Fn.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.startLabelRight){const o=Xi.get(i.id).startRight;let c=i.x,h=i.y;if(r){const u=Fn.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.endLabelLeft){const o=Xi.get(i.id).endLeft;let c=i.x,h=i.y;if(r){const u=Fn.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.endLabelRight){const o=Xi.get(i.id).endRight;let c=i.x,h=i.y;if(r){const u=Fn.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),MW=A((i,e)=>{const r=i.x,n=i.y,a=Math.abs(e.x-r),o=Math.abs(e.y-n),c=i.width/2,h=i.height/2;return a>=c||o>=h},"outsideNode"),LW=A((i,e,r)=>{_t.debug(`intersection calc abc89:
394
+ outsidePoint: ${JSON.stringify(e)}
395
+ insidePoint : ${JSON.stringify(r)}
396
+ node : x:${i.x} y:${i.y} w:${i.width} h:${i.height}`);const n=i.x,a=i.y,o=Math.abs(n-r.x),c=i.width/2;let h=r.x<e.x?c-o:c+o;const u=i.height/2,f=Math.abs(e.y-r.y),p=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*c>Math.abs(n-e.x)*u){let g=r.y<e.y?e.y-u-a:a-u-e.y;h=p*g/f;const b={x:r.x<e.x?r.x+h:r.x-p+h,y:r.y<e.y?r.y+f-g:r.y-f+g};return h===0&&(b.x=e.x,b.y=e.y),p===0&&(b.x=e.x),f===0&&(b.y=e.y),_t.debug(`abc89 top/bottom calc, Q ${f}, q ${g}, R ${p}, r ${h}`,b),b}else{r.x<e.x?h=e.x-c-n:h=n-c-e.x;let g=f*h/p,b=r.x<e.x?r.x+p-h:r.x-p+h,y=r.y<e.y?r.y+g:r.y-g;return _t.debug(`sides calc abc89, Q ${f}, q ${g}, R ${p}, r ${h}`,{_x:b,_y:y}),h===0&&(b=e.x,y=e.y),p===0&&(b=e.x),f===0&&(y=e.y),{x:b,y}}},"intersection"),eT=A((i,e)=>{_t.warn("abc88 cutPathAtIntersect",i,e);let r=[],n=i[0],a=!1;return i.forEach(o=>{if(_t.info("abc88 checking point",o,e),!MW(e,o)&&!a){const c=LW(e,n,o);_t.debug("abc88 inside",o,n,c),_t.debug("abc88 intersection",c,e);let h=!1;r.forEach(u=>{h=h||u.x===c.x&&u.y===c.y}),r.some(u=>u.x===c.x&&u.y===c.y)?_t.warn("abc88 no intersect",c,r):r.push(c),a=!0}else _t.warn("abc88 outside",o,n),n=o,a||r.push(o)}),_t.debug("returning points",r),r},"cutPathAtIntersect");function nN(i){const e=[],r=[];for(let n=1;n<i.length-1;n++){const a=i[n-1],o=i[n],c=i[n+1];(a.x===o.x&&o.y===c.y&&Math.abs(o.x-c.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===c.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-c.y)>5)&&(e.push(o),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}A(nN,"extractCornerPoints");var iT=A(function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=Math.sqrt(n*n+a*a),c=r/o;return{x:e.x-c*n,y:e.y-c*a}},"findAdjacentPoint"),NW=A(function(i){const{cornerPointPositions:e}=nN(i),r=[];for(let n=0;n<i.length;n++)if(e.includes(n)){const a=i[n-1],o=i[n+1],c=i[n],h=iT(a,c,5),u=iT(o,c,5),f=u.x-h.x,p=u.y-h.y;r.push(h);const g=Math.sqrt(2)*2;let b={x:c.x,y:c.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){_t.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const y=5;c.x===h.x?b={x:f<0?h.x-y+g:h.x+y-g,y:p<0?h.y-g:h.y+g}:b={x:f<0?h.x-g:h.x+g,y:p<0?h.y-y+g:h.y+y-g}}else _t.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));r.push(b,u)}else r.push(i[n]);return r},"fixCorners"),jW=A((i,e,r)=>{const n=i-e-r,a=2,o=2,c=a+o,h=Math.floor(n/c),u=Array(h).fill(`${a} ${o}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),OW=A(function(i,e,r,n,a,o,c,h=!1){var I;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=Ae();let f=e.points,p=!1;const g=a;var b=o;const y=[];for(const P in e.cssCompiledStyles)rM(P)||y.push(e.cssCompiledStyles[P]);_t.debug("UIO intersect check",e.points,b.x,g.x),b.intersect&&g.intersect&&!h&&(f=f.slice(1,e.points.length-1),f.unshift(g.intersect(f[0])),_t.debug("Last point UIO",e.start,"-->",e.end,f[f.length-1],b,b.intersect(f[f.length-1])),f.push(b.intersect(f[f.length-1])));const v=btoa(JSON.stringify(f));e.toCluster&&(_t.info("to cluster abc88",r.get(e.toCluster)),f=eT(e.points,r.get(e.toCluster).node),p=!0),e.fromCluster&&(_t.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(f,null,2)),f=eT(f.reverse(),r.get(e.fromCluster).node).reverse(),p=!0);let C=f.filter(P=>!Number.isNaN(P.y));const _=BW(e.curve);_!=="rounded"&&(C=NW(C));let w=Ju;switch(_){case"linear":w=Ju;break;case"basis":w=cb;break;case"cardinal":w=FE;break;case"bumpX":w=NE;break;case"bumpY":w=jE;break;case"catmullRom":w=zE;break;case"monotoneX":w=WE;break;case"monotoneY":w=GE;break;case"natural":w=VE;break;case"step":w=XE;break;case"stepAfter":w=ZE;break;case"stepBefore":w=QE;break;case"rounded":w=Ju;break;default:w=cb}const{x:T,y:B}=AI(e),E=n9().x(T).y(B).curve(w);let N;switch(e.thickness){case"normal":N="edge-thickness-normal";break;case"thick":N="edge-thickness-thick";break;case"invisible":N="edge-thickness-invisible";break;default:N="edge-thickness-normal"}switch(e.pattern){case"solid":N+=" edge-pattern-solid";break;case"dotted":N+=" edge-pattern-dotted";break;case"dashed":N+=" edge-pattern-dashed";break;default:N+=" edge-pattern-solid"}let O,M=_==="rounded"?aN(sN(C,e),5):E(C);const j=Array.isArray(e.style)?e.style:[e.style];let G=j.find(P=>P==null?void 0:P.startsWith("stroke:")),$="";e.animate&&($="edge-animation-fast"),e.animation&&($="edge-animation-"+e.animation);let z=!1;if(e.look==="handDrawn"){const P=Dt.svg(i);Object.assign([],C);const V=P.path(M,{roughness:.3,seed:u});N+=" transition",O=Xt(V).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+N+(e.classes?" "+e.classes:"")+($?" "+$:"")).attr("style",j?j.reduce((H,tt)=>H+";"+tt,""):"");let J=O.attr("d");O.attr("d",J),i.node().appendChild(O.node())}else{const P=y.join(";"),V=j?j.reduce((bt,kt)=>bt+kt+";",""):"",J=(P?P+";"+V+";":V)+";"+(j?j.reduce((bt,kt)=>bt+";"+kt,""):"");O=i.append("path").attr("d",M).attr("id",`${c}-${e.id}`).attr("class"," "+N+(e.classes?" "+e.classes:"")+($?" "+$:"")).attr("style",J),G=(I=J.match(/stroke:([^;]+)/))==null?void 0:I[1],z=e.animate===!0||!!e.animation||P.includes("animation");const H=O.node(),tt=typeof H.getTotalLength=="function"?H.getTotalLength():0,ot=sS[e.arrowTypeStart]||0,st=sS[e.arrowTypeEnd]||0;if(e.look==="neo"&&!z){const kt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?jW(tt,ot,st):`0 ${ot} ${tt-ot-st} ${st}`}; stroke-dashoffset: 0;`;O.attr("style",kt+O.attr("style"))}}O.attr("data-edge",!0),O.attr("data-et","edge"),O.attr("data-id",e.id),O.attr("data-points",v),O.attr("data-look",$i(e.look)),e.showPoints&&C.forEach(P=>{i.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",P.x).attr("cy",P.y)});let K="";(Ae().flowchart.arrowMarkerAbsolute||Ae().state.arrowMarkerAbsolute)&&(K=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,K=K.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),_t.info("arrowTypeStart",e.arrowTypeStart),_t.info("arrowTypeEnd",e.arrowTypeEnd);const W=!z&&(e==null?void 0:e.look)==="neo";wW(O,e,K,c,n,W,G);const D=Math.floor(f.length/2),U=f[D];Fn.isLabelCoordinateInPath(U,O.attr("d"))||(p=!0);let R={};return p&&(R.updatedPath=f),R.originalPath=e.points,R},"insertEdge");function aN(i,e){if(i.length<2)return"";let r="";const n=i.length,a=1e-5;for(let o=0;o<n;o++){const c=i[o],h=i[o-1],u=i[o+1];if(o===0)r+=`M${c.x},${c.y}`;else if(o===n-1)r+=`L${c.x},${c.y}`;else{const f=c.x-h.x,p=c.y-h.y,g=u.x-c.x,b=u.y-c.y,y=Math.hypot(f,p),v=Math.hypot(g,b);if(y<a||v<a){r+=`L${c.x},${c.y}`;continue}const C=f/y,_=p/y,w=g/v,T=b/v,B=C*w+_*T,E=Math.max(-1,Math.min(1,B)),N=Math.acos(E);if(N<a||Math.abs(Math.PI-N)<a){r+=`L${c.x},${c.y}`;continue}const O=Math.min(e/Math.sin(N/2),y/2,v/2),M=c.x-C*O,j=c.y-_*O,G=c.x+w*O,$=c.y+T*O;r+=`L${M},${j}`,r+=`Q${c.x},${c.y} ${G},${$}`}}return r}A(aN,"generateRoundedPath");function zb(i,e){if(!i||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-i.x,n=e.y-i.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}A(zb,"calculateDeltaAndAngle");function sN(i,e){const r=i.map(a=>({...a}));if(i.length>=2&&nr[e.arrowTypeStart]){const a=nr[e.arrowTypeStart],o=i[0],c=i[1],{angle:h}=zb(o,c),u=a*Math.cos(h),f=a*Math.sin(h);r[0].x=o.x+u,r[0].y=o.y+f}const n=i.length;if(n>=2&&nr[e.arrowTypeEnd]){const a=nr[e.arrowTypeEnd],o=i[n-1],c=i[n-2],{angle:h}=zb(c,o),u=a*Math.cos(h),f=a*Math.sin(h);r[n-1].x=o.x-u,r[n-1].y=o.y-f}return r}A(sN,"applyMarkerOffsetsToPoints");var RW=A((i,e,r,n)=>{e.forEach(a=>{nG[a](i,r,n)})},"insertMarkers"),DW=A((i,e,r)=>{_t.trace("Making markers for ",r),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),FW=A((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),$W=A((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),zW=A((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),IW=A((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),qW=A((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),PW=A((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),HW=A((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),i.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),UW=A((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),WW=A((i,e,r)=>{const n=si(),{themeVariables:a}=n,{transitionColor:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),GW=A((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),YW=A((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const a=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),VW=A((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),XW=A((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),QW=A((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),ZW=A((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const u=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),KW=A((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),JW=A((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const u=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),tG=A((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
397
+ L20,10
398
+ M20,10
399
+ L0,20`)},"requirement_arrow"),eG=A((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
400
+ L20,10
401
+ M20,10
402
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),iG=A((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),rG=A((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o}=a,c=i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),nG={extension:DW,composition:FW,aggregation:$W,dependency:zW,lollipop:IW,point:qW,circle:PW,cross:HW,barb:UW,barbNeo:WW,only_one:GW,zero_or_one:YW,one_or_more:VW,zero_or_more:XW,only_one_neo:QW,zero_or_one_neo:ZW,one_or_more_neo:KW,zero_or_more_neo:JW,requirement_arrow:tG,requirement_contains:iG,requirement_arrow_neo:eG,requirement_contains_neo:rG},aG=RW,sG={common:Nf,getConfig:si,insertCluster:rW,insertEdge:OW,insertEdgeLabel:AW,insertMarkers:aG,insertNode:rN,interpolateToCurve:p1,labelHelper:Jt,log:_t,positionEdgeLabel:EW},kf={},oN=A(i=>{for(const e of i)kf[e.name]=e},"registerLayoutLoaders"),oG=A(()=>{oN([{name:"dagre",loader:A(async()=>await Ce(()=>import("./dagre-KV5264BT-DYE0WzHM.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:A(async()=>await Ce(()=>import("./cose-bilkent-S5V4N54A-p0t1DY88.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");oG();var mnt=A(async(i,e)=>{if(!(i.layoutAlgorithm in kf))throw new Error(`Unknown layout algorithm: ${i.layoutAlgorithm}`);if(i.diagramId)for(const p of i.nodes){const g=p.domId||p.id;p.domId=`${i.diagramId}-${g}`}const r=kf[i.layoutAlgorithm],n=await r.loader(),{theme:a,themeVariables:o}=i.config,{useGradient:c,gradientStart:h,gradientStop:u}=o,f=e.attr("id");if(e.append("defs").append("filter").attr("id",`${f}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${f}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),c){const p=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");p.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),p.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return n.render(i,e,sG,{algorithm:r.algorithm})},"render"),ynt=A((i="",{fallback:e="dagre"}={})=>{if(i in kf)return i;if(e in kf)return _t.warn(`Layout algorithm ${i} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${i} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),lN="comm",cN="rule",hN="decl",lG="@import",cG="@namespace",hG="@keyframes",uG="@layer",fG=Math.abs,rf=String.fromCharCode;function uN(i){return i.trim()}function Ib(i,e,r){return i.replace(e,r)}function Oc(i,e){return i.charCodeAt(e)|0}function fh(i,e,r){return i.slice(e,r)}function ya(i){return i.length}function dG(i){return i.length}function bp(i,e){return e.push(i),i}var fm=1,dh=1,fN=0,vn=0,_i=0,vh="";function R1(i,e,r,n,a,o,c,h){return{value:i,root:e,parent:r,type:n,props:a,children:o,line:fm,column:dh,length:c,return:"",siblings:h}}function pG(){return _i}function gG(){return _i=vn>0?Oc(vh,--vn):0,dh--,_i===10&&(dh=1,fm--),_i}function In(){return _i=vn<fN?Oc(vh,vn++):0,dh++,_i===10&&(dh=1,fm++),_i}function xo(){return Oc(vh,vn)}function Hp(){return vn}function dm(i,e){return fh(vh,i,e)}function _f(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function mG(i){return fm=dh=1,fN=ya(vh=i),vn=0,[]}function yG(i){return vh="",i}function J0(i){return uN(dm(vn-1,qb(i===91?i+2:i===40?i+1:i)))}function xG(i){for(;(_i=xo())&&_i<33;)In();return _f(i)>2||_f(_i)>3?"":" "}function bG(i,e){for(;--e&&In()&&!(_i<48||_i>102||_i>57&&_i<65||_i>70&&_i<97););return dm(i,Hp()+(e<6&&xo()==32&&In()==32))}function qb(i){for(;In();)switch(_i){case i:return vn;case 34:case 39:i!==34&&i!==39&&qb(_i);break;case 40:i===41&&qb(i);break;case 92:In();break}return vn}function vG(i,e){for(;In()&&i+_i!==57;)if(i+_i===84&&xo()===47)break;return"/*"+dm(e,vn-1)+"*"+rf(i===47?i:In())}function CG(i){for(;!_f(xo());)In();return dm(i,vn)}function kG(i){return yG(Up("",null,null,null,[""],i=mG(i),0,[0],i))}function Up(i,e,r,n,a,o,c,h,u){for(var f=0,p=0,g=c,b=0,y=0,v=0,C=1,_=1,w=1,T=0,B=0,E="",N=a,O=o,M=n,j=E;_;)switch(v=B,B=In()){case 40:v!=108&&Oc(j,g-1)==58?(T++,j+="("):j+=J0(B);break;case 41:T--,j+=")";break;case 34:case 39:case 91:j+=J0(B);break;case 9:case 10:case 13:case 32:if(T>0){j+=rf(B);break}j+=xG(v);break;case 92:j+=bG(Hp()-1,7);continue;case 47:switch(xo()){case 42:case 47:bp(_G(vG(In(),Hp()),e,r,u),u),(_f(v||1)==5||_f(xo()||1)==5)&&ya(j)&&fh(j,-1,void 0)!==" "&&(j+=" ");break;default:j+="/"}break;case 123*C:h[f++]=ya(j)*w;case 125*C:case 59:case 0:if(T>0&&B){j+=rf(B);break}switch(B){case 0:case 125:_=0;case 59+p:w==-1&&(j=Ib(j,/\f/g,"")),y>0&&(ya(j)-g||C===0)&&bp(y>32?nT(j+";",n,r,g-1,u):nT(Ib(j," ","")+";",n,r,g-2,u),u);break;case 59:j+=";";default:if(bp(M=rT(j,e,r,f,p,a,h,E,N=[],O=[],g,o),o),B===123)if(p===0)Up(j,e,M,M,N,o,g,h,O);else{switch(b){case 99:if(Oc(j,3)===110)break;case 108:if(Oc(j,2)===97)break;default:p=0;case 100:case 109:case 115:}p?Up(i,M,M,n&&bp(rT(i,M,M,0,0,a,h,E,a,N=[],g,O),O),a,O,g,h,n?N:O):Up(j,M,M,M,[""],O,0,h,O)}}f=p=y=0,C=w=1,E=j="",g=c;break;case 58:g=1+ya(j),y=v;default:if(C<1){if(B==123)--C;else if(B==125&&C++==0&&gG()==125)continue}switch(j+=rf(B),B*C){case 38:w=p>0?1:(j+="\f",-1);break;case 44:if(T>0)break;h[f++]=(ya(j)-1)*w,w=1;break;case 64:xo()===45&&(j+=J0(In())),b=xo(),p=g=ya(E=j+=CG(Hp())),B++;break;case 45:v===45&&ya(j)==2&&(C=0)}}return o}function rT(i,e,r,n,a,o,c,h,u,f,p,g){for(var b=a-1,y=a===0?o:[""],v=dG(y),C=0,_=0,w=0;C<n;++C)for(var T=0,B=fh(i,b+1,b=fG(_=c[C])),E=i;T<v;++T)(E=uN(_>0?y[T]+" "+B:Ib(B,/&\f/g,y[T])))&&(u[w++]=E);return R1(i,e,r,a===0?cN:h,u,f,p,g)}function _G(i,e,r,n){return R1(i,e,r,lN,rf(pG()),fh(i,2,-2),0,n)}function nT(i,e,r,n,a){return R1(i,e,r,hN,fh(i,0,n),fh(i,n+1,-1),n,a)}function Pb(i,e){for(var r="",n=0;n<i.length;n++)r+=e(i[n],n,i,e)||"";return r}function wG(i,e,r,n){switch(i.type){case uG:if(i.children.length)break;case lG:case cG:case hN:return i.return=i.return||i.value;case lN:return"";case hG:return i.return=i.value+"{"+Pb(i.children,n)+"}";case cN:if(!ya(i.value=i.props.join(",")))return""}return ya(r=Pb(i.children,n))?i.return=i.value+"{"+r+"}":""}var SG=D5(Object.keys,Object),TG=Object.prototype,BG=TG.hasOwnProperty;function AG(i){if(!rm(i))return SG(i);var e=[];for(var r in Object(i))BG.call(i,r)&&r!="constructor"&&e.push(r);return e}var Hb=Rl(Wn,"DataView"),Ub=Rl(Wn,"Promise"),Wb=Rl(Wn,"Set"),Gb=Rl(Wn,"WeakMap"),aT="[object Map]",EG="[object Object]",sT="[object Promise]",oT="[object Set]",lT="[object WeakMap]",cT="[object DataView]",MG=Ol(Hb),LG=Ol(vf),NG=Ol(Ub),jG=Ol(Wb),OG=Ol(Gb),tl=jl;(Hb&&tl(new Hb(new ArrayBuffer(1)))!=cT||vf&&tl(new vf)!=aT||Ub&&tl(Ub.resolve())!=sT||Wb&&tl(new Wb)!=oT||Gb&&tl(new Gb)!=lT)&&(tl=function(i){var e=jl(i),r=e==EG?i.constructor:void 0,n=r?Ol(r):"";if(n)switch(n){case MG:return cT;case LG:return aT;case NG:return sT;case jG:return oT;case OG:return lT}return e});var RG="[object Map]",DG="[object Set]",FG=Object.prototype,$G=FG.hasOwnProperty;function hT(i){if(i==null)return!0;if(nm(i)&&(Cg(i)||typeof i=="string"||typeof i.splice=="function"||f1(i)||d1(i)||vg(i)))return!i.length;var e=tl(i);if(e==RG||e==DG)return!i.size;if(rm(i))return!AG(i).length;for(var r in i)if($G.call(i,r))return!1;return!0}var dN="c4",zG=A(i=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),IG=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-dpHsVM3D.js");return{diagram:e}},__vite__mapDeps([8,9]));return{id:dN,diagram:i}},"loader"),qG={id:dN,detector:zG,loader:IG},PG=qG,pN="flowchart",HG=A((i,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(i)},"detector"),UG=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DrMlKBYA.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:pN,diagram:i}},"loader"),WG={id:pN,detector:HG,loader:UG},GG=WG,gN="flowchart-v2",YG=A((i,e)=>{var r,n,a;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(i)&&((a=e==null?void 0:e.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(i))},"detector"),VG=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DrMlKBYA.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:gN,diagram:i}},"loader"),XG={id:gN,detector:YG,loader:VG},QG=XG,mN="er",ZG=A(i=>/^\s*erDiagram/.test(i),"detector"),KG=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-D2sqkGin.js");return{diagram:e}},__vite__mapDeps([15,12,13,14]));return{id:mN,diagram:i}},"loader"),JG={id:mN,detector:ZG,loader:KG},tY=JG,yN="gitGraph",eY=A(i=>/^\s*gitGraph/.test(i),"detector"),iY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-BsbOq1C9.js");return{diagram:e}},__vite__mapDeps([16,17,18,19,4,2]));return{id:yN,diagram:i}},"loader"),rY={id:yN,detector:eY,loader:iY},nY=rY,xN="gantt",aY=A(i=>/^\s*gantt/.test(i),"detector"),sY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-Cf4FbEFp.js");return{diagram:e}},__vite__mapDeps([20,21,22]));return{id:xN,diagram:i}},"loader"),oY={id:xN,detector:aY,loader:sY},lY=oY,bN="info",cY=A(i=>/^\s*info/.test(i),"detector"),hY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-DTkMnZiD.js");return{diagram:e}},__vite__mapDeps([23,19,4,2]));return{id:bN,diagram:i}},"loader"),uY={id:bN,detector:cY,loader:hY},vN="pie",fY=A(i=>/^\s*pie/.test(i),"detector"),dY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-Bfm_toYA.js");return{diagram:e}},__vite__mapDeps([24,17,19,4,2,25]));return{id:vN,diagram:i}},"loader"),pY={id:vN,detector:fY,loader:dY},CN="quadrantChart",gY=A(i=>/^\s*quadrantChart/.test(i),"detector"),mY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-DIjTM3lm.js");return{diagram:e}},__vite__mapDeps([26,21,22]));return{id:CN,diagram:i}},"loader"),yY={id:CN,detector:gY,loader:mY},xY=yY,kN="xychart",bY=A(i=>/^\s*xychart(-beta)?/.test(i),"detector"),vY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-b9fcOYTj.js");return{diagram:e}},__vite__mapDeps([27,21,22]));return{id:kN,diagram:i}},"loader"),CY={id:kN,detector:bY,loader:vY},kY=CY,_N="requirement",_Y=A(i=>/^\s*requirement(Diagram)?/.test(i),"detector"),wY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-B9AEoGYh.js");return{diagram:e}},__vite__mapDeps([28,12,13]));return{id:_N,diagram:i}},"loader"),SY={id:_N,detector:_Y,loader:wY},TY=SY,wN="sequence",BY=A(i=>/^\s*sequenceDiagram/.test(i),"detector"),AY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-CHSxSvmJ.js");return{diagram:e}},__vite__mapDeps([29,9,18]));return{id:wN,diagram:i}},"loader"),EY={id:wN,detector:BY,loader:AY},MY=EY,SN="class",LY=A((i,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(i)},"detector"),NY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-BvejNiwH.js");return{diagram:e}},__vite__mapDeps([30,31,11,9,12,13]));return{id:SN,diagram:i}},"loader"),jY={id:SN,detector:LY,loader:NY},OY=jY,TN="classDiagram",RY=A((i,e)=>{var r;return/^\s*classDiagram/.test(i)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(i)},"detector"),DY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-BvejNiwH.js");return{diagram:e}},__vite__mapDeps([32,31,11,9,12,13]));return{id:TN,diagram:i}},"loader"),FY={id:TN,detector:RY,loader:DY},$Y=FY,BN="state",zY=A((i,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(i)},"detector"),IY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-B0URrhHw.js");return{diagram:e}},__vite__mapDeps([33,34,12,13,1,2,3,4]));return{id:BN,diagram:i}},"loader"),qY={id:BN,detector:zY,loader:IY},PY=qY,AN="stateDiagram",HY=A((i,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(i)||/^\s*stateDiagram/.test(i)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),UY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-FdAb9MBo.js");return{diagram:e}},__vite__mapDeps([35,34,12,13]));return{id:AN,diagram:i}},"loader"),WY={id:AN,detector:HY,loader:UY},GY=WY,EN="journey",YY=A(i=>/^\s*journey/.test(i),"detector"),VY=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-BDY2Nslc.js");return{diagram:e}},__vite__mapDeps([36,11,9,25]));return{id:EN,diagram:i}},"loader"),XY={id:EN,detector:YY,loader:VY},QY=XY,ZY=A((i,e,r)=>{_t.debug(`rendering svg for syntax error
403
+ `);const n=v9(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),JA(n,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),MN={draw:ZY},KY=MN,JY={db:{},renderer:MN,parser:{parse:A(()=>{},"parse")}},tV=JY,LN="flowchart-elk",eV=A((i,e={})=>{var r;return/^\s*flowchart-elk/.test(i)||/^\s*(flowchart|graph)/.test(i)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),iV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DrMlKBYA.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:LN,diagram:i}},"loader"),rV={id:LN,detector:eV,loader:iV},nV=rV,NN="timeline",aV=A(i=>/^\s*timeline/.test(i),"detector"),sV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-CycU2gVC.js");return{diagram:e}},__vite__mapDeps([37,25]));return{id:NN,diagram:i}},"loader"),oV={id:NN,detector:aV,loader:sV},lV=oV,jN="mindmap",cV=A(i=>/^\s*mindmap/.test(i),"detector"),hV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-GmO0JRtA.js");return{diagram:e}},__vite__mapDeps([38,12,13]));return{id:jN,diagram:i}},"loader"),uV={id:jN,detector:cV,loader:hV},fV=uV,ON="kanban",dV=A(i=>/^\s*kanban/.test(i),"detector"),pV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-CgrwoTjI.js");return{diagram:e}},__vite__mapDeps([39,11]));return{id:ON,diagram:i}},"loader"),gV={id:ON,detector:dV,loader:pV},mV=gV,RN="sankey",yV=A(i=>/^\s*sankey(-beta)?/.test(i),"detector"),xV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-C_O5XLXm.js");return{diagram:e}},[]);return{id:RN,diagram:i}},"loader"),bV={id:RN,detector:yV,loader:xV},vV=bV,DN="packet",CV=A(i=>/^\s*packet(-beta)?/.test(i),"detector"),kV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-DVk6fYG7.js");return{diagram:e}},__vite__mapDeps([40,17,19,4,2]));return{id:DN,diagram:i}},"loader"),_V={id:DN,detector:CV,loader:kV},FN="radar",wV=A(i=>/^\s*radar-beta/.test(i),"detector"),SV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-CHZ7wgN1.js");return{diagram:e}},__vite__mapDeps([41,17,19,4,2]));return{id:FN,diagram:i}},"loader"),TV={id:FN,detector:wV,loader:SV},$N="block",BV=A(i=>/^\s*block(-beta)?/.test(i),"detector"),AV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-ByWKxzhL.js");return{diagram:e}},__vite__mapDeps([42,11,5,1,2,14]));return{id:$N,diagram:i}},"loader"),EV={id:$N,detector:BV,loader:AV},MV=EV,zN="treeView",LV=A(i=>/^\s*treeView-beta/.test(i),"detector"),NV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-D9EiQCOP.js");return{diagram:e}},__vite__mapDeps([43,17,18,19,4,2]));return{id:zN,diagram:i}},"loader"),jV={id:zN,detector:LV,loader:NV},OV=jV,IN="architecture",RV=A(i=>/^\s*architecture/.test(i),"detector"),DV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-Dz2PKBsS.js");return{diagram:e}},__vite__mapDeps([44,17,19,4,2,7]));return{id:IN,diagram:i}},"loader"),FV={id:IN,detector:RV,loader:DV},$V=FV,qN="ishikawa",zV=A(i=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),IV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-CahQ348K.js");return{diagram:e}},[]);return{id:qN,diagram:i}},"loader"),qV={id:qN,detector:zV,loader:IV},PN="venn",PV=A(i=>/^\s*venn-beta/.test(i),"detector"),HV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-DcU2536G.js");return{diagram:e}},[]);return{id:PN,diagram:i}},"loader"),UV={id:PN,detector:PV,loader:HV},WV=UV,HN="treemap",GV=A(i=>/^\s*treemap/.test(i),"detector"),YV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-poDXSAfu.js");return{diagram:e}},__vite__mapDeps([45,13,17,19,4,2,22]));return{id:HN,diagram:i}},"loader"),VV={id:HN,detector:GV,loader:YV},UN="wardley-beta",XV=A(i=>/^\s*wardley-beta/i.test(i),"detector"),QV=A(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-CUnIHJgd.js");return{diagram:e}},__vite__mapDeps([46,17,19,4,2]));return{id:UN,diagram:i}},"loader"),ZV={id:UN,detector:XV,loader:QV},KV=ZV,uT=!1,pm=A(()=>{uT||(uT=!0,ig("error",tV,i=>i.toLowerCase().trim()==="error"),ig("---",{db:{clear:A(()=>{},"clear")},styles:{},renderer:{draw:A(()=>{},"draw")},parser:{parse:A(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:A(()=>null,"init")},i=>i.toLowerCase().trimStart().startsWith("---")),Vx(nV,fV,$V),Vx(PG,mV,$Y,OY,tY,lY,uY,pY,TY,MY,QG,GG,lV,nY,GY,PY,QY,xY,vV,_V,kY,MV,OV,TV,qV,VV,WV,KV))},"addDiagrams"),JV=A(async()=>{_t.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(_l).map(async([r,{detector:n,loader:a}])=>{if(a)try{Kx(r)}catch{try{const{diagram:o,id:c}=await a();ig(c,o,n)}catch(o){throw _t.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete _l[r],o}}}))).filter(r=>r.status==="rejected");if(e.length>0){_t.error(`Failed to load ${e.length} external diagrams`);for(const r of e)_t.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),tX="graphics-document document";function WN(i,e){i.attr("role",tX),e!==""&&i.attr("aria-roledescription",e)}A(WN,"setA11yDiagramInfo");function GN(i,e,r,n){if(i.insert!==void 0){if(r){const a=`chart-desc-${n}`;i.attr("aria-describedby",a),i.insert("desc",":first-child").attr("id",a).text(r)}if(e){const a=`chart-title-${n}`;i.attr("aria-labelledby",a),i.insert("title",":first-child").attr("id",a).text(e)}}}A(GN,"addSVGa11yTitleDescription");var xl,Yb=(xl=class{constructor(e,r,n,a,o){this.type=e,this.text=r,this.db=n,this.parser=a,this.renderer=o}static async fromText(e,r={}){var f,p;const n=si(),a=Ov(e,n);e=_H(e)+`
404
+ `;try{Kx(a)}catch{const g=JD(a);if(!g)throw new zA(`Diagram ${a} not found.`);const{id:b,diagram:y}=await g();ig(b,y)}const{db:o,parser:c,renderer:h,init:u}=Kx(a);return c.parser&&(c.parser.yy=o),(f=o.clear)==null||f.call(o),u==null||u(n),r.title&&((p=o.setDiagramTitle)==null||p.call(o,r.title)),await c.parse(e),new xl(a,e,o,c,h)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},A(xl,"Diagram"),xl),fT=[],eX=A(()=>{fT.forEach(i=>{i()}),fT=[]},"attachFunctions"),iX=A(i=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function YN(i){const e=i.match($A);if(!e)return{text:i,metadata:{}};let r=BI(e[1],{schema:TI})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:i.slice(e[0].length),metadata:n}}A(YN,"extractFrontMatter");var rX=A(i=>i.replace(/\r\n?/g,`
405
+ `).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),nX=A(i=>{const{text:e,metadata:r}=YN(i),{displayMode:n,title:a,config:o={}}=r;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:a,config:o,text:e}},"processFrontmatter"),aX=A(i=>{const e=Fn.detectInit(i)??{},r=Fn.detectDirective(i,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:hH(i),directive:e}},"processDirectives");function D1(i){const e=rX(i),r=nX(e),n=aX(r.text),a=b1(r.config,n.directive);return i=iX(n.text),{code:i,title:r.title,config:a}}A(D1,"preprocessDiagram");function VN(i){const e=new TextEncoder().encode(i),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}A(VN,"toBase64");var sX=5e4,oX="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",lX="sandbox",cX="loose",hX="http://www.w3.org/2000/svg",uX="http://www.w3.org/1999/xlink",fX="http://www.w3.org/1999/xhtml",dX="100%",pX="100%",gX="border:0;margin:0;",mX="margin:0",yX="allow-top-navigation-by-user-activation allow-popups",xX='The "iframe" tag is not supported by your browser.',bX=["foreignobject"],vX=["dominant-baseline"];function F1(i){const e=D1(i);return tg(),BF(e.config??{}),e}A(F1,"processAndSetConfigs");async function XN(i,e){pm();try{const{code:r,config:n}=F1(i);return{diagramType:(await ZN(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}A(XN,"parse");var dT=A((i,e,r=[])=>`
406
+ .${i} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),CX=A((i,e=new Map)=>{let r="";if(i.themeCSS!==void 0&&(r+=`
407
+ ${i.themeCSS}`),i.fontFamily!==void 0&&(r+=`
408
+ :root { --mermaid-font-family: ${i.fontFamily}}`),i.altFontFamily!==void 0&&(r+=`
409
+ :root { --mermaid-alt-font-family: ${i.altFontFamily}}`),e instanceof Map){const c=vr(i)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(h=>{hT(h.styles)||c.forEach(u=>{r+=dT(h.id,u,h.styles)}),hT(h.textStyles)||(r+=dT(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),kX=A((i,e,r,n)=>{const a=CX(i,r),o=GF(e,a,{...i.themeVariables,theme:i.theme,look:i.look},n);return Pb(kG(`${n}{${o}}`),wG)},"createUserStyles"),_X=A((i="",e,r)=>{let n=i;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Al(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),wX=A((i="",e)=>{var a,o;const r=(o=(a=e==null?void 0:e.viewBox)==null?void 0:a.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":pX,n=VN(`<body style="${mX}">${i}</body>`);return`<iframe style="width:${dX};height:${r};${gX}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${yX}">
410
+ ${xX}
411
+ </iframe>`},"putIntoIFrame"),pT=A((i,e,r,n,a)=>{const o=i.append("div");o.attr("id",r),n&&o.attr("style",n);const c=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",hX);return a&&c.attr("xmlns:xlink",a),c.append("g"),i},"appendDivSvgG");function Vb(i,e){return i.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}A(Vb,"sandboxedIframe");var SX=A((i,e,r,n)=>{var a,o,c;(a=i.getElementById(e))==null||a.remove(),(o=i.getElementById(r))==null||o.remove(),(c=i.getElementById(n))==null||c.remove()},"removeExistingElements"),TX=A(async function(i,e,r){var K,W,D,U,R,I;pm();const n=F1(e);e=n.code;const a=si();_t.debug(a),e.length>((a==null?void 0:a.maxTextSize)??sX)&&(e=oX);const o="#"+i,c="i"+i,h="#"+c,u="d"+i,f="#"+u,p=A(()=>{const V=Xt(b?h:f).node();V&&"remove"in V&&V.remove()},"removeTempElements");let g=Xt("body");const b=a.securityLevel===lX,y=a.securityLevel===cX,v=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),b){const P=Vb(Xt(r),c);g=Xt(P.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Xt(r);pT(g,i,u,`font-family: ${v}`,uX)}else{if(SX(document,i,u,c),b){const P=Vb(Xt("body"),c);g=Xt(P.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Xt("body");pT(g,i,u)}let C,_;try{C=await Yb.fromText(e,{title:n.title})}catch(P){if(a.suppressErrorRendering)throw p(),P;C=await Yb.fromText("error"),_=P}const w=g.select(f).node(),T=C.type,B=w.firstChild,E=B.firstChild,N=(W=(K=C.renderer).getClasses)==null?void 0:W.call(K,e,C),O=kX(a,T,N,o),M=document.createElement("style");M.innerHTML=O,B.insertBefore(M,E);try{await C.renderer.draw(e,i,"11.14.0",C)}catch(P){throw a.suppressErrorRendering?p():KY.draw(e,i,"11.14.0"),P}const j=g.select(`${f} svg`),G=(U=(D=C.db).getAccTitle)==null?void 0:U.call(D),$=(I=(R=C.db).getAccDescription)==null?void 0:I.call(R);KN(T,j,G,$),g.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",fX);let z=g.select(f).node().innerHTML;if(_t.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),z=_X(z,b,ms(a.arrowMarkerAbsolute)),b){const P=g.select(f+" svg").node();z=wX(z,P)}else y||(z=kl.sanitize(z,{ADD_TAGS:bX,ADD_ATTR:vX,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(eX(),_)throw _;return p(),{diagramType:T,svg:z,bindFunctions:C.db.bindFunctions}},"render");function QN(i={}){var n;const e=Ei({},i);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),SF(e),e!=null&&e.theme&&e.theme in hs?e.themeVariables=hs[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=hs.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?wF(e):UA();jv(r.logLevel),pm()}A(QN,"initialize");var ZN=A((i,e={})=>{const{code:r}=D1(i);return Yb.fromText(r,e)},"getDiagramFromText");function KN(i,e,r,n){WN(e,i),GN(e,r,n,e.attr("id"))}A(KN,"addA11yInfo");var Ml=Object.freeze({render:TX,parse:XN,getDiagramFromText:ZN,initialize:QN,getConfig:si,setConfig:WA,getSiteConfig:UA,updateSiteConfig:TF,reset:A(()=>{tg()},"reset"),globalReset:A(()=>{tg(oh)},"globalReset"),defaultConfig:oh});jv(si().logLevel);tg(si());var BX=A((i,e,r)=>{_t.warn(i),x1(i)?(r&&r(i.str,i.hash),e.push({...i,message:i.str,error:i})):(r&&r(i),i instanceof Error&&e.push({str:i.message,message:i.message,hash:i.name,error:i}))},"handleError"),JN=A(async function(i={querySelector:".mermaid"}){try{await AX(i)}catch(e){if(x1(e)&&_t.error(e.str),Qr.parseError&&Qr.parseError(e),!i.suppressErrors)throw _t.error("Use the suppressErrors option to suppress these errors"),e}},"run"),AX=A(async function({postRenderCallback:i,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Ml.getConfig();_t.debug(`${i?"":"No "}Callback function found`);let a;if(r)a=r;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");_t.debug(`Found ${a.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(_t.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),Ml.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const o=new Fn.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let c;const h=[];for(const u of Array.from(a)){if(_t.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const f=`mermaid-${o.next()}`;c=u.innerHTML,c=mM(Fn.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=Fn.detectInit(c);p&&_t.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:b}=await rj(f,c,u);u.innerHTML=g,i&&await i(f),b&&b(u)}catch(g){BX(g,h,Qr.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),tj=A(function(i){Ml.initialize(i)},"initialize"),EX=A(async function(i,e,r){_t.warn("mermaid.init is deprecated. Please use run instead."),i&&tj(i);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await JN(n)},"init"),MX=A(async(i,{lazyLoad:e=!0}={})=>{pm(),Vx(...i),e===!1&&await JV()},"registerExternalDiagrams"),ej=A(function(){if(Qr.startOnLoad){const{startOnLoad:i}=Ml.getConfig();i&&Qr.run().catch(e=>_t.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",ej,!1);var LX=A(function(i){Qr.parseError=i},"setParseErrorHandler"),Ng=[],tx=!1,ij=A(async()=>{if(!tx){for(tx=!0;Ng.length>0;){const i=Ng.shift();if(i)try{await i()}catch(e){_t.error("Error executing queue",e)}}tx=!1}},"executeQueue"),NX=A(async(i,e)=>new Promise((r,n)=>{const a=A(()=>new Promise((o,c)=>{Ml.parse(i,e).then(h=>{o(h),r(h)},h=>{var u;_t.error("Error parsing",h),(u=Qr.parseError)==null||u.call(Qr,h),c(h),n(h)})}),"performCall");Ng.push(a),ij().catch(n)}),"parse"),rj=A((i,e,r)=>new Promise((n,a)=>{const o=A(()=>new Promise((c,h)=>{Ml.render(i,e,r).then(u=>{c(u),n(u)},u=>{var f;_t.error("Error parsing",u),(f=Qr.parseError)==null||f.call(Qr,u),h(u),a(u)})}),"performCall");Ng.push(o),ij().catch(a)}),"render"),jX=A(()=>Object.keys(_l).map(i=>({id:i})),"getRegisteredDiagramsMetadata"),Qr={startOnLoad:!0,mermaidAPI:Ml,parse:NX,render:rj,init:EX,run:JN,registerExternalDiagrams:MX,registerLayoutLoaders:oN,initialize:tj,parseError:void 0,contentLoaded:ej,setParseErrorHandler:LX,detectType:Ov,registerIconPacks:MU,getRegisteredDiagramsMetadata:jX},$1=Qr;/*! Check if previously processed *//*!
412
+ * Wait for document loaded before starting the execution
413
+ */let gT=null;function OX(i){const e="'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif";return i==="dark"?{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#1c1f2a",primaryColor:"rgba(157, 140, 255, 0.18)",primaryTextColor:"#f5f6fa",primaryBorderColor:"#9d8cff",secondaryColor:"rgba(96, 165, 250, 0.18)",secondaryBorderColor:"#93c5fd",secondaryTextColor:"#f5f6fa",tertiaryColor:"rgba(74, 222, 128, 0.16)",tertiaryBorderColor:"#86efac",tertiaryTextColor:"#f5f6fa",noteBkgColor:"rgba(251, 191, 36, 0.18)",noteBorderColor:"#fcd34d",noteTextColor:"#fcd34d",lineColor:"#9aa0b3",textColor:"#f5f6fa",mainBkg:"rgba(157, 140, 255, 0.18)",nodeBorder:"#9d8cff",clusterBkg:"rgba(255, 255, 255, 0.04)",clusterBorder:"#3d4358",edgeLabelBackground:"#1c1f2a",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}:{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ede9fe",primaryTextColor:"#5b21b6",primaryBorderColor:"#7b68ee",secondaryColor:"#dbeafe",secondaryBorderColor:"#1d4ed8",secondaryTextColor:"#1d4ed8",tertiaryColor:"#dcfce7",tertiaryBorderColor:"#15803d",tertiaryTextColor:"#15803d",noteBkgColor:"#fef3c7",noteBorderColor:"#a16207",noteTextColor:"#a16207",lineColor:"#646464",textColor:"#292d34",mainBkg:"#ede9fe",nodeBorder:"#7b68ee",clusterBkg:"#f7f8f8",clusterBorder:"#e8e8e8",edgeLabelBackground:"#ffffff",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}}function nj(i){gT!==i&&($1.initialize(OX(i)),gT=i)}function RX(i){const e=i.getAttribute("style");if(!e)return;const r=e.split(";").filter(n=>{var o;const a=(o=n.trim().split(":")[0])==null?void 0:o.trim().toLowerCase();return a&&a!=="fill"&&a!=="stroke"&&a!=="color"}).join(";");r.trim()?i.setAttribute("style",r):i.removeAttribute("style")}function aj(i){const e=[".node > rect",".node > polygon",".node > path",".node > circle",".node .label",".node .label *",".node foreignObject *",".cluster > rect",".cluster > polygon",".cluster-label",".cluster-label *",".cluster-label foreignObject *",".edgeLabel",".edgeLabel rect",".edgeLabel foreignObject *",".edgePath path",".marker",".arrowheadPath"];i.querySelectorAll(e.join(", ")).forEach(RX);const r=i.querySelector("style");if(r&&r.textContent){const n=r.textContent.replace(/#[\w-]+\s+\.[\w-]+\s*(?:>\s*\*|\s+span|\s+tspan)\s*\{[^}]*\}/g,"");r.textContent=n}}async function DX(i,e){i.querySelectorAll(".mermaid-rendered").forEach(o=>{const c=o.dataset.mermaidSource;if(!c)return;const h=document.createElement("pre"),u=document.createElement("code");u.className="language-mermaid",u.textContent=c,h.appendChild(u),o.replaceWith(h)});const n=i.querySelectorAll("pre > code.language-mermaid");if(n.length===0)return;let a=0;for(const o of n){const c=o.parentElement;if(!c)continue;const h=(o.textContent??"").trim();if(!h)continue;const u=`${e}-${a++}-${Date.now().toString(36)}`,f=document.createElement("div");f.className="mermaid-rendered",f.dataset.mermaidSource=h;const p=document.createElement("div");p.className="mermaid-stage",f.appendChild(p),c.replaceWith(f);try{const{svg:g}=await $1.render(u,h);p.innerHTML=g;const b=p.querySelector("svg");b&&(b.removeAttribute("height"),b.style.maxWidth="100%",b.style.height="auto",aj(b))}catch(g){const b=g instanceof Error?g.message:String(g);p.innerHTML=`<div class="mermaid-error">Diagram error: ${b.replace(/[<>&]/g,y=>({"<":"&lt;",">":"&gt;","&":"&amp;"})[y]??y)}</div>`}}}function FX(i,e,r,n="mmd"){X.useEffect(()=>{const a=i.current;if(!a||!e)return;nj(r);let o=!1;return queueMicrotask(()=>{o||DX(a,n)}),()=>{o=!0}},[i,e,r,n])}ae.setOptions({gfm:!0,breaks:!0});function Pf({content:i,frontmatter:e}){const r=X.useMemo(()=>kl.sanitize(ae.parse(i)),[i]),n=X.useRef(null),{resolved:a}=Pg();FX(n,r,a,"md-mmd");const o=e?Object.entries(e).filter(([,c])=>c!=null&&c!==""):[];return x.jsxs("div",{className:"md-preview",children:[o.length>0&&x.jsx("div",{className:"md-frontmatter",children:o.map(([c,h])=>x.jsxs("div",{className:"md-fm-row",children:[x.jsx("span",{className:"md-fm-key",children:c}),x.jsx("span",{className:"md-fm-value",children:String(h)})]},c))}),x.jsx("div",{ref:n,className:"markdown-body",dangerouslySetInnerHTML:{__html:r}})]})}function $X({onManagePacks:i}){const{t:e}=oi(),{data:r}=SR(),n=(r==null?void 0:r.nudge)??null,a=(r==null?void 0:r.newPacks)??[],[o,c]=X.useState(!1),h=X.useCallback(u=>{u.key==="Escape"&&o&&c(!1)},[o]);return X.useEffect(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),n?x.jsxs("div",{className:"update-badge",children:[x.jsxs("button",{className:"update-badge-trigger",onClick:()=>c(u=>!u),"aria-expanded":o,title:e("update.title"),children:[x.jsx("span",{className:"update-badge-dot"}),x.jsx("span",{className:"update-badge-label",children:e("update.available")})]}),o&&x.jsxs("div",{className:"update-badge-popover",children:[x.jsxs("div",{className:"update-badge-popover-header",children:[x.jsx("span",{className:"update-badge-popover-title",children:e("update.title")}),x.jsx("button",{className:"update-badge-dismiss",onClick:()=>c(!1),title:e("update.dismiss"),"aria-label":e("update.dismiss"),children:"×"})]}),x.jsx("div",{className:"update-badge-content",children:x.jsx(Pf,{content:n})}),a.length>0&&i&&x.jsx("button",{className:"update-badge-action",onClick:()=>{i(),c(!1)},children:e("update.managePacks")})]})]}):null}const Gu=[.85,.9,1,1.1,1.2],sj="dreamcontext-zoom";function zX(){try{const i=localStorage.getItem(sj);if(i!==null){const e=parseFloat(i);if(Gu.includes(e))return e}}catch{}return 1}function IX(i){document.documentElement.style.setProperty("--zoom",String(i))}function qX({onNavigate:i}){const{theme:e,setTheme:r,resolved:n}=Pg(),{data:a}=vA(),[o,c]=X.useState(zX);X.useEffect(()=>{IX(o)},[o]);const h=(a==null?void 0:a.debt)??0,u=xA(h),f=bA(h),p=()=>{r(e==="system"?"light":e==="light"?"dark":"system")},g=e==="system"?`System (${n})`:n==="dark"?"Dark":"Light",b=Gu.indexOf(o),y=b>0,v=b<Gu.length-1,C=_=>{const w=b+_;if(w<0||w>=Gu.length)return;const T=Gu[w];c(T);try{localStorage.setItem(sj,String(T))}catch{}};return x.jsxs("header",{className:"header",children:[x.jsxs("div",{className:"header-left",children:[x.jsxs("div",{className:`agent-avatar agent-avatar--${f}`,children:[x.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M14 2L24 14L14 26L4 14L14 2Z",fill:"url(#diamond-gradient)",opacity:f==="must_sleep"?.4:f==="sleepy"?.6:f==="drowsy"?.8:1}),x.jsx("path",{d:"M14 8L19 14L14 20L9 14L14 8Z",fill:"url(#diamond-inner)",opacity:f==="must_sleep"?.3:.7}),x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"diamond-gradient",x1:"4",y1:"2",x2:"24",y2:"26",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"hsl(287, 100%, 33%)"}),x.jsx("stop",{offset:"1",stopColor:"hsl(311, 97%, 43%)"})]}),x.jsxs("linearGradient",{id:"diamond-inner",x1:"9",y1:"8",x2:"19",y2:"20",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"hsl(276, 74%, 50%)"}),x.jsx("stop",{offset:"1",stopColor:"hsl(287, 100%, 45%)"})]})]})]}),f==="must_sleep"&&x.jsx("span",{className:"zzz",children:"zzz"})]}),x.jsxs("div",{className:"header-brand",children:[x.jsx("span",{className:"brand-name",children:"dreamcontext"}),x.jsxs("span",{className:`sleep-badge sleep-badge--${f}`,children:[u," (",h,")"]})]})]}),x.jsxs("div",{className:"header-right",children:[x.jsx($X,{onManagePacks:i?()=>i("packs"):void 0}),x.jsxs("div",{className:"zoom-controls",children:[x.jsx("button",{className:"zoom-btn",onClick:()=>C(-1),disabled:!y,title:"Zoom out",children:"-"}),x.jsxs("span",{className:"zoom-label",children:[Math.round(o*100),"%"]}),x.jsx("button",{className:"zoom-btn",onClick:()=>C(1),disabled:!v,title:"Zoom in",children:"+"})]}),x.jsx("button",{className:"theme-toggle",onClick:p,title:`Theme: ${g}`,children:n==="dark"?x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:x.jsx("path",{d:"M8 1a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 1zm0 10a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 11zm7-3a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 15 8zM5 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 5 8zm7.07-4.07a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 1 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zM6.05 10.66a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 0 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zm7.72 3.12a.5.5 0 0 1-.71 0l-1.41-1.41a.5.5 0 1 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM5.34 6.05a.5.5 0 0 1-.71 0L3.22 4.64a.5.5 0 0 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8z"})}):x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:x.jsx("path",{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"})})})]})]})}const PX=[{labelKey:"nav.group.workspace",items:[{page:"brain",icon:"◉",labelKey:"nav.brain"},{page:"tasks",icon:"▦",labelKey:"nav.tasks"},{page:"knowledge",icon:"✦",labelKey:"nav.knowledge"},{page:"features",icon:"⚑",labelKey:"nav.features"},{page:"core",icon:"◈",labelKey:"nav.core"},{page:"council",icon:"⚔",labelKey:"nav.council"},{page:"sleep",icon:"◑",labelKey:"nav.sleep"}]},{labelKey:"nav.group.control",items:[{page:"packs",icon:"◳",labelKey:"nav.packs"},{page:"settings",icon:"⚙",labelKey:"nav.settings"}]}],oj="dreamcontext.dashboard.sidebarCollapsed",lj="dreamcontext.dashboard.aboutSeen",kc=typeof window<"u"&&window.matchMedia?window.matchMedia("(max-width: 1024px)"):null;function HX(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(oj)==="1"}catch{return!1}}function UX(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(lj)==="1"}catch{return!1}}function WX({activePage:i,onNavigate:e}){const{t:r}=oi(),[n,a]=X.useState(HX),[o,c]=X.useState((kc==null?void 0:kc.matches)??!1),[h,u]=X.useState(UX);X.useEffect(()=>{if(!kc)return;const v=C=>c(C.matches);return kc.addEventListener("change",v),()=>kc.removeEventListener("change",v)},[]);const f=o||n,p=()=>{a(v=>{const C=!v;try{window.localStorage.setItem(oj,C?"1":"0")}catch{}return C})},g=()=>{if(!h){u(!0);try{window.localStorage.setItem(lj,"1")}catch{}}e("about")},b=!h&&i!=="about";let y=0;return x.jsxs("nav",{className:`sidebar${f?" sidebar--collapsed":""}`,"aria-label":"Primary",children:[x.jsxs("button",{type:"button",className:"sidebar-toggle","data-testid":"sidebar-collapse",onClick:p,"aria-expanded":!f,"aria-label":r(f?"nav.expand":"nav.collapse"),title:r(f?"nav.expand":"nav.collapse"),children:[x.jsx("span",{className:"sidebar-toggle-icon",children:f?"»":"«"}),x.jsx("span",{className:"sidebar-label",children:r("nav.collapse")})]}),PX.map(v=>x.jsxs("div",{className:"sidebar-group",children:[x.jsx("span",{className:"sidebar-group-label",children:r(v.labelKey)}),x.jsx("ul",{className:"sidebar-nav",children:v.items.map(({page:C,icon:_,labelKey:w})=>{y+=1;const T=r(w);return x.jsx("li",{className:`animate-stagger animate-stagger-${y}`,children:x.jsxs("button",{className:`sidebar-item ${i===C?"sidebar-item--active":""}`,onClick:()=>e(C),title:T,"aria-current":i===C?"page":void 0,children:[x.jsx("span",{className:"sidebar-icon",children:_}),x.jsx("span",{className:"sidebar-label",children:T})]})},C)})})]},v.labelKey)),x.jsx("div",{className:"sidebar-footer",children:x.jsxs("button",{className:`sidebar-item sidebar-item--about ${i==="about"?"sidebar-item--active":""}${b?" sidebar-item--nudge":""}`,onClick:g,title:r("nav.about"),"aria-current":i==="about"?"page":void 0,children:[x.jsx("span",{className:"sidebar-icon",children:"✷"}),x.jsx("span",{className:"sidebar-label",children:r("nav.about")})]})})]})}const cj="dreamcontext.dashboard.activePage",GX=["tasks","core","knowledge","features","sleep","brain","council","settings","packs","about"];function YX(){if(typeof window>"u")return"brain";try{const i=window.localStorage.getItem(cj);if(i&&GX.includes(i))return i}catch{}return"brain"}function VX({children:i}){const[e,r]=X.useState(YX),[n,a]=X.useState(null),[o,c]=X.useState(0),h=X.useCallback((p,g)=>{r(p),a(g),c(b=>b+1);try{window.localStorage.setItem(cj,p)}catch{}},[]),u=X.useCallback(p=>{h(p,null)},[h]),f=X.useCallback(()=>a(null),[]);return x.jsxs("div",{className:"shell",children:[x.jsx(qX,{onNavigate:u}),x.jsxs("div",{className:"shell-body",children:[x.jsx(WX,{activePage:e,onNavigate:u}),x.jsx("main",{className:"shell-main",children:i({page:e,focusId:n,nonce:o,navigate:h,clearFocus:f})})]})]})}function XX(){return zi({queryKey:["tasks"],queryFn:()=>qe.get("/tasks"),select:i=>i.tasks})}function QX(){const i=Kr();return Ta({mutationFn:e=>qe.post("/tasks",e),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function hj(){const i=Kr();return Ta({mutationFn:({slug:e,updates:r})=>qe.patch(`/tasks/${e}`,r),onSuccess:(e,r)=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks",r.slug]})}})}function ZX(){const i=Kr();return Ta({mutationFn:({slug:e,content:r})=>qe.post(`/tasks/${e}/changelog`,{content:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function uj(){return zi({queryKey:["releases"],queryFn:()=>qe.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"}))})}function fj(){return zi({queryKey:["releases"],queryFn:()=>qe.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function KX(){const i=Kr();return Ta({mutationFn:e=>qe.post("/releases",{...e,status:"planning"}),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}function JX(){const i=Kr();return Ta({mutationFn:({version:e,updates:r})=>qe.patch(`/releases/${encodeURIComponent(e)}`,r),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}const dj="dreamcontext:",pj="kanban-presets",Xb=`${dj}${pj}`;function gj(i){return i?`${dj}${i}:${pj}`:Xb}function tQ(i){const e=gj(i);try{const r=localStorage.getItem(e);if(r!==null){const n=JSON.parse(r);return Array.isArray(n)?n:[]}if(i){const n=localStorage.getItem(Xb);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(Xb);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function mj(i,e){try{localStorage.setItem(gj(i),JSON.stringify(e))}catch{}}const jg=new Map;function z1(i){let e=jg.get(i);return e===void 0&&(e=tQ(i),jg.set(i,e)),e}const Qb=new Set;function eQ(i){return Qb.add(i),()=>{Qb.delete(i)}}function yj(){for(const i of Qb)i()}function iQ(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function rQ(i){return X.useSyncExternalStore(eQ,()=>z1(i))}function nQ(i,e,r){const n={id:iQ(),name:e,filters:r},o=[...z1(i),n];return jg.set(i,o),mj(i,o),yj(),n}function aQ(i,e){const r=z1(i),n=r.filter(a=>a.id!==e);n.length!==r.length&&(jg.set(i,n),mj(i,n),yj())}const sQ=10;function Fl(i){let e=2166136261;for(let r=0;r<i.length;r++)e^=i.charCodeAt(r),e=Math.imul(e,16777619);return(e>>>0)%sQ}function Hf({task:i,onClick:e,onDragStart:r}){return x.jsxs("div",{className:"task-card",draggable:!0,onDragStart:r,onClick:e,role:"button",tabIndex:0,onKeyDown:n=>{n.key==="Enter"&&e()},children:[x.jsxs("div",{className:"task-card-header",children:[x.jsx("span",{className:`priority-dot priority-dot--${i.priority}`,title:`Priority: ${i.priority}`}),i.urgency&&i.urgency!=="medium"&&x.jsx("span",{className:`urgency-bar urgency-bar--${i.urgency}`,title:`Urgency: ${i.urgency}`}),x.jsx("span",{className:"task-card-name",children:i.name})]}),i.description&&x.jsxs("p",{className:"task-card-desc",children:[i.description.slice(0,100),i.description.length>100?"...":""]}),x.jsxs("div",{className:"task-card-footer",children:[i.tags.length>0&&x.jsx("div",{className:"task-card-tags",children:i.tags.slice(0,3).map(n=>x.jsx("span",{className:"task-tag","data-hue":Fl(n),children:n},n))}),x.jsx("span",{className:"task-card-date",children:i.updated_at})]})]})}function oQ({label:i,color:e,tasks:r,onTaskClick:n,onDragStart:a}){const[o,c]=X.useState(!1);return x.jsxs("div",{className:"sub-group",children:[x.jsxs("button",{className:"sub-group-header",onClick:()=>c(h=>!h),children:[x.jsx("svg",{className:`sub-group-chevron ${o?"":"sub-group-chevron--open"}`,width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:x.jsx("path",{d:"M3 2L7 5L3 8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})}),e&&x.jsx("span",{className:"sub-group-dot",style:{background:e}}),x.jsx("span",{className:"sub-group-label",children:i}),x.jsx("span",{className:"sub-group-count",children:r.length})]}),!o&&x.jsx("div",{className:"sub-group-cards",children:r.map(h=>x.jsx(Hf,{task:h,onClick:()=>n(h),onDragStart:u=>a(u,h)},h.slug))})]})}function mT({title:i,status:e,tasks:r,count:n,colorVar:a,onTaskClick:o,onDrop:c,subGroups:h}){const[u,f]=X.useState(!1),p=v=>{v.preventDefault(),v.dataTransfer.dropEffect="move",f(!0)},g=()=>{f(!1)},b=v=>{v.preventDefault(),f(!1);const C=v.dataTransfer.getData("text/plain");C&&c(C,e)},y=(v,C)=>{v.dataTransfer.setData("text/plain",C.slug),v.dataTransfer.effectAllowed="move"};return x.jsxs("div",{className:`kanban-column ${u?"kanban-column--dragover":""}`,onDragOver:p,onDragLeave:g,onDrop:b,children:[x.jsxs("div",{className:"kanban-column-header",children:[x.jsx("span",{className:"kanban-column-dot",style:{background:`var(${a})`}}),x.jsx("span",{className:"kanban-column-title",children:i}),x.jsx("span",{className:"kanban-column-count",children:n})]}),x.jsx("div",{className:"kanban-column-cards",children:h&&h.length>0?h.map(v=>x.jsx(oQ,{label:v.label,color:v.color,tasks:v.tasks,onTaskClick:o,onDragStart:y},v.key)):r.map(v=>x.jsx(Hf,{task:v,onClick:()=>o(v),onDragStart:C=>y(C,v)},v.slug))})]})}function Ec({trigger:i,content:e,isOpen:r,onClose:n,align:a="left",width:o}){const c=X.useRef(null),h=X.useCallback(f=>{c.current&&!c.current.contains(f.target)&&n()},[n]),u=X.useCallback(f=>{f.key==="Escape"&&n()},[n]);return X.useEffect(()=>{if(r)return document.addEventListener("mousedown",h),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",u)}},[r,h,u]),x.jsxs("div",{className:"filter-popover",ref:c,children:[i,r&&x.jsx("div",{className:`filter-popover-dropdown filter-popover-dropdown--${a}`,style:o?{width:`${o}px`}:void 0,children:e})]})}function lQ({open:i}){return x.jsx("svg",{className:`filter-chip-chevron ${i?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:x.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function Su({label:i,options:e,selected:r,onChange:n,isOpen:a,onToggle:o,onClose:c}){var w,T;const h=r.length>0,[u,f]=X.useState(""),p=X.useRef(null);X.useEffect(()=>{a?requestAnimationFrame(()=>{var B;return(B=p.current)==null?void 0:B.focus()}):f("")},[a]);const g=u.trim()?e.filter(B=>B.label.toLowerCase().includes(u.trim().toLowerCase())):e,b=B=>{r.includes(B)?n(r.filter(E=>E!==B)):n([...r,B])},y=()=>n(e.map(B=>B.value)),v=()=>n([]),C=h?r.length<=2?r.map(B=>{var E;return((E=e.find(N=>N.value===B))==null?void 0:E.label)??B}).join(", "):`${((w=e.find(B=>B.value===r[0]))==null?void 0:w.label)??r[0]} +${r.length-1}`:i,_=e.length>5;return x.jsx(Ec,{isOpen:a,onClose:c,trigger:x.jsxs("button",{className:`filter-chip ${h?"filter-chip--active":""}`,onClick:o,children:[h&&r.length===1&&x.jsx("span",{className:"filter-chip-dot",style:{background:(T=e.find(B=>B.value===r[0]))==null?void 0:T.color}}),x.jsx("span",{className:"filter-chip-label",children:C}),x.jsx(lQ,{open:a})]}),content:x.jsxs("div",{className:"multi-select-list",children:[_&&x.jsx("div",{className:"multi-select-search-wrap",children:x.jsx("input",{ref:p,className:"multi-select-search",placeholder:"Search...",value:u,onChange:B=>f(B.target.value)})}),x.jsxs("div",{className:"multi-select-actions",children:[x.jsx("button",{className:"multi-select-action",onClick:y,children:"All"}),x.jsx("button",{className:"multi-select-action",onClick:v,children:"None"})]}),x.jsxs("div",{className:"multi-select-options",children:[g.map(B=>x.jsxs("label",{className:"multi-select-option",children:[x.jsx("input",{type:"checkbox",checked:r.includes(B.value),onChange:()=>b(B.value)}),B.color&&x.jsx("span",{className:"filter-option-dot",style:{background:B.color}}),x.jsx("span",{className:"filter-option-label",children:B.label})]},B.value)),g.length===0&&x.jsx("div",{className:"multi-select-no-results",children:"No matches"})]})]})})}function yT(i){return String(i).padStart(2,"0")}function ko(i){return`${i.getFullYear()}-${yT(i.getMonth()+1)}-${yT(i.getDate())}`}function xj(){return ko(new Date)}function vp(i){const e=new Date;return e.setDate(e.getDate()-i),ko(e)}function cQ(){const i=new Date,e=i.getDay();return i.setDate(i.getDate()-(e===0?6:e-1)),ko(i)}function hQ(){const i=new Date;return i.setDate(1),ko(i)}function uQ(){const i=new Date;return i.setMonth(0,1),ko(i)}function xT(i){return new Date(i+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function fQ(){const i=xj();return[{label:"Today",from:i,to:i},{label:"Yesterday",from:vp(1),to:vp(1)},{label:"This week",from:cQ(),to:i},{label:"Last 7 days",from:vp(6),to:i},{label:"This month",from:hQ(),to:i},{label:"Last 30 days",from:vp(29),to:i},{label:"This year",from:uQ(),to:i}]}const dQ=["January","February","March","April","May","June","July","August","September","October","November","December"],pQ=["Mo","Tu","We","Th","Fr","Sa","Su"];function gQ({dateField:i,dateFrom:e,dateTo:r,onDateFieldChange:n,onDateFromChange:a,onDateToChange:o}){const c=new Date,[h,u]=X.useState(()=>e?parseInt(e.slice(0,4),10):c.getFullYear()),[f,p]=X.useState(()=>e?parseInt(e.slice(5,7),10)-1:c.getMonth()),g=X.useMemo(fQ,[]),b=X.useMemo(()=>{const E=new Date(h,f+1,0).getDate(),N=new Date(h,f,1).getDay(),O=N===0?6:N-1,M=[],j=new Date(h,f,0).getDate();for(let $=O-1;$>=0;$--){const z=j-$,K=f===0?11:f-1,W=f===0?h-1:h;M.push({date:ko(new Date(W,K,z)),day:z,isCurrentMonth:!1})}for(let $=1;$<=E;$++)M.push({date:ko(new Date(h,f,$)),day:$,isCurrentMonth:!0});const G=42-M.length;for(let $=1;$<=G;$++){const z=f===11?0:f+1,K=f===11?h+1:h;M.push({date:ko(new Date(K,z,$)),day:$,isCurrentMonth:!1})}return M},[h,f]),y=E=>{!e||e&&r?(a(E),o("")):E<e?(o(e),a(E)):o(E)},v=E=>{a(E.from),o(E.to);const N=new Date(E.from+"T00:00:00");u(N.getFullYear()),p(N.getMonth())},C=()=>{a(""),o("")},_=()=>{f===0?(p(11),u(E=>E-1)):p(E=>E-1)},w=()=>{f===11?(p(0),u(E=>E+1)):p(E=>E+1)},T=xj(),B=g.find(E=>E.from===e&&E.to===r);return x.jsxs("div",{className:"mini-cal",children:[x.jsxs("div",{className:"mini-cal-field-toggle",children:[x.jsx("button",{className:`mini-cal-field-btn ${i==="updated_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("updated_at"),children:"Updated"}),x.jsx("button",{className:`mini-cal-field-btn ${i==="created_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("created_at"),children:"Created"})]}),x.jsx("div",{className:"mini-cal-presets",children:g.map(E=>x.jsx("button",{className:`mini-cal-preset ${(B==null?void 0:B.label)===E.label?"mini-cal-preset--active":""}`,onClick:()=>v(E),children:E.label},E.label))}),x.jsx("div",{className:"mini-cal-divider"}),x.jsxs("div",{className:"mini-cal-nav-row",children:[x.jsx("button",{className:"mini-cal-nav-btn",onClick:_,"aria-label":"Previous month",children:x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M8.5 3L4.5 7L8.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),x.jsxs("span",{className:"mini-cal-month-label",children:[dQ[f]," ",h]}),x.jsx("button",{className:"mini-cal-nav-btn",onClick:w,"aria-label":"Next month",children:x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M5.5 3L9.5 7L5.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),x.jsxs("div",{className:"mini-cal-grid",children:[pQ.map(E=>x.jsx("div",{className:"mini-cal-day-label",children:E},E)),b.map((E,N)=>{const O=E.date===e,M=E.date===r,j=e&&r&&E.date>e&&E.date<r,G=O&&!r,$=O||M,z=["mini-cal-day",!E.isCurrentMonth&&"mini-cal-day--outside",E.date===T&&"mini-cal-day--today",$&&"mini-cal-day--selected",O&&r&&"mini-cal-day--range-start",M&&e&&"mini-cal-day--range-end",j&&"mini-cal-day--in-range",G&&"mini-cal-day--single"].filter(Boolean).join(" ");return x.jsx("button",{className:z,onClick:()=>y(E.date),children:E.day},N)})]}),(e||r)&&x.jsxs("div",{className:"mini-cal-footer",children:[x.jsxs("span",{className:"mini-cal-range-text",children:[e&&x.jsx("span",{children:xT(e)}),e&&r&&e!==r&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"mini-cal-arrow",children:"→"}),x.jsx("span",{children:xT(r)})]}),e&&!r&&x.jsx("span",{className:"mini-cal-hint",children:"Pick end date"})]}),x.jsx("button",{className:"mini-cal-clear-btn",onClick:C,children:"Clear"})]})]})}const Og={priorityFilter:[],statusFilter:[],urgencyFilter:[],tagFilter:[],versionFilter:[],searchQuery:"",dateField:"updated_at",dateFrom:"",dateTo:"",minRice:null,sortField:"updated_at",groupBy:"status",subGroupBy:"none",viewMode:"kanban"};function mQ(){return x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("circle",{cx:"5.8",cy:"5.8",r:"4.3",stroke:"currentColor",strokeWidth:"1.4"}),x.jsx("path",{d:"M9 9L12.5 12.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function Cp({open:i}){return x.jsx("svg",{className:`filter-chip-chevron ${i?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:x.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function ex(){return x.jsx("svg",{className:"filter-option-check",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M3 7L6 10L11 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function bT(){return x.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:x.jsx("path",{d:"M2.5 2.5L7.5 7.5M7.5 2.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function yQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("path",{d:"M1.5 5.5H12.5",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("path",{d:"M4.5 1V3.5M9.5 1V3.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function xQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("path",{d:"M4 1.5V5H10V1.5",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"4",y:"7.5",width:"6",height:"3.5",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"})]})}function bQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1",y:"1",width:"3.5",height:"12",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"5.25",y:"1",width:"3.5",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"9.5",y:"1",width:"3.5",height:"10",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function vQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"7.5",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"1",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"7.5",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function CQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("circle",{cx:"3",cy:"11",r:"1.4",fill:"currentColor"}),x.jsx("circle",{cx:"6",cy:"6",r:"1.6",fill:"currentColor"}),x.jsx("circle",{cx:"10",cy:"8",r:"1.2",fill:"currentColor"}),x.jsx("circle",{cx:"11",cy:"3",r:"1",fill:"currentColor"})]})}function kQ(){return x.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M2 3.5H12M2 7H12M2 10.5H12",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function _Q(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("path",{d:"M2 2V12",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),x.jsx("path",{d:"M2 3H9L7 5.5L9 8H2",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]})}const wQ=[{value:"todo",label:"To Do",color:"var(--color-status-todo)"},{value:"in_progress",label:"In Progress",color:"var(--color-status-in-progress)"},{value:"in_review",label:"In Review",color:"var(--color-status-in-review)"},{value:"completed",label:"Completed",color:"var(--color-status-completed)"}],SQ=[{value:"critical",label:"Critical",color:"var(--color-priority-critical)"},{value:"high",label:"High",color:"var(--color-priority-high)"},{value:"medium",label:"Medium",color:"var(--color-priority-medium)"},{value:"low",label:"Low",color:"var(--color-priority-low)"}],TQ=[{value:"critical",label:"Critical",color:"var(--color-urgency-critical)"},{value:"high",label:"High",color:"var(--color-urgency-high)"},{value:"medium",label:"Medium",color:"var(--color-urgency-medium)"},{value:"low",label:"Low",color:"var(--color-urgency-low)"}],vT=[{value:"updated_at",label:"Last updated"},{value:"created_at",label:"Date created"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"rice",label:"RICE score"},{value:"name",label:"Name"}],ix=[{value:"status",label:"Status"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"tags",label:"Tags"},{value:"version",label:"Version"},{value:"none",label:"No grouping"}];function BQ(i){let e=0;return i.priorityFilter.length>0&&e++,i.statusFilter.length>0&&e++,i.urgencyFilter.length>0&&e++,i.tagFilter.length>0&&e++,i.versionFilter.length>0&&e++,i.searchQuery.trim()&&e++,(i.dateFrom||i.dateTo)&&e++,i.minRice!==null&&i.minRice!==void 0&&e++,e}function AQ(i){if(!i.dateFrom&&!i.dateTo)return null;const e=new Date().toISOString().slice(0,10);if(i.dateFrom===e&&i.dateTo===e)return"Today";const r=new Date;r.setDate(r.getDate()-1);const n=r.toISOString().slice(0,10);if(i.dateFrom===n&&i.dateTo===n)return"Yesterday";if(i.dateTo===e){const a=new Date;if(a.setDate(a.getDate()-6),i.dateFrom===a.toISOString().slice(0,10))return"Last 7 days";const o=new Date;if(o.setDate(o.getDate()-29),i.dateFrom===o.toISOString().slice(0,10))return"Last 30 days"}return"Custom"}function EQ({filters:i,onFilterChange:e,onClearFilters:r,onCreateClick:n,presets:a,onSavePreset:o,onLoadPreset:c,onDeletePreset:h,allTags:u,allVersions:f,onVersionManagerClick:p}){var G,$;const{t:g}=oi(),[b,y]=X.useState(null),[v,C]=X.useState(""),_=BQ(i),w=X.useMemo(()=>AQ(i),[i]),T=z=>y(K=>K===z?null:z),B=()=>y(null),E=(G=vT.find(z=>z.value===i.sortField))==null?void 0:G.label,N=($=ix.find(z=>z.value===i.groupBy))==null?void 0:$.label,O=X.useMemo(()=>u.map(z=>({value:z,label:z})),[u]),M=X.useMemo(()=>f.map(z=>({value:z,label:z})),[f]),j=X.useMemo(()=>ix.filter(z=>z.value!==i.groupBy&&z.value!=="none").concat({value:"none",label:"No sub-group"}),[i.groupBy]);return x.jsxs("div",{className:"filter-bar",children:[x.jsxs("div",{className:"filter-search",children:[x.jsx(mQ,{}),x.jsx("input",{className:"filter-search-input",placeholder:"Search tasks...",value:i.searchQuery,onChange:z=>e("searchQuery",z.target.value)}),i.searchQuery&&x.jsx("button",{className:"filter-search-clear",onClick:()=>e("searchQuery",""),children:x.jsx(bT,{})})]}),x.jsx("div",{className:"filter-bar-divider"}),x.jsx(Su,{id:"status",label:"Status",options:wQ,selected:i.statusFilter,onChange:z=>e("statusFilter",z),isOpen:b==="status",onToggle:()=>T("status"),onClose:B}),x.jsx(Su,{id:"priority",label:"Priority",options:SQ,selected:i.priorityFilter,onChange:z=>e("priorityFilter",z),isOpen:b==="priority",onToggle:()=>T("priority"),onClose:B}),x.jsx(Su,{id:"urgency",label:"Urgency",options:TQ,selected:i.urgencyFilter,onChange:z=>e("urgencyFilter",z),isOpen:b==="urgency",onToggle:()=>T("urgency"),onClose:B}),O.length>0&&x.jsx(Su,{id:"tags",label:"Tags",options:O,selected:i.tagFilter,onChange:z=>e("tagFilter",z),isOpen:b==="tags",onToggle:()=>T("tags"),onClose:B}),M.length>0&&x.jsx(Su,{id:"version",label:"Version",options:M,selected:i.versionFilter,onChange:z=>e("versionFilter",z),isOpen:b==="version",onToggle:()=>T("version"),onClose:B}),x.jsx(Ec,{isOpen:b==="date",onClose:B,width:320,trigger:x.jsxs("button",{className:`filter-chip ${w?"filter-chip--active":""}`,onClick:()=>T("date"),children:[x.jsx(yQ,{}),x.jsx("span",{className:"filter-chip-label",children:w??"Date"}),x.jsx(Cp,{open:b==="date"})]}),content:x.jsx(gQ,{dateField:i.dateField,dateFrom:i.dateFrom,dateTo:i.dateTo,onDateFieldChange:z=>e("dateField",z),onDateFromChange:z=>e("dateFrom",z),onDateToChange:z=>e("dateTo",z)})}),x.jsx(Ec,{isOpen:b==="minRice",onClose:B,width:220,trigger:x.jsxs("button",{className:`filter-chip ${i.minRice!==null?"filter-chip--active":""}`,onClick:()=>T("minRice"),children:[x.jsx("span",{className:"filter-chip-label",children:i.minRice!==null?`${g("filter.min_rice")} ≥ ${i.minRice}`:g("filter.min_rice")}),x.jsx(Cp,{open:b==="minRice"})]}),content:x.jsxs("div",{className:"filter-min-rice",children:[x.jsx("label",{className:"filter-min-rice-label",htmlFor:"filter-min-rice-input",children:g("filter.min_rice")}),x.jsx("input",{id:"filter-min-rice-input",type:"number",min:"0",step:"0.1",className:"field-input",value:i.minRice??"",placeholder:"e.g. 5",onChange:z=>{const K=z.target.value.trim();if(K===""){e("minRice",null);return}const W=Number(K);e("minRice",Number.isFinite(W)?W:null)}}),i.minRice!==null&&x.jsx("button",{type:"button",className:"filter-min-rice-clear",onClick:()=>e("minRice",null),children:"Clear"})]})}),_>0&&x.jsxs("button",{className:"filter-clear-all",onClick:r,children:["Clear ",x.jsx("span",{className:"filter-clear-count",children:_})]}),x.jsx("div",{className:"filter-bar-spacer"}),x.jsxs("div",{className:"filter-view-toggle",children:[x.jsx("button",{className:`filter-view-btn ${i.viewMode==="kanban"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","kanban"),title:"Kanban view",children:x.jsx(bQ,{})}),x.jsx("button",{className:`filter-view-btn ${i.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:x.jsx(vQ,{})}),x.jsx("button",{className:`filter-view-btn ${i.viewMode==="scatter"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","scatter"),title:"RICE scatter (Impact × Effort)",children:x.jsx(CQ,{})}),x.jsx("button",{className:`filter-view-btn ${i.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:x.jsx(kQ,{})})]}),x.jsx("div",{className:"filter-bar-divider"}),x.jsx(Ec,{isOpen:b==="sort",onClose:B,align:"right",trigger:x.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("sort"),children:[x.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M2 4H12M4 7H10M6 10H8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})}),x.jsx("span",{className:"filter-chip-label",children:E}),x.jsx(Cp,{open:b==="sort"})]}),content:x.jsxs("div",{className:"filter-option-list",children:[x.jsx("div",{className:"filter-popover-section",children:"Sort by"}),vT.map(z=>x.jsxs("button",{className:`filter-option ${i.sortField===z.value?"filter-option--selected":""}`,onClick:()=>{e("sortField",z.value),B()},children:[x.jsx("span",{className:"filter-option-label",children:z.label}),i.sortField===z.value&&x.jsx(ex,{})]},z.value))]})}),x.jsx(Ec,{isOpen:b==="group",onClose:B,align:"right",trigger:x.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("group"),children:[x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1.5",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"8",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"1.5",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"8",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]}),x.jsx("span",{className:"filter-chip-label",children:N}),x.jsx(Cp,{open:b==="group"})]}),content:x.jsxs("div",{className:"filter-option-list",children:[x.jsx("div",{className:"filter-popover-section",children:"Group by"}),ix.map(z=>x.jsxs("button",{className:`filter-option ${i.groupBy===z.value?"filter-option--selected":""}`,onClick:()=>{e("groupBy",z.value),B()},children:[x.jsx("span",{className:"filter-option-label",children:z.label}),i.groupBy===z.value&&x.jsx(ex,{})]},z.value)),i.groupBy!=="none"&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"filter-popover-section",style:{marginTop:"var(--space-2)"},children:"Sub-group by"}),j.map(z=>x.jsxs("button",{className:`filter-option ${i.subGroupBy===z.value?"filter-option--selected":""}`,onClick:()=>{e("subGroupBy",z.value),B()},children:[x.jsx("span",{className:"filter-option-label",children:z.label}),i.subGroupBy===z.value&&x.jsx(ex,{})]},`sub-${z.value}`))]})]})}),x.jsx("div",{className:"filter-bar-divider"}),x.jsx("button",{className:"filter-chip filter-chip--subtle",onClick:p,title:"Manage versions",children:x.jsx(_Q,{})}),x.jsx(Ec,{isOpen:b==="views",onClose:B,align:"right",width:220,trigger:x.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("views"),children:[x.jsx(xQ,{}),x.jsx("span",{className:"filter-chip-label",children:"Views"}),a.length>0&&x.jsx("span",{className:"filter-chip-badge",children:a.length})]}),content:x.jsxs("div",{className:"filter-views",children:[a.length===0?x.jsx("div",{className:"filter-views-empty",children:"No saved views yet"}):x.jsx("div",{className:"filter-views-list",children:a.map(z=>x.jsxs("div",{className:"filter-views-item",children:[x.jsx("button",{className:"filter-views-load",onClick:()=>{c(z),B()},children:z.name}),x.jsx("button",{className:"filter-views-delete",onClick:()=>h(z.id),children:x.jsx(bT,{})})]},z.id))}),x.jsx("div",{className:"filter-popover-divider"}),x.jsxs("div",{className:"filter-views-save",children:[x.jsx("input",{className:"filter-views-input",placeholder:"Save current view...",value:v,onChange:z=>C(z.target.value),onKeyDown:z=>{z.key==="Enter"&&v.trim()&&(o(v.trim()),C(""))}}),x.jsx("button",{className:"filter-views-save-btn",disabled:!v.trim(),onClick:()=>{v.trim()&&(o(v.trim()),C(""))},children:"Save"})]})]})}),x.jsxs("button",{className:"filter-create-btn",onClick:n,children:[x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),g("tasks.create")]})]})}function MQ({onClose:i}){const{t:e}=oi(),r=QX(),{data:n}=fj(),[a,o]=X.useState(""),[c,h]=X.useState(""),[u,f]=X.useState("medium"),[p,g]=X.useState("medium"),[b,y]=X.useState(""),[v,C]=X.useState(""),[_,w]=X.useState(""),T=B=>{if(B.preventDefault(),!a.trim())return;const E=b.split(",").map(N=>N.trim()).filter(Boolean);r.mutate({name:a.trim(),description:c,priority:u,tags:E,urgency:p!=="medium"?p:void 0,why:v.trim()||void 0,version:_||void 0},{onSuccess:()=>i()})};return x.jsx("div",{className:"modal-overlay",onClick:i,children:x.jsxs("div",{className:"modal",onClick:B=>B.stopPropagation(),children:[x.jsxs("div",{className:"modal-header",children:[x.jsx("h2",{className:"modal-title",children:e("tasks.create")}),x.jsx("button",{className:"modal-close",onClick:i,children:"×"})]}),x.jsxs("form",{onSubmit:T,className:"modal-body",children:[x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:e("tasks.name")}),x.jsx("input",{className:"field-input",value:a,onChange:B=>o(B.target.value),placeholder:"e.g. Implement user auth",autoFocus:!0,required:!0})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:e("tasks.description")}),x.jsx("textarea",{className:"field-textarea",value:c,onChange:B=>h(B.target.value),placeholder:"What needs to be done?",rows:3})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:e("tasks.priority")}),x.jsxs("select",{className:"field-select",value:u,onChange:B=>f(B.target.value),children:[x.jsx("option",{value:"low",children:e("priority.low")}),x.jsx("option",{value:"medium",children:e("priority.medium")}),x.jsx("option",{value:"high",children:e("priority.high")}),x.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:"Urgency"}),x.jsxs("select",{className:"field-select",value:p,onChange:B=>g(B.target.value),children:[x.jsx("option",{value:"low",children:e("priority.low")}),x.jsx("option",{value:"medium",children:e("priority.medium")}),x.jsx("option",{value:"high",children:e("priority.high")}),x.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:"Version"}),x.jsxs("select",{className:"field-select",value:_,onChange:B=>w(B.target.value),children:[x.jsx("option",{value:"",children:"No version"}),(n??[]).map(B=>x.jsx("option",{value:B.version,children:B.version},B.version))]})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:"Why"}),x.jsx("textarea",{className:"field-textarea",value:v,onChange:B=>C(B.target.value),placeholder:"Why is this task needed?",rows:2})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:e("tasks.tags")}),x.jsx("input",{className:"field-input",value:b,onChange:B=>y(B.target.value),placeholder:"Comma-separated tags"})]}),x.jsxs("div",{className:"modal-actions",children:[x.jsx("button",{type:"button",className:"btn btn--ghost",onClick:i,children:e("tasks.cancel")}),x.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!a.trim()||r.isPending,children:r.isPending?"...":e("tasks.save")})]})]})]})})}var Tu={exports:{}},CT;function LQ(){if(CT)return Tu.exports;CT=1,Tu.exports=i,Tu.exports.addWheelListener=i,Tu.exports.removeWheelListener=e;function i(r,n,a){r.addEventListener("wheel",n,a)}function e(r,n,a){r.removeEventListener("wheel",n,a)}return Tu.exports}var Bu={exports:{}},rx,kT;function NQ(){if(kT)return rx;kT=1;var i=4,e=.001,r=1e-7,n=10,a=11,o=1/(a-1),c=typeof Float32Array=="function";function h(C,_){return 1-3*_+3*C}function u(C,_){return 3*_-6*C}function f(C){return 3*C}function p(C,_,w){return((h(_,w)*C+u(_,w))*C+f(_))*C}function g(C,_,w){return 3*h(_,w)*C*C+2*u(_,w)*C+f(_)}function b(C,_,w,T,B){var E,N,O=0;do N=_+(w-_)/2,E=p(N,T,B)-C,E>0?w=N:_=N;while(Math.abs(E)>r&&++O<n);return N}function y(C,_,w,T){for(var B=0;B<i;++B){var E=g(_,w,T);if(E===0)return _;var N=p(_,w,T)-C;_-=N/E}return _}function v(C){return C}return rx=function(_,w,T,B){if(!(0<=_&&_<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(_===w&&T===B)return v;for(var E=c?new Float32Array(a):new Array(a),N=0;N<a;++N)E[N]=p(N*o,_,T);function O(M){for(var j=0,G=1,$=a-1;G!==$&&E[G]<=M;++G)j+=o;--G;var z=(M-E[G])/(E[G+1]-E[G]),K=j+z*o,W=g(K,_,T);return W>=e?y(M,K,_,T):W===0?K:b(M,j,j+o,_,T)}return function(j){return j===0?0:j===1?1:p(O(j),w,B)}},rx}var _T;function jQ(){if(_T)return Bu.exports;_T=1;var i=NQ(),e={ease:i(.25,.1,.25,1),easeIn:i(.42,0,1,1),easeOut:i(0,0,.58,1),easeInOut:i(.42,0,.58,1),linear:i(0,0,1,1)};Bu.exports=r,Bu.exports.makeAggregateRaf=h,Bu.exports.sharedScheduler=h();function r(u,f,p){var g=Object.create(null),b=Object.create(null);p=p||{};var y=typeof p.easing=="function"?p.easing:e[p.easing];y||(p.easing&&console.warn("Unknown easing function in amator: "+p.easing),y=e.ease);var v=typeof p.step=="function"?p.step:n,C=typeof p.done=="function"?p.done:n,_=a(p.scheduler),w=Object.keys(f);w.forEach(function(G){g[G]=u[G],b[G]=f[G]-u[G]});var T=typeof p.duration=="number"?p.duration:400,B=Math.max(1,T*.06),E,N=0;return E=_.next(M),{cancel:O};function O(){_.cancel(E),E=0}function M(){var G=y(N/B);N+=1,j(G),N<=B?(E=_.next(M),v(u)):(E=0,setTimeout(function(){C(u)},0))}function j(G){w.forEach(function($){u[$]=b[$]*G+g[$]})}}function n(){}function a(u){if(!u){var f=typeof window<"u"&&window.requestAnimationFrame;return f?o():c()}if(typeof u.next!="function")throw new Error("Scheduler is supposed to have next(cb) function");if(typeof u.cancel!="function")throw new Error("Scheduler is supposed to have cancel(handle) function");return u}function o(){return{next:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)}}function c(){return{next:function(u){return setTimeout(u,1e3/60)},cancel:function(u){return clearTimeout(u)}}}function h(){var u=new Set,f=new Set,p=0;return{next:b,cancel:b,clearAll:g};function g(){u.clear(),f.clear(),cancelAnimationFrame(p),p=0}function b(C){f.add(C),y()}function y(){p||(p=requestAnimationFrame(v))}function v(){p=0;var C=f;f=u,u=C,u.forEach(function(_){_()}),u.clear()}}return Bu.exports}var nx,wT;function OQ(){if(wT)return nx;wT=1;function i(n){r(n);const a=e(n);return n.on=a.on,n.off=a.off,n.fire=a.fire,n}function e(n){let a=Object.create(null);return{on:function(o,c,h){if(typeof c!="function")throw new Error("callback is expected to be a function");let u=a[o];return u||(u=a[o]=[]),u.push({callback:c,ctx:h}),n},off:function(o,c){if(typeof o>"u")return a=Object.create(null),n;if(a[o])if(typeof c!="function")delete a[o];else{const h=a[o];for(let u=0;u<h.length;++u)h[u].callback===c&&h.splice(u,1)}return n},fire:function(o){const c=a[o];if(!c)return n;let h;arguments.length>1&&(h=Array.prototype.slice.call(arguments,1));for(let u=0;u<c.length;++u){const f=c[u];f.callback.apply(f.ctx,h)}return n}}}function r(n){if(!n)throw new Error("Eventify cannot use falsy object as events subject");const a=["on","fire","off"];for(let o=0;o<a.length;++o)if(n.hasOwnProperty(a[o]))throw new Error("Subject cannot be eventified, since it already has property '"+a[o]+"'")}return nx=i,nx}var ax,ST;function RQ(){if(ST)return ax;ST=1,ax=i;function i(n,a,o){typeof o!="object"&&(o={});var c=typeof o.minVelocity=="number"?o.minVelocity:5,h=typeof o.amplitude=="number"?o.amplitude:.25,u=typeof o.cancelAnimationFrame=="function"?o.cancelAnimationFrame:e(),f=typeof o.requestAnimationFrame=="function"?o.requestAnimationFrame:r(),p,g,b=342,y,v,C,_,w,T,B,E;return{start:O,stop:j,cancel:N};function N(){u(y),u(E)}function O(){p=n(),_=B=v=w=0,g=new Date,u(y),u(E),y=f(M)}function M(){var $=Date.now(),z=$-g;g=$;var K=n(),W=K.x-p.x,D=K.y-p.y;p=K;var U=1e3/(1+z);v=.8*W*U+.2*v,w=.8*D*U+.2*w,y=f(M)}function j(){u(y),u(E);var $=n();C=$.x,T=$.y,g=Date.now(),(v<-c||v>c)&&(_=h*v,C+=_),(w<-c||w>c)&&(B=h*w,T+=B),E=f(G)}function G(){var $=Date.now()-g,z=!1,K=0,W=0;_&&(K=-_*Math.exp(-$/b),K>.5||K<-.5?z=!0:K=_=0),B&&(W=-B*Math.exp(-$/b),W>.5||W<-.5?z=!0:W=B=0),z&&(a(C+K,T+W),E=f(G))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function r(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return ax}var sx,TT;function DQ(){if(TT)return sx;TT=1,sx=i;function i(n){if(n)return{capture:r,release:r};var a,o,c,h=!1;return{capture:u,release:f};function u(p){h=!0,o=window.document.onselectstart,c=window.document.ondragstart,window.document.onselectstart=e,a=p,a.ondragstart=e}function f(){h&&(h=!1,window.document.onselectstart=o,a&&(a.ondragstart=c))}}function e(n){return n.stopPropagation(),!1}function r(){}return sx}var ox,BT;function FQ(){if(BT)return ox;BT=1,ox=i;function i(){this.x=0,this.y=0,this.scale=1}return ox}var kp={exports:{}},AT;function $Q(){if(AT)return kp.exports;AT=1,kp.exports=i,kp.exports.canAttach=e;function i(r,n){if(!e(r))throw new Error("svg element is required for svg.panzoom to work");var a=r.ownerSVGElement;if(!a)throw new Error("Do not apply panzoom to the root <svg> element. Use its child instead (e.g. <g></g>). As of March 2016 only FireFox supported transform on the root element");n.disableKeyboardInteraction||a.setAttribute("tabindex",0);var o={getBBox:h,getScreenCTM:u,getOwner:c,applyTransform:p,initTransform:f};return o;function c(){return a}function h(){var g=r.getBBox();return{left:g.x,top:g.y,width:g.width,height:g.height}}function u(){var g=a.getCTM();return g||a.getScreenCTM()}function f(g){var b=r.getCTM();b===null&&(b=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix()),g.x=b.e,g.y=b.f,g.scale=b.a,a.removeAttributeNS(null,"viewBox")}function p(g){r.setAttribute("transform","matrix("+g.scale+" 0 0 "+g.scale+" "+g.x+" "+g.y+")")}}function e(r){return r&&r.ownerSVGElement&&r.getCTM}return kp.exports}var _p={exports:{}},ET;function zQ(){if(ET)return _p.exports;ET=1,_p.exports=i,_p.exports.canAttach=e;function i(r,n){var a=e(r);if(!a)throw new Error("panzoom requires DOM element to be attached to the DOM tree");var o=r.parentElement;r.scrollTop=0,n.disableKeyboardInteraction||o.setAttribute("tabindex",0);var c={getBBox:u,getOwner:h,applyTransform:f};return c;function h(){return o}function u(){return{left:0,top:0,width:r.clientWidth,height:r.clientHeight}}function f(p){r.style.transformOrigin="0 0 0",r.style.transform="matrix("+p.scale+", 0, 0, "+p.scale+", "+p.x+", "+p.y+")"}}function e(r){return r&&r.parentElement&&r.style}return _p.exports}var lx,MT;function IQ(){if(MT)return lx;MT=1;var i=LQ(),e=jQ(),r=OQ(),n=RQ(),a=DQ(),o=a(),c=a(!0),h=FQ(),u=$Q(),f=zQ(),p=1,g=1.75,b=300,y=200;lx=v;function v(M,j){j=j||{};var G=j.controller;if(G||(u.canAttach(M)?G=u(M,j):f.canAttach(M)&&(G=f(M,j))),!G)throw new Error("Cannot create panzoom for the current type of dom element");var $=G.getOwner(),z={x:0,y:0},K=!1,W=new h;G.initTransform&&G.initTransform(W);var D=typeof j.filterKey=="function"?j.filterKey:w,U=typeof j.pinchSpeed=="number"?j.pinchSpeed:1,R=j.bounds,I=typeof j.maxZoom=="number"?j.maxZoom:Number.POSITIVE_INFINITY,P=typeof j.minZoom=="number"?j.minZoom:0,V=typeof j.boundsPadding=="number"?j.boundsPadding:.05,J=typeof j.zoomDoubleClickSpeed=="number"?j.zoomDoubleClickSpeed:g,H=j.beforeWheel||w,tt=j.beforeMouseDown||w,ot=typeof j.zoomSpeed=="number"?j.zoomSpeed:p,st=C(j.transformOrigin),bt=j.enableTextSelection?c:o;T(R),j.autocenter&&Si();var kt,Lt=0,at=0,Ct=0,gt=null,Bt=new Date,Wt,Yt=!1,Zt=!1,Et,Vt,Se,ni,Ii,ue;"smoothScroll"in j&&!j.smoothScroll?ue=N():ue=n(Zn,Ki,j.smoothScroll);var ke,De,Ni,Pe=!1;ai();var or={dispose:ji,moveBy:_n,moveTo:Cn,smoothMoveTo:Bs,centerOn:Ts,zoomTo:Ma,zoomAbs:kn,smoothZoom:Ri,smoothZoomAbs:we,showRectangle:$l,pause:Yn,resume:lr,isPaused:Mo,getTransform:$r,getMinZoom:mi,setMinZoom:vs,getMaxZoom:_r,setMaxZoom:Vn,getTransformOrigin:Xn,setTransformOrigin:Qn,getZoomSpeed:Cs,setZoomSpeed:zr};r(or);var Gn=typeof j.initialX=="number"?j.initialX:W.x,Jr=typeof j.initialY=="number"?j.initialY:W.y,Fr=typeof j.initialZoom=="number"?j.initialZoom:W.scale;return(Gn!=W.x||Jr!=W.y||Fr!=W.scale)&&kn(Gn,Jr,Fr),or;function Yn(){yi(),Pe=!0}function lr(){Pe&&(ai(),Pe=!1)}function Mo(){return Pe}function $l(ut){var wt=$.getBoundingClientRect(),St=Zi(wt.width,wt.height),Nt=ut.right-ut.left,fe=ut.bottom-ut.top;if(!Number.isFinite(Nt)||!Number.isFinite(fe))throw new Error("Invalid rectangle");var _e=St.x/Nt,$e=St.y/fe,xi=Math.min(_e,$e);W.x=-(ut.left+Nt/2)*xi+St.x/2,W.y=-(ut.top+fe/2)*xi+St.y/2,W.scale=xi}function Zi(ut,wt){if(G.getScreenCTM){var St=G.getScreenCTM(),Nt=St.a,fe=St.d,_e=St.e,$e=St.f;z.x=ut*Nt-_e,z.y=wt*fe-$e}else z.x=ut,z.y=wt;return z}function Si(){var ut,wt,St=0,Nt=0,fe=_s();if(fe)St=fe.left,Nt=fe.top,ut=fe.right-fe.left,wt=fe.bottom-fe.top;else{var _e=$.getBoundingClientRect();ut=_e.width,wt=_e.height}var $e=G.getBBox();if(!($e.width===0||$e.height===0)){var xi=wt/$e.height,La=ut/$e.width,Bn=Math.min(La,xi);W.x=-($e.left+$e.width/2)*Bn+ut/2+St,W.y=-($e.top+$e.height/2)*Bn+wt/2+Nt,W.scale=Bn}}function $r(){return W}function mi(){return P}function vs(ut){P=ut}function _r(){return I}function Vn(ut){I=ut}function Xn(){return st}function Qn(ut){st=C(ut)}function Cs(){return ot}function zr(ut){if(!Number.isFinite(ut))throw new Error("Zoom speed should be a number");ot=ut}function Zn(){return{x:W.x,y:W.y}}function Cn(ut,wt){W.x=ut,W.y=wt,ks(),na("pan"),ws()}function Kn(ut,wt){Cn(W.x+ut,W.y+wt)}function ks(){var ut=_s();if(ut){var wt=!1,St=Fe(),Nt=ut.left-St.right;return Nt>0&&(W.x+=Nt,wt=!0),Nt=ut.right-St.left,Nt<0&&(W.x+=Nt,wt=!0),Nt=ut.top-St.bottom,Nt>0&&(W.y+=Nt,wt=!0),Nt=ut.bottom-St.top,Nt<0&&(W.y+=Nt,wt=!0),wt}}function _s(){if(R){if(typeof R=="boolean"){var ut=$.getBoundingClientRect(),wt=ut.width,St=ut.height;return{left:wt*V,top:St*V,right:wt*(1-V),bottom:St*(1-V)}}return R}}function Fe(){var ut=G.getBBox(),wt=Jn(ut.left,ut.top);return{left:wt.x,top:wt.y,right:ut.width*W.scale+wt.x,bottom:ut.height*W.scale+wt.y}}function Jn(ut,wt){return{x:ut*W.scale+W.x,y:wt*W.scale+W.y}}function ws(){K=!0,kt=window.requestAnimationFrame(wn)}function Ss(ut,wt,St){if(E(ut)||E(wt)||E(St))throw new Error("zoom requires valid numbers");var Nt=W.scale*St;if(Nt<P){if(W.scale===P)return;St=P/W.scale}if(Nt>I){if(W.scale===I)return;St=I/W.scale}var fe=Zi(ut,wt);if(W.x=fe.x-St*(fe.x-W.x),W.y=fe.y-St*(fe.y-W.y),R&&V===1&&P===1)W.scale*=St,ks();else{var _e=ks();_e||(W.scale*=St)}na("zoom"),ws()}function kn(ut,wt,St){var Nt=St/W.scale;Ss(ut,wt,Nt)}function Ts(ut){var wt=ut.ownerSVGElement;if(!wt)throw new Error("ui element is required to be within the scene");var St=ut.getBoundingClientRect(),Nt=St.left+St.width/2,fe=St.top+St.height/2,_e=wt.getBoundingClientRect(),$e=_e.width/2-Nt,xi=_e.height/2-fe;_n($e,xi,!0)}function Bs(ut,wt){_n(ut-W.x,wt-W.y,!0)}function _n(ut,wt,St){if(!St)return Kn(ut,wt);ke&&ke.cancel();var Nt={x:0,y:0},fe={x:ut,y:wt},_e=0,$e=0;ke=e(Nt,fe,{step:function(xi){Kn(xi.x-_e,xi.y-$e),_e=xi.x,$e=xi.y}})}function Ki(ut,wt){Ms(),Cn(ut,wt)}function ji(){yi()}function ai(){$.addEventListener("mousedown",At,{passive:!1}),$.addEventListener("dblclick",mt,{passive:!1}),$.addEventListener("touchstart",cr,{passive:!1}),$.addEventListener("keydown",ea,{passive:!1}),i.addWheelListener($,Oi,{passive:!1}),ws()}function yi(){i.removeWheelListener($,Oi),$.removeEventListener("mousedown",At),$.removeEventListener("keydown",ea),$.removeEventListener("dblclick",mt),$.removeEventListener("touchstart",cr),kt&&(window.cancelAnimationFrame(kt),kt=0),ue.cancel(),Me(),Pi(),bt.release(),kh()}function wn(){K&&ta()}function ta(){K=!1,G.applyTransform(W),na("transform"),kt=0}function ea(ut){var wt=0,St=0,Nt=0;if(ut.keyCode===38?St=1:ut.keyCode===40?St=-1:ut.keyCode===37?wt=1:ut.keyCode===39?wt=-1:ut.keyCode===189||ut.keyCode===109?Nt=1:(ut.keyCode===187||ut.keyCode===107)&&(Nt=-1),!D(ut,wt,St,Nt)){if(wt||St){ut.preventDefault(),ut.stopPropagation();var fe=$.getBoundingClientRect(),_e=Math.min(fe.width,fe.height),$e=.05,xi=_e*$e*wt,La=_e*$e*St;_n(xi,La)}if(Nt){var Bn=Ch(Nt*100),_e=st?Tn():As();Ma(_e.x,_e.y,Bn)}}}function As(){var ut=$.getBoundingClientRect();return{x:ut.width/2,y:ut.height/2}}function cr(ut){if(ia(ut),qi(),ut.touches.length===1)return ra(ut,ut.touches[0]);ut.touches.length===2&&(Ii=Y(ut.touches[0],ut.touches[1]),Ni=!0,tn())}function ia(ut){j.onTouch&&!j.onTouch(ut)||(ut.stopPropagation(),ut.preventDefault())}function Es(ut){qi(),!(j.onDoubleClick&&!j.onDoubleClick(ut))&&(ut.preventDefault(),ut.stopPropagation())}function ra(ut){at=new Date;var wt=ut.touches[0],St=Xe(wt);Wt=St;var Nt=Zi(St.x,St.y);Et=Nt.x,Vt=Nt.y,Se=Et,ni=Vt,ue.cancel(),tn()}function tn(){Yt||(Yt=!0,document.addEventListener("touchmove",Sn),document.addEventListener("touchend",Ot),document.addEventListener("touchcancel",Ot))}function Sn(ut){if(ut.touches.length===1){ut.stopPropagation();var wt=ut.touches[0],St=Xe(wt),Nt=Zi(St.x,St.y),fe=Nt.x-Et,_e=Nt.y-Vt;fe!==0&&_e!==0&&Lo(),Et=Nt.x,Vt=Nt.y,_n(fe,_e)}else if(ut.touches.length===2){Ni=!0;var $e=ut.touches[0],xi=ut.touches[1],La=Y($e,xi),Bn=1+(La/Ii-1)*U,Gf=Xe($e),Yf=Xe(xi);if(Et=(Gf.x+Yf.x)/2,Vt=(Gf.y+Yf.y)/2,st){var St=Tn();Et=St.x,Vt=St.y}Ma(Et,Vt,Bn),Ii=La,ut.stopPropagation(),ut.preventDefault()}}function qi(){Ct&&(clearTimeout(Ct),Ct=0)}function He(ut){if(j.onClick){qi();var wt=Et-Se,St=Vt-ni,Nt=Math.sqrt(wt*wt+St*St);Nt>5||(Ct=setTimeout(function(){Ct=0,j.onClick(ut)},b))}}function Ot(ut){if(qi(),ut.touches.length>0){var wt=Xe(ut.touches[0]),St=Zi(wt.x,wt.y);Et=St.x,Vt=St.y}else{var Nt=new Date;if(Nt-Lt<b)if(st){var wt=Tn();Ri(wt.x,wt.y,J)}else Ri(Wt.x,Wt.y,J);else Nt-at<y&&He(ut);Lt=Nt,kh(),Pi()}}function Y(ut,wt){var St=ut.clientX-wt.clientX,Nt=ut.clientY-wt.clientY;return Math.sqrt(St*St+Nt*Nt)}function mt(ut){Es(ut);var wt=Xe(ut);st&&(wt=Tn()),Ri(wt.x,wt.y,J)}function At(ut){if(qi(),!tt(ut)){if(gt=ut,Bt=new Date,Yt)return ut.stopPropagation(),!1;var wt=ut.button===1&&window.event!==null||ut.button===0;if(wt){ue.cancel();var St=Xe(ut),Nt=Zi(St.x,St.y);return Se=Et=Nt.x,ni=Vt=Nt.y,document.addEventListener("mousemove",ye),document.addEventListener("mouseup",se),bt.capture(ut.target||ut.srcElement),!1}}}function ye(ut){if(!Yt){Lo();var wt=Xe(ut),St=Zi(wt.x,wt.y),Nt=St.x-Et,fe=St.y-Vt;Et=St.x,Vt=St.y,_n(Nt,fe)}}function se(){var ut=new Date;ut-Bt<y&&He(gt),bt.release(),kh(),Me()}function Me(){document.removeEventListener("mousemove",ye),document.removeEventListener("mouseup",se),Zt=!1}function Pi(){document.removeEventListener("touchmove",Sn),document.removeEventListener("touchend",Ot),document.removeEventListener("touchcancel",Ot),Zt=!1,Ni=!1,Yt=!1}function Oi(ut){if(!H(ut)){ue.cancel();var wt=ut.deltaY;ut.deltaMode>0&&(wt*=100);var St=Ch(wt);if(St!==1){var Nt=st?Tn():Xe(ut);Ma(Nt.x,Nt.y,St),ut.preventDefault()}}}function Xe(ut){var wt,St,Nt=$.getBoundingClientRect();return wt=ut.clientX-Nt.left,St=ut.clientY-Nt.top,{x:wt,y:St}}function Ri(ut,wt,St){var Nt=W.scale,fe={scale:Nt},_e={scale:St*Nt};ue.cancel(),Ms(),De=e(fe,_e,{step:function($e){kn(ut,wt,$e.scale)},done:hr})}function we(ut,wt,St){var Nt=W.scale,fe={scale:Nt},_e={scale:St};ue.cancel(),Ms(),De=e(fe,_e,{step:function($e){kn(ut,wt,$e.scale)},done:hr})}function Tn(){var ut=$.getBoundingClientRect();return{x:ut.width*st.x,y:ut.height*st.y}}function Ma(ut,wt,St){return ue.cancel(),Ms(),Ss(ut,wt,St)}function Ms(){De&&(De.cancel(),De=null)}function Ch(ut){var wt=Math.sign(ut),St=Math.min(.25,Math.abs(ot*ut/128));return 1-wt*St}function Lo(){Zt||(na("panstart"),Zt=!0,ue.start())}function kh(){Zt&&(Ni||ue.stop(),na("panend"))}function hr(){na("zoomend")}function na(ut){or.fire(ut,or)}}function C(M){if(M){if(typeof M=="object")return(!B(M.x)||!B(M.y))&&_(M),M;_()}}function _(M){throw console.error(M),new Error(["Cannot parse transform origin.","Some good examples:",' "center center" can be achieved with {x: 0.5, y: 0.5}',' "top center" can be achieved with {x: 0.5, y: 0}',' "bottom right" can be achieved with {x: 1, y: 1}'].join(`
414
+ `))}function w(){}function T(M){var j=typeof M;if(!(j==="undefined"||j==="boolean")){var G=B(M.left)&&B(M.top)&&B(M.bottom)&&B(M.right);if(!G)throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}}function B(M){return Number.isFinite(M)}function E(M){return Number.isNaN?Number.isNaN(M):M!==M}function N(){return{start:w,stop:w,cancel:w}}function O(){if(typeof document>"u")return;var M=document.getElementsByTagName("script");if(!M)return;for(var j,G=0;G<M.length;++G){var $=M[G];if($.src&&$.src.match(/\bpanzoom(\.min)?\.js/)){j=$;break}}if(!j)return;var z=j.getAttribute("query");if(!z)return;var K=j.getAttribute("name")||"pz",W=Date.now();D();function D(){var I=document.querySelector(z);if(!I){var P=Date.now(),V=P-W;if(V<2e3){setTimeout(D,100);return}console.error("Cannot find the panzoom element",K);return}var J=U(j);console.log(J),window[K]=v(I,J)}function U(I){for(var P=I.attributes,V={},J=0;J<P.length;++J){var H=P[J],tt=R(H);tt&&(V[tt.name]=tt.value)}return V}function R(I){if(I.name){var P=I.name[0]==="p"&&I.name[1]==="z"&&I.name[2]==="-";if(P){var V=I.name.substr(3),J=JSON.parse(I.value);return{name:V,value:J}}}}}return O(),lx}var qQ=IQ();const PQ=qg(qQ);ae.setOptions({gfm:!0,breaks:!0});const HQ={"[":"]","(":")","{":"}"};function UQ(i){if(/^\s*(classDef|class|style|linkStyle|click|subgraph)\b/.test(i))return i;let e="",r=0;const n=i.length;for(;r<n;){const a=i.slice(r).match(/^(\s*[A-Za-z_]\w*\s*)([\[\(\{])/);if(!a){e+=i[r],r++;continue}const o=a[1],c=a[2],h=HQ[c],u=r+o.length+1,f=i.lastIndexOf(h);if(f<=u){e+=i[r],r++;continue}const g=i.slice(u,f).trim();if(g.startsWith('"')&&g.endsWith('"')){e+=i.slice(r,f+1),r=f+1;continue}if(g===""){e+=i.slice(r,f+1),r=f+1;continue}const b=g.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e+=`${o}${c}"${b}"${h}`,r=f+1}return e}function WQ(i){return i.split(`
415
+ `).map(UQ).join(`
416
+ `)}const GQ=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function YQ(i,e,r){const n=i.split(`
417
+ `);let a=0,o=!1,c="";for(let h=0;h<n.length;h++){const u=n[h],f=/^(\s*)(```|~~~)/.exec(u);if(f){o?u.includes(c)&&(o=!1,c=""):(o=!0,c=f[2]);continue}if(o)continue;const p=GQ.exec(u);if(p){if(a===e){const[,g,,b,y]=p,v=r?"[x]":"[ ]";n[h]=`${g}${v}${b}${y}`;const C=/<!--\s*node:([A-Za-z0-9_-]+)\s*-->/.exec(y);return{body:n.join(`
418
+ `),nodeId:C?C[1]:null}}a++}}return null}const VQ=/-->|---|==>|==|-\.|~~~|\.->/;function XQ(i,e,r){const n=r?"done":"todo",a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`^(\\s*)(${a})((?:\\[[^\\]]*\\]|\\([^)]*\\)|\\{[^}]*\\})?)(\\s*:::(?:done|todo|active|blocked)\\b)?\\s*$`),c=i.split(`
419
+ `);let h=!1,u="";for(let f=0;f<c.length;f++){const p=c[f];if(!h){const C=/^(\s*)(```|~~~)\s*mermaid\b/i.exec(p);C&&(h=!0,u=C[2]);continue}if(p.trim().startsWith(u)){h=!1,u="";continue}if(/^\s*(classDef|class|style|linkStyle|click|subgraph|end)\b/.test(p)||VQ.test(p))continue;const g=o.exec(p);if(!g)continue;const[,b,y,v]=g;c[f]=`${b}${y}${v??""}:::${n}`}return c.join(`
420
+ `)}const QQ=[1,2,3,4,5,6,7,8,9,10],ZQ=[1,2,3,4,5],KQ=[25,50,75,100],JQ=[.5,1,1.5,2,3,4,5,6,8];function tZ(i){return i==null?"":i<5?"rice-score--low":i<=15?"rice-score--mid":"rice-score--high"}function eZ({task:i,expanded:e,onToggle:r,onUpdate:n}){const{t:a}=oi(),o=i.rice,c=(o==null?void 0:o.score)??null,h=c===null?"—":String(c),u=tZ(c),f=g=>o?o[g]:null,p=(g,b)=>{const y=b===""?null:Number(b);y!==null&&!Number.isFinite(y)||y!==f(g)&&n({[g]:y})};return x.jsxs("div",{className:`rice-block ${e?"rice-block--open":""}`,children:[x.jsxs("button",{type:"button",className:"rice-header",onClick:r,"aria-expanded":e,children:[x.jsx("span",{className:"rice-header-label",children:a("rice.title")}),x.jsx("span",{className:`rice-score-badge ${u}`,title:a("rice.score"),children:h}),x.jsx("svg",{className:`rice-chevron ${e?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:x.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e&&x.jsxs("div",{className:"rice-grid",children:[x.jsxs("label",{className:"rice-field",children:[x.jsx("span",{className:"rice-field-label",children:a("rice.reach")}),x.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.reach)??"",title:a("rice.tooltip.reach"),onChange:g=>p("reach",g.target.value),children:[x.jsx("option",{value:"",children:"—"}),QQ.map(g=>x.jsx("option",{value:g,children:g},g))]})]}),x.jsxs("label",{className:"rice-field",children:[x.jsx("span",{className:"rice-field-label",children:a("rice.impact")}),x.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.impact)??"",title:a("rice.tooltip.impact"),onChange:g=>p("impact",g.target.value),children:[x.jsx("option",{value:"",children:"—"}),ZQ.map(g=>x.jsx("option",{value:g,children:g},g))]})]}),x.jsxs("label",{className:"rice-field",children:[x.jsx("span",{className:"rice-field-label",children:a("rice.confidence")}),x.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.confidence)??"",title:a("rice.tooltip.confidence"),onChange:g=>p("confidence",g.target.value),children:[x.jsx("option",{value:"",children:"—"}),KQ.map(g=>x.jsxs("option",{value:g,children:[g,"%"]},g))]})]}),x.jsxs("label",{className:"rice-field",children:[x.jsx("span",{className:"rice-field-label",children:a("rice.effort")}),x.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.effort)??"",title:a("rice.tooltip.effort"),onChange:g=>p("effort",g.target.value),children:[x.jsx("option",{value:"",children:"—"}),JQ.map(g=>x.jsxs("option",{value:g,children:[g,"w"]},g))]})]}),o&&x.jsx("button",{type:"button",className:"rice-clear-btn",onClick:()=>n(null),children:a("rice.clear")})]})]})}function un({label:i,children:e}){return x.jsxs("div",{className:"prop-row",children:[x.jsx("span",{className:"prop-label",children:i}),x.jsx("div",{className:"prop-value",children:e})]})}function iZ({text:i}){const[e,r]=X.useState(!1),[n,a]=X.useState(!1),o=X.useRef(null);return X.useEffect(()=>{requestAnimationFrame(()=>{const c=o.current;c&&a(c.scrollHeight>c.clientHeight+1)})},[i]),x.jsxs("span",{className:"prop-expandable",onClick:()=>r(c=>!c),children:[x.jsx("span",{ref:o,className:`prop-text ${e?"":"prop-text--clamped"}`,children:i}),n&&!e&&x.jsx("span",{className:"prop-expand-hint",children:"show more"}),e&&n&&x.jsx("span",{className:"prop-expand-hint",children:"show less"})]})}function rZ({task:i,onClose:e,initialRiceExpanded:r}){const{t:n}=oi(),{resolved:a}=Pg(),o=hj(),c=ZX(),{data:h}=fj(),[u,f]=X.useState(""),[p,g]=X.useState(null),[b,y]=X.useState(r??!!i.rice),[v,C]=X.useState(!1),_=W=>{g(W.message),setTimeout(()=>g(null),5e3)},w=W=>{o.mutate({slug:i.slug,updates:{status:W}},{onError:_})},T=W=>{o.mutate({slug:i.slug,updates:{priority:W}},{onError:_})},B=W=>{o.mutate({slug:i.slug,updates:{urgency:W}},{onError:_})},E=W=>{o.mutate({slug:i.slug,updates:{version:W||null}},{onError:_})},N=W=>{o.mutate({slug:i.slug,updates:{rice:W}},{onError:_})},O=W=>{W.preventDefault(),u.trim()&&c.mutate({slug:i.slug,content:u.trim()},{onSuccess:()=>f(""),onError:_})},M=X.useMemo(()=>i.body?ae.parse(i.body):"",[i.body]),j=X.useRef(null),G=X.useRef(i.body??""),$=X.useRef(i.body??"");X.useEffect(()=>{G.current=i.body??"",$.current=i.body??""},[i.body]);const z=X.useRef(o),K=X.useRef(_);return X.useEffect(()=>{z.current=o,K.current=_}),X.useEffect(()=>{const W=j.current;if(!W||!M)return;W.querySelectorAll('input[type="checkbox"]').forEach((R,I)=>{R.removeAttribute("disabled"),R.dataset.criterionIndex=String(I)});const U=R=>{const I=R.target;if(!(I instanceof HTMLInputElement)||I.type!=="checkbox")return;const P=I.dataset.criterionIndex;if(P===void 0)return;const V=Number(P),J=I.checked,H=$.current,tt=YQ(H,V,J);if(!tt)return;let ot=tt.body;tt.nodeId&&(ot=XQ(ot,tt.nodeId,J)),ot!==H&&($.current=ot,z.current.mutate({slug:i.slug,updates:{body:ot}},{onError:st=>{I.checked=!J,$.current=G.current,K.current(st)}}))};return W.addEventListener("change",U),()=>W.removeEventListener("change",U)},[M,i.slug]),X.useEffect(()=>{const W=j.current;if(!W||!M)return;nj(a);let D=!1;const U=[];let R=!1;const I=async()=>{if(D||R)return;W.querySelectorAll(".mermaid-rendered").forEach(J=>{const H=J.dataset.mermaidSource;if(!H)return;const tt=document.createElement("pre"),ot=document.createElement("code");ot.className="language-mermaid",ot.textContent=H,tt.appendChild(ot),J.replaceWith(tt)});const V=W.querySelectorAll("pre > code.language-mermaid");if(V.length!==0){for(R=!0;U.length;){const J=U.pop();try{J==null||J()}catch{}}for(let J=0;J<V.length&&!D;J++){const H=V[J],tt=H.parentElement;if(!tt)continue;const ot=WQ(H.textContent??""),st=`mmd-${i.slug}-${J}-${Date.now().toString(36)}`,bt=document.createElement("div");bt.className="mermaid-rendered",bt.dataset.mermaidSource=ot;const kt=document.createElement("div");kt.className="mermaid-stage",bt.appendChild(kt);const Lt=document.createElement("div");Lt.className="mermaid-controls",Lt.innerHTML=`
421
+ <button type="button" data-act="out" title="Zoom out">−</button>
422
+ <button type="button" data-act="reset" title="Fit">⤢</button>
423
+ <button type="button" data-act="in" title="Zoom in">+</button>
424
+ `,bt.appendChild(Lt),tt.replaceWith(bt);try{const{svg:at,bindFunctions:Ct}=await $1.render(st,ot);if(D)break;kt.innerHTML=at,Ct==null||Ct(kt),bt.dataset.mermaidRendered="1";const gt=kt.querySelector("svg");if(!gt)continue;aj(gt);const Bt=gt.viewBox.baseVal,Wt=Bt&&Bt.width>0?Bt.width:gt.getBoundingClientRect().width,Yt=Bt&&Bt.height>0?Bt.height:gt.getBoundingClientRect().height;gt.removeAttribute("width"),gt.removeAttribute("height"),gt.style.width=`${Wt}px`,gt.style.height=`${Yt}px`,gt.style.maxWidth="none",gt.style.transformOrigin="0 0";const Zt=PQ(gt,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),Et=()=>{try{const ue=kt.getBoundingClientRect();if(ue.width===0||ue.height===0)return;const ke=32,De=Math.min((ue.width-ke)/Wt,(ue.height-ke)/Yt,1);Zt.zoomAbs(0,0,1),Zt.moveTo(0,0),Zt.zoomAbs(0,0,De);const Ni=(ue.width-Wt*De)/2,Pe=(ue.height-Yt*De)/2;Zt.moveTo(Ni,Pe)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(Et));const Vt=new ResizeObserver(()=>Et());Vt.observe(kt);let Se=null;const ni=ue=>{try{const ke=ue.getBoundingClientRect(),De=kt.getBoundingClientRect();if(ke.width===0)return;const Ni=ke.left+ke.width/2-De.left,Pe=ke.top+ke.height/2-De.top,or=Math.min(De.width*.6/ke.width,De.height*.6/ke.height,6),Gn=Zt.getTransform(),Jr=or/Gn.scale;if(Math.abs(Jr-1)<.01)return;Zt.smoothZoom(Ni,Pe,Jr)}catch{}},Ii=ue=>{const ke=ue.target,De=(ke==null?void 0:ke.closest("g.node, g.cluster"))??null;if(!De){Se&&(Se=null,Et());return}Se===De?(Se=null,Et()):(Se=De,ni(De))};kt.addEventListener("click",Ii),gt.querySelectorAll("g.node, g.cluster").forEach(ue=>{ue.style.cursor="zoom-in"}),Lt.addEventListener("click",ue=>{ue.stopPropagation();const ke=ue.target.closest("button");if(!ke)return;const De=kt.getBoundingClientRect(),Ni=De.width/2,Pe=De.height/2,or=ke.getAttribute("data-act");or==="in"?Zt.smoothZoom(Ni,Pe,1.4):or==="out"?Zt.smoothZoom(Ni,Pe,1/1.4):or==="reset"&&(Se=null,Et())}),U.push(()=>{Vt.disconnect(),kt.removeEventListener("click",Ii),Zt.dispose()})}catch(at){if(D)break;const Ct=at instanceof Error?at.message:String(at);kt.innerHTML=`<pre class="mermaid-error">Mermaid render failed: ${Ct.replace(/[<>&]/g,gt=>({"<":"&lt;",">":"&gt;","&":"&amp;"})[gt]??gt)}</pre>`}}R=!1}};I();const P=new MutationObserver(()=>{if(D||R)return;const V=W.querySelector("pre > code.language-mermaid"),J=W.querySelector(".mermaid-rendered .mermaid-stage svg");V&&(!J||V)&&V&&I()});return P.observe(W,{childList:!0,subtree:!0}),()=>{for(D=!0,P.disconnect();U.length;){const V=U.pop();try{V==null||V()}catch{}}}},[M,i.slug,a]),x.jsx("div",{className:`detail-overlay ${v?"detail-overlay--fullscreen":""}`,onClick:e,children:x.jsxs("div",{className:`detail-panel ${v?"detail-panel--fullscreen":""}`,onClick:W=>W.stopPropagation(),children:[x.jsxs("div",{className:"detail-header",children:[x.jsx("h2",{className:"detail-title",children:i.name}),x.jsxs("div",{className:"detail-header-actions",children:[x.jsx("button",{type:"button",className:"detail-icon-btn",onClick:()=>C(W=>!W),title:v?"Exit full-page view":"Open in full page","aria-label":v?"Exit full-page view":"Open in full page",children:v?x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M6 3v3H3M10 3v3h3M6 13v-3H3M10 13v-3h3"})}):x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M3 6V3h3M13 6V3h-3M3 10v3h3M13 10v3h-3"})})}),x.jsx("button",{className:"modal-close",onClick:e,"aria-label":"Close",children:"×"})]})]}),x.jsxs("div",{className:"detail-body",children:[p&&x.jsx("div",{className:"error-state",style:{marginBottom:"var(--space-3)"},children:p}),x.jsxs("div",{className:"props-block",children:[x.jsx(un,{label:"Status",children:x.jsxs("select",{className:"field-select prop-select",value:i.status,onChange:W=>w(W.target.value),children:[x.jsx("option",{value:"todo",children:n("tasks.todo")}),x.jsx("option",{value:"in_progress",children:n("tasks.in_progress")}),x.jsx("option",{value:"in_review",children:n("tasks.in_review")}),x.jsx("option",{value:"completed",children:n("tasks.completed")})]})}),x.jsx(un,{label:n("tasks.priority"),children:x.jsxs("select",{className:"field-select prop-select",value:i.priority,onChange:W=>T(W.target.value),children:[x.jsx("option",{value:"low",children:n("priority.low")}),x.jsx("option",{value:"medium",children:n("priority.medium")}),x.jsx("option",{value:"high",children:n("priority.high")}),x.jsx("option",{value:"critical",children:n("priority.critical")})]})}),x.jsx(un,{label:"Urgency",children:x.jsxs("select",{className:"field-select prop-select",value:i.urgency,onChange:W=>B(W.target.value),children:[x.jsx("option",{value:"low",children:n("priority.low")}),x.jsx("option",{value:"medium",children:n("priority.medium")}),x.jsx("option",{value:"high",children:n("priority.high")}),x.jsx("option",{value:"critical",children:n("priority.critical")})]})}),x.jsx(un,{label:n("rice.title"),children:x.jsx(eZ,{task:i,expanded:b,onToggle:()=>y(W=>!W),onUpdate:N})}),i.tags.length>0&&x.jsx(un,{label:"Tags",children:x.jsx("div",{className:"prop-tags",children:i.tags.map(W=>x.jsx("span",{className:"task-tag","data-hue":Fl(W),children:W},W))})}),i.related_feature&&x.jsx(un,{label:"Feature",children:x.jsx("span",{className:"prop-feature",children:i.related_feature})}),x.jsx(un,{label:"Version",children:x.jsxs("select",{className:"field-select prop-select",value:i.version??"",onChange:W=>E(W.target.value),children:[x.jsx("option",{value:"",children:"No version"}),(h??[]).map(W=>x.jsx("option",{value:W.version,children:W.version},W.version)),i.version&&!(h??[]).some(W=>W.version===i.version)&&x.jsx("option",{value:i.version,children:i.version})]})}),i.description&&x.jsx(un,{label:"Description",children:x.jsx(iZ,{text:i.description})}),x.jsx(un,{label:"Created",children:x.jsx("span",{className:"prop-date",children:i.created_at})}),x.jsx(un,{label:"Updated",children:x.jsx("span",{className:"prop-date",children:i.updated_at})}),i.parent_task&&x.jsx(un,{label:"Parent",children:x.jsx("span",{className:"prop-text",children:i.parent_task})}),x.jsx(un,{label:"ID",children:x.jsx("code",{className:"prop-id",children:i.id})})]}),x.jsx("hr",{className:"detail-divider"}),M?x.jsx("div",{ref:j,className:"markdown-body",dangerouslySetInnerHTML:{__html:M}}):x.jsx("p",{className:"detail-empty",children:"No content."}),x.jsx("hr",{className:"detail-divider"}),x.jsxs("div",{className:"changelog-section",children:[x.jsx("h3",{className:"changelog-title",children:n("tasks.changelog")}),x.jsxs("form",{onSubmit:O,className:"changelog-add",children:[x.jsx("input",{className:"field-input",value:u,onChange:W=>f(W.target.value),placeholder:"Add a changelog entry..."}),x.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!u.trim()||c.isPending,children:c.isPending?"...":n("tasks.add_entry")})]})]})]})]})})}const nZ=["critical","high"];function to(i){return nZ.includes(i)}const aZ=[{key:"do",label:"Do First",subtitle:"Important & Urgent",colorVar:"--color-quadrant-do",filter:i=>to(i.priority)&&to(i.urgency)},{key:"schedule",label:"Schedule",subtitle:"Important & Not Urgent",colorVar:"--color-quadrant-schedule",filter:i=>to(i.priority)&&!to(i.urgency)},{key:"delegate",label:"Delegate",subtitle:"Less Important & Urgent",colorVar:"--color-quadrant-delegate",filter:i=>!to(i.priority)&&to(i.urgency)},{key:"eliminate",label:"Don't Do",subtitle:"Less Important & Not Urgent",colorVar:"--color-quadrant-eliminate",filter:i=>!to(i.priority)&&!to(i.urgency)}];function sZ({tasks:i,onTaskClick:e}){const r=i.filter(n=>n.status!=="completed");return x.jsxs("div",{className:"eisenhower",children:[x.jsxs("div",{className:"eisenhower-y-label",children:[x.jsx("span",{className:"eisenhower-axis-hi",children:"Important"}),x.jsx("span",{className:"eisenhower-axis-lo",children:"Less Important"})]}),x.jsx("div",{className:"eisenhower-grid",children:aZ.map(n=>{const a=r.filter(n.filter);return x.jsxs("div",{className:`eisenhower-quadrant eisenhower-quadrant--${n.key}`,children:[x.jsxs("div",{className:"eisenhower-quadrant-header",children:[x.jsx("span",{className:"eisenhower-quadrant-dot",style:{background:`var(${n.colorVar})`}}),x.jsx("span",{className:"eisenhower-quadrant-label",children:n.label}),x.jsx("span",{className:"eisenhower-quadrant-count",children:a.length})]}),x.jsx("span",{className:"eisenhower-quadrant-subtitle",children:n.subtitle}),x.jsx("div",{className:"eisenhower-quadrant-cards",children:a.map(o=>x.jsx(Hf,{task:o,onClick:()=>e(o),onDragStart:()=>{}},o.slug))})]},n.key)})}),x.jsxs("div",{className:"eisenhower-x-label",children:[x.jsx("span",{className:"eisenhower-axis-hi",children:"Urgent"}),x.jsx("span",{className:"eisenhower-axis-lo",children:"Not Urgent"})]})]})}const ie={top:32,right:24,bottom:56,left:64},LT=.5,NT=8,cx=1,jT=5,oZ=2,lZ=3,cZ={todo:"--color-status-todo",in_progress:"--color-status-in-progress",in_review:"--color-status-in-review",completed:"--color-status-completed"};function hx(i){return Math.log2(Math.max(i,.01)+1)}function ux(i,e,r){return Math.max(e,Math.min(r,i))}function OT(i){const e=i.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function hZ({tasks:i,onTaskClick:e}){const r=X.useRef(null),[n,a]=X.useState({width:800,height:480}),[o,c]=X.useState(!1),[h,u]=X.useState(null);X.useEffect(()=>{const $=r.current;if(!$)return;const z=new ResizeObserver(K=>{for(const W of K){const D=W.contentRect.width,U=Math.max(360,Math.min(620,D*.6));a({width:D,height:U})}});return z.observe($),()=>z.disconnect()},[]);const f=X.useMemo(()=>i.filter($=>$.status!=="completed"),[i]),p=X.useMemo(()=>f.filter(OT),[f]),g=X.useMemo(()=>f.filter($=>!OT($)),[f]),b=X.useMemo(()=>[...p].sort(($,z)=>(z.rice.score??0)-($.rice.score??0)),[p]),y=Math.max(120,n.width-ie.left-ie.right),v=Math.max(120,n.height-ie.top-ie.bottom),C=hx(LT),w=hx(NT)-C,T=$=>{const z=(hx(ux($,LT,NT))-C)/w;return ie.left+(1-z)*y},B=$=>{const z=(ux($,cx,jT)-cx)/(jT-cx);return ie.top+(1-z)*v},E=$=>6+(ux($,1,10)-1)/9*18,N=$=>Math.max(.4,$/100),O=T(oZ),M=B(lZ),j=[.5,1,2,4,8],G=[1,2,3,4,5];return x.jsxs("div",{className:"rice-scatter",ref:r,children:[x.jsxs("svg",{className:"rice-scatter-svg",width:n.width,height:n.height,viewBox:`0 0 ${n.width} ${n.height}`,role:"img","aria-label":`RICE scatter: ${p.length} rated tasks plotted by impact and effort`,children:[x.jsx("rect",{x:ie.left,y:ie.top,width:O-ie.left,height:M-ie.top,className:"rice-quad rice-quad--big-bets"}),x.jsx("rect",{x:O,y:ie.top,width:ie.left+y-O,height:M-ie.top,className:"rice-quad rice-quad--quick-wins"}),x.jsx("rect",{x:ie.left,y:M,width:O-ie.left,height:ie.top+v-M,className:"rice-quad rice-quad--time-sinks"}),x.jsx("rect",{x:O,y:M,width:ie.left+y-O,height:ie.top+v-M,className:"rice-quad rice-quad--fill-ins"}),x.jsx("text",{x:ie.left+8,y:ie.top+18,className:"rice-quad-label",children:"Big Bets"}),x.jsx("text",{x:ie.left+y-8,y:ie.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),x.jsx("text",{x:ie.left+8,y:ie.top+v-6,className:"rice-quad-label",children:"Time Sinks"}),x.jsx("text",{x:ie.left+y-8,y:ie.top+v-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),x.jsx("line",{x1:O,y1:ie.top,x2:O,y2:ie.top+v,className:"rice-quad-divider"}),x.jsx("line",{x1:ie.left,y1:M,x2:ie.left+y,y2:M,className:"rice-quad-divider"}),x.jsx("line",{x1:ie.left,y1:ie.top+v,x2:ie.left+y,y2:ie.top+v,className:"rice-axis"}),x.jsx("line",{x1:ie.left,y1:ie.top,x2:ie.left,y2:ie.top+v,className:"rice-axis"}),j.map($=>x.jsxs("g",{children:[x.jsx("line",{x1:T($),y1:ie.top+v,x2:T($),y2:ie.top+v+4,className:"rice-axis"}),x.jsxs("text",{x:T($),y:ie.top+v+18,textAnchor:"middle",className:"rice-tick",children:[$,"w"]})]},`xt-${$}`)),x.jsx("text",{x:ie.left+y/2,y:ie.top+v+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),G.map($=>x.jsxs("g",{children:[x.jsx("line",{x1:ie.left-4,y1:B($),x2:ie.left,y2:B($),className:"rice-axis"}),x.jsx("text",{x:ie.left-8,y:B($)+4,textAnchor:"end",className:"rice-tick",children:$})]},`yt-${$}`)),x.jsx("text",{transform:`translate(${ie.left-44}, ${ie.top+v/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),p.map($=>{const z=$.rice,K=T(z.effort),W=B(z.impact),D=E(z.reach),U=N(z.confidence),R=cZ[$.status],I=h===$.slug;return x.jsx("circle",{cx:K,cy:W,r:D,fill:`var(${R})`,fillOpacity:U,stroke:"var(--color-bg)",strokeWidth:I?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${$.name}: reach ${z.reach}, impact ${z.impact}, confidence ${z.confidence}, effort ${z.effort} weeks, score ${z.score}`,onClick:()=>e($),onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),e($))},onMouseEnter:()=>u($.slug),onMouseLeave:()=>u(null),onFocus:()=>u($.slug),onBlur:()=>u(null),children:x.jsx("title",{children:`${$.name}
425
+ R ${z.reach} · I ${z.impact} · C ${z.confidence}% · E ${z.effort}w
426
+ Score: ${z.score}`})},$.slug)})]}),x.jsx("ol",{className:"rice-scatter-sr-list",children:b.map($=>x.jsx("li",{children:`${$.name} — score ${$.rice.score}`},$.slug))}),g.length>0&&x.jsxs("div",{className:`rice-unscored ${o?"rice-unscored--open":""}`,children:[x.jsxs("button",{type:"button",className:"rice-unscored-toggle",onClick:()=>c($=>!$),"aria-expanded":o,children:[x.jsxs("span",{children:["Unscored (",g.length,")"]}),x.jsx("svg",{className:`rice-chevron ${o?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:x.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),o&&x.jsx("div",{className:"rice-unscored-cards",children:g.map($=>x.jsx(Hf,{task:$,onClick:()=>e($),onDragStart:()=>{}},$.slug))})]})]})}function uZ({onClose:i,tasks:e}){const{data:r,isLoading:n}=uj(),a=KX(),o=JX(),[c,h]=X.useState(""),[u,f]=X.useState(""),p=v=>{v.preventDefault(),c.trim()&&a.mutate({version:c.trim(),summary:u.trim()||void 0},{onSuccess:()=>{h(""),f("")}})},g=v=>e.filter(C=>C.version===v).length,b=(r??[]).filter(v=>v.status==="planning"),y=(r??[]).filter(v=>v.status==="released");return x.jsx("div",{className:"modal-overlay",onClick:i,children:x.jsxs("div",{className:"modal version-manager-modal",onClick:v=>v.stopPropagation(),children:[x.jsxs("div",{className:"modal-header",children:[x.jsx("h2",{className:"modal-title",children:"Versions & Releases"}),x.jsx("button",{className:"modal-close",onClick:i,children:"×"})]}),x.jsxs("div",{className:"modal-body version-manager-body",children:[x.jsxs("div",{className:"version-stats",children:[x.jsxs("div",{className:"version-stat",children:[x.jsx("span",{className:"version-stat-count",children:b.length}),x.jsx("span",{className:"version-stat-label",children:"Planning"})]}),x.jsxs("div",{className:"version-stat",children:[x.jsx("span",{className:"version-stat-count",children:y.length}),x.jsx("span",{className:"version-stat-label",children:"Released"})]})]}),n&&x.jsx("p",{className:"version-manager-loading",children:"Loading..."}),b.length>0&&x.jsxs("div",{className:"version-section",children:[x.jsx("h3",{className:"version-section-title",children:"Planning"}),b.map(v=>{const C=g(v.version);return x.jsxs("div",{className:"version-item",children:[x.jsxs("div",{className:"version-item-info",children:[x.jsx("span",{className:"version-status-badge version-status-badge--planning",children:"planning"}),x.jsx("span",{className:"version-item-name",children:v.version}),x.jsxs("span",{className:"version-item-count",children:[C," task",C!==1?"s":""]})]}),v.summary&&x.jsx("p",{className:"version-item-desc",children:v.summary}),x.jsx("div",{className:"version-item-actions",children:x.jsx("button",{className:"btn btn--primary version-release-btn",onClick:()=>o.mutate({version:v.version,updates:{status:"released"}}),children:"Release"})})]},v.version)})]}),y.length>0&&x.jsxs("div",{className:"version-section",children:[x.jsx("h3",{className:"version-section-title",children:"Released"}),y.map(v=>{const C=g(v.version);return x.jsxs("div",{className:"version-item version-item--released",children:[x.jsxs("div",{className:"version-item-info",children:[x.jsx("span",{className:"version-status-badge version-status-badge--released",children:"released"}),x.jsx("span",{className:"version-item-name",children:v.version}),x.jsxs("span",{className:"version-item-count",children:[C," task",C!==1?"s":""]}),v.date&&x.jsx("span",{className:"version-item-date",children:v.date})]}),v.summary&&x.jsx("p",{className:"version-item-desc",children:v.summary})]},v.version)})]}),(r??[]).length===0&&!n&&x.jsx("p",{className:"version-manager-empty",children:"No versions yet. Create one below."}),x.jsxs("form",{onSubmit:p,className:"version-create-form",children:[x.jsx("h3",{className:"version-section-title",children:"New Version"}),x.jsx("input",{className:"field-input",value:c,onChange:v=>h(v.target.value),placeholder:"Version name (e.g. v0.2.0)",required:!0}),x.jsx("input",{className:"field-input",value:u,onChange:v=>f(v.target.value),placeholder:"Summary (optional)"}),x.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!c.trim()||a.isPending,children:a.isPending?"...":"Create Planning Version"})]})]})]})})}const RT={critical:0,high:1,medium:2,low:3},DT={critical:0,high:1,medium:2,low:3},bj=[{key:"todo",labelKey:"tasks.todo",colorVar:"--color-status-todo"},{key:"in_progress",labelKey:"tasks.in_progress",colorVar:"--color-status-in-progress"},{key:"in_review",labelKey:"tasks.in_review",colorVar:"--color-status-in-review"},{key:"completed",labelKey:"tasks.completed",colorVar:"--color-status-completed"}],vj=[{key:"critical",label:"Critical",colorVar:"--color-priority-critical"},{key:"high",label:"High",colorVar:"--color-priority-high"},{key:"medium",label:"Medium",colorVar:"--color-priority-medium"},{key:"low",label:"Low",colorVar:"--color-priority-low"}],Cj=[{key:"critical",label:"Critical",colorVar:"--color-urgency-critical"},{key:"high",label:"High",colorVar:"--color-urgency-high"},{key:"medium",label:"Medium",colorVar:"--color-urgency-medium"},{key:"low",label:"Low",colorVar:"--color-urgency-low"}];function fZ(i,e){return[...i].sort((r,n)=>{var a,o;switch(e){case"updated_at":case"created_at":return n[e].localeCompare(r[e]);case"priority":return(RT[r.priority]??9)-(RT[n.priority]??9);case"urgency":return(DT[r.urgency]??9)-(DT[n.urgency]??9);case"name":return r.name.localeCompare(n.name);case"rice":{const c=((a=r.rice)==null?void 0:a.score)??-1/0;return(((o=n.rice)==null?void 0:o.score)??-1/0)-c}}})}function dZ(i,e){let r=i;if(e.searchQuery.trim()){const n=e.searchQuery.trim().toLowerCase();r=r.filter(a=>a.name.toLowerCase().includes(n)||a.description.toLowerCase().includes(n))}if(e.statusFilter.length>0&&(r=r.filter(n=>e.statusFilter.includes(n.status))),e.priorityFilter.length>0&&(r=r.filter(n=>e.priorityFilter.includes(n.priority))),e.urgencyFilter.length>0&&(r=r.filter(n=>e.urgencyFilter.includes(n.urgency))),e.tagFilter.length>0&&(r=r.filter(n=>n.tags.some(a=>e.tagFilter.includes(a)))),e.versionFilter.length>0&&(r=r.filter(n=>n.version!==null&&e.versionFilter.includes(n.version))),e.dateFrom||e.dateTo){const n=e.dateField;e.dateFrom&&(r=r.filter(a=>a[n].slice(0,10)>=e.dateFrom)),e.dateTo&&(r=r.filter(a=>a[n].slice(0,10)<=e.dateTo))}if(e.minRice!==null&&e.minRice!==void 0){const n=e.minRice;r=r.filter(a=>{var o,c;return((o=a.rice)==null?void 0:o.score)!==null&&((c=a.rice)==null?void 0:c.score)!==void 0&&a.rice.score>=n})}return fZ(r,e.sortField)}function FT(i){const e=i,r={...Og};for(const a of Object.keys(Og))e[a]!==void 0&&(r[a]=e[a]);const n=["statusFilter","priorityFilter","urgencyFilter","tagFilter","versionFilter"];for(const a of n){const o=e[a];typeof o=="string"?r[a]=o.trim()?[o.trim()]:[]:Array.isArray(o)||(r[a]=[])}return r.viewMode===void 0&&(r.viewMode="kanban"),r.subGroupBy===void 0&&(r.subGroupBy="none"),r.minRice===void 0&&(r.minRice=null),r}function $T(i,e){if(e==="none")return[];switch(e){case"status":return bj.map(r=>({key:r.key,label:r.labelKey,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.status===r.key)})).filter(r=>r.tasks.length>0);case"priority":return vj.map(r=>({key:r.key,label:r.label,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.priority===r.key)})).filter(r=>r.tasks.length>0);case"urgency":return Cj.map(r=>({key:r.key,label:r.label,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.urgency===r.key)})).filter(r=>r.tasks.length>0);case"tags":{const r=new Map;for(const n of i)if(n.tags.length===0){const a=r.get("(untagged)")??[];a.push(n),r.set("(untagged)",a)}else for(const a of n.tags){const o=r.get(a)??[];o.push(n),r.set(a,o)}return Array.from(r.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}case"version":{const r=new Map;for(const n of i){const a=n.version??"(no version)",o=r.get(a)??[];o.push(n),r.set(a,o)}return Array.from(r.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}}return[]}function pZ(i,e){return i?`dreamcontext:${i}:${e}`:`dreamcontext:${e}`}function gZ(i,e){try{const r=localStorage.getItem(i);return r===null?e:JSON.parse(r)}catch{return e}}function mZ(i,e){try{localStorage.setItem(i,JSON.stringify(e))}catch{}}function yZ(){const{t:i}=oi(),{projectId:e}=yA(),{data:r,isLoading:n,isError:a,error:o}=XX(),{data:c}=uj(),h=hj(),[u,f]=X.useState(!1),[p,g]=X.useState(!1),[b,y]=X.useState(null),v=X.useMemo(()=>pZ(e,"kanban-filters"),[e]),[C,_]=X.useState(()=>{const D=gZ(v,Og);return FT(D)}),w=X.useCallback(D=>{_(U=>{const R=typeof D=="function"?D(U):D;return mZ(v,R),R})},[v]),T=rQ(e),B=X.useCallback((D,U)=>{w(R=>({...R,[D]:U}))},[w]),E=X.useCallback(()=>{w(D=>({...Og,sortField:D.sortField,groupBy:D.groupBy,subGroupBy:D.subGroupBy,viewMode:D.viewMode}))},[w]),N=X.useCallback(D=>{nQ(e,D,{...C})},[C,e]),O=X.useCallback(D=>{w(FT(D.filters))},[w]),M=X.useCallback(D=>{aQ(e,D)},[e]),j=X.useMemo(()=>dZ(r??[],C),[r,C]),G=X.useMemo(()=>!b||!r?null:r.find(D=>D.slug===b)??null,[b,r]),$=X.useMemo(()=>{const D=new Set;for(const U of r??[])for(const R of U.tags)D.add(R);return Array.from(D).sort()},[r]),z=X.useMemo(()=>{const D=new Set;for(const U of r??[])U.version&&D.add(U.version);for(const U of c??[])D.add(U.version);return Array.from(D).sort()},[r,c]),K=(D,U,R)=>{switch(R){case"status":h.mutate({slug:D,updates:{status:U}});break;case"priority":h.mutate({slug:D,updates:{priority:U}});break;case"urgency":h.mutate({slug:D,updates:{urgency:U}});break;case"tags":{const I=(r??[]).find(P=>P.slug===D);I&&!I.tags.includes(U)&&U!=="(untagged)"&&h.mutate({slug:D,updates:{tags:[...I.tags,U]}})}break;case"version":h.mutate({slug:D,updates:{version:U==="(no version)"?null:U}});break}};if(n)return x.jsx("div",{className:"loading",children:i("common.loading")});if(a)return x.jsxs("div",{className:"error-state",children:["Failed to load tasks. ",o==null?void 0:o.message]});const W=()=>{const{groupBy:D,subGroupBy:U}=C,R=(I,P,V,J,H)=>x.jsx(mT,{title:typeof P=="string"&&P.includes(".")?i(P):P,status:I,tasks:J,count:J.length,colorVar:V,onTaskClick:tt=>y(tt.slug),onDrop:(tt,ot)=>K(tt,ot,D),staggerIndex:H+1,subGroups:U!=="none"?$T(J,U):void 0},I);switch(D){case"status":return bj.map((I,P)=>R(I.key,I.labelKey,I.colorVar,j.filter(V=>V.status===I.key),P));case"priority":return vj.map((I,P)=>R(I.key,I.label,I.colorVar,j.filter(V=>V.priority===I.key),P));case"urgency":return Cj.map((I,P)=>R(I.key,I.label,I.colorVar,j.filter(V=>V.urgency===I.key),P));case"tags":{const I=new Map;for(const P of j)if(P.tags.length===0){const V=I.get("(untagged)")??[];V.push(P),I.set("(untagged)",V)}else for(const V of P.tags){const J=I.get(V)??[];J.push(P),I.set(V,J)}return Array.from(I.entries()).map(([P,V],J)=>R(P,P,"--color-brand-vivid",V,J))}case"version":{const I=(c??[]).filter(J=>J.status==="planning").map(J=>J.version),P=(c??[]).filter(J=>J.status==="released").map(J=>J.version),V=["(no version)",...I,...P];for(const J of j)J.version&&!V.includes(J.version)&&V.push(J.version);return V.map((J,H)=>{const tt=j.filter(ot=>(ot.version??"(no version)")===J);return tt.length===0&&J!=="(no version)"?null:R(J,J,"--color-brand-mid",tt,H)}).filter(Boolean)}case"none":return[x.jsx(mT,{title:"All Tasks",status:"all",tasks:j,count:j.length,colorVar:"--color-brand-vivid",onTaskClick:I=>y(I.slug),onDrop:()=>{},subGroups:U!=="none"?$T(j,U):void 0},"all")]}};return x.jsxs("div",{className:"kanban-board",children:[x.jsx(EQ,{filters:C,onFilterChange:B,onClearFilters:E,onCreateClick:()=>f(!0),presets:T,onSavePreset:N,onLoadPreset:O,onDeletePreset:M,allTags:$,allVersions:z,onVersionManagerClick:()=>g(!0)}),C.viewMode==="eisenhower"?x.jsx(sZ,{tasks:j,onTaskClick:D=>y(D.slug)}):C.viewMode==="scatter"?x.jsx(hZ,{tasks:j,onTaskClick:D=>y(D.slug)}):C.viewMode==="list"?x.jsx("div",{className:"task-list",children:j.map(D=>x.jsx(Hf,{task:D,onClick:()=>y(D.slug),onDragStart:()=>{}},D.slug))}):x.jsx("div",{className:"kanban-columns",children:W()}),u&&x.jsx(MQ,{onClose:()=>f(!1)}),p&&x.jsx(uZ,{onClose:()=>g(!1),tasks:r??[]}),G&&x.jsx(rZ,{task:G,onClose:()=>y(null)})]})}function xZ(){const{t:i}=oi();return x.jsxs("div",{children:[x.jsx("h1",{className:"page-title",children:i("tasks.title")}),x.jsx(yZ,{})]})}function bZ(){return zi({queryKey:["changelog"],queryFn:()=>qe.get("/changelog")})}const vZ=25;function zT({entry:i}){const{t:e}=oi();return x.jsxs("div",{className:"changelog-item",children:[x.jsxs("div",{className:"changelog-meta",children:[x.jsx("span",{className:"task-tag","data-hue":Fl(i.type),children:i.type}),i.scope&&x.jsx("span",{className:"changelog-scope",children:i.scope}),i.breaking&&x.jsx("span",{className:"changelog-breaking",children:e("sleep.changelog.breaking")})]}),x.jsx("p",{className:"changelog-summary",children:i.summary}),i.description&&x.jsx("p",{className:"changelog-desc",children:i.description})]})}function CZ(i){const e=[];for(const r of i){const n=e[e.length-1];n&&n.date===r.date?n.items.push(r):e.push({date:r.date,items:[r]})}return e}function kZ(){const{t:i}=oi(),{data:e,isLoading:r,isError:n,error:a}=vA(),{data:o}=bZ();if(r||!e)return x.jsx("div",{className:"loading",children:i("common.loading")});if(n)return x.jsxs("div",{className:"error-state",children:["Failed to load sleep state. ",a==null?void 0:a.message]});const c=xA(e.debt),h=bA(e.debt),u=e.last_sleep,f=(o==null?void 0:o.entries)??[],p=u?f.filter(C=>C.date>u):[],g=u?f.filter(C=>C.date<=u):f,b=g.slice(0,vZ),y=CZ(b),v=g.length-b.length;return x.jsxs("div",{className:"sleep-page",children:[x.jsx("h1",{className:"page-title",children:i("sleep.title")}),x.jsxs("div",{className:"sleep-overview",children:[x.jsxs("div",{className:`sleep-gauge sleep-gauge--${h}`,children:[x.jsx("span",{className:"sleep-gauge-number",children:e.debt}),x.jsx("span",{className:"sleep-gauge-label",children:c})]}),x.jsxs("div",{className:"sleep-details",children:[x.jsxs("div",{className:"sleep-detail",children:[x.jsx("span",{className:"sleep-detail-label",children:i("sleep.last_sleep")}),x.jsx("span",{className:"sleep-detail-value",children:e.last_sleep??"Never"})]}),e.last_sleep_summary&&x.jsxs("div",{className:"sleep-detail",children:[x.jsx("span",{className:"sleep-detail-label",children:"Summary"}),x.jsx("span",{className:"sleep-detail-value sleep-detail-value--summary",children:e.last_sleep_summary.slice(0,200)})]})]})]}),f.length>0&&x.jsxs("div",{className:"sleep-section",children:[x.jsxs("h2",{className:"sleep-section-title",children:[i("sleep.changelog")," (",f.length,")"]}),p.length>0&&x.jsxs("div",{className:"changelog-group changelog-group--pending",children:[x.jsxs("h3",{className:"changelog-group-title",children:[i("sleep.changelog.pending")," (",p.length,")"]}),x.jsx("div",{className:"changelog-list",children:p.map((C,_)=>x.jsx(zT,{entry:C},`p-${_}`))})]}),y.map(C=>x.jsxs("div",{className:"changelog-group",children:[x.jsx("h3",{className:"changelog-group-title changelog-group-title--day",children:C.date}),x.jsx("div",{className:"changelog-list",children:C.items.map((_,w)=>x.jsx(zT,{entry:_},`${C.date}-${w}`))})]},C.date)),v>0&&x.jsxs("p",{className:"changelog-more",children:[v," ",i("sleep.changelog.earlier")]})]}),e.sessions.length>0&&x.jsxs("div",{className:"sleep-section",children:[x.jsxs("h2",{className:"sleep-section-title",children:[i("sleep.sessions")," (",e.sessions.length,")"]}),x.jsx("div",{className:"session-list",children:e.sessions.map((C,_)=>x.jsxs("div",{className:"session-item",children:[x.jsxs("div",{className:"session-header",children:[x.jsx("span",{className:"session-time",children:C.stopped_at??"Active"}),C.score!==null&&x.jsxs("span",{className:"session-score",children:["+",C.score]}),C.change_count!==null&&x.jsxs("span",{className:"session-changes",children:[C.change_count," changes"]}),C.tool_count!=null&&x.jsxs("span",{className:"session-changes",children:[C.tool_count," tools"]})]}),C.last_assistant_message&&x.jsxs("p",{className:"session-message",children:[C.last_assistant_message.slice(0,150),C.last_assistant_message.length>150?"...":""]})]},_))})]}),e.dashboard_changes.length>0&&x.jsxs("div",{className:"sleep-section",children:[x.jsxs("h2",{className:"sleep-section-title",children:["Dashboard Changes (",e.dashboard_changes.length,")"]}),x.jsx("div",{className:"session-list",children:e.dashboard_changes.map((C,_)=>x.jsxs("div",{className:"session-item",children:[x.jsxs("div",{className:"session-header",children:[x.jsx("span",{className:"session-time",children:C.timestamp}),x.jsxs("span",{className:"session-changes",children:[C.entity," / ",C.action]})]}),x.jsx("p",{className:"session-message",children:C.summary})]},_))})]})]})}const _Z=new Set(["text","int","integer","numeric","boolean","timestamp","jsonb","json","serial","bigint","smallint","real","double","float","date","time","uuid","bytea","blob","varchar","char","array"]);function fx(i){const e=i.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return _Z.has(e)}function wZ(i){const{entities:e,relations:r}=SZ(i),n=TZ(i),a=new Set(e.map(p=>p.name.toLowerCase())),o=[...e,...n.filter(p=>!a.has(p.name.toLowerCase()))],c=BZ(o),h=p=>`${p.from}.${p.fromField}->${p.to}.${p.toField}`,u=new Set(r.map(h)),f=[...r,...c.filter(p=>!u.has(h(p)))];return{entities:o,relations:f}}function SZ(i){const e=[],r=[],n=i.split(`
427
+ `);let a=null,o=[],c,h=!1,u=null;function f(){a&&o.length>0&&e.push({name:a,path:c,fields:o,storageType:"table",notes:[]}),a=null,c=void 0,o=[],h=!1,u=null}for(let p=0;p<n.length;p++){const g=n[p],b=g.trim();if(/^\s*--\s*\d+\.\s+\w+/.test(g)){const G=g.match(/\/\w+\/\{[^}]+\}/);G&&(c=G[0]);continue}const y=b.match(/^CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"']?(\w+)[`"']?\s*\(/i);if(y){f(),a=y[1],o=[],h=!0;continue}if(!h||!a)continue;if(/^\s*\)\s*;/.test(g)){f();continue}if(/^\s*--/.test(g)){const $=g.replace(/^\s*--\s?/,"").trim();if(!$||/^[═─=\-*]{3,}/.test($))continue;if($.startsWith(".")){const K=$.match(/^\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(K&&fx(K[2])&&u){const W=K[1],D=K[2].toLowerCase(),R=(K[3]||"").match(/--\s*(.+)$/),I=R?R[1].trim():void 0;o.push({name:`${u}.${W}`,type:D,description:I,isNested:!0,parentField:u})}continue}const z=$.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(z&&fx(z[3])){const K=z[1].replace(/\[\]$/,""),W=z[2],D=z[3].toLowerCase(),R=(z[4]||"").match(/--\s*(.+)$/),I=R?R[1].trim():void 0;u=K,o.push({name:`${K}.${W}`,type:D,description:I,isNested:!0,parentField:K});continue}continue}if(!b)continue;const C=b.replace(/--.*$/,"").trim().replace(/,\s*$/,"").trim();if(/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT|INDEX)\b/i.test(C))continue;const _=C.match(/^[`"']?(\w+)[`"']?\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(!_)continue;const w=_[1],T=_[2],B=_[3]||"";if(!fx(T))continue;const E=T.toLowerCase(),N=/PRIMARY\s+KEY/i.test(B),O=B.match(/REFERENCES\s+[`"']?(\w+)[`"']?\s*\(\s*[`"']?(\w+)[`"']?\s*\)/i);O&&r.push({from:a,fromField:w,to:O[1],toField:O[2],cardinality:"1:1"});const M=g.match(/--\s*(.+)$/),j=M?M[1].trim():void 0;(E==="jsonb"||E==="json")&&(u=w),o.push({name:w,type:E,isPrimary:N,description:j})}return f(),{entities:e,relations:r}}function TZ(i){var o,c,h,u,f;const e=[];let r=null,n=!1;const a=i.split(`
428
+ `);for(let p=0;p<a.length;p++){const b=a[p].match(/^--\s?(.*)/);if(!b)continue;const y=b[1].trim();if(/^={4,}$/.test(y)){r&&r.fields.length>0&&e.push(r),r=null,n=!1;continue}if(/^[A-Z ]+\(/.test(y)&&!y.match(/^[a-z_]/))continue;const v=y.match(/^([A-Z][A-Z _]+?):\s+(\S.+)$/);if(v&&!n){const C=v[1].trim();if(C===C.toUpperCase()&&C.length>1){r&&r.fields.length>0&&e.push(r);const _=v[2].trim();r={name:C,path:_,storageType:_.endsWith(".json")?"json":"file",notes:[],fields:[]},n=!1;continue}}if(r){const C=y.match(/^(?:Created|Managed)\s+by:\s+(.+)/i);if(C){r.managedBy=C[1].trim();continue}}if(y.includes("Fields in YAML frontmatter")||y.startsWith("Schema ")){n=!0;continue}if(y==="["||y==="{"){n=!0;continue}if(!(y==="]"||y==="}"||y==="..."||y==="},")){if(r&&n){const C=y.match(/^([a-z_]\w*):\s+(.+?)(?:\s{2,}--\s+(.+))?$/);if(C){const{type:w,enumValues:T}=IT(C[2].trim(),(o=C[3])==null?void 0:o.trim());r.fields.push({name:C[1],type:w,enumValues:T,description:(c=C[3])==null?void 0:c.trim(),isPrimary:C[1]==="id"});continue}const _=y.match(/^"([a-z_]\w*)":\s+(.+?)(?:,)?(?:\s{2,}--\s+(.+))?$/);if(_){const{type:w,enumValues:T}=IT(_[2].trim(),(h=_[3])==null?void 0:h.trim());r.fields.push({name:_[1],type:w,enumValues:T,description:(u=_[3])==null?void 0:u.trim()});continue}}if(r&&y.startsWith("Body ")&&(r.notes.push(y),y.includes("sections")&&p+1<a.length)){const C=(f=a[p+1])==null?void 0:f.match(/^--\s?(.*)/);C&&/^\s*(Why|[A-Z])/.test(C[1])&&(r.notes.push(C[1].trim()),p++)}}}return r&&r.fields.length>0&&e.push(r),e}function IT(i,e){return i.includes("|")?{type:"enum",enumValues:i.split("|").map(n=>n.trim().replace(/^"|"$/g,""))}:i==="[]"?{type:e!=null&&e.includes("string")?"string[]":"array"}:i.startsWith("[")?{type:"array"}:i==="true"||i==="false"?{type:"boolean"}:i==="null"?{type:"nullable"}:/^\d+$/.test(i)?{type:"number"}:/\d{4}-\d{2}-\d{2}/.test(i.replace(/"/g,""))?{type:"date"}:{type:"string"}}function BZ(i){const e=[];for(const r of i)for(const n of r.fields)if(!n.isNested){if(n.description){const a=n.description.match(/(task|feature|knowledge)\s+IDs?/i);if(a){const o=a[1].toLowerCase(),c=i.find(h=>h.name.toLowerCase().includes(o));if(c&&c.name!==r.name){const h=c.fields.find(u=>u.isPrimary);e.push({from:r.name,fromField:n.name,to:c.name,toField:h?h.name:"_id",cardinality:n.type.includes("array")||n.type==="array"?"1:N":"1:1"})}}}if(n.name==="parent_task"||n.name==="parent_id"){const a=r.fields.find(o=>o.isPrimary);e.push({from:r.name,fromField:n.name,to:r.name,toField:a?a.name:"_id",cardinality:"1:1"})}}return e}function Zb(i){return i.toLowerCase().replace(/\s+/g,"-")}function qT(i){return i==="enum"?"enum":i==="array"||i.endsWith("[]")||i.startsWith("array")?"array":i==="boolean"?"boolean":i==="nullable"?"nullable":i==="date"||i==="timestamp"?"date":i==="int"||i==="integer"||i==="numeric"||i==="serial"||i==="bigint"||i==="smallint"||i==="real"||i==="float"||i==="double"?"number":i==="jsonb"||i==="json"?"json":"string"}function AZ(i,e,r){return i.isPrimary?{icon:"PK",cls:"entity-field-icon--key"}:e.some(a=>a.from===r&&a.fromField===i.name)?{icon:"FK",cls:"entity-field-icon--ref"}:null}function EZ(i,e,r,n){if(n){const C=i.right-r.left,_=i.top+i.height*.35-r.top,w=36,T=28;return{d:`M ${C},${_} C ${C+w},${_-T*.3} ${C+w},${_-T*1.3} ${C},${_-T}`,labelX:C+w+4,labelY:_-T*.5}}const a=i.left+i.width/2-r.left,o=e.left+e.width/2-r.left,c=i.top+i.height/2-r.top,h=e.top+e.height/2-r.top,u=Math.abs(a-o),f=Math.abs(c-h);let p,g,b,y;if(u>f){a<o?(p=i.right-r.left,b=e.left-r.left):(p=i.left-r.left,b=e.right-r.left),g=c,y=h;const C=(b-p)*.4;return{d:`M ${p},${g} C ${p+C},${g} ${b-C},${y} ${b},${y}`,labelX:(p+b)/2,labelY:(g+y)/2-10}}p=a,b=o,c<h?(g=i.bottom-r.top,y=e.top-r.top):(g=i.top-r.top,y=e.bottom-r.top);const v=(y-g)*.4;return{d:`M ${p},${g} C ${p},${g+v} ${b},${y-v} ${b},${y}`,labelX:(p+b)/2,labelY:(g+y)/2-10}}function MZ({entity:i,relations:e}){const[r,n]=X.useState(new Set),a=i.storageType==="json"?"{ }":i.storageType==="table"?"SQL":"☰",o=i.fields.filter(u=>!u.isNested),c=X.useMemo(()=>{const u=new Map;for(const f of i.fields)if(f.isNested&&f.parentField){const p=u.get(f.parentField)||[];p.push(f),u.set(f.parentField,p)}return u},[i.fields]),h=u=>{n(f=>{const p=new Set(f);return p.has(u)?p.delete(u):p.add(u),p})};return x.jsxs("div",{className:"entity-card","data-entity":Zb(i.name),children:[x.jsxs("div",{className:"entity-card-header",children:[x.jsxs("div",{className:"entity-card-title-group",children:[x.jsx("span",{className:"entity-card-category-icon",children:a}),x.jsx("span",{className:"entity-card-name",children:i.name})]}),x.jsx("span",{className:"entity-card-badge","data-storage":i.storageType,children:i.storageType})]}),i.path&&x.jsx("div",{className:"entity-card-path",title:i.path,children:i.path}),i.managedBy&&x.jsx("div",{className:"entity-card-managed",children:i.managedBy}),x.jsx("div",{className:"entity-fields",children:o.map(u=>{const f=AZ(u,e,i.name),p=qT(u.type),g=c.get(u.name),b=r.has(u.name);return x.jsxs(X.Fragment,{children:[x.jsxs("div",{className:`entity-field${g?" entity-field--expandable":""}`,onClick:g?()=>h(u.name):void 0,children:[x.jsx("span",{className:`entity-field-icon ${(f==null?void 0:f.cls)??""}`,children:(f==null?void 0:f.icon)??""}),x.jsx("span",{className:"entity-field-name",children:u.name}),u.type==="enum"&&u.enumValues?x.jsx("span",{className:"entity-field-enum-group",children:u.enumValues.map(y=>x.jsx("span",{className:"entity-field-enum-pill",children:y},y))}):x.jsx("span",{className:"entity-field-type","data-type":p,children:u.type}),g&&x.jsxs("span",{className:"entity-field-toggle",children:[x.jsx("span",{className:`entity-field-toggle-arrow${b?" entity-field-toggle-arrow--open":""}`,children:"▶"}),x.jsx("span",{className:"entity-field-toggle-count",children:g.length})]}),!g&&u.description&&x.jsx("span",{className:"entity-field-desc",title:u.description,children:u.description})]}),g&&b&&g.map(y=>{var _;const v=qT(y.type),C=y.name.slice((((_=y.parentField)==null?void 0:_.length)??0)+1);return x.jsxs("div",{className:"entity-field entity-field--nested",children:[x.jsx("span",{className:"entity-field-icon"}),x.jsxs("span",{className:"entity-field-name entity-field-name--nested",children:[".",C]}),x.jsx("span",{className:"entity-field-type","data-type":v,children:y.type}),y.description&&x.jsx("span",{className:"entity-field-desc",title:y.description,children:y.description})]},y.name)})]},u.name)})}),i.notes.length>0&&x.jsx("div",{className:"entity-card-notes",children:i.notes.map((u,f)=>x.jsx("div",{className:"entity-card-note",children:u},f))})]})}function LZ({relations:i,entities:e}){return i.length===0?null:x.jsxs("div",{className:"sql-preview-legend",children:[x.jsx("div",{className:"sql-preview-legend-title",children:"Relationships"}),x.jsx("div",{className:"sql-preview-legend-items",children:i.map((r,n)=>{var h,u;const a=((h=e.find(f=>f.name===r.from))==null?void 0:h.name)??r.from,o=((u=e.find(f=>f.name===r.to))==null?void 0:u.name)??r.to,c=r.from===r.to;return x.jsxs("div",{className:"sql-preview-legend-item",children:[x.jsx("span",{className:"sql-preview-legend-line"}),x.jsx("span",{children:c?`${a}.${r.fromField} ↻ self`:`${a}.${r.fromField} → ${o}.${r.toField}`}),x.jsx("span",{className:"sql-preview-legend-cardinality",children:r.cardinality})]},n)})})]})}function NZ({content:i}){const e=X.useRef(null),[r,n]=X.useState([]),[a,o]=X.useState({width:0,height:0}),c=X.useMemo(()=>wZ(i),[i]),h=X.useCallback(()=>{const u=e.current;if(!u||c.relations.length===0){n([]);return}const f=u.getBoundingClientRect();o({width:u.scrollWidth,height:u.scrollHeight});const p=[];for(const g of c.relations){const b=u.querySelector(`[data-entity="${Zb(g.from)}"]`),y=u.querySelector(`[data-entity="${Zb(g.to)}"]`);if(!b||!y)continue;const v=b.getBoundingClientRect(),C=y.getBoundingClientRect(),{d:_,labelX:w,labelY:T}=EZ(v,C,f,g.from===g.to);p.push({d:_,labelX:w,labelY:T,label:g.cardinality})}n(p)},[c]);return X.useEffect(()=>{const u=requestAnimationFrame(h),f=new ResizeObserver(h);return e.current&&f.observe(e.current),()=>{cancelAnimationFrame(u),f.disconnect()}},[h]),c.entities.length===0?x.jsx("div",{className:"sql-preview",children:x.jsx("div",{className:"sql-preview-empty",children:"No schema entities found in this file."})}):x.jsxs("div",{className:"sql-preview",ref:e,children:[x.jsxs("svg",{className:"sql-preview-svg",width:a.width||"100%",height:a.height||"100%",viewBox:a.width?`0 0 ${a.width} ${a.height}`:void 0,children:[x.jsx("defs",{children:x.jsx("marker",{id:"rel-arrowhead",viewBox:"0 0 10 7",refX:"9",refY:"3.5",markerWidth:"8",markerHeight:"6",orient:"auto",children:x.jsx("polygon",{points:"0 0, 10 3.5, 0 7",className:"sql-preview-arrowhead"})})}),r.map((u,f)=>x.jsxs("g",{children:[x.jsx("path",{d:u.d,className:"sql-preview-line",markerEnd:"url(#rel-arrowhead)"}),x.jsx("rect",{className:"sql-preview-line-label-bg",x:u.labelX-12,y:u.labelY-7,width:24,height:14}),x.jsx("text",{className:"sql-preview-line-label",x:u.labelX,y:u.labelY+4,textAnchor:"middle",children:u.label})]},f))]}),x.jsx("div",{className:"sql-preview-grid",children:c.entities.map(u=>x.jsx(MZ,{entity:u,relations:c.relations},u.name))}),x.jsx(LZ,{relations:c.relations,entities:c.entities})]})}const jZ={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function Kb({type:i}){return x.jsx("span",{className:`json-type-badge ${jZ[i]??""}`,children:i})}function Jb(){return x.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function OZ({data:i}){const[e,r]=X.useState("all"),[n,a]=X.useState(new Set),o=X.useMemo(()=>{const u=e==="all"?i:i.filter(p=>p.type===e),f=new Map;for(let p=0;p<u.length;p++){const g=u[p],b=f.get(g.date)||[];b.push({entry:g,index:p}),f.set(g.date,b)}return f},[i,e]),c=u=>{a(f=>{const p=new Set(f);return p.has(u)?p.delete(u):p.add(u),p})},h=X.useMemo(()=>{const u={};for(const f of i)u[f.type]=(u[f.type]||0)+1;return u},[i]);return x.jsxs("div",{className:"json-preview",children:[x.jsx("div",{className:"json-preview-header",children:x.jsxs("div",{className:"json-preview-stats",children:[x.jsxs("span",{className:"json-preview-total",children:[i.length," entries"]}),Object.entries(h).sort((u,f)=>f[1]-u[1]).map(([u,f])=>x.jsxs("button",{className:`json-stat-chip ${e===u?"json-stat-chip--active":""}`,onClick:()=>r(p=>p===u?"all":u),children:[x.jsx(Kb,{type:u})," ",f]},u))]})}),x.jsx("div",{className:"json-timeline",children:Array.from(o.entries()).map(([u,f])=>x.jsxs("div",{className:"json-date-group",children:[x.jsxs("div",{className:"json-date-marker",children:[x.jsx("span",{className:"json-date-dot"}),x.jsx("span",{className:"json-date-label",children:u}),x.jsx("span",{className:"json-date-count",children:f.length})]}),x.jsx("div",{className:"json-date-entries",children:f.map(({entry:p,index:g})=>{const b=n.has(g),y=p.scope.length>50?p.scope.slice(0,47)+"...":p.scope;return x.jsxs("div",{className:`json-entry ${b?"json-entry--expanded":""}`,onClick:()=>c(g),children:[x.jsxs("div",{className:"json-entry-header",children:[x.jsx(Kb,{type:p.type}),p.breaking&&x.jsx(Jb,{}),x.jsx("span",{className:"json-entry-scope",title:p.scope,children:y})]}),x.jsx("div",{className:`json-entry-desc ${b?"":"json-entry-desc--clamped"}`,children:p.description})]},g)})})]},u))})]})}function RZ({data:i}){const[e,r]=X.useState(new Set([0])),n=a=>{r(o=>{const c=new Set(o);return c.has(a)?c.delete(a):c.add(a),c})};return x.jsxs("div",{className:"json-preview",children:[x.jsx("div",{className:"json-preview-header",children:x.jsxs("span",{className:"json-preview-total",children:[i.length," release",i.length!==1?"s":""]})}),x.jsx("div",{className:"json-releases",children:i.map((a,o)=>{var h,u,f,p;const c=e.has(o);return x.jsxs("div",{className:`json-release ${c?"json-release--expanded":""}`,children:[x.jsxs("div",{className:"json-release-header",onClick:()=>n(o),children:[x.jsx("span",{className:"json-release-version",children:a.version}),x.jsx("span",{className:"json-release-date",children:a.date}),a.breaking&&x.jsx(Jb,{}),x.jsxs("span",{className:"json-release-meta",children:[(h=a.features)!=null&&h.length?`${a.features.length} features`:"",(u=a.features)!=null&&u.length&&((f=a.tasks)!=null&&f.length)?" / ":"",(p=a.tasks)!=null&&p.length?`${a.tasks.length} task${a.tasks.length!==1?"s":""}`:""]}),x.jsx("span",{className:`json-release-chevron ${c?"json-release-chevron--open":""}`,children:"▶"})]}),c&&x.jsxs("div",{className:"json-release-body",children:[x.jsx("div",{className:"json-release-summary",children:a.summary}),a.features&&a.features.length>0&&x.jsxs("div",{className:"json-release-section",children:[x.jsx("div",{className:"json-release-section-title",children:"Features"}),x.jsx("div",{className:"json-release-ids",children:a.features.map(g=>x.jsx("span",{className:"json-id-chip json-id-chip--feature",children:g},g))})]}),a.tasks&&a.tasks.length>0&&x.jsxs("div",{className:"json-release-section",children:[x.jsx("div",{className:"json-release-section-title",children:"Tasks"}),x.jsx("div",{className:"json-release-ids",children:a.tasks.map(g=>x.jsx("span",{className:"json-id-chip json-id-chip--task",children:g},g))})]}),a.changelog&&a.changelog.length>0&&x.jsxs("div",{className:"json-release-section",children:[x.jsxs("div",{className:"json-release-section-title",children:["Changelog (",a.changelog.length,")"]}),x.jsx("div",{className:"json-release-changelog",children:a.changelog.map((g,b)=>x.jsxs("div",{className:"json-release-cl-entry",children:[x.jsx(Kb,{type:g.type}),g.breaking&&x.jsx(Jb,{}),x.jsx("span",{className:"json-release-cl-scope",children:g.scope}),x.jsx("span",{className:"json-release-cl-desc",children:g.description})]},b))})]})]})]},a.version)})})]})}function DZ({data:i,filename:e}){var a,o,c;if(!Array.isArray(i)||i.length===0)return x.jsx("div",{className:"json-preview",children:x.jsx("div",{className:"json-preview-empty",children:"No data found in this file."})});const r=e.toLowerCase().includes("changelog"),n=e.toLowerCase().includes("release");return r&&((a=i[0])!=null&&a.type)&&((o=i[0])!=null&&o.description)?x.jsx(OZ,{data:i}):n&&((c=i[0])!=null&&c.version)?x.jsx(RZ,{data:i}):x.jsxs("div",{className:"json-preview",children:[x.jsx("div",{className:"json-preview-header",children:x.jsxs("span",{className:"json-preview-total",children:[i.length," items"]})}),x.jsx("div",{className:"json-generic-list",children:i.map((h,u)=>x.jsx("pre",{className:"json-generic-item",children:JSON.stringify(h,null,2)},u))})]})}function FZ(i){return i.endsWith(".sql")||i.endsWith(".json")||i.endsWith(".md")}function $Z(){const{t:i}=oi(),e=Kr(),[r,n]=X.useState(null),[a,o]=X.useState(null),[c,h]=X.useState(!1),[u,f]=X.useState("preview"),{data:p,isLoading:g,isError:b,error:y}=zi({queryKey:["core"],queryFn:()=>qe.get("/core")}),{data:v}=zi({queryKey:["core",r],queryFn:()=>qe.get(`/core/${r}`),enabled:!!r}),C=Ta({mutationFn:({filename:E,content:N})=>qe.put(`/core/${E}`,{content:N}),onSuccess:()=>{e.invalidateQueries({queryKey:["core"]}),h(!1)}}),_=()=>{(v==null?void 0:v.content)!==void 0&&(o(v.content),h(!0))},w=()=>{r&&a!==null&&C.mutate({filename:r,content:a})};if(g)return x.jsx("div",{className:"loading",children:i("common.loading")});if(b)return x.jsxs("div",{className:"error-state",children:["Failed to load core files. ",y==null?void 0:y.message]});const T=(p==null?void 0:p.files)??[],B=()=>{if(!r||!v)return null;if(u==="preview"){if(r.endsWith(".sql")&&v.content)return x.jsx(NZ,{content:v.content});if(r.endsWith(".json")&&v.data)return x.jsx(DZ,{data:v.data,filename:r});if(r.endsWith(".md")&&v.content)return x.jsx(Pf,{content:v.content,frontmatter:v.frontmatter})}return x.jsx("pre",{className:"core-viewer-content",children:v.content??JSON.stringify(v.data,null,2)})};return x.jsxs("div",{className:"core-page",children:[x.jsx("h1",{className:"page-title",children:i("core.title")}),x.jsxs("div",{className:"core-layout",children:[x.jsx("div",{className:"core-list",children:T.map((E,N)=>x.jsxs("button",{className:`core-list-item ${r===E.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(N+1,8)}`,onClick:()=>{n(E.filename),h(!1),f("preview")},children:[x.jsx("span",{className:"core-list-name",children:E.name}),x.jsx("span",{className:"core-list-type",children:E.type})]},E.filename))}),x.jsxs("div",{className:"core-detail",children:[!r&&x.jsx("div",{className:"core-empty",children:"Select a file to view."}),r&&v&&!c&&x.jsxs("div",{className:"core-viewer",children:[x.jsxs("div",{className:"core-viewer-header",children:[x.jsx("h2",{className:"core-viewer-title",children:v.filename}),x.jsxs("div",{className:"core-viewer-actions",children:[FZ(r)&&x.jsxs("div",{className:"core-tabs",children:[x.jsx("button",{className:`core-tab ${u==="file"?"core-tab--active":""}`,onClick:()=>f("file"),children:"File"}),x.jsx("button",{className:`core-tab ${u==="preview"?"core-tab--active":""}`,onClick:()=>f("preview"),children:"Preview"})]}),v.type==="markdown"&&x.jsx("button",{className:"btn btn--ghost",onClick:_,children:"Edit"})]})]}),B()]}),r&&c&&x.jsxs("div",{className:"core-editor",children:[x.jsxs("div",{className:"core-editor-header",children:[x.jsxs("h2",{className:"core-viewer-title",children:["Editing: ",r]}),x.jsxs("div",{className:"core-editor-actions",children:[x.jsx("button",{className:"btn btn--ghost",onClick:()=>h(!1),children:"Cancel"}),x.jsx("button",{className:"btn btn--primary",onClick:w,disabled:C.isPending,children:C.isPending?"Saving...":"Save"})]})]}),x.jsxs("div",{className:"core-editor-split",children:[x.jsx("textarea",{className:"core-editor-textarea",value:a??"",onChange:E=>o(E.target.value)}),x.jsx("pre",{className:"core-editor-preview",children:a})]})]})]})]})]})}function zZ(){return zi({queryKey:["knowledge"],queryFn:()=>qe.get("/knowledge"),select:i=>i.entries})}function IZ(i){return zi({queryKey:["knowledge",i],queryFn:()=>qe.get(`/knowledge/${i}`),select:e=>e.entry,enabled:!!i})}function qZ(){const i=Kr();return Ta({mutationFn:({slug:e,pinned:r})=>qe.patch(`/knowledge/${e}`,{pinned:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["knowledge"]})}})}function PZ(){const{t:i}=oi(),{data:e,isLoading:r,isError:n,error:a}=zZ(),o=qZ(),[c,h]=X.useState(""),[u,f]=X.useState(null),[p,g]=X.useState("preview"),{data:b}=IZ(u??""),y=X.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const v=c.toLowerCase();return e.filter(C=>C.name.toLowerCase().includes(v)||C.description.toLowerCase().includes(v)||C.tags.some(_=>_.toLowerCase().includes(v)))},[e,c]);return r?x.jsx("div",{className:"loading",children:i("common.loading")}):n?x.jsxs("div",{className:"error-state",children:["Failed to load knowledge. ",a==null?void 0:a.message]}):x.jsxs("div",{className:"knowledge-page",children:[x.jsx("h1",{className:"page-title",children:i("knowledge.title")}),x.jsx("input",{className:"knowledge-search",placeholder:i("knowledge.search"),value:c,onChange:v=>h(v.target.value)}),x.jsxs("div",{className:"knowledge-layout",children:[x.jsxs("div",{className:"knowledge-list",children:[y.length===0&&x.jsx("div",{className:"core-empty",children:i("common.empty")}),y.map(v=>x.jsxs("button",{className:`knowledge-card ${u===v.slug?"knowledge-card--active":""}`,onClick:()=>{f(v.slug),g("preview")},children:[x.jsxs("div",{className:"knowledge-card-header",children:[x.jsx("span",{className:"knowledge-card-name",children:v.name}),x.jsx("button",{className:`pin-btn ${v.pinned?"pin-btn--active":""}`,onClick:C=>{C.stopPropagation(),o.mutate({slug:v.slug,pinned:!v.pinned})},title:v.pinned?i("knowledge.unpin"):i("knowledge.pin"),children:v.pinned?"◆":"◇"})]}),v.description&&x.jsx("p",{className:"knowledge-card-desc",children:v.description}),x.jsx("div",{className:"knowledge-card-tags",children:v.tags.map(C=>x.jsx("span",{className:"task-tag","data-hue":Fl(C),children:C},C))})]},v.slug))]}),x.jsxs("div",{className:"knowledge-detail",children:[!u&&x.jsx("div",{className:"core-empty",children:"Select a knowledge file to view."}),u&&b&&x.jsxs("div",{className:"core-viewer",children:[x.jsxs("div",{className:"core-viewer-header",children:[x.jsx("h2",{className:"core-viewer-title",children:b.name}),x.jsx("div",{className:"core-viewer-actions",children:x.jsxs("div",{className:"core-tabs",children:[x.jsx("button",{className:`core-tab ${p==="file"?"core-tab--active":""}`,onClick:()=>g("file"),children:"File"}),x.jsx("button",{className:`core-tab ${p==="preview"?"core-tab--active":""}`,onClick:()=>g("preview"),children:"Preview"})]})})]}),p==="preview"&&b.content?x.jsx(Pf,{content:b.content}):x.jsx("pre",{className:"core-viewer-content",children:b.content})]})]})]})]})}function HZ(){const{t:i}=oi(),[e,r]=X.useState(null),[n,a]=X.useState("preview"),{data:o,isLoading:c,isError:h,error:u}=zi({queryKey:["features"],queryFn:()=>qe.get("/features")}),{data:f}=zi({queryKey:["features",e],queryFn:()=>qe.get(`/features/${e}`),enabled:!!e,select:g=>g.feature});if(c)return x.jsx("div",{className:"loading",children:i("common.loading")});if(h)return x.jsxs("div",{className:"error-state",children:["Failed to load features. ",u==null?void 0:u.message]});const p=(o==null?void 0:o.features)??[];return x.jsxs("div",{className:"features-page",children:[x.jsx("h1",{className:"page-title",children:i("features.title")}),x.jsxs("div",{className:"features-layout",children:[x.jsxs("div",{className:"features-list",children:[p.length===0&&x.jsx("div",{className:"core-empty",children:i("common.empty")}),p.map((g,b)=>x.jsxs("button",{className:`feature-card ${e===g.slug?"feature-card--active":""} animate-stagger animate-stagger-${Math.min(b+1,8)}`,onClick:()=>{r(g.slug),a("preview")},children:[x.jsxs("div",{className:"feature-card-header",children:[x.jsx("span",{className:"feature-card-name",children:g.slug}),x.jsx("span",{className:`feature-status feature-status--${g.status}`,children:g.status})]}),x.jsx("div",{className:"knowledge-card-tags",children:g.tags.map(y=>x.jsx("span",{className:"task-tag","data-hue":Fl(y),children:y},y))})]},g.slug))]}),x.jsxs("div",{className:"features-detail",children:[!e&&x.jsx("div",{className:"core-empty",children:"Select a feature to view."}),e&&f&&x.jsxs("div",{className:"core-viewer",children:[x.jsxs("div",{className:"core-viewer-header",children:[x.jsx("h2",{className:"core-viewer-title",children:f.slug}),x.jsx("div",{className:"core-viewer-actions",children:x.jsxs("div",{className:"core-tabs",children:[x.jsx("button",{className:`core-tab ${n==="file"?"core-tab--active":""}`,onClick:()=>a("file"),children:"File"}),x.jsx("button",{className:`core-tab ${n==="preview"?"core-tab--active":""}`,onClick:()=>a("preview"),children:"Preview"})]})})]}),x.jsxs("div",{className:"feature-meta",children:[x.jsxs("span",{children:["Status: ",f.status]}),x.jsxs("span",{children:["Created: ",f.created]}),x.jsxs("span",{children:["Updated: ",f.updated]})]}),f.related_tasks.length>0&&x.jsxs("div",{className:"feature-tasks",children:["Related tasks: ",f.related_tasks.join(", ")]}),n==="preview"&&f.content?x.jsx(Pf,{content:f.content}):x.jsx("div",{className:"feature-viewer",children:f.sections.map(g=>x.jsxs("div",{className:"feature-section",children:[x.jsx("h3",{className:"feature-section-title",children:g}),x.jsx("pre",{className:"feature-section-content",children:f.sectionContents[g]||"(empty)"})]},g))})]})]})]})]})}function UZ(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function WZ(i,e,r){return e=JZ(e),e in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function PT(i,e){return VZ(i)||UZ(i,e)||kj(i,e)||ZZ()}function GZ(i){return YZ(i)||XZ(i)||kj(i)||QZ()}function YZ(i){if(Array.isArray(i))return tv(i)}function VZ(i){if(Array.isArray(i))return i}function XZ(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function kj(i,e){if(i){if(typeof i=="string")return tv(i,e);var r=Object.prototype.toString.call(i).slice(8,-1);if(r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set")return Array.from(i);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tv(i,e)}}function tv(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=i[r];return n}function QZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
429
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
430
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KZ(i,e){if(typeof i!="object"||i===null)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function JZ(i){var e=KZ(i,"string");return typeof e=="symbol"?e:String(e)}var tK=function(e,r){var n=new Set(r);return Object.assign.apply(Object,[{}].concat(GZ(Object.entries(e).filter(function(a){var o=PT(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=PT(a,2),c=o[0],h=o[1];return WZ({},c,h)}))))};function ev(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function eK(i){if(Array.isArray(i))return i}function iK(i){if(Array.isArray(i))return ev(i)}function rK(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function nK(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function aK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
431
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
432
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oK(i,e){return eK(i)||nK(i,e)||_j(i,e)||aK()}function HT(i){return iK(i)||rK(i)||_j(i)||sK()}function _j(i,e){if(i){if(typeof i=="string")return ev(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ev(i,e):void 0}}function lK(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.wrapperElementType,n=r===void 0?"div":r,a=e.nodeMapper,o=a===void 0?function(p){return p}:a,c=e.methodNames,h=c===void 0?[]:c,u=e.initPropNames,f=u===void 0?[]:u;return X.forwardRef(function(p,g){var b=X.useRef(),y=X.useMemo(function(){var _=Object.fromEntries(f.filter(function(w){return p.hasOwnProperty(w)}).map(function(w){return[w,p[w]]}));return i(_)},[]);UT(function(){y(o(b.current))},X.useLayoutEffect),UT(function(){return y._destructor instanceof Function?y._destructor:void 0});var v=X.useCallback(function(_){for(var w=arguments.length,T=new Array(w>1?w-1:0),B=1;B<w;B++)T[B-1]=arguments[B];return y[_]instanceof Function?y[_].apply(y,T):void 0},[y]),C=X.useRef({});return Object.keys(tK(p,[].concat(HT(h),HT(f)))).filter(function(_){return C.current[_]!==p[_]}).forEach(function(_){return v(_,p[_])}),C.current=p,X.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(_){return[_,function(){for(var w=arguments.length,T=new Array(w),B=0;B<w;B++)T[B]=arguments[B];return v.apply(void 0,[_].concat(T))}]}))},[v]),A6.createElement(n,{ref:b})})}function UT(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:X.useEffect,r=X.useRef(),n=X.useRef(!1),a=X.useRef(!1),o=X.useState(0),c=oK(o,2);c[0];var h=c[1];n.current&&(a.current=!0),e(function(){return n.current||(r.current=i(),n.current=!0),h(function(u){return u+1}),function(){a.current&&r.current&&r.current()}},[])}var cK="[object Symbol]";function hK(i){return typeof i=="symbol"||yh(i)&&jl(i)==cK}var uK=/\s/;function fK(i){for(var e=i.length;e--&&uK.test(i.charAt(e)););return e}var dK=/^\s+/;function pK(i){return i&&i.slice(0,fK(i)+1).replace(dK,"")}var WT=NaN,gK=/^[-+]0x[0-9a-f]+$/i,mK=/^0b[01]+$/i,yK=/^0o[0-7]+$/i,xK=parseInt;function GT(i){if(typeof i=="number")return i;if(hK(i))return WT;if(Pn(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=Pn(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=pK(i);var r=mK.test(i);return r||yK.test(i)?xK(i.slice(2),r?2:8):gK.test(i)?WT:+i}var dx=function(){return Wn.Date.now()},bK="Expected a function",vK=Math.max,CK=Math.min;function wj(i,e,r){var n,a,o,c,h,u,f=0,p=!1,g=!1,b=!0;if(typeof i!="function")throw new TypeError(bK);e=GT(e)||0,Pn(r)&&(p=!!r.leading,g="maxWait"in r,o=g?vK(GT(r.maxWait)||0,e):o,b="trailing"in r?!!r.trailing:b);function y(O){var M=n,j=a;return n=a=void 0,f=O,c=i.apply(j,M),c}function v(O){return f=O,h=setTimeout(w,e),p?y(O):c}function C(O){var M=O-u,j=O-f,G=e-M;return g?CK(G,o-j):G}function _(O){var M=O-u,j=O-f;return u===void 0||M>=e||M<0||g&&j>=o}function w(){var O=dx();if(_(O))return T(O);h=setTimeout(w,C(O))}function T(O){return h=void 0,b&&n?y(O):(n=a=void 0,c)}function B(){h!==void 0&&clearTimeout(h),f=0,n=u=a=h=void 0}function E(){return h===void 0?c:T(dx())}function N(){var O=dx(),M=_(O);if(n=arguments,a=this,u=O,M){if(h===void 0)return v(u);if(g)return clearTimeout(h),h=setTimeout(w,e),y(u)}return h===void 0&&(h=setTimeout(w,e)),c}return N.cancel=B,N.flush=E,N}var kK="Expected a function";function _K(i,e,r){var n=!0,a=!0;if(typeof i!="function")throw new TypeError(kK);return Pn(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),wj(i,e,{leading:n,maxWait:e,trailing:a})}var yl=Object.freeze({Linear:Object.freeze({None:function(i){return i},In:function(i){return i},Out:function(i){return i},InOut:function(i){return i}}),Quadratic:Object.freeze({In:function(i){return i*i},Out:function(i){return i*(2-i)},InOut:function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)}}),Cubic:Object.freeze({In:function(i){return i*i*i},Out:function(i){return--i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)}}),Quartic:Object.freeze({In:function(i){return i*i*i*i},Out:function(i){return 1- --i*i*i*i},InOut:function(i){return(i*=2)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2)}}),Quintic:Object.freeze({In:function(i){return i*i*i*i*i},Out:function(i){return--i*i*i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2)}}),Sinusoidal:Object.freeze({In:function(i){return 1-Math.sin((1-i)*Math.PI/2)},Out:function(i){return Math.sin(i*Math.PI/2)},InOut:function(i){return .5*(1-Math.sin(Math.PI*(.5-i)))}}),Exponential:Object.freeze({In:function(i){return i===0?0:Math.pow(1024,i-1)},Out:function(i){return i===1?1:1-Math.pow(2,-10*i)},InOut:function(i){return i===0?0:i===1?1:(i*=2)<1?.5*Math.pow(1024,i-1):.5*(-Math.pow(2,-10*(i-1))+2)}}),Circular:Object.freeze({In:function(i){return 1-Math.sqrt(1-i*i)},Out:function(i){return Math.sqrt(1- --i*i)},InOut:function(i){return(i*=2)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1)}}),Elastic:Object.freeze({In:function(i){return i===0?0:i===1?1:-Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI)},Out:function(i){return i===0?0:i===1?1:Math.pow(2,-10*i)*Math.sin((i-.1)*5*Math.PI)+1},InOut:function(i){return i===0?0:i===1?1:(i*=2,i<1?-.5*Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI):.5*Math.pow(2,-10*(i-1))*Math.sin((i-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(i){var e=1.70158;return i===1?1:i*i*((e+1)*i-e)},Out:function(i){var e=1.70158;return i===0?0:--i*i*((e+1)*i+e)+1},InOut:function(i){var e=2.5949095;return(i*=2)<1?.5*(i*i*((e+1)*i-e)):.5*((i-=2)*i*((e+1)*i+e)+2)}}),Bounce:Object.freeze({In:function(i){return 1-yl.Bounce.Out(1-i)},Out:function(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},InOut:function(i){return i<.5?yl.Bounce.In(i*2)*.5:yl.Bounce.Out(i*2-1)*.5+.5}}),generatePow:function(i){return i===void 0&&(i=4),i=i<Number.EPSILON?Number.EPSILON:i,i=i>1e4?1e4:i,{In:function(e){return Math.pow(e,i)},Out:function(e){return 1-Math.pow(1-e,i)},InOut:function(e){return e<.5?Math.pow(e*2,i)/2:(1-Math.pow(2-e*2,i))/2+.5}}}}),Yu=function(){return performance.now()},Sj=(function(){function i(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return i.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},i.prototype.removeAll=function(){this._tweens={}},i.prototype.add=function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var a=0,o=r;a<o.length;a++){var c=o[a];(e=c._group)===null||e===void 0||e.remove(c),c._group=this,this._tweens[c.getId()]=c,this._tweensAddedDuringUpdate[c.getId()]=c}},i.prototype.remove=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var n=0,a=e;n<a.length;n++){var o=a[n];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},i.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},i.prototype.update=function(e,r){e===void 0&&(e=Yu()),r===void 0&&(r=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var o=this._tweens[n[a]],c=!r;o&&o.update(e,c)===!1&&!r&&this.remove(o)}n=Object.keys(this._tweensAddedDuringUpdate)}},i})(),iv={Linear:function(i,e){var r=i.length-1,n=r*e,a=Math.floor(n),o=iv.Utils.Linear;return e<0?o(i[0],i[1],n):e>1?o(i[r],i[r-1],r-n):o(i[a],i[a+1>r?r:a+1],n-a)},Utils:{Linear:function(i,e,r){return(e-i)*r+i}}},Tj=(function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i})(),rv=new Sj,YT=(function(){function i(e,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=yl.Linear.None,this._interpolationFunction=iv.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Tj.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=rv,rv.add(this))}return i.prototype.getId=function(){return this._id},i.prototype.isPlaying=function(){return this._isPlaying},i.prototype.isPaused=function(){return this._isPaused},i.prototype.getDuration=function(){return this._duration},i.prototype.to=function(e,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},i.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},i.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},i.prototype.start=function(e,r){if(e===void 0&&(e=Yu()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var o in this._valuesEnd)a[o]=this._valuesEnd[o];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},i.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},i.prototype._setupProperties=function(e,r,n,a,o){for(var c in n){var h=e[c],u=Array.isArray(h),f=u?"array":typeof h,p=!u&&Array.isArray(n[c]);if(!(f==="undefined"||f==="function")){if(p){var g=n[c];if(g.length===0)continue;for(var b=[h],y=0,v=g.length;y<v;y+=1){var C=this._handleRelativeValue(h,g[y]);if(isNaN(C)){p=!1,console.warn("Found invalid interpolation list. Skipping.");break}b.push(C)}p&&(n[c]=b)}if((f==="object"||u)&&h&&!p){r[c]=u?[]:{};var _=h;for(var w in _)r[c][w]=_[w];a[c]=u?[]:{};var g=n[c];if(!this._isDynamic){var T={};for(var w in g)T[w]=g[w];n[c]=g=T}this._setupProperties(_,r[c],g,a[c],o)}else(typeof r[c]>"u"||o)&&(r[c]=h),u||(r[c]*=1),p?a[c]=n[c].slice().reverse():a[c]=r[c]||0}}},i.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},i.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},i.prototype.pause=function(e){return e===void 0&&(e=Yu()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},i.prototype.resume=function(e){return e===void 0&&(e=Yu()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},i.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},i.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},i.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},i.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},i.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},i.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},i.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},i.prototype.easing=function(e){return e===void 0&&(e=yl.Linear.None),this._easingFunction=e,this},i.prototype.interpolation=function(e){return e===void 0&&(e=iv.Linear),this._interpolationFunction=e,this},i.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},i.prototype.onStart=function(e){return this._onStartCallback=e,this},i.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},i.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},i.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},i.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},i.prototype.onStop=function(e){return this._onStopCallback=e,this},i.prototype.update=function(e,r){var n=this,a;if(e===void 0&&(e=Yu()),r===void 0&&(r=i.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var c=e-this._startTime,h=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),u=this._duration+this._repeat*h,f=function(){if(n._duration===0||c>u)return 1;var C=Math.trunc(c/h),_=c-C*h,w=Math.min(_/n._duration,1);return w===0&&c===n._duration?1:w},p=f(),g=this._easingFunction(p);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,p),this._duration===0||c>=this._duration)if(this._repeat>0){var b=Math.min(Math.trunc((c-this._duration)/h)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=b);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=h*b,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,v=this._chainedTweens.length;y<v;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},i.prototype._updateProperties=function(e,r,n,a){for(var o in n)if(r[o]!==void 0){var c=r[o]||0,h=n[o],u=Array.isArray(e[o]),f=Array.isArray(h),p=!u&&f;p?e[o]=this._interpolationFunction(h,a):typeof h=="object"&&h?this._updateProperties(e[o],c,h,a):(h=this._handleRelativeValue(c,h),typeof h=="number"&&(e[o]=c+(h-c)*a))}},i.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},i.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],n=this._valuesEnd[e];typeof n=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(n):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},i.autoStartOnUpdate=!1,i})();Tj.nextId;var Sa=rv;Sa.getAll.bind(Sa);Sa.removeAll.bind(Sa);Sa.add.bind(Sa);Sa.remove.bind(Sa);Sa.update.bind(Sa);function VT(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function wK(i){if(Array.isArray(i))return i}function SK(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function TK(i,e,r){return Object.defineProperty(i,"prototype",{writable:!1}),i}function BK(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function AK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
433
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EK(i,e){return wK(i)||BK(i,e)||MK(i,e)||AK()}function MK(i,e){if(i){if(typeof i=="string")return VT(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?VT(i,e):void 0}}var LK=TK(function i(e,r){var n=r.default,a=n===void 0?null:n,o=r.triggerUpdate,c=o===void 0?!0:o,h=r.onChange,u=h===void 0?function(f,p){}:h;SK(this,i),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function I1(i){var e=i.stateInit,r=e===void 0?function(){return{}}:e,n=i.props,a=n===void 0?{}:n,o=i.methods,c=o===void 0?{}:o,h=i.aliases,u=h===void 0?{}:h,f=i.init,p=f===void 0?function(){}:f,g=i.update,b=g===void 0?function(){}:g,y=Object.keys(a).map(function(v){return new LK(v,a[v])});return function v(){for(var C=arguments.length,_=new Array(C),w=0;w<C;w++)_[w]=arguments[w];var T=!!(this instanceof v&&this.constructor),B=T?_.shift():void 0,E=_[0],N=E===void 0?{}:E,O=Object.assign({},r instanceof Function?r(N):r,{initialised:!1}),M={};function j(z){return G(z,N),$(),j}var G=function(K,W){p.call(j,K,O,W),O.initialised=!0},$=wj(function(){O.initialised&&(b.call(j,O,M),M={})},1);return y.forEach(function(z){j[z.name]=K(z);function K(W){var D=W.name,U=W.triggerUpdate,R=U===void 0?!1:U,I=W.onChange,P=I===void 0?function(H,tt){}:I,V=W.defaultVal,J=V===void 0?null:V;return function(H){var tt=O[D];if(!arguments.length)return tt;var ot=H===void 0?J:H;return O[D]=ot,P.call(j,ot,O,tt),!M.hasOwnProperty(D)&&(M[D]=tt),R&&$(),j}}}),Object.keys(c).forEach(function(z){j[z]=function(){for(var K,W=arguments.length,D=new Array(W),U=0;U<W;U++)D[U]=arguments[U];return(K=c[z]).call.apply(K,[j,O].concat(D))}}),Object.entries(u).forEach(function(z){var K=EK(z,2),W=K[0],D=K[1];return j[W]=j[D]}),j.resetProps=function(){return y.forEach(function(z){j[z.name](z.defaultVal)}),j},j.resetProps(),O._rerender=$,T&&B&&j(B),j}}var Ne=(function(i){return typeof i=="function"?i:typeof i=="string"?function(e){return e[i]}:function(e){return i}});function Rg(i){"@babel/helpers - typeof";return Rg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rg(i)}var NK=/^\s+/,jK=/\s+$/;function Pt(i,e){if(i=i||"",e=e||{},i instanceof Pt)return i;if(!(this instanceof Pt))return new Pt(i,e);var r=OK(i);this._originalInput=i,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}Pt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),r,n,a,o,c,h;return r=e.r/255,n=e.g/255,a=e.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?c=n/12.92:c=Math.pow((n+.055)/1.055,2.4),a<=.03928?h=a/12.92:h=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*c+.0722*h},setAlpha:function(e){return this._a=Bj(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=QT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=QT(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+a+"%)":"hsva("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=XT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=XT(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+a+"%)":"hsla("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return ZT(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return $K(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ii(this._r,255)*100)+"%",g:Math.round(ii(this._g,255)*100)+"%",b:Math.round(ii(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ii(this._r,255)*100)+"%, "+Math.round(ii(this._g,255)*100)+"%, "+Math.round(ii(this._b,255)*100)+"%)":"rgba("+Math.round(ii(this._r,255)*100)+"%, "+Math.round(ii(this._g,255)*100)+"%, "+Math.round(ii(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:QK[ZT(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+KT(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=Pt(e);n="#"+KT(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(e){var r=!!e;e=e||this._format;var n=!1,a=this._a<1&&this._a>=0,o=!r&&a&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return Pt(this.toString())},_applyModification:function(e,r){var n=e.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(PK,arguments)},brighten:function(){return this._applyModification(HK,arguments)},darken:function(){return this._applyModification(UK,arguments)},desaturate:function(){return this._applyModification(zK,arguments)},saturate:function(){return this._applyModification(IK,arguments)},greyscale:function(){return this._applyModification(qK,arguments)},spin:function(){return this._applyModification(WK,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(VK,arguments)},complement:function(){return this._applyCombination(GK,arguments)},monochromatic:function(){return this._applyCombination(XK,arguments)},splitcomplement:function(){return this._applyCombination(YK,arguments)},triad:function(){return this._applyCombination(JT,[3])},tetrad:function(){return this._applyCombination(JT,[4])}};Pt.fromRatio=function(i,e){if(Rg(i)=="object"){var r={};for(var n in i)i.hasOwnProperty(n)&&(n==="a"?r[n]=i[n]:r[n]=Vu(i[n]));i=r}return Pt(i,e)};function OK(i){var e={r:0,g:0,b:0},r=1,n=null,a=null,o=null,c=!1,h=!1;return typeof i=="string"&&(i=tJ(i)),Rg(i)=="object"&&(Za(i.r)&&Za(i.g)&&Za(i.b)?(e=RK(i.r,i.g,i.b),c=!0,h=String(i.r).substr(-1)==="%"?"prgb":"rgb"):Za(i.h)&&Za(i.s)&&Za(i.v)?(n=Vu(i.s),a=Vu(i.v),e=FK(i.h,n,a),c=!0,h="hsv"):Za(i.h)&&Za(i.s)&&Za(i.l)&&(n=Vu(i.s),o=Vu(i.l),e=DK(i.h,n,o),c=!0,h="hsl"),i.hasOwnProperty("a")&&(r=i.a)),r=Bj(r),{ok:c,format:i.format||h,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function RK(i,e,r){return{r:ii(i,255)*255,g:ii(e,255)*255,b:ii(r,255)*255}}function XT(i,e,r){i=ii(i,255),e=ii(e,255),r=ii(r,255);var n=Math.max(i,e,r),a=Math.min(i,e,r),o,c,h=(n+a)/2;if(n==a)o=c=0;else{var u=n-a;switch(c=h>.5?u/(2-n-a):u/(n+a),n){case i:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-i)/u+2;break;case r:o=(i-e)/u+4;break}o/=6}return{h:o,s:c,l:h}}function DK(i,e,r){var n,a,o;i=ii(i,360),e=ii(e,100),r=ii(r,100);function c(f,p,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?f+(p-f)*6*g:g<1/2?p:g<2/3?f+(p-f)*(2/3-g)*6:f}if(e===0)n=a=o=r;else{var h=r<.5?r*(1+e):r+e-r*e,u=2*r-h;n=c(u,h,i+1/3),a=c(u,h,i),o=c(u,h,i-1/3)}return{r:n*255,g:a*255,b:o*255}}function QT(i,e,r){i=ii(i,255),e=ii(e,255),r=ii(r,255);var n=Math.max(i,e,r),a=Math.min(i,e,r),o,c,h=n,u=n-a;if(c=n===0?0:u/n,n==a)o=0;else{switch(n){case i:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-i)/u+2;break;case r:o=(i-e)/u+4;break}o/=6}return{h:o,s:c,v:h}}function FK(i,e,r){i=ii(i,360)*6,e=ii(e,100),r=ii(r,100);var n=Math.floor(i),a=i-n,o=r*(1-e),c=r*(1-a*e),h=r*(1-(1-a)*e),u=n%6,f=[r,c,o,o,h,r][u],p=[h,r,r,c,o,o][u],g=[o,o,h,r,r,c][u];return{r:f*255,g:p*255,b:g*255}}function ZT(i,e,r,n){var a=[$n(Math.round(i).toString(16)),$n(Math.round(e).toString(16)),$n(Math.round(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function $K(i,e,r,n,a){var o=[$n(Math.round(i).toString(16)),$n(Math.round(e).toString(16)),$n(Math.round(r).toString(16)),$n(Aj(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function KT(i,e,r,n){var a=[$n(Aj(n)),$n(Math.round(i).toString(16)),$n(Math.round(e).toString(16)),$n(Math.round(r).toString(16))];return a.join("")}Pt.equals=function(i,e){return!i||!e?!1:Pt(i).toRgbString()==Pt(e).toRgbString()};Pt.random=function(){return Pt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function zK(i,e){e=e===0?0:e||10;var r=Pt(i).toHsl();return r.s-=e/100,r.s=gm(r.s),Pt(r)}function IK(i,e){e=e===0?0:e||10;var r=Pt(i).toHsl();return r.s+=e/100,r.s=gm(r.s),Pt(r)}function qK(i){return Pt(i).desaturate(100)}function PK(i,e){e=e===0?0:e||10;var r=Pt(i).toHsl();return r.l+=e/100,r.l=gm(r.l),Pt(r)}function HK(i,e){e=e===0?0:e||10;var r=Pt(i).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),Pt(r)}function UK(i,e){e=e===0?0:e||10;var r=Pt(i).toHsl();return r.l-=e/100,r.l=gm(r.l),Pt(r)}function WK(i,e){var r=Pt(i).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,Pt(r)}function GK(i){var e=Pt(i).toHsl();return e.h=(e.h+180)%360,Pt(e)}function JT(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Pt(i).toHsl(),n=[Pt(i)],a=360/e,o=1;o<e;o++)n.push(Pt({h:(r.h+o*a)%360,s:r.s,l:r.l}));return n}function YK(i){var e=Pt(i).toHsl(),r=e.h;return[Pt(i),Pt({h:(r+72)%360,s:e.s,l:e.l}),Pt({h:(r+216)%360,s:e.s,l:e.l})]}function VK(i,e,r){e=e||6,r=r||30;var n=Pt(i).toHsl(),a=360/r,o=[Pt(i)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(Pt(n));return o}function XK(i,e){e=e||6;for(var r=Pt(i).toHsv(),n=r.h,a=r.s,o=r.v,c=[],h=1/e;e--;)c.push(Pt({h:n,s:a,v:o})),o=(o+h)%1;return c}Pt.mix=function(i,e,r){r=r===0?0:r||50;var n=Pt(i).toRgb(),a=Pt(e).toRgb(),o=r/100,c={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return Pt(c)};Pt.readability=function(i,e){var r=Pt(i),n=Pt(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};Pt.isReadable=function(i,e,r){var n=Pt.readability(i,e),a,o;switch(o=!1,a=eJ(r),a.level+a.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};Pt.mostReadable=function(i,e,r){var n=null,a=0,o,c,h,u;r=r||{},c=r.includeFallbackColors,h=r.level,u=r.size;for(var f=0;f<e.length;f++)o=Pt.readability(i,e[f]),o>a&&(a=o,n=Pt(e[f]));return Pt.isReadable(i,n,{level:h,size:u})||!c?n:(r.includeFallbackColors=!1,Pt.mostReadable(i,["#fff","#000"],r))};var nv=Pt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},QK=Pt.hexNames=ZK(nv);function ZK(i){var e={};for(var r in i)i.hasOwnProperty(r)&&(e[i[r]]=r);return e}function Bj(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function ii(i,e){KK(i)&&(i="100%");var r=JK(i);return i=Math.min(e,Math.max(0,parseFloat(i))),r&&(i=parseInt(i*e,10)/100),Math.abs(i-e)<1e-6?1:i%e/parseFloat(e)}function gm(i){return Math.min(1,Math.max(0,i))}function Xr(i){return parseInt(i,16)}function KK(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function JK(i){return typeof i=="string"&&i.indexOf("%")!=-1}function $n(i){return i.length==1?"0"+i:""+i}function Vu(i){return i<=1&&(i=i*100+"%"),i}function Aj(i){return Math.round(parseFloat(i)*255).toString(16)}function tB(i){return Xr(i)/255}var Ln=(function(){var i="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+i+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Za(i){return!!Ln.CSS_UNIT.exec(i)}function tJ(i){i=i.replace(NK,"").replace(jK,"").toLowerCase();var e=!1;if(nv[i])i=nv[i],e=!0;else if(i=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Ln.rgb.exec(i))?{r:r[1],g:r[2],b:r[3]}:(r=Ln.rgba.exec(i))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Ln.hsl.exec(i))?{h:r[1],s:r[2],l:r[3]}:(r=Ln.hsla.exec(i))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Ln.hsv.exec(i))?{h:r[1],s:r[2],v:r[3]}:(r=Ln.hsva.exec(i))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Ln.hex8.exec(i))?{r:Xr(r[1]),g:Xr(r[2]),b:Xr(r[3]),a:tB(r[4]),format:e?"name":"hex8"}:(r=Ln.hex6.exec(i))?{r:Xr(r[1]),g:Xr(r[2]),b:Xr(r[3]),format:e?"name":"hex"}:(r=Ln.hex4.exec(i))?{r:Xr(r[1]+""+r[1]),g:Xr(r[2]+""+r[2]),b:Xr(r[3]+""+r[3]),a:tB(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=Ln.hex3.exec(i))?{r:Xr(r[1]+""+r[1]),g:Xr(r[2]+""+r[2]),b:Xr(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function eJ(i){var e,r;return i=i||{level:"AA",size:"small"},e=(i.level||"AA").toUpperCase(),r=(i.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}function av(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function iJ(i){if(Array.isArray(i))return av(i)}function Ej(i,e,r){if(typeof i=="function"?i===e:i.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function rJ(i,e){if(e.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nJ(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function fn(i,e){return i.get(Ej(i,e))}function eB(i,e,r){rJ(i,e),e.set(i,r)}function iB(i,e,r){return i.set(Ej(i,e),r),r}function aJ(i,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,uJ(n.key),n)}}function sJ(i,e,r){return e&&aJ(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function oJ(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function lJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
434
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cJ(i){return iJ(i)||oJ(i)||fJ(i)||lJ()}function hJ(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}function uJ(i){var e=hJ(i,"string");return typeof e=="symbol"?e:e+""}function fJ(i,e){if(i){if(typeof i=="string")return av(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?av(i,e):void 0}}var dJ=123,pJ=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},Mj=function(e,r,n){return(e<<16)+(r<<8)+n},gJ=function(e){var r=Pt(e).toRgb(),n=r.r,a=r.g,o=r.b;return Mj(n,a,o)},rB=function(e,r){return e*dJ%Math.pow(2,r)},Qo=new WeakMap,Ka=new WeakMap,mJ=(function(){function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;nJ(this,i),eB(this,Qo,void 0),eB(this,Ka,void 0),iB(Ka,this,e),this.reset()}return sJ(i,[{key:"reset",value:function(){iB(Qo,this,["__reserved for background__"])}},{key:"register",value:function(r){if(fn(Qo,this).length>=Math.pow(2,24-fn(Ka,this)))return null;var n=fn(Qo,this).length,a=rB(n,fn(Ka,this)),o=pJ(n+(a<<24-fn(Ka,this)));return fn(Qo,this).push(r),o}},{key:"lookup",value:function(r){if(!r)return null;var n=typeof r=="string"?gJ(r):Mj.apply(void 0,cJ(r));if(!n)return null;var a=n&Math.pow(2,24-fn(Ka,this))-1,o=n>>24-fn(Ka,this)&Math.pow(2,fn(Ka,this))-1;return rB(a,fn(Ka,this))!==o||a>=fn(Qo,this).length?null:fn(Qo,this)[a]}}])})(),Uf,ri,Lj,Nj,so,nB,jj,Oj,px,Wp,nf,Rj,q1,sv,ov,Dg={},Fg=[],yJ=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,mm=Array.isArray;function Ca(i,e){for(var r in e)i[r]=e[r];return i}function P1(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function xJ(i,e,r){var n,a,o,c={};for(o in e)o=="key"?n=e[o]:o=="ref"?a=e[o]:c[o]=e[o];if(arguments.length>2&&(c.children=arguments.length>3?Uf.call(arguments,2):r),typeof i=="function"&&i.defaultProps!=null)for(o in i.defaultProps)c[o]===void 0&&(c[o]=i.defaultProps[o]);return af(i,c,n,a,null)}function af(i,e,r,n,a){var o={type:i,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++Lj,__i:-1,__u:0};return a==null&&ri.vnode!=null&&ri.vnode(o),o}function ym(i){return i.children}function Gp(i,e){this.props=i,this.context=e}function ph(i,e){if(e==null)return i.__?ph(i.__,i.__i+1):null;for(var r;e<i.__k.length;e++)if((r=i.__k[e])!=null&&r.__e!=null)return r.__e;return typeof i.type=="function"?ph(i):null}function bJ(i){if(i.__P&&i.__d){var e=i.__v,r=e.__e,n=[],a=[],o=Ca({},e);o.__v=e.__v+1,ri.vnode&&ri.vnode(o),H1(i.__P,o,e,i.__n,i.__P.namespaceURI,32&e.__u?[r]:null,n,r??ph(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,zj(n,o,a),e.__e=e.__=null,o.__e!=r&&Dj(o)}}function Dj(i){if((i=i.__)!=null&&i.__c!=null)return i.__e=i.__c.base=null,i.__k.some(function(e){if(e!=null&&e.__e!=null)return i.__e=i.__c.base=e.__e}),Dj(i)}function aB(i){(!i.__d&&(i.__d=!0)&&so.push(i)&&!$g.__r++||nB!=ri.debounceRendering)&&((nB=ri.debounceRendering)||jj)($g)}function $g(){try{for(var i,e=1;so.length;)so.length>e&&so.sort(Oj),i=so.shift(),e=so.length,bJ(i)}finally{so.length=$g.__r=0}}function Fj(i,e,r,n,a,o,c,h,u,f,p){var g,b,y,v,C,_,w,T=n&&n.__k||Fg,B=e.length;for(u=vJ(r,e,T,u,B),g=0;g<B;g++)(y=r.__k[g])!=null&&(b=y.__i!=-1&&T[y.__i]||Dg,y.__i=g,_=H1(i,y,b,a,o,c,h,u,f,p),v=y.__e,y.ref&&b.ref!=y.ref&&(b.ref&&U1(b.ref,null,y),p.push(y.ref,y.__c||v,y)),C==null&&v!=null&&(C=v),(w=!!(4&y.__u))||b.__k===y.__k?(u=$j(y,u,i,w),w&&b.__e&&(b.__e=null)):typeof y.type=="function"&&_!==void 0?u=_:v&&(u=v.nextSibling),y.__u&=-7);return r.__e=C,u}function vJ(i,e,r,n,a){var o,c,h,u,f,p=r.length,g=p,b=0;for(i.__k=new Array(a),o=0;o<a;o++)(c=e[o])!=null&&typeof c!="boolean"&&typeof c!="function"?(typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?c=i.__k[o]=af(null,c,null,null,null):mm(c)?c=i.__k[o]=af(ym,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=i.__k[o]=af(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):i.__k[o]=c,u=o+b,c.__=i,c.__b=i.__b+1,h=null,(f=c.__i=CJ(c,r,u,g))!=-1&&(g--,(h=r[f])&&(h.__u|=2)),h==null||h.__v==null?(f==-1&&(a>p?b--:a<p&&b++),typeof c.type!="function"&&(c.__u|=4)):f!=u&&(f==u-1?b--:f==u+1?b++:(f>u?b--:b++,c.__u|=4))):i.__k[o]=null;if(g)for(o=0;o<p;o++)(h=r[o])!=null&&(2&h.__u)==0&&(h.__e==n&&(n=ph(h)),qj(h,h));return n}function $j(i,e,r,n){var a,o;if(typeof i.type=="function"){for(a=i.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=i,e=$j(a[o],e,r,n));return e}i.__e!=e&&(n&&(e&&i.type&&!e.parentNode&&(e=ph(i)),r.insertBefore(i.__e,e||null)),e=i.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function CJ(i,e,r,n){var a,o,c,h=i.key,u=i.type,f=e[r],p=f!=null&&(2&f.__u)==0;if(f===null&&h==null||p&&h==f.key&&u==f.type)return r;if(n>(p?1:0)){for(a=r-1,o=r+1;a>=0||o<e.length;)if((f=e[c=a>=0?a--:o++])!=null&&(2&f.__u)==0&&h==f.key&&u==f.type)return c}return-1}function sB(i,e,r){e[0]=="-"?i.setProperty(e,r??""):i[e]=r==null?"":typeof r!="number"||yJ.test(e)?r:r+"px"}function wp(i,e,r,n,a){var o,c;t:if(e=="style")if(typeof r=="string")i.style.cssText=r;else{if(typeof n=="string"&&(i.style.cssText=n=""),n)for(e in n)r&&e in r||sB(i.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||sB(i.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Rj,"$1")),c=e.toLowerCase(),e=c in i||e=="onFocusOut"||e=="onFocusIn"?c.slice(2):e.slice(2),i.l||(i.l={}),i.l[e+o]=r,r?n?r[nf]=n[nf]:(r[nf]=q1,i.addEventListener(e,o?ov:sv,o)):i.removeEventListener(e,o?ov:sv,o);else{if(a=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in i)try{i[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?i.removeAttribute(e):i.setAttribute(e,e=="popover"&&r==1?"":r))}}function oB(i){return function(e){if(this.l){var r=this.l[e.type+i];if(e[Wp]==null)e[Wp]=q1++;else if(e[Wp]<r[nf])return;return r(ri.event?ri.event(e):e)}}}function H1(i,e,r,n,a,o,c,h,u,f){var p,g,b,y,v,C,_,w,T,B,E,N,O,M,j,G=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),o=[h=e.__e=r.__e]),(p=ri.__b)&&p(e);t:if(typeof G=="function")try{if(w=e.props,T=G.prototype&&G.prototype.render,B=(p=G.contextType)&&n[p.__c],E=p?B?B.props.value:p.__:n,r.__c?_=(g=e.__c=r.__c).__=g.__E:(T?e.__c=g=new G(w,E):(e.__c=g=new Gp(w,E),g.constructor=G,g.render=_J),B&&B.sub(g),g.state||(g.state={}),g.__n=n,b=g.__d=!0,g.__h=[],g._sb=[]),T&&g.__s==null&&(g.__s=g.state),T&&G.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=Ca({},g.__s)),Ca(g.__s,G.getDerivedStateFromProps(w,g.__s))),y=g.props,v=g.state,g.__v=e,b)T&&G.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&G.getDerivedStateFromProps==null&&w!==y&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(w,E),e.__v==r.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(w,g.__s,E)===!1){e.__v!=r.__v&&(g.props=w,g.state=g.__s,g.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function($){$&&($.__=e)}),Fg.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&c.push(g);break t}g.componentWillUpdate!=null&&g.componentWillUpdate(w,g.__s,E),T&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(y,v,C)})}if(g.context=E,g.props=w,g.__P=i,g.__e=!1,N=ri.__r,O=0,T)g.state=g.__s,g.__d=!1,N&&N(e),p=g.render(g.props,g.state,g.context),Fg.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,N&&N(e),p=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++O<25);g.state=g.__s,g.getChildContext!=null&&(n=Ca(Ca({},n),g.getChildContext())),T&&!b&&g.getSnapshotBeforeUpdate!=null&&(C=g.getSnapshotBeforeUpdate(y,v)),M=p!=null&&p.type===ym&&p.key==null?Ij(p.props.children):p,h=Fj(i,mm(M)?M:[M],e,r,n,a,o,c,h,u,f),g.base=e.__e,e.__u&=-161,g.__h.length&&c.push(g),_&&(g.__E=g.__=null)}catch($){if(e.__v=null,u||o!=null)if($.then){for(e.__u|=u?160:128;h&&h.nodeType==8&&h.nextSibling;)h=h.nextSibling;o[o.indexOf(h)]=null,e.__e=h}else{for(j=o.length;j--;)P1(o[j]);lv(e)}else e.__e=r.__e,e.__k=r.__k,$.then||lv(e);ri.__e($,e,r)}else o==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):h=e.__e=kJ(r.__e,e,r,n,a,o,c,u,f);return(p=ri.diffed)&&p(e),128&e.__u?void 0:h}function lv(i){i&&(i.__c&&(i.__c.__e=!0),i.__k&&i.__k.some(lv))}function zj(i,e,r){for(var n=0;n<r.length;n++)U1(r[n],r[++n],r[++n]);ri.__c&&ri.__c(e,i),i.some(function(a){try{i=a.__h,a.__h=[],i.some(function(o){o.call(a)})}catch(o){ri.__e(o,a.__v)}})}function Ij(i){return typeof i!="object"||i==null||i.__b>0?i:mm(i)?i.map(Ij):Ca({},i)}function kJ(i,e,r,n,a,o,c,h,u){var f,p,g,b,y,v,C,_=r.props||Dg,w=e.props,T=e.type;if(T=="svg"?a="http://www.w3.org/2000/svg":T=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(f=0;f<o.length;f++)if((y=o[f])&&"setAttribute"in y==!!T&&(T?y.localName==T:y.nodeType==3)){i=y,o[f]=null;break}}if(i==null){if(T==null)return document.createTextNode(w);i=document.createElementNS(a,T,w.is&&w),h&&(ri.__m&&ri.__m(e,o),h=!1),o=null}if(T==null)_===w||h&&i.data==w||(i.data=w);else{if(o=o&&Uf.call(i.childNodes),!h&&o!=null)for(_={},f=0;f<i.attributes.length;f++)_[(y=i.attributes[f]).name]=y.value;for(f in _)y=_[f],f=="dangerouslySetInnerHTML"?g=y:f=="children"||f in w||f=="value"&&"defaultValue"in w||f=="checked"&&"defaultChecked"in w||wp(i,f,null,y,a);for(f in w)y=w[f],f=="children"?b=y:f=="dangerouslySetInnerHTML"?p=y:f=="value"?v=y:f=="checked"?C=y:h&&typeof y!="function"||_[f]===y||wp(i,f,y,_[f],a);if(p)h||g&&(p.__html==g.__html||p.__html==i.innerHTML)||(i.innerHTML=p.__html),e.__k=[];else if(g&&(i.innerHTML=""),Fj(e.type=="template"?i.content:i,mm(b)?b:[b],e,r,n,T=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,c,o?o[0]:r.__k&&ph(r,0),h,u),o!=null)for(f=o.length;f--;)P1(o[f]);h||(f="value",T=="progress"&&v==null?i.removeAttribute("value"):v!=null&&(v!==i[f]||T=="progress"&&!v||T=="option"&&v!=_[f])&&wp(i,f,v,_[f],a),f="checked",C!=null&&C!=i[f]&&wp(i,f,C,_[f],a))}return i}function U1(i,e,r){try{if(typeof i=="function"){var n=typeof i.__u=="function";n&&i.__u(),n&&e==null||(i.__u=i(e))}else i.current=e}catch(a){ri.__e(a,r)}}function qj(i,e,r){var n,a;if(ri.unmount&&ri.unmount(i),(n=i.ref)&&(n.current&&n.current!=i.__e||U1(n,null,e)),(n=i.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){ri.__e(o,e)}n.base=n.__P=null}if(n=i.__k)for(a=0;a<n.length;a++)n[a]&&qj(n[a],e,r||typeof i.type!="function");r||P1(i.__e),i.__c=i.__=i.__e=void 0}function _J(i,e,r){return this.constructor(i,r)}function wJ(i,e,r){var n,a,o,c;e==document&&(e=document.documentElement),ri.__&&ri.__(i,e),a=(n=!1)?null:e.__k,o=[],c=[],H1(e,i=e.__k=xJ(ym,null,[i]),a||Dg,Dg,e.namespaceURI,a?null:e.firstChild?Uf.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),zj(o,i,c)}function Pj(i,e,r){var n,a,o,c,h=Ca({},i.props);for(o in i.type&&i.type.defaultProps&&(c=i.type.defaultProps),e)o=="key"?n=e[o]:o=="ref"?a=e[o]:h[o]=e[o]===void 0&&c!=null?c[o]:e[o];return arguments.length>2&&(h.children=arguments.length>3?Uf.call(arguments,2):r),af(i.type,h,n||i.key,a||i.ref,null)}Uf=Fg.slice,ri={__e:function(i,e,r,n){for(var a,o,c;e=e.__;)if((a=e.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(i)),c=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(i,n||{}),c=a.__d),c)return a.__E=a}catch(h){i=h}throw i}},Lj=0,Nj=function(i){return i!=null&&i.constructor===void 0},Gp.prototype.setState=function(i,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ca({},this.state),typeof i=="function"&&(i=i(Ca({},r),this.props)),i&&Ca(r,i),i!=null&&this.__v&&(e&&this._sb.push(e),aB(this))},Gp.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),aB(this))},Gp.prototype.render=ym,so=[],jj=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Oj=function(i,e){return i.__v.__b-e.__v.__b},$g.__r=0,px=Math.random().toString(8),Wp="__d"+px,nf="__a"+px,Rj=/(PointerCapture)$|Capture$/i,q1=0,sv=oB(!1),ov=oB(!0);function lB(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function SJ(i){if(Array.isArray(i))return i}function TJ(i,e,r){return(e=NJ(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function BJ(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function AJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
435
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cB(i,e){var r=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),r.push.apply(r,n)}return r}function EJ(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cB(Object(r),!0).forEach(function(n){TJ(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):cB(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function MJ(i,e){return SJ(i)||BJ(i,e)||jJ(i,e)||AJ()}function LJ(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function NJ(i){var e=LJ(i,"string");return typeof e=="symbol"?e:e+""}function zg(i){"@babel/helpers - typeof";return zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zg(i)}function jJ(i,e){if(i){if(typeof i=="string")return lB(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lB(i,e):void 0}}var cv=function(e){if(zg(e)!=="object")return e;var r=Pj(e);if(r.props){var n;r.props=EJ({},r.props),r!=null&&(n=r.props)!==null&&n!==void 0&&n.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(cv):cv(r.props.children))}return r},OJ=function(e){return Nj(Pj(e))},RJ=function(e,r){delete r.__k,wJ(cv(e),r)};function DJ(i,e){e===void 0&&(e={});var r=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",r==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=i:a.appendChild(document.createTextNode(i))}}var FJ=`.float-tooltip-kap {
436
+ position: absolute;
437
+ width: max-content; /* prevent shrinking near right edge */
438
+ max-width: max(50%, 150px);
439
+ padding: 3px 5px;
440
+ border-radius: 3px;
441
+ font: 12px sans-serif;
442
+ color: #eee;
443
+ background: rgba(0,0,0,0.6);
444
+ pointer-events: none;
445
+ }
446
+ `;DJ(FJ);var $J=I1({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.style,o=a===void 0?{}:a,c=!!e&&zg(e)==="object"&&!!e.node&&typeof e.node=="function",h=Xt(c?e.node():e);h.style("position")==="static"&&h.style("position","relative"),r.tooltipEl=h.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(f){var p=MJ(f,2),g=p[0],b=p[1];return r.tooltipEl.style(g,b)}),r.tooltipEl.style("left","-10000px").style("display","none");var u="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,h.on("mousemove.".concat(u),function(f){r.mouseInside=!0;var p=ma(f),g=h.node(),b=g.offsetWidth,y=g.offsetHeight,v=[r.offsetX===null||r.offsetX===void 0?"-".concat(p[0]/b*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?y>130&&y-p[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",p[0]+"px").style("top",p[1]+"px").style("transform","translate(".concat(v.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),h.on("mouseover.".concat(u),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),h.on("mouseout.".concat(u),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(e){e.tooltipEl.style("display",e.content&&e.mouseInside?"inline":"none"),e.content?e.content instanceof HTMLElement?(e.tooltipEl.text(""),e.tooltipEl.append(function(){return e.content})):typeof e.content=="string"?e.tooltipEl.html(e.content):OJ(e.content)?(e.tooltipEl.text(""),RJ(e.content,e.tooltipEl.node())):(e.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",e.content,e.content.toString())):e.tooltipEl.text("")}});function zJ(i,e,r){var n,a=1;i==null&&(i=0),e==null&&(e=0),r==null&&(r=0);function o(){var c,h=n.length,u,f=0,p=0,g=0;for(c=0;c<h;++c)u=n[c],f+=u.x||0,p+=u.y||0,g+=u.z||0;for(f=(f/h-i)*a,p=(p/h-e)*a,g=(g/h-r)*a,c=0;c<h;++c)u=n[c],f&&(u.x-=f),p&&(u.y-=p),g&&(u.z-=g)}return o.initialize=function(c){n=c},o.x=function(c){return arguments.length?(i=+c,o):i},o.y=function(c){return arguments.length?(e=+c,o):e},o.z=function(c){return arguments.length?(r=+c,o):r},o.strength=function(c){return arguments.length?(a=+c,o):a},o}function IJ(i){const e=+this._x.call(null,i);return Hj(this.cover(e),e,i)}function Hj(i,e,r){if(isNaN(e))return i;var n,a=i._root,o={data:r},c=i._x0,h=i._x1,u,f,p,g,b;if(!a)return i._root=o,i;for(;a.length;)if((p=e>=(u=(c+h)/2))?c=u:h=u,n=a,!(a=a[g=+p]))return n[g]=o,i;if(f=+i._x.call(null,a.data),e===f)return o.next=a,n?n[g]=o:i._root=o,i;do n=n?n[g]=new Array(2):i._root=new Array(2),(p=e>=(u=(c+h)/2))?c=u:h=u;while((g=+p)==(b=+(f>=u)));return n[b]=a,n[g]=o,i}function qJ(i){Array.isArray(i)||(i=Array.from(i));const e=i.length,r=new Float64Array(e);let n=1/0,a=-1/0;for(let o=0,c;o<e;++o)isNaN(c=+this._x.call(null,i[o]))||(r[o]=c,c<n&&(n=c),c>a&&(a=c));if(n>a)return this;this.cover(n).cover(a);for(let o=0;o<e;++o)Hj(this,r[o],i[o]);return this}function PJ(i){if(isNaN(i=+i))return this;var e=this._x0,r=this._x1;if(isNaN(e))r=(e=Math.floor(i))+1;else{for(var n=r-e||1,a=this._root,o,c;e>i||i>=r;)switch(c=+(i<e),o=new Array(2),o[c]=a,a=o,n*=2,c){case 0:r=e+n;break;case 1:e=r-n;break}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._x1=r,this}function HJ(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function UJ(i){return arguments.length?this.cover(+i[0][0]).cover(+i[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function fs(i,e,r){this.node=i,this.x0=e,this.x1=r}function WJ(i,e){var r,n=this._x0,a,o,c=this._x1,h=[],u=this._root,f,p;for(u&&h.push(new fs(u,n,c)),e==null?e=1/0:(n=i-e,c=i+e);f=h.pop();)if(!(!(u=f.node)||(a=f.x0)>c||(o=f.x1)<n))if(u.length){var g=(a+o)/2;h.push(new fs(u[1],g,o),new fs(u[0],a,g)),(p=+(i>=g))&&(f=h[h.length-1],h[h.length-1]=h[h.length-1-p],h[h.length-1-p]=f)}else{var b=Math.abs(i-+this._x.call(null,u.data));b<e&&(e=b,n=i-b,c=i+b,r=u.data)}return r}function GJ(i){if(isNaN(u=+this._x.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._x1,u,f,p,g,b;if(!r)return this;if(r.length)for(;;){if((p=u>=(f=(c+h)/2))?c=f:h=f,e=r,!(r=r[g=+p]))return this;if(!r.length)break;e[g+1&1]&&(n=e,b=g)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[g]=o:delete e[g],(r=e[0]||e[1])&&r===(e[1]||e[0])&&!r.length&&(n?n[b]=r:this._root=r),this):(this._root=o,this)}function YJ(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function VJ(){return this._root}function XJ(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function QJ(i){var e=[],r,n=this._root,a,o,c;for(n&&e.push(new fs(n,this._x0,this._x1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.x1)&&n.length){var h=(o+c)/2;(a=n[1])&&e.push(new fs(a,h,c)),(a=n[0])&&e.push(new fs(a,o,h))}return this}function ZJ(i){var e=[],r=[],n;for(this._root&&e.push(new fs(this._root,this._x0,this._x1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.x1,u=(c+h)/2;(o=a[0])&&e.push(new fs(o,c,u)),(o=a[1])&&e.push(new fs(o,u,h))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.x1);return this}function KJ(i){return i[0]}function JJ(i){return arguments.length?(this._x=i,this):this._x}function W1(i,e){var r=new G1(e??KJ,NaN,NaN);return i==null?r:r.addAll(i)}function G1(i,e,r){this._x=i,this._x0=e,this._x1=r,this._root=void 0}function hB(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Dr=W1.prototype=G1.prototype;Dr.copy=function(){var i=new G1(this._x,this._x0,this._x1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=hB(e),i;for(r=[{source:e,target:i._root=new Array(2)}];e=r.pop();)for(var a=0;a<2;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(2)}):e.target[a]=hB(n));return i};Dr.add=IJ;Dr.addAll=qJ;Dr.cover=PJ;Dr.data=HJ;Dr.extent=UJ;Dr.find=WJ;Dr.remove=GJ;Dr.removeAll=YJ;Dr.root=VJ;Dr.size=XJ;Dr.visit=QJ;Dr.visitAfter=ZJ;Dr.x=JJ;function ttt(i){const e=+this._x.call(null,i),r=+this._y.call(null,i),n=+this._z.call(null,i);return Uj(this.cover(e,r,n),e,r,n,i)}function Uj(i,e,r,n,a){if(isNaN(e)||isNaN(r)||isNaN(n))return i;var o,c=i._root,h={data:a},u=i._x0,f=i._y0,p=i._z0,g=i._x1,b=i._y1,y=i._z1,v,C,_,w,T,B,E,N,O,M,j;if(!c)return i._root=h,i;for(;c.length;)if((E=e>=(v=(u+g)/2))?u=v:g=v,(N=r>=(C=(f+b)/2))?f=C:b=C,(O=n>=(_=(p+y)/2))?p=_:y=_,o=c,!(c=c[M=O<<2|N<<1|E]))return o[M]=h,i;if(w=+i._x.call(null,c.data),T=+i._y.call(null,c.data),B=+i._z.call(null,c.data),e===w&&r===T&&n===B)return h.next=c,o?o[M]=h:i._root=h,i;do o=o?o[M]=new Array(8):i._root=new Array(8),(E=e>=(v=(u+g)/2))?u=v:g=v,(N=r>=(C=(f+b)/2))?f=C:b=C,(O=n>=(_=(p+y)/2))?p=_:y=_;while((M=O<<2|N<<1|E)===(j=(B>=_)<<2|(T>=C)<<1|w>=v));return o[j]=c,o[M]=h,i}function ett(i){Array.isArray(i)||(i=Array.from(i));const e=i.length,r=new Float64Array(e),n=new Float64Array(e),a=new Float64Array(e);let o=1/0,c=1/0,h=1/0,u=-1/0,f=-1/0,p=-1/0;for(let g=0,b,y,v,C;g<e;++g)isNaN(y=+this._x.call(null,b=i[g]))||isNaN(v=+this._y.call(null,b))||isNaN(C=+this._z.call(null,b))||(r[g]=y,n[g]=v,a[g]=C,y<o&&(o=y),y>u&&(u=y),v<c&&(c=v),v>f&&(f=v),C<h&&(h=C),C>p&&(p=C));if(o>u||c>f||h>p)return this;this.cover(o,c,h).cover(u,f,p);for(let g=0;g<e;++g)Uj(this,r[g],n[g],a[g],i[g]);return this}function itt(i,e,r){if(isNaN(i=+i)||isNaN(e=+e)||isNaN(r=+r))return this;var n=this._x0,a=this._y0,o=this._z0,c=this._x1,h=this._y1,u=this._z1;if(isNaN(n))c=(n=Math.floor(i))+1,h=(a=Math.floor(e))+1,u=(o=Math.floor(r))+1;else{for(var f=c-n||1,p=this._root,g,b;n>i||i>=c||a>e||e>=h||o>r||r>=u;)switch(b=(r<o)<<2|(e<a)<<1|i<n,g=new Array(8),g[b]=p,p=g,f*=2,b){case 0:c=n+f,h=a+f,u=o+f;break;case 1:n=c-f,h=a+f,u=o+f;break;case 2:c=n+f,a=h-f,u=o+f;break;case 3:n=c-f,a=h-f,u=o+f;break;case 4:c=n+f,h=a+f,o=u-f;break;case 5:n=c-f,h=a+f,o=u-f;break;case 6:c=n+f,a=h-f,o=u-f;break;case 7:n=c-f,a=h-f,o=u-f;break}this._root&&this._root.length&&(this._root=p)}return this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this}function rtt(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function ntt(i){return arguments.length?this.cover(+i[0][0],+i[0][1],+i[0][2]).cover(+i[1][0],+i[1][1],+i[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Ve(i,e,r,n,a,o,c){this.node=i,this.x0=e,this.y0=r,this.z0=n,this.x1=a,this.y1=o,this.z1=c}function att(i,e,r,n){var a,o=this._x0,c=this._y0,h=this._z0,u,f,p,g,b,y,v=this._x1,C=this._y1,_=this._z1,w=[],T=this._root,B,E;for(T&&w.push(new Ve(T,o,c,h,v,C,_)),n==null?n=1/0:(o=i-n,c=e-n,h=r-n,v=i+n,C=e+n,_=r+n,n*=n);B=w.pop();)if(!(!(T=B.node)||(u=B.x0)>v||(f=B.y0)>C||(p=B.z0)>_||(g=B.x1)<o||(b=B.y1)<c||(y=B.z1)<h))if(T.length){var N=(u+g)/2,O=(f+b)/2,M=(p+y)/2;w.push(new Ve(T[7],N,O,M,g,b,y),new Ve(T[6],u,O,M,N,b,y),new Ve(T[5],N,f,M,g,O,y),new Ve(T[4],u,f,M,N,O,y),new Ve(T[3],N,O,p,g,b,M),new Ve(T[2],u,O,p,N,b,M),new Ve(T[1],N,f,p,g,O,M),new Ve(T[0],u,f,p,N,O,M)),(E=(r>=M)<<2|(e>=O)<<1|i>=N)&&(B=w[w.length-1],w[w.length-1]=w[w.length-1-E],w[w.length-1-E]=B)}else{var j=i-+this._x.call(null,T.data),G=e-+this._y.call(null,T.data),$=r-+this._z.call(null,T.data),z=j*j+G*G+$*$;if(z<n){var K=Math.sqrt(n=z);o=i-K,c=e-K,h=r-K,v=i+K,C=e+K,_=r+K,a=T.data}}return a}const stt=(i,e,r,n,a,o)=>Math.sqrt((i-n)**2+(e-a)**2+(r-o)**2);function ott(i,e,r,n){const a=[],o=i-n,c=e-n,h=r-n,u=i+n,f=e+n,p=r+n;return this.visit((g,b,y,v,C,_,w)=>{if(!g.length)do{const T=g.data;stt(i,e,r,this._x(T),this._y(T),this._z(T))<=n&&a.push(T)}while(g=g.next);return b>u||y>f||v>p||C<o||_<c||w<h}),a}function ltt(i){if(isNaN(b=+this._x.call(null,i))||isNaN(y=+this._y.call(null,i))||isNaN(v=+this._z.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._y0,u=this._z0,f=this._x1,p=this._y1,g=this._z1,b,y,v,C,_,w,T,B,E,N,O;if(!r)return this;if(r.length)for(;;){if((T=b>=(C=(c+f)/2))?c=C:f=C,(B=y>=(_=(h+p)/2))?h=_:p=_,(E=v>=(w=(u+g)/2))?u=w:g=w,e=r,!(r=r[N=E<<2|B<<1|T]))return this;if(!r.length)break;(e[N+1&7]||e[N+2&7]||e[N+3&7]||e[N+4&7]||e[N+5&7]||e[N+6&7]||e[N+7&7])&&(n=e,O=N)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[N]=o:delete e[N],(r=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&r===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[O]=r:this._root=r),this):(this._root=o,this)}function ctt(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function htt(){return this._root}function utt(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function ftt(i){var e=[],r,n=this._root,a,o,c,h,u,f,p;for(n&&e.push(new Ve(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.y0,h=r.z0,u=r.x1,f=r.y1,p=r.z1)&&n.length){var g=(o+u)/2,b=(c+f)/2,y=(h+p)/2;(a=n[7])&&e.push(new Ve(a,g,b,y,u,f,p)),(a=n[6])&&e.push(new Ve(a,o,b,y,g,f,p)),(a=n[5])&&e.push(new Ve(a,g,c,y,u,b,p)),(a=n[4])&&e.push(new Ve(a,o,c,y,g,b,p)),(a=n[3])&&e.push(new Ve(a,g,b,h,u,f,y)),(a=n[2])&&e.push(new Ve(a,o,b,h,g,f,y)),(a=n[1])&&e.push(new Ve(a,g,c,h,u,b,y)),(a=n[0])&&e.push(new Ve(a,o,c,h,g,b,y))}return this}function dtt(i){var e=[],r=[],n;for(this._root&&e.push(new Ve(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.z0,f=n.x1,p=n.y1,g=n.z1,b=(c+f)/2,y=(h+p)/2,v=(u+g)/2;(o=a[0])&&e.push(new Ve(o,c,h,u,b,y,v)),(o=a[1])&&e.push(new Ve(o,b,h,u,f,y,v)),(o=a[2])&&e.push(new Ve(o,c,y,u,b,p,v)),(o=a[3])&&e.push(new Ve(o,b,y,u,f,p,v)),(o=a[4])&&e.push(new Ve(o,c,h,v,b,y,g)),(o=a[5])&&e.push(new Ve(o,b,h,v,f,y,g)),(o=a[6])&&e.push(new Ve(o,c,y,v,b,p,g)),(o=a[7])&&e.push(new Ve(o,b,y,v,f,p,g))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function ptt(i){return i[0]}function gtt(i){return arguments.length?(this._x=i,this):this._x}function mtt(i){return i[1]}function ytt(i){return arguments.length?(this._y=i,this):this._y}function xtt(i){return i[2]}function btt(i){return arguments.length?(this._z=i,this):this._z}function Y1(i,e,r,n){var a=new V1(e??ptt,r??mtt,n??xtt,NaN,NaN,NaN,NaN,NaN,NaN);return i==null?a:a.addAll(i)}function V1(i,e,r,n,a,o,c,h,u){this._x=i,this._y=e,this._z=r,this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this._root=void 0}function uB(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Qi=Y1.prototype=V1.prototype;Qi.copy=function(){var i=new V1(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=uB(e),i;for(r=[{source:e,target:i._root=new Array(8)}];e=r.pop();)for(var a=0;a<8;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(8)}):e.target[a]=uB(n));return i};Qi.add=ttt;Qi.addAll=ett;Qi.cover=itt;Qi.data=rtt;Qi.extent=ntt;Qi.find=att;Qi.findAllWithinRadius=ott;Qi.remove=ltt;Qi.removeAll=ctt;Qi.root=htt;Qi.size=utt;Qi.visit=ftt;Qi.visitAfter=dtt;Qi.x=gtt;Qi.y=ytt;Qi.z=btt;function Li(i){return function(){return i}}function yn(i){return(i()-.5)*1e-6}function gx(i){return i.x+i.vx}function fB(i){return i.y+i.vy}function vtt(i){return i.z+i.vz}function Ctt(i){var e,r,n,a,o=1,c=1;typeof i!="function"&&(i=Li(i==null?1:+i));function h(){for(var p,g=e.length,b,y,v,C,_,w,T,B=0;B<c;++B)for(b=(r===1?W1(e,gx):r===2?Vv(e,gx,fB):r===3?Y1(e,gx,fB,vtt):null).visitAfter(u),p=0;p<g;++p)y=e[p],w=n[y.index],T=w*w,v=y.x+y.vx,r>1&&(C=y.y+y.vy),r>2&&(_=y.z+y.vz),b.visit(E);function E(N,O,M,j,G,$,z){var K=[O,M,j,G,$,z],W=K[0],D=K[1],U=K[2],R=K[r],I=K[r+1],P=K[r+2],V=N.data,J=N.r,H=w+J;if(V){if(V.index>y.index){var tt=v-V.x-V.vx,ot=r>1?C-V.y-V.vy:0,st=r>2?_-V.z-V.vz:0,bt=tt*tt+ot*ot+st*st;bt<H*H&&(tt===0&&(tt=yn(a),bt+=tt*tt),r>1&&ot===0&&(ot=yn(a),bt+=ot*ot),r>2&&st===0&&(st=yn(a),bt+=st*st),bt=(H-(bt=Math.sqrt(bt)))/bt*o,y.vx+=(tt*=bt)*(H=(J*=J)/(T+J)),r>1&&(y.vy+=(ot*=bt)*H),r>2&&(y.vz+=(st*=bt)*H),V.vx-=tt*(H=1-H),r>1&&(V.vy-=ot*H),r>2&&(V.vz-=st*H))}return}return W>v+H||R<v-H||r>1&&(D>C+H||I<C-H)||r>2&&(U>_+H||P<_-H)}}function u(p){if(p.data)return p.r=n[p.data.index];for(var g=p.r=0;g<Math.pow(2,r);++g)p[g]&&p[g].r>p.r&&(p.r=p[g].r)}function f(){if(e){var p,g=e.length,b;for(n=new Array(g),p=0;p<g;++p)b=e[p],n[b.index]=+i(b,p,e)}}return h.initialize=function(p,...g){e=p,a=g.find(b=>typeof b=="function")||Math.random,r=g.find(b=>[1,2,3].includes(b))||2,f()},h.iterations=function(p){return arguments.length?(c=+p,h):c},h.strength=function(p){return arguments.length?(o=+p,h):o},h.radius=function(p){return arguments.length?(i=typeof p=="function"?p:Li(+p),f(),h):i},h}function ktt(i){return i.index}function dB(i,e){var r=i.get(e);if(!r)throw new Error("node not found: "+e);return r}function _tt(i){var e=ktt,r=b,n,a=Li(30),o,c,h,u,f,p,g=1;i==null&&(i=[]);function b(w){return 1/Math.min(u[w.source.index],u[w.target.index])}function y(w){for(var T=0,B=i.length;T<g;++T)for(var E=0,N,O,M,j=0,G=0,$=0,z,K;E<B;++E)N=i[E],O=N.source,M=N.target,j=M.x+M.vx-O.x-O.vx||yn(p),h>1&&(G=M.y+M.vy-O.y-O.vy||yn(p)),h>2&&($=M.z+M.vz-O.z-O.vz||yn(p)),z=Math.sqrt(j*j+G*G+$*$),z=(z-o[E])/z*w*n[E],j*=z,G*=z,$*=z,M.vx-=j*(K=f[E]),h>1&&(M.vy-=G*K),h>2&&(M.vz-=$*K),O.vx+=j*(K=1-K),h>1&&(O.vy+=G*K),h>2&&(O.vz+=$*K)}function v(){if(c){var w,T=c.length,B=i.length,E=new Map(c.map((O,M)=>[e(O,M,c),O])),N;for(w=0,u=new Array(T);w<B;++w)N=i[w],N.index=w,typeof N.source!="object"&&(N.source=dB(E,N.source)),typeof N.target!="object"&&(N.target=dB(E,N.target)),u[N.source.index]=(u[N.source.index]||0)+1,u[N.target.index]=(u[N.target.index]||0)+1;for(w=0,f=new Array(B);w<B;++w)N=i[w],f[w]=u[N.source.index]/(u[N.source.index]+u[N.target.index]);n=new Array(B),C(),o=new Array(B),_()}}function C(){if(c)for(var w=0,T=i.length;w<T;++w)n[w]=+r(i[w],w,i)}function _(){if(c)for(var w=0,T=i.length;w<T;++w)o[w]=+a(i[w],w,i)}return y.initialize=function(w,...T){c=w,p=T.find(B=>typeof B=="function")||Math.random,h=T.find(B=>[1,2,3].includes(B))||2,v()},y.links=function(w){return arguments.length?(i=w,v(),y):i},y.id=function(w){return arguments.length?(e=w,y):e},y.iterations=function(w){return arguments.length?(g=+w,y):g},y.strength=function(w){return arguments.length?(r=typeof w=="function"?w:Li(+w),C(),y):r},y.distance=function(w){return arguments.length?(a=typeof w=="function"?w:Li(+w),_(),y):a},y}const wtt=1664525,Stt=1013904223,pB=4294967296;function Ttt(){let i=1;return()=>(i=(wtt*i+Stt)%pB)/pB}var gB=3;function mx(i){return i.x}function mB(i){return i.y}function Btt(i){return i.z}var Att=10,Ett=Math.PI*(3-Math.sqrt(5)),Mtt=Math.PI*20/(9+Math.sqrt(221));function Ltt(i,e){e=e||2;var r=Math.min(gB,Math.max(1,Math.round(e))),n,a=1,o=.001,c=1-Math.pow(o,1/300),h=0,u=.6,f=new Map,p=Wv(y),g=jf("tick","end"),b=Ttt();i==null&&(i=[]);function y(){v(),g.call("tick",n),a<o&&(p.stop(),g.call("end",n))}function v(w){var T,B=i.length,E;w===void 0&&(w=1);for(var N=0;N<w;++N)for(a+=(h-a)*c,f.forEach(function(O){O(a)}),T=0;T<B;++T)E=i[T],E.fx==null?E.x+=E.vx*=u:(E.x=E.fx,E.vx=0),r>1&&(E.fy==null?E.y+=E.vy*=u:(E.y=E.fy,E.vy=0)),r>2&&(E.fz==null?E.z+=E.vz*=u:(E.z=E.fz,E.vz=0));return n}function C(){for(var w=0,T=i.length,B;w<T;++w){if(B=i[w],B.index=w,B.fx!=null&&(B.x=B.fx),B.fy!=null&&(B.y=B.fy),B.fz!=null&&(B.z=B.fz),isNaN(B.x)||r>1&&isNaN(B.y)||r>2&&isNaN(B.z)){var E=Att*(r>2?Math.cbrt(.5+w):r>1?Math.sqrt(.5+w):w),N=w*Ett,O=w*Mtt;r===1?B.x=E:r===2?(B.x=E*Math.cos(N),B.y=E*Math.sin(N)):(B.x=E*Math.sin(N)*Math.cos(O),B.y=E*Math.cos(N),B.z=E*Math.sin(N)*Math.sin(O))}(isNaN(B.vx)||r>1&&isNaN(B.vy)||r>2&&isNaN(B.vz))&&(B.vx=0,r>1&&(B.vy=0),r>2&&(B.vz=0))}}function _(w){return w.initialize&&w.initialize(i,b,r),w}return C(),n={tick:v,restart:function(){return p.restart(y),n},stop:function(){return p.stop(),n},numDimensions:function(w){return arguments.length?(r=Math.min(gB,Math.max(1,Math.round(w))),f.forEach(_),n):r},nodes:function(w){return arguments.length?(i=w,C(),f.forEach(_),n):i},alpha:function(w){return arguments.length?(a=+w,n):a},alphaMin:function(w){return arguments.length?(o=+w,n):o},alphaDecay:function(w){return arguments.length?(c=+w,n):+c},alphaTarget:function(w){return arguments.length?(h=+w,n):h},velocityDecay:function(w){return arguments.length?(u=1-w,n):1-u},randomSource:function(w){return arguments.length?(b=w,f.forEach(_),n):b},force:function(w,T){return arguments.length>1?(T==null?f.delete(w):f.set(w,_(T)),n):f.get(w)},find:function(){var w=Array.prototype.slice.call(arguments),T=w.shift()||0,B=(r>1?w.shift():null)||0,E=(r>2?w.shift():null)||0,N=w.shift()||1/0,O=0,M=i.length,j,G,$,z,K,W;for(N*=N,O=0;O<M;++O)K=i[O],j=T-K.x,G=B-(K.y||0),$=E-(K.z||0),z=j*j+G*G+$*$,z<N&&(W=K,N=z);return W},on:function(w,T){return arguments.length>1?(g.on(w,T),n):g.on(w)}}}function Ntt(){var i,e,r,n,a,o=Li(-30),c,h=1,u=1/0,f=.81;function p(v){var C,_=i.length,w=(e===1?W1(i,mx):e===2?Vv(i,mx,mB):e===3?Y1(i,mx,mB,Btt):null).visitAfter(b);for(a=v,C=0;C<_;++C)r=i[C],w.visit(y)}function g(){if(i){var v,C=i.length,_;for(c=new Array(C),v=0;v<C;++v)_=i[v],c[_.index]=+o(_,v,i)}}function b(v){var C=0,_,w,T=0,B,E,N,O,M=v.length;if(M){for(B=E=N=O=0;O<M;++O)(_=v[O])&&(w=Math.abs(_.value))&&(C+=_.value,T+=w,B+=w*(_.x||0),E+=w*(_.y||0),N+=w*(_.z||0));C*=Math.sqrt(4/M),v.x=B/T,e>1&&(v.y=E/T),e>2&&(v.z=N/T)}else{_=v,_.x=_.data.x,e>1&&(_.y=_.data.y),e>2&&(_.z=_.data.z);do C+=c[_.data.index];while(_=_.next)}v.value=C}function y(v,C,_,w,T){if(!v.value)return!0;var B=[_,w,T][e-1],E=v.x-r.x,N=e>1?v.y-r.y:0,O=e>2?v.z-r.z:0,M=B-C,j=E*E+N*N+O*O;if(M*M/f<j)return j<u&&(E===0&&(E=yn(n),j+=E*E),e>1&&N===0&&(N=yn(n),j+=N*N),e>2&&O===0&&(O=yn(n),j+=O*O),j<h&&(j=Math.sqrt(h*j)),r.vx+=E*v.value*a/j,e>1&&(r.vy+=N*v.value*a/j),e>2&&(r.vz+=O*v.value*a/j)),!0;if(v.length||j>=u)return;(v.data!==r||v.next)&&(E===0&&(E=yn(n),j+=E*E),e>1&&N===0&&(N=yn(n),j+=N*N),e>2&&O===0&&(O=yn(n),j+=O*O),j<h&&(j=Math.sqrt(h*j)));do v.data!==r&&(M=c[v.data.index]*a/j,r.vx+=E*M,e>1&&(r.vy+=N*M),e>2&&(r.vz+=O*M));while(v=v.next)}return p.initialize=function(v,...C){i=v,n=C.find(_=>typeof _=="function")||Math.random,e=C.find(_=>[1,2,3].includes(_))||2,g()},p.strength=function(v){return arguments.length?(o=typeof v=="function"?v:Li(+v),g(),p):o},p.distanceMin=function(v){return arguments.length?(h=v*v,p):Math.sqrt(h)},p.distanceMax=function(v){return arguments.length?(u=v*v,p):Math.sqrt(u)},p.theta=function(v){return arguments.length?(f=v*v,p):Math.sqrt(f)},p}function jtt(i,e,r,n){var a,o,c=Li(.1),h,u;typeof i!="function"&&(i=Li(+i)),e==null&&(e=0),r==null&&(r=0),n==null&&(n=0);function f(g){for(var b=0,y=a.length;b<y;++b){var v=a[b],C=v.x-e||1e-6,_=(v.y||0)-r||1e-6,w=(v.z||0)-n||1e-6,T=Math.sqrt(C*C+_*_+w*w),B=(u[b]-T)*h[b]*g/T;v.vx+=C*B,o>1&&(v.vy+=_*B),o>2&&(v.vz+=w*B)}}function p(){if(a){var g,b=a.length;for(h=new Array(b),u=new Array(b),g=0;g<b;++g)u[g]=+i(a[g],g,a),h[g]=isNaN(u[g])?0:+c(a[g],g,a)}}return f.initialize=function(g,...b){a=g,o=b.find(y=>[1,2,3].includes(y))||2,p()},f.strength=function(g){return arguments.length?(c=typeof g=="function"?g:Li(+g),p(),f):c},f.radius=function(g){return arguments.length?(i=typeof g=="function"?g:Li(+g),p(),f):i},f.x=function(g){return arguments.length?(e=+g,f):e},f.y=function(g){return arguments.length?(r=+g,f):r},f.z=function(g){return arguments.length?(n=+g,f):n},f}function Ott(i){var e=Li(.1),r,n,a;typeof i!="function"&&(i=Li(i==null?0:+i));function o(h){for(var u=0,f=r.length,p;u<f;++u)p=r[u],p.vx+=(a[u]-p.x)*n[u]*h}function c(){if(r){var h,u=r.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+i(r[h],h,r))?0:+e(r[h],h,r)}}return o.initialize=function(h){r=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:Li(+h),c(),o):e},o.x=function(h){return arguments.length?(i=typeof h=="function"?h:Li(+h),c(),o):i},o}function Rtt(i){var e=Li(.1),r,n,a;typeof i!="function"&&(i=Li(i==null?0:+i));function o(h){for(var u=0,f=r.length,p;u<f;++u)p=r[u],p.vy+=(a[u]-p.y)*n[u]*h}function c(){if(r){var h,u=r.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+i(r[h],h,r))?0:+e(r[h],h,r)}}return o.initialize=function(h){r=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:Li(+h),c(),o):e},o.y=function(h){return arguments.length?(i=typeof h=="function"?h:Li(+h),c(),o):i},o}const{abs:Au,cos:Ja,sin:_c,acos:Dtt,atan2:Eu,sqrt:eo,pow:pn}=Math;function Mu(i){return i<0?-pn(-i,1/3):pn(i,1/3)}const Wj=Math.PI,Sp=2*Wj,io=Wj/2,Ftt=1e-6,yx=Number.MAX_SAFE_INTEGER||9007199254740991,xx=Number.MIN_SAFE_INTEGER||-9007199254740991,$tt={x:0,y:0,z:0},Tt={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(i,e){const r=e(i);let n=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(n+=r.z*r.z),eo(n)},compute:function(i,e,r){if(i===0)return e[0].t=0,e[0];const n=e.length-1;if(i===1)return e[n].t=1,e[n];const a=1-i;let o=e;if(n===0)return e[0].t=i,e[0];if(n===1){const h={x:a*o[0].x+i*o[1].x,y:a*o[0].y+i*o[1].y,t:i};return r&&(h.z=a*o[0].z+i*o[1].z),h}if(n<4){let h=a*a,u=i*i,f,p,g,b=0;n===2?(o=[o[0],o[1],o[2],$tt],f=h,p=a*i*2,g=u):n===3&&(f=h*a,p=h*i*3,g=a*u*3,b=i*u);const y={x:f*o[0].x+p*o[1].x+g*o[2].x+b*o[3].x,y:f*o[0].y+p*o[1].y+g*o[2].y+b*o[3].y,t:i};return r&&(y.z=f*o[0].z+p*o[1].z+g*o[2].z+b*o[3].z),y}const c=JSON.parse(JSON.stringify(e));for(;c.length>1;){for(let h=0;h<c.length-1;h++)c[h]={x:c[h].x+(c[h+1].x-c[h].x)*i,y:c[h].y+(c[h+1].y-c[h].y)*i},typeof c[h].z<"u"&&(c[h].z=c[h].z+(c[h+1].z-c[h].z)*i);c.splice(c.length-1,1)}return c[0].t=i,c[0]},computeWithRatios:function(i,e,r,n){const a=1-i,o=r,c=e;let h=o[0],u=o[1],f=o[2],p=o[3],g;if(h*=a,u*=i,c.length===2)return g=h+u,{x:(h*c[0].x+u*c[1].x)/g,y:(h*c[0].y+u*c[1].y)/g,z:n?(h*c[0].z+u*c[1].z)/g:!1,t:i};if(h*=a,u*=2*a,f*=i*i,c.length===3)return g=h+u+f,{x:(h*c[0].x+u*c[1].x+f*c[2].x)/g,y:(h*c[0].y+u*c[1].y+f*c[2].y)/g,z:n?(h*c[0].z+u*c[1].z+f*c[2].z)/g:!1,t:i};if(h*=a,u*=1.5*a,f*=3*a,p*=i*i*i,c.length===4)return g=h+u+f+p,{x:(h*c[0].x+u*c[1].x+f*c[2].x+p*c[3].x)/g,y:(h*c[0].y+u*c[1].y+f*c[2].y+p*c[3].y)/g,z:n?(h*c[0].z+u*c[1].z+f*c[2].z+p*c[3].z)/g:!1,t:i}},derive:function(i,e){const r=[];for(let n=i,a=n.length,o=a-1;a>1;a--,o--){const c=[];for(let h=0,u;h<o;h++)u={x:o*(n[h+1].x-n[h].x),y:o*(n[h+1].y-n[h].y)},e&&(u.z=o*(n[h+1].z-n[h].z)),c.push(u);r.push(c),n=c}return r},between:function(i,e,r){return e<=i&&i<=r||Tt.approximately(i,e)||Tt.approximately(i,r)},approximately:function(i,e,r){return Au(i-e)<=(r||Ftt)},length:function(i){const r=Tt.Tvalues.length;let n=0;for(let a=0,o;a<r;a++)o=.5*Tt.Tvalues[a]+.5,n+=Tt.Cvalues[a]*Tt.arcfn(o,i);return .5*n},map:function(i,e,r,n,a){const o=r-e,c=a-n,h=i-e,u=h/o;return n+c*u},lerp:function(i,e,r){const n={x:e.x+i*(r.x-e.x),y:e.y+i*(r.y-e.y)};return e.z!==void 0&&r.z!==void 0&&(n.z=e.z+i*(r.z-e.z)),n},pointToString:function(i){let e=i.x+"/"+i.y;return typeof i.z<"u"&&(e+="/"+i.z),e},pointsToString:function(i){return"["+i.map(Tt.pointToString).join(", ")+"]"},copy:function(i){return JSON.parse(JSON.stringify(i))},angle:function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=r.x-i.x,c=r.y-i.y,h=n*c-a*o,u=n*o+a*c;return Eu(h,u)},round:function(i,e){const r=""+i,n=r.indexOf(".");return parseFloat(r.substring(0,n+1+e))},dist:function(i,e){const r=i.x-e.x,n=i.y-e.y;return eo(r*r+n*n)},closest:function(i,e){let r=pn(2,63),n,a;return i.forEach(function(o,c){a=Tt.dist(e,o),a<r&&(r=a,n=c)}),{mdist:r,mpos:n}},abcratio:function(i,e){if(e!==2&&e!==3)return!1;if(typeof i>"u")i=.5;else if(i===0||i===1)return i;const r=pn(i,e)+pn(1-i,e),n=r-1;return Au(n/r)},projectionratio:function(i,e){if(e!==2&&e!==3)return!1;if(typeof i>"u")i=.5;else if(i===0||i===1)return i;const r=pn(1-i,e),n=pn(i,e)+r;return r/n},lli8:function(i,e,r,n,a,o,c,h){const u=(i*n-e*r)*(a-c)-(i-r)*(a*h-o*c),f=(i*n-e*r)*(o-h)-(e-n)*(a*h-o*c),p=(i-r)*(o-h)-(e-n)*(a-c);return p==0?!1:{x:u/p,y:f/p}},lli4:function(i,e,r,n){const a=i.x,o=i.y,c=e.x,h=e.y,u=r.x,f=r.y,p=n.x,g=n.y;return Tt.lli8(a,o,c,h,u,f,p,g)},lli:function(i,e){return Tt.lli4(i,i.c,e,e.c)},makeline:function(i,e){return new Ke(i.x,i.y,(i.x+e.x)/2,(i.y+e.y)/2,e.x,e.y)},findbbox:function(i){let e=yx,r=yx,n=xx,a=xx;return i.forEach(function(o){const c=o.bbox();e>c.x.min&&(e=c.x.min),r>c.y.min&&(r=c.y.min),n<c.x.max&&(n=c.x.max),a<c.y.max&&(a=c.y.max)}),{x:{min:e,mid:(e+n)/2,max:n,size:n-e},y:{min:r,mid:(r+a)/2,max:a,size:a-r}}},shapeintersections:function(i,e,r,n,a){if(!Tt.bboxoverlap(e,n))return[];const o=[],c=[i.startcap,i.forward,i.back,i.endcap],h=[r.startcap,r.forward,r.back,r.endcap];return c.forEach(function(u){u.virtual||h.forEach(function(f){if(f.virtual)return;const p=u.intersects(f,a);p.length>0&&(p.c1=u,p.c2=f,p.s1=i,p.s2=r,o.push(p))})}),o},makeshape:function(i,e,r){const n=e.points.length,a=i.points.length,o=Tt.makeline(e.points[n-1],i.points[0]),c=Tt.makeline(i.points[a-1],e.points[0]),h={startcap:o,forward:i,back:e,endcap:c,bbox:Tt.findbbox([o,i,e,c])};return h.intersections=function(u){return Tt.shapeintersections(h,h.bbox,u,u.bbox,r)},h},getminmax:function(i,e,r){if(!r)return{min:0,max:0};let n=yx,a=xx,o,c;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let h=0,u=r.length;h<u;h++)o=r[h],c=i.get(o),c[e]<n&&(n=c[e]),c[e]>a&&(a=c[e]);return{min:n,mid:(n+a)/2,max:a,size:a-n}},align:function(i,e){const r=e.p1.x,n=e.p1.y,a=-Eu(e.p2.y-n,e.p2.x-r),o=function(c){return{x:(c.x-r)*Ja(a)-(c.y-n)*_c(a),y:(c.x-r)*_c(a)+(c.y-n)*Ja(a)}};return i.map(o)},roots:function(i,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=i.length-1,n=Tt.align(i,e),a=function(M){return 0<=M&&M<=1};if(r===2){const M=n[0].y,j=n[1].y,G=n[2].y,$=M-2*j+G;if($!==0){const z=-eo(j*j-M*G),K=-M+j,W=-(z+K)/$,D=-(-z+K)/$;return[W,D].filter(a)}else if(j!==G&&$===0)return[(2*j-G)/(2*j-2*G)].filter(a);return[]}const o=n[0].y,c=n[1].y,h=n[2].y,u=n[3].y;let f=-o+3*c-3*h+u,p=3*o-6*c+3*h,g=-3*o+3*c,b=o;if(Tt.approximately(f,0)){if(Tt.approximately(p,0))return Tt.approximately(g,0)?[]:[-b/g].filter(a);const M=eo(g*g-4*p*b),j=2*p;return[(M-g)/j,(-g-M)/j].filter(a)}p/=f,g/=f,b/=f;const y=(3*g-p*p)/3,v=y/3,C=(2*p*p*p-9*p*g+27*b)/27,_=C/2,w=_*_+v*v*v;let T,B,E,N,O;if(w<0){const M=-y/3,j=M*M*M,G=eo(j),$=-C/(2*G),z=$<-1?-1:$>1?1:$,K=Dtt(z),W=Mu(G),D=2*W;return E=D*Ja(K/3)-p/3,N=D*Ja((K+Sp)/3)-p/3,O=D*Ja((K+2*Sp)/3)-p/3,[E,N,O].filter(a)}else{if(w===0)return T=_<0?Mu(-_):-Mu(_),E=2*T-p/3,N=-T-p/3,[E,N].filter(a);{const M=eo(w);return T=Mu(-_+M),B=Mu(_+M),[T-B-p/3].filter(a)}}},droots:function(i){if(i.length===3){const e=i[0],r=i[1],n=i[2],a=e-2*r+n;if(a!==0){const o=-eo(r*r-e*n),c=-e+r,h=-(o+c)/a,u=-(-o+c)/a;return[h,u]}else if(r!==n&&a===0)return[(2*r-n)/(2*(r-n))];return[]}if(i.length===2){const e=i[0],r=i[1];return e!==r?[e/(e-r)]:[]}return[]},curvature:function(i,e,r,n,a){let o,c,h,u,f=0,p=0;const g=Tt.compute(i,e),b=Tt.compute(i,r),y=g.x*g.x+g.y*g.y;if(n?(o=eo(pn(g.y*b.z-b.y*g.z,2)+pn(g.z*b.x-b.z*g.x,2)+pn(g.x*b.y-b.x*g.y,2)),c=pn(y+g.z*g.z,3/2)):(o=g.x*b.y-g.y*b.x,c=pn(y,3/2)),o===0||c===0)return{k:0,r:0};if(f=o/c,p=c/o,!a){const v=Tt.curvature(i-.001,e,r,n,!0).k,C=Tt.curvature(i+.001,e,r,n,!0).k;u=(C-f+(f-v))/2,h=(Au(C-f)+Au(f-v))/2}return{k:f,r:p,dk:u,adk:h}},inflections:function(i){if(i.length<4)return[];const e=Tt.align(i,{p1:i[0],p2:i.slice(-1)[0]}),r=e[2].x*e[1].y,n=e[3].x*e[1].y,a=e[1].x*e[2].y,o=e[3].x*e[2].y,c=18*(-3*r+2*n+3*a-o),h=18*(3*r-n-3*a),u=18*(a-r);if(Tt.approximately(c,0)){if(!Tt.approximately(h,0)){let b=-u/h;if(0<=b&&b<=1)return[b]}return[]}const f=2*c;if(Tt.approximately(f,0))return[];const p=h*h-4*c*u;if(p<0)return[];const g=Math.sqrt(p);return[(g-h)/f,-(h+g)/f].filter(function(b){return 0<=b&&b<=1})},bboxoverlap:function(i,e){const r=["x","y"],n=r.length;for(let a=0,o,c,h,u;a<n;a++)if(o=r[a],c=i[o].mid,h=e[o].mid,u=(i[o].size+e[o].size)/2,Au(c-h)>=u)return!1;return!0},expandbox:function(i,e){e.x.min<i.x.min&&(i.x.min=e.x.min),e.y.min<i.y.min&&(i.y.min=e.y.min),e.z&&e.z.min<i.z.min&&(i.z.min=e.z.min),e.x.max>i.x.max&&(i.x.max=e.x.max),e.y.max>i.y.max&&(i.y.max=e.y.max),e.z&&e.z.max>i.z.max&&(i.z.max=e.z.max),i.x.mid=(i.x.min+i.x.max)/2,i.y.mid=(i.y.min+i.y.max)/2,i.z&&(i.z.mid=(i.z.min+i.z.max)/2),i.x.size=i.x.max-i.x.min,i.y.size=i.y.max-i.y.min,i.z&&(i.z.size=i.z.max-i.z.min)},pairiteration:function(i,e,r){const n=i.bbox(),a=e.bbox(),o=1e5,c=r||.5;if(n.x.size+n.y.size<c&&a.x.size+a.y.size<c)return[(o*(i._t1+i._t2)/2|0)/o+"/"+(o*(e._t1+e._t2)/2|0)/o];let h=i.split(.5),u=e.split(.5),f=[{left:h.left,right:u.left},{left:h.left,right:u.right},{left:h.right,right:u.right},{left:h.right,right:u.left}];f=f.filter(function(g){return Tt.bboxoverlap(g.left.bbox(),g.right.bbox())});let p=[];return f.length===0||(f.forEach(function(g){p=p.concat(Tt.pairiteration(g.left,g.right,c))}),p=p.filter(function(g,b){return p.indexOf(g)===b})),p},getccenter:function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=r.x-e.x,c=r.y-e.y,h=n*Ja(io)-a*_c(io),u=n*_c(io)+a*Ja(io),f=o*Ja(io)-c*_c(io),p=o*_c(io)+c*Ja(io),g=(i.x+e.x)/2,b=(i.y+e.y)/2,y=(e.x+r.x)/2,v=(e.y+r.y)/2,C=g+h,_=b+u,w=y+f,T=v+p,B=Tt.lli8(g,b,C,_,y,v,w,T),E=Tt.dist(B,i);let N=Eu(i.y-B.y,i.x-B.x),O=Eu(e.y-B.y,e.x-B.x),M=Eu(r.y-B.y,r.x-B.x),j;return N<M?((N>O||O>M)&&(N+=Sp),N>M&&(j=M,M=N,N=j)):M<O&&O<N?(j=M,M=N,N=j):M+=Sp,B.s=N,B.e=M,B.r=E,B},numberSort:function(i,e){return i-e}};class sf{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(e){return Tt.pointsToString(e.points)}).join(", ")+"]"}addCurve(e){this.curves.push(e),this._3d=this._3d||e._3d}length(){return this.curves.map(function(e){return e.length()}).reduce(function(e,r){return e+r})}curve(e){return this.curves[e]}bbox(){const e=this.curves;for(var r=e[0].bbox(),n=1;n<e.length;n++)Tt.expandbox(r,e[n].bbox());return r}offset(e){const r=[];return this.curves.forEach(function(n){r.push(...n.offset(e))}),new sf(r)}}const{abs:Lu,min:yB,max:xB,cos:ztt,sin:Itt,acos:qtt,sqrt:Nu}=Math,Ptt=Math.PI;class Ke{constructor(e){let r=e&&e.forEach?e:Array.from(arguments).slice(),n=!1;if(typeof r[0]=="object"){n=r.length;const y=[];r.forEach(function(v){["x","y","z"].forEach(function(C){typeof v[C]<"u"&&y.push(v[C])})}),r=y}let a=!1;const o=r.length;if(n){if(n>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");a=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const c=this._3d=!a&&(o===9||o===12)||e&&e[0]&&typeof e[0].z<"u",h=this.points=[];for(let y=0,v=c?3:2;y<o;y+=v){var u={x:r[y],y:r[y+1]};c&&(u.z=r[y+2]),h.push(u)}const f=this.order=h.length-1,p=this.dims=["x","y"];c&&p.push("z"),this.dimlen=p.length;const g=Tt.align(h,{p1:h[0],p2:h[f]}),b=Tt.dist(h[0],h[f]);this._linear=g.reduce((y,v)=>y+Lu(v.y),0)<b/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(e,r,n,a){if(typeof a>"u"&&(a=.5),a===0)return new Ke(r,r,n);if(a===1)return new Ke(e,r,r);const o=Ke.getABC(2,e,r,n,a);return new Ke(e,o.A,n)}static cubicFromPoints(e,r,n,a,o){typeof a>"u"&&(a=.5);const c=Ke.getABC(3,e,r,n,a);typeof o>"u"&&(o=Tt.dist(r,c.C));const h=o*(1-a)/a,u=Tt.dist(e,n),f=(n.x-e.x)/u,p=(n.y-e.y)/u,g=o*f,b=o*p,y=h*f,v=h*p,C={x:r.x-g,y:r.y-b},_={x:r.x+y,y:r.y+v},w=c.A,T={x:w.x+(C.x-w.x)/(1-a),y:w.y+(C.y-w.y)/(1-a)},B={x:w.x+(_.x-w.x)/a,y:w.y+(_.y-w.y)/a},E={x:e.x+(T.x-e.x)/a,y:e.y+(T.y-e.y)/a},N={x:n.x+(B.x-n.x)/(1-a),y:n.y+(B.y-n.y)/(1-a)};return new Ke(e,E,N,n)}static getUtils(){return Tt}getUtils(){return Ke.getUtils()}static get PolyBezier(){return sf}valueOf(){return this.toString()}toString(){return Tt.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,r=e[0].x,n=e[0].y,a=["M",r,n,this.order===2?"Q":"C"];for(let o=1,c=e.length;o<c;o++)a.push(e[o].x),a.push(e[o].y);return a.join(" ")}setRatios(e){if(e.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=e,this._lut=[]}verify(){const e=this.coordDigest();e!==this._print&&(this._print=e,this.update())}coordDigest(){return this.points.map(function(e,r){return""+r+e.x+e.y+(e.z?e.z:0)}).join("")}update(){this._lut=[],this.dpoints=Tt.derive(this.points,this._3d),this.computedirection()}computedirection(){const e=this.points,r=Tt.angle(e[0],e[this.order],e[1]);this.clockwise=r>0}length(){return Tt.length(this.derivative.bind(this))}static getABC(e=2,r,n,a,o=.5){const c=Tt.projectionratio(o,e),h=1-c,u={x:c*r.x+h*a.x,y:c*r.y+h*a.y},f=Tt.abcratio(o,e);return{A:{x:n.x+(n.x-u.x)/f,y:n.y+(n.y-u.y)/f},B:n,C:u,S:r,E:a}}getABC(e,r){r=r||this.get(e);let n=this.points[0],a=this.points[this.order];return Ke.getABC(this.order,n,r,a,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let r=0,n,a;r<e;r++)a=r/(e-1),n=this.compute(a),n.t=a,this._lut.push(n);return this._lut}on(e,r){r=r||5;const n=this.getLUT(),a=[];for(let o=0,c,h=0;o<n.length;o++)c=n[o],Tt.dist(c,e)<r&&(a.push(c),h+=o/n.length);return a.length?t/=a.length:!1}project(e){const r=this.getLUT(),n=r.length-1,a=Tt.closest(r,e),o=a.mpos,c=(o-1)/n,h=(o+1)/n,u=.1/n;let f=a.mdist,p=c,g=p,b;f+=1;for(let y;p<h+u;p+=u)b=this.compute(p),y=Tt.dist(e,b),y<f&&(f=y,g=p);return g=g<0?0:g>1?1:g,b=this.compute(g),b.t=g,b.d=f,b}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Tt.computeWithRatios(e,this.points,this.ratios,this._3d):Tt.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,r=[e[0]],n=e.length;for(let a=1,o,c;a<n;a++)o=e[a],c=e[a-1],r[a]={x:(n-a)/n*o.x+a/n*c.x,y:(n-a)/n*o.y+a/n*c.y};return r[n]=e[n-1],new Ke(r)}derivative(e){return Tt.compute(e,this.dpoints[0],this._3d)}dderivative(e){return Tt.compute(e,this.dpoints[1],this._3d)}align(){let e=this.points;return new Ke(Tt.align(e,{p1:e[0],p2:e[e.length-1]}))}curvature(e){return Tt.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Tt.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){const r=this.derivative(e),n=Nu(r.x*r.x+r.y*r.y);return{t:e,x:-r.y/n,y:r.x/n}}__normal3(e){const r=this.derivative(e),n=this.derivative(e+.01),a=Nu(r.x*r.x+r.y*r.y+r.z*r.z),o=Nu(n.x*n.x+n.y*n.y+n.z*n.z);r.x/=a,r.y/=a,r.z/=a,n.x/=o,n.y/=o,n.z/=o;const c={x:n.y*r.z-n.z*r.y,y:n.z*r.x-n.x*r.z,z:n.x*r.y-n.y*r.x},h=Nu(c.x*c.x+c.y*c.y+c.z*c.z);c.x/=h,c.y/=h,c.z/=h;const u=[c.x*c.x,c.x*c.y-c.z,c.x*c.z+c.y,c.x*c.y+c.z,c.y*c.y,c.y*c.z-c.x,c.x*c.z-c.y,c.y*c.z+c.x,c.z*c.z];return{t:e,x:u[0]*r.x+u[1]*r.y+u[2]*r.z,y:u[3]*r.x+u[4]*r.y+u[5]*r.z,z:u[6]*r.x+u[7]*r.y+u[8]*r.z}}hull(e){let r=this.points,n=[],a=[],o=0;for(a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],this.order===3&&(a[o++]=r[3]);r.length>1;){n=[];for(let c=0,h,u=r.length-1;c<u;c++)h=Tt.lerp(e,r[c],r[c+1]),a[o++]=h,n.push(h);r=n}return a}split(e,r){if(e===0&&r)return this.split(r).left;if(r===1)return this.split(e).right;const n=this.hull(e),a={left:this.order===2?new Ke([n[0],n[3],n[5]]):new Ke([n[0],n[4],n[7],n[9]]),right:this.order===2?new Ke([n[5],n[4],n[2]]):new Ke([n[9],n[8],n[6],n[3]]),span:n};return a.left._t1=Tt.map(0,0,1,this._t1,this._t2),a.left._t2=Tt.map(e,0,1,this._t1,this._t2),a.right._t1=Tt.map(e,0,1,this._t1,this._t2),a.right._t2=Tt.map(1,0,1,this._t1,this._t2),r?(r=Tt.map(r,e,1,0,1),a.right.split(r).left):a}extrema(){const e={};let r=[];return this.dims.forEach((function(n){let a=function(c){return c[n]},o=this.dpoints[0].map(a);e[n]=Tt.droots(o),this.order===3&&(o=this.dpoints[1].map(a),e[n]=e[n].concat(Tt.droots(o))),e[n]=e[n].filter(function(c){return c>=0&&c<=1}),r=r.concat(e[n].sort(Tt.numberSort))}).bind(this)),e.values=r.sort(Tt.numberSort).filter(function(n,a){return r.indexOf(n)===a}),e}bbox(){const e=this.extrema(),r={};return this.dims.forEach((function(n){r[n]=Tt.getminmax(this,n,e[n])}).bind(this)),r}overlaps(e){const r=this.bbox(),n=e.bbox();return Tt.bboxoverlap(r,n)}offset(e,r){if(typeof r<"u"){const n=this.get(e),a=this.normal(e),o={c:n,n:a,x:n.x+a.x*r,y:n.y+a.y*r};return this._3d&&(o.z=n.z+a.z*r),o}if(this._linear){const n=this.normal(0),a=this.points.map(function(o){const c={x:o.x+e*n.x,y:o.y+e*n.y};return o.z&&n.z&&(c.z=o.z+e*n.z),c});return[new Ke(a)]}return this.reduce().map(function(n){return n._linear?n.offset(e)[0]:n.scale(e)})}simple(){if(this.order===3){const a=Tt.angle(this.points[0],this.points[3],this.points[1]),o=Tt.angle(this.points[0],this.points[3],this.points[2]);if(a>0&&o<0||a<0&&o>0)return!1}const e=this.normal(0),r=this.normal(1);let n=e.x*r.x+e.y*r.y;return this._3d&&(n+=e.z*r.z),Lu(qtt(n))<Ptt/3}reduce(){let e,r=0,n=0,a=.01,o,c=[],h=[],u=this.extrema().values;for(u.indexOf(0)===-1&&(u=[0].concat(u)),u.indexOf(1)===-1&&u.push(1),r=u[0],e=1;e<u.length;e++)n=u[e],o=this.split(r,n),o._t1=r,o._t2=n,c.push(o),r=n;return c.forEach(function(f){for(r=0,n=0;n<=1;)for(n=r+a;n<=1+a;n+=a)if(o=f.split(r,n),!o.simple()){if(n-=a,Lu(r-n)<a)return[];o=f.split(r,n),o._t1=Tt.map(r,0,1,f._t1,f._t2),o._t2=Tt.map(n,0,1,f._t1,f._t2),h.push(o),r=n;break}r<1&&(o=f.split(r,1),o._t1=Tt.map(r,0,1,f._t1,f._t2),o._t2=f._t2,h.push(o))}),h}translate(e,r,n){n=typeof n=="number"?n:r;const a=this.order;let o=this.points.map((c,h)=>(1-h/a)*r+h/a*n);return new Ke(this.points.map((c,h)=>({x:c.x+e.x*o[h],y:c.y+e.y*o[h]})))}scale(e){const r=this.order;let n=!1;if(typeof e=="function"&&(n=e),n&&r===2)return this.raise().scale(n);const a=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const c=n?n(0):e,h=n?n(1):e,u=[this.offset(0,10),this.offset(1,10)],f=[],p=Tt.lli4(u[0],u[0].c,u[1],u[1].c);if(!p)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(g){const b=f[g*r]=Tt.copy(o[g*r]);b.x+=(g?h:c)*u[g].n.x,b.y+=(g?h:c)*u[g].n.y}),n?([0,1].forEach(function(g){if(!(r===2&&g)){var b=o[g+1],y={x:b.x-p.x,y:b.y-p.y},v=n?n((g+1)/r):e;n&&!a&&(v=-v);var C=Nu(y.x*y.x+y.y*y.y);y.x/=C,y.y/=C,f[g+1]={x:b.x+v*y.x,y:b.y+v*y.y}}}),new Ke(f)):([0,1].forEach(g=>{if(r===2&&g)return;const b=f[g*r],y=this.derivative(g),v={x:b.x+y.x,y:b.y+y.y};f[g+1]=Tt.lli4(b,v,p,o[g+1])}),new Ke(f))}outline(e,r,n,a){if(r=r===void 0?e:r,this._linear){const N=this.normal(0),O=this.points[0],M=this.points[this.points.length-1];let j,G,$;n===void 0&&(n=e,a=r),j={x:O.x+N.x*e,y:O.y+N.y*e},$={x:M.x+N.x*n,y:M.y+N.y*n},G={x:(j.x+$.x)/2,y:(j.y+$.y)/2};const z=[j,G,$];j={x:O.x-N.x*r,y:O.y-N.y*r},$={x:M.x-N.x*a,y:M.y-N.y*a},G={x:(j.x+$.x)/2,y:(j.y+$.y)/2};const K=[$,G,j],W=Tt.makeline(K[2],z[0]),D=Tt.makeline(z[2],K[0]),U=[W,new Ke(z),D,new Ke(K)];return new sf(U)}const o=this.reduce(),c=o.length,h=[];let u=[],f,p=0,g=this.length();const b=typeof n<"u"&&typeof a<"u";function y(N,O,M,j,G){return function($){const z=j/M,K=(j+G)/M,W=O-N;return Tt.map($,0,1,N+z*W,N+K*W)}}o.forEach(function(N){const O=N.length();b?(h.push(N.scale(y(e,n,g,p,O))),u.push(N.scale(y(-r,-a,g,p,O)))):(h.push(N.scale(e)),u.push(N.scale(-r))),p+=O}),u=u.map(function(N){return f=N.points,f[3]?N.points=[f[3],f[2],f[1],f[0]]:N.points=[f[2],f[1],f[0]],N}).reverse();const v=h[0].points[0],C=h[c-1].points[h[c-1].points.length-1],_=u[c-1].points[u[c-1].points.length-1],w=u[0].points[0],T=Tt.makeline(_,v),B=Tt.makeline(C,w),E=[T].concat(h).concat([B]).concat(u);return new sf(E)}outlineshapes(e,r,n){r=r||e;const a=this.outline(e,r).curves,o=[];for(let c=1,h=a.length;c<h/2;c++){const u=Tt.makeshape(a[c],a[h-c],n);u.startcap.virtual=c>1,u.endcap.virtual=c<h/2-1,o.push(u)}return o}intersects(e,r){return e?e.p1&&e.p2?this.lineIntersects(e):(e instanceof Ke&&(e=e.reduce()),this.curveintersects(this.reduce(),e,r)):this.selfintersects(r)}lineIntersects(e){const r=yB(e.p1.x,e.p2.x),n=yB(e.p1.y,e.p2.y),a=xB(e.p1.x,e.p2.x),o=xB(e.p1.y,e.p2.y);return Tt.roots(this.points,e).filter(c=>{var h=this.get(c);return Tt.between(h.x,r,a)&&Tt.between(h.y,n,o)})}selfintersects(e){const r=this.reduce(),n=r.length-2,a=[];for(let o=0,c,h,u;o<n;o++)h=r.slice(o,o+1),u=r.slice(o+2),c=this.curveintersects(h,u,e),a.push(...c);return a}curveintersects(e,r,n){const a=[];e.forEach(function(c){r.forEach(function(h){c.overlaps(h)&&a.push({left:c,right:h})})});let o=[];return a.forEach(function(c){const h=Tt.pairiteration(c.left,c.right,n);h.length>0&&(o=o.concat(h))}),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,r,n,a){const o=(a-n)/4,c=this.get(n+o),h=this.get(a-o),u=Tt.dist(e,r),f=Tt.dist(e,c),p=Tt.dist(e,h);return Lu(f-u)+Lu(p-u)}_iterate(e,r){let n=0,a=1,o;do{o=0,a=1;let c=this.get(n),h,u,f,p,g=!1,b=!1,y,v=a,C=1;do if(b=g,p=f,v=(n+a)/2,h=this.get(v),u=this.get(a),f=Tt.getccenter(c,h,u),f.interval={start:n,end:a},g=this._error(f,c,n,a)<=e,y=b&&!g,y||(C=a),g){if(a>=1){if(f.interval.end=C=1,p=f,a>1){let w={x:f.x+f.r*ztt(f.e),y:f.y+f.r*Itt(f.e)};f.e+=Tt.angle({x:f.x,y:f.y},w,this.get(1))}break}a=a+(a-n)/2}else a=v;while(!y&&o++<100);if(o>=100)break;p=p||f,r.push(p),n=C}while(a<1);return r}}function hv(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function Htt(i){if(Array.isArray(i))return i}function Utt(i){if(Array.isArray(i))return hv(i)}function Wtt(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function Gtt(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function Ytt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
447
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vtt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
448
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xtt(i,e){if(i==null)return{};var r,n,a=Qtt(i,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(n=0;n<o.length;n++)r=o[n],e.includes(r)||{}.propertyIsEnumerable.call(i,r)&&(a[r]=i[r])}return a}function Qtt(i,e){if(i==null)return{};var r={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.includes(n))continue;r[n]=i[n]}return r}function Ztt(i,e){return Htt(i)||Gtt(i,e)||Gj(i,e)||Ytt()}function Ktt(i){return Utt(i)||Wtt(i)||Gj(i)||Vtt()}function Jtt(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}function tet(i){var e=Jtt(i,"string");return typeof e=="symbol"?e:e+""}function Gj(i,e){if(i){if(typeof i=="string")return hv(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hv(i,e):void 0}}var eet=(function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(e instanceof Array?e.length?e:[void 0]:[e]).map(function(h){return{keyAccessor:h,isProp:!(h instanceof Function)}}),o=i.reduce(function(h,u){var f=h,p=u;return a.forEach(function(g,b){var y=g.keyAccessor,v=g.isProp,C;if(v){var _=p,w=_[y],T=Xtt(_,[y].map(tet));C=w,p=T}else C=y(p,b);b+1<a.length?(f.hasOwnProperty(C)||(f[C]={}),f=f[C]):r?(f.hasOwnProperty(C)||(f[C]=[]),f[C].push(p)):f[C]=p}),h},{});r instanceof Function&&(function h(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;f===a.length?Object.keys(u).forEach(function(p){return u[p]=r(u[p])}):Object.values(u).forEach(function(p){return h(p,f+1)})})(o);var c=o;return n&&(c=[],(function h(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];f.length===a.length?c.push({keys:f,vals:u}):Object.entries(u).forEach(function(p){var g=Ztt(p,2),b=g[0],y=g[1];return h(y,[].concat(Ktt(f),[b]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function iet(i,e){e===void 0&&(e={});var r=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",r==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=i:a.appendChild(document.createTextNode(i))}}var ret=`.force-graph-container canvas {
449
+ display: block;
450
+ user-select: none;
451
+ outline: none;
452
+ -webkit-tap-highlight-color: transparent;
453
+ }
454
+
455
+ .force-graph-container .clickable {
456
+ cursor: pointer;
457
+ }
458
+
459
+ .force-graph-container .grabbable {
460
+ cursor: move;
461
+ cursor: grab;
462
+ cursor: -moz-grab;
463
+ cursor: -webkit-grab;
464
+ }
465
+
466
+ .force-graph-container .grabbable:active {
467
+ cursor: grabbing;
468
+ cursor: -moz-grabbing;
469
+ cursor: -webkit-grabbing;
470
+ }
471
+ `;iet(ret);function uv(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function net(i){if(Array.isArray(i))return i}function aet(i){if(Array.isArray(i))return uv(i)}function bB(i,e,r){if(Yj())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var a=new(i.bind.apply(i,n));return a}function wf(i,e,r){return(e=fet(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function Yj(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yj=function(){return!!i})()}function set(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function oet(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function cet(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
472
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function het(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
473
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vB(i,e){var r=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),r.push.apply(r,n)}return r}function wc(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vB(Object(r),!0).forEach(function(n){wf(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):vB(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function of(i,e){return net(i)||oet(i,e)||Vj(i,e)||cet()}function xn(i){return aet(i)||set(i)||Vj(i)||het()}function uet(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function fet(i){var e=uet(i,"string");return typeof e=="symbol"?e:e+""}function fv(i){"@babel/helpers - typeof";return fv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fv(i)}function Vj(i,e){if(i){if(typeof i=="string")return uv(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uv(i,e):void 0}}var det=EE(J7);function CB(i,e,r){!e||typeof r!="string"||i.filter(function(n){return!n[r]}).forEach(function(n){n[r]=det(e(n))})}function pet(i,e){var r=i.nodes,n=i.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,c=o===void 0?function(){return!0}:o,h=a.onLoopError,u=h===void 0?function(y){throw"Invalid DAG structure! Found cycle in node path: ".concat(y.join(" -> "),".")}:h,f={};r.forEach(function(y){return f[e(y)]={data:y,out:[],depth:-1,skip:!c(y)}}),n.forEach(function(y){var v=y.source,C=y.target,_=E(v),w=E(C);if(!f.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!f.hasOwnProperty(w))throw"Missing target node with id: ".concat(w);var T=f[_],B=f[w];T.out.push(B);function E(N){return fv(N)==="object"?e(N):N}});var p=[];b(Object.values(f));var g=Object.assign.apply(Object,[{}].concat(xn(Object.entries(f).filter(function(y){var v=of(y,2),C=v[1];return!C.skip}).map(function(y){var v=of(y,2),C=v[0],_=v[1];return wf({},C,_.depth)}))));return g;function b(y){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var E=y[w];if(v.indexOf(E)!==-1){var N=[].concat(xn(v.slice(v.indexOf(E))),[E]).map(function(O){return e(O.data)});return p.some(function(O){return O.length===N.length&&O.every(function(M,j){return M===N[j]})})||(p.push(N),u(N)),1}C>E.depth&&(E.depth=C,b(E.out,[].concat(xn(v),[E]),C+(E.skip?0:1)))},w=0,T=y.length;w<T;w++)_()}}var get=2,tr=function(e,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},kB=function(e,r){if(!r.isShadow){var n=Ne(r.linkDirectionalParticles);r.graphData.links.forEach(function(a){var o=Math.round(Math.abs(n(a)));o?a.__photons=xn(Array(o)).map(function(){return{}}):delete a.__photons})}},Ig=I1({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,r){r.engineRunning=!1,kB(e,r)}},dagMode:{onChange:function(e,r){!e&&(r.graphData.nodes||[]).forEach(function(n){return n.fx=n.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:tr},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:tr},nodeColor:{default:"color",triggerUpdate:!1,onChange:tr},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:tr},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:tr},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:tr},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:tr},linkColor:{default:"color",triggerUpdate:!1,onChange:tr},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:tr},linkWidth:{default:1,triggerUpdate:!1,onChange:tr},linkCurvature:{default:0,triggerUpdate:!1,onChange:tr},linkCanvasObject:{triggerUpdate:!1,onChange:tr},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:tr},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:tr},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:tr},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:tr},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:kB},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,r,n){return n===void 0?e.forceLayout.force(r):(e.forceLayout.force(r,n),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&r(),a(),!e.isShadow&&o(),!e.isShadow&&c(),n(),this;function r(){e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick()))}function n(){var h=Ne(e.nodeVisibility),u=Ne(e.nodeVal),f=Ne(e.nodeColor),p=Ne(e.nodeCanvasObjectMode),g=e.ctx,b=e.isShadow/e.globalScale,y=e.graphData.nodes.filter(h);g.save(),y.forEach(function(v){var C=p(v);if(e.nodeCanvasObject&&(C==="before"||C==="replace")&&(e.nodeCanvasObject(v,g,e.globalScale),C==="replace")){g.restore();return}var _=Math.sqrt(Math.max(0,u(v)||1))*e.nodeRelSize+b;g.beginPath(),g.arc(v.x,v.y,_,0,2*Math.PI,!1),g.fillStyle=f(v)||"rgba(31, 120, 180, 0.92)",g.fill(),e.nodeCanvasObject&&C==="after"&&e.nodeCanvasObject(v,e.ctx,e.globalScale)}),g.restore()}function a(){var h=Ne(e.linkVisibility),u=Ne(e.linkColor),f=Ne(e.linkWidth),p=Ne(e.linkLineDash),g=Ne(e.linkCurvature),b=Ne(e.linkCanvasObjectMode),y=e.ctx,v=e.isShadow*2,C=e.graphData.links.filter(h);C.forEach(O);var _=[],w=[],T=C;if(e.linkCanvasObject){var B=[],E=[];C.forEach(function(M){return({before:_,after:w,replace:B}[b(M)]||E).push(M)}),T=[].concat(xn(_),w,E),_=_.concat(B)}y.save(),_.forEach(function(M){return e.linkCanvasObject(M,y,e.globalScale)}),y.restore();var N=eet(T,[u,f,p]);y.save(),Object.entries(N).forEach(function(M){var j=of(M,2),G=j[0],$=j[1],z=!G||G==="undefined"?"rgba(0,0,0,0.15)":G;Object.entries($).forEach(function(K){var W=of(K,2),D=W[0],U=W[1],R=(D||1)/e.globalScale+v;Object.entries(U).forEach(function(I){var P=of(I,2);P[0];var V=P[1],J=p(V[0]);y.beginPath(),V.forEach(function(H){var tt=H.source,ot=H.target;if(!(!tt||!ot||!tt.hasOwnProperty("x")||!ot.hasOwnProperty("x"))){y.moveTo(tt.x,tt.y);var st=H.__controlPoints;st?y[st.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,xn(st).concat([ot.x,ot.y])):y.lineTo(ot.x,ot.y)}}),y.strokeStyle=z,y.lineWidth=R,y.setLineDash(J||[]),y.stroke()})})}),y.restore(),y.save(),w.forEach(function(M){return e.linkCanvasObject(M,y,e.globalScale)}),y.restore();function O(M){var j=g(M);if(!j){M.__controlPoints=null;return}var G=M.source,$=M.target;if(!(!G||!$||!G.hasOwnProperty("x")||!$.hasOwnProperty("x"))){var z=Math.sqrt(Math.pow($.x-G.x,2)+Math.pow($.y-G.y,2));if(z>0){var K=Math.atan2($.y-G.y,$.x-G.x),W=z*j,D={x:(G.x+$.x)/2+W*Math.cos(K-Math.PI/2),y:(G.y+$.y)/2+W*Math.sin(K-Math.PI/2)};M.__controlPoints=[D.x,D.y]}else{var U=j*70;M.__controlPoints=[$.x,$.y-U,$.x+U,$.y]}}}}function o(){var h=1.6,u=.2,f=Ne(e.linkDirectionalArrowLength),p=Ne(e.linkDirectionalArrowRelPos),g=Ne(e.linkVisibility),b=Ne(e.linkDirectionalArrowColor||e.linkColor),y=Ne(e.nodeVal),v=e.ctx;v.save(),e.graphData.links.filter(g).forEach(function(C){var _=f(C);if(!(!_||_<0)){var w=C.source,T=C.target;if(!(!w||!T||!w.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var B=Math.sqrt(Math.max(0,y(w)||1))*e.nodeRelSize,E=Math.sqrt(Math.max(0,y(T)||1))*e.nodeRelSize,N=Math.min(1,Math.max(0,p(C))),O=b(C)||"rgba(0,0,0,0.28)",M=_/h/2,j=C.__controlPoints&&bB(Ke,[w.x,w.y].concat(xn(C.__controlPoints),[T.x,T.y])),G=j?function(R){return j.get(R)}:function(R){return{x:w.x+(T.x-w.x)*R||0,y:w.y+(T.y-w.y)*R||0}},$=j?j.length():Math.sqrt(Math.pow(T.x-w.x,2)+Math.pow(T.y-w.y,2)),z=B+_+($-B-E-_)*N,K=G(z/$),W=G((z-_)/$),D=G((z-_*(1-u))/$),U=Math.atan2(K.y-W.y,K.x-W.x)-Math.PI/2;v.beginPath(),v.moveTo(K.x,K.y),v.lineTo(W.x+M*Math.cos(U),W.y+M*Math.sin(U)),v.lineTo(D.x,D.y),v.lineTo(W.x-M*Math.cos(U),W.y-M*Math.sin(U)),v.fillStyle=O,v.fill()}}}),v.restore()}function c(){var h=Ne(e.linkDirectionalParticles),u=Ne(e.linkDirectionalParticleSpeed),f=Ne(e.linkDirectionalParticleOffset),p=Ne(e.linkDirectionalParticleWidth),g=Ne(e.linkVisibility),b=Ne(e.linkDirectionalParticleColor||e.linkColor),y=e.ctx;y.save(),e.graphData.links.filter(g).forEach(function(v){var C=h(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var _=v.source,w=v.target;if(!(!_||!w||!_.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var T=u(v),B=Math.abs(f(v)),E=v.__photons||[],N=Math.max(0,p(v)/2)/Math.sqrt(e.globalScale),O=b(v)||"rgba(0,0,0,0.28)";y.fillStyle=O;var M=v.__controlPoints?bB(Ke,[_.x,_.y].concat(xn(v.__controlPoints),[w.x,w.y])):null,j=0,G=!1;E.forEach(function($){var z=!!$.__singleHop;if($.hasOwnProperty("__progressRatio")||($.__progressRatio=z?T<0?1:0:(j+B)/C),!z&&j++,$.__progressRatio+=T,$.__progressRatio>=1||$.__progressRatio<0)if(!z)$.__progressRatio=$.__progressRatio%1,$.__progressRatio<0&&$.__progressRatio++;else{G=!0;return}var K=$.__progressRatio,W=M?M.get(K):{x:_.x+(w.x-_.x)*K||0,y:_.y+(w.y-_.y)*K||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(W.x,W.y,v,y,e.globalScale):(y.beginPath(),y.arc(W.x,W.y,N,0,2*Math.PI,!1),y.fill())}),G&&(v.__photons=v.__photons.filter(function($){return!$.__singleHop||$.__progressRatio<=1&&$.__progressRatio>=0}))}}}),y.restore()}},emitParticle:function(e,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Ltt().force("link",_tt()).force("charge",Ntt()).force("center",zJ()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,r){r.ctx=e},update:function(e,r){e.engineRunning=!1,e.onUpdate(),e.nodeAutoColorBy!==null&&CB(e.graphData.nodes,Ne(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&CB(e.graphData.links,Ne(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach(function(b){b.source=b[e.linkSource],b.target=b[e.linkTarget]}),e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var n=e.forceLayout.force("link");n&&n.id(function(b){return b[e.nodeId]}).links(e.graphData.links);var a=e.dagMode&&pet(e.graphData,function(b){return b[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),o=Math.max.apply(Math,xn(Object.values(a||[]))),c=e.dagLevelDistance||e.graphData.nodes.length/(o||1)*get*(["radialin","radialout"].indexOf(e.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var h=["lr","rl"].includes(r.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(b){return delete b[h]})}if(["lr","rl","td","bu"].includes(e.dagMode)){var u=["rl","bu"].includes(e.dagMode),f=function(y){return(a[y[e.nodeId]]-o/2)*c*(u?-1:1)},p=["lr","rl"].includes(e.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(b){return b[p]=f(b)})}e.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(e.dagMode)!==-1?jtt(function(b){var y=a[b[e.nodeId]]||-1;return(e.dagMode==="radialin"?o-y:y)*c}).strength(function(b){return e.dagNodeFilter(b)?1:0}):null);for(var g=0;g<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);g++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function Xj(i,e){var r=i instanceof Array?i:[i],n=new e;return n._destructor&&n._destructor(),{linkProp:function(o){return{default:n[o](),onChange:function(h,u){r.forEach(function(f){return u[f][o](h)})},triggerUpdate:!1}},linkMethod:function(o){return function(c){for(var h=arguments.length,u=new Array(h>1?h-1:0),f=1;f<h;f++)u[f-1]=arguments[f];var p=[];return r.forEach(function(g){var b=c[g],y=b[o].apply(b,u);y!==b&&p.push(y)}),p.length?p[0]:this}}}}var met=800,yet=4,xet=5,Qj=Xj("forceGraph",Ig),bet=Xj(["forceGraph","shadowGraph"],Ig),vet=Object.assign.apply(Object,xn(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(i){return wf({},i,Qj.linkProp(i))})).concat(xn(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(i){return wf({},i,bet.linkProp(i))})))),Cet=Object.assign.apply(Object,xn(["d3Force","d3ReheatSimulation","emitParticle"].map(function(i){return wf({},i,Qj.linkMethod(i))})));function bx(i){if(i.canvas){var e=i.canvas.width,r=i.canvas.height;e===300&&r===150&&(e=r=0);var n=window.devicePixelRatio;e/=n,r/=n,[i.canvas,i.shadowCanvas].forEach(function(o){o.style.width="".concat(i.width,"px"),o.style.height="".concat(i.height,"px"),o.width=i.width*n,o.height=i.height*n,!e&&!r&&o.getContext("2d").scale(n,n)});var a=pa(i.canvas).k;i.zoom.translateBy(i.zoom.__baseElem,(i.width-e)/2/a,(i.height-r)/2/a),i.needsRedraw=!0}}function Zj(i){var e=window.devicePixelRatio;i.setTransform(e,0,0,e,0,0)}function _B(i,e,r){i.save(),Zj(i),i.clearRect(0,0,e,r),i.restore()}var ket=I1({props:wc({width:{default:window.innerWidth,onChange:function(e,r){return bx(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,r){return bx(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,r){[e.nodes,e.links].every(function(a){return(a||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach(n),r.forceGraph.graphData(e),r.shadowGraph.graphData(e);function n(a){var o=a.type,c=a.objs;c.filter(function(h){if(!h.hasOwnProperty("__indexColor"))return!0;var u=r.colorTracker.lookup(h.__indexColor);return!u||!u.hasOwnProperty("d")||u.d!==h}).forEach(function(h){h.__indexColor=r.colorTracker.register({type:o,d:h})})}},triggerUpdate:!1},backgroundColor:{onChange:function(e,r){r.canvas&&e&&(r.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,r){r.shadowGraph.nodeCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,r){r.shadowGraph.linkCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,r){r.zoom.scaleExtent([e,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},vet),aliases:{stopAnimation:"pauseAnimation"},methods:wc({graph2ScreenCoords:function(e,r,n){var a=pa(e.canvas);return{x:r*a.k+a.x,y:n*a.k+a.y}},screen2GraphCoords:function(e,r,n){var a=pa(e.canvas);return{x:(r-a.x)/a.k,y:(n-a.y)/a.k}},centerAt:function(e,r,n,a){if(!e.canvas)return null;if(r!==void 0||n!==void 0){var o=Object.assign({},r!==void 0?{x:r}:{},n!==void 0?{y:n}:{});return a?e.tweenGroup.add(new YT(c()).to(o,a).easing(yl.Quadratic.Out).onUpdate(h).onComplete(function(){e.tweenGroup.remove(this)}).start()):h(o),this}return c();function c(){var u=pa(e.canvas);return{x:(e.width/2-u.x)/u.k,y:(e.height/2-u.y)/u.k}}function h(u){var f=u.x,p=u.y;e.zoom.translateTo(e.zoom.__baseElem,f===void 0?c().x:f,p===void 0?c().y:p),e.needsRedraw=!0}},zoom:function(e,r,n){if(!e.canvas)return null;if(r!==void 0)return n?e.tweenGroup.add(new YT({k:a()}).to({k:r},n).easing(yl.Quadratic.Out).onUpdate(function(c){var h=c.k;return o(h)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):o(r),this;return a();function a(){return pa(e.canvas).k}function o(c){e.zoom.scaleTo(e.zoom.__baseElem,c),e.needsRedraw=!0}},zoomToFit:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length,o=new Array(a>3?a-3:0),c=3;c<a;c++)o[c-3]=arguments[c];var h=this.getGraphBbox.apply(this,o);if(h){var u={x:(h.x[0]+h.x[1])/2,y:(h.y[0]+h.y[1])/2},f=Math.max(1e-12,Math.min(1e12,(e.width-n*2)/(h.x[1]-h.x[0]),(e.height-n*2)/(h.y[1]-h.y[0])));this.centerAt(u.x,u.y,r),this.zoom(f,r)}return this},getGraphBbox:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},n=Ne(e.nodeVal),a=function(h){return Math.sqrt(Math.max(0,n(h)||1))*e.nodeRelSize},o=e.graphData.nodes.filter(r).map(function(c){return{x:c.x,y:c.y,r:a(c)}});return o.length?{x:[Lw(o,function(c){return c.x-c.r}),Mw(o,function(c){return c.x+c.r})],y:[Lw(o,function(c){return c.y-c.r}),Mw(o,function(c){return c.y+c.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Cet),stateInit:function(){return{lastSetZoom:1,zoom:b9(),forceGraph:new Ig,shadowGraph:new Ig().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new mJ,tweenGroup:new Sj}},init:function(e,r){var n=this;e.innerHTML="";var a=document.createElement("div");a.classList.add("force-graph-container"),a.style.position="relative",e.appendChild(a),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),a.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var o=r.canvas.getContext("2d"),c=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),h={x:-1e12,y:-1e12},u=function(){var g=null,b=window.devicePixelRatio,y=h.x>0&&h.y>0?c.getImageData(h.x*b,h.y*b,1,1):null;return y&&(g=r.colorTracker.lookup(y.data)),g};Xt(r.canvas).call(X$().subject(function(){if(!r.enableNodeDrag)return null;var p=u();return p&&p.type==="Node"?p.d:null}).on("start",function(p){var g=p.subject;g.__initialDragPos={x:g.x,y:g.y,fx:g.fx,fy:g.fy},p.active||(g.fx=g.x,g.fy=g.y),r.canvas.classList.add("grabbable")}).on("drag",function(p){var g=p.subject,b=g.__initialDragPos,y=p,v=pa(r.canvas).k,C={x:b.x+(y.x-b.x)/v-g.x,y:b.y+(y.y-b.y)/v-g.y};["x","y"].forEach(function(_){return g["f".concat(_)]=g[_]=b[_]+(y[_]-b[_])/v}),!(!g.__dragged&&xet>=Math.sqrt(o8(["x","y"].map(function(_){return Math.pow(p[_]-b[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,g.__dragged=!0,r.onNodeDrag(g,C))}).on("end",function(p){var g=p.subject,b=g.__initialDragPos,y={x:g.x-b.x,y:g.y-b.y};b.fx===void 0&&(g.fx=void 0),b.fy===void 0&&(g.fy=void 0),delete g.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,g.__dragged&&(delete g.__dragged,r.onNodeDragEnd(g,y))})),r.zoom(r.zoom.__baseElem=Xt(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(p){return!p.button&&r.enableZoomPanInteraction&&(p.type!=="wheel"||Ne(r.enableZoomInteraction)(p))&&(p.type==="wheel"||Ne(r.enablePanInteraction)(p))}).on("zoom",function(p){var g=p.transform;[o,c].forEach(function(b){Zj(b),b.translate(g.x,g.y),b.scale(g.k,g.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(wc(wc({},g),n.centerAt())),r.needsRedraw=!0}).on("end",function(p){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(wc(wc({},p.transform),n.centerAt()))}),bx(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){pa(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=yet/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new $J(a),["pointermove","pointerdown"].forEach(function(p){return a.addEventListener(p,function(g){p==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=g),!r.isPointerDragging&&g.type==="pointermove"&&r.onBackgroundClick&&(g.pressure>0||r.isPointerPressed)&&(g.pointerType==="mouse"||g.movementX===void 0||[g.movementX,g.movementY].some(function(v){return Math.abs(v)>1}))&&(r.isPointerDragging=!0);var b=y(a);h.x=g.pageX-b.left,h.y=g.pageY-b.top;function y(v){var C=v.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,w=window.pageYOffset||document.documentElement.scrollTop;return{top:C.top+w,left:C.left+_}}},{passive:!0})}),a.addEventListener("pointerup",function(p){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var g=[p,r.pointerDownEvent];requestAnimationFrame(function(){if(p.button===0)if(r.hoverObj){var b=r["on".concat(r.hoverObj.type,"Click")];b&&b.apply(void 0,[r.hoverObj.d].concat(g))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,g);if(p.button===2)if(r.hoverObj){var y=r["on".concat(r.hoverObj.type,"RightClick")];y&&y.apply(void 0,[r.hoverObj.d].concat(g))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,g)})}},{passive:!0}),a.addEventListener("contextmenu",function(p){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(p.preventDefault(),!1)}),r.forceGraph(o),r.shadowGraph(c);var f=_K(function(){_B(c,r.width,r.height),r.shadowGraph.linkWidth(function(g){return Ne(r.linkWidth)(g)+r.linkHoverPrecision});var p=pa(r.canvas);r.shadowGraph.globalScale(p.k).tickFrame()},met);r.flushShadowCanvas=f.flush,(this._animationCycle=function p(){var g=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(B){return B.__photons&&B.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var b=r.isPointerDragging?null:u();if(b!==r.hoverObj){var y=r.hoverObj,v=y?y.type:null,C=b?b.type:null;if(v&&v!==C){var _=r["on".concat(v,"Hover")];_&&_(null,y.d)}if(C){var w=r["on".concat(C,"Hover")];w&&w(b.d,v===C?y.d:null)}r.tooltip.content(b&&Ne(r["".concat(b.type.toLowerCase(),"Label")])(b.d)||null),r.canvas.classList[(b&&r["on".concat(C,"Click")]||!b&&r.onBackgroundClick)&&Ne(r.showPointerCursor)(b==null?void 0:b.d)?"add":"remove"]("clickable"),r.hoverObj=b}g&&f()}if(g){_B(o,r.width,r.height);var T=pa(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(o,T),r.forceGraph.globalScale(T).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(o,T)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(p)})()},update:function(e){}}),vx={exports:{}},Cx,wB;function _et(){if(wB)return Cx;wB=1;var i="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Cx=i,Cx}var kx,SB;function wet(){if(SB)return kx;SB=1;var i=_et();function e(){}function r(){}return r.resetWarningCache=e,kx=function(){function n(c,h,u,f,p,g){if(g!==i){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}n.isRequired=n;function a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:e};return o.PropTypes=o,o},kx}var TB;function Tet(){return TB||(TB=1,vx.exports=wet()()),vx.exports}var Bet=Tet();const it=qg(Bet),xm={width:it.number,height:it.number,graphData:it.shape({nodes:it.arrayOf(it.object).isRequired,links:it.arrayOf(it.object).isRequired}),backgroundColor:it.string,nodeRelSize:it.number,nodeId:it.string,nodeLabel:it.oneOfType([it.string,it.func]),nodeVal:it.oneOfType([it.number,it.string,it.func]),nodeVisibility:it.oneOfType([it.bool,it.string,it.func]),nodeColor:it.oneOfType([it.string,it.func]),nodeAutoColorBy:it.oneOfType([it.string,it.func]),onNodeHover:it.func,onNodeClick:it.func,linkSource:it.string,linkTarget:it.string,linkLabel:it.oneOfType([it.string,it.func]),linkVisibility:it.oneOfType([it.bool,it.string,it.func]),linkColor:it.oneOfType([it.string,it.func]),linkAutoColorBy:it.oneOfType([it.string,it.func]),linkWidth:it.oneOfType([it.number,it.string,it.func]),linkCurvature:it.oneOfType([it.number,it.string,it.func]),linkDirectionalArrowLength:it.oneOfType([it.number,it.string,it.func]),linkDirectionalArrowColor:it.oneOfType([it.string,it.func]),linkDirectionalArrowRelPos:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticles:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticleSpeed:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticleOffset:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticleWidth:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticleColor:it.oneOfType([it.string,it.func]),onLinkHover:it.func,onLinkClick:it.func,dagMode:it.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:it.number,dagNodeFilter:it.func,onDagError:it.func,d3AlphaMin:it.number,d3AlphaDecay:it.number,d3VelocityDecay:it.number,warmupTicks:it.number,cooldownTicks:it.number,cooldownTime:it.number,onEngineTick:it.func,onEngineStop:it.func,getGraphBbox:it.func},Kj={zoomToFit:it.func,onNodeRightClick:it.func,onNodeDrag:it.func,onNodeDragEnd:it.func,onLinkRightClick:it.func,linkHoverPrecision:it.number,onBackgroundClick:it.func,onBackgroundRightClick:it.func,showPointerCursor:it.oneOfType([it.bool,it.func]),enablePointerInteraction:it.bool,enableNodeDrag:it.bool},X1={showNavInfo:it.bool,nodeOpacity:it.number,nodeResolution:it.number,nodeThreeObject:it.oneOfType([it.object,it.string,it.func]),nodeThreeObjectExtend:it.oneOfType([it.bool,it.string,it.func]),nodePositionUpdate:it.func,linkOpacity:it.number,linkResolution:it.number,linkCurveRotation:it.oneOfType([it.number,it.string,it.func]),linkMaterial:it.oneOfType([it.object,it.string,it.func]),linkThreeObject:it.oneOfType([it.object,it.string,it.func]),linkThreeObjectExtend:it.oneOfType([it.bool,it.string,it.func]),linkPositionUpdate:it.func,linkDirectionalArrowResolution:it.number,linkDirectionalParticleResolution:it.number,linkDirectionalParticleThreeObject:it.oneOfType([it.object,it.string,it.func]),forceEngine:it.oneOf(["d3","ngraph"]),ngraphPhysics:it.object,numDimensions:it.oneOf([1,2,3])},Aet=Object.assign({},xm,Kj,{linkLineDash:it.oneOfType([it.arrayOf(it.number),it.string,it.func]),nodeCanvasObjectMode:it.oneOfType([it.string,it.func]),nodeCanvasObject:it.func,nodePointerAreaPaint:it.func,linkCanvasObjectMode:it.oneOfType([it.string,it.func]),linkCanvasObject:it.func,linkPointerAreaPaint:it.func,linkDirectionalParticleCanvasObject:it.func,autoPauseRedraw:it.bool,minZoom:it.number,maxZoom:it.number,enableZoomInteraction:it.oneOfType([it.bool,it.func]),enablePanInteraction:it.oneOfType([it.bool,it.func]),onZoom:it.func,onZoomEnd:it.func,onRenderFramePre:it.func,onRenderFramePost:it.func});Object.assign({},xm,Kj,X1,{enableNavigationControls:it.bool,controlType:it.oneOf(["trackball","orbit","fly"]),rendererConfig:it.object,extraRenderers:it.arrayOf(it.shape({render:it.func.isRequired}))});Object.assign({},xm,X1,{nodeDesc:it.oneOfType([it.string,it.func]),linkDesc:it.oneOfType([it.string,it.func])});Object.assign({},xm,X1,{markerAttrs:it.object,yOffset:it.number,glScale:it.number});const Q1=lK(ket,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Q1.displayName="ForceGraph2D";Q1.propTypes=Aet;function Eet(){return zi({queryKey:["graph"],queryFn:()=>qe.get("/graph"),staleTime:3e4})}const _x="dreamcontext:";function Met(i,e){const{projectId:r}=yA(),n=r?`${_x}${r}:${i}`:`${_x}${i}`,[a,o]=X.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(r){const u=`${_x}${i}`,f=localStorage.getItem(u);if(f!==null)return localStorage.setItem(n,f),localStorage.removeItem(u),JSON.parse(f)}}catch{}return e}),c=X.useCallback(h=>{o(u=>{const f=typeof h=="function"?h(u):h;try{localStorage.setItem(n,JSON.stringify(f))}catch{}return f})},[n]);return[a,c]}const BB={filters:{search:"",showTags:!0,showOrphans:!0,showAttachments:!1,existingFilesOnly:!1},groups:[],display:{view:"2d",arrows:!1,textFadeThreshold:.85,nodeSize:.5,linkThickness:.5},forces:{centerStrength:.7,repelStrength:.35,linkStrength:.9,linkDistance:.35}};function Let(i){return{centerStrength:.05+i.centerStrength*.45,repelStrength:-(30+i.repelStrength*240),linkStrength:.1+i.linkStrength*1.2,linkDistance:20+i.linkDistance*180}}function Net(){const[i,e]=Met("brain:settings:v1",BB),r=X.useCallback((o,c)=>{e(h=>({...h,[o]:{...h[o],...c}}))},[e]),n=X.useCallback(o=>{e(c=>({...c,groups:o}))},[e]),a=X.useCallback(()=>{e(BB)},[e]);return{settings:i,patch:r,setGroups:n,reset:a}}function jet(i){const e=[];let r=0;for(;r<i.length;){const n=i[r];if(/\s/.test(n)){r++;continue}if(n==="("){e.push({type:"LPAREN"}),r++;continue}if(n===")"){e.push({type:"RPAREN"}),r++;continue}if(n==="-"&&r+1<i.length&&!/\s/.test(i[r+1])){e.push({type:"NOT"}),r++;continue}if(n==='"'){let h=r+1,u="";for(;h<i.length&&i[h]!=='"';)i[h]==="\\"&&h+1<i.length?(u+=i[h+1],h+=2):(u+=i[h],h++);e.push({type:"PHRASE",value:u}),r=h+1;continue}if(n==="/"){let h=r+1,u="";for(;h<i.length&&i[h]!=="/";)i[h]==="\\"&&h+1<i.length?(u+=i[h]+i[h+1],h+=2):(u+=i[h],h++);if(h<i.length){e.push({type:"REGEX",value:u}),r=h+1;continue}}let a=r;for(;a<i.length&&!/[\s()]/.test(i[a])&&i[a]!=='"';)a++;const o=i.slice(r,a),c=o.match(/^(tag|path|file|content):(.*)$/i);c?e.push({type:"OP",value:c[1].toLowerCase(),arg:c[2]}):o.toUpperCase()==="OR"?e.push({type:"OR"}):o.toUpperCase()==="AND"||o.length>0&&e.push({type:"WORD",value:o}),r=a}return e}class Oet{constructor(e){Ht(this,"pos",0);this.tokens=e}parse(){return this.parseOr()}parseOr(){var r;let e=this.parseAnd();for(;((r=this.peek())==null?void 0:r.type)==="OR";){this.pos++;const n=this.parseAnd();e.type==="or"?e.children.push(n):e={type:"or",children:[e,n]}}return e}parseAnd(){var r,n;const e=[];for(;this.pos<this.tokens.length&&((r=this.peek())==null?void 0:r.type)!=="RPAREN"&&((n=this.peek())==null?void 0:n.type)!=="OR";){const a=this.parseTerm();a&&e.push(a)}return e.length===0?{type:"and",children:[]}:e.length===1?e[0]:{type:"and",children:e}}parseTerm(){var a;const e=this.peek();if(!e)return null;let r=!1;e.type==="NOT"&&(r=!0,this.pos++);const n=this.peek();if(!n)return null;if(n.type==="LPAREN"){this.pos++;const o=this.parseOr();return((a=this.peek())==null?void 0:a.type)==="RPAREN"&&this.pos++,r?Jj(o):o}if(n.type==="WORD")return this.pos++,{type:"word",value:n.value.toLowerCase(),negated:r};if(n.type==="PHRASE")return this.pos++,{type:"phrase",value:n.value.toLowerCase(),negated:r};if(n.type==="REGEX"){this.pos++;try{return{type:"regex",value:new RegExp(n.value,"i"),negated:r}}catch{return null}}return n.type==="OP"?(this.pos++,{type:"op",op:n.value,arg:n.arg.toLowerCase(),negated:r}):(this.pos++,null)}peek(){return this.tokens[this.pos]}}function Jj(i){return i.type==="and"||i.type==="or"?{...i,children:i.children.map(Jj)}:{...i,negated:!i.negated}}function AB(i){const e=i.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const r=jet(e),n=new Oet(r).parse();return{match:a=>dv(n,a),raw:e,isEmpty:!1}}function dv(i,e){switch(i.type){case"and":return i.children.every(r=>dv(r,e));case"or":return i.children.some(r=>dv(r,e));case"word":return Tp(EB(e,i.value),i.negated);case"phrase":return Tp(EB(e,i.value),i.negated);case"regex":return Tp(Ret(e,i.value),i.negated);case"op":return Tp(Det(e,i.op,i.arg),i.negated)}}function Tp(i,e){return e?!i:i}function tO(i){return[i.label,i.path,i.id,i.meta.description??"",...i.meta.tags??[]].join(" ").toLowerCase()}function EB(i,e){return tO(i).includes(e)}function Ret(i,e){return e.test(tO(i))}function Det(i,e,r){var a;const n=r.toLowerCase();switch(e){case"path":return i.path.toLowerCase().includes(n);case"file":return(((a=i.path.split("/").pop())==null?void 0:a.toLowerCase())??i.label.toLowerCase()).includes(n);case"tag":{const o=n.replace(/^#/,"");return(i.meta.tags??[]).some(c=>c.toLowerCase()===o)||i.group==="tag"&&i.label.toLowerCase().replace(/^#/,"")===o}case"content":return(i.meta.description??"").toLowerCase().includes(n);default:return!1}}const Bp={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},wx=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function Fet({settings:i,patch:e,setGroups:r,reset:n,onClose:a}){const[o,c]=X.useState({filters:!0,groups:!0,display:!0,forces:!0}),h=u=>c(f=>({...f,[u]:!f[u]}));return x.jsxs("aside",{className:"brain-settings",children:[x.jsxs("div",{className:"brain-settings-header",children:[x.jsx("span",{className:"brain-settings-title",children:"Graph settings"}),x.jsxs("div",{className:"brain-settings-header-actions",children:[x.jsx("button",{className:"brain-settings-mini-btn",onClick:n,title:"Restore default settings",children:"↻"}),x.jsx("button",{className:"brain-settings-mini-btn",onClick:a,title:"Close",children:"×"})]})]}),x.jsxs("div",{className:"brain-settings-body",children:[x.jsxs(Ap,{label:Bp.filters,open:o.filters,onToggle:()=>h("filters"),children:[x.jsx("label",{className:"brain-settings-label",children:"Search files"}),x.jsx("input",{type:"search",className:"brain-settings-input",placeholder:"Search…",value:i.filters.search,onChange:u=>e("filters",{search:u.target.value})}),x.jsxs("p",{className:"brain-settings-hint",children:["Operators: ",x.jsx("code",{children:"tag:"})," ",x.jsx("code",{children:"path:"})," ",x.jsx("code",{children:"file:"})," ",x.jsx("code",{children:"-not"})," ",x.jsx("code",{children:"OR"})," ",x.jsx("code",{children:'"phrase"'})," ",x.jsx("code",{children:"/regex/"})]}),x.jsx(ju,{label:"Tags",checked:i.filters.showTags,onChange:u=>e("filters",{showTags:u})}),x.jsx(ju,{label:"Attachments",checked:i.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),x.jsx(ju,{label:"Existing files only",checked:i.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),x.jsx(ju,{label:"Orphans",checked:i.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),x.jsx(Ap,{label:Bp.groups,open:o.groups,onToggle:()=>h("groups"),children:x.jsx(zet,{groups:i.groups,onChange:r})}),x.jsxs(Ap,{label:Bp.display,open:o.display,onToggle:()=>h("display"),children:[x.jsx($et,{label:"View",value:i.display.view==="3d"?"3d":"2d",options:[{value:"2d",label:"2D"},{value:"3d",label:"3D"}],onChange:u=>e("display",{view:u})}),x.jsx(ju,{label:"Arrows",checked:i.display.arrows,onChange:u=>e("display",{arrows:u})}),x.jsx(Zo,{label:"Text fade threshold",value:i.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),x.jsx(Zo,{label:"Node size",value:i.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),x.jsx(Zo,{label:"Link thickness",value:i.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),x.jsxs(Ap,{label:Bp.forces,open:o.forces,onToggle:()=>h("forces"),children:[x.jsx(Zo,{label:"Center force",value:i.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),x.jsx(Zo,{label:"Repel force",value:i.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),x.jsx(Zo,{label:"Link force",value:i.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),x.jsx(Zo,{label:"Link distance",value:i.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function Ap({label:i,open:e,onToggle:r,children:n}){return x.jsxs("div",{className:`brain-section ${e?"brain-section--open":""}`,children:[x.jsxs("button",{className:"brain-section-header",onClick:r,type:"button",children:[x.jsx("span",{className:"brain-section-caret",children:e?"▾":"▸"}),x.jsx("span",{children:i})]}),e&&x.jsx("div",{className:"brain-section-body",children:n})]})}function ju({label:i,checked:e,onChange:r}){return x.jsxs("label",{className:"brain-toggle-row",children:[x.jsx("span",{children:i}),x.jsx("span",{className:`brain-toggle ${e?"brain-toggle--on":""}`,onClick:()=>r(!e),children:x.jsx("span",{className:"brain-toggle-knob"})})]})}function $et({label:i,value:e,options:r,onChange:n}){return x.jsxs("div",{className:"brain-segmented-row",children:[x.jsx("span",{className:"brain-segmented-label",children:i}),x.jsx("div",{className:"brain-segmented",role:"tablist",children:r.map(a=>x.jsx("button",{type:"button",role:"tab","aria-selected":e===a.value,className:`brain-segmented-btn ${e===a.value?"brain-segmented-btn--active":""}`,onClick:()=>n(a.value),children:a.label},a.value))})]})}function Zo({label:i,value:e,onChange:r}){return x.jsxs("label",{className:"brain-slider-row",children:[x.jsx("span",{className:"brain-slider-label-text",children:i}),x.jsx("input",{type:"range",min:0,max:1,step:.01,value:e,onChange:n=>r(parseFloat(n.target.value))})]})}function zet({groups:i,onChange:e}){const[r,n]=X.useState(""),[a,o]=X.useState(null),c=()=>{const f=r.trim();if(!f)return;const p=`grp_${Math.random().toString(36).slice(2,8)}`;e([...i,{id:p,query:f,color:wx[i.length%wx.length]}]),n("")},h=(f,p)=>{e(i.map(g=>g.id===f?{...g,...p}:g))},u=f=>e(i.filter(p=>p.id!==f));return x.jsxs(x.Fragment,{children:[i.length===0&&x.jsxs("p",{className:"brain-settings-hint",children:["Color nodes that match a query. First matching group wins. Example:"," ",x.jsx("code",{children:"tag:#architecture"})]}),x.jsx("div",{className:"brain-groups-list",children:i.map(f=>x.jsxs("div",{className:"brain-group-row",children:[x.jsx("button",{className:"brain-group-color",style:{background:f.color},onClick:()=>o(a===f.id?null:f.id),title:"Pick color"}),x.jsx("input",{className:"brain-settings-input brain-group-input",value:f.query,onChange:p=>h(f.id,{query:p.target.value})}),x.jsx("button",{className:"brain-settings-mini-btn",onClick:()=>u(f.id),title:"Remove group",children:"×"}),a===f.id&&x.jsx("div",{className:"brain-swatch-picker",children:wx.map(p=>x.jsx("button",{className:"brain-swatch",style:{background:p},onClick:()=>{h(f.id,{color:p}),o(null)}},p))})]},f.id))}),x.jsxs("div",{className:"brain-group-add",children:[x.jsx("input",{className:"brain-settings-input",placeholder:"New group query…",value:r,onChange:f=>n(f.target.value),onKeyDown:f=>{f.key==="Enter"&&c()}}),x.jsx("button",{className:"brain-settings-btn",onClick:c,disabled:!r.trim(),children:"New group"})]})]})}function Iet(i){return zi({queryKey:["graph","content",(i==null?void 0:i.path)??null],queryFn:()=>{if(!i||!i.path)throw new Error("No path for node");return qe.get(`/graph/content?path=${encodeURIComponent(i.path)}`)},enabled:!!(i&&i.path),staleTime:3e4})}const MB={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},qet={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},Pet={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function Het(i){return i==="task"?"tasks":i==="feature"?"features":i==="knowledge"?"knowledge":i==="soul"||i==="user"||i==="memory"||i==="core"?"core":null}function Uet({node:i,onClose:e,onSelectRelated:r,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(i!=null&&i.path),u=Iet(h?i:null);if(!i)return x.jsx("aside",{className:"brain-drawer"});const f=Het(i.group),p=u.data;return x.jsxs("aside",{className:"brain-drawer brain-drawer--open",children:[x.jsx("button",{className:"brain-drawer-close",onClick:e,"aria-label":"Close",children:"×"}),x.jsxs("div",{className:"brain-drawer-header",children:[x.jsxs("span",{className:"brain-drawer-group-badge",children:[x.jsx("span",{className:"brain-related-dot",style:{background:MB[i.group]}}),qet[i.group]]}),x.jsx("h2",{className:"brain-drawer-title",children:i.label}),i.path&&x.jsx("span",{className:"brain-drawer-id",children:i.path})]}),x.jsxs("div",{className:"brain-drawer-body",children:[h&&u.isLoading&&x.jsx("p",{className:"brain-description",children:"Loading…"}),h&&u.error&&x.jsxs("p",{className:"brain-description",children:["Failed to load file: ",String(u.error)]}),(p==null?void 0:p.type)==="markdown"&&x.jsx(Pf,{content:p.content,frontmatter:p.frontmatter}),(p==null?void 0:p.type)==="json"&&x.jsx("pre",{className:"brain-codeblock",children:p.data!==void 0?JSON.stringify(p.data,null,2):p.raw??"(empty)"}),(p==null?void 0:p.type)==="text"&&x.jsx("pre",{className:"brain-codeblock",children:p.content}),!h&&i.group==="tag"&&x.jsxs("p",{className:"brain-description",children:["Tag ",x.jsxs("code",{children:["#",i.label.replace(/^#/,"")]})," — ",n.length," ",n.length===1?"file":"files"," reference this tag."]}),!h&&i.group!=="tag"&&x.jsx("p",{className:"brain-description",children:i.meta.description??"No file content."}),n.length>0&&x.jsxs("section",{className:"brain-drawer-section",children:[x.jsxs("h3",{className:"brain-drawer-section-title",children:["Connections (",n.length,") · in ",a," · total ",o]}),x.jsx("div",{className:"brain-related-list",children:n.map(({node:g,kind:b})=>x.jsxs("button",{className:"brain-related-item",onClick:()=>r(g.id),children:[x.jsx("span",{className:"brain-related-dot",style:{background:MB[g.group]}}),x.jsx("span",{children:g.label}),x.jsx("span",{className:"brain-related-kind",children:Pet[b]??b})]},`${g.id}-${b}`))})]})]}),f&&c&&x.jsx("div",{className:"brain-drawer-footer",children:x.jsxs("button",{className:"brain-btn",onClick:()=>c(f,i.id),children:["Open in ",f.charAt(0).toUpperCase()+f.slice(1)," to edit →"]})})]})}const Wet=X.lazy(()=>Ce(()=>import("./BrainCanvas3D-LLqVeXtb.js"),[]).then(i=>({default:i.BrainCanvas3D}))),Get={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Yet={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function LB(i){return typeof i=="string"?i:i.id}function eO(i){const e=i.group==="soul"?8:i.group==="user"||i.group==="memory"?6:i.group==="tag"?3:4,r=i.__inDegree??0;return e+Math.min(14,r*1.2)}function NB(i,e){return Math.sqrt(eO(i)*e)*3}function Vet(i,e,r){for(const{group:n,parsed:a}of e)if(a.match(i))return n.color;return r[i.group]}function Xet({onNavigate:i}){const{data:e,isLoading:r,error:n}=Eet(),a=Kr(),{settings:o,patch:c,setGroups:h,reset:u}=Net(),{resolved:f}=Pg(),p=f==="dark",g=p?Get:Yet,b=X.useRef(null),y=X.useRef(void 0),[v,C]=X.useState({w:0,h:0}),[_,w]=X.useState(null),[T,B]=X.useState(null),[E,N]=X.useState(!0),O=X.useRef(!1);X.useEffect(()=>{if(!b.current)return;const at=b.current,Ct=()=>C({w:at.clientWidth,h:at.clientHeight});Ct();const gt=new ResizeObserver(Ct);return gt.observe(at),()=>gt.disconnect()},[]);const M=X.useMemo(()=>AB(o.filters.search),[o.filters.search]),j=X.useMemo(()=>o.groups.map(at=>({group:at,parsed:AB(at.query)})).filter(({parsed:at})=>!at.isEmpty),[o.groups]),{filteredData:G,neighborsById:$,totalDegreeById:z,inDegreeById:K}=X.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const at=new Map,Ct=new Map;for(const Et of e.nodes)at.set(Et.id,0),Ct.set(Et.id,0);for(const Et of e.links){const Vt=typeof Et.source=="string"?Et.source:Et.source.id,Se=typeof Et.target=="string"?Et.target:Et.target.id;at.set(Se,(at.get(Se)??0)+1),Ct.set(Vt,(Ct.get(Vt)??0)+1),Ct.set(Se,(Ct.get(Se)??0)+1)}const gt=Et=>(Ct.get(Et)??0)===0,Bt=[],Wt=new Set;for(const Et of e.nodes){if(!o.filters.showTags&&Et.group==="tag"||!o.filters.showOrphans&&gt(Et.id)||!M.isEmpty&&!M.match(Et))continue;const Vt={...Et};Vt.__inDegree=at.get(Et.id)??0,Vt.__totalDegree=Ct.get(Et.id)??0,Vt.__color=Vet(Et,j,g),Bt.push(Vt),Wt.add(Et.id)}const Yt=[],Zt=new Map;for(const Et of Bt)Zt.set(Et.id,new Set);for(const Et of e.links){const Vt=typeof Et.source=="string"?Et.source:Et.source.id,Se=typeof Et.target=="string"?Et.target:Et.target.id;!Wt.has(Vt)||!Wt.has(Se)||(Yt.push({source:Vt,target:Se,kind:Et.kind}),Zt.get(Vt).add(Se),Zt.get(Se).add(Vt))}return{filteredData:{nodes:Bt,links:Yt},neighborsById:Zt,totalDegreeById:Ct,inDegreeById:at}},[e,o.filters,M,j]),W=X.useMemo(()=>Let(o.forces),[o.forces]),D=.4+o.display.nodeSize*2.2;X.useEffect(()=>{var Wt,Yt,Zt,Et,Vt,Se,ni,Ii,ue;const at=y.current;if(!at)return;const Ct=(Wt=at.d3Force)==null?void 0:Wt.call(at,"charge");Ct!=null&&Ct.strength&&Ct.strength(W.repelStrength),Ct!=null&&Ct.distanceMax&&Ct.distanceMax(420);const gt=(Yt=at.d3Force)==null?void 0:Yt.call(at,"link");gt&&((Zt=gt.strength)==null||Zt.call(gt,W.linkStrength),(Et=gt.distance)==null||Et.call(gt,W.linkDistance));const Bt=(Vt=at.d3Force)==null?void 0:Vt.call(at,"center");Bt!=null&&Bt.strength&&Bt.strength(W.centerStrength),(Se=at.d3Force)==null||Se.call(at,"collide",Ctt().radius(ke=>NB(ke,D)+4).strength(.9).iterations(2)),(ni=at.d3Force)==null||ni.call(at,"x",Ott(0).strength(W.centerStrength*.4)),(Ii=at.d3Force)==null||Ii.call(at,"y",Rtt(0).strength(W.centerStrength*.4)),(ue=at.d3ReheatSimulation)==null||ue.call(at)},[W,D,G]),X.useEffect(()=>{O.current=!1},[e==null?void 0:e.nodes.length]),X.useEffect(()=>{if(!e||!G.nodes.length)return;const at=[];return[800,1600,2600].forEach(Ct=>{at.push(setTimeout(()=>{var Bt;if(O.current)return;const gt=y.current;gt&&((Bt=gt.zoomToFit)==null||Bt.call(gt,500,80),Ct>=2600&&(O.current=!0))},Ct))}),()=>at.forEach(clearTimeout)},[e,G.nodes.length]);const U=X.useMemo(()=>G.nodes.find(at=>at.id===_)??null,[G,_]),R=X.useMemo(()=>{if(!U||!e)return[];const at=[],Ct=new Map(e.nodes.map(gt=>[gt.id,gt]));for(const gt of e.links){const Bt=typeof gt.source=="string"?gt.source:gt.source.id,Wt=typeof gt.target=="string"?gt.target:gt.target.id;if(Bt===U.id){const Yt=Ct.get(Wt);Yt&&at.push({node:Yt,kind:gt.kind})}else if(Wt===U.id){const Yt=Ct.get(Bt);Yt&&at.push({node:Yt,kind:gt.kind})}}return at},[e,U]),I=at=>{w(at.id);const Ct=y.current;Ct&&typeof at.x=="number"&&typeof at.y=="number"&&(Ct.centerAt(at.x,at.y,400),Ct.zoom(Math.max(Ct.zoom(),2.2),400))},P=()=>a.invalidateQueries({queryKey:["graph"]});X.useEffect(()=>{const at=Ct=>{var Wt;if((Wt=Ct.target)!=null&&Wt.matches("input,textarea"))return;const gt=y.current;if(!gt)return;const Bt=gt.zoom();if(Ct.key==="+"||Ct.key==="=")gt.zoom(Bt*1.2,200);else if(Ct.key==="-"||Ct.key==="_")gt.zoom(Bt/1.2,200);else if(Ct.key.startsWith("Arrow")){const Yt=Ct.shiftKey?120:40,Zt=gt.centerAt();let Et=0,Vt=0;Ct.key==="ArrowUp"?Vt=-Yt:Ct.key==="ArrowDown"?Vt=Yt:Ct.key==="ArrowLeft"?Et=-Yt:Ct.key==="ArrowRight"&&(Et=Yt),gt.centerAt(((Zt==null?void 0:Zt.x)??0)+Et/Bt,((Zt==null?void 0:Zt.y)??0)+Vt/Bt,150)}};return window.addEventListener("keydown",at),()=>window.removeEventListener("keydown",at)},[]);const V=T??_,J=V?$.get(V)??new Set:null,H=at=>!V||at===V?!1:!(J!=null&&J.has(at)),tt=at=>{const Ct=at.__color??g[at.group];return H(at.id)?Qet(Ct,p?.18:.3):Ct},ot=at=>{const Ct=LB(at.source),gt=LB(at.target);return V?Ct===V||gt===V?p?"rgba(220, 225, 240, 0.85)":"rgba(30, 35, 50, 0.85)":p?"rgba(140, 150, 170, 0.07)":"rgba(60, 65, 80, 0.06)":p?"rgba(140, 150, 170, 0.35)":"rgba(60, 65, 80, 0.28)"},st=.5+o.display.linkThickness*2.5,bt=at=>at.kind==="sibling_core"||at.kind==="release_includes"?st*1.3:st,kt=at=>eO(at)*D,Lt=(1-o.display.textFadeThreshold)*.8;return x.jsxs("div",{className:"brain-page",children:[x.jsxs("header",{className:"brain-header",children:[x.jsxs("h1",{className:"brain-title",children:[x.jsx("span",{className:"brain-title-mark",children:"◉"}),"Brain"]}),e&&x.jsxs("span",{className:"brain-stats",children:[G.nodes.length,"/",e.nodes.length," nodes · ",G.links.length," links"]}),x.jsxs("div",{className:"brain-header-actions",children:[x.jsx("button",{className:"brain-btn",onClick:P,title:"Refresh",children:"↻"}),x.jsx("button",{className:`brain-btn ${E?"brain-btn--active":""}`,onClick:()=>N(at=>!at),title:"Graph settings",children:"⚙"})]})]}),x.jsxs("div",{className:"brain-canvas-wrap",ref:b,onPointerLeave:()=>B(null),onPointerDown:()=>B(null),children:[E&&x.jsx(Fet,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>N(!1)}),r&&x.jsx("div",{className:"brain-loading",children:"Loading brain…"}),n&&x.jsxs("div",{className:"brain-empty",children:["Failed to load graph: ",String(n)]}),e&&G.nodes.length===0&&!r&&x.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&G.nodes.length>0&&v.w>0&&o.display.view!=="3d"&&x.jsx(Q1,{ref:y,graphData:G,width:v.w,height:v.h,backgroundColor:p?"#151518":"#ffffff",nodeId:"id",nodeLabel:at=>at.label,nodeColor:at=>tt(at),nodeVal:at=>kt(at),nodeRelSize:3,linkColor:at=>ot(at),linkWidth:at=>bt(at),linkDirectionalArrowLength:at=>o.display.arrows?3.5:0,linkDirectionalArrowRelPos:.94,linkDirectionalArrowColor:()=>p?"rgba(180, 185, 200, 0.6)":"rgba(60, 65, 80, 0.55)",onNodeClick:at=>I(at),onNodeHover:at=>B(at?at.id:null),onNodeDrag:()=>B(null),onZoom:()=>B(null),onBackgroundClick:()=>{w(null),B(null)},onEngineStop:()=>{var Ct;if(O.current)return;const at=y.current;at&&((Ct=at.zoomToFit)==null||Ct.call(at,600,80),O.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(at,Ct,gt)=>{if(!(at.id===T||at.id===_||V&&(J==null?void 0:J.has(at.id)))&&gt<Lt)return;const Wt=at.label,Yt=Math.max(10,13/Math.max(gt,.7));Ct.font=`${Yt}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,Ct.textAlign="center",Ct.textBaseline="top";const Zt=NB(at,D),Et=(at.y??0)+Zt+3,Vt=H(at.id);p?Ct.fillStyle=Vt?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":Ct.fillStyle=Vt?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",Ct.fillText(Wt,at.x??0,Et)}}),e&&G.nodes.length>0&&v.w>0&&o.display.view==="3d"&&x.jsx(X.Suspense,{fallback:x.jsx("div",{className:"brain-loading",children:"Loading 3D engine…"}),children:x.jsx(Wet,{graphData:G,width:v.w,height:v.h,isDark:p,nodeColor:tt,nodeVal:kt,linkColor:ot,linkWidth:bt,showArrows:o.display.arrows,forces:W,nodeSizeScale:D,isDimmed:H,neighborsById:$,onNodeClick:I,onNodeHover:at=>B(at?at.id:null),onBackgroundClick:()=>{w(null),B(null)}})}),x.jsx(Uet,{node:U,onClose:()=>w(null),onSelectRelated:at=>w(at),relatedNodes:R,inDegree:U?K.get(U.id)??0:0,totalDegree:U?z.get(U.id)??0:0,onNavigate:i})]})]})}function Qet(i,e){const r=i.replace("#",""),n=parseInt(r,16),a=n>>16&255,o=n>>8&255,c=n&255;return`rgba(${a}, ${o}, ${c}, ${e})`}function Zet(){return zi({queryKey:["council"],queryFn:()=>qe.get("/council"),select:i=>i.debates})}function Ket(i){return zi({queryKey:["council",i],queryFn:()=>qe.get(`/council/${i}`),select:e=>e.debate,enabled:!!i})}function iO(i){if(!i)return null;const e=i.split(`
474
+ `)[0].trim();if(!e)return null;const n=e.replace(/^(recommend(?:ed|ing)?|i\s+(?:would\s+)?recommend|proposal|my\s+position|conclusion|verdict)\s*[:\-—]?\s*/i,"").replace(/\.$/,"").split(/\s+/).slice(0,3).join(" ");return(n.length>18?n.slice(0,17).trimEnd()+"…":n).toUpperCase()}function Jet(i){if(!i)return"other";const e=i.toLowerCase();return/\b(go\b|ship|launch|proceed|approve|yes|adopt|migrate\b)/.test(e)?"go":/\b(defer|postpone|delay|wait|later|q[2-9]|next\s+(?:quarter|year))/.test(e)?"defer":/\b(no-go|no\b|reject|abandon|stop|cancel|block)/.test(e)?"hold":/\b(pivot|phased|poc|proof.?of.?concept|pilot|partial|subset|scope\s+down)/.test(e)?"pivot":"other"}function rO(i,e){return i.rounds.find(r=>r.round===e)??null}function nO(i){if(!i.reactions)return 0;const e=(i.reactions.match(/\*\*[a-z][a-z0-9-]+\*\*/g)??[]).length;return e>0?e:(i.reactions.match(/^####\s+/gm)??[]).length}function tit(i,e){if(!i.reactions)return[];const r=new Set(e),n=[],a=/\*\*([a-z][a-z0-9-]+)\*\*/g;let o;for(;(o=a.exec(i.reactions))!==null;)r.has(o[1])&&!n.includes(o[1])&&n.push(o[1]);return n}function eit(i){return i.openQuestions?(i.openQuestions.match(/^\s*[-*\d]/gm)??[]).length:0}function iit(i){const e=i.frontmatter.rounds_planned||i.personas.reduce((c,h)=>Math.max(c,...h.rounds.map(u=>u.round),0),0),r=i.personas.length,n=i.personas.reduce((c,h)=>c+h.rounds.reduce((u,f)=>u+nO(f),0),0);let a=0,o=0;if(i.finalReport){const c=i.finalReport.content,h=c.match(/##\s+Open\s+risks\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);h&&(a=(h[1].match(/^\s*[-*]/gm)??[]).length);const u=c.match(/##\s+Minority\s+views\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);if(u){const f=u[1].trim();f.length>0&&!/\(none\)|n\/?a/i.test(f)&&(o=Math.max(1,(f.match(/^\s*[-*]/gm)??[]).length))}}return{rounds:e,personas:r,pushbacks:n,openRisks:a,minorityViews:o}}function rit(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return e%360}const jB=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function nit(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return jB[e%jB.length]}function ait(i){const e=(i||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function sit(i){const e={verdict:"",appendix:null,sections:[]},r=/^##\s+(.+?)\s*\n([\s\S]*?)(?=^##\s+|\Z)/gim;let n;for(;(n=r.exec(i))!==null;){const a=n[1].trim(),o=n[2].trim();if(!e.verdict&&/^verdict\b/i.test(a)){e.verdict=o;continue}if(/^appendix\b/i.test(a)){e.appendix||(e.appendix={heading:a,body:o});continue}e.sections.push({heading:a,body:o})}return e}function Wf({slug:i,size:e=36,title:r,onClick:n}){const a=rit(i),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=nit(i);return x.jsx("span",{className:"council-avatar",onClick:n,title:r??i,style:{width:e,height:e,fontSize:e*.45,background:o,cursor:n?"pointer":"default"},"aria-label":i,children:c})}const oit=[{value:"all",label:"All"},{value:"in_progress",label:"In progress"},{value:"synthesizing",label:"Synthesizing"},{value:"complete",label:"Complete"},{value:"promoted",label:"Promoted"}];function lit(i,e,r){var a;if(r!=="all"&&(r==="in_progress"&&!i.status.endsWith("_running")||r==="synthesizing"&&i.status!=="synthesizing"||r==="complete"&&i.status!=="complete"||r==="promoted"&&!i.promoted_to_knowledge))return!1;if(!e.trim())return!0;const n=e.trim().toLowerCase();return!!((i.topic||"").toLowerCase().includes(n)||i.id.toLowerCase().includes(n)||(a=i.personaSlugs)!=null&&a.some(o=>o.toLowerCase().includes(n)))}function cit(i){return i==="complete"?"council-hall-status--complete":i==="synthesizing"?"council-hall-status--synth":i.endsWith("_running")?"council-hall-status--running":"council-hall-status--pending"}function hit(i){return i==="complete"?"Complete":i==="synthesizing"?"Synthesizing":i.endsWith("_running")?"In progress":"Pending"}function uit({debates:i,onOpen:e}){const{t:r}=oi(),[n,a]=X.useState(""),[o,c]=X.useState("all"),h=X.useMemo(()=>i.filter(u=>lit(u,n,o)),[i,n,o]);return x.jsxs("div",{className:"council-hall",children:[x.jsxs("div",{className:"council-hall-bar",children:[x.jsxs("label",{className:"council-hall-search",children:[x.jsx("span",{"aria-hidden":!0,children:"🔍"}),x.jsx("input",{type:"search",value:n,onChange:u=>a(u.target.value),placeholder:r("council.search.placeholder")})]}),x.jsx("select",{className:"council-hall-filter",value:o,onChange:u=>c(u.target.value),"aria-label":r("council.filter.status"),children:oit.map(u=>x.jsx("option",{value:u.value,children:u.label},u.value))}),x.jsxs("span",{className:"council-hall-count",children:[h.length," / ",i.length]})]}),h.length===0?x.jsx("div",{className:"council-empty",children:r("council.empty.list")}):x.jsx("div",{className:"council-hall-grid",children:h.map(u=>x.jsxs("button",{type:"button",className:"council-hall-card",onClick:()=>e(u.id),children:[x.jsxs("div",{className:"council-hall-card-head",children:[x.jsxs("span",{className:`council-hall-status ${cit(u.status)}`,children:[x.jsx("span",{className:"council-hall-status-dot"}),hit(u.status)]}),x.jsxs("span",{className:"council-hall-rounds",children:["R",u.current_round,"/",u.rounds_planned]})]}),x.jsx("h3",{className:"council-hall-topic",children:u.topic||u.id}),x.jsxs("div",{className:"council-hall-foot",children:[u.personaSlugs&&u.personaSlugs.length>0&&x.jsxs("div",{className:"council-hall-avatars","aria-label":`${u.personaSlugs.length} personas`,children:[u.personaSlugs.slice(0,6).map((f,p)=>x.jsx("span",{className:"council-hall-avatar-wrap",style:{zIndex:10-p},children:x.jsx(Wf,{slug:f,size:20})},f)),u.personaSlugs.length>6&&x.jsxs("span",{className:"council-hall-avatar-more",children:["+",u.personaSlugs.length-6]})]}),x.jsx("span",{className:"council-hall-date",children:u.updated_at||u.created_at}),u.promoted_to_knowledge&&x.jsx("span",{className:"council-hall-promoted",title:"Promoted to knowledge",children:"📜"})]})]},u.id))})]})}function fit(i){var e,r;if(i==="complete")return{label:"Complete",tone:"complete"};if(i==="synthesizing")return{label:"Synthesizing",tone:"synth"};if(/_running$/.test(i)){const n=(e=i.match(/^round_(\d+)_running$/))==null?void 0:e[1];return{label:n?`Round ${n} running`:"Running",tone:"running"}}if(/_complete$/.test(i)){const n=(r=i.match(/^round_(\d+)_complete$/))==null?void 0:r[1];return{label:n?`Round ${n} done`:"Round done",tone:"pending"}}return i==="created"?{label:"Created",tone:"pending"}:{label:i,tone:"pending"}}function dit({status:i,size:e="md"}){const{label:r,tone:n}=fit(i);return x.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[x.jsx("span",{className:"council-status-dot"}),r]})}function Ou({value:i,label:e,tone:r="default"}){return x.jsxs("div",{className:`council-stat-tile council-stat-tile--${r}`,children:[x.jsx("div",{className:"council-stat-value",children:i}),x.jsx("div",{className:"council-stat-label",children:e})]})}function pit({debate:i,onCiteJump:e,onAgentJump:r}){const{t:n}=oi(),a=X.useMemo(()=>iit(i),[i]),o=i.finalReport?sit(i.finalReport.content):null,c=i.personas.map(u=>u.slug),h=u=>{const f=u.toLowerCase();return/\b(risk|danger|warning|caveat)/.test(f)?"council-ov-card--risks":/\b(minority|dissent|objection)/.test(f)?"council-ov-card--minority":/^why\b/.test(f)?"council-ov-card--why":""};return x.jsxs("div",{className:"council-ov",children:[x.jsxs("section",{className:"council-ov-problem",children:[x.jsx("div",{className:"council-ov-label",children:"Problem"}),x.jsx("h2",{className:"council-ov-topic",children:i.frontmatter.topic||i.frontmatter.id}),i.frontmatter.promoted_to_knowledge&&x.jsxs("div",{className:"council-ov-promoted",children:[x.jsx("span",{children:"📜"}),x.jsxs("span",{children:["Promoted to knowledge: ",x.jsx("code",{children:i.frontmatter.promoted_to_knowledge})]})]})]}),!o&&x.jsxs("section",{className:"council-ov-pending",children:[x.jsx("div",{className:"council-ov-label",children:n("council.verdict.awaitingSynthesis")}),x.jsx("p",{children:n("council.verdict.synthPending")}),i.roundLog&&x.jsxs("div",{className:"council-roundlog",children:[x.jsx("h4",{children:"Round log"}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:ae.parse(i.roundLog)}})]})]}),o&&x.jsxs(x.Fragment,{children:[x.jsxs("section",{className:"council-ov-verdict",children:[x.jsx("div",{className:"council-ov-label",children:"Verdict"}),x.jsx("div",{className:"council-ov-verdict-text",dangerouslySetInnerHTML:{__html:ae.parse(o.verdict||"*No verdict section found.*")}})]}),x.jsxs("div",{className:"council-ov-stats",children:[x.jsx(Ou,{value:a.rounds,label:"rounds"}),x.jsx(Ou,{value:a.personas,label:"personas"}),x.jsx(Ou,{value:a.pushbacks,label:"pushbacks"}),x.jsx(Ou,{value:a.openRisks,label:"open risks",tone:"warning"}),x.jsx(Ou,{value:a.minorityViews,label:"dissent",tone:"dissent"})]}),o.sections.length>0&&x.jsx("div",{className:"council-ov-sections",children:o.sections.map(u=>x.jsxs("section",{className:`council-ov-card ${h(u.heading)}`,children:[x.jsx("h3",{children:u.heading}),x.jsx(git,{text:u.body,knownSlugs:c,onCiteJump:e,onAgentJump:r})]},u.heading))}),o.appendix&&x.jsxs("details",{className:"council-ov-appendix",children:[x.jsx("summary",{children:o.appendix.heading}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:ae.parse(o.appendix.body)}})]})]})]})}function git({text:i,knownSlugs:e,onCiteJump:r,onAgentJump:n}){const a=[],o=new Set(e);let c=i.replace(/([a-z][a-z0-9-]+)\s+in\s+R(\d+)/g,(b,y,v)=>{if(!o.has(y))return b;const C=a.length;return a.push({slug:y,round:Number(v)}),`\0CITE${C}\0`});const h=[];c=c.replace(/\*\*([a-z][a-z0-9-]+)\*\*/g,(b,y)=>{if(!o.has(y))return b;const v=h.length;return h.push(y),`\0AGENT${v}\0`});const f=ae.parse(c).split(/\u0000(CITE|AGENT)(\d+)\u0000/),p=[];let g=0;for(;g<f.length;){const b=f[g];if(g+2<f.length&&(f[g+1]==="CITE"||f[g+1]==="AGENT")){p.push(x.jsx("span",{dangerouslySetInnerHTML:{__html:b}},`h-${g}`));const y=f[g+1],v=Number(f[g+2]);if(y==="CITE"){const C=a[v];p.push(x.jsxs("button",{type:"button",className:"council-cite-chip",onClick:()=>r(C.slug,C.round),children:[x.jsx(Wf,{slug:C.slug,size:14}),x.jsx("span",{children:C.slug}),x.jsxs("span",{className:"council-cite-round",children:["R",C.round]})]},`c-${g}`))}else{const C=h[v];p.push(x.jsx("button",{type:"button",className:"council-inline-slug",onClick:()=>n(C),children:C},`a-${g}`))}g+=3}else p.push(x.jsx("span",{dangerouslySetInnerHTML:{__html:b}},`h-${g}`)),g+=1}return x.jsx("div",{className:"council-sheet-prose council-citation-prose",children:p})}function aO({model:i}){const e=ait(i),r=i?i.charAt(0).toUpperCase()+i.slice(1):"unknown";return x.jsx("span",{className:"council-model-badge",style:{background:`hsl(${e} 85% 55% / 0.14)`,color:`hsl(${e} 85% 40%)`,borderColor:`hsl(${e} 85% 55% / 0.35)`},title:`Model: ${r}`,children:r})}function mit(i,e){if(!e.trim())return!0;const r=e.trim().toLowerCase();if(i.slug.toLowerCase().includes(r))return!0;for(const n of i.rounds)if([n.executiveSummary,n.position,n.reasoning,n.reactions,n.openQuestions].filter(Boolean).join(`
475
+ `).toLowerCase().includes(r))return!0;return!1}function Z1(i,e){if(!e.trim())return i;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return i.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function yit({debate:i,focusSlug:e}){const{t:r}=oi(),[n,a]=X.useState(""),[o,c]=X.useState(()=>new Set),h=X.useRef(null),u=X.useMemo(()=>i.personas.filter(p=>mit(p,n)),[i.personas,n]);X.useEffect(()=>{if(!e)return;c(g=>{const b=new Set(g);return b.delete(e),b});const p=setTimeout(()=>{var b;const g=(b=h.current)==null?void 0:b.querySelector(`[data-agent="${e}"]`);g==null||g.scrollIntoView({behavior:"smooth",block:"start"})},30);return()=>clearTimeout(p)},[e]);const f=p=>{c(g=>{const b=new Set(g);return b.has(p)?b.delete(p):b.add(p),b})};return x.jsxs("div",{className:"council-transcript",ref:h,children:[x.jsxs("div",{className:"council-transcript-searchbar",children:[x.jsxs("label",{className:"council-transcript-search",children:[x.jsx("span",{"aria-hidden":!0,children:"🔍"}),x.jsx("input",{type:"search",value:n,onChange:p=>a(p.target.value),placeholder:r("council.search.transcript")})]}),x.jsxs("span",{className:"council-transcript-count",children:[u.length," of ",i.personas.length," persona",i.personas.length===1?"":"s"]})]}),x.jsxs("div",{className:"council-transcript-body",children:[u.length===0&&x.jsx("div",{className:"council-empty",children:"No personas match this search."}),u.map(p=>x.jsx(xit,{persona:p,query:n,collapsed:o.has(p.slug),highlighted:e===p.slug,onToggle:()=>f(p.slug)},p.slug))]})]})}function xit({persona:i,query:e,collapsed:r,highlighted:n,onToggle:a}){return x.jsxs("article",{className:`council-transcript-block ${n?"is-highlighted":""}`,"data-agent":i.slug,children:[x.jsxs("header",{className:"council-transcript-block-head",onClick:a,children:[x.jsxs("div",{className:"council-transcript-block-title",children:[x.jsx(Wf,{slug:i.slug,size:24}),x.jsxs("div",{children:[x.jsx("h3",{className:"council-transcript-block-name",children:i.slug}),x.jsxs("div",{className:"council-transcript-block-meta",children:[x.jsx(aO,{model:i.frontmatter.model}),i.frontmatter.aspects.slice(0,4).map(o=>x.jsx("span",{className:"council-aspect",children:o},o))]})]})]}),x.jsx("span",{className:`council-transcript-chev ${r?"":"is-open"}`,"aria-hidden":!0,children:"▸"})]}),!r&&x.jsxs("div",{className:"council-transcript-block-body",children:[i.persona&&x.jsxs("section",{className:"council-sheet-section",children:[x.jsx("h4",{children:"Persona prompt"}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Z1(ae.parse(i.persona),e)}})]}),i.rounds.length===0&&x.jsx("div",{className:"council-sheet-empty",children:"No rounds submitted."}),i.rounds.slice().sort((o,c)=>c.round-o.round).map(o=>x.jsx(bit,{round:o,crossContext:i.crossContext[o.round]??null,query:e},o.round)),i.researches.length>0&&x.jsxs("section",{className:"council-sheet-section",children:[x.jsx("h4",{children:"Research notes"}),x.jsx("ul",{className:"council-research-list",children:i.researches.map(o=>x.jsxs("li",{children:[x.jsx("span",{className:"council-research-topic",children:o.topic}),x.jsx("span",{className:"council-research-date",children:o.added_at})]},o.slug))})]})]})]})}function bit({round:i,crossContext:e,query:r}){const n=iO(i.position);return x.jsxs("section",{className:"council-round-panel",children:[x.jsxs("header",{className:"council-round-panel-head",children:[x.jsxs("h4",{className:"council-round-panel-title",children:["Round ",i.round]}),n&&x.jsx("span",{className:"council-chip-pos",children:n})]}),e&&x.jsxs("blockquote",{className:"council-crosscontext",children:[x.jsx("strong",{children:"Cross-context loaded"}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Z1(ae.parse(e),r)}})]}),i.executiveSummary&&x.jsx(Ru,{title:"Executive summary",body:i.executiveSummary,query:r}),i.position&&x.jsx(Ru,{title:"Position",body:i.position,query:r}),i.reasoning&&x.jsx(Ru,{title:"Reasoning",body:i.reasoning,query:r}),i.reactions&&x.jsx(Ru,{title:"Reactions to peers",body:i.reactions,query:r}),i.openQuestions&&x.jsx(Ru,{title:"Open questions",body:i.openQuestions,query:r})]})}function Ru({title:i,body:e,query:r}){const n=Z1(ae.parse(e),r);return x.jsxs("div",{className:"council-round-sub",children:[x.jsx("h5",{className:"council-round-sub-title",children:i}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:n}})]})}function sO(i,e){return e.trim()?i?[i.executiveSummary,i.position,i.reasoning].filter(Boolean).join(`
476
+ `).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function vit({debate:i,query:e,onQueryChange:r,selected:n,onSelectCell:a,onClearSelection:o}){const c=X.useRef(null),h=X.useMemo(()=>Array.from({length:Math.max(1,i.frontmatter.rounds_planned)},(p,g)=>g+1),[i.frontmatter.rounds_planned]),u=X.useMemo(()=>i.personas.map(p=>p.slug),[i.personas]),f=X.useMemo(()=>{if(!e.trim())return null;let p=0;for(const g of i.personas)for(const b of h)sO(rO(g,b),e)&&p++;return p},[e,i,h]);return X.useEffect(()=>{if(!n)return;const p=g=>{const b=g.target;if(b&&["INPUT","TEXTAREA"].includes(b.tagName))return;if(g.key==="Escape"){o();return}const y=i.personas.findIndex(C=>C.slug===n.slug);if(y===-1)return;const v=i.frontmatter.rounds_planned;g.key==="ArrowRight"&&n.round<v?(g.preventDefault(),a(n.slug,n.round+1)):g.key==="ArrowLeft"&&n.round>1?(g.preventDefault(),a(n.slug,n.round-1)):g.key==="ArrowDown"&&y<i.personas.length-1?(g.preventDefault(),a(i.personas[y+1].slug,n.round)):g.key==="ArrowUp"&&y>0&&(g.preventDefault(),a(i.personas[y-1].slug,n.round))};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n,i,o,a]),X.useEffect(()=>{if(!n||!c.current)return;const p=c.current.querySelector(`[data-persona="${n.slug}"][data-round="${n.round}"]`);p==null||p.scrollIntoView({behavior:"smooth",block:"center"})},[n]),x.jsxs("div",{className:"council-matrix",children:[x.jsxs("div",{className:"council-matrix-bar",children:[x.jsxs("label",{className:"council-matrix-search-input",children:[x.jsx("span",{className:"council-matrix-search-icon","aria-hidden":!0,children:"🔍"}),x.jsx("input",{type:"search",value:e,onChange:p=>r(p.target.value),placeholder:"Filter cells by text…"}),e&&x.jsx("button",{type:"button",className:"council-matrix-search-clear",onClick:()=>r(""),children:"×"})]}),f!=null&&x.jsxs("span",{className:"council-matrix-count",children:[f," match",f===1?"":"es"]})]}),x.jsx("div",{className:"council-matrix-scroll",ref:c,children:x.jsxs("div",{className:"council-matrix-grid",style:{gridTemplateColumns:`180px repeat(${h.length}, minmax(220px, 1fr))`},children:[x.jsx("div",{className:"council-matrix-corner","aria-hidden":!0}),h.map(p=>{const g=i.frontmatter.status===`round_${p}_running`,b=i.frontmatter.current_round>=p&&!g;return x.jsxs("div",{className:`council-round-head ${g?"is-running":""} ${b?"is-done":""}`,children:["Round ",p]},`h-${p}`)}),i.personas.map(p=>x.jsx(Cit,{persona:p,rounds:h,debate:i,query:e,selected:n,knownSlugs:u,onSelectCell:a},p.slug))]})})]})}function Cit({persona:i,rounds:e,debate:r,query:n,selected:a,knownSlugs:o,onSelectCell:c}){return x.jsxs(x.Fragment,{children:[x.jsxs("aside",{className:"council-matrix-row-head",children:[x.jsx(Wf,{slug:i.slug,size:22}),x.jsxs("div",{className:"council-matrix-row-id",children:[x.jsx("div",{className:"council-matrix-row-name",children:i.slug}),x.jsx(aO,{model:i.frontmatter.model})]})]}),e.map(h=>{const u=rO(i,h),f=r.frontmatter.status===`round_${h}_running`,p=!!a&&a.slug===i.slug&&a.round===h,g=sO(u,n),b=!!n.trim()&&!g;return x.jsx(kit,{personaSlug:i.slug,round:h,data:u,isRunning:f,active:p,dimmed:b,knownSlugs:o,onSelect:c},h)})]})}function kit({personaSlug:i,round:e,data:r,isRunning:n,active:a,dimmed:o,knownSlugs:c,onSelect:h}){if(!r)return x.jsx("div",{className:`council-cell council-cell--empty ${n?"council-cell--pending":""} ${o?"is-dimmed":""}`,"data-persona":i,"data-round":e,children:x.jsx("span",{className:"council-cell-empty-label",children:n?"awaiting…":"— silent —"})});const u=iO(r.position),f=Jet(r.position),p=nO(r),g=eit(r),b=tit(r,c);return x.jsxs("button",{type:"button",className:`council-cell council-cell--${f} ${a?"is-active":""} ${o?"is-dimmed":""}`,"data-persona":i,"data-round":e,onClick:()=>h(i,e),children:[x.jsxs("div",{className:"council-cell-top",children:[u&&x.jsx("span",{className:`council-chip-pos council-chip-pos--${f}`,children:u}),(p>0||g>0)&&x.jsxs("span",{className:"council-cell-meta",children:[p>0&&x.jsxs(x.Fragment,{children:["↯ ",p]}),p>0&&g>0&&x.jsx("span",{children:" · "}),g>0&&x.jsxs(x.Fragment,{children:["? ",g]})]})]}),!a&&r.executiveSummary&&x.jsx("p",{className:"council-cell-exec",children:r.executiveSummary}),a&&x.jsxs("div",{className:"council-cell-full",children:[r.executiveSummary&&x.jsx(Du,{title:"Executive summary",children:x.jsx("p",{children:r.executiveSummary})}),r.position&&x.jsx(Du,{title:"Position",children:x.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(r.position)}})}),r.reasoning&&x.jsx(Du,{title:"Reasoning",children:x.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(r.reasoning)}})}),r.reactions&&x.jsxs(Du,{title:"Reactions to peers",children:[x.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(r.reactions)}}),b.length>0&&x.jsx("div",{className:"council-cell-react-chips",children:b.map(y=>x.jsxs("span",{className:"council-cell-react-chip",children:[x.jsx(Wf,{slug:y,size:14}),x.jsx("span",{children:y})]},y))})]}),r.openQuestions&&x.jsx(Du,{title:"Open questions",children:x.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(r.openQuestions)}})})]})]})}function Du({title:i,children:e}){return x.jsxs("section",{className:"council-cell-sub",children:[x.jsx("h5",{children:i}),x.jsx("div",{className:"council-cell-sub-body",children:e})]})}function OB(i){return i==="complete"||i==="synthesizing"?"overview":"matrix"}function _it({debate:i,onBack:e}){const{t:r}=oi(),[n,a]=X.useState(()=>OB(i.frontmatter.status)),[o,c]=X.useState(""),[h,u]=X.useState(null),[f,p]=X.useState(null);X.useEffect(()=>{a(OB(i.frontmatter.status)),c(""),u(null),p(null)},[i.frontmatter.id]);const g=(v,C)=>{a("matrix"),u({slug:v,round:C})},b=v=>{a("agents"),p(v)},y=()=>{var v;return(v=navigator.clipboard)==null?void 0:v.writeText(i.frontmatter.id).catch(()=>{})};return x.jsxs("div",{className:"council-detail",children:[x.jsxs("header",{className:"council-detail-head",children:[x.jsxs("button",{type:"button",className:"council-detail-back",onClick:e,children:["← ",r("council.title")]}),x.jsxs("div",{className:"council-detail-meta",children:[x.jsx(dit,{status:i.frontmatter.status}),x.jsxs("span",{className:"council-detail-rounds",children:["R",i.frontmatter.current_round,"/",i.frontmatter.rounds_planned]}),x.jsx("span",{className:"council-session-dot",children:"·"}),x.jsx("span",{className:"council-detail-date",children:i.frontmatter.created_at}),x.jsx("span",{className:"council-session-dot",children:"·"}),x.jsx("button",{type:"button",className:"council-session-id",onClick:y,title:"Copy debate id",children:i.frontmatter.id})]})]}),x.jsxs("nav",{className:"council-tabs",role:"tablist",children:[x.jsx(Sx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),x.jsx(Sx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),x.jsx(Sx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),x.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&x.jsx(pit,{debate:i,onCiteJump:g,onAgentJump:b}),n==="agents"&&x.jsx(yit,{debate:i,focusSlug:f}),n==="matrix"&&x.jsx(vit,{debate:i,query:o,onQueryChange:c,selected:h,onSelectCell:(v,C)=>u({slug:v,round:C}),onClearSelection:()=>u(null)})]})]})}function Sx({active:i,onClick:e,label:r}){return x.jsx("button",{type:"button",role:"tab","aria-selected":i,className:`council-tab ${i?"is-active":""}`,onClick:e,children:r})}function wit(){const{t:i}=oi(),{data:e,isLoading:r,isError:n,error:a}=Zet(),[o,c]=X.useState(null),{data:h,isLoading:u}=Ket(o);return r?x.jsx("div",{className:"loading",children:i("common.loading")}):n?x.jsxs("div",{className:"error-state",children:["Failed to load council sessions. ",a==null?void 0:a.message]}):o?x.jsxs("div",{className:"council-page council-page--detail",children:[u&&x.jsx("div",{className:"loading",children:"Loading session…"}),h&&x.jsx(_it,{debate:h,onBack:()=>c(null)})]}):x.jsxs("div",{className:"council-page",children:[x.jsx("h1",{className:"page-title",children:i("council.title")}),x.jsx(uit,{debates:e??[],onOpen:c})]})}function Sit(){return zi({queryKey:["config"],queryFn:()=>qe.get("/config"),select:i=>i.config})}function Tit(){const i=Kr();return Ta({mutationFn:e=>qe.patch("/config",e),onSuccess:()=>{i.invalidateQueries({queryKey:["config"]})}})}const Bit=[{id:"claude",labelKey:"settings.platform.claude"},{id:"codex",labelKey:"settings.platform.codex"}],Tx={platforms:[],disableNativeMemory:!0};function Ait(){const{t:i}=oi(),{data:e,isLoading:r,isError:n}=Sit(),a=Tit(),[o,c]=X.useState(Tx.platforms),[h,u]=X.useState(Tx.disableNativeMemory),[f,p]=X.useState(!1),[g,b]=X.useState(!1);if(X.useEffect(()=>{const _=e??Tx;c(_.platforms),u(_.disableNativeMemory??!0),p(!1),b(!1)},[e]),r)return x.jsx("div",{className:"loading",children:i("common.loading")});if(n)return x.jsx("div",{className:"error-state",children:i("common.error")});const y=_=>{c(w=>{const T=w.includes(_)?w.filter(B=>B!==_):[...w,_];return p(!0),b(!1),T})},v=()=>{u(_=>!_),p(!0),b(!1)},C=()=>{a.mutate({platforms:o,disableNativeMemory:h},{onSuccess:()=>{p(!1),b(!0)}})};return x.jsxs("div",{className:"settings-page",children:[x.jsxs("div",{className:"settings-header",children:[x.jsx("h1",{className:"page-title",children:i("settings.title")}),x.jsxs("div",{className:"settings-save-row",children:[g&&!f&&x.jsx("span",{className:"settings-saved",children:i("settings.saved")}),a.isError&&x.jsx("span",{className:"settings-error",children:i("common.error")}),x.jsx("button",{className:"btn btn--primary",onClick:C,disabled:!f||a.isPending,children:a.isPending?i("settings.saving"):i("settings.save")})]})]}),e===null&&x.jsx("div",{className:"settings-empty-notice",children:i("settings.no_config")}),x.jsxs("section",{className:"settings-section",children:[x.jsx("h2",{className:"settings-section-title",children:i("settings.platforms")}),x.jsx("div",{className:"settings-checkboxes",children:Bit.map(({id:_,labelKey:w})=>x.jsxs("label",{className:"settings-checkbox-label",children:[x.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:o.includes(_),onChange:()=>y(_)}),x.jsx("span",{children:i(w)})]},_))})]}),x.jsxs("section",{className:"settings-section",children:[x.jsx("h2",{className:"settings-section-title",children:i("settings.memory")}),x.jsxs("div",{className:"settings-checkboxes",children:[x.jsxs("label",{className:"settings-checkbox-label",children:[x.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:h,onChange:v}),x.jsx("span",{children:i("settings.native_memory.label")})]}),x.jsx("p",{className:"settings-field-hint",children:i("settings.native_memory.hint")})]})]})]})}function oO(){return zi({queryKey:["packs"],queryFn:()=>qe.get("/packs")})}function Eit(){const i=Kr();return Ta({mutationFn:e=>qe.post(`/packs/${encodeURIComponent(e)}/install`,{}),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function Mit(){const i=Kr();return Ta({mutationFn:e=>qe.del(`/packs/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function Lit(i){return"base"in i}function lO({item:i,onActionDone:e}){const{t:r}=oi(),n=Eit(),a=Mit(),o=i.installed,c=o?a:n,h=c.isPending,u=c.isError,f=r(o?"packs.action.remove":"packs.action.install"),p=r(o?"packs.action.removing":"packs.action.installing"),g=h?p:f,b=y=>{y.stopPropagation(),y.preventDefault(),!h&&c.mutate(i.name,{onSuccess:()=>e==null?void 0:e()})};return x.jsxs("div",{className:"packs-card-actions",children:[x.jsx("button",{type:"button",className:`packs-action-btn btn btn--ghost${o?" packs-action-btn--danger":""}`,onClick:b,disabled:h,"aria-invalid":u||void 0,"aria-busy":h||void 0,children:g}),u&&x.jsx("span",{className:"packs-action-error",role:"alert",children:r("packs.action.error")})]})}function Nit({item:i,onClose:e}){const{t:r}=oi(),n=X.useCallback(a=>{a.target===a.currentTarget&&e()},[e]);return X.useEffect(()=>{const a=o=>{o.key==="Escape"&&e()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),x.jsx("div",{className:"packs-modal-overlay",onClick:n,"aria-modal":"true",role:"dialog","aria-label":i.name,children:x.jsxs("div",{className:"packs-modal-panel",children:[x.jsxs("div",{className:"packs-modal-header",children:[x.jsxs("div",{className:"packs-modal-title-row",children:[x.jsx("h2",{className:"packs-modal-name",children:i.name}),i.installed&&x.jsx("span",{className:"packs-installed-pill",children:r("settings.packs.installed")})]}),x.jsxs("div",{className:"packs-modal-header-actions",children:[x.jsx(lO,{item:i,onActionDone:e}),x.jsx("button",{className:"packs-modal-close btn btn--ghost",type:"button",onClick:e,"aria-label":r("packs.detail.close"),children:r("packs.detail.close")})]})]}),i.description&&x.jsx("p",{className:"packs-modal-desc",children:i.description}),i.tags.length>0&&x.jsx("div",{className:"packs-modal-tags",children:i.tags.map(a=>x.jsx("span",{className:"task-tag","data-hue":Fl(a),children:a},a))}),Lit(i)&&x.jsxs(x.Fragment,{children:[i.base&&x.jsxs("div",{className:"packs-modal-section",children:[x.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.base")}),x.jsx("p",{className:"packs-modal-mono",children:i.base})]}),i.subSkills.length>0&&x.jsxs("div",{className:"packs-modal-section",children:[x.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.subskills")}),x.jsx("ul",{className:"packs-modal-subskills",children:i.subSkills.map(a=>x.jsxs("li",{className:"packs-modal-subskill",children:[x.jsx("span",{className:"packs-modal-subskill-name",children:a.name}),a.description&&x.jsx("span",{className:"packs-modal-subskill-desc",children:a.description})]},a.name))})]}),i.relatedAgents&&i.relatedAgents.length>0&&x.jsxs("div",{className:"packs-modal-section",children:[x.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.agents")}),x.jsx("ul",{className:"packs-modal-agents",children:i.relatedAgents.map(a=>x.jsx("li",{className:"packs-modal-agent",children:a},a))})]})]})]})})}function RB({item:i,onClick:e}){const{t:r}=oi(),n=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),e(i))};return x.jsxs("div",{className:"packs-card packs-card--clickable",role:"button",tabIndex:0,onClick:()=>e(i),onKeyDown:n,"aria-label":i.name,children:[x.jsxs("div",{className:"packs-card-header",children:[x.jsx("span",{className:"packs-card-name",children:i.name}),i.installed&&x.jsx("span",{className:"packs-installed-pill",children:r("settings.packs.installed")})]}),i.description&&x.jsx("p",{className:"packs-card-desc",children:i.description}),i.tags.length>0&&x.jsx("div",{className:"packs-card-tags",children:i.tags.map(a=>x.jsx("span",{className:"task-tag","data-hue":Fl(a),children:a},a))}),x.jsx(lO,{item:i})]})}function jit(){const{t:i}=oi(),{data:e,isLoading:r,isError:n,error:a}=oO(),[o,c]=X.useState(null);if(r)return x.jsx("div",{className:"loading",children:i("common.loading")});if(n)return x.jsxs("div",{className:"error-state",children:[i("common.error")," ",a==null?void 0:a.message]});const h=(e==null?void 0:e.packs)??[],u=(e==null?void 0:e.standalone)??[];return x.jsxs("div",{className:"packs-page",children:[x.jsx("h1",{className:"page-title",children:i("packs.title")}),h.length===0&&u.length===0&&x.jsx("div",{className:"packs-empty",children:i("common.empty")}),h.length>0&&x.jsxs("section",{className:"packs-section",children:[x.jsx("h2",{className:"packs-section-title",children:i("packs.section.packs")}),x.jsx("div",{className:"packs-grid",children:h.map(f=>x.jsx(RB,{item:f,onClick:c},f.name))})]}),u.length>0&&x.jsxs("section",{className:"packs-section",children:[x.jsx("h2",{className:"packs-section-title",children:i("packs.section.standalone")}),x.jsx("div",{className:"packs-grid",children:u.map(f=>x.jsx(RB,{item:f,onClick:c},f.name))})]}),o!==null&&x.jsx(Nit,{item:o,onClose:()=>c(null)})]})}function Oit(){return x.jsxs("header",{className:"about-hero",children:[x.jsxs("div",{className:"about-hero-copy",children:[x.jsxs("a",{className:"about-lockup",href:"#top","aria-label":"dreamcontext",children:[x.jsxs("svg",{className:"about-lockup-mark",width:"34",height:"34",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[x.jsx("path",{d:"M16 2L28 16L16 30L4 16L16 2Z",fill:"url(#hero-mark-outer)"}),x.jsx("path",{d:"M16 9L22 16L16 23L10 16L16 9Z",fill:"url(#hero-mark-inner)",opacity:"0.75"}),x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"hero-mark-outer",x1:"4",y1:"2",x2:"28",y2:"30",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"var(--color-vivid-purple)"}),x.jsx("stop",{offset:"1",stopColor:"var(--color-electric-blue)"})]}),x.jsxs("linearGradient",{id:"hero-mark-inner",x1:"10",y1:"9",x2:"22",y2:"23",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"var(--color-electric-blue)"}),x.jsx("stop",{offset:"1",stopColor:"var(--color-vivid-purple)"})]})]})]}),x.jsx("span",{className:"about-lockup-word",children:"dreamcontext"})]}),x.jsxs("h1",{className:"about-title",children:["The persistent brain for",x.jsx("span",{className:"about-title-accent",children:" AI natives."})]}),x.jsxs("p",{className:"about-lead",children:["It remembers every decision you made, knows how your project is structured, and is learning to act on that knowledge — so every session starts ",x.jsx("em",{children:"ready"})," instead of blind. Built for founders and builders, technical or not."]}),x.jsxs("div",{className:"about-compat",children:[x.jsx("span",{className:"about-compat-mark","aria-hidden":"true",children:"✓"}),"Works with ",x.jsx("strong",{children:"Claude Code"})]}),x.jsxs("div",{className:"about-cta-row",children:[x.jsx("code",{className:"about-command",children:"npm i -g dreamcontext"}),x.jsx("a",{className:"about-link-btn",href:"https://www.npmjs.com/package/dreamcontext",target:"_blank",rel:"noreferrer",children:"npm ↗"}),x.jsx("a",{className:"about-link-btn about-link-btn--ghost",href:"https://github.com/meanllbrl/dreamcontext",target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),x.jsxs("div",{className:"about-hero-media",children:[x.jsx("div",{className:"about-hero-aura","aria-hidden":"true"}),x.jsxs("video",{className:"about-hero-video",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,poster:"/media/brain-hero.png",children:[x.jsx("source",{src:"/media/brain.webm",type:"video/webm"}),x.jsx("source",{src:"/media/brain.mp4",type:"video/mp4"})]})]})]})}function Rit(){return x.jsxs("section",{className:"about-section",children:[x.jsx("p",{className:"about-kicker",children:"The problem"}),x.jsx("h2",{className:"about-h2",children:"Your project is bigger than anyone can hold."}),x.jsxs("p",{className:"about-section-lead",children:["dreamcontext isn't a memory file. It builds a deep understanding of your whole project — the company, the codebase, even how you work — then ",x.jsx("em",{children:"surfaces what's hiding"}),": the scattered decisions, the forgotten reasons, the connections no one wrote down. Because it never forgets and sees the whole graph, the agent sometimes understands your project better than you do."]}),x.jsxs("div",{className:"about-contrast",children:[x.jsxs("div",{className:"about-contrast-card about-contrast-card--bad",children:[x.jsx("span",{className:"about-contrast-tag",children:"Without dreamcontext"}),x.jsxs("ul",{children:[x.jsx("li",{children:"Decisions scatter across chats, commits, and your head"}),x.jsx("li",{children:`The "why" behind last month's choice is already gone`}),x.jsx("li",{children:"You re-explain the project from scratch every session"}),x.jsx("li",{children:"Blind to the connections between what you've decided"})]})]}),x.jsxs("div",{className:"about-contrast-card about-contrast-card--good",children:[x.jsx("span",{className:"about-contrast-tag",children:"With dreamcontext"}),x.jsxs("ul",{children:[x.jsx("li",{children:"Deep understanding of the whole project, across every session"}),x.jsx("li",{children:"Surfaces the hidden links between scattered decisions"}),x.jsx("li",{children:"Holds the whole picture — company, code, and work-life context"}),x.jsx("li",{children:"Gets sharper every time it consolidates what changed"})]})]})]})]})}function Dit(i,e,r){const n=r*.6,o=Math.max(6,Math.floor((e-r*2)/n));if(i.length<=o)return[i];const c=[];let h="";const u=(f,p)=>{const g=h?h+p+f:f;h&&g.length>o?(c.push(h),h=f):h=g};return i.split(" · ").forEach((f,p)=>{const g=p===0?"":" · ";f.length<=o?u(f,g):f.split(" ").forEach((b,y)=>u(b,y===0?g:" "))}),h&&c.push(h),c}function bm({spec:i,className:e,size:r="full"}){const a=X.useId().replace(/[^a-zA-Z0-9_-]/g,""),o=`fd-node-${a}`,c=`fd-dot-${a}`,h=r==="mini"?5:7;return x.jsx("div",{className:`fd fd--${r} ${e??""}`,role:"img","aria-label":i.ariaLabel,children:x.jsxs("svg",{viewBox:i.viewBox,preserveAspectRatio:"xMidYMid meet",className:"fd-svg",children:[x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:o,x1:"0",y1:"0",x2:"0",y2:"1",children:[x.jsx("stop",{offset:"0",className:"fd-node-grad-a"}),x.jsx("stop",{offset:"1",className:"fd-node-grad-b"})]}),x.jsxs("radialGradient",{id:c,children:[x.jsx("stop",{offset:"0",className:"fd-dot-core"}),x.jsx("stop",{offset:"0.45",className:"fd-dot-mid"}),x.jsx("stop",{offset:"1",className:"fd-dot-edge"})]})]}),x.jsx("g",{className:"fd-wires",fill:"none",children:i.edges.map(u=>x.jsxs("g",{children:[x.jsx("path",{d:u.d,className:`fd-wire${u.dashed?" fd-wire--dashed":""}`}),u.comet!==!1&&x.jsx("circle",{cx:"0",cy:"0",r:h,className:"fd-comet-dot",fill:`url(#${c})`,style:{offsetPath:`path('${u.d}')`,animationDelay:`${u.delay??0}s`,animationDuration:`${u.dur??2.6}s`}}),u.label&&x.jsx("text",{x:u.label.x,y:u.label.y,className:"fd-label",transform:u.label.rotate!==void 0?`rotate(${u.label.rotate} ${u.label.x} ${u.label.y})`:void 0,children:u.label.text})]},u.id))}),i.nodes.map(u=>{const f=u.x+u.w/2,p=u.y+u.h/2,g=u.sub==null?[]:Array.isArray(u.sub)?u.sub:u.glyph?[u.sub]:Dit(u.sub,u.w,r==="mini"?10:12),b=15,y=u.glyph?p+6:g.length?p-8-(g.length-1)*(b/2):p,v=u.glyph?u.y+u.h-16:y+22;return x.jsxs("g",{className:`fd-node fd-node--${u.variant??"plain"}${u.breathe?" fd-node--breathe":""}`,children:[x.jsx("rect",{x:u.x,y:u.y,width:u.w,height:u.h,rx:"14",fill:`url(#${o})`,style:u.breathe&&u.breatheDelay!==void 0?{animationDelay:`${u.breatheDelay}s`}:void 0}),u.glyph&&x.jsx("text",{x:f,y:u.y+26,className:"fd-region-glyph",children:u.glyph}),x.jsx("text",{x:f,y,className:"fd-node-title",children:u.title}),g.length>0&&x.jsx("text",{x:f,y:v,className:"fd-node-sub",children:g.map((C,_)=>x.jsx("tspan",{x:f,dy:_===0?0:b,children:C},_))})]},u.id)})]})})}function Cr(i,e,r,n){const a=(e+n)/2;return`M ${i} ${e} C ${i} ${a}, ${r} ${a}, ${r} ${n}`}const K1=[{file:"soul",region:"Identity",glyph:"◆"},{file:"user",region:"Episodic",glyph:"◉"},{file:"memory",region:"Semantic",glyph:"✦"},{file:"knowledge",region:"Procedural",glyph:"⚙"},{file:"state",region:"Working",glyph:"▦"},{file:"data-structures",region:"Schema",glyph:"▤"},{file:"skills",region:"Capabilities",glyph:"✧"},{file:"sub-agents",region:"Workers",glyph:"⬡"}],el=600,vm=250,cO=92,Ll=4,DB=(1200-Ll*vm)/(Ll+1),J1=196,Fit=320,$it=Fit-J1,zit=120,hO=470,Iit=548,FB=632;function uO(i){return DB+i*(vm+DB)}function fO(i){return uO(i)+vm/2}function dO(i){return J1+i*$it}const qit=K1.map((i,e)=>{const r=e%Ll,n=Math.floor(e/Ll);return{id:`cat-${i.file}`,x:uO(r),y:dO(n),w:vm,h:cO,title:i.file,sub:i.region,glyph:i.glyph,variant:"region",breathe:!0,breatheDelay:e*.18}}),Pit=K1.slice(0,Ll).map((i,e)=>({id:`fan-${e}`,d:Cr(el,zit,fO(e),J1),travel:220,delay:e*.18,dur:2.6})),Hit=K1.map((i,e)=>{const r=e%Ll,n=Math.floor(e/Ll);return{id:`conv-${i.file}`,d:Cr(fO(r),dO(n)+cO,el,hO),travel:300,delay:.5+e*.12,dur:2.8}}),Uit={viewBox:"0 0 1200 780",ariaLabel:"How dreamcontext works: a SessionStart hook preloads eight context categories — identity, episodic, semantic, procedural, working, schema, capabilities and workers — with zero tool calls. The agent then works with the whole picture, and RemSleep parallel specialists consolidate the session and feed the distilled knowledge back into the context categories. The loop is the product.",nodes:[{id:"hook",x:el-215,y:40,w:430,h:80,title:"SessionStart hook fires",sub:"preloads context · 0 tool calls",variant:"hook"},...qit,{id:"agent",x:el-250,y:hO,w:500,h:78,title:"Your agent works with the whole picture",sub:"no re-exploring · no blind search spiral",variant:"agent"},{id:"rem",x:el-200,y:FB,w:400,h:78,title:"RemSleep — parallel specialists",sub:"multi-agent consolidation",variant:"rem"}],edges:[...Pit,...Hit,{id:"agent-rem",d:`M ${el} ${Iit} L ${el} ${FB}`,travel:90,delay:1.6,dur:1.8},{id:"feedback",d:"M 800 671 C 1140 671, 1170 470, 1170 300 C 1170 170, 1110 170, 1010 170",dashed:!0,travel:520,delay:0,dur:4.2,label:{text:"consolidates & feeds back",x:1180,y:420,rotate:90}}]},ga=550,Cm=300,pO=116,$B=3,zB=(1100-$B*Cm)/($B+1),tC=280,Wit=196,gO=470,Git=540,IB=596;function mO(i){return zB+i*(Cm+zB)}function yO(i){return mO(i)+Cm/2}const eC=[{id:"sleep-tasks",title:"sleep-tasks",sub:"state/*.md tasks"},{id:"sleep-state",title:"sleep-state",sub:"soul · user · memory · core 3-6 · data-structures · changelog · releases"},{id:"sleep-product",title:"sleep-product",sub:"knowledge/ + features/ · conditional"}],Yit=eC.map((i,e)=>({id:i.id,x:mO(e),y:tC,w:Cm,h:pO,title:i.title,sub:i.sub,variant:"region",breathe:!0,breatheDelay:e*.25})),Vit=eC.map((i,e)=>({id:`fan-${i.id}`,d:Cr(ga,Wit,yO(e),tC),travel:200,delay:e*.3,dur:2.4})),Xit=eC.map((i,e)=>({id:`conv-${i.id}`,d:Cr(yO(e),tC+pO,ga,gO),travel:200,delay:.9+e*.2,dur:2.4})),Qit={viewBox:"0 0 1100 680",ariaLabel:"Sleep consolidation: sessions accumulate sleep debt; running sleep start fans out to three parallel specialists — sleep-tasks updates task files, sleep-state updates core files, changelog and releases, and sleep-product conditionally updates knowledge and feature docs. Their reports converge into updated system knowledge, then sleep done resets the debt.",nodes:[{id:"debt",x:ga-230,y:36,w:460,h:76,title:"Sessions accumulate → sleep debt",sub:"Alert · Drowsy · Sleepy · Must Sleep",variant:"accent"},{id:"sleep-start",x:ga-130,y:132,w:260,h:64,title:"sleep start",sub:"pins the epoch",variant:"hook"},...Yit,{id:"converge",x:ga-220,y:gO,w:440,h:70,title:"system knowledge updated",sub:"reports stitched into one summary",variant:"agent"},{id:"sleep-done",x:ga-130,y:IB,w:260,h:64,title:"sleep done",sub:"debt reset",variant:"rem"}],edges:[{id:"debt-start",d:`M ${ga} 112 L ${ga} 132`,travel:26,delay:0,dur:1.4},...Vit,...Xit,{id:"converge-done",d:`M ${ga} ${Git} L ${ga} ${IB}`,travel:64,delay:1.8,dur:1.8}]},pv=230,xO=230,qB=132,gv=[{id:"prompt",x:40,title:"Your prompt",sub:"any language",variant:"hook"},{id:"bm25",x:320,title:"BM25F keyword match",sub:"field-weighted · stemming · synonyms",variant:"region"},{id:"haiku",x:600,title:"Haiku recall",sub:"smallest cloud agent · 0-3 docs · BM25 fallback",variant:"region"},{id:"snapshot",x:880,title:"SessionStart snapshot",sub:"warm + cold knowledge · features · index · pinned",variant:"rem"}],Zit=gv.map(i=>({id:i.id,x:i.x,y:pv-qB/2,w:xO,h:qB,title:i.title,sub:i.sub,variant:i.variant})),Kit=gv.slice(0,-1).map((i,e)=>{const r=gv[e+1],n=i.x+xO,a=r.x;return{id:`pipe-${i.id}`,d:`M ${n} ${pv} L ${a} ${pv}`,travel:a-n,delay:e*.4,dur:2.2}}),Jit={viewBox:"0 0 1150 460",ariaLabel:"Memory recall pipeline: your prompt is matched by field-weighted BM25F keyword search with stemming and synonyms; a small Haiku cloud agent picks zero to three directly relevant docs (falling back to BM25 when unavailable); and the SessionStart snapshot assembles warm and cold knowledge, features, the index and pinned docs.",nodes:Zit,edges:Kit},trt=[{n:"01",title:"It loads",body:"A SessionStart hook preloads the whole project picture — soul, user, memory, knowledge and state, plus data-structures, skills and sub-agents — before the agent makes a single tool call."},{n:"02",title:"It works",body:"With identity, history, procedures, schema and capabilities already in context, your agent works against the real project — no re-exploring, no blind search spiral, no re-teaching what it learned last time."},{n:"03",title:"It sleeps",body:"RemSleep is multi-agent: parallel specialists consolidate the session in their own domains and feed the distilled knowledge back into those context files — so the next session starts even sharper."}];function ert(){return x.jsxs("section",{className:"about-section",children:[x.jsx("p",{className:"about-kicker",children:"How it works"}),x.jsx("h2",{className:"about-h2",children:"A brain that loads, works, and sleeps — across your whole system."}),x.jsxs("p",{className:"about-section-lead",children:["Three moves, repeated every session. A hook preloads the entire context set with"," ",x.jsx("em",{children:"zero tool calls"}),", your agent works with the whole picture, and a multi-agent RemSleep cycle consolidates what changed. The loop is the product."]}),x.jsx(bm,{spec:Uit}),x.jsx("div",{className:"hiw2-steps",children:trt.map(i=>x.jsxs("div",{className:"hiw2-step",children:[x.jsx("span",{className:"hiw2-step-n",children:i.n}),x.jsx("h3",{className:"hiw2-step-title",children:i.title}),x.jsx("p",{className:"hiw2-step-body",children:i.body})]},i.n))})]})}const irt=[{level:"Alert",range:"0–3",note:"fresh — nothing to consolidate yet"},{level:"Drowsy",range:"4–6",note:"consolidation offered"},{level:"Sleepy",range:"7–9",note:"advisory note prepended"},{level:"Must Sleep",range:"10+",note:"critical directive prepended"}],rrt=[{name:"sleep-tasks",domain:"state/*.md — logs progress, bumps statuses, reconciles task bodies and workflow nodes.",always:!0},{name:"sleep-state",domain:"soul · user · memory · data-structures · CHANGELOG · RELEASES — surgical core-file updates with an anti-bloat sweep.",always:!0},{name:"sleep-product",domain:"knowledge/ + core/features/ — writes and refreshes knowledge files and feature PRDs.",always:!1}];function nrt(){return x.jsxs("section",{className:"about-section",children:[x.jsx("p",{className:"about-kicker",children:"How sleep works"}),x.jsx("h2",{className:"about-h2",children:"It sleeps to remember — like REM, but for your project."}),x.jsxs("p",{className:"about-section-lead",children:["Every session adds ",x.jsx("em",{children:"sleep debt"}),". When it builds up, one command fans out to parallel specialists that fold what changed back into the brain — then resets the meter."]}),x.jsx(bm,{spec:Qit}),x.jsxs("div",{className:"sleepf-cards",children:[x.jsxs("article",{className:"sleepf-card sleepf-card--debt",children:[x.jsx("h3",{className:"sleepf-card-title",children:"Debt accumulates across sessions"}),x.jsx("p",{className:"sleepf-card-body",children:"Each session scores by how much changed; the score adds to a running debt total that crosses graduated thresholds, so consolidation urgency is never ambiguous."}),x.jsx("ul",{className:"sleepf-debt",children:irt.map(i=>x.jsxs("li",{className:"sleepf-debt-row",children:[x.jsx("span",{className:"sleepf-debt-level",children:i.level}),x.jsx("span",{className:"sleepf-debt-range",children:i.range}),x.jsx("span",{className:"sleepf-debt-note",children:i.note})]},i.level))})]}),x.jsxs("article",{className:"sleepf-card",children:[x.jsx("h3",{className:"sleepf-card-title",children:"Specialists run in parallel"}),x.jsxs("p",{className:"sleepf-card-body",children:[x.jsx("code",{className:"sleepf-cmd",children:"sleep start"})," pins the epoch, then the main agent dispatches the specialists together in a single message — each updating a distinct knowledge domain, never editing outside it."]}),x.jsx("ul",{className:"sleepf-specialists",children:rrt.map(i=>x.jsxs("li",{className:"sleepf-spec-row",children:[x.jsx("code",{className:"sleepf-spec-name",children:i.name}),x.jsx("span",{className:`sleepf-spec-badge${i.always?" sleepf-spec-badge--always":""}`,children:i.always?"always fires":"conditional"}),x.jsx("span",{className:"sleepf-spec-domain",children:i.domain})]},i.name))})]}),x.jsxs("article",{className:"sleepf-card sleepf-card--done",children:[x.jsxs("h3",{className:"sleepf-card-title",children:[x.jsx("code",{className:"sleepf-cmd",children:"sleep done"})," resets the debt"]}),x.jsxs("p",{className:"sleepf-card-body",children:["Their reports converge into one stitched summary of updated system knowledge. The main agent calls ",x.jsx("code",{className:"sleepf-cmd",children:"sleep done"}),", which records the consolidation and resets the debt to zero — ready for the next cycle."]})]})]})]})}const art=[{n:"01",tag:"Keyword match",title:"Field-weighted BM25F",body:"Your prompt is matched against the corpus — knowledge, features, tasks, memory and changelog — with field weighting, stemming and synonym expansion. It runs locally in under 100ms, with zero token overhead."},{n:"02",tag:"Intent recall",title:"The Haiku agent",body:"The smallest cloud agent reads your full prompt and a relevance-ranked corpus index, then returns only the 0–3 documents that are directly relevant — resolving intent across languages. If it is unavailable, the pipeline falls back to raw BM25."},{n:"03",tag:"Session start",title:"The snapshot assembles",body:"At SessionStart a hook composes the knowledge distribution — warm and cold knowledge, the features summary, the knowledge index, and pinned docs — and hands it to the agent so it begins each session already oriented."}];function srt(){return x.jsxs("section",{className:"about-section",children:[x.jsx("p",{className:"about-kicker",children:"How the system remembers"}),x.jsx("h2",{className:"about-h2",children:"The right memory, surfaced before you ask."}),x.jsxs("p",{className:"about-section-lead",children:["Remembering is a read pipeline. Three stages take a prompt — or a fresh session — and put exactly the relevant context in front of the agent, so it works on what you actually meant. It ",x.jsx("em",{children:"augments"})," the agent's reach; you stay in the driver's seat."]}),x.jsx(bm,{spec:Jit}),x.jsx("div",{className:"recallf-stages",children:art.map(i=>x.jsxs("article",{className:"recallf-stage",children:[x.jsxs("div",{className:"recallf-stage-head",children:[x.jsx("span",{className:"recallf-stage-n",children:i.n}),x.jsx("span",{className:"recallf-stage-tag",children:i.tag})]}),x.jsx("h3",{className:"recallf-stage-title",children:i.title}),x.jsx("p",{className:"recallf-stage-body",children:i.body})]},i.n))})]})}const PB=[{file:"0.soul",glyph:"◆",region:"Identity",brain:"sense of self",desc:"Who it is — purpose, principles, and the rules it must never break."},{file:"1.user",glyph:"◉",region:"Episodic",brain:"lived history",desc:"What you did and decided, session over session."},{file:"2.memory",glyph:"✦",region:"Semantic",brain:"durable facts",desc:"What's true about the project — facts that hold across every session."},{file:"data-structures/",glyph:"▤",region:"Schema",brain:"mental models",desc:"The shapes of your data — the structures everything else is built on."},{file:"knowledge/",glyph:"⚙",region:"Procedural",brain:"learned skill",desc:"How to do things here — patterns, recipes, and hard-won know-how.",rides:{label:"skills",desc:"capabilities it can pick up and apply"}},{file:"state/",glyph:"▦",region:"Working",brain:"in attention",desc:"What's in flight right now — tasks, features, and the sleep cycle.",rides:{label:"sub-agents",desc:"workers it directs under your steer"}}];function ort(){return x.jsxs("section",{className:"about-section arch","aria-labelledby":"arch-heading",children:[x.jsx("p",{className:"about-kicker",children:"The architecture"}),x.jsx("h2",{className:"about-h2",id:"arch-heading",children:"Memory, organized like a mind."}),x.jsx("p",{className:"about-section-lead",children:"Knowledge isn't one flat file. It's laid down in strata — each a purpose-built region that mirrors a part of the brain — so the agent reaches for the right kind of memory at the right moment."}),x.jsxs("div",{className:"arch-stage",role:"img","aria-label":"A cross-section of the project's memory, stacked as layered brain regions.",children:[x.jsx("div",{className:"arch-glow","aria-hidden":"true"}),x.jsx("ol",{className:"arch-stack",children:PB.map((i,e)=>x.jsxs("li",{className:"arch-stratum",style:{"--i":e,"--n":PB.length},children:[x.jsx("div",{className:"arch-edge","aria-hidden":"true"}),x.jsxs("div",{className:"arch-face",children:[x.jsx("span",{className:"arch-glyph","aria-hidden":"true",children:i.glyph}),x.jsxs("div",{className:"arch-meta",children:[x.jsxs("div",{className:"arch-meta-top",children:[x.jsx("code",{className:"arch-file",children:i.file}),x.jsx("span",{className:"arch-region",children:i.region}),x.jsx("span",{className:"arch-brain",children:i.brain})]}),x.jsx("p",{className:"arch-desc",children:i.desc})]}),i.rides?x.jsxs("div",{className:"arch-rides",children:[x.jsx("span",{className:"arch-rides-plus","aria-hidden":"true",children:"+"}),x.jsx("span",{className:"arch-rides-label",children:i.rides.label}),x.jsx("span",{className:"arch-rides-desc",children:i.rides.desc})]}):null]})]},i.file))})]}),x.jsxs("p",{className:"arch-foot",children:["Six strata, one mind — read top-down, the agent goes from"," ",x.jsx("em",{children:"who it is"})," to ",x.jsx("em",{children:"what it's doing right now"}),"."]})]})}function lrt(i){return"base"in i}function HB({item:i}){const e=lrt(i)?"pack":"standalone",r=e==="pack"?"pack":i.tags[0]??"standalone";return x.jsxs("li",{className:"marquee-card",children:[x.jsx("span",{className:`marquee-chip marquee-chip--${e}`,children:r}),x.jsx("span",{className:"marquee-card-name",children:i.name}),i.description&&x.jsx("p",{className:"marquee-card-desc",children:i.description})]})}function crt(){const{data:i,isLoading:e,isError:r}=oO(),n=X.useMemo(()=>i?[...i.packs,...i.standalone]:[],[i]),a=Math.min(60,Math.max(40,n.length*2.2)),o=x.jsxs(x.Fragment,{children:[x.jsx("p",{className:"about-kicker",children:"Skill packs"}),x.jsx("h2",{className:"about-h2",children:"A growing library of expertise."}),x.jsx("p",{className:"about-section-lead",children:"The agent loads the right pack for the task — and more are added all the time."})]});return e?x.jsxs("section",{className:"about-section",children:[o,x.jsx("div",{className:"marquee-viewport marquee-viewport--static","aria-hidden":"true",children:x.jsx("ul",{className:"marquee-track marquee-track--skeleton",children:Array.from({length:6}).map((c,h)=>x.jsx("li",{className:"marquee-card marquee-card--skeleton"},h))})}),x.jsx("p",{className:"marquee-status",children:"Loading packs…"})]}):r||n.length===0?x.jsx("section",{className:"about-section",children:o}):x.jsxs("section",{className:"about-section",children:[o,x.jsxs("div",{className:"marquee-viewport",style:{"--marquee-duration":`${a}s`},children:[x.jsx("ul",{className:"marquee-track",children:n.map(c=>x.jsx(HB,{item:c},`a-${c.name}`))}),x.jsx("ul",{className:"marquee-track marquee-track--dup","aria-hidden":"true",children:n.map(c=>x.jsx(HB,{item:c},`b-${c.name}`))})]})]})}const Eo="0 0 360 170";function bO(i,e,r){return{viewBox:Eo,ariaLabel:i,nodes:[{id:"a",x:20,y:50,w:140,h:70,title:e.title,sub:e.sub,variant:e.variant??"hook"},{id:"b",x:200,y:50,w:140,h:70,title:r.title,sub:r.sub,variant:r.variant??"rem"}],edges:[{id:"a-b",d:"M 160 85 L 200 85",travel:40,dur:2}]}}const hrt={viewBox:Eo,ariaLabel:"Context snapshot: a SessionStart hook injects the soul, memory, active tasks and knowledge index straight into the agent with zero tool calls.",nodes:[{id:"hook",x:110,y:12,w:140,h:50,title:"SessionStart",sub:"0 tool calls",variant:"hook"},{id:"brain",x:16,y:100,w:150,h:56,title:"project brain",sub:"soul · memory · tasks",variant:"region",breathe:!0},{id:"agent",x:194,y:100,w:150,h:56,title:"your agent",sub:"oriented",variant:"agent"}],edges:[{id:"h-b",d:Cr(180,62,91,100),travel:80,dur:2.2},{id:"b-a",d:"M 166 128 L 194 128",travel:28,dur:1.6,delay:.5}]},urt={viewBox:Eo,ariaLabel:"Memory recall: a question is scored by BM25 keyword match, optionally refined by a small Haiku agent, returning the most relevant docs in under 100 milliseconds.",nodes:[{id:"q",x:14,y:52,w:96,h:66,title:"question",sub:"any language",variant:"hook"},{id:"bm25",x:132,y:52,w:96,h:66,title:"BM25",sub:"+ Haiku",variant:"region",breathe:!0},{id:"docs",x:250,y:52,w:96,h:66,title:"top docs",sub:"<100ms",variant:"rem"}],edges:[{id:"q-b",d:"M 110 85 L 132 85",travel:22,dur:1.6},{id:"b-d",d:"M 228 85 L 250 85",travel:22,dur:1.6,delay:.4}]},frt={viewBox:Eo,ariaLabel:"RemSleep: accumulated sleep debt triggers a fan-out to three parallel specialists that consolidate the session and reset the meter.",nodes:[{id:"debt",x:108,y:10,w:144,h:46,title:"sleep debt",sub:"crosses threshold",variant:"accent"},{id:"s1",x:14,y:92,w:100,h:50,title:"sleep-tasks",variant:"region",breathe:!0},{id:"s2",x:130,y:92,w:100,h:50,title:"sleep-state",variant:"region",breathe:!0,breatheDelay:.2},{id:"s3",x:246,y:92,w:100,h:50,title:"sleep-product",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"d-1",d:Cr(180,56,64,92),travel:90,dur:2.2},{id:"d-2",d:"M 180 56 L 180 92",travel:36,dur:1.8,delay:.2},{id:"d-3",d:Cr(180,56,296,92),travel:90,dur:2.2,delay:.4}]},drt={viewBox:Eo,ariaLabel:"Brain-region core files: soul, user, memory and the knowledge index sit in a numbered band the snapshot always loads.",nodes:[{id:"soul",x:14,y:24,w:158,h:54,title:"0.soul",sub:"identity · rules",variant:"region",breathe:!0},{id:"mem",x:188,y:24,w:158,h:54,title:"2.memory",sub:"decisions · issues",variant:"region",breathe:!0,breatheDelay:.2},{id:"user",x:14,y:96,w:158,h:54,title:"1.user",sub:"preferences",variant:"region",breathe:!0,breatheDelay:.4},{id:"know",x:188,y:96,w:158,h:54,title:"knowledge",sub:"index · pinned",variant:"region",breathe:!0,breatheDelay:.6}],edges:[]},prt={viewBox:Eo,ariaLabel:"Tag-based relation graph: knowledge, features and tasks link through shared tags into a navigable brain view.",nodes:[{id:"tag",x:110,y:58,w:140,h:54,title:"shared tag",sub:"the edge",variant:"accent",breathe:!0},{id:"k",x:14,y:10,w:110,h:44,title:"knowledge",variant:"region"},{id:"f",x:236,y:10,w:110,h:44,title:"features",variant:"region"},{id:"t",x:125,y:122,w:110,h:40,title:"tasks",variant:"region"}],edges:[{id:"k-tag",d:Cr(69,54,150,58),travel:90,dur:2.4},{id:"f-tag",d:Cr(291,54,210,58),travel:90,dur:2.4,delay:.4},{id:"t-tag",d:"M 180 122 L 180 112",travel:12,dur:1.6,delay:.8}]},grt={viewBox:Eo,ariaLabel:"Task management: each task carries a LIFO changelog viewable as a Kanban board, an Eisenhower matrix, or RICE-scored.",nodes:[{id:"task",x:16,y:50,w:130,h:70,title:"task .md",sub:"LIFO changelog",variant:"hook"},{id:"views",x:200,y:24,w:144,h:44,title:"Kanban",variant:"region",breathe:!0},{id:"eis",x:200,y:74,w:144,h:40,title:"Eisenhower",variant:"region",breathe:!0,breatheDelay:.2},{id:"rice",x:200,y:120,w:144,h:40,title:"RICE score",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"t-k",d:Cr(146,85,272,46),travel:90,dur:2.2},{id:"t-e",d:"M 146 85 L 200 94",travel:56,dur:2,delay:.3},{id:"t-r",d:Cr(146,85,272,140),travel:90,dur:2.2,delay:.6}]},mrt={viewBox:Eo,ariaLabel:"Sub-agents: the main agent fans work out to briefed specialist sub-agents that report back, keeping the main context small.",nodes:[{id:"main",x:110,y:12,w:140,h:46,title:"main agent",variant:"agent"},{id:"a",x:16,y:96,w:96,h:50,title:"reviewer",variant:"region",breathe:!0},{id:"b",x:132,y:96,w:96,h:50,title:"planner",variant:"region",breathe:!0,breatheDelay:.2},{id:"c",x:248,y:96,w:96,h:50,title:"researcher",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"m-a",d:Cr(180,58,64,96),travel:90,dur:2.2},{id:"m-b",d:"M 180 58 L 180 96",travel:38,dur:1.8,delay:.2},{id:"m-c",d:Cr(180,58,296,96),travel:90,dur:2.2,delay:.4}]},yrt={viewBox:"0 0 400 232",ariaLabel:"Council: three persona sub-agents debate each other in a cycle — each sees the others’ reasoning, round after round — then the debate converges into a synthesizer that writes one decision report.",nodes:[{id:"p1",x:70,y:14,w:96,h:46,title:"persona",sub:"lens A",variant:"region",breathe:!0},{id:"p2",x:18,y:118,w:96,h:46,title:"persona",sub:"lens B",variant:"region",breathe:!0,breatheDelay:.25},{id:"p3",x:130,y:118,w:96,h:46,title:"persona",sub:"lens C",variant:"region",breathe:!0,breatheDelay:.5},{id:"syn",x:286,y:70,w:104,h:72,title:"synthesizer",sub:"decision report",variant:"rem"}],edges:[{id:"p1-p2",d:"M 96 60 L 80 118",travel:60,dur:1.8},{id:"p2-p3",d:"M 114 141 L 130 141",travel:16,dur:1.1,delay:.3,label:{text:"↻ rounds",x:118,y:95}},{id:"p3-p1",d:"M 178 118 L 152 60",travel:60,dur:1.8,delay:.6},{id:"p1-syn",d:Cr(166,40,286,96),travel:130,dur:2.4,delay:.4},{id:"p3-syn",d:Cr(226,136,286,116),travel:76,dur:2.2,delay:.9}]},xrt={viewBox:"0 0 1000 330",ariaLabel:"Goal-skill orchestration: a goal-planner drafts a file-by-file plan; parallel reviewers vote SOLID or NEEDS_WORK and loop back to the planner until solid; the plan is persisted as a task; a goal-implementer builds to the acceptance criteria; a code reviewer and then a goal-validator each gate the result, looping back to the implementer on FAIL; every gate is capped at three retries before escalating to the user, after which the work ships as a task in review.",nodes:[{id:"plan",x:20,y:40,w:140,h:86,title:"planner",sub:"file-by-file plan",variant:"agent"},{id:"plan-review",x:184,y:40,w:140,h:86,title:"plan review",sub:"SOLID · NEEDS_WORK",variant:"region",breathe:!0},{id:"impl",x:348,y:40,w:140,h:86,title:"implementer",sub:"builds to criteria",variant:"agent"},{id:"code-review",x:512,y:40,w:140,h:86,title:"code review",sub:"PASS · FAIL",variant:"region",breathe:!0,breatheDelay:.2},{id:"validate",x:676,y:40,w:140,h:86,title:"validator",sub:"tests · PASS · FAIL",variant:"region",breathe:!0,breatheDelay:.4},{id:"done",x:840,y:40,w:140,h:86,title:"shipped",sub:"task → in_review",variant:"rem"}],edges:[{id:"f1",d:"M 160 83 L 184 83",dur:2},{id:"f2",d:"M 324 83 L 348 83",dur:2,delay:.2},{id:"f3",d:"M 488 83 L 512 83",dur:2,delay:.1},{id:"f4",d:"M 652 83 L 676 83",dur:2,delay:.2},{id:"f5",d:"M 816 83 L 840 83",dur:2,delay:.3},{id:"l1",d:"M 254 126 C 254 196, 90 196, 90 126",dashed:!0,dur:3.2,delay:.5,label:{text:"↻ ≤3",x:172,y:186}},{id:"l2",d:"M 582 126 C 582 196, 418 196, 418 126",dashed:!0,dur:3.2,delay:.7,label:{text:"↻ ≤3",x:500,y:186}},{id:"l3",d:"M 746 126 C 746 262, 418 262, 418 126",dashed:!0,dur:3.6,delay:.9,label:{text:"↻ ≤3",x:582,y:252}}]},brt=bO("Skill packs: curated domain packs install a base skill plus on-demand sub-skills into the agent.",{title:"skill pack",sub:"engineering · design · growth",variant:"hook"},{title:"agent gains",sub:"base + sub-skills",variant:"rem"}),vrt=bO("Knowledge base: tagged knowledge files are indexed every session; pinned files load warm, the rest load cold on demand.",{title:"knowledge/*.md",sub:"tagged · indexed",variant:"region"},{title:"snapshot",sub:"warm + cold",variant:"rem"}),vO=[{id:"context-snapshot",title:"Context snapshot",tagline:"Every session starts with the whole brain, zero tool calls.",body:"A SessionStart hook injects your project identity, user preferences, memory, active tasks and the knowledge index straight into the agent — so it orients instantly instead of grepping around blind.",defaultOpen:!0,tag:"Memory",flow:hrt},{id:"memory-recall",title:"Memory recall",tagline:'Ask "where did we decide X?" and get an answer in under 100ms.',body:"A deterministic BM25 search ranks every knowledge file, PRD, task, memory entry and changelog line — optionally sharpened by a small Haiku agent — so the right context surfaces without scrolling or grepping. Handles English, Turkish and mixed queries.",defaultOpen:!0,tag:"Memory",flow:urt},{id:"rem-sleep",title:"RemSleep consolidation",tagline:"It sleeps to remember — multi-agent consolidation, like REM.",body:"Sessions accumulate sleep debt; when it builds up, one command fans out to three parallel specialists that fold what changed back into the brain, then resets the meter. Knowledge compounds instead of decaying.",defaultOpen:!0,tag:"Sleep",flow:frt},{id:"brain-regions",title:"Brain-region core files",tagline:"A numbered band of core files — soul, user, memory, knowledge.",body:"The brain is a handful of small, always-loaded files: identity and rules, user preferences, durable memory, and the knowledge index. Kept lightweight on purpose so the snapshot stays under budget every session.",defaultOpen:!0,tag:"Memory",flow:drt},{id:"knowledge-base",title:"Knowledge base",tagline:"Tagged research that loads warm when pinned, cold on demand.",body:"Deep research and domain context live in tagged knowledge files the snapshot indexes every session. Pin the critical ones to load them in full; the rest stay one read away when an agent needs them.",defaultOpen:!0,tag:"Knowledge",flow:vrt},{id:"brain-graph",title:"Relation graph (Brain view)",tagline:"Knowledge, features and tasks linked through shared tags.",body:"A tag-based graph connects every knowledge file, feature and task into one navigable Brain view — so you can see how the parts of a project relate instead of reading them one file at a time.",defaultOpen:!0,tag:"Knowledge",flow:prt},{id:"task-management",title:"Task management",tagline:"LIFO changelogs, viewable as Kanban, Eisenhower or RICE.",body:"Each task is a Markdown file with a LIFO changelog, so any session reads where the last one left off. View the backlog as a Kanban board, triage it on an Eisenhower matrix, or rank it numerically with RICE — Reach × Impact × Confidence ÷ Effort.",defaultOpen:!0,tag:"Tasks",flow:grt},{id:"skill-packs",title:"Skill packs",tagline:"Curated, installable skills by domain — one command.",body:"Extend an agent with domain packs — engineering, design, growth, brand-voice and more — each a base skill plus on-demand sub-skills. Install interactively or name a pack directly; prerequisites resolve automatically.",defaultOpen:!0,tag:"Skills",flow:brt},{id:"sub-agents",title:"Sub-agents",tagline:"Fan work out to briefed specialists; keep the main context lean.",body:"The main agent dispatches focused sub-agents — reviewers, planners, researchers — each launched with a lightweight context briefing so it knows the project structure without any tool calls. They report back; the main thread stays small.",defaultOpen:!0,tag:"Agents",flow:mrt},{id:"council",title:"Council",tagline:"Persona sub-agents debate a hard call, a synthesizer decides.",body:"For a non-trivial decision, Council spins up 3–10 persona sub-agents that debate across rounds, see each other's reasoning, then hand off to a dedicated synthesizer that writes one decision report — promotable straight into knowledge.",defaultOpen:!0,tag:"Agents",flow:yrt},{id:"goal-skill",title:"Goal-skill orchestration",tagline:"Plan it, review it, build it, review it, validate it — on a leash.",body:"Turn the main agent into an orchestrator. A goal-planner drafts a file-by-file plan; parallel reviewers vote SOLID or NEEDS_WORK and bounce it back until it holds; the plan is persisted as a task; a goal-implementer builds to the acceptance criteria; then a code reviewer and a goal-validator each gate the result, looping back to the implementer on a fail. Every gate is capped at three retries and escalates to you instead of spinning.",defaultOpen:!0,tag:"Agents",flow:xrt},{id:"bookmarking",title:"Bookmarking (salience)",tagline:"High-signal moments tagged so sleep can find them later.",body:"Corrections, error-to-fix turns and decisions are auto-bookmarked during a session, marking the moments worth keeping — so consolidation folds the right learnings into the brain without manual flagging.",defaultOpen:!1,tag:"Memory",glyph:"◈"},{id:"warm-cold-knowledge",title:"Warm vs cold knowledge",tagline:"Pinned files load in full; the rest stay one read away.",body:"Pinned (warm) knowledge is inlined into every snapshot; unpinned (cold) knowledge appears only in the index and loads on demand. The split keeps the always-on context small while nothing gets lost.",defaultOpen:!1,tag:"Knowledge",glyph:"❄"},{id:"feature-prds",title:"Feature PRDs",tagline:"Living docs that capture not just what was built, but why.",body:"Each feature has a PRD with user stories, acceptance criteria and design decisions that update as work progresses — so an agent understands the product surface without reconstructing it from conversation history.",defaultOpen:!1,tag:"Knowledge",glyph:"▤"},{id:"versions-releases",title:"Versions & releases",tagline:"Changelog and release readiness tracked in the brain.",body:"A structured changelog and release notes live alongside the context, so version history and release readiness are part of the brain the agent reads — not an afterthought scattered across commits.",defaultOpen:!1,tag:"Knowledge",glyph:"⎇"},{id:"multi-vault",title:"Multi-vault registry",tagline:"Switch between project brains from one global registry.",body:"A global vault registry tracks every project brain on your machine. List, add and remove vaults, then point the dashboard at any one — so multiple projects each keep their own clean context.",defaultOpen:!1,tag:"Setup",glyph:"▦"},{id:"multi-product",title:"Multi-product support",tagline:"Per-product knowledge auto-injected from the active task.",body:"Monorepos and portfolios get a product namespace: per-product knowledge and data structures, plus automatic injection of the right product's knowledge at session start when the active task carries a product tag.",defaultOpen:!1,tag:"Knowledge",glyph:"◫"},{id:"manifest-install",title:"Manifest install & update",tagline:"Clean upgrades — stale files tracked and removed, not layered.",body:"A manifest tracks every file dreamcontext owns, so updates remove what a new version drops instead of leaving stale agents and configs behind. Includes a one-line install script and an in-session update nudge.",defaultOpen:!1,tag:"Setup",glyph:"⟳"},{id:"project-init",title:"Project initialization",tagline:"Blank repo to agent-aware workspace in under a minute.",body:"One init command scaffolds the whole context directory, detects your tech stack, runs token substitution on the templates, and wires up the Claude Code hooks — no manual setup.",defaultOpen:!1,tag:"Setup",glyph:"⊕"},{id:"control-panel",title:"Control panel",tagline:"Configure platforms, packs and vaults in the browser.",body:"The dashboard control panel closes the loop on configuration — edit platforms and skill packs, see which packs are actually installed on disk, manage vaults, and get notified in-app when a newer version ships.",defaultOpen:!1,tag:"Setup",glyph:"⚙"},{id:"multi-review",title:"Multi-review",tagline:"Route a diff to niche reviewers, get one merged report.",body:"A router classifies a diff by domain and dispatches specialist reviewers — security, frontend, cloud functions, edge cases — in parallel; a coordinator dedupes their findings into a single report. Each specialist reviews against your live project rules.",defaultOpen:!1,tag:"Agents",glyph:"⊜"},{id:"continuous-capture",title:"Continuous capture",tagline:"Session digests and auto-bookmarks, searchable next session.",body:"Transcripts are digested and indexed as you work, so a decision from one session is searchable in the next — before any sleep consolidation runs. Capture is down-weighted so it never crowds out curated knowledge.",defaultOpen:!1,tag:"Memory",glyph:"◌"},{id:"context-gate",title:"Context gate",tagline:"Nudges the agent to load relevant skills before it acts.",body:"A prompt-time hook detects when an installed skill is plausibly relevant and injects a directive to review the full skill list and invoke what fits — deliberately not a pre-selected top-N, so the right skill is never anchored out.",defaultOpen:!1,tag:"Skills",glyph:"⊳"},{id:"auto-dashboard",title:"Auto-open dashboard hook",tagline:"The dashboard surfaces itself when it is worth a look.",body:"A hook can open the dashboard at the right moment so the visual view of tasks, knowledge and the brain is one glance away — without you remembering to launch it.",defaultOpen:!1,tag:"Setup",glyph:"◰"},{id:"post-edit-hook",title:"Post-edit format & typecheck",tagline:"Format and typecheck fire automatically after an edit.",body:"A post-edit hook runs your formatter and type checker right after the agent changes a file, so problems surface immediately instead of piling up — keeping the working tree clean as work proceeds.",defaultOpen:!1,tag:"Setup",glyph:"✓"},{id:"marketing-pack",title:"Marketing pack",tagline:"Brand-voice and growth skills for going to market.",body:"A bundled set of go-to-market skills — brand voice, growth, performance marketing — so the same agent that builds a feature can help position and launch it, on-brand.",defaultOpen:!1,tag:"Skills",glyph:"✦"}],mv=vO.filter(i=>i.defaultOpen),UB=vO.filter(i=>!i.defaultOpen),dn=mv.length,Bx=16,Crt=62,krt=.72,_rt=40,wrt=140,Srt=8;function Trt(){const[i,e]=X.useState(0),r=X.useId(),n=X.useRef([]),a=X.useRef([]),o=X.useRef([]),c=X.useRef(null),h=X.useRef(null),u=X.useRef(null),f=X.useRef(!1),p=X.useRef(0),g=_=>`${r}-tab-${_}`,b=_=>`${r}-panel-${_}`,y=X.useCallback(_=>{const w=Math.max(0,Math.min(dn-1,_));w!==p.current&&(p.current=w,e(w))},[]);X.useLayoutEffect(()=>{const _=c.current,w=h.current;if(!_||!w)return;f.current=window.matchMedia("(prefers-reduced-motion: reduce)").matches;const T=_.closest(".shell-main")??null,B=T??window;let E=0;const N=()=>{E=0;const G=_.getBoundingClientRect(),$=T?T.getBoundingClientRect().top:0,z=G.height-w.offsetHeight;if(z<=0)return;const K=Math.max(0,Math.min(1,($+Bx-G.top)/z));u.current&&(u.current.style.transform=`scaleX(${K})`);const W=K*(dn-1);for(let D=0;D<dn;D++){const U=a.current[D];if(!U)continue;const R=D-W,I=Math.abs(R);U.style.opacity=String(Math.max(0,1-I/krt)),U.style.transform=f.current?"none":`translate3d(0, ${R*_rt}px, 0)`;const P=I<.5;U.style.zIndex=P?"2":"1",U.style.pointerEvents=P?"auto":"none";const V=I<1.05;o.current[D]!==V&&(o.current[D]=V,U.classList.toggle("feat-panel--near",V))}y(Math.round(W))};let O=0;const M=()=>{if(!T)return;const G=_.getBoundingClientRect(),$=G.height-w.offsetHeight;if($<=0)return;const z=(T.getBoundingClientRect().top+Bx-G.top)/$;if(z<=.012||z>=.988)return;const W=(Math.round(z*(dn-1))/(dn-1)-z)*$;Math.abs(W)<Srt||T.scrollTo({top:T.scrollTop+W,behavior:f.current?"auto":"smooth"})},j=()=>{E||(E=requestAnimationFrame(N)),O&&clearTimeout(O),O=window.setTimeout(M,wrt)};return B.addEventListener("scroll",j,{passive:!0}),window.addEventListener("resize",j),N(),()=>{B.removeEventListener("scroll",j),window.removeEventListener("resize",j),E&&cancelAnimationFrame(E),O&&clearTimeout(O)}},[y]);const v=X.useCallback(_=>{const w=c.current,T=h.current,B=w==null?void 0:w.closest(".shell-main");if(!w||!T||!B){y(_);return}const E=w.getBoundingClientRect(),N=E.height-T.offsetHeight;if(N<=0){y(_);return}const M=_/(dn-1)*N-(B.getBoundingClientRect().top+Bx-E.top);B.scrollTo({top:B.scrollTop+M,behavior:f.current?"auto":"smooth"})},[y]);function C(_){var T;let w=p.current;if(_.key==="ArrowDown"||_.key==="ArrowRight")w=(p.current+1)%dn;else if(_.key==="ArrowUp"||_.key==="ArrowLeft")w=(p.current-1+dn)%dn;else if(_.key==="Home")w=0;else if(_.key==="End")w=dn-1;else return;_.preventDefault(),y(w),(T=n.current[w])==null||T.focus(),v(w)}return x.jsxs("section",{className:"about-section feat-section",children:[x.jsx("div",{className:"feat-scroller",ref:c,style:{"--feat-track-h":`${dn*Crt}vh`},children:x.jsxs("div",{className:"feat-sticky",ref:h,children:[x.jsx("p",{className:"about-kicker",children:"Everything inside"}),x.jsx("h2",{className:"about-h2",children:"One brain, many faculties."}),x.jsxs("p",{className:"about-section-lead",children:["Every capability dreamcontext gives your agents — ",x.jsx("em",{children:"scroll to move through them, or pick one."})]}),x.jsxs("div",{className:"feat-spotlight",children:[x.jsxs("div",{className:"feat-rail-wrap",children:[x.jsxs("div",{className:"feat-rail-head","aria-hidden":"true",children:[x.jsxs("span",{className:"feat-rail-step",children:[String(i+1).padStart(2,"0")," ",x.jsxs("i",{children:["/ ",String(dn).padStart(2,"0")]})]}),x.jsx("div",{className:"feat-rail-track",children:x.jsx("span",{className:"feat-rail-fill",ref:u})})]}),x.jsx("div",{className:"feat-rail",role:"tablist","aria-orientation":"vertical","aria-label":"Core faculties",onKeyDown:C,children:mv.map((_,w)=>{const T=w===i;return x.jsxs("button",{ref:B=>{n.current[w]=B},id:g(w),role:"tab",type:"button","aria-selected":T,"aria-controls":b(w),tabIndex:T?0:-1,className:`feat-rail-item${T?" feat-rail-item--active":""}`,onClick:()=>{y(w),v(w)},children:[x.jsx("span",{className:"feat-rail-title",children:_.title}),_.tag&&x.jsx("span",{className:"feat-rail-tag",children:_.tag})]},_.id)})})]}),x.jsx("div",{className:"feat-stage",children:mv.map((_,w)=>x.jsxs("div",{ref:T=>{a.current[w]=T},className:"feat-panel",role:"tabpanel",id:b(w),"aria-labelledby":g(w),"aria-hidden":w!==i,tabIndex:w===i?0:-1,children:[x.jsxs("div",{className:"feat-stage-head",children:[_.tag&&x.jsx("span",{className:"feat-stage-chip",children:_.tag}),x.jsx("h3",{className:"feat-stage-title",children:_.title})]}),x.jsx("p",{className:"feat-stage-body",children:_.body}),_.flow&&x.jsx(bm,{spec:_.flow,className:"feat-stage-flow"})]},_.id))})]})]})}),x.jsxs("div",{className:"feat-more",children:[x.jsxs("div",{className:"feat-more-head",children:[x.jsx("span",{className:"feat-more-label",children:"Everything else"}),x.jsx("span",{className:"feat-more-count",children:UB.length})]}),x.jsx("div",{className:"feat-more-grid",children:UB.map(_=>x.jsxs("div",{className:"feat-more-card",children:[x.jsx("span",{className:"feat-more-glyph","aria-hidden":"true",children:_.glyph??"✦"}),x.jsxs("div",{className:"feat-more-meta",children:[x.jsx("span",{className:"feat-more-title",children:_.title}),x.jsx("span",{className:"feat-more-tagline",children:_.tagline})]})]},_.id))})]})]})}const Brt=[{cmd:"dreamcontext init",hint:"# set up the brain"},{cmd:"dreamcontext dashboard",hint:"# open this dashboard"},{cmd:"dreamcontext sleep",hint:"# consolidate the session"}];function Art(){return x.jsxs("section",{className:"closing","aria-labelledby":"closing-heading",children:[x.jsx("h2",{className:"closing-title",id:"closing-heading",children:"So — what is this?"}),x.jsxs("p",{className:"closing-body",children:[x.jsx("strong",{children:"dreamcontext"})," is a small CLI that gives your AI coding agents a structured, persistent brain across sessions. It pre-loads what matters, keeps a living map of your project, and consolidates new knowledge as you go — so you stop paying, every single session, to re-teach the agent what it already learned."]}),x.jsx("div",{className:"closing-cmds",role:"list",children:Brt.map(i=>x.jsxs("div",{className:"closing-cmd",role:"listitem",children:[x.jsx("span",{className:"closing-cmd-c","aria-hidden":"true",children:"$"}),x.jsx("span",{className:"closing-cmd-text",children:i.cmd}),x.jsx("span",{className:"closing-cmd-hint",children:i.hint})]},i.cmd))}),x.jsx("p",{className:"closing-foot",children:"You're looking at the dashboard now. The brain graph, tasks, and sleep state in the sidebar are this project's actual memory — live."})]})}function Ert(){return x.jsxs("div",{className:"about","data-testid":"about-page",children:[x.jsx(Oit,{}),x.jsx(Rit,{}),x.jsx(ert,{}),x.jsx(nrt,{}),x.jsx(srt,{}),x.jsx(ort,{}),x.jsx(crt,{}),x.jsx(Trt,{}),x.jsx(Art,{})]})}const Mrt=new aR({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function Lrt({nav:i}){const e=(r,n)=>{const a={tasks:"tasks",features:"features",knowledge:"knowledge",core:"core"};i.navigate(a[r],n)};switch(i.page){case"brain":return x.jsx(Xet,{onNavigate:e});case"tasks":return x.jsx(xZ,{});case"sleep":return x.jsx(kZ,{});case"core":return x.jsx($Z,{});case"knowledge":return x.jsx(PZ,{});case"features":return x.jsx(HZ,{});case"council":return x.jsx(wit,{});case"settings":return x.jsx(Ait,{});case"packs":return x.jsx(jit,{});case"about":return x.jsx(Ert,{})}}class Nrt extends X.Component{constructor(){super(...arguments);Ht(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?x.jsxs("div",{className:"error-boundary",children:[x.jsx("h1",{children:"Something went wrong."}),x.jsx("p",{children:this.state.error.message}),x.jsx("button",{onClick:()=>window.location.reload(),children:"Reload"})]}):this.props.children}}function jrt(){return x.jsx(Nrt,{children:x.jsx(sR,{client:Mrt,children:x.jsx(wR,{children:x.jsx(xR,{children:x.jsx(vR,{children:x.jsx(VX,{children:i=>x.jsx(Lrt,{nav:i})})})})})})})}R6.createRoot(document.getElementById("root")).render(x.jsx(X.StrictMode,{children:x.jsx(jrt,{})}));export{tE as $,Irt as A,vo as B,UD as C,si as D,e8 as E,b1 as F,HA as G,gH as H,v9 as I,TI as J,aF as K,cf as L,$rt as M,am as N,RF as O,KA as P,Sw as Q,n9 as R,cb as S,pH as T,Lf as U,Hn as V,pt as W,ft as X,HF as Y,sH as Z,A as _,XF as a,zq as a$,t9 as a0,Kw as a1,Zw as a2,Xrt as a3,Urt as a4,Yrt as a5,Grt as a6,Prt as a7,Qv as a8,Vrt as a9,EW as aA,AW as aB,EE as aC,Z7 as aD,NU as aE,FA as aF,e9 as aG,Frt as aH,nm as aI,Cg as aJ,hK as aK,G5 as aL,qg as aM,zf as aN,MU as aO,EU as aP,K7 as aQ,Hv as aR,ao as aS,df as aT,Pw as aU,fz as aV,OP as aW,U5 as aX,F5 as aY,$q as aZ,xg as a_,Hrt as aa,bc as ab,Zrt as ac,Qrt as ad,Wrt as ae,rW as af,rN as ag,pnt as ah,AI as ai,vr as aj,xs as ak,xu as al,v1 as am,K5 as an,Al as ao,iM as ap,re as aq,_a as ar,Dt as as,aG as at,dnt as au,gnt as av,unt as aw,It as ax,fnt as ay,OW as az,VF as b,Bo as b$,yh as b0,tl as b1,EP as b2,bS as b3,Pn as b4,Iq as b5,f1 as b6,Fq as b7,Hq as b8,mh as b9,zJ as bA,Pt as bB,J7 as bC,$J as bD,Sj as bE,YT as bF,yl as bG,lK as bH,it as bI,X as bJ,Ctt as bK,Ott as bL,Rtt as bM,x as bN,GT as bO,eH as bP,VP as bQ,rH as bR,tm as bS,Rq as bT,u1 as bU,H5 as bV,aH as bW,IP as bX,AG as bY,Ff as bZ,vg as b_,jP as ba,iH as bb,Vq as bc,XP as bd,h1 as be,hT as bf,$t as bg,rM as bh,Rr as bi,az as bj,Pv as bk,gE as bl,Rf as bm,xE as bn,qrt as bo,Lw as bp,Mw as bq,HD as br,Li as bs,OQ as bt,Ne as bu,I1 as bv,jtt as bw,Ltt as bx,_tt as by,Ntt as bz,Ae as c,pS as c0,d1 as c1,z5 as c2,Wb as c3,Rrt as c4,Ce as c5,Xt as d,JA as e,Ei as f,ZF as g,gs as h,qn as i,LI as j,Nf as k,_t as l,tM as m,zrt as n,ynt as o,KF as p,JF as q,mnt as r,QF as s,BI as t,Fn as u,_W as v,xH as w,Krt as x,kl as y,YF as z};