@dayinxisheng/zreadbrow 1.3.2 → 1.5.7

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 (76) hide show
  1. package/bin/zreadbrow.js +12 -4
  2. package/dist/public/assets/{_baseUniq-CPDoE7er.js → _baseUniq-BhpQLJeR.js} +1 -1
  3. package/dist/public/assets/{arc-BbhTxmcy.js → arc-CYQdDLfg.js} +1 -1
  4. package/dist/public/assets/{architectureDiagram-Q4EWVU46-CU_-Npf-.js → architectureDiagram-Q4EWVU46-HRrJLD68.js} +1 -1
  5. package/dist/public/assets/{blockDiagram-DXYQGD6D-fpH-DE-6.js → blockDiagram-DXYQGD6D-DRolWTl-.js} +1 -1
  6. package/dist/public/assets/{c4Diagram-AHTNJAMY-DHtUllaa.js → c4Diagram-AHTNJAMY-VVMl6NQD.js} +1 -1
  7. package/dist/public/assets/channel-BAtZJhLP.js +1 -0
  8. package/dist/public/assets/{chunk-4BX2VUAB-FepST6MX.js → chunk-4BX2VUAB-BZp9KA8i.js} +1 -1
  9. package/dist/public/assets/{chunk-4TB4RGXK-BxPnK-Cm.js → chunk-4TB4RGXK-CuyH_pN_.js} +1 -1
  10. package/dist/public/assets/{chunk-55IACEB6-DqdoFdZ3.js → chunk-55IACEB6-BBVWvLWT.js} +1 -1
  11. package/dist/public/assets/{chunk-EDXVE4YY-R75awyzx.js → chunk-EDXVE4YY-Be3RYz3C.js} +1 -1
  12. package/dist/public/assets/{chunk-FMBD7UC4-D5SsROPY.js → chunk-FMBD7UC4-AnnDS3Wd.js} +1 -1
  13. package/dist/public/assets/{chunk-OYMX7WX6-DOyOS6kd.js → chunk-OYMX7WX6-0GXZ74_-.js} +1 -1
  14. package/dist/public/assets/{chunk-QZHKN3VN-DdX-8bfz.js → chunk-QZHKN3VN-C-b3Bvy8.js} +1 -1
  15. package/dist/public/assets/{chunk-YZCP3GAM-2u6FkhaN.js → chunk-YZCP3GAM-Dtz39a49.js} +1 -1
  16. package/dist/public/assets/classDiagram-6PBFFD2Q-BT32A8xg.js +1 -0
  17. package/dist/public/assets/classDiagram-v2-HSJHXN6E-BT32A8xg.js +1 -0
  18. package/dist/public/assets/clone-BlORZGGx.js +1 -0
  19. package/dist/public/assets/{cose-bilkent-S5V4N54A-C9WrFkX6.js → cose-bilkent-S5V4N54A-C9MDV2NH.js} +1 -1
  20. package/dist/public/assets/{dagre-KV5264BT-CsiBELor.js → dagre-KV5264BT-BTehb9Tm.js} +1 -1
  21. package/dist/public/assets/{diagram-5BDNPKRD-BJdSOPb0.js → diagram-5BDNPKRD-CiJX6ZcC.js} +1 -1
  22. package/dist/public/assets/{diagram-G4DWMVQ6-D1__2nn4.js → diagram-G4DWMVQ6-BpjyDML3.js} +1 -1
  23. package/dist/public/assets/{diagram-MMDJMWI5-D5TZZBIo.js → diagram-MMDJMWI5-BMKNKMUb.js} +1 -1
  24. package/dist/public/assets/{diagram-TYMM5635-CVKJLdJj.js → diagram-TYMM5635-BKbsDXU0.js} +1 -1
  25. package/dist/public/assets/{erDiagram-SMLLAGMA-cc8eUNV5.js → erDiagram-SMLLAGMA-ZU2EY7JB.js} +1 -1
  26. package/dist/public/assets/{flowDiagram-DWJPFMVM-zklMEuvT.js → flowDiagram-DWJPFMVM-CDA_xPM_.js} +1 -1
  27. package/dist/public/assets/{ganttDiagram-T4ZO3ILL-DDRsXkg4.js → ganttDiagram-T4ZO3ILL-KhPrE8Ml.js} +1 -1
  28. package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-B-9XFdIx.js → gitGraphDiagram-UUTBAWPF-BI_hKewg.js} +1 -1
  29. package/dist/public/assets/{graph-CT-9-Yxv.js → graph-kob6eZQt.js} +1 -1
  30. package/dist/public/assets/index-6fsPy1BK.js +386 -0
  31. package/dist/public/assets/index-BP3TStZP.css +1 -0
  32. package/dist/public/assets/{infoDiagram-42DDH7IO-CuGRK3Rs.js → infoDiagram-42DDH7IO-CT8ywNfc.js} +1 -1
  33. package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-8Yce7SbN.js → ishikawaDiagram-UXIWVN3A-Du7FsE49.js} +1 -1
  34. package/dist/public/assets/{journeyDiagram-VCZTEJTY-CZ3Rabre.js → journeyDiagram-VCZTEJTY-BImfFl-q.js} +1 -1
  35. package/dist/public/assets/{kanban-definition-6JOO6SKY-BMn0cvU6.js → kanban-definition-6JOO6SKY-BrTdOgPc.js} +1 -1
  36. package/dist/public/assets/{layout-BE_tpkNg.js → layout-DQeJB1CE.js} +1 -1
  37. package/dist/public/assets/{linear-BMHNcSPe.js → linear-ChHoQsc4.js} +1 -1
  38. package/dist/public/assets/{min-DwUXZ4Bb.js → min-V29D1s2x.js} +1 -1
  39. package/dist/public/assets/{mindmap-definition-QFDTVHPH-D0zbBATS.js → mindmap-definition-QFDTVHPH-D7f5Kpux.js} +1 -1
  40. package/dist/public/assets/{pieDiagram-DEJITSTG-DYrHyPT2.js → pieDiagram-DEJITSTG-B0MAcDOI.js} +1 -1
  41. package/dist/public/assets/{quadrantDiagram-34T5L4WZ-C1LMCM9T.js → quadrantDiagram-34T5L4WZ-vCkF5gYE.js} +1 -1
  42. package/dist/public/assets/{requirementDiagram-MS252O5E-DrvV-AW9.js → requirementDiagram-MS252O5E-CUX954Xc.js} +1 -1
  43. package/dist/public/assets/{sankeyDiagram-XADWPNL6-BnK8Hrsk.js → sankeyDiagram-XADWPNL6-5ExQ5oqP.js} +1 -1
  44. package/dist/public/assets/{sequenceDiagram-FGHM5R23-BEicEP4j.js → sequenceDiagram-FGHM5R23-DkcT5kUa.js} +1 -1
  45. package/dist/public/assets/{stateDiagram-FHFEXIEX-BmfbYS3C.js → stateDiagram-FHFEXIEX-BXEFg5IP.js} +1 -1
  46. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-DERLViHP.js +1 -0
  47. package/dist/public/assets/{timeline-definition-GMOUNBTQ-D2wzBWb4.js → timeline-definition-GMOUNBTQ-CLW8y8RH.js} +1 -1
  48. package/dist/public/assets/{vennDiagram-DHZGUBPP-zHzYpF8t.js → vennDiagram-DHZGUBPP-BNAV8mxz.js} +1 -1
  49. package/dist/public/assets/{wardley-RL74JXVD-g6-nQiS2.js → wardley-RL74JXVD-oGXg70Ct.js} +1 -1
  50. package/dist/public/assets/{wardleyDiagram-NUSXRM2D-DKk8z2ft.js → wardleyDiagram-NUSXRM2D-DZmNicBR.js} +1 -1
  51. package/dist/public/assets/{xychartDiagram-5P7HB3ND-B2NjqqEU.js → xychartDiagram-5P7HB3ND-B6uBUjiH.js} +1 -1
  52. package/dist/public/index.html +2 -2
  53. package/dist/server/index.js +1 -1
  54. package/dist/server/middleware/errorHandler.js +1 -1
  55. package/dist/server/routes/ai.js +1 -0
  56. package/dist/server/routes/config.js +1 -1
  57. package/dist/server/routes/files.js +1 -1
  58. package/dist/server/routes/projects.js +1 -1
  59. package/dist/server/routes/scan.js +1 -1
  60. package/dist/server/routes/search.js +1 -1
  61. package/dist/server/routes/wiki.js +1 -1
  62. package/dist/server/services/ai.js +1 -0
  63. package/dist/server/services/config.js +1 -1
  64. package/dist/server/services/logger.js +1 -0
  65. package/dist/server/services/scanner.js +1 -1
  66. package/dist/server/services/search.js +1 -1
  67. package/dist/server/services/wiki-loader.js +1 -1
  68. package/dist/server/services/wire-reader.js +1 -0
  69. package/package.json +1 -1
  70. package/dist/public/assets/channel-DWAnss0H.js +0 -1
  71. package/dist/public/assets/classDiagram-6PBFFD2Q-BpechaYv.js +0 -1
  72. package/dist/public/assets/classDiagram-v2-HSJHXN6E-BpechaYv.js +0 -1
  73. package/dist/public/assets/clone-BlECVuK6.js +0 -1
  74. package/dist/public/assets/index-CajJGCnJ.js +0 -384
  75. package/dist/public/assets/index-J4Mhhrjp.css +0 -1
  76. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-DiwaHt21.js +0 -1
@@ -0,0 +1,386 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-BTehb9Tm.js","assets/graph-kob6eZQt.js","assets/_baseUniq-BhpQLJeR.js","assets/layout-DQeJB1CE.js","assets/min-V29D1s2x.js","assets/clone-BlORZGGx.js","assets/cose-bilkent-S5V4N54A-C9MDV2NH.js","assets/cytoscape.esm-DxGcaOPV.js","assets/c4Diagram-AHTNJAMY-VVMl6NQD.js","assets/chunk-YZCP3GAM-Dtz39a49.js","assets/flowDiagram-DWJPFMVM-CDA_xPM_.js","assets/chunk-FMBD7UC4-AnnDS3Wd.js","assets/chunk-55IACEB6-BBVWvLWT.js","assets/chunk-EDXVE4YY-Be3RYz3C.js","assets/channel-BAtZJhLP.js","assets/erDiagram-SMLLAGMA-ZU2EY7JB.js","assets/gitGraphDiagram-UUTBAWPF-BI_hKewg.js","assets/chunk-4BX2VUAB-BZp9KA8i.js","assets/chunk-QZHKN3VN-C-b3Bvy8.js","assets/wardley-RL74JXVD-oGXg70Ct.js","assets/ganttDiagram-T4ZO3ILL-KhPrE8Ml.js","assets/linear-ChHoQsc4.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-CT8ywNfc.js","assets/pieDiagram-DEJITSTG-B0MAcDOI.js","assets/arc-CYQdDLfg.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-34T5L4WZ-vCkF5gYE.js","assets/xychartDiagram-5P7HB3ND-B6uBUjiH.js","assets/requirementDiagram-MS252O5E-CUX954Xc.js","assets/sequenceDiagram-FGHM5R23-DkcT5kUa.js","assets/classDiagram-6PBFFD2Q-BT32A8xg.js","assets/chunk-4TB4RGXK-CuyH_pN_.js","assets/classDiagram-v2-HSJHXN6E-BT32A8xg.js","assets/stateDiagram-FHFEXIEX-BXEFg5IP.js","assets/chunk-OYMX7WX6-0GXZ74_-.js","assets/stateDiagram-v2-QKLJ7IA2-DERLViHP.js","assets/journeyDiagram-VCZTEJTY-BImfFl-q.js","assets/timeline-definition-GMOUNBTQ-CLW8y8RH.js","assets/mindmap-definition-QFDTVHPH-D7f5Kpux.js","assets/kanban-definition-6JOO6SKY-BrTdOgPc.js","assets/sankeyDiagram-XADWPNL6-5ExQ5oqP.js","assets/diagram-TYMM5635-BKbsDXU0.js","assets/diagram-MMDJMWI5-BMKNKMUb.js","assets/blockDiagram-DXYQGD6D-DRolWTl-.js","assets/diagram-5BDNPKRD-CiJX6ZcC.js","assets/architectureDiagram-Q4EWVU46-HRrJLD68.js","assets/diagram-G4DWMVQ6-BpjyDML3.js","assets/wardleyDiagram-NUSXRM2D-DZmNicBR.js"])))=>i.map(i=>d[i]);
2
+ var FE=Object.defineProperty;var ME=(e,t,r)=>t in e?FE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pe=(e,t,r)=>ME(e,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function r(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=r(n);fetch(n.href,s)}})();function ec(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wV(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),r}var ep={exports:{}},il={},rp={exports:{}},Zt={};/**
3
+ * @license React
4
+ * react.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its 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 r1;function IE(){if(r1)return Zt;r1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function m(W){return W===null||typeof W!="object"?null:(W=f&&W[f]||W["@@iterator"],typeof W=="function"?W:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function k(W,et,D){this.props=W,this.context=et,this.refs=C,this.updater=D||g}k.prototype.isReactComponent={},k.prototype.setState=function(W,et){if(typeof W!="object"&&typeof W!="function"&&W!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,W,et,"setState")},k.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function v(){}v.prototype=k.prototype;function T(W,et,D){this.props=W,this.context=et,this.refs=C,this.updater=D||g}var B=T.prototype=new v;B.constructor=T,x(B,k.prototype),B.isPureReactComponent=!0;var M=Array.isArray,O=Object.prototype.hasOwnProperty,F={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function z(W,et,D){var yt,pt={},Ct=null,Dt=null;if(et!=null)for(yt in et.ref!==void 0&&(Dt=et.ref),et.key!==void 0&&(Ct=""+et.key),et)O.call(et,yt)&&!E.hasOwnProperty(yt)&&(pt[yt]=et[yt]);var Mt=arguments.length-2;if(Mt===1)pt.children=D;else if(1<Mt){for(var Yt=Array(Mt),xt=0;xt<Mt;xt++)Yt[xt]=arguments[xt+2];pt.children=Yt}if(W&&W.defaultProps)for(yt in Mt=W.defaultProps,Mt)pt[yt]===void 0&&(pt[yt]=Mt[yt]);return{$$typeof:e,type:W,key:Ct,ref:Dt,props:pt,_owner:F.current}}function K(W,et){return{$$typeof:e,type:W.type,key:et,ref:W.ref,props:W.props,_owner:W._owner}}function P(W){return typeof W=="object"&&W!==null&&W.$$typeof===e}function N(W){var et={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(D){return et[D]})}var Z=/\/+/g;function it(W,et){return typeof W=="object"&&W!==null&&W.key!=null?N(""+W.key):et.toString(36)}function V(W,et,D,yt,pt){var Ct=typeof W;(Ct==="undefined"||Ct==="boolean")&&(W=null);var Dt=!1;if(W===null)Dt=!0;else switch(Ct){case"string":case"number":Dt=!0;break;case"object":switch(W.$$typeof){case e:case t:Dt=!0}}if(Dt)return Dt=W,pt=pt(Dt),W=yt===""?"."+it(Dt,0):yt,M(pt)?(D="",W!=null&&(D=W.replace(Z,"$&/")+"/"),V(pt,et,D,"",function(xt){return xt})):pt!=null&&(P(pt)&&(pt=K(pt,D+(!pt.key||Dt&&Dt.key===pt.key?"":(""+pt.key).replace(Z,"$&/")+"/")+W)),et.push(pt)),1;if(Dt=0,yt=yt===""?".":yt+":",M(W))for(var Mt=0;Mt<W.length;Mt++){Ct=W[Mt];var Yt=yt+it(Ct,Mt);Dt+=V(Ct,et,D,Yt,pt)}else if(Yt=m(W),typeof Yt=="function")for(W=Yt.call(W),Mt=0;!(Ct=W.next()).done;)Ct=Ct.value,Yt=yt+it(Ct,Mt++),Dt+=V(Ct,et,D,Yt,pt);else if(Ct==="object")throw et=String(W),Error("Objects are not valid as a React child (found: "+(et==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":et)+"). If you meant to render a collection of children, use an array instead.");return Dt}function j(W,et,D){if(W==null)return W;var yt=[],pt=0;return V(W,yt,"","",function(Ct){return et.call(D,Ct,pt++)}),yt}function q(W){if(W._status===-1){var et=W._result;et=et(),et.then(function(D){(W._status===0||W._status===-1)&&(W._status=1,W._result=D)},function(D){(W._status===0||W._status===-1)&&(W._status=2,W._result=D)}),W._status===-1&&(W._status=0,W._result=et)}if(W._status===1)return W._result.default;throw W._result}var Y={current:null},R={transition:null},J={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:R,ReactCurrentOwner:F};function I(){throw Error("act(...) is not supported in production builds of React.")}return Zt.Children={map:j,forEach:function(W,et,D){j(W,function(){et.apply(this,arguments)},D)},count:function(W){var et=0;return j(W,function(){et++}),et},toArray:function(W){return j(W,function(et){return et})||[]},only:function(W){if(!P(W))throw Error("React.Children.only expected to receive a single React element child.");return W}},Zt.Component=k,Zt.Fragment=r,Zt.Profiler=n,Zt.PureComponent=T,Zt.StrictMode=i,Zt.Suspense=h,Zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Zt.act=I,Zt.cloneElement=function(W,et,D){if(W==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+W+".");var yt=x({},W.props),pt=W.key,Ct=W.ref,Dt=W._owner;if(et!=null){if(et.ref!==void 0&&(Ct=et.ref,Dt=F.current),et.key!==void 0&&(pt=""+et.key),W.type&&W.type.defaultProps)var Mt=W.type.defaultProps;for(Yt in et)O.call(et,Yt)&&!E.hasOwnProperty(Yt)&&(yt[Yt]=et[Yt]===void 0&&Mt!==void 0?Mt[Yt]:et[Yt])}var Yt=arguments.length-2;if(Yt===1)yt.children=D;else if(1<Yt){Mt=Array(Yt);for(var xt=0;xt<Yt;xt++)Mt[xt]=arguments[xt+2];yt.children=Mt}return{$$typeof:e,type:W.type,key:pt,ref:Ct,props:yt,_owner:Dt}},Zt.createContext=function(W){return W={$$typeof:a,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},W.Provider={$$typeof:s,_context:W},W.Consumer=W},Zt.createElement=z,Zt.createFactory=function(W){var et=z.bind(null,W);return et.type=W,et},Zt.createRef=function(){return{current:null}},Zt.forwardRef=function(W){return{$$typeof:c,render:W}},Zt.isValidElement=P,Zt.lazy=function(W){return{$$typeof:d,_payload:{_status:-1,_result:W},_init:q}},Zt.memo=function(W,et){return{$$typeof:u,type:W,compare:et===void 0?null:et}},Zt.startTransition=function(W){var et=R.transition;R.transition={};try{W()}finally{R.transition=et}},Zt.unstable_act=I,Zt.useCallback=function(W,et){return Y.current.useCallback(W,et)},Zt.useContext=function(W){return Y.current.useContext(W)},Zt.useDebugValue=function(){},Zt.useDeferredValue=function(W){return Y.current.useDeferredValue(W)},Zt.useEffect=function(W,et){return Y.current.useEffect(W,et)},Zt.useId=function(){return Y.current.useId()},Zt.useImperativeHandle=function(W,et,D){return Y.current.useImperativeHandle(W,et,D)},Zt.useInsertionEffect=function(W,et){return Y.current.useInsertionEffect(W,et)},Zt.useLayoutEffect=function(W,et){return Y.current.useLayoutEffect(W,et)},Zt.useMemo=function(W,et){return Y.current.useMemo(W,et)},Zt.useReducer=function(W,et,D){return Y.current.useReducer(W,et,D)},Zt.useRef=function(W){return Y.current.useRef(W)},Zt.useState=function(W){return Y.current.useState(W)},Zt.useSyncExternalStore=function(W,et,D){return Y.current.useSyncExternalStore(W,et,D)},Zt.useTransition=function(){return Y.current.useTransition()},Zt.version="18.3.1",Zt}var i1;function hm(){return i1||(i1=1,rp.exports=IE()),rp.exports}/**
11
+ * @license React
12
+ * react-jsx-runtime.production.min.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its 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 n1;function PE(){if(n1)return il;n1=1;var e=hm(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(c,h,u){var d,f={},m=null,g=null;u!==void 0&&(m=""+u),h.key!==void 0&&(m=""+h.key),h.ref!==void 0&&(g=h.ref);for(d in h)i.call(h,d)&&!s.hasOwnProperty(d)&&(f[d]=h[d]);if(c&&c.defaultProps)for(d in h=c.defaultProps,h)f[d]===void 0&&(f[d]=h[d]);return{$$typeof:t,type:c,key:m,ref:g,props:f,_owner:n.current}}return il.Fragment=r,il.jsx=a,il.jsxs=a,il}var o1;function OE(){return o1||(o1=1,ep.exports=PE()),ep.exports}var _=OE(),at=hm();const yn=ec(at);var Sh={},ip={exports:{}},Mr={},np={exports:{}},op={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its 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 s1;function DE(){return s1||(s1=1,(function(e){function t(R,J){var I=R.length;R.push(J);t:for(;0<I;){var W=I-1>>>1,et=R[W];if(0<n(et,J))R[W]=J,R[I]=et,I=W;else break t}}function r(R){return R.length===0?null:R[0]}function i(R){if(R.length===0)return null;var J=R[0],I=R.pop();if(I!==J){R[0]=I;t:for(var W=0,et=R.length,D=et>>>1;W<D;){var yt=2*(W+1)-1,pt=R[yt],Ct=yt+1,Dt=R[Ct];if(0>n(pt,I))Ct<et&&0>n(Dt,pt)?(R[W]=Dt,R[Ct]=I,W=Ct):(R[W]=pt,R[yt]=I,W=yt);else if(Ct<et&&0>n(Dt,I))R[W]=Dt,R[Ct]=I,W=Ct;else break t}}return J}function n(R,J){var I=R.sortIndex-J.sortIndex;return I!==0?I:R.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var h=[],u=[],d=1,f=null,m=3,g=!1,x=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(R){for(var J=r(u);J!==null;){if(J.callback===null)i(u);else if(J.startTime<=R)i(u),J.sortIndex=J.expirationTime,t(h,J);else break;J=r(u)}}function M(R){if(C=!1,B(R),!x)if(r(h)!==null)x=!0,q(O);else{var J=r(u);J!==null&&Y(M,J.startTime-R)}}function O(R,J){x=!1,C&&(C=!1,v(z),z=-1),g=!0;var I=m;try{for(B(J),f=r(h);f!==null&&(!(f.expirationTime>J)||R&&!N());){var W=f.callback;if(typeof W=="function"){f.callback=null,m=f.priorityLevel;var et=W(f.expirationTime<=J);J=e.unstable_now(),typeof et=="function"?f.callback=et:f===r(h)&&i(h),B(J)}else i(h);f=r(h)}if(f!==null)var D=!0;else{var yt=r(u);yt!==null&&Y(M,yt.startTime-J),D=!1}return D}finally{f=null,m=I,g=!1}}var F=!1,E=null,z=-1,K=5,P=-1;function N(){return!(e.unstable_now()-P<K)}function Z(){if(E!==null){var R=e.unstable_now();P=R;var J=!0;try{J=E(!0,R)}finally{J?it():(F=!1,E=null)}}else F=!1}var it;if(typeof T=="function")it=function(){T(Z)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,j=V.port2;V.port1.onmessage=Z,it=function(){j.postMessage(null)}}else it=function(){k(Z,0)};function q(R){E=R,F||(F=!0,it())}function Y(R,J){z=k(function(){R(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){x||g||(x=!0,q(O))},e.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"):K=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(h)},e.unstable_next=function(R){switch(m){case 1:case 2:case 3:var J=3;break;default:J=m}var I=m;m=J;try{return R()}finally{m=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,J){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var I=m;m=R;try{return J()}finally{m=I}},e.unstable_scheduleCallback=function(R,J,I){var W=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?W+I:W):I=W,R){case 1:var et=-1;break;case 2:et=250;break;case 5:et=1073741823;break;case 4:et=1e4;break;default:et=5e3}return et=I+et,R={id:d++,callback:J,priorityLevel:R,startTime:I,expirationTime:et,sortIndex:-1},I>W?(R.sortIndex=I,t(u,R),r(h)===null&&R===r(u)&&(C?(v(z),z=-1):C=!0,Y(M,I-W))):(R.sortIndex=et,t(h,R),x||g||(x=!0,q(O))),R},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(R){var J=m;return function(){var I=m;m=J;try{return R.apply(this,arguments)}finally{m=I}}}})(op)),op}var a1;function RE(){return a1||(a1=1,np.exports=DE()),np.exports}/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its 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 l1;function $E(){if(l1)return Mr;l1=1;var e=hm(),t=RE();function r(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,p=1;p<arguments.length;p++)l+="&args[]="+encodeURIComponent(arguments[p]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,n={};function s(o,l){a(o,l),a(o+"Capture",l)}function a(o,l){for(n[o]=l,o=0;o<l.length;o++)i.add(l[o])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,u=/^[: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]*$/,d={},f={};function m(o){return h.call(f,o)?!0:h.call(d,o)?!1:u.test(o)?f[o]=!0:(d[o]=!0,!1)}function g(o,l,p,y){if(p!==null&&p.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return y?!1:p!==null?!p.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function x(o,l,p,y){if(l===null||typeof l>"u"||g(o,l,p,y))return!0;if(y)return!1;if(p!==null)switch(p.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function C(o,l,p,y,b,S,A){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=y,this.attributeNamespace=b,this.mustUseProperty=p,this.propertyName=o,this.type=l,this.sanitizeURL=S,this.removeEmptyString=A}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){k[o]=new C(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];k[l]=new C(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){k[o]=new C(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){k[o]=new C(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){k[o]=new C(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){k[o]=new C(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){k[o]=new C(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){k[o]=new C(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){k[o]=new C(o,5,!1,o.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function T(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var l=o.replace(v,T);k[l]=new C(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(v,T);k[l]=new C(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(v,T);k[l]=new C(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){k[o]=new C(o,1,!1,o.toLowerCase(),null,!1,!1)}),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){k[o]=new C(o,1,!1,o.toLowerCase(),null,!0,!0)});function B(o,l,p,y){var b=k.hasOwnProperty(l)?k[l]:null;(b!==null?b.type!==0:y||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(x(l,p,b,y)&&(p=null),y||b===null?m(l)&&(p===null?o.removeAttribute(l):o.setAttribute(l,""+p)):b.mustUseProperty?o[b.propertyName]=p===null?b.type===3?!1:"":p:(l=b.attributeName,y=b.attributeNamespace,p===null?o.removeAttribute(l):(b=b.type,p=b===3||b===4&&p===!0?"":""+p,y?o.setAttributeNS(y,l,p):o.setAttribute(l,p))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),F=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),N=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),it=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),R=Symbol.iterator;function J(o){return o===null||typeof o!="object"?null:(o=R&&o[R]||o["@@iterator"],typeof o=="function"?o:null)}var I=Object.assign,W;function et(o){if(W===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);W=l&&l[1]||""}return`
35
+ `+W+o}var D=!1;function yt(o,l){if(!o||D)return"";D=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(rt){var y=rt}Reflect.construct(o,[],l)}else{try{l.call()}catch(rt){y=rt}o.call(l.prototype)}else{try{throw Error()}catch(rt){y=rt}o()}}catch(rt){if(rt&&y&&typeof rt.stack=="string"){for(var b=rt.stack.split(`
36
+ `),S=y.stack.split(`
37
+ `),A=b.length-1,$=S.length-1;1<=A&&0<=$&&b[A]!==S[$];)$--;for(;1<=A&&0<=$;A--,$--)if(b[A]!==S[$]){if(A!==1||$!==1)do if(A--,$--,0>$||b[A]!==S[$]){var H=`
38
+ `+b[A].replace(" at new "," at ");return o.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",o.displayName)),H}while(1<=A&&0<=$);break}}}finally{D=!1,Error.prepareStackTrace=p}return(o=o?o.displayName||o.name:"")?et(o):""}function pt(o){switch(o.tag){case 5:return et(o.type);case 16:return et("Lazy");case 13:return et("Suspense");case 19:return et("SuspenseList");case 0:case 2:case 15:return o=yt(o.type,!1),o;case 11:return o=yt(o.type.render,!1),o;case 1:return o=yt(o.type,!0),o;default:return""}}function Ct(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case E:return"Fragment";case F:return"Portal";case K:return"Profiler";case z:return"StrictMode";case it:return"Suspense";case V:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case N:return(o.displayName||"Context")+".Consumer";case P:return(o._context.displayName||"Context")+".Provider";case Z:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case j:return l=o.displayName||null,l!==null?l:Ct(o.type)||"Memo";case q:l=o._payload,o=o._init;try{return Ct(o(l))}catch{}}return null}function Dt(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ct(l);case 8:return l===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function Mt(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Yt(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function xt(o){var l=Yt(o)?"checked":"value",p=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),y=""+o[l];if(!o.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var b=p.get,S=p.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return b.call(this)},set:function(A){y=""+A,S.call(this,A)}}),Object.defineProperty(o,l,{enumerable:p.enumerable}),{getValue:function(){return y},setValue:function(A){y=""+A},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Ot(o){o._valueTracker||(o._valueTracker=xt(o))}function se(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var p=l.getValue(),y="";return o&&(y=Yt(o)?o.checked?"true":"false":o.value),o=y,o!==p?(l.setValue(o),!0):!1}function le(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Ue(o,l){var p=l.checked;return I({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??o._wrapperState.initialChecked})}function Le(o,l){var p=l.defaultValue==null?"":l.defaultValue,y=l.checked!=null?l.checked:l.defaultChecked;p=Mt(l.value!=null?l.value:p),o._wrapperState={initialChecked:y,initialValue:p,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Jr(o,l){l=l.checked,l!=null&&B(o,"checked",l,!1)}function fi(o,l){Jr(o,l);var p=Mt(l.value),y=l.type;if(p!=null)y==="number"?(p===0&&o.value===""||o.value!=p)&&(o.value=""+p):o.value!==""+p&&(o.value=""+p);else if(y==="submit"||y==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?pi(o,l.type,p):l.hasOwnProperty("defaultValue")&&pi(o,l.type,Mt(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function mr(o,l,p){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var y=l.type;if(!(y!=="submit"&&y!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,p||l===o.value||(o.value=l),o.defaultValue=l}p=o.name,p!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,p!==""&&(o.name=p)}function pi(o,l,p){(l!=="number"||le(o.ownerDocument)!==o)&&(p==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+p&&(o.defaultValue=""+p))}var zr=Array.isArray;function gi(o,l,p,y){if(o=o.options,l){l={};for(var b=0;b<p.length;b++)l["$"+p[b]]=!0;for(p=0;p<o.length;p++)b=l.hasOwnProperty("$"+o[p].value),o[p].selected!==b&&(o[p].selected=b),b&&y&&(o[p].defaultSelected=!0)}else{for(p=""+Mt(p),l=null,b=0;b<o.length;b++){if(o[b].value===p){o[b].selected=!0,y&&(o[b].defaultSelected=!0);return}l!==null||o[b].disabled||(l=o[b])}l!==null&&(l.selected=!0)}}function Bn(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return I({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function ts(o,l){var p=l.value;if(p==null){if(p=l.children,l=l.defaultValue,p!=null){if(l!=null)throw Error(r(92));if(zr(p)){if(1<p.length)throw Error(r(93));p=p[0]}l=p}l==null&&(l=""),p=l}o._wrapperState={initialValue:Mt(p)}}function Ln(o,l){var p=Mt(l.value),y=Mt(l.defaultValue);p!=null&&(p=""+p,p!==o.value&&(o.value=p),l.defaultValue==null&&o.defaultValue!==p&&(o.defaultValue=p)),y!=null&&(o.defaultValue=""+y)}function Ri(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function st(o){switch(o){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function dt(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?st(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Rt,Gt=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,p,y,b){MSApp.execUnsafeLocalFunction(function(){return o(l,p,y,b)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(Rt=Rt||document.createElement("div"),Rt.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=Rt.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function ee(o,l){if(l){var p=o.firstChild;if(p&&p===o.lastChild&&p.nodeType===3){p.nodeValue=l;return}}o.textContent=l}var Ie={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ti=["Webkit","ms","Moz","O"];Object.keys(Ie).forEach(function(o){ti.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Ie[l]=Ie[o]})});function Ke(o,l,p){return l==null||typeof l=="boolean"||l===""?"":p||typeof l!="number"||l===0||Ie.hasOwnProperty(o)&&Ie[o]?(""+l).trim():l+"px"}function Nr(o,l){o=o.style;for(var p in l)if(l.hasOwnProperty(p)){var y=p.indexOf("--")===0,b=Ke(p,l[p],y);p==="float"&&(p="cssFloat"),y?o.setProperty(p,b):o[p]=b}}var Ze=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(o,l){if(l){if(Ze[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function _r(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){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 Je=null;function ya(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var En=null,mi=null,An=null;function Fn(o){if(o=Wa(o)){if(typeof En!="function")throw Error(r(280));var l=o.stateNode;l&&(l=zc(l),En(o.stateNode,o.type,l))}}function mc(o){mi?An?An.push(o):An=[o]:mi=o}function yc(){if(mi){var o=mi,l=An;if(An=mi=null,Fn(o),l)for(o=0;o<l.length;o++)Fn(l[o])}}function Ee(o,l){return o(l)}function rn(){}var xa=!1;function Ca(o,l,p){if(xa)return o(l,p);xa=!0;try{return Ee(o,l,p)}finally{xa=!1,(mi!==null||An!==null)&&(rn(),yc())}}function nn(o,l){var p=o.stateNode;if(p===null)return null;var y=zc(p);if(y===null)return null;p=y[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":(y=!y.disabled)||(o=o.type,y=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!y;break t;default:o=!1}if(o)return null;if(p&&typeof p!="function")throw Error(r(231,l,typeof p));return p}var es=!1;if(c)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){es=!0}}),window.addEventListener("test",Mn,Mn),window.removeEventListener("test",Mn,Mn)}catch{es=!1}function kd(o,l,p,y,b,S,A,$,H){var rt=Array.prototype.slice.call(arguments,3);try{l.apply(p,rt)}catch(ht){this.onError(ht)}}var nr=!1,ei=null,po=!1,rs=null,ka={onError:function(o){nr=!0,ei=o}};function xc(o,l,p,y,b,S,A,$,H){nr=!1,ei=null,kd.apply(ka,arguments)}function yi(o,l,p,y,b,S,A,$,H){if(xc.apply(this,arguments),nr){if(nr){var rt=ei;nr=!1,ei=null}else throw Error(r(198));po||(po=!0,rs=rt)}}function $i(o){var l=o,p=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(p=l.return),o=l.return;while(o)}return l.tag===3?p:null}function ba(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function va(o){if($i(o)!==o)throw Error(r(188))}function Cc(o){var l=o.alternate;if(!l){if(l=$i(o),l===null)throw Error(r(188));return l!==o?null:o}for(var p=o,y=l;;){var b=p.return;if(b===null)break;var S=b.alternate;if(S===null){if(y=b.return,y!==null){p=y;continue}break}if(b.child===S.child){for(S=b.child;S;){if(S===p)return va(b),o;if(S===y)return va(b),l;S=S.sibling}throw Error(r(188))}if(p.return!==y.return)p=b,y=S;else{for(var A=!1,$=b.child;$;){if($===p){A=!0,p=b,y=S;break}if($===y){A=!0,y=b,p=S;break}$=$.sibling}if(!A){for($=S.child;$;){if($===p){A=!0,p=S,y=b;break}if($===y){A=!0,y=S,p=b;break}$=$.sibling}if(!A)throw Error(r(189))}}if(p.alternate!==y)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?o:l}function kc(o){return o=Cc(o),o!==null?It(o):null}function It(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=It(o);if(l!==null)return l;o=o.sibling}return null}var U=t.unstable_scheduleCallback,ft=t.unstable_cancelCallback,St=t.unstable_shouldYield,me=t.unstable_requestPaint,Kt=t.unstable_now,Ae=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,ri=t.unstable_UserBlockingPriority,xi=t.unstable_NormalPriority,wa=t.unstable_LowPriority,De=t.unstable_IdlePriority,go=null,jr=null;function VB(o){if(jr&&typeof jr.onCommitFiberRoot=="function")try{jr.onCommitFiberRoot(go,o,void 0,(o.current.flags&128)===128)}catch{}}var Ci=Math.clz32?Math.clz32:XB,YB=Math.log,GB=Math.LN2;function XB(o){return o>>>=0,o===0?32:31-(YB(o)/GB|0)|0}var bc=64,vc=4194304;function Sa(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function wc(o,l){var p=o.pendingLanes;if(p===0)return 0;var y=0,b=o.suspendedLanes,S=o.pingedLanes,A=p&268435455;if(A!==0){var $=A&~b;$!==0?y=Sa($):(S&=A,S!==0&&(y=Sa(S)))}else A=p&~b,A!==0?y=Sa(A):S!==0&&(y=Sa(S));if(y===0)return 0;if(l!==0&&l!==y&&(l&b)===0&&(b=y&-y,S=l&-l,b>=S||b===16&&(S&4194240)!==0))return l;if((y&4)!==0&&(y|=p&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=y;0<l;)p=31-Ci(l),b=1<<p,y|=o[p],l&=~b;return y}function QB(o,l){switch(o){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function KB(o,l){for(var p=o.suspendedLanes,y=o.pingedLanes,b=o.expirationTimes,S=o.pendingLanes;0<S;){var A=31-Ci(S),$=1<<A,H=b[A];H===-1?(($&p)===0||($&y)!==0)&&(b[A]=QB($,l)):H<=l&&(o.expiredLanes|=$),S&=~$}}function bd(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function Iy(){var o=bc;return bc<<=1,(bc&4194240)===0&&(bc=64),o}function vd(o){for(var l=[],p=0;31>p;p++)l.push(o);return l}function Ta(o,l,p){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-Ci(l),o[l]=p}function ZB(o,l){var p=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var y=o.eventTimes;for(o=o.expirationTimes;0<p;){var b=31-Ci(p),S=1<<b;l[b]=0,y[b]=-1,o[b]=-1,p&=~S}}function wd(o,l){var p=o.entangledLanes|=l;for(o=o.entanglements;p;){var y=31-Ci(p),b=1<<y;b&l|o[y]&l&&(o[y]|=l),p&=~b}}var fe=0;function Py(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var Oy,Sd,Dy,Ry,$y,Td=!1,Sc=[],In=null,Pn=null,On=null,_a=new Map,Ba=new Map,Dn=[],JB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function zy(o,l){switch(o){case"focusin":case"focusout":In=null;break;case"dragenter":case"dragleave":Pn=null;break;case"mouseover":case"mouseout":On=null;break;case"pointerover":case"pointerout":_a.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(l.pointerId)}}function La(o,l,p,y,b,S){return o===null||o.nativeEvent!==S?(o={blockedOn:l,domEventName:p,eventSystemFlags:y,nativeEvent:S,targetContainers:[b]},l!==null&&(l=Wa(l),l!==null&&Sd(l)),o):(o.eventSystemFlags|=y,l=o.targetContainers,b!==null&&l.indexOf(b)===-1&&l.push(b),o)}function tL(o,l,p,y,b){switch(l){case"focusin":return In=La(In,o,l,p,y,b),!0;case"dragenter":return Pn=La(Pn,o,l,p,y,b),!0;case"mouseover":return On=La(On,o,l,p,y,b),!0;case"pointerover":var S=b.pointerId;return _a.set(S,La(_a.get(S)||null,o,l,p,y,b)),!0;case"gotpointercapture":return S=b.pointerId,Ba.set(S,La(Ba.get(S)||null,o,l,p,y,b)),!0}return!1}function Ny(o){var l=mo(o.target);if(l!==null){var p=$i(l);if(p!==null){if(l=p.tag,l===13){if(l=ba(p),l!==null){o.blockedOn=l,$y(o.priority,function(){Dy(p)});return}}else if(l===3&&p.stateNode.current.memoizedState.isDehydrated){o.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Tc(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var p=Bd(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(p===null){p=o.nativeEvent;var y=new p.constructor(p.type,p);Je=y,p.target.dispatchEvent(y),Je=null}else return l=Wa(p),l!==null&&Sd(l),o.blockedOn=p,!1;l.shift()}return!0}function jy(o,l,p){Tc(o)&&p.delete(l)}function eL(){Td=!1,In!==null&&Tc(In)&&(In=null),Pn!==null&&Tc(Pn)&&(Pn=null),On!==null&&Tc(On)&&(On=null),_a.forEach(jy),Ba.forEach(jy)}function Ea(o,l){o.blockedOn===l&&(o.blockedOn=null,Td||(Td=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,eL)))}function Aa(o){function l(b){return Ea(b,o)}if(0<Sc.length){Ea(Sc[0],o);for(var p=1;p<Sc.length;p++){var y=Sc[p];y.blockedOn===o&&(y.blockedOn=null)}}for(In!==null&&Ea(In,o),Pn!==null&&Ea(Pn,o),On!==null&&Ea(On,o),_a.forEach(l),Ba.forEach(l),p=0;p<Dn.length;p++)y=Dn[p],y.blockedOn===o&&(y.blockedOn=null);for(;0<Dn.length&&(p=Dn[0],p.blockedOn===null);)Ny(p),p.blockedOn===null&&Dn.shift()}var is=M.ReactCurrentBatchConfig,_c=!0;function rL(o,l,p,y){var b=fe,S=is.transition;is.transition=null;try{fe=1,_d(o,l,p,y)}finally{fe=b,is.transition=S}}function iL(o,l,p,y){var b=fe,S=is.transition;is.transition=null;try{fe=4,_d(o,l,p,y)}finally{fe=b,is.transition=S}}function _d(o,l,p,y){if(_c){var b=Bd(o,l,p,y);if(b===null)Hd(o,l,y,Bc,p),zy(o,y);else if(tL(b,o,l,p,y))y.stopPropagation();else if(zy(o,y),l&4&&-1<JB.indexOf(o)){for(;b!==null;){var S=Wa(b);if(S!==null&&Oy(S),S=Bd(o,l,p,y),S===null&&Hd(o,l,y,Bc,p),S===b)break;b=S}b!==null&&y.stopPropagation()}else Hd(o,l,y,null,p)}}var Bc=null;function Bd(o,l,p,y){if(Bc=null,o=ya(y),o=mo(o),o!==null)if(l=$i(o),l===null)o=null;else if(p=l.tag,p===13){if(o=ba(l),o!==null)return o;o=null}else if(p===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return Bc=o,null}function Wy(o){switch(o){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ae()){case Ve:return 1;case ri:return 4;case xi:case wa:return 16;case De:return 536870912;default:return 16}default:return 16}}var Rn=null,Ld=null,Lc=null;function qy(){if(Lc)return Lc;var o,l=Ld,p=l.length,y,b="value"in Rn?Rn.value:Rn.textContent,S=b.length;for(o=0;o<p&&l[o]===b[o];o++);var A=p-o;for(y=1;y<=A&&l[p-y]===b[S-y];y++);return Lc=b.slice(o,1<y?1-y:void 0)}function Ec(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function Ac(){return!0}function Hy(){return!1}function Wr(o){function l(p,y,b,S,A){this._reactName=p,this._targetInst=b,this.type=y,this.nativeEvent=S,this.target=A,this.currentTarget=null;for(var $ in o)o.hasOwnProperty($)&&(p=o[$],this[$]=p?p(S):S[$]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Ac:Hy,this.isPropagationStopped=Hy,this}return I(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=Ac)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=Ac)},persist:function(){},isPersistent:Ac}),l}var ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ed=Wr(ns),Fa=I({},ns,{view:0,detail:0}),nL=Wr(Fa),Ad,Fd,Ma,Fc=I({},Fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Id,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Ma&&(Ma&&o.type==="mousemove"?(Ad=o.screenX-Ma.screenX,Fd=o.screenY-Ma.screenY):Fd=Ad=0,Ma=o),Ad)},movementY:function(o){return"movementY"in o?o.movementY:Fd}}),Uy=Wr(Fc),oL=I({},Fc,{dataTransfer:0}),sL=Wr(oL),aL=I({},Fa,{relatedTarget:0}),Md=Wr(aL),lL=I({},ns,{animationName:0,elapsedTime:0,pseudoElement:0}),cL=Wr(lL),hL=I({},ns,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),uL=Wr(hL),dL=I({},ns,{data:0}),Vy=Wr(dL),fL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pL={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"},gL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mL(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=gL[o])?!!l[o]:!1}function Id(){return mL}var yL=I({},Fa,{key:function(o){if(o.key){var l=fL[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Ec(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?pL[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Id,charCode:function(o){return o.type==="keypress"?Ec(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Ec(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),xL=Wr(yL),CL=I({},Fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yy=Wr(CL),kL=I({},Fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Id}),bL=Wr(kL),vL=I({},ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),wL=Wr(vL),SL=I({},Fc,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),TL=Wr(SL),_L=[9,13,27,32],Pd=c&&"CompositionEvent"in window,Ia=null;c&&"documentMode"in document&&(Ia=document.documentMode);var BL=c&&"TextEvent"in window&&!Ia,Gy=c&&(!Pd||Ia&&8<Ia&&11>=Ia),Xy=" ",Qy=!1;function Ky(o,l){switch(o){case"keyup":return _L.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zy(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var os=!1;function LL(o,l){switch(o){case"compositionend":return Zy(l);case"keypress":return l.which!==32?null:(Qy=!0,Xy);case"textInput":return o=l.data,o===Xy&&Qy?null:o;default:return null}}function EL(o,l){if(os)return o==="compositionend"||!Pd&&Ky(o,l)?(o=qy(),Lc=Ld=Rn=null,os=!1,o):null;switch(o){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 Gy&&l.locale!=="ko"?null:l.data;default:return null}}var AL={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 Jy(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!AL[o.type]:l==="textarea"}function tx(o,l,p,y){mc(y),l=Dc(l,"onChange"),0<l.length&&(p=new Ed("onChange","change",null,p,y),o.push({event:p,listeners:l}))}var Pa=null,Oa=null;function FL(o){xx(o,0)}function Mc(o){var l=hs(o);if(se(l))return o}function ML(o,l){if(o==="change")return l}var ex=!1;if(c){var Od;if(c){var Dd="oninput"in document;if(!Dd){var rx=document.createElement("div");rx.setAttribute("oninput","return;"),Dd=typeof rx.oninput=="function"}Od=Dd}else Od=!1;ex=Od&&(!document.documentMode||9<document.documentMode)}function ix(){Pa&&(Pa.detachEvent("onpropertychange",nx),Oa=Pa=null)}function nx(o){if(o.propertyName==="value"&&Mc(Oa)){var l=[];tx(l,Oa,o,ya(o)),Ca(FL,l)}}function IL(o,l,p){o==="focusin"?(ix(),Pa=l,Oa=p,Pa.attachEvent("onpropertychange",nx)):o==="focusout"&&ix()}function PL(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Mc(Oa)}function OL(o,l){if(o==="click")return Mc(l)}function DL(o,l){if(o==="input"||o==="change")return Mc(l)}function RL(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var ki=typeof Object.is=="function"?Object.is:RL;function Da(o,l){if(ki(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var p=Object.keys(o),y=Object.keys(l);if(p.length!==y.length)return!1;for(y=0;y<p.length;y++){var b=p[y];if(!h.call(l,b)||!ki(o[b],l[b]))return!1}return!0}function ox(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function sx(o,l){var p=ox(o);o=0;for(var y;p;){if(p.nodeType===3){if(y=o+p.textContent.length,o<=l&&y>=l)return{node:p,offset:l-o};o=y}t:{for(;p;){if(p.nextSibling){p=p.nextSibling;break t}p=p.parentNode}p=void 0}p=ox(p)}}function ax(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?ax(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function lx(){for(var o=window,l=le();l instanceof o.HTMLIFrameElement;){try{var p=typeof l.contentWindow.location.href=="string"}catch{p=!1}if(p)o=l.contentWindow;else break;l=le(o.document)}return l}function Rd(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function $L(o){var l=lx(),p=o.focusedElem,y=o.selectionRange;if(l!==p&&p&&p.ownerDocument&&ax(p.ownerDocument.documentElement,p)){if(y!==null&&Rd(p)){if(l=y.start,o=y.end,o===void 0&&(o=l),"selectionStart"in p)p.selectionStart=l,p.selectionEnd=Math.min(o,p.value.length);else if(o=(l=p.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var b=p.textContent.length,S=Math.min(y.start,b);y=y.end===void 0?S:Math.min(y.end,b),!o.extend&&S>y&&(b=y,y=S,S=b),b=sx(p,S);var A=sx(p,y);b&&A&&(o.rangeCount!==1||o.anchorNode!==b.node||o.anchorOffset!==b.offset||o.focusNode!==A.node||o.focusOffset!==A.offset)&&(l=l.createRange(),l.setStart(b.node,b.offset),o.removeAllRanges(),S>y?(o.addRange(l),o.extend(A.node,A.offset)):(l.setEnd(A.node,A.offset),o.addRange(l)))}}for(l=[],o=p;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<l.length;p++)o=l[p],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var zL=c&&"documentMode"in document&&11>=document.documentMode,ss=null,$d=null,Ra=null,zd=!1;function cx(o,l,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;zd||ss==null||ss!==le(y)||(y=ss,"selectionStart"in y&&Rd(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Ra&&Da(Ra,y)||(Ra=y,y=Dc($d,"onSelect"),0<y.length&&(l=new Ed("onSelect","select",null,l,p),o.push({event:l,listeners:y}),l.target=ss)))}function Ic(o,l){var p={};return p[o.toLowerCase()]=l.toLowerCase(),p["Webkit"+o]="webkit"+l,p["Moz"+o]="moz"+l,p}var as={animationend:Ic("Animation","AnimationEnd"),animationiteration:Ic("Animation","AnimationIteration"),animationstart:Ic("Animation","AnimationStart"),transitionend:Ic("Transition","TransitionEnd")},Nd={},hx={};c&&(hx=document.createElement("div").style,"AnimationEvent"in window||(delete as.animationend.animation,delete as.animationiteration.animation,delete as.animationstart.animation),"TransitionEvent"in window||delete as.transitionend.transition);function Pc(o){if(Nd[o])return Nd[o];if(!as[o])return o;var l=as[o],p;for(p in l)if(l.hasOwnProperty(p)&&p in hx)return Nd[o]=l[p];return o}var ux=Pc("animationend"),dx=Pc("animationiteration"),fx=Pc("animationstart"),px=Pc("transitionend"),gx=new Map,mx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $n(o,l){gx.set(o,l),s(l,[o])}for(var jd=0;jd<mx.length;jd++){var Wd=mx[jd],NL=Wd.toLowerCase(),jL=Wd[0].toUpperCase()+Wd.slice(1);$n(NL,"on"+jL)}$n(ux,"onAnimationEnd"),$n(dx,"onAnimationIteration"),$n(fx,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(px,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $a="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(" "),WL=new Set("cancel close invalid load scroll toggle".split(" ").concat($a));function yx(o,l,p){var y=o.type||"unknown-event";o.currentTarget=p,yi(y,l,void 0,o),o.currentTarget=null}function xx(o,l){l=(l&4)!==0;for(var p=0;p<o.length;p++){var y=o[p],b=y.event;y=y.listeners;t:{var S=void 0;if(l)for(var A=y.length-1;0<=A;A--){var $=y[A],H=$.instance,rt=$.currentTarget;if($=$.listener,H!==S&&b.isPropagationStopped())break t;yx(b,$,rt),S=H}else for(A=0;A<y.length;A++){if($=y[A],H=$.instance,rt=$.currentTarget,$=$.listener,H!==S&&b.isPropagationStopped())break t;yx(b,$,rt),S=H}}}if(po)throw o=rs,po=!1,rs=null,o}function Ce(o,l){var p=l[Qd];p===void 0&&(p=l[Qd]=new Set);var y=o+"__bubble";p.has(y)||(Cx(l,o,2,!1),p.add(y))}function qd(o,l,p){var y=0;l&&(y|=4),Cx(p,o,y,l)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function za(o){if(!o[Oc]){o[Oc]=!0,i.forEach(function(p){p!=="selectionchange"&&(WL.has(p)||qd(p,!1,o),qd(p,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Oc]||(l[Oc]=!0,qd("selectionchange",!1,l))}}function Cx(o,l,p,y){switch(Wy(l)){case 1:var b=rL;break;case 4:b=iL;break;default:b=_d}p=b.bind(null,l,p,o),b=void 0,!es||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(b=!0),y?b!==void 0?o.addEventListener(l,p,{capture:!0,passive:b}):o.addEventListener(l,p,!0):b!==void 0?o.addEventListener(l,p,{passive:b}):o.addEventListener(l,p,!1)}function Hd(o,l,p,y,b){var S=y;if((l&1)===0&&(l&2)===0&&y!==null)t:for(;;){if(y===null)return;var A=y.tag;if(A===3||A===4){var $=y.stateNode.containerInfo;if($===b||$.nodeType===8&&$.parentNode===b)break;if(A===4)for(A=y.return;A!==null;){var H=A.tag;if((H===3||H===4)&&(H=A.stateNode.containerInfo,H===b||H.nodeType===8&&H.parentNode===b))return;A=A.return}for(;$!==null;){if(A=mo($),A===null)return;if(H=A.tag,H===5||H===6){y=S=A;continue t}$=$.parentNode}}y=y.return}Ca(function(){var rt=S,ht=ya(p),ut=[];t:{var ct=gx.get(o);if(ct!==void 0){var kt=Ed,wt=o;switch(o){case"keypress":if(Ec(p)===0)break t;case"keydown":case"keyup":kt=xL;break;case"focusin":wt="focus",kt=Md;break;case"focusout":wt="blur",kt=Md;break;case"beforeblur":case"afterblur":kt=Md;break;case"click":if(p.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":kt=Uy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":kt=sL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":kt=bL;break;case ux:case dx:case fx:kt=cL;break;case px:kt=wL;break;case"scroll":kt=nL;break;case"wheel":kt=TL;break;case"copy":case"cut":case"paste":kt=uL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":kt=Yy}var _t=(l&4)!==0,Pe=!_t&&o==="scroll",Q=_t?ct!==null?ct+"Capture":null:ct;_t=[];for(var G=rt,tt;G!==null;){tt=G;var mt=tt.stateNode;if(tt.tag===5&&mt!==null&&(tt=mt,Q!==null&&(mt=nn(G,Q),mt!=null&&_t.push(Na(G,mt,tt)))),Pe)break;G=G.return}0<_t.length&&(ct=new kt(ct,wt,null,p,ht),ut.push({event:ct,listeners:_t}))}}if((l&7)===0){t:{if(ct=o==="mouseover"||o==="pointerover",kt=o==="mouseout"||o==="pointerout",ct&&p!==Je&&(wt=p.relatedTarget||p.fromElement)&&(mo(wt)||wt[on]))break t;if((kt||ct)&&(ct=ht.window===ht?ht:(ct=ht.ownerDocument)?ct.defaultView||ct.parentWindow:window,kt?(wt=p.relatedTarget||p.toElement,kt=rt,wt=wt?mo(wt):null,wt!==null&&(Pe=$i(wt),wt!==Pe||wt.tag!==5&&wt.tag!==6)&&(wt=null)):(kt=null,wt=rt),kt!==wt)){if(_t=Uy,mt="onMouseLeave",Q="onMouseEnter",G="mouse",(o==="pointerout"||o==="pointerover")&&(_t=Yy,mt="onPointerLeave",Q="onPointerEnter",G="pointer"),Pe=kt==null?ct:hs(kt),tt=wt==null?ct:hs(wt),ct=new _t(mt,G+"leave",kt,p,ht),ct.target=Pe,ct.relatedTarget=tt,mt=null,mo(ht)===rt&&(_t=new _t(Q,G+"enter",wt,p,ht),_t.target=tt,_t.relatedTarget=Pe,mt=_t),Pe=mt,kt&&wt)e:{for(_t=kt,Q=wt,G=0,tt=_t;tt;tt=ls(tt))G++;for(tt=0,mt=Q;mt;mt=ls(mt))tt++;for(;0<G-tt;)_t=ls(_t),G--;for(;0<tt-G;)Q=ls(Q),tt--;for(;G--;){if(_t===Q||Q!==null&&_t===Q.alternate)break e;_t=ls(_t),Q=ls(Q)}_t=null}else _t=null;kt!==null&&kx(ut,ct,kt,_t,!1),wt!==null&&Pe!==null&&kx(ut,Pe,wt,_t,!0)}}t:{if(ct=rt?hs(rt):window,kt=ct.nodeName&&ct.nodeName.toLowerCase(),kt==="select"||kt==="input"&&ct.type==="file")var At=ML;else if(Jy(ct))if(ex)At=DL;else{At=PL;var $t=IL}else(kt=ct.nodeName)&&kt.toLowerCase()==="input"&&(ct.type==="checkbox"||ct.type==="radio")&&(At=OL);if(At&&(At=At(o,rt))){tx(ut,At,p,ht);break t}$t&&$t(o,ct,rt),o==="focusout"&&($t=ct._wrapperState)&&$t.controlled&&ct.type==="number"&&pi(ct,"number",ct.value)}switch($t=rt?hs(rt):window,o){case"focusin":(Jy($t)||$t.contentEditable==="true")&&(ss=$t,$d=rt,Ra=null);break;case"focusout":Ra=$d=ss=null;break;case"mousedown":zd=!0;break;case"contextmenu":case"mouseup":case"dragend":zd=!1,cx(ut,p,ht);break;case"selectionchange":if(zL)break;case"keydown":case"keyup":cx(ut,p,ht)}var zt;if(Pd)t:{switch(o){case"compositionstart":var Ut="onCompositionStart";break t;case"compositionend":Ut="onCompositionEnd";break t;case"compositionupdate":Ut="onCompositionUpdate";break t}Ut=void 0}else os?Ky(o,p)&&(Ut="onCompositionEnd"):o==="keydown"&&p.keyCode===229&&(Ut="onCompositionStart");Ut&&(Gy&&p.locale!=="ko"&&(os||Ut!=="onCompositionStart"?Ut==="onCompositionEnd"&&os&&(zt=qy()):(Rn=ht,Ld="value"in Rn?Rn.value:Rn.textContent,os=!0)),$t=Dc(rt,Ut),0<$t.length&&(Ut=new Vy(Ut,o,null,p,ht),ut.push({event:Ut,listeners:$t}),zt?Ut.data=zt:(zt=Zy(p),zt!==null&&(Ut.data=zt)))),(zt=BL?LL(o,p):EL(o,p))&&(rt=Dc(rt,"onBeforeInput"),0<rt.length&&(ht=new Vy("onBeforeInput","beforeinput",null,p,ht),ut.push({event:ht,listeners:rt}),ht.data=zt))}xx(ut,l)})}function Na(o,l,p){return{instance:o,listener:l,currentTarget:p}}function Dc(o,l){for(var p=l+"Capture",y=[];o!==null;){var b=o,S=b.stateNode;b.tag===5&&S!==null&&(b=S,S=nn(o,p),S!=null&&y.unshift(Na(o,S,b)),S=nn(o,l),S!=null&&y.push(Na(o,S,b))),o=o.return}return y}function ls(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function kx(o,l,p,y,b){for(var S=l._reactName,A=[];p!==null&&p!==y;){var $=p,H=$.alternate,rt=$.stateNode;if(H!==null&&H===y)break;$.tag===5&&rt!==null&&($=rt,b?(H=nn(p,S),H!=null&&A.unshift(Na(p,H,$))):b||(H=nn(p,S),H!=null&&A.push(Na(p,H,$)))),p=p.return}A.length!==0&&o.push({event:l,listeners:A})}var qL=/\r\n?/g,HL=/\u0000|\uFFFD/g;function bx(o){return(typeof o=="string"?o:""+o).replace(qL,`
39
+ `).replace(HL,"")}function Rc(o,l,p){if(l=bx(l),bx(o)!==l&&p)throw Error(r(425))}function $c(){}var Ud=null,Vd=null;function Yd(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Gd=typeof setTimeout=="function"?setTimeout:void 0,UL=typeof clearTimeout=="function"?clearTimeout:void 0,vx=typeof Promise=="function"?Promise:void 0,VL=typeof queueMicrotask=="function"?queueMicrotask:typeof vx<"u"?function(o){return vx.resolve(null).then(o).catch(YL)}:Gd;function YL(o){setTimeout(function(){throw o})}function Xd(o,l){var p=l,y=0;do{var b=p.nextSibling;if(o.removeChild(p),b&&b.nodeType===8)if(p=b.data,p==="/$"){if(y===0){o.removeChild(b),Aa(l);return}y--}else p!=="$"&&p!=="$?"&&p!=="$!"||y++;p=b}while(p);Aa(l)}function zn(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return o}function wx(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var p=o.data;if(p==="$"||p==="$!"||p==="$?"){if(l===0)return o;l--}else p==="/$"&&l++}o=o.previousSibling}return null}var cs=Math.random().toString(36).slice(2),zi="__reactFiber$"+cs,ja="__reactProps$"+cs,on="__reactContainer$"+cs,Qd="__reactEvents$"+cs,GL="__reactListeners$"+cs,XL="__reactHandles$"+cs;function mo(o){var l=o[zi];if(l)return l;for(var p=o.parentNode;p;){if(l=p[on]||p[zi]){if(p=l.alternate,l.child!==null||p!==null&&p.child!==null)for(o=wx(o);o!==null;){if(p=o[zi])return p;o=wx(o)}return l}o=p,p=o.parentNode}return null}function Wa(o){return o=o[zi]||o[on],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function hs(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(r(33))}function zc(o){return o[ja]||null}var Kd=[],us=-1;function Nn(o){return{current:o}}function ke(o){0>us||(o.current=Kd[us],Kd[us]=null,us--)}function ye(o,l){us++,Kd[us]=o.current,o.current=l}var jn={},or=Nn(jn),Br=Nn(!1),yo=jn;function ds(o,l){var p=o.type.contextTypes;if(!p)return jn;var y=o.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===l)return y.__reactInternalMemoizedMaskedChildContext;var b={},S;for(S in p)b[S]=l[S];return y&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=b),b}function Lr(o){return o=o.childContextTypes,o!=null}function Nc(){ke(Br),ke(or)}function Sx(o,l,p){if(or.current!==jn)throw Error(r(168));ye(or,l),ye(Br,p)}function Tx(o,l,p){var y=o.stateNode;if(l=l.childContextTypes,typeof y.getChildContext!="function")return p;y=y.getChildContext();for(var b in y)if(!(b in l))throw Error(r(108,Dt(o)||"Unknown",b));return I({},p,y)}function jc(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||jn,yo=or.current,ye(or,o),ye(Br,Br.current),!0}function _x(o,l,p){var y=o.stateNode;if(!y)throw Error(r(169));p?(o=Tx(o,l,yo),y.__reactInternalMemoizedMergedChildContext=o,ke(Br),ke(or),ye(or,o)):ke(Br),ye(Br,p)}var sn=null,Wc=!1,Zd=!1;function Bx(o){sn===null?sn=[o]:sn.push(o)}function QL(o){Wc=!0,Bx(o)}function Wn(){if(!Zd&&sn!==null){Zd=!0;var o=0,l=fe;try{var p=sn;for(fe=1;o<p.length;o++){var y=p[o];do y=y(!0);while(y!==null)}sn=null,Wc=!1}catch(b){throw sn!==null&&(sn=sn.slice(o+1)),U(Ve,Wn),b}finally{fe=l,Zd=!1}}return null}var fs=[],ps=0,qc=null,Hc=0,ii=[],ni=0,xo=null,an=1,ln="";function Co(o,l){fs[ps++]=Hc,fs[ps++]=qc,qc=o,Hc=l}function Lx(o,l,p){ii[ni++]=an,ii[ni++]=ln,ii[ni++]=xo,xo=o;var y=an;o=ln;var b=32-Ci(y)-1;y&=~(1<<b),p+=1;var S=32-Ci(l)+b;if(30<S){var A=b-b%5;S=(y&(1<<A)-1).toString(32),y>>=A,b-=A,an=1<<32-Ci(l)+b|p<<b|y,ln=S+o}else an=1<<S|p<<b|y,ln=o}function Jd(o){o.return!==null&&(Co(o,1),Lx(o,1,0))}function tf(o){for(;o===qc;)qc=fs[--ps],fs[ps]=null,Hc=fs[--ps],fs[ps]=null;for(;o===xo;)xo=ii[--ni],ii[ni]=null,ln=ii[--ni],ii[ni]=null,an=ii[--ni],ii[ni]=null}var qr=null,Hr=null,we=!1,bi=null;function Ex(o,l){var p=li(5,null,null,0);p.elementType="DELETED",p.stateNode=l,p.return=o,l=o.deletions,l===null?(o.deletions=[p],o.flags|=16):l.push(p)}function Ax(o,l){switch(o.tag){case 5:var p=o.type;return l=l.nodeType!==1||p.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,qr=o,Hr=zn(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,qr=o,Hr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(p=xo!==null?{id:an,overflow:ln}:null,o.memoizedState={dehydrated:l,treeContext:p,retryLane:1073741824},p=li(18,null,null,0),p.stateNode=l,p.return=o,o.child=p,qr=o,Hr=null,!0):!1;default:return!1}}function ef(o){return(o.mode&1)!==0&&(o.flags&128)===0}function rf(o){if(we){var l=Hr;if(l){var p=l;if(!Ax(o,l)){if(ef(o))throw Error(r(418));l=zn(p.nextSibling);var y=qr;l&&Ax(o,l)?Ex(y,p):(o.flags=o.flags&-4097|2,we=!1,qr=o)}}else{if(ef(o))throw Error(r(418));o.flags=o.flags&-4097|2,we=!1,qr=o}}}function Fx(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;qr=o}function Uc(o){if(o!==qr)return!1;if(!we)return Fx(o),we=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!Yd(o.type,o.memoizedProps)),l&&(l=Hr)){if(ef(o))throw Mx(),Error(r(418));for(;l;)Ex(o,l),l=zn(l.nextSibling)}if(Fx(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));t:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8){var p=o.data;if(p==="/$"){if(l===0){Hr=zn(o.nextSibling);break t}l--}else p!=="$"&&p!=="$!"&&p!=="$?"||l++}o=o.nextSibling}Hr=null}}else Hr=qr?zn(o.stateNode.nextSibling):null;return!0}function Mx(){for(var o=Hr;o;)o=zn(o.nextSibling)}function gs(){Hr=qr=null,we=!1}function nf(o){bi===null?bi=[o]:bi.push(o)}var KL=M.ReactCurrentBatchConfig;function qa(o,l,p){if(o=p.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(p._owner){if(p=p._owner,p){if(p.tag!==1)throw Error(r(309));var y=p.stateNode}if(!y)throw Error(r(147,o));var b=y,S=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===S?l.ref:(l=function(A){var $=b.refs;A===null?delete $[S]:$[S]=A},l._stringRef=S,l)}if(typeof o!="string")throw Error(r(284));if(!p._owner)throw Error(r(290,o))}return o}function Vc(o,l){throw o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function Ix(o){var l=o._init;return l(o._payload)}function Px(o){function l(Q,G){if(o){var tt=Q.deletions;tt===null?(Q.deletions=[G],Q.flags|=16):tt.push(G)}}function p(Q,G){if(!o)return null;for(;G!==null;)l(Q,G),G=G.sibling;return null}function y(Q,G){for(Q=new Map;G!==null;)G.key!==null?Q.set(G.key,G):Q.set(G.index,G),G=G.sibling;return Q}function b(Q,G){return Q=Qn(Q,G),Q.index=0,Q.sibling=null,Q}function S(Q,G,tt){return Q.index=tt,o?(tt=Q.alternate,tt!==null?(tt=tt.index,tt<G?(Q.flags|=2,G):tt):(Q.flags|=2,G)):(Q.flags|=1048576,G)}function A(Q){return o&&Q.alternate===null&&(Q.flags|=2),Q}function $(Q,G,tt,mt){return G===null||G.tag!==6?(G=Xf(tt,Q.mode,mt),G.return=Q,G):(G=b(G,tt),G.return=Q,G)}function H(Q,G,tt,mt){var At=tt.type;return At===E?ht(Q,G,tt.props.children,mt,tt.key):G!==null&&(G.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===q&&Ix(At)===G.type)?(mt=b(G,tt.props),mt.ref=qa(Q,G,tt),mt.return=Q,mt):(mt=mh(tt.type,tt.key,tt.props,null,Q.mode,mt),mt.ref=qa(Q,G,tt),mt.return=Q,mt)}function rt(Q,G,tt,mt){return G===null||G.tag!==4||G.stateNode.containerInfo!==tt.containerInfo||G.stateNode.implementation!==tt.implementation?(G=Qf(tt,Q.mode,mt),G.return=Q,G):(G=b(G,tt.children||[]),G.return=Q,G)}function ht(Q,G,tt,mt,At){return G===null||G.tag!==7?(G=Bo(tt,Q.mode,mt,At),G.return=Q,G):(G=b(G,tt),G.return=Q,G)}function ut(Q,G,tt){if(typeof G=="string"&&G!==""||typeof G=="number")return G=Xf(""+G,Q.mode,tt),G.return=Q,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case O:return tt=mh(G.type,G.key,G.props,null,Q.mode,tt),tt.ref=qa(Q,null,G),tt.return=Q,tt;case F:return G=Qf(G,Q.mode,tt),G.return=Q,G;case q:var mt=G._init;return ut(Q,mt(G._payload),tt)}if(zr(G)||J(G))return G=Bo(G,Q.mode,tt,null),G.return=Q,G;Vc(Q,G)}return null}function ct(Q,G,tt,mt){var At=G!==null?G.key:null;if(typeof tt=="string"&&tt!==""||typeof tt=="number")return At!==null?null:$(Q,G,""+tt,mt);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case O:return tt.key===At?H(Q,G,tt,mt):null;case F:return tt.key===At?rt(Q,G,tt,mt):null;case q:return At=tt._init,ct(Q,G,At(tt._payload),mt)}if(zr(tt)||J(tt))return At!==null?null:ht(Q,G,tt,mt,null);Vc(Q,tt)}return null}function kt(Q,G,tt,mt,At){if(typeof mt=="string"&&mt!==""||typeof mt=="number")return Q=Q.get(tt)||null,$(G,Q,""+mt,At);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case O:return Q=Q.get(mt.key===null?tt:mt.key)||null,H(G,Q,mt,At);case F:return Q=Q.get(mt.key===null?tt:mt.key)||null,rt(G,Q,mt,At);case q:var $t=mt._init;return kt(Q,G,tt,$t(mt._payload),At)}if(zr(mt)||J(mt))return Q=Q.get(tt)||null,ht(G,Q,mt,At,null);Vc(G,mt)}return null}function wt(Q,G,tt,mt){for(var At=null,$t=null,zt=G,Ut=G=0,Xe=null;zt!==null&&Ut<tt.length;Ut++){zt.index>Ut?(Xe=zt,zt=null):Xe=zt.sibling;var ce=ct(Q,zt,tt[Ut],mt);if(ce===null){zt===null&&(zt=Xe);break}o&&zt&&ce.alternate===null&&l(Q,zt),G=S(ce,G,Ut),$t===null?At=ce:$t.sibling=ce,$t=ce,zt=Xe}if(Ut===tt.length)return p(Q,zt),we&&Co(Q,Ut),At;if(zt===null){for(;Ut<tt.length;Ut++)zt=ut(Q,tt[Ut],mt),zt!==null&&(G=S(zt,G,Ut),$t===null?At=zt:$t.sibling=zt,$t=zt);return we&&Co(Q,Ut),At}for(zt=y(Q,zt);Ut<tt.length;Ut++)Xe=kt(zt,Q,Ut,tt[Ut],mt),Xe!==null&&(o&&Xe.alternate!==null&&zt.delete(Xe.key===null?Ut:Xe.key),G=S(Xe,G,Ut),$t===null?At=Xe:$t.sibling=Xe,$t=Xe);return o&&zt.forEach(function(Kn){return l(Q,Kn)}),we&&Co(Q,Ut),At}function _t(Q,G,tt,mt){var At=J(tt);if(typeof At!="function")throw Error(r(150));if(tt=At.call(tt),tt==null)throw Error(r(151));for(var $t=At=null,zt=G,Ut=G=0,Xe=null,ce=tt.next();zt!==null&&!ce.done;Ut++,ce=tt.next()){zt.index>Ut?(Xe=zt,zt=null):Xe=zt.sibling;var Kn=ct(Q,zt,ce.value,mt);if(Kn===null){zt===null&&(zt=Xe);break}o&&zt&&Kn.alternate===null&&l(Q,zt),G=S(Kn,G,Ut),$t===null?At=Kn:$t.sibling=Kn,$t=Kn,zt=Xe}if(ce.done)return p(Q,zt),we&&Co(Q,Ut),At;if(zt===null){for(;!ce.done;Ut++,ce=tt.next())ce=ut(Q,ce.value,mt),ce!==null&&(G=S(ce,G,Ut),$t===null?At=ce:$t.sibling=ce,$t=ce);return we&&Co(Q,Ut),At}for(zt=y(Q,zt);!ce.done;Ut++,ce=tt.next())ce=kt(zt,Q,Ut,ce.value,mt),ce!==null&&(o&&ce.alternate!==null&&zt.delete(ce.key===null?Ut:ce.key),G=S(ce,G,Ut),$t===null?At=ce:$t.sibling=ce,$t=ce);return o&&zt.forEach(function(AE){return l(Q,AE)}),we&&Co(Q,Ut),At}function Pe(Q,G,tt,mt){if(typeof tt=="object"&&tt!==null&&tt.type===E&&tt.key===null&&(tt=tt.props.children),typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case O:t:{for(var At=tt.key,$t=G;$t!==null;){if($t.key===At){if(At=tt.type,At===E){if($t.tag===7){p(Q,$t.sibling),G=b($t,tt.props.children),G.return=Q,Q=G;break t}}else if($t.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===q&&Ix(At)===$t.type){p(Q,$t.sibling),G=b($t,tt.props),G.ref=qa(Q,$t,tt),G.return=Q,Q=G;break t}p(Q,$t);break}else l(Q,$t);$t=$t.sibling}tt.type===E?(G=Bo(tt.props.children,Q.mode,mt,tt.key),G.return=Q,Q=G):(mt=mh(tt.type,tt.key,tt.props,null,Q.mode,mt),mt.ref=qa(Q,G,tt),mt.return=Q,Q=mt)}return A(Q);case F:t:{for($t=tt.key;G!==null;){if(G.key===$t)if(G.tag===4&&G.stateNode.containerInfo===tt.containerInfo&&G.stateNode.implementation===tt.implementation){p(Q,G.sibling),G=b(G,tt.children||[]),G.return=Q,Q=G;break t}else{p(Q,G);break}else l(Q,G);G=G.sibling}G=Qf(tt,Q.mode,mt),G.return=Q,Q=G}return A(Q);case q:return $t=tt._init,Pe(Q,G,$t(tt._payload),mt)}if(zr(tt))return wt(Q,G,tt,mt);if(J(tt))return _t(Q,G,tt,mt);Vc(Q,tt)}return typeof tt=="string"&&tt!==""||typeof tt=="number"?(tt=""+tt,G!==null&&G.tag===6?(p(Q,G.sibling),G=b(G,tt),G.return=Q,Q=G):(p(Q,G),G=Xf(tt,Q.mode,mt),G.return=Q,Q=G),A(Q)):p(Q,G)}return Pe}var ms=Px(!0),Ox=Px(!1),Yc=Nn(null),Gc=null,ys=null,of=null;function sf(){of=ys=Gc=null}function af(o){var l=Yc.current;ke(Yc),o._currentValue=l}function lf(o,l,p){for(;o!==null;){var y=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,y!==null&&(y.childLanes|=l)):y!==null&&(y.childLanes&l)!==l&&(y.childLanes|=l),o===p)break;o=o.return}}function xs(o,l){Gc=o,of=ys=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(Er=!0),o.firstContext=null)}function oi(o){var l=o._currentValue;if(of!==o)if(o={context:o,memoizedValue:l,next:null},ys===null){if(Gc===null)throw Error(r(308));ys=o,Gc.dependencies={lanes:0,firstContext:o}}else ys=ys.next=o;return l}var ko=null;function cf(o){ko===null?ko=[o]:ko.push(o)}function Dx(o,l,p,y){var b=l.interleaved;return b===null?(p.next=p,cf(l)):(p.next=b.next,b.next=p),l.interleaved=p,cn(o,y)}function cn(o,l){o.lanes|=l;var p=o.alternate;for(p!==null&&(p.lanes|=l),p=o,o=o.return;o!==null;)o.childLanes|=l,p=o.alternate,p!==null&&(p.childLanes|=l),p=o,o=o.return;return p.tag===3?p.stateNode:null}var qn=!1;function hf(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rx(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function hn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Hn(o,l,p){var y=o.updateQueue;if(y===null)return null;if(y=y.shared,(ae&2)!==0){var b=y.pending;return b===null?l.next=l:(l.next=b.next,b.next=l),y.pending=l,cn(o,p)}return b=y.interleaved,b===null?(l.next=l,cf(y)):(l.next=b.next,b.next=l),y.interleaved=l,cn(o,p)}function Xc(o,l,p){if(l=l.updateQueue,l!==null&&(l=l.shared,(p&4194240)!==0)){var y=l.lanes;y&=o.pendingLanes,p|=y,l.lanes=p,wd(o,p)}}function $x(o,l){var p=o.updateQueue,y=o.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var b=null,S=null;if(p=p.firstBaseUpdate,p!==null){do{var A={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};S===null?b=S=A:S=S.next=A,p=p.next}while(p!==null);S===null?b=S=l:S=S.next=l}else b=S=l;p={baseState:y.baseState,firstBaseUpdate:b,lastBaseUpdate:S,shared:y.shared,effects:y.effects},o.updateQueue=p;return}o=p.lastBaseUpdate,o===null?p.firstBaseUpdate=l:o.next=l,p.lastBaseUpdate=l}function Qc(o,l,p,y){var b=o.updateQueue;qn=!1;var S=b.firstBaseUpdate,A=b.lastBaseUpdate,$=b.shared.pending;if($!==null){b.shared.pending=null;var H=$,rt=H.next;H.next=null,A===null?S=rt:A.next=rt,A=H;var ht=o.alternate;ht!==null&&(ht=ht.updateQueue,$=ht.lastBaseUpdate,$!==A&&($===null?ht.firstBaseUpdate=rt:$.next=rt,ht.lastBaseUpdate=H))}if(S!==null){var ut=b.baseState;A=0,ht=rt=H=null,$=S;do{var ct=$.lane,kt=$.eventTime;if((y&ct)===ct){ht!==null&&(ht=ht.next={eventTime:kt,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});t:{var wt=o,_t=$;switch(ct=l,kt=p,_t.tag){case 1:if(wt=_t.payload,typeof wt=="function"){ut=wt.call(kt,ut,ct);break t}ut=wt;break t;case 3:wt.flags=wt.flags&-65537|128;case 0:if(wt=_t.payload,ct=typeof wt=="function"?wt.call(kt,ut,ct):wt,ct==null)break t;ut=I({},ut,ct);break t;case 2:qn=!0}}$.callback!==null&&$.lane!==0&&(o.flags|=64,ct=b.effects,ct===null?b.effects=[$]:ct.push($))}else kt={eventTime:kt,lane:ct,tag:$.tag,payload:$.payload,callback:$.callback,next:null},ht===null?(rt=ht=kt,H=ut):ht=ht.next=kt,A|=ct;if($=$.next,$===null){if($=b.shared.pending,$===null)break;ct=$,$=ct.next,ct.next=null,b.lastBaseUpdate=ct,b.shared.pending=null}}while(!0);if(ht===null&&(H=ut),b.baseState=H,b.firstBaseUpdate=rt,b.lastBaseUpdate=ht,l=b.shared.interleaved,l!==null){b=l;do A|=b.lane,b=b.next;while(b!==l)}else S===null&&(b.shared.lanes=0);wo|=A,o.lanes=A,o.memoizedState=ut}}function zx(o,l,p){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var y=o[l],b=y.callback;if(b!==null){if(y.callback=null,y=p,typeof b!="function")throw Error(r(191,b));b.call(y)}}}var Ha={},Ni=Nn(Ha),Ua=Nn(Ha),Va=Nn(Ha);function bo(o){if(o===Ha)throw Error(r(174));return o}function uf(o,l){switch(ye(Va,l),ye(Ua,o),ye(Ni,Ha),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:dt(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=dt(l,o)}ke(Ni),ye(Ni,l)}function Cs(){ke(Ni),ke(Ua),ke(Va)}function Nx(o){bo(Va.current);var l=bo(Ni.current),p=dt(l,o.type);l!==p&&(ye(Ua,o),ye(Ni,p))}function df(o){Ua.current===o&&(ke(Ni),ke(Ua))}var Te=Nn(0);function Kc(o){for(var l=o;l!==null;){if(l.tag===13){var p=l.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||p.data==="$?"||p.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var ff=[];function pf(){for(var o=0;o<ff.length;o++)ff[o]._workInProgressVersionPrimary=null;ff.length=0}var Zc=M.ReactCurrentDispatcher,gf=M.ReactCurrentBatchConfig,vo=0,_e=null,Ne=null,Ye=null,Jc=!1,Ya=!1,Ga=0,ZL=0;function sr(){throw Error(r(321))}function mf(o,l){if(l===null)return!1;for(var p=0;p<l.length&&p<o.length;p++)if(!ki(o[p],l[p]))return!1;return!0}function yf(o,l,p,y,b,S){if(vo=S,_e=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Zc.current=o===null||o.memoizedState===null?rE:iE,o=p(y,b),Ya){S=0;do{if(Ya=!1,Ga=0,25<=S)throw Error(r(301));S+=1,Ye=Ne=null,l.updateQueue=null,Zc.current=nE,o=p(y,b)}while(Ya)}if(Zc.current=rh,l=Ne!==null&&Ne.next!==null,vo=0,Ye=Ne=_e=null,Jc=!1,l)throw Error(r(300));return o}function xf(){var o=Ga!==0;return Ga=0,o}function ji(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?_e.memoizedState=Ye=o:Ye=Ye.next=o,Ye}function si(){if(Ne===null){var o=_e.alternate;o=o!==null?o.memoizedState:null}else o=Ne.next;var l=Ye===null?_e.memoizedState:Ye.next;if(l!==null)Ye=l,Ne=o;else{if(o===null)throw Error(r(310));Ne=o,o={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Ye===null?_e.memoizedState=Ye=o:Ye=Ye.next=o}return Ye}function Xa(o,l){return typeof l=="function"?l(o):l}function Cf(o){var l=si(),p=l.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=o;var y=Ne,b=y.baseQueue,S=p.pending;if(S!==null){if(b!==null){var A=b.next;b.next=S.next,S.next=A}y.baseQueue=b=S,p.pending=null}if(b!==null){S=b.next,y=y.baseState;var $=A=null,H=null,rt=S;do{var ht=rt.lane;if((vo&ht)===ht)H!==null&&(H=H.next={lane:0,action:rt.action,hasEagerState:rt.hasEagerState,eagerState:rt.eagerState,next:null}),y=rt.hasEagerState?rt.eagerState:o(y,rt.action);else{var ut={lane:ht,action:rt.action,hasEagerState:rt.hasEagerState,eagerState:rt.eagerState,next:null};H===null?($=H=ut,A=y):H=H.next=ut,_e.lanes|=ht,wo|=ht}rt=rt.next}while(rt!==null&&rt!==S);H===null?A=y:H.next=$,ki(y,l.memoizedState)||(Er=!0),l.memoizedState=y,l.baseState=A,l.baseQueue=H,p.lastRenderedState=y}if(o=p.interleaved,o!==null){b=o;do S=b.lane,_e.lanes|=S,wo|=S,b=b.next;while(b!==o)}else b===null&&(p.lanes=0);return[l.memoizedState,p.dispatch]}function kf(o){var l=si(),p=l.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=o;var y=p.dispatch,b=p.pending,S=l.memoizedState;if(b!==null){p.pending=null;var A=b=b.next;do S=o(S,A.action),A=A.next;while(A!==b);ki(S,l.memoizedState)||(Er=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),p.lastRenderedState=S}return[S,y]}function jx(){}function Wx(o,l){var p=_e,y=si(),b=l(),S=!ki(y.memoizedState,b);if(S&&(y.memoizedState=b,Er=!0),y=y.queue,bf(Ux.bind(null,p,y,o),[o]),y.getSnapshot!==l||S||Ye!==null&&Ye.memoizedState.tag&1){if(p.flags|=2048,Qa(9,Hx.bind(null,p,y,b,l),void 0,null),Ge===null)throw Error(r(349));(vo&30)!==0||qx(p,l,b)}return b}function qx(o,l,p){o.flags|=16384,o={getSnapshot:l,value:p},l=_e.updateQueue,l===null?(l={lastEffect:null,stores:null},_e.updateQueue=l,l.stores=[o]):(p=l.stores,p===null?l.stores=[o]:p.push(o))}function Hx(o,l,p,y){l.value=p,l.getSnapshot=y,Vx(l)&&Yx(o)}function Ux(o,l,p){return p(function(){Vx(l)&&Yx(o)})}function Vx(o){var l=o.getSnapshot;o=o.value;try{var p=l();return!ki(o,p)}catch{return!0}}function Yx(o){var l=cn(o,1);l!==null&&Ti(l,o,1,-1)}function Gx(o){var l=ji();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xa,lastRenderedState:o},l.queue=o,o=o.dispatch=eE.bind(null,_e,o),[l.memoizedState,o]}function Qa(o,l,p,y){return o={tag:o,create:l,destroy:p,deps:y,next:null},l=_e.updateQueue,l===null?(l={lastEffect:null,stores:null},_e.updateQueue=l,l.lastEffect=o.next=o):(p=l.lastEffect,p===null?l.lastEffect=o.next=o:(y=p.next,p.next=o,o.next=y,l.lastEffect=o)),o}function Xx(){return si().memoizedState}function th(o,l,p,y){var b=ji();_e.flags|=o,b.memoizedState=Qa(1|l,p,void 0,y===void 0?null:y)}function eh(o,l,p,y){var b=si();y=y===void 0?null:y;var S=void 0;if(Ne!==null){var A=Ne.memoizedState;if(S=A.destroy,y!==null&&mf(y,A.deps)){b.memoizedState=Qa(l,p,S,y);return}}_e.flags|=o,b.memoizedState=Qa(1|l,p,S,y)}function Qx(o,l){return th(8390656,8,o,l)}function bf(o,l){return eh(2048,8,o,l)}function Kx(o,l){return eh(4,2,o,l)}function Zx(o,l){return eh(4,4,o,l)}function Jx(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function t0(o,l,p){return p=p!=null?p.concat([o]):null,eh(4,4,Jx.bind(null,l,o),p)}function vf(){}function e0(o,l){var p=si();l=l===void 0?null:l;var y=p.memoizedState;return y!==null&&l!==null&&mf(l,y[1])?y[0]:(p.memoizedState=[o,l],o)}function r0(o,l){var p=si();l=l===void 0?null:l;var y=p.memoizedState;return y!==null&&l!==null&&mf(l,y[1])?y[0]:(o=o(),p.memoizedState=[o,l],o)}function i0(o,l,p){return(vo&21)===0?(o.baseState&&(o.baseState=!1,Er=!0),o.memoizedState=p):(ki(p,l)||(p=Iy(),_e.lanes|=p,wo|=p,o.baseState=!0),l)}function JL(o,l){var p=fe;fe=p!==0&&4>p?p:4,o(!0);var y=gf.transition;gf.transition={};try{o(!1),l()}finally{fe=p,gf.transition=y}}function n0(){return si().memoizedState}function tE(o,l,p){var y=Gn(o);if(p={lane:y,action:p,hasEagerState:!1,eagerState:null,next:null},o0(o))s0(l,p);else if(p=Dx(o,l,p,y),p!==null){var b=xr();Ti(p,o,y,b),a0(p,l,y)}}function eE(o,l,p){var y=Gn(o),b={lane:y,action:p,hasEagerState:!1,eagerState:null,next:null};if(o0(o))s0(l,b);else{var S=o.alternate;if(o.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var A=l.lastRenderedState,$=S(A,p);if(b.hasEagerState=!0,b.eagerState=$,ki($,A)){var H=l.interleaved;H===null?(b.next=b,cf(l)):(b.next=H.next,H.next=b),l.interleaved=b;return}}catch{}finally{}p=Dx(o,l,b,y),p!==null&&(b=xr(),Ti(p,o,y,b),a0(p,l,y))}}function o0(o){var l=o.alternate;return o===_e||l!==null&&l===_e}function s0(o,l){Ya=Jc=!0;var p=o.pending;p===null?l.next=l:(l.next=p.next,p.next=l),o.pending=l}function a0(o,l,p){if((p&4194240)!==0){var y=l.lanes;y&=o.pendingLanes,p|=y,l.lanes=p,wd(o,p)}}var rh={readContext:oi,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useInsertionEffect:sr,useLayoutEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useMutableSource:sr,useSyncExternalStore:sr,useId:sr,unstable_isNewReconciler:!1},rE={readContext:oi,useCallback:function(o,l){return ji().memoizedState=[o,l===void 0?null:l],o},useContext:oi,useEffect:Qx,useImperativeHandle:function(o,l,p){return p=p!=null?p.concat([o]):null,th(4194308,4,Jx.bind(null,l,o),p)},useLayoutEffect:function(o,l){return th(4194308,4,o,l)},useInsertionEffect:function(o,l){return th(4,2,o,l)},useMemo:function(o,l){var p=ji();return l=l===void 0?null:l,o=o(),p.memoizedState=[o,l],o},useReducer:function(o,l,p){var y=ji();return l=p!==void 0?p(l):l,y.memoizedState=y.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},y.queue=o,o=o.dispatch=tE.bind(null,_e,o),[y.memoizedState,o]},useRef:function(o){var l=ji();return o={current:o},l.memoizedState=o},useState:Gx,useDebugValue:vf,useDeferredValue:function(o){return ji().memoizedState=o},useTransition:function(){var o=Gx(!1),l=o[0];return o=JL.bind(null,o[1]),ji().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,p){var y=_e,b=ji();if(we){if(p===void 0)throw Error(r(407));p=p()}else{if(p=l(),Ge===null)throw Error(r(349));(vo&30)!==0||qx(y,l,p)}b.memoizedState=p;var S={value:p,getSnapshot:l};return b.queue=S,Qx(Ux.bind(null,y,S,o),[o]),y.flags|=2048,Qa(9,Hx.bind(null,y,S,p,l),void 0,null),p},useId:function(){var o=ji(),l=Ge.identifierPrefix;if(we){var p=ln,y=an;p=(y&~(1<<32-Ci(y)-1)).toString(32)+p,l=":"+l+"R"+p,p=Ga++,0<p&&(l+="H"+p.toString(32)),l+=":"}else p=ZL++,l=":"+l+"r"+p.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},iE={readContext:oi,useCallback:e0,useContext:oi,useEffect:bf,useImperativeHandle:t0,useInsertionEffect:Kx,useLayoutEffect:Zx,useMemo:r0,useReducer:Cf,useRef:Xx,useState:function(){return Cf(Xa)},useDebugValue:vf,useDeferredValue:function(o){var l=si();return i0(l,Ne.memoizedState,o)},useTransition:function(){var o=Cf(Xa)[0],l=si().memoizedState;return[o,l]},useMutableSource:jx,useSyncExternalStore:Wx,useId:n0,unstable_isNewReconciler:!1},nE={readContext:oi,useCallback:e0,useContext:oi,useEffect:bf,useImperativeHandle:t0,useInsertionEffect:Kx,useLayoutEffect:Zx,useMemo:r0,useReducer:kf,useRef:Xx,useState:function(){return kf(Xa)},useDebugValue:vf,useDeferredValue:function(o){var l=si();return Ne===null?l.memoizedState=o:i0(l,Ne.memoizedState,o)},useTransition:function(){var o=kf(Xa)[0],l=si().memoizedState;return[o,l]},useMutableSource:jx,useSyncExternalStore:Wx,useId:n0,unstable_isNewReconciler:!1};function vi(o,l){if(o&&o.defaultProps){l=I({},l),o=o.defaultProps;for(var p in o)l[p]===void 0&&(l[p]=o[p]);return l}return l}function wf(o,l,p,y){l=o.memoizedState,p=p(y,l),p=p==null?l:I({},l,p),o.memoizedState=p,o.lanes===0&&(o.updateQueue.baseState=p)}var ih={isMounted:function(o){return(o=o._reactInternals)?$i(o)===o:!1},enqueueSetState:function(o,l,p){o=o._reactInternals;var y=xr(),b=Gn(o),S=hn(y,b);S.payload=l,p!=null&&(S.callback=p),l=Hn(o,S,b),l!==null&&(Ti(l,o,b,y),Xc(l,o,b))},enqueueReplaceState:function(o,l,p){o=o._reactInternals;var y=xr(),b=Gn(o),S=hn(y,b);S.tag=1,S.payload=l,p!=null&&(S.callback=p),l=Hn(o,S,b),l!==null&&(Ti(l,o,b,y),Xc(l,o,b))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var p=xr(),y=Gn(o),b=hn(p,y);b.tag=2,l!=null&&(b.callback=l),l=Hn(o,b,y),l!==null&&(Ti(l,o,y,p),Xc(l,o,y))}};function l0(o,l,p,y,b,S,A){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(y,S,A):l.prototype&&l.prototype.isPureReactComponent?!Da(p,y)||!Da(b,S):!0}function c0(o,l,p){var y=!1,b=jn,S=l.contextType;return typeof S=="object"&&S!==null?S=oi(S):(b=Lr(l)?yo:or.current,y=l.contextTypes,S=(y=y!=null)?ds(o,b):jn),l=new l(p,S),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=ih,o.stateNode=l,l._reactInternals=o,y&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=b,o.__reactInternalMemoizedMaskedChildContext=S),l}function h0(o,l,p,y){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(p,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(p,y),l.state!==o&&ih.enqueueReplaceState(l,l.state,null)}function Sf(o,l,p,y){var b=o.stateNode;b.props=p,b.state=o.memoizedState,b.refs={},hf(o);var S=l.contextType;typeof S=="object"&&S!==null?b.context=oi(S):(S=Lr(l)?yo:or.current,b.context=ds(o,S)),b.state=o.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(wf(o,l,S,p),b.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(l=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),l!==b.state&&ih.enqueueReplaceState(b,b.state,null),Qc(o,p,b,y),b.state=o.memoizedState),typeof b.componentDidMount=="function"&&(o.flags|=4194308)}function ks(o,l){try{var p="",y=l;do p+=pt(y),y=y.return;while(y);var b=p}catch(S){b=`
40
+ Error generating stack: `+S.message+`
41
+ `+S.stack}return{value:o,source:l,stack:b,digest:null}}function Tf(o,l,p){return{value:o,source:null,stack:p??null,digest:l??null}}function _f(o,l){try{console.error(l.value)}catch(p){setTimeout(function(){throw p})}}var oE=typeof WeakMap=="function"?WeakMap:Map;function u0(o,l,p){p=hn(-1,p),p.tag=3,p.payload={element:null};var y=l.value;return p.callback=function(){hh||(hh=!0,jf=y),_f(o,l)},p}function d0(o,l,p){p=hn(-1,p),p.tag=3;var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var b=l.value;p.payload=function(){return y(b)},p.callback=function(){_f(o,l)}}var S=o.stateNode;return S!==null&&typeof S.componentDidCatch=="function"&&(p.callback=function(){_f(o,l),typeof y!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var A=l.stack;this.componentDidCatch(l.value,{componentStack:A!==null?A:""})}),p}function f0(o,l,p){var y=o.pingCache;if(y===null){y=o.pingCache=new oE;var b=new Set;y.set(l,b)}else b=y.get(l),b===void 0&&(b=new Set,y.set(l,b));b.has(p)||(b.add(p),o=CE.bind(null,o,l,p),l.then(o,o))}function p0(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function g0(o,l,p,y,b){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,p.flags|=131072,p.flags&=-52805,p.tag===1&&(p.alternate===null?p.tag=17:(l=hn(-1,1),l.tag=2,Hn(p,l,1))),p.lanes|=1),o):(o.flags|=65536,o.lanes=b,o)}var sE=M.ReactCurrentOwner,Er=!1;function yr(o,l,p,y){l.child=o===null?Ox(l,null,p,y):ms(l,o.child,p,y)}function m0(o,l,p,y,b){p=p.render;var S=l.ref;return xs(l,b),y=yf(o,l,p,y,S,b),p=xf(),o!==null&&!Er?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~b,un(o,l,b)):(we&&p&&Jd(l),l.flags|=1,yr(o,l,y,b),l.child)}function y0(o,l,p,y,b){if(o===null){var S=p.type;return typeof S=="function"&&!Gf(S)&&S.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(l.tag=15,l.type=S,x0(o,l,S,y,b)):(o=mh(p.type,null,y,l,l.mode,b),o.ref=l.ref,o.return=l,l.child=o)}if(S=o.child,(o.lanes&b)===0){var A=S.memoizedProps;if(p=p.compare,p=p!==null?p:Da,p(A,y)&&o.ref===l.ref)return un(o,l,b)}return l.flags|=1,o=Qn(S,y),o.ref=l.ref,o.return=l,l.child=o}function x0(o,l,p,y,b){if(o!==null){var S=o.memoizedProps;if(Da(S,y)&&o.ref===l.ref)if(Er=!1,l.pendingProps=y=S,(o.lanes&b)!==0)(o.flags&131072)!==0&&(Er=!0);else return l.lanes=o.lanes,un(o,l,b)}return Bf(o,l,p,y,b)}function C0(o,l,p){var y=l.pendingProps,b=y.children,S=o!==null?o.memoizedState:null;if(y.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(vs,Ur),Ur|=p;else{if((p&1073741824)===0)return o=S!==null?S.baseLanes|p:p,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,ye(vs,Ur),Ur|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=S!==null?S.baseLanes:p,ye(vs,Ur),Ur|=y}else S!==null?(y=S.baseLanes|p,l.memoizedState=null):y=p,ye(vs,Ur),Ur|=y;return yr(o,l,b,p),l.child}function k0(o,l){var p=l.ref;(o===null&&p!==null||o!==null&&o.ref!==p)&&(l.flags|=512,l.flags|=2097152)}function Bf(o,l,p,y,b){var S=Lr(p)?yo:or.current;return S=ds(l,S),xs(l,b),p=yf(o,l,p,y,S,b),y=xf(),o!==null&&!Er?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~b,un(o,l,b)):(we&&y&&Jd(l),l.flags|=1,yr(o,l,p,b),l.child)}function b0(o,l,p,y,b){if(Lr(p)){var S=!0;jc(l)}else S=!1;if(xs(l,b),l.stateNode===null)oh(o,l),c0(l,p,y),Sf(l,p,y,b),y=!0;else if(o===null){var A=l.stateNode,$=l.memoizedProps;A.props=$;var H=A.context,rt=p.contextType;typeof rt=="object"&&rt!==null?rt=oi(rt):(rt=Lr(p)?yo:or.current,rt=ds(l,rt));var ht=p.getDerivedStateFromProps,ut=typeof ht=="function"||typeof A.getSnapshotBeforeUpdate=="function";ut||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||($!==y||H!==rt)&&h0(l,A,y,rt),qn=!1;var ct=l.memoizedState;A.state=ct,Qc(l,y,A,b),H=l.memoizedState,$!==y||ct!==H||Br.current||qn?(typeof ht=="function"&&(wf(l,p,ht,y),H=l.memoizedState),($=qn||l0(l,p,$,y,ct,H,rt))?(ut||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(l.flags|=4194308)):(typeof A.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=y,l.memoizedState=H),A.props=y,A.state=H,A.context=rt,y=$):(typeof A.componentDidMount=="function"&&(l.flags|=4194308),y=!1)}else{A=l.stateNode,Rx(o,l),$=l.memoizedProps,rt=l.type===l.elementType?$:vi(l.type,$),A.props=rt,ut=l.pendingProps,ct=A.context,H=p.contextType,typeof H=="object"&&H!==null?H=oi(H):(H=Lr(p)?yo:or.current,H=ds(l,H));var kt=p.getDerivedStateFromProps;(ht=typeof kt=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||($!==ut||ct!==H)&&h0(l,A,y,H),qn=!1,ct=l.memoizedState,A.state=ct,Qc(l,y,A,b);var wt=l.memoizedState;$!==ut||ct!==wt||Br.current||qn?(typeof kt=="function"&&(wf(l,p,kt,y),wt=l.memoizedState),(rt=qn||l0(l,p,rt,y,ct,wt,H)||!1)?(ht||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(y,wt,H),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(y,wt,H)),typeof A.componentDidUpdate=="function"&&(l.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof A.componentDidUpdate!="function"||$===o.memoizedProps&&ct===o.memoizedState||(l.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&ct===o.memoizedState||(l.flags|=1024),l.memoizedProps=y,l.memoizedState=wt),A.props=y,A.state=wt,A.context=H,y=rt):(typeof A.componentDidUpdate!="function"||$===o.memoizedProps&&ct===o.memoizedState||(l.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&ct===o.memoizedState||(l.flags|=1024),y=!1)}return Lf(o,l,p,y,S,b)}function Lf(o,l,p,y,b,S){k0(o,l);var A=(l.flags&128)!==0;if(!y&&!A)return b&&_x(l,p,!1),un(o,l,S);y=l.stateNode,sE.current=l;var $=A&&typeof p.getDerivedStateFromError!="function"?null:y.render();return l.flags|=1,o!==null&&A?(l.child=ms(l,o.child,null,S),l.child=ms(l,null,$,S)):yr(o,l,$,S),l.memoizedState=y.state,b&&_x(l,p,!0),l.child}function v0(o){var l=o.stateNode;l.pendingContext?Sx(o,l.pendingContext,l.pendingContext!==l.context):l.context&&Sx(o,l.context,!1),uf(o,l.containerInfo)}function w0(o,l,p,y,b){return gs(),nf(b),l.flags|=256,yr(o,l,p,y),l.child}var Ef={dehydrated:null,treeContext:null,retryLane:0};function Af(o){return{baseLanes:o,cachePool:null,transitions:null}}function S0(o,l,p){var y=l.pendingProps,b=Te.current,S=!1,A=(l.flags&128)!==0,$;if(($=A)||($=o!==null&&o.memoizedState===null?!1:(b&2)!==0),$?(S=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(b|=1),ye(Te,b&1),o===null)return rf(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(A=y.children,o=y.fallback,S?(y=l.mode,S=l.child,A={mode:"hidden",children:A},(y&1)===0&&S!==null?(S.childLanes=0,S.pendingProps=A):S=yh(A,y,0,null),o=Bo(o,y,p,null),S.return=l,o.return=l,S.sibling=o,l.child=S,l.child.memoizedState=Af(p),l.memoizedState=Ef,o):Ff(l,A));if(b=o.memoizedState,b!==null&&($=b.dehydrated,$!==null))return aE(o,l,A,y,$,b,p);if(S){S=y.fallback,A=l.mode,b=o.child,$=b.sibling;var H={mode:"hidden",children:y.children};return(A&1)===0&&l.child!==b?(y=l.child,y.childLanes=0,y.pendingProps=H,l.deletions=null):(y=Qn(b,H),y.subtreeFlags=b.subtreeFlags&14680064),$!==null?S=Qn($,S):(S=Bo(S,A,p,null),S.flags|=2),S.return=l,y.return=l,y.sibling=S,l.child=y,y=S,S=l.child,A=o.child.memoizedState,A=A===null?Af(p):{baseLanes:A.baseLanes|p,cachePool:null,transitions:A.transitions},S.memoizedState=A,S.childLanes=o.childLanes&~p,l.memoizedState=Ef,y}return S=o.child,o=S.sibling,y=Qn(S,{mode:"visible",children:y.children}),(l.mode&1)===0&&(y.lanes=p),y.return=l,y.sibling=null,o!==null&&(p=l.deletions,p===null?(l.deletions=[o],l.flags|=16):p.push(o)),l.child=y,l.memoizedState=null,y}function Ff(o,l){return l=yh({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function nh(o,l,p,y){return y!==null&&nf(y),ms(l,o.child,null,p),o=Ff(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function aE(o,l,p,y,b,S,A){if(p)return l.flags&256?(l.flags&=-257,y=Tf(Error(r(422))),nh(o,l,A,y)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(S=y.fallback,b=l.mode,y=yh({mode:"visible",children:y.children},b,0,null),S=Bo(S,b,A,null),S.flags|=2,y.return=l,S.return=l,y.sibling=S,l.child=y,(l.mode&1)!==0&&ms(l,o.child,null,A),l.child.memoizedState=Af(A),l.memoizedState=Ef,S);if((l.mode&1)===0)return nh(o,l,A,null);if(b.data==="$!"){if(y=b.nextSibling&&b.nextSibling.dataset,y)var $=y.dgst;return y=$,S=Error(r(419)),y=Tf(S,y,void 0),nh(o,l,A,y)}if($=(A&o.childLanes)!==0,Er||$){if(y=Ge,y!==null){switch(A&-A){case 4:b=2;break;case 16:b=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:b=32;break;case 536870912:b=268435456;break;default:b=0}b=(b&(y.suspendedLanes|A))!==0?0:b,b!==0&&b!==S.retryLane&&(S.retryLane=b,cn(o,b),Ti(y,o,b,-1))}return Yf(),y=Tf(Error(r(421))),nh(o,l,A,y)}return b.data==="$?"?(l.flags|=128,l.child=o.child,l=kE.bind(null,o),b._reactRetry=l,null):(o=S.treeContext,Hr=zn(b.nextSibling),qr=l,we=!0,bi=null,o!==null&&(ii[ni++]=an,ii[ni++]=ln,ii[ni++]=xo,an=o.id,ln=o.overflow,xo=l),l=Ff(l,y.children),l.flags|=4096,l)}function T0(o,l,p){o.lanes|=l;var y=o.alternate;y!==null&&(y.lanes|=l),lf(o.return,l,p)}function Mf(o,l,p,y,b){var S=o.memoizedState;S===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:p,tailMode:b}:(S.isBackwards=l,S.rendering=null,S.renderingStartTime=0,S.last=y,S.tail=p,S.tailMode=b)}function _0(o,l,p){var y=l.pendingProps,b=y.revealOrder,S=y.tail;if(yr(o,l,y.children,p),y=Te.current,(y&2)!==0)y=y&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)t:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&T0(o,p,l);else if(o.tag===19)T0(o,p,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break t;for(;o.sibling===null;){if(o.return===null||o.return===l)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}y&=1}if(ye(Te,y),(l.mode&1)===0)l.memoizedState=null;else switch(b){case"forwards":for(p=l.child,b=null;p!==null;)o=p.alternate,o!==null&&Kc(o)===null&&(b=p),p=p.sibling;p=b,p===null?(b=l.child,l.child=null):(b=p.sibling,p.sibling=null),Mf(l,!1,b,p,S);break;case"backwards":for(p=null,b=l.child,l.child=null;b!==null;){if(o=b.alternate,o!==null&&Kc(o)===null){l.child=b;break}o=b.sibling,b.sibling=p,p=b,b=o}Mf(l,!0,p,null,S);break;case"together":Mf(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function oh(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function un(o,l,p){if(o!==null&&(l.dependencies=o.dependencies),wo|=l.lanes,(p&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,p=Qn(o,o.pendingProps),l.child=p,p.return=l;o.sibling!==null;)o=o.sibling,p=p.sibling=Qn(o,o.pendingProps),p.return=l;p.sibling=null}return l.child}function lE(o,l,p){switch(l.tag){case 3:v0(l),gs();break;case 5:Nx(l);break;case 1:Lr(l.type)&&jc(l);break;case 4:uf(l,l.stateNode.containerInfo);break;case 10:var y=l.type._context,b=l.memoizedProps.value;ye(Yc,y._currentValue),y._currentValue=b;break;case 13:if(y=l.memoizedState,y!==null)return y.dehydrated!==null?(ye(Te,Te.current&1),l.flags|=128,null):(p&l.child.childLanes)!==0?S0(o,l,p):(ye(Te,Te.current&1),o=un(o,l,p),o!==null?o.sibling:null);ye(Te,Te.current&1);break;case 19:if(y=(p&l.childLanes)!==0,(o.flags&128)!==0){if(y)return _0(o,l,p);l.flags|=128}if(b=l.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),ye(Te,Te.current),y)break;return null;case 22:case 23:return l.lanes=0,C0(o,l,p)}return un(o,l,p)}var B0,If,L0,E0;B0=function(o,l){for(var p=l.child;p!==null;){if(p.tag===5||p.tag===6)o.appendChild(p.stateNode);else if(p.tag!==4&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===l)break;for(;p.sibling===null;){if(p.return===null||p.return===l)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},If=function(){},L0=function(o,l,p,y){var b=o.memoizedProps;if(b!==y){o=l.stateNode,bo(Ni.current);var S=null;switch(p){case"input":b=Ue(o,b),y=Ue(o,y),S=[];break;case"select":b=I({},b,{value:void 0}),y=I({},y,{value:void 0}),S=[];break;case"textarea":b=Bn(o,b),y=Bn(o,y),S=[];break;default:typeof b.onClick!="function"&&typeof y.onClick=="function"&&(o.onclick=$c)}ve(p,y);var A;p=null;for(rt in b)if(!y.hasOwnProperty(rt)&&b.hasOwnProperty(rt)&&b[rt]!=null)if(rt==="style"){var $=b[rt];for(A in $)$.hasOwnProperty(A)&&(p||(p={}),p[A]="")}else rt!=="dangerouslySetInnerHTML"&&rt!=="children"&&rt!=="suppressContentEditableWarning"&&rt!=="suppressHydrationWarning"&&rt!=="autoFocus"&&(n.hasOwnProperty(rt)?S||(S=[]):(S=S||[]).push(rt,null));for(rt in y){var H=y[rt];if($=b!=null?b[rt]:void 0,y.hasOwnProperty(rt)&&H!==$&&(H!=null||$!=null))if(rt==="style")if($){for(A in $)!$.hasOwnProperty(A)||H&&H.hasOwnProperty(A)||(p||(p={}),p[A]="");for(A in H)H.hasOwnProperty(A)&&$[A]!==H[A]&&(p||(p={}),p[A]=H[A])}else p||(S||(S=[]),S.push(rt,p)),p=H;else rt==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,$=$?$.__html:void 0,H!=null&&$!==H&&(S=S||[]).push(rt,H)):rt==="children"?typeof H!="string"&&typeof H!="number"||(S=S||[]).push(rt,""+H):rt!=="suppressContentEditableWarning"&&rt!=="suppressHydrationWarning"&&(n.hasOwnProperty(rt)?(H!=null&&rt==="onScroll"&&Ce("scroll",o),S||$===H||(S=[])):(S=S||[]).push(rt,H))}p&&(S=S||[]).push("style",p);var rt=S;(l.updateQueue=rt)&&(l.flags|=4)}},E0=function(o,l,p,y){p!==y&&(l.flags|=4)};function Ka(o,l){if(!we)switch(o.tailMode){case"hidden":l=o.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?o.tail=null:p.sibling=null;break;case"collapsed":p=o.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:y.sibling=null}}function ar(o){var l=o.alternate!==null&&o.alternate.child===o.child,p=0,y=0;if(l)for(var b=o.child;b!==null;)p|=b.lanes|b.childLanes,y|=b.subtreeFlags&14680064,y|=b.flags&14680064,b.return=o,b=b.sibling;else for(b=o.child;b!==null;)p|=b.lanes|b.childLanes,y|=b.subtreeFlags,y|=b.flags,b.return=o,b=b.sibling;return o.subtreeFlags|=y,o.childLanes=p,l}function cE(o,l,p){var y=l.pendingProps;switch(tf(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ar(l),null;case 1:return Lr(l.type)&&Nc(),ar(l),null;case 3:return y=l.stateNode,Cs(),ke(Br),ke(or),pf(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(o===null||o.child===null)&&(Uc(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,bi!==null&&(Hf(bi),bi=null))),If(o,l),ar(l),null;case 5:df(l);var b=bo(Va.current);if(p=l.type,o!==null&&l.stateNode!=null)L0(o,l,p,y,b),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!y){if(l.stateNode===null)throw Error(r(166));return ar(l),null}if(o=bo(Ni.current),Uc(l)){y=l.stateNode,p=l.type;var S=l.memoizedProps;switch(y[zi]=l,y[ja]=S,o=(l.mode&1)!==0,p){case"dialog":Ce("cancel",y),Ce("close",y);break;case"iframe":case"object":case"embed":Ce("load",y);break;case"video":case"audio":for(b=0;b<$a.length;b++)Ce($a[b],y);break;case"source":Ce("error",y);break;case"img":case"image":case"link":Ce("error",y),Ce("load",y);break;case"details":Ce("toggle",y);break;case"input":Le(y,S),Ce("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!S.multiple},Ce("invalid",y);break;case"textarea":ts(y,S),Ce("invalid",y)}ve(p,S),b=null;for(var A in S)if(S.hasOwnProperty(A)){var $=S[A];A==="children"?typeof $=="string"?y.textContent!==$&&(S.suppressHydrationWarning!==!0&&Rc(y.textContent,$,o),b=["children",$]):typeof $=="number"&&y.textContent!==""+$&&(S.suppressHydrationWarning!==!0&&Rc(y.textContent,$,o),b=["children",""+$]):n.hasOwnProperty(A)&&$!=null&&A==="onScroll"&&Ce("scroll",y)}switch(p){case"input":Ot(y),mr(y,S,!0);break;case"textarea":Ot(y),Ri(y);break;case"select":case"option":break;default:typeof S.onClick=="function"&&(y.onclick=$c)}y=b,l.updateQueue=y,y!==null&&(l.flags|=4)}else{A=b.nodeType===9?b:b.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=st(p)),o==="http://www.w3.org/1999/xhtml"?p==="script"?(o=A.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof y.is=="string"?o=A.createElement(p,{is:y.is}):(o=A.createElement(p),p==="select"&&(A=o,y.multiple?A.multiple=!0:y.size&&(A.size=y.size))):o=A.createElementNS(o,p),o[zi]=l,o[ja]=y,B0(o,l,!1,!1),l.stateNode=o;t:{switch(A=_r(p,y),p){case"dialog":Ce("cancel",o),Ce("close",o),b=y;break;case"iframe":case"object":case"embed":Ce("load",o),b=y;break;case"video":case"audio":for(b=0;b<$a.length;b++)Ce($a[b],o);b=y;break;case"source":Ce("error",o),b=y;break;case"img":case"image":case"link":Ce("error",o),Ce("load",o),b=y;break;case"details":Ce("toggle",o),b=y;break;case"input":Le(o,y),b=Ue(o,y),Ce("invalid",o);break;case"option":b=y;break;case"select":o._wrapperState={wasMultiple:!!y.multiple},b=I({},y,{value:void 0}),Ce("invalid",o);break;case"textarea":ts(o,y),b=Bn(o,y),Ce("invalid",o);break;default:b=y}ve(p,b),$=b;for(S in $)if($.hasOwnProperty(S)){var H=$[S];S==="style"?Nr(o,H):S==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Gt(o,H)):S==="children"?typeof H=="string"?(p!=="textarea"||H!=="")&&ee(o,H):typeof H=="number"&&ee(o,""+H):S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&S!=="autoFocus"&&(n.hasOwnProperty(S)?H!=null&&S==="onScroll"&&Ce("scroll",o):H!=null&&B(o,S,H,A))}switch(p){case"input":Ot(o),mr(o,y,!1);break;case"textarea":Ot(o),Ri(o);break;case"option":y.value!=null&&o.setAttribute("value",""+Mt(y.value));break;case"select":o.multiple=!!y.multiple,S=y.value,S!=null?gi(o,!!y.multiple,S,!1):y.defaultValue!=null&&gi(o,!!y.multiple,y.defaultValue,!0);break;default:typeof b.onClick=="function"&&(o.onclick=$c)}switch(p){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break t;case"img":y=!0;break t;default:y=!1}}y&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return ar(l),null;case 6:if(o&&l.stateNode!=null)E0(o,l,o.memoizedProps,y);else{if(typeof y!="string"&&l.stateNode===null)throw Error(r(166));if(p=bo(Va.current),bo(Ni.current),Uc(l)){if(y=l.stateNode,p=l.memoizedProps,y[zi]=l,(S=y.nodeValue!==p)&&(o=qr,o!==null))switch(o.tag){case 3:Rc(y.nodeValue,p,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&Rc(y.nodeValue,p,(o.mode&1)!==0)}S&&(l.flags|=4)}else y=(p.nodeType===9?p:p.ownerDocument).createTextNode(y),y[zi]=l,l.stateNode=y}return ar(l),null;case 13:if(ke(Te),y=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(we&&Hr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Mx(),gs(),l.flags|=98560,S=!1;else if(S=Uc(l),y!==null&&y.dehydrated!==null){if(o===null){if(!S)throw Error(r(318));if(S=l.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[zi]=l}else gs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ar(l),S=!1}else bi!==null&&(Hf(bi),bi=null),S=!0;if(!S)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=p,l):(y=y!==null,y!==(o!==null&&o.memoizedState!==null)&&y&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(Te.current&1)!==0?je===0&&(je=3):Yf())),l.updateQueue!==null&&(l.flags|=4),ar(l),null);case 4:return Cs(),If(o,l),o===null&&za(l.stateNode.containerInfo),ar(l),null;case 10:return af(l.type._context),ar(l),null;case 17:return Lr(l.type)&&Nc(),ar(l),null;case 19:if(ke(Te),S=l.memoizedState,S===null)return ar(l),null;if(y=(l.flags&128)!==0,A=S.rendering,A===null)if(y)Ka(S,!1);else{if(je!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(A=Kc(o),A!==null){for(l.flags|=128,Ka(S,!1),y=A.updateQueue,y!==null&&(l.updateQueue=y,l.flags|=4),l.subtreeFlags=0,y=p,p=l.child;p!==null;)S=p,o=y,S.flags&=14680066,A=S.alternate,A===null?(S.childLanes=0,S.lanes=o,S.child=null,S.subtreeFlags=0,S.memoizedProps=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.stateNode=null):(S.childLanes=A.childLanes,S.lanes=A.lanes,S.child=A.child,S.subtreeFlags=0,S.deletions=null,S.memoizedProps=A.memoizedProps,S.memoizedState=A.memoizedState,S.updateQueue=A.updateQueue,S.type=A.type,o=A.dependencies,S.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),p=p.sibling;return ye(Te,Te.current&1|2),l.child}o=o.sibling}S.tail!==null&&Kt()>ws&&(l.flags|=128,y=!0,Ka(S,!1),l.lanes=4194304)}else{if(!y)if(o=Kc(A),o!==null){if(l.flags|=128,y=!0,p=o.updateQueue,p!==null&&(l.updateQueue=p,l.flags|=4),Ka(S,!0),S.tail===null&&S.tailMode==="hidden"&&!A.alternate&&!we)return ar(l),null}else 2*Kt()-S.renderingStartTime>ws&&p!==1073741824&&(l.flags|=128,y=!0,Ka(S,!1),l.lanes=4194304);S.isBackwards?(A.sibling=l.child,l.child=A):(p=S.last,p!==null?p.sibling=A:l.child=A,S.last=A)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=Kt(),l.sibling=null,p=Te.current,ye(Te,y?p&1|2:p&1),l):(ar(l),null);case 22:case 23:return Vf(),y=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==y&&(l.flags|=8192),y&&(l.mode&1)!==0?(Ur&1073741824)!==0&&(ar(l),l.subtreeFlags&6&&(l.flags|=8192)):ar(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function hE(o,l){switch(tf(l),l.tag){case 1:return Lr(l.type)&&Nc(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Cs(),ke(Br),ke(or),pf(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return df(l),null;case 13:if(ke(Te),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));gs()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return ke(Te),null;case 4:return Cs(),null;case 10:return af(l.type._context),null;case 22:case 23:return Vf(),null;case 24:return null;default:return null}}var sh=!1,lr=!1,uE=typeof WeakSet=="function"?WeakSet:Set,vt=null;function bs(o,l){var p=o.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(y){Fe(o,l,y)}else p.current=null}function Pf(o,l,p){try{p()}catch(y){Fe(o,l,y)}}var A0=!1;function dE(o,l){if(Ud=_c,o=lx(),Rd(o)){if("selectionStart"in o)var p={start:o.selectionStart,end:o.selectionEnd};else t:{p=(p=o.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var b=y.anchorOffset,S=y.focusNode;y=y.focusOffset;try{p.nodeType,S.nodeType}catch{p=null;break t}var A=0,$=-1,H=-1,rt=0,ht=0,ut=o,ct=null;e:for(;;){for(var kt;ut!==p||b!==0&&ut.nodeType!==3||($=A+b),ut!==S||y!==0&&ut.nodeType!==3||(H=A+y),ut.nodeType===3&&(A+=ut.nodeValue.length),(kt=ut.firstChild)!==null;)ct=ut,ut=kt;for(;;){if(ut===o)break e;if(ct===p&&++rt===b&&($=A),ct===S&&++ht===y&&(H=A),(kt=ut.nextSibling)!==null)break;ut=ct,ct=ut.parentNode}ut=kt}p=$===-1||H===-1?null:{start:$,end:H}}else p=null}p=p||{start:0,end:0}}else p=null;for(Vd={focusedElem:o,selectionRange:p},_c=!1,vt=l;vt!==null;)if(l=vt,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,vt=o;else for(;vt!==null;){l=vt;try{var wt=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(wt!==null){var _t=wt.memoizedProps,Pe=wt.memoizedState,Q=l.stateNode,G=Q.getSnapshotBeforeUpdate(l.elementType===l.type?_t:vi(l.type,_t),Pe);Q.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var tt=l.stateNode.containerInfo;tt.nodeType===1?tt.textContent="":tt.nodeType===9&&tt.documentElement&&tt.removeChild(tt.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(mt){Fe(l,l.return,mt)}if(o=l.sibling,o!==null){o.return=l.return,vt=o;break}vt=l.return}return wt=A0,A0=!1,wt}function Za(o,l,p){var y=l.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var b=y=y.next;do{if((b.tag&o)===o){var S=b.destroy;b.destroy=void 0,S!==void 0&&Pf(l,p,S)}b=b.next}while(b!==y)}}function ah(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var p=l=l.next;do{if((p.tag&o)===o){var y=p.create;p.destroy=y()}p=p.next}while(p!==l)}}function Of(o){var l=o.ref;if(l!==null){var p=o.stateNode;switch(o.tag){case 5:o=p;break;default:o=p}typeof l=="function"?l(o):l.current=o}}function F0(o){var l=o.alternate;l!==null&&(o.alternate=null,F0(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[zi],delete l[ja],delete l[Qd],delete l[GL],delete l[XL])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function M0(o){return o.tag===5||o.tag===3||o.tag===4}function I0(o){t:for(;;){for(;o.sibling===null;){if(o.return===null||M0(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue t;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Df(o,l,p){var y=o.tag;if(y===5||y===6)o=o.stateNode,l?p.nodeType===8?p.parentNode.insertBefore(o,l):p.insertBefore(o,l):(p.nodeType===8?(l=p.parentNode,l.insertBefore(o,p)):(l=p,l.appendChild(o)),p=p._reactRootContainer,p!=null||l.onclick!==null||(l.onclick=$c));else if(y!==4&&(o=o.child,o!==null))for(Df(o,l,p),o=o.sibling;o!==null;)Df(o,l,p),o=o.sibling}function Rf(o,l,p){var y=o.tag;if(y===5||y===6)o=o.stateNode,l?p.insertBefore(o,l):p.appendChild(o);else if(y!==4&&(o=o.child,o!==null))for(Rf(o,l,p),o=o.sibling;o!==null;)Rf(o,l,p),o=o.sibling}var tr=null,wi=!1;function Un(o,l,p){for(p=p.child;p!==null;)P0(o,l,p),p=p.sibling}function P0(o,l,p){if(jr&&typeof jr.onCommitFiberUnmount=="function")try{jr.onCommitFiberUnmount(go,p)}catch{}switch(p.tag){case 5:lr||bs(p,l);case 6:var y=tr,b=wi;tr=null,Un(o,l,p),tr=y,wi=b,tr!==null&&(wi?(o=tr,p=p.stateNode,o.nodeType===8?o.parentNode.removeChild(p):o.removeChild(p)):tr.removeChild(p.stateNode));break;case 18:tr!==null&&(wi?(o=tr,p=p.stateNode,o.nodeType===8?Xd(o.parentNode,p):o.nodeType===1&&Xd(o,p),Aa(o)):Xd(tr,p.stateNode));break;case 4:y=tr,b=wi,tr=p.stateNode.containerInfo,wi=!0,Un(o,l,p),tr=y,wi=b;break;case 0:case 11:case 14:case 15:if(!lr&&(y=p.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){b=y=y.next;do{var S=b,A=S.destroy;S=S.tag,A!==void 0&&((S&2)!==0||(S&4)!==0)&&Pf(p,l,A),b=b.next}while(b!==y)}Un(o,l,p);break;case 1:if(!lr&&(bs(p,l),y=p.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=p.memoizedProps,y.state=p.memoizedState,y.componentWillUnmount()}catch($){Fe(p,l,$)}Un(o,l,p);break;case 21:Un(o,l,p);break;case 22:p.mode&1?(lr=(y=lr)||p.memoizedState!==null,Un(o,l,p),lr=y):Un(o,l,p);break;default:Un(o,l,p)}}function O0(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var p=o.stateNode;p===null&&(p=o.stateNode=new uE),l.forEach(function(y){var b=bE.bind(null,o,y);p.has(y)||(p.add(y),y.then(b,b))})}}function Si(o,l){var p=l.deletions;if(p!==null)for(var y=0;y<p.length;y++){var b=p[y];try{var S=o,A=l,$=A;t:for(;$!==null;){switch($.tag){case 5:tr=$.stateNode,wi=!1;break t;case 3:tr=$.stateNode.containerInfo,wi=!0;break t;case 4:tr=$.stateNode.containerInfo,wi=!0;break t}$=$.return}if(tr===null)throw Error(r(160));P0(S,A,b),tr=null,wi=!1;var H=b.alternate;H!==null&&(H.return=null),b.return=null}catch(rt){Fe(b,l,rt)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)D0(l,o),l=l.sibling}function D0(o,l){var p=o.alternate,y=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Si(l,o),Wi(o),y&4){try{Za(3,o,o.return),ah(3,o)}catch(_t){Fe(o,o.return,_t)}try{Za(5,o,o.return)}catch(_t){Fe(o,o.return,_t)}}break;case 1:Si(l,o),Wi(o),y&512&&p!==null&&bs(p,p.return);break;case 5:if(Si(l,o),Wi(o),y&512&&p!==null&&bs(p,p.return),o.flags&32){var b=o.stateNode;try{ee(b,"")}catch(_t){Fe(o,o.return,_t)}}if(y&4&&(b=o.stateNode,b!=null)){var S=o.memoizedProps,A=p!==null?p.memoizedProps:S,$=o.type,H=o.updateQueue;if(o.updateQueue=null,H!==null)try{$==="input"&&S.type==="radio"&&S.name!=null&&Jr(b,S),_r($,A);var rt=_r($,S);for(A=0;A<H.length;A+=2){var ht=H[A],ut=H[A+1];ht==="style"?Nr(b,ut):ht==="dangerouslySetInnerHTML"?Gt(b,ut):ht==="children"?ee(b,ut):B(b,ht,ut,rt)}switch($){case"input":fi(b,S);break;case"textarea":Ln(b,S);break;case"select":var ct=b._wrapperState.wasMultiple;b._wrapperState.wasMultiple=!!S.multiple;var kt=S.value;kt!=null?gi(b,!!S.multiple,kt,!1):ct!==!!S.multiple&&(S.defaultValue!=null?gi(b,!!S.multiple,S.defaultValue,!0):gi(b,!!S.multiple,S.multiple?[]:"",!1))}b[ja]=S}catch(_t){Fe(o,o.return,_t)}}break;case 6:if(Si(l,o),Wi(o),y&4){if(o.stateNode===null)throw Error(r(162));b=o.stateNode,S=o.memoizedProps;try{b.nodeValue=S}catch(_t){Fe(o,o.return,_t)}}break;case 3:if(Si(l,o),Wi(o),y&4&&p!==null&&p.memoizedState.isDehydrated)try{Aa(l.containerInfo)}catch(_t){Fe(o,o.return,_t)}break;case 4:Si(l,o),Wi(o);break;case 13:Si(l,o),Wi(o),b=o.child,b.flags&8192&&(S=b.memoizedState!==null,b.stateNode.isHidden=S,!S||b.alternate!==null&&b.alternate.memoizedState!==null||(Nf=Kt())),y&4&&O0(o);break;case 22:if(ht=p!==null&&p.memoizedState!==null,o.mode&1?(lr=(rt=lr)||ht,Si(l,o),lr=rt):Si(l,o),Wi(o),y&8192){if(rt=o.memoizedState!==null,(o.stateNode.isHidden=rt)&&!ht&&(o.mode&1)!==0)for(vt=o,ht=o.child;ht!==null;){for(ut=vt=ht;vt!==null;){switch(ct=vt,kt=ct.child,ct.tag){case 0:case 11:case 14:case 15:Za(4,ct,ct.return);break;case 1:bs(ct,ct.return);var wt=ct.stateNode;if(typeof wt.componentWillUnmount=="function"){y=ct,p=ct.return;try{l=y,wt.props=l.memoizedProps,wt.state=l.memoizedState,wt.componentWillUnmount()}catch(_t){Fe(y,p,_t)}}break;case 5:bs(ct,ct.return);break;case 22:if(ct.memoizedState!==null){z0(ut);continue}}kt!==null?(kt.return=ct,vt=kt):z0(ut)}ht=ht.sibling}t:for(ht=null,ut=o;;){if(ut.tag===5){if(ht===null){ht=ut;try{b=ut.stateNode,rt?(S=b.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none"):($=ut.stateNode,H=ut.memoizedProps.style,A=H!=null&&H.hasOwnProperty("display")?H.display:null,$.style.display=Ke("display",A))}catch(_t){Fe(o,o.return,_t)}}}else if(ut.tag===6){if(ht===null)try{ut.stateNode.nodeValue=rt?"":ut.memoizedProps}catch(_t){Fe(o,o.return,_t)}}else if((ut.tag!==22&&ut.tag!==23||ut.memoizedState===null||ut===o)&&ut.child!==null){ut.child.return=ut,ut=ut.child;continue}if(ut===o)break t;for(;ut.sibling===null;){if(ut.return===null||ut.return===o)break t;ht===ut&&(ht=null),ut=ut.return}ht===ut&&(ht=null),ut.sibling.return=ut.return,ut=ut.sibling}}break;case 19:Si(l,o),Wi(o),y&4&&O0(o);break;case 21:break;default:Si(l,o),Wi(o)}}function Wi(o){var l=o.flags;if(l&2){try{t:{for(var p=o.return;p!==null;){if(M0(p)){var y=p;break t}p=p.return}throw Error(r(160))}switch(y.tag){case 5:var b=y.stateNode;y.flags&32&&(ee(b,""),y.flags&=-33);var S=I0(o);Rf(o,S,b);break;case 3:case 4:var A=y.stateNode.containerInfo,$=I0(o);Df(o,$,A);break;default:throw Error(r(161))}}catch(H){Fe(o,o.return,H)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function fE(o,l,p){vt=o,R0(o)}function R0(o,l,p){for(var y=(o.mode&1)!==0;vt!==null;){var b=vt,S=b.child;if(b.tag===22&&y){var A=b.memoizedState!==null||sh;if(!A){var $=b.alternate,H=$!==null&&$.memoizedState!==null||lr;$=sh;var rt=lr;if(sh=A,(lr=H)&&!rt)for(vt=b;vt!==null;)A=vt,H=A.child,A.tag===22&&A.memoizedState!==null?N0(b):H!==null?(H.return=A,vt=H):N0(b);for(;S!==null;)vt=S,R0(S),S=S.sibling;vt=b,sh=$,lr=rt}$0(o)}else(b.subtreeFlags&8772)!==0&&S!==null?(S.return=b,vt=S):$0(o)}}function $0(o){for(;vt!==null;){var l=vt;if((l.flags&8772)!==0){var p=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:lr||ah(5,l);break;case 1:var y=l.stateNode;if(l.flags&4&&!lr)if(p===null)y.componentDidMount();else{var b=l.elementType===l.type?p.memoizedProps:vi(l.type,p.memoizedProps);y.componentDidUpdate(b,p.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var S=l.updateQueue;S!==null&&zx(l,S,y);break;case 3:var A=l.updateQueue;if(A!==null){if(p=null,l.child!==null)switch(l.child.tag){case 5:p=l.child.stateNode;break;case 1:p=l.child.stateNode}zx(l,A,p)}break;case 5:var $=l.stateNode;if(p===null&&l.flags&4){p=$;var H=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&p.focus();break;case"img":H.src&&(p.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var rt=l.alternate;if(rt!==null){var ht=rt.memoizedState;if(ht!==null){var ut=ht.dehydrated;ut!==null&&Aa(ut)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}lr||l.flags&512&&Of(l)}catch(ct){Fe(l,l.return,ct)}}if(l===o){vt=null;break}if(p=l.sibling,p!==null){p.return=l.return,vt=p;break}vt=l.return}}function z0(o){for(;vt!==null;){var l=vt;if(l===o){vt=null;break}var p=l.sibling;if(p!==null){p.return=l.return,vt=p;break}vt=l.return}}function N0(o){for(;vt!==null;){var l=vt;try{switch(l.tag){case 0:case 11:case 15:var p=l.return;try{ah(4,l)}catch(H){Fe(l,p,H)}break;case 1:var y=l.stateNode;if(typeof y.componentDidMount=="function"){var b=l.return;try{y.componentDidMount()}catch(H){Fe(l,b,H)}}var S=l.return;try{Of(l)}catch(H){Fe(l,S,H)}break;case 5:var A=l.return;try{Of(l)}catch(H){Fe(l,A,H)}}}catch(H){Fe(l,l.return,H)}if(l===o){vt=null;break}var $=l.sibling;if($!==null){$.return=l.return,vt=$;break}vt=l.return}}var pE=Math.ceil,lh=M.ReactCurrentDispatcher,$f=M.ReactCurrentOwner,ai=M.ReactCurrentBatchConfig,ae=0,Ge=null,Re=null,er=0,Ur=0,vs=Nn(0),je=0,Ja=null,wo=0,ch=0,zf=0,tl=null,Ar=null,Nf=0,ws=1/0,dn=null,hh=!1,jf=null,Vn=null,uh=!1,Yn=null,dh=0,el=0,Wf=null,fh=-1,ph=0;function xr(){return(ae&6)!==0?Kt():fh!==-1?fh:fh=Kt()}function Gn(o){return(o.mode&1)===0?1:(ae&2)!==0&&er!==0?er&-er:KL.transition!==null?(ph===0&&(ph=Iy()),ph):(o=fe,o!==0||(o=window.event,o=o===void 0?16:Wy(o.type)),o)}function Ti(o,l,p,y){if(50<el)throw el=0,Wf=null,Error(r(185));Ta(o,p,y),((ae&2)===0||o!==Ge)&&(o===Ge&&((ae&2)===0&&(ch|=p),je===4&&Xn(o,er)),Fr(o,y),p===1&&ae===0&&(l.mode&1)===0&&(ws=Kt()+500,Wc&&Wn()))}function Fr(o,l){var p=o.callbackNode;KB(o,l);var y=wc(o,o===Ge?er:0);if(y===0)p!==null&&ft(p),o.callbackNode=null,o.callbackPriority=0;else if(l=y&-y,o.callbackPriority!==l){if(p!=null&&ft(p),l===1)o.tag===0?QL(W0.bind(null,o)):Bx(W0.bind(null,o)),VL(function(){(ae&6)===0&&Wn()}),p=null;else{switch(Py(y)){case 1:p=Ve;break;case 4:p=ri;break;case 16:p=xi;break;case 536870912:p=De;break;default:p=xi}p=Q0(p,j0.bind(null,o))}o.callbackPriority=l,o.callbackNode=p}}function j0(o,l){if(fh=-1,ph=0,(ae&6)!==0)throw Error(r(327));var p=o.callbackNode;if(Ss()&&o.callbackNode!==p)return null;var y=wc(o,o===Ge?er:0);if(y===0)return null;if((y&30)!==0||(y&o.expiredLanes)!==0||l)l=gh(o,y);else{l=y;var b=ae;ae|=2;var S=H0();(Ge!==o||er!==l)&&(dn=null,ws=Kt()+500,To(o,l));do try{yE();break}catch($){q0(o,$)}while(!0);sf(),lh.current=S,ae=b,Re!==null?l=0:(Ge=null,er=0,l=je)}if(l!==0){if(l===2&&(b=bd(o),b!==0&&(y=b,l=qf(o,b))),l===1)throw p=Ja,To(o,0),Xn(o,y),Fr(o,Kt()),p;if(l===6)Xn(o,y);else{if(b=o.current.alternate,(y&30)===0&&!gE(b)&&(l=gh(o,y),l===2&&(S=bd(o),S!==0&&(y=S,l=qf(o,S))),l===1))throw p=Ja,To(o,0),Xn(o,y),Fr(o,Kt()),p;switch(o.finishedWork=b,o.finishedLanes=y,l){case 0:case 1:throw Error(r(345));case 2:_o(o,Ar,dn);break;case 3:if(Xn(o,y),(y&130023424)===y&&(l=Nf+500-Kt(),10<l)){if(wc(o,0)!==0)break;if(b=o.suspendedLanes,(b&y)!==y){xr(),o.pingedLanes|=o.suspendedLanes&b;break}o.timeoutHandle=Gd(_o.bind(null,o,Ar,dn),l);break}_o(o,Ar,dn);break;case 4:if(Xn(o,y),(y&4194240)===y)break;for(l=o.eventTimes,b=-1;0<y;){var A=31-Ci(y);S=1<<A,A=l[A],A>b&&(b=A),y&=~S}if(y=b,y=Kt()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*pE(y/1960))-y,10<y){o.timeoutHandle=Gd(_o.bind(null,o,Ar,dn),y);break}_o(o,Ar,dn);break;case 5:_o(o,Ar,dn);break;default:throw Error(r(329))}}}return Fr(o,Kt()),o.callbackNode===p?j0.bind(null,o):null}function qf(o,l){var p=tl;return o.current.memoizedState.isDehydrated&&(To(o,l).flags|=256),o=gh(o,l),o!==2&&(l=Ar,Ar=p,l!==null&&Hf(l)),o}function Hf(o){Ar===null?Ar=o:Ar.push.apply(Ar,o)}function gE(o){for(var l=o;;){if(l.flags&16384){var p=l.updateQueue;if(p!==null&&(p=p.stores,p!==null))for(var y=0;y<p.length;y++){var b=p[y],S=b.getSnapshot;b=b.value;try{if(!ki(S(),b))return!1}catch{return!1}}}if(p=l.child,l.subtreeFlags&16384&&p!==null)p.return=l,l=p;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Xn(o,l){for(l&=~zf,l&=~ch,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var p=31-Ci(l),y=1<<p;o[p]=-1,l&=~y}}function W0(o){if((ae&6)!==0)throw Error(r(327));Ss();var l=wc(o,0);if((l&1)===0)return Fr(o,Kt()),null;var p=gh(o,l);if(o.tag!==0&&p===2){var y=bd(o);y!==0&&(l=y,p=qf(o,y))}if(p===1)throw p=Ja,To(o,0),Xn(o,l),Fr(o,Kt()),p;if(p===6)throw Error(r(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,_o(o,Ar,dn),Fr(o,Kt()),null}function Uf(o,l){var p=ae;ae|=1;try{return o(l)}finally{ae=p,ae===0&&(ws=Kt()+500,Wc&&Wn())}}function So(o){Yn!==null&&Yn.tag===0&&(ae&6)===0&&Ss();var l=ae;ae|=1;var p=ai.transition,y=fe;try{if(ai.transition=null,fe=1,o)return o()}finally{fe=y,ai.transition=p,ae=l,(ae&6)===0&&Wn()}}function Vf(){Ur=vs.current,ke(vs)}function To(o,l){o.finishedWork=null,o.finishedLanes=0;var p=o.timeoutHandle;if(p!==-1&&(o.timeoutHandle=-1,UL(p)),Re!==null)for(p=Re.return;p!==null;){var y=p;switch(tf(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&Nc();break;case 3:Cs(),ke(Br),ke(or),pf();break;case 5:df(y);break;case 4:Cs();break;case 13:ke(Te);break;case 19:ke(Te);break;case 10:af(y.type._context);break;case 22:case 23:Vf()}p=p.return}if(Ge=o,Re=o=Qn(o.current,null),er=Ur=l,je=0,Ja=null,zf=ch=wo=0,Ar=tl=null,ko!==null){for(l=0;l<ko.length;l++)if(p=ko[l],y=p.interleaved,y!==null){p.interleaved=null;var b=y.next,S=p.pending;if(S!==null){var A=S.next;S.next=b,y.next=A}p.pending=y}ko=null}return o}function q0(o,l){do{var p=Re;try{if(sf(),Zc.current=rh,Jc){for(var y=_e.memoizedState;y!==null;){var b=y.queue;b!==null&&(b.pending=null),y=y.next}Jc=!1}if(vo=0,Ye=Ne=_e=null,Ya=!1,Ga=0,$f.current=null,p===null||p.return===null){je=1,Ja=l,Re=null;break}t:{var S=o,A=p.return,$=p,H=l;if(l=er,$.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var rt=H,ht=$,ut=ht.tag;if((ht.mode&1)===0&&(ut===0||ut===11||ut===15)){var ct=ht.alternate;ct?(ht.updateQueue=ct.updateQueue,ht.memoizedState=ct.memoizedState,ht.lanes=ct.lanes):(ht.updateQueue=null,ht.memoizedState=null)}var kt=p0(A);if(kt!==null){kt.flags&=-257,g0(kt,A,$,S,l),kt.mode&1&&f0(S,rt,l),l=kt,H=rt;var wt=l.updateQueue;if(wt===null){var _t=new Set;_t.add(H),l.updateQueue=_t}else wt.add(H);break t}else{if((l&1)===0){f0(S,rt,l),Yf();break t}H=Error(r(426))}}else if(we&&$.mode&1){var Pe=p0(A);if(Pe!==null){(Pe.flags&65536)===0&&(Pe.flags|=256),g0(Pe,A,$,S,l),nf(ks(H,$));break t}}S=H=ks(H,$),je!==4&&(je=2),tl===null?tl=[S]:tl.push(S),S=A;do{switch(S.tag){case 3:S.flags|=65536,l&=-l,S.lanes|=l;var Q=u0(S,H,l);$x(S,Q);break t;case 1:$=H;var G=S.type,tt=S.stateNode;if((S.flags&128)===0&&(typeof G.getDerivedStateFromError=="function"||tt!==null&&typeof tt.componentDidCatch=="function"&&(Vn===null||!Vn.has(tt)))){S.flags|=65536,l&=-l,S.lanes|=l;var mt=d0(S,$,l);$x(S,mt);break t}}S=S.return}while(S!==null)}V0(p)}catch(At){l=At,Re===p&&p!==null&&(Re=p=p.return);continue}break}while(!0)}function H0(){var o=lh.current;return lh.current=rh,o===null?rh:o}function Yf(){(je===0||je===3||je===2)&&(je=4),Ge===null||(wo&268435455)===0&&(ch&268435455)===0||Xn(Ge,er)}function gh(o,l){var p=ae;ae|=2;var y=H0();(Ge!==o||er!==l)&&(dn=null,To(o,l));do try{mE();break}catch(b){q0(o,b)}while(!0);if(sf(),ae=p,lh.current=y,Re!==null)throw Error(r(261));return Ge=null,er=0,je}function mE(){for(;Re!==null;)U0(Re)}function yE(){for(;Re!==null&&!St();)U0(Re)}function U0(o){var l=X0(o.alternate,o,Ur);o.memoizedProps=o.pendingProps,l===null?V0(o):Re=l,$f.current=null}function V0(o){var l=o;do{var p=l.alternate;if(o=l.return,(l.flags&32768)===0){if(p=cE(p,l,Ur),p!==null){Re=p;return}}else{if(p=hE(p,l),p!==null){p.flags&=32767,Re=p;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{je=6,Re=null;return}}if(l=l.sibling,l!==null){Re=l;return}Re=l=o}while(l!==null);je===0&&(je=5)}function _o(o,l,p){var y=fe,b=ai.transition;try{ai.transition=null,fe=1,xE(o,l,p,y)}finally{ai.transition=b,fe=y}return null}function xE(o,l,p,y){do Ss();while(Yn!==null);if((ae&6)!==0)throw Error(r(327));p=o.finishedWork;var b=o.finishedLanes;if(p===null)return null;if(o.finishedWork=null,o.finishedLanes=0,p===o.current)throw Error(r(177));o.callbackNode=null,o.callbackPriority=0;var S=p.lanes|p.childLanes;if(ZB(o,S),o===Ge&&(Re=Ge=null,er=0),(p.subtreeFlags&2064)===0&&(p.flags&2064)===0||uh||(uh=!0,Q0(xi,function(){return Ss(),null})),S=(p.flags&15990)!==0,(p.subtreeFlags&15990)!==0||S){S=ai.transition,ai.transition=null;var A=fe;fe=1;var $=ae;ae|=4,$f.current=null,dE(o,p),D0(p,o),$L(Vd),_c=!!Ud,Vd=Ud=null,o.current=p,fE(p),me(),ae=$,fe=A,ai.transition=S}else o.current=p;if(uh&&(uh=!1,Yn=o,dh=b),S=o.pendingLanes,S===0&&(Vn=null),VB(p.stateNode),Fr(o,Kt()),l!==null)for(y=o.onRecoverableError,p=0;p<l.length;p++)b=l[p],y(b.value,{componentStack:b.stack,digest:b.digest});if(hh)throw hh=!1,o=jf,jf=null,o;return(dh&1)!==0&&o.tag!==0&&Ss(),S=o.pendingLanes,(S&1)!==0?o===Wf?el++:(el=0,Wf=o):el=0,Wn(),null}function Ss(){if(Yn!==null){var o=Py(dh),l=ai.transition,p=fe;try{if(ai.transition=null,fe=16>o?16:o,Yn===null)var y=!1;else{if(o=Yn,Yn=null,dh=0,(ae&6)!==0)throw Error(r(331));var b=ae;for(ae|=4,vt=o.current;vt!==null;){var S=vt,A=S.child;if((vt.flags&16)!==0){var $=S.deletions;if($!==null){for(var H=0;H<$.length;H++){var rt=$[H];for(vt=rt;vt!==null;){var ht=vt;switch(ht.tag){case 0:case 11:case 15:Za(8,ht,S)}var ut=ht.child;if(ut!==null)ut.return=ht,vt=ut;else for(;vt!==null;){ht=vt;var ct=ht.sibling,kt=ht.return;if(F0(ht),ht===rt){vt=null;break}if(ct!==null){ct.return=kt,vt=ct;break}vt=kt}}}var wt=S.alternate;if(wt!==null){var _t=wt.child;if(_t!==null){wt.child=null;do{var Pe=_t.sibling;_t.sibling=null,_t=Pe}while(_t!==null)}}vt=S}}if((S.subtreeFlags&2064)!==0&&A!==null)A.return=S,vt=A;else t:for(;vt!==null;){if(S=vt,(S.flags&2048)!==0)switch(S.tag){case 0:case 11:case 15:Za(9,S,S.return)}var Q=S.sibling;if(Q!==null){Q.return=S.return,vt=Q;break t}vt=S.return}}var G=o.current;for(vt=G;vt!==null;){A=vt;var tt=A.child;if((A.subtreeFlags&2064)!==0&&tt!==null)tt.return=A,vt=tt;else t:for(A=G;vt!==null;){if($=vt,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:ah(9,$)}}catch(At){Fe($,$.return,At)}if($===A){vt=null;break t}var mt=$.sibling;if(mt!==null){mt.return=$.return,vt=mt;break t}vt=$.return}}if(ae=b,Wn(),jr&&typeof jr.onPostCommitFiberRoot=="function")try{jr.onPostCommitFiberRoot(go,o)}catch{}y=!0}return y}finally{fe=p,ai.transition=l}}return!1}function Y0(o,l,p){l=ks(p,l),l=u0(o,l,1),o=Hn(o,l,1),l=xr(),o!==null&&(Ta(o,1,l),Fr(o,l))}function Fe(o,l,p){if(o.tag===3)Y0(o,o,p);else for(;l!==null;){if(l.tag===3){Y0(l,o,p);break}else if(l.tag===1){var y=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Vn===null||!Vn.has(y))){o=ks(p,o),o=d0(l,o,1),l=Hn(l,o,1),o=xr(),l!==null&&(Ta(l,1,o),Fr(l,o));break}}l=l.return}}function CE(o,l,p){var y=o.pingCache;y!==null&&y.delete(l),l=xr(),o.pingedLanes|=o.suspendedLanes&p,Ge===o&&(er&p)===p&&(je===4||je===3&&(er&130023424)===er&&500>Kt()-Nf?To(o,0):zf|=p),Fr(o,l)}function G0(o,l){l===0&&((o.mode&1)===0?l=1:(l=vc,vc<<=1,(vc&130023424)===0&&(vc=4194304)));var p=xr();o=cn(o,l),o!==null&&(Ta(o,l,p),Fr(o,p))}function kE(o){var l=o.memoizedState,p=0;l!==null&&(p=l.retryLane),G0(o,p)}function bE(o,l){var p=0;switch(o.tag){case 13:var y=o.stateNode,b=o.memoizedState;b!==null&&(p=b.retryLane);break;case 19:y=o.stateNode;break;default:throw Error(r(314))}y!==null&&y.delete(l),G0(o,p)}var X0;X0=function(o,l,p){if(o!==null)if(o.memoizedProps!==l.pendingProps||Br.current)Er=!0;else{if((o.lanes&p)===0&&(l.flags&128)===0)return Er=!1,lE(o,l,p);Er=(o.flags&131072)!==0}else Er=!1,we&&(l.flags&1048576)!==0&&Lx(l,Hc,l.index);switch(l.lanes=0,l.tag){case 2:var y=l.type;oh(o,l),o=l.pendingProps;var b=ds(l,or.current);xs(l,p),b=yf(null,l,y,o,b,p);var S=xf();return l.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Lr(y)?(S=!0,jc(l)):S=!1,l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,hf(l),b.updater=ih,l.stateNode=b,b._reactInternals=l,Sf(l,y,o,p),l=Lf(null,l,y,!0,S,p)):(l.tag=0,we&&S&&Jd(l),yr(null,l,b,p),l=l.child),l;case 16:y=l.elementType;t:{switch(oh(o,l),o=l.pendingProps,b=y._init,y=b(y._payload),l.type=y,b=l.tag=wE(y),o=vi(y,o),b){case 0:l=Bf(null,l,y,o,p);break t;case 1:l=b0(null,l,y,o,p);break t;case 11:l=m0(null,l,y,o,p);break t;case 14:l=y0(null,l,y,vi(y.type,o),p);break t}throw Error(r(306,y,""))}return l;case 0:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:vi(y,b),Bf(o,l,y,b,p);case 1:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:vi(y,b),b0(o,l,y,b,p);case 3:t:{if(v0(l),o===null)throw Error(r(387));y=l.pendingProps,S=l.memoizedState,b=S.element,Rx(o,l),Qc(l,y,null,p);var A=l.memoizedState;if(y=A.element,S.isDehydrated)if(S={element:y,isDehydrated:!1,cache:A.cache,pendingSuspenseBoundaries:A.pendingSuspenseBoundaries,transitions:A.transitions},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){b=ks(Error(r(423)),l),l=w0(o,l,y,p,b);break t}else if(y!==b){b=ks(Error(r(424)),l),l=w0(o,l,y,p,b);break t}else for(Hr=zn(l.stateNode.containerInfo.firstChild),qr=l,we=!0,bi=null,p=Ox(l,null,y,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(gs(),y===b){l=un(o,l,p);break t}yr(o,l,y,p)}l=l.child}return l;case 5:return Nx(l),o===null&&rf(l),y=l.type,b=l.pendingProps,S=o!==null?o.memoizedProps:null,A=b.children,Yd(y,b)?A=null:S!==null&&Yd(y,S)&&(l.flags|=32),k0(o,l),yr(o,l,A,p),l.child;case 6:return o===null&&rf(l),null;case 13:return S0(o,l,p);case 4:return uf(l,l.stateNode.containerInfo),y=l.pendingProps,o===null?l.child=ms(l,null,y,p):yr(o,l,y,p),l.child;case 11:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:vi(y,b),m0(o,l,y,b,p);case 7:return yr(o,l,l.pendingProps,p),l.child;case 8:return yr(o,l,l.pendingProps.children,p),l.child;case 12:return yr(o,l,l.pendingProps.children,p),l.child;case 10:t:{if(y=l.type._context,b=l.pendingProps,S=l.memoizedProps,A=b.value,ye(Yc,y._currentValue),y._currentValue=A,S!==null)if(ki(S.value,A)){if(S.children===b.children&&!Br.current){l=un(o,l,p);break t}}else for(S=l.child,S!==null&&(S.return=l);S!==null;){var $=S.dependencies;if($!==null){A=S.child;for(var H=$.firstContext;H!==null;){if(H.context===y){if(S.tag===1){H=hn(-1,p&-p),H.tag=2;var rt=S.updateQueue;if(rt!==null){rt=rt.shared;var ht=rt.pending;ht===null?H.next=H:(H.next=ht.next,ht.next=H),rt.pending=H}}S.lanes|=p,H=S.alternate,H!==null&&(H.lanes|=p),lf(S.return,p,l),$.lanes|=p;break}H=H.next}}else if(S.tag===10)A=S.type===l.type?null:S.child;else if(S.tag===18){if(A=S.return,A===null)throw Error(r(341));A.lanes|=p,$=A.alternate,$!==null&&($.lanes|=p),lf(A,p,l),A=S.sibling}else A=S.child;if(A!==null)A.return=S;else for(A=S;A!==null;){if(A===l){A=null;break}if(S=A.sibling,S!==null){S.return=A.return,A=S;break}A=A.return}S=A}yr(o,l,b.children,p),l=l.child}return l;case 9:return b=l.type,y=l.pendingProps.children,xs(l,p),b=oi(b),y=y(b),l.flags|=1,yr(o,l,y,p),l.child;case 14:return y=l.type,b=vi(y,l.pendingProps),b=vi(y.type,b),y0(o,l,y,b,p);case 15:return x0(o,l,l.type,l.pendingProps,p);case 17:return y=l.type,b=l.pendingProps,b=l.elementType===y?b:vi(y,b),oh(o,l),l.tag=1,Lr(y)?(o=!0,jc(l)):o=!1,xs(l,p),c0(l,y,b),Sf(l,y,b,p),Lf(null,l,y,!0,o,p);case 19:return _0(o,l,p);case 22:return C0(o,l,p)}throw Error(r(156,l.tag))};function Q0(o,l){return U(o,l)}function vE(o,l,p,y){this.tag=o,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(o,l,p,y){return new vE(o,l,p,y)}function Gf(o){return o=o.prototype,!(!o||!o.isReactComponent)}function wE(o){if(typeof o=="function")return Gf(o)?1:0;if(o!=null){if(o=o.$$typeof,o===Z)return 11;if(o===j)return 14}return 2}function Qn(o,l){var p=o.alternate;return p===null?(p=li(o.tag,l,o.key,o.mode),p.elementType=o.elementType,p.type=o.type,p.stateNode=o.stateNode,p.alternate=o,o.alternate=p):(p.pendingProps=l,p.type=o.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=o.flags&14680064,p.childLanes=o.childLanes,p.lanes=o.lanes,p.child=o.child,p.memoizedProps=o.memoizedProps,p.memoizedState=o.memoizedState,p.updateQueue=o.updateQueue,l=o.dependencies,p.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},p.sibling=o.sibling,p.index=o.index,p.ref=o.ref,p}function mh(o,l,p,y,b,S){var A=2;if(y=o,typeof o=="function")Gf(o)&&(A=1);else if(typeof o=="string")A=5;else t:switch(o){case E:return Bo(p.children,b,S,l);case z:A=8,b|=8;break;case K:return o=li(12,p,l,b|2),o.elementType=K,o.lanes=S,o;case it:return o=li(13,p,l,b),o.elementType=it,o.lanes=S,o;case V:return o=li(19,p,l,b),o.elementType=V,o.lanes=S,o;case Y:return yh(p,b,S,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case P:A=10;break t;case N:A=9;break t;case Z:A=11;break t;case j:A=14;break t;case q:A=16,y=null;break t}throw Error(r(130,o==null?o:typeof o,""))}return l=li(A,p,l,b),l.elementType=o,l.type=y,l.lanes=S,l}function Bo(o,l,p,y){return o=li(7,o,y,l),o.lanes=p,o}function yh(o,l,p,y){return o=li(22,o,y,l),o.elementType=Y,o.lanes=p,o.stateNode={isHidden:!1},o}function Xf(o,l,p){return o=li(6,o,null,l),o.lanes=p,o}function Qf(o,l,p){return l=li(4,o.children!==null?o.children:[],o.key,l),l.lanes=p,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function SE(o,l,p,y,b){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vd(0),this.expirationTimes=vd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vd(0),this.identifierPrefix=y,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function Kf(o,l,p,y,b,S,A,$,H){return o=new SE(o,l,p,$,H),l===1?(l=1,S===!0&&(l|=8)):l=0,S=li(3,null,null,l),o.current=S,S.stateNode=o,S.memoizedState={element:y,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},hf(S),o}function TE(o,l,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:y==null?null:""+y,children:o,containerInfo:l,implementation:p}}function K0(o){if(!o)return jn;o=o._reactInternals;t:{if($i(o)!==o||o.tag!==1)throw Error(r(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(Lr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(l!==null);throw Error(r(171))}if(o.tag===1){var p=o.type;if(Lr(p))return Tx(o,p,l)}return l}function Z0(o,l,p,y,b,S,A,$,H){return o=Kf(p,y,!0,o,b,S,A,$,H),o.context=K0(null),p=o.current,y=xr(),b=Gn(p),S=hn(y,b),S.callback=l??null,Hn(p,S,b),o.current.lanes=b,Ta(o,b,y),Fr(o,y),o}function xh(o,l,p,y){var b=l.current,S=xr(),A=Gn(b);return p=K0(p),l.context===null?l.context=p:l.pendingContext=p,l=hn(S,A),l.payload={element:o},y=y===void 0?null:y,y!==null&&(l.callback=y),o=Hn(b,l,A),o!==null&&(Ti(o,b,A,S),Xc(o,b,A)),A}function Ch(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function J0(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var p=o.retryLane;o.retryLane=p!==0&&p<l?p:l}}function Zf(o,l){J0(o,l),(o=o.alternate)&&J0(o,l)}function _E(){return null}var t1=typeof reportError=="function"?reportError:function(o){console.error(o)};function Jf(o){this._internalRoot=o}kh.prototype.render=Jf.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));xh(o,l,null,null)},kh.prototype.unmount=Jf.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;So(function(){xh(null,o,null,null)}),l[on]=null}};function kh(o){this._internalRoot=o}kh.prototype.unstable_scheduleHydration=function(o){if(o){var l=Ry();o={blockedOn:null,target:o,priority:l};for(var p=0;p<Dn.length&&l!==0&&l<Dn[p].priority;p++);Dn.splice(p,0,o),p===0&&Ny(o)}};function tp(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function bh(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function e1(){}function BE(o,l,p,y,b){if(b){if(typeof y=="function"){var S=y;y=function(){var rt=Ch(A);S.call(rt)}}var A=Z0(l,y,o,0,null,!1,!1,"",e1);return o._reactRootContainer=A,o[on]=A.current,za(o.nodeType===8?o.parentNode:o),So(),A}for(;b=o.lastChild;)o.removeChild(b);if(typeof y=="function"){var $=y;y=function(){var rt=Ch(H);$.call(rt)}}var H=Kf(o,0,!1,null,null,!1,!1,"",e1);return o._reactRootContainer=H,o[on]=H.current,za(o.nodeType===8?o.parentNode:o),So(function(){xh(l,H,p,y)}),H}function vh(o,l,p,y,b){var S=p._reactRootContainer;if(S){var A=S;if(typeof b=="function"){var $=b;b=function(){var H=Ch(A);$.call(H)}}xh(l,A,o,b)}else A=BE(p,l,o,b,y);return Ch(A)}Oy=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var p=Sa(l.pendingLanes);p!==0&&(wd(l,p|1),Fr(l,Kt()),(ae&6)===0&&(ws=Kt()+500,Wn()))}break;case 13:So(function(){var y=cn(o,1);if(y!==null){var b=xr();Ti(y,o,1,b)}}),Zf(o,1)}},Sd=function(o){if(o.tag===13){var l=cn(o,134217728);if(l!==null){var p=xr();Ti(l,o,134217728,p)}Zf(o,134217728)}},Dy=function(o){if(o.tag===13){var l=Gn(o),p=cn(o,l);if(p!==null){var y=xr();Ti(p,o,l,y)}Zf(o,l)}},Ry=function(){return fe},$y=function(o,l){var p=fe;try{return fe=o,l()}finally{fe=p}},En=function(o,l,p){switch(l){case"input":if(fi(o,p),l=p.name,p.type==="radio"&&l!=null){for(p=o;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<p.length;l++){var y=p[l];if(y!==o&&y.form===o.form){var b=zc(y);if(!b)throw Error(r(90));se(y),fi(y,b)}}}break;case"textarea":Ln(o,p);break;case"select":l=p.value,l!=null&&gi(o,!!p.multiple,l,!1)}},Ee=Uf,rn=So;var LE={usingClientEntryPoint:!1,Events:[Wa,hs,zc,mc,yc,Uf]},rl={findFiberByHostInstance:mo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},EE={bundleType:rl.bundleType,version:rl.version,rendererPackageName:rl.rendererPackageName,rendererConfig:rl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=kc(o),o===null?null:o.stateNode},findFiberByHostInstance:rl.findFiberByHostInstance||_E,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wh.isDisabled&&wh.supportsFiber)try{go=wh.inject(EE),jr=wh}catch{}}return Mr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LE,Mr.createPortal=function(o,l){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!tp(l))throw Error(r(200));return TE(o,l,null,p)},Mr.createRoot=function(o,l){if(!tp(o))throw Error(r(299));var p=!1,y="",b=t1;return l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(b=l.onRecoverableError)),l=Kf(o,1,!1,null,null,p,!1,y,b),o[on]=l.current,za(o.nodeType===8?o.parentNode:o),new Jf(l)},Mr.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=kc(l),o=o===null?null:o.stateNode,o},Mr.flushSync=function(o){return So(o)},Mr.hydrate=function(o,l,p){if(!bh(l))throw Error(r(200));return vh(null,o,l,!0,p)},Mr.hydrateRoot=function(o,l,p){if(!tp(o))throw Error(r(405));var y=p!=null&&p.hydratedSources||null,b=!1,S="",A=t1;if(p!=null&&(p.unstable_strictMode===!0&&(b=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onRecoverableError!==void 0&&(A=p.onRecoverableError)),l=Z0(l,null,o,1,p??null,b,!1,S,A),o[on]=l.current,za(o),y)for(o=0;o<y.length;o++)p=y[o],b=p._getVersion,b=b(p._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[p,b]:l.mutableSourceEagerHydrationData.push(p,b);return new kh(l)},Mr.render=function(o,l,p){if(!bh(l))throw Error(r(200));return vh(null,o,l,!1,p)},Mr.unmountComponentAtNode=function(o){if(!bh(o))throw Error(r(40));return o._reactRootContainer?(So(function(){vh(null,null,o,!1,function(){o._reactRootContainer=null,o[on]=null})}),!0):!1},Mr.unstable_batchedUpdates=Uf,Mr.unstable_renderSubtreeIntoContainer=function(o,l,p,y){if(!bh(p))throw Error(r(200));if(o==null||o._reactInternals===void 0)throw Error(r(38));return vh(o,l,p,!1,y)},Mr.version="18.3.1-next-f1338f8080-20240426",Mr}var c1;function zE(){if(c1)return ip.exports;c1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ip.exports=$E(),ip.exports}var h1;function NE(){if(h1)return Sh;h1=1;var e=zE();return Sh.createRoot=e.createRoot,Sh.hydrateRoot=e.hydrateRoot,Sh}var jE=NE();const WE=ec(jE);class qE extends yn.Component{constructor(t){super(t),this.handleRetry=()=>{this.setState({hasError:!1,error:null})},this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("ErrorBoundary caught an error:",t,r)}render(){var t,r;return this.state.hasError?_.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"40px",color:"var(--text-primary)"},children:[_.jsx("div",{style:{fontSize:"48px",marginBottom:"16px"},children:":("}),_.jsx("h2",{style:{fontSize:"18px",fontWeight:600,marginBottom:"8px"},children:"出现了一些问题"}),_.jsx("p",{style:{fontSize:"14px",color:"var(--text-secondary)",marginBottom:"8px",maxWidth:"400px",textAlign:"center"},children:((t=this.state.error)==null?void 0:t.message)||"发生了未知错误"}),_.jsx("pre",{style:{fontSize:"12px",color:"var(--text-tertiary)",marginBottom:"20px",maxWidth:"600px",overflow:"auto",padding:"12px",background:"var(--bg-secondary)",borderRadius:"8px",border:"1px solid var(--border)",maxHeight:"150px",width:"100%"},children:(r=this.state.error)==null?void 0:r.stack}),_.jsx("button",{onClick:this.handleRetry,style:{padding:"8px 24px",border:"1px solid var(--border)",borderRadius:"8px",background:"var(--accent)",color:"var(--text-inverse)",fontSize:"14px",cursor:"pointer",fontWeight:500},children:"重试"})]}):this.props.children}}const HE="modulepreload",UE=function(e){return"/"+e},u1={},ie=function(t,r,i){let n=Promise.resolve();if(r&&r.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));n=a(r.map(u=>{if(u=UE(u),u in u1)return;u1[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":HE,d||(m.as="script"),m.crossOrigin="",m.href=u,h&&m.setAttribute("nonce",h),document.head.appendChild(m),d)return new Promise((g,x)=>{m.addEventListener("load",g),m.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return n.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})},d1=e=>{let t;const r=new Set,i=(u,d)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const m=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),r.forEach(g=>g(t,m))}},n=()=>t,c={setState:i,getState:n,getInitialState:()=>h,subscribe:u=>(r.add(u),()=>r.delete(u))},h=t=e(i,n,c);return c},VE=(e=>e?d1(e):d1),YE=e=>e;function GE(e,t=YE){const r=yn.useSyncExternalStore(e.subscribe,yn.useCallback(()=>t(e.getState()),[e,t]),yn.useCallback(()=>t(e.getInitialState()),[e,t]));return yn.useDebugValue(r),r}const f1=e=>{const t=VE(e),r=i=>GE(t,i);return Object.assign(r,t),r},nb=(e=>e?f1(e):f1),p1={projects:[],config:null,currentWiki:null,currentView:null,sidebarOpen:!0,settingsOpen:!1,searchOpen:!1,searchQuery:"",searchResults:[],expandedSections:[],expandedGroups:[],referenceOpen:!1,referenceData:null,mermaidViewerOpen:!1,mermaidViewerData:null,loadingWiki:!1,loadingPage:!1,loadingProjects:!1},Ft=nb(e=>({...p1,setProjects:t=>e({projects:t}),setConfig:t=>e({config:t}),setCurrentWiki:t=>e({currentWiki:t}),setCurrentView:t=>e({currentView:t}),setCurrentProject:t=>e(r=>({config:r.config?{...r.config,lastOpenedProject:t}:r.config})),toggleSidebar:()=>e(t=>({sidebarOpen:!t.sidebarOpen})),setSidebarOpen:t=>e({sidebarOpen:t}),toggleSettings:()=>e(t=>({settingsOpen:!t.settingsOpen})),setSettingsOpen:t=>e({settingsOpen:t}),toggleSearch:()=>e(t=>({searchOpen:!t.searchOpen})),setSearchOpen:t=>e(r=>({searchOpen:t,searchQuery:t?r.searchQuery:"",searchResults:t?r.searchResults:[]})),setSearchQuery:t=>e({searchQuery:t}),setSearchResults:t=>e({searchResults:t}),openReference:(t,r,i)=>e({referenceOpen:!0,referenceData:{filePath:t,startLine:r,endLine:i}}),closeReference:()=>e({referenceOpen:!1,referenceData:null}),openMermaidViewer:(t,r)=>e({mermaidViewerOpen:!0,mermaidViewerData:{svg:t,code:r}}),closeMermaidViewer:()=>e({mermaidViewerOpen:!1,mermaidViewerData:null}),toggleSection:t=>e(r=>({expandedSections:r.expandedSections.includes(t)?r.expandedSections.filter(i=>i!==t):[...r.expandedSections,t]})),toggleGroup:t=>e(r=>({expandedGroups:r.expandedGroups.includes(t)?r.expandedGroups.filter(i=>i!==t):[...r.expandedGroups,t]})),setExpandedSections:t=>e({expandedSections:t}),setExpandedGroups:t=>e({expandedGroups:t}),setLoadingWiki:t=>e({loadingWiki:t}),setLoadingPage:t=>e({loadingPage:t}),setLoadingProjects:t=>e({loadingProjects:t}),reset:()=>e(p1)})),g1={aiPanelOpen:!1,aiPanelWidth:400,aiStatus:null,showInstallPrompt:!1,aiSessions:[],activeSessionId:null,aiMessages:[],aiStreaming:!1,aiConnected:!1,aiError:null},re=nb(e=>({...g1,toggleAIPanel:()=>e(t=>({aiPanelOpen:!t.aiPanelOpen})),setAIPanelOpen:t=>e({aiPanelOpen:t}),setAIPanelWidth:t=>e({aiPanelWidth:t}),setAIStatus:t=>e({aiStatus:t}),setShowInstallPrompt:t=>e({showInstallPrompt:t}),setAISessions:t=>e({aiSessions:t}),setActiveSession:t=>e({activeSessionId:t}),setAIMessages:t=>e({aiMessages:t}),addMessage:t=>e(r=>({aiMessages:[...r.aiMessages,t]})),updateMessage:(t,r)=>e(i=>({aiMessages:i.aiMessages.map(n=>n.id===t?{...n,...r}:n)})),appendToMessage:(t,r,i)=>e(n=>({aiMessages:n.aiMessages.map(s=>{if(s.id!==t)return s;const a=s.content,c=a[r]||"";return{...s,content:{...a,[r]:c+i}}})})),setStreaming:t=>e({aiStreaming:t}),setConnected:t=>e({aiConnected:t}),setAIError:t=>e({aiError:t}),clearMessages:()=>e({aiMessages:[],aiStreaming:!1}),resetAI:()=>e(g1)})),XE=({size:e=16})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M6 9l6 6 6-6"})}),QE=({size:e=16})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"11",cy:"11",r:"8"}),_.jsx("path",{d:"M21 21l-4.35-4.35"})]}),KE=({size:e=18})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"3"}),_.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),Gp=({size:e=22})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),_.jsx("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),ZE=({size:e=18})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M12 3l1.912 5.813a2 2 0 0 0 1.275 1.275L21 12l-5.813 1.912a2 2 0 0 0-1.275 1.275L12 21l-1.912-5.813a2 2 0 0 0-1.275-1.275L3 12l5.813-1.912a2 2 0 0 0 1.275-1.275L12 3z"})}),JE=()=>{const e=Ft(u=>u.projects),t=Ft(u=>u.config),r=Ft(u=>u.setCurrentProject),[i,n]=at.useState(!1),s=at.useRef(null),a=t==null?void 0:t.lastOpenedProject,c=e.find(u=>u.id===a);at.useEffect(()=>{function u(d){s.current&&!s.current.contains(d.target)&&n(!1)}return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const h=async u=>{r(u.id),n(!1);try{const{updateConfig:d}=await ie(async()=>{const{updateConfig:f}=await Promise.resolve().then(()=>hb);return{updateConfig:f}},void 0);await d({lastOpenedProject:u.id})}catch(d){console.error("Failed to persist project selection:",d)}};return e.length===0?_.jsx("div",{style:{color:"var(--text-tertiary)",fontSize:"13px"},children:"暂无项目"}):_.jsxs("div",{ref:s,style:{position:"relative"},children:[_.jsxs("button",{onClick:()=>n(!i),style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 12px",border:"1px solid var(--border)",borderRadius:"8px",background:"var(--bg-secondary)",color:"var(--text-primary)",cursor:"pointer",fontSize:"13px",fontWeight:500,minWidth:"140px",transition:"all 0.15s ease"},children:[_.jsx(Gp,{size:14}),_.jsx("span",{style:{flex:1,textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(c==null?void 0:c.name)||"选择项目"}),_.jsx(XE,{size:14})]}),i&&_.jsx("div",{style:{position:"absolute",top:"100%",left:0,marginTop:"4px",minWidth:"220px",background:"var(--bg-primary)",border:"1px solid var(--border)",borderRadius:"8px",boxShadow:"var(--shadow-lg)",zIndex:50,overflow:"hidden"},children:e.map(u=>_.jsxs("button",{onClick:()=>h(u),style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",background:u.id===a?"var(--accent-light)":"transparent",color:u.id===a?"var(--accent-text)":"var(--text-primary)",cursor:"pointer",fontSize:"13px",textAlign:"left",transition:"background 0.1s ease"},onMouseEnter:d=>{u.id!==a&&(d.target.style.background="var(--bg-hover)")},onMouseLeave:d=>{u.id!==a&&(d.target.style.background="transparent")},children:[_.jsx(Gp,{size:14}),_.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.name})]},u.id))})]})},tA=()=>{const e=Ft(n=>n.toggleSearch),t=Ft(n=>n.toggleSettings),r=re(n=>n.toggleAIPanel),i=re(n=>n.aiPanelOpen);return _.jsxs("header",{style:{height:"var(--header-height)",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",borderBottom:"1px solid var(--border)",background:"var(--bg-primary)",flexShrink:0,zIndex:10},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontWeight:700,fontSize:"15px",color:"var(--accent)",userSelect:"none"},children:[_.jsx(Gp,{size:22}),_.jsx("span",{children:"Zread Browser"})]}),_.jsx("div",{style:{width:"1px",height:"24px",background:"var(--border)"}}),_.jsx(JE,{})]}),_.jsxs("button",{onClick:e,style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 14px",border:"1px solid var(--border)",borderRadius:"8px",background:"var(--bg-secondary)",color:"var(--text-secondary)",cursor:"pointer",fontSize:"13px",transition:"all 0.15s ease",minWidth:"200px"},children:[_.jsx(QE,{size:14}),_.jsx("span",{style:{flex:1,textAlign:"left"},children:"搜索..."}),_.jsx("kbd",{style:{fontSize:"11px",padding:"1px 6px",borderRadius:"4px",background:"var(--bg-tertiary)",border:"1px solid var(--border)",color:"var(--text-tertiary)",fontFamily:"inherit"},children:"Ctrl+K"})]}),_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[_.jsx("button",{onClick:r,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"36px",height:"36px",border:"1px solid var(--border)",borderRadius:"8px",background:i?"var(--accent-light)":"var(--bg-secondary)",color:i?"var(--accent-text)":"var(--text-secondary)",cursor:"pointer",transition:"all 0.15s ease"},title:"Ask AI",children:_.jsx(ZE,{size:18})}),_.jsx("button",{onClick:t,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"36px",height:"36px",border:"1px solid var(--border)",borderRadius:"8px",background:"var(--bg-secondary)",color:"var(--text-secondary)",cursor:"pointer",transition:"all 0.15s ease"},title:"设置",children:_.jsx(KE,{size:18})})]})]})},eA="/api";async function Pi(e,t){const i=await(await fetch(`${eA}${e}`,{headers:{"Content-Type":"application/json",...t==null?void 0:t.headers},...t})).json();if(!i.success)throw new Error(i.error.message);return i.data}async function rA(){return Pi("/projects")}async function um(e){return Pi(`/wiki/${encodeURIComponent(e)}`)}async function dm(e,t,r){return Pi(`/wiki/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${encodeURIComponent(r)}`)}async function ob(e,t){return Pi(`/search/${encodeURIComponent(e)}?q=${encodeURIComponent(t)}`)}async function El(){return Pi("/config")}async function qh(e){return Pi("/config",{method:"PUT",body:JSON.stringify(e)})}async function sb(e){return Pi("/projects",{method:"POST",body:JSON.stringify({path:e})})}async function ab(e){return Pi(`/projects/${encodeURIComponent(e)}`,{method:"DELETE"})}async function lb(){return Pi("/scan",{method:"POST"})}async function Xp(){return Pi("/scan/status")}async function cb(e,t,r){const i=new URLSearchParams({path:e});return t&&i.append("startLine",t.toString()),r&&i.append("endLine",r.toString()),Pi(`/files/content?${i.toString()}`)}const hb=Object.freeze(Object.defineProperty({__proto__:null,addProject:sb,deleteProject:ab,getConfig:El,getFileContent:cb,getPage:dm,getProjects:rA,getScanStatus:Xp,getWiki:um,searchProject:ob,triggerScan:lb,updateConfig:qh},Symbol.toStringTag,{value:"Module"})),ub=({size:e=14,rotated:t})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.15s ease",transform:t?"rotate(90deg)":"rotate(0deg)",flexShrink:0},children:_.jsx("path",{d:"M9 18l6-6-6-6"})});function iA(e){const t=new Map;for(const i of e.pages){t.has(i.section)||t.set(i.section,{grouped:new Map,ungrouped:[]});const n=t.get(i.section);i.group?(n.grouped.has(i.group)||n.grouped.set(i.group,[]),n.grouped.get(i.group).push(i)):n.ungrouped.push(i)}const r=[];for(const[i,n]of t){const s=[];for(const[a,c]of n.grouped)s.push({name:a,pages:c});r.push({name:i,groups:s,ungroupedPages:n.ungrouped})}return{sections:r}}const db=({page:e,isActive:t,onClick:r})=>{var m,g,x;const[i,n]=at.useState(!1),[s,a]=at.useState("bottom"),c=at.useRef(null),h=at.useRef(null),u=e.level==="Beginner"?"badge-beginner":e.level==="Intermediate"?"badge-intermediate":"badge-advanced",d=at.useCallback(()=>{c.current=setTimeout(()=>{var k;const C=(k=h.current)==null?void 0:k.getBoundingClientRect();if(C){const v=C.top;a(v>80?"top":"bottom")}n(!0)},300)},[]),f=at.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),n(!1)},[]);return _.jsxs("div",{style:{position:"relative"},children:[_.jsx("button",{ref:h,onClick:r,style:{display:"flex",alignItems:"center",width:"100%",padding:"6px 12px 6px 36px",border:"none",background:t?"var(--accent-light)":"transparent",color:t?"var(--accent-text)":"var(--text-primary)",cursor:"pointer",fontSize:"13px",textAlign:"left",borderRadius:"6px",transition:"background 0.1s ease"},onMouseEnter:C=>{t||(C.currentTarget.style.background="var(--bg-hover)"),d()},onMouseLeave:C=>{t||(C.currentTarget.style.background="transparent"),f()},children:_.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})}),i&&_.jsxs("div",{style:{position:"fixed",left:((m=h.current)==null?void 0:m.getBoundingClientRect().left)??0,top:s==="top"?(((g=h.current)==null?void 0:g.getBoundingClientRect().top)??0)-60:(((x=h.current)==null?void 0:x.getBoundingClientRect().bottom)??0)+8,zIndex:1e3,background:"var(--bg-primary)",border:"1px solid var(--border)",borderRadius:"8px",padding:"10px 12px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",minWidth:"120px",pointerEvents:"none"},children:[_.jsx("div",{style:{fontSize:"13px",fontWeight:600,color:"var(--text-primary)",marginBottom:"6px",lineHeight:1.3},children:e.title}),_.jsx("span",{className:`badge ${u}`,children:e.level})]})]})},nA=({name:e,pages:t,expanded:r,currentSlug:i,onToggle:n,onPageClick:s})=>_.jsxs("div",{children:[_.jsxs("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:"6px",width:"100%",padding:"6px 12px 6px 20px",border:"none",background:"transparent",color:"var(--text-secondary)",cursor:"pointer",fontSize:"13px",fontWeight:500,textAlign:"left",borderRadius:"6px",transition:"background 0.1s ease"},onMouseEnter:a=>{a.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:a=>{a.currentTarget.style.background="transparent"},children:[_.jsx(ub,{size:12,rotated:r}),_.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),_.jsx("span",{style:{fontSize:"11px",color:"var(--text-tertiary)"},children:t.length})]}),r&&_.jsx("div",{children:t.map(a=>_.jsx(db,{page:a,isActive:a.slug===i,onClick:()=>s(a)},a.slug))})]}),oA=({section:e,expanded:t,currentSlug:r,expandedGroups:i,onToggleSection:n,onToggleGroup:s,onPageClick:a})=>_.jsxs("div",{style:{marginBottom:"2px"},children:[_.jsxs("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:"6px",width:"100%",padding:"7px 12px",border:"none",background:"transparent",color:"var(--text-primary)",cursor:"pointer",fontSize:"13px",fontWeight:600,textAlign:"left",borderRadius:"6px",transition:"background 0.1s ease"},onMouseEnter:c=>{c.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:c=>{c.currentTarget.style.background="transparent"},children:[_.jsx(ub,{size:12,rotated:t}),_.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),t&&_.jsxs("div",{children:[e.groups.map(c=>_.jsx(nA,{name:c.name,pages:c.pages,expanded:i.includes(`${e.name}::${c.name}`),currentSlug:r,onToggle:()=>s(`${e.name}::${c.name}`),onPageClick:a},c.name)),e.ungroupedPages.map(c=>_.jsx(db,{page:c,isActive:c.slug===r,onClick:()=>a(c)},c.slug))]})]}),sA=()=>{const e=Ft(x=>x.currentWiki),t=Ft(x=>x.currentView),r=Ft(x=>x.config),i=Ft(x=>x.expandedSections),n=Ft(x=>x.expandedGroups),s=Ft(x=>x.toggleSection),a=Ft(x=>x.toggleGroup),c=Ft(x=>x.setCurrentView),h=Ft(x=>x.setCurrentWiki),u=Ft(x=>x.setLoadingWiki);Ft(x=>x.setLoadingPage);const d=r==null?void 0:r.lastOpenedProject;at.useEffect(()=>{if(!d){h(null),c(null);return}let x=!1;return u(!0),c(null),um(d).then(C=>{x||h(C)}).catch(C=>{console.error("Failed to load wiki:",C),x||h(null)}).finally(()=>{x||u(!1)}),()=>{x=!0}},[d,h,c,u]);const f=at.useMemo(()=>e?iA(e):null,[e]);at.useEffect(()=>{var x;if(f&&f.sections.length>0){const C=f.sections.map(B=>B.name),k=f.sections.flatMap(B=>B.groups.map(M=>`${B.name}::${M.name}`));Ft.getState().setExpandedSections(C),Ft.getState().setExpandedGroups(k);const v=f.sections[0],T=((x=v.groups[0])==null?void 0:x.pages[0])||v.ungroupedPages[0];T&&!g&&m(T)}},[f]);const m=async x=>{if(!d)return;const C=Ft.getState().projects.find(v=>v.id===d),k=(C==null?void 0:C.currentVersion)||"latest";c({projectId:d,version:k,slug:x.slug,content:"",loading:!0});try{const v=await dm(d,k,x.slug);c({projectId:d,version:k,slug:x.slug,content:v.content,loading:!1})}catch(v){c({projectId:d,version:k,slug:x.slug,content:"",loading:!1,error:v instanceof Error?v.message:"Failed to load page"})}},g=t==null?void 0:t.slug;return _.jsxs("aside",{style:{width:"var(--sidebar-width)",height:"100%",borderRight:"1px solid var(--border)",background:"var(--bg-primary)",display:"flex",flexDirection:"column",overflow:"hidden",flexShrink:0},children:[_.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--border)",fontSize:"12px",fontWeight:600,color:"var(--text-tertiary)",textTransform:"uppercase",letterSpacing:"0.5px",userSelect:"none"},children:"导航"}),_.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:f?f.sections.length===0?_.jsx("div",{style:{padding:"24px 16px",textAlign:"center",color:"var(--text-tertiary)",fontSize:"13px"},children:"暂无内容"}):f.sections.map(x=>_.jsx(oA,{section:x,expanded:i.includes(x.name),currentSlug:g,expandedGroups:n,onToggleSection:()=>s(x.name),onToggleGroup:C=>a(C),onPageClick:m},x.name)):_.jsx("div",{style:{padding:"24px 16px",textAlign:"center",color:"var(--text-tertiary)",fontSize:"13px"},children:d?"加载中...":"请先选择一个项目"})})]})};function aA(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const lA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hA={};function m1(e,t){return(hA.jsx?cA:lA).test(e)}const uA=/[ \t\n\f\r]/g;function dA(e){return typeof e=="object"?e.type==="text"?y1(e.value):!1:y1(e)}function y1(e){return e.replace(uA,"")===""}class rc{constructor(t,r,i){this.normal=r,this.property=t,i&&(this.space=i)}}rc.prototype.normal={};rc.prototype.property={};rc.prototype.space=void 0;function fb(e,t){const r={},i={};for(const n of e)Object.assign(r,n.property),Object.assign(i,n.normal);return new rc(r,i,t)}function Qp(e){return e.toLowerCase()}class $r{constructor(t,r){this.attribute=r,this.property=t}}$r.prototype.attribute="";$r.prototype.booleanish=!1;$r.prototype.boolean=!1;$r.prototype.commaOrSpaceSeparated=!1;$r.prototype.commaSeparated=!1;$r.prototype.defined=!1;$r.prototype.mustUseProperty=!1;$r.prototype.number=!1;$r.prototype.overloadedBoolean=!1;$r.prototype.property="";$r.prototype.spaceSeparated=!1;$r.prototype.space=void 0;let fA=0;const Xt=Xo(),$e=Xo(),Kp=Xo(),gt=Xo(),xe=Xo(),Rs=Xo(),Gr=Xo();function Xo(){return 2**++fA}const Zp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xt,booleanish:$e,commaOrSpaceSeparated:Gr,commaSeparated:Rs,number:gt,overloadedBoolean:Kp,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),sp=Object.keys(Zp);class fm extends $r{constructor(t,r,i,n){let s=-1;if(super(t,r),x1(this,"space",n),typeof i=="number")for(;++s<sp.length;){const a=sp[s];x1(this,sp[s],(i&Zp[a])===Zp[a])}}}fm.prototype.defined=!0;function x1(e,t,r){r&&(e[t]=r)}function ha(e){const t={},r={};for(const[i,n]of Object.entries(e.properties)){const s=new fm(i,e.transform(e.attributes||{},i),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,r[Qp(i)]=i,r[Qp(s.attribute)]=i}return new rc(t,r,e.space)}const pb=ha({properties:{ariaActiveDescendant:null,ariaAtomic:$e,ariaAutoComplete:null,ariaBusy:$e,ariaChecked:$e,ariaColCount:gt,ariaColIndex:gt,ariaColSpan:gt,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:$e,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:$e,ariaFlowTo:xe,ariaGrabbed:$e,ariaHasPopup:null,ariaHidden:$e,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:gt,ariaLive:null,ariaModal:$e,ariaMultiLine:$e,ariaMultiSelectable:$e,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:gt,ariaPressed:$e,ariaReadOnly:$e,ariaRelevant:null,ariaRequired:$e,ariaRoleDescription:xe,ariaRowCount:gt,ariaRowIndex:gt,ariaRowSpan:gt,ariaSelected:$e,ariaSetSize:gt,ariaSort:null,ariaValueMax:gt,ariaValueMin:gt,ariaValueNow:gt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function gb(e,t){return t in e?e[t]:t}function mb(e,t){return gb(e,t.toLowerCase())}const pA=ha({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rs,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:Xt,allowPaymentRequest:Xt,allowUserMedia:Xt,alt:null,as:null,async:Xt,autoCapitalize:null,autoComplete:xe,autoFocus:Xt,autoPlay:Xt,blocking:xe,capture:null,charSet:null,checked:Xt,cite:null,className:xe,cols:gt,colSpan:null,content:null,contentEditable:$e,controls:Xt,controlsList:xe,coords:gt|Rs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xt,defer:Xt,dir:null,dirName:null,disabled:Xt,download:Kp,draggable:$e,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xt,formTarget:null,headers:xe,height:gt,hidden:Kp,high:gt,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:Xt,inputMode:null,integrity:null,is:null,isMap:Xt,itemId:null,itemProp:xe,itemRef:xe,itemScope:Xt,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xt,low:gt,manifest:null,max:null,maxLength:gt,media:null,method:null,min:null,minLength:gt,multiple:Xt,muted:Xt,name:null,nonce:null,noModule:Xt,noValidate:Xt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Xt,optimum:gt,pattern:null,ping:xe,placeholder:null,playsInline:Xt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xt,referrerPolicy:null,rel:xe,required:Xt,reversed:Xt,rows:gt,rowSpan:gt,sandbox:xe,scope:null,scoped:Xt,seamless:Xt,selected:Xt,shadowRootClonable:Xt,shadowRootDelegatesFocus:Xt,shadowRootMode:null,shape:null,size:gt,sizes:null,slot:null,span:gt,spellCheck:$e,src:null,srcDoc:null,srcLang:null,srcSet:null,start:gt,step:null,style:null,tabIndex:gt,target:null,title:null,translate:null,type:null,typeMustMatch:Xt,useMap:null,value:$e,width:gt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:gt,borderColor:null,bottomMargin:gt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xt,declare:Xt,event:null,face:null,frame:null,frameBorder:null,hSpace:gt,leftMargin:gt,link:null,longDesc:null,lowSrc:null,marginHeight:gt,marginWidth:gt,noResize:Xt,noHref:Xt,noShade:Xt,noWrap:Xt,object:null,profile:null,prompt:null,rev:null,rightMargin:gt,rules:null,scheme:null,scrolling:$e,standby:null,summary:null,text:null,topMargin:gt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:gt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xt,disableRemotePlayback:Xt,prefix:null,property:null,results:gt,security:null,unselectable:null},space:"html",transform:mb}),gA=ha({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gr,accentHeight:gt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:gt,amplitude:gt,arabicForm:null,ascent:gt,attributeName:null,attributeType:null,azimuth:gt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:gt,by:null,calcMode:null,capHeight:gt,className:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:gt,diffuseConstant:gt,direction:null,display:null,dur:null,divisor:gt,dominantBaseline:null,download:Xt,dx:null,dy:null,edgeMode:null,editable:null,elevation:gt,enableBackground:null,end:null,event:null,exponent:gt,externalResourcesRequired:null,fill:null,fillOpacity:gt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Rs,g2:Rs,glyphName:Rs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:gt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:gt,horizOriginX:gt,horizOriginY:gt,id:null,ideographic:gt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:gt,k:gt,k1:gt,k2:gt,k3:gt,k4:gt,kernelMatrix:Gr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:gt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:gt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:gt,overlineThickness:gt,paintOrder:null,panose1:null,path:null,pathLength:gt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:gt,pointsAtY:gt,pointsAtZ:gt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gr,rev:Gr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gr,requiredFeatures:Gr,requiredFonts:Gr,requiredFormats:Gr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:gt,specularExponent:gt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:gt,strikethroughThickness:gt,string:null,stroke:null,strokeDashArray:Gr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:gt,strokeOpacity:gt,strokeWidth:null,style:null,surfaceScale:gt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gr,tabIndex:gt,tableValues:null,target:null,targetX:gt,targetY:gt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:gt,underlineThickness:gt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:gt,values:null,vAlphabetic:gt,vMathematical:gt,vectorEffect:null,vHanging:gt,vIdeographic:gt,version:null,vertAdvY:gt,vertOriginX:gt,vertOriginY:gt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:gt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gb}),yb=ha({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xb=ha({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mb}),Cb=ha({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),mA={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},yA=/[A-Z]/g,C1=/-[a-z]/g,xA=/^data[-\w.:]+$/i;function CA(e,t){const r=Qp(t);let i=t,n=$r;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&xA.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(C1,bA);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!C1.test(s)){let a=s.replace(yA,kA);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}n=fm}return new n(i,t)}function kA(e){return"-"+e.toLowerCase()}function bA(e){return e.charAt(1).toUpperCase()}const vA=fb([pb,pA,yb,xb,Cb],"html"),pm=fb([pb,gA,yb,xb,Cb],"svg");function wA(e){return e.join(" ").trim()}var Ts={},ap,k1;function SA(){if(k1)return ap;k1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,h=`
42
+ `,u="/",d="*",f="",m="comment",g="declaration";function x(k,v){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];v=v||{};var T=1,B=1;function M(V){var j=V.match(t);j&&(T+=j.length);var q=V.lastIndexOf(h);B=~q?V.length-q:B+V.length}function O(){var V={line:T,column:B};return function(j){return j.position=new F(V),K(),j}}function F(V){this.start=V,this.end={line:T,column:B},this.source=v.source}F.prototype.content=k;function E(V){var j=new Error(v.source+":"+T+":"+B+": "+V);if(j.reason=V,j.filename=v.source,j.line=T,j.column=B,j.source=k,!v.silent)throw j}function z(V){var j=V.exec(k);if(j){var q=j[0];return M(q),k=k.slice(q.length),j}}function K(){z(r)}function P(V){var j;for(V=V||[];j=N();)j!==!1&&V.push(j);return V}function N(){var V=O();if(!(u!=k.charAt(0)||d!=k.charAt(1))){for(var j=2;f!=k.charAt(j)&&(d!=k.charAt(j)||u!=k.charAt(j+1));)++j;if(j+=2,f===k.charAt(j-1))return E("End of comment missing");var q=k.slice(2,j-2);return B+=2,M(q),k=k.slice(j),B+=2,V({type:m,comment:q})}}function Z(){var V=O(),j=z(i);if(j){if(N(),!z(n))return E("property missing ':'");var q=z(s),Y=V({type:g,property:C(j[0].replace(e,f)),value:q?C(q[0].replace(e,f)):f});return z(a),Y}}function it(){var V=[];P(V);for(var j;j=Z();)j!==!1&&(V.push(j),P(V));return V}return K(),it()}function C(k){return k?k.replace(c,f):f}return ap=x,ap}var b1;function TA(){if(b1)return Ts;b1=1;var e=Ts&&Ts.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.default=r;const t=e(SA());function r(i,n){let s=null;if(!i||typeof i!="string")return s;const a=(0,t.default)(i),c=typeof n=="function";return a.forEach(h=>{if(h.type!=="declaration")return;const{property:u,value:d}=h;c?n(u,d,h):d&&(s=s||{},s[u]=d)}),s}return Ts}var nl={},v1;function _A(){if(v1)return nl;v1=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,n=/^-(ms)-/,s=function(u){return!u||r.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},c=function(u,d){return"".concat(d,"-")},h=function(u,d){return d===void 0&&(d={}),s(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(n,c):u=u.replace(i,c),u.replace(t,a))};return nl.camelCase=h,nl}var ol,w1;function BA(){if(w1)return ol;w1=1;var e=ol&&ol.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},t=e(TA()),r=_A();function i(n,s){var a={};return!n||typeof n!="string"||(0,t.default)(n,function(c,h){c&&h&&(a[(0,r.camelCase)(c,s)]=h)}),a}return i.default=i,ol=i,ol}var LA=BA();const EA=ec(LA),kb=bb("end"),gm=bb("start");function bb(e){return t;function t(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function AA(e){const t=gm(e),r=kb(e);if(t&&r)return{start:t,end:r}}function Al(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?S1(e.position):"start"in e||"end"in e?S1(e):"line"in e||"column"in e?Jp(e):""}function Jp(e){return T1(e&&e.line)+":"+T1(e&&e.column)}function S1(e){return Jp(e&&e.start)+"-"+Jp(e&&e.end)}function T1(e){return e&&typeof e=="number"?e:1}class pr extends Error{constructor(t,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let n="",s={},a=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?n=t:!s.cause&&t&&(a=!0,n=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?s.ruleId=i:(s.source=i.slice(0,h),s.ruleId=i.slice(h+1))}if(!s.place&&s.ancestors&&s.ancestors){const h=s.ancestors[s.ancestors.length-1];h&&(s.place=h.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=c?c.line:void 0,this.name=Al(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pr.prototype.file="";pr.prototype.name="";pr.prototype.reason="";pr.prototype.message="";pr.prototype.stack="";pr.prototype.column=void 0;pr.prototype.line=void 0;pr.prototype.ancestors=void 0;pr.prototype.cause=void 0;pr.prototype.fatal=void 0;pr.prototype.place=void 0;pr.prototype.ruleId=void 0;pr.prototype.source=void 0;const mm={}.hasOwnProperty,FA=new Map,MA=/[A-Z]/g,IA=new Set(["table","tbody","thead","tfoot","tr"]),PA=new Set(["td","th"]),vb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OA(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=qA(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=WA(r,t.jsx,t.jsxs)}const n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?pm:vA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=wb(n,e,void 0);return s&&typeof s!="string"?s:n.create(e,n.Fragment,{children:s||void 0},void 0)}function wb(e,t,r){if(t.type==="element")return DA(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return RA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zA(e,t,r);if(t.type==="mdxjsEsm")return $A(e,t);if(t.type==="root")return NA(e,t,r);if(t.type==="text")return jA(e,t)}function DA(e,t,r){const i=e.schema;let n=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(n=pm,e.schema=n),e.ancestors.push(t);const s=Tb(e,t.tagName,!1),a=HA(e,t);let c=xm(e,t);return IA.has(t.tagName)&&(c=c.filter(function(h){return typeof h=="string"?!dA(h):!0})),Sb(e,a,s,t),ym(a,c),e.ancestors.pop(),e.schema=i,e.create(t,s,a,r)}function RA(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}zl(e,t.position)}function $A(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zl(e,t.position)}function zA(e,t,r){const i=e.schema;let n=i;t.name==="svg"&&i.space==="html"&&(n=pm,e.schema=n),e.ancestors.push(t);const s=t.name===null?e.Fragment:Tb(e,t.name,!0),a=UA(e,t),c=xm(e,t);return Sb(e,a,s,t),ym(a,c),e.ancestors.pop(),e.schema=i,e.create(t,s,a,r)}function NA(e,t,r){const i={};return ym(i,xm(e,t)),e.create(t,e.Fragment,i,r)}function jA(e,t){return t.value}function Sb(e,t,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=i)}function ym(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function WA(e,t,r){return i;function i(n,s,a,c){const u=Array.isArray(a.children)?r:t;return c?u(s,a,c):u(s,a)}}function qA(e,t){return r;function r(i,n,s,a){const c=Array.isArray(s.children),h=gm(i);return t(n,s,a,c,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function HA(e,t){const r={};let i,n;for(n in t.properties)if(n!=="children"&&mm.call(t.properties,n)){const s=VA(e,n,t.properties[n]);if(s){const[a,c]=s;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&PA.has(t.tagName)?i=c:r[a]=c}}if(i){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function UA(e,t){const r={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const a=s.expression;a.type;const c=a.properties[0];c.type,Object.assign(r,e.evaluater.evaluateExpression(c.argument))}else zl(e,t.position);else{const n=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,s=e.evaluater.evaluateExpression(c.expression)}else zl(e,t.position);else s=i.value===null?!0:i.value;r[n]=s}return r}function xm(e,t){const r=[];let i=-1;const n=e.passKeys?new Map:FA;for(;++i<t.children.length;){const s=t.children[i];let a;if(e.passKeys){const h=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(h){const u=n.get(h)||0;a=h+"-"+u,n.set(h,u+1)}}const c=wb(e,s,a);c!==void 0&&r.push(c)}return r}function VA(e,t,r){const i=CA(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?aA(r):wA(r)),i.property==="style"){let n=typeof r=="object"?r:YA(e,String(r));return e.stylePropertyNameCase==="css"&&(n=GA(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&i.space?mA[i.property]||i.property:i.attribute,r]}}function YA(e,t){try{return EA(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,n=new pr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=vb+"#cannot-parse-style-attribute",n}}function Tb(e,t,r){let i;if(!r)i={type:"Literal",value:t};else if(t.includes(".")){const n=t.split(".");let s=-1,a;for(;++s<n.length;){const c=m1(n[s])?{type:"Identifier",name:n[s]}:{type:"Literal",value:n[s]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}i=a}else i=m1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const n=i.value;return mm.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(i);zl(e)}function zl(e,t){const r=new pr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=vb+"#cannot-handle-mdx-estrees-without-createevaluater",r}function GA(e){const t={};let r;for(r in e)mm.call(e,r)&&(t[XA(r)]=e[r]);return t}function XA(e){let t=e.replace(MA,QA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function QA(e){return"-"+e.toLowerCase()}const lp={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},KA={};function Cm(e,t){const r=KA,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return _b(e,i,n)}function _b(e,t,r){if(ZA(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _1(e.children,t,r)}return Array.isArray(e)?_1(e,t,r):""}function _1(e,t,r){const i=[];let n=-1;for(;++n<e.length;)i[n]=_b(e[n],t,r);return i.join("")}function ZA(e){return!!(e&&typeof e=="object")}const B1=document.createElement("i");function km(e){const t="&"+e+";";B1.innerHTML=t;const r=B1.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Qr(e,t,r,i){const n=e.length;let s=0,a;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,i.length<1e4)a=Array.from(i),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);s<i.length;)a=i.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function hi(e,t){return e.length>0?(Qr(e,e.length,0,t),e):t}const L1={}.hasOwnProperty;function Bb(e){const t={};let r=-1;for(;++r<e.length;)JA(t,e[r]);return t}function JA(e,t){let r;for(r in t){const n=(L1.call(e,r)?e[r]:void 0)||(e[r]={}),s=t[r];let a;if(s)for(a in s){L1.call(n,a)||(n[a]=[]);const c=s[a];tF(n[a],Array.isArray(c)?c:c?[c]:[])}}}function tF(e,t){let r=-1;const i=[];for(;++r<t.length;)(t[r].add==="after"?e:i).push(t[r]);Qr(e,0,0,i)}function Lb(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Ai(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kr=ho(/[A-Za-z]/),dr=ho(/[\dA-Za-z]/),eF=ho(/[#-'*+\--9=?A-Z^-~]/);function su(e){return e!==null&&(e<32||e===127)}const tg=ho(/\d/),rF=ho(/[\dA-Fa-f]/),iF=ho(/[!-/:-@[-`{-~]/);function Nt(e){return e!==null&&e<-2}function ge(e){return e!==null&&(e<0||e===32)}function te(e){return e===-2||e===-1||e===32}const Uu=ho(new RegExp("\\p{P}|\\p{S}","u")),No=ho(/\s/);function ho(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function ua(e){const t=[];let r=-1,i=0,n=0;for(;++r<e.length;){const s=e.charCodeAt(r);let a="";if(s===37&&dr(e.charCodeAt(r+1))&&dr(e.charCodeAt(r+2)))n=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const c=e.charCodeAt(r+1);s<56320&&c>56319&&c<57344?(a=String.fromCharCode(s,c),n=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(i,r),encodeURIComponent(a)),i=r+n+1,a=""),n&&(r+=n,n=0)}return t.join("")+e.slice(i)}function oe(e,t,r,i){const n=i?i-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(h){return te(h)?(e.enter(r),c(h)):t(h)}function c(h){return te(h)&&s++<n?(e.consume(h),c):(e.exit(r),t(h))}}const nF={tokenize:oF};function oF(e){const t=e.attempt(this.parser.constructs.contentInitial,i,n);let r;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),oe(e,t,"linePrefix")}function n(c){return e.enter("paragraph"),s(c)}function s(c){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Nt(c)?(e.consume(c),e.exit("chunkText"),s):(e.consume(c),a)}}const sF={tokenize:aF},E1={tokenize:lF};function aF(e){const t=this,r=[];let i=0,n,s,a;return c;function c(B){if(i<r.length){const M=r[i];return t.containerState=M[1],e.attempt(M[0].continuation,h,u)(B)}return u(B)}function h(B){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&T();const M=t.events.length;let O=M,F;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){F=t.events[O][1].end;break}v(i);let E=M;for(;E<t.events.length;)t.events[E][1].end={...F},E++;return Qr(t.events,O+1,0,t.events.slice(M)),t.events.length=E,u(B)}return c(B)}function u(B){if(i===r.length){if(!n)return m(B);if(n.currentConstruct&&n.currentConstruct.concrete)return x(B);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(E1,d,f)(B)}function d(B){return n&&T(),v(i),m(B)}function f(B){return t.parser.lazy[t.now().line]=i!==r.length,a=t.now().offset,x(B)}function m(B){return t.containerState={},e.attempt(E1,g,x)(B)}function g(B){return i++,r.push([t.currentConstruct,t.containerState]),m(B)}function x(B){if(B===null){n&&T(),v(0),e.consume(B);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:s}),C(B)}function C(B){if(B===null){k(e.exit("chunkFlow"),!0),v(0),e.consume(B);return}return Nt(B)?(e.consume(B),k(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(B),C)}function k(B,M){const O=t.sliceStream(B);if(M&&O.push(null),B.previous=s,s&&(s.next=B),s=B,n.defineSkip(B.start),n.write(O),t.parser.lazy[B.start.line]){let F=n.events.length;for(;F--;)if(n.events[F][1].start.offset<a&&(!n.events[F][1].end||n.events[F][1].end.offset>a))return;const E=t.events.length;let z=E,K,P;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(K){P=t.events[z][1].end;break}K=!0}for(v(i),F=E;F<t.events.length;)t.events[F][1].end={...P},F++;Qr(t.events,z+1,0,t.events.slice(E)),t.events.length=F}}function v(B){let M=r.length;for(;M-- >B;){const O=r[M];t.containerState=O[1],O[0].exit.call(t,e)}r.length=B}function T(){n.write([null]),s=void 0,n=void 0,t.containerState._closeFlow=void 0}}function lF(e,t,r){return oe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ea(e){if(e===null||ge(e)||No(e))return 1;if(Uu(e))return 2}function Vu(e,t,r){const i=[];let n=-1;for(;++n<e.length;){const s=e[n].resolveAll;s&&!i.includes(s)&&(t=s(t,r),i.push(s))}return t}const eg={name:"attention",resolveAll:cF,tokenize:hF};function cF(e,t){let r=-1,i,n,s,a,c,h,u,d;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f={...e[i][1].end},m={...e[r][1].start};A1(f,-h),A1(m,h),a={type:h>1?"strongSequence":"emphasisSequence",start:f,end:{...e[i][1].end}},c={type:h>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:m},s={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},n={type:h>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[i][1].end={...a.start},e[r][1].start={...c.end},u=[],e[i][1].end.offset-e[i][1].start.offset&&(u=hi(u,[["enter",e[i][1],t],["exit",e[i][1],t]])),u=hi(u,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=hi(u,Vu(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),u=hi(u,[["exit",s,t],["enter",c,t],["exit",c,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(d=2,u=hi(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):d=0,Qr(e,i-1,r-i+3,u),r=i+u.length-d-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function hF(e,t){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,n=ea(i);let s;return a;function a(h){return s=h,e.enter("attentionSequence"),c(h)}function c(h){if(h===s)return e.consume(h),c;const u=e.exit("attentionSequence"),d=ea(h),f=!d||d===2&&n||r.includes(h),m=!n||n===2&&d||r.includes(i);return u._open=!!(s===42?f:f&&(n||!m)),u._close=!!(s===42?m:m&&(d||!f)),t(h)}}function A1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const uF={name:"autolink",tokenize:dF};function dF(e,t,r){let i=0;return n;function n(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(g){return kr(g)?(e.consume(g),a):g===64?r(g):u(g)}function a(g){return g===43||g===45||g===46||dr(g)?(i=1,c(g)):u(g)}function c(g){return g===58?(e.consume(g),i=0,h):(g===43||g===45||g===46||dr(g))&&i++<32?(e.consume(g),c):(i=0,u(g))}function h(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||su(g)?r(g):(e.consume(g),h)}function u(g){return g===64?(e.consume(g),d):eF(g)?(e.consume(g),u):r(g)}function d(g){return dr(g)?f(g):r(g)}function f(g){return g===46?(e.consume(g),i=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):m(g)}function m(g){if((g===45||dr(g))&&i++<63){const x=g===45?m:f;return e.consume(g),x}return r(g)}}const ic={partial:!0,tokenize:fF};function fF(e,t,r){return i;function i(s){return te(s)?oe(e,n,"linePrefix")(s):n(s)}function n(s){return s===null||Nt(s)?t(s):r(s)}}const Eb={continuation:{tokenize:gF},exit:mF,name:"blockQuote",tokenize:pF};function pF(e,t,r){const i=this;return n;function n(a){if(a===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return r(a)}function s(a){return te(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function gF(e,t,r){const i=this;return n;function n(a){return te(a)?oe(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Eb,t,r)(a)}}function mF(e){e.exit("blockQuote")}const Ab={name:"characterEscape",tokenize:yF};function yF(e,t,r){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),n}function n(s){return iF(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(s)}}const Fb={name:"characterReference",tokenize:xF};function xF(e,t,r){const i=this;let n=0,s,a;return c;function c(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),h}function h(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=dr,d(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=rF,d):(e.enter("characterReferenceValue"),s=7,a=tg,d(f))}function d(f){if(f===59&&n){const m=e.exit("characterReferenceValue");return a===dr&&!km(i.sliceSerialize(m))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&n++<s?(e.consume(f),d):r(f)}}const F1={partial:!0,tokenize:kF},M1={concrete:!0,name:"codeFenced",tokenize:CF};function CF(e,t,r){const i=this,n={partial:!0,tokenize:O};let s=0,a=0,c;return h;function h(F){return u(F)}function u(F){const E=i.events[i.events.length-1];return s=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(F)}function d(F){return F===c?(a++,e.consume(F),d):a<3?r(F):(e.exit("codeFencedFenceSequence"),te(F)?oe(e,f,"whitespace")(F):f(F))}function f(F){return F===null||Nt(F)?(e.exit("codeFencedFence"),i.interrupt?t(F):e.check(F1,C,M)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(F))}function m(F){return F===null||Nt(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(F)):te(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),oe(e,g,"whitespace")(F)):F===96&&F===c?r(F):(e.consume(F),m)}function g(F){return F===null||Nt(F)?f(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(F))}function x(F){return F===null||Nt(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(F)):F===96&&F===c?r(F):(e.consume(F),x)}function C(F){return e.attempt(n,M,k)(F)}function k(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),v}function v(F){return s>0&&te(F)?oe(e,T,"linePrefix",s+1)(F):T(F)}function T(F){return F===null||Nt(F)?e.check(F1,C,M)(F):(e.enter("codeFlowValue"),B(F))}function B(F){return F===null||Nt(F)?(e.exit("codeFlowValue"),T(F)):(e.consume(F),B)}function M(F){return e.exit("codeFenced"),t(F)}function O(F,E,z){let K=0;return P;function P(j){return F.enter("lineEnding"),F.consume(j),F.exit("lineEnding"),N}function N(j){return F.enter("codeFencedFence"),te(j)?oe(F,Z,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):Z(j)}function Z(j){return j===c?(F.enter("codeFencedFenceSequence"),it(j)):z(j)}function it(j){return j===c?(K++,F.consume(j),it):K>=a?(F.exit("codeFencedFenceSequence"),te(j)?oe(F,V,"whitespace")(j):V(j)):z(j)}function V(j){return j===null||Nt(j)?(F.exit("codeFencedFence"),E(j)):z(j)}}}function kF(e,t,r){const i=this;return n;function n(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return i.parser.lazy[i.now().line]?r(a):t(a)}}const cp={name:"codeIndented",tokenize:vF},bF={partial:!0,tokenize:wF};function vF(e,t,r){const i=this;return n;function n(u){return e.enter("codeIndented"),oe(e,s,"linePrefix",5)(u)}function s(u){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):r(u)}function a(u){return u===null?h(u):Nt(u)?e.attempt(bF,a,h)(u):(e.enter("codeFlowValue"),c(u))}function c(u){return u===null||Nt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),c)}function h(u){return e.exit("codeIndented"),t(u)}}function wF(e,t,r){const i=this;return n;function n(a){return i.parser.lazy[i.now().line]?r(a):Nt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n):oe(e,s,"linePrefix",5)(a)}function s(a){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Nt(a)?n(a):r(a)}}const SF={name:"codeText",previous:_F,resolve:TF,tokenize:BF};function TF(e){let t=e.length-4,r=3,i,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=r;++i<t;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(i=r-1,t++;++i<=t;)n===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(n=i):(i===t||e[i][1].type==="lineEnding")&&(e[n][1].type="codeTextData",i!==n+2&&(e[n][1].end=e[i-1][1].end,e.splice(n+2,i-n-2),t-=i-n-2,i=n+2),n=void 0);return e}function _F(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BF(e,t,r){let i=0,n,s;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),c(f)}function c(f){return f===96?(e.consume(f),i++,c):(e.exit("codeTextSequence"),h(f))}function h(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),h):f===96?(s=e.enter("codeTextSequence"),n=0,d(f)):Nt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),h):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||Nt(f)?(e.exit("codeTextData"),h(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),n++,d):n===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",u(f))}}class LF{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,r,i){const n=r||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return i&&sl(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),sl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),sl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);sl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);sl(this.left,r.reverse())}}}function sl(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function Mb(e){const t={};let r=-1,i,n,s,a,c,h,u;const d=new LF(e);for(;++r<d.length;){for(;r in t;)r=t[r];if(i=d.get(r),r&&i[1].type==="chunkFlow"&&d.get(r-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,s=0,s<h.length&&h[s][1].type==="lineEndingBlank"&&(s+=2),s<h.length&&h[s][1].type==="content"))for(;++s<h.length&&h[s][1].type!=="content";)h[s][1].type==="chunkText"&&(h[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,EF(d,r)),r=t[r],u=!0);else if(i[1]._container){for(s=r,n=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(n&&(d.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;n&&(i[1].end={...d.get(n)[1].start},c=d.slice(n,r),c.unshift(i),d.splice(n,r-n+1,c))}}return Qr(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function EF(e,t){const r=e.get(t)[1],i=e.get(t)[2];let n=t-1;const s=[];let a=r._tokenizer;a||(a=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,h=[],u={};let d,f,m=-1,g=r,x=0,C=0;const k=[C];for(;g;){for(;e.get(++n)[1]!==g;);s.push(n),g._tokenizer||(d=i.sliceStream(g),g.next||d.push(null),f&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=g,g=g.next}for(g=r;++m<c.length;)c[m][0]==="exit"&&c[m-1][0]==="enter"&&c[m][1].type===c[m-1][1].type&&c[m][1].start.line!==c[m][1].end.line&&(C=m+1,k.push(C),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):k.pop(),m=k.length;m--;){const v=c.slice(k[m],k[m+1]),T=s.pop();h.push([T,T+v.length-1]),e.splice(T,2,v)}for(h.reverse(),m=-1;++m<h.length;)u[x+h[m][0]]=x+h[m][1],x+=h[m][1]-h[m][0]-1;return u}const AF={resolve:MF,tokenize:IF},FF={partial:!0,tokenize:PF};function MF(e){return Mb(e),e}function IF(e,t){let r;return i;function i(c){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(c)}function n(c){return c===null?s(c):Nt(c)?e.check(FF,a,s)(c):(e.consume(c),n)}function s(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function PF(e,t,r){const i=this;return n;function n(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),oe(e,s,"linePrefix")}function s(a){if(a===null||Nt(a))return r(a);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,r,t)(a)}}function Ib(e,t,r,i,n,s,a,c,h){const u=h||Number.POSITIVE_INFINITY;let d=0;return f;function f(v){return v===60?(e.enter(i),e.enter(n),e.enter(s),e.consume(v),e.exit(s),m):v===null||v===32||v===41||su(v)?r(v):(e.enter(i),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),C(v))}function m(v){return v===62?(e.enter(s),e.consume(v),e.exit(s),e.exit(n),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===62?(e.exit("chunkString"),e.exit(c),m(v)):v===null||v===60||Nt(v)?r(v):(e.consume(v),v===92?x:g)}function x(v){return v===60||v===62||v===92?(e.consume(v),g):g(v)}function C(v){return!d&&(v===null||v===41||ge(v))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(i),t(v)):d<u&&v===40?(e.consume(v),d++,C):v===41?(e.consume(v),d--,C):v===null||v===32||v===40||su(v)?r(v):(e.consume(v),v===92?k:C)}function k(v){return v===40||v===41||v===92?(e.consume(v),C):C(v)}}function Pb(e,t,r,i,n,s){const a=this;let c=0,h;return u;function u(g){return e.enter(i),e.enter(n),e.consume(g),e.exit(n),e.enter(s),d}function d(g){return c>999||g===null||g===91||g===93&&!h||g===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?r(g):g===93?(e.exit(s),e.enter(n),e.consume(g),e.exit(n),e.exit(i),t):Nt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===null||g===91||g===93||Nt(g)||c++>999?(e.exit("chunkString"),d(g)):(e.consume(g),h||(h=!te(g)),g===92?m:f)}function m(g){return g===91||g===92||g===93?(e.consume(g),c++,f):f(g)}}function Ob(e,t,r,i,n,s){let a;return c;function c(m){return m===34||m===39||m===40?(e.enter(i),e.enter(n),e.consume(m),e.exit(n),a=m===40?41:m,h):r(m)}function h(m){return m===a?(e.enter(n),e.consume(m),e.exit(n),e.exit(i),t):(e.enter(s),u(m))}function u(m){return m===a?(e.exit(s),h(a)):m===null?r(m):Nt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),oe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===a||m===null||Nt(m)?(e.exit("chunkString"),u(m)):(e.consume(m),m===92?f:d)}function f(m){return m===a||m===92?(e.consume(m),d):d(m)}}function Fl(e,t){let r;return i;function i(n){return Nt(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,i):te(n)?oe(e,i,r?"linePrefix":"lineSuffix")(n):t(n)}}const OF={name:"definition",tokenize:RF},DF={partial:!0,tokenize:$F};function RF(e,t,r){const i=this;let n;return s;function s(g){return e.enter("definition"),a(g)}function a(g){return Pb.call(i,e,c,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function c(g){return n=Ai(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),h):r(g)}function h(g){return ge(g)?Fl(e,u)(g):u(g)}function u(g){return Ib(e,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(DF,f,f)(g)}function f(g){return te(g)?oe(e,m,"whitespace")(g):m(g)}function m(g){return g===null||Nt(g)?(e.exit("definition"),i.parser.defined.push(n),t(g)):r(g)}}function $F(e,t,r){return i;function i(c){return ge(c)?Fl(e,n)(c):r(c)}function n(c){return Ob(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return te(c)?oe(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Nt(c)?t(c):r(c)}}const zF={name:"hardBreakEscape",tokenize:NF};function NF(e,t,r){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),n}function n(s){return Nt(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const jF={name:"headingAtx",resolve:WF,tokenize:qF};function WF(e,t){let r=e.length-2,i=3,n,s;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},s={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},Qr(e,i,r-i+1,[["enter",n,t],["enter",s,t],["exit",s,t],["exit",n,t]])),e}function qF(e,t,r){let i=0;return n;function n(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&i++<6?(e.consume(d),a):d===null||ge(d)?(e.exit("atxHeadingSequence"),c(d)):r(d)}function c(d){return d===35?(e.enter("atxHeadingSequence"),h(d)):d===null||Nt(d)?(e.exit("atxHeading"),t(d)):te(d)?oe(e,c,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function h(d){return d===35?(e.consume(d),h):(e.exit("atxHeadingSequence"),c(d))}function u(d){return d===null||d===35||ge(d)?(e.exit("atxHeadingText"),c(d)):(e.consume(d),u)}}const HF=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],I1=["pre","script","style","textarea"],UF={concrete:!0,name:"htmlFlow",resolveTo:GF,tokenize:XF},VF={partial:!0,tokenize:KF},YF={partial:!0,tokenize:QF};function GF(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function XF(e,t,r){const i=this;let n,s,a,c,h;return u;function u(D){return d(D)}function d(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),f}function f(D){return D===33?(e.consume(D),m):D===47?(e.consume(D),s=!0,C):D===63?(e.consume(D),n=3,i.interrupt?t:I):kr(D)?(e.consume(D),a=String.fromCharCode(D),k):r(D)}function m(D){return D===45?(e.consume(D),n=2,g):D===91?(e.consume(D),n=5,c=0,x):kr(D)?(e.consume(D),n=4,i.interrupt?t:I):r(D)}function g(D){return D===45?(e.consume(D),i.interrupt?t:I):r(D)}function x(D){const yt="CDATA[";return D===yt.charCodeAt(c++)?(e.consume(D),c===yt.length?i.interrupt?t:Z:x):r(D)}function C(D){return kr(D)?(e.consume(D),a=String.fromCharCode(D),k):r(D)}function k(D){if(D===null||D===47||D===62||ge(D)){const yt=D===47,pt=a.toLowerCase();return!yt&&!s&&I1.includes(pt)?(n=1,i.interrupt?t(D):Z(D)):HF.includes(a.toLowerCase())?(n=6,yt?(e.consume(D),v):i.interrupt?t(D):Z(D)):(n=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(D):s?T(D):B(D))}return D===45||dr(D)?(e.consume(D),a+=String.fromCharCode(D),k):r(D)}function v(D){return D===62?(e.consume(D),i.interrupt?t:Z):r(D)}function T(D){return te(D)?(e.consume(D),T):P(D)}function B(D){return D===47?(e.consume(D),P):D===58||D===95||kr(D)?(e.consume(D),M):te(D)?(e.consume(D),B):P(D)}function M(D){return D===45||D===46||D===58||D===95||dr(D)?(e.consume(D),M):O(D)}function O(D){return D===61?(e.consume(D),F):te(D)?(e.consume(D),O):B(D)}function F(D){return D===null||D===60||D===61||D===62||D===96?r(D):D===34||D===39?(e.consume(D),h=D,E):te(D)?(e.consume(D),F):z(D)}function E(D){return D===h?(e.consume(D),h=null,K):D===null||Nt(D)?r(D):(e.consume(D),E)}function z(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||ge(D)?O(D):(e.consume(D),z)}function K(D){return D===47||D===62||te(D)?B(D):r(D)}function P(D){return D===62?(e.consume(D),N):r(D)}function N(D){return D===null||Nt(D)?Z(D):te(D)?(e.consume(D),N):r(D)}function Z(D){return D===45&&n===2?(e.consume(D),q):D===60&&n===1?(e.consume(D),Y):D===62&&n===4?(e.consume(D),W):D===63&&n===3?(e.consume(D),I):D===93&&n===5?(e.consume(D),J):Nt(D)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(VF,et,it)(D)):D===null||Nt(D)?(e.exit("htmlFlowData"),it(D)):(e.consume(D),Z)}function it(D){return e.check(YF,V,et)(D)}function V(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),j}function j(D){return D===null||Nt(D)?it(D):(e.enter("htmlFlowData"),Z(D))}function q(D){return D===45?(e.consume(D),I):Z(D)}function Y(D){return D===47?(e.consume(D),a="",R):Z(D)}function R(D){if(D===62){const yt=a.toLowerCase();return I1.includes(yt)?(e.consume(D),W):Z(D)}return kr(D)&&a.length<8?(e.consume(D),a+=String.fromCharCode(D),R):Z(D)}function J(D){return D===93?(e.consume(D),I):Z(D)}function I(D){return D===62?(e.consume(D),W):D===45&&n===2?(e.consume(D),I):Z(D)}function W(D){return D===null||Nt(D)?(e.exit("htmlFlowData"),et(D)):(e.consume(D),W)}function et(D){return e.exit("htmlFlow"),t(D)}}function QF(e,t,r){const i=this;return n;function n(a){return Nt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):r(a)}function s(a){return i.parser.lazy[i.now().line]?r(a):t(a)}}function KF(e,t,r){return i;function i(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(ic,t,r)}}const ZF={name:"htmlText",tokenize:JF};function JF(e,t,r){const i=this;let n,s,a;return c;function c(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),h}function h(I){return I===33?(e.consume(I),u):I===47?(e.consume(I),O):I===63?(e.consume(I),B):kr(I)?(e.consume(I),z):r(I)}function u(I){return I===45?(e.consume(I),d):I===91?(e.consume(I),s=0,x):kr(I)?(e.consume(I),T):r(I)}function d(I){return I===45?(e.consume(I),g):r(I)}function f(I){return I===null?r(I):I===45?(e.consume(I),m):Nt(I)?(a=f,Y(I)):(e.consume(I),f)}function m(I){return I===45?(e.consume(I),g):f(I)}function g(I){return I===62?q(I):I===45?m(I):f(I)}function x(I){const W="CDATA[";return I===W.charCodeAt(s++)?(e.consume(I),s===W.length?C:x):r(I)}function C(I){return I===null?r(I):I===93?(e.consume(I),k):Nt(I)?(a=C,Y(I)):(e.consume(I),C)}function k(I){return I===93?(e.consume(I),v):C(I)}function v(I){return I===62?q(I):I===93?(e.consume(I),v):C(I)}function T(I){return I===null||I===62?q(I):Nt(I)?(a=T,Y(I)):(e.consume(I),T)}function B(I){return I===null?r(I):I===63?(e.consume(I),M):Nt(I)?(a=B,Y(I)):(e.consume(I),B)}function M(I){return I===62?q(I):B(I)}function O(I){return kr(I)?(e.consume(I),F):r(I)}function F(I){return I===45||dr(I)?(e.consume(I),F):E(I)}function E(I){return Nt(I)?(a=E,Y(I)):te(I)?(e.consume(I),E):q(I)}function z(I){return I===45||dr(I)?(e.consume(I),z):I===47||I===62||ge(I)?K(I):r(I)}function K(I){return I===47?(e.consume(I),q):I===58||I===95||kr(I)?(e.consume(I),P):Nt(I)?(a=K,Y(I)):te(I)?(e.consume(I),K):q(I)}function P(I){return I===45||I===46||I===58||I===95||dr(I)?(e.consume(I),P):N(I)}function N(I){return I===61?(e.consume(I),Z):Nt(I)?(a=N,Y(I)):te(I)?(e.consume(I),N):K(I)}function Z(I){return I===null||I===60||I===61||I===62||I===96?r(I):I===34||I===39?(e.consume(I),n=I,it):Nt(I)?(a=Z,Y(I)):te(I)?(e.consume(I),Z):(e.consume(I),V)}function it(I){return I===n?(e.consume(I),n=void 0,j):I===null?r(I):Nt(I)?(a=it,Y(I)):(e.consume(I),it)}function V(I){return I===null||I===34||I===39||I===60||I===61||I===96?r(I):I===47||I===62||ge(I)?K(I):(e.consume(I),V)}function j(I){return I===47||I===62||ge(I)?K(I):r(I)}function q(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):r(I)}function Y(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),R}function R(I){return te(I)?oe(e,J,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):J(I)}function J(I){return e.enter("htmlTextData"),a(I)}}const bm={name:"labelEnd",resolveAll:iM,resolveTo:nM,tokenize:oM},tM={tokenize:sM},eM={tokenize:aM},rM={tokenize:lM};function iM(e){let t=-1;const r=[];for(;++t<e.length;){const i=e[t][1];if(r.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const n=i.type==="labelImage"?4:2;i.type="data",t+=n}}return e.length!==r.length&&Qr(e,0,e.length,r),e}function nM(e,t){let r=e.length,i=0,n,s,a,c;for(;r--;)if(n=e[r][1],s){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(s=r,n.type!=="labelLink")){i=2;break}}else n.type==="labelEnd"&&(a=r);const h={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",h,t],["enter",u,t]],c=hi(c,e.slice(s+1,s+i+3)),c=hi(c,[["enter",d,t]]),c=hi(c,Vu(t.parser.constructs.insideSpan.null,e.slice(s+i+4,a-3),t)),c=hi(c,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),c=hi(c,e.slice(a+1)),c=hi(c,[["exit",h,t]]),Qr(e,s,e.length,c),e}function oM(e,t,r){const i=this;let n=i.events.length,s,a;for(;n--;)if((i.events[n][1].type==="labelImage"||i.events[n][1].type==="labelLink")&&!i.events[n][1]._balanced){s=i.events[n][1];break}return c;function c(m){return s?s._inactive?f(m):(a=i.parser.defined.includes(Ai(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),h):r(m)}function h(m){return m===40?e.attempt(tM,d,a?d:f)(m):m===91?e.attempt(eM,d,a?u:f)(m):a?d(m):f(m)}function u(m){return e.attempt(rM,d,f)(m)}function d(m){return t(m)}function f(m){return s._balanced=!0,r(m)}}function sM(e,t,r){return i;function i(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),n}function n(f){return ge(f)?Fl(e,s)(f):s(f)}function s(f){return f===41?d(f):Ib(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return ge(f)?Fl(e,h)(f):d(f)}function c(f){return r(f)}function h(f){return f===34||f===39||f===40?Ob(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return ge(f)?Fl(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function aM(e,t,r){const i=this;return n;function n(c){return Pb.call(i,e,s,a,"reference","referenceMarker","referenceString")(c)}function s(c){return i.parser.defined.includes(Ai(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):r(c)}function a(c){return r(c)}}function lM(e,t,r){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),n}function n(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):r(s)}}const cM={name:"labelStartImage",resolveAll:bm.resolveAll,tokenize:hM};function hM(e,t,r){const i=this;return n;function n(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),s}function s(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):r(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):t(c)}}const uM={name:"labelStartLink",resolveAll:bm.resolveAll,tokenize:dM};function dM(e,t,r){const i=this;return n;function n(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(a):t(a)}}const hp={name:"lineEnding",tokenize:fM};function fM(e,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),oe(e,t,"linePrefix")}}const Hh={name:"thematicBreak",tokenize:pM};function pM(e,t,r){let i=0,n;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return n=u,c(u)}function c(u){return u===n?(e.enter("thematicBreakSequence"),h(u)):i>=3&&(u===null||Nt(u))?(e.exit("thematicBreak"),t(u)):r(u)}function h(u){return u===n?(e.consume(u),i++,h):(e.exit("thematicBreakSequence"),te(u)?oe(e,c,"whitespace")(u):c(u))}}const Pr={continuation:{tokenize:xM},exit:kM,name:"list",tokenize:yM},gM={partial:!0,tokenize:bM},mM={partial:!0,tokenize:CM};function yM(e,t,r){const i=this,n=i.events[i.events.length-1];let s=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,a=0;return c;function c(g){const x=i.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!i.containerState.marker||g===i.containerState.marker:tg(g)){if(i.containerState.type||(i.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Hh,r,u)(g):u(g);if(!i.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(g)}return r(g)}function h(g){return tg(g)&&++a<10?(e.consume(g),h):(!i.interrupt||a<2)&&(i.containerState.marker?g===i.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),u(g)):r(g)}function u(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||g,e.check(ic,i.interrupt?r:d,e.attempt(gM,m,f))}function d(g){return i.containerState.initialBlankLine=!0,s++,m(g)}function f(g){return te(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):r(g)}function m(g){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function xM(e,t,r){const i=this;return i.containerState._closeFlow=void 0,e.check(ic,n,s);function n(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,oe(e,t,"listItemIndent",i.containerState.size+1)(c)}function s(c){return i.containerState.furtherBlankLines||!te(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(mM,t,a)(c))}function a(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,oe(e,e.attempt(Pr,t,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function CM(e,t,r){const i=this;return oe(e,n,"listItemIndent",i.containerState.size+1);function n(s){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(s):r(s)}}function kM(e){e.exit(this.containerState.type)}function bM(e,t,r){const i=this;return oe(e,n,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(s){const a=i.events[i.events.length-1];return!te(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}const P1={name:"setextUnderline",resolveTo:vM,tokenize:wM};function vM(e,t){let r=e.length,i,n,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",s?(e.splice(n,0,["enter",a,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function wM(e,t,r){const i=this;let n;return s;function s(u){let d=i.events.length,f;for(;d--;)if(i.events[d][1].type!=="lineEnding"&&i.events[d][1].type!=="linePrefix"&&i.events[d][1].type!=="content"){f=i.events[d][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||f)?(e.enter("setextHeadingLine"),n=u,a(u)):r(u)}function a(u){return e.enter("setextHeadingLineSequence"),c(u)}function c(u){return u===n?(e.consume(u),c):(e.exit("setextHeadingLineSequence"),te(u)?oe(e,h,"lineSuffix")(u):h(u))}function h(u){return u===null||Nt(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const SM={tokenize:TM};function TM(e){const t=this,r=e.attempt(ic,i,e.attempt(this.parser.constructs.flowInitial,n,oe(e,e.attempt(this.parser.constructs.flow,n,e.attempt(AF,n)),"linePrefix")));return r;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const _M={resolveAll:Rb()},BM=Db("string"),LM=Db("text");function Db(e){return{resolveAll:Rb(e==="text"?EM:void 0),tokenize:t};function t(r){const i=this,n=this.parser.constructs[e],s=r.attempt(n,a,c);return a;function a(d){return u(d)?s(d):c(d)}function c(d){if(d===null){r.consume(d);return}return r.enter("data"),r.consume(d),h}function h(d){return u(d)?(r.exit("data"),s(d)):(r.consume(d),h)}function u(d){if(d===null)return!0;const f=n[d];let m=-1;if(f)for(;++m<f.length;){const g=f[m];if(!g.previous||g.previous.call(i,i.previous))return!0}return!1}}}function Rb(e){return t;function t(r,i){let n=-1,s;for(;++n<=r.length;)s===void 0?r[n]&&r[n][1].type==="data"&&(s=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==s+2&&(r[s][1].end=r[n-1][1].end,r.splice(s+2,n-s-2),n=s+2),s=void 0);return e?e(r,i):r}}function EM(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],n=t.sliceStream(i);let s=n.length,a=-1,c=0,h;for(;s--;){const u=n[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(u===-2)h=!0,c++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){const u={type:r===e.length||h||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:i.start._bufferIndex+a,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...u.start},i.start.offset===i.end.offset?Object.assign(i,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}const AM={42:Pr,43:Pr,45:Pr,48:Pr,49:Pr,50:Pr,51:Pr,52:Pr,53:Pr,54:Pr,55:Pr,56:Pr,57:Pr,62:Eb},FM={91:OF},MM={[-2]:cp,[-1]:cp,32:cp},IM={35:jF,42:Hh,45:[P1,Hh],60:UF,61:P1,95:Hh,96:M1,126:M1},PM={38:Fb,92:Ab},OM={[-5]:hp,[-4]:hp,[-3]:hp,33:cM,38:Fb,42:eg,60:[uF,ZF],91:uM,92:[zF,Ab],93:bm,95:eg,96:SF},DM={null:[eg,_M]},RM={null:[42,95]},$M={null:[]},zM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:RM,contentInitial:FM,disable:$M,document:AM,flow:IM,flowInitial:MM,insideSpan:DM,string:PM,text:OM},Symbol.toStringTag,{value:"Module"}));function NM(e,t,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const n={},s=[];let a=[],c=[];const h={attempt:E(O),check:E(F),consume:T,enter:B,exit:M,interrupt:E(F,{interrupt:!0})},u={code:null,containerState:{},defineSkip:C,events:[],now:x,parser:e,previous:null,sliceSerialize:m,sliceStream:g,write:f};let d=t.tokenize.call(u,h);return t.resolveAll&&s.push(t),u;function f(N){return a=hi(a,N),k(),a[a.length-1]!==null?[]:(z(t,0),u.events=Vu(s,u.events,u),u.events)}function m(N,Z){return WM(g(N),Z)}function g(N){return jM(a,N)}function x(){const{_bufferIndex:N,_index:Z,line:it,column:V,offset:j}=i;return{_bufferIndex:N,_index:Z,line:it,column:V,offset:j}}function C(N){n[N.line]=N.column,P()}function k(){let N;for(;i._index<a.length;){const Z=a[i._index];if(typeof Z=="string")for(N=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===N&&i._bufferIndex<Z.length;)v(Z.charCodeAt(i._bufferIndex));else v(Z)}}function v(N){d=d(N)}function T(N){Nt(N)?(i.line++,i.column=1,i.offset+=N===-3?2:1,P()):N!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),u.previous=N}function B(N,Z){const it=Z||{};return it.type=N,it.start=x(),u.events.push(["enter",it,u]),c.push(it),it}function M(N){const Z=c.pop();return Z.end=x(),u.events.push(["exit",Z,u]),Z}function O(N,Z){z(N,Z.from)}function F(N,Z){Z.restore()}function E(N,Z){return it;function it(V,j,q){let Y,R,J,I;return Array.isArray(V)?et(V):"tokenize"in V?et([V]):W(V);function W(Ct){return Dt;function Dt(Mt){const Yt=Mt!==null&&Ct[Mt],xt=Mt!==null&&Ct.null,Ot=[...Array.isArray(Yt)?Yt:Yt?[Yt]:[],...Array.isArray(xt)?xt:xt?[xt]:[]];return et(Ot)(Mt)}}function et(Ct){return Y=Ct,R=0,Ct.length===0?q:D(Ct[R])}function D(Ct){return Dt;function Dt(Mt){return I=K(),J=Ct,Ct.partial||(u.currentConstruct=Ct),Ct.name&&u.parser.constructs.disable.null.includes(Ct.name)?pt():Ct.tokenize.call(Z?Object.assign(Object.create(u),Z):u,h,yt,pt)(Mt)}}function yt(Ct){return N(J,I),j}function pt(Ct){return I.restore(),++R<Y.length?D(Y[R]):q}}}function z(N,Z){N.resolveAll&&!s.includes(N)&&s.push(N),N.resolve&&Qr(u.events,Z,u.events.length-Z,N.resolve(u.events.slice(Z),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function K(){const N=x(),Z=u.previous,it=u.currentConstruct,V=u.events.length,j=Array.from(c);return{from:V,restore:q};function q(){i=N,u.previous=Z,u.currentConstruct=it,u.events.length=V,c=j,P()}}function P(){i.line in n&&i.column<2&&(i.column=n[i.line],i.offset+=n[i.line]-1)}}function jM(e,t){const r=t.start._index,i=t.start._bufferIndex,n=t.end._index,s=t.end._bufferIndex;let a;if(r===n)a=[e[r].slice(i,s)];else{if(a=e.slice(r,n),i>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(i):a.shift()}s>0&&a.push(e[n].slice(0,s))}return a}function WM(e,t){let r=-1;const i=[];let n;for(;++r<e.length;){const s=e[r];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
43
+ `;break}case-3:{a=`\r
44
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&n)continue;a=" ";break}default:a=String.fromCharCode(s)}n=s===-2,i.push(a)}return i.join("")}function qM(e){const i={constructs:Bb([zM,...(e||{}).extensions||[]]),content:n(nF),defined:[],document:n(sF),flow:n(SM),lazy:{},string:n(BM),text:n(LM)};return i;function n(s){return a;function a(c){return NM(i,s,c)}}}function HM(e){for(;!Mb(e););return e}const O1=/[\0\t\n\r]/g;function UM(){let e=1,t="",r=!0,i;return n;function n(s,a,c){const h=[];let u,d,f,m,g;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,t="",r&&(s.charCodeAt(0)===65279&&f++,r=void 0);f<s.length;){if(O1.lastIndex=f,u=O1.exec(s),m=u&&u.index!==void 0?u.index:s.length,g=s.charCodeAt(m),!u){t=s.slice(f);break}if(g===10&&f===m&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),f<m&&(h.push(s.slice(f,m)),e+=m-f),g){case 0:{h.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,h.push(-2);e++<d;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}f=m+1}return c&&(i&&h.push(-5),t&&h.push(t),h.push(null)),h}}const VM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YM(e){return e.replace(VM,GM)}function GM(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),s=n===120||n===88;return Lb(r.slice(s?2:1),s?16:10)}return km(r)||e}const $b={}.hasOwnProperty;function XM(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),QM(r)(HM(qM(r).document().write(UM()(e,t,!0))))}function QM(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(pi),autolinkProtocol:K,autolinkEmail:K,atxHeading:s(Le),blockQuote:s(xt),characterEscape:K,characterReference:K,codeFenced:s(Ot),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Ot,a),codeText:s(se,a),codeTextData:K,data:K,codeFlowValue:K,definition:s(le),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Ue),hardBreakEscape:s(Jr),hardBreakTrailing:s(Jr),htmlFlow:s(fi,a),htmlFlowData:K,htmlText:s(fi,a),htmlTextData:K,image:s(mr),label:a,link:s(pi),listItem:s(gi),listItemValue:m,listOrdered:s(zr,f),listUnordered:s(zr),paragraph:s(Bn),reference:D,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Le),strong:s(ts),thematicBreak:s(Ri)},exit:{atxHeading:h(),atxHeadingSequence:O,autolink:h(),autolinkEmail:Yt,autolinkProtocol:Mt,blockQuote:h(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:pt,characterReferenceMarkerNumeric:pt,characterReferenceValue:Ct,characterReference:Dt,codeFenced:h(k),codeFencedFence:C,codeFencedFenceInfo:g,codeFencedFenceMeta:x,codeFlowValue:P,codeIndented:h(v),codeText:h(j),codeTextData:P,data:P,definition:h(),definitionDestinationString:M,definitionLabelString:T,definitionTitleString:B,emphasis:h(),hardBreakEscape:h(Z),hardBreakTrailing:h(Z),htmlFlow:h(it),htmlFlowData:P,htmlText:h(V),htmlTextData:P,image:h(Y),label:J,labelText:R,lineEnding:N,link:h(q),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:yt,resourceDestinationString:I,resourceTitleString:W,resource:et,setextHeading:h(z),setextHeadingLineSequence:E,setextHeadingText:F,strong:h(),thematicBreak:h()}};zb(t,(e||{}).mdastExtensions||[]);const r={};return i;function i(st){let dt={type:"root",children:[]};const Rt={stack:[dt],tokenStack:[],config:t,enter:c,exit:u,buffer:a,resume:d,data:r},Gt=[];let ee=-1;for(;++ee<st.length;)if(st[ee][1].type==="listOrdered"||st[ee][1].type==="listUnordered")if(st[ee][0]==="enter")Gt.push(ee);else{const Ie=Gt.pop();ee=n(st,Ie,ee)}for(ee=-1;++ee<st.length;){const Ie=t[st[ee][0]];$b.call(Ie,st[ee][1].type)&&Ie[st[ee][1].type].call(Object.assign({sliceSerialize:st[ee][2].sliceSerialize},Rt),st[ee][1])}if(Rt.tokenStack.length>0){const Ie=Rt.tokenStack[Rt.tokenStack.length-1];(Ie[1]||D1).call(Rt,void 0,Ie[0])}for(dt.position={start:Zn(st.length>0?st[0][1].start:{line:1,column:1,offset:0}),end:Zn(st.length>0?st[st.length-2][1].end:{line:1,column:1,offset:0})},ee=-1;++ee<t.transforms.length;)dt=t.transforms[ee](dt)||dt;return dt}function n(st,dt,Rt){let Gt=dt-1,ee=-1,Ie=!1,ti,Ke,Nr,Ze;for(;++Gt<=Rt;){const ve=st[Gt];switch(ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ve[0]==="enter"?ee++:ee--,Ze=void 0;break}case"lineEndingBlank":{ve[0]==="enter"&&(ti&&!Ze&&!ee&&!Nr&&(Nr=Gt),Ze=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ze=void 0}if(!ee&&ve[0]==="enter"&&ve[1].type==="listItemPrefix"||ee===-1&&ve[0]==="exit"&&(ve[1].type==="listUnordered"||ve[1].type==="listOrdered")){if(ti){let _r=Gt;for(Ke=void 0;_r--;){const Je=st[_r];if(Je[1].type==="lineEnding"||Je[1].type==="lineEndingBlank"){if(Je[0]==="exit")continue;Ke&&(st[Ke][1].type="lineEndingBlank",Ie=!0),Je[1].type="lineEnding",Ke=_r}else if(!(Je[1].type==="linePrefix"||Je[1].type==="blockQuotePrefix"||Je[1].type==="blockQuotePrefixWhitespace"||Je[1].type==="blockQuoteMarker"||Je[1].type==="listItemIndent"))break}Nr&&(!Ke||Nr<Ke)&&(ti._spread=!0),ti.end=Object.assign({},Ke?st[Ke][1].start:ve[1].end),st.splice(Ke||Gt,0,["exit",ti,ve[2]]),Gt++,Rt++}if(ve[1].type==="listItemPrefix"){const _r={type:"listItem",_spread:!1,start:Object.assign({},ve[1].start),end:void 0};ti=_r,st.splice(Gt,0,["enter",_r,ve[2]]),Gt++,Rt++,Nr=void 0,Ze=!0}}}return st[dt][1]._spread=Ie,Rt}function s(st,dt){return Rt;function Rt(Gt){c.call(this,st(Gt),Gt),dt&&dt.call(this,Gt)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(st,dt,Rt){this.stack[this.stack.length-1].children.push(st),this.stack.push(st),this.tokenStack.push([dt,Rt||void 0]),st.position={start:Zn(dt.start),end:void 0}}function h(st){return dt;function dt(Rt){st&&st.call(this,Rt),u.call(this,Rt)}}function u(st,dt){const Rt=this.stack.pop(),Gt=this.tokenStack.pop();if(Gt)Gt[0].type!==st.type&&(dt?dt.call(this,st,Gt[0]):(Gt[1]||D1).call(this,st,Gt[0]));else throw new Error("Cannot close `"+st.type+"` ("+Al({start:st.start,end:st.end})+"): it’s not open");Rt.position.end=Zn(st.end)}function d(){return Cm(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(st){if(this.data.expectingFirstListItemValue){const dt=this.stack[this.stack.length-2];dt.start=Number.parseInt(this.sliceSerialize(st),10),this.data.expectingFirstListItemValue=void 0}}function g(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.lang=st}function x(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.meta=st}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.value=st.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.value=st.replace(/(\r?\n|\r)$/g,"")}function T(st){const dt=this.resume(),Rt=this.stack[this.stack.length-1];Rt.label=dt,Rt.identifier=Ai(this.sliceSerialize(st)).toLowerCase()}function B(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.title=st}function M(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.url=st}function O(st){const dt=this.stack[this.stack.length-1];if(!dt.depth){const Rt=this.sliceSerialize(st).length;dt.depth=Rt}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function E(st){const dt=this.stack[this.stack.length-1];dt.depth=this.sliceSerialize(st).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function K(st){const Rt=this.stack[this.stack.length-1].children;let Gt=Rt[Rt.length-1];(!Gt||Gt.type!=="text")&&(Gt=Ln(),Gt.position={start:Zn(st.start),end:void 0},Rt.push(Gt)),this.stack.push(Gt)}function P(st){const dt=this.stack.pop();dt.value+=this.sliceSerialize(st),dt.position.end=Zn(st.end)}function N(st){const dt=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Rt=dt.children[dt.children.length-1];Rt.position.end=Zn(st.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(dt.type)&&(K.call(this,st),P.call(this,st))}function Z(){this.data.atHardBreak=!0}function it(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.value=st}function V(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.value=st}function j(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.value=st}function q(){const st=this.stack[this.stack.length-1];if(this.data.inReference){const dt=this.data.referenceType||"shortcut";st.type+="Reference",st.referenceType=dt,delete st.url,delete st.title}else delete st.identifier,delete st.label;this.data.referenceType=void 0}function Y(){const st=this.stack[this.stack.length-1];if(this.data.inReference){const dt=this.data.referenceType||"shortcut";st.type+="Reference",st.referenceType=dt,delete st.url,delete st.title}else delete st.identifier,delete st.label;this.data.referenceType=void 0}function R(st){const dt=this.sliceSerialize(st),Rt=this.stack[this.stack.length-2];Rt.label=YM(dt),Rt.identifier=Ai(dt).toLowerCase()}function J(){const st=this.stack[this.stack.length-1],dt=this.resume(),Rt=this.stack[this.stack.length-1];if(this.data.inReference=!0,Rt.type==="link"){const Gt=st.children;Rt.children=Gt}else Rt.alt=dt}function I(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.url=st}function W(){const st=this.resume(),dt=this.stack[this.stack.length-1];dt.title=st}function et(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function yt(st){const dt=this.resume(),Rt=this.stack[this.stack.length-1];Rt.label=dt,Rt.identifier=Ai(this.sliceSerialize(st)).toLowerCase(),this.data.referenceType="full"}function pt(st){this.data.characterReferenceType=st.type}function Ct(st){const dt=this.sliceSerialize(st),Rt=this.data.characterReferenceType;let Gt;Rt?(Gt=Lb(dt,Rt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Gt=km(dt);const ee=this.stack[this.stack.length-1];ee.value+=Gt}function Dt(st){const dt=this.stack.pop();dt.position.end=Zn(st.end)}function Mt(st){P.call(this,st);const dt=this.stack[this.stack.length-1];dt.url=this.sliceSerialize(st)}function Yt(st){P.call(this,st);const dt=this.stack[this.stack.length-1];dt.url="mailto:"+this.sliceSerialize(st)}function xt(){return{type:"blockquote",children:[]}}function Ot(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function le(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ue(){return{type:"emphasis",children:[]}}function Le(){return{type:"heading",depth:0,children:[]}}function Jr(){return{type:"break"}}function fi(){return{type:"html",value:""}}function mr(){return{type:"image",title:null,url:"",alt:null}}function pi(){return{type:"link",title:null,url:"",children:[]}}function zr(st){return{type:"list",ordered:st.type==="listOrdered",start:null,spread:st._spread,children:[]}}function gi(st){return{type:"listItem",spread:st._spread,checked:null,children:[]}}function Bn(){return{type:"paragraph",children:[]}}function ts(){return{type:"strong",children:[]}}function Ln(){return{type:"text",value:""}}function Ri(){return{type:"thematicBreak"}}}function Zn(e){return{line:e.line,column:e.column,offset:e.offset}}function zb(e,t){let r=-1;for(;++r<t.length;){const i=t[r];Array.isArray(i)?zb(e,i):KM(e,i)}}function KM(e,t){let r;for(r in t)if($b.call(t,r))switch(r){case"canContainEols":{const i=t[r];i&&e[r].push(...i);break}case"transforms":{const i=t[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=t[r];i&&Object.assign(e[r],i);break}}}function D1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Al({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Al({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Al({start:t.start,end:t.end})+") is still open")}function ZM(e){const t=this;t.parser=r;function r(i){return XM(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function JM(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function t5(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
45
+ `}]}function e5(e,t){const r=t.value?t.value+`
46
+ `:"",i={},n=t.lang?t.lang.split(/\s+/):[];n.length>0&&(i.className=["language-"+n[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function r5(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function i5(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function n5(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),n=ua(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let a,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=s+1,c+=1,e.footnoteCounts.set(i,c);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+n,id:r+"fnref-"+n+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,h);const u={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,u),e.applyData(t,u)}function o5(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function s5(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Nb(e,t){const r=t.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const n=e.all(t),s=n[0];s&&s.type==="text"?s.value="["+s.value:n.unshift({type:"text",value:"["});const a=n[n.length-1];return a&&a.type==="text"?a.value+=i:n.push({type:"text",value:i}),n}function a5(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return Nb(e,t);const n={src:ua(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(n.title=i.title);const s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function l5(e,t){const r={src:ua(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function c5(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,i),e.applyData(t,i)}function h5(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return Nb(e,t);const n={href:ua(i.url||"")};i.title!==null&&i.title!==void 0&&(n.title=i.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function u5(e,t){const r={href:ua(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function d5(e,t,r){const i=e.all(t),n=r?f5(r):jb(t),s={},a=[];if(typeof t.checked=="boolean"){const d=i[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},i.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const d=i[c];(n||c!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
47
+ `}),d.type==="element"&&d.tagName==="p"&&!n?a.push(...d.children):a.push(d)}const h=i[i.length-1];h&&(n||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
48
+ `});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function f5(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let i=-1;for(;!t&&++i<r.length;)t=jb(r[i])}return t}function jb(e){const t=e.spread;return t??e.children.length>1}function p5(e,t){const r={},i=e.all(t);let n=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++n<i.length;){const a=i[n];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function g5(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function m5(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function y5(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function x5(e,t){const r=e.all(t),i=r.shift(),n=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),n.push(a)}if(r.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},c=gm(t.children[1]),h=kb(t.children[t.children.length-1]);c&&h&&(a.position={start:c,end:h}),n.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(n,!0)};return e.patch(t,s),e.applyData(t,s)}function C5(e,t,r){const i=r?r.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,c=a?a.length:t.children.length;let h=-1;const u=[];for(;++h<c;){const f=t.children[h],m={},g=a?a[h]:void 0;g&&(m.align=g);let x={type:"element",tagName:s,properties:m,children:[]};f&&(x.children=e.all(f),e.patch(f,x),x=e.applyData(f,x)),u.push(x)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function k5(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const R1=9,$1=32;function b5(e){const t=String(e),r=/\r?\n|\r/g;let i=r.exec(t),n=0;const s=[];for(;i;)s.push(z1(t.slice(n,i.index),n>0,!0),i[0]),n=i.index+i[0].length,i=r.exec(t);return s.push(z1(t.slice(n),n>0,!1)),s.join("")}function z1(e,t,r){let i=0,n=e.length;if(t){let s=e.codePointAt(i);for(;s===R1||s===$1;)i++,s=e.codePointAt(i)}if(r){let s=e.codePointAt(n-1);for(;s===R1||s===$1;)n--,s=e.codePointAt(n-1)}return n>i?e.slice(i,n):""}function v5(e,t){const r={type:"text",value:b5(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function w5(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const S5={blockquote:JM,break:t5,code:e5,delete:r5,emphasis:i5,footnoteReference:n5,heading:o5,html:s5,imageReference:a5,image:l5,inlineCode:c5,linkReference:h5,link:u5,listItem:d5,list:p5,paragraph:g5,root:m5,strong:y5,table:x5,tableCell:k5,tableRow:C5,text:v5,thematicBreak:w5,toml:Th,yaml:Th,definition:Th,footnoteDefinition:Th};function Th(){}const Wb=-1,Yu=0,Ml=1,au=2,vm=3,wm=4,Sm=5,Tm=6,qb=7,Hb=8,N1=typeof self=="object"?self:globalThis,T5=(e,t)=>{const r=(n,s)=>(e.set(s,n),n),i=n=>{if(e.has(n))return e.get(n);const[s,a]=t[n];switch(s){case Yu:case Wb:return r(a,n);case Ml:{const c=r([],n);for(const h of a)c.push(i(h));return c}case au:{const c=r({},n);for(const[h,u]of a)c[i(h)]=i(u);return c}case vm:return r(new Date(a),n);case wm:{const{source:c,flags:h}=a;return r(new RegExp(c,h),n)}case Sm:{const c=r(new Map,n);for(const[h,u]of a)c.set(i(h),i(u));return c}case Tm:{const c=r(new Set,n);for(const h of a)c.add(i(h));return c}case qb:{const{name:c,message:h}=a;return r(new N1[c](h),n)}case Hb:return r(BigInt(a),n);case"BigInt":return r(Object(BigInt(a)),n);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return r(new DataView(c),a)}}return r(new N1[s](a),n)};return i},j1=e=>T5(new Map,e)(0),_s="",{toString:_5}={},{keys:B5}=Object,al=e=>{const t=typeof e;if(t!=="object"||!e)return[Yu,t];const r=_5.call(e).slice(8,-1);switch(r){case"Array":return[Ml,_s];case"Object":return[au,_s];case"Date":return[vm,_s];case"RegExp":return[wm,_s];case"Map":return[Sm,_s];case"Set":return[Tm,_s];case"DataView":return[Ml,r]}return r.includes("Array")?[Ml,r]:r.includes("Error")?[qb,r]:[au,r]},_h=([e,t])=>e===Yu&&(t==="function"||t==="symbol"),L5=(e,t,r,i)=>{const n=(a,c)=>{const h=i.push(a)-1;return r.set(c,h),h},s=a=>{if(r.has(a))return r.get(a);let[c,h]=al(a);switch(c){case Yu:{let d=a;switch(h){case"bigint":c=Hb,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);d=null;break;case"undefined":return n([Wb],a)}return n([c,d],a)}case Ml:{if(h){let m=a;return h==="DataView"?m=new Uint8Array(a.buffer):h==="ArrayBuffer"&&(m=new Uint8Array(a)),n([h,[...m]],a)}const d=[],f=n([c,d],a);for(const m of a)d.push(s(m));return f}case au:{if(h)switch(h){case"BigInt":return n([h,a.toString()],a);case"Boolean":case"Number":case"String":return n([h,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],f=n([c,d],a);for(const m of B5(a))(e||!_h(al(a[m])))&&d.push([s(m),s(a[m])]);return f}case vm:return n([c,a.toISOString()],a);case wm:{const{source:d,flags:f}=a;return n([c,{source:d,flags:f}],a)}case Sm:{const d=[],f=n([c,d],a);for(const[m,g]of a)(e||!(_h(al(m))||_h(al(g))))&&d.push([s(m),s(g)]);return f}case Tm:{const d=[],f=n([c,d],a);for(const m of a)(e||!_h(al(m)))&&d.push(s(m));return f}}const{message:u}=a;return n([c,{name:h,message:u}],a)};return s},W1=(e,{json:t,lossy:r}={})=>{const i=[];return L5(!(t||r),!!t,new Map,i)(e),i},lu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?j1(W1(e,t)):structuredClone(e):(e,t)=>j1(W1(e,t));function E5(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function A5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function F5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||E5,i=e.options.footnoteBackLabel||A5,n=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let h=-1;for(;++h<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[h]);if(!u)continue;const d=e.all(u),f=String(u.identifier).toUpperCase(),m=ua(f.toLowerCase());let g=0;const x=[],C=e.footnoteCounts.get(f);for(;C!==void 0&&++g<=C;){x.length>0&&x.push({type:"text",value:" "});let T=typeof r=="string"?r:r(h,g);typeof T=="string"&&(T={type:"text",value:T}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,g),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const k=d[d.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const T=k.children[k.children.length-1];T&&T.type==="text"?T.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...x)}else d.push(...x);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(u,v),c.push(v)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...lu(a),id:"footnote-label"},children:[{type:"text",value:n}]},{type:"text",value:`
49
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
50
+ `}]}}const Gu=(function(e){if(e==null)return O5;if(typeof e=="function")return Xu(e);if(typeof e=="object")return Array.isArray(e)?M5(e):I5(e);if(typeof e=="string")return P5(e);throw new Error("Expected function, string, or object as test")});function M5(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Gu(e[r]);return Xu(i);function i(...n){let s=-1;for(;++s<t.length;)if(t[s].apply(this,n))return!0;return!1}}function I5(e){const t=e;return Xu(r);function r(i){const n=i;let s;for(s in e)if(n[s]!==t[s])return!1;return!0}}function P5(e){return Xu(t);function t(r){return r&&r.type===e}}function Xu(e){return t;function t(r,i,n){return!!(D5(r)&&e.call(this,r,typeof i=="number"?i:void 0,n||void 0))}}function O5(){return!0}function D5(e){return e!==null&&typeof e=="object"&&"type"in e}const Ub=[],R5=!0,rg=!1,$5="skip";function Vb(e,t,r,i){let n;typeof t=="function"&&typeof r!="function"?(i=r,r=t):n=t;const s=Gu(n),a=i?-1:1;c(e,void 0,[])();function c(h,u,d){const f=h&&typeof h=="object"?h:{};if(typeof f.type=="string"){const g=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(h.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=Ub,x,C,k;if((!t||s(h,u,d[d.length-1]||void 0))&&(g=z5(r(h,d)),g[0]===rg))return g;if("children"in h&&h.children){const v=h;if(v.children&&g[0]!==$5)for(C=(i?v.children.length:-1)+a,k=d.concat(v);C>-1&&C<v.children.length;){const T=v.children[C];if(x=c(T,C,k)(),x[0]===rg)return x;C=typeof x[1]=="number"?x[1]:C+a}}return g}}}function z5(e){return Array.isArray(e)?e:typeof e=="number"?[R5,e]:e==null?Ub:[e]}function _m(e,t,r,i){let n,s,a;typeof t=="function"&&typeof r!="function"?(s=void 0,a=t,n=r):(s=t,a=r,n=i),Vb(e,s,c,n);function c(h,u){const d=u[u.length-1],f=d?d.children.indexOf(h):void 0;return a(h,f,d)}}const ig={}.hasOwnProperty,N5={};function j5(e,t){const r=t||N5,i=new Map,n=new Map,s=new Map,a={...S5,...r.handlers},c={all:u,applyData:q5,definitionById:i,footnoteById:n,footnoteCounts:s,footnoteOrder:[],handlers:a,one:h,options:r,patch:W5,wrap:U5};return _m(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?i:n,m=String(d.identifier).toUpperCase();f.has(m)||f.set(m,d)}}),c;function h(d,f){const m=d.type,g=c.handlers[m];if(ig.call(c.handlers,m)&&g)return g(c,d,f);if(c.options.passThrough&&c.options.passThrough.includes(m)){if("children"in d){const{children:C,...k}=d,v=lu(k);return v.children=c.all(d),v}return lu(d)}return(c.options.unknownHandler||H5)(c,d,f)}function u(d){const f=[];if("children"in d){const m=d.children;let g=-1;for(;++g<m.length;){const x=c.one(m[g],d);if(x){if(g&&m[g-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=q1(x.value)),!Array.isArray(x)&&x.type==="element")){const C=x.children[0];C&&C.type==="text"&&(C.value=q1(C.value))}Array.isArray(x)?f.push(...x):f.push(x)}}}return f}}function W5(e,t){e.position&&(t.position=AA(e))}function q5(e,t){let r=t;if(e&&e.data){const i=e.data.hName,n=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const a="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:a}}r.type==="element"&&s&&Object.assign(r.properties,lu(s)),"children"in r&&r.children&&n!==null&&n!==void 0&&(r.children=n)}return r}function H5(e,t){const r=t.data||{},i="value"in t&&!(ig.call(r,"hProperties")||ig.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function U5(e,t){const r=[];let i=-1;for(t&&r.push({type:"text",value:`
51
+ `});++i<e.length;)i&&r.push({type:"text",value:`
52
+ `}),r.push(e[i]);return t&&e.length>0&&r.push({type:"text",value:`
53
+ `}),r}function q1(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function H1(e,t){const r=j5(e,t),i=r.one(e,void 0),n=F5(r),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return n&&s.children.push({type:"text",value:`
54
+ `},n),s}function V5(e,t){return e&&"run"in e?async function(r,i){const n=H1(r,{file:i,...t});await e.run(n,i)}:function(r,i){return H1(r,{file:i,...e||t})}}function U1(e){if(e)throw e}var up,V1;function Y5(){if(V1)return up;V1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,n=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},s=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!f)return!1;var m;for(m in u);return typeof m>"u"||e.call(u,m)},a=function(u,d){r&&d.name==="__proto__"?r(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},c=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(i)return i(u,d).value}else return;return u[d]};return up=function h(){var u,d,f,m,g,x,C=arguments[0],k=1,v=arguments.length,T=!1;for(typeof C=="boolean"&&(T=C,C=arguments[1]||{},k=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});k<v;++k)if(u=arguments[k],u!=null)for(d in u)f=c(C,d),m=c(u,d),C!==m&&(T&&m&&(s(m)||(g=n(m)))?(g?(g=!1,x=f&&n(f)?f:[]):x=f&&s(f)?f:{},a(C,{name:d,newValue:h(T,x,m)})):typeof m<"u"&&a(C,{name:d,newValue:m}));return C},up}var G5=Y5();const dp=ec(G5);function ng(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function X5(){const e=[],t={run:r,use:i};return t;function r(...n){let s=-1;const a=n.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...n);function c(h,...u){const d=e[++s];let f=-1;if(h){a(h);return}for(;++f<n.length;)(u[f]===null||u[f]===void 0)&&(u[f]=n[f]);n=u,d?Q5(d,c)(...u):a(null,...u)}}function i(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Q5(e,t){let r;return i;function i(...a){const c=e.length>a.length;let h;c&&a.push(n);try{h=e.apply(this,a)}catch(u){const d=u;if(c&&r)throw d;return n(d)}c||(h&&h.then&&typeof h.then=="function"?h.then(s,n):h instanceof Error?n(h):s(h))}function n(a,...c){r||(r=!0,t(a,...c))}function s(a){n(null,a)}}const Vi={basename:K5,dirname:Z5,extname:J5,join:t3,sep:"/"};function K5(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nc(e);let r=0,i=-1,n=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;n--;)if(e.codePointAt(n)===47){if(s){r=n+1;break}}else i<0&&(s=!0,i=n+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;n--;)if(e.codePointAt(n)===47){if(s){r=n+1;break}}else a<0&&(s=!0,a=n+1),c>-1&&(e.codePointAt(n)===t.codePointAt(c--)?c<0&&(i=n):(c=-1,i=a));return r===i?i=a:i<0&&(i=e.length),e.slice(r,i)}function Z5(e){if(nc(e),e.length===0)return".";let t=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){t=r;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function J5(e){nc(e);let t=e.length,r=-1,i=0,n=-1,s=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){i=t+1;break}continue}r<0&&(a=!0,r=t+1),c===46?n<0?n=t:s!==1&&(s=1):n>-1&&(s=-1)}return n<0||r<0||s===0||s===1&&n===r-1&&n===i+1?"":e.slice(n,r)}function t3(...e){let t=-1,r;for(;++t<e.length;)nc(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":e3(r)}function e3(e){nc(e);const t=e.codePointAt(0)===47;let r=r3(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function r3(e,t){let r="",i=0,n=-1,s=0,a=-1,c,h;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(n===a-1||s===1))if(n!==a-1&&s===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",i=0):(r=r.slice(0,h),i=r.length-1-r.lastIndexOf("/")),n=a,s=0;continue}}else if(r.length>0){r="",i=0,n=a,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(n+1,a):r=e.slice(n+1,a),i=a-n-1;n=a,s=0}else c===46&&s>-1?s++:s=-1}return r}function nc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const i3={cwd:n3};function n3(){return"/"}function og(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function o3(e){if(typeof e=="string")e=new URL(e);else if(!og(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return s3(e)}function s3(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const i=t.codePointAt(r+2);if(i===70||i===102){const n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(t)}const fp=["history","path","basename","stem","extname","dirname"];class Yb{constructor(t){let r;t?og(t)?r={path:t}:typeof t=="string"||a3(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":i3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<fp.length;){const s=fp[i];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let n;for(n in r)fp.includes(n)||(this[n]=r[n])}get basename(){return typeof this.path=="string"?Vi.basename(this.path):void 0}set basename(t){gp(t,"basename"),pp(t,"basename"),this.path=Vi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vi.dirname(this.path):void 0}set dirname(t){Y1(this.basename,"dirname"),this.path=Vi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vi.extname(this.path):void 0}set extname(t){if(pp(t,"extname"),Y1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){og(t)&&(t=o3(t)),gp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vi.basename(this.path,this.extname):void 0}set stem(t){gp(t,"stem"),pp(t,"stem"),this.path=Vi.join(this.dirname||"",t+(this.extname||""))}fail(t,r,i){const n=this.message(t,r,i);throw n.fatal=!0,n}info(t,r,i){const n=this.message(t,r,i);return n.fatal=void 0,n}message(t,r,i){const n=new pr(t,r,i);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function pp(e,t){if(e&&e.includes(Vi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vi.sep+"`")}function gp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Y1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function a3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const l3=(function(e){const i=this.constructor.prototype,n=i[e],s=function(){return n.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),c3={}.hasOwnProperty;class Bm extends l3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=X5()}copy(){const t=new Bm;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];t.use(...i)}return t.data(dp(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(xp("data",this.frozen),this.namespace[t]=r,this):c3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xp("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const n=r.call(t,...i);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Bh(t),i=this.parser||this.Parser;return mp("parse",i),i(String(r),r)}process(t,r){const i=this;return this.freeze(),mp("process",this.parser||this.Parser),yp("process",this.compiler||this.Compiler),r?n(void 0,r):new Promise(n);function n(s,a){const c=Bh(t),h=i.parse(c);i.run(h,c,function(d,f,m){if(d||!f||!m)return u(d);const g=f,x=i.stringify(g,m);d3(x)?m.value=x:m.result=x,u(d,m)});function u(d,f){d||!f?a(d):s?s(f):r(void 0,f)}}}processSync(t){let r=!1,i;return this.freeze(),mp("processSync",this.parser||this.Parser),yp("processSync",this.compiler||this.Compiler),this.process(t,n),X1("processSync","process",r),i;function n(s,a){r=!0,U1(s),i=a}}run(t,r,i){G1(t),this.freeze();const n=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?s(void 0,i):new Promise(s);function s(a,c){const h=Bh(r);n.run(t,h,u);function u(d,f,m){const g=f||t;d?c(d):a?a(g):i(void 0,g,m)}}}runSync(t,r){let i=!1,n;return this.run(t,r,s),X1("runSync","run",i),n;function s(a,c){U1(a),n=c,i=!0}}stringify(t,r){this.freeze();const i=Bh(r),n=this.compiler||this.Compiler;return yp("stringify",n),G1(t),n(t,i)}use(t,...r){const i=this.attachers,n=this.namespace;if(xp("use",this.frozen),t!=null)if(typeof t=="function")h(t,r);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")h(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...f]=u;h(d,f)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(u.plugins),u.settings&&(n.settings=dp(!0,n.settings,u.settings))}function c(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const f=u[d];s(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function h(u,d){let f=-1,m=-1;for(;++f<i.length;)if(i[f][0]===u){m=f;break}if(m===-1)i.push([u,...d]);else if(d.length>0){let[g,...x]=d;const C=i[m][1];ng(C)&&ng(g)&&(g=dp(!0,C,g)),i[m]=[u,g,...x]}}}}const h3=new Bm().freeze();function mp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function yp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xp(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function G1(e){if(!ng(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function X1(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Bh(e){return u3(e)?e:new Yb(e)}function u3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function d3(e){return typeof e=="string"||f3(e)}function f3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Q1=[],K1={allowDangerousHtml:!0},g3=/^(https?|ircs?|mailto|xmpp)$/i,m3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function y3(e){const t=x3(e),r=C3(e);return k3(t.runSync(t.parse(r),r),e)}function x3(e){const t=e.rehypePlugins||Q1,r=e.remarkPlugins||Q1,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...K1}:K1;return h3().use(ZM).use(r).use(V5,i).use(t)}function C3(e){const t=e.children||"",r=new Yb;return typeof t=="string"&&(r.value=t),r}function k3(e,t){const r=t.allowedElements,i=t.allowElement,n=t.components,s=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,h=t.urlTransform||b3;for(const d of m3)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+p3+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),_m(e,u),OA(e,{Fragment:_.Fragment,components:n,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function u(d,f,m){if(d.type==="raw"&&m&&typeof f=="number")return a?m.children.splice(f,1):m.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let g;for(g in lp)if(Object.hasOwn(lp,g)&&Object.hasOwn(d.properties,g)){const x=d.properties[g],C=lp[g];(C===null||C.includes(d.tagName))&&(d.properties[g]=h(String(x||""),g,d))}}if(d.type==="element"){let g=r?!r.includes(d.tagName):s?s.includes(d.tagName):!1;if(!g&&i&&typeof f=="number"&&(g=!i(d,f,m)),g&&m&&typeof f=="number")return c&&d.children?m.children.splice(f,1,...d.children):m.children.splice(f,1),f}}}function b3(e){const t=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),n=e.indexOf("/");return t===-1||n!==-1&&t>n||r!==-1&&t>r||i!==-1&&t>i||g3.test(e.slice(0,t))?e:""}function Z1(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,n=r.indexOf(t);for(;n!==-1;)i++,n=r.indexOf(t,n+t.length);return i}function v3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function w3(e,t,r){const n=Gu((r||{}).ignore||[]),s=S3(t);let a=-1;for(;++a<s.length;)Vb(e,"text",c);function c(u,d){let f=-1,m;for(;++f<d.length;){const g=d[f],x=m?m.children:void 0;if(n(g,x?x.indexOf(g):void 0,m))return;m=g}if(m)return h(u,d)}function h(u,d){const f=d[d.length-1],m=s[a][0],g=s[a][1];let x=0;const k=f.children.indexOf(u);let v=!1,T=[];m.lastIndex=0;let B=m.exec(u.value);for(;B;){const M=B.index,O={index:B.index,input:B.input,stack:[...d,u]};let F=g(...B,O);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?m.lastIndex=M+1:(x!==M&&T.push({type:"text",value:u.value.slice(x,M)}),Array.isArray(F)?T.push(...F):F&&T.push(F),x=M+B[0].length,v=!0),!m.global)break;B=m.exec(u.value)}return v?(x<u.value.length&&T.push({type:"text",value:u.value.slice(x)}),f.children.splice(k,1,...T)):T=[u],k+T.length}}function S3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const n=r[i];t.push([T3(n[0]),_3(n[1])])}return t}function T3(e){return typeof e=="string"?new RegExp(v3(e),"g"):e}function _3(e){return typeof e=="function"?e:function(){return e}}const Cp="phrasing",kp=["autolink","link","image","label"];function B3(){return{transforms:[P3],enter:{literalAutolink:E3,literalAutolinkEmail:bp,literalAutolinkHttp:bp,literalAutolinkWww:bp},exit:{literalAutolink:I3,literalAutolinkEmail:M3,literalAutolinkHttp:A3,literalAutolinkWww:F3}}}function L3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cp,notInConstruct:kp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cp,notInConstruct:kp},{character:":",before:"[ps]",after:"\\/",inConstruct:Cp,notInConstruct:kp}]}}function E3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bp(e){this.config.enter.autolinkProtocol.call(this,e)}function A3(e){this.config.exit.autolinkProtocol.call(this,e)}function F3(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function M3(e){this.config.exit.autolinkEmail.call(this,e)}function I3(e){this.exit(e)}function P3(e){w3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,O3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),D3]],{ignore:["link","linkReference"]})}function O3(e,t,r,i,n){let s="";if(!Gb(n)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!R3(r)))return!1;const a=$3(r+i);if(!a[0])return!1;const c={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function D3(e,t,r,i){return!Gb(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function R3(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function $3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],i=r.indexOf(")");const n=Z1(e,"(");let s=Z1(e,")");for(;i!==-1&&n>s;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),s++;return[e,r]}function Gb(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||No(r)||Uu(r))&&(!t||r!==47)}Xb.peek=Y3;function z3(){this.buffer()}function N3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function j3(){this.buffer()}function W3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function q3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ai(this.sliceSerialize(e)).toLowerCase(),r.label=t}function H3(e){this.exit(e)}function U3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ai(this.sliceSerialize(e)).toLowerCase(),r.label=t}function V3(e){this.exit(e)}function Y3(){return"["}function Xb(e,t,r,i){const n=r.createTracker(i);let s=n.move("[^");const a=r.enter("footnoteReference"),c=r.enter("reference");return s+=n.move(r.safe(r.associationId(e),{after:"]",before:s})),c(),a(),s+=n.move("]"),s}function G3(){return{enter:{gfmFootnoteCallString:z3,gfmFootnoteCall:N3,gfmFootnoteDefinitionLabelString:j3,gfmFootnoteDefinition:W3},exit:{gfmFootnoteCallString:q3,gfmFootnoteCall:H3,gfmFootnoteDefinitionLabelString:U3,gfmFootnoteDefinition:V3}}}function X3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:Xb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,n,s,a){const c=s.createTracker(a);let h=c.move("[^");const u=s.enter("footnoteDefinition"),d=s.enter("label");return h+=c.move(s.safe(s.associationId(i),{before:h,after:"]"})),d(),h+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),h+=c.move((t?`
55
+ `:" ")+s.indentLines(s.containerFlow(i,c.current()),t?Qb:Q3))),u(),h}}function Q3(e,t,r){return t===0?e:Qb(e,t,r)}function Qb(e,t,r){return(r?"":" ")+e}const K3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Kb.peek=rI;function Z3(){return{canContainEols:["delete"],enter:{strikethrough:tI},exit:{strikethrough:eI}}}function J3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:K3}],handlers:{delete:Kb}}}function tI(e){this.enter({type:"delete",children:[]},e)}function eI(e){this.exit(e)}function Kb(e,t,r,i){const n=r.createTracker(i),s=r.enter("strikethrough");let a=n.move("~~");return a+=r.containerPhrasing(e,{...n.current(),before:a,after:"~"}),a+=n.move("~~"),s(),a}function rI(){return"~"}function iI(e){return e.length}function nI(e,t){const r=t||{},i=(r.align||[]).concat(),n=r.stringLength||iI,s=[],a=[],c=[],h=[];let u=0,d=-1;for(;++d<e.length;){const C=[],k=[];let v=-1;for(e[d].length>u&&(u=e[d].length);++v<e[d].length;){const T=oI(e[d][v]);if(r.alignDelimiters!==!1){const B=n(T);k[v]=B,(h[v]===void 0||B>h[v])&&(h[v]=B)}C.push(T)}a[d]=C,c[d]=k}let f=-1;if(typeof i=="object"&&"length"in i)for(;++f<u;)s[f]=J1(i[f]);else{const C=J1(i);for(;++f<u;)s[f]=C}f=-1;const m=[],g=[];for(;++f<u;){const C=s[f];let k="",v="";C===99?(k=":",v=":"):C===108?k=":":C===114&&(v=":");let T=r.alignDelimiters===!1?1:Math.max(1,h[f]-k.length-v.length);const B=k+"-".repeat(T)+v;r.alignDelimiters!==!1&&(T=k.length+T+v.length,T>h[f]&&(h[f]=T),g[f]=T),m[f]=B}a.splice(1,0,m),c.splice(1,0,g),d=-1;const x=[];for(;++d<a.length;){const C=a[d],k=c[d];f=-1;const v=[];for(;++f<u;){const T=C[f]||"";let B="",M="";if(r.alignDelimiters!==!1){const O=h[f]-(k[f]||0),F=s[f];F===114?B=" ".repeat(O):F===99?O%2?(B=" ".repeat(O/2+.5),M=" ".repeat(O/2-.5)):(B=" ".repeat(O/2),M=B):M=" ".repeat(O)}r.delimiterStart!==!1&&!f&&v.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&T==="")&&(r.delimiterStart!==!1||f)&&v.push(" "),r.alignDelimiters!==!1&&v.push(B),v.push(T),r.alignDelimiters!==!1&&v.push(M),r.padding!==!1&&v.push(" "),(r.delimiterEnd!==!1||f!==u-1)&&v.push("|")}x.push(r.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return x.join(`
56
+ `)}function oI(e){return e==null?"":String(e)}function J1(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function sI(e,t,r,i){const n=r.enter("blockquote"),s=r.createTracker(i);s.move("> "),s.shift(2);const a=r.indentLines(r.containerFlow(e,s.current()),aI);return n(),a}function aI(e,t,r){return">"+(r?"":" ")+e}function lI(e,t){return tC(e,t.inConstruct,!0)&&!tC(e,t.notInConstruct,!1)}function tC(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function eC(e,t,r,i){let n=-1;for(;++n<r.unsafe.length;)if(r.unsafe[n].character===`
57
+ `&&lI(r.stack,r.unsafe[n]))return/[ \t]/.test(i.before)?"":" ";return`\\
58
+ `}function cI(e,t){const r=String(e);let i=r.indexOf(t),n=i,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===n?++s>a&&(a=s):s=1,n=i+t.length,i=r.indexOf(t,n);return a}function hI(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function uI(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function dI(e,t,r,i){const n=uI(r),s=e.value||"",a=n==="`"?"GraveAccent":"Tilde";if(hI(e,r)){const f=r.enter("codeIndented"),m=r.indentLines(s,fI);return f(),m}const c=r.createTracker(i),h=n.repeat(Math.max(cI(s,n)+1,3)),u=r.enter("codeFenced");let d=c.move(h);if(e.lang){const f=r.enter(`codeFencedLang${a}`);d+=c.move(r.safe(e.lang,{before:d,after:" ",encode:["`"],...c.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${a}`);d+=c.move(" "),d+=c.move(r.safe(e.meta,{before:d,after:`
59
+ `,encode:["`"],...c.current()})),f()}return d+=c.move(`
60
+ `),s&&(d+=c.move(s+`
61
+ `)),d+=c.move(h),u(),d}function fI(e,t,r){return(r?"":" ")+e}function Lm(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function pI(e,t,r,i){const n=Lm(r),s=n==='"'?"Quote":"Apostrophe",a=r.enter("definition");let c=r.enter("label");const h=r.createTracker(i);let u=h.move("[");return u+=h.move(r.safe(r.associationId(e),{before:u,after:"]",...h.current()})),u+=h.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),u+=h.move("<"),u+=h.move(r.safe(e.url,{before:u,after:">",...h.current()})),u+=h.move(">")):(c=r.enter("destinationRaw"),u+=h.move(r.safe(e.url,{before:u,after:e.title?" ":`
62
+ `,...h.current()}))),c(),e.title&&(c=r.enter(`title${s}`),u+=h.move(" "+n),u+=h.move(r.safe(e.title,{before:u,after:n,...h.current()})),u+=h.move(n),c()),a(),u}function gI(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Nl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function cu(e,t,r){const i=ea(e),n=ea(t);return i===void 0?n===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:n===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?n===void 0?{inside:!1,outside:!1}:n===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:n===void 0?{inside:!1,outside:!1}:n===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Zb.peek=mI;function Zb(e,t,r,i){const n=gI(r),s=r.enter("emphasis"),a=r.createTracker(i),c=a.move(n);let h=a.move(r.containerPhrasing(e,{after:n,before:c,...a.current()}));const u=h.charCodeAt(0),d=cu(i.before.charCodeAt(i.before.length-1),u,n);d.inside&&(h=Nl(u)+h.slice(1));const f=h.charCodeAt(h.length-1),m=cu(i.after.charCodeAt(0),f,n);m.inside&&(h=h.slice(0,-1)+Nl(f));const g=a.move(n);return s(),r.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},c+h+g}function mI(e,t,r){return r.options.emphasis||"*"}function yI(e,t){let r=!1;return _m(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,rg}),!!((!e.depth||e.depth<3)&&Cm(e)&&(t.options.setext||r))}function xI(e,t,r,i){const n=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(i);if(yI(e,r)){const d=r.enter("headingSetext"),f=r.enter("phrasing"),m=r.containerPhrasing(e,{...s.current(),before:`
63
+ `,after:`
64
+ `});return f(),d(),m+`
65
+ `+(n===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
66
+ `))+1))}const a="#".repeat(n),c=r.enter("headingAtx"),h=r.enter("phrasing");s.move(a+" ");let u=r.containerPhrasing(e,{before:"# ",after:`
67
+ `,...s.current()});return/^[\t ]/.test(u)&&(u=Nl(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),h(),c(),u}Jb.peek=CI;function Jb(e){return e.value||""}function CI(){return"<"}tv.peek=kI;function tv(e,t,r,i){const n=Lm(r),s=n==='"'?"Quote":"Apostrophe",a=r.enter("image");let c=r.enter("label");const h=r.createTracker(i);let u=h.move("![");return u+=h.move(r.safe(e.alt,{before:u,after:"]",...h.current()})),u+=h.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),u+=h.move("<"),u+=h.move(r.safe(e.url,{before:u,after:">",...h.current()})),u+=h.move(">")):(c=r.enter("destinationRaw"),u+=h.move(r.safe(e.url,{before:u,after:e.title?" ":")",...h.current()}))),c(),e.title&&(c=r.enter(`title${s}`),u+=h.move(" "+n),u+=h.move(r.safe(e.title,{before:u,after:n,...h.current()})),u+=h.move(n),c()),u+=h.move(")"),a(),u}function kI(){return"!"}ev.peek=bI;function ev(e,t,r,i){const n=e.referenceType,s=r.enter("imageReference");let a=r.enter("label");const c=r.createTracker(i);let h=c.move("![");const u=r.safe(e.alt,{before:h,after:"]",...c.current()});h+=c.move(u+"]["),a();const d=r.stack;r.stack=[],a=r.enter("reference");const f=r.safe(r.associationId(e),{before:h,after:"]",...c.current()});return a(),r.stack=d,s(),n==="full"||!u||u!==f?h+=c.move(f+"]"):n==="shortcut"?h=h.slice(0,-1):h+=c.move("]"),h}function bI(){return"!"}rv.peek=vI;function rv(e,t,r){let i=e.value||"",n="`",s=-1;for(;new RegExp("(^|[^`])"+n+"([^`]|$)").test(i);)n+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<r.unsafe.length;){const a=r.unsafe[s],c=r.compilePattern(a);let h;if(a.atBreak)for(;h=c.exec(i);){let u=h.index;i.charCodeAt(u)===10&&i.charCodeAt(u-1)===13&&u--,i=i.slice(0,u)+" "+i.slice(h.index+1)}}return n+i+n}function vI(){return"`"}function iv(e,t){const r=Cm(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}nv.peek=wI;function nv(e,t,r,i){const n=Lm(r),s=n==='"'?"Quote":"Apostrophe",a=r.createTracker(i);let c,h;if(iv(e,r)){const d=r.stack;r.stack=[],c=r.enter("autolink");let f=a.move("<");return f+=a.move(r.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),c(),r.stack=d,f}c=r.enter("link"),h=r.enter("label");let u=a.move("[");return u+=a.move(r.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=r.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(r.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(h=r.enter("destinationRaw"),u+=a.move(r.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),h(),e.title&&(h=r.enter(`title${s}`),u+=a.move(" "+n),u+=a.move(r.safe(e.title,{before:u,after:n,...a.current()})),u+=a.move(n),h()),u+=a.move(")"),c(),u}function wI(e,t,r){return iv(e,r)?"<":"["}ov.peek=SI;function ov(e,t,r,i){const n=e.referenceType,s=r.enter("linkReference");let a=r.enter("label");const c=r.createTracker(i);let h=c.move("[");const u=r.containerPhrasing(e,{before:h,after:"]",...c.current()});h+=c.move(u+"]["),a();const d=r.stack;r.stack=[],a=r.enter("reference");const f=r.safe(r.associationId(e),{before:h,after:"]",...c.current()});return a(),r.stack=d,s(),n==="full"||!u||u!==f?h+=c.move(f+"]"):n==="shortcut"?h=h.slice(0,-1):h+=c.move("]"),h}function SI(){return"["}function Em(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function TI(e){const t=Em(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function _I(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function sv(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function BI(e,t,r,i){const n=r.enter("list"),s=r.bulletCurrent;let a=e.ordered?_I(r):Em(r);const c=e.ordered?a==="."?")":".":TI(r);let h=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),sv(r)===a&&d){let f=-1;for(;++f<e.children.length;){const m=e.children[f];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(a=c),r.bulletCurrent=a;const u=r.containerFlow(e,i);return r.bulletLastUsed=a,r.bulletCurrent=s,n(),u}function LI(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function EI(e,t,r,i){const n=LI(r);let s=r.bulletCurrent||Em(r);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(n==="tab"||n==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=r.createTracker(i);c.move(s+" ".repeat(a-s.length)),c.shift(a);const h=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,c.current()),d);return h(),u;function d(f,m,g){return m?(g?"":" ".repeat(a))+f:(g?s:s+" ".repeat(a-s.length))+f}}function AI(e,t,r,i){const n=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(e,i);return s(),n(),a}const FI=Gu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MI(e,t,r,i){return(e.children.some(function(a){return FI(a)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function II(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}av.peek=PI;function av(e,t,r,i){const n=II(r),s=r.enter("strong"),a=r.createTracker(i),c=a.move(n+n);let h=a.move(r.containerPhrasing(e,{after:n,before:c,...a.current()}));const u=h.charCodeAt(0),d=cu(i.before.charCodeAt(i.before.length-1),u,n);d.inside&&(h=Nl(u)+h.slice(1));const f=h.charCodeAt(h.length-1),m=cu(i.after.charCodeAt(0),f,n);m.inside&&(h=h.slice(0,-1)+Nl(f));const g=a.move(n+n);return s(),r.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},c+h+g}function PI(e,t,r){return r.options.strong||"*"}function OI(e,t,r,i){return r.safe(e.value,i)}function DI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function RI(e,t,r){const i=(sv(r)+(r.options.ruleSpaces?" ":"")).repeat(DI(r));return r.options.ruleSpaces?i.slice(0,-1):i}const lv={blockquote:sI,break:eC,code:dI,definition:pI,emphasis:Zb,hardBreak:eC,heading:xI,html:Jb,image:tv,imageReference:ev,inlineCode:rv,link:nv,linkReference:ov,list:BI,listItem:EI,paragraph:AI,root:MI,strong:av,text:OI,thematicBreak:RI};function $I(){return{enter:{table:zI,tableData:rC,tableHeader:rC,tableRow:jI},exit:{codeText:WI,table:NI,tableData:vp,tableHeader:vp,tableRow:vp}}}function zI(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function NI(e){this.exit(e),this.data.inTable=void 0}function jI(e){this.enter({type:"tableRow",children:[]},e)}function vp(e){this.exit(e)}function rC(e){this.enter({type:"tableCell",children:[]},e)}function WI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,qI));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function qI(e,t){return t==="|"?t:e}function HI(e){const t=e||{},r=t.tableCellPadding,i=t.tablePipeAlign,n=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
68
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:h,tableRow:c}};function a(g,x,C,k){return u(d(g,C,k),g.align)}function c(g,x,C,k){const v=f(g,C,k),T=u([v]);return T.slice(0,T.indexOf(`
69
+ `))}function h(g,x,C,k){const v=C.enter("tableCell"),T=C.enter("phrasing"),B=C.containerPhrasing(g,{...k,before:s,after:s});return T(),v(),B}function u(g,x){return nI(g,{align:x,alignDelimiters:i,padding:r,stringLength:n})}function d(g,x,C){const k=g.children;let v=-1;const T=[],B=x.enter("table");for(;++v<k.length;)T[v]=f(k[v],x,C);return B(),T}function f(g,x,C){const k=g.children;let v=-1;const T=[],B=x.enter("tableRow");for(;++v<k.length;)T[v]=h(k[v],g,x,C);return B(),T}function m(g,x,C){let k=lv.inlineCode(g,x,C);return C.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function UI(){return{exit:{taskListCheckValueChecked:iC,taskListCheckValueUnchecked:iC,paragraph:YI}}}function VI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:GI}}}function iC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function YI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const n=t.children;let s=-1,a;for(;++s<n.length;){const c=n[s];if(c.type==="paragraph"){a=c;break}}a===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function GI(e,t,r,i){const n=e.children[0],s=typeof e.checked=="boolean"&&n&&n.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=r.createTracker(i);s&&c.move(a);let h=lv.listItem(e,t,r,{...i,...c.current()});return s&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),h;function u(d){return d+a}}function XI(){return[B3(),G3(),Z3(),$I(),UI()]}function QI(e){return{extensions:[L3(),X3(e),J3(),HI(e),VI()]}}const KI={tokenize:i4,partial:!0},cv={tokenize:n4,partial:!0},hv={tokenize:o4,partial:!0},uv={tokenize:s4,partial:!0},ZI={tokenize:a4,partial:!0},dv={name:"wwwAutolink",tokenize:e4,previous:pv},fv={name:"protocolAutolink",tokenize:r4,previous:gv},vn={name:"emailAutolink",tokenize:t4,previous:mv},Ki={};function JI(){return{text:Ki}}let Lo=48;for(;Lo<123;)Ki[Lo]=vn,Lo++,Lo===58?Lo=65:Lo===91&&(Lo=97);Ki[43]=vn;Ki[45]=vn;Ki[46]=vn;Ki[95]=vn;Ki[72]=[vn,fv];Ki[104]=[vn,fv];Ki[87]=[vn,dv];Ki[119]=[vn,dv];function t4(e,t,r){const i=this;let n,s;return a;function a(f){return!sg(f)||!mv.call(i,i.previous)||Am(i.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(f))}function c(f){return sg(f)?(e.consume(f),c):f===64?(e.consume(f),h):r(f)}function h(f){return f===46?e.check(ZI,d,u)(f):f===45||f===95||dr(f)?(s=!0,e.consume(f),h):d(f)}function u(f){return e.consume(f),n=!0,h}function d(f){return s&&n&&kr(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function e4(e,t,r){const i=this;return n;function n(a){return a!==87&&a!==119||!pv.call(i,i.previous)||Am(i.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(KI,e.attempt(cv,e.attempt(hv,s),r),r)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function r4(e,t,r){const i=this;let n="",s=!1;return a;function a(f){return(f===72||f===104)&&gv.call(i,i.previous)&&!Am(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),n+=String.fromCodePoint(f),e.consume(f),c):r(f)}function c(f){if(kr(f)&&n.length<5)return n+=String.fromCodePoint(f),e.consume(f),c;if(f===58){const m=n.toLowerCase();if(m==="http"||m==="https")return e.consume(f),h}return r(f)}function h(f){return f===47?(e.consume(f),s?u:(s=!0,h)):r(f)}function u(f){return f===null||su(f)||ge(f)||No(f)||Uu(f)?r(f):e.attempt(cv,e.attempt(hv,d),r)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function i4(e,t,r){let i=0;return n;function n(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),n):a===46&&i===3?(e.consume(a),s):r(a)}function s(a){return a===null?r(a):t(a)}}function n4(e,t,r){let i,n,s;return a;function a(u){return u===46||u===95?e.check(uv,h,c)(u):u===null||ge(u)||No(u)||u!==45&&Uu(u)?h(u):(s=!0,e.consume(u),a)}function c(u){return u===95?i=!0:(n=i,i=void 0),e.consume(u),a}function h(u){return n||i||!s?r(u):t(u)}}function o4(e,t){let r=0,i=0;return n;function n(a){return a===40?(r++,e.consume(a),n):a===41&&i<r?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(uv,t,s)(a):a===null||ge(a)||No(a)?t(a):(e.consume(a),n)}function s(a){return a===41&&i++,e.consume(a),n}}function s4(e,t,r){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),s):c===93?(e.consume(c),n):c===60||c===null||ge(c)||No(c)?t(c):r(c)}function n(c){return c===null||c===40||c===91||ge(c)||No(c)?t(c):i(c)}function s(c){return kr(c)?a(c):r(c)}function a(c){return c===59?(e.consume(c),i):kr(c)?(e.consume(c),a):r(c)}}function a4(e,t,r){return i;function i(s){return e.consume(s),n}function n(s){return dr(s)?r(s):t(s)}}function pv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ge(e)}function gv(e){return!kr(e)}function mv(e){return!(e===47||sg(e))}function sg(e){return e===43||e===45||e===46||e===95||dr(e)}function Am(e){let t=e.length,r=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const l4={tokenize:m4,partial:!0};function c4(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:f4,continuation:{tokenize:p4},exit:g4}},text:{91:{name:"gfmFootnoteCall",tokenize:d4},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:h4,resolveTo:u4}}}}function h4(e,t,r){const i=this;let n=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;n--;){const h=i.events[n][1];if(h.type==="labelImage"){a=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return c;function c(h){if(!a||!a._balanced)return r(h);const u=Ai(i.sliceSerialize({start:a.end,end:i.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?r(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function u4(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},n={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};n.end.column++,n.end.offset++,n.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},n.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",n,t],["exit",n,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...c),e}function d4(e,t,r){const i=this,n=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,a;return c;function c(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),h}function h(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(s>999||f===93&&!a||f===null||f===91||ge(f))return r(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return n.includes(Ai(i.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return ge(f)||(a=!0),s++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),s++,u):u(f)}}function f4(e,t,r){const i=this,n=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,a=0,c;return h;function h(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):r(x)}function d(x){if(a>999||x===93&&!c||x===null||x===91||ge(x))return r(x);if(x===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return s=Ai(i.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return ge(x)||(c=!0),a++,e.consume(x),x===92?f:d}function f(x){return x===91||x===92||x===93?(e.consume(x),a++,d):d(x)}function m(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),n.includes(s)||n.push(s),oe(e,g,"gfmFootnoteDefinitionWhitespace")):r(x)}function g(x){return t(x)}}function p4(e,t,r){return e.check(ic,t,e.attempt(l4,t,r))}function g4(e){e.exit("gfmFootnoteDefinition")}function m4(e,t,r){const i=this;return oe(e,n,"gfmFootnoteDefinitionIndent",5);function n(s){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):r(s)}}function y4(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:n};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function n(a,c){let h=-1;for(;++h<a.length;)if(a[h][0]==="enter"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._close){let u=h;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[h][1].end.offset-a[h][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[h][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[h][1].end)},f={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[h][1].start)},m=[["enter",d,c],["enter",a[u][1],c],["exit",a[u][1],c],["enter",f,c]],g=c.parser.constructs.insideSpan.null;g&&Qr(m,m.length,0,Vu(g,a.slice(u+1,h),c)),Qr(m,m.length,0,[["exit",f,c],["enter",a[h][1],c],["exit",a[h][1],c],["exit",d,c]]),Qr(a,u-1,h-u+3,m),h=u+m.length-2;break}}for(h=-1;++h<a.length;)a[h][1].type==="strikethroughSequenceTemporary"&&(a[h][1].type="data");return a}function s(a,c,h){const u=this.previous,d=this.events;let f=0;return m;function m(x){return u===126&&d[d.length-1][1].type!=="characterEscape"?h(x):(a.enter("strikethroughSequenceTemporary"),g(x))}function g(x){const C=ea(u);if(x===126)return f>1?h(x):(a.consume(x),f++,g);if(f<2&&!r)return h(x);const k=a.exit("strikethroughSequenceTemporary"),v=ea(x);return k._open=!v||v===2&&!!C,k._close=!C||C===2&&!!v,c(x)}}}class x4{constructor(){this.map=[]}add(t,r,i){C4(this,t,r,i)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];i.push(t.slice()),t.length=0;let n=i.pop();for(;n;){for(const s of n)t.push(s);n=i.pop()}this.map.length=0}}function C4(e,t,r,i){let n=0;if(!(r===0&&i.length===0)){for(;n<e.map.length;){if(e.map[n][0]===t){e.map[n][1]+=r,e.map[n][2].push(...i);return}n+=1}e.map.push([t,r,i])}}function k4(e,t){let r=!1;const i=[];for(;t<e.length;){const n=e[t];if(r){if(n[0]==="enter")n[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(n[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(n[1].type==="tableDelimiterRow")break}else n[0]==="enter"&&n[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return i}function b4(){return{flow:{null:{name:"table",tokenize:v4,resolveAll:w4}}}}function v4(e,t,r){const i=this;let n=0,s=0,a;return c;function c(P){let N=i.events.length-1;for(;N>-1;){const V=i.events[N][1].type;if(V==="lineEnding"||V==="linePrefix")N--;else break}const Z=N>-1?i.events[N][1].type:null,it=Z==="tableHead"||Z==="tableRow"?F:h;return it===F&&i.parser.lazy[i.now().line]?r(P):it(P)}function h(P){return e.enter("tableHead"),e.enter("tableRow"),u(P)}function u(P){return P===124||(a=!0,s+=1),d(P)}function d(P){return P===null?r(P):Nt(P)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),g):r(P):te(P)?oe(e,d,"whitespace")(P):(s+=1,a&&(a=!1,n+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),f(P)))}function f(P){return P===null||P===124||ge(P)?(e.exit("data"),d(P)):(e.consume(P),P===92?m:f)}function m(P){return P===92||P===124?(e.consume(P),f):f(P)}function g(P){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(P):(e.enter("tableDelimiterRow"),a=!1,te(P)?oe(e,x,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):x(P))}function x(P){return P===45||P===58?k(P):P===124?(a=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),C):O(P)}function C(P){return te(P)?oe(e,k,"whitespace")(P):k(P)}function k(P){return P===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),v):P===45?(s+=1,v(P)):P===null||Nt(P)?M(P):O(P)}function v(P){return P===45?(e.enter("tableDelimiterFiller"),T(P)):O(P)}function T(P){return P===45?(e.consume(P),T):P===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),B):(e.exit("tableDelimiterFiller"),B(P))}function B(P){return te(P)?oe(e,M,"whitespace")(P):M(P)}function M(P){return P===124?x(P):P===null||Nt(P)?!a||n!==s?O(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):O(P)}function O(P){return r(P)}function F(P){return e.enter("tableRow"),E(P)}function E(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),E):P===null||Nt(P)?(e.exit("tableRow"),t(P)):te(P)?oe(e,E,"whitespace")(P):(e.enter("data"),z(P))}function z(P){return P===null||P===124||ge(P)?(e.exit("data"),E(P)):(e.consume(P),P===92?K:z)}function K(P){return P===92||P===124?(e.consume(P),z):z(P)}}function w4(e,t){let r=-1,i=!0,n=0,s=[0,0,0,0],a=[0,0,0,0],c=!1,h=0,u,d,f;const m=new x4;for(;++r<e.length;){const g=e[r],x=g[1];g[0]==="enter"?x.type==="tableHead"?(c=!1,h!==0&&(nC(m,t,h,u,d),d=void 0,h=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},m.add(r,0,[["enter",u,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(i=!0,f=void 0,s=[0,0,0,0],a=[0,r+1,0,0],c&&(c=!1,d={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},m.add(r,0,[["enter",d,t]])),n=x.type==="tableDelimiterRow"?2:d?3:1):n&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],f=Lh(m,t,s,n,void 0,f),s=[0,0,0,0]),a[2]=r)):x.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(a[0]=a[1],f=Lh(m,t,s,n,void 0,f)),s=a,a=[s[1],r,0,0])):x.type==="tableHead"?(c=!0,h=r):x.type==="tableRow"||x.type==="tableDelimiterRow"?(h=r,s[1]!==0?(a[0]=a[1],f=Lh(m,t,s,n,r,f)):a[1]!==0&&(f=Lh(m,t,a,n,r,f)),n=0):n&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(a[3]=r)}for(h!==0&&nC(m,t,h,u,d),m.consume(t.events),r=-1;++r<t.events.length;){const g=t.events[r];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=k4(t.events,r))}return e}function Lh(e,t,r,i,n,s){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";r[0]!==0&&(s.end=Object.assign({},Ms(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const h=Ms(t.events,r[1]);if(s={type:a,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",s,t]]),r[2]!==0){const u=Ms(t.events,r[2]),d=Ms(t.events,r[3]),f={type:c,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(r[2],0,[["enter",f,t]]),i!==2){const m=t.events[r[2]],g=t.events[r[3]];if(m[1].end=Object.assign({},g[1].end),m[1].type="chunkText",m[1].contentType="text",r[3]>r[2]+1){const x=r[2]+1,C=r[3]-r[2]-1;e.add(x,C,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return n!==void 0&&(s.end=Object.assign({},Ms(t.events,n)),e.add(n,0,[["exit",s,t]]),s=void 0),s}function nC(e,t,r,i,n){const s=[],a=Ms(t.events,r);n&&(n.end=Object.assign({},a),s.push(["exit",n,t])),i.end=Object.assign({},a),s.push(["exit",i,t]),e.add(r+1,0,s)}function Ms(e,t){const r=e[t],i=r[0]==="enter"?"start":"end";return r[1][i]}const S4={name:"tasklistCheck",tokenize:_4};function T4(){return{text:{91:S4}}}function _4(e,t,r){const i=this;return n;function n(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),s)}function s(h){return ge(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),a):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),a):r(h)}function a(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):r(h)}function c(h){return Nt(h)?t(h):te(h)?e.check({tokenize:B4},t,r)(h):r(h)}}function B4(e,t,r){return oe(e,i,"whitespace");function i(n){return n===null?r(n):t(n)}}function L4(e){return Bb([JI(),c4(),y4(e),b4(),T4()])}const E4={};function A4(e){const t=this,r=e||E4,i=t.data(),n=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);n.push(L4(r)),s.push(XI()),a.push(QI(r))}var Uh={exports:{}},F4=Uh.exports,oC;function M4(){return oC||(oC=1,(function(e,t){(function(r,i){e.exports=i()})(F4,(function(){var r=1e3,i=6e4,n=36e5,s="millisecond",a="second",c="minute",h="hour",u="day",d="week",f="month",m="quarter",g="year",x="date",C="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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(V){var j=["th","st","nd","rd"],q=V%100;return"["+V+(j[(q-20)%10]||j[q]||j[0])+"]"}},B=function(V,j,q){var Y=String(V);return!Y||Y.length>=j?V:""+Array(j+1-Y.length).join(q)+V},M={s:B,z:function(V){var j=-V.utcOffset(),q=Math.abs(j),Y=Math.floor(q/60),R=q%60;return(j<=0?"+":"-")+B(Y,2,"0")+":"+B(R,2,"0")},m:function V(j,q){if(j.date()<q.date())return-V(q,j);var Y=12*(q.year()-j.year())+(q.month()-j.month()),R=j.clone().add(Y,f),J=q-R<0,I=j.clone().add(Y+(J?-1:1),f);return+(-(Y+(q-R)/(J?R-I:I-R))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:f,y:g,w:d,d:u,D:x,h,m:c,s:a,ms:s,Q:m}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},O="en",F={};F[O]=T;var E="$isDayjsObject",z=function(V){return V instanceof Z||!(!V||!V[E])},K=function V(j,q,Y){var R;if(!j)return O;if(typeof j=="string"){var J=j.toLowerCase();F[J]&&(R=J),q&&(F[J]=q,R=J);var I=j.split("-");if(!R&&I.length>1)return V(I[0])}else{var W=j.name;F[W]=j,R=W}return!Y&&R&&(O=R),R||!Y&&O},P=function(V,j){if(z(V))return V.clone();var q=typeof j=="object"?j:{};return q.date=V,q.args=arguments,new Z(q)},N=M;N.l=K,N.i=z,N.w=function(V,j){return P(V,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var Z=(function(){function V(q){this.$L=K(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[E]=!0}var j=V.prototype;return j.parse=function(q){this.$d=(function(Y){var R=Y.date,J=Y.utc;if(R===null)return new Date(NaN);if(N.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var I=R.match(k);if(I){var W=I[2]-1||0,et=(I[7]||"0").substring(0,3);return J?new Date(Date.UTC(I[1],W,I[3]||1,I[4]||0,I[5]||0,I[6]||0,et)):new Date(I[1],W,I[3]||1,I[4]||0,I[5]||0,I[6]||0,et)}}return new Date(R)})(q),this.init()},j.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},j.$utils=function(){return N},j.isValid=function(){return this.$d.toString()!==C},j.isSame=function(q,Y){var R=P(q);return this.startOf(Y)<=R&&R<=this.endOf(Y)},j.isAfter=function(q,Y){return P(q)<this.startOf(Y)},j.isBefore=function(q,Y){return this.endOf(Y)<P(q)},j.$g=function(q,Y,R){return N.u(q)?this[Y]:this.set(R,q)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(q,Y){var R=this,J=!!N.u(Y)||Y,I=N.p(q),W=function(Yt,xt){var Ot=N.w(R.$u?Date.UTC(R.$y,xt,Yt):new Date(R.$y,xt,Yt),R);return J?Ot:Ot.endOf(u)},et=function(Yt,xt){return N.w(R.toDate()[Yt].apply(R.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(xt)),R)},D=this.$W,yt=this.$M,pt=this.$D,Ct="set"+(this.$u?"UTC":"");switch(I){case g:return J?W(1,0):W(31,11);case f:return J?W(1,yt):W(0,yt+1);case d:var Dt=this.$locale().weekStart||0,Mt=(D<Dt?D+7:D)-Dt;return W(J?pt-Mt:pt+(6-Mt),yt);case u:case x:return et(Ct+"Hours",0);case h:return et(Ct+"Minutes",1);case c:return et(Ct+"Seconds",2);case a:return et(Ct+"Milliseconds",3);default:return this.clone()}},j.endOf=function(q){return this.startOf(q,!1)},j.$set=function(q,Y){var R,J=N.p(q),I="set"+(this.$u?"UTC":""),W=(R={},R[u]=I+"Date",R[x]=I+"Date",R[f]=I+"Month",R[g]=I+"FullYear",R[h]=I+"Hours",R[c]=I+"Minutes",R[a]=I+"Seconds",R[s]=I+"Milliseconds",R)[J],et=J===u?this.$D+(Y-this.$W):Y;if(J===f||J===g){var D=this.clone().set(x,1);D.$d[W](et),D.init(),this.$d=D.set(x,Math.min(this.$D,D.daysInMonth())).$d}else W&&this.$d[W](et);return this.init(),this},j.set=function(q,Y){return this.clone().$set(q,Y)},j.get=function(q){return this[N.p(q)]()},j.add=function(q,Y){var R,J=this;q=Number(q);var I=N.p(Y),W=function(yt){var pt=P(J);return N.w(pt.date(pt.date()+Math.round(yt*q)),J)};if(I===f)return this.set(f,this.$M+q);if(I===g)return this.set(g,this.$y+q);if(I===u)return W(1);if(I===d)return W(7);var et=(R={},R[c]=i,R[h]=n,R[a]=r,R)[I]||1,D=this.$d.getTime()+q*et;return N.w(D,this)},j.subtract=function(q,Y){return this.add(-1*q,Y)},j.format=function(q){var Y=this,R=this.$locale();if(!this.isValid())return R.invalidDate||C;var J=q||"YYYY-MM-DDTHH:mm:ssZ",I=N.z(this),W=this.$H,et=this.$m,D=this.$M,yt=R.weekdays,pt=R.months,Ct=R.meridiem,Dt=function(xt,Ot,se,le){return xt&&(xt[Ot]||xt(Y,J))||se[Ot].slice(0,le)},Mt=function(xt){return N.s(W%12||12,xt,"0")},Yt=Ct||function(xt,Ot,se){var le=xt<12?"AM":"PM";return se?le.toLowerCase():le};return J.replace(v,(function(xt,Ot){return Ot||(function(se){switch(se){case"YY":return String(Y.$y).slice(-2);case"YYYY":return N.s(Y.$y,4,"0");case"M":return D+1;case"MM":return N.s(D+1,2,"0");case"MMM":return Dt(R.monthsShort,D,pt,3);case"MMMM":return Dt(pt,D);case"D":return Y.$D;case"DD":return N.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return Dt(R.weekdaysMin,Y.$W,yt,2);case"ddd":return Dt(R.weekdaysShort,Y.$W,yt,3);case"dddd":return yt[Y.$W];case"H":return String(W);case"HH":return N.s(W,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return Yt(W,et,!0);case"A":return Yt(W,et,!1);case"m":return String(et);case"mm":return N.s(et,2,"0");case"s":return String(Y.$s);case"ss":return N.s(Y.$s,2,"0");case"SSS":return N.s(Y.$ms,3,"0");case"Z":return I}return null})(xt)||I.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(q,Y,R){var J,I=this,W=N.p(Y),et=P(q),D=(et.utcOffset()-this.utcOffset())*i,yt=this-et,pt=function(){return N.m(I,et)};switch(W){case g:J=pt()/12;break;case f:J=pt();break;case m:J=pt()/3;break;case d:J=(yt-D)/6048e5;break;case u:J=(yt-D)/864e5;break;case h:J=yt/n;break;case c:J=yt/i;break;case a:J=yt/r;break;default:J=yt}return R?J:N.a(J)},j.daysInMonth=function(){return this.endOf(f).$D},j.$locale=function(){return F[this.$L]},j.locale=function(q,Y){if(!q)return this.$L;var R=this.clone(),J=K(q,Y,!0);return J&&(R.$L=J),R},j.clone=function(){return N.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},V})(),it=Z.prototype;return P.prototype=it,[["$ms",s],["$s",a],["$m",c],["$H",h],["$W",u],["$M",f],["$y",g],["$D",x]].forEach((function(V){it[V[1]]=function(j){return this.$g(j,V[0],V[1])}})),P.extend=function(V,j){return V.$i||(V(j,Z,P),V.$i=!0),P},P.locale=K,P.isDayjs=z,P.unix=function(V){return P(1e3*V)},P.en=F[O],P.Ls=F,P.p={},P}))})(Uh)),Uh.exports}var I4=M4();const P4=ec(I4);var yv=Object.defineProperty,w=(e,t)=>yv(e,"name",{value:t,configurable:!0}),O4=(e,t)=>{for(var r in t)yv(e,r,{get:t[r],enumerable:!0})},fn={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},lt={trace:w((...e)=>{},"trace"),debug:w((...e)=>{},"debug"),info:w((...e)=>{},"info"),warn:w((...e)=>{},"warn"),error:w((...e)=>{},"error"),fatal:w((...e)=>{},"fatal")},Fm=w(function(e="fatal"){let t=fn.fatal;typeof e=="string"?e.toLowerCase()in fn&&(t=fn[e]):typeof e=="number"&&(t=e),lt.trace=()=>{},lt.debug=()=>{},lt.info=()=>{},lt.warn=()=>{},lt.error=()=>{},lt.fatal=()=>{},t<=fn.fatal&&(lt.fatal=console.error?console.error.bind(console,ci("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ci("FATAL"))),t<=fn.error&&(lt.error=console.error?console.error.bind(console,ci("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ci("ERROR"))),t<=fn.warn&&(lt.warn=console.warn?console.warn.bind(console,ci("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ci("WARN"))),t<=fn.info&&(lt.info=console.info?console.info.bind(console,ci("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ci("INFO"))),t<=fn.debug&&(lt.debug=console.debug?console.debug.bind(console,ci("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ci("DEBUG"))),t<=fn.trace&&(lt.trace=console.debug?console.debug.bind(console,ci("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ci("TRACE")))},"setLogLevel"),ci=w(e=>`%c${P4().format("ss.SSS")} : ${e} : `,"format");const Vh={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:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;switch(i){case"r":return Vh.hue2rgb(s,n,e+1/3)*255;case"g":return Vh.hue2rgb(s,n,e)*255;case"b":return Vh.hue2rgb(s,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),s=Math.min(e,t,r),a=(n+s)/2;if(i==="l")return a*100;if(n===s)return 0;const c=n-s,h=a>.5?c/(2-n-s):c/(n+s);if(i==="s")return h*100;switch(n){case e:return((t-r)/c+(t<r?6:0))*60;case t:return((r-e)/c+2)*60;case r:return((e-t)/c+4)*60;default:return-1}}},D4={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},R4={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Vt={channel:Vh,lang:D4,unit:R4},to={};for(let e=0;e<=255;e++)to[e]=Vt.unit.dec2hex(e);const cr={ALL:0,RGB:1,HSL:2};class $4{constructor(){this.type=cr.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=cr.ALL}is(t){return this.type===t}}class z4{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new $4}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=cr.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=Vt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Vt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=Vt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=Vt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Vt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=Vt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(cr.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(cr.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(cr.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(cr.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(cr.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(cr.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(cr.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(cr.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(cr.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(cr.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(cr.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(cr.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Qu=new z4({r:0,g:0,b:0,a:0},"transparent"),$s={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match($s.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,s=n%4===0,a=n>4,c=a?1:17,h=a?8:4,u=s?0:-1,d=a?255:15;return Qu.set({r:(i>>h*(u+3)&d)*c,g:(i>>h*(u+2)&d)*c,b:(i>>h*(u+1)&d)*c,a:s?(i&d)*c/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${to[Math.round(t)]}${to[Math.round(r)]}${to[Math.round(i)]}${to[Math.round(n*255)]}`:`#${to[Math.round(t)]}${to[Math.round(r)]}${to[Math.round(i)]}`}},Po={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:e=>{const t=e.match(Po.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Vt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Vt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Vt.channel.clamp.h(parseFloat(r)*360)}}return Vt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Po.re);if(!r)return;const[,i,n,s,a,c]=r;return Qu.set({h:Po._hue2deg(i),s:Vt.channel.clamp.s(parseFloat(n)),l:Vt.channel.clamp.l(parseFloat(s)),a:a?Vt.channel.clamp.a(c?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${Vt.lang.round(t)}, ${Vt.lang.round(r)}%, ${Vt.lang.round(i)}%, ${n})`:`hsl(${Vt.lang.round(t)}, ${Vt.lang.round(r)}%, ${Vt.lang.round(i)}%)`}},Il={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:e=>{e=e.toLowerCase();const t=Il.colors[e];if(t)return $s.parse(t)},stringify:e=>{const t=$s.stringify(e);for(const r in Il.colors)if(Il.colors[r]===t)return r}},bl={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:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(bl.re);if(!r)return;const[,i,n,s,a,c,h,u,d]=r;return Qu.set({r:Vt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:Vt.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:Vt.channel.clamp.b(h?parseFloat(c)*2.55:parseFloat(c)),a:u?Vt.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${Vt.lang.round(t)}, ${Vt.lang.round(r)}, ${Vt.lang.round(i)}, ${Vt.lang.round(n)})`:`rgb(${Vt.lang.round(t)}, ${Vt.lang.round(r)}, ${Vt.lang.round(i)})`}},Xi={format:{keyword:Il,hex:$s,rgb:bl,rgba:bl,hsl:Po,hsla:Po},parse:e=>{if(typeof e!="string")return e;const t=$s.parse(e)||bl.parse(e)||Po.parse(e)||Il.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(cr.HSL)||e.data.r===void 0?Po.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?bl.stringify(e):$s.stringify(e)},xv=(e,t)=>{const r=Xi.parse(e);for(const i in t)r[i]=Vt.channel.clamp[i](t[i]);return Xi.stringify(r)},no=(e,t,r=0,i=1)=>{if(typeof e!="number")return xv(e,{a:t});const n=Qu.set({r:Vt.channel.clamp.r(e),g:Vt.channel.clamp.g(t),b:Vt.channel.clamp.b(r),a:Vt.channel.clamp.a(i)});return Xi.stringify(n)},N4=e=>{const{r:t,g:r,b:i}=Xi.parse(e),n=.2126*Vt.channel.toLinear(t)+.7152*Vt.channel.toLinear(r)+.0722*Vt.channel.toLinear(i);return Vt.lang.round(n)},j4=e=>N4(e)>=.5,Oi=e=>!j4(e),Cv=(e,t,r)=>{const i=Xi.parse(e),n=i[t],s=Vt.channel.clamp[t](n+r);return n!==s&&(i[t]=s),Xi.stringify(i)},ot=(e,t)=>Cv(e,"l",t),nt=(e,t)=>Cv(e,"l",-t),L=(e,t)=>{const r=Xi.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return xv(e,i)},W4=(e,t,r=50)=>{const{r:i,g:n,b:s,a}=Xi.parse(e),{r:c,g:h,b:u,a:d}=Xi.parse(t),f=r/100,m=f*2-1,g=a-d,C=((m*g===-1?m:(m+g)/(1+m*g))+1)/2,k=1-C,v=i*C+c*k,T=n*C+h*k,B=s*C+u*k,M=a*f+d*(1-f);return no(v,T,B,M)},X=(e,t=100)=>{const r=Xi.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,W4(r,e,t)};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:kv,setPrototypeOf:sC,isFrozen:q4,getPrototypeOf:H4,getOwnPropertyDescriptor:U4}=Object;let{freeze:wr,seal:ui,create:Yh}=Object,{apply:ag,construct:lg}=typeof Reflect<"u"&&Reflect;wr||(wr=function(t){return t});ui||(ui=function(t){return t});ag||(ag=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s<i;s++)n[s-2]=arguments[s];return t.apply(r,n)});lg||(lg=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const Eh=Sr(Array.prototype.forEach),V4=Sr(Array.prototype.lastIndexOf),aC=Sr(Array.prototype.pop),ll=Sr(Array.prototype.push),Y4=Sr(Array.prototype.splice),Gh=Sr(String.prototype.toLowerCase),wp=Sr(String.prototype.toString),Sp=Sr(String.prototype.match),cl=Sr(String.prototype.replace),G4=Sr(String.prototype.indexOf),X4=Sr(String.prototype.trim),Xr=Sr(Object.prototype.hasOwnProperty),Cr=Sr(RegExp.prototype.test),hl=Q4(TypeError);function Sr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return ag(e,t,i)}}function Q4(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return lg(e,r)}}function Jt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gh;sC&&sC(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const s=r(n);s!==n&&(q4(t)||(t[i]=s),n=s)}e[n]=!0}return e}function K4(e){for(let t=0;t<e.length;t++)Xr(e,t)||(e[t]=null);return e}function qi(e){const t=Yh(null);for(const[r,i]of kv(e))Xr(e,r)&&(Array.isArray(i)?t[r]=K4(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=qi(i):t[r]=i);return t}function ul(e,t){for(;e!==null;){const i=U4(e,t);if(i){if(i.get)return Sr(i.get);if(typeof i.value=="function")return Sr(i.value)}e=H4(e)}function r(){return null}return r}const lC=wr(["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"]),Tp=wr(["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"]),_p=wr(["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"]),Z4=wr(["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"]),Bp=wr(["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"]),J4=wr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cC=wr(["#text"]),hC=wr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),Lp=wr(["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"]),uC=wr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),Ah=wr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tP=ui(/\{\{[\w\W]*|[\w\W]*\}\}/gm),eP=ui(/<%[\w\W]*|[\w\W]*%>/gm),rP=ui(/\$\{[\w\W]*/gm),iP=ui(/^data-[\-\w.\u00B7-\uFFFF]+$/),nP=ui(/^aria-[\-\w]+$/),bv=ui(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oP=ui(/^(?:\w+script|data):/i),sP=ui(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vv=ui(/^html$/i),aP=ui(/^[a-z][.\w]*(-[.\w]+)+$/i);var dC=Object.freeze({__proto__:null,ARIA_ATTR:nP,ATTR_WHITESPACE:sP,CUSTOM_ELEMENT:aP,DATA_ATTR:iP,DOCTYPE_NAME:vv,ERB_EXPR:eP,IS_ALLOWED_URI:bv,IS_SCRIPT_OR_DATA:oP,MUSTACHE_EXPR:tP,TMPLIT_EXPR:rP});const dl={element:1,text:3,progressingInstruction:7,comment:8,document:9},lP=function(){return typeof window>"u"?null:window},cP=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},fC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function wv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lP();const t=It=>wv(It);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==dl.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:c,Element:h,NodeFilter:u,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:m,trustedTypes:g}=e,x=h.prototype,C=ul(x,"cloneNode"),k=ul(x,"remove"),v=ul(x,"nextSibling"),T=ul(x,"childNodes"),B=ul(x,"parentNode");if(typeof a=="function"){const It=r.createElement("template");It.content&&It.content.ownerDocument&&(r=It.content.ownerDocument)}let M,O="";const{implementation:F,createNodeIterator:E,createDocumentFragment:z,getElementsByTagName:K}=r,{importNode:P}=i;let N=fC();t.isSupported=typeof kv=="function"&&typeof B=="function"&&F&&F.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Z,ERB_EXPR:it,TMPLIT_EXPR:V,DATA_ATTR:j,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:J}=dC;let{IS_ALLOWED_URI:I}=dC,W=null;const et=Jt({},[...lC,...Tp,..._p,...Bp,...cC]);let D=null;const yt=Jt({},[...hC,...Lp,...uC,...Ah]);let pt=Object.seal(Yh(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,Dt=null;const Mt=Object.seal(Yh(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Yt=!0,xt=!0,Ot=!1,se=!0,le=!1,Ue=!0,Le=!1,Jr=!1,fi=!1,mr=!1,pi=!1,zr=!1,gi=!0,Bn=!1;const ts="user-content-";let Ln=!0,Ri=!1,st={},dt=null;const Rt=Jt({},["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 Gt=null;const ee=Jt({},["audio","video","img","source","image","track"]);let Ie=null;const ti=Jt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Nr="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let ve=Ze,_r=!1,Je=null;const ya=Jt({},[Ke,Nr,Ze],wp);let En=Jt({},["mi","mo","mn","ms","mtext"]),mi=Jt({},["annotation-xml"]);const An=Jt({},["title","style","font","a","script"]);let Fn=null;const mc=["application/xhtml+xml","text/html"],yc="text/html";let Ee=null,rn=null;const xa=r.createElement("form"),Ca=function(U){return U instanceof RegExp||U instanceof Function},nn=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(rn&&rn===U)){if((!U||typeof U!="object")&&(U={}),U=qi(U),Fn=mc.indexOf(U.PARSER_MEDIA_TYPE)===-1?yc:U.PARSER_MEDIA_TYPE,Ee=Fn==="application/xhtml+xml"?wp:Gh,W=Xr(U,"ALLOWED_TAGS")?Jt({},U.ALLOWED_TAGS,Ee):et,D=Xr(U,"ALLOWED_ATTR")?Jt({},U.ALLOWED_ATTR,Ee):yt,Je=Xr(U,"ALLOWED_NAMESPACES")?Jt({},U.ALLOWED_NAMESPACES,wp):ya,Ie=Xr(U,"ADD_URI_SAFE_ATTR")?Jt(qi(ti),U.ADD_URI_SAFE_ATTR,Ee):ti,Gt=Xr(U,"ADD_DATA_URI_TAGS")?Jt(qi(ee),U.ADD_DATA_URI_TAGS,Ee):ee,dt=Xr(U,"FORBID_CONTENTS")?Jt({},U.FORBID_CONTENTS,Ee):Rt,Ct=Xr(U,"FORBID_TAGS")?Jt({},U.FORBID_TAGS,Ee):qi({}),Dt=Xr(U,"FORBID_ATTR")?Jt({},U.FORBID_ATTR,Ee):qi({}),st=Xr(U,"USE_PROFILES")?U.USE_PROFILES:!1,Yt=U.ALLOW_ARIA_ATTR!==!1,xt=U.ALLOW_DATA_ATTR!==!1,Ot=U.ALLOW_UNKNOWN_PROTOCOLS||!1,se=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,le=U.SAFE_FOR_TEMPLATES||!1,Ue=U.SAFE_FOR_XML!==!1,Le=U.WHOLE_DOCUMENT||!1,mr=U.RETURN_DOM||!1,pi=U.RETURN_DOM_FRAGMENT||!1,zr=U.RETURN_TRUSTED_TYPE||!1,fi=U.FORCE_BODY||!1,gi=U.SANITIZE_DOM!==!1,Bn=U.SANITIZE_NAMED_PROPS||!1,Ln=U.KEEP_CONTENT!==!1,Ri=U.IN_PLACE||!1,I=U.ALLOWED_URI_REGEXP||bv,ve=U.NAMESPACE||Ze,En=U.MATHML_TEXT_INTEGRATION_POINTS||En,mi=U.HTML_INTEGRATION_POINTS||mi,pt=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&Ca(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(pt.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&Ca(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(pt.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(pt.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),le&&(xt=!1),pi&&(mr=!0),st&&(W=Jt({},cC),D=Yh(null),st.html===!0&&(Jt(W,lC),Jt(D,hC)),st.svg===!0&&(Jt(W,Tp),Jt(D,Lp),Jt(D,Ah)),st.svgFilters===!0&&(Jt(W,_p),Jt(D,Lp),Jt(D,Ah)),st.mathMl===!0&&(Jt(W,Bp),Jt(D,uC),Jt(D,Ah))),Xr(U,"ADD_TAGS")||(Mt.tagCheck=null),Xr(U,"ADD_ATTR")||(Mt.attributeCheck=null),U.ADD_TAGS&&(typeof U.ADD_TAGS=="function"?Mt.tagCheck=U.ADD_TAGS:(W===et&&(W=qi(W)),Jt(W,U.ADD_TAGS,Ee))),U.ADD_ATTR&&(typeof U.ADD_ATTR=="function"?Mt.attributeCheck=U.ADD_ATTR:(D===yt&&(D=qi(D)),Jt(D,U.ADD_ATTR,Ee))),U.ADD_URI_SAFE_ATTR&&Jt(Ie,U.ADD_URI_SAFE_ATTR,Ee),U.FORBID_CONTENTS&&(dt===Rt&&(dt=qi(dt)),Jt(dt,U.FORBID_CONTENTS,Ee)),U.ADD_FORBID_CONTENTS&&(dt===Rt&&(dt=qi(dt)),Jt(dt,U.ADD_FORBID_CONTENTS,Ee)),Ln&&(W["#text"]=!0),Le&&Jt(W,["html","head","body"]),W.table&&(Jt(W,["tbody"]),delete Ct.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw hl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw hl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');M=U.TRUSTED_TYPES_POLICY,O=M.createHTML("")}else M===void 0&&(M=cP(g,n)),M!==null&&typeof O=="string"&&(O=M.createHTML(""));wr&&wr(U),rn=U}},es=Jt({},[...Tp,..._p,...Z4]),Mn=Jt({},[...Bp,...J4]),kd=function(U){let ft=B(U);(!ft||!ft.tagName)&&(ft={namespaceURI:ve,tagName:"template"});const St=Gh(U.tagName),me=Gh(ft.tagName);return Je[U.namespaceURI]?U.namespaceURI===Nr?ft.namespaceURI===Ze?St==="svg":ft.namespaceURI===Ke?St==="svg"&&(me==="annotation-xml"||En[me]):!!es[St]:U.namespaceURI===Ke?ft.namespaceURI===Ze?St==="math":ft.namespaceURI===Nr?St==="math"&&mi[me]:!!Mn[St]:U.namespaceURI===Ze?ft.namespaceURI===Nr&&!mi[me]||ft.namespaceURI===Ke&&!En[me]?!1:!Mn[St]&&(An[St]||!es[St]):!!(Fn==="application/xhtml+xml"&&Je[U.namespaceURI]):!1},nr=function(U){ll(t.removed,{element:U});try{B(U).removeChild(U)}catch{k(U)}},ei=function(U,ft){try{ll(t.removed,{attribute:ft.getAttributeNode(U),from:ft})}catch{ll(t.removed,{attribute:null,from:ft})}if(ft.removeAttribute(U),U==="is")if(mr||pi)try{nr(ft)}catch{}else try{ft.setAttribute(U,"")}catch{}},po=function(U){let ft=null,St=null;if(fi)U="<remove></remove>"+U;else{const Ae=Sp(U,/^[\r\n\t ]+/);St=Ae&&Ae[0]}Fn==="application/xhtml+xml"&&ve===Ze&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");const me=M?M.createHTML(U):U;if(ve===Ze)try{ft=new m().parseFromString(me,Fn)}catch{}if(!ft||!ft.documentElement){ft=F.createDocument(ve,"template",null);try{ft.documentElement.innerHTML=_r?O:me}catch{}}const Kt=ft.body||ft.documentElement;return U&&St&&Kt.insertBefore(r.createTextNode(St),Kt.childNodes[0]||null),ve===Ze?K.call(ft,Le?"html":"body")[0]:Le?ft.documentElement:Kt},rs=function(U){return E.call(U.ownerDocument||U,U,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},ka=function(U){return U instanceof f&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof d)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},xc=function(U){return typeof c=="function"&&U instanceof c};function yi(It,U,ft){Eh(It,St=>{St.call(t,U,ft,rn)})}const $i=function(U){let ft=null;if(yi(N.beforeSanitizeElements,U,null),ka(U))return nr(U),!0;const St=Ee(U.nodeName);if(yi(N.uponSanitizeElement,U,{tagName:St,allowedTags:W}),Ue&&U.hasChildNodes()&&!xc(U.firstElementChild)&&Cr(/<[/\w!]/g,U.innerHTML)&&Cr(/<[/\w!]/g,U.textContent)||U.nodeType===dl.progressingInstruction||Ue&&U.nodeType===dl.comment&&Cr(/<[/\w]/g,U.data))return nr(U),!0;if(!(Mt.tagCheck instanceof Function&&Mt.tagCheck(St))&&(!W[St]||Ct[St])){if(!Ct[St]&&va(St)&&(pt.tagNameCheck instanceof RegExp&&Cr(pt.tagNameCheck,St)||pt.tagNameCheck instanceof Function&&pt.tagNameCheck(St)))return!1;if(Ln&&!dt[St]){const me=B(U)||U.parentNode,Kt=T(U)||U.childNodes;if(Kt&&me){const Ae=Kt.length;for(let Ve=Ae-1;Ve>=0;--Ve){const ri=C(Kt[Ve],!0);ri.__removalCount=(U.__removalCount||0)+1,me.insertBefore(ri,v(U))}}}return nr(U),!0}return U instanceof h&&!kd(U)||(St==="noscript"||St==="noembed"||St==="noframes")&&Cr(/<\/no(script|embed|frames)/i,U.innerHTML)?(nr(U),!0):(le&&U.nodeType===dl.text&&(ft=U.textContent,Eh([Z,it,V],me=>{ft=cl(ft,me," ")}),U.textContent!==ft&&(ll(t.removed,{element:U.cloneNode()}),U.textContent=ft)),yi(N.afterSanitizeElements,U,null),!1)},ba=function(U,ft,St){if(Dt[ft]||gi&&(ft==="id"||ft==="name")&&(St in r||St in xa))return!1;if(!(xt&&!Dt[ft]&&Cr(j,ft))){if(!(Yt&&Cr(q,ft))){if(!(Mt.attributeCheck instanceof Function&&Mt.attributeCheck(ft,U))){if(!D[ft]||Dt[ft]){if(!(va(U)&&(pt.tagNameCheck instanceof RegExp&&Cr(pt.tagNameCheck,U)||pt.tagNameCheck instanceof Function&&pt.tagNameCheck(U))&&(pt.attributeNameCheck instanceof RegExp&&Cr(pt.attributeNameCheck,ft)||pt.attributeNameCheck instanceof Function&&pt.attributeNameCheck(ft,U))||ft==="is"&&pt.allowCustomizedBuiltInElements&&(pt.tagNameCheck instanceof RegExp&&Cr(pt.tagNameCheck,St)||pt.tagNameCheck instanceof Function&&pt.tagNameCheck(St))))return!1}else if(!Ie[ft]){if(!Cr(I,cl(St,R,""))){if(!((ft==="src"||ft==="xlink:href"||ft==="href")&&U!=="script"&&G4(St,"data:")===0&&Gt[U])){if(!(Ot&&!Cr(Y,cl(St,R,"")))){if(St)return!1}}}}}}}return!0},va=function(U){return U!=="annotation-xml"&&Sp(U,J)},Cc=function(U){yi(N.beforeSanitizeAttributes,U,null);const{attributes:ft}=U;if(!ft||ka(U))return;const St={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let me=ft.length;for(;me--;){const Kt=ft[me],{name:Ae,namespaceURI:Ve,value:ri}=Kt,xi=Ee(Ae),wa=ri;let De=Ae==="value"?wa:X4(wa);if(St.attrName=xi,St.attrValue=De,St.keepAttr=!0,St.forceKeepAttr=void 0,yi(N.uponSanitizeAttribute,U,St),De=St.attrValue,Bn&&(xi==="id"||xi==="name")&&(ei(Ae,U),De=ts+De),Ue&&Cr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,De)){ei(Ae,U);continue}if(xi==="attributename"&&Sp(De,"href")){ei(Ae,U);continue}if(St.forceKeepAttr)continue;if(!St.keepAttr){ei(Ae,U);continue}if(!se&&Cr(/\/>/i,De)){ei(Ae,U);continue}le&&Eh([Z,it,V],jr=>{De=cl(De,jr," ")});const go=Ee(U.nodeName);if(!ba(go,xi,De)){ei(Ae,U);continue}if(M&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Ve)switch(g.getAttributeType(go,xi)){case"TrustedHTML":{De=M.createHTML(De);break}case"TrustedScriptURL":{De=M.createScriptURL(De);break}}if(De!==wa)try{Ve?U.setAttributeNS(Ve,Ae,De):U.setAttribute(Ae,De),ka(U)?nr(U):aC(t.removed)}catch{ei(Ae,U)}}yi(N.afterSanitizeAttributes,U,null)},kc=function It(U){let ft=null;const St=rs(U);for(yi(N.beforeSanitizeShadowDOM,U,null);ft=St.nextNode();)yi(N.uponSanitizeShadowNode,ft,null),$i(ft),Cc(ft),ft.content instanceof s&&It(ft.content);yi(N.afterSanitizeShadowDOM,U,null)};return t.sanitize=function(It){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ft=null,St=null,me=null,Kt=null;if(_r=!It,_r&&(It="<!-->"),typeof It!="string"&&!xc(It))if(typeof It.toString=="function"){if(It=It.toString(),typeof It!="string")throw hl("dirty is not a string, aborting")}else throw hl("toString is not a function");if(!t.isSupported)return It;if(Jr||nn(U),t.removed=[],typeof It=="string"&&(Ri=!1),Ri){if(It.nodeName){const ri=Ee(It.nodeName);if(!W[ri]||Ct[ri])throw hl("root node is forbidden and cannot be sanitized in-place")}}else if(It instanceof c)ft=po("<!---->"),St=ft.ownerDocument.importNode(It,!0),St.nodeType===dl.element&&St.nodeName==="BODY"||St.nodeName==="HTML"?ft=St:ft.appendChild(St);else{if(!mr&&!le&&!Le&&It.indexOf("<")===-1)return M&&zr?M.createHTML(It):It;if(ft=po(It),!ft)return mr?null:zr?O:""}ft&&fi&&nr(ft.firstChild);const Ae=rs(Ri?It:ft);for(;me=Ae.nextNode();)$i(me),Cc(me),me.content instanceof s&&kc(me.content);if(Ri)return It;if(mr){if(pi)for(Kt=z.call(ft.ownerDocument);ft.firstChild;)Kt.appendChild(ft.firstChild);else Kt=ft;return(D.shadowroot||D.shadowrootmode)&&(Kt=P.call(i,Kt,!0)),Kt}let Ve=Le?ft.outerHTML:ft.innerHTML;return Le&&W["!doctype"]&&ft.ownerDocument&&ft.ownerDocument.doctype&&ft.ownerDocument.doctype.name&&Cr(vv,ft.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+ft.ownerDocument.doctype.name+`>
70
+ `+Ve),le&&Eh([Z,it,V],ri=>{Ve=cl(Ve,ri," ")}),M&&zr?M.createHTML(Ve):Ve},t.setConfig=function(){let It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nn(It),Jr=!0},t.clearConfig=function(){rn=null,Jr=!1},t.isValidAttribute=function(It,U,ft){rn||nn({});const St=Ee(It),me=Ee(U);return ba(St,me,ft)},t.addHook=function(It,U){typeof U=="function"&&ll(N[It],U)},t.removeHook=function(It,U){if(U!==void 0){const ft=V4(N[It],U);return ft===-1?void 0:Y4(N[It],ft,1)[0]}return aC(N[It])},t.removeHooks=function(It){N[It]=[]},t.removeAllHooks=function(){N=fC()},t}var ra=wv(),Sv=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Pl=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,hP=/\s*%%.*\n/gm,js,Tv=(js=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},w(js,"UnknownDiagramError"),js),jo={},Mm=w(function(e,t){e=e.replace(Sv,"").replace(Pl,"").replace(hP,`
71
+ `);for(const[r,{detector:i}]of Object.entries(jo))if(i(e,t))return r;throw new Tv(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),cg=w((...e)=>{for(const{id:t,detector:r,loader:i}of e)_v(t,r,i)},"registerLazyLoadedDiagrams"),_v=w((e,t,r)=>{jo[e]&&lt.warn(`Detector with key ${e} already exists. Overwriting.`),jo[e]={detector:t,loader:r},lt.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),uP=w(e=>jo[e].loader,"getDiagramLoader"),hg=w((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>hg(e,s,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=hg(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),qe=hg,Zi="#ffffff",Ji="#f2f2f2",Ht=w((e,t)=>t?L(e,{s:-40,l:10}):L(e,{s:-40,l:-10}),"mkBorder"),Ws,dP=(Ws=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,i,n,s,a,c,h,u,d,f,m,g,x,C,k,v,T,B,M,O,F,E;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?nt(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||nt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(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||ot(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||nt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||nt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||ot(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||ot(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScale"+z]=nt(this["cScale"+z],75);else for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScale"+z]=nt(this["cScale"+z],25);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||X(this["cScale"+z]);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this.darkMode?this["cScalePeer"+z]=this["cScalePeer"+z]||ot(this["cScale"+z],10):this["cScalePeer"+z]=this["cScalePeer"+z]||nt(this["cScale"+z],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||L(this.mainBkg,{h:180,s:-15,l:t*(5+z*3)}),this["surfacePeer"+z]=this["surfacePeer"+z]||L(this.mainBkg,{h:180,s:-15,l:t*(8+z*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.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:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((g=this.xyChart)==null?void 0:g.titleColor)||this.primaryTextColor,dataLabelColor:((x=this.xyChart)==null?void 0:x.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((C=this.xyChart)==null?void 0:C.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((k=this.xyChart)==null?void 0:k.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((v=this.xyChart)==null?void 0:v.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:((M=this.xyChart)==null?void 0:M.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((F=this.xyChart)==null?void 0:F.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((E=this.xyChart)==null?void 0:E.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?nt(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Ws,"Theme"),Ws),fP=w(e=>{const t=new dP;return t.calculate(e),t},"getThemeVariables"),qs,pP=(qs=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ot(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ot(X("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=no(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=nt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=nt(this.sectionBkgColor,10),this.taskBorderColor=no(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=no(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||ot(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||nt(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 t,r,i,n,s,a,c,h,u,d,f,m,g,x,C,k,v,T,B,M,O,F;this.secondBkg=ot(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=ot(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=ot(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=X(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330});for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScaleInv"+E]=this["cScaleInv"+E]||X(this["cScale"+E]);for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScalePeer"+E]=this["cScalePeer"+E]||ot(this["cScale"+E],10);for(let E=0;E<5;E++)this["surface"+E]=this["surface"+E]||L(this.mainBkg,{h:30,s:-30,l:-(-10+E*4)}),this["surfacePeer"+E]=this["surfacePeer"+E]||L(this.mainBkg,{h:30,s:-30,l:-(-7+E*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScaleLabel"+E]=this["cScaleLabel"+E]||this.scaleLabelColor;for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["pie"+E]=this["cScale"+E];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 E=0;E<8;E++)this["venn"+(E+1)]=this["venn"+(E+1)]??ot(this["cScale"+E],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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:((g=this.radar)==null?void 0:g.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((v=this.radar)==null?void 0:v.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((M=this.radar)==null?void 0:M.graticuleOpacity)||.3,legendBoxSize:((O=this.radar)==null?void 0:O.legendBoxSize)||12,legendFontSize:((F=this.radar)==null?void 0:F.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?nt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ot(this.secondaryColor,20),this.git1=ot(this.pie2||this.secondaryColor,20),this.git2=ot(this.pie3||this.tertiaryColor,20),this.git3=ot(this.pie4||L(this.primaryColor,{h:-30}),20),this.git4=ot(this.pie5||L(this.primaryColor,{h:-60}),20),this.git5=ot(this.pie6||L(this.primaryColor,{h:-90}),10),this.git6=ot(this.pie7||L(this.primaryColor,{h:60}),10),this.git7=ot(this.pie8||L(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||X(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||X(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||ot(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ot(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(qs,"Theme"),qs),gP=w(e=>{const t=new pP;return t.calculate(e),t},"getThemeVariables"),Hs,mP=(Hs=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=L(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ht(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=no(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 t,r,i,n,s,a,c,h,u,d,f,m,g,x,C,k,v,T,B,M,O,F;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||nt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||nt(this.tertiaryColor,40);for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScale"+E]=nt(this["cScale"+E],10),this["cScalePeer"+E]=this["cScalePeer"+E]||nt(this["cScale"+E],25);for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScaleInv"+E]=this["cScaleInv"+E]||L(this["cScale"+E],{h:180});for(let E=0;E<5;E++)this["surface"+E]=this["surface"+E]||L(this.mainBkg,{h:30,l:-(5+E*5)}),this["surfacePeer"+E]=this["surfacePeer"+E]||L(this.mainBkg,{h:30,l:-(7+E*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||X(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||X(this.labelTextColor);for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScaleLabel"+E]=this["cScaleLabel"+E]||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||ot(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||ot(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||L(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||L(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((a=this.radar)==null?void 0:a.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((u=this.radar)==null?void 0:u.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.xyChart={backgroundColor:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,dataLabelColor:((g=this.xyChart)==null?void 0:g.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((x=this.xyChart)==null?void 0:x.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((v=this.xyChart)==null?void 0:v.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:((M=this.xyChart)==null?void 0:M.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||nt(X(this.git0),25),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||X(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Hs,"Theme"),Hs),yP=w(e=>{const t=new mP;return t.calculate(e),t},"getThemeVariables"),Us,xP=(Us=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=ot("#cde498",10),this.primaryBorderColor=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.primaryColor),this.lineColor=X(this.background),this.textColor=X(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 t,r,i,n,s,a,c,h,u,d,f,m,g,x,C,k,v,T,B,M,O,F;this.actorBorder=nt(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||nt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||nt(this.tertiaryColor,40);for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScale"+E]=nt(this["cScale"+E],10),this["cScalePeer"+E]=this["cScalePeer"+E]||nt(this["cScale"+E],25);for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScaleInv"+E]=this["cScaleInv"+E]||L(this["cScale"+E],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScaleLabel"+E]=this["cScaleLabel"+E]||this.scaleLabelColor;for(let E=0;E<5;E++)this["surface"+E]=this["surface"+E]||L(this.mainBkg,{h:30,s:-30,l:-(5+E*5)}),this["surfacePeer"+E]=this["surfacePeer"+E]||L(this.mainBkg,{h:30,s:-30,l:-(8+E*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||ot(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||ot(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(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||L(this.primaryColor,{l:-30}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((a=this.radar)==null?void 0:a.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((u=this.radar)==null?void 0:u.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.xyChart={backgroundColor:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,dataLabelColor:((g=this.xyChart)==null?void 0:g.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((x=this.xyChart)==null?void 0:x.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((v=this.xyChart)==null?void 0:v.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:((M=this.xyChart)==null?void 0:M.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||X(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Us,"Theme"),Us),CP=w(e=>{const t=new xP;return t.calculate(e),t},"getThemeVariables"),Vs,kP=(Vs=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ot(this.contrast,55),this.background="#ffffff",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(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||ot(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 t,r,i,n,s,a,c,h,u,d,f,m,g,x,C,k,v,T,B,M,O,F;this.secondBkg=ot(this.contrast,55),this.border2=this.contrast,this.actorBorder=ot(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 E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScaleInv"+E]=this["cScaleInv"+E]||X(this["cScale"+E]);for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this.darkMode?this["cScalePeer"+E]=this["cScalePeer"+E]||ot(this["cScale"+E],10):this["cScalePeer"+E]=this["cScalePeer"+E]||nt(this["cScale"+E],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["cScaleLabel"+E]=this["cScaleLabel"+E]||this.scaleLabelColor;for(let E=0;E<5;E++)this["surface"+E]=this["surface"+E]||L(this.mainBkg,{l:-(5+E*5)}),this["surfacePeer"+E]=this["surfacePeer"+E]||L(this.mainBkg,{l:-(8+E*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=ot(this.contrast,30),this.sectionBkgColor2=ot(this.contrast,30),this.taskBorderColor=nt(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=ot(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=nt(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128});for(let E=0;E<this.THEME_COLOR_LIMIT;E++)this["pie"+E]=this["cScale"+E];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 E=0;E<8;E++)this["venn"+(E+1)]=this["venn"+(E+1)]??this["cScale"+E];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((g=this.radar)==null?void 0:g.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((v=this.radar)==null?void 0:v.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((M=this.radar)==null?void 0:M.graticuleOpacity)||.3,legendBoxSize:((O=this.radar)==null?void 0:O.legendBoxSize)||12,legendFontSize:((F=this.radar)==null?void 0:F.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=nt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||L(this.primaryColor,{h:-30}),this.git4=this.pie5||L(this.primaryColor,{h:-60}),this.git5=this.pie6||L(this.primaryColor,{h:-90}),this.git6=this.pie7||L(this.primaryColor,{h:60}),this.git7=this.pie8||L(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Vs,"Theme"),Vs),bP=w(e=>{const t=new kP;return t.calculate(e),t},"getThemeVariables"),Ys,vP=(Ys=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=Ht(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 s,a,c,h,u,d,f,m,g,x,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?nt(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||nt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=L(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||ot(t,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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||L(t,{h:30}),this.cScale4=this.cScale4||L(t,{h:60}),this.cScale5=this.cScale5||L(t,{h:90}),this.cScale6=this.cScale6||L(t,{h:120}),this.cScale7=this.cScale7||L(t,{h:150}),this.cScale8=this.cScale8||L(t,{h:210,l:150}),this.cScale9=this.cScale9||L(t,{h:270}),this.cScale10=this.cScale10||L(t,{h:300}),this.cScale11=this.cScale11||L(t,{h:330}),this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=nt(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=nt(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||X(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||ot(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||nt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||L(this.mainBkg,{h:180,s:-15,l:n*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||L(this.mainBkg,{h:180,s:-15,l:n*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||L(t,{h:64}),this.fillType3=this.fillType3||L(r,{h:64}),this.fillType4=this.fillType4||L(t,{h:-64}),this.fillType5=this.fillType5||L(r,{h:-64}),this.fillType6=this.fillType6||L(t,{h:128}),this.fillType7=this.fillType7||L(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||L(t,{l:-10}),this.pie5=this.pie5||L(r,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(t,{h:60,l:-10}),this.pie8=this.pie8||L(t,{h:-60,l:-10}),this.pie9=this.pie9||L(t,{h:120,l:0}),this.pie10=this.pie10||L(t,{h:60,l:-20}),this.pie11=this.pie11||L(t,{h:-60,l:-20}),this.pie12=this.pie12||L(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||L(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((x=this.xyChart)==null?void 0:x.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||t,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?nt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||L(t,{h:-30}),this.git4=this.git4||L(t,{h:-60}),this.git5=this.git5||L(t,{h:-90}),this.git6=this.git6||L(t,{h:60}),this.git7=this.git7||L(t,{h:120}),this.darkMode?(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Ys,"Theme"),Ys),wP=w(e=>{const t=new vP;return t.calculate(e),t},"getThemeVariables"),Gs,SP=(Gs=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ot(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ot(X("#323D47"),10),this.border1="#ccc",this.border2=no(255,255,255,.25),this.arrowheadColor=X(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,i,n,s,a,c,h,u,d,f,m;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?nt(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||nt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(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||ot(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=nt(this["cScale"+g],75);else for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=nt(this["cScale"+g],25);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||X(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||ot(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||nt(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=this["cScaleLabel"+g]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||L(this.mainBkg,{h:180,s:-15,l:t*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||L(this.mainBkg,{h:180,s:-15,l:t*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.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?nt(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=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Gs,"Theme"),Gs),TP=w(e=>{const t=new SP;return t.calculate(e),t},"getThemeVariables"),Xs,_P=(Xs=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=Ht("#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 s,a,c,h,u,d,f,m,g,x,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?nt(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||nt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=L(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||ot(t,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 k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=this.mainBkg;if(this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=nt(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=nt(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||X(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||ot(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||nt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||L(this.mainBkg,{h:180,s:-15,l:n*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||L(this.mainBkg,{h:180,s:-15,l:n*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||L(t,{h:64}),this.fillType3=this.fillType3||L(r,{h:64}),this.fillType4=this.fillType4||L(t,{h:-64}),this.fillType5=this.fillType5||L(r,{h:-64}),this.fillType6=this.fillType6||L(t,{h:128}),this.fillType7=this.fillType7||L(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||L(t,{l:-10}),this.pie5=this.pie5||L(r,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(t,{h:60,l:-10}),this.pie8=this.pie8||L(t,{h:-60,l:-10}),this.pie9=this.pie9||L(t,{h:120,l:0}),this.pie10=this.pie10||L(t,{h:60,l:-20}),this.pie11=this.pie11||L(t,{h:-60,l:-20}),this.pie12=this.pie12||L(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||L(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((x=this.xyChart)==null?void 0:x.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||t,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?nt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||L(t,{h:-30}),this.git4=this.git4||L(t,{h:-60}),this.git5=this.git5||L(t,{h:-90}),this.git6=this.git6||L(t,{h:60}),this.git7=this.git7||L(t,{h:120}),this.darkMode?(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Xs,"Theme"),Xs),BP=w(e=>{const t=new _P;return t.calculate(e),t},"getThemeVariables"),Qs,LP=(Qs=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ot(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ot(X("#323D47"),10),this.border1="#ccc",this.border2=no(255,255,255,.25),this.arrowheadColor=X(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,i,n,s,a,c,h,u,d,f,m;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?nt(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||nt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(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||ot(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=nt(this["cScale"+g],75);else for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=nt(this["cScale"+g],25);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||X(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||ot(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||nt(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=this["cScaleLabel"+g]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||L(this.mainBkg,{h:180,s:-15,l:t*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||L(this.mainBkg,{h:180,s:-15,l:t*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.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?nt(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Qs,"Theme"),Qs),EP=w(e=>{const t=new LP;return t.calculate(e),t},"getThemeVariables"),Ks,AP=(Ks=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=Ht(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 s,a,c,h,u,d,f,m,g,x,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?nt(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||nt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=L(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||ot(t,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 k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||X(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||ot(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||nt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||L(this.mainBkg,{h:180,s:-15,l:n*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||L(this.mainBkg,{h:180,s:-15,l:n*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||L(t,{h:64}),this.fillType3=this.fillType3||L(r,{h:64}),this.fillType4=this.fillType4||L(t,{h:-64}),this.fillType5=this.fillType5||L(r,{h:-64}),this.fillType6=this.fillType6||L(t,{h:128}),this.fillType7=this.fillType7||L(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||L(t,{l:-10}),this.pie5=this.pie5||L(r,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(t,{h:60,l:-10}),this.pie8=this.pie8||L(t,{h:-60,l:-10}),this.pie9=this.pie9||L(t,{h:120,l:0}),this.pie10=this.pie10||L(t,{h:60,l:-20}),this.pie11=this.pie11||L(t,{h:-60,l:-20}),this.pie12=this.pie12||L(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||L(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((x=this.xyChart)==null?void 0:x.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||t,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?nt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||L(t,{h:-30}),this.git4=this.git4||L(t,{h:-60}),this.git5=this.git5||L(t,{h:-90}),this.git6=this.git6||L(t,{h:60}),this.git7=this.git7||L(t,{h:120}),this.darkMode?(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Ks,"Theme"),Ks),FP=w(e=>{const t=new AP;return t.calculate(e),t},"getThemeVariables"),Zs,MP=(Zs=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ot(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ot(X("#323D47"),10),this.border1="#ccc",this.border2=no(255,255,255,.25),this.arrowheadColor=X(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,i,n,s,a,c,h,u,d,f,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(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?nt(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||nt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(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||ot(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 g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||X(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||ot(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||nt(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=nt(this["cScale"+g],75);const t=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||L(this.mainBkg,{h:180,s:-15,l:t*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||L(this.mainBkg,{h:180,s:-15,l:t*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Oi(this.quadrant1Fill)?ot(this.quadrant1Fill):nt(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:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.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?nt(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)):(this.git0=nt(this.git0,25),this.git1=nt(this.git1,25),this.git2=nt(this.git2,25),this.git3=nt(this.git3,25),this.git4=nt(this.git4,25),this.git5=nt(this.git5,25),this.git6=nt(this.git6,25),this.git7=nt(this.git7,25)),this.gitInv0=this.gitInv0||X(this.git0),this.gitInv1=this.gitInv1||X(this.git1),this.gitInv2=this.gitInv2||X(this.git2),this.gitInv3=this.gitInv3||X(this.git3),this.gitInv4=this.gitInv4||X(this.git4),this.gitInv5=this.gitInv5||X(this.git5),this.gitInv6=this.gitInv6||X(this.git6),this.gitInv7=this.gitInv7||X(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||Zi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ji}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},w(Zs,"Theme"),Zs),IP=w(e=>{const t=new MP;return t.calculate(e),t},"getThemeVariables"),xn={base:{getThemeVariables:fP},dark:{getThemeVariables:gP},default:{getThemeVariables:yP},forest:{getThemeVariables:CP},neutral:{getThemeVariables:bP},neo:{getThemeVariables:wP},"neo-dark":{getThemeVariables:TP},redux:{getThemeVariables:BP},"redux-dark":{getThemeVariables:EP},"redux-color":{getThemeVariables:FP},"redux-dark-color":{getThemeVariables:IP}},Vr={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},Bv={...Vr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:xn.default.getThemeVariables(),sequence:{...Vr.sequence,messageFont:w(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:w(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:w(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Vr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Vr.c4,useWidth:void 0,personFont:w(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Vr.flowchart,inheritDir:!1},external_personFont:w(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:w(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:w(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:w(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:w(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:w(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:w(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:w(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:w(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:w(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:w(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:w(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:w(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:w(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:w(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:w(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:w(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:w(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:w(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:w(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:w(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Vr.pie,useWidth:984},xyChart:{...Vr.xyChart,useWidth:void 0},requirement:{...Vr.requirement,useWidth:void 0},packet:{...Vr.packet},treeView:{...Vr.treeView,useWidth:void 0},radar:{...Vr.radar},ishikawa:{...Vr.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Vr.venn}},Lv=w((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Lv(e[i],"")]:[...r,t+i],[]),"keyify"),PP=new Set(Lv(Bv,"")),Ev=Bv,hu=w(e=>{if(lt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>hu(t));return}for(const t of Object.keys(e)){if(lt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!PP.has(t)||e[t]==null){lt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){lt.debug("sanitizing object",t),hu(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(lt.debug("sanitizing css option",t),e[t]=OP(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}lt.debug("After sanitization",e)}},"sanitizeDirective"),OP=w(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ia=Object.freeze(Ev),wn=w(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Or=qe({},ia),uu,Wo=[],Ol=qe({},ia),Ku=w((e,t)=>{let r=qe({},e),i={};for(const n of t)Mv(n),i=qe(i,n);if(r=qe(r,i),i.theme&&i.theme in xn){const n=qe({},uu),s=qe(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in xn&&(r.themeVariables=xn[r.theme].getThemeVariables(s))}return Ol=r,Pv(Ol),Ol},"updateCurrentConfig"),DP=w(e=>(Or=qe({},ia),Or=qe(Or,e),e.theme&&xn[e.theme]&&(Or.themeVariables=xn[e.theme].getThemeVariables(e.themeVariables)),Ku(Or,Wo),Or),"setSiteConfig"),RP=w(e=>{uu=qe({},e)},"saveConfigFromInitialize"),$P=w(e=>(Or=qe(Or,e),Ku(Or,Wo),Or),"updateSiteConfig"),Av=w(()=>qe({},Or),"getSiteConfig"),Fv=w(e=>(Pv(e),qe(Ol,e),Be()),"setConfig"),Be=w(()=>qe({},Ol),"getConfig"),Mv=w(e=>{e&&(["secure",...Or.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(lt.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Mv(e[t])}))},"sanitize"),zP=w(e=>{var t;hu(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Wo.push(e),Ku(Or,Wo)},"addDirective"),du=w((e=Or)=>{Wo=[],Ku(e,Wo)},"reset"),NP={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."},pC={},Iv=w(e=>{pC[e]||(lt.warn(NP[e]),pC[e]=!0)},"issueWarning"),Pv=w(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Iv("LAZY_LOAD_DEPRECATED")},"checkConfig"),SV=w(()=>{let e={};uu&&(e=qe(e,uu));for(const t of Wo)e=qe(e,t);return e},"getUserDefinedConfig"),Tr=w(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Iv("FLOWCHART_HTML_LABELS_DEPRECATED"),wn(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),oc=/<br\s*\/?>/gi,jP=w(e=>e?Rv(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),WP=(()=>{let e=!1;return()=>{e||(Ov(),e=!0)}})();function Ov(){const e="data-temp-href-target";ra.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ra.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}w(Ov,"setupDompurifyHooks");var Dv=w(e=>(WP(),ra.sanitize(e)),"removeScript"),gC=w((e,t)=>{if(Tr(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Dv(e):r!=="loose"&&(e=Rv(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=VP(e))}return e},"sanitizeMore"),Ii=w((e,t)=>e&&(t.dompurifyConfig?e=ra.sanitize(gC(e,t),t.dompurifyConfig).toString():e=ra.sanitize(gC(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),qP=w((e,t)=>typeof e=="string"?Ii(e,t):e.flat().map(r=>Ii(r,t)),"sanitizeTextOrArray"),HP=w(e=>oc.test(e),"hasBreaks"),UP=w(e=>e.split(oc),"splitBreaks"),VP=w(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Rv=w(e=>e.replace(oc,"#br#"),"breakToPlaceholder"),YP=w(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),GP=w(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),XP=w(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),mC=w(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];QP(s,a)&&(n=s+","+a,i++,r.pop())}r.push(KP(n))}return r.join("")},"parseGenericTypes"),ug=w((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),QP=w((e,t)=>{const r=ug(e,"~"),i=ug(t,"~");return r===1&&i===1},"shouldCombineSets"),KP=w(e=>{const t=ug(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),s=i.lastIndexOf("~");for(;n!==-1&&s!==-1&&n!==s;)i[n]="<",i[s]=">",n=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),yC=w(()=>window.MathMLElement!==void 0,"isMathMLSupported"),dg=/\$\$(.*)\$\$/g,jl=w(e=>{var t;return(((t=e.match(dg))==null?void 0:t.length)??0)>0},"hasKatex"),TV=w(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await $v(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),ZP=w(async(e,t)=>{if(!jl(e))return e;if(!(yC()||t.legacyMathML||t.forceLegacyMathML))return e.replace(dg,"MathML is unsupported in this environment.");{const{default:r}=await ie(async()=>{const{default:n}=await import("./katex-DkKDou_j.js");return{default:n}},[]),i=t.forceLegacyMathML||!yC()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(oc).map(n=>jl(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(dg,(n,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),$v=w(async(e,t)=>Ii(await ZP(e,t),t),"renderKatexSanitized"),sc={getRows:jP,sanitizeText:Ii,sanitizeTextOrArray:qP,hasBreaks:HP,splitBreaks:UP,lineBreakRegex:oc,removeScript:Dv,getUrl:YP,evaluate:wn,getMax:GP,getMin:XP},JP=w(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),tO=w(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),zv=w(function(e,t,r,i){const n=tO(t,r,i);JP(e,n)},"configureSvgSize"),eO=w(function(e,t,r,i){const n=t.node().getBBox(),s=n.width,a=n.height;lt.info(`SVG bounds: ${s}x${a}`,n);let c=0,h=0;lt.info(`Graph bounds: ${c}x${h}`,e),c=s+r*2,h=a+r*2,lt.info(`Calculated bounds: ${c}x${h}`),zv(t,h,c,i);const u=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",u)},"setupGraphViewbox"),Xh={},rO=w((e,t,r,i)=>{let n="";return e in Xh&&Xh[e]?n=Xh[e]({...r,svgId:i}):lt.warn(`No theme found for ${e}`),` & {
72
+ font-family: ${r.fontFamily};
73
+ font-size: ${r.fontSize};
74
+ fill: ${r.textColor}
75
+ }
76
+ @keyframes edge-animation-frame {
77
+ from {
78
+ stroke-dashoffset: 0;
79
+ }
80
+ }
81
+ @keyframes dash {
82
+ to {
83
+ stroke-dashoffset: 0;
84
+ }
85
+ }
86
+ & .edge-animation-slow {
87
+ stroke-dasharray: 9,5 !important;
88
+ stroke-dashoffset: 900;
89
+ animation: dash 50s linear infinite;
90
+ stroke-linecap: round;
91
+ }
92
+ & .edge-animation-fast {
93
+ stroke-dasharray: 9,5 !important;
94
+ stroke-dashoffset: 900;
95
+ animation: dash 20s linear infinite;
96
+ stroke-linecap: round;
97
+ }
98
+ /* Classes common for multiple diagrams */
99
+
100
+ & .error-icon {
101
+ fill: ${r.errorBkgColor};
102
+ }
103
+ & .error-text {
104
+ fill: ${r.errorTextColor};
105
+ stroke: ${r.errorTextColor};
106
+ }
107
+
108
+ & .edge-thickness-normal {
109
+ stroke-width: ${r.strokeWidth??1}px;
110
+ }
111
+ & .edge-thickness-thick {
112
+ stroke-width: 3.5px
113
+ }
114
+ & .edge-pattern-solid {
115
+ stroke-dasharray: 0;
116
+ }
117
+ & .edge-thickness-invisible {
118
+ stroke-width: 0;
119
+ fill: none;
120
+ }
121
+ & .edge-pattern-dashed{
122
+ stroke-dasharray: 3;
123
+ }
124
+ .edge-pattern-dotted {
125
+ stroke-dasharray: 2;
126
+ }
127
+
128
+ & .marker {
129
+ fill: ${r.lineColor};
130
+ stroke: ${r.lineColor};
131
+ }
132
+ & .marker.cross {
133
+ stroke: ${r.lineColor};
134
+ }
135
+
136
+ & svg {
137
+ font-family: ${r.fontFamily};
138
+ font-size: ${r.fontSize};
139
+ }
140
+ & p {
141
+ margin: 0
142
+ }
143
+
144
+ ${n}
145
+ .node .neo-node {
146
+ stroke: ${r.nodeBorder};
147
+ }
148
+
149
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
150
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
151
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
152
+ }
153
+
154
+
155
+ [data-look="neo"].node path {
156
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
157
+ stroke-width: ${r.strokeWidth??1}px;
158
+ }
159
+
160
+ [data-look="neo"].node .outer-path {
161
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
162
+ }
163
+
164
+ [data-look="neo"].node .neo-line path {
165
+ stroke: ${r.nodeBorder};
166
+ filter: none;
167
+ }
168
+
169
+ [data-look="neo"].node circle{
170
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
171
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
172
+ }
173
+
174
+ [data-look="neo"].node circle .state-start{
175
+ fill: #000000;
176
+ }
177
+
178
+ [data-look="neo"].icon-shape .icon {
179
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
180
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
181
+ }
182
+
183
+ [data-look="neo"].icon-shape .icon-neo path {
184
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
185
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
186
+ }
187
+
188
+ ${t}
189
+ `},"getStyles"),iO=w((e,t)=>{t!==void 0&&(Xh[e]=t)},"addStylesForDiagram"),nO=rO,Nv={};O4(Nv,{clear:()=>oO,getAccDescription:()=>cO,getAccTitle:()=>aO,getDiagramTitle:()=>uO,setAccDescription:()=>lO,setAccTitle:()=>sO,setDiagramTitle:()=>hO});var Im="",Pm="",Om="",Dm=w(e=>Ii(e,Be()),"sanitizeText"),oO=w(()=>{Im="",Om="",Pm=""},"clear"),sO=w(e=>{Im=Dm(e).replace(/^\s+/g,"")},"setAccTitle"),aO=w(()=>Im,"getAccTitle"),lO=w(e=>{Om=Dm(e).replace(/\n\s+/g,`
190
+ `)},"setAccDescription"),cO=w(()=>Om,"getAccDescription"),hO=w(e=>{Pm=Dm(e)},"setDiagramTitle"),uO=w(()=>Pm,"getDiagramTitle"),xC=lt,dO=Fm,he=Be,_V=Fv,BV=ia,Rm=w(e=>Ii(e,he()),"sanitizeText"),fO=eO,pO=w(()=>Nv,"getCommonDb"),fu={},pu=w((e,t,r)=>{var i;fu[e]&&xC.warn(`Diagram with id ${e} already registered. Overwriting.`),fu[e]=t,r&&_v(e,r),iO(e,t.styles),(i=t.injectUtils)==null||i.call(t,xC,dO,he,Rm,fO,pO(),()=>{})},"registerDiagram"),fg=w(e=>{if(e in fu)return fu[e];throw new gO(e)},"getDiagram"),Js,gO=(Js=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},w(Js,"DiagramNotFoundError"),Js),mO={value:()=>{}};function jv(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Qh(r)}function Qh(e){this._=e}function yO(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Qh.prototype=jv.prototype={constructor:Qh,on:function(e,t){var r=this._,i=yO(e+"",r),n,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((n=(e=i[s]).type)&&(n=xO(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(n=(e=i[s]).type)r[n]=CC(r[n],e.name,t);else if(t==null)for(n in r)r[n]=CC(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Qh(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,n=s.length;i<n;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,s=i.length;n<s;++n)i[n].value.apply(t,r)}};function xO(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function CC(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=mO,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var pg="http://www.w3.org/1999/xhtml";const kC={svg:"http://www.w3.org/2000/svg",xhtml:pg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zu(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),kC.hasOwnProperty(t)?{space:kC[t],local:e}:e}function CO(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===pg&&t.documentElement.namespaceURI===pg?t.createElement(e):t.createElementNS(r,e)}}function kO(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Wv(e){var t=Zu(e);return(t.local?kO:CO)(t)}function bO(){}function $m(e){return e==null?bO:function(){return this.querySelector(e)}}function vO(e){typeof e!="function"&&(e=$m(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,c=i[n]=new Array(a),h,u,d=0;d<a;++d)(h=s[d])&&(u=e.call(h,h.__data__,d,s))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u);return new Zr(i,this._parents)}function wO(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function SO(){return[]}function qv(e){return e==null?SO:function(){return this.querySelectorAll(e)}}function TO(e){return function(){return wO(e.apply(this,arguments))}}function _O(e){typeof e=="function"?e=TO(e):e=qv(e);for(var t=this._groups,r=t.length,i=[],n=[],s=0;s<r;++s)for(var a=t[s],c=a.length,h,u=0;u<c;++u)(h=a[u])&&(i.push(e.call(h,h.__data__,u,a)),n.push(h));return new Zr(i,n)}function Hv(e){return function(){return this.matches(e)}}function Uv(e){return function(t){return t.matches(e)}}var BO=Array.prototype.find;function LO(e){return function(){return BO.call(this.children,e)}}function EO(){return this.firstElementChild}function AO(e){return this.select(e==null?EO:LO(typeof e=="function"?e:Uv(e)))}var FO=Array.prototype.filter;function MO(){return Array.from(this.children)}function IO(e){return function(){return FO.call(this.children,e)}}function PO(e){return this.selectAll(e==null?MO:IO(typeof e=="function"?e:Uv(e)))}function OO(e){typeof e!="function"&&(e=Hv(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,c=i[n]=[],h,u=0;u<a;++u)(h=s[u])&&e.call(h,h.__data__,u,s)&&c.push(h);return new Zr(i,this._parents)}function Vv(e){return new Array(e.length)}function DO(){return new Zr(this._enter||this._groups.map(Vv),this._parents)}function gu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}gu.prototype={constructor:gu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function RO(e){return function(){return e}}function $O(e,t,r,i,n,s){for(var a=0,c,h=t.length,u=s.length;a<u;++a)(c=t[a])?(c.__data__=s[a],i[a]=c):r[a]=new gu(e,s[a]);for(;a<h;++a)(c=t[a])&&(n[a]=c)}function zO(e,t,r,i,n,s,a){var c,h,u=new Map,d=t.length,f=s.length,m=new Array(d),g;for(c=0;c<d;++c)(h=t[c])&&(m[c]=g=a.call(h,h.__data__,c,t)+"",u.has(g)?n[c]=h:u.set(g,h));for(c=0;c<f;++c)g=a.call(e,s[c],c,s)+"",(h=u.get(g))?(i[c]=h,h.__data__=s[c],u.delete(g)):r[c]=new gu(e,s[c]);for(c=0;c<d;++c)(h=t[c])&&u.get(m[c])===h&&(n[c]=h)}function NO(e){return e.__data__}function jO(e,t){if(!arguments.length)return Array.from(this,NO);var r=t?zO:$O,i=this._parents,n=this._groups;typeof e!="function"&&(e=RO(e));for(var s=n.length,a=new Array(s),c=new Array(s),h=new Array(s),u=0;u<s;++u){var d=i[u],f=n[u],m=f.length,g=WO(e.call(d,d&&d.__data__,u,i)),x=g.length,C=c[u]=new Array(x),k=a[u]=new Array(x),v=h[u]=new Array(m);r(d,f,C,k,v,g,t);for(var T=0,B=0,M,O;T<x;++T)if(M=C[T]){for(T>=B&&(B=T+1);!(O=k[B])&&++B<x;);M._next=O||null}}return a=new Zr(a,i),a._enter=c,a._exit=h,a}function WO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qO(){return new Zr(this._exit||this._groups.map(Vv),this._parents)}function HO(e,t,r){var i=this.enter(),n=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function UO(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,s=i.length,a=Math.min(n,s),c=new Array(n),h=0;h<a;++h)for(var u=r[h],d=i[h],f=u.length,m=c[h]=new Array(f),g,x=0;x<f;++x)(g=u[x]||d[x])&&(m[x]=g);for(;h<n;++h)c[h]=r[h];return new Zr(c,this._parents)}function VO(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,s=i[n],a;--n>=0;)(a=i[n])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function YO(e){e||(e=GO);function t(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var a=r[s],c=a.length,h=n[s]=new Array(c),u,d=0;d<c;++d)(u=a[d])&&(h[d]=u);h.sort(t)}return new Zr(n,this._parents).order()}function GO(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function XO(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function QO(){return Array.from(this)}function KO(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length;n<s;++n){var a=i[n];if(a)return a}return null}function ZO(){let e=0;for(const t of this)++e;return e}function JO(){return!this.node()}function tD(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],s=0,a=n.length,c;s<a;++s)(c=n[s])&&e.call(c,c.__data__,s,n);return this}function eD(e){return function(){this.removeAttribute(e)}}function rD(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iD(e,t){return function(){this.setAttribute(e,t)}}function nD(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function oD(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function sD(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function aD(e,t){var r=Zu(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?rD:eD:typeof t=="function"?r.local?sD:oD:r.local?nD:iD)(r,t))}function Yv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function lD(e){return function(){this.style.removeProperty(e)}}function cD(e,t,r){return function(){this.style.setProperty(e,t,r)}}function hD(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function uD(e,t,r){return arguments.length>1?this.each((t==null?lD:typeof t=="function"?hD:cD)(e,t,r??"")):na(this.node(),e)}function na(e,t){return e.style.getPropertyValue(t)||Yv(e).getComputedStyle(e,null).getPropertyValue(t)}function dD(e){return function(){delete this[e]}}function fD(e,t){return function(){this[e]=t}}function pD(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function gD(e,t){return arguments.length>1?this.each((t==null?dD:typeof t=="function"?pD:fD)(e,t)):this.node()[e]}function Gv(e){return e.trim().split(/^|\s+/)}function zm(e){return e.classList||new Xv(e)}function Xv(e){this._node=e,this._names=Gv(e.getAttribute("class")||"")}Xv.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Qv(e,t){for(var r=zm(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Kv(e,t){for(var r=zm(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function mD(e){return function(){Qv(this,e)}}function yD(e){return function(){Kv(this,e)}}function xD(e,t){return function(){(t.apply(this,arguments)?Qv:Kv)(this,e)}}function CD(e,t){var r=Gv(e+"");if(arguments.length<2){for(var i=zm(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?xD:t?mD:yD)(r,t))}function kD(){this.textContent=""}function bD(e){return function(){this.textContent=e}}function vD(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function wD(e){return arguments.length?this.each(e==null?kD:(typeof e=="function"?vD:bD)(e)):this.node().textContent}function SD(){this.innerHTML=""}function TD(e){return function(){this.innerHTML=e}}function _D(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function BD(e){return arguments.length?this.each(e==null?SD:(typeof e=="function"?_D:TD)(e)):this.node().innerHTML}function LD(){this.nextSibling&&this.parentNode.appendChild(this)}function ED(){return this.each(LD)}function AD(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function FD(){return this.each(AD)}function MD(e){var t=typeof e=="function"?e:Wv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ID(){return null}function PD(e,t){var r=typeof e=="function"?e:Wv(e),i=t==null?ID:typeof t=="function"?t:$m(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function OD(){var e=this.parentNode;e&&e.removeChild(this)}function DD(){return this.each(OD)}function RD(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $D(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function zD(e){return this.select(e?$D:RD)}function ND(e){return arguments.length?this.property("__data__",e):this.node().__data__}function jD(e){return function(t){e.call(this,t,this.__data__)}}function WD(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function qD(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,s;r<n;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function HD(e,t,r){return function(){var i=this.__on,n,s=jD(t);if(i){for(var a=0,c=i.length;a<c;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=t;return}}this.addEventListener(e.type,s,r),n={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(n):this.__on=[n]}}function UD(e,t,r){var i=WD(e+""),n,s=i.length,a;if(arguments.length<2){var c=this.node().__on;if(c){for(var h=0,u=c.length,d;h<u;++h)for(n=0,d=c[h];n<s;++n)if((a=i[n]).type===d.type&&a.name===d.name)return d.value}return}for(c=t?HD:qD,n=0;n<s;++n)this.each(c(i[n],t,r));return this}function Zv(e,t,r){var i=Yv(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function VD(e,t){return function(){return Zv(this,e,t)}}function YD(e,t){return function(){return Zv(this,e,t.apply(this,arguments))}}function GD(e,t){return this.each((typeof t=="function"?YD:VD)(e,t))}function*XD(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length,a;n<s;++n)(a=i[n])&&(yield a)}var Jv=[null];function Zr(e,t){this._groups=e,this._parents=t}function ac(){return new Zr([[document.documentElement]],Jv)}function QD(){return this}Zr.prototype=ac.prototype={constructor:Zr,select:vO,selectAll:_O,selectChild:AO,selectChildren:PO,filter:OO,data:jO,enter:DO,exit:qO,join:HO,merge:UO,selection:QD,order:VO,sort:YO,call:XO,nodes:QO,node:KO,size:ZO,empty:JO,each:tD,attr:aD,style:uD,property:gD,classed:CD,text:wD,html:BD,raise:ED,lower:FD,append:MD,insert:PD,remove:DD,clone:zD,datum:ND,on:UD,dispatch:GD,[Symbol.iterator]:XD};function Qt(e){return typeof e=="string"?new Zr([[document.querySelector(e)]],[document.documentElement]):new Zr([[e]],Jv)}function Nm(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function t2(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function lc(){}var Wl=.7,mu=1/Wl,zs="\\s*([+-]?\\d+)\\s*",ql="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KD=/^#([0-9a-f]{3,8})$/,ZD=new RegExp(`^rgb\\(${zs},${zs},${zs}\\)$`),JD=new RegExp(`^rgb\\(${Gi},${Gi},${Gi}\\)$`),tR=new RegExp(`^rgba\\(${zs},${zs},${zs},${ql}\\)$`),eR=new RegExp(`^rgba\\(${Gi},${Gi},${Gi},${ql}\\)$`),rR=new RegExp(`^hsl\\(${ql},${Gi},${Gi}\\)$`),iR=new RegExp(`^hsla\\(${ql},${Gi},${Gi},${ql}\\)$`),bC={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};Nm(lc,Hl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vC,formatHex:vC,formatHex8:nR,formatHsl:oR,formatRgb:wC,toString:wC});function vC(){return this.rgb().formatHex()}function nR(){return this.rgb().formatHex8()}function oR(){return e2(this).formatHsl()}function wC(){return this.rgb().formatRgb()}function Hl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=KD.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?SC(t):r===3?new Rr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Fh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Fh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ZD.exec(e))?new Rr(t[1],t[2],t[3],1):(t=JD.exec(e))?new Rr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tR.exec(e))?Fh(t[1],t[2],t[3],t[4]):(t=eR.exec(e))?Fh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=rR.exec(e))?BC(t[1],t[2]/100,t[3]/100,1):(t=iR.exec(e))?BC(t[1],t[2]/100,t[3]/100,t[4]):bC.hasOwnProperty(e)?SC(bC[e]):e==="transparent"?new Rr(NaN,NaN,NaN,0):null}function SC(e){return new Rr(e>>16&255,e>>8&255,e&255,1)}function Fh(e,t,r,i){return i<=0&&(e=t=r=NaN),new Rr(e,t,r,i)}function sR(e){return e instanceof lc||(e=Hl(e)),e?(e=e.rgb(),new Rr(e.r,e.g,e.b,e.opacity)):new Rr}function gg(e,t,r,i){return arguments.length===1?sR(e):new Rr(e,t,r,i??1)}function Rr(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Nm(Rr,gg,t2(lc,{brighter(e){return e=e==null?mu:Math.pow(mu,e),new Rr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Wl:Math.pow(Wl,e),new Rr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rr($o(this.r),$o(this.g),$o(this.b),yu(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:TC,formatHex:TC,formatHex8:aR,formatRgb:_C,toString:_C}));function TC(){return`#${Oo(this.r)}${Oo(this.g)}${Oo(this.b)}`}function aR(){return`#${Oo(this.r)}${Oo(this.g)}${Oo(this.b)}${Oo((isNaN(this.opacity)?1:this.opacity)*255)}`}function _C(){const e=yu(this.opacity);return`${e===1?"rgb(":"rgba("}${$o(this.r)}, ${$o(this.g)}, ${$o(this.b)}${e===1?")":`, ${e})`}`}function yu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $o(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oo(e){return e=$o(e),(e<16?"0":"")+e.toString(16)}function BC(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Li(e,t,r,i)}function e2(e){if(e instanceof Li)return new Li(e.h,e.s,e.l,e.opacity);if(e instanceof lc||(e=Hl(e)),!e)return new Li;if(e instanceof Li)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=Math.max(t,r,i),a=NaN,c=s-n,h=(s+n)/2;return c?(t===s?a=(r-i)/c+(r<i)*6:r===s?a=(i-t)/c+2:a=(t-r)/c+4,c/=h<.5?s+n:2-s-n,a*=60):c=h>0&&h<1?0:a,new Li(a,c,h,e.opacity)}function lR(e,t,r,i){return arguments.length===1?e2(e):new Li(e,t,r,i??1)}function Li(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Nm(Li,lR,t2(lc,{brighter(e){return e=e==null?mu:Math.pow(mu,e),new Li(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Wl:Math.pow(Wl,e),new Li(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Rr(Ep(e>=240?e-240:e+120,n,i),Ep(e,n,i),Ep(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Li(LC(this.h),Mh(this.s),Mh(this.l),yu(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 e=yu(this.opacity);return`${e===1?"hsl(":"hsla("}${LC(this.h)}, ${Mh(this.s)*100}%, ${Mh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function LC(e){return e=(e||0)%360,e<0?e+360:e}function Mh(e){return Math.max(0,Math.min(1,e||0))}function Ep(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const jm=e=>()=>e;function r2(e,t){return function(r){return e+r*t}}function cR(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function LV(e,t){var r=t-e;return r?r2(e,r>180||r<-180?r-360*Math.round(r/360):r):jm(isNaN(e)?t:e)}function hR(e){return(e=+e)==1?i2:function(t,r){return r-t?cR(t,r,e):jm(isNaN(t)?r:t)}}function i2(e,t){var r=t-e;return r?r2(e,r):jm(isNaN(e)?t:e)}const EC=(function e(t){var r=hR(t);function i(n,s){var a=r((n=gg(n)).r,(s=gg(s)).r),c=r(n.g,s.g),h=r(n.b,s.b),u=i2(n.opacity,s.opacity);return function(d){return n.r=a(d),n.g=c(d),n.b=h(d),n.opacity=u(d),n+""}}return i.gamma=e,i})(1);function eo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var mg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ap=new RegExp(mg.source,"g");function uR(e){return function(){return e}}function dR(e){return function(t){return e(t)+""}}function fR(e,t){var r=mg.lastIndex=Ap.lastIndex=0,i,n,s,a=-1,c=[],h=[];for(e=e+"",t=t+"";(i=mg.exec(e))&&(n=Ap.exec(t));)(s=n.index)>r&&(s=t.slice(r,s),c[a]?c[a]+=s:c[++a]=s),(i=i[0])===(n=n[0])?c[a]?c[a]+=n:c[++a]=n:(c[++a]=null,h.push({i:a,x:eo(i,n)})),r=Ap.lastIndex;return r<t.length&&(s=t.slice(r),c[a]?c[a]+=s:c[++a]=s),c.length<2?h[0]?dR(h[0].x):uR(t):(t=h.length,function(u){for(var d=0,f;d<t;++d)c[(f=h[d]).i]=f.x(u);return c.join("")})}var AC=180/Math.PI,yg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function n2(e,t,r,i,n,s){var a,c,h;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(h=e*r+t*i)&&(r-=e*h,i-=t*h),(c=Math.sqrt(r*r+i*i))&&(r/=c,i/=c,h/=c),e*i<t*r&&(e=-e,t=-t,h=-h,a=-a),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*AC,skewX:Math.atan(h)*AC,scaleX:a,scaleY:c}}var Ih;function pR(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?yg:n2(t.a,t.b,t.c,t.d,t.e,t.f)}function gR(e){return e==null||(Ih||(Ih=document.createElementNS("http://www.w3.org/2000/svg","g")),Ih.setAttribute("transform",e),!(e=Ih.transform.baseVal.consolidate()))?yg:(e=e.matrix,n2(e.a,e.b,e.c,e.d,e.e,e.f))}function o2(e,t,r,i){function n(u){return u.length?u.pop()+" ":""}function s(u,d,f,m,g,x){if(u!==f||d!==m){var C=g.push("translate(",null,t,null,r);x.push({i:C-4,x:eo(u,f)},{i:C-2,x:eo(d,m)})}else(f||m)&&g.push("translate("+f+t+m+r)}function a(u,d,f,m){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),m.push({i:f.push(n(f)+"rotate(",null,i)-2,x:eo(u,d)})):d&&f.push(n(f)+"rotate("+d+i)}function c(u,d,f,m){u!==d?m.push({i:f.push(n(f)+"skewX(",null,i)-2,x:eo(u,d)}):d&&f.push(n(f)+"skewX("+d+i)}function h(u,d,f,m,g,x){if(u!==f||d!==m){var C=g.push(n(g)+"scale(",null,",",null,")");x.push({i:C-4,x:eo(u,f)},{i:C-2,x:eo(d,m)})}else(f!==1||m!==1)&&g.push(n(g)+"scale("+f+","+m+")")}return function(u,d){var f=[],m=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,m),a(u.rotate,d.rotate,f,m),c(u.skewX,d.skewX,f,m),h(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,m),u=d=null,function(g){for(var x=-1,C=m.length,k;++x<C;)f[(k=m[x]).i]=k.x(g);return f.join("")}}}var mR=o2(pR,"px, ","px)","deg)"),yR=o2(gR,", ",")",")"),oa=0,vl=0,fl=0,s2=1e3,xu,wl,Cu=0,qo=0,Ju=0,Ul=typeof performance=="object"&&performance.now?performance:Date,a2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Wm(){return qo||(a2(xR),qo=Ul.now()+Ju)}function xR(){qo=0}function ku(){this._call=this._time=this._next=null}ku.prototype=l2.prototype={constructor:ku,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Wm():+r)+(t==null?0:+t),!this._next&&wl!==this&&(wl?wl._next=this:xu=this,wl=this),this._call=e,this._time=r,xg()},stop:function(){this._call&&(this._call=null,this._time=1/0,xg())}};function l2(e,t,r){var i=new ku;return i.restart(e,t,r),i}function CR(){Wm(),++oa;for(var e=xu,t;e;)(t=qo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--oa}function FC(){qo=(Cu=Ul.now())+Ju,oa=vl=0;try{CR()}finally{oa=0,bR(),qo=0}}function kR(){var e=Ul.now(),t=e-Cu;t>s2&&(Ju-=t,Cu=e)}function bR(){for(var e,t=xu,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:xu=r);wl=e,xg(i)}function xg(e){if(!oa){vl&&(vl=clearTimeout(vl));var t=e-qo;t>24?(e<1/0&&(vl=setTimeout(FC,e-Ul.now()-Ju)),fl&&(fl=clearInterval(fl))):(fl||(Cu=Ul.now(),fl=setInterval(kR,s2)),oa=1,a2(FC))}}function MC(e,t,r){var i=new ku;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var vR=jv("start","end","cancel","interrupt"),wR=[],c2=0,IC=1,Cg=2,Kh=3,PC=4,kg=5,Zh=6;function td(e,t,r,i,n,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;SR(e,r,{name:t,index:i,group:n,on:vR,tween:wR,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:c2})}function qm(e,t){var r=Di(e,t);if(r.state>c2)throw new Error("too late; already scheduled");return r}function tn(e,t){var r=Di(e,t);if(r.state>Kh)throw new Error("too late; already running");return r}function Di(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function SR(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=l2(s,0,r.time);function s(u){r.state=IC,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,f,m,g;if(r.state!==IC)return h();for(d in i)if(g=i[d],g.name===r.name){if(g.state===Kh)return MC(a);g.state===PC?(g.state=Zh,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete i[d]):+d<t&&(g.state=Zh,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete i[d])}if(MC(function(){r.state===Kh&&(r.state=PC,r.timer.restart(c,r.delay,r.time),c(u))}),r.state=Cg,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Cg){for(r.state=Kh,n=new Array(m=r.tween.length),d=0,f=-1;d<m;++d)(g=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(n[++f]=g);n.length=f+1}}function c(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(h),r.state=kg,1),f=-1,m=n.length;++f<m;)n[f].call(e,d);r.state===kg&&(r.on.call("end",e,e.__data__,r.index,r.group),h())}function h(){r.state=Zh,r.timer.stop(),delete i[t];for(var u in i)return;delete e.__transition}}function TR(e,t){var r=e.__transition,i,n,s=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){s=!1;continue}n=i.state>Cg&&i.state<kg,i.state=Zh,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}s&&delete e.__transition}}function _R(e){return this.each(function(){TR(this,e)})}function BR(e,t){var r,i;return function(){var n=tn(this,e),s=n.tween;if(s!==r){i=r=s;for(var a=0,c=i.length;a<c;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function LR(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=tn(this,e),a=s.tween;if(a!==i){n=(i=a).slice();for(var c={name:t,value:r},h=0,u=n.length;h<u;++h)if(n[h].name===t){n[h]=c;break}h===u&&n.push(c)}s.tween=n}}function ER(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Di(this.node(),r).tween,n=0,s=i.length,a;n<s;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((t==null?BR:LR)(r,e,t))}function Hm(e,t,r){var i=e._id;return e.each(function(){var n=tn(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return Di(n,i).value[t]}}function h2(e,t){var r;return(typeof t=="number"?eo:t instanceof Hl?EC:(r=Hl(t))?(t=r,EC):fR)(e,t)}function AR(e){return function(){this.removeAttribute(e)}}function FR(e){return function(){this.removeAttributeNS(e.space,e.local)}}function MR(e,t,r){var i,n=r+"",s;return function(){var a=this.getAttribute(e);return a===n?null:a===i?s:s=t(i=a,r)}}function IR(e,t,r){var i,n=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?s:s=t(i=a,r)}}function PR(e,t,r){var i,n,s;return function(){var a,c=r(this),h;return c==null?void this.removeAttribute(e):(a=this.getAttribute(e),h=c+"",a===h?null:a===i&&h===n?s:(n=h,s=t(i=a,c)))}}function OR(e,t,r){var i,n,s;return function(){var a,c=r(this),h;return c==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),h=c+"",a===h?null:a===i&&h===n?s:(n=h,s=t(i=a,c)))}}function DR(e,t){var r=Zu(e),i=r==="transform"?yR:h2;return this.attrTween(e,typeof t=="function"?(r.local?OR:PR)(r,i,Hm(this,"attr."+e,t)):t==null?(r.local?FR:AR)(r):(r.local?IR:MR)(r,i,t))}function RR(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function $R(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function zR(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&$R(e,s)),r}return n._value=t,n}function NR(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&RR(e,s)),r}return n._value=t,n}function jR(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Zu(e);return this.tween(r,(i.local?zR:NR)(i,t))}function WR(e,t){return function(){qm(this,e).delay=+t.apply(this,arguments)}}function qR(e,t){return t=+t,function(){qm(this,e).delay=t}}function HR(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?WR:qR)(t,e)):Di(this.node(),t).delay}function UR(e,t){return function(){tn(this,e).duration=+t.apply(this,arguments)}}function VR(e,t){return t=+t,function(){tn(this,e).duration=t}}function YR(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?UR:VR)(t,e)):Di(this.node(),t).duration}function GR(e,t){if(typeof t!="function")throw new Error;return function(){tn(this,e).ease=t}}function XR(e){var t=this._id;return arguments.length?this.each(GR(t,e)):Di(this.node(),t).ease}function QR(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;tn(this,e).ease=r}}function KR(e){if(typeof e!="function")throw new Error;return this.each(QR(this._id,e))}function ZR(e){typeof e!="function"&&(e=Hv(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,c=i[n]=[],h,u=0;u<a;++u)(h=s[u])&&e.call(h,h.__data__,u,s)&&c.push(h);return new kn(i,this._parents,this._name,this._id)}function JR(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,s=Math.min(i,n),a=new Array(i),c=0;c<s;++c)for(var h=t[c],u=r[c],d=h.length,f=a[c]=new Array(d),m,g=0;g<d;++g)(m=h[g]||u[g])&&(f[g]=m);for(;c<i;++c)a[c]=t[c];return new kn(a,this._parents,this._name,this._id)}function t6(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function e6(e,t,r){var i,n,s=t6(t)?qm:tn;return function(){var a=s(this,e),c=a.on;c!==i&&(n=(i=c).copy()).on(t,r),a.on=n}}function r6(e,t){var r=this._id;return arguments.length<2?Di(this.node(),r).on.on(e):this.each(e6(r,e,t))}function i6(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function n6(){return this.on("end.remove",i6(this._id))}function o6(e){var t=this._name,r=this._id;typeof e!="function"&&(e=$m(e));for(var i=this._groups,n=i.length,s=new Array(n),a=0;a<n;++a)for(var c=i[a],h=c.length,u=s[a]=new Array(h),d,f,m=0;m<h;++m)(d=c[m])&&(f=e.call(d,d.__data__,m,c))&&("__data__"in d&&(f.__data__=d.__data__),u[m]=f,td(u[m],t,r,m,u,Di(d,r)));return new kn(s,this._parents,t,r)}function s6(e){var t=this._name,r=this._id;typeof e!="function"&&(e=qv(e));for(var i=this._groups,n=i.length,s=[],a=[],c=0;c<n;++c)for(var h=i[c],u=h.length,d,f=0;f<u;++f)if(d=h[f]){for(var m=e.call(d,d.__data__,f,h),g,x=Di(d,r),C=0,k=m.length;C<k;++C)(g=m[C])&&td(g,t,r,C,m,x);s.push(m),a.push(d)}return new kn(s,a,t,r)}var a6=ac.prototype.constructor;function l6(){return new a6(this._groups,this._parents)}function c6(e,t){var r,i,n;return function(){var s=na(this,e),a=(this.style.removeProperty(e),na(this,e));return s===a?null:s===r&&a===i?n:n=t(r=s,i=a)}}function u2(e){return function(){this.style.removeProperty(e)}}function h6(e,t,r){var i,n=r+"",s;return function(){var a=na(this,e);return a===n?null:a===i?s:s=t(i=a,r)}}function u6(e,t,r){var i,n,s;return function(){var a=na(this,e),c=r(this),h=c+"";return c==null&&(h=c=(this.style.removeProperty(e),na(this,e))),a===h?null:a===i&&h===n?s:(n=h,s=t(i=a,c))}}function d6(e,t){var r,i,n,s="style."+t,a="end."+s,c;return function(){var h=tn(this,e),u=h.on,d=h.value[s]==null?c||(c=u2(t)):void 0;(u!==r||n!==d)&&(i=(r=u).copy()).on(a,n=d),h.on=i}}function f6(e,t,r){var i=(e+="")=="transform"?mR:h2;return t==null?this.styleTween(e,c6(e,i)).on("end.style."+e,u2(e)):typeof t=="function"?this.styleTween(e,u6(e,i,Hm(this,"style."+e,t))).each(d6(this._id,e)):this.styleTween(e,h6(e,i,t),r).on("end.style."+e,null)}function p6(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function g6(e,t,r){var i,n;function s(){var a=t.apply(this,arguments);return a!==n&&(i=(n=a)&&p6(e,a,r)),i}return s._value=t,s}function m6(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,g6(e,t,r??""))}function y6(e){return function(){this.textContent=e}}function x6(e){return function(){var t=e(this);this.textContent=t??""}}function C6(e){return this.tween("text",typeof e=="function"?x6(Hm(this,"text",e)):y6(e==null?"":e+""))}function k6(e){return function(t){this.textContent=e.call(this,t)}}function b6(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&k6(n)),t}return i._value=e,i}function v6(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,b6(e))}function w6(){for(var e=this._name,t=this._id,r=d2(),i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],c=a.length,h,u=0;u<c;++u)if(h=a[u]){var d=Di(h,t);td(h,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new kn(i,this._parents,e,r)}function S6(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(s,a){var c={value:a},h={value:function(){--n===0&&s()}};r.each(function(){var u=tn(this,i),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(h)),u.on=t}),n===0&&s()})}var T6=0;function kn(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function d2(){return++T6}var pn=ac.prototype;kn.prototype={constructor:kn,select:o6,selectAll:s6,selectChild:pn.selectChild,selectChildren:pn.selectChildren,filter:ZR,merge:JR,selection:l6,transition:w6,call:pn.call,nodes:pn.nodes,node:pn.node,size:pn.size,empty:pn.empty,each:pn.each,on:r6,attr:DR,attrTween:jR,style:f6,styleTween:m6,text:C6,textTween:v6,remove:n6,tween:ER,delay:HR,duration:YR,ease:XR,easeVarying:KR,end:S6,[Symbol.iterator]:pn[Symbol.iterator]};function _6(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var B6={time:null,delay:0,duration:250,ease:_6};function L6(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function E6(e){var t,r;e instanceof kn?(t=e._id,e=e._name):(t=d2(),(r=B6).time=Wm(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],c=a.length,h,u=0;u<c;++u)(h=a[u])&&td(h,e,t,u,a,r||L6(h,t));return new kn(i,this._parents,e,t)}ac.prototype.interrupt=_R;ac.prototype.transition=E6;const bg=Math.PI,vg=2*bg,Fo=1e-6,A6=vg-Fo;function f2(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function F6(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return f2;const r=10**t;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class M6{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?f2:F6(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,s,a){this._append`C${+t},${+r},${+i},${+n},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,i,n,s){if(t=+t,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,c=this._y1,h=i-t,u=n-r,d=a-t,f=c-r,m=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(m>Fo)if(!(Math.abs(f*h-u*d)>Fo)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let g=i-a,x=n-c,C=h*h+u*u,k=g*g+x*x,v=Math.sqrt(C),T=Math.sqrt(m),B=s*Math.tan((bg-Math.acos((C+m-k)/(2*v*T)))/2),M=B/T,O=B/v;Math.abs(M-1)>Fo&&this._append`L${t+M*d},${r+M*f}`,this._append`A${s},${s},0,0,${+(f*g>d*x)},${this._x1=t+O*h},${this._y1=r+O*u}`}}arc(t,r,i,n,s,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let c=i*Math.cos(n),h=i*Math.sin(n),u=t+c,d=r+h,f=1^a,m=a?n-s:s-n;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Fo||Math.abs(this._y1-d)>Fo)&&this._append`L${u},${d}`,i&&(m<0&&(m=m%vg+vg),m>A6?this._append`A${i},${i},0,1,${f},${t-c},${r-h}A${i},${i},0,1,${f},${this._x1=u},${this._y1=d}`:m>Fo&&this._append`A${i},${i},0,${+(m>=bg)},${f},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Bs(e){return function(){return e}}const EV=Math.abs,AV=Math.atan2,FV=Math.cos,MV=Math.max,IV=Math.min,PV=Math.sin,OV=Math.sqrt,OC=1e-12,Um=Math.PI,DC=Um/2,DV=2*Um;function RV(e){return e>1?0:e<-1?Um:Math.acos(e)}function $V(e){return e>=1?DC:e<=-1?-DC:Math.asin(e)}function I6(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new M6(t)}function P6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function p2(e){this._context=e}p2.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Dl(e){return new p2(e)}function O6(e){return e[0]}function D6(e){return e[1]}function R6(e,t){var r=Bs(!0),i=null,n=Dl,s=null,a=I6(c);e=typeof e=="function"?e:e===void 0?O6:Bs(e),t=typeof t=="function"?t:t===void 0?D6:Bs(t);function c(h){var u,d=(h=P6(h)).length,f,m=!1,g;for(i==null&&(s=n(g=a())),u=0;u<=d;++u)!(u<d&&r(f=h[u],u,h))===m&&((m=!m)?s.lineStart():s.lineEnd()),m&&s.point(+e(f,u,h),+t(f,u,h));if(g)return s=null,g+""||null}return c.x=function(h){return arguments.length?(e=typeof h=="function"?h:Bs(+h),c):e},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:Bs(+h),c):t},c.defined=function(h){return arguments.length?(r=typeof h=="function"?h:Bs(!!h),c):r},c.curve=function(h){return arguments.length?(n=h,i!=null&&(s=n(i)),c):n},c.context=function(h){return arguments.length?(h==null?i=s=null:s=n(i=h),c):i},c}class g2{constructor(t,r){this._context=t,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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function m2(e){return new g2(e,!0)}function y2(e){return new g2(e,!1)}function so(){}function bu(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function ed(e){this._context=e}ed.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:bu(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:bu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wg(e){return new ed(e)}function x2(e){this._context=e}x2.prototype={areaStart:so,areaEnd:so,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:bu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $6(e){return new x2(e)}function C2(e){this._context=e}C2.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(e,t){switch(e=+e,t=+t,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+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:bu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function z6(e){return new C2(e)}function k2(e,t){this._basis=new ed(e),this._beta=t}k2.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],s=e[r]-i,a=t[r]-n,c=-1,h;++c<=r;)h=c/r,this._basis.point(this._beta*e[c]+(1-this._beta)*(i+h*s),this._beta*t[c]+(1-this._beta)*(n+h*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const N6=(function e(t){function r(i){return t===1?new ed(i):new k2(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function vu(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Vm(e,t){this._context=e,this._k=(1-t)/6}Vm.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:vu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:vu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const b2=(function e(t){function r(i){return new Vm(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ym(e,t){this._context=e,this._k=(1-t)/6}Ym.prototype={areaStart:so,areaEnd:so,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:vu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const j6=(function e(t){function r(i){return new Ym(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Gm(e,t){this._context=e,this._k=(1-t)/6}Gm.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(e,t){switch(e=+e,t=+t,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:vu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const W6=(function e(t){function r(i){return new Gm(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Xm(e,t,r){var i=e._x1,n=e._y1,s=e._x2,a=e._y2;if(e._l01_a>OC){var c=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,h=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*c-e._x0*e._l12_2a+e._x2*e._l01_2a)/h,n=(n*c-e._y0*e._l12_2a+e._y2*e._l01_2a)/h}if(e._l23_a>OC){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*u+e._x1*e._l23_2a-t*e._l12_2a)/d,a=(a*u+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(i,n,s,a,e._x2,e._y2)}function v2(e,t){this._context=e,this._alpha=t}v2.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Xm(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const w2=(function e(t){function r(i){return t?new v2(i,t):new Vm(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function S2(e,t){this._context=e,this._alpha=t}S2.prototype={areaStart:so,areaEnd:so,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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Xm(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const q6=(function e(t){function r(i){return t?new S2(i,t):new Ym(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function T2(e,t){this._context=e,this._alpha=t}T2.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:Xm(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const H6=(function e(t){function r(i){return t?new T2(i,t):new Gm(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function _2(e){this._context=e}_2.prototype={areaStart:so,areaEnd:so,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function U6(e){return new _2(e)}function RC(e){return e<0?-1:1}function $C(e,t,r){var i=e._x1-e._x0,n=t-e._x1,s=(e._y1-e._y0)/(i||n<0&&-0),a=(r-e._y1)/(n||i<0&&-0),c=(s*n+a*i)/(i+n);return(RC(s)+RC(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(c))||0}function zC(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Fp(e,t,r){var i=e._x0,n=e._y0,s=e._x1,a=e._y1,c=(s-i)/3;e._context.bezierCurveTo(i+c,n+c*t,s-c,a-c*r,s,a)}function wu(e){this._context=e}wu.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:Fp(this,this._t0,zC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Fp(this,zC(this,r=$C(this,e,t)),r);break;default:Fp(this,this._t0,r=$C(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function B2(e){this._context=new L2(e)}(B2.prototype=Object.create(wu.prototype)).point=function(e,t){wu.prototype.point.call(this,t,e)};function L2(e){this._context=e}L2.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,s){this._context.bezierCurveTo(t,e,i,r,s,n)}};function E2(e){return new wu(e)}function A2(e){return new B2(e)}function F2(e){this._context=e}F2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=NC(e),n=NC(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function NC(e){var t,r=e.length-1,i,n=new Array(r),s=new Array(r),a=new Array(r);for(n[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(n[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)n[t]=(a[t]-n[t+1])/s[t];for(s[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-n[t+1];return[n,s]}function M2(e){return new F2(e)}function rd(e,t){this._context=e,this._t=t}rd.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function I2(e){return new rd(e,.5)}function P2(e){return new rd(e,0)}function O2(e){return new rd(e,1)}function Sl(e,t,r){this.k=e,this.x=t,this.y=r}Sl.prototype={constructor:Sl,scale:function(e){return e===1?this:new Sl(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Sl(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Sl.prototype;var V6=w(e=>{var n;const{securityLevel:t}=he();let r=Qt("body");if(t==="sandbox"){const a=((n=Qt(`#i${e}`).node())==null?void 0:n.contentDocument)??document;r=Qt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function Qm(e){return typeof e>"u"||e===null}w(Qm,"isNothing");function D2(e){return typeof e=="object"&&e!==null}w(D2,"isObject");function R2(e){return Array.isArray(e)?e:Qm(e)?[]:[e]}w(R2,"toArray");function $2(e,t){var r,i,n,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)n=s[r],e[n]=t[n];return e}w($2,"extend");function z2(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}w(z2,"repeat");function N2(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}w(N2,"isNegativeZero");var Y6=Qm,G6=D2,X6=R2,Q6=z2,K6=N2,Z6=$2,He={isNothing:Y6,isObject:G6,toArray:X6,repeat:Q6,isNegativeZero:K6,extend:Z6};function Km(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
191
+
192
+ `+e.mark.snippet),i+" "+r):i}w(Km,"formatError");function sa(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Km(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}w(sa,"YAMLException$1");sa.prototype=Object.create(Error.prototype);sa.prototype.constructor=sa;sa.prototype.toString=w(function(t){return this.name+": "+Km(this,t)},"toString");var Dr=sa;function Jh(e,t,r,i,n){var s="",a="",c=Math.floor(n/2)-1;return i-t>c&&(s=" ... ",t=i-c+s.length),r-i>c&&(a=" ...",r=i+c-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+s.length}}w(Jh,"getLine");function tu(e,t){return He.repeat(" ",t-e.length)+e}w(tu,"padStart");function j2(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,a=-1;s=r.exec(e.buffer);)n.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var c="",h,u,d=Math.min(e.line+t.linesAfter,n.length).toString().length,f=t.maxLength-(t.indent+d+3);for(h=1;h<=t.linesBefore&&!(a-h<0);h++)u=Jh(e.buffer,i[a-h],n[a-h],e.position-(i[a]-i[a-h]),f),c=He.repeat(" ",t.indent)+tu((e.line-h+1).toString(),d)+" | "+u.str+`
193
+ `+c;for(u=Jh(e.buffer,i[a],n[a],e.position,f),c+=He.repeat(" ",t.indent)+tu((e.line+1).toString(),d)+" | "+u.str+`
194
+ `,c+=He.repeat("-",t.indent+d+3+u.pos)+`^
195
+ `,h=1;h<=t.linesAfter&&!(a+h>=n.length);h++)u=Jh(e.buffer,i[a+h],n[a+h],e.position-(i[a]-i[a+h]),f),c+=He.repeat(" ",t.indent)+tu((e.line+h+1).toString(),d)+" | "+u.str+`
196
+ `;return c.replace(/\n$/,"")}w(j2,"makeSnippet");var J6=j2,t$=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],e$=["scalar","sequence","mapping"];function W2(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}w(W2,"compileStyleAliases");function q2(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(t$.indexOf(r)===-1)throw new Dr('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=W2(t.styleAliases||null),e$.indexOf(this.kind)===-1)throw new Dr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}w(q2,"Type$1");var fr=q2;function Sg(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=a)}),r[n]=i}),r}w(Sg,"compileList");function H2(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(w(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}w(H2,"compileMap");function Su(e){return this.extend(e)}w(Su,"Schema$1");Su.prototype.extend=w(function(t){var r=[],i=[];if(t instanceof fr)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Dr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof fr))throw new Dr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Dr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Dr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof fr))throw new Dr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Su.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Sg(n,"implicit"),n.compiledExplicit=Sg(n,"explicit"),n.compiledTypeMap=H2(n.compiledImplicit,n.compiledExplicit),n},"extend");var r$=Su,i$=new fr("tag:yaml.org,2002:str",{kind:"scalar",construct:w(function(e){return e!==null?e:""},"construct")}),n$=new fr("tag:yaml.org,2002:seq",{kind:"sequence",construct:w(function(e){return e!==null?e:[]},"construct")}),o$=new fr("tag:yaml.org,2002:map",{kind:"mapping",construct:w(function(e){return e!==null?e:{}},"construct")}),s$=new r$({explicit:[i$,n$,o$]});function U2(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}w(U2,"resolveYamlNull");function V2(){return null}w(V2,"constructYamlNull");function Y2(e){return e===null}w(Y2,"isNull");var a$=new fr("tag:yaml.org,2002:null",{kind:"scalar",resolve:U2,construct:V2,predicate:Y2,represent:{canonical:w(function(){return"~"},"canonical"),lowercase:w(function(){return"null"},"lowercase"),uppercase:w(function(){return"NULL"},"uppercase"),camelcase:w(function(){return"Null"},"camelcase"),empty:w(function(){return""},"empty")},defaultStyle:"lowercase"});function G2(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}w(G2,"resolveYamlBoolean");function X2(e){return e==="true"||e==="True"||e==="TRUE"}w(X2,"constructYamlBoolean");function Q2(e){return Object.prototype.toString.call(e)==="[object Boolean]"}w(Q2,"isBoolean");var l$=new fr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:G2,construct:X2,predicate:Q2,represent:{lowercase:w(function(e){return e?"true":"false"},"lowercase"),uppercase:w(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:w(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function K2(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}w(K2,"isHexCode");function Z2(e){return 48<=e&&e<=55}w(Z2,"isOctCode");function J2(e){return 48<=e&&e<=57}w(J2,"isDecCode");function tw(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!K2(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Z2(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!J2(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}w(tw,"resolveYamlInteger");function ew(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}w(ew,"constructYamlInteger");function rw(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!He.isNegativeZero(e)}w(rw,"isInteger");var c$=new fr("tag:yaml.org,2002:int",{kind:"scalar",resolve:tw,construct:ew,predicate:rw,represent:{binary:w(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:w(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:w(function(e){return e.toString(10)},"decimal"),hexadecimal:w(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),h$=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function iw(e){return!(e===null||!h$.test(e)||e[e.length-1]==="_")}w(iw,"resolveYamlFloat");function nw(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}w(nw,"constructYamlFloat");var u$=/^[-+]?[0-9]+e/;function ow(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(He.isNegativeZero(e))return"-0.0";return r=e.toString(10),u$.test(r)?r.replace("e",".e"):r}w(ow,"representYamlFloat");function sw(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||He.isNegativeZero(e))}w(sw,"isFloat");var d$=new fr("tag:yaml.org,2002:float",{kind:"scalar",resolve:iw,construct:nw,predicate:sw,represent:ow,defaultStyle:"lowercase"}),aw=s$.extend({implicit:[a$,l$,c$,d$]}),f$=aw,lw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),cw=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 hw(e){return e===null?!1:lw.exec(e)!==null||cw.exec(e)!==null}w(hw,"resolveYamlTimestamp");function uw(e){var t,r,i,n,s,a,c,h=0,u=null,d,f,m;if(t=lw.exec(e),t===null&&(t=cw.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(s=+t[4],a=+t[5],c=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(d=+t[10],f=+(t[11]||0),u=(d*60+f)*6e4,t[9]==="-"&&(u=-u)),m=new Date(Date.UTC(r,i,n,s,a,c,h)),u&&m.setTime(m.getTime()-u),m}w(uw,"constructYamlTimestamp");function dw(e){return e.toISOString()}w(dw,"representYamlTimestamp");var p$=new fr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:hw,construct:uw,instanceOf:Date,represent:dw});function fw(e){return e==="<<"||e===null}w(fw,"resolveYamlMerge");var g$=new fr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:fw}),Zm=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
197
+ \r`;function pw(e){if(e===null)return!1;var t,r,i=0,n=e.length,s=Zm;for(r=0;r<n;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}w(pw,"resolveYamlBinary");function gw(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,s=Zm,a=0,c=[];for(t=0;t<n;t++)t%4===0&&t&&(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=n%4*6,r===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):r===18?(c.push(a>>10&255),c.push(a>>2&255)):r===12&&c.push(a>>4&255),new Uint8Array(c)}w(gw,"constructYamlBinary");function mw(e){var t="",r=0,i,n,s=e.length,a=Zm;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return n=s%3,n===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):n===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):n===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}w(mw,"representYamlBinary");function yw(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}w(yw,"isBinary");var m$=new fr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:pw,construct:gw,predicate:yw,represent:mw}),y$=Object.prototype.hasOwnProperty,x$=Object.prototype.toString;function xw(e){if(e===null)return!0;var t=[],r,i,n,s,a,c=e;for(r=0,i=c.length;r<i;r+=1){if(n=c[r],a=!1,x$.call(n)!=="[object Object]")return!1;for(s in n)if(y$.call(n,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}w(xw,"resolveYamlOmap");function Cw(e){return e!==null?e:[]}w(Cw,"constructYamlOmap");var C$=new fr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:xw,construct:Cw}),k$=Object.prototype.toString;function kw(e){if(e===null)return!0;var t,r,i,n,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],k$.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[t]=[n[0],i[n[0]]]}return!0}w(kw,"resolveYamlPairs");function bw(e){if(e===null)return[];var t,r,i,n,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],n=Object.keys(i),s[t]=[n[0],i[n[0]]];return s}w(bw,"constructYamlPairs");var b$=new fr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:kw,construct:bw}),v$=Object.prototype.hasOwnProperty;function vw(e){if(e===null)return!0;var t,r=e;for(t in r)if(v$.call(r,t)&&r[t]!==null)return!1;return!0}w(vw,"resolveYamlSet");function ww(e){return e!==null?e:{}}w(ww,"constructYamlSet");var w$=new fr("tag:yaml.org,2002:set",{kind:"mapping",resolve:vw,construct:ww}),Sw=f$.extend({implicit:[p$,g$],explicit:[m$,C$,b$,w$]}),ao=Object.prototype.hasOwnProperty,Tu=1,Tw=2,_w=3,_u=4,Mp=1,S$=2,jC=3,T$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_$=/[\x85\u2028\u2029]/,B$=/[,\[\]\{\}]/,Bw=/^(?:!|!!|![a-z\-]+!)$/i,Lw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Tg(e){return Object.prototype.toString.call(e)}w(Tg,"_class");function Fi(e){return e===10||e===13}w(Fi,"is_EOL");function oo(e){return e===9||e===32}w(oo,"is_WHITE_SPACE");function br(e){return e===9||e===32||e===10||e===13}w(br,"is_WS_OR_EOL");function Do(e){return e===44||e===91||e===93||e===123||e===125}w(Do,"is_FLOW_INDICATOR");function Ew(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}w(Ew,"fromHexCode");function Aw(e){return e===120?2:e===117?4:e===85?8:0}w(Aw,"escapedHexLen");function Fw(e){return 48<=e&&e<=57?e-48:-1}w(Fw,"fromDecimalCode");function _g(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
198
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}w(_g,"simpleEscapeSequence");function Mw(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}w(Mw,"charFromCodepoint");function Jm(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}w(Jm,"setProperty");var Iw=new Array(256),Pw=new Array(256);for(Eo=0;Eo<256;Eo++)Iw[Eo]=_g(Eo)?1:0,Pw[Eo]=_g(Eo);var Eo;function Ow(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Sw,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}w(Ow,"State$1");function ty(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=J6(r),new Dr(t,r)}w(ty,"generateError");function Pt(e,t){throw ty(e,t)}w(Pt,"throwError");function Vl(e,t){e.onWarning&&e.onWarning.call(null,ty(e,t))}w(Vl,"throwWarning");var WC={YAML:w(function(t,r,i){var n,s,a;t.version!==null&&Pt(t,"duplication of %YAML directive"),i.length!==1&&Pt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Pt(t,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),a=parseInt(n[2],10),s!==1&&Pt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Vl(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:w(function(t,r,i){var n,s;i.length!==2&&Pt(t,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],Bw.test(n)||Pt(t,"ill-formed tag handle (first argument) of the TAG directive"),ao.call(t.tagMap,n)&&Pt(t,'there is a previously declared suffix for "'+n+'" tag handle'),Lw.test(s)||Pt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Pt(t,"tag prefix is malformed: "+s)}t.tagMap[n]=s},"handleTagDirective")};function Cn(e,t,r,i){var n,s,a,c;if(t<r){if(c=e.input.slice(t,r),i)for(n=0,s=c.length;n<s;n+=1)a=c.charCodeAt(n),a===9||32<=a&&a<=1114111||Pt(e,"expected valid JSON character");else T$.test(c)&&Pt(e,"the stream contains non-printable characters");e.result+=c}}w(Cn,"captureSegment");function Bg(e,t,r,i){var n,s,a,c;for(He.isObject(r)||Pt(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,c=n.length;a<c;a+=1)s=n[a],ao.call(t,s)||(Jm(t,s,r[s]),i[s]=!0)}w(Bg,"mergeMappings");function Ro(e,t,r,i,n,s,a,c,h){var u,d;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),u=0,d=n.length;u<d;u+=1)Array.isArray(n[u])&&Pt(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Tg(n[u])==="[object Object]"&&(n[u]="[object Object]");if(typeof n=="object"&&Tg(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(u=0,d=s.length;u<d;u+=1)Bg(e,t,s[u],r);else Bg(e,t,s,r);else!e.json&&!ao.call(r,n)&&ao.call(t,n)&&(e.line=a||e.line,e.lineStart=c||e.lineStart,e.position=h||e.position,Pt(e,"duplicated mapping key")),Jm(t,n,s),delete r[n];return t}w(Ro,"storeMappingPair");function id(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Pt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}w(id,"readLineBreak");function Oe(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;oo(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Fi(n))for(id(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Vl(e,"deficient indentation"),i}w(Oe,"skipSeparationSpace");function cc(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||br(r)))}w(cc,"testDocumentSeparator");function nd(e,t){t===1?e.result+=" ":t>1&&(e.result+=He.repeat(`
199
+ `,t-1))}w(nd,"writeFoldedLines");function Dw(e,t,r){var i,n,s,a,c,h,u,d,f=e.kind,m=e.result,g;if(g=e.input.charCodeAt(e.position),br(g)||Do(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(n=e.input.charCodeAt(e.position+1),br(n)||r&&Do(n)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,c=!1;g!==0;){if(g===58){if(n=e.input.charCodeAt(e.position+1),br(n)||r&&Do(n))break}else if(g===35){if(i=e.input.charCodeAt(e.position-1),br(i))break}else{if(e.position===e.lineStart&&cc(e)||r&&Do(g))break;if(Fi(g))if(h=e.line,u=e.lineStart,d=e.lineIndent,Oe(e,!1,-1),e.lineIndent>=t){c=!0,g=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=h,e.lineStart=u,e.lineIndent=d;break}}c&&(Cn(e,s,a,!1),nd(e,e.line-h),s=a=e.position,c=!1),oo(g)||(a=e.position+1),g=e.input.charCodeAt(++e.position)}return Cn(e,s,a,!1),e.result?!0:(e.kind=f,e.result=m,!1)}w(Dw,"readPlainScalar");function Rw(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Cn(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Fi(r)?(Cn(e,i,n,!0),nd(e,Oe(e,!1,t)),i=n=e.position):e.position===e.lineStart&&cc(e)?Pt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Pt(e,"unexpected end of the stream within a single quoted scalar")}w(Rw,"readSingleQuotedScalar");function $w(e,t){var r,i,n,s,a,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return Cn(e,r,e.position,!0),e.position++,!0;if(c===92){if(Cn(e,r,e.position,!0),c=e.input.charCodeAt(++e.position),Fi(c))Oe(e,!1,t);else if(c<256&&Iw[c])e.result+=Pw[c],e.position++;else if((a=Aw(c))>0){for(n=a,s=0;n>0;n--)c=e.input.charCodeAt(++e.position),(a=Ew(c))>=0?s=(s<<4)+a:Pt(e,"expected hexadecimal character");e.result+=Mw(s),e.position++}else Pt(e,"unknown escape sequence");r=i=e.position}else Fi(c)?(Cn(e,r,i,!0),nd(e,Oe(e,!1,t)),r=i=e.position):e.position===e.lineStart&&cc(e)?Pt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Pt(e,"unexpected end of the stream within a double quoted scalar")}w($w,"readDoubleQuotedScalar");function zw(e,t){var r=!0,i,n,s,a=e.tag,c,h=e.anchor,u,d,f,m,g,x=Object.create(null),C,k,v,T;if(T=e.input.charCodeAt(e.position),T===91)d=93,g=!1,c=[];else if(T===123)d=125,g=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),T=e.input.charCodeAt(++e.position);T!==0;){if(Oe(e,!0,t),T=e.input.charCodeAt(e.position),T===d)return e.position++,e.tag=a,e.anchor=h,e.kind=g?"mapping":"sequence",e.result=c,!0;r?T===44&&Pt(e,"expected the node content, but found ','"):Pt(e,"missed comma between flow collection entries"),k=C=v=null,f=m=!1,T===63&&(u=e.input.charCodeAt(e.position+1),br(u)&&(f=m=!0,e.position++,Oe(e,!0,t))),i=e.line,n=e.lineStart,s=e.position,Ho(e,t,Tu,!1,!0),k=e.tag,C=e.result,Oe(e,!0,t),T=e.input.charCodeAt(e.position),(m||e.line===i)&&T===58&&(f=!0,T=e.input.charCodeAt(++e.position),Oe(e,!0,t),Ho(e,t,Tu,!1,!0),v=e.result),g?Ro(e,c,x,k,C,v,i,n,s):f?c.push(Ro(e,null,x,k,C,v,i,n,s)):c.push(C),Oe(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(r=!0,T=e.input.charCodeAt(++e.position)):r=!1}Pt(e,"unexpected end of the stream within a flow collection")}w(zw,"readFlowCollection");function Nw(e,t){var r,i,n=Mp,s=!1,a=!1,c=t,h=0,u=!1,d,f;if(f=e.input.charCodeAt(e.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)Mp===n?n=f===43?jC:S$:Pt(e,"repeat of a chomping mode identifier");else if((d=Fw(f))>=0)d===0?Pt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Pt(e,"repeat of an indentation width identifier"):(c=t+d-1,a=!0);else break;if(oo(f)){do f=e.input.charCodeAt(++e.position);while(oo(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!Fi(f)&&f!==0)}for(;f!==0;){for(id(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!a||e.lineIndent<c)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>c&&(c=e.lineIndent),Fi(f)){h++;continue}if(e.lineIndent<c){n===jC?e.result+=He.repeat(`
200
+ `,s?1+h:h):n===Mp&&s&&(e.result+=`
201
+ `);break}for(i?oo(f)?(u=!0,e.result+=He.repeat(`
202
+ `,s?1+h:h)):u?(u=!1,e.result+=He.repeat(`
203
+ `,h+1)):h===0?s&&(e.result+=" "):e.result+=He.repeat(`
204
+ `,h):e.result+=He.repeat(`
205
+ `,s?1+h:h),s=!0,a=!0,h=0,r=e.position;!Fi(f)&&f!==0;)f=e.input.charCodeAt(++e.position);Cn(e,r,e.position,!1)}return!0}w(Nw,"readBlockScalar");function Lg(e,t){var r,i=e.tag,n=e.anchor,s=[],a,c=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),h=e.input.charCodeAt(e.position);h!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Pt(e,"tab characters must not be used in indentation")),!(h!==45||(a=e.input.charCodeAt(e.position+1),!br(a))));){if(c=!0,e.position++,Oe(e,!0,-1)&&e.lineIndent<=t){s.push(null),h=e.input.charCodeAt(e.position);continue}if(r=e.line,Ho(e,t,_w,!1,!0),s.push(e.result),Oe(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&h!==0)Pt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return c?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=s,!0):!1}w(Lg,"readBlockSequence");function jw(e,t,r){var i,n,s,a,c,h,u=e.tag,d=e.anchor,f={},m=Object.create(null),g=null,x=null,C=null,k=!1,v=!1,T;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),T=e.input.charCodeAt(e.position);T!==0;){if(!k&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Pt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(T===63||T===58)&&br(i))T===63?(k&&(Ro(e,f,m,g,x,null,a,c,h),g=x=C=null),v=!0,k=!0,n=!0):k?(k=!1,n=!0):Pt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,T=i;else{if(a=e.line,c=e.lineStart,h=e.position,!Ho(e,r,Tw,!1,!0))break;if(e.line===s){for(T=e.input.charCodeAt(e.position);oo(T);)T=e.input.charCodeAt(++e.position);if(T===58)T=e.input.charCodeAt(++e.position),br(T)||Pt(e,"a whitespace character is expected after the key-value separator within a block mapping"),k&&(Ro(e,f,m,g,x,null,a,c,h),g=x=C=null),v=!0,k=!1,n=!1,g=e.tag,x=e.result;else if(v)Pt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=d,!0}else if(v)Pt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=d,!0}if((e.line===s||e.lineIndent>t)&&(k&&(a=e.line,c=e.lineStart,h=e.position),Ho(e,t,_u,!0,n)&&(k?x=e.result:C=e.result),k||(Ro(e,f,m,g,x,C,a,c,h),g=x=C=null),Oe(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&T!==0)Pt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return k&&Ro(e,f,m,g,x,null,a,c,h),v&&(e.tag=u,e.anchor=d,e.kind="mapping",e.result=f),v}w(jw,"readBlockMapping");function Ww(e){var t,r=!1,i=!1,n,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&Pt(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):Pt(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!br(a);)a===33&&(i?Pt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Bw.test(n)||Pt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),B$.test(s)&&Pt(e,"tag suffix cannot contain flow indicator characters")}s&&!Lw.test(s)&&Pt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Pt(e,"tag name is malformed: "+s)}return r?e.tag=s:ao.call(e.tagMap,n)?e.tag=e.tagMap[n]+s:n==="!"?e.tag="!"+s:n==="!!"?e.tag="tag:yaml.org,2002:"+s:Pt(e,'undeclared tag handle "'+n+'"'),!0}w(Ww,"readTagProperty");function qw(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Pt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!br(r)&&!Do(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Pt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}w(qw,"readAnchorProperty");function Hw(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!br(i)&&!Do(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Pt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ao.call(e.anchorMap,r)||Pt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Oe(e,!0,-1),!0}w(Hw,"readAlias");function Ho(e,t,r,i,n){var s,a,c,h=1,u=!1,d=!1,f,m,g,x,C,k;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=c=_u===r||_w===r,i&&Oe(e,!0,-1)&&(u=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),h===1)for(;Ww(e)||qw(e);)Oe(e,!0,-1)?(u=!0,c=s,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):c=!1;if(c&&(c=u||n),(h===1||_u===r)&&(Tu===r||Tw===r?C=t:C=t+1,k=e.position-e.lineStart,h===1?c&&(Lg(e,k)||jw(e,k,C))||zw(e,C)?d=!0:(a&&Nw(e,C)||Rw(e,C)||$w(e,C)?d=!0:Hw(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&Pt(e,"alias node should not have any properties")):Dw(e,C,Tu===r)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(d=c&&Lg(e,k))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Pt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,m=e.implicitTypes.length;f<m;f+=1)if(x=e.implicitTypes[f],x.resolve(e.result)){e.result=x.construct(e.result),e.tag=x.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ao.call(e.typeMap[e.kind||"fallback"],e.tag))x=e.typeMap[e.kind||"fallback"][e.tag];else for(x=null,g=e.typeMap.multi[e.kind||"fallback"],f=0,m=g.length;f<m;f+=1)if(e.tag.slice(0,g[f].tag.length)===g[f].tag){x=g[f];break}x||Pt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&x.kind!==e.kind&&Pt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Pt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}w(Ho,"composeNode");function Uw(e){var t=e.position,r,i,n,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Oe(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!br(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Pt(e,"directive name must not be less than one character in length");a!==0;){for(;oo(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Fi(a));break}if(Fi(a))break;for(r=e.position;a!==0&&!br(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}a!==0&&id(e),ao.call(WC,i)?WC[i](e,i,n):Vl(e,'unknown document directive "'+i+'"')}if(Oe(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Oe(e,!0,-1)):s&&Pt(e,"directives end mark is expected"),Ho(e,e.lineIndent-1,_u,!1,!0),Oe(e,!0,-1),e.checkLineBreaks&&_$.test(e.input.slice(t,e.position))&&Vl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&cc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Oe(e,!0,-1));return}if(e.position<e.length-1)Pt(e,"end of the stream or a document separator is expected");else return}w(Uw,"readDocument");function ey(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
206
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Ow(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Pt(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;)Uw(r);return r.documents}w(ey,"loadDocuments");function L$(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=ey(e,r);if(typeof t!="function")return i;for(var n=0,s=i.length;n<s;n+=1)t(i[n])}w(L$,"loadAll$1");function Vw(e,t){var r=ey(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Dr("expected a single document in the stream, but found more")}}w(Vw,"load$1");var E$=Vw,A$={load:E$},Yw=Object.prototype.toString,Gw=Object.prototype.hasOwnProperty,ry=65279,F$=9,Yl=10,M$=13,I$=32,P$=33,O$=34,Eg=35,D$=37,R$=38,$$=39,z$=42,Xw=44,N$=45,Bu=58,j$=61,W$=62,q$=63,H$=64,Qw=91,Kw=93,U$=96,Zw=123,V$=124,Jw=125,gr={};gr[0]="\\0";gr[7]="\\a";gr[8]="\\b";gr[9]="\\t";gr[10]="\\n";gr[11]="\\v";gr[12]="\\f";gr[13]="\\r";gr[27]="\\e";gr[34]='\\"';gr[92]="\\\\";gr[133]="\\N";gr[160]="\\_";gr[8232]="\\L";gr[8233]="\\P";var Y$=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],G$=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function tS(e,t){var r,i,n,s,a,c,h;if(t===null)return{};for(r={},i=Object.keys(t),n=0,s=i.length;n<s;n+=1)a=i[n],c=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),h=e.compiledTypeMap.fallback[a],h&&Gw.call(h.styleAliases,c)&&(c=h.styleAliases[c]),r[a]=c;return r}w(tS,"compileStyleMap");function eS(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Dr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+He.repeat("0",i-t.length)+t}w(eS,"encodeHex");var X$=1,Gl=2;function rS(e){this.schema=e.schema||Sw,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=He.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=tS(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Gl:X$,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}w(rS,"State");function Ag(e,t){for(var r=He.repeat(" ",t),i=0,n=-1,s="",a,c=e.length;i<c;)n=e.indexOf(`
207
+ `,i),n===-1?(a=e.slice(i),i=c):(a=e.slice(i,n+1),i=n+1),a.length&&a!==`
208
+ `&&(s+=r),s+=a;return s}w(Ag,"indentString");function Lu(e,t){return`
209
+ `+He.repeat(" ",e.indent*t)}w(Lu,"generateNextLine");function iS(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}w(iS,"testImplicitResolving");function Xl(e){return e===I$||e===F$}w(Xl,"isWhitespace");function aa(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ry||65536<=e&&e<=1114111}w(aa,"isPrintable");function Fg(e){return aa(e)&&e!==ry&&e!==M$&&e!==Yl}w(Fg,"isNsCharOrWhitespace");function Mg(e,t,r){var i=Fg(e),n=i&&!Xl(e);return(r?i:i&&e!==Xw&&e!==Qw&&e!==Kw&&e!==Zw&&e!==Jw)&&e!==Eg&&!(t===Bu&&!n)||Fg(t)&&!Xl(t)&&e===Eg||t===Bu&&n}w(Mg,"isPlainSafe");function nS(e){return aa(e)&&e!==ry&&!Xl(e)&&e!==N$&&e!==q$&&e!==Bu&&e!==Xw&&e!==Qw&&e!==Kw&&e!==Zw&&e!==Jw&&e!==Eg&&e!==R$&&e!==z$&&e!==P$&&e!==V$&&e!==j$&&e!==W$&&e!==$$&&e!==O$&&e!==D$&&e!==H$&&e!==U$}w(nS,"isPlainSafeFirst");function oS(e){return!Xl(e)&&e!==Bu}w(oS,"isPlainSafeLast");function Ds(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}w(Ds,"codePointAt");function iy(e){var t=/^\n* /;return t.test(e)}w(iy,"needIndentIndicator");var sS=1,Ig=2,aS=3,lS=4,Is=5;function cS(e,t,r,i,n,s,a,c){var h,u=0,d=null,f=!1,m=!1,g=i!==-1,x=-1,C=nS(Ds(e,0))&&oS(Ds(e,e.length-1));if(t||a)for(h=0;h<e.length;u>=65536?h+=2:h++){if(u=Ds(e,h),!aa(u))return Is;C=C&&Mg(u,d,c),d=u}else{for(h=0;h<e.length;u>=65536?h+=2:h++){if(u=Ds(e,h),u===Yl)f=!0,g&&(m=m||h-x-1>i&&e[x+1]!==" ",x=h);else if(!aa(u))return Is;C=C&&Mg(u,d,c),d=u}m=m||g&&h-x-1>i&&e[x+1]!==" "}return!f&&!m?C&&!a&&!n(e)?sS:s===Gl?Is:Ig:r>9&&iy(e)?Is:a?s===Gl?Is:Ig:m?lS:aS}w(cS,"chooseScalarStyle");function hS(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Gl?'""':"''";if(!e.noCompatMode&&(Y$.indexOf(t)!==-1||G$.test(t)))return e.quotingType===Gl?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),c=i||e.flowLevel>-1&&r>=e.flowLevel;function h(u){return iS(e,u)}switch(w(h,"testAmbiguity"),cS(t,c,e.indent,a,h,e.quotingType,e.forceQuotes&&!i,n)){case sS:return t;case Ig:return"'"+t.replace(/'/g,"''")+"'";case aS:return"|"+Pg(t,e.indent)+Og(Ag(t,s));case lS:return">"+Pg(t,e.indent)+Og(Ag(uS(t,a),s));case Is:return'"'+dS(t)+'"';default:throw new Dr("impossible error: invalid scalar style")}})()}w(hS,"writeScalar");function Pg(e,t){var r=iy(e)?String(t):"",i=e[e.length-1]===`
210
+ `,n=i&&(e[e.length-2]===`
211
+ `||e===`
212
+ `),s=n?"+":i?"":"-";return r+s+`
213
+ `}w(Pg,"blockHeader");function Og(e){return e[e.length-1]===`
214
+ `?e.slice(0,-1):e}w(Og,"dropEndingNewline");function uS(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var u=e.indexOf(`
215
+ `);return u=u!==-1?u:e.length,r.lastIndex=u,Dg(e.slice(0,u),t)})(),n=e[0]===`
216
+ `||e[0]===" ",s,a;a=r.exec(e);){var c=a[1],h=a[2];s=h[0]===" ",i+=c+(!n&&!s&&h!==""?`
217
+ `:"")+Dg(h,t),n=s}return i}w(uS,"foldString");function Dg(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,s,a=0,c=0,h="";i=r.exec(e);)c=i.index,c-n>t&&(s=a>n?a:c,h+=`
218
+ `+e.slice(n,s),n=s+1),a=c;return h+=`
219
+ `,e.length-n>t&&a>n?h+=e.slice(n,a)+`
220
+ `+e.slice(a+1):h+=e.slice(n),h.slice(1)}w(Dg,"foldLine");function dS(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Ds(e,n),i=gr[r],!i&&aa(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||eS(r);return t}w(dS,"escapeString");function fS(e,t,r){var i="",n=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(Qi(e,t,c,!1,!1)||typeof c>"u"&&Qi(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}w(fS,"writeFlowSequence");function Rg(e,t,r,i){var n="",s=e.tag,a,c,h;for(a=0,c=r.length;a<c;a+=1)h=r[a],e.replacer&&(h=e.replacer.call(r,String(a),h)),(Qi(e,t+1,h,!0,!0,!1,!0)||typeof h>"u"&&Qi(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Lu(e,t)),e.dump&&Yl===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=s,e.dump=n||"[]"}w(Rg,"writeBlockSequence");function pS(e,t,r){var i="",n=e.tag,s=Object.keys(r),a,c,h,u,d;for(a=0,c=s.length;a<c;a+=1)d="",i!==""&&(d+=", "),e.condenseFlow&&(d+='"'),h=s[a],u=r[h],e.replacer&&(u=e.replacer.call(r,h,u)),Qi(e,t,h,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Qi(e,t,u,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}w(pS,"writeFlowMapping");function gS(e,t,r,i){var n="",s=e.tag,a=Object.keys(r),c,h,u,d,f,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Dr("sortKeys must be a boolean or a function");for(c=0,h=a.length;c<h;c+=1)m="",(!i||n!=="")&&(m+=Lu(e,t)),u=a[c],d=r[u],e.replacer&&(d=e.replacer.call(r,u,d)),Qi(e,t+1,u,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Yl===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,f&&(m+=Lu(e,t)),Qi(e,t+1,d,!0,f)&&(e.dump&&Yl===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,n+=m));e.tag=s,e.dump=n||"{}"}w(gS,"writeBlockMapping");function $g(e,t,r){var i,n,s,a,c,h;for(n=r?e.explicitTypes:e.implicitTypes,s=0,a=n.length;s<a;s+=1)if(c=n[s],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(r?c.multi&&c.representName?e.tag=c.representName(t):e.tag=c.tag:e.tag="?",c.represent){if(h=e.styleMap[c.tag]||c.defaultStyle,Yw.call(c.represent)==="[object Function]")i=c.represent(t,h);else if(Gw.call(c.represent,h))i=c.represent[h](t,h);else throw new Dr("!<"+c.tag+'> tag resolver accepts not "'+h+'" style');e.dump=i}return!0}return!1}w($g,"detectType");function Qi(e,t,r,i,n,s,a){e.tag=null,e.dump=r,$g(e,r,!1)||$g(e,r,!0);var c=Yw.call(e.dump),h=i,u;i&&(i=e.flowLevel<0||e.flowLevel>t);var d=c==="[object Object]"||c==="[object Array]",f,m;if(d&&(f=e.duplicates.indexOf(r),m=f!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(d&&m&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),c==="[object Object]")i&&Object.keys(e.dump).length!==0?(gS(e,t,e.dump,n),m&&(e.dump="&ref_"+f+e.dump)):(pS(e,t,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Rg(e,t-1,e.dump,n):Rg(e,t,e.dump,n),m&&(e.dump="&ref_"+f+e.dump)):(fS(e,t,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&hS(e,e.dump,t,s,h);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Dr("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}w(Qi,"writeNode");function mS(e,t){var r=[],i=[],n,s;for(Eu(e,r,i),n=0,s=i.length;n<s;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(s)}w(mS,"getDuplicateReferences");function Eu(e,t,r){var i,n,s;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,s=e.length;n<s;n+=1)Eu(e[n],t,r);else for(i=Object.keys(e),n=0,s=i.length;n<s;n+=1)Eu(e[i[n]],t,r)}w(Eu,"inspectNode");function Q$(e,t){t=t||{};var r=new rS(t);r.noRefs||mS(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Qi(r,0,i,!0,!0)?r.dump+`
221
+ `:""}w(Q$,"dump$1");function K$(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}w(K$,"renamed");var Z$=aw,J$=A$.load;/*! Bundled license information:
222
+
223
+ js-yaml/dist/js-yaml.mjs:
224
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
225
+ */var pl=w((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),hr={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},qC={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Tl(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Se(e),t=Se(t);const[r,i]=[e.x,e.y],[n,s]=[t.x,t.y],a=n-r,c=s-i;return{angle:Math.atan(c/a),deltaX:a,deltaY:c}}w(Tl,"calculateDeltaAndAngle");var Se=w(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),t8=w(e=>({x:w(function(t,r,i){let n=0;const s=Se(i[0]).x<Se(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(hr,e.arrowTypeStart)){const{angle:g,deltaX:x}=Tl(i[0],i[1]);n=hr[e.arrowTypeStart]*Math.cos(g)*(x>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(hr,e.arrowTypeEnd)){const{angle:g,deltaX:x}=Tl(i[i.length-1],i[i.length-2]);n=hr[e.arrowTypeEnd]*Math.cos(g)*(x>=0?1:-1)}const a=Math.abs(Se(t).x-Se(i[i.length-1]).x),c=Math.abs(Se(t).y-Se(i[i.length-1]).y),h=Math.abs(Se(t).x-Se(i[0]).x),u=Math.abs(Se(t).y-Se(i[0]).y),d=hr[e.arrowTypeStart],f=hr[e.arrowTypeEnd],m=1;if(a<f&&a>0&&c<f){let g=f+m-a;g*=s==="right"?-1:1,n-=g}if(h<d&&h>0&&u<d){let g=d+m-h;g*=s==="right"?-1:1,n+=g}return Se(t).x+n},"x"),y:w(function(t,r,i){let n=0;const s=Se(i[0]).y<Se(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(hr,e.arrowTypeStart)){const{angle:g,deltaY:x}=Tl(i[0],i[1]);n=hr[e.arrowTypeStart]*Math.abs(Math.sin(g))*(x>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(hr,e.arrowTypeEnd)){const{angle:g,deltaY:x}=Tl(i[i.length-1],i[i.length-2]);n=hr[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(x>=0?1:-1)}const a=Math.abs(Se(t).y-Se(i[i.length-1]).y),c=Math.abs(Se(t).x-Se(i[i.length-1]).x),h=Math.abs(Se(t).y-Se(i[0]).y),u=Math.abs(Se(t).x-Se(i[0]).x),d=hr[e.arrowTypeStart],f=hr[e.arrowTypeEnd],m=1;if(a<f&&a>0&&c<f){let g=f+m-a;g*=s==="up"?-1:1,n-=g}if(h<d&&h>0&&u<d){let g=d+m-h;g*=s==="up"?-1:1,n+=g}return Se(t).y+n},"y")}),"getLineFunctionsWithOffset"),Ph={},We={},HC;function e8(){return HC||(HC=1,Object.defineProperty(We,"__esModule",{value:!0}),We.BLANK_URL=We.relativeFirstCharacters=We.whitespaceEscapeCharsRegex=We.urlSchemeRegex=We.ctrlCharactersRegex=We.htmlCtrlEntityRegex=We.htmlEntitiesRegex=We.invalidProtocolRegex=void 0,We.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,We.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,We.htmlCtrlEntityRegex=/&(newline|tab);/gi,We.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,We.urlSchemeRegex=/^.+(:|&colon;)/gim,We.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,We.relativeFirstCharacters=[".","/"],We.BLANK_URL="about:blank"),We}var UC;function r8(){if(UC)return Ph;UC=1,Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.sanitizeUrl=s;var e=e8();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var c=a.replace(e.ctrlCharactersRegex,"");return c.replace(e.htmlEntitiesRegex,function(h,u){return String.fromCharCode(u)})}function i(a){return URL.canParse(a)}function n(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var c,h=n(a.trim());do h=r(h).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),h=n(h),c=h.match(e.ctrlCharactersRegex)||h.match(e.htmlEntitiesRegex)||h.match(e.htmlCtrlEntityRegex)||h.match(e.whitespaceEscapeCharsRegex);while(c&&c.length>0);var u=h;if(!u)return e.BLANK_URL;if(t(u))return u;var d=u.trimStart(),f=d.match(e.urlSchemeRegex);if(!f)return u;var m=f[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(m))return e.BLANK_URL;var g=d.replace(/\\/g,"/");if(m==="mailto:"||m.includes("://"))return g;if(m==="http:"||m==="https:"){if(!i(g))return e.BLANK_URL;var x=new URL(g);return x.protocol=x.protocol.toLowerCase(),x.hostname=x.hostname.toLowerCase(),x.toString()}return g}return Ph}var i8=r8(),yS=typeof global=="object"&&global&&global.Object===Object&&global,n8=typeof self=="object"&&self&&self.Object===Object&&self,en=yS||n8||Function("return this")(),Au=en.Symbol,xS=Object.prototype,o8=xS.hasOwnProperty,s8=xS.toString,gl=Au?Au.toStringTag:void 0;function a8(e){var t=o8.call(e,gl),r=e[gl];try{e[gl]=void 0;var i=!0}catch{}var n=s8.call(e);return i&&(t?e[gl]=r:delete e[gl]),n}var l8=Object.prototype,c8=l8.toString;function h8(e){return c8.call(e)}var u8="[object Null]",d8="[object Undefined]",VC=Au?Au.toStringTag:void 0;function da(e){return e==null?e===void 0?d8:u8:VC&&VC in Object(e)?a8(e):h8(e)}function Qo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var f8="[object AsyncFunction]",p8="[object Function]",g8="[object GeneratorFunction]",m8="[object Proxy]";function ny(e){if(!Qo(e))return!1;var t=da(e);return t==p8||t==g8||t==f8||t==m8}var Ip=en["__core-js_shared__"],YC=(function(){var e=/[^.]+$/.exec(Ip&&Ip.keys&&Ip.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function y8(e){return!!YC&&YC in e}var x8=Function.prototype,C8=x8.toString;function Ko(e){if(e!=null){try{return C8.call(e)}catch{}try{return e+""}catch{}}return""}var k8=/[\\^$.*+?()[\]{}|]/g,b8=/^\[object .+?Constructor\]$/,v8=Function.prototype,w8=Object.prototype,S8=v8.toString,T8=w8.hasOwnProperty,_8=RegExp("^"+S8.call(T8).replace(k8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B8(e){if(!Qo(e)||y8(e))return!1;var t=ny(e)?_8:b8;return t.test(Ko(e))}function L8(e,t){return e==null?void 0:e[t]}function Zo(e,t){var r=L8(e,t);return B8(r)?r:void 0}var Ql=Zo(Object,"create");function E8(){this.__data__=Ql?Ql(null):{},this.size=0}function A8(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var F8="__lodash_hash_undefined__",M8=Object.prototype,I8=M8.hasOwnProperty;function P8(e){var t=this.__data__;if(Ql){var r=t[e];return r===F8?void 0:r}return I8.call(t,e)?t[e]:void 0}var O8=Object.prototype,D8=O8.hasOwnProperty;function R8(e){var t=this.__data__;return Ql?t[e]!==void 0:D8.call(t,e)}var $8="__lodash_hash_undefined__";function z8(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ql&&t===void 0?$8:t,this}function Uo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Uo.prototype.clear=E8;Uo.prototype.delete=A8;Uo.prototype.get=P8;Uo.prototype.has=R8;Uo.prototype.set=z8;function N8(){this.__data__=[],this.size=0}function od(e,t){return e===t||e!==e&&t!==t}function sd(e,t){for(var r=e.length;r--;)if(od(e[r][0],t))return r;return-1}var j8=Array.prototype,W8=j8.splice;function q8(e){var t=this.__data__,r=sd(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():W8.call(t,r,1),--this.size,!0}function H8(e){var t=this.__data__,r=sd(t,e);return r<0?void 0:t[r][1]}function U8(e){return sd(this.__data__,e)>-1}function V8(e,t){var r=this.__data__,i=sd(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Sn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Sn.prototype.clear=N8;Sn.prototype.delete=q8;Sn.prototype.get=H8;Sn.prototype.has=U8;Sn.prototype.set=V8;var Kl=Zo(en,"Map");function Y8(){this.size=0,this.__data__={hash:new Uo,map:new(Kl||Sn),string:new Uo}}function G8(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ad(e,t){var r=e.__data__;return G8(t)?r[typeof t=="string"?"string":"hash"]:r.map}function X8(e){var t=ad(this,e).delete(e);return this.size-=t?1:0,t}function Q8(e){return ad(this,e).get(e)}function K8(e){return ad(this,e).has(e)}function Z8(e,t){var r=ad(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function uo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}uo.prototype.clear=Y8;uo.prototype.delete=X8;uo.prototype.get=Q8;uo.prototype.has=K8;uo.prototype.set=Z8;var J8="Expected a function";function hc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(J8);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=e.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(hc.Cache||uo),r}hc.Cache=uo;function tz(){this.__data__=new Sn,this.size=0}function ez(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function rz(e){return this.__data__.get(e)}function iz(e){return this.__data__.has(e)}var nz=200;function oz(e,t){var r=this.__data__;if(r instanceof Sn){var i=r.__data__;if(!Kl||i.length<nz-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new uo(i)}return r.set(e,t),this.size=r.size,this}function fa(e){var t=this.__data__=new Sn(e);this.size=t.size}fa.prototype.clear=tz;fa.prototype.delete=ez;fa.prototype.get=rz;fa.prototype.has=iz;fa.prototype.set=oz;var Fu=(function(){try{var e=Zo(Object,"defineProperty");return e({},"",{}),e}catch{}})();function oy(e,t,r){t=="__proto__"&&Fu?Fu(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function zg(e,t,r){(r!==void 0&&!od(e[t],r)||r===void 0&&!(t in e))&&oy(e,t,r)}function sz(e){return function(t,r,i){for(var n=-1,s=Object(t),a=i(t),c=a.length;c--;){var h=a[++n];if(r(s[h],h,s)===!1)break}return t}}var az=sz(),CS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,GC=CS&&typeof module=="object"&&module&&!module.nodeType&&module,lz=GC&&GC.exports===CS,XC=lz?en.Buffer:void 0,QC=XC?XC.allocUnsafe:void 0;function cz(e,t){if(t)return e.slice();var r=e.length,i=QC?QC(r):new e.constructor(r);return e.copy(i),i}var KC=en.Uint8Array;function hz(e){var t=new e.constructor(e.byteLength);return new KC(t).set(new KC(e)),t}function uz(e,t){var r=t?hz(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function dz(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var ZC=Object.create,fz=(function(){function e(){}return function(t){if(!Qo(t))return{};if(ZC)return ZC(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function kS(e,t){return function(r){return e(t(r))}}var bS=kS(Object.getPrototypeOf,Object),pz=Object.prototype;function ld(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||pz;return e===r}function gz(e){return typeof e.constructor=="function"&&!ld(e)?fz(bS(e)):{}}function uc(e){return e!=null&&typeof e=="object"}var mz="[object Arguments]";function JC(e){return uc(e)&&da(e)==mz}var vS=Object.prototype,yz=vS.hasOwnProperty,xz=vS.propertyIsEnumerable,Mu=JC((function(){return arguments})())?JC:function(e){return uc(e)&&yz.call(e,"callee")&&!xz.call(e,"callee")},Iu=Array.isArray,Cz=9007199254740991;function wS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Cz}function cd(e){return e!=null&&wS(e.length)&&!ny(e)}function kz(e){return uc(e)&&cd(e)}function bz(){return!1}var SS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tk=SS&&typeof module=="object"&&module&&!module.nodeType&&module,vz=tk&&tk.exports===SS,ek=vz?en.Buffer:void 0,wz=ek?ek.isBuffer:void 0,sy=wz||bz,Sz="[object Object]",Tz=Function.prototype,_z=Object.prototype,TS=Tz.toString,Bz=_z.hasOwnProperty,Lz=TS.call(Object);function Ez(e){if(!uc(e)||da(e)!=Sz)return!1;var t=bS(e);if(t===null)return!0;var r=Bz.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&TS.call(r)==Lz}var Az="[object Arguments]",Fz="[object Array]",Mz="[object Boolean]",Iz="[object Date]",Pz="[object Error]",Oz="[object Function]",Dz="[object Map]",Rz="[object Number]",$z="[object Object]",zz="[object RegExp]",Nz="[object Set]",jz="[object String]",Wz="[object WeakMap]",qz="[object ArrayBuffer]",Hz="[object DataView]",Uz="[object Float32Array]",Vz="[object Float64Array]",Yz="[object Int8Array]",Gz="[object Int16Array]",Xz="[object Int32Array]",Qz="[object Uint8Array]",Kz="[object Uint8ClampedArray]",Zz="[object Uint16Array]",Jz="[object Uint32Array]",be={};be[Uz]=be[Vz]=be[Yz]=be[Gz]=be[Xz]=be[Qz]=be[Kz]=be[Zz]=be[Jz]=!0;be[Az]=be[Fz]=be[qz]=be[Mz]=be[Hz]=be[Iz]=be[Pz]=be[Oz]=be[Dz]=be[Rz]=be[$z]=be[zz]=be[Nz]=be[jz]=be[Wz]=!1;function tN(e){return uc(e)&&wS(e.length)&&!!be[da(e)]}function eN(e){return function(t){return e(t)}}var _S=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rl=_S&&typeof module=="object"&&module&&!module.nodeType&&module,rN=Rl&&Rl.exports===_S,Pp=rN&&yS.process,rk=(function(){try{var e=Rl&&Rl.require&&Rl.require("util").types;return e||Pp&&Pp.binding&&Pp.binding("util")}catch{}})(),ik=rk&&rk.isTypedArray,ay=ik?eN(ik):tN;function Ng(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var iN=Object.prototype,nN=iN.hasOwnProperty;function oN(e,t,r){var i=e[t];(!(nN.call(e,t)&&od(i,r))||r===void 0&&!(t in e))&&oy(e,t,r)}function sN(e,t,r,i){var n=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var c=t[s],h=void 0;h===void 0&&(h=e[c]),n?oy(r,c,h):oN(r,c,h)}return r}function aN(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var lN=9007199254740991,cN=/^(?:0|[1-9]\d*)$/;function BS(e,t){var r=typeof e;return t=t??lN,!!t&&(r=="number"||r!="symbol"&&cN.test(e))&&e>-1&&e%1==0&&e<t}var hN=Object.prototype,uN=hN.hasOwnProperty;function dN(e,t){var r=Iu(e),i=!r&&Mu(e),n=!r&&!i&&sy(e),s=!r&&!i&&!n&&ay(e),a=r||i||n||s,c=a?aN(e.length,String):[],h=c.length;for(var u in e)(t||uN.call(e,u))&&!(a&&(u=="length"||n&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||BS(u,h)))&&c.push(u);return c}function fN(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var pN=Object.prototype,gN=pN.hasOwnProperty;function mN(e){if(!Qo(e))return fN(e);var t=ld(e),r=[];for(var i in e)i=="constructor"&&(t||!gN.call(e,i))||r.push(i);return r}function LS(e){return cd(e)?dN(e,!0):mN(e)}function yN(e){return sN(e,LS(e))}function xN(e,t,r,i,n,s,a){var c=Ng(e,r),h=Ng(t,r),u=a.get(h);if(u){zg(e,r,u);return}var d=s?s(c,h,r+"",e,t,a):void 0,f=d===void 0;if(f){var m=Iu(h),g=!m&&sy(h),x=!m&&!g&&ay(h);d=h,m||g||x?Iu(c)?d=c:kz(c)?d=dz(c):g?(f=!1,d=cz(h,!0)):x?(f=!1,d=uz(h,!0)):d=[]:Ez(h)||Mu(h)?(d=c,Mu(c)?d=yN(c):(!Qo(c)||ny(c))&&(d=gz(h))):f=!1}f&&(a.set(h,d),n(d,h,i,s,a),a.delete(h)),zg(e,r,d)}function ES(e,t,r,i,n){e!==t&&az(t,function(s,a){if(n||(n=new fa),Qo(s))xN(e,t,a,r,ES,i,n);else{var c=i?i(Ng(e,a),s,a+"",e,t,n):void 0;c===void 0&&(c=s),zg(e,a,c)}},LS)}function AS(e){return e}function CN(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var nk=Math.max;function kN(e,t,r){return t=nk(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,s=nk(i.length-t,0),a=Array(s);++n<s;)a[n]=i[t+n];n=-1;for(var c=Array(t+1);++n<t;)c[n]=i[n];return c[t]=r(a),CN(e,this,c)}}function bN(e){return function(){return e}}var vN=Fu?function(e,t){return Fu(e,"toString",{configurable:!0,enumerable:!1,value:bN(t),writable:!0})}:AS,wN=800,SN=16,TN=Date.now;function _N(e){var t=0,r=0;return function(){var i=TN(),n=SN-(i-r);if(r=i,n>0){if(++t>=wN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var BN=_N(vN);function LN(e,t){return BN(kN(e,t,AS),e+"")}function EN(e,t,r){if(!Qo(r))return!1;var i=typeof t;return(i=="number"?cd(r)&&BS(t,r.length):i=="string"&&t in r)?od(r[t],e):!1}function AN(e){return LN(function(t,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(n--,s):void 0,a&&EN(r[0],r[1],a)&&(s=n<3?void 0:s,n=1),t=Object(t);++i<n;){var c=r[i];c&&e(t,c,i,s)}return t})}var FN=AN(function(e,t,r){ES(e,t,r)}),MN="​",IN={curveBasis:wg,curveBasisClosed:$6,curveBasisOpen:z6,curveBumpX:m2,curveBumpY:y2,curveBundle:N6,curveCardinalClosed:j6,curveCardinalOpen:W6,curveCardinal:b2,curveCatmullRomClosed:q6,curveCatmullRomOpen:H6,curveCatmullRom:w2,curveLinear:Dl,curveLinearClosed:U6,curveMonotoneX:E2,curveMonotoneY:A2,curveNatural:M2,curveStep:I2,curveStepAfter:O2,curveStepBefore:P2},PN=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ON=w(function(e,t){const r=FS(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(c=>c.args);hu(a),i=qe(i,[...a])}else i=r.args;if(!i)return;let n=Mm(e,t);const s="config";return i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s]),i},"detectInit"),FS=w(function(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${PN.source})(?=[}][%]{2}).*
226
+ `,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),lt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const a=[];for(;(s=Pl.exec(e))!==null;)if(s.index===Pl.lastIndex&&Pl.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const c=s[1]?s[1]:s[2],h=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;a.push({type:c,args:h})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(n){return lt.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),DN=w(function(e){return e.replace(Pl,"")},"removeDirectives"),RN=w(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function ly(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return IN[r]??t}w(ly,"interpolateToCurve");function MS(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?i8.sanitizeUrl(r):r}w(MS,"formatUrl");var $N=w((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){lt.error(`Function name: ${e} not found in window`);return}s[n](...t)},"runFunc");function cy(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}w(cy,"distance");function IS(e){let t,r=0;e.forEach(n=>{r+=cy(n,t),t=n});const i=r/2;return hy(e,i)}w(IS,"traverseEdge");function PS(e){return e.length===1?e[0]:IS(e)}w(PS,"calcLabelPosition");var ok=w((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),hy=w((e,t)=>{let r,i=t;for(const n of e){if(r){const s=cy(n,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:n.x,y:n.y};if(a>0&&a<1)return{x:ok((1-a)*r.x+a*n.x,5),y:ok((1-a)*r.y+a*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),zN=w((e,t,r)=>{lt.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=hy(t,25),s=e?10:5,a=Math.atan2(t[0].y-n.y,t[0].x-n.x),c={x:0,y:0};return c.x=Math.sin(a)*s+(t[0].x+n.x)/2,c.y=-Math.cos(a)*s+(t[0].y+n.y)/2,c},"calcCardinalityPosition");function OS(e,t,r){const i=structuredClone(r);lt.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,s=hy(i,n),a=10+e*.5,c=Math.atan2(i[0].y-s.y,i[0].x-s.x),h={x:0,y:0};return t==="start_left"?(h.x=Math.sin(c+Math.PI)*a+(i[0].x+s.x)/2,h.y=-Math.cos(c+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(h.x=Math.sin(c-Math.PI)*a+(i[0].x+s.x)/2-5,h.y=-Math.cos(c-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(h.x=Math.sin(c)*a+(i[0].x+s.x)/2-5,h.y=-Math.cos(c)*a+(i[0].y+s.y)/2-5):(h.x=Math.sin(c)*a+(i[0].x+s.x)/2,h.y=-Math.cos(c)*a+(i[0].y+s.y)/2),h}w(OS,"calcTerminalLabelPosition");function DS(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}w(DS,"getStylesFromArray");var sk=0,NN=w(()=>(sk++,"id-"+Math.random().toString(36).substr(2,12)+"-"+sk),"generateId");function RS(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}w(RS,"makeRandomHex");var jN=w(e=>RS(e.length),"random"),WN=w(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"),qN=w(function(e,t){const r=t.text.replace(sc.lineBreakRegex," "),[,i]=hd(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const s=n.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),n},"drawSimpleText"),HN=hc((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),sc.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let s="";return i.forEach((a,c)=>{const h=bn(`${a} `,r),u=bn(s,r);if(h>t){const{hyphenatedStrings:m,remainingWord:g}=UN(a,t,"-",r);n.push(s,...m),s=g}else u+h>=t?(n.push(s),s=a):s=[s,a].filter(Boolean).join(" ");c+1===i.length&&n.push(s)}),n.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),UN=hc((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],s=[];let a="";return n.forEach((c,h)=>{const u=`${a}${c}`;if(bn(u,i)>=t){const f=h+1,m=n.length===f,g=`${u}${r}`;s.push(m?u:g),a=""}else a=u}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function $S(e,t){return uy(e,t).height}w($S,"calculateTextHeight");function bn(e,t){return uy(e,t).width}w(bn,"calculateTextWidth");var uy=hc((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,s]=hd(r),a=["sans-serif",i],c=e.split(sc.lineBreakRegex),h=[],u=Qt("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const d=u.append("svg");for(const m of a){let g=0;const x={width:0,height:0,lineHeight:0};for(const C of c){const k=WN();k.text=C||MN;const v=qN(d,k).style("font-size",s).style("font-weight",n).style("font-family",m),T=(v._groups||v)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");x.width=Math.round(Math.max(x.width,T.width)),g=Math.round(T.height),x.height+=g,x.lineHeight=Math.round(Math.max(x.lineHeight,g))}h.push(x)}d.remove();const f=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[f]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ta,VN=(ta=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},w(ta,"InitIDGenerator"),ta),Oh,YN=w(function(e){return Oh=Oh||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Oh.innerHTML=e,unescape(Oh.textContent)},"entityDecode");function dy(e){return"str"in e}w(dy,"isDetailedError");var GN=w((e,t,r,i)=>{var s;if(!i)return;const n=(s=e.node())==null?void 0:s.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),hd=w(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function fy(e,t){return FN({},e,t)}w(fy,"cleanAndMerge");var Ei={assignWithDepth:qe,wrapLabel:HN,calculateTextHeight:$S,calculateTextWidth:bn,calculateTextDimensions:uy,cleanAndMerge:fy,detectInit:ON,detectDirective:FS,isSubstringInArray:RN,interpolateToCurve:ly,calcLabelPosition:PS,calcCardinalityPosition:zN,calcTerminalLabelPosition:OS,formatUrl:MS,getStylesFromArray:DS,generateId:NN,random:jN,runFunc:$N,entityDecode:YN,insertTitle:GN,isLabelCoordinateInPath:zS,parseFontSize:hd,InitIDGenerator:VN},XN=w(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Vo=w(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),zV=w((e,t,{counter:r=0,prefix:i,suffix:n},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Qe(e){return e??null}w(Qe,"handleUndefinedAttr");function zS(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return n.includes(r.toString())||n.includes(i.toString())}w(zS,"isLabelCoordinateInPath");var py=w(({flowchart:e})=>{var n,s;const t=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function NS(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(n=>new Promise(s=>{function a(){if(n.style.display="flex",n.style.flexDirection="column",i){const c=he().fontSize?he().fontSize:window.getComputedStyle(document.body).fontSize,h=5,[u=Ev.fontSize]=hd(c),d=u*h+"px";n.style.minWidth=d,n.style.maxWidth=d}else n.style.width="100%";s(n)}w(a,"setupImage"),setTimeout(()=>{n.complete&&a()}),n.addEventListener("error",a),n.addEventListener("load",a)})))}w(NS,"configureLabelImages");var QN=w(e=>{const{handDrawnSeed:t}=he();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),pa=w(e=>{const t=KN([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),KN=w(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),jS=w(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Lt=w(e=>{const{stylesArray:t}=pa(e),r=[],i=[],n=[],s=[];return t.forEach(a=>{const c=a[0];jS(c)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),c.includes("stroke")&&n.push(a.join(":")+" !important"),c==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:s}},"styles2String"),Bt=w((e,t)=>{var h;const{themeVariables:r,handDrawnSeed:i}=he(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:a}=pa(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||n,seed:i,strokeWidth:((h=a.get("stroke-width"))==null?void 0:h.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:ZN(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),ZN=w(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const JN=Object.freeze({left:0,top:0,width:16,height:16}),Pu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),WS=Object.freeze({...JN,...Pu}),tj=Object.freeze({...WS,body:"",hidden:!1}),ej=Object.freeze({width:null,height:null}),rj=Object.freeze({...ej,...Pu}),ij=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),h=n.pop(),u={provider:n.length>0?n[0]:i,prefix:h,name:c};return Op(u)?u:null}const s=n[0],a=s.split("-");if(a.length>1){const c={provider:i,prefix:a.shift(),name:a.join("-")};return Op(c)?c:null}if(r&&i===""){const c={provider:i,prefix:"",name:s};return Op(c,r)?c:null}return null},Op=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function nj(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function ak(e,t){const r=nj(e,t);for(const i in tj)i in Pu?i in e&&!(i in r)&&(r[i]=Pu[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function oj(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(a){if(r[a])return n[a]=[];if(!(a in n)){n[a]=null;const c=i[a]&&i[a].parent,h=c&&s(c);h&&(n[a]=[c].concat(h))}return n[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),n}function lk(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let s={};function a(c){s=ak(i[c]||n[c],s)}return a(t),r.forEach(a),ak(e,s)}function sj(e,t){if(e.icons[t])return lk(e,t,[]);const r=oj(e,[t])[t];return r?lk(e,t,r):null}const aj=/(-?[0-9.]*[0-9]+[0-9.]*)/g,lj=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ck(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(aj);if(i===null||!i.length)return e;const n=[];let s=i.shift(),a=lj.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?n.push(s):n.push(Math.ceil(c*t*r)/r)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");a=!a}}function cj(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),s=e.indexOf("</"+t);if(n===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;r+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function hj(e,t){return e?"<defs>"+e+"</defs>"+t:t}function uj(e,t,r){const i=cj(e);return hj(i.defs,t+i.content+r)}const dj=e=>e==="unset"||e==="undefined"||e==="none";function fj(e,t){const r={...WS,...e},i={...rj,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(C=>{const k=[],v=C.hFlip,T=C.vFlip;let B=C.rotate;v?T?B+=2:(k.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),k.push("scale(-1 1)"),n.top=n.left=0):T&&(k.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),k.push("scale(1 -1)"),n.top=n.left=0);let M;switch(B<0&&(B-=Math.floor(B/4)*4),B=B%4,B){case 1:M=n.height/2+n.top,k.unshift("rotate(90 "+M.toString()+" "+M.toString()+")");break;case 2:k.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:M=n.width/2+n.left,k.unshift("rotate(-90 "+M.toString()+" "+M.toString()+")");break}B%2===1&&(n.left!==n.top&&(M=n.left,n.left=n.top,n.top=M),n.width!==n.height&&(M=n.width,n.width=n.height,n.height=M)),k.length&&(s=uj(s,'<g transform="'+k.join(" ")+'">',"</g>"))});const a=i.width,c=i.height,h=n.width,u=n.height;let d,f;a===null?(f=c===null?"1em":c==="auto"?u:c,d=ck(f,h/u)):(d=a==="auto"?h:a,f=c===null?ck(d,u/h):c==="auto"?u:c);const m={},g=(C,k)=>{dj(k)||(m[C]=k.toString())};g("width",d),g("height",f);const x=[n.left,n.top,h,u];return m.viewBox=x.join(" "),{attributes:m,viewBox:x,body:s}}const pj=/\sid="(\S+)"/g,hk=new Map;function gj(e){e=e.replace(/[0-9]+$/,"")||"a";const t=hk.get(e)||0;return hk.set(e,t+1),t?`${e}${t}`:e}function mj(e){const t=[];let r;for(;r=pj.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const s=gj(n),a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function yj(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function gy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Jo=gy();function qS(e){Jo=e}var $l={exec:()=>null};function ue(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(vr.caret,"$1"),r=r.replace(n,a),i},getRegex:()=>new RegExp(r,t)};return i}var xj=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),vr={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:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Cj=/^(?:[ \t]*(?:\n|$))+/,kj=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bj=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,dc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vj=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,my=/(?:[*+-]|\d{1,9}[.)])/,HS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,US=ue(HS).replace(/bull/g,my).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(),wj=ue(HS).replace(/bull/g,my).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(),yy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Sj=/^[^\n]+/,xy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Tj=ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",xy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_j=ue(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,my).getRegex(),ud="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",Cy=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Bj=ue("^ {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",Cy).replace("tag",ud).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),VS=ue(yy).replace("hr",dc).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",ud).getRegex(),Lj=ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",VS).getRegex(),ky={blockquote:Lj,code:kj,def:Tj,fences:bj,heading:vj,hr:dc,html:Bj,lheading:US,list:_j,newline:Cj,paragraph:VS,table:$l,text:Sj},uk=ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",dc).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",ud).getRegex(),Ej={...ky,lheading:wj,table:uk,paragraph:ue(yy).replace("hr",dc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",uk).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",ud).getRegex()},Aj={...ky,html:ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cy).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:$l,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ue(yy).replace("hr",dc).replace("heading",` *#{1,6} *[^
227
+ ]`).replace("lheading",US).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Fj=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Mj=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,YS=/^( {2,}|\\)\n(?!\s*$)/,Ij=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,dd=/[\p{P}\p{S}]/u,by=/[\s\p{P}\p{S}]/u,GS=/[^\s\p{P}\p{S}]/u,Pj=ue(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,by).getRegex(),XS=/(?!~)[\p{P}\p{S}]/u,Oj=/(?!~)[\s\p{P}\p{S}]/u,Dj=/(?:[^\s\p{P}\p{S}]|~)/u,Rj=ue(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",xj?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),QS=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$j=ue(QS,"u").replace(/punct/g,dd).getRegex(),zj=ue(QS,"u").replace(/punct/g,XS).getRegex(),KS="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Nj=ue(KS,"gu").replace(/notPunctSpace/g,GS).replace(/punctSpace/g,by).replace(/punct/g,dd).getRegex(),jj=ue(KS,"gu").replace(/notPunctSpace/g,Dj).replace(/punctSpace/g,Oj).replace(/punct/g,XS).getRegex(),Wj=ue("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,GS).replace(/punctSpace/g,by).replace(/punct/g,dd).getRegex(),qj=ue(/\\(punct)/,"gu").replace(/punct/g,dd).getRegex(),Hj=ue(/^<(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(),Uj=ue(Cy).replace("(?:-->|$)","-->").getRegex(),Vj=ue("^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",Uj).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ou=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Yj=ue(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ou).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ZS=ue(/^!?\[(label)\]\[(ref)\]/).replace("label",Ou).replace("ref",xy).getRegex(),JS=ue(/^!?\[(ref)\](?:\[\])?/).replace("ref",xy).getRegex(),Gj=ue("reflink|nolink(?!\\()","g").replace("reflink",ZS).replace("nolink",JS).getRegex(),dk=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vy={_backpedal:$l,anyPunctuation:qj,autolink:Hj,blockSkip:Rj,br:YS,code:Mj,del:$l,emStrongLDelim:$j,emStrongRDelimAst:Nj,emStrongRDelimUnd:Wj,escape:Fj,link:Yj,nolink:JS,punctuation:Pj,reflink:ZS,reflinkSearch:Gj,tag:Vj,text:Ij,url:$l},Xj={...vy,link:ue(/^!?\[(label)\]\((.*?)\)/).replace("label",Ou).getRegex(),reflink:ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ou).getRegex()},jg={...vy,emStrongRDelimAst:jj,emStrongLDelim:zj,url:ue(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dk).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:ue(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dk).getRegex()},Qj={...jg,br:ue(YS).replace("{2,}","*").getRegex(),text:ue(jg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Dh={normal:ky,gfm:Ej,pedantic:Aj},ml={normal:vy,gfm:jg,breaks:Qj,pedantic:Xj},Kj={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fk=e=>Kj[e];function Hi(e,t){if(t){if(vr.escapeTest.test(e))return e.replace(vr.escapeReplace,fk)}else if(vr.escapeTestNoEncode.test(e))return e.replace(vr.escapeReplaceNoEncode,fk);return e}function pk(e){try{e=encodeURI(e).replace(vr.percentDecode,"%")}catch{return null}return e}function gk(e,t){var s;let r=e.replace(vr.findPipe,(a,c,h)=>{let u=!1,d=c;for(;--d>=0&&h[d]==="\\";)u=!u;return u?"|":" |"}),i=r.split(vr.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(vr.slashPipe,"|");return i}function yl(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function Zj(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function mk(e,t,r,i,n){let s=t.href,a=t.title||null,c=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:c,tokens:i.inlineTokens(c)};return i.state.inLink=!1,h}function Jj(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
228
+ `).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[c]=a;return c.length>=n.length?s.slice(n.length):s}).join(`
229
+ `)}var Du=class{constructor(t){pe(this,"options");pe(this,"rules");pe(this,"lexer");this.options=t||Jo}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:yl(i,`
230
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=Jj(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=yl(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:yl(r[0],`
231
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=yl(r[0],`
232
+ `).split(`
233
+ `),n="",s="",a=[];for(;i.length>0;){let c=!1,h=[],u;for(u=0;u<i.length;u++)if(this.rules.other.blockquoteStart.test(i[u]))h.push(i[u]),c=!0;else if(!c)h.push(i[u]);else break;i=i.slice(u);let d=h.join(`
234
+ `),f=d.replace(this.rules.other.blockquoteSetextReplace,`
235
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
236
+ ${d}`:d,s=s?`${s}
237
+ ${f}`:f;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,a,!0),this.lexer.state.top=m,i.length===0)break;let g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let x=g,C=x.raw+`
238
+ `+i.join(`
239
+ `),k=this.blockquote(C);a[a.length-1]=k,n=n.substring(0,n.length-x.raw.length)+k.raw,s=s.substring(0,s.length-x.text.length)+k.text;break}else if((g==null?void 0:g.type)==="list"){let x=g,C=x.raw+`
240
+ `+i.join(`
241
+ `),k=this.list(C);a[a.length-1]=k,n=n.substring(0,n.length-g.raw.length)+k.raw,s=s.substring(0,s.length-x.raw.length)+k.raw,i=C.substring(a.at(-1).raw.length).split(`
242
+ `);continue}}return{type:"blockquote",raw:n,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let a=this.rules.other.listItemRegex(i),c=!1;for(;t;){let u=!1,d="",f="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;d=r[0],t=t.substring(d.length);let m=r[2].split(`
243
+ `,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),g=t.split(`
244
+ `,1)[0],x=!m.trim(),C=0;if(this.options.pedantic?(C=2,f=m.trimStart()):x?C=r[1].length+1:(C=r[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,f=m.slice(C),C+=r[1].length),x&&this.rules.other.blankLine.test(g)&&(d+=g+`
245
+ `,t=t.substring(g.length+1),u=!0),!u){let T=this.rules.other.nextBulletRegex(C),B=this.rules.other.hrRegex(C),M=this.rules.other.fencesBeginRegex(C),O=this.rules.other.headingBeginRegex(C),F=this.rules.other.htmlBeginRegex(C);for(;t;){let E=t.split(`
246
+ `,1)[0],z;if(g=E,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),z=g):z=g.replace(this.rules.other.tabCharGlobal," "),M.test(g)||O.test(g)||F.test(g)||T.test(g)||B.test(g))break;if(z.search(this.rules.other.nonSpaceChar)>=C||!g.trim())f+=`
247
+ `+z.slice(C);else{if(x||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||M.test(m)||O.test(m)||B.test(m))break;f+=`
248
+ `+g}!x&&!g.trim()&&(x=!0),d+=E+`
249
+ `,t=t.substring(E.length+1),m=z.slice(C)}}s.loose||(c?s.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let k=null,v;this.options.gfm&&(k=this.rules.other.listIsTask.exec(f),k&&(v=k[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:d,task:!!k,checked:v,loose:!1,text:f,tokens:[]}),s.raw+=d}let h=s.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let u=0;u<s.items.length;u++)if(this.lexer.state.top=!1,s.items[u].tokens=this.lexer.blockTokens(s.items[u].text,[]),!s.loose){let d=s.items[u].tokens.filter(m=>m.type==="space"),f=d.length>0&&d.some(m=>this.rules.other.anyLine.test(m.raw));s.loose=f}if(s.loose)for(let u=0;u<s.items.length;u++)s.items[u].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:s}}}table(t){var c;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=gk(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(c=r[3])!=null&&c.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
250
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let h of n)this.rules.other.tableAlignRight.test(h)?a.align.push("right"):this.rules.other.tableAlignCenter.test(h)?a.align.push("center"):this.rules.other.tableAlignLeft.test(h)?a.align.push("left"):a.align.push(null);for(let h=0;h<i.length;h++)a.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:a.align[h]});for(let h of s)a.rows.push(gk(h,a.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[d]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);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(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
251
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);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(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=yl(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=Zj(r[2],"()");if(a===-2)return;if(a>-1){let c=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,c).trim(),r[3]=""}}let n=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),mk(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[n.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return mk(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...n[0]].length-1,a,c,h=s,u=0,d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*t.length+s);(n=d.exec(r))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(c=[...a].length,n[3]||n[4]){h+=c;continue}else if((n[5]||n[6])&&s%3&&!((s+c)%3)){u+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+u);let f=[...n[0]][0].length,m=t.slice(0,s+n.index+f+c);if(Math.min(s,c)%2){let x=m.slice(1,-1);return{type:"em",raw:m,text:x,tokens:this.lexer.inlineTokens(x)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let n,s;if(r[2]==="@")n=r[0],s="mailto:"+n;else{let a;do a=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(a!==r[0]);n=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},_i=class Wg{constructor(t){pe(this,"tokens");pe(this,"options");pe(this,"state");pe(this,"tokenizer");pe(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Jo,this.options.tokenizer=this.options.tokenizer||new Du,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:vr,block:Dh.normal,inline:ml.normal};this.options.pedantic?(r.block=Dh.pedantic,r.inline=ml.pedantic):this.options.gfm&&(r.block=Dh.gfm,this.options.breaks?r.inline=ml.breaks:r.inline=ml.gfm),this.tokenizer.rules=r}static get rules(){return{block:Dh,inline:ml}}static lex(t,r){return new Wg(r).lex(t)}static lexInline(t,r){return new Wg(r).inlineTokens(t)}lex(t){t=t.replace(vr.carriageReturn,`
252
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var n,s,a;for(this.options.pedantic&&(t=t.replace(vr.tabCharGlobal," ").replace(vr.spaceLine,""));t;){let c;if((s=(n=this.options.extensions)==null?void 0:n.block)!=null&&s.some(u=>(c=u.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let u=r.at(-1);c.raw.length===1&&u!==void 0?u.raw+=`
253
+ `:r.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let u=r.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
254
+ `)?"":`
255
+ `)+c.raw,u.text+=`
256
+ `+c.text,this.inlineQueue.at(-1).src=u.text):r.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let u=r.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
257
+ `)?"":`
258
+ `)+c.raw,u.text+=`
259
+ `+c.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},r.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),r.push(c);continue}let h=t;if((a=this.options.extensions)!=null&&a.startBlock){let u=1/0,d=t.slice(1),f;this.options.extensions.startBlock.forEach(m=>{f=m.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(h=t.substring(0,u+1))}if(this.state.top&&(c=this.tokenizer.paragraph(h))){let u=r.at(-1);i&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(`
260
+ `)?"":`
261
+ `)+c.raw,u.text+=`
262
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):r.push(c),i=h.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let u=r.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
263
+ `)?"":`
264
+ `)+c.raw,u.text+=`
265
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):r.push(c);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var h,u,d,f,m;let i=t,n=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)g.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=n[2]?n[2].length:0,i=i.slice(0,n.index+s)+"["+"a".repeat(n[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((u=(h=this.options.hooks)==null?void 0:h.emStrongMask)==null?void 0:u.call({lexer:this},i))??i;let a=!1,c="";for(;t;){a||(c=""),a=!1;let g;if((f=(d=this.options.extensions)==null?void 0:d.inline)!=null&&f.some(C=>(g=C.call({lexer:this},t,r))?(t=t.substring(g.raw.length),r.push(g),!0):!1))continue;if(g=this.tokenizer.escape(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.tag(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.link(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(g.raw.length);let C=r.at(-1);g.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=g.raw,C.text+=g.text):r.push(g);continue}if(g=this.tokenizer.emStrong(t,i,c)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.codespan(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.br(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.del(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.autolink(t)){t=t.substring(g.raw.length),r.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(t))){t=t.substring(g.raw.length),r.push(g);continue}let x=t;if((m=this.options.extensions)!=null&&m.startInline){let C=1/0,k=t.slice(1),v;this.options.extensions.startInline.forEach(T=>{v=T.call({lexer:this},k),typeof v=="number"&&v>=0&&(C=Math.min(C,v))}),C<1/0&&C>=0&&(x=t.substring(0,C+1))}if(g=this.tokenizer.inlineText(x)){t=t.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(c=g.raw.slice(-1)),a=!0;let C=r.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=g.raw,C.text+=g.text):r.push(g);continue}if(t){let C="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return r}},Ru=class{constructor(t){pe(this,"options");pe(this,"parser");this.options=t||Jo}space(t){return""}code({text:t,lang:r,escaped:i}){var a;let n=(a=(r||"").match(vr.notSpaceStart))==null?void 0:a[0],s=t.replace(vr.endingNewline,"")+`
266
+ `;return n?'<pre><code class="language-'+Hi(n)+'">'+(i?s:Hi(s,!0))+`</code></pre>
267
+ `:"<pre><code>"+(i?s:Hi(s,!0))+`</code></pre>
268
+ `}blockquote({tokens:t}){return`<blockquote>
269
+ ${this.parser.parse(t)}</blockquote>
270
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
271
+ `}hr(t){return`<hr>
272
+ `}list(t){let r=t.ordered,i=t.start,n="";for(let c=0;c<t.items.length;c++){let h=t.items[c];n+=this.listitem(h)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
273
+ `+n+"</"+s+`>
274
+ `}listitem(t){var i;let r="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+Hi(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
275
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
276
+ `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let n="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let c=0;c<a.length;c++)i+=this.tablecell(a[c]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
277
+ <thead>
278
+ `+r+`</thead>
279
+ `+n+`</table>
280
+ `}tablerow({text:t}){return`<tr>
281
+ ${t}</tr>
282
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
283
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Hi(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),s=pk(t);if(s===null)return n;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+Hi(r)+'"'),a+=">"+n+"</a>",a}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let s=pk(t);if(s===null)return Hi(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Hi(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Hi(t.text)}},wy=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Bi=class qg{constructor(t){pe(this,"options");pe(this,"renderer");pe(this,"textRenderer");this.options=t||Jo,this.options.renderer=this.options.renderer||new Ru,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wy}static parse(t,r){return new qg(r).parse(t)}static parseInline(t,r){return new qg(r).parseInline(t)}parse(t,r=!0){var n,s;let i="";for(let a=0;a<t.length;a++){let c=t[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[c.type]){let u=c,d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){i+=d||"";continue}}let h=c;switch(h.type){case"space":{i+=this.renderer.space(h);continue}case"hr":{i+=this.renderer.hr(h);continue}case"heading":{i+=this.renderer.heading(h);continue}case"code":{i+=this.renderer.code(h);continue}case"table":{i+=this.renderer.table(h);continue}case"blockquote":{i+=this.renderer.blockquote(h);continue}case"list":{i+=this.renderer.list(h);continue}case"html":{i+=this.renderer.html(h);continue}case"def":{i+=this.renderer.def(h);continue}case"paragraph":{i+=this.renderer.paragraph(h);continue}case"text":{let u=h,d=this.renderer.text(u);for(;a+1<t.length&&t[a+1].type==="text";)u=t[++a],d+=`
284
+ `+this.renderer.text(u);r?i+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):i+=d;continue}default:{let u='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return i}parseInline(t,r=this.renderer){var n,s;let i="";for(let a=0;a<t.length;a++){let c=t[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[c.type]){let u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){i+=u||"";continue}}let h=c;switch(h.type){case"escape":{i+=r.text(h);break}case"html":{i+=r.html(h);break}case"link":{i+=r.link(h);break}case"image":{i+=r.image(h);break}case"strong":{i+=r.strong(h);break}case"em":{i+=r.em(h);break}case"codespan":{i+=r.codespan(h);break}case"br":{i+=r.br(h);break}case"del":{i+=r.del(h);break}case"text":{i+=r.text(h);break}default:{let u='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return i}},Wh,_l=(Wh=class{constructor(t){pe(this,"options");pe(this,"block");this.options=t||Jo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?_i.lex:_i.lexInline}provideParser(){return this.block?Bi.parse:Bi.parseInline}},pe(Wh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),pe(Wh,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Wh),t9=class{constructor(...t){pe(this,"defaults",gy());pe(this,"options",this.setOptions);pe(this,"parse",this.parseMarkdown(!0));pe(this,"parseInline",this.parseMarkdown(!1));pe(this,"Parser",Bi);pe(this,"Renderer",Ru);pe(this,"TextRenderer",wy);pe(this,"Lexer",_i);pe(this,"Tokenizer",Du);pe(this,"Hooks",_l);this.use(...t)}walkTokens(t,r){var n,s;let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let c=a;for(let h of c.header)i=i.concat(this.walkTokens(h.tokens,r));for(let h of c.rows)for(let u of h)i=i.concat(this.walkTokens(u.tokens,r));break}case"list":{let c=a;i=i.concat(this.walkTokens(c.items,r));break}default:{let c=a;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[c.type]?this.defaults.extensions.childTokens[c.type].forEach(h=>{let u=c[h].flat(1/0);i=i.concat(this.walkTokens(u,r))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...c){let h=s.renderer.apply(this,c);return h===!1&&(h=a.apply(this,c)),h}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),n.extensions=r),i.renderer){let s=this.defaults.renderer||new Ru(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,h=i.renderer[c],u=s[c];s[c]=(...d)=>{let f=h.apply(s,d);return f===!1&&(f=u.apply(s,d)),f||""}}n.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Du(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,h=i.tokenizer[c],u=s[c];s[c]=(...d)=>{let f=h.apply(s,d);return f===!1&&(f=u.apply(s,d)),f}}n.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new _l;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,h=i.hooks[c],u=s[c];_l.passThroughHooks.has(a)?s[c]=d=>{if(this.defaults.async&&_l.passThroughHooksRespectAsync.has(a))return(async()=>{let m=await h.call(s,d);return u.call(s,m)})();let f=h.call(s,d);return u.call(s,f)}:s[c]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await h.apply(s,d);return m===!1&&(m=await u.apply(s,d)),m})();let f=h.apply(s,d);return f===!1&&(f=u.apply(s,d)),f}}n.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;n.walkTokens=function(c){let h=[];return h.push(a.call(this,c)),s&&(h=h.concat(s.call(this,c))),h}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return _i.lex(t,r??this.defaults)}parser(t,r){return Bi.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},s={...this.defaults,...n},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let c=s.hooks?await s.hooks.preprocess(r):r,h=await(s.hooks?await s.hooks.provideLexer():t?_i.lex:_i.lexInline)(c,s),u=s.hooks?await s.hooks.processAllTokens(h):h;s.walkTokens&&await Promise.all(this.walkTokens(u,s.walkTokens));let d=await(s.hooks?await s.hooks.provideParser():t?Bi.parse:Bi.parseInline)(u,s);return s.hooks?await s.hooks.postprocess(d):d})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let c=(s.hooks?s.hooks.provideLexer():t?_i.lex:_i.lexInline)(r,s);s.hooks&&(c=s.hooks.processAllTokens(c)),s.walkTokens&&this.walkTokens(c,s.walkTokens);let h=(s.hooks?s.hooks.provideParser():t?Bi.parse:Bi.parseInline)(c,s);return s.hooks&&(h=s.hooks.postprocess(h)),h}catch(c){return a(c)}}}onError(t,r){return i=>{if(i.message+=`
285
+ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Hi(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},Yo=new t9;function de(e,t){return Yo.parse(e,t)}de.options=de.setOptions=function(e){return Yo.setOptions(e),de.defaults=Yo.defaults,qS(de.defaults),de};de.getDefaults=gy;de.defaults=Jo;de.use=function(...e){return Yo.use(...e),de.defaults=Yo.defaults,qS(de.defaults),de};de.walkTokens=function(e,t){return Yo.walkTokens(e,t)};de.parseInline=Yo.parseInline;de.Parser=Bi;de.parser=Bi.parse;de.Renderer=Ru;de.TextRenderer=wy;de.Lexer=_i;de.lexer=_i.lex;de.Tokenizer=Du;de.Hooks=_l;de.parse=de;de.options;de.setOptions;de.use;de.walkTokens;de.parseInline;Bi.parse;_i.lex;function tT(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(c,h){var u=h.match(/\n([\t ]+|(?!\s).)/g);return u?c.concat(u.map(function(d){var f,m;return(m=(f=d.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&m!==void 0?m:0})):c},[]);if(n.length){var s=new RegExp(`
286
+ [ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(c){return c.replace(s,`
287
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(c,h){var u=a.match(/(?:^|\n)( *)$/),d=u?u[1]:"",f=c;typeof c=="string"&&c.includes(`
288
+ `)&&(f=String(c).split(`
289
+ `).map(function(m,g){return g===0?m:""+d+m}).join(`
290
+ `)),a+=f+i[h+1]}),a}var e9={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},Hg=new Map,eT=new Map,r9=w(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(lt.debug("Registering icon pack:",t.name),"loader"in t)eT.set(t.name,t.loader);else if("icons"in t)Hg.set(t.name,t.icons);else throw lt.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),rT=w(async(e,t)=>{const r=ij(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=Hg.get(i);if(!n){const a=eT.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await a(),prefix:i},Hg.set(i,n)}catch(c){throw lt.error(c),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=sj(n,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),i9=w(async e=>{try{return await rT(e),!0}catch{return!1}},"isIconAvailable"),fc=w(async(e,t,r)=>{let i;try{i=await rT(e,t==null?void 0:t.fallbackPrefix)}catch(a){lt.error(a),i=e9}const n=fj(i,t),s=yj(mj(n.body),{...n.attributes,...r});return Ii(s,Be())},"getIconSVG");function iT(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
291
+ `).replace(/\n{2,}/g,`
292
+ `);return tT(i)}w(iT,"preprocessMarkdown");function nT(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}w(nT,"nonMarkdownToLines");function oT(e,t={}){const r=iT(e,t),i=de.lexer(r),n=[[]];let s=0;function a(c,h="normal"){c.type==="text"?c.text.split(`
293
+ `).forEach((d,f)=>{f!==0&&(s++,n.push([])),d.split(" ").forEach(m=>{m=m.replace(/&#39;/g,"'"),m&&n[s].push({content:m,type:h})})}):c.type==="strong"||c.type==="em"?c.tokens.forEach(u=>{a(u,c.type)}):c.type==="html"&&n[s].push({content:c.text,type:"normal"})}return w(a,"processNode"),i.forEach(c=>{var h;c.type==="paragraph"?(h=c.tokens)==null||h.forEach(u=>{a(u)}):c.type==="html"?n[s].push({content:c.text,type:"normal"}):n[s].push({content:c.raw,type:"normal"})}),n}w(oT,"markdownToLines");function sT(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}w(sT,"nonMarkdownToHTML");function aT(e,{markdownAutoWrap:t}={}){const r=de.lexer(e);function i(n){var s,a,c;return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${(s=n.tokens)==null?void 0:s.map(i).join("")}</strong>`:n.type==="em"?`<em>${(a=n.tokens)==null?void 0:a.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${(c=n.tokens)==null?void 0:c.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(lt.warn(`Unsupported markdown: ${n.type}`),n.raw)}return w(i,"output"),r.map(i).join("")}w(aT,"markdownToHTML");function lT(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}w(lT,"splitTextToChars");function cT(e,t){const r=lT(t.content);return Sy(e,[],r,t.type)}w(cT,"splitWordToFitWidth");function Sy(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...s]=r,a=[...t,n];return e([{content:a.join(""),type:i}])?Sy(e,a,s,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}w(Sy,"splitWordToFitWidthRecursion");function hT(e,t){if(e.some(({content:r})=>r.includes(`
294
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return $u(e,t)}w(hT,"splitLineToFitWidth");function $u(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(n!==""&&a.push({content:n,type:"normal"}),a.push(s),t(a))return $u(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[c,h]=cT(t,s);r.push([c]),h.content&&e.unshift(h)}return $u(e,t,r)}w($u,"splitLineToFitWidthRecursion");function Ug(e,t){t&&e.attr("style",t)}w(Ug,"applyStyle");var yk=16384;async function uT(e,t,r,i,n=!1,s=Be()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,yk)}px`),a.attr("height",`${Math.min(10*r,yk)}px`);const c=a.append("xhtml:div"),h=jl(t.label)?await $v(t.label.replace(sc.lineBreakRegex,`
295
+ `),s):Ii(t.label,s),u=t.isNode?"nodeLabel":"edgeLabel",d=c.append("span");d.html(h),Ug(d,t.labelStyle),d.attr("class",`${u} ${i}`),Ug(c,t.labelStyle),c.style("display","table-cell"),c.style("white-space","nowrap"),c.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(c.style("max-width",r+"px"),c.style("text-align","center")),c.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&c.attr("class","labelBkg");let f=c.node().getBoundingClientRect();return f.width===r&&(c.style("display","table"),c.style("white-space","break-spaces"),c.style("width",r+"px"),f=c.node().getBoundingClientRect()),a.node()}w(uT,"addHtmlSpan");function fd(e,t,r,i=!1){const n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}w(fd,"createTspan");function dT(e,t,r){const i=e.append("text"),n=fd(i,1,t);pd(n,r);const s=n.node().getComputedTextLength();return i.remove(),s}w(dT,"computeWidthOfText");function n9(e,t,r){var a;const i=e.append("text"),n=fd(i,1,t);pd(n,[{content:r,type:"normal"}]);const s=(a=n.node())==null?void 0:a.getBoundingClientRect();return s&&i.remove(),s}w(n9,"computeDimensionOfText");function fT(e,t,r,i=!1,n=!1){const a=t.append("g"),c=a.insert("rect").attr("class","background").attr("style","stroke: none"),h=a.append("text").attr("y","-10.1");n&&h.attr("text-anchor","middle");let u=0;for(const d of r){const f=w(g=>dT(a,1.1,g)<=e,"checkWidth"),m=f(d)?[d]:hT(d,f);for(const g of m){const x=fd(h,u,1.1,n);pd(x,g),u++}}if(i){const d=h.node().getBBox(),f=2;return c.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),a.node()}else return h.node()}w(fT,"createFormattedText");function Vg(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}w(Vg,"decodeHTMLEntities");function pd(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(Vg(r.content)):n.text(" "+Vg(r.content))})}w(pd,"updateTextContentAndStyles");async function pT(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,s,a)=>(r.push((async()=>{const c=`${s}:${a}`;return await i9(c)?await fc(c,void 0,{class:"label-icon"}):`<i class='${Ii(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}w(pT,"replaceIconSubstring");var Tn=w(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:s=!0,markdown:a=!0,isNode:c=!0,width:h=200,addSvgBackground:u=!1}={},d)=>{if(lt.debug("XYZ createText",t,r,i,n,s,c,"addSvgBackground: ",u),s){const f=a?aT(t,d):sT(t),m=await pT(Vo(f),d),g=t.replace(/\\\\/g,"\\"),x={isNode:c,label:jl(t)?g:m,labelStyle:r.replace("fill:","color:")};return await uT(e,x,h,n,u,d)}else{const f=Vo(t.replace(/<br\s*\/?>/g,"<br/>")),m=a?oT(f.replace("<br>","<br/>"),d):nT(f),g=fT(h,e,m,t?u:!1,!c);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Qt(g).attr("style",x)}else{const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Qt(g).select("rect").attr("style",x.replace(/background:/g,"fill:"));const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Qt(g).select("text").attr("style",C)}return i?Qt(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Qt(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText");function Dp(e,t,r){if(e&&e.length){const[i,n]=t,s=Math.PI/180*r,a=Math.cos(s),c=Math.sin(s);for(const h of e){const[u,d]=h;h[0]=(u-i)*a-(d-n)*c+i,h[1]=(u-i)*c+(d-n)*a+n}}}function o9(e,t){return e[0]===t[0]&&e[1]===t[1]}function s9(e,t,r,i=1){const n=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,c=[0,0];if(n)for(const u of a)Dp(u,c,n);const h=(function(u,d,f){const m=[];for(const T of u){const B=[...T];o9(B[0],B[B.length-1])||B.push([B[0][0],B[0][1]]),B.length>2&&m.push(B)}const g=[];d=Math.max(d,.1);const x=[];for(const T of m)for(let B=0;B<T.length-1;B++){const M=T[B],O=T[B+1];if(M[1]!==O[1]){const F=Math.min(M[1],O[1]);x.push({ymin:F,ymax:Math.max(M[1],O[1]),x:F===M[1]?M[0]:O[0],islope:(O[0]-M[0])/(O[1]-M[1])})}}if(x.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))),!x.length)return g;let C=[],k=x[0].ymin,v=0;for(;C.length||x.length;){if(x.length){let T=-1;for(let B=0;B<x.length&&!(x[B].ymin>k);B++)T=B;x.splice(0,T+1).forEach((B=>{C.push({s:k,edge:B})}))}if(C=C.filter((T=>!(T.edge.ymax<=k))),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))),(f!==1||v%d==0)&&C.length>1)for(let T=0;T<C.length;T+=2){const B=T+1;if(B>=C.length)break;const M=C[T].edge,O=C[B].edge;g.push([[Math.round(M.x),k],[Math.round(O.x),k]])}k+=f,C.forEach((T=>{T.edge.x=T.edge.x+f*T.edge.islope})),v++}return g})(a,s,i);if(n){for(const u of a)Dp(u,c,-n);(function(u,d,f){const m=[];u.forEach((g=>m.push(...g))),Dp(m,d,f)})(h,c,-n)}return h}function pc(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=n),s9(e,n,i,s||1)}class Ty{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=pc(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function gd(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class a9 extends Ty{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=pc(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],c=.5*i*Math.cos(s),h=.5*i*Math.sin(s);for(const[u,d]of n)gd([u,d])&&a.push([[u[0]-c,u[1]+h],[...d]],[[u[0]+c,u[1]-h],[...d]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class l9 extends Ty{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,n);return i.ops=i.ops.concat(s.ops),i}}class c9{constructor(t){this.helper=t}fillPolygons(t,r){const i=pc(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=n/4;for(const c of t){const h=gd(c),u=h/n,d=Math.ceil(u)-1,f=h-d*n,m=(c[0][0]+c[1][0])/2-n/4,g=Math.min(c[0][1],c[1][1]);for(let x=0;x<d;x++){const C=g+f+x*n,k=m-a+2*Math.random()*a,v=C-a+2*Math.random()*a,T=this.helper.ellipse(k,v,s,s,r);i.push(...T.ops)}}return{type:"fillSketch",ops:i}}}let h9=class{constructor(t){this.helper=t}fillPolygons(t,r){const i=pc(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const c=gd(a),h=Math.floor(c/(i+n)),u=(c+n-h*(i+n))/2;let d=a[0],f=a[1];d[0]>f[0]&&(d=a[1],f=a[0]);const m=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let g=0;g<h;g++){const x=g*(i+n),C=x+i,k=[d[0]+x*Math.cos(m)+u*Math.cos(m),d[1]+x*Math.sin(m)+u*Math.sin(m)],v=[d[0]+C*Math.cos(m)+u*Math.cos(m),d[1]+C*Math.sin(m)+u*Math.sin(m)];s.push(...this.helper.doubleLineOps(k[0],k[1],v[0],v[1],r))}})),s}};class u9{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,s=pc(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(s,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((s=>{const a=gd(s),c=Math.round(a/(2*r));let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<c;f++){const m=2*f*r,g=2*(f+1)*r,x=Math.sqrt(2*Math.pow(r,2)),C=[h[0]+m*Math.cos(d),h[1]+m*Math.sin(d)],k=[h[0]+g*Math.cos(d),h[1]+g*Math.sin(d)],v=[C[0]+x*Math.cos(d+Math.PI/4),C[1]+x*Math.sin(d+Math.PI/4)];n.push(...this.helper.doubleLineOps(C[0],C[1],v[0],v[1],i),...this.helper.doubleLineOps(v[0],v[1],k[0],k[1],i))}})),n}}const Ir={};class d9{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const f9=0,Rp=1,xk=2,Rh={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 $p(e,t){return e.type===t}function _y(e){const t=[],r=(function(a){const c=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))c[c.length]={type:f9,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];c[c.length]={type:Rp,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return c[c.length]={type:xk,text:""},c})(e);let i="BOD",n=0,s=r[n];for(;!$p(s,xk);){let a=0;const c=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return _y("M0,0"+e);n++,a=Rh[s.text],i=s.text}else $p(s,Rp)?a=Rh[i]:(n++,a=Rh[s.text],i=s.text);if(!(n+a<r.length))throw new Error("Path data ended short");for(let h=n;h<n+a;h++){const u=r[h];if(!$p(u,Rp))throw new Error("Param not a number: "+i+","+u.text);c[c.length]=+u.text}if(typeof Rh[i]!="number")throw new Error("Bad segment: "+i);{const h={key:i,data:c};t.push(h),n+=a,s=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function gT(e){let t=0,r=0,i=0,n=0;const s=[];for(const{key:a,data:c}of e)switch(a){case"M":s.push({key:"M",data:[...c]}),[t,r]=c,[i,n]=c;break;case"m":t+=c[0],r+=c[1],s.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":s.push({key:"L",data:[...c]}),[t,r]=c;break;case"l":t+=c[0],r+=c[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...c]}),t=c[4],r=c[5];break;case"c":{const h=c.map(((u,d)=>d%2?u+r:u+t));s.push({key:"C",data:h}),t=h[4],r=h[5];break}case"Q":s.push({key:"Q",data:[...c]}),t=c[2],r=c[3];break;case"q":{const h=c.map(((u,d)=>d%2?u+r:u+t));s.push({key:"Q",data:h}),t=h[2],r=h[3];break}case"A":s.push({key:"A",data:[...c]}),t=c[5],r=c[6];break;case"a":t+=c[5],r+=c[6],s.push({key:"A",data:[c[0],c[1],c[2],c[3],c[4],t,r]});break;case"H":s.push({key:"H",data:[...c]}),t=c[0];break;case"h":t+=c[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...c]}),r=c[0];break;case"v":r+=c[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...c]}),t=c[2],r=c[3];break;case"s":{const h=c.map(((u,d)=>d%2?u+r:u+t));s.push({key:"S",data:h}),t=h[2],r=h[3];break}case"T":s.push({key:"T",data:[...c]}),t=c[0],r=c[1];break;case"t":t+=c[0],r+=c[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=n}return s}function mT(e){const t=[];let r="",i=0,n=0,s=0,a=0,c=0,h=0;for(const{key:u,data:d}of e){switch(u){case"M":t.push({key:"M",data:[...d]}),[i,n]=d,[s,a]=d;break;case"C":t.push({key:"C",data:[...d]}),i=d[4],n=d[5],c=d[2],h=d[3];break;case"L":t.push({key:"L",data:[...d]}),[i,n]=d;break;case"H":i=d[0],t.push({key:"L",data:[i,n]});break;case"V":n=d[0],t.push({key:"L",data:[i,n]});break;case"S":{let f=0,m=0;r==="C"||r==="S"?(f=i+(i-c),m=n+(n-h)):(f=i,m=n),t.push({key:"C",data:[f,m,...d]}),c=d[0],h=d[1],i=d[2],n=d[3];break}case"T":{const[f,m]=d;let g=0,x=0;r==="Q"||r==="T"?(g=i+(i-c),x=n+(n-h)):(g=i,x=n);const C=i+2*(g-i)/3,k=n+2*(x-n)/3,v=f+2*(g-f)/3,T=m+2*(x-m)/3;t.push({key:"C",data:[C,k,v,T,f,m]}),c=g,h=x,i=f,n=m;break}case"Q":{const[f,m,g,x]=d,C=i+2*(f-i)/3,k=n+2*(m-n)/3,v=g+2*(f-g)/3,T=x+2*(m-x)/3;t.push({key:"C",data:[C,k,v,T,g,x]}),c=f,h=m,i=g,n=x;break}case"A":{const f=Math.abs(d[0]),m=Math.abs(d[1]),g=d[2],x=d[3],C=d[4],k=d[5],v=d[6];f===0||m===0?(t.push({key:"C",data:[i,n,k,v,k,v]}),i=k,n=v):(i!==k||n!==v)&&(yT(i,n,k,v,f,m,g,x,C).forEach((function(T){t.push({key:"C",data:T})})),i=k,n=v);break}case"Z":t.push({key:"Z",data:[]}),i=s,n=a}r=u}return t}function xl(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function yT(e,t,r,i,n,s,a,c,h,u){const d=(f=a,Math.PI*f/180);var f;let m=[],g=0,x=0,C=0,k=0;if(u)[g,x,C,k]=u;else{[e,t]=xl(e,t,-d),[r,i]=xl(r,i,-d);const it=(e-r)/2,V=(t-i)/2;let j=it*it/(n*n)+V*V/(s*s);j>1&&(j=Math.sqrt(j),n*=j,s*=j);const q=n*n,Y=s*s,R=q*Y-q*V*V-Y*it*it,J=q*V*V+Y*it*it,I=(c===h?-1:1)*Math.sqrt(Math.abs(R/J));C=I*n*V/s+(e+r)/2,k=I*-s*it/n+(t+i)/2,g=Math.asin(parseFloat(((t-k)/s).toFixed(9))),x=Math.asin(parseFloat(((i-k)/s).toFixed(9))),e<C&&(g=Math.PI-g),r<C&&(x=Math.PI-x),g<0&&(g=2*Math.PI+g),x<0&&(x=2*Math.PI+x),h&&g>x&&(g-=2*Math.PI),!h&&x>g&&(x-=2*Math.PI)}let v=x-g;if(Math.abs(v)>120*Math.PI/180){const it=x,V=r,j=i;x=h&&x>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,m=yT(r=C+n*Math.cos(x),i=k+s*Math.sin(x),V,j,n,s,a,0,h,[x,it,C,k])}v=x-g;const T=Math.cos(g),B=Math.sin(g),M=Math.cos(x),O=Math.sin(x),F=Math.tan(v/4),E=4/3*n*F,z=4/3*s*F,K=[e,t],P=[e+E*B,t-z*T],N=[r+E*O,i-z*M],Z=[r,i];if(P[0]=2*K[0]-P[0],P[1]=2*K[1]-P[1],u)return[P,N,Z].concat(m);{m=[P,N,Z].concat(m);const it=[];for(let V=0;V<m.length;V+=3){const j=xl(m[V][0],m[V][1],d),q=xl(m[V+1][0],m[V+1][1],d),Y=xl(m[V+2][0],m[V+2][1],d);it.push([j[0],j[1],q[0],q[1],Y[0],Y[1]])}return it}}const p9={randOffset:function(e,t){return qt(e,t)},randOffsetWithRange:function(e,t,r){return zu(e,t,r)},ellipse:function(e,t,r,i,n){const s=CT(r,i,n);return Yg(e,t,n,s).opset},doubleLineOps:function(e,t,r,i,n){return lo(e,t,r,i,n,!0)}};function xT(e,t,r,i,n){return{type:"path",ops:lo(e,t,r,i,n)}}function eu(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let s=0;s<i-1;s++)n.push(...lo(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&n.push(...lo(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?xT(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function g9(e,t,r,i,n){return(function(s,a){return eu(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Ck(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=$h(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:$h(r[0],1.5*(1+.22*t.roughness),vk(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const c=$h(a,1*(1+.2*t.roughness),t),h=t.disableMultiStroke?[]:$h(a,1.5*(1+.22*t.roughness),vk(t));for(const u of c)u.op!=="move"&&i.push(u);for(const u of h)u.op!=="move"&&n.push(u)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function CT(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/n;let a=Math.abs(e/2),c=Math.abs(t/2);const h=1-r.curveFitting;return a+=qt(a*h,r),c+=qt(c*h,r),{increment:s,rx:a,ry:c}}function Yg(e,t,r,i){const[n,s]=wk(i.increment,e,t,i.rx,i.ry,1,i.increment*zu(.1,zu(.4,1,r),r),r);let a=Nu(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[c]=wk(i.increment,e,t,i.rx,i.ry,1.5,0,r),h=Nu(c,null,r);a=a.concat(h)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function kk(e,t,r,i,n,s,a,c,h){const u=e,d=t;let f=Math.abs(r/2),m=Math.abs(i/2);f+=qt(.01*f,h),m+=qt(.01*m,h);let g=n,x=s;for(;g<0;)g+=2*Math.PI,x+=2*Math.PI;x-g>2*Math.PI&&(g=0,x=2*Math.PI);const C=2*Math.PI/h.curveStepCount,k=Math.min(C/2,(x-g)/2),v=Sk(k,u,d,f,m,g,x,1,h);if(!h.disableMultiStroke){const T=Sk(k,u,d,f,m,g,x,1.5,h);v.push(...T)}return a&&(c?v.push(...lo(u,d,u+f*Math.cos(g),d+m*Math.sin(g),h),...lo(u,d,u+f*Math.cos(x),d+m*Math.sin(x),h)):v.push({op:"lineTo",data:[u,d]},{op:"lineTo",data:[u+f*Math.cos(g),d+m*Math.sin(g)]})),{type:"path",ops:v}}function bk(e,t){const r=mT(gT(_y(e))),i=[];let n=[0,0],s=[0,0];for(const{key:a,data:c}of r)switch(a){case"M":s=[c[0],c[1]],n=[c[0],c[1]];break;case"L":i.push(...lo(s[0],s[1],c[0],c[1],t)),s=[c[0],c[1]];break;case"C":{const[h,u,d,f,m,g]=c;i.push(...m9(h,u,d,f,m,g,s,t)),s=[m,g];break}case"Z":i.push(...lo(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]]}return{type:"path",ops:i}}function zp(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+qt(n,t),i[0][1]+qt(n,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+qt(n,t),i[a][1]+qt(n,t)]})}}return{type:"fillPath",ops:r}}function Ls(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Ir[n])switch(n){case"zigzag":Ir[n]||(Ir[n]=new a9(i));break;case"cross-hatch":Ir[n]||(Ir[n]=new l9(i));break;case"dots":Ir[n]||(Ir[n]=new c9(i));break;case"dashed":Ir[n]||(Ir[n]=new h9(i));break;case"zigzag-line":Ir[n]||(Ir[n]=new u9(i));break;default:n="hachure",Ir[n]||(Ir[n]=new Ty(i))}return Ir[n]})(t,p9).fillPolygons(e,t)}function vk(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function kT(e){return e.randomizer||(e.randomizer=new d9(e.seed||0)),e.randomizer.next()}function zu(e,t,r,i=1){return r.roughness*i*(kT(r)*(t-e)+e)}function qt(e,t,r=1){return zu(-e,e,t,r)}function lo(e,t,r,i,n,s=!1){const a=s?n.disableMultiStrokeFill:n.disableMultiStroke,c=Gg(e,t,r,i,n,!0,!1);if(a)return c;const h=Gg(e,t,r,i,n,!0,!0);return c.concat(h)}function Gg(e,t,r,i,n,s,a){const c=Math.pow(e-r,2)+Math.pow(t-i,2),h=Math.sqrt(c);let u=1;u=h<200?1:h>500?.4:-.0016668*h+1.233334;let d=n.maxRandomnessOffset||0;d*d*100>c&&(d=h/10);const f=d/2,m=.2+.2*kT(n);let g=n.bowing*n.maxRandomnessOffset*(i-t)/200,x=n.bowing*n.maxRandomnessOffset*(e-r)/200;g=qt(g,n,u),x=qt(x,n,u);const C=[],k=()=>qt(f,n,u),v=()=>qt(d,n,u),T=n.preserveVertices;return a?C.push({op:"move",data:[e+(T?0:k()),t+(T?0:k())]}):C.push({op:"move",data:[e+(T?0:qt(d,n,u)),t+(T?0:qt(d,n,u))]}),a?C.push({op:"bcurveTo",data:[g+e+(r-e)*m+k(),x+t+(i-t)*m+k(),g+e+2*(r-e)*m+k(),x+t+2*(i-t)*m+k(),r+(T?0:k()),i+(T?0:k())]}):C.push({op:"bcurveTo",data:[g+e+(r-e)*m+v(),x+t+(i-t)*m+v(),g+e+2*(r-e)*m+v(),x+t+2*(i-t)*m+v(),r+(T?0:v()),i+(T?0:v())]}),C}function $h(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+qt(t,r),e[0][1]+qt(t,r)]),i.push([e[0][0]+qt(t,r),e[0][1]+qt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+qt(t,r),e[n][1]+qt(t,r)]),n===e.length-1&&i.push([e[n][0]+qt(t,r),e[n][1]+qt(t,r)]);return Nu(i,null,r)}function Nu(e,t,r){const i=e.length,n=[];if(i>3){const s=[],a=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let c=1;c+2<i;c++){const h=e[c];s[0]=[h[0],h[1]],s[1]=[h[0]+(a*e[c+1][0]-a*e[c-1][0])/6,h[1]+(a*e[c+1][1]-a*e[c-1][1])/6],s[2]=[e[c+1][0]+(a*e[c][0]-a*e[c+2][0])/6,e[c+1][1]+(a*e[c][1]-a*e[c+2][1])/6],s[3]=[e[c+1][0],e[c+1][1]],n.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...Gg(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function wk(e,t,r,i,n,s,a,c){const h=[],u=[];if(c.roughness===0){e/=4,u.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let d=0;d<=2*Math.PI;d+=e){const f=[t+i*Math.cos(d),r+n*Math.sin(d)];h.push(f),u.push(f)}u.push([t+i*Math.cos(0),r+n*Math.sin(0)]),u.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const d=qt(.5,c)-Math.PI/2;u.push([qt(s,c)+t+.9*i*Math.cos(d-e),qt(s,c)+r+.9*n*Math.sin(d-e)]);const f=2*Math.PI+d-.01;for(let m=d;m<f;m+=e){const g=[qt(s,c)+t+i*Math.cos(m),qt(s,c)+r+n*Math.sin(m)];h.push(g),u.push(g)}u.push([qt(s,c)+t+i*Math.cos(d+2*Math.PI+.5*a),qt(s,c)+r+n*Math.sin(d+2*Math.PI+.5*a)]),u.push([qt(s,c)+t+.98*i*Math.cos(d+a),qt(s,c)+r+.98*n*Math.sin(d+a)]),u.push([qt(s,c)+t+.9*i*Math.cos(d+.5*a),qt(s,c)+r+.9*n*Math.sin(d+.5*a)])}return[u,h]}function Sk(e,t,r,i,n,s,a,c,h){const u=s+qt(.1,h),d=[];d.push([qt(c,h)+t+.9*i*Math.cos(u-e),qt(c,h)+r+.9*n*Math.sin(u-e)]);for(let f=u;f<=a;f+=e)d.push([qt(c,h)+t+i*Math.cos(f),qt(c,h)+r+n*Math.sin(f)]);return d.push([t+i*Math.cos(a),r+n*Math.sin(a)]),d.push([t+i*Math.cos(a),r+n*Math.sin(a)]),Nu(d,null,h)}function m9(e,t,r,i,n,s,a,c){const h=[],u=[c.maxRandomnessOffset||1,(c.maxRandomnessOffset||1)+.3];let d=[0,0];const f=c.disableMultiStroke?1:2,m=c.preserveVertices;for(let g=0;g<f;g++)g===0?h.push({op:"move",data:[a[0],a[1]]}):h.push({op:"move",data:[a[0]+(m?0:qt(u[0],c)),a[1]+(m?0:qt(u[0],c))]}),d=m?[n,s]:[n+qt(u[g],c),s+qt(u[g],c)],h.push({op:"bcurveTo",data:[e+qt(u[g],c),t+qt(u[g],c),r+qt(u[g],c),i+qt(u[g],c),d[0],d[1]]});return h}function Cl(e){return[...e]}function Tk(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Cl(e[0]),Cl(e[1]),Cl(e[2]),Cl(e[2]));else{const n=[];n.push(e[0],e[0]);for(let c=1;c<e.length;c++)n.push(e[c]),c===e.length-1&&n.push(e[c]);const s=[],a=1-t;i.push(Cl(n[0]));for(let c=1;c+2<n.length;c++){const h=n[c];s[0]=[h[0],h[1]],s[1]=[h[0]+(a*n[c+1][0]-a*n[c-1][0])/6,h[1]+(a*n[c+1][1]-a*n[c-1][1])/6],s[2]=[n[c+1][0]+(a*n[c][0]-a*n[c+2][0])/6,n[c+1][1]+(a*n[c][1]-a*n[c+2][1])/6],s[3]=[n[c+1][0],n[c+1][1]],i.push(s[1],s[2],s[3])}}return i}function ru(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function y9(e,t,r){const i=ru(t,r);if(i===0)return ru(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),ru(e,Mo(t,r,n))}function Mo(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Xg(e,t,r,i){const n=i||[];if((function(c,h){const u=c[h+0],d=c[h+1],f=c[h+2],m=c[h+3];let g=3*d[0]-2*u[0]-m[0];g*=g;let x=3*d[1]-2*u[1]-m[1];x*=x;let C=3*f[0]-2*m[0]-u[0];C*=C;let k=3*f[1]-2*m[1]-u[1];return k*=k,g<C&&(g=C),x<k&&(x=k),g+x})(e,t)<r){const c=e[t+0];n.length?(s=n[n.length-1],a=c,Math.sqrt(ru(s,a))>1&&n.push(c)):n.push(c),n.push(e[t+3])}else{const h=e[t+0],u=e[t+1],d=e[t+2],f=e[t+3],m=Mo(h,u,.5),g=Mo(u,d,.5),x=Mo(d,f,.5),C=Mo(m,g,.5),k=Mo(g,x,.5),v=Mo(C,k,.5);Xg([h,m,C,v],0,r,n),Xg([v,k,x,f],0,r,n)}var s,a;return n}function x9(e,t){return ju(e,0,e.length,t)}function ju(e,t,r,i,n){const s=n||[],a=e[t],c=e[r-1];let h=0,u=1;for(let d=t+1;d<r-1;++d){const f=y9(e[d],a,c);f>h&&(h=f,u=d)}return Math.sqrt(h)>i?(ju(e,t,u+1,i,s),ju(e,u,r,i,s)):(s.length||s.push(a),s.push(c)),s}function Np(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let s=0;s<n;s++)Xg(e,3*s,t,i);return r&&r>0?ju(i,0,i.length,r):i}const Yr="none";class Wu{constructor(t){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=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,s){const a=this._o(s);return this._d("line",[xT(t,r,i,n,a)],a)}rectangle(t,r,i,n,s){const a=this._o(s),c=[],h=g9(t,r,i,n,a);if(a.fill){const u=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];a.fillStyle==="solid"?c.push(zp([u],a)):c.push(Ls([u],a))}return a.stroke!==Yr&&c.push(h),this._d("rectangle",c,a)}ellipse(t,r,i,n,s){const a=this._o(s),c=[],h=CT(i,n,a),u=Yg(t,r,a,h);if(a.fill)if(a.fillStyle==="solid"){const d=Yg(t,r,a,h).opset;d.type="fillPath",c.push(d)}else c.push(Ls([u.estimatedPoints],a));return a.stroke!==Yr&&c.push(u.opset),this._d("ellipse",c,a)}circle(t,r,i,n){const s=this.ellipse(t,r,i,i,n);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[eu(t,!1,i)],i)}arc(t,r,i,n,s,a,c=!1,h){const u=this._o(h),d=[],f=kk(t,r,i,n,s,a,c,!0,u);if(c&&u.fill)if(u.fillStyle==="solid"){const m=Object.assign({},u);m.disableMultiStroke=!0;const g=kk(t,r,i,n,s,a,!0,!1,m);g.type="fillPath",d.push(g)}else d.push((function(m,g,x,C,k,v,T){const B=m,M=g;let O=Math.abs(x/2),F=Math.abs(C/2);O+=qt(.01*O,T),F+=qt(.01*F,T);let E=k,z=v;for(;E<0;)E+=2*Math.PI,z+=2*Math.PI;z-E>2*Math.PI&&(E=0,z=2*Math.PI);const K=(z-E)/T.curveStepCount,P=[];for(let N=E;N<=z;N+=K)P.push([B+O*Math.cos(N),M+F*Math.sin(N)]);return P.push([B+O*Math.cos(z),M+F*Math.sin(z)]),P.push([B,M]),Ls([P],T)})(t,r,i,n,s,a,u));return u.stroke!==Yr&&d.push(f),this._d("arc",d,u)}curve(t,r){const i=this._o(r),n=[],s=Ck(t,i);if(i.fill&&i.fill!==Yr)if(i.fillStyle==="solid"){const a=Ck(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],c=t;if(c.length){const h=typeof c[0][0]=="number"?[c]:c;for(const u of h)u.length<3?a.push(...u):u.length===3?a.push(...Np(Tk([u[0],u[0],u[1],u[2]]),10,(1+i.roughness)/2)):a.push(...Np(Tk(u),10,(1+i.roughness)/2))}a.length&&n.push(Ls([a],i))}return i.stroke!==Yr&&n.push(s),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],s=eu(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(zp([t],i)):n.push(Ls([t],i))),i.stroke!==Yr&&n.push(s),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Yr,a=i.stroke!==Yr,c=!!(i.simplification&&i.simplification<1),h=(function(d,f,m){const g=mT(gT(_y(d))),x=[];let C=[],k=[0,0],v=[];const T=()=>{v.length>=4&&C.push(...Np(v,f)),v=[]},B=()=>{T(),C.length&&(x.push(C),C=[])};for(const{key:O,data:F}of g)switch(O){case"M":B(),k=[F[0],F[1]],C.push(k);break;case"L":T(),C.push([F[0],F[1]]);break;case"C":if(!v.length){const E=C.length?C[C.length-1]:k;v.push([E[0],E[1]])}v.push([F[0],F[1]]),v.push([F[2],F[3]]),v.push([F[4],F[5]]);break;case"Z":T(),C.push([k[0],k[1]])}if(B(),!m)return x;const M=[];for(const O of x){const F=x9(O,m);F.length&&M.push(F)}return M})(t,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),u=bk(t,i);if(s)if(i.fillStyle==="solid")if(h.length===1){const d=bk(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else n.push(zp(h,i));else n.push(Ls(h,i));return a&&(c?h.forEach((d=>{n.push(eu(d,!1,i))})):n.push(u)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const s=typeof r=="number"&&r>=0?n.data.map((a=>+a.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Yr};break;case"fillPath":a={d:this.opsToPath(s),stroke:Yr,strokeWidth:0,fill:i.fill||Yr};break;case"fillSketch":a=this.fillSketch(s,i)}a&&n.push(a)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Yr,strokeWidth:i,fill:Yr}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class C9{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Wu(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,a,s),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const c=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,a,s,c),n.restore();break}case"fillSketch":this.fillSketch(n,a,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((c=>+c.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,s){const a=this.gen.line(t,r,i,n,s);return this.draw(a),a}rectangle(t,r,i,n,s){const a=this.gen.rectangle(t,r,i,n,s);return this.draw(a),a}ellipse(t,r,i,n,s){const a=this.gen.ellipse(t,r,i,n,s);return this.draw(a),a}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,s,a,c=!1,h){const u=this.gen.arc(t,r,i,n,s,a,c,h);return this.draw(u),u}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const zh="http://www.w3.org/2000/svg";class k9{constructor(t,r){this.svg=t,this.gen=new Wu(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,s=n.createElementNS(zh,"g"),a=t.options.fixedDecimalPlaceDigits;for(const c of r){let h=null;switch(c.type){case"path":h=n.createElementNS(zh,"path"),h.setAttribute("d",this.opsToPath(c,a)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=n.createElementNS(zh,"path"),h.setAttribute("d",this.opsToPath(c,a)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(n,c,i)}h&&s.appendChild(h)}return s}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const s=t.createElementNS(zh,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",n+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,s){const a=this.gen.line(t,r,i,n,s);return this.draw(a)}rectangle(t,r,i,n,s){const a=this.gen.rectangle(t,r,i,n,s);return this.draw(a)}ellipse(t,r,i,n,s){const a=this.gen.ellipse(t,r,i,n,s);return this.draw(a)}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,s,a,c=!1,h){const u=this.gen.arc(t,r,i,n,s,a,c,h);return this.draw(u)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Tt={canvas:(e,t)=>new C9(e,t),svg:(e,t)=>new k9(e,t),generator:e=>new Wu(e),newSeed:()=>Wu.newSeed()},Wt=w(async(e,t,r)=>{var g,x;let i;const n=t.useHtmlLabels||wn((g=he())==null?void 0:g.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",Qe(t.labelStyle));let c;t.label===void 0?c="":c=typeof t.label=="string"?t.label:t.label[0];const h=!!t.icon||!!t.img,u=t.labelType==="markdown",d=await Tn(a,Ii(Vo(c),he()),{useHtmlLabels:n,width:t.width||((x=he().flowchart)==null?void 0:x.wrappingWidth),classes:u?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:h,markdown:u},he());let f=d.getBBox();const m=((t==null?void 0:t.padding)??0)/2;if(n){const C=d.children[0],k=Qt(d);await NS(C,c),f=C.getBoundingClientRect(),k.attr("width",f.width),k.attr("height",f.height)}return n?a.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):a.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:f,halfPadding:m,label:a}},"labelHelper"),jp=w(async(e,t,r)=>{var h,u;const i=r.useHtmlLabels??Tr(he()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Tn(n,Ii(Vo(t),he()),{useHtmlLabels:i,width:r.width||((u=(h=he())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=s.getBBox();const c=r.padding/2;if(Tr(he())){const d=s.children[0],f=Qt(s);a=d.getBoundingClientRect(),f.attr("width",a.width),f.attr("height",a.height)}return i?n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):n.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:c,label:n}},"insertLabel"),Et=w((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),jt=w((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ne(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}w(ne,"createPathFromPoints");function co(e,t,r,i,n,s){const a=[],h=r-e,u=i-t,d=h/s,f=2*Math.PI/d,m=t+u/2;for(let g=0;g<=50;g++){const x=g/50,C=e+x*h,k=m+n*Math.sin(f*(C-e));a.push({x:C,y:k})}return a}w(co,"generateFullSineWavePoints");function Zl(e,t,r,i,n,s){const a=[],c=n*Math.PI/180,d=(s*Math.PI/180-c)/(i-1);for(let f=0;f<i;f++){const m=c+f*d,g=e+r*Math.cos(m),x=t+r*Math.sin(m);a.push({x:-g,y:-x})}return a}w(Zl,"generateCirclePoints");function Qg(e){const t=Array.from(e.childNodes).filter(h=>h.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(h=>h.getAttribute("d")).filter(h=>h!==null).join(" ");r.setAttribute("d",i);const n=t.find(h=>h.getAttribute("fill")!=="none"),s=t.find(h=>h.getAttribute("stroke")!=="none"),a=w((h,u)=>(h==null?void 0:h.getAttribute(u))??void 0,"getAttr");if(n){const h={fill:a(n,"fill"),"fill-opacity":a(n,"fill-opacity")??"1"};Object.entries(h).forEach(([u,d])=>{d&&r.setAttribute(u,d)})}if(s){const h={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(h).forEach(([u,d])=>{d&&r.setAttribute(u,d)})}const c=document.createElementNS("http://www.w3.org/2000/svg","g");return c.appendChild(r),c}w(Qg,"mergePaths");var b9=w((e,t)=>{var r=e.x,i=e.y,n=t.x-r,s=t.y-i,a=e.width/2,c=e.height/2,h,u;return Math.abs(s)*a>Math.abs(n)*c?(s<0&&(c=-c),h=s===0?0:c*n/s,u=c):(n<0&&(a=-a),h=a,u=n===0?0:a*s/n),{x:r+h,y:i+u}},"intersectRect"),ga=b9,v9=w(async(e,t,r,i=!1,n=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=he(),c=Tr(a);return await Tn(e,s,{style:r,isTitle:i,useHtmlLabels:c,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},a)},"createLabel"),ro=v9,fo=w((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),bT=w(async(e,t)=>{lt.info("Creating subgraph rect for ",t.id,t);const r=he(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:c,nodeStyles:h,borderStyles:u,backgroundStyles:d}=Lt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),m=Tr(r),g=f.insert("g").attr("class","cluster-label ");let x;t.labelType==="markdown"?x=await Tn(g,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}):x=await ro(g,t.label,t.labelStyle||"",!1,!0);let C=x.getBBox();if(Tr(r)){const E=x.children[0],z=Qt(x);C=E.getBoundingClientRect(),z.attr("width",C.width),z.attr("height",C.height)}const k=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const v=t.height,T=t.x-k/2,B=t.y-v/2;lt.trace("Data ",t,JSON.stringify(t));let M;if(t.look==="handDrawn"){const E=Tt.svg(f),z=Bt(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:n}),K=E.path(fo(T,B,k,v,0),z);M=f.insert(()=>(lt.debug("Rough node insert CXC",K),K),":first-child"),M.select("path:nth-child(2)").attr("style",u.join(";")),M.select("path").attr("style",d.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),M.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",B).attr("width",k).attr("height",v);const{subGraphTitleTopMargin:O}=py(r);if(g.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+O})`),c){const E=g.select("span");E&&E.attr("style",c)}const F=M.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=C.height-t.padding/2,t.intersect=function(E){return ga(t,E)},{cluster:f,labelBBox:C}},"rect"),w9=w((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),n=0*t.padding,s=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(c){return ga(t,c)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),S9=w(async(e,t)=>{const r=he(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:c,nodeBorder:h}=i,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),d=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label");let m=u.append("rect");const g=await ro(f,t.label,t.labelStyle,void 0,!0);let x=g.getBBox();if(Tr(r)){const K=g.children[0],P=Qt(g);x=K.getBoundingClientRect(),P.attr("width",x.width),P.attr("height",x.height)}const C=0*t.padding,k=C/2,v=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+C;t.width<=x.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height+C,B=t.height+C-x.height-6,M=t.x-v/2,O=t.y-T/2;t.width=v;const F=t.y-t.height/2-k+x.height+2;let E;if(t.look==="handDrawn"){const K=t.cssClasses.includes("statediagram-cluster-alt"),P=Tt.svg(u),N=t.rx||t.ry?P.path(fo(M,O,v,T,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:n}):P.rectangle(M,O,v,T,{seed:n});E=u.insert(()=>N,":first-child");const Z=P.rectangle(M,F,v,B,{fill:K?s:a,fillStyle:K?"hachure":"solid",stroke:h,seed:n});E=u.insert(()=>N,":first-child"),m=u.insert(()=>Z)}else E=d.insert("rect",":first-child"),E.attr("class","outer").attr("x",M).attr("y",O).attr("width",v).attr("height",T).attr("data-look",t.look),m.attr("class","inner").attr("x",M).attr("y",F).attr("width",v).attr("height",B);f.attr("transform",`translate(${t.x-x.width/2}, ${O+1-(Tr(r)?0:3)})`);const z=E.node().getBBox();return t.height=z.height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(K){return ga(t,K)},{cluster:u,labelBBox:x}},"roundedWithTitle"),T9=w(async(e,t)=>{lt.info("Creating subgraph rect for ",t.id,t);const r=he(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:c,nodeStyles:h,borderStyles:u,backgroundStyles:d}=Lt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),m=Tr(r),g=f.insert("g").attr("class","cluster-label "),x=await Tn(g,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width});let C=x.getBBox();if(Tr(r)){const E=x.children[0],z=Qt(x);C=E.getBoundingClientRect(),z.attr("width",C.width),z.attr("height",C.height)}const k=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const v=t.height,T=t.x-k/2,B=t.y-v/2;lt.trace("Data ",t,JSON.stringify(t));let M;if(t.look==="handDrawn"){const E=Tt.svg(f),z=Bt(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:n}),K=E.path(fo(T,B,k,v,t.rx),z);M=f.insert(()=>(lt.debug("Rough node insert CXC",K),K),":first-child"),M.select("path:nth-child(2)").attr("style",u.join(";")),M.select("path").attr("style",d.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),M.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",B).attr("width",k).attr("height",v);const{subGraphTitleTopMargin:O}=py(r);if(g.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+O})`),c){const E=g.select("span");E&&E.attr("style",c)}const F=M.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=C.height-t.padding/2,t.intersect=function(E){return ga(t,E)},{cluster:f,labelBBox:C}},"kanbanSection"),_9=w((e,t)=>{const r=he(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),c=a.insert("g",":first-child"),h=0*t.padding,u=t.width+h;t.diff=-t.padding;const d=t.height+h,f=t.x-u/2,m=t.y-d/2;t.width=u;let g;if(t.look==="handDrawn"){const k=Tt.svg(a).rectangle(f,m,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:n});g=a.insert(()=>k,":first-child")}else{g=c.insert("rect",":first-child");let C="outer";t.look,C="divider",g.attr("class",C).attr("x",f).attr("y",m).attr("width",u).attr("height",d).attr("data-look",t.look)}const x=g.node().getBBox();return t.height=x.height,t.offsetX=0,t.offsetY=0,t.intersect=function(C){return ga(t,C)},{cluster:a,labelBBox:{}}},"divider"),B9=bT,L9={rect:bT,squareRect:B9,roundedWithTitle:S9,noteGroup:w9,divider:_9,kanbanSection:T9},vT=new Map,E9=w(async(e,t)=>{const r=t.shape||"rect",i=await L9[r](e,t);return vT.set(t.id,i),i},"insertCluster"),VV=w(()=>{vT=new Map},"clear");function wT(e,t){return e.intersect(t)}w(wT,"intersectNode");var A9=wT;function ST(e,t,r,i){var n=e.x,s=e.y,a=n-i.x,c=s-i.y,h=Math.sqrt(t*t*c*c+r*r*a*a),u=Math.abs(t*r*a/h);i.x<n&&(u=-u);var d=Math.abs(t*r*c/h);return i.y<s&&(d=-d),{x:n+u,y:s+d}}w(ST,"intersectEllipse");var TT=ST;function _T(e,t,r){return TT(e,t,t,r)}w(_T,"intersectCircle");var F9=_T;function BT(e,t,r,i){{const n=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,c=n*r.x+s*r.y+a,h=n*i.x+s*i.y+a,u=1e-6;if(c!==0&&h!==0&&Kg(c,h))return;const d=i.y-r.y,f=r.x-i.x,m=i.x*r.y-r.x*i.y,g=d*e.x+f*e.y+m,x=d*t.x+f*t.y+m;if(Math.abs(g)<u&&Math.abs(x)<u&&Kg(g,x))return;const C=n*f-d*s;if(C===0)return;const k=Math.abs(C/2);let v=s*m-f*a;const T=v<0?(v-k)/C:(v+k)/C;v=d*a-n*m;const B=v<0?(v-k)/C:(v+k)/C;return{x:T,y:B}}}w(BT,"intersectLine");function Kg(e,t){return e*t>0}w(Kg,"sameSign");var M9=BT;function LT(e,t,r){let i=e.x,n=e.y,s=[],a=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){a=Math.min(a,d.x),c=Math.min(c,d.y)}):(a=Math.min(a,t.x),c=Math.min(c,t.y));let h=i-e.width/2-a,u=n-e.height/2-c;for(let d=0;d<t.length;d++){let f=t[d],m=t[d<t.length-1?d+1:0],g=M9(e,r,{x:h+f.x,y:u+f.y},{x:h+m.x,y:u+m.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(d,f){let m=d.x-r.x,g=d.y-r.y,x=Math.sqrt(m*m+g*g),C=f.x-r.x,k=f.y-r.y,v=Math.sqrt(C*C+k*k);return x<v?-1:x===v?0:1}),s[0]):e}w(LT,"intersectPolygon");var I9=LT,bt={node:A9,circle:F9,ellipse:TT,polygon:I9,rect:ga};function ET(e,t){const{labelStyles:r}=Lt(t);t.labelStyle=r;const i=jt(t);let n=i;i||(n="anchor");const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),a=1,{cssStyles:c}=t,h=Tt.svg(s),u=Bt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(u.roughness=0);const d=h.circle(0,0,a*2,u),f=s.insert(()=>d,":first-child");return f.attr("class","anchor").attr("style",Qe(c)),Et(t,f),t.intersect=function(m){return lt.info("Circle intersect",t,a,m),bt.circle(t,a,m)},s}w(ET,"anchor");function Zg(e,t,r,i,n,s,a){const h=(e+r)/2,u=(t+i)/2,d=Math.atan2(i-t,r-e),f=(r-e)/2,m=(i-t)/2,g=f/n,x=m/s,C=Math.sqrt(g**2+x**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const k=Math.sqrt(1-C**2),v=h+k*s*Math.sin(d)*(a?-1:1),T=u-k*n*Math.cos(d)*(a?-1:1),B=Math.atan2((t-T)/s,(e-v)/n);let O=Math.atan2((i-T)/s,(r-v)/n)-B;a&&O<0&&(O+=2*Math.PI),!a&&O>0&&(O-=2*Math.PI);const F=[];for(let E=0;E<20;E++){const z=E/19,K=B+z*O,P=v+n*Math.cos(K),N=T+s*Math.sin(K);F.push({x:P,y:N})}return F}w(Zg,"generateArcPoints");function AT(e,t,r){const[i,n]=[t,r].sort((s,a)=>a-s);return n*(1-Math.sqrt(1-(e/i/2)**2))}w(AT,"calculateArcSagitta");async function FT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,c=w(K=>K+a,"calcTotalHeight"),h=w(K=>{const P=K/2;return[P/(2.5+K/50),P]},"calcEllipseRadius"),{shapeSvg:u,bbox:d}=await Wt(e,t,jt(t)),f=c(t!=null&&t.height?t==null?void 0:t.height:d.height),[m,g]=h(f),x=AT(f,m,g),k=(t!=null&&t.width?t==null?void 0:t.width:d.width)+s*2+x-x,v=f,{cssStyles:T}=t,B=[{x:k/2,y:-v/2},{x:-k/2,y:-v/2},...Zg(-k/2,-v/2,-k/2,v/2,m,g,!1),{x:k/2,y:v/2},...Zg(k/2,v/2,k/2,-v/2,m,g,!0)],M=Tt.svg(u),O=Bt(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const F=ne(B),E=M.path(F,O),z=u.insert(()=>E,":first-child");return z.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",T),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(${m/2}, 0)`),Et(t,z),t.intersect=function(K){return bt.polygon(t,B,K)},u}w(FT,"bowTieRect");function _n(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}w(_n,"insertPolygonShape");var Nh=12;async function MT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?28:n,a=t.look==="neo"?24:n,{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=((t==null?void 0:t.width)??h.width)+(t.look==="neo"?s*2:s+Nh),d=((t==null?void 0:t.height)??h.height)+(t.look==="neo"?a*2:a),f=0,m=u,g=-d,x=0,C=[{x:f+Nh,y:g},{x:m,y:g},{x:m,y:x},{x:f,y:x},{x:f,y:g+Nh},{x:f+Nh,y:g}];let k;const{cssStyles:v}=t;if(t.look==="handDrawn"){const T=Tt.svg(c),B=Bt(t,{}),M=ne(C),O=T.path(M,B);k=c.insert(()=>O,":first-child").attr("transform",`translate(${-u/2}, ${d/2})`),v&&k.attr("style",v)}else k=_n(c,u,d,C);return i&&k.attr("style",i),Et(t,k),t.intersect=function(T){return bt.polygon(t,C,T)},c}w(MT,"card");function IT(e,t){const{nodeStyles:r}=Lt(t);t.label="";const i=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],c=Tt.svg(i),h=Bt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const u=ne(a),d=c.path(u,h),f=i.insert(()=>d,":first-child");return n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(m){return bt.polygon(t,a,m)},i}w(IT,"choice");async function By(e,t,r){const{labelStyles:i,nodeStyles:n}=Lt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:c}=await Wt(e,t,jt(t)),h=16,u=(r==null?void 0:r.padding)??c,d=t.look==="neo"?a.width/2+h*2:a.width/2+u;let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const g=Tt.svg(s),x=Bt(t,{}),C=g.circle(0,0,d*2,x);f=s.insert(()=>C,":first-child"),f.attr("class","basic label-container").attr("style",Qe(m))}else f=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0);return Et(t,f),t.calcIntersect=function(g,x){const C=g.width/2;return bt.circle(g,C,x)},t.intersect=function(g){return lt.info("Circle intersect",t,d,g),bt.circle(t,d,g)},s}w(By,"circle");function PT(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},c={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${c.x},${c.y}
296
+ M ${n.x},${n.y} L ${a.x},${a.y}`}w(PT,"createLine");function OT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:a}=t,c=Tt.svg(n),h=Bt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const u=c.circle(0,0,s*2,h),d=PT(s),f=c.path(d,h),m=n.insert(()=>u,":first-child");return m.insert(()=>f),m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),Et(t,m),t.intersect=function(g){return lt.info("crossedCircle intersect",t,{radius:s,point:g}),bt.circle(t,s,g)},n}w(OT,"crossedCircle");function gn(e,t,r,i=100,n=0,s=180){const a=[],c=n*Math.PI/180,d=(s*Math.PI/180-c)/(i-1);for(let f=0;f<i;f++){const m=c+f*d,g=e+r*Math.cos(m),x=t+r*Math.sin(m);a.push({x:-g,y:-x})}return a}w(gn,"generateCirclePoints");async function DT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Wt(e,t,jt(t)),c=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,u=s.width+c,d=s.height+h,f=Math.max(5,d*.1),{cssStyles:m}=t,g=[...gn(u/2,-d/2,f,30,-90,0),{x:-u/2-f,y:f},...gn(u/2+f*2,-f,f,20,-180,-270),...gn(u/2+f*2,f,f,20,-90,-180),{x:-u/2-f,y:-d/2},...gn(u/2,d/2,f,20,0,90)],x=[{x:u/2,y:-d/2-f},{x:-u/2,y:-d/2-f},...gn(u/2,-d/2,f,20,-90,0),{x:-u/2-f,y:-f},...gn(u/2+u*.1,-f,f,20,-180,-270),...gn(u/2+u*.1,f,f,20,-90,-180),{x:-u/2-f,y:d/2},...gn(u/2,d/2,f,20,0,90),{x:-u/2,y:d/2+f},{x:u/2,y:d/2+f}],C=Tt.svg(n),k=Bt(t,{fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=ne(g).replace("Z",""),B=C.path(T,k),M=ne(x),O=C.path(M,{...k}),F=n.insert("g",":first-child");return F.insert(()=>O,":first-child").attr("stroke-opacity",0),F.insert(()=>B,":first-child"),F.attr("class","text"),m&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${f}, 0)`),a.attr("transform",`translate(${-u/2+f-(s.x-(s.left??0))},${-d/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Et(t,F),t.intersect=function(E){return bt.polygon(t,x,E)},n}w(DT,"curlyBraceLeft");function mn(e,t,r,i=100,n=0,s=180){const a=[],c=n*Math.PI/180,d=(s*Math.PI/180-c)/(i-1);for(let f=0;f<i;f++){const m=c+f*d,g=e+r*Math.cos(m),x=t+r*Math.sin(m);a.push({x:g,y:x})}return a}w(mn,"generateCirclePoints");async function RT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Wt(e,t,jt(t)),c=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,u=s.width+(t.look==="neo"?c*2:c),d=s.height+(t.look==="neo"?h*2:h),f=Math.max(5,d*.1),{cssStyles:m}=t,g=[...mn(u/2,-d/2,f,20,-90,0),{x:u/2+f,y:-f},...mn(u/2+f*2,-f,f,20,-180,-270),...mn(u/2+f*2,f,f,20,-90,-180),{x:u/2+f,y:d/2},...mn(u/2,d/2,f,20,0,90)],x=[{x:-u/2,y:-d/2-f},{x:u/2,y:-d/2-f},...mn(u/2,-d/2,f,20,-90,0),{x:u/2+f,y:-f},...mn(u/2+f*2,-f,f,20,-180,-270),...mn(u/2+f*2,f,f,20,-90,-180),{x:u/2+f,y:d/2},...mn(u/2,d/2,f,20,0,90),{x:u/2,y:d/2+f},{x:-u/2,y:d/2+f}],C=Tt.svg(n),k=Bt(t,{fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=ne(g).replace("Z",""),B=C.path(T,k),M=ne(x),O=C.path(M,{...k}),F=n.insert("g",":first-child");return F.insert(()=>O,":first-child").attr("stroke-opacity",0),F.insert(()=>B,":first-child"),F.attr("class","text"),m&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-f}, 0)`),a.attr("transform",`translate(${-u/2+(t.padding??0)/2-(s.x-(s.left??0))},${-d/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Et(t,F),t.intersect=function(E){return bt.polygon(t,x,E)},n}w(RT,"curlyBraceRight");function rr(e,t,r,i=100,n=0,s=180){const a=[],c=n*Math.PI/180,d=(s*Math.PI/180-c)/(i-1);for(let f=0;f<i;f++){const m=c+f*d,g=e+r*Math.cos(m),x=t+r*Math.sin(m);a.push({x:-g,y:-x})}return a}w(rr,"generateCirclePoints");async function $T(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Wt(e,t,jt(t)),c=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,u=s.width+(t.look==="neo"?c*2:c),d=s.height+(t.look==="neo"?h*2:h),f=Math.max(5,d*.1),{cssStyles:m}=t,g=[...rr(u/2,-d/2,f,30,-90,0),{x:-u/2-f,y:f},...rr(u/2+f*2,-f,f,20,-180,-270),...rr(u/2+f*2,f,f,20,-90,-180),{x:-u/2-f,y:-d/2},...rr(u/2,d/2,f,20,0,90)],x=[...rr(-u/2+f+f/2,-d/2,f,20,-90,-180),{x:u/2-f/2,y:f},...rr(-u/2-f/2,-f,f,20,0,90),...rr(-u/2-f/2,f,f,20,-90,0),{x:u/2-f/2,y:-f},...rr(-u/2+f+f/2,d/2,f,30,-180,-270)],C=[{x:u/2,y:-d/2-f},{x:-u/2,y:-d/2-f},...rr(u/2,-d/2,f,20,-90,0),{x:-u/2-f,y:-f},...rr(u/2+f*2,-f,f,20,-180,-270),...rr(u/2+f*2,f,f,20,-90,-180),{x:-u/2-f,y:d/2},...rr(u/2,d/2,f,20,0,90),{x:-u/2,y:d/2+f},{x:u/2-f-f/2,y:d/2+f},...rr(-u/2+f+f/2,-d/2,f,20,-90,-180),{x:u/2-f/2,y:f},...rr(-u/2-f/2,-f,f,20,0,90),...rr(-u/2-f/2,f,f,20,-90,0),{x:u/2-f/2,y:-f},...rr(-u/2+f+f/2,d/2,f,30,-180,-270)],k=Tt.svg(n),v=Bt(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=ne(g).replace("Z",""),M=k.path(B,v),F=ne(x).replace("Z",""),E=k.path(F,v),z=ne(C),K=k.path(z,{...v}),P=n.insert("g",":first-child");return P.insert(()=>K,":first-child").attr("stroke-opacity",0),P.insert(()=>M,":first-child"),P.insert(()=>E,":first-child"),P.attr("class","text"),m&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${f-f/4}, 0)`),a.attr("transform",`translate(${-u/2+(t.padding??0)/2-(s.x-(s.left??0))},${-d/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Et(t,P),t.intersect=function(N){return bt.polygon(t,C,N)},n}w($T,"curlyBraces");async function zT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,c=20,h=5,{shapeSvg:u,bbox:d}=await Wt(e,t,jt(t)),f=Math.max(c,(d.width+s*2)*1.25,(t==null?void 0:t.width)??0),m=Math.max(h,d.height+a*2,(t==null?void 0:t.height)??0),g=m/2,{cssStyles:x}=t,C=Tt.svg(u),k=Bt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=f,T=m,B=v-g,M=T/4,O=[{x:B,y:0},{x:M,y:0},{x:0,y:T/2},{x:M,y:T},{x:B,y:T},...Zl(-B,-T/2,g,50,270,90)],F=ne(O),E=C.path(F,k),z=u.insert(()=>E,":first-child");return z.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&z.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&z.selectChildren("path").attr("style",i),z.attr("transform",`translate(${-f/2}, ${-m/2})`),Et(t,z),t.intersect=function(K){return bt.polygon(t,O,K)},u}w(zT,"curvedTrapezoid");var P9=w((e,t,r,i,n,s)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),O9=w((e,t,r,i,n,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),D9=w((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),_k=8,Bk=8;async function NT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?24:n,a=t.look==="neo"?24:n;if(t.width||t.height){const k=t.width??0;t.width=(t.width??0)-a,t.width<Bk&&(t.width=Bk);const T=k/2/(2.5+k/50);t.height=(t.height??0)-s-T*3,t.height<_k&&(t.height=_k)}const{shapeSvg:c,bbox:h,label:u}=await Wt(e,t,jt(t)),d=(t.width?t.width:h.width)+a,f=d/2,m=f/(2.5+d/50),g=(t.height?t.height:h.height)+s+m;let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=Tt.svg(c),v=O9(0,0,d,g,f,m),T=D9(0,m,d,g,f,m),B=Bt(t,{}),M=k.path(v,B),O=k.path(T,Bt(t,{fill:"none"}));x=c.insert(()=>O,":first-child"),x=c.insert(()=>M,":first-child"),x.attr("class","basic label-container"),C&&x.attr("style",C)}else{const k=P9(0,0,d,g,f,m);x=c.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",Qe(C)).attr("style",i)}return x.attr("label-offset-y",m),x.attr("transform",`translate(${-d/2}, ${-(g/2+m)})`),Et(t,x),u.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(t.padding??0)/1.5-(h.y-(h.top??0))})`),t.intersect=function(k){const v=bt.rect(t,k),T=v.x-(t.x??0);if(f!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(v.y-(t.y??0))>(t.height??0)/2-m)){let B=m*m*(1-T*T/(f*f));B>0&&(B=Math.sqrt(B)),B=m-B,k.y-(t.y??0)>0&&(B=-B),v.y+=B}return v},c}w(NT,"cylinder");async function jT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:c,label:h}=await Wt(e,t,jt(t)),u=c.width+n,d=c.height+s,f=d*.2,m=-u/2,g=-d/2-f/2,{cssStyles:x}=t,C=Tt.svg(a),k=Bt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:m,y:g+f},{x:-m,y:g+f},{x:-m,y:-g},{x:m,y:-g},{x:m,y:g},{x:-m,y:g},{x:-m,y:g+f}],T=C.polygon(v.map(M=>[M.x,M.y]),k),B=a.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),h.attr("transform",`translate(${m+(t.padding??0)/2-(c.x-(c.left??0))}, ${g+f+(t.padding??0)/2-(c.y-(c.top??0))})`),Et(t,B),t.intersect=function(M){return bt.rect(t,M)},a}w(jT,"dividedRectangle");async function WT(e,t){var g,x;const{labelStyles:r,nodeStyles:i}=Lt(t),n=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=(t!=null&&t.width?(t==null?void 0:t.width)/2:h.width/2)+(a??0),d=u-n;let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=Tt.svg(c),k=Bt(t,{roughness:.2,strokeWidth:2.5}),v=Bt(t,{roughness:.2,strokeWidth:1.5}),T=C.circle(0,0,u*2,k),B=C.circle(0,0,d*2,v);f=c.insert("g",":first-child"),f.attr("class",Qe(t.cssClasses)).attr("style",Qe(m)),(g=f.node())==null||g.appendChild(T),(x=f.node())==null||x.appendChild(B)}else{f=c.insert("g",":first-child");const C=f.insert("circle",":first-child"),k=f.insert("circle");f.attr("class","basic label-container").attr("style",i),C.attr("class","outer-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0),k.attr("class","inner-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0)}return Et(t,f),t.intersect=function(C){return lt.info("DoubleCircle intersect",t,u,C),bt.circle(t,u,C)},c}w(WT,"doublecircle");function qT(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Lt(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:c}=t,h=Tt.svg(s),{nodeBorder:u}=r,d=Bt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);const f=h.circle(0,0,a*2,d),m=s.insert(()=>f,":first-child");return m.selectAll("path").attr("style",`fill: ${u} !important;`),c&&c.length>0&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",c),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),Et(t,m),t.intersect=function(g){return lt.info("filledCircle intersect",t,{radius:a,point:g}),bt.circle(t,a,g)},s}w(qT,"filledCircle");var Lk=10,Ek=10;async function HT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Lk&&(t.height=Lk),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<Ek&&(t.width=Ek));const{shapeSvg:a,bbox:c,label:h}=await Wt(e,t,jt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(s??0),d=t!=null&&t.height?t==null?void 0:t.height:u+c.height,f=d,m=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:g}=t,x=Tt.svg(a),C=Bt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ne(m),v=x.path(k,C),T=a.insert(()=>v,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),t.width=u,t.height=d,Et(t,T),h.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(t.padding??0)/2+(c.y-(c.top??0))})`),t.intersect=function(B){return lt.info("Triangle intersect",t,m,B),bt.polygon(t,m,B)},a}w(HT,"flippedTriangle");function UT(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:s}=Lt(t);t.label="";const a=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),{cssStyles:c}=t;let h=Math.max(70,(t==null?void 0:t.width)??0),u=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(h=Math.max(10,(t==null?void 0:t.width)??0),u=Math.max(70,(t==null?void 0:t.height)??0));const d=-1*h/2,f=-1*u/2,m=Tt.svg(a),g=Bt(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=m.rectangle(d,f,h,u,g),C=a.insert(()=>x,":first-child");c&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",c),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),Et(t,C);const k=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=k/2||0,t.height+=k/2||0),t.intersect=function(v){return bt.rect(t,v)},a}w(UT,"forkJoin");async function VT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=15,s=10,a=t.look==="neo"?16:t.padding??0,c=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-c*2,t.height<s&&(t.height=s),t.width=((t==null?void 0:t.width)??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:u}=await Wt(e,t,jt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:Math.max(n,u.width))+a*2,f=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,u.height))+c*2,m=f/2,{cssStyles:g}=t,x=Tt.svg(h),C=Bt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-d/2,y:-f/2},{x:d/2-m,y:-f/2},...Zl(-d/2+m,0,m,50,90,270),{x:d/2-m,y:f/2},{x:-d/2,y:f/2}],v=ne(k),T=x.path(v,C),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),Et(t,B),t.intersect=function(M){return lt.info("Pill intersect",t,{radius:m,point:M}),bt.polygon(t,k,M)},h}w(VT,"halfRoundedRectangle");var R9=w((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function YT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t),n=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,c=32,h=t.look==="neo"?a:s,u=t.look==="neo"?c:s;if(t.width||t.height){const B=(t.height??0)/n;t.width=((t==null?void 0:t.width)??0)-2*B-u,t.height=(t.height??0)-h}const{shapeSvg:d,bbox:f}=await Wt(e,t,jt(t)),m=(t!=null&&t.height?t==null?void 0:t.height:f.height)+h,g=m/n,x=(t!=null&&t.width?t==null?void 0:t.width:f.width)+2*g+u,C=[{x:g,y:0},{x:x-g,y:0},{x,y:-m/2},{x:x-g,y:-m},{x:g,y:-m},{x:0,y:-m/2}];let k;const{cssStyles:v}=t;if(t.look==="handDrawn"){const T=Tt.svg(d),B=Bt(t,{}),M=R9(0,0,x,m,g),O=T.path(M,B);k=d.insert(()=>O,":first-child").attr("transform",`translate(${-x/2}, ${m/2})`),v&&k.attr("style",v)}else k=_n(d,x,m,C);return i&&k.attr("style",i),t.width=x,t.height=m,Et(t,k),t.intersect=function(T){return bt.polygon(t,C,T)},d}w(YT,"hexagon");async function GT(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await Wt(e,t,jt(t)),s=Math.max(30,(t==null?void 0:t.width)??0),a=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:c}=t,h=Tt.svg(n),u=Bt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],f=ne(d),m=h.path(f,u),g=n.insert(()=>m,":first-child");return g.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-s/2}, ${-a/2})`),Et(t,g),t.intersect=function(x){return lt.info("Pill intersect",t,{points:d}),bt.polygon(t,d,x)},n}w(GT,"hourglass");async function XT(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Lt(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,c=Math.max(s,a),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(c,h??0);const{shapeSvg:u,bbox:d,label:f}=await Wt(e,t,"icon-shape default"),m=t.pos==="t",g=c,x=c,{nodeBorder:C}=r,{stylesMap:k}=pa(t),v=-x/2,T=-g/2,B=t.label?8:0,M=Tt.svg(u),O=Bt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const F=M.rectangle(v,T,x,g,O),E=Math.max(x,d.width),z=g+d.height+B,K=M.rectangle(-E/2,-z/2,E,z,{...O,fill:"transparent",stroke:"none"}),P=u.insert(()=>F,":first-child"),N=u.insert(()=>K);if(t.icon){const Z=u.append("g");Z.html(`<g>${await fc(t.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const it=Z.node().getBBox(),V=it.width,j=it.height,q=it.x,Y=it.y;Z.attr("transform",`translate(${-V/2-q},${m?d.height/2+B/2-j/2-Y:-d.height/2-B/2-j/2-Y})`),Z.attr("style",`color: ${k.get("stroke")??C};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-z/2:z/2-d.height})`),P.attr("transform",`translate(0,${m?d.height/2+B/2:-d.height/2-B/2})`),Et(t,N),t.intersect=function(Z){if(lt.info("iconSquare intersect",t,Z),!t.label)return bt.rect(t,Z);const it=t.x??0,V=t.y??0,j=t.height??0;let q=[];return m?q=[{x:it-d.width/2,y:V-j/2},{x:it+d.width/2,y:V-j/2},{x:it+d.width/2,y:V-j/2+d.height+B},{x:it+x/2,y:V-j/2+d.height+B},{x:it+x/2,y:V+j/2},{x:it-x/2,y:V+j/2},{x:it-x/2,y:V-j/2+d.height+B},{x:it-d.width/2,y:V-j/2+d.height+B}]:q=[{x:it-x/2,y:V-j/2},{x:it+x/2,y:V-j/2},{x:it+x/2,y:V-j/2+g},{x:it+d.width/2,y:V-j/2+g},{x:it+d.width/2/2,y:V+j/2},{x:it-d.width/2,y:V+j/2},{x:it-d.width/2,y:V-j/2+g},{x:it-x/2,y:V-j/2+g}],bt.polygon(t,q,Z)},u}w(XT,"icon");async function QT(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Lt(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,c=Math.max(s,a),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(c,h??0);const{shapeSvg:u,bbox:d,label:f}=await Wt(e,t,"icon-shape default"),m=20,g=t.label?8:0,x=t.pos==="t",{nodeBorder:C,mainBkg:k}=r,{stylesMap:v}=pa(t),T=Tt.svg(u),B=Bt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const M=v.get("fill");B.stroke=M??k;const O=u.append("g");t.icon&&O.html(`<g>${await fc(t.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const F=O.node().getBBox(),E=F.width,z=F.height,K=F.x,P=F.y,N=Math.max(E,z)*Math.SQRT2+m*2,Z=T.circle(0,0,N,B),it=Math.max(N,d.width),V=N+d.height+g,j=T.rectangle(-it/2,-V/2,it,V,{...B,fill:"transparent",stroke:"none"}),q=u.insert(()=>Z,":first-child"),Y=u.insert(()=>j);return O.attr("transform",`translate(${-E/2-K},${x?d.height/2+g/2-z/2-P:-d.height/2-g/2-z/2-P})`),O.attr("style",`color: ${v.get("stroke")??C};`),f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${x?-V/2:V/2-d.height})`),q.attr("transform",`translate(0,${x?d.height/2+g/2:-d.height/2-g/2})`),Et(t,Y),t.intersect=function(R){return lt.info("iconSquare intersect",t,R),bt.rect(t,R)},u}w(QT,"iconCircle");async function KT(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Lt(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,c=Math.max(s,a),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(c,h??0);const{shapeSvg:u,bbox:d,halfPadding:f,label:m}=await Wt(e,t,"icon-shape default"),g=t.pos==="t",x=c+f*2,C=c+f*2,{nodeBorder:k,mainBkg:v}=r,{stylesMap:T}=pa(t),B=-C/2,M=-x/2,O=t.label?8:0,F=Tt.svg(u),E=Bt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const z=T.get("fill");E.stroke=z??v;const K=F.path(fo(B,M,C,x,5),E),P=Math.max(C,d.width),N=x+d.height+O,Z=F.rectangle(-P/2,-N/2,P,N,{...E,fill:"transparent",stroke:"none"}),it=u.insert(()=>K,":first-child").attr("class","icon-shape2"),V=u.insert(()=>Z);if(t.icon){const j=u.append("g");j.html(`<g>${await fc(t.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const q=j.node().getBBox(),Y=q.width,R=q.height,J=q.x,I=q.y;j.attr("transform",`translate(${-Y/2-J},${g?d.height/2+O/2-R/2-I:-d.height/2-O/2-R/2-I})`),j.attr("style",`color: ${T.get("stroke")??k};`)}return m.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-N/2:N/2-d.height})`),it.attr("transform",`translate(0,${g?d.height/2+O/2:-d.height/2-O/2})`),Et(t,V),t.intersect=function(j){if(lt.info("iconSquare intersect",t,j),!t.label)return bt.rect(t,j);const q=t.x??0,Y=t.y??0,R=t.height??0;let J=[];return g?J=[{x:q-d.width/2,y:Y-R/2},{x:q+d.width/2,y:Y-R/2},{x:q+d.width/2,y:Y-R/2+d.height+O},{x:q+C/2,y:Y-R/2+d.height+O},{x:q+C/2,y:Y+R/2},{x:q-C/2,y:Y+R/2},{x:q-C/2,y:Y-R/2+d.height+O},{x:q-d.width/2,y:Y-R/2+d.height+O}]:J=[{x:q-C/2,y:Y-R/2},{x:q+C/2,y:Y-R/2},{x:q+C/2,y:Y-R/2+x},{x:q+d.width/2,y:Y-R/2+x},{x:q+d.width/2/2,y:Y+R/2},{x:q-d.width/2,y:Y+R/2},{x:q-d.width/2,y:Y-R/2+x},{x:q-C/2,y:Y-R/2+x}],bt.polygon(t,J,j)},u}w(KT,"iconRounded");async function ZT(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Lt(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,c=Math.max(s,a),h=i==null?void 0:i.wrappingWidth;t.width=Math.max(c,h??0);const{shapeSvg:u,bbox:d,halfPadding:f,label:m}=await Wt(e,t,"icon-shape default"),g=t.pos==="t",x=c+f*2,C=c+f*2,{nodeBorder:k,mainBkg:v}=r,{stylesMap:T}=pa(t),B=-C/2,M=-x/2,O=t.label?8:0,F=Tt.svg(u),E=Bt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const z=T.get("fill");E.stroke=z??v;const K=F.path(fo(B,M,C,x,.1),E),P=Math.max(C,d.width),N=x+d.height+O,Z=F.rectangle(-P/2,-N/2,P,N,{...E,fill:"transparent",stroke:"none"}),it=u.insert(()=>K,":first-child"),V=u.insert(()=>Z);if(t.icon){const j=u.append("g");j.html(`<g>${await fc(t.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const q=j.node().getBBox(),Y=q.width,R=q.height,J=q.x,I=q.y;j.attr("transform",`translate(${-Y/2-J},${g?d.height/2+O/2-R/2-I:-d.height/2-O/2-R/2-I})`),j.attr("style",`color: ${T.get("stroke")??k};`)}return m.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-N/2:N/2-d.height})`),it.attr("transform",`translate(0,${g?d.height/2+O/2:-d.height/2-O/2})`),Et(t,V),t.intersect=function(j){if(lt.info("iconSquare intersect",t,j),!t.label)return bt.rect(t,j);const q=t.x??0,Y=t.y??0,R=t.height??0;let J=[];return g?J=[{x:q-d.width/2,y:Y-R/2},{x:q+d.width/2,y:Y-R/2},{x:q+d.width/2,y:Y-R/2+d.height+O},{x:q+C/2,y:Y-R/2+d.height+O},{x:q+C/2,y:Y+R/2},{x:q-C/2,y:Y+R/2},{x:q-C/2,y:Y-R/2+d.height+O},{x:q-d.width/2,y:Y-R/2+d.height+O}]:J=[{x:q-C/2,y:Y-R/2},{x:q+C/2,y:Y-R/2},{x:q+C/2,y:Y-R/2+x},{x:q+d.width/2,y:Y-R/2+x},{x:q+d.width/2/2,y:Y+R/2},{x:q-d.width/2,y:Y+R/2},{x:q-d.width/2,y:Y-R/2+x},{x:q-C/2,y:Y-R/2+x}],bt.polygon(t,J,j)},u}w(ZT,"iconSquare");async function JT(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/s;const{labelStyles:a}=Lt(t);t.labelStyle=a;const c=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const h=Math.max(t.label?c??0:0,(t==null?void 0:t.assetWidth)??n),u=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:h,d=t.constraint==="on"?u/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(u,c??0);const{shapeSvg:f,bbox:m,label:g}=await Wt(e,t,"image-shape default"),x=t.pos==="t",C=-u/2,k=-d/2,v=t.label?8:0,T=Tt.svg(f),B=Bt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const M=T.rectangle(C,k,u,d,B),O=Math.max(u,m.width),F=d+m.height+v,E=T.rectangle(-O/2,-F/2,O,F,{...B,fill:"none",stroke:"none"}),z=f.insert(()=>M,":first-child"),K=f.insert(()=>E);if(t.img){const P=f.append("image");P.attr("href",t.img),P.attr("width",u),P.attr("height",d),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-u/2},${x?F/2-d:-F/2})`)}return g.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-d/2-m.height/2-v/2:d/2-m.height/2+v/2})`),z.attr("transform",`translate(0,${x?m.height/2+v/2:-m.height/2-v/2})`),Et(t,K),t.intersect=function(P){if(lt.info("iconSquare intersect",t,P),!t.label)return bt.rect(t,P);const N=t.x??0,Z=t.y??0,it=t.height??0;let V=[];return x?V=[{x:N-m.width/2,y:Z-it/2},{x:N+m.width/2,y:Z-it/2},{x:N+m.width/2,y:Z-it/2+m.height+v},{x:N+u/2,y:Z-it/2+m.height+v},{x:N+u/2,y:Z+it/2},{x:N-u/2,y:Z+it/2},{x:N-u/2,y:Z-it/2+m.height+v},{x:N-m.width/2,y:Z-it/2+m.height+v}]:V=[{x:N-u/2,y:Z-it/2},{x:N+u/2,y:Z-it/2},{x:N+u/2,y:Z-it/2+d},{x:N+m.width/2,y:Z-it/2+d},{x:N+m.width/2/2,y:Z+it/2},{x:N-m.width/2,y:Z+it/2},{x:N-m.width/2,y:Z-it/2+d},{x:N-u/2,y:Z-it/2+d}],bt.polygon(t,V,P)},f}w(JT,"imageSquare");async function t_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=Math.max(h.width+(a??0)*2,(t==null?void 0:t.width)??0),d=Math.max(h.height+(s??0)*2,(t==null?void 0:t.height)??0),f=[{x:0,y:0},{x:u,y:0},{x:u+3*d/6,y:-d},{x:-3*d/6,y:-d}];let m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const x=Tt.svg(c),C=Bt(t,{}),k=ne(f),v=x.path(k,C);m=c.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${d/2})`),g&&m.attr("style",g)}else m=_n(c,u,d,f);return i&&m.attr("style",i),t.width=u,t.height=d,Et(t,m),t.intersect=function(x){return bt.polygon(t,f,x)},c}w(t_,"inv_trapezoid");async function gc(e,t,r){const{labelStyles:i,nodeStyles:n}=Lt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await Wt(e,t,jt(t)),c=Math.max(a.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),h=Math.max(a.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),u=-c/2,d=-h/2;let f,{rx:m,ry:g}=t;const{cssStyles:x}=t;if(r!=null&&r.rx&&r.ry&&(m=r.rx,g=r.ry),t.look==="handDrawn"){const C=Tt.svg(s),k=Bt(t,{}),v=m||g?C.path(fo(u,d,c,h,m||0),k):C.rectangle(u,d,c,h,k);f=s.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",Qe(x))}else f=s.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",n).attr("rx",Qe(m)).attr("ry",Qe(g)).attr("x",u).attr("y",d).attr("width",c).attr("height",h);return Et(t,f),t.calcIntersect=function(C,k){return bt.rect(C,k)},t.intersect=function(C){return bt.rect(t,C)},s}w(gc,"drawRect");async function e_(e,t){const{shapeSvg:r,bbox:i,label:n}=await Wt(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Et(t,s),t.intersect=function(h){return bt.rect(t,h)},r}w(e_,"labelRect");async function r_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=((t==null?void 0:t.height)??h.height)+s,d=((t==null?void 0:t.width)??h.width)+a,f=[{x:0,y:0},{x:d+3*u/6,y:0},{x:d,y:-u},{x:-(3*u)/6,y:-u}];let m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const x=Tt.svg(c),C=Bt(t,{}),k=ne(f),v=x.path(k,C);m=c.insert(()=>v,":first-child").attr("transform",`translate(${-d/2}, ${u/2})`),g&&m.attr("style",g)}else m=_n(c,d,u,f);return i&&m.attr("style",i),t.width=d,t.height=u,Et(t,m),t.intersect=function(x){return bt.polygon(t,f,x)},c}w(r_,"lean_left");async function i_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=((t==null?void 0:t.height)??h.height)+s,d=((t==null?void 0:t.width)??h.width)+a,f=[{x:-3*u/6,y:0},{x:d,y:0},{x:d+3*u/6,y:-u},{x:0,y:-u}];let m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const x=Tt.svg(c),C=Bt(t,{}),k=ne(f),v=x.path(k,C);m=c.insert(()=>v,":first-child").attr("transform",`translate(${-d/2}, ${u/2})`),g&&m.attr("style",g)}else m=_n(c,d,u,f);return i&&m.attr("style",i),t.width=d,t.height=u,Et(t,m),t.intersect=function(x){return bt.polygon(t,f,x)},c}w(i_,"lean_right");function n_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,(t==null?void 0:t.width)??0),c=Math.max(35,(t==null?void 0:t.height)??0),h=7,u=[{x:a,y:0},{x:0,y:c+h/2},{x:a-2*h,y:c+h/2},{x:0,y:2*c},{x:a,y:c-h/2},{x:2*h,y:c-h/2}],d=Tt.svg(n),f=Bt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=ne(u),g=d.path(m,f),x=n.insert(()=>g,":first-child");return x.attr("class","outer-path"),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(-${a/2},${-c})`),Et(t,x),t.intersect=function(C){return lt.info("lightningBolt intersect",t,C),bt.polygon(t,u,C)},n}w(n_,"lightningBolt");var $9=w((e,t,r,i,n,s,a)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),z9=w((e,t,r,i,n,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),N9=w((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ak=10,Fk=10;async function o_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?24:n;if(t.width||t.height){const v=t.width??0;t.width=(t.width??0)-s,t.width<Fk&&(t.width=Fk);const B=v/2/(2.5+v/50);t.height=(t.height??0)-a-B*3,t.height<Ak&&(t.height=Ak)}const{shapeSvg:c,bbox:h,label:u}=await Wt(e,t,jt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2,f=d/2,m=f/(2.5+d/50),g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+m+a*2,x=g*.1;let C;const{cssStyles:k}=t;if(t.look==="handDrawn"){const v=Tt.svg(c),T=z9(0,0,d,g,f,m,x),B=N9(0,m,d,g,f,m),M=Bt(t,{}),O=v.path(T,M),F=v.path(B,M);c.insert(()=>F,":first-child").attr("class","line"),C=c.insert(()=>O,":first-child"),C.attr("class","basic label-container"),k&&C.attr("style",k)}else{const v=$9(0,0,d,g,f,m,x);C=c.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",Qe(k)).attr("style",i)}return C.attr("label-offset-y",m),C.attr("transform",`translate(${-d/2}, ${-(g/2+m)})`),Et(t,C),u.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+m-(h.y-(h.top??0))})`),t.intersect=function(v){const T=bt.rect(t,v),B=T.x-(t.x??0);if(f!=0&&(Math.abs(B)<(t.width??0)/2||Math.abs(B)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-m)){let M=m*m*(1-B*B/(f*f));M>0&&(M=Math.sqrt(M)),M=m-M,v.y-(t.y??0)>0&&(M=-M),T.y+=M}return T},c}w(o_,"linedCylinder");async function s_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;if(t.width||t.height){const M=t.width;t.width=(M??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:c,bbox:h,label:u}=await Wt(e,t,jt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(s??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(a??0)*2,m=t.look==="neo"?f/4:f/8,g=f+m,{cssStyles:x}=t,C=Tt.svg(c),k=Bt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-d/2-d/2*.1,y:-g/2},{x:-d/2-d/2*.1,y:g/2},...co(-d/2-d/2*.1,g/2,d/2+d/2*.1,g/2,m,.8),{x:d/2+d/2*.1,y:-g/2},{x:-d/2-d/2*.1,y:-g/2},{x:-d/2,y:-g/2},{x:-d/2,y:g/2*1.1},{x:-d/2,y:-g/2}],T=C.polygon(v.map(M=>[M.x,M.y]),k),B=c.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-m/2})`),u.attr("transform",`translate(${-d/2+(t.padding??0)+d/2*.1/2-(h.x-(h.left??0))},${-f/2+(t.padding??0)-m/2-(h.y-(h.top??0))})`),Et(t,B),t.intersect=function(M){return bt.polygon(t,v,M)},c}w(s_,"linedWaveEdgedRect");async function a_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,c=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-2*c,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-2*c,10));const{shapeSvg:h,bbox:u,label:d}=await Wt(e,t,jt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:u.width)+s*2+2*c,m=(t!=null&&t.height?t==null?void 0:t.height:u.height)+a*2+2*c,g=f-2*c,x=m-2*c,C=-g/2,k=-x/2,{cssStyles:v}=t,T=Tt.svg(h),B=Bt(t,{}),M=[{x:C-c,y:k+c},{x:C-c,y:k+x+c},{x:C+g-c,y:k+x+c},{x:C+g-c,y:k+x},{x:C+g,y:k+x},{x:C+g,y:k+x-c},{x:C+g+c,y:k+x-c},{x:C+g+c,y:k-c},{x:C+c,y:k-c},{x:C+c,y:k},{x:C,y:k},{x:C,y:k+c}],O=[{x:C,y:k+c},{x:C+g-c,y:k+c},{x:C+g-c,y:k+x},{x:C+g,y:k+x},{x:C+g,y:k},{x:C,y:k}];t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const F=ne(M);let E=T.path(F,B);const z=ne(O);let K=T.path(z,B);t.look!=="handDrawn"&&(E=Qg(E),K=Qg(K));const P=h.insert("g",":first-child");return P.insert(()=>E),P.insert(()=>K),P.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",v),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),d.attr("transform",`translate(${-(u.width/2)-c-(u.x-(u.left??0))}, ${-(u.height/2)+c-(u.y-(u.top??0))})`),Et(t,P),t.intersect=function(N){return bt.polygon(t,M,N)},h}w(a_,"multiRect");async function l_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Wt(e,t,jt(t)),c=t.padding??0,h=t.look==="neo"?16:c,u=t.look==="neo"?12:c;let d=!0;(t.width||t.height)&&(d=!1,t.width=((t==null?void 0:t.width)??0)-h*2,t.height=((t==null?void 0:t.height)??0)-u*3);const f=Math.max(s.width,(t==null?void 0:t.width)??0)+h*2,m=Math.max(s.height,(t==null?void 0:t.height)??0)+u*3,g=t.look==="neo"?m/4:m/8,x=m+(d?g/2:-g/2),C=-f/2,k=-x/2,v=10,{cssStyles:T}=t,B=co(C-v,k+x+v,C+f-v,k+x+v,g,.8),M=B==null?void 0:B[B.length-1],O=[{x:C-v,y:k+v},{x:C-v,y:k+x+v},...B,{x:C+f-v,y:M.y-v},{x:C+f,y:M.y-v},{x:C+f,y:M.y-2*v},{x:C+f+v,y:M.y-2*v},{x:C+f+v,y:k-v},{x:C+v,y:k-v},{x:C+v,y:k},{x:C,y:k},{x:C,y:k+v}],F=[{x:C,y:k+v},{x:C+f-v,y:k+v},{x:C+f-v,y:M.y-v},{x:C+f,y:M.y-v},{x:C+f,y:k},{x:C,y:k}],E=Tt.svg(n),z=Bt(t,{});t.look!=="handDrawn"&&(z.roughness=0,z.fillStyle="solid");const K=ne(O),P=E.path(K,z),N=ne(F),Z=E.path(N,z),it=n.insert(()=>P,":first-child");return it.insert(()=>Z),it.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&it.selectAll("path").attr("style",T),i&&t.look!=="handDrawn"&&it.selectAll("path").attr("style",i),it.attr("transform",`translate(0,${-g/2})`),a.attr("transform",`translate(${-(s.width/2)-v-(s.x-(s.left??0))}, ${-(s.height/2)+v-g/2-(s.y-(s.top??0))})`),Et(t,it),t.intersect=function(V){return bt.polygon(t,O,V)},n}w(l_,"multiWaveEdgedRectangle");async function c_(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Lt(t);t.labelStyle=i,t.useHtmlLabels||Tr(Be())||(t.centerLabel=!0);const{shapeSvg:a,bbox:c,label:h}=await Wt(e,t,jt(t)),u=Math.max(c.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),d=Math.max(c.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=-u/2,m=-d/2,{cssStyles:g}=t,x=Tt.svg(a),C=Bt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=x.rectangle(f,m,u,d,C),v=a.insert(()=>k,":first-child");return v.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",n),h.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Et(t,v),t.intersect=function(T){return bt.rect(t,T)},a}w(c_,"note");var j9=w((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function h_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await Wt(e,t,jt(t)),a=s.width+(t.padding??0),c=s.height+(t.padding??0),h=a+c,u=.5,d=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}];let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const g=Tt.svg(n),x=Bt(t,{}),C=j9(0,0,h),k=g.path(C,x);f=n.insert(()=>k,":first-child").attr("transform",`translate(${-h/2+u}, ${h/2})`),m&&f.attr("style",m)}else f=_n(n,h,h,d),f.attr("transform",`translate(${-h/2+u}, ${h/2})`);return i&&f.attr("style",i),Et(t,f),t.calcIntersect=function(g,x){const C=g.width,k=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],v=bt.polygon(g,k,x);return{x:v.x-.5,y:v.y-.5}},t.intersect=function(g){return this.calcIntersect(t,g)},n}w(h_,"question");async function u_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?21:n??0,a=t.look==="neo"?12:n??0,{shapeSvg:c,bbox:h,label:u}=await Wt(e,t,jt(t)),d=((t==null?void 0:t.width)??h.width)+(t.look==="neo"?s*2:s),f=((t==null?void 0:t.height)??h.height)+(t.look==="neo"?a*2:a),m=-d/2,g=-f/2,x=g/2,C=[{x:m+x,y:g},{x:m,y:0},{x:m+x,y:-g},{x:-m,y:-g},{x:-m,y:g}],{cssStyles:k}=t,v=Tt.svg(c),T=Bt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=ne(C),M=v.path(B,T),O=c.insert(()=>M,":first-child");return O.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(${-x/2},0)`),u.attr("transform",`translate(${-x/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,O),t.intersect=function(F){return bt.polygon(t,C,F)},c}w(u_,"rect_left_inv_arrow");async function d_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),a=s.insert("g"),c=s.insert("g").attr("class","label").attr("style",i),h=t.description,u=t.label,d=await ro(c,u,t.labelStyle,!0,!0);let f={width:0,height:0};if(Tr(he())){const z=d.children[0],K=Qt(d);f=z.getBoundingClientRect(),K.attr("width",f.width),K.attr("height",f.height)}lt.info("Text 2",h);const m=h||[],g=d.getBBox(),x=await ro(c,Array.isArray(m)?m.join("<br/>"):m,t.labelStyle,!0,!0),C=x.children[0],k=Qt(x);f=C.getBoundingClientRect(),k.attr("width",f.width),k.attr("height",f.height);const v=(t.padding||0)/2;Qt(x).attr("transform","translate( "+(f.width>g.width?0:(g.width-f.width)/2)+", "+(g.height+v+5)+")"),Qt(d).attr("transform","translate( "+(f.width<g.width?0:-(g.width-f.width)/2)+", 0)"),f=c.node().getBBox(),c.attr("transform","translate("+-f.width/2+", "+(-f.height/2-v+3)+")");const T=f.width+(t.padding||0),B=f.height+(t.padding||0),M=-f.width/2-v,O=-f.height/2-v;let F,E;if(t.look==="handDrawn"){const z=Tt.svg(s),K=Bt(t,{}),P=z.path(fo(M,O,T,B,t.rx||0),K),N=z.line(-f.width/2-v,-f.height/2-v+g.height+v,f.width/2+v,-f.height/2-v+g.height+v,K);E=s.insert(()=>(lt.debug("Rough node insert CXC",P),N),":first-child"),F=s.insert(()=>(lt.debug("Rough node insert CXC",P),P),":first-child")}else F=a.insert("rect",":first-child"),E=a.insert("line"),F.attr("class","outer title-state").attr("style",i).attr("x",-f.width/2-v).attr("y",-f.height/2-v).attr("width",f.width+(t.padding||0)).attr("height",f.height+(t.padding||0)),E.attr("class","divider").attr("x1",-f.width/2-v).attr("x2",f.width/2+v).attr("y1",-f.height/2-v+g.height+v).attr("y2",-f.height/2-v+g.height+v);return Et(t,F),t.intersect=function(z){return bt.rect(t,z)},s}w(d_,"rectWithTitle");async function f_(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,n={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return gc(e,t,n)}w(f_,"roundedRect");var Ao=8;async function p_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:c,label:h}=await Wt(e,t,jt(t)),u=((t==null?void 0:t.width)??c.width)+n*2+(t.look==="neo"?Ao:Ao*2),d=((t==null?void 0:t.height)??c.height)+s*2,f=u-Ao,m=d,g=Ao-u/2,x=-d/2,{cssStyles:C}=t,k=Tt.svg(a),v=Bt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=[{x:g,y:x},{x:g+f,y:x},{x:g+f,y:x+m},{x:g-Ao,y:x+m},{x:g-Ao,y:x},{x:g,y:x},{x:g,y:x+m}],B=k.polygon(T.map(O=>[O.x,O.y]),v),M=a.insert(()=>B,":first-child");return M.attr("class","basic label-container outer-path").attr("style",Qe(C)),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),C&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),h.attr("transform",`translate(${Ao/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Et(t,M),t.intersect=function(O){return bt.rect(t,O)},a}w(p_,"shadedProcess");async function g_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-a*2,10));const{shapeSvg:c,bbox:h,label:u}=await Wt(e,t,jt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2,f=((t!=null&&t.height?t==null?void 0:t.height:h.height)+a*2)*1.5,m=d,g=f/1.5,x=-m/2,C=-g/2,{cssStyles:k}=t,v=Tt.svg(c),T=Bt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=[{x,y:C},{x,y:C+g},{x:x+m,y:C+g},{x:x+m,y:C-g/2}],M=ne(B),O=v.path(M,T),F=c.insert(()=>O,":first-child");return F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",k),i&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(0, ${g/4})`),u.attr("transform",`translate(${-m/2+(t.padding??0)-(h.x-(h.left??0))}, ${-g/4+(t.padding??0)-(h.y-(h.top??0))})`),Et(t,F),t.intersect=function(E){return bt.polygon(t,B,E)},c}w(g_,"slopedRect");async function m_(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,n=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:n};return gc(e,t,s)}w(m_,"squareRect");async function y_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?20:n,a=t.look==="neo"?12:n,{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=h.height+(t.look==="neo"?a*2:a),d=h.width+u/4+(t.look==="neo"?s*2:s),f=u/2,{cssStyles:m}=t,g=Tt.svg(c),x=Bt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-d/2+f,y:-u/2},{x:d/2-f,y:-u/2},...Zl(-d/2+f,0,f,50,90,270),{x:d/2-f,y:u/2},...Zl(d/2-f,0,f,50,270,450)],k=ne(C),v=g.path(k,x),T=c.insert(()=>v,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Et(t,T),t.intersect=function(B){return bt.polygon(t,C,B)},c}w(y_,"stadium");async function x_(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return gc(e,t,r)}w(x_,"state");function C_(e,t,{config:{themeVariables:r}}){var T,B;const{labelStyles:i,nodeStyles:n}=Lt(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:c,nodeBorder:h,nodeShadow:u}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const d=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),f=Tt.svg(d),m=Bt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=f.circle(0,0,t.width,{...m,stroke:a,strokeWidth:2}),x=c??h,C=(t.width??0)*5/14,k=f.circle(0,0,C,{...m,fill:x,stroke:x,strokeWidth:2,fillStyle:"solid"}),v=d.insert(()=>g,":first-child");if(v.insert(()=>k),t.look!=="handDrawn"&&v.attr("class","outer-path"),s&&v.selectAll("path").attr("style",s),n&&v.selectAll("path").attr("style",n),t.width<25&&u&&t.look!=="handDrawn"){const M=((B=(T=e.node())==null?void 0:T.ownerSVGElement)==null?void 0:B.id)??"",O=M?`${M}-drop-shadow-small`:"drop-shadow-small";v.attr("style",`filter:url(#${O})`)}return Et(t,v),t.intersect=function(M){return bt.circle(t,(t.width??0)/2,M)},d}w(C_,"stateEnd");function k_(e,t,{config:{themeVariables:r}}){var c,h;const{lineColor:i,nodeShadow:n}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const d=Tt.svg(s).circle(0,0,t.width,QN(i));a=s.insert(()=>d),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&n&&t.look!=="handDrawn"){const u=((h=(c=e.node())==null?void 0:c.ownerSVGElement)==null?void 0:h.id)??"",d=u?`${u}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${d})`)}return Et(t,a),t.intersect=function(u){return bt.circle(t,(t.width??7)/2,u)},s}w(k_,"stateStart");var Es=8;async function b_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=(t==null?void 0:t.padding)??8,s=t.look==="neo"?28:n,a=t.look==="neo"?12:n,{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=((t==null?void 0:t.width)??h.width)+2*Es+s,d=((t==null?void 0:t.height)??h.height)+a,f=u-2*Es,m=d,g=-u/2,x=-d/2,C=[{x:0,y:0},{x:f,y:0},{x:f,y:-m},{x:0,y:-m},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-m},{x:-8,y:-m},{x:-8,y:0}];if(t.look==="handDrawn"){const k=Tt.svg(c),v=Bt(t,{}),T=k.rectangle(g,x,f+16,m,v),B=k.line(g+Es,x,g+Es,x+m,v),M=k.line(g+Es+f,x,g+Es+f,x+m,v);c.insert(()=>B,":first-child"),c.insert(()=>M,":first-child");const O=c.insert(()=>T,":first-child"),{cssStyles:F}=t;O.attr("class","basic label-container").attr("style",Qe(F)),Et(t,O)}else{const k=_n(c,f,m,C);i&&k.attr("style",i),Et(t,k)}return t.intersect=function(k){return bt.polygon(t,C,k)},c}w(b_,"subroutine");var Wp=.2;async function v_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-a*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Wp*(t.height+a*2),10));const{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=(t!=null&&t.height?t==null?void 0:t.height:h.height)+a*2,d=Wp*u,f=Wp*u,g=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+d-d,x=u,C=-g/2,k=-x/2,{cssStyles:v}=t,T=Tt.svg(c),B=Bt(t,{}),M=[{x:C-d/2,y:k},{x:C+g+d/2,y:k},{x:C+g+d/2,y:k+x},{x:C-d/2,y:k+x}],O=[{x:C+g-d/2,y:k+x},{x:C+g+d/2,y:k+x},{x:C+g+d/2,y:k+x-f}];t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const F=ne(M),E=T.path(F,B),z=ne(O),K=T.path(z,{...B,fillStyle:"solid"}),P=c.insert(()=>K,":first-child");return P.insert(()=>E,":first-child"),P.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",v),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),Et(t,P),t.intersect=function(N){return bt.polygon(t,M,N)},c}w(v_,"taggedRect");async function w_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Wt(e,t,jt(t)),c=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=h/8,d=.2*c,f=.2*h,m=h+u,{cssStyles:g}=t,x=Tt.svg(n),C=Bt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-c/2-c/2*.1,y:m/2},...co(-c/2-c/2*.1,m/2,c/2+c/2*.1,m/2,u,.8),{x:c/2+c/2*.1,y:-m/2},{x:-c/2-c/2*.1,y:-m/2}],v=-c/2+c/2*.1,T=-m/2-f*.4,B=[{x:v+c-d,y:(T+h)*1.3},{x:v+c,y:T+h-f},{x:v+c,y:(T+h)*.9},...co(v+c,(T+h)*1.25,v+c-d,(T+h)*1.3,-h*.02,.5)],M=ne(k),O=x.path(M,C),F=ne(B),E=x.path(F,{...C,fillStyle:"solid"}),z=n.insert(()=>E,":first-child");return z.insert(()=>O,":first-child"),z.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-u/2})`),a.attr("transform",`translate(${-c/2+(t.padding??0)-(s.x-(s.left??0))},${-h/2+(t.padding??0)-u/2-(s.y-(s.top??0))})`),Et(t,z),t.intersect=function(K){return bt.polygon(t,k,K)},n}w(w_,"taggedWaveEdgedRectangle");async function S_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await Wt(e,t,jt(t)),a=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)||0),c=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)||0),h=-a/2,u=-c/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",u).attr("width",a).attr("height",c),Et(t,d),t.intersect=function(f){return bt.rect(t,f)},n}w(S_,"text");var W9=w((e,t,r,i,n,s)=>`M${e},${t}
297
+ a${n},${s} 0,0,1 0,${-i}
298
+ l${r},0
299
+ a${n},${s} 0,0,1 0,${i}
300
+ M${r},${-i}
301
+ a${n},${s} 0,0,0 0,${i}
302
+ l${-r},0`,"createCylinderPathD"),q9=w((e,t,r,i,n,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),H9=w((e,t,r,i,n,s)=>[`M${e+r/2},${-i/2}`,`a${n},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Mk=5,Ik=10;async function T_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?12:n/2;if(t.width||t.height){const C=t.height??0;t.height=(t.height??0)-s,t.height<Mk&&(t.height=Mk);const v=C/2/(2.5+C/50);t.width=(t.width??0)-s-v*3,t.width<Ik&&(t.width=Ik)}const{shapeSvg:a,bbox:c,label:h}=await Wt(e,t,jt(t)),u=(t.height?t.height:c.height)+s,d=u/2,f=d/(2.5+u/50),m=(t.width?t.width:c.width)+f+s,{cssStyles:g}=t;let x;if(t.look==="handDrawn"){const C=Tt.svg(a),k=q9(0,0,m,u,f,d),v=H9(0,0,m,u,f,d),T=C.path(k,Bt(t,{})),B=C.path(v,Bt(t,{fill:"none"}));x=a.insert(()=>B,":first-child"),x=a.insert(()=>T,":first-child"),x.attr("class","basic label-container"),g&&x.attr("style",g)}else{const C=W9(0,0,m,u,f,d);x=a.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",Qe(g)).attr("style",i),x.attr("class","basic label-container outer-path"),g&&x.selectAll("path").attr("style",g),i&&x.selectAll("path").attr("style",i)}return x.attr("label-offset-x",f),x.attr("transform",`translate(${-m/2}, ${u/2} )`),h.attr("transform",`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Et(t,x),t.intersect=function(C){const k=bt.rect(t,C),v=k.y-(t.y??0);if(d!=0&&(Math.abs(v)<(t.height??0)/2||Math.abs(v)==(t.height??0)/2&&Math.abs(k.x-(t.x??0))>(t.width??0)/2-f)){let T=f*f*(1-v*v/(d*d));T!=0&&(T=Math.sqrt(Math.abs(T))),T=f-T,C.x-(t.x??0)>0&&(T=-T),k.x+=T}return k},a}w(T_,"tiltedCylinder");async function __(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=(t.look==="neo",n),a=t.look==="neo"?n*2:n,{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=((t==null?void 0:t.height)??h.height)+s,d=((t==null?void 0:t.width)??h.width)+a,f=[{x:-3*u/6,y:0},{x:d+3*u/6,y:0},{x:d,y:-u},{x:0,y:-u}];let m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const x=Tt.svg(c),C=Bt(t,{}),k=ne(f),v=x.path(k,C);m=c.insert(()=>v,":first-child").attr("transform",`translate(${-d/2}, ${u/2})`),g&&m.attr("style",g)}else m=_n(c,d,u,f);return i&&m.attr("style",i),t.width=d,t.height=u,Et(t,m),t.intersect=function(x){return bt.polygon(t,f,x)},c}w(__,"trapezoid");async function B_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,c=15,h=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<h&&(t.height=h),t.width=(t.width??0)-s*2,t.width<c&&(t.width=c));const{shapeSvg:u,bbox:d}=await Wt(e,t,jt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:d.width)+s*2,m=(t!=null&&t.height?t==null?void 0:t.height:d.height)+a*2,{cssStyles:g}=t,x=Tt.svg(u),C=Bt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-f/2*.8,y:-m/2},{x:f/2*.8,y:-m/2},{x:f/2,y:-m/2*.6},{x:f/2,y:m/2},{x:-f/2,y:m/2},{x:-f/2,y:-m/2*.6}],v=ne(k),T=x.path(v,C),B=u.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),Et(t,B),t.intersect=function(M){return bt.polygon(t,k,M)},u}w(B_,"trapezoidalPentagon");var Pk=10,Ok=10;async function L_(e,t){var M;const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-s)/2,t.width<Ok&&(t.width=Ok),t.height=(t==null?void 0:t.height)??0,t.height<Pk&&(t.height=Pk));const{shapeSvg:a,bbox:c,label:h}=await Wt(e,t,jt(t)),u=wn((M=he().flowchart)==null?void 0:M.htmlLabels),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s,f=t!=null&&t.height?t==null?void 0:t.height:d+c.height,m=f,g=[{x:0,y:0},{x:m,y:0},{x:m/2,y:-f}],{cssStyles:x}=t,C=Tt.svg(a),k=Bt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=ne(g),T=C.path(v,k),B=a.insert(()=>T,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return x&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),t.width=d,t.height=f,Et(t,B),h.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${f/2-(c.height+(t.padding??0)/(u?2:1)-(c.y-(c.top??0)))})`),t.intersect=function(O){return lt.info("Triangle intersect",t,g,O),bt.polygon(t,g,O)},a}w(L_,"triangle");async function E_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:h,bbox:u,label:d}=await Wt(e,t,jt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:u.width)+(s??0)*2,m=(t!=null&&t.height?t==null?void 0:t.height:u.height)+(a??0)*2,g=t.look==="neo"?m/4:m/8,x=m+(c?g:-g),{cssStyles:C}=t,v=14-f,T=v>0?v/2:0,B=Tt.svg(h),M=Bt(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const O=[{x:-f/2-T,y:x/2},...co(-f/2-T,x/2,f/2+T,x/2,g,.8),{x:f/2+T,y:-x/2},{x:-f/2-T,y:-x/2}],F=ne(O),E=B.path(F,M),z=h.insert(()=>E,":first-child");return z.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-g/2})`),d.attr("transform",`translate(${-f/2+(t.padding??0)-(u.x-(u.left??0))},${-m/2+(t.padding??0)-g-(u.y-(u.top??0))})`),Et(t,z),t.intersect=function(K){return bt.polygon(t,O,K)},h}w(E_,"waveEdgedRectangle");async function A_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?20:n;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const M=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-M*(20/9)),t.width=t.width-s*2}const{shapeSvg:c,bbox:h}=await Wt(e,t,jt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2,d=(t!=null&&t.height?t==null?void 0:t.height:h.height)+a,f=d/8,m=d+f*2,{cssStyles:g}=t,x=Tt.svg(c),C=Bt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-u/2,y:m/2},...co(-u/2,m/2,u/2,m/2,f,1),{x:u/2,y:-m/2},...co(u/2,-m/2,-u/2,-m/2,f,-1)],v=ne(k),T=x.path(v,C),B=c.insert(()=>T,":first-child");return B.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),Et(t,B),t.intersect=function(M){return bt.polygon(t,k,M)},c}w(A_,"waveRectangle");var Me=10;async function F_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-n*2-Me,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-Me,10));const{shapeSvg:a,bbox:c,label:h}=await Wt(e,t,jt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+n*2+Me,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+s*2+Me,f=u-Me,m=d-Me,g=-f/2,x=-m/2,{cssStyles:C}=t,k=Tt.svg(a),v=Bt(t,{}),T=[{x:g-Me,y:x-Me},{x:g-Me,y:x+m},{x:g+f,y:x+m},{x:g+f,y:x-Me}],B=`M${g-Me},${x-Me} L${g+f},${x-Me} L${g+f},${x+m} L${g-Me},${x+m} L${g-Me},${x-Me}
303
+ M${g-Me},${x} L${g+f},${x}
304
+ M${g},${x-Me} L${g},${x+m}`;t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const M=k.path(B,v),O=a.insert(()=>M,":first-child");return O.attr("transform",`translate(${Me/2}, ${Me/2})`),O.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)+Me/2-(c.x-(c.left??0))}, ${-(c.height/2)+Me/2-(c.y-(c.top??0))})`),Et(t,O),t.intersect=function(F){return bt.polygon(t,T,F)},a}w(F_,"windowPane");var Dk=new Set(["redux-color","redux-dark-color"]),U9=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ly(e,t){var Ct,Dt,Mt,Yt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:n}=Be(),{rowEven:s,rowOdd:a,nodeBorder:c,borderColorArray:h}=n;if(t.look==="handDrawn"){const{themeVariables:xt}=Be(),{background:Ot}=xt,se={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ot}`]};await Ly(e,se)}const u=Be();t.useHtmlLabels=u.htmlLabels;let d=((Ct=u.er)==null?void 0:Ct.diagramPadding)??10,f=((Dt=u.er)==null?void 0:Dt.entityPadding)??6;const{cssStyles:m}=t,{labelStyles:g,nodeStyles:x}=Lt(t);if(r.attributes.length===0&&t.label){const xt={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5};bn(t.label,u)+xt.labelPaddingX*2<u.er.minEntityWidth&&(t.width=u.er.minEntityWidth);const Ot=await gc(e,t,xt);if(i!=null&&Dk.has(i)){const se=r.colorIndex??0;Ot.attr("data-color-id",`color-${se%h.length}`)}if(!wn(u.htmlLabels)){const se=Ot.select("text"),le=(Mt=se.node())==null?void 0:Mt.getBBox();se.attr("transform",`translate(${-le.width/2}, 0)`)}return Ot}u.htmlLabels||(d*=1.25,f*=1.25);let C=jt(t);C||(C="node default");const k=e.insert("g").attr("class",C).attr("id",t.domId||t.id),v=await Ps(k,t.label??"",u,0,0,["name"],g);v.height+=f;let T=0;const B=[],M=[];let O=0,F=0,E=0,z=0,K=!0,P=!0;for(const xt of r.attributes){const Ot=await Ps(k,xt.type,u,0,T,["attribute-type"],g);O=Math.max(O,Ot.width+d);const se=await Ps(k,xt.name,u,0,T,["attribute-name"],g);F=Math.max(F,se.width+d);const le=await Ps(k,xt.keys.join(),u,0,T,["attribute-keys"],g);E=Math.max(E,le.width+d);const Ue=await Ps(k,xt.comment,u,0,T,["attribute-comment"],g);z=Math.max(z,Ue.width+d);const Le=Math.max(Ot.height,se.height,le.height,Ue.height)+f;M.push({yOffset:T,rowHeight:Le}),T+=Le}let N=4;E<=d&&(K=!1,E=0,N--),z<=d&&(P=!1,z=0,N--);const Z=k.node().getBBox();if(v.width+d*2-(O+F+E+z)>0){const xt=v.width+d*2-(O+F+E+z);O+=xt/N,F+=xt/N,E>0&&(E+=xt/N),z>0&&(z+=xt/N)}const it=O+F+E+z,V=Tt.svg(k),j=Bt(t,{});t.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");let q=0;M.length>0&&(q=M.reduce((xt,Ot)=>xt+((Ot==null?void 0:Ot.rowHeight)??0),0));const Y=Math.max(Z.width+d*2,(t==null?void 0:t.width)||0,it),R=Math.max((q??0)+v.height,(t==null?void 0:t.height)||0),J=-Y/2,I=-R/2;if(k.selectAll("g:not(:first-child)").each((xt,Ot,se)=>{const le=Qt(se[Ot]),Ue=le.attr("transform");let Le=0,Jr=0;if(Ue){const mr=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ue);mr&&(Le=parseFloat(mr[1]),Jr=parseFloat(mr[2]),le.attr("class").includes("attribute-name")?Le+=O:le.attr("class").includes("attribute-keys")?Le+=O+F:le.attr("class").includes("attribute-comment")&&(Le+=O+F+E))}le.attr("transform",`translate(${J+d/2+Le}, ${Jr+I+v.height+f/2})`)}),k.select(".name").attr("transform","translate("+-v.width/2+", "+(I+f/2)+")"),i!=null&&Dk.has(i)){const xt=r.colorIndex??0;k.attr("data-color-id",`color-${xt%h.length}`)}const W=V.rectangle(J,I,Y,R,j),et=k.insert(()=>W,":first-child").attr("class","outer-path").attr("style",m.join(""));B.push(0);for(const[xt,Ot]of M.entries()){const le=(xt+1)%2===0&&Ot.yOffset!==0,Ue=V.rectangle(J,v.height+I+(Ot==null?void 0:Ot.yOffset),Y,Ot==null?void 0:Ot.rowHeight,{...j,fill:le?s:a,stroke:c});k.insert(()=>Ue,"g.label").attr("style",m.join("")).attr("class",`row-rect-${le?"even":"odd"}`)}const D=1e-4;let yt=Os(J,v.height+I,Y+J,v.height+I,D),pt=V.polygon(yt.map(xt=>[xt.x,xt.y]),j);if(k.insert(()=>pt).attr("class","divider"),yt=Os(O+J,v.height+I,O+J,R+I,D),pt=V.polygon(yt.map(xt=>[xt.x,xt.y]),j),k.insert(()=>pt).attr("class","divider"),K){const xt=O+F+J;yt=Os(xt,v.height+I,xt,R+I,D),pt=V.polygon(yt.map(Ot=>[Ot.x,Ot.y]),j),k.insert(()=>pt).attr("class","divider")}if(P){const xt=O+F+E+J;yt=Os(xt,v.height+I,xt,R+I,D),pt=V.polygon(yt.map(Ot=>[Ot.x,Ot.y]),j),k.insert(()=>pt).attr("class","divider")}for(const xt of B){const Ot=v.height+I+xt;yt=Os(J,Ot,Y+J,Ot,D),pt=V.polygon(yt.map(se=>[se.x,se.y]),j),k.insert(()=>pt).attr("class","divider")}if(Et(t,et),x&&t.look!=="handDrawn")if(i!=null&&U9.has(i))k.selectAll("path").attr("style",x);else{const xt=x.split(";"),Ot=(Yt=xt==null?void 0:xt.filter(se=>se.includes("stroke")))==null?void 0:Yt.map(se=>`${se}`).join("; ");k.selectAll("path").attr("style",Ot??""),k.selectAll(".row-rect-even path").attr("style",x)}return t.intersect=function(xt){return bt.rect(t,xt)},k}w(Ly,"erBox");async function Ps(e,t,r,i=0,n=0,s=[],a=""){const c=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",a);t!==mC(t)&&(t=mC(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const h=c.node().appendChild(await Tn(c,t,{width:bn(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let d=h.children[0];for(d.textContent=d.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let u=h.getBBox();if(wn(r.htmlLabels)){const d=h.children[0];d.style.textAlign="start";const f=Qt(h);u=d.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}return u}w(Ps,"addText");function Os(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}w(Os,"lineToPolygon");async function M_(e,t,r,i,n=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",jt(t)).attr("id",t.domId||t.id);let c=null,h=null,u=null,d=null,f=0,m=0,g=0;if(c=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const T=t.annotations[0];await Bl(c,{text:`«${T}»`},0),f=c.node().getBBox().height}h=a.insert("g").attr("class","label-group text"),await Bl(h,t,0,["font-weight: bolder"]);const x=h.node().getBBox();m=x.height,u=a.insert("g").attr("class","members-group text");let C=0;for(const T of t.members){const B=await Bl(u,T,C,[T.parseClassifier()]);C+=B+s}g=u.node().getBBox().height,g<=0&&(g=n/2),d=a.insert("g").attr("class","methods-group text");let k=0;for(const T of t.methods){const B=await Bl(d,T,k,[T.parseClassifier()]);k+=B+s}let v=a.node().getBBox();if(c!==null){const T=c.node().getBBox();c.attr("transform",`translate(${-T.width/2})`)}return h.attr("transform",`translate(${-x.width/2}, ${f})`),v=a.node().getBBox(),u.attr("transform",`translate(0, ${f+m+n*2})`),v=a.node().getBBox(),d.attr("transform",`translate(0, ${f+m+(g?g+n*4:n*2)})`),v=a.node().getBBox(),{shapeSvg:a,bbox:v}}w(M_,"textHelper");async function Bl(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Be();let a="useHtmlLabels"in t?t.useHtmlLabels:wn(s.htmlLabels)??!0,c="";"text"in t?c=t.text:c=t.label,!a&&c.startsWith("\\")&&(c=c.substring(1)),jl(c)&&(a=!0);const h=await Tn(n,Rm(Vo(c)),{width:bn(c,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let u,d=1;if(a){const f=h.children[0],m=Qt(h);d=f.innerHTML.split("<br>").length,f.innerHTML.includes("</math>")&&(d+=f.innerHTML.split("<mrow>").length-1);const g=f.getElementsByTagName("img");if(g){const x=c.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...g].map(C=>new Promise(k=>{function v(){var T;if(C.style.display="flex",C.style.flexDirection="column",x){const B=((T=s.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,O=parseInt(B,10)*5+"px";C.style.minWidth=O,C.style.maxWidth=O}else C.style.width="100%";k(C)}w(v,"setupImage"),setTimeout(()=>{C.complete&&v()}),C.addEventListener("error",v),C.addEventListener("load",v)})))}u=f.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}else{i.includes("font-weight: bolder")&&Qt(h).selectAll("tspan").attr("font-weight",""),d=h.children.length;const f=h.children[0];(h.textContent===""||h.textContent.includes("&gt"))&&(f.textContent=c[0]+c.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),c[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=h.getBBox()}return n.attr("transform","translate(0,"+(-u.height/(2*d)+r)+")"),u.height}w(Bl,"addText");async function I_(e,t){var V,j;const r=he(),{themeVariables:i}=r,{useGradient:n}=i,s=r.class.padding??12,a=s,c=t.useHtmlLabels??wn(r.htmlLabels)??!0,h=t;h.annotations=h.annotations??[],h.members=h.members??[],h.methods=h.methods??[];const{shapeSvg:u,bbox:d}=await M_(e,t,r,c,a),{labelStyles:f,nodeStyles:m}=Lt(t);t.labelStyle=f,t.cssStyles=h.styles||"";const g=((V=h.styles)==null?void 0:V.join(";"))||m||"";t.cssStyles||(t.cssStyles=g.replaceAll("!important","").split(";"));const x=h.members.length===0&&h.methods.length===0&&!((j=r.class)!=null&&j.hideEmptyMembersBox),C=Tt.svg(u),k=Bt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=Math.max(t.width??0,d.width);let T=Math.max(t.height??0,d.height);const B=(t.height??0)>d.height;h.members.length===0&&h.methods.length===0?T+=a:h.members.length>0&&h.methods.length===0&&(T+=a*2);const M=-v/2,O=-T/2;let F=x?s*2:h.members.length===0&&h.methods.length===0?-s:0;B&&(F=s*2);const E=C.rectangle(M-s,O-s-(x?s:h.members.length===0&&h.methods.length===0?-s/2:0),v+2*s,T+2*s+F,k),z=u.insert(()=>E,":first-child");z.attr("class","basic label-container outer-path");const K=z.node().getBBox(),P=u.select(".annotation-group").node().getBBox().height-(x?s/2:0)||0,N=u.select(".label-group").node().getBBox().height-(x?s/2:0)||0,Z=u.select(".members-group").node().getBBox().height-(x?s/2:0)||0,it=(P+N+O+s-(O-s-(x?s:h.members.length===0&&h.methods.length===0?-s/2:0)))/2;if(u.selectAll(".text").each((q,Y,R)=>{var yt,pt;const J=Qt(R[Y]),I=J.attr("transform");let W=0;if(I){const Dt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);Dt&&(W=parseFloat(Dt[2]))}let et=W+O+s-(x?s:h.members.length===0&&h.methods.length===0?-s/2:0);if(J.attr("class").includes("methods-group")){const Ct=Math.max(Z,a/2);B?et=Math.max(it,P+N+Ct+O+a*2+s)+a*2:et=P+N+Ct+O+a*4+s}h.members.length===0&&h.methods.length===0&&((yt=r.class)!=null&&yt.hideEmptyMembersBox)&&(h.annotations.length>0?et=W-a:et=W),c||(et-=4);let D=M;(J.attr("class").includes("label-group")||J.attr("class").includes("annotation-group"))&&(D=-((pt=J.node())==null?void 0:pt.getBBox().width)/2||0,u.selectAll("text").each(function(Ct,Dt,Mt){window.getComputedStyle(Mt[Dt]).textAnchor==="middle"&&(D=0)})),J.attr("transform",`translate(${D}, ${et})`)}),h.members.length>0||h.methods.length>0||x){const q=P+N+O+s,Y=C.line(K.x,q,K.x+K.width,q+.001,k);u.insert(()=>Y).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",g)}if(x||h.members.length>0||h.methods.length>0){const q=P+N+Z+O+a*2+s,Y=C.line(K.x,B?Math.max(it,q):q,K.x+K.width,(B?Math.max(it,q):q)+.001,k);u.insert(()=>Y).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",g)}if(h.look!=="handDrawn"&&u.selectAll("path").attr("style",g),z.select(":nth-child(2)").attr("style",g),u.selectAll(".divider").select("path").attr("style",g),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",g),!c){const q=RegExp(/color\s*:\s*([^;]*)/),Y=q.exec(g);if(Y){const R=Y[0].replace("color","fill");u.selectAll("tspan").attr("style",R)}else if(f){const R=q.exec(f);if(R){const J=R[0].replace("color","fill");u.selectAll("tspan").attr("style",J)}}}return Et(t,z),t.intersect=function(q){return bt.rect(t,q)},u}w(I_,"classBox");async function P_(e,t){var K,P;const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const n=t,s=t,a=20,c=20,h="verifyMethod"in t,u=jt(t),{themeVariables:d}=he(),{borderColorArray:f,requirementEdgeLabelBackground:m}=d,g=e.insert("g").attr("class",u).attr("id",t.domId??t.id);let x;h?x=await Ui(g,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):x=await Ui(g,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let C=x;const k=await Ui(g,n.name,C,t.labelStyle+"; font-weight: bold;");if(C+=k+c,h){const N=await Ui(g,`${n.requirementId?`ID: ${n.requirementId}`:""}`,C,t.labelStyle);C+=N;const Z=await Ui(g,`${n.text?`Text: ${n.text}`:""}`,C,t.labelStyle);C+=Z;const it=await Ui(g,`${n.risk?`Risk: ${n.risk}`:""}`,C,t.labelStyle);C+=it,await Ui(g,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,C,t.labelStyle)}else{const N=await Ui(g,`${s.type?`Type: ${s.type}`:""}`,C,t.labelStyle);C+=N,await Ui(g,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,C,t.labelStyle)}const v=(((K=g.node())==null?void 0:K.getBBox().width)??200)+a,T=(((P=g.node())==null?void 0:P.getBBox().height)??200)+a,B=-v/2,M=-T/2,O=Tt.svg(g),F=Bt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const E=O.rectangle(B,M,v,T,F),z=g.insert(()=>E,":first-child");if(z.attr("class","basic label-container outer-path").attr("style",i),f!=null&&f.length){const N=t.colorIndex??0;g.attr("data-color-id",`color-${N%f.length}`)}if(g.selectAll(".label").each((N,Z,it)=>{const V=Qt(it[Z]),j=V.attr("transform");let q=0,Y=0;if(j){const W=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);W&&(q=parseFloat(W[1]),Y=parseFloat(W[2]))}const R=Y-T/2;let J=B+a/2;(Z===0||Z===1)&&(J=q),V.attr("transform",`translate(${J}, ${R+a})`)}),C>x+k+c){const N=M+x+k+c;let Z;if(t.look==="neo"){const j=[[B,N],[B+v,N],[B+v,N+.001],[B,N+.001]];Z=O.polygon(j,F)}else Z=O.line(B,N,B+v,N,F);g.insert(()=>Z).attr("class","divider")}return Et(t,z),t.intersect=function(N){return bt.rect(t,N)},i&&t.look!=="handDrawn"&&(m||f!=null&&f.length)&&g.selectAll("path").attr("style",i),g}w(P_,"requirementBox");async function Ui(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),s=he(),a=s.htmlLabels??!0,c=await Tn(n,Rm(Vo(t)),{width:bn(t,s)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},s);let h;if(a){const u=c.children[0],d=Qt(c);h=u.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}else{const u=c.children[0];for(const d of u.children)i&&d.setAttribute("style",i);h=c.getBBox(),h.height+=6}return n.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}w(Ui,"addText");var V9=w(e=>{switch(e){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 O_(e,t,{config:r}){var Z,it;const{labelStyles:i,nodeStyles:n}=Lt(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:c,bbox:h,label:u}=await Wt(e,t,jt(t)),d=t.padding||10;let f="",m;"ticket"in t&&t.ticket&&((Z=r==null?void 0:r.kanban)!=null&&Z.ticketBaseUrl)&&(f=(it=r==null?void 0:r.kanban)==null?void 0:it.ticketBaseUrl.replace("#TICKET#",t.ticket),m=c.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));const g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let x,C;m?{label:x,bbox:C}=await jp(m,"ticket"in t&&t.ticket||"",g):{label:x,bbox:C}=await jp(c,"ticket"in t&&t.ticket||"",g);const{label:k,bbox:v}=await jp(c,"assigned"in t&&t.assigned||"",g);t.width=a;const T=10,B=(t==null?void 0:t.width)||0,M=Math.max(C.height,v.height)/2,O=Math.max(h.height+T*2,(t==null?void 0:t.height)||0)+M,F=-B/2,E=-O/2;u.attr("transform","translate("+(d-B/2)+", "+(-M-h.height/2)+")"),x.attr("transform","translate("+(d-B/2)+", "+(-M+h.height/2)+")"),k.attr("transform","translate("+(d+B/2-v.width-2*s)+", "+(-M+h.height/2)+")");let z;const{rx:K,ry:P}=t,{cssStyles:N}=t;if(t.look==="handDrawn"){const V=Tt.svg(c),j=Bt(t,{}),q=K||P?V.path(fo(F,E,B,O,K||0),j):V.rectangle(F,E,B,O,j);z=c.insert(()=>q,":first-child"),z.attr("class","basic label-container").attr("style",N||null)}else{z=c.insert("rect",":first-child"),z.attr("class","basic label-container __APA__").attr("style",n).attr("rx",K??5).attr("ry",P??5).attr("x",F).attr("y",E).attr("width",B).attr("height",O);const V="priority"in t&&t.priority;if(V){const j=c.append("line"),q=F+2,Y=E+Math.floor((K??0)/2),R=E+O-Math.floor((K??0)/2);j.attr("x1",q).attr("y1",Y).attr("x2",q).attr("y2",R).attr("stroke-width","4").attr("stroke",V9(V))}}return Et(t,z),t.height=O,t.intersect=function(V){return bt.rect(t,V)},c}w(O_,"kanbanItem");async function D_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:c}=await Wt(e,t,jt(t)),h=s.width+10*a,u=s.height+8*a,d=.15*h,{cssStyles:f}=t,m=s.width+20,g=s.height+20,x=Math.max(h,m),C=Math.max(u,g);c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let k;const v=`M0 0
305
+ a${d},${d} 1 0,0 ${x*.25},${-1*C*.1}
306
+ a${d},${d} 1 0,0 ${x*.25},0
307
+ a${d},${d} 1 0,0 ${x*.25},0
308
+ a${d},${d} 1 0,0 ${x*.25},${C*.1}
309
+
310
+ a${d},${d} 1 0,0 ${x*.15},${C*.33}
311
+ a${d*.8},${d*.8} 1 0,0 0,${C*.34}
312
+ a${d},${d} 1 0,0 ${-1*x*.15},${C*.33}
313
+
314
+ a${d},${d} 1 0,0 ${-1*x*.25},${C*.15}
315
+ a${d},${d} 1 0,0 ${-1*x*.25},0
316
+ a${d},${d} 1 0,0 ${-1*x*.25},0
317
+ a${d},${d} 1 0,0 ${-1*x*.25},${-1*C*.15}
318
+
319
+ a${d},${d} 1 0,0 ${-1*x*.1},${-1*C*.33}
320
+ a${d*.8},${d*.8} 1 0,0 0,${-1*C*.34}
321
+ a${d},${d} 1 0,0 ${x*.1},${-1*C*.33}
322
+ H0 V0 Z`;if(t.look==="handDrawn"){const T=Tt.svg(n),B=Bt(t,{}),M=T.path(v,B);k=n.insert(()=>M,":first-child"),k.attr("class","basic label-container").attr("style",Qe(f))}else k=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",v);return k.attr("transform",`translate(${-x/2}, ${-C/2})`),Et(t,k),t.calcIntersect=function(T,B){return bt.rect(T,B)},t.intersect=function(T){return lt.info("Bang intersect",t,T),bt.rect(t,T)},n}w(D_,"bang");async function R_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:c}=await Wt(e,t,jt(t)),h=s.width+2*a,u=s.height+2*a,d=.15*h,f=.25*h,m=.35*h,g=.2*h,{cssStyles:x}=t;let C;const k=`M0 0
323
+ a${d},${d} 0 0,1 ${h*.25},${-1*h*.1}
324
+ a${m},${m} 1 0,1 ${h*.4},${-1*h*.1}
325
+ a${f},${f} 1 0,1 ${h*.35},${h*.2}
326
+
327
+ a${d},${d} 1 0,1 ${h*.15},${u*.35}
328
+ a${g},${g} 1 0,1 ${-1*h*.15},${u*.65}
329
+
330
+ a${f},${d} 1 0,1 ${-1*h*.25},${h*.15}
331
+ a${m},${m} 1 0,1 ${-1*h*.5},0
332
+ a${d},${d} 1 0,1 ${-1*h*.25},${-1*h*.15}
333
+
334
+ a${d},${d} 1 0,1 ${-1*h*.1},${-1*u*.35}
335
+ a${g},${g} 1 0,1 ${h*.1},${-1*u*.65}
336
+ H0 V0 Z`;if(t.look==="handDrawn"){const v=Tt.svg(n),T=Bt(t,{}),B=v.path(k,T);C=n.insert(()=>B,":first-child"),C.attr("class","basic label-container").attr("style",Qe(x))}else C=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",k);return c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),C.attr("transform",`translate(${-h/2}, ${-u/2})`),Et(t,C),t.calcIntersect=function(v,T){return bt.rect(v,T)},t.intersect=function(v){return lt.info("Cloud intersect",t,v),bt.rect(t,v)},n}w(R_,"cloud");async function $_(e,t){const{labelStyles:r,nodeStyles:i}=Lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:c}=await Wt(e,t,jt(t)),h=s.width+8*a,u=s.height+2*a,d=5,f=t.look==="neo"?`
337
+ M${-h/2} ${u/2-d}
338
+ v${-u+2*d}
339
+ q0,-${d} ${d},-${d}
340
+ h${h-2*d}
341
+ q${d},0 ${d},${d}
342
+ v${u-d}
343
+ H${-h/2}
344
+ Z
345
+ `:`
346
+ M${-h/2} ${u/2-d}
347
+ v${-u+2*d}
348
+ q0,-${d} ${d},-${d}
349
+ h${h-2*d}
350
+ q${d},0 ${d},${d}
351
+ v${u-2*d}
352
+ q0,${d} ${-d},${d}
353
+ h${-(h-2*d)}
354
+ q${-d},0 ${-d},${-d}
355
+ Z
356
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const m=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",f);return n.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",u/2).attr("x2",h/2).attr("y2",u/2),c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),n.append(()=>c.node()),Et(t,m),t.calcIntersect=function(g,x){return bt.rect(g,x)},t.intersect=function(g){return bt.rect(t,g)},n}w($_,"defaultMindmapNode");async function z_(e,t){const r={padding:t.padding??0};return By(e,t,r)}w(z_,"mindmapCircle");var Y9=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:m_},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:f_},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:y_},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:b_},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:NT},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:By},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:D_},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:R_},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:h_},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:YT},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:i_},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:r_},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:__},{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:t_},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:WT},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:S_},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:MT},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:p_},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:k_},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:C_},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:UT},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:GT},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:DT},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:RT},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:$T},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:n_},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:E_},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:VT},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:T_},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:o_},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:zT},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:jT},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:L_},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:F_},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:qT},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:B_},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:HT},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:g_},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:l_},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:a_},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:FT},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:OT},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:w_},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:v_},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:A_},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:u_},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:s_}],G9=w(()=>{const t=[...Object.entries({state:x_,choice:IT,note:c_,rectWithTitle:d_,labelRect:e_,iconSquare:ZT,iconCircle:QT,icon:XT,iconRounded:KT,imageSquare:JT,anchor:ET,kanbanItem:O_,mindmapCircle:z_,defaultMindmapNode:$_,classBox:I_,erBox:Ly,requirementBox:P_}),...Y9.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),N_=G9();function X9(e){return e in N_}w(X9,"isValidShape");var md=new Map;async function j_(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?N_[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),n=await s(i,t,r)}else n=await s(e,t,r),i=n;return i.attr("data-look",Qe(t.look)),t.tooltip&&n.attr("title",t.tooltip),md.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}w(j_,"insertNode");var YV=w((e,t)=>{md.set(t.id,e)},"setNodeElem"),GV=w(()=>{md.clear()},"clear"),XV=w(e=>{const t=md.get(e.id);lt.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Q9=w((e,t,r,i,n,s=!1,a)=>{t.arrowTypeStart&&Rk(e,"start",t.arrowTypeStart,r,i,n,s,a),t.arrowTypeEnd&&Rk(e,"end",t.arrowTypeEnd,r,i,n,s,a)},"addEdgeMarkers"),K9={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}},Z9=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Rk=w((e,t,r,i,n,s,a=!1,c)=>{var x;const h=K9[r],u=h&&Z9.includes(h.type);if(!h){lt.warn(`Unknown arrow type: ${r}`);return}const d=h.type,g=`${n}_${s}-${d}${t==="start"?"Start":"End"}${a&&u?"-margin":""}`;if(c&&c.trim()!==""){const C=c.replace(/[^\dA-Za-z]/g,"_"),k=`${g}_${C}`;if(!document.getElementById(k)){const v=document.getElementById(g);if(v){const T=v.cloneNode(!0);T.id=k,T.querySelectorAll("path, circle, line").forEach(M=>{M.setAttribute("stroke",c),h.fill&&M.setAttribute("fill",c)}),(x=v.parentNode)==null||x.appendChild(T)}}e.attr(`marker-${t}`,`url(${i}#${k})`)}else e.attr(`marker-${t}`,`url(${i}#${g})`)},"addEdgeMarker"),J9=w(e=>{var t,r;return typeof e=="string"?e:(r=(t=he())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),qu=new Map,ir=new Map,QV=w(()=>{qu.clear(),ir.clear()},"clear"),kl=w(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),tW=w(async(e,t)=>{const r=he();let i=Tr(r);const{labelStyles:n}=Lt(t);t.labelStyle=n;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),c=t.labelType==="markdown",u=await Tn(e,t.label,{style:kl(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:c,width:c?void 0:void 0},r);a.node().appendChild(u),lt.info("abc82",t,t.labelType);let d=u.getBBox(),f=d;if(i){const g=u.children[0],x=Qt(u);d=g.getBoundingClientRect(),f=d,x.attr("width",d.width),x.attr("height",d.height)}else{const g=Qt(u).select("text").node();g&&typeof g.getBBox=="function"&&(f=g.getBBox())}a.attr("transform",pl(f,i)),qu.set(t.id,s),t.width=d.width,t.height=d.height;let m;if(t.startLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner"),C=await ro(x,t.startLabelLeft,kl(t.labelStyle)||"",!1,!1);m=C;let k=C.getBBox();if(i){const v=C.children[0],T=Qt(C);k=v.getBoundingClientRect(),T.attr("width",k.width),T.attr("height",k.height)}x.attr("transform",pl(k,i)),ir.get(t.id)||ir.set(t.id,{}),ir.get(t.id).startLeft=g,Ll(m,t.startLabelLeft)}if(t.startLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner"),C=await ro(x,t.startLabelRight,kl(t.labelStyle)||"",!1,!1);m=C,x.node().appendChild(C);let k=C.getBBox();if(i){const v=C.children[0],T=Qt(C);k=v.getBoundingClientRect(),T.attr("width",k.width),T.attr("height",k.height)}x.attr("transform",pl(k,i)),ir.get(t.id)||ir.set(t.id,{}),ir.get(t.id).startRight=g,Ll(m,t.startLabelRight)}if(t.endLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner"),C=await ro(x,t.endLabelLeft,kl(t.labelStyle)||"",!1,!1);m=C;let k=C.getBBox();if(i){const v=C.children[0],T=Qt(C);k=v.getBoundingClientRect(),T.attr("width",k.width),T.attr("height",k.height)}x.attr("transform",pl(k,i)),g.node().appendChild(C),ir.get(t.id)||ir.set(t.id,{}),ir.get(t.id).endLeft=g,Ll(m,t.endLabelLeft)}if(t.endLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),x=g.insert("g").attr("class","inner"),C=await ro(x,t.endLabelRight,kl(t.labelStyle)||"",!1,!1);m=C;let k=C.getBBox();if(i){const v=C.children[0],T=Qt(C);k=v.getBoundingClientRect(),T.attr("width",k.width),T.attr("height",k.height)}x.attr("transform",pl(k,i)),g.node().appendChild(C),ir.get(t.id)||ir.set(t.id,{}),ir.get(t.id).endRight=g,Ll(m,t.endLabelRight)}return u},"insertEdgeLabel");function Ll(e,t){Tr(he())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}w(Ll,"setTerminalWidth");var eW=w((e,t)=>{lt.debug("Moving label abc88 ",e.id,e.label,qu.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=he(),{subGraphTitleTotalMargin:n}=py(i);if(e.label){const s=qu.get(e.id);let a=e.x,c=e.y;if(r){const h=Ei.calcLabelPosition(r);lt.debug("Moving label "+e.label+" from (",a,",",c,") to (",h.x,",",h.y,") abc88"),t.updatedPath&&(a=h.x,c=h.y)}s.attr("transform",`translate(${a}, ${c+n/2})`)}if(e.startLabelLeft){const s=ir.get(e.id).startLeft;let a=e.x,c=e.y;if(r){const h=Ei.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=h.x,c=h.y}s.attr("transform",`translate(${a}, ${c})`)}if(e.startLabelRight){const s=ir.get(e.id).startRight;let a=e.x,c=e.y;if(r){const h=Ei.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=h.x,c=h.y}s.attr("transform",`translate(${a}, ${c})`)}if(e.endLabelLeft){const s=ir.get(e.id).endLeft;let a=e.x,c=e.y;if(r){const h=Ei.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=h.x,c=h.y}s.attr("transform",`translate(${a}, ${c})`)}if(e.endLabelRight){const s=ir.get(e.id).endRight;let a=e.x,c=e.y;if(r){const h=Ei.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=h.x,c=h.y}s.attr("transform",`translate(${a}, ${c})`)}},"positionEdgeLabel"),rW=w((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,c=e.height/2;return n>=a||s>=c},"outsideNode"),iW=w((e,t,r)=>{lt.debug(`intersection calc abc89:
357
+ outsidePoint: ${JSON.stringify(t)}
358
+ insidePoint : ${JSON.stringify(r)}
359
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,s=Math.abs(i-r.x),a=e.width/2;let c=r.x<t.x?a-s:a+s;const h=e.height/2,u=Math.abs(t.y-r.y),d=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*a>Math.abs(i-t.x)*h){let f=r.y<t.y?t.y-h-n:n-h-t.y;c=d*f/u;const m={x:r.x<t.x?r.x+c:r.x-d+c,y:r.y<t.y?r.y+u-f:r.y-u+f};return c===0&&(m.x=t.x,m.y=t.y),d===0&&(m.x=t.x),u===0&&(m.y=t.y),lt.debug(`abc89 top/bottom calc, Q ${u}, q ${f}, R ${d}, r ${c}`,m),m}else{r.x<t.x?c=t.x-a-i:c=i-a-t.x;let f=u*c/d,m=r.x<t.x?r.x+d-c:r.x-d+c,g=r.y<t.y?r.y+f:r.y-f;return lt.debug(`sides calc abc89, Q ${u}, q ${f}, R ${d}, r ${c}`,{_x:m,_y:g}),c===0&&(m=t.x,g=t.y),d===0&&(m=t.x),u===0&&(g=t.y),{x:m,y:g}}},"intersection"),$k=w((e,t)=>{lt.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(s=>{if(lt.info("abc88 checking point",s,t),!rW(t,s)&&!n){const a=iW(t,i,s);lt.debug("abc88 inside",s,i,a),lt.debug("abc88 intersection",a,t);let c=!1;r.forEach(h=>{c=c||h.x===a.x&&h.y===a.y}),r.some(h=>h.x===a.x&&h.y===a.y)?lt.warn("abc88 no intersect",a,r):r.push(a),n=!0}else lt.warn("abc88 outside",s,i),i=s,n||r.push(s)}),lt.debug("returning points",r),r},"cutPathAtIntersect");function W_(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],s=e[i],a=e[i+1];(n.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-n.y)>5||n.y===s.y&&s.x===a.x&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}w(W_,"extractCornerPoints");var zk=w(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,s=Math.sqrt(i*i+n*n),a=r/s;return{x:t.x-a*i,y:t.y-a*n}},"findAdjacentPoint"),nW=w(function(e){const{cornerPointPositions:t}=W_(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],s=e[i+1],a=e[i],c=zk(n,a,5),h=zk(s,a,5),u=h.x-c.x,d=h.y-c.y;r.push(c);const f=Math.sqrt(2)*2;let m={x:a.x,y:a.y};if(Math.abs(s.x-n.x)>10&&Math.abs(s.y-n.y)>=10){lt.debug("Corner point fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));const g=5;a.x===c.x?m={x:u<0?c.x-g+f:c.x+g-f,y:d<0?c.y-f:c.y+f}:m={x:u<0?c.x-f:c.x+f,y:d<0?c.y-g+f:c.y+g-f}}else lt.debug("Corner point skipping fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));r.push(m,h)}else r.push(e[i]);return r},"fixCorners"),oW=w((e,t,r)=>{const i=e-t-r,n=2,s=2,a=n+s,c=Math.floor(i/a),h=Array(c).fill(`${n} ${s}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),sW=w(function(e,t,r,i,n,s,a,c=!1){var Y;if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:h}=he();let u=t.points,d=!1;const f=n;var m=s;const g=[];for(const R in t.cssCompiledStyles)jS(R)||g.push(t.cssCompiledStyles[R]);lt.debug("UIO intersect check",t.points,m.x,f.x),m.intersect&&f.intersect&&!c&&(u=u.slice(1,t.points.length-1),u.unshift(f.intersect(u[0])),lt.debug("Last point UIO",t.start,"-->",t.end,u[u.length-1],m,m.intersect(u[u.length-1])),u.push(m.intersect(u[u.length-1])));const x=btoa(JSON.stringify(u));t.toCluster&&(lt.info("to cluster abc88",r.get(t.toCluster)),u=$k(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(lt.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=$k(u.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let C=u.filter(R=>!Number.isNaN(R.y));const k=J9(t.curve);k!=="rounded"&&(C=nW(C));let v=Dl;switch(k){case"linear":v=Dl;break;case"basis":v=wg;break;case"cardinal":v=b2;break;case"bumpX":v=m2;break;case"bumpY":v=y2;break;case"catmullRom":v=w2;break;case"monotoneX":v=E2;break;case"monotoneY":v=A2;break;case"natural":v=M2;break;case"step":v=I2;break;case"stepAfter":v=O2;break;case"stepBefore":v=P2;break;case"rounded":v=Dl;break;default:v=wg}const{x:T,y:B}=t8(t),M=R6().x(T).y(B).curve(v);let O;switch(t.thickness){case"normal":O="edge-thickness-normal";break;case"thick":O="edge-thickness-thick";break;case"invisible":O="edge-thickness-invisible";break;default:O="edge-thickness-normal"}switch(t.pattern){case"solid":O+=" edge-pattern-solid";break;case"dotted":O+=" edge-pattern-dotted";break;case"dashed":O+=" edge-pattern-dashed";break;default:O+=" edge-pattern-solid"}let F,E=k==="rounded"?q_(H_(C,t),5):M(C);const z=Array.isArray(t.style)?t.style:[t.style];let K=z.find(R=>R==null?void 0:R.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let N=!1;if(t.look==="handDrawn"){const R=Tt.svg(e);Object.assign([],C);const J=R.path(E,{roughness:.3,seed:h});O+=" transition",F=Qt(J).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+O+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",z?z.reduce((W,et)=>W+";"+et,""):"");let I=F.attr("d");F.attr("d",I),e.node().appendChild(F.node())}else{const R=g.join(";"),J=z?z.reduce((pt,Ct)=>pt+Ct+";",""):"",I=(R?R+";"+J+";":J)+";"+(z?z.reduce((pt,Ct)=>pt+";"+Ct,""):"");F=e.append("path").attr("d",E).attr("id",`${a}-${t.id}`).attr("class"," "+O+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",I),K=(Y=I.match(/stroke:([^;]+)/))==null?void 0:Y[1],N=t.animate===!0||!!t.animation||R.includes("animation");const W=F.node(),et=typeof W.getTotalLength=="function"?W.getTotalLength():0,D=qC[t.arrowTypeStart]||0,yt=qC[t.arrowTypeEnd]||0;if(t.look==="neo"&&!N){const Ct=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?oW(et,D,yt):`0 ${D} ${et-D-yt} ${yt}`}; stroke-dashoffset: 0;`;F.attr("style",Ct+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",x),F.attr("data-look",Qe(t.look)),t.showPoints&&C.forEach(R=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",R.x).attr("cy",R.y)});let Z="";(he().flowchart.arrowMarkerAbsolute||he().state.arrowMarkerAbsolute)&&(Z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Z=Z.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),lt.info("arrowTypeStart",t.arrowTypeStart),lt.info("arrowTypeEnd",t.arrowTypeEnd);const it=!N&&(t==null?void 0:t.look)==="neo";Q9(F,t,Z,a,i,it,K);const V=Math.floor(u.length/2),j=u[V];Ei.isLabelCoordinateInPath(j,F.attr("d"))||(d=!0);let q={};return d&&(q.updatedPath=u),q.originalPath=t.points,q},"insertEdge");function q_(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let s=0;s<i;s++){const a=e[s],c=e[s-1],h=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const u=a.x-c.x,d=a.y-c.y,f=h.x-a.x,m=h.y-a.y,g=Math.hypot(u,d),x=Math.hypot(f,m);if(g<n||x<n){r+=`L${a.x},${a.y}`;continue}const C=u/g,k=d/g,v=f/x,T=m/x,B=C*v+k*T,M=Math.max(-1,Math.min(1,B)),O=Math.acos(M);if(O<n||Math.abs(Math.PI-O)<n){r+=`L${a.x},${a.y}`;continue}const F=Math.min(t/Math.sin(O/2),g/2,x/2),E=a.x-C*F,z=a.y-k*F,K=a.x+v*F,P=a.y+T*F;r+=`L${E},${z}`,r+=`Q${a.x},${a.y} ${K},${P}`}}return r}w(q_,"generateRoundedPath");function Jg(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}w(Jg,"calculateDeltaAndAngle");function H_(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&hr[t.arrowTypeStart]){const n=hr[t.arrowTypeStart],s=e[0],a=e[1],{angle:c}=Jg(s,a),h=n*Math.cos(c),u=n*Math.sin(c);r[0].x=s.x+h,r[0].y=s.y+u}const i=e.length;if(i>=2&&hr[t.arrowTypeEnd]){const n=hr[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:c}=Jg(a,s),h=n*Math.cos(c),u=n*Math.sin(c);r[i-1].x=s.x-h,r[i-1].y=s.y-u}return r}w(H_,"applyMarkerOffsetsToPoints");var aW=w((e,t,r,i)=>{t.forEach(n=>{AW[n](e,r,i)})},"insertMarkers"),lW=w((e,t,r)=>{lt.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).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"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).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"),cW=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).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"),hW=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).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"),uW=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).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"),dW=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).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"),fW=w((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).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=w((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).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"),gW=w((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).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"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).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),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).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"),mW=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),yW=w((e,t,r)=>{const i=Be(),{themeVariables:n}=i,{transitionColor:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-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",`${s}`)},"barbNeo"),xW=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).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"),CW=w((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),kW=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).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"),bW=w((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),vW=w((e,t,r)=>{const i=Be(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).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",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).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",`${s}`)},"only_one_neo"),wW=w((e,t,r)=>{const i=Be(),{themeVariables:n}=i,{strokeWidth:s,mainBkg:a}=n,c=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");c.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),c.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const h=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),SW=w((e,t,r)=>{const i=Be(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).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",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).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",`${s}`)},"one_or_more_neo"),TW=w((e,t,r)=>{const i=Be(),{themeVariables:n}=i,{strokeWidth:s,mainBkg:a}=n,c=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");c.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),c.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const h=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),_W=w((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
360
+ L20,10
361
+ M20,10
362
+ L0,20`)},"requirement_arrow"),BW=w((e,t,r)=>{const i=Be(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
363
+ L20,10
364
+ M20,10
365
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),LW=w((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),EW=w((e,t,r)=>{const i=Be(),{themeVariables:n}=i,{strokeWidth:s}=n,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),AW={extension:lW,composition:cW,aggregation:hW,dependency:uW,lollipop:dW,point:fW,circle:pW,cross:gW,barb:mW,barbNeo:yW,only_one:xW,zero_or_one:CW,one_or_more:kW,zero_or_more:bW,only_one_neo:vW,zero_or_one_neo:wW,one_or_more_neo:SW,zero_or_more_neo:TW,requirement_arrow:_W,requirement_contains:LW,requirement_arrow_neo:BW,requirement_contains_neo:EW},FW=aW,MW={common:sc,getConfig:Be,insertCluster:E9,insertEdge:sW,insertEdgeLabel:tW,insertMarkers:FW,insertNode:j_,interpolateToCurve:ly,labelHelper:Wt,log:lt,positionEdgeLabel:eW},Jl={},U_=w(e=>{for(const t of e)Jl[t.name]=t},"registerLayoutLoaders"),IW=w(()=>{U_([{name:"dagre",loader:w(async()=>await ie(()=>import("./dagre-KV5264BT-BTehb9Tm.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:w(async()=>await ie(()=>import("./cose-bilkent-S5V4N54A-C9MDV2NH.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");IW();var KV=w(async(e,t)=>{if(!(e.layoutAlgorithm in Jl))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const r=Jl[e.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:s}=e.config,{useGradient:a,gradientStart:c,gradientStop:h}=s,u=t.attr("id");if(t.append("defs").append("filter").attr("id",`${u}-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",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${u}-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",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),a){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",c).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)}return i.render(e,t,MW,{algorithm:r.algorithm})},"render"),ZV=w((e="",{fallback:t="dagre"}={})=>{if(e in Jl)return e;if(t in Jl)return lt.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),V_="comm",Y_="rule",G_="decl",PW="@import",OW="@namespace",DW="@keyframes",RW="@layer",X_=Math.abs,Ey=String.fromCharCode;function Q_(e){return e.trim()}function iu(e,t,r){return e.replace(t,r)}function $W(e,t,r){return e.indexOf(t,r)}function Ns(e,t){return e.charCodeAt(t)|0}function la(e,t,r){return e.slice(t,r)}function Yi(e){return e.length}function zW(e){return e.length}function jh(e,t){return t.push(e),e}var yd=1,ca=1,K_=0,di=0,ze=0,ma="";function Ay(e,t,r,i,n,s,a,c){return{value:e,root:t,parent:r,type:i,props:n,children:s,line:yd,column:ca,length:a,return:"",siblings:c}}function NW(){return ze}function jW(){return ze=di>0?Ns(ma,--di):0,ca--,ze===10&&(ca=1,yd--),ze}function Mi(){return ze=di<K_?Ns(ma,di++):0,ca++,ze===10&&(ca=1,yd++),ze}function io(){return Ns(ma,di)}function nu(){return di}function xd(e,t){return la(ma,e,t)}function tc(e){switch(e){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 WW(e){return yd=ca=1,K_=Yi(ma=e),di=0,[]}function qW(e){return ma="",e}function qp(e){return Q_(xd(di-1,tm(e===91?e+2:e===40?e+1:e)))}function HW(e){for(;(ze=io())&&ze<33;)Mi();return tc(e)>2||tc(ze)>3?"":" "}function UW(e,t){for(;--t&&Mi()&&!(ze<48||ze>102||ze>57&&ze<65||ze>70&&ze<97););return xd(e,nu()+(t<6&&io()==32&&Mi()==32))}function tm(e){for(;Mi();)switch(ze){case e:return di;case 34:case 39:e!==34&&e!==39&&tm(ze);break;case 40:e===41&&tm(e);break;case 92:Mi();break}return di}function VW(e,t){for(;Mi()&&e+ze!==57;)if(e+ze===84&&io()===47)break;return"/*"+xd(t,di-1)+"*"+Ey(e===47?e:Mi())}function YW(e){for(;!tc(io());)Mi();return xd(e,di)}function GW(e){return qW(ou("",null,null,null,[""],e=WW(e),0,[0],e))}function ou(e,t,r,i,n,s,a,c,h){for(var u=0,d=0,f=a,m=0,g=0,x=0,C=1,k=1,v=1,T=0,B="",M=n,O=s,F=i,E=B;k;)switch(x=T,T=Mi()){case 40:if(x!=108&&Ns(E,f-1)==58){$W(E+=iu(qp(T),"&","&\f"),"&\f",X_(u?c[u-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:E+=qp(T);break;case 9:case 10:case 13:case 32:E+=HW(x);break;case 92:E+=UW(nu()-1,7);continue;case 47:switch(io()){case 42:case 47:jh(XW(VW(Mi(),nu()),t,r,h),h),(tc(x||1)==5||tc(io()||1)==5)&&Yi(E)&&la(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*C:c[u++]=Yi(E)*v;case 125*C:case 59:case 0:switch(T){case 0:case 125:k=0;case 59+d:v==-1&&(E=iu(E,/\f/g,"")),g>0&&(Yi(E)-f||C===0&&x===47)&&jh(g>32?jk(E+";",i,r,f-1,h):jk(iu(E," ","")+";",i,r,f-2,h),h);break;case 59:E+=";";default:if(jh(F=Nk(E,t,r,u,d,n,c,B,M=[],O=[],f,s),s),T===123)if(d===0)ou(E,t,F,F,M,s,f,c,O);else{switch(m){case 99:if(Ns(E,3)===110)break;case 108:if(Ns(E,2)===97)break;default:d=0;case 100:case 109:case 115:}d?ou(e,F,F,i&&jh(Nk(e,F,F,0,0,n,c,B,n,M=[],f,O),O),n,O,f,c,i?M:O):ou(E,F,F,F,[""],O,0,c,O)}}u=d=g=0,C=v=1,B=E="",f=a;break;case 58:f=1+Yi(E),g=x;default:if(C<1){if(T==123)--C;else if(T==125&&C++==0&&jW()==125)continue}switch(E+=Ey(T),T*C){case 38:v=d>0?1:(E+="\f",-1);break;case 44:c[u++]=(Yi(E)-1)*v,v=1;break;case 64:io()===45&&(E+=qp(Mi())),m=io(),d=f=Yi(B=E+=YW(nu())),T++;break;case 45:x===45&&Yi(E)==2&&(C=0)}}return s}function Nk(e,t,r,i,n,s,a,c,h,u,d,f){for(var m=n-1,g=n===0?s:[""],x=zW(g),C=0,k=0,v=0;C<i;++C)for(var T=0,B=la(e,m+1,m=X_(k=a[C])),M=e;T<x;++T)(M=Q_(k>0?g[T]+" "+B:iu(B,/&\f/g,g[T])))&&(h[v++]=M);return Ay(e,t,r,n===0?Y_:c,h,u,d,f)}function XW(e,t,r,i){return Ay(e,t,r,V_,Ey(NW()),la(e,2,-2),0,i)}function jk(e,t,r,i,n){return Ay(e,t,r,G_,la(e,0,i),la(e,i+1,-1),i,n)}function em(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function QW(e,t,r,i){switch(e.type){case RW:if(e.children.length)break;case PW:case OW:case G_:return e.return=e.return||e.value;case V_:return"";case DW:return e.return=e.value+"{"+em(e.children,i)+"}";case Y_:if(!Yi(e.value=e.props.join(",")))return""}return Yi(r=em(e.children,i))?e.return=e.value+"{"+r+"}":""}var KW=kS(Object.keys,Object),ZW=Object.prototype,JW=ZW.hasOwnProperty;function t7(e){if(!ld(e))return KW(e);var t=[];for(var r in Object(e))JW.call(e,r)&&r!="constructor"&&t.push(r);return t}var rm=Zo(en,"DataView"),im=Zo(en,"Promise"),nm=Zo(en,"Set"),om=Zo(en,"WeakMap"),Wk="[object Map]",e7="[object Object]",qk="[object Promise]",Hk="[object Set]",Uk="[object WeakMap]",Vk="[object DataView]",r7=Ko(rm),i7=Ko(Kl),n7=Ko(im),o7=Ko(nm),s7=Ko(om),Io=da;(rm&&Io(new rm(new ArrayBuffer(1)))!=Vk||Kl&&Io(new Kl)!=Wk||im&&Io(im.resolve())!=qk||nm&&Io(new nm)!=Hk||om&&Io(new om)!=Uk)&&(Io=function(e){var t=da(e),r=t==e7?e.constructor:void 0,i=r?Ko(r):"";if(i)switch(i){case r7:return Vk;case i7:return Wk;case n7:return qk;case o7:return Hk;case s7:return Uk}return t});var a7="[object Map]",l7="[object Set]",c7=Object.prototype,h7=c7.hasOwnProperty;function Yk(e){if(e==null)return!0;if(cd(e)&&(Iu(e)||typeof e=="string"||typeof e.splice=="function"||sy(e)||ay(e)||Mu(e)))return!e.length;var t=Io(e);if(t==a7||t==l7)return!e.size;if(ld(e))return!t7(e).length;for(var r in e)if(h7.call(e,r))return!1;return!0}var Z_="c4",u7=w(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),d7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-VVMl6NQD.js");return{diagram:t}},__vite__mapDeps([8,9]));return{id:Z_,diagram:e}},"loader"),f7={id:Z_,detector:u7,loader:d7},p7=f7,J_="flowchart",g7=w((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),m7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CDA_xPM_.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14]));return{id:J_,diagram:e}},"loader"),y7={id:J_,detector:g7,loader:m7},x7=y7,tB="flowchart-v2",C7=w((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),k7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CDA_xPM_.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14]));return{id:tB,diagram:e}},"loader"),b7={id:tB,detector:C7,loader:k7},v7=b7,eB="er",w7=w(e=>/^\s*erDiagram/.test(e),"detector"),S7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-ZU2EY7JB.js");return{diagram:t}},__vite__mapDeps([15,12,13,14]));return{id:eB,diagram:e}},"loader"),T7={id:eB,detector:w7,loader:S7},_7=T7,rB="gitGraph",B7=w(e=>/^\s*gitGraph/.test(e),"detector"),L7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-BI_hKewg.js");return{diagram:t}},__vite__mapDeps([16,17,18,19,4,2]));return{id:rB,diagram:e}},"loader"),E7={id:rB,detector:B7,loader:L7},A7=E7,iB="gantt",F7=w(e=>/^\s*gantt/.test(e),"detector"),M7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-KhPrE8Ml.js");return{diagram:t}},__vite__mapDeps([20,21,22,23]));return{id:iB,diagram:e}},"loader"),I7={id:iB,detector:F7,loader:M7},P7=I7,nB="info",O7=w(e=>/^\s*info/.test(e),"detector"),D7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-CT8ywNfc.js");return{diagram:t}},__vite__mapDeps([24,19,4,2]));return{id:nB,diagram:e}},"loader"),R7={id:nB,detector:O7,loader:D7},oB="pie",$7=w(e=>/^\s*pie/.test(e),"detector"),z7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-B0MAcDOI.js");return{diagram:t}},__vite__mapDeps([25,17,19,4,2,26,27,22]));return{id:oB,diagram:e}},"loader"),N7={id:oB,detector:$7,loader:z7},sB="quadrantChart",j7=w(e=>/^\s*quadrantChart/.test(e),"detector"),W7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-vCkF5gYE.js");return{diagram:t}},__vite__mapDeps([28,21,22,23]));return{id:sB,diagram:e}},"loader"),q7={id:sB,detector:j7,loader:W7},H7=q7,aB="xychart",U7=w(e=>/^\s*xychart(-beta)?/.test(e),"detector"),V7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-B6uBUjiH.js");return{diagram:t}},__vite__mapDeps([29,22,27,21,23]));return{id:aB,diagram:e}},"loader"),Y7={id:aB,detector:U7,loader:V7},G7=Y7,lB="requirement",X7=w(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Q7=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-CUX954Xc.js");return{diagram:t}},__vite__mapDeps([30,12,13]));return{id:lB,diagram:e}},"loader"),K7={id:lB,detector:X7,loader:Q7},Z7=K7,cB="sequence",J7=w(e=>/^\s*sequenceDiagram/.test(e),"detector"),tq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-DkcT5kUa.js");return{diagram:t}},__vite__mapDeps([31,9,18]));return{id:cB,diagram:e}},"loader"),eq={id:cB,detector:J7,loader:tq},rq=eq,hB="class",iq=w((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),nq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-BT32A8xg.js");return{diagram:t}},__vite__mapDeps([32,33,11,9,12,13]));return{id:hB,diagram:e}},"loader"),oq={id:hB,detector:iq,loader:nq},sq=oq,uB="classDiagram",aq=w((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),lq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-BT32A8xg.js");return{diagram:t}},__vite__mapDeps([34,33,11,9,12,13]));return{id:uB,diagram:e}},"loader"),cq={id:uB,detector:aq,loader:lq},hq=cq,dB="state",uq=w((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),dq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX-BXEFg5IP.js");return{diagram:t}},__vite__mapDeps([35,36,12,13,1,2,3,4]));return{id:dB,diagram:e}},"loader"),fq={id:dB,detector:uq,loader:dq},pq=fq,fB="stateDiagram",gq=w((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),mq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-DERLViHP.js");return{diagram:t}},__vite__mapDeps([37,36,12,13]));return{id:fB,diagram:e}},"loader"),yq={id:fB,detector:gq,loader:mq},xq=yq,pB="journey",Cq=w(e=>/^\s*journey/.test(e),"detector"),kq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-BImfFl-q.js");return{diagram:t}},__vite__mapDeps([38,11,9,26]));return{id:pB,diagram:e}},"loader"),bq={id:pB,detector:Cq,loader:kq},vq=bq,wq=w((e,t,r)=>{lt.debug(`rendering svg for syntax error
366
+ `);const i=V6(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),zv(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),gB={draw:wq},Sq=gB,Tq={db:{},renderer:gB,parser:{parse:w(()=>{},"parse")}},_q=Tq,mB="flowchart-elk",Bq=w((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),Lq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CDA_xPM_.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14]));return{id:mB,diagram:e}},"loader"),Eq={id:mB,detector:Bq,loader:Lq},Aq=Eq,yB="timeline",Fq=w(e=>/^\s*timeline/.test(e),"detector"),Mq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-CLW8y8RH.js");return{diagram:t}},__vite__mapDeps([39,26]));return{id:yB,diagram:e}},"loader"),Iq={id:yB,detector:Fq,loader:Mq},Pq=Iq,xB="mindmap",Oq=w(e=>/^\s*mindmap/.test(e),"detector"),Dq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-D7f5Kpux.js");return{diagram:t}},__vite__mapDeps([40,12,13]));return{id:xB,diagram:e}},"loader"),Rq={id:xB,detector:Oq,loader:Dq},$q=Rq,CB="kanban",zq=w(e=>/^\s*kanban/.test(e),"detector"),Nq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-BrTdOgPc.js");return{diagram:t}},__vite__mapDeps([41,11]));return{id:CB,diagram:e}},"loader"),jq={id:CB,detector:zq,loader:Nq},Wq=jq,kB="sankey",qq=w(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Hq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-5ExQ5oqP.js");return{diagram:t}},__vite__mapDeps([42,27,22]));return{id:kB,diagram:e}},"loader"),Uq={id:kB,detector:qq,loader:Hq},Vq=Uq,bB="packet",Yq=w(e=>/^\s*packet(-beta)?/.test(e),"detector"),Gq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-BKbsDXU0.js");return{diagram:t}},__vite__mapDeps([43,17,19,4,2]));return{id:bB,diagram:e}},"loader"),Xq={id:bB,detector:Yq,loader:Gq},vB="radar",Qq=w(e=>/^\s*radar-beta/.test(e),"detector"),Kq=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5-BMKNKMUb.js");return{diagram:t}},__vite__mapDeps([44,17,19,4,2]));return{id:vB,diagram:e}},"loader"),Zq={id:vB,detector:Qq,loader:Kq},wB="block",Jq=w(e=>/^\s*block(-beta)?/.test(e),"detector"),tH=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D-DRolWTl-.js");return{diagram:t}},__vite__mapDeps([45,11,5,1,2,14]));return{id:wB,diagram:e}},"loader"),eH={id:wB,detector:Jq,loader:tH},rH=eH,SB="treeView",iH=w(e=>/^\s*treeView-beta/.test(e),"detector"),nH=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-CiJX6ZcC.js");return{diagram:t}},__vite__mapDeps([46,17,18,19,4,2]));return{id:SB,diagram:e}},"loader"),oH={id:SB,detector:iH,loader:nH},sH=oH,TB="architecture",aH=w(e=>/^\s*architecture/.test(e),"detector"),lH=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-HRrJLD68.js");return{diagram:t}},__vite__mapDeps([47,17,19,4,2,7]));return{id:TB,diagram:e}},"loader"),cH={id:TB,detector:aH,loader:lH},hH=cH,_B="ishikawa",uH=w(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),dH=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-Du7FsE49.js");return{diagram:t}},[]);return{id:_B,diagram:e}},"loader"),fH={id:_B,detector:uH,loader:dH},BB="venn",pH=w(e=>/^\s*venn-beta/.test(e),"detector"),gH=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-BNAV8mxz.js");return{diagram:t}},[]);return{id:BB,diagram:e}},"loader"),mH={id:BB,detector:pH,loader:gH},yH=mH,LB="treemap",xH=w(e=>/^\s*treemap/.test(e),"detector"),CH=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-BpjyDML3.js");return{diagram:t}},__vite__mapDeps([48,13,17,19,4,2,23,27,22]));return{id:LB,diagram:e}},"loader"),kH={id:LB,detector:xH,loader:CH},EB="wardley-beta",bH=w(e=>/^\s*wardley-beta/i.test(e),"detector"),vH=w(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-DZmNicBR.js");return{diagram:t}},__vite__mapDeps([49,17,19,4,2]));return{id:EB,diagram:e}},"loader"),wH={id:EB,detector:bH,loader:vH},SH=wH,Gk=!1,Cd=w(()=>{Gk||(Gk=!0,pu("error",_q,e=>e.toLowerCase().trim()==="error"),pu("---",{db:{clear:w(()=>{},"clear")},styles:{},renderer:{draw:w(()=>{},"draw")},parser:{parse:w(()=>{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:w(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),cg(Aq,$q,hH),cg(p7,Wq,hq,sq,_7,P7,R7,N7,Z7,rq,v7,x7,Pq,A7,xq,pq,vq,H7,Vq,Xq,G7,rH,sH,Zq,fH,kH,yH,SH))},"addDiagrams"),TH=w(async()=>{lt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(jo).map(async([r,{detector:i,loader:n}])=>{if(n)try{fg(r)}catch{try{const{diagram:s,id:a}=await n();pu(a,s,i)}catch(s){throw lt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete jo[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){lt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)lt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),_H="graphics-document document";function AB(e,t){e.attr("role",_H),t!==""&&e.attr("aria-roledescription",t)}w(AB,"setA11yDiagramInfo");function FB(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}w(FB,"addSVGa11yTitleDescription");var zo,sm=(zo=class{constructor(t,r,i,n,s){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=s}static async fromText(t,r={}){var u,d;const i=Be(),n=Mm(t,i);t=XN(t)+`
367
+ `;try{fg(n)}catch{const f=uP(n);if(!f)throw new Tv(`Diagram ${n} not found.`);const{id:m,diagram:g}=await f();pu(m,g)}const{db:s,parser:a,renderer:c,init:h}=fg(n);return a.parser&&(a.parser.yy=s),(u=s.clear)==null||u.call(s),h==null||h(i),r.title&&((d=s.setDiagramTitle)==null||d.call(s,r.title)),await a.parse(t),new zo(n,t,s,a,c)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},w(zo,"Diagram"),zo),Xk=[],BH=w(()=>{Xk.forEach(e=>{e()}),Xk=[]},"attachFunctions"),LH=w(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function MB(e){const t=e.match(Sv);if(!t)return{text:e,metadata:{}};let r=J$(t[1],{schema:Z$})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}w(MB,"extractFrontMatter");var EH=w(e=>e.replace(/\r\n?/g,`
368
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),AH=w(e=>{const{text:t,metadata:r}=MB(e),{displayMode:i,title:n,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:n,config:s,text:t}},"processFrontmatter"),FH=w(e=>{const t=Ei.detectInit(e)??{},r=Ei.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:DN(e),directive:t}},"processDirectives");function Fy(e){const t=EH(e),r=AH(t),i=FH(r.text),n=fy(r.config,i.directive);return e=LH(i.text),{code:e,title:r.title,config:n}}w(Fy,"preprocessDiagram");function IB(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}w(IB,"toBase64");var MH=5e4,IH="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",PH="sandbox",OH="loose",DH="http://www.w3.org/2000/svg",RH="http://www.w3.org/1999/xlink",$H="http://www.w3.org/1999/xhtml",zH="100%",NH="100%",jH="border:0;margin:0;",WH="margin:0",qH="allow-top-navigation-by-user-activation allow-popups",HH='The "iframe" tag is not supported by your browser.',UH=["foreignobject"],VH=["dominant-baseline"];function My(e){const t=Fy(e);return du(),zP(t.config??{}),t}w(My,"processAndSetConfigs");async function PB(e,t){Cd();try{const{code:r,config:i}=My(e);return{diagramType:(await DB(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}w(PB,"parse");var Qk=w((e,t,r=[])=>`
369
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),YH=w((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
370
+ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
371
+ :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
372
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const a=Tr(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{Yk(c.styles)||a.forEach(h=>{r+=Qk(c.id,h,c.styles)}),Yk(c.textStyles)||(r+=Qk(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(h=>h.replace("color","fill"))))})}return r},"createCssStyles"),GH=w((e,t,r,i)=>{const n=YH(e,r),s=nO(t,n,{...e.themeVariables,theme:e.theme,look:e.look},i);return em(GW(`${i}{${s}}`),QW)},"createUserStyles"),XH=w((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Vo(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),QH=w((e="",t)=>{var n,s;const r=(s=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":NH,i=IB(`<body style="${WH}">${e}</body>`);return`<iframe style="width:${zH};height:${r};${jH}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${qH}">
373
+ ${HH}
374
+ </iframe>`},"putIntoIFrame"),Kk=w((e,t,r,i,n)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",DH);return n&&a.attr("xmlns:xlink",n),a.append("g"),e},"appendDivSvgG");function am(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}w(am,"sandboxedIframe");var KH=w((e,t,r,i)=>{var n,s,a;(n=e.getElementById(t))==null||n.remove(),(s=e.getElementById(r))==null||s.remove(),(a=e.getElementById(i))==null||a.remove()},"removeExistingElements"),ZH=w(async function(e,t,r){var Z,it,V,j,q,Y;Cd();const i=My(t);t=i.code;const n=Be();lt.debug(n),t.length>((n==null?void 0:n.maxTextSize)??MH)&&(t=IH);const s="#"+e,a="i"+e,c="#"+a,h="d"+e,u="#"+h,d=w(()=>{const J=Qt(m?c:u).node();J&&"remove"in J&&J.remove()},"removeTempElements");let f=Qt("body");const m=n.securityLevel===PH,g=n.securityLevel===OH,x=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),m){const R=am(Qt(r),a);f=Qt(R.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=Qt(r);Kk(f,e,h,`font-family: ${x}`,RH)}else{if(KH(document,e,h,a),m){const R=am(Qt("body"),a);f=Qt(R.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=Qt("body");Kk(f,e,h)}let C,k;try{C=await sm.fromText(t,{title:i.title})}catch(R){if(n.suppressErrorRendering)throw d(),R;C=await sm.fromText("error"),k=R}const v=f.select(u).node(),T=C.type,B=v.firstChild,M=B.firstChild,O=(it=(Z=C.renderer).getClasses)==null?void 0:it.call(Z,t,C),F=GH(n,T,O,s),E=document.createElement("style");E.innerHTML=F,B.insertBefore(E,M);try{await C.renderer.draw(t,e,"11.14.0",C)}catch(R){throw n.suppressErrorRendering?d():Sq.draw(t,e,"11.14.0"),R}const z=f.select(`${u} svg`),K=(j=(V=C.db).getAccTitle)==null?void 0:j.call(V),P=(Y=(q=C.db).getAccDescription)==null?void 0:Y.call(q);RB(T,z,K,P),f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",$H);let N=f.select(u).node().innerHTML;if(lt.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),N=XH(N,m,wn(n.arrowMarkerAbsolute)),m){const R=f.select(u+" svg").node();N=QH(N,R)}else g||(N=ra.sanitize(N,{ADD_TAGS:UH,ADD_ATTR:VH,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(BH(),k)throw k;return d(),{diagramType:T,svg:N,bindFunctions:C.db.bindFunctions}},"render");function OB(e={}){var i;const t=qe({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),RP(t),t!=null&&t.theme&&t.theme in xn?t.themeVariables=xn[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=xn.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?DP(t):Av();Fm(r.logLevel),Cd()}w(OB,"initialize");var DB=w((e,t={})=>{const{code:r}=Fy(e);return sm.fromText(r,t)},"getDiagramFromText");function RB(e,t,r,i){AB(t,e),FB(t,r,i,t.attr("id"))}w(RB,"addA11yInfo");var Go=Object.freeze({render:ZH,parse:PB,getDiagramFromText:DB,initialize:OB,getConfig:Be,setConfig:Fv,getSiteConfig:Av,updateSiteConfig:$P,reset:w(()=>{du()},"reset"),globalReset:w(()=>{du(ia)},"globalReset"),defaultConfig:ia});Fm(Be().logLevel);du(Be());var JH=w((e,t,r)=>{lt.warn(e),dy(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),$B=w(async function(e={querySelector:".mermaid"}){try{await tU(e)}catch(t){if(dy(t)&&lt.error(t.str),Kr.parseError&&Kr.parseError(t),!e.suppressErrors)throw lt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),tU=w(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Go.getConfig();lt.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");lt.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(lt.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Go.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new Ei.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const c=[];for(const h of Array.from(n)){if(lt.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const u=`mermaid-${s.next()}`;a=h.innerHTML,a=tT(Ei.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=Ei.detectInit(a);d&&lt.debug("Detected early reinit: ",d);try{const{svg:f,bindFunctions:m}=await WB(u,a,h);h.innerHTML=f,e&&await e(u),m&&m(h)}catch(f){JH(f,c,Kr.parseError)}}if(c.length>0)throw c[0]},"runThrowsErrors"),zB=w(function(e){Go.initialize(e)},"initialize"),eU=w(async function(e,t,r){lt.warn("mermaid.init is deprecated. Please use run instead."),e&&zB(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await $B(i)},"init"),rU=w(async(e,{lazyLoad:t=!0}={})=>{Cd(),cg(...e),t===!1&&await TH()},"registerExternalDiagrams"),NB=w(function(){if(Kr.startOnLoad){const{startOnLoad:e}=Go.getConfig();e&&Kr.run().catch(t=>lt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",NB,!1);var iU=w(function(e){Kr.parseError=e},"setParseErrorHandler"),Hu=[],Hp=!1,jB=w(async()=>{if(!Hp){for(Hp=!0;Hu.length>0;){const e=Hu.shift();if(e)try{await e()}catch(t){lt.error("Error executing queue",t)}}Hp=!1}},"executeQueue"),nU=w(async(e,t)=>new Promise((r,i)=>{const n=w(()=>new Promise((s,a)=>{Go.parse(e,t).then(c=>{s(c),r(c)},c=>{var h;lt.error("Error parsing",c),(h=Kr.parseError)==null||h.call(Kr,c),a(c),i(c)})}),"performCall");Hu.push(n),jB().catch(i)}),"parse"),WB=w((e,t,r)=>new Promise((i,n)=>{const s=w(()=>new Promise((a,c)=>{Go.render(e,t,r).then(h=>{a(h),i(h)},h=>{var u;lt.error("Error parsing",h),(u=Kr.parseError)==null||u.call(Kr,h),c(h),n(h)})}),"performCall");Hu.push(s),jB().catch(n)}),"render"),oU=w(()=>Object.keys(jo).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Kr={startOnLoad:!0,mermaidAPI:Go,parse:nU,render:WB,init:eU,run:$B,registerExternalDiagrams:rU,registerLayoutLoaders:U_,initialize:zB,parseError:void 0,contentLoaded:NB,setParseErrorHandler:iU,detectType:Mm,registerIconPacks:r9,getRegisteredDiagramsMetadata:oU},Up=Kr;/*! Check if previously processed *//*!
375
+ * Wait for document loaded before starting the execution
376
+ */const sU=({size:e=14})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),_.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),aU=({size:e=14})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("polyline",{points:"20 6 9 17 4 12"})}),lU=({size:e=14})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("polyline",{points:"15 3 21 3 21 9"}),_.jsx("polyline",{points:"9 21 3 21 3 15"}),_.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),_.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]});let Zk=!1,cU=0;function Jk(){return document.documentElement.getAttribute("data-theme")==="dark"?"dark":"default"}const hU=({chart:e})=>{const t=at.useRef(null),[r,i]=at.useState(null),[n,s]=at.useState(""),[a,c]=at.useState(!1),[h,u]=at.useState(!1),d=Ft(g=>g.openMermaidViewer);at.useEffect(()=>{Zk||(Up.initialize({startOnLoad:!1,theme:Jk(),securityLevel:"loose",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji"',flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis"},sequence:{useMaxWidth:!0,diagramMarginX:10,diagramMarginY:10},gantt:{useMaxWidth:!0}}),Zk=!0);let g=!1;async function x(){try{const C=`mermaid-${++cU}`,k=Jk();Up.initialize({startOnLoad:!1,theme:k,securityLevel:"loose",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji"',flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis"},sequence:{useMaxWidth:!0,diagramMarginX:10,diagramMarginY:10},gantt:{useMaxWidth:!0}});const{svg:v}=await Up.render(C,e.trim());g||(s(v),i(null))}catch(C){g||(i(C instanceof Error?C.message:"Mermaid rendering failed"),s(""))}}return x(),()=>{g=!0}},[e]);const f=at.useCallback(async()=>{try{await navigator.clipboard.writeText(e.trim()),c(!0),setTimeout(()=>c(!1),2e3)}catch(g){console.error("Failed to copy mermaid code:",g)}},[e]),m=at.useCallback(()=>{n&&d(n,e.trim())},[n,e,d]);return r?_.jsx("div",{className:"mermaid-error",children:r}):_.jsxs("div",{className:"mermaid-container",ref:t,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:{position:"relative"},children:[_.jsxs("div",{style:{position:"absolute",top:8,right:8,display:"flex",gap:6,opacity:h?1:0,transition:"opacity 0.15s ease",zIndex:10},children:[_.jsxs("button",{onClick:g=>{g.stopPropagation(),f()},style:{padding:"6px 10px",background:a?"var(--success, #4ade80)":"var(--bg-primary, #fff)",border:"1px solid var(--border-color, #e0e0e0)",borderRadius:6,color:a?"#fff":"var(--text-primary, #333)",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:12,fontWeight:500,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",transition:"all 0.15s ease"},title:"复制 Mermaid 代码",children:[a?_.jsx(aU,{size:12}):_.jsx(sU,{size:12}),a?"已复制":"复制"]}),_.jsxs("button",{onClick:g=>{g.stopPropagation(),m()},style:{padding:"6px 10px",background:"var(--bg-primary, #fff)",border:"1px solid var(--border-color, #e0e0e0)",borderRadius:6,color:"var(--text-primary, #333)",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:12,fontWeight:500,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",transition:"all 0.15s ease"},title:"查看大图",children:[_.jsx(lU,{size:12}),"查看"]})]}),_.jsx("div",{onClick:m,style:{cursor:"pointer",userSelect:"none"},title:"点击查看大图",children:n&&_.jsx("div",{className:"mermaid-svg-wrapper",dangerouslySetInnerHTML:{__html:n}})})]})},uU=({size:e=14})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),_.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),dU=({size:e=14})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("polyline",{points:"20 6 9 17 4 12"})});function lm(e){return typeof e=="string"?e:typeof e=="number"?String(e):e?Array.isArray(e)?e.map(lm).join(""):typeof e=="object"&&"props"in e?lm(e.props.children):"":""}const fU=({children:e})=>{const[t,r]=at.useState(!1),[i,n]=at.useState(!1),s=at.useRef(null),a=at.useCallback(async()=>{const c=lm(e);try{await navigator.clipboard.writeText(c.replace(/\n$/,"")),r(!0),setTimeout(()=>r(!1),2e3)}catch(h){console.error("Failed to copy code:",h)}},[e]);return _.jsxs("div",{ref:s,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),style:{position:"relative"},children:[_.jsx("button",{onClick:a,style:{position:"absolute",top:8,right:8,padding:"4px 6px",background:t?"var(--success, #4ade80)":"var(--bg-primary, #fff)",border:"1px solid var(--border-color, #e0e0e0)",borderRadius:4,color:t?"#fff":"var(--text-primary, #333)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",opacity:i?1:0,transition:"opacity 0.15s ease",zIndex:10},title:t?"已复制":"复制代码",children:t?_.jsx(dU,{size:14}):_.jsx(uU,{size:14})}),e]})};function pU(e){return e.toLowerCase().replace(/[^\w\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"")||"heading"}function cm(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(cm).join(""):yn.isValidElement(e)&&e.props.children?cm(e.props.children):""}function As(e){const t=({children:r})=>{const i=cm(r),n=pU(i);return yn.createElement(e,{id:n},r)};return t.displayName=`Heading_${e}`,t}async function gU(e,t){t.preventDefault();const{currentView:r,projects:i,setCurrentView:n,setLoadingPage:s,openReference:a}=Ft.getState(),c=e.match(/^(.+?)(?:#L(\d+)(?:-L(\d+))?)?$/);if(!c){window.open(e,"_blank");return}const[,h,u,d]=c;if(/^https?:\/\//.test(h)){window.open(h,"_blank");return}let f=h;for(;f.startsWith("./");)f=f.slice(2);if(f.includes("../")&&(f=f.split("/").pop()||f),/^[A-Za-z]:\\/.test(f)){a(f,u?parseInt(u,10):void 0,d?parseInt(d,10):void 0);return}const m=/\.[^/.\\]+$/.test(f),g=f.endsWith(".md");if(m&&!g){if(!r)return;const C=i.find(v=>v.id===r.projectId);if(!C)return;const k=f.startsWith("/")?f:`${C.path}/${h}`;a(k,u?parseInt(u,10):void 0,d?parseInt(d,10):void 0);return}if(!r){console.warn("No current view");return}let x=f;x.startsWith("/")&&(x=x.slice(1)),g&&(x=x.slice(0,-3)),s(!0);try{const C=await dm(r.projectId,r.version,x);n({...r,slug:x,content:C.content});return}catch{if(g){const C=i.find(k=>k.id===r.projectId);if(C){const k=f.startsWith("/")?f:`${C.path}/${h}`;a(k,u?parseInt(u,10):void 0,d?parseInt(d,10):void 0)}}}finally{s(!1)}}const qB=({content:e})=>{const t=at.useMemo(()=>({h1:As("h1"),h2:As("h2"),h3:As("h3"),h4:As("h4"),h5:As("h5"),h6:As("h6"),code({className:r,children:i,...n}){const s=/language-(\w+)/.exec(r||""),a=s?s[1]:"",c=String(i).replace(/\n$/,""),h=a||c.includes(`
377
+ `);return a==="mermaid"?_.jsx(hU,{chart:c}):h?_.jsx("code",{className:r,...n,children:i}):_.jsx("code",{className:r,...n,children:i})},pre({children:r}){var a;const i=yn.Children.only(r),n=((a=i==null?void 0:i.props)==null?void 0:a.className)||"";return/language-mermaid/.test(n)?_.jsx("pre",{children:r}):_.jsx(fU,{children:_.jsx("pre",{children:r})})},a({href:r,children:i}){return _.jsx("a",{href:r,onClick:n=>{r&&gU(r,n)},style:{color:"var(--accent)",cursor:"pointer",textDecoration:"none"},children:i})}}),[]);return e?_.jsx("div",{className:"markdown-body",children:_.jsx(y3,{remarkPlugins:[A4],components:t,children:e})}):null};function mU(e,t){return e.toLowerCase().replace(/[^\w\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"")||`heading-${t}`}function yU(e){var i;const t=e.split(`
378
+ `),r=[];for(let n=0;n<t.length;n++){const s=t[n].match(/^(#{1,6})\s+(.+?)\r?$/);if(s){const a=s[1].length,c=s[2].trim(),h=mU(c,r.length);r.push({id:h,text:c,level:a,position:n,contentLength:0})}}for(let n=0;n<r.length;n++){const s=((i=r[n+1])==null?void 0:i.position)??t.length;r[n].contentLength=s-r[n].position}return r}function xU(e){const[t,r]=at.useState(null);return at.useEffect(()=>{if(e.length===0)return;const i=new IntersectionObserver(n=>{const s=n.filter(a=>a.isIntersecting);if(s.length>0){const a=s.sort((c,h)=>c.boundingClientRect.top-h.boundingClientRect.top)[0];r(a.target.id)}},{rootMargin:"-20% 0px -70% 0px"});return e.forEach(n=>{const s=document.getElementById(n);s&&i.observe(s)}),()=>i.disconnect()},[e]),t}function CU(e){const t=at.useMemo(()=>yU(e),[e]),r=at.useMemo(()=>t.map(s=>s.id),[t]),i=xU(r),n=at.useCallback(s=>{const a=document.getElementById(s);a&&a.scrollIntoView({behavior:"smooth",block:"start"})},[]);return{items:t,activeId:i,scrollToHeading:n}}const kU=({items:e,activeId:t,onJump:r})=>_.jsxs("div",{className:"toc-panel",children:[_.jsx("div",{className:"toc-panel-title",children:"目录"}),_.jsx("div",{className:"toc-panel-list",children:e.map(i=>{const n=i.id===t;return _.jsx("div",{className:`toc-item${n?" active":""}`,style:{paddingLeft:12+(i.level-1)*12},onClick:()=>r(i.id),title:i.text,children:i.text},i.id)})})]});function bU(e){return e>2e3?8:e>500?6:4}const vU=({items:e,activeId:t,onJump:r})=>{const[i,n]=at.useState(!1);return e.length===0?null:_.jsxs("div",{style:{position:"fixed",right:0,top:"var(--header-height)",bottom:0,width:i?280:40,zIndex:98,transition:"width 0.15s ease"},onMouseLeave:()=>n(!1),children:[_.jsx("div",{className:"toc-indicator",onMouseEnter:()=>n(!0),children:e.map(s=>{const a=bU(s.contentLength),c=s.id===t;return _.jsx("div",{className:`toc-dot${c?" active":""}`,onClick:()=>r(s.id),title:s.text,children:_.jsx("span",{style:{display:"block",width:a,height:a,borderRadius:"50%",backgroundColor:c?"var(--accent)":"var(--text-muted)",transition:"background-color 0.15s, transform 0.15s",cursor:"pointer"}})},s.id)})}),i&&_.jsx(kU,{items:e,activeId:t,onJump:s=>{r(s),n(!1)}})]})},wU=({content:e})=>{const{items:t,activeId:r,scrollToHeading:i}=CU(e);return t.length===0?null:_.jsx(vU,{items:t,activeId:r,onJump:i})},SU=({size:e=48})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{color:"var(--text-tertiary)",opacity:.4},children:[_.jsx("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),_.jsx("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),TU=({size:e=24})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"spin 1s linear infinite"},children:_.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),_U=()=>{const e=Ft(n=>n.currentView),t=Ft(n=>n.currentWiki),r=re(n=>n.aiPanelOpen),i=t==null?void 0:t.pages.find(n=>n.slug===(e==null?void 0:e.slug));return e?e.loading?_.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--text-tertiary)",gap:"12px"},children:[_.jsx(TU,{size:28}),_.jsx("div",{style:{fontSize:"13px"},children:"加载中..."})]}):e.error?_.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"40px",gap:"12px"},children:[_.jsx("div",{style:{fontSize:"36px",color:"var(--danger)"},children:"!"}),_.jsx("div",{style:{fontSize:"16px",fontWeight:500,color:"var(--text-primary)"},children:"加载失败"}),_.jsx("div",{style:{fontSize:"13px",color:"var(--text-secondary)",maxWidth:"400px",textAlign:"center"},children:e.error})]}):_.jsxs("div",{style:{flex:1,height:"100%",position:"relative",overflow:"hidden"},children:[_.jsxs("div",{style:{height:"100%",overflowY:"auto",display:"flex",flexDirection:"column"},children:[i&&_.jsxs("div",{style:{padding:"24px 40px 0",borderBottom:"1px solid var(--border-light)"},children:[_.jsx("h1",{style:{fontSize:"24px",fontWeight:700,color:"var(--text-primary)",marginBottom:"4px",lineHeight:1.3},children:i.title}),_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",paddingBottom:"16px",fontSize:"12px",color:"var(--text-tertiary)"},children:[_.jsx("span",{children:i.section}),i.group&&_.jsxs(_.Fragment,{children:[_.jsx("span",{children:"/"}),_.jsx("span",{children:i.group})]}),_.jsx("span",{className:`badge ${i.level==="Beginner"?"badge-beginner":i.level==="Intermediate"?"badge-intermediate":"badge-advanced"}`,children:i.level})]})]}),_.jsx("div",{style:{flex:1,padding:"24px 40px 60px",maxWidth:"100%",overflowX:"hidden"},children:_.jsx(qB,{content:e.content})})]}),e.content&&!r&&_.jsx(wU,{content:e.content})]}):_.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--text-tertiary)",gap:"16px"},children:[_.jsx(SU,{size:56}),_.jsx("div",{style:{fontSize:"16px",fontWeight:500},children:"Zread Browser"}),_.jsx("div",{style:{fontSize:"13px",maxWidth:"360px",textAlign:"center"},children:"从左侧导航选择一个页面开始阅读,或使用 Ctrl+K 搜索内容"})]})};function BU(e,t,r,i){var n=this,s=at.useRef(null),a=at.useRef(0),c=at.useRef(0),h=at.useRef(null),u=at.useRef([]),d=at.useRef(),f=at.useRef(),m=at.useRef(e),g=at.useRef(!0),x=at.useRef(),C=at.useRef();m.current=e;var k=typeof window<"u",v=!t&&t!==0&&k;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var T=!!(r=r||{}).leading,B=!("trailing"in r)||!!r.trailing,M=!!r.flushOnExit&&B,O="maxWait"in r,F="debounceOnServer"in r&&!!r.debounceOnServer,E=O?Math.max(+r.maxWait||0,t):null,z=at.useMemo(function(){var K=function(q){var Y=u.current,R=d.current;return u.current=d.current=null,a.current=q,c.current=c.current||q,f.current=m.current.apply(R,Y)},P=function(q,Y){v&&cancelAnimationFrame(h.current),h.current=v?requestAnimationFrame(q):setTimeout(q,Y)},N=function(q){if(!g.current)return!1;var Y=q-s.current;return!s.current||Y>=t||Y<0||O&&q-a.current>=E},Z=function(q){return h.current=null,B&&u.current?K(q):(u.current=d.current=null,f.current)},it=function q(){var Y=Date.now();if(T&&c.current===a.current&&V(),N(Y))return Z(Y);if(g.current){var R=t-(Y-s.current),J=O?Math.min(R,E-(Y-a.current)):R;P(q,J)}},V=function(){},j=function(){if(k||F){var q,Y=Date.now(),R=N(Y);if(u.current=[].slice.call(arguments),d.current=n,s.current=Y,M&&!x.current&&(x.current=function(){var J;((J=globalThis.document)==null?void 0:J.visibilityState)==="hidden"&&C.current.flush()},(q=globalThis.document)==null||q.addEventListener==null||q.addEventListener("visibilitychange",x.current)),R){if(!h.current&&g.current)return a.current=s.current,P(it,t),T?K(s.current):f.current;if(O)return P(it,t),K(s.current)}return h.current||P(it,t),f.current}};return j.cancel=function(){var q=h.current;q&&(v?cancelAnimationFrame(h.current):clearTimeout(h.current)),a.current=0,u.current=s.current=d.current=h.current=null},j.isPending=function(){return!!h.current},j.flush=function(){return h.current?Z(Date.now()):f.current},j},[T,O,t,E,B,M,v,k,F,i]);return C.current=z,at.useEffect(function(){return g.current=!0,function(){var K;M&&C.current.flush(),x.current&&((K=globalThis.document)==null||K.removeEventListener==null||K.removeEventListener("visibilitychange",x.current),x.current=null),g.current=!1}},[M]),z}const LU=({size:e=16})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"11",cy:"11",r:"8"}),_.jsx("path",{d:"M21 21l-4.35-4.35"})]}),EU=({size:e=18})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M18 6L6 18"}),_.jsx("path",{d:"M6 6l12 12"})]}),AU=({size:e=14})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),_.jsx("polyline",{points:"14 2 14 8 20 8"})]}),FU=({result:e,onClick:t})=>{const r=e.page.level==="Beginner"?"badge-beginner":e.page.level==="Intermediate"?"badge-intermediate":"badge-advanced";return _.jsxs("button",{onClick:t,style:{display:"flex",alignItems:"flex-start",gap:"10px",width:"100%",padding:"10px 14px",border:"none",background:"transparent",color:"var(--text-primary)",cursor:"pointer",textAlign:"left",borderRadius:"6px",transition:"background 0.1s ease"},onMouseEnter:i=>{i.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:i=>{i.currentTarget.style.background="transparent"},children:[_.jsx(AU,{size:16}),_.jsxs("div",{style:{flex:1,minWidth:0},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"2px"},children:[_.jsx("span",{style:{fontWeight:500,fontSize:"13px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.page.title}),_.jsx("span",{className:`badge ${r}`,children:e.page.level})]}),_.jsxs("div",{style:{fontSize:"12px",color:"var(--text-tertiary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.page.section,e.page.group?` / ${e.page.group}`:""]}),e.content&&_.jsx("div",{style:{fontSize:"12px",color:"var(--text-secondary)",marginTop:"4px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:e.content})]})]})},MU=()=>{const e=Ft(x=>x.searchOpen),t=Ft(x=>x.searchQuery),r=Ft(x=>x.searchResults),i=Ft(x=>x.config),n=Ft(x=>x.setSearchOpen),s=Ft(x=>x.setSearchQuery),a=Ft(x=>x.setSearchResults),c=Ft(x=>x.setCurrentProject),h=Ft(x=>x.setCurrentView),u=at.useRef(null);at.useEffect(()=>{e&&setTimeout(()=>{var x;(x=u.current)==null||x.focus()},50)},[e]);const d=BU(async x=>{if(!x.trim()){a([]);return}const C=i==null?void 0:i.lastOpenedProject;if(!C){a([]);return}try{const k=await ob(C,x);a(k)}catch(k){console.error("Search failed:",k),a([])}},200),f=at.useCallback(x=>{const C=x.target.value;s(C),d(C)},[s,d]),m=at.useCallback(x=>{x.projectId!==(i==null?void 0:i.lastOpenedProject)&&c(x.projectId);const C=Ft.getState().projects.find(v=>v.id===x.projectId),k=(C==null?void 0:C.currentVersion)||"latest";h({projectId:x.projectId,version:k,slug:x.page.slug,content:"",loading:!0}),ie(async()=>{const{getPage:v}=await Promise.resolve().then(()=>hb);return{getPage:v}},void 0).then(({getPage:v})=>{v(x.projectId,k,x.page.slug).then(T=>{h({projectId:x.projectId,version:k,slug:x.page.slug,content:T.content,loading:!1})}).catch(T=>{h({projectId:x.projectId,version:k,slug:x.page.slug,content:"",loading:!1,error:T instanceof Error?T.message:"Failed to load page"})})}),n(!1)},[i==null?void 0:i.lastOpenedProject,c,h,n]),g=at.useCallback(x=>{x.target===x.currentTarget&&n(!1)},[n]);return e?_.jsx("div",{className:"overlay overlay-centered",onClick:g,children:_.jsxs("div",{className:"modal",style:{width:"560px",maxHeight:"70vh",background:"var(--bg-primary)",border:"1px solid var(--border)",borderRadius:"12px",boxShadow:"var(--shadow-lg)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"14px 16px",borderBottom:"1px solid var(--border)"},children:[_.jsx(LU,{size:18}),_.jsx("input",{ref:u,type:"text",value:t,onChange:f,placeholder:"搜索文档...",style:{flex:1,border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontSize:"15px"}}),_.jsx("button",{onClick:()=>n(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",border:"1px solid var(--border)",borderRadius:"6px",background:"var(--bg-secondary)",color:"var(--text-tertiary)",cursor:"pointer",fontSize:"11px"},title:"关闭 (Esc)",children:_.jsx(EU,{size:14})})]}),_.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:t&&r.length===0?_.jsx("div",{style:{padding:"24px 16px",textAlign:"center",color:"var(--text-tertiary)",fontSize:"13px"},children:"没有找到相关结果"}):t?r.map((x,C)=>_.jsx(FU,{result:x,onClick:()=>m(x)},`${x.projectId}-${x.page.slug}-${C}`)):_.jsx("div",{style:{padding:"24px 16px",textAlign:"center",color:"var(--text-tertiary)",fontSize:"13px"},children:"输入关键词开始搜索"})}),r.length>0&&_.jsxs("div",{style:{padding:"8px 16px",borderTop:"1px solid var(--border)",fontSize:"11px",color:"var(--text-tertiary)",textAlign:"center"},children:["找到 ",r.length," 个结果"]})]})}):null},IU=({size:e=18})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M18 6L6 18"}),_.jsx("path",{d:"M6 6l12 12"})]}),tb=({size:e=16})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M12 5v14"}),_.jsx("path",{d:"M5 12h14"})]}),eb=({size:e=14})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("polyline",{points:"3 6 5 6 21 6"}),_.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]}),PU=({size:e=16})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("polyline",{points:"23 4 23 10 17 10"}),_.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),OU=({size:e=18})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"5"}),_.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),_.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),_.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),_.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),_.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),_.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),_.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),_.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}),DU=({size:e=18})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),rb=({size:e=14})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),RU=()=>{const e=Ft(P=>P.settingsOpen),t=Ft(P=>P.config),r=Ft(P=>P.projects),i=Ft(P=>P.setSettingsOpen),n=Ft(P=>P.setConfig),s=Ft(P=>P.setProjects),[a,c]=at.useState(""),[h,u]=at.useState(""),[d,f]=at.useState(null),[m,g]=at.useState(!1),[x,C]=at.useState(null),[k,v]=at.useState("general");at.useEffect(()=>{e&&Xp().then(f).catch(()=>{})},[e]);const T=at.useCallback(P=>{P.target===P.currentTarget&&i(!1)},[i]),B=at.useCallback(async()=>{if(!t)return;const P=t.theme==="dark"?"light":"dark";try{const N=await qh({theme:P});n(N)}catch(N){console.error("Failed to update theme:",N)}},[t,n]),M=at.useCallback(async()=>{if(a.trim()){C(null);try{const P=await qh({scanPaths:[...(t==null?void 0:t.scanPaths)||[],a.trim()]});n(P),c("")}catch(P){C(P instanceof Error?P.message:"Failed to add scan path")}}},[a,t,n]),O=at.useCallback(async P=>{if(t){C(null);try{const N=await qh({scanPaths:t.scanPaths.filter(Z=>Z!==P)});n(N)}catch(N){C(N instanceof Error?N.message:"Failed to remove scan path")}}},[t,n]),F=at.useCallback(async()=>{if(h.trim()){C(null);try{const P=await sb(h.trim());s([...r,P]),u("");const N=await El();n(N)}catch(P){C(P instanceof Error?P.message:"Failed to add project")}}},[h,r,s,n]),E=at.useCallback(async P=>{C(null);try{await ab(P),s(r.filter(Z=>Z.id!==P));const N=await El();n(N)}catch(N){C(N instanceof Error?N.message:"Failed to delete project")}},[r,s,n]),z=at.useCallback(async()=>{g(!0),C(null),lb().catch(N=>{C(N instanceof Error?N.message:"Scan failed")});const P=setInterval(async()=>{try{const N=await Xp();if(f(N),!N.scanning&&N.lastScanAt){clearInterval(P),g(!1);const Z=await El();n(Z),s(Z.projects)}}catch(N){console.error("Failed to get scan status:",N)}},500);return()=>clearInterval(P)},[n,s]);if(!e)return null;const K=(t==null?void 0:t.theme)==="dark";return _.jsx("div",{className:"overlay overlay-centered",onClick:T,children:_.jsxs("div",{className:"modal",style:{width:"640px",maxHeight:"80vh",background:"var(--bg-primary)",border:"1px solid var(--border)",borderRadius:"12px",boxShadow:"var(--shadow-lg)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid var(--border)"},children:[_.jsx("h2",{style:{fontSize:"16px",fontWeight:600,color:"var(--text-primary)",margin:0},children:"设置"}),_.jsx("button",{onClick:()=>i(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",borderRadius:"6px",background:"transparent",color:"var(--text-secondary)",cursor:"pointer"},children:_.jsx(IU,{size:18})})]}),_.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--border)",padding:"0 20px"},children:[{key:"general",label:"通用"},{key:"projects",label:"项目管理"},{key:"scan",label:"扫描"}].map(P=>_.jsx("button",{onClick:()=>v(P.key),style:{padding:"10px 16px",border:"none",borderBottom:k===P.key?"2px solid var(--accent)":"2px solid transparent",background:"transparent",color:k===P.key?"var(--accent)":"var(--text-secondary)",cursor:"pointer",fontSize:"13px",fontWeight:k===P.key?500:400,transition:"all 0.15s ease"},children:P.label},P.key))}),x&&_.jsx("div",{style:{margin:"12px 20px 0",padding:"8px 12px",borderRadius:"6px",background:"#fff5f5",border:"1px solid #ffc9c9",color:"var(--danger)",fontSize:"13px"},children:x}),_.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px"},children:[k==="general"&&_.jsx("div",{children:_.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderRadius:"8px",background:"var(--bg-secondary)",marginBottom:"16px"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[K?_.jsx(DU,{size:18}):_.jsx(OU,{size:18}),_.jsxs("div",{children:[_.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"var(--text-primary)"},children:"主题"}),_.jsx("div",{style:{fontSize:"12px",color:"var(--text-tertiary)"},children:K?"暗色模式":"浅色模式"})]})]}),_.jsx("button",{onClick:B,style:{position:"relative",width:"44px",height:"24px",borderRadius:"12px",border:"none",background:K?"var(--accent)":"var(--bg-tertiary)",cursor:"pointer",transition:"background 0.2s ease",padding:0},children:_.jsx("div",{style:{position:"absolute",top:"3px",left:K?"23px":"3px",width:"18px",height:"18px",borderRadius:"50%",background:"white",transition:"left 0.2s ease",boxShadow:"var(--shadow-sm)"}})})]})}),k==="projects"&&_.jsxs("div",{children:[_.jsxs("div",{style:{marginBottom:"20px"},children:[_.jsx("label",{style:{display:"block",fontSize:"13px",fontWeight:500,color:"var(--text-primary)",marginBottom:"6px"},children:"手动添加项目"}),_.jsxs("div",{style:{display:"flex",gap:"8px"},children:[_.jsx("input",{type:"text",className:"input",value:h,onChange:P=>u(P.target.value),placeholder:"输入项目路径...",onKeyDown:P=>{P.key==="Enter"&&F()}}),_.jsxs("button",{className:"btn btn-primary",onClick:F,children:[_.jsx(tb,{size:14}),"添加"]})]})]}),_.jsxs("div",{children:[_.jsxs("label",{style:{display:"block",fontSize:"13px",fontWeight:500,color:"var(--text-primary)",marginBottom:"8px"},children:["已发现的项目 (",r.length,")"]}),r.length===0?_.jsx("div",{style:{padding:"20px",textAlign:"center",color:"var(--text-tertiary)",fontSize:"13px",background:"var(--bg-secondary)",borderRadius:"8px"},children:"暂无项目,请手动添加或扫描发现"}):_.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:r.map(P=>_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px 14px",borderRadius:"8px",background:"var(--bg-secondary)",border:"1px solid var(--border-light)"},children:[_.jsx(rb,{size:16}),_.jsxs("div",{style:{flex:1,minWidth:0},children:[_.jsx("div",{style:{fontSize:"13px",fontWeight:500,color:"var(--text-primary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:P.name}),_.jsx("div",{style:{fontSize:"11px",color:"var(--text-tertiary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:P.path})]}),_.jsx("button",{className:"btn btn-icon",onClick:()=>E(P.id),title:"删除项目",style:{color:"var(--danger)",flexShrink:0},children:_.jsx(eb,{size:14})})]},P.id))})]})]}),k==="scan"&&_.jsxs("div",{children:[_.jsxs("div",{style:{marginBottom:"20px"},children:[_.jsx("label",{style:{display:"block",fontSize:"13px",fontWeight:500,color:"var(--text-primary)",marginBottom:"6px"},children:"扫描路径"}),_.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[_.jsx("input",{type:"text",className:"input",value:a,onChange:P=>c(P.target.value),placeholder:"输入要扫描的目录路径...",onKeyDown:P=>{P.key==="Enter"&&M()}}),_.jsxs("button",{className:"btn btn-primary",onClick:M,children:[_.jsx(tb,{size:14}),"添加"]})]}),((t==null?void 0:t.scanPaths)||[]).length===0?_.jsx("div",{style:{padding:"12px",textAlign:"center",color:"var(--text-tertiary)",fontSize:"13px",background:"var(--bg-secondary)",borderRadius:"6px"},children:"暂无扫描路径"}):_.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:((t==null?void 0:t.scanPaths)||[]).map(P=>_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",borderRadius:"6px",background:"var(--bg-secondary)",border:"1px solid var(--border-light)",fontSize:"13px",color:"var(--text-secondary)"},children:[_.jsx(rb,{size:13}),_.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:P}),_.jsx("button",{className:"btn btn-icon",onClick:()=>O(P),style:{color:"var(--danger)"},children:_.jsx(eb,{size:12})})]},P))})]}),_.jsxs("div",{children:[_.jsxs("button",{className:"btn btn-primary",onClick:z,disabled:m,style:{marginBottom:"12px",opacity:m?.7:1,cursor:m?"not-allowed":"pointer"},children:[_.jsx(PU,{size:14}),m?"扫描中...":"开始扫描"]}),d&&_.jsxs("div",{style:{padding:"12px 16px",borderRadius:"8px",background:"var(--bg-secondary)",border:"1px solid var(--border-light)",fontSize:"13px"},children:[_.jsxs("div",{style:{color:"var(--text-primary)",marginBottom:"4px"},children:["状态:",d.scanning?"扫描中":"空闲"]}),d.progress&&_.jsxs("div",{style:{color:"var(--text-secondary)",fontSize:"12px"},children:["已扫描 ",d.progress.scanned,"/",d.progress.total,", 发现 ",d.progress.found," 个项目"]}),d.lastScanAt&&_.jsxs("div",{style:{color:"var(--text-tertiary)",fontSize:"11px",marginTop:"4px"},children:["上次扫描:",new Date(d.lastScanAt).toLocaleString("zh-CN")]})]})]})]})]})]})})},$U=({size:e=14})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),_.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),zU=({size:e=14})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("polyline",{points:"20 6 9 17 4 12"})}),NU=({size:e=20})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M18 6L6 18"}),_.jsx("path",{d:"M6 6l12 12"})]}),jU=()=>{const e=Ft(g=>g.referenceOpen),t=Ft(g=>g.referenceData),r=Ft(g=>g.closeReference),[i,n]=at.useState([]),[s,a]=at.useState(!1),[c,h]=at.useState(null),[u,d]=at.useState(!1);at.useEffect(()=>{e&&t&&f()},[e,t]);const f=async()=>{if(t){a(!0),h(null);try{const g=await cb(t.filePath,t.startLine,t.endLine);n(g.lines)}catch(g){h(g instanceof Error?g.message:"Failed to load file")}finally{a(!1)}}},m=at.useCallback(async()=>{if(i.length===0)return;const g=i.map(x=>x.content).join(`
379
+ `);try{await navigator.clipboard.writeText(g),d(!0),setTimeout(()=>d(!1),2e3)}catch(x){console.error("Failed to copy content:",x)}},[i]);return e?_.jsx("div",{className:"overlay overlay-centered",onClick:r,children:_.jsxs("div",{className:"modal",style:{width:"800px",maxHeight:"70vh",background:"#1e1e2e",borderRadius:"12px",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.4)",display:"flex",flexDirection:"column",overflow:"hidden"},onClick:g=>g.stopPropagation(),children:[_.jsxs("div",{style:{padding:"16px 20px",borderBottom:"1px solid #333",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[_.jsxs("div",{children:[_.jsx("div",{style:{color:"#fff",fontSize:"14px",fontWeight:500},children:t==null?void 0:t.filePath}),(t==null?void 0:t.startLine)&&(t==null?void 0:t.endLine)&&_.jsxs("div",{style:{color:"#888",fontSize:"12px",marginTop:"4px"},children:["L",t.startLine,"-L",t.endLine]})]}),_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[_.jsxs("button",{onClick:m,disabled:s||c!==null||i.length===0,style:{padding:"6px 12px",background:u?"#4ade80":"transparent",border:`1px solid ${u?"#4ade80":"#444"}`,borderRadius:"6px",color:u?"#fff":"#888",cursor:s||c!==null||i.length===0?"not-allowed":"pointer",fontSize:"13px",display:"flex",alignItems:"center",gap:6,transition:"all 0.15s ease",opacity:s||c!==null||i.length===0?.5:1},title:"复制内容",children:[u?_.jsx(zU,{size:14}):_.jsx($U,{size:14}),u?"已复制":"复制"]}),_.jsx("button",{onClick:r,style:{background:"transparent",border:"none",color:"#888",cursor:"pointer",fontSize:"20px",lineHeight:1,padding:"4px 8px",display:"flex",alignItems:"center"},title:"关闭",children:_.jsx(NU,{size:20})})]})]}),_.jsx("div",{style:{flex:1,overflow:"auto",padding:"16px 0",fontFamily:"'SF Mono', Monaco, 'Cascadia Code', monospace",fontSize:"13px",lineHeight:"1.6"},children:s?_.jsx("div",{style:{color:"#888",textAlign:"center",padding:"40px"},children:"加载中..."}):c?_.jsx("div",{style:{color:"#ff6b6b",textAlign:"center",padding:"40px"},children:c}):_.jsx("table",{style:{width:"100%",borderCollapse:"collapse"},children:_.jsx("tbody",{children:i.map(g=>_.jsxs("tr",{style:{background:g.highlighted?"#0d3d3d":"transparent"},children:[_.jsx("td",{style:{padding:"2px 12px 2px 20px",color:"#666",textAlign:"right",userSelect:"none",width:"50px"},children:g.lineNumber}),_.jsx("td",{style:{padding:"2px 20px 2px 12px",color:g.highlighted?"#e4e4e4":"#a0a0a0",whiteSpace:"pre"},children:g.content||" "})]},g.lineNumber))})})})]})}):null},WU=({size:e=18})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M18 6L6 18"}),_.jsx("path",{d:"M6 6l12 12"})]}),qU=({size:e=14})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),_.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),HU=({size:e=14})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("polyline",{points:"20 6 9 17 4 12"})}),UU=({size:e=16})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"11",cy:"11",r:"8"}),_.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),_.jsx("line",{x1:"11",y1:"8",x2:"11",y2:"14"}),_.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]}),VU=({size:e=16})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"11",cy:"11",r:"8"}),_.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),_.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]}),YU=({size:e=16})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})}),GU=()=>{const e=Ft(F=>F.mermaidViewerOpen),t=Ft(F=>F.mermaidViewerData),r=Ft(F=>F.closeMermaidViewer),[i,n]=at.useState(2),[s,a]=at.useState(!1),[c,h]=at.useState({x:0,y:0}),[u,d]=at.useState({x:0,y:0}),[f,m]=at.useState(!1),g=at.useRef(null),x=at.useCallback(()=>{n(F=>Math.min(F*1.2,5))},[]),C=at.useCallback(()=>{n(F=>Math.max(F/1.2,.3))},[]),k=at.useCallback(()=>{n(1),h({x:0,y:0})},[]),v=at.useCallback(async()=>{if(t!=null&&t.code)try{await navigator.clipboard.writeText(t.code),m(!0),setTimeout(()=>m(!1),2e3)}catch(F){console.error("Failed to copy:",F)}},[t==null?void 0:t.code]),T=at.useCallback(F=>{F.button===0&&(a(!0),d({x:F.clientX-c.x,y:F.clientY-c.y}))},[c]),B=at.useCallback(F=>{s&&h({x:F.clientX-u.x,y:F.clientY-u.y})},[s,u]),M=at.useCallback(()=>{a(!1)},[]),O=at.useCallback(F=>{F.preventDefault();const E=F.deltaY>0?.9:1.1;n(z=>Math.max(.3,Math.min(5,z*E)))},[]);return!e||!t?null:_.jsxs("div",{style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.75)",backdropFilter:"blur(4px)",zIndex:1e3,display:"flex",flexDirection:"column",animation:"fadeIn 0.2s ease"},onClick:r,children:[_.jsxs("div",{style:{padding:"12px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",background:"var(--bg-primary)",borderBottom:"1px solid var(--border-color)",flexShrink:0},onClick:F=>F.stopPropagation(),children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[_.jsx("span",{style:{color:"var(--text-primary)",fontSize:15,fontWeight:600},children:"图表预览"}),_.jsxs("span",{style:{color:"var(--text-tertiary)",fontSize:13,fontWeight:500,padding:"2px 8px",background:"var(--bg-secondary)",borderRadius:4},children:[Math.round(i*100),"%"]})]}),_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:1,background:"var(--bg-secondary)",borderRadius:8,padding:2},children:[_.jsx(Vp,{onClick:C,title:"缩小 (-)",children:_.jsx(VU,{size:16})}),_.jsx(Vp,{onClick:k,title:"适应屏幕 (0)",children:_.jsx(YU,{size:16})}),_.jsx(Vp,{onClick:x,title:"放大 (+)",children:_.jsx(UU,{size:16})})]}),_.jsx("div",{style:{width:1,height:20,background:"var(--border-color)",margin:"0 4px"}}),_.jsxs("button",{onClick:v,style:{padding:"6px 12px",background:f?"var(--success)":"var(--accent)",border:"none",borderRadius:8,color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:6,fontSize:13,fontWeight:500,transition:"all 0.15s ease",boxShadow:f?"none":"0 1px 2px rgba(0,0,0,0.1)"},children:[f?_.jsx(HU,{size:14}):_.jsx(qU,{size:14}),f?"已复制":"复制代码"]}),_.jsx("button",{onClick:r,style:{padding:8,background:"transparent",border:"none",borderRadius:8,color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center",marginLeft:4,transition:"all 0.15s ease"},onMouseEnter:F=>{F.currentTarget.style.background="var(--bg-secondary)",F.currentTarget.style.color="var(--text-primary)"},onMouseLeave:F=>{F.currentTarget.style.background="transparent",F.currentTarget.style.color="var(--text-secondary)"},title:"关闭 (Esc)",children:_.jsx(WU,{size:18})})]})]}),_.jsx("div",{ref:g,style:{flex:1,overflow:"hidden",cursor:s?"grabbing":"grab",display:"flex",alignItems:"center",justifyContent:"center",padding:40},onMouseDown:T,onMouseMove:B,onMouseUp:M,onMouseLeave:M,onWheel:O,children:_.jsx("div",{style:{transform:`translate(${c.x}px, ${c.y}px) scale(${i})`,transition:s?"none":"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1)",background:"var(--bg-primary)",borderRadius:12,padding:32,boxShadow:"0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1)",maxWidth:"calc(100vw - 80px)",maxHeight:"calc(100vh - 160px)",overflow:"auto"},onClick:F=>F.stopPropagation(),dangerouslySetInnerHTML:{__html:t.svg}})}),_.jsxs("div",{style:{position:"absolute",bottom:20,left:"50%",transform:"translateX(-50%)",padding:"8px 16px",background:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(8px)",borderRadius:20,color:"rgba(255, 255, 255, 0.9)",fontSize:12,pointerEvents:"none",display:"flex",alignItems:"center",gap:12},children:[_.jsx(Yp,{children:"滚轮缩放"}),_.jsx(ib,{}),_.jsx(Yp,{children:"拖拽移动"}),_.jsx(ib,{}),_.jsx(Yp,{children:"点击背景关闭"})]}),_.jsx("style",{children:`
380
+ @keyframes fadeIn {
381
+ from { opacity: 0; }
382
+ to { opacity: 1; }
383
+ }
384
+ `})]})},Vp=({onClick:e,title:t,children:r})=>_.jsx("button",{onClick:e,title:t,style:{padding:"6px 10px",background:"transparent",border:"none",borderRadius:6,color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease"},onMouseEnter:i=>{i.currentTarget.style.background="var(--bg-primary)",i.currentTarget.style.color="var(--text-primary)"},onMouseLeave:i=>{i.currentTarget.style.background="transparent",i.currentTarget.style.color="var(--text-secondary)"},children:r}),Yp=({children:e})=>_.jsx("span",{style:{whiteSpace:"nowrap"},children:e}),ib=()=>_.jsx("span",{style:{width:4,height:4,borderRadius:"50%",background:"rgba(255,255,255,0.4)"}});function XU(e){const{minWidth:t,maxWidth:r,initialWidth:i,onResize:n}=e,[s,a]=at.useState(i),[c,h]=at.useState(!1),u=at.useRef(null),d=at.useRef(0),f=at.useRef(0),m=at.useCallback(v=>Math.min(r,Math.max(t,v)),[t,r]),g=at.useCallback(v=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{const T=m(window.innerWidth-v);a(T),n(T)})},[m,n]),x=at.useCallback(()=>{h(!1),u.current!==null&&(cancelAnimationFrame(u.current),u.current=null),document.body.style.cursor="",document.body.style.userSelect=""},[]),C=at.useCallback(v=>{v.preventDefault(),h(!0),d.current=v.clientX,f.current=s,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[s]);return at.useEffect(()=>{if(!c)return;const v=B=>{g(B.clientX)},T=()=>{x()};return window.addEventListener("mousemove",v),window.addEventListener("mouseup",T),()=>{window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",T)}},[c,g,x]),at.useEffect(()=>{if(!c)return;const v=B=>{B.touches.length>0&&g(B.touches[0].clientX)},T=()=>{x()};return window.addEventListener("touchmove",v),window.addEventListener("touchend",T),()=>{window.removeEventListener("touchmove",v),window.removeEventListener("touchend",T)}},[c,g,x]),at.useEffect(()=>{a(m(i))},[i,m]),{width:s,dragHandleProps:{onMouseDown:C,onTouchStart:v=>{h(!0),f.current=s,document.body.style.cursor="col-resize",document.body.style.userSelect="none"}},isDragging:c}}const HB="/api/ai";async function Jn(e,t){var n;const i=await(await fetch(`${HB}${e}`,{headers:{"Content-Type":"application/json",...t==null?void 0:t.headers},...t})).json();if(!i.success)throw new Error(((n=i.error)==null?void 0:n.message)||"AI API Error");return i.data}class QU{constructor(){this.eventSource=null,this.reconnectAttempts=0,this.maxReconnectAttempts=3,this.reconnectTimer=null,this.currentSessionId=null,this.currentCallbacks=null}async getStatus(){return Jn("/status")}async listSessions(t){return Jn(`/sessions?projectId=${encodeURIComponent(t)}`)}async createSession(t,r){return Jn("/sessions",{method:"POST",body:JSON.stringify({projectId:t,projectPath:r})})}async getSessionDetail(t){return Jn(`/sessions/${encodeURIComponent(t)}`)}async sendPrompt(t,r){console.log(`[AI API] sendPrompt called: sessionId=${t}, message="${r.substring(0,50)}..."`);try{await Jn(`/sessions/${encodeURIComponent(t)}/prompt`,{method:"POST",body:JSON.stringify({message:r})}),console.log("[AI API] sendPrompt succeeded")}catch(i){throw console.error("[AI API] sendPrompt FAILED:",i),i}}async respondApproval(t,r,i){await Jn(`/sessions/${encodeURIComponent(t)}/approve`,{method:"POST",body:JSON.stringify({requestId:r,response:i})})}async cancelGeneration(t){await Jn(`/sessions/${encodeURIComponent(t)}/cancel`,{method:"POST"})}async deleteSession(t){await Jn(`/sessions/${encodeURIComponent(t)}`,{method:"DELETE"})}connectEvents(t,r){console.log(`[AI API] connectEvents called for session ${t}`),this.disconnectEvents(),this.currentSessionId=t,this.currentCallbacks=r,this.reconnectAttempts=0,this.createEventSource(t,r)}createEventSource(t,r){const i=`${HB}/sessions/${encodeURIComponent(t)}/events`;console.log(`[AI API] Creating EventSource: ${i}`),this.eventSource=new EventSource(i),this.eventSource.addEventListener("message",n=>{try{const s=JSON.parse(n.data);console.log(`[AI API] SSE event received: type=${s.type}`),r.onEvent(s)}catch(s){console.error("[AI API] SSE message parse error:",s)}}),this.eventSource.addEventListener("request",n=>{try{const s=JSON.parse(n.data);r.onRequest(s)}catch{}}),this.eventSource.addEventListener("close",n=>{try{const s=JSON.parse(n.data);r.onError(s)}catch{}this.disconnectEvents()}),this.eventSource.addEventListener("done",()=>{r.onDone()}),this.eventSource.onerror=()=>{this.handleReconnect()},this.eventSource.onopen=()=>{var n;this.reconnectAttempts=0,(n=r.onOpen)==null||n.call(r)}}handleReconnect(){var r;if(this.reconnectAttempts>=this.maxReconnectAttempts){(r=this.currentCallbacks)==null||r.onError({message:"连接已断开,请刷新页面重试",code:"MAX_RECONNECT_EXCEEDED"}),this.disconnectEvents();return}this.reconnectAttempts++;const t=Math.pow(2,this.reconnectAttempts-1)*1e3;this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(()=>{this.currentSessionId&&this.currentCallbacks&&(this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.createEventSource(this.currentSessionId,this.currentCallbacks))},t)}disconnectEvents(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.currentSessionId=null,this.currentCallbacks=null,this.reconnectAttempts=0}}const ur=new QU;function KU(e){const r=Date.now()-e,i=Math.floor(r/6e4),n=Math.floor(r/36e5),s=Math.floor(r/864e5);return i<1?"刚刚":i<60?`${i} 分钟前`:n<24?`${n} 小时前`:s<7?`${s} 天前`:new Date(e).toLocaleDateString()}const ZU=({size:e=14})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M12 5v14M5 12h14"})}),JU=({size:e=14})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})}),tV=({size:e=14})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M18 6L6 18M6 6l12 12"})}),eV=({size:e=12,open:t})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)"},children:_.jsx("path",{d:"M6 9l6 6 6-6"})}),rV=()=>{const e=re(T=>T.aiSessions),t=re(T=>T.activeSessionId),r=re(T=>T.setActiveSession),i=re(T=>T.setAIPanelOpen),n=re(T=>T.setAISessions),s=re(T=>T.setAIMessages),a=re(T=>T.aiStreaming),c=Ft(T=>T.config),h=Ft(T=>T.projects),[u,d]=at.useState(!1),f=at.useRef(null);at.useEffect(()=>{function T(B){f.current&&!f.current.contains(B.target)&&d(!1)}return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const m=c==null?void 0:c.lastOpenedProject,g=h.find(T=>T.id===m),x=e.find(T=>T.id===t),C=at.useCallback(async()=>{if(!(!g||a)){try{const T=await ur.createSession(g.id,g.path),B=await ur.listSessions(g.id);n(B),r(T.id),s([])}catch(T){console.error("Failed to create session:",T)}d(!1)}},[g,a,n,r,s]),k=at.useCallback(async T=>{if(!(T.id===t||a)){try{r(T.id);const B=await ur.getSessionDetail(T.id);s(B.messages)}catch(B){console.error("Failed to switch session:",B)}d(!1)}},[t,a,r,s]),v=at.useCallback(async()=>{if(!(!t||a)&&window.confirm("确定删除这个对话?此操作不可撤销。"))try{if(await ur.deleteSession(t),g){const T=await ur.listSessions(g.id);if(n(T),T.length>0){const B=T[T.length-1];r(B.id);const M=await ur.getSessionDetail(B.id);s(M.messages)}else r(null),s([])}}catch(T){console.error("Failed to delete session:",T)}},[t,a,g,n,r,s]);return _.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"10px 14px",borderBottom:"1px solid var(--border)",background:"var(--bg-secondary)"},children:[_.jsxs("div",{ref:f,style:{position:"relative",flex:1,minWidth:0},children:[_.jsxs("button",{onClick:()=>d(!u),style:{display:"flex",alignItems:"center",gap:"6px",width:"100%",padding:"6px 10px",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",background:"var(--bg-primary)",color:"var(--text-primary)",cursor:"pointer",fontSize:"13px",fontWeight:500,transition:"all 0.15s ease"},children:[_.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"left"},children:(x==null?void 0:x.title)||"新对话"}),_.jsx(eV,{open:u})]}),u&&_.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",background:"var(--bg-primary)",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-lg)",zIndex:50,maxHeight:"240px",overflow:"auto"},children:e.length===0?_.jsx("div",{style:{padding:"12px",color:"var(--text-tertiary)",fontSize:"13px",textAlign:"center"},children:"暂无历史对话"}):e.map(T=>_.jsxs("button",{onClick:()=>k(T),style:{display:"flex",flexDirection:"column",gap:"2px",width:"100%",padding:"8px 12px",border:"none",background:T.id===t?"var(--accent-light)":"transparent",color:T.id===t?"var(--accent-text)":"var(--text-primary)",cursor:"pointer",textAlign:"left",transition:"background 0.1s ease"},onMouseEnter:B=>{T.id!==t&&(B.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:B=>{T.id!==t&&(B.currentTarget.style.background="transparent")},children:[_.jsx("span",{style:{fontSize:"13px",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:T.title||"新对话"}),_.jsx("span",{style:{fontSize:"11px",color:"var(--text-tertiary)"},children:KU(T.updatedAt)})]},T.id))})]}),_.jsx("button",{onClick:C,disabled:a,title:"新建对话",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",height:"30px",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",background:"var(--bg-primary)",color:"var(--text-secondary)",cursor:a?"not-allowed":"pointer",opacity:a?.5:1,transition:"all 0.15s ease",flexShrink:0},onMouseEnter:T=>{a||(T.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:T=>{T.currentTarget.style.background="var(--bg-primary)"},children:_.jsx(ZU,{})}),_.jsx("button",{onClick:v,disabled:!t||a,title:"删除当前对话",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",height:"30px",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",background:"var(--bg-primary)",color:"var(--text-secondary)",cursor:!t||a?"not-allowed":"pointer",opacity:!t||a?.5:1,transition:"all 0.15s ease",flexShrink:0},onMouseEnter:T=>{t&&!a&&(T.currentTarget.style.color="var(--danger)",T.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:T=>{T.currentTarget.style.color="var(--text-secondary)",T.currentTarget.style.background="var(--bg-primary)"},children:_.jsx(JU,{})}),_.jsx("button",{onClick:()=>i(!1),disabled:a,title:"关闭 AI 面板",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",height:"30px",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",background:"var(--bg-primary)",color:"var(--text-secondary)",cursor:a?"not-allowed":"pointer",opacity:a?.5:1,transition:"all 0.15s ease",flexShrink:0},onMouseEnter:T=>{a||(T.currentTarget.style.color="var(--danger)",T.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:T=>{T.currentTarget.style.color="var(--text-secondary)",T.currentTarget.style.background="var(--bg-primary)"},children:_.jsx(tV,{})})]})},iV=({content:e,streaming:t})=>_.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"flex-start"},children:[_.jsx("div",{style:{width:"28px",height:"28px",borderRadius:"50%",background:"var(--bg-tertiary)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"14px",flexShrink:0,marginTop:"2px"},children:"🤖"}),_.jsxs("div",{style:{flex:1,minWidth:0,fontSize:"14px",lineHeight:1.6,color:"var(--text-primary)"},children:[e.text&&_.jsx(qB,{content:e.text}),t&&_.jsx("span",{className:"ai-cursor"})]})]}),nV=({content:e,streaming:t})=>{const[r,i]=at.useState(!1);return at.useEffect(()=>{t&&e.think&&i(!0)},[t,e.think]),_.jsxs("div",{style:{borderRadius:"var(--radius-md)",background:"var(--bg-tertiary)",border:"1px solid var(--border-light)",overflow:"hidden"},children:[_.jsxs("div",{onClick:()=>i(!r),style:{display:"flex",alignItems:"center",gap:"8px",padding:"10px 14px",cursor:"pointer",userSelect:"none",fontSize:"13px",color:"var(--text-secondary)",transition:"background 0.1s ease"},onMouseEnter:n=>{n.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:n=>{n.currentTarget.style.background="transparent"},children:[_.jsx("span",{children:"💭"}),_.jsx("span",{style:{flex:1},children:t?"思考中...":"思考过程"}),_.jsx("span",{style:{display:"inline-flex",transition:"transform 0.2s ease",transform:r?"rotate(180deg)":"rotate(0deg)",fontSize:"12px",color:"var(--text-tertiary)"},children:"▼"})]}),r&&e.think&&_.jsxs("div",{style:{padding:"0 14px 12px 14px",fontSize:"13px",lineHeight:1.6,color:"var(--text-secondary)",whiteSpace:"pre-wrap",wordBreak:"break-word",borderTop:"1px solid var(--border-light)"},children:[e.think,t&&_.jsx("span",{className:"ai-cursor"})]})]})};function oV(e){try{const t=JSON.parse(e);return t.file_path?t.file_path:t.path?t.path:t.filename?t.filename:t.command?`$ ${t.command}`:""}catch{return e.length>50?e.slice(0,50)+"...":e}}function sV(e){try{const t=JSON.parse(e);return JSON.stringify(t,null,2)}catch{return e}}function aV(e,t=500){return e.length<=t?e:e.slice(0,t)+`
385
+ ... (输出已截断)`}const lV=({content:e,result:t})=>{const[r,i]=at.useState(!1),n=oV(e.arguments);return _.jsxs("div",{style:{borderRadius:"var(--radius-md)",background:"var(--bg-secondary)",border:"1px solid var(--border)",overflow:"hidden"},children:[_.jsxs("div",{onClick:()=>i(!r),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",cursor:"pointer",userSelect:"none",fontSize:"13px",background:"var(--bg-tertiary)",transition:"background 0.1s ease"},onMouseEnter:s=>{s.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:s=>{s.currentTarget.style.background="var(--bg-tertiary)"},children:[_.jsx("span",{children:"🔧"}),_.jsx("span",{style:{fontWeight:500,color:"var(--text-primary)"},children:e.functionName}),n&&_.jsx("span",{style:{flex:1,color:"var(--text-tertiary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px"},children:n}),t&&_.jsx("span",{style:{fontSize:"13px",flexShrink:0},children:t.isError?"❌":"✅"}),_.jsx("span",{style:{display:"inline-flex",transition:"transform 0.2s ease",transform:r?"rotate(180deg)":"rotate(0deg)",fontSize:"10px",color:"var(--text-tertiary)"},children:"▼"})]}),r&&_.jsxs("div",{style:{padding:"10px 12px",fontSize:"13px"},children:[_.jsx("div",{style:{marginBottom:t?"10px":0,padding:"8px 10px",borderRadius:"var(--radius-sm)",background:"var(--bg-tertiary)",fontFamily:"'SF Mono', 'Fira Code', 'Consolas', monospace",fontSize:"12px",whiteSpace:"pre-wrap",wordBreak:"break-all",color:"var(--text-secondary)",maxHeight:"200px",overflow:"auto"},children:sV(e.arguments)}),t&&_.jsxs("div",{style:{padding:"8px 10px",borderRadius:"var(--radius-sm)",background:t.isError?"rgba(250, 82, 82, 0.08)":"rgba(64, 192, 87, 0.08)",border:`1px solid ${t.isError?"var(--danger)":"var(--success)"}`},children:[_.jsx("div",{style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:"6px",fontSize:"12px",fontWeight:500,color:t.isError?"var(--danger)":"var(--success)"},children:t.isError?"❌ 失败":"✅ 成功"}),t.output&&_.jsx("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'Consolas', monospace",fontSize:"12px",color:"var(--text-secondary)",whiteSpace:"pre-wrap",wordBreak:"break-all",maxHeight:"150px",overflow:"auto",lineHeight:1.5},children:aV(t.output)})]})]})]})},cV=({display:e})=>e.type==="diff"?_.jsx("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'Consolas', monospace",fontSize:"12px",lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-all",maxHeight:"200px",overflow:"auto",padding:"8px 10px",borderRadius:"var(--radius-sm)",background:"var(--bg-tertiary)"},children:e.content&&hV(e.content)}):_.jsx("div",{style:{fontSize:"13px",color:"var(--text-secondary)",whiteSpace:"pre-wrap"},children:e.content?String(e.content):JSON.stringify(e,null,2)});function hV(e){return e.split(`
386
+ `).map((r,i)=>{let n="";return r.startsWith("+")&&!r.startsWith("+++")?n="ai-diff-add":r.startsWith("-")&&!r.startsWith("---")&&(n="ai-diff-remove"),_.jsx("div",{className:n,children:r},i)})}const uV=({messageId:e,content:t})=>{const[r,i]=at.useState(!1),n=re(h=>h.activeSessionId),s=re(h=>h.updateMessage),a=t.responded,c=async h=>{if(!(a||r||!n)){i(!0);try{await ur.respondApproval(n,t.requestId,h),s(e,{content:{...t,responded:!0,response:h}})}catch(u){console.error("Failed to respond to approval:",u)}finally{i(!1)}}};return _.jsxs("div",{style:{borderRadius:"var(--radius-md)",background:"var(--bg-secondary)",border:"2px solid #f0ad4e",overflow:"hidden"},children:[_.jsxs("div",{style:{padding:"10px 14px",display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:500,color:"var(--text-primary)",borderBottom:"1px solid var(--border)"},children:[_.jsx("span",{children:"⚠️"}),_.jsxs("span",{children:["需要审批:",t.action]}),a&&_.jsx("span",{style:{fontSize:"12px",color:t.response==="approve"?"var(--success)":"var(--danger)",marginLeft:"auto"},children:t.response==="approve"?"已批准":"已拒绝"})]}),_.jsx("div",{style:{padding:"10px 14px",fontSize:"13px",color:"var(--text-secondary)",lineHeight:1.5},children:t.description}),t.display&&t.display.length>0&&_.jsx("div",{style:{padding:"0 14px 10px",display:"flex",flexDirection:"column",gap:"8px"},children:t.display.map((h,u)=>_.jsx(cV,{display:h},u))}),_.jsxs("div",{style:{padding:"10px 14px",display:"flex",gap:"10px",justifyContent:"flex-end",borderTop:"1px solid var(--border)"},children:[_.jsx("button",{onClick:()=>c("approve"),disabled:a||r,style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"6px 16px",border:"none",borderRadius:"var(--radius-sm)",background:(a&&t.response==="approve","var(--success)"),color:"#fff",fontSize:"13px",fontWeight:500,cursor:a||r?"not-allowed":"pointer",opacity:a?.6:1,transition:"all 0.15s ease"},children:"✅ 批准"}),_.jsx("button",{onClick:()=>c("reject"),disabled:a||r,style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"6px 16px",border:"none",borderRadius:"var(--radius-sm)",background:"var(--danger)",color:"#fff",fontSize:"13px",fontWeight:500,cursor:a||r?"not-allowed":"pointer",opacity:a?.6:1,transition:"all 0.15s ease"},children:"❌ 拒绝"})]})]})},dV=({content:e})=>_.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:_.jsx("div",{style:{maxWidth:"80%",padding:"8px 14px",borderRadius:"12px 12px 2px 12px",background:"var(--accent)",color:"#fff",fontSize:"14px",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.text})});function Fs(e){return e.content}const fV=()=>{const e=re(s=>s.aiMessages),t=re(s=>s.aiStreaming),r=at.useRef(null);at.useEffect(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},[e]);const i=new Map;for(const s of e)if(s.type==="tool_result"){const a=s.content;i.set(a.toolCallId,s)}const n=e.filter(s=>s.type!=="tool_result");return n.length===0?_.jsxs("div",{ref:r,className:"ai-message-list",style:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"var(--text-tertiary)",fontSize:"14px",padding:"24px"},children:[_.jsx("div",{style:{fontSize:"36px",marginBottom:"12px"},children:"💬"}),_.jsx("div",{children:"开始与 AI 对话"}),_.jsx("div",{style:{fontSize:"12px",marginTop:"4px"},children:"输入问题,AI 将基于当前项目上下文回答"})]}):_.jsx("div",{ref:r,className:"ai-message-list",style:{flex:1,overflow:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"16px"},children:n.map((s,a)=>{const c=a===n.length-1;if(s.role==="user")return _.jsx("div",{style:{flexShrink:0},children:_.jsx(dV,{content:Fs(s)})},s.id);switch(s.type){case"text":{const h=Fs(s);return _.jsx("div",{style:{flexShrink:0},children:_.jsx(iV,{content:h,streaming:t&&c})},s.id)}case"think":{const h=Fs(s);return _.jsx("div",{style:{flexShrink:0},children:_.jsx(nV,{content:h,streaming:t&&c})},s.id)}case"tool_call":{const h=Fs(s),u=i.get(h.toolCallId),d=u?Fs(u):void 0;return _.jsx("div",{style:{flexShrink:0},children:_.jsx(lV,{content:h,result:d})},s.id)}case"approval":{const h=Fs(s);return _.jsx("div",{style:{flexShrink:0},children:_.jsx(uV,{messageId:s.id,content:h})},s.id)}default:return null}})})},pV=({size:e=16})=>_.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M22 2L11 13"}),_.jsx("path",{d:"M22 2L15 22L11 13L2 9L22 2Z"})]}),gV=({size:e=16})=>_.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",children:_.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),mV=()=>{const[e,t]=at.useState(""),r=at.useRef(null),i=re(m=>m.activeSessionId),n=re(m=>m.aiStreaming),s=re(m=>m.setStreaming),a=re(m=>m.addMessage),c=re(m=>m.setAIError),h=at.useCallback(async()=>{var g;const m=e.trim();if(!(!m||!i||n)){console.log(`[AIInputBar] Sending message: sessionId=${i}, msg="${m.substring(0,50)}..."`),t(""),s(!0),c(null),a({id:`user-${Date.now()}`,sessionId:i,role:"user",type:"text",content:{text:m},timestamp:Date.now()});try{await ur.sendPrompt(i,m),console.log("[AIInputBar] sendPrompt returned successfully")}catch(x){console.error("[AIInputBar] Failed to send prompt:",x),c("发送消息失败,请重试"),s(!1)}(g=r.current)==null||g.focus()}},[e,i,n,s,a,c]),u=at.useCallback(async()=>{if(i)try{await ur.cancelGeneration(i),s(!1)}catch(m){console.error("Failed to cancel generation:",m)}},[i,s]),d=at.useCallback(m=>{m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),h())},[h]),f=at.useCallback(m=>{t(m.target.value);const g=m.target;g.style.height="auto",g.style.height=Math.min(g.scrollHeight,120)+"px"},[]);return _.jsxs("div",{style:{borderTop:"1px solid var(--border)",padding:"12px 14px",background:"var(--bg-secondary)"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:"8px"},children:[_.jsx("textarea",{ref:r,value:e,onChange:f,onKeyDown:d,placeholder:"输入消息...",disabled:n,rows:1,style:{flex:1,padding:"8px 12px",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",background:"var(--bg-primary)",color:"var(--text-primary)",fontSize:"14px",lineHeight:1.5,resize:"none",outline:"none",fontFamily:"inherit",maxHeight:"120px",minHeight:"38px",transition:"border-color 0.15s ease"},onFocus:m=>{m.target.style.borderColor="var(--accent)"},onBlur:m=>{m.target.style.borderColor="var(--border)"}}),n?_.jsx("button",{onClick:u,title:"停止生成",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"38px",height:"38px",border:"none",borderRadius:"var(--radius-md)",background:"var(--danger)",color:"#fff",cursor:"pointer",flexShrink:0,transition:"opacity 0.15s ease"},children:_.jsx(gV,{size:14})}):_.jsx("button",{onClick:h,disabled:!e.trim()||!i,title:"发送消息",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"38px",height:"38px",border:"none",borderRadius:"var(--radius-md)",background:e.trim()&&i?"var(--accent)":"var(--bg-tertiary)",color:e.trim()&&i?"#fff":"var(--text-tertiary)",cursor:e.trim()&&i?"pointer":"not-allowed",flexShrink:0,transition:"all 0.15s ease"},children:_.jsx(pV,{size:14})})]}),_.jsx("div",{style:{marginTop:"4px",fontSize:"11px",color:"var(--text-muted)",textAlign:"center"},children:"Enter 发送 / Shift+Enter 换行"})]})},yV=()=>{const e=re(i=>i.setAIPanelOpen),t=()=>{window.open("https://moonshotai.github.io/kimi-cli","_blank")},r=()=>{e(!1)};return _.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"32px 24px",textAlign:"center"},children:[_.jsx("div",{style:{fontSize:"48px",marginBottom:"16px"},children:"🤖"}),_.jsx("h3",{style:{fontSize:"18px",fontWeight:600,color:"var(--text-primary)",marginBottom:"8px"},children:"Ask AI 需要 Kimi-CLI"}),_.jsx("p",{style:{fontSize:"14px",color:"var(--text-secondary)",lineHeight:1.6,marginBottom:"8px",maxWidth:"280px"},children:"请先安装 Kimi-CLI 以使用 AI 对话功能。"}),_.jsxs("p",{style:{fontSize:"13px",color:"var(--text-tertiary)",lineHeight:1.5,marginBottom:"24px",maxWidth:"280px"},children:["安装指南:",_.jsx("br",{}),_.jsx("a",{href:"https://moonshotai.github.io/kimi-cli",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)",textDecoration:"none"},children:"https://moonshotai.github.io/kimi-cli"})]}),_.jsxs("div",{style:{display:"flex",gap:"12px"},children:[_.jsx("button",{onClick:t,style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"8px 20px",border:"none",borderRadius:"var(--radius-md)",background:"var(--accent)",color:"#fff",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:i=>{i.currentTarget.style.background="var(--accent-hover)"},onMouseLeave:i=>{i.currentTarget.style.background="var(--accent)"},children:"打开安装指南"}),_.jsx("button",{onClick:r,style:{display:"inline-flex",alignItems:"center",padding:"8px 20px",border:"1px solid var(--border)",borderRadius:"var(--radius-md)",background:"var(--bg-secondary)",color:"var(--text-secondary)",fontSize:"14px",cursor:"pointer",transition:"all 0.15s ease"},onMouseEnter:i=>{i.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:i=>{i.currentTarget.style.background="var(--bg-secondary)"},children:"关闭"})]})]})},xV=()=>{const e=re(M=>M.aiPanelOpen),t=re(M=>M.aiStatus),r=re(M=>M.setAIStatus),i=re(M=>M.setAISessions),n=re(M=>M.setActiveSession),s=re(M=>M.setAIMessages),a=re(M=>M.setConnected);re(M=>M.setStreaming);const c=re(M=>M.setAIPanelWidth),h=Ft(M=>M.config),u=Ft(M=>M.projects),d=re(M=>M.activeSessionId),f=h==null?void 0:h.lastOpenedProject,m=u.find(M=>M.id===f),g=at.useMemo(()=>Math.floor(window.innerWidth/3),[]),x=at.useMemo(()=>Math.floor(window.innerWidth/3),[]),C=at.useMemo(()=>Math.floor(window.innerWidth/2),[]),{width:k,dragHandleProps:v,isDragging:T}=XU({minWidth:x,maxWidth:C,initialWidth:g,onResize:c});if(at.useEffect(()=>{if(!e)return;let M=!1;async function O(){var F;try{console.log("[AIPanel] Init started");const E=await ur.getStatus();if(M||(r(E),console.log(`[AIPanel] AI status: available=${E.available}, version=${E.version}`),!E.available)||!f||!m)return;const z=await ur.listSessions(f);if(M)return;if(i(z),console.log(`[AIPanel] Found ${z.length} sessions for project ${f}`),z.length>0){const K=z[z.length-1];console.log(`[AIPanel] Selecting latest session: ${K.id}`),n(K.id);const P=await ur.getSessionDetail(K.id);if(M)return;s(P.messages),console.log(`[AIPanel] Session detail loaded: ${((F=P.messages)==null?void 0:F.length)||0} messages`)}else{console.log("[AIPanel] No sessions found, creating new one...");const K=await ur.createSession(f,m.path);if(M)return;console.log(`[AIPanel] New session created: ${K.id}`),n(K.id),s([]);const P=await ur.listSessions(f);if(M)return;i(P)}console.log("[AIPanel] Init completed")}catch(E){console.error("[AIPanel] Init failed:",E)}}return O(),()=>{M=!0}},[e]),at.useEffect(()=>{if(!e||!d)return;console.log(`[AIPanel] Setting up SSE for session ${d}`),a(!1);let M={},O=0;const F={onEvent:E=>{var P,N,Z,it,V;const z=re.getState(),K=z.activeSessionId;switch(console.log(`[AIPanel] SSE onEvent: type=${E.type}`),E.type){case"TurnBegin":M={},z.setStreaming(!0);break;case"StepBegin":M={};break;case"ContentPart":{const j=(P=E.payload)==null?void 0:P.type;if(j==="text"){const q=M.text;if(q)z.appendToMessage(q,"text",E.payload.text||"");else{const Y=`ai-text-${Date.now()}-${++O}`;z.addMessage({id:Y,sessionId:K,role:"assistant",type:"text",content:{text:E.payload.text||""},timestamp:Date.now()}),M.text=Y}}else if(j==="think"){const q=M.think;if(q)z.appendToMessage(q,"think",E.payload.think||"");else{const Y=`ai-think-${Date.now()}-${++O}`;z.addMessage({id:Y,sessionId:K,role:"assistant",type:"think",content:{think:E.payload.think||""},timestamp:Date.now()}),M.think=Y}}break}case"TextPart":{const j=M.text;if(j)z.appendToMessage(j,"text",E.payload.text||"");else{const q=`ai-text-${Date.now()}-${++O}`;z.addMessage({id:q,sessionId:K,role:"assistant",type:"text",content:{text:E.payload.text||""},timestamp:Date.now()}),M.text=q}break}case"ThinkPart":{const j=M.think;if(j)z.appendToMessage(j,"think",E.payload.think||"");else{const q=`ai-think-${Date.now()}-${++O}`;z.addMessage({id:q,sessionId:K,role:"assistant",type:"think",content:{think:E.payload.think||""},timestamp:Date.now()}),M.think=q}break}case"ToolCall":z.addMessage({id:`ai-tool-${Date.now()}`,sessionId:K,role:"assistant",type:"tool_call",content:{toolCallId:E.payload.id,functionName:((N=E.payload.function)==null?void 0:N.name)||"",arguments:((Z=E.payload.function)==null?void 0:Z.arguments)||""},timestamp:Date.now()});break;case"ToolResult":z.addMessage({id:`ai-result-${Date.now()}`,sessionId:K,role:"assistant",type:"tool_result",content:{toolCallId:E.payload.tool_call_id,isError:((it=E.payload.return_value)==null?void 0:it.is_error)||!1,output:((V=E.payload.return_value)==null?void 0:V.output)||""},timestamp:Date.now()});break;case"TurnEnd":z.setStreaming(!1);break}},onRequest:E=>{const z=re.getState();E.type==="ApprovalRequest"&&z.addMessage({id:`ai-approval-${Date.now()}`,sessionId:z.activeSessionId,role:"assistant",type:"approval",content:{requestId:E.payload.id,toolCallId:E.payload.tool_call_id||"",action:E.payload.action||"",description:E.payload.description||"",display:E.payload.display||[],responded:!1},timestamp:Date.now()})},onError:E=>{console.error("[AIPanel] SSE onError:",E),re.getState().setConnected(!1)},onDone:()=>{console.log("[AIPanel] SSE onDone"),re.getState().setStreaming(!1)},onOpen:()=>{console.log("[AIPanel] SSE onOpen - connection established"),re.getState().setConnected(!0)}};return ur.connectEvents(d,F),()=>{ur.disconnectEvents(),a(!1)}},[e,d]),at.useEffect(()=>{},[e]),!e)return null;const B=(t==null?void 0:t.available)!==!1;return _.jsxs("div",{className:"ai-panel-enter",style:{position:"fixed",right:0,top:"var(--header-height)",bottom:0,width:`${k}px`,background:"var(--bg-primary)",borderLeft:"1px solid var(--border)",boxShadow:"var(--shadow-lg)",display:"flex",flexDirection:"column",zIndex:30,userSelect:T?"none":"auto"},children:[_.jsx("div",{className:"ai-drag-handle",...v,style:{position:"absolute",left:0,top:0,bottom:0,width:"4px",cursor:"col-resize",zIndex:10}}),B?_.jsxs(_.Fragment,{children:[_.jsx(rV,{}),_.jsx(fV,{}),_.jsx(mV,{})]}):_.jsx(yV,{})]})};function CV(){const e=Ft(t=>t.config);at.useEffect(()=>{const t=(e==null?void 0:e.theme)||"light";document.documentElement.setAttribute("data-theme",t)},[e==null?void 0:e.theme])}function kV(){const e=Ft(s=>s.toggleSearch),t=Ft(s=>s.setSearchOpen),r=Ft(s=>s.setSettingsOpen),i=Ft(s=>s.searchOpen),n=Ft(s=>s.settingsOpen);at.useEffect(()=>{function s(a){if((a.ctrlKey||a.metaKey)&&a.key==="k"){a.preventDefault(),e();return}a.key==="Escape"&&(i?t(!1):n&&r(!1))}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t,r,i,n])}const bV=()=>{const e=Ft(n=>n.setConfig),t=Ft(n=>n.setProjects),r=Ft(n=>n.setCurrentWiki);Ft(n=>n.setCurrentView),Ft(n=>n.setCurrentProject);const i=re(n=>n.aiPanelOpen);return CV(),kV(),at.useEffect(()=>{let n=!1;async function s(){try{const a=await El();if(n)return;if(e(a),t(a.projects),a.lastOpenedProject)try{const c=await um(a.lastOpenedProject);if(n)return;r(c)}catch(c){console.error("Failed to load last opened project wiki:",c)}}catch(a){console.error("Failed to initialize app:",a)}}return s(),()=>{n=!0}},[e,t,r]),_.jsxs(qE,{children:[_.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[_.jsx(tA,{}),_.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[_.jsx(sA,{}),_.jsx(_U,{})]})]}),_.jsx(MU,{}),_.jsx(RU,{}),_.jsx(jU,{}),_.jsx(GU,{}),i&&_.jsx(xV,{})]})},UB=document.getElementById("root");if(!UB)throw new Error("Root element not found");WE.createRoot(UB).render(_.jsx(yn.StrictMode,{children:_.jsx(bV,{})}));export{Nv as $,BV as A,no as B,O4 as C,Be as D,fO as E,fy as F,Ev as G,jN as H,V6 as I,Z$ as J,yP as K,jl as L,TV as M,hd as N,YP as O,$v as P,mC as Q,R6 as R,wg as S,NN as T,oc as U,Oi as V,ot as W,nt as X,eO as Y,MN as Z,w as _,aO as a,rk as a$,I6 as a0,DC as a1,OC as a2,DV as a3,FV as a4,PV as a5,IV as a6,EV as a7,Um as a8,OV as a9,eW as aA,tW as aB,n9 as aC,Cv as aD,P6 as aE,SV as aF,cd as aG,Iu as aH,AS as aI,ec as aJ,fc as aK,r9 as aL,e9 as aM,jm as aN,eo as aO,Hl as aP,EC as aQ,fR as aR,sN as aS,LS as aT,bS as aU,hz as aV,Au as aW,uz as aX,uc as aY,Io as aZ,eN as a_,AV as aa,Bs as ab,$V as ac,RV as ad,MV as ae,E9 as af,j_ as ag,XV as ah,t8 as ai,Tr as aj,Tn as ak,pl as al,py as am,DS as an,Vo as ao,NS as ap,Vt as aq,Xi as ar,Tt as as,FW as at,GV as au,QV as av,VV as aw,Et as ax,YV as ay,sW as az,sO as b,Qo as b0,dz as b1,sy as b2,cz as b3,gz as b4,fa as b5,oN as b6,LN as b7,kz as b8,bN as b9,KC as bA,ay as bB,wS as bC,nm as bD,wV as bE,ie as bF,ny as ba,Yk as bb,Lt as bc,jS as bd,Rr as be,sR as bf,Nm as bg,t2 as bh,lc as bi,i2 as bj,LV as bk,P4 as bl,BN as bm,kN as bn,EN as bo,od as bp,az as bq,oy as br,BS as bs,FN as bt,da as bu,dN as bv,t7 as bw,hc as bx,Mu as by,uo as bz,he as c,Qt as d,zv as e,qe as f,cO as g,bn as h,Ii as i,i8 as j,sc as k,lt as l,$S as m,_V as n,ZV as o,hO as p,uO as q,KV as r,lO as s,J$ as t,Ei as u,X9 as v,HN as w,zV as x,ra as y,oO as z};