@sme.up/ketchup2 2.0.0-SNAPSHOT-20250911125542 → 2.0.0-SNAPSHOT-20250911130320
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_basePickBy-j7F2iyIB.cjs → _basePickBy-C3RxQnku.cjs} +1 -1
- package/dist/{_basePickBy-CURcAh6G.js → _basePickBy-kiDgGFE9.js} +2 -2
- package/dist/{_baseUniq-DejB4DAK.cjs → _baseUniq-D-NLNbIo.cjs} +1 -1
- package/dist/{_baseUniq-3eO782v4.js → _baseUniq-DMFzFwna.js} +1 -1
- package/dist/{arc-Djlg1co4.js → arc-C1GVDp2P.js} +1 -1
- package/dist/{arc-DK4IWlYL.cjs → arc-g0ruoH-N.cjs} +1 -1
- package/dist/{architecture-O4VJ6CD3-CnbkU39j.cjs → architecture-O4VJ6CD3-BNIfd8BY.cjs} +1 -1
- package/dist/{architecture-O4VJ6CD3-CqnPNLK7.js → architecture-O4VJ6CD3-BkZesdxh.js} +1 -1
- package/dist/{architectureDiagram-W76B3OCA-BBm2i1R9.cjs → architectureDiagram-W76B3OCA-Cvjlkwyl.cjs} +1 -1
- package/dist/{architectureDiagram-W76B3OCA-D7urAQm9.js → architectureDiagram-W76B3OCA-DXPyAN0h.js} +3 -3
- package/dist/assets/buttonListAssets.d.ts.map +1 -1
- package/dist/assets/svg/more_horizontal.svg +1 -0
- package/dist/basic-components/cell/cell.d.ts.map +1 -1
- package/dist/basic-components/list/list.d.ts.map +1 -1
- package/dist/basic-components/typography/typography.d.ts.map +1 -1
- package/dist/{blockDiagram-QIGZ2CNN-tIr1Wi9w.cjs → blockDiagram-QIGZ2CNN-DkAbcYNH.cjs} +1 -1
- package/dist/{blockDiagram-QIGZ2CNN-D7sd_IBH.js → blockDiagram-QIGZ2CNN-HRX3yuAg.js} +5 -5
- package/dist/{c4Diagram-FPNF74CW-BsfgdrAO.cjs → c4Diagram-FPNF74CW-BFz1Fliu.cjs} +1 -1
- package/dist/{c4Diagram-FPNF74CW-D8tmjsUL.js → c4Diagram-FPNF74CW-BkKP7vd5.js} +2 -2
- package/dist/channel-BDCWHq8D.cjs +1 -0
- package/dist/{channel-C1SQcRXV.js → channel-CbpcSP8q.js} +1 -1
- package/dist/{chunk-4BX2VUAB-Cvdji6vD.js → chunk-4BX2VUAB-DLSi4Szk.js} +1 -1
- package/dist/{chunk-4BX2VUAB-_E5KFfjO.cjs → chunk-4BX2VUAB-DLuA6-Bc.cjs} +1 -1
- package/dist/{chunk-55IACEB6-dj3mdRFw.js → chunk-55IACEB6-1suIdhsZ.js} +1 -1
- package/dist/{chunk-55IACEB6-CC1SqW1a.cjs → chunk-55IACEB6-CrI1wk4o.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-BpaUapcB.js → chunk-FMBD7UC4-C7kXC6Rn.js} +1 -1
- package/dist/{chunk-FMBD7UC4-C50RVFEV.cjs → chunk-FMBD7UC4-CSW-gfZ8.cjs} +1 -1
- package/dist/{chunk-K7UQS3LO-CiaXk0p7.cjs → chunk-K7UQS3LO-B6NkOC8c.cjs} +1 -1
- package/dist/{chunk-K7UQS3LO-CsdWjRNM.js → chunk-K7UQS3LO-DExXLOWg.js} +4 -4
- package/dist/{chunk-QN33PNHL-BIgQfC4e.js → chunk-QN33PNHL-DrzOxePv.js} +1 -1
- package/dist/{chunk-QN33PNHL-Cg8o-KDz.cjs → chunk-QN33PNHL-ekvXp_v0.cjs} +1 -1
- package/dist/{chunk-QZHKN3VN-DVQMNBKf.cjs → chunk-QZHKN3VN-B00bJvcr.cjs} +1 -1
- package/dist/{chunk-QZHKN3VN-CfZFTrqe.js → chunk-QZHKN3VN-CDKd4oAU.js} +1 -1
- package/dist/{chunk-TVAH2DTR-BrJTrOId.cjs → chunk-TVAH2DTR-BagQUOXR.cjs} +1 -1
- package/dist/{chunk-TVAH2DTR-C1-NeA4d.js → chunk-TVAH2DTR-C8eD0GIP.js} +3 -3
- package/dist/{chunk-TZMSLE5B-DlSHNzLK.cjs → chunk-TZMSLE5B-Bv76EXkN.cjs} +1 -1
- package/dist/{chunk-TZMSLE5B-jewzQrrX.js → chunk-TZMSLE5B-Plrb7WH3.js} +1 -1
- package/dist/{classDiagram-KNZD7YFC-QCxAKq1c.cjs → classDiagram-KNZD7YFC-CWG1cA2z.cjs} +1 -1
- package/dist/{classDiagram-v2-RKCZMP56-Ba853BBe.js → classDiagram-KNZD7YFC-afu2hHoQ.js} +2 -2
- package/dist/{classDiagram-v2-RKCZMP56-QCxAKq1c.cjs → classDiagram-v2-RKCZMP56-CWG1cA2z.cjs} +1 -1
- package/dist/{classDiagram-KNZD7YFC-Ba853BBe.js → classDiagram-v2-RKCZMP56-afu2hHoQ.js} +2 -2
- package/dist/{clone-W0gRXg3s.js → clone-K_cx1pOn.js} +1 -1
- package/dist/clone-wpX3uV87.cjs +1 -0
- package/dist/components/breadcrumbs/breadcrumbs-types.d.ts +13 -0
- package/dist/components/breadcrumbs/breadcrumbs-types.d.ts.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +4 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/data-table/header/Header.d.ts.map +1 -1
- package/dist/{cose-bilkent-S5V4N54A-CIRFJr1v.js → cose-bilkent-S5V4N54A-C4ueJGXG.js} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-BfCJCUzx.cjs → cose-bilkent-S5V4N54A-D_u9ib7t.cjs} +1 -1
- package/dist/{dagre-5GWH7T2D-Dz5l0-IT.cjs → dagre-5GWH7T2D-CtZ0NZo_.cjs} +1 -1
- package/dist/{dagre-5GWH7T2D-CE7nvyV3.js → dagre-5GWH7T2D-DQw2tWTc.js} +6 -6
- package/dist/{diagram-N5W7TBWH-K0z-8nld.cjs → diagram-N5W7TBWH-3Mv1I4jU.cjs} +1 -1
- package/dist/{diagram-N5W7TBWH-Dyi68lAS.js → diagram-N5W7TBWH-gec-tJLC.js} +4 -4
- package/dist/{diagram-QEK2KX5R-B58ktsHs.js → diagram-QEK2KX5R-CuLFpR9b.js} +3 -3
- package/dist/{diagram-QEK2KX5R-BsmryBJo.cjs → diagram-QEK2KX5R-DLOehBeq.cjs} +1 -1
- package/dist/{diagram-S2PKOQOG-D7HFlgJB.js → diagram-S2PKOQOG-BVIUFJfs.js} +3 -3
- package/dist/{diagram-S2PKOQOG-CxmIIGX4.cjs → diagram-S2PKOQOG-CaeUDn9g.cjs} +1 -1
- package/dist/{erDiagram-AWTI2OKA-BJtnZhh2.js → erDiagram-AWTI2OKA-CF2oIjDK.js} +4 -4
- package/dist/{erDiagram-AWTI2OKA-UjL2WyGb.cjs → erDiagram-AWTI2OKA-CIpa-Oz9.cjs} +1 -1
- package/dist/{flowDiagram-PVAE7QVJ-B2DEkemN.js → flowDiagram-PVAE7QVJ-Bc-NqcLl.js} +5 -5
- package/dist/{flowDiagram-PVAE7QVJ-BkP0IZHZ.cjs → flowDiagram-PVAE7QVJ-CuIY3tu-.cjs} +1 -1
- package/dist/{ganttDiagram-OWAHRB6G-B3X7mQ9T.js → ganttDiagram-OWAHRB6G-C-obPFPz.js} +2 -2
- package/dist/{ganttDiagram-OWAHRB6G-B3WAcxgN.cjs → ganttDiagram-OWAHRB6G-DkDxl3ww.cjs} +1 -1
- package/dist/{gitGraph-ZV4HHKMB-D1J9QTOr.js → gitGraph-ZV4HHKMB-Blb3x7FR.js} +1 -1
- package/dist/{gitGraph-ZV4HHKMB-KOvYkZKq.cjs → gitGraph-ZV4HHKMB-C1puLJme.cjs} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-C9T-V_K8.js → gitGraphDiagram-NY62KEGX-Ak6FhOD1.js} +4 -4
- package/dist/{gitGraphDiagram-NY62KEGX-Dhz4jsR2.cjs → gitGraphDiagram-NY62KEGX-Qk5kCNdF.cjs} +1 -1
- package/dist/{graph-DHWyp9y3.js → graph-DbdIqiSC.js} +2 -2
- package/dist/{graph-DRvPJrml.cjs → graph-g9ylX5Ik.cjs} +1 -1
- package/dist/{index-PB8-r29R.js → index-CcciJZk9.js} +5654 -5502
- package/dist/index-Ce0aIQ6-.cjs +301 -0
- package/dist/{info-63CPKGFF-nyciKHvm.cjs → info-63CPKGFF-Bxwg_B4g.cjs} +1 -1
- package/dist/info-63CPKGFF-JyL5SKFd.js +5 -0
- package/dist/{infoDiagram-STP46IZ2-DfrOqrTR.cjs → infoDiagram-STP46IZ2-BHoDbP4r.cjs} +1 -1
- package/dist/{infoDiagram-STP46IZ2-BnVp7Ty_.js → infoDiagram-STP46IZ2-CHVFsdl2.js} +2 -2
- package/dist/{journeyDiagram-BIP6EPQ6-DnGpqdTC.js → journeyDiagram-BIP6EPQ6-BuP9dB12.js} +4 -4
- package/dist/{journeyDiagram-BIP6EPQ6-Cf1DnT1W.cjs → journeyDiagram-BIP6EPQ6-DerBhJ75.cjs} +1 -1
- package/dist/{kanban-definition-6OIFK2YF-DenJM7oI.cjs → kanban-definition-6OIFK2YF-U0gLGtxY.cjs} +1 -1
- package/dist/{kanban-definition-6OIFK2YF-OVCmqlgw.js → kanban-definition-6OIFK2YF-l9FvvPm4.js} +2 -2
- package/dist/ketchup2.cjs.js +1 -1
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +1 -1
- package/dist/{layout-DRg0gGKw.cjs → layout-Cqcyezix.cjs} +1 -1
- package/dist/{layout-CUDcVrW7.js → layout-DOM56cVR.js} +4 -4
- package/dist/{linear-Cj3VrtNJ.cjs → linear-BUmmD3lB.cjs} +1 -1
- package/dist/{linear-Bkij7VKO.js → linear-ysAgR6lb.js} +1 -1
- package/dist/{mermaid-parser.core-BIp4LgAG.js → mermaid-parser.core-Ho0tPRpR.js} +11 -11
- package/dist/{mermaid-parser.core-D-HkooZI.cjs → mermaid-parser.core-qgY08dpL.cjs} +2 -2
- package/dist/{mindmap-definition-Q6HEUPPD-CDxIe2oN.js → mindmap-definition-Q6HEUPPD-D8viMuNR.js} +3 -3
- package/dist/{mindmap-definition-Q6HEUPPD-BpXitvCN.cjs → mindmap-definition-Q6HEUPPD-u3hjSRlQ.cjs} +1 -1
- package/dist/{packet-HUATNLJX-DSSgnHYD.cjs → packet-HUATNLJX-Bkx4EDzY.cjs} +1 -1
- package/dist/{packet-HUATNLJX-CcaRK7To.js → packet-HUATNLJX-DWcimLFl.js} +1 -1
- package/dist/pie-WTHONI2E-BkA3NWZy.js +5 -0
- package/dist/{pie-WTHONI2E-CHSsk4RX.cjs → pie-WTHONI2E-Cktfy1vU.cjs} +1 -1
- package/dist/{pieDiagram-ADFJNKIX-COxo77gD.cjs → pieDiagram-ADFJNKIX-B8uOR0EF.cjs} +1 -1
- package/dist/{pieDiagram-ADFJNKIX-CXm5TDsJ.js → pieDiagram-ADFJNKIX-e7Tgil2x.js} +4 -4
- package/dist/{quadrantDiagram-LMRXKWRM-CtODsR00.cjs → quadrantDiagram-LMRXKWRM-B0HyG11H.cjs} +1 -1
- package/dist/{quadrantDiagram-LMRXKWRM-BWhMbgw7.js → quadrantDiagram-LMRXKWRM-CJJg8tNT.js} +2 -2
- package/dist/{radar-NJJJXTRR-DI285myo.cjs → radar-NJJJXTRR-BdR5a6c4.cjs} +1 -1
- package/dist/radar-NJJJXTRR-CGPf70aQ.js +5 -0
- package/dist/{requirementDiagram-4UW4RH46-B-KQ-vZQ.cjs → requirementDiagram-4UW4RH46-Cibzf9eD.cjs} +1 -1
- package/dist/{requirementDiagram-4UW4RH46-CTGvW1gX.js → requirementDiagram-4UW4RH46-D8ZTonEs.js} +3 -3
- package/dist/{sankeyDiagram-GR3RE2ED-BMK9TwGu.js → sankeyDiagram-GR3RE2ED-BeKa18N1.js} +1 -1
- package/dist/{sankeyDiagram-GR3RE2ED-BIXAvmu5.cjs → sankeyDiagram-GR3RE2ED-CQRxflg7.cjs} +1 -1
- package/dist/{sequenceDiagram-C3RYC4MD-B02C_P8V.cjs → sequenceDiagram-C3RYC4MD-BK5bmD_o.cjs} +1 -1
- package/dist/{sequenceDiagram-C3RYC4MD-BO0lU4at.js → sequenceDiagram-C3RYC4MD-qd8uxQ6z.js} +3 -3
- package/dist/{stateDiagram-KXAO66HF-Beootb4e.cjs → stateDiagram-KXAO66HF-Cr2HjxcV.cjs} +1 -1
- package/dist/{stateDiagram-KXAO66HF-DfyviXZF.js → stateDiagram-KXAO66HF-CuSQwx3i.js} +4 -4
- package/dist/{stateDiagram-v2-UMBNRL4Z-BZhRijj7.js → stateDiagram-v2-UMBNRL4Z-CTIwHOm7.js} +2 -2
- package/dist/{stateDiagram-v2-UMBNRL4Z-CZaIAl9h.cjs → stateDiagram-v2-UMBNRL4Z-D3dOiWSt.cjs} +1 -1
- package/dist/{timeline-definition-XQNQX7LJ-CGF8Ag8o.js → timeline-definition-XQNQX7LJ-B82HVUDD.js} +2 -2
- package/dist/{timeline-definition-XQNQX7LJ-CXuPiStN.cjs → timeline-definition-XQNQX7LJ-B9-olSzM.cjs} +1 -1
- package/dist/{treemap-75Q7IDZK-CZCRR7ml.cjs → treemap-75Q7IDZK-CBFlXz6K.cjs} +1 -1
- package/dist/{treemap-75Q7IDZK-CNUjI4Jk.js → treemap-75Q7IDZK-CbcEeu9F.js} +1 -1
- package/dist/types/data-structures.d.ts +2 -0
- package/dist/types/data-structures.d.ts.map +1 -1
- package/dist/{xychartDiagram-6GGTOJPD-Bem8mOgQ.js → xychartDiagram-6GGTOJPD-D_MFD1Hh.js} +2 -2
- package/dist/{xychartDiagram-6GGTOJPD-cs_qH3NA.cjs → xychartDiagram-6GGTOJPD-iNRGxMjU.cjs} +1 -1
- package/package.json +4 -3
- package/dist/channel-351C_Ts_.cjs +0 -1
- package/dist/clone-BB_qi1s7.cjs +0 -1
- package/dist/index-HfCMEYeO.cjs +0 -301
- package/dist/info-63CPKGFF-BMaMKtR_.js +0 -5
- package/dist/pie-WTHONI2E-BmLdlDGb.js +0 -5
- package/dist/radar-NJJJXTRR-CYxFCd2h.js +0 -5
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
"use strict";const j=require("react"),f1=require("react-dom");function d1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const xs=d1(j);function Md(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vs={exports:{}},ln={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var du;function p1(){if(du)return ln;du=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,n,s){var o=null;if(s!==void 0&&(o=""+s),n.key!==void 0&&(o=""+n.key),"key"in n){s={};for(var a in n)a!=="key"&&(s[a]=n[a])}else s=n;return n=s.ref,{$$typeof:e,type:i,key:o,ref:n!==void 0?n:null,props:s}}return ln.Fragment=t,ln.jsx=r,ln.jsxs=r,ln}var cn={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var pu;function g1(){return pu||(pu=1,process.env.NODE_ENV!=="production"&&function(){function e(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===F?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case g:return"Fragment";case b:return"Profiler";case y:return"StrictMode";case v:return"Suspense";case E:return"SuspenseList";case N:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case p:return"Portal";case w:return(_.displayName||"Context")+".Provider";case x:return(_._context.displayName||"Context")+".Consumer";case C:var M=_.render;return _=_.displayName,_||(_=M.displayName||M.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case T:return M=_.displayName||null,M!==null?M:e(_.type)||"Memo";case P:M=_._payload,_=_._init;try{return e(_(M))}catch{}}return null}function t(_){return""+_}function r(_){try{t(_);var M=!1}catch{M=!0}if(M){M=console;var H=M.error,z=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return H.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",z),t(_)}}function i(_){if(_===g)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===P)return"<...>";try{var M=e(_);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function n(){var _=k.A;return _===null?null:_.getOwner()}function s(){return Error("react-stack-top-frame")}function o(_){if(L.call(_,"key")){var M=Object.getOwnPropertyDescriptor(_,"key").get;if(M&&M.isReactWarning)return!1}return _.key!==void 0}function a(_,M){function H(){I||(I=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}H.isReactWarning=!0,Object.defineProperty(_,"key",{get:H,configurable:!0})}function l(){var _=e(this.type);return A[_]||(A[_]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),_=this.props.ref,_!==void 0?_:null}function c(_,M,H,z,U,Y,K,Z){return H=Y.ref,_={$$typeof:d,type:_,key:M,props:Y,_owner:U},(H!==void 0?H:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:l}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function h(_,M,H,z,U,Y,K,Z){var Q=M.children;if(Q!==void 0)if(z)if(O(Q)){for(z=0;z<Q.length;z++)u(Q[z]);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(Q);if(L.call(M,"key")){Q=e(_);var ct=Object.keys(M).filter(function(wt){return wt!=="key"});z=0<ct.length?"{key: someKey, "+ct.join(": ..., ")+": ...}":"{key: someKey}",R[Q+z]||(ct=0<ct.length?"{"+ct.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,z,Q,ct,Q),R[Q+z]=!0)}if(Q=null,H!==void 0&&(r(H),Q=""+H),o(M)&&(r(M.key),Q=""+M.key),"key"in M){H={};for(var et in M)et!=="key"&&(H[et]=M[et])}else H=M;return Q&&a(H,typeof _=="function"?_.displayName||_.name||"Unknown":_),c(_,Q,Y,U,n(),H,K,Z)}function u(_){typeof _=="object"&&_!==null&&_.$$typeof===d&&_._store&&(_._store.validated=1)}var f=j,d=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),k=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,O=Array.isArray,B=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(_){return _()}};var I,A={},q=f.react_stack_bottom_frame.bind(f,s)(),$=B(i(s)),R={};cn.Fragment=g,cn.jsx=function(_,M,H,z,U){var Y=1e4>k.recentlyCreatedOwnerStacks++;return h(_,M,H,!1,z,U,Y?Error("react-stack-top-frame"):q,Y?B(i(_)):$)},cn.jsxs=function(_,M,H,z,U){var Y=1e4>k.recentlyCreatedOwnerStacks++;return h(_,M,H,!0,z,U,Y?Error("react-stack-top-frame"):q,Y?B(i(_)):$)}}()),cn}var gu;function m1(){return gu||(gu=1,process.env.NODE_ENV==="production"?vs.exports=p1():vs.exports=g1()),vs.exports}var S=m1();function y1(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ia.apply(null,arguments)}function ml(e,t){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ml(e,t)}function b1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ml(e,t)}function Io(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,s;i<n;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}var ws={};/*!
|
|
23
|
+
* content-type
|
|
24
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
25
|
+
* MIT Licensed
|
|
26
|
+
*/var mu;function x1(){if(mu)return ws;mu=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,i=/\\([\u000b\u0020-\u00ff])/g,n=/([\\"])/g,s=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;ws.format=o,ws.parse=a;function o(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var f=u.parameters,d=u.type;if(!d||!s.test(d))throw new TypeError("invalid type");var p=d;if(f&&typeof f=="object")for(var g,y=Object.keys(f).sort(),b=0;b<y.length;b++){if(g=y[b],!r.test(g))throw new TypeError("invalid parameter name");p+="; "+g+"="+c(f[g])}return p}function a(u){if(!u)throw new TypeError("argument string is required");var f=typeof u=="object"?l(u):u;if(typeof f!="string")throw new TypeError("argument string is required to be a string");var d=f.indexOf(";"),p=d!==-1?f.slice(0,d).trim():f.trim();if(!s.test(p))throw new TypeError("invalid media type");var g=new h(p.toLowerCase());if(d!==-1){var y,b,x;for(e.lastIndex=d;b=e.exec(f);){if(b.index!==d)throw new TypeError("invalid parameter format");d+=b[0].length,y=b[1].toLowerCase(),x=b[2],x.charCodeAt(0)===34&&(x=x.slice(1,-1),x.indexOf("\\")!==-1&&(x=x.replace(i,"$1"))),g.parameters[y]=x}if(d!==f.length)throw new TypeError("invalid parameter format")}return g}function l(u){var f;if(typeof u.getHeader=="function"?f=u.getHeader("content-type"):typeof u.headers=="object"&&(f=u.headers&&u.headers["content-type"]),typeof f!="string")throw new TypeError("content-type header is missing from object");return f}function c(u){var f=String(u);if(r.test(f))return f;if(f.length>0&&!t.test(f))throw new TypeError("invalid parameter value");return'"'+f.replace(n,"\\$1")+'"'}function h(u){this.parameters=Object.create(null),this.type=u}return ws}var v1=x1(),wi=new Map,Bd=function(t){return t.cloneNode(!0)},yu=function(){return window.location.protocol==="file:"},Od=function(t,r,i){var n=new XMLHttpRequest;n.onreadystatechange=function(){try{if(!/\.svg/i.test(t)&&n.readyState===2){var s=n.getResponseHeader("Content-Type");if(!s)throw new Error("Content type not found");var o=v1.parse(s).type;if(!(o==="image/svg+xml"||o==="text/plain"))throw new Error("Invalid content type: ".concat(o))}if(n.readyState===4){if(n.status===404||n.responseXML===null)throw new Error(yu()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+t);if(n.status===200||yu()&&n.status===0)i(null,n);else throw new Error("There was a problem injecting the SVG: "+n.status+" "+n.statusText)}}catch(a){if(n.abort(),a instanceof Error)i(a,n);else throw a}},n.open("GET",t),n.withCredentials=r,n.overrideMimeType&&n.overrideMimeType("text/xml"),n.send()},_r={},bu=function(t,r){_r[t]=_r[t]||[],_r[t].push(r)},w1=function(t){for(var r=function(o,a){setTimeout(function(){if(Array.isArray(_r[t])){var l=wi.get(t),c=_r[t][o];l instanceof SVGSVGElement&&c(null,Bd(l)),l instanceof Error&&c(l),o===_r[t].length-1&&delete _r[t]}},0)},i=0,n=_r[t].length;i<n;i++)r(i)},C1=function(t,r,i){if(wi.has(t)){var n=wi.get(t);if(n===void 0){bu(t,i);return}if(n instanceof SVGSVGElement){i(null,Bd(n));return}}wi.set(t,void 0),bu(t,i),Od(t,r,function(s,o){var a;s?wi.set(t,s):((a=o.responseXML)===null||a===void 0?void 0:a.documentElement)instanceof SVGSVGElement&&wi.set(t,o.responseXML.documentElement),w1(t)})},_1=function(t,r,i){Od(t,r,function(n,s){var o;n?i(n):((o=s.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&i(null,s.responseXML.documentElement)})},S1=0,k1=function(){return++S1},je=[],xu={},T1="http://www.w3.org/2000/svg",No="http://www.w3.org/1999/xlink",vu=function(t,r,i,n,s,o,a){var l=t.getAttribute("data-src")||t.getAttribute("src");if(!l){a(new Error("Invalid data-src or src attribute"));return}if(je.indexOf(t)!==-1){je.splice(je.indexOf(t),1),t=null;return}je.push(t),t.setAttribute("src","");var c=n?C1:_1;c(l,s,function(h,u){if(!u){je.splice(je.indexOf(t),1),t=null,a(h);return}var f=t.getAttribute("id");f&&u.setAttribute("id",f);var d=t.getAttribute("title");d&&u.setAttribute("title",d);var p=t.getAttribute("width");p&&u.setAttribute("width",p);var g=t.getAttribute("height");g&&u.setAttribute("height",g);var y=Array.from(new Set(Io(Io(Io([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(t.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",y);var b=t.getAttribute("style");b&&u.setAttribute("style",b),u.setAttribute("data-src",l);var x=[].filter.call(t.attributes,function($){return/^data-\w[\w-]*$/.test($.name)});if(Array.prototype.forEach.call(x,function($){$.name&&$.value&&u.setAttribute($.name,$.value)}),i){var w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},C,v,E,T,P;Object.keys(w).forEach(function($){C=$,E=w[$],v=u.querySelectorAll(C+"[id]");for(var R=function(z,U){T=v[z].id,P=T+"-"+k1();var Y;Array.prototype.forEach.call(E,function(it){Y=u.querySelectorAll("["+it+'*="'+T+'"]');for(var bt=0,tt=Y.length;bt<tt;bt++){var pt=Y[bt].getAttribute(it);pt&&!pt.match(new RegExp('url\\("?#'+T+'"?\\)'))||Y[bt].setAttribute(it,"url(#"+P+")")}});for(var K=u.querySelectorAll("[*|href]"),Z=[],Q=0,ct=K.length;Q<ct;Q++){var et=K[Q].getAttributeNS(No,"href");et&&et.toString()==="#"+v[z].id&&Z.push(K[Q])}for(var wt=0,G=Z.length;wt<G;wt++)Z[wt].setAttributeNS(No,"href","#"+P);v[z].id=P},_=0,M=v.length;_<M;_++)R(_)})}u.removeAttribute("xmlns:a");for(var N=u.querySelectorAll("script"),F=[],k,L,O=0,B=N.length;O<B;O++)L=N[O].getAttribute("type"),(!L||L==="application/ecmascript"||L==="application/javascript"||L==="text/javascript")&&(k=N[O].innerText||N[O].textContent,k&&F.push(k),u.removeChild(N[O]));if(F.length>0&&(r==="always"||r==="once"&&!xu[l])){for(var I=0,A=F.length;I<A;I++)new Function(F[I])(window);xu[l]=!0}var q=u.querySelectorAll("style");if(Array.prototype.forEach.call(q,function($){$.textContent+=""}),u.setAttribute("xmlns",T1),u.setAttribute("xmlns:xlink",No),o(u),!t.parentNode){je.splice(je.indexOf(t),1),t=null,a(new Error("Parent node is null"));return}t.parentNode.replaceChild(u,t),je.splice(je.indexOf(t),1),t=null,a(null,u)})},E1=function(t,r){var i=r===void 0?{}:r,n=i.afterAll,s=n===void 0?function(){}:n,o=i.afterEach,a=o===void 0?function(){}:o,l=i.beforeEach,c=l===void 0?function(){}:l,h=i.cacheRequests,u=h===void 0?!0:h,f=i.evalScripts,d=f===void 0?"never":f,p=i.httpRequestWithCredentials,g=p===void 0?!1:p,y=i.renumerateIRIElements,b=y===void 0?!0:y;if(t&&"length"in t)for(var x=0,w=0,C=t.length;w<C;w++)vu(t[w],d,b,u,g,c,function(v,E){a(v,E),t&&"length"in t&&t.length===++x&&s(x)});else t?vu(t,d,b,u,g,c,function(v,E){a(v,E),s(1),t=null}):s(0)},Cs={exports:{}},_s={exports:{}},At={};/** @license React v16.13.1
|
|
27
|
+
* react-is.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var wu;function L1(){if(wu)return At;wu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(v){if(typeof v=="object"&&v!==null){var E=v.$$typeof;switch(E){case t:switch(v=v.type,v){case l:case c:case i:case s:case n:case u:return v;default:switch(v=v&&v.$$typeof,v){case a:case h:case p:case d:case o:return v;default:return E}}case r:return E}}}function C(v){return w(v)===c}return At.AsyncMode=l,At.ConcurrentMode=c,At.ContextConsumer=a,At.ContextProvider=o,At.Element=t,At.ForwardRef=h,At.Fragment=i,At.Lazy=p,At.Memo=d,At.Portal=r,At.Profiler=s,At.StrictMode=n,At.Suspense=u,At.isAsyncMode=function(v){return C(v)||w(v)===l},At.isConcurrentMode=C,At.isContextConsumer=function(v){return w(v)===a},At.isContextProvider=function(v){return w(v)===o},At.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},At.isForwardRef=function(v){return w(v)===h},At.isFragment=function(v){return w(v)===i},At.isLazy=function(v){return w(v)===p},At.isMemo=function(v){return w(v)===d},At.isPortal=function(v){return w(v)===r},At.isProfiler=function(v){return w(v)===s},At.isStrictMode=function(v){return w(v)===n},At.isSuspense=function(v){return w(v)===u},At.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===i||v===c||v===s||v===n||v===u||v===f||typeof v=="object"&&v!==null&&(v.$$typeof===p||v.$$typeof===d||v.$$typeof===o||v.$$typeof===a||v.$$typeof===h||v.$$typeof===y||v.$$typeof===b||v.$$typeof===x||v.$$typeof===g)},At.typeOf=w,At}var $t={};/** @license React v16.13.1
|
|
34
|
+
* react-is.development.js
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the MIT license found in the
|
|
39
|
+
* LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/var Cu;function A1(){return Cu||(Cu=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(G){return typeof G=="string"||typeof G=="function"||G===i||G===c||G===s||G===n||G===u||G===f||typeof G=="object"&&G!==null&&(G.$$typeof===p||G.$$typeof===d||G.$$typeof===o||G.$$typeof===a||G.$$typeof===h||G.$$typeof===y||G.$$typeof===b||G.$$typeof===x||G.$$typeof===g)}function C(G){if(typeof G=="object"&&G!==null){var it=G.$$typeof;switch(it){case t:var bt=G.type;switch(bt){case l:case c:case i:case s:case n:case u:return bt;default:var tt=bt&&bt.$$typeof;switch(tt){case a:case h:case p:case d:case o:return tt;default:return it}}case r:return it}}}var v=l,E=c,T=a,P=o,N=t,F=h,k=i,L=p,O=d,B=r,I=s,A=n,q=u,$=!1;function R(G){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(G)||C(G)===l}function _(G){return C(G)===c}function M(G){return C(G)===a}function H(G){return C(G)===o}function z(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function U(G){return C(G)===h}function Y(G){return C(G)===i}function K(G){return C(G)===p}function Z(G){return C(G)===d}function Q(G){return C(G)===r}function ct(G){return C(G)===s}function et(G){return C(G)===n}function wt(G){return C(G)===u}$t.AsyncMode=v,$t.ConcurrentMode=E,$t.ContextConsumer=T,$t.ContextProvider=P,$t.Element=N,$t.ForwardRef=F,$t.Fragment=k,$t.Lazy=L,$t.Memo=O,$t.Portal=B,$t.Profiler=I,$t.StrictMode=A,$t.Suspense=q,$t.isAsyncMode=R,$t.isConcurrentMode=_,$t.isContextConsumer=M,$t.isContextProvider=H,$t.isElement=z,$t.isForwardRef=U,$t.isFragment=Y,$t.isLazy=K,$t.isMemo=Z,$t.isPortal=Q,$t.isProfiler=ct,$t.isStrictMode=et,$t.isSuspense=wt,$t.isValidElementType=w,$t.typeOf=C}()),$t}var _u;function Rd(){return _u||(_u=1,process.env.NODE_ENV==="production"?_s.exports=L1():_s.exports=A1()),_s.exports}/*
|
|
41
|
+
object-assign
|
|
42
|
+
(c) Sindre Sorhus
|
|
43
|
+
@license MIT
|
|
44
|
+
*/var Po,Su;function $1(){if(Su)return Po;Su=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function n(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(h){return o[h]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Po=n()?Object.assign:function(s,o){for(var a,l=i(s),c,h=1;h<arguments.length;h++){a=Object(arguments[h]);for(var u in a)t.call(a,u)&&(l[u]=a[u]);if(e){c=e(a);for(var f=0;f<c.length;f++)r.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Po}var jo,ku;function Bc(){if(ku)return jo;ku=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return jo=e,jo}var zo,Tu;function Dd(){return Tu||(Tu=1,zo=Function.call.bind(Object.prototype.hasOwnProperty)),zo}var Wo,Eu;function M1(){if(Eu)return Wo;Eu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Bc(),r={},i=Dd();e=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function n(s,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var h in s)if(i(s,h)){var u;try{if(typeof s[h]!="function"){var f=Error((l||"React class")+": "+a+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=s[h](o,h,l,a,null,t)}catch(p){u=p}if(u&&!(u instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in r)){r[u.message]=!0;var d=c?c():"";e("Failed "+a+" type: "+u.message+(d??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Wo=n,Wo}var qo,Lu;function B1(){if(Lu)return qo;Lu=1;var e=Rd(),t=$1(),r=Bc(),i=Dd(),n=M1(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return qo=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function u(_){var M=_&&(c&&_[c]||_[h]);if(typeof M=="function")return M}var f="<<anonymous>>",d={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:x(),arrayOf:w,element:C(),elementType:v(),instanceOf:E,node:F(),objectOf:P,oneOf:T,oneOfType:N,shape:L,exact:O};function p(_,M){return _===M?_!==0||1/_===1/M:_!==_&&M!==M}function g(_,M){this.message=_,this.data=M&&typeof M=="object"?M:{},this.stack=""}g.prototype=Error.prototype;function y(_){if(process.env.NODE_ENV!=="production")var M={},H=0;function z(Y,K,Z,Q,ct,et,wt){if(Q=Q||f,et=et||Z,wt!==r){if(l){var G=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var it=Q+":"+Z;!M[it]&&H<3&&(s("You are manually calling a React.PropTypes validation function for the `"+et+"` prop on `"+Q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[it]=!0,H++)}}return K[Z]==null?Y?K[Z]===null?new g("The "+ct+" `"+et+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new g("The "+ct+" `"+et+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:_(K,Z,Q,ct,et)}var U=z.bind(null,!1);return U.isRequired=z.bind(null,!0),U}function b(_){function M(H,z,U,Y,K,Z){var Q=H[z],ct=A(Q);if(ct!==_){var et=q(Q);return new g("Invalid "+Y+" `"+K+"` of type "+("`"+et+"` supplied to `"+U+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return y(M)}function x(){return y(o)}function w(_){function M(H,z,U,Y,K){if(typeof _!="function")return new g("Property `"+K+"` of component `"+U+"` has invalid PropType notation inside arrayOf.");var Z=H[z];if(!Array.isArray(Z)){var Q=A(Z);return new g("Invalid "+Y+" `"+K+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected an array."))}for(var ct=0;ct<Z.length;ct++){var et=_(Z,ct,U,Y,K+"["+ct+"]",r);if(et instanceof Error)return et}return null}return y(M)}function C(){function _(M,H,z,U,Y){var K=M[H];if(!a(K)){var Z=A(K);return new g("Invalid "+U+" `"+Y+"` of type "+("`"+Z+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return y(_)}function v(){function _(M,H,z,U,Y){var K=M[H];if(!e.isValidElementType(K)){var Z=A(K);return new g("Invalid "+U+" `"+Y+"` of type "+("`"+Z+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return y(_)}function E(_){function M(H,z,U,Y,K){if(!(H[z]instanceof _)){var Z=_.name||f,Q=R(H[z]);return new g("Invalid "+Y+" `"+K+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected ")+("instance of `"+Z+"`."))}return null}return y(M)}function T(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function M(H,z,U,Y,K){for(var Z=H[z],Q=0;Q<_.length;Q++)if(p(Z,_[Q]))return null;var ct=JSON.stringify(_,function(wt,G){var it=q(G);return it==="symbol"?String(G):G});return new g("Invalid "+Y+" `"+K+"` of value `"+String(Z)+"` "+("supplied to `"+U+"`, expected one of "+ct+"."))}return y(M)}function P(_){function M(H,z,U,Y,K){if(typeof _!="function")return new g("Property `"+K+"` of component `"+U+"` has invalid PropType notation inside objectOf.");var Z=H[z],Q=A(Z);if(Q!=="object")return new g("Invalid "+Y+" `"+K+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected an object."));for(var ct in Z)if(i(Z,ct)){var et=_(Z,ct,U,Y,K+"."+ct,r);if(et instanceof Error)return et}return null}return y(M)}function N(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var M=0;M<_.length;M++){var H=_[M];if(typeof H!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(H)+" at index "+M+"."),o}function z(U,Y,K,Z,Q){for(var ct=[],et=0;et<_.length;et++){var wt=_[et],G=wt(U,Y,K,Z,Q,r);if(G==null)return null;G.data&&i(G.data,"expectedType")&&ct.push(G.data.expectedType)}var it=ct.length>0?", expected one of type ["+ct.join(", ")+"]":"";return new g("Invalid "+Z+" `"+Q+"` supplied to "+("`"+K+"`"+it+"."))}return y(z)}function F(){function _(M,H,z,U,Y){return B(M[H])?null:new g("Invalid "+U+" `"+Y+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return y(_)}function k(_,M,H,z,U){return new g((_||"React class")+": "+M+" type `"+H+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U+"`.")}function L(_){function M(H,z,U,Y,K){var Z=H[z],Q=A(Z);if(Q!=="object")return new g("Invalid "+Y+" `"+K+"` of type `"+Q+"` "+("supplied to `"+U+"`, expected `object`."));for(var ct in _){var et=_[ct];if(typeof et!="function")return k(U,Y,K,ct,q(et));var wt=et(Z,ct,U,Y,K+"."+ct,r);if(wt)return wt}return null}return y(M)}function O(_){function M(H,z,U,Y,K){var Z=H[z],Q=A(Z);if(Q!=="object")return new g("Invalid "+Y+" `"+K+"` of type `"+Q+"` "+("supplied to `"+U+"`, expected `object`."));var ct=t({},H[z],_);for(var et in ct){var wt=_[et];if(i(_,et)&&typeof wt!="function")return k(U,Y,K,et,q(wt));if(!wt)return new g("Invalid "+Y+" `"+K+"` key `"+et+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(H[z],null," ")+`
|
|
45
|
+
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var G=wt(Z,et,U,Y,K+"."+et,r);if(G)return G}return null}return y(M)}function B(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(B);if(_===null||a(_))return!0;var M=u(_);if(M){var H=M.call(_),z;if(M!==_.entries){for(;!(z=H.next()).done;)if(!B(z.value))return!1}else for(;!(z=H.next()).done;){var U=z.value;if(U&&!B(U[1]))return!1}}else return!1;return!0;default:return!1}}function I(_,M){return _==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function A(_){var M=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":I(M,_)?"symbol":M}function q(_){if(typeof _>"u"||_===null)return""+_;var M=A(_);if(M==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return M}function $(_){var M=q(_);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function R(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return d.checkPropTypes=n,d.resetWarningCache=n.resetWarningCache,d.PropTypes=d,d},qo}var Ho,Au;function O1(){if(Au)return Ho;Au=1;var e=Bc();function t(){}function r(){}return r.resetWarningCache=t,Ho=function(){function i(o,a,l,c,h,u){if(u!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}i.isRequired=i;function n(){return i}var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:n,element:i,elementType:i,instanceOf:n,node:i,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},Ho}var $u;function R1(){if($u)return Cs.exports;if($u=1,process.env.NODE_ENV!=="production"){var e=Rd(),t=!0;Cs.exports=B1()(e.isElement,t)}else Cs.exports=O1()();return Cs.exports}var Ut=R1(),D1=function(t){var r=t?.ownerDocument||document;return r.defaultView||window},F1=function(t,r){for(var i in t)if(!(i in r))return!0;for(var n in r)if(t[n]!==r[n])return!0;return!1},I1=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Ss="http://www.w3.org/2000/svg",Mu="http://www.w3.org/1999/xlink",Oc=function(e){function t(){for(var i,n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return i=e.call.apply(e,[this].concat(s))||this,i.initialState={hasError:!1,isLoading:!0},i.state=i.initialState,i._isMounted=!1,i.reactWrapper=void 0,i.nonReactWrapper=void 0,i.refCallback=function(a){i.reactWrapper=a},i}b1(t,e);var r=t.prototype;return r.renderSVG=function(){var n=this;if(this.reactWrapper instanceof D1(this.reactWrapper).Node){var s=this.props,o=s.desc,a=s.evalScripts,l=s.httpRequestWithCredentials,c=s.renumerateIRIElements,h=s.src,u=s.title,f=s.useRequestCache,d=this.props.onError,p=this.props.beforeInjection,g=this.props.afterInjection,y=this.props.wrapper,b,x;y==="svg"?(b=document.createElementNS(Ss,y),b.setAttribute("xmlns",Ss),b.setAttribute("xmlns:xlink",Mu),x=document.createElementNS(Ss,y)):(b=document.createElement(y),x=document.createElement(y)),b.appendChild(x),x.dataset.src=h,this.nonReactWrapper=this.reactWrapper.appendChild(b);var w=function(T){if(n.removeSVG(),!n._isMounted){d(T);return}n.setState(function(){return{hasError:!0,isLoading:!1}},function(){d(T)})},C=function(T,P){if(T){w(T);return}n._isMounted&&n.setState(function(){return{isLoading:!1}},function(){try{g(P)}catch(N){w(N)}})},v=function(T){if(T.setAttribute("role","img"),o){var P=T.querySelector(":scope > desc");P&&T.removeChild(P);var N=document.createElement("desc");N.innerHTML=o,T.prepend(N)}if(u){var F=T.querySelector(":scope > title");F&&T.removeChild(F);var k=document.createElement("title");k.innerHTML=u,T.prepend(k)}try{p(T)}catch(L){w(L)}};E1(x,{afterEach:C,beforeEach:v,cacheRequests:f,evalScripts:a,httpRequestWithCredentials:l,renumerateIRIElements:c})}},r.removeSVG=function(){var n;(n=this.nonReactWrapper)!=null&&n.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},r.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},r.componentDidUpdate=function(n){var s=this;F1(ia({},n),this.props)&&this.setState(function(){return s.initialState},function(){s.removeSVG(),s.renderSVG()})},r.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},r.render=function(){var n=this.props;n.afterInjection,n.beforeInjection,n.desc,n.evalScripts;var s=n.fallback;n.httpRequestWithCredentials;var o=n.loading;n.renumerateIRIElements,n.src,n.title,n.useRequestCache;var a=n.wrapper,l=y1(n,I1),c=a;return xs.createElement(c,ia({},l,{ref:this.refCallback},a==="svg"?{xmlns:Ss,xmlnsXlink:Mu}:{}),this.state.isLoading&&o&&xs.createElement(o,null),this.state.hasError&&s&&xs.createElement(s,null))},t}(xs.Component);Oc.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Oc.propTypes={afterInjection:Ut.func,beforeInjection:Ut.func,desc:Ut.string,evalScripts:Ut.oneOf(["always","once","never"]),fallback:Ut.oneOfType([Ut.func,Ut.object,Ut.string]),httpRequestWithCredentials:Ut.bool,loading:Ut.oneOfType([Ut.func,Ut.object,Ut.string]),onError:Ut.func,renumerateIRIElements:Ut.bool,src:Ut.string.isRequired,title:Ut.string,useRequestCache:Ut.bool,wrapper:Ut.oneOf(["div","span","svg"])};let yl={assets:"/"};const N1=e=>{yl={...yl,...e}},P1=e=>{const t=`${yl.assets}/${e}`.replace(/\/+/g,"/");return t.endsWith(".svg")?t:t+".svg"},Ot=j.memo(({icon:e,width:t,height:r,placeholderIcon:i,color:n,disabled:s,state:o="base",rotated:a=!1,onClick:l,isInteractable:c=!1,spin:h=!1,title:u,tabIndex:f,link:d})=>{const[p,g]=j.useState(!1),y=L=>L?.toLowerCase().endsWith(".svg")||!L?.includes("/"),b=L=>L?.startsWith("http")||L?.startsWith("/"),x={img:`${c?"smp-image-interactable":""}`,svg:`smp-icon ${o?`smp-icon-${o}`:""} ${a?"smp-icon-rotated":""} ${c?"smp-icon-interactable":""} ${h?"smp-icon-spin":""}`},w=L=>{!s&&c&&l&&l(L)},C=L=>{!s&&c&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),w(L))},v=p?i:e,E=y(v),P=b(v)?v:P1(`assets/svg/${v}`),N=()=>S.jsx(Oc,{src:P,onError:()=>g(!0),width:t||"0.875rem",height:r||"0.875rem",wrapper:"svg",title:u,role:"application",fill:n,"aria-disabled":s,className:x.svg,onClick:w,onKeyDown:C,tabIndex:f}),F=()=>S.jsx("img",{src:v,width:t||"14px",height:r||"auto",alt:u,onError:()=>g(!0),onClick:w,className:x.img,title:u,onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&w(L)}});return(()=>{const L=d?.startsWith("https://")||d?.startsWith("http://")||d?.startsWith("#")||d?.startsWith("/"),O=E?N():F(),B=u?S.jsx("span",{title:u,children:O}):O;return L?S.jsx("a",{href:d,children:B}):B})()});function Xe({children:e}){const[t,r]=j.useState(!1);return j.useEffect(()=>{r(!0)},[]),t?f1.createPortal(e,document.body):null}function Ke({position:e="bottom",open:t=!1}){const r=j.useRef(null),i=j.useRef(null),[n,s]=j.useState(0),o=j.useCallback(()=>{const a=r.current,l=i.current;if(!a||!l)return;const{top:c,left:h,width:u,height:f}=a.getBoundingClientRect();s(u);const d=l.offsetHeight,p=l.offsetWidth;if(p===0||d===0){requestAnimationFrame(o);return}const g=window.scrollY,y=window.scrollX,b=window.innerWidth,x=window.innerHeight;let w=c+g,C=h+y,v=e;const E={top:c-d<0,bottom:c+f+d>x,left:h-p<0,right:h+u+p>b};switch(e){case"top":E.top&&!E.bottom&&(v="bottom");break;case"bottom":E.bottom&&!E.top&&(v="top");break;case"left":E.left&&!E.right&&(v="right");break;case"right":E.right&&!E.left&&(v="left");break}switch(v){case"top":w=c+g-d;break;case"bottom":w=c+g+f;break;case"left":C=h+y-p;break;case"right":C=h+y+u;break}w=Math.max(g,Math.min(w,g+x-d)),C=Math.max(y,Math.min(C,y+b-p)),requestAnimationFrame(()=>{l.style.transform=`translate(${C}px, ${w}px)`,l.style.opacity="1"})},[e]);return j.useLayoutEffect(()=>{if(!t)return;let a;const l=()=>{const h=r.current,u=i.current;h&&u?o():a=requestAnimationFrame(l)};a=requestAnimationFrame(l);const c=new MutationObserver(()=>{o()});return i.current&&c.observe(i.current,{childList:!0,subtree:!0}),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(a),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0),c.disconnect()}},[o,t]),{anchorRef:r,targetRef:i,anchorWidth:n}}const Uo={"smp-label":"_smp-label_zl3eb_1","smp-label-disabled":"_smp-label-disabled_zl3eb_6","smp-label-wrapper":"_smp-label-wrapper_zl3eb_10"},Rc=({helperText:e,disabled:t,state:r,id:i})=>{const n={container:`smp-helper-text ${t?"smp-helper-text-disabled":""} ${r?`smp-helper-text-${r}`:""}`};return S.jsx("label",{className:n.container,id:i,children:e})},j1={"smp-helper-tooltip":"_smp-helper-tooltip_2mlq3_1"},z1=({helperTooltip:e,ref:t})=>{const r={container:`${j1["smp-helper-tooltip"]}`};return S.jsx("div",{className:r.container,ref:t,children:S.jsx(Rc,{helperText:e})})},$r=({label:e,disabled:t,htmlFor:r,helper:i=""})=>{const[n,s]=j.useState(!1),{anchorRef:o,targetRef:a}=Ke({position:"right",open:n}),l={container:`${Uo["smp-label"]} ${t?Uo["smp-label-disabled"]:""}`,labelWrapper:Uo["smp-label-wrapper"]};return S.jsxs("div",{className:l.labelWrapper,children:[S.jsx("label",{className:l.container,htmlFor:r,children:e}),i&&S.jsx("div",{ref:o,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:S.jsx(Ot,{icon:"info_outline",tabIndex:0,width:14,isInteractable:!0,onClick:()=>{s(c=>!c)}})}),S.jsx(Xe,{children:n&&i&&S.jsx(z1,{helperTooltip:i,ref:a})})]})},ve={"smp-layout":"_smp-layout_wqmhx_1","smp-layout-horizontal":"_smp-layout-horizontal_wqmhx_9","smp-layout-vertical":"_smp-layout-vertical_wqmhx_15","smp-layout-section-grid":"_smp-layout-section-grid_wqmhx_20","smp-layout-section-vertical":"_smp-layout-section-vertical_wqmhx_24","smp-layout-section-horizontal":"_smp-layout-section-horizontal_wqmhx_28","smp-layout-cell-container":"_smp-layout-cell-container_wqmhx_33","smp-layout-section-flex":"_smp-layout-section-flex_wqmhx_37","smp-grid-template-cols":"_smp-grid-template-cols_wqmhx_55","smp-grid-template-rows":"_smp-grid-template-rows_wqmhx_59","smp-layout-section-with-title":"_smp-layout-section-with-title_wqmhx_63","smp-layout-section-title":"_smp-layout-section-title_wqmhx_69","smp-layout-inline":"_smp-layout-inline_wqmhx_75"},W1=(e,t)=>{const r=[];for(let i=0;i<e.length;i+=t)r.push(e.slice(i,i+t));return r},Fd=(e,t)=>e.map(r=>{if(r.sections?.length)return{...r,sections:Fd(r.sections,t),content:r.content};let i=r.sections,n=r.content;return r.content?.length&&r.columns&&+r.columns>1&&(i=W1(r.content.filter(o=>t.includes(o.id)),+r.columns).map((o,a)=>({...r,id:`${r.id}-${a}`,content:o,gridCols:r.columns,horizontal:!0})),n=[]),{...r,sections:i,content:n}}),Bu=(e,t)=>{if(!t)return{};const r=e.some(i=>i.dim)?e.map(i=>i.dim||"auto").join(" "):`repeat(${e.length}, 1fr)`;return{[t]:r}},Ou=e=>e.some(t=>t.dim&&!t.dim.endsWith("%")),Ru=e=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[e],Du=e=>({primary:"onPrimary",danger:"onDanger",base:"base"})[e],Qt=({bindValue:e,onClick:t,ariaLabel:r,icon:i,placeholderIcon:n,disabled:s,sizing:o="base",variant:a="primary",appearance:l="raised",showIcon:c=!0,showText:h=!0,fullWidth:u=!1,loading:f=!1,justify:d="center",title:p,optionalDisplayValue:g,squared:y=!1,submit:b=!1,active:x=!1,buttonExt:w})=>{const C={container:`smp-button smp-button-container ${o?`smp-button-${o}`:""} ${a?`smp-buttonVariant-${a}`:""} ${l?`smp-buttonType-${l}`:""} ${u?"smp-button-fullWidth":""} smp-justifyContent-${d} ${y&&!h?"smp-button-squared":""} ${x?"smp-buttonActive":""} ${w?`smp-buttonExt-${w}`:""}`};return S.jsx("button",{"data-component":"button",type:b?"submit":"button",className:C.container,onClick:t,"aria-label":r,disabled:s,"aria-busy":f,title:p||g,children:f?S.jsx(Ot,{icon:"spinner",state:Du(a),spin:!0}):S.jsxs(S.Fragment,{children:[i&&c&&S.jsx(Ot,{icon:i,placeholderIcon:n,disabled:s,state:Du(a),width:Ru(o),height:Ru(o)}),h&&S.jsx("span",{children:g||e})]})})},q1={titleLarge:"h2",title:"h3",body:"h6",label:"label"},ks={"smp-typography":"_smp-typography_1yxte_1","smp-typography-body":"_smp-typography-body_1yxte_8","smp-typography-title":"_smp-typography-title_1yxte_12","smp-typography-titleLarge":"_smp-typography-titleLarge_1yxte_16","smp-typography-label":"_smp-typography-label_1yxte_20","smp-typography-disabled":"_smp-typography-disabled_1yxte_25","smp-typography-toolbar":"_smp-typography-toolbar_1yxte_30","smp-text-negative":"_smp-text-negative_1yxte_35","smp-text-number":"_smp-text-number_1yxte_39"},Dc="smp-toolbar",H1=["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter","Escape"," "],bl=e=>e.replace(`${Dc}-`,"").split("-").map(t=>parseInt(t,10)).filter(t=>!isNaN(t)),U1=e=>`${Dc}-${e.filter(t=>!isNaN(t)).join("-")}`,na=(e,t)=>t?`${t}-${e}`:`${Dc}-${e}`,Y1=(e,t)=>t?`${t}-${e}`:`toolbar-item-${e}`,xl=e=>!!e.fun&&e.forcedLeaf===!1&&!(e.children&&e.children.length>0),vl=(e,t,r,i)=>{if(!e||t.length===0)return e;const n={...e};n.children=[...e.children??[]];let s=n.children;const o=[],a=[];for(let l=0;l<t.length;l++){const c=t[l],h=s[c];if(!h)break;const u={...h};if(l===t.length-1){if(s[c]=r(u),i){const f=s.map((d,p)=>p===c?s[p]:i({...d}));if(l===0)n.children=f;else{const d=o[o.length-1],p=a[a.length-1];d[p]={...d[p],children:f}}}}else u.children=[...u.children??[]],s[c]=u,o.push(s),a.push(c),s=u.children}return n},js=(e,t)=>{e.current.has(t)&&requestAnimationFrame(()=>{e.current.get(t)?.focus()})};function V1(e,t,r){return{handleKeyDown:j.useCallback(async(n,s,o)=>{if(!H1.includes(n.key))return;n.preventDefault(),n.stopPropagation();const a=t.current.get(o),l=bl(o);if(a)switch(n.key){case"ArrowDown":case"ArrowUp":{const h=l[l.length-1]+(n.key==="ArrowDown"?1:-1);if(h>=0){const u=o.split("-");u.pop();const f=`${u.join("-")}-${h}`;js(t,f)}break}case"ArrowRight":{r(s,o),js(t,na(0,o));break}case"ArrowLeft":case"Escape":{l.pop();const c=U1(l);t.current.has(c)&&(e(h=>h&&vl(h,l,u=>({...u,isExpanded:!1}))),js(t,c));break}}},[r,t,e])}}const St={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BREADCRUMBS:"BRD",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",EDITOR:"EDT",ICON:"ICO",IMAGE:"IMG",INPUT_NUMBER:"INR",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",MULTI_CONFIG:"CFM",RADIO:"RAD",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",BUTTON_GROUP:"BTO",TIME:"TIM",PASSWORD:"PWD",TREE:"TRE"},Tn={CODE_ONLY:"CodeOnly",DESC_ONLY:"DescOnly",BOTH:"Both"},G1={obj:{t:"",p:"",k:""},fun:"",isEditable:!1,shape:St.TEXT_FIELD,icon:"error",value:"No data found"};function X1(e,t,r){const i=async(a,l)=>{if(!xl(a))s(l,{isExpanded:!0});else if(t){s(l,{isLoading:!0});try{const c=await t(a);s(l,{isLoading:!1,children:c?.children&&c.children.length>0?c.children:[G1],isExpanded:!0},{isExpanded:!1})}catch(c){console.error("Failed to load dynamic node data:",c),s(l,{isLoading:!1})}}},n=a=>{s(a,{isExpanded:!1})},s=(a,l,c)=>{e(h=>h&&vl(h,bl(a),f=>({...f,...l}),c?f=>({...f,...c}):void 0))};return{handleNodeExpand:i,handleMouseLeave:n,onToolbarRadioLeafNodeClick:(a,l,c)=>{e(h=>h&&vl(h,bl(l),f=>{const d={...f,obj:{...f.obj,k:c.obj.k}};return r?.(d),d}))}}}const Id=e=>{const t=j.useRef(null);return j.useEffect(()=>()=>{t.current&&clearTimeout(t.current)},[]),i=>{t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{i()},e)}},as=(e,t,r)=>{if(e==""&&(t==""||t==null))return"";if(r)switch(r){case"CodeOnly":return e;case"DescOnly":return t||"";case"Both":return`${e} - ${t}`}return e},we={"smp-textfield-wrapper":"_smp-textfield-wrapper_1w0g1_4","smp-textfield":"_smp-textfield_1w0g1_4","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_1w0g1_29","smp-textfield-extraSmall":"_smp-textfield-extraSmall_1w0g1_35","smp-textfield-small":"_smp-textfield-small_1w0g1_40","smp-textfield-medium":"_smp-textfield-medium_1w0g1_45","smp-textfield-large":"_smp-textfield-large_1w0g1_50","smp-textfield-extraLarge":"_smp-textfield-extraLarge_1w0g1_55","smp-textfield-input":"_smp-textfield-input_1w0g1_61","smp-textfield-decode-wrapper":"_smp-textfield-decode-wrapper_1w0g1_82","smp-textfield-outlined":"_smp-textfield-outlined_1w0g1_91","smp-textfield-danger":"_smp-textfield-danger_1w0g1_102","smp-textfield-readOnly":"_smp-textfield-readOnly_1w0g1_106","smp-textfield-disabled":"_smp-textfield-disabled_1w0g1_121","smp-textfield-fullWidth":"_smp-textfield-fullWidth_1w0g1_130","smp-textfield-top-right-indicator":"_smp-textfield-top-right-indicator_1w0g1_134"},Ie=({id:e,disabled:t,bindValue:r,optionalDisplayValue:i,icon:n,placeholder:s,isEditable:o=!0,shapeIcon:a,sizing:l,state:c,variant:h,tooltip:u=!1,rotatedShapeIcon:f=!1,ref:d,inputRef:p,inputType:g="text",ariaLabel:y="input field",label:b,helperText:x=!1,error:w,appearance:C="base",isClearable:v=!1,fullWidth:E=!1,_dataComponent:T="textfield",min:P,max:N,step:F,inputMode:k="text",width:L,autocomplete:O,size:B,maxLength:I,style:A,onBlur:q,onChange:$,onKeyDown:R,onShapeIconClick:_,onClick:M,...H})=>{const z=j.useId(),U=`${z}-helper`,Y=w?"danger":c,K=x||!!w,Z=G=>{$?.(G.target.value)},Q=()=>{r&&r!=""&&$?.("")},ct={wrapper:`${we["smp-textfield-wrapper"]} ${E?we["smp-textfield-fullWidth"]:""}`,container:`${we["smp-textfield"]} ${t?we["smp-textfield-disabled"]:""} ${s?we["smp-textfield-placeholder"]:""} ${l?we[`smp-textfield-${l}`]:""} ${Y?we[`smp-textfield-${Y}`]:""} ${C?we[`smp-textfield-${C}`]:""} ${o?"":we["smp-textfield-readOnly"]} ${u?we["smp-textfield-top-right-indicator"]:""}`,input:`${we["smp-textfield-input"]}`,decodeWrapper:` ${i?we["smp-textfield-decode-wrapper"]:""}`};if(h&&(h!=="notSelectable"||o)){const G=we[`smp-textfield-variant-${h}`];G&&(ct.container+=` ${G}`)}const et=L?{"--smp-textField-width-base":L,...A}:A,wt=S.jsxs("div",{className:ct.container,ref:d,style:et,children:[n&&S.jsx(Ot,{icon:n,disabled:t}),S.jsx("input",{id:z,name:e,type:g,value:r,placeholder:s,onChange:Z,onBlur:q,className:ct.input,disabled:t,readOnly:!o,onKeyDown:R,"aria-label":y,ref:p,"aria-describedby":K?U:void 0,min:P,max:N,step:F,inputMode:k,autoComplete:O,size:B,maxLength:I,onClick:M}),v&&S.jsx(Ot,{icon:"clear",onClick:Q,tabIndex:0,isInteractable:!0}),a&&S.jsx(Ot,{icon:a,disabled:t,onClick:_,rotated:f,isInteractable:o,tabIndex:0})]});return S.jsxs("div",{className:ct.wrapper,"data-component":T,children:[b&&S.jsx($r,{label:b,disabled:t,htmlFor:z,helper:H.helper}),S.jsxs("div",{className:ct.decodeWrapper,children:[wt,S.jsx(Ae,{bindValue:i||"",variant:"body",role:"note"})]}),K&&S.jsx(Rc,{helperText:w,disabled:t,state:Y,id:U})]})};function Nd({items:e,itemHeight:t,containerHeight:r,overscan:i=5}){const[n,s]=j.useState(0),o=j.useRef(null),a=e.length*t,l=Math.max(0,Math.floor(n/t)-i),c=Math.min(e.length-1,Math.floor((n+r)/t)+i),h=[];for(let d=l;d<=c;d++)h.push({item:e[d],index:d,offsetTop:d*t});const u=j.useCallback(d=>{const p=d.target.scrollTop;s(p)},[]),f=d=>{if(!o.current)return;const p=d*t,g=p+t,y=o.current,b=y.scrollTop,x=b+r;p<b?y.scrollTop=p:g>x&&(y.scrollTop=g-r)};return{virtualItems:h,containerProps:{ref:o,style:{maxHeight:`${r}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:u},innerProps:{style:{height:`${a}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:n,viewportHeight:r,totalHeight:a,startIndex:l,endIndex:c},scrollToIndex:f}}const hn={"smp-list":"_smp-list_1mnl7_1","smp-list-floating":"_smp-list-floating_1mnl7_7","smp-list-container":"_smp-list-container_1mnl7_15","smp-list-listItem":"_smp-list-listItem_1mnl7_20"};function K1(e,t,r="14px IBM Plex Sans, sans-serif",i=32){const s=document.createElement("canvas").getContext("2d");if(!s)return 200;s.font=r;let o=0;for(const a of e){const l=as(a.obj.k,a.decode,t),c=s.measureText(l);o=Math.max(o,c.width)}return Math.ceil(o+i)}const Z1=10,Va=({id:e,options:t,displayMode:r="Both",ref:i,showFilter:n,selectedIndex:s=null,activeIndex:o=[],width:a,onClick:l,onKeyDown:c,isOpen:h,floating:u=!1})=>{const[f,d]=j.useState(""),p=40,[g,y]=j.useState(s!==null?s:-1),[b,x]=j.useState(a||200),w=j.useRef(null),C=j.useRef(null),v=n!==void 0?n:t.length>Z1,E=f?t.filter(A=>A.decode?.toLowerCase()?.includes(f.toLowerCase())):t,T=A=>{d(A)},{virtualItems:P,containerProps:N,innerProps:F,scrollToIndex:k}=Nd({items:E,itemHeight:p,containerHeight:200,overscan:5});j.useEffect(()=>{s!==null&&s!==g&&y(s)},[s]),j.useEffect(()=>{g>=0&&g<E.length&&k(g)},[g,E]),j.useEffect(()=>{h&&w?.current&&w.current.focus(),h&&C?.current&&C.current.focus()},[h,w]),j.useEffect(()=>{const A=K1(t,r);x(A)},[t,r]);const L=A=>{if(A.key==="ArrowDown"||A.key==="ArrowUp"){A.preventDefault();let q=g;A.key==="ArrowDown"?q=g<E.length-1?g+1:0:A.key==="ArrowUp"&&(q=g>0?g-1:E.length-1),y(q)}else A.key==="Enter"?g>=0&&g<E.length&&l?.(E[g]):A.key==="Escape"&&(A.preventDefault(),A.stopPropagation());c&&c(A)},O=A=>{L(A)},B=A=>{L(A)},I={wrapper:`${hn["smp-list"]} ${u?hn["smp-list-floating"]:""}`,container:`${hn["smp-list-container"]}`,virtualScroll:`${hn["smp-list-virtualScroll"]}`,listItem:`${hn["smp-list-listItem"]}`};return S.jsxs("div",{id:e,ref:i,className:I.wrapper,"data-component":"list",style:{width:u?b:"200px",minWidth:a},children:[v&&S.jsx(Ie,{bindValue:f,placeholder:"Search...",fullWidth:!0,onChange:T,onKeyDown:O,inputRef:w}),S.jsx("div",{...N,className:I.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:B,"aria-activedescendant":g>=0&&g<E.length?E[g]?.obj?.k:void 0,children:S.jsx("div",{...F,className:I.virtualScroll,children:P.map(({item:A,index:q,offsetTop:$})=>{const R=o.includes(A.obj?.k);return S.jsxs("li",{ref:g===q?C:null,role:"option",id:q+"li","aria-selected":g===q?"true":"false",tabIndex:-1,className:`${I.listItem} ${g===q?"selected-item":""}`,"aria-label":A.obj?.k+"-"+A.decode,style:{height:`${p}px`,lineHeight:`calc(${p}px - 2*2px)`,transform:`translateY(${$}px)`},onClick:()=>{l?.(A),y(q)},children:[as(A.obj?.k,A.decode,r),R&&S.jsx(Ot,{icon:"check",width:16})]},q+"li")})})})]})},ar={"smp-floating-toolbar-container":"_smp-floating-toolbar-container_s0udi_11","smp-toolbar-node-content":"_smp-toolbar-node-content_s0udi_29","smp-clickable":"_smp-clickable_s0udi_49","smp-not-clickable":"_smp-not-clickable_s0udi_59","smp-toolbar-node-children-container":"_smp-toolbar-node-children-container_s0udi_69","smp-expanded":"_smp-expanded_s0udi_89","smp-toolbar-node":"_smp-toolbar-node_s0udi_29","smp-toolbar-node-icon-text-container":"_smp-toolbar-node-icon-text-container_s0udi_147","smp-toolbar-node-text":"_smp-toolbar-node-text_s0udi_161"},Q1=({node:e,index:t,level:r,parentId:i,toolbarNodesRefs:n,handleKeyDown:s,handleNodeExpand:o,handleMouseLeave:a,onToolbarLeafNodeClick:l,onToolbarRadioLeafNodeClick:c,renderToolbarNodes:h})=>{const u=na(t,i??""),f=(e.children?.length??0)>0,d=!f&&!e?.isLoading&&!xl(e),{anchorRef:p,targetRef:g}=Ke({open:e.isExpanded??!1,position:"right"}),y={node:ar["smp-toolbar-node"],nodeContent:ar["smp-toolbar-node-content"],clickable:ar["smp-clickable"],notClickable:ar["smp-not-clickable"],iconTextContainer:ar["smp-toolbar-node-icon-text-container"],nodeText:ar["smp-toolbar-node-text"],childrenContainer:ar["smp-toolbar-node-children-container"],expanded:ar["smp-expanded"]};return e?.shape===St.RADIO?S.jsx("div",{ref:b=>{b&&n.current.set(u,b)},className:y.node,role:"radiogroup","data-node-id":u,tabIndex:-1,"smp-id":Y1(t,i??""),children:S.jsx(Va,{options:e.options?e.options:[],isOpen:!0,"data-node-id":u,displayMode:Tn.DESC_ONLY,selectedIndex:e.options?.findIndex(b=>b.obj?.k===e.obj?.k),activeIndex:[e.obj.k],onClick:b=>{c(e,u,b)}},u)},u):S.jsx(S.Fragment,{children:S.jsxs("div",{ref:b=>{b&&n.current.set(u,b)},className:y.node,tabIndex:0,role:"menuitem","data-nodeid":u,"smp-id":`toolbar-item-${t}`,"aria-expanded":e?.isExpanded,onKeyDown:b=>s(b,e,u),onMouseEnter:()=>{o(e,u)},onMouseLeave:()=>{a(u)},onClick:()=>{d&&e.fun&&l?.(e)},children:[S.jsxs("div",{className:`${y.nodeContent} ${d?y.clickable:y.notClickable}`,ref:p,children:[S.jsxs("div",{className:y.iconTextContainer,children:[S.jsx(Ot,{icon:e.icon??""}),S.jsx("span",{className:y.nodeText,children:S.jsx(Ae,{variant:"body",bindValue:e.value||""})})]}),e.isLoading?S.jsx(Ot,{icon:"spinner",spin:!0}):f||xl(e)?S.jsx(Ot,{icon:"chevron-right"}):S.jsx(Ot,{icon:""})]}),f&&S.jsx(Xe,{children:S.jsx("div",{className:`${y.childrenContainer} ${e.isExpanded?y.expanded:""}`,ref:g,style:{"--smp-toolbar-z-index":`${1001+r}`},children:h(r+1,e.children??[],u)})})]},u)})},Pd=({data:e,ref:t,onToolbarLoadNodeData:r,onToolbarLeafNodeClick:i,onToolbarLoadInitialData:n,registerRef:s})=>{const o=j.useRef(new Map),[a,l]=j.useState(e);j.useEffect(()=>{s&&a&&o.current.forEach(y=>{y&&s({current:y})})},[s,a]);const{handleNodeExpand:c,handleMouseLeave:h,onToolbarRadioLeafNodeClick:u}=X1(l,r,i),{handleKeyDown:f}=V1(l,o,c),d=Id(400),p={floatingContainer:ar["smp-floating-toolbar-container"]};j.useEffect(()=>{!a&&n&&(n().then(y=>l(y)).catch(y=>{console.error("Errore nel caricamento dati iniziali - Toolbar",y)}),js(o,na(0)))},[e,d,n,a]);const g=j.useCallback((y,b,x=null)=>b?.length?S.jsx(S.Fragment,{children:b.map((w,C)=>S.jsx(Q1,{node:w,index:C,level:y,parentId:x,toolbarNodesRefs:o,handleKeyDown:f,handleNodeExpand:c,handleMouseLeave:h,onToolbarLeafNodeClick:i,onToolbarRadioLeafNodeClick:u,renderToolbarNodes:g},na(C,x??"")))}):null,[f,c,h,i,u]);return!a||!a?.children?.length?null:S.jsx("div",{ref:t,className:`${t?p.floatingContainer:null}`,"aria-label":"Toolbar","data-component":"toolbar","smp-id":"toolbar-menu",children:g(0,a.children)})},Gi=(e,t,r)=>{j.useEffect(()=>{if(!t)return;const i=n=>{e?.some(o=>{if(typeof o=="object"&&o!==null&&"current"in o){const a=o?.current;return a&&a.contains(n.target)}})||r()};return document.addEventListener("mousedown",i),()=>{document.removeEventListener("mousedown",i)}},[e,r,t])},Ae=({variant:e="body",bindValue:t,color:r,role:i,className:n,style:s,toolbar:o,onToolbarLeafNodeClick:a,onToolbarLoadInitialData:l,onToolbarLoadNodeData:c,...h})=>{const u=q1[e],[f,d]=j.useState([]),p=j.useCallback(v=>{d(E=>E.some(T=>T.current===v.current)?E:[...E,v])},[]),[g,y]=j.useState(!1),{anchorRef:b,targetRef:x}=Ke({position:"bottom",open:g});Gi([x,...f],g,()=>{y(!1),d([])});const w={container:`${ks["smp-typography"]} ${e?ks[`smp-typography-${e}`]:""} ${h.disabled?ks["smp-typography-disabled"]:""} ${n??""}`,toolbar:`${ks["smp-typography-toolbar"]} `},C=v=>{a&&a(v),y(!1)};return S.jsxs(S.Fragment,{children:[S.jsxs(u,{"data-component":"typography",className:w.container,disabled:h.disabled,style:{"--smp-typography-color-base":r,...s},role:i,children:[t,o&&S.jsx("div",{"smp-id":"toolbar-button",ref:b,className:w.toolbar,children:S.jsx(Ot,{tabIndex:0,icon:"more_vert",isInteractable:!0,onClick:v=>{v.stopPropagation(),y(!0)}})})]}),g&&S.jsx(Xe,{children:S.jsx(Pd,{ref:x,onToolbarLeafNodeClick:C,onToolbarLoadNodeData:c,onToolbarLoadInitialData:l,registerRef:p})})]})},ze={"smp-tabbar-container":"_smp-tabbar-container_ly1md_1","smp-tabbar-scroll-button":"_smp-tabbar-scroll-button_ly1md_9","smp-tabbar-scroll-buttonRight":"_smp-tabbar-scroll-buttonRight_ly1md_14","smp-tabbar-scroll-buttonLeft":"_smp-tabbar-scroll-buttonLeft_ly1md_18","smp-tabbar-list-wrapper":"_smp-tabbar-list-wrapper_ly1md_22","smp-tabbar-list":"_smp-tabbar-list_ly1md_22","smp-tabbar-tab":"_smp-tabbar-tab_ly1md_39","smp-active":"_smp-active_ly1md_63","smp-tabbar-tab-extraSmall":"_smp-tabbar-tab-extraSmall_ly1md_76","smp-tabbar-tab-small":"_smp-tabbar-tab-small_ly1md_81","smp-tabbar-tab-base":"_smp-tabbar-tab-base_ly1md_86","smp-tabbar-tab-large":"_smp-tabbar-tab-large_ly1md_91","smp-tabbar-tab-extraLarge":"_smp-tabbar-tab-extraLarge_ly1md_96"},jd=({data:e,sizing:t="large",toolbar:r=!0,selectedIndex:i,onTabChange:n,onToolbarLoadInitialData:s,onToolbarLoadNodeData:o,onToolbarLeafNodeClick:a})=>{const[l,c]=j.useState(i??0),[h,u]=j.useState(!1),[f,d]=j.useState(!1),p=j.useRef(null);if(j.useEffect(()=>{const v=p.current;if(!v)return;x();const E=()=>x();return v.addEventListener("scroll",E),window.addEventListener("resize",x),()=>{v.removeEventListener("scroll",E),window.removeEventListener("resize",x)}},[]),j.useEffect(()=>{i!==void 0&&c(i)},[i]),!e.children||e.children.length===0)return S.jsx("div",{className:"tab-bar-empty",children:"No tabs available"});const g={container:ze["smp-tabbar-container"],listWrapper:ze["smp-tabbar-list-wrapper"],list:ze["smp-tabbar-list"],tab:`${ze["smp-tabbar-tab"]} ${t?ze[`smp-tabbar-tab-${t}`]:""}`,scrollButtonRight:`${ze["smp-tabbar-scroll-button"]} ${ze["smp-tabbar-scroll-buttonRight"]}`,scrollButtonLeft:`${ze["smp-tabbar-scroll-button"]} ${ze["smp-tabbar-scroll-buttonLeft"]}`,active:ze["smp-active"]},y=100,b=2,x=()=>{const v=p.current;v&&(u(v.scrollLeft>0),d(v.scrollLeft+v.clientWidth<v.scrollWidth-b))},w=()=>{p.current?.scrollBy({left:-y,behavior:"smooth"})},C=()=>{p.current?.scrollBy({left:y,behavior:"smooth"})};return S.jsxs("div",{className:g.container,role:"tabpanel","data-component":"tab-bar",children:[h&&S.jsx("div",{className:g.scrollButtonLeft,children:S.jsx(Qt,{bindValue:"",optionalDisplayValue:"<",onClick:w,variant:"base",sizing:t})}),S.jsx("div",{className:g.listWrapper,children:S.jsx("div",{className:g.list,ref:p,role:"tablist",children:e.children.map((v,E)=>S.jsxs("button",{type:"button","data-comp-id-tab":v.data?.["data-comp-id"]??void 0,className:`${E===l?g.active:""} ${g.tab} `,role:"tab","aria-selected":E===l,tabIndex:E===l?0:-1,onClick:()=>{n?.(E,v),c(E)},children:[v.icon&&S.jsx(Ot,{icon:v.icon,placeholderIcon:v.placeholderIcon}),S.jsx(Ae,{variant:"body",bindValue:v.decode||`Tab ${E+1}`,...r&&l===E?{toolbar:r,onToolbarLeafNodeClick:a,onToolbarLoadInitialData:s,onToolbarLoadNodeData:o}:{}})]},E))})}),f&&S.jsx("div",{className:g.scrollButtonRight,children:S.jsx(Qt,{bindValue:"",optionalDisplayValue:">",onClick:C,variant:"base",sizing:t})})]})},sa=({children:e,layout:t={horizontal:!1,sectionsType:"tab",sections:[{id:"1",content:Array.isArray(e)?e.map(r=>({id:r.props.id})):[{id:e.props.id}]}]}})=>{const[r,i]=j.useState(0),n={};j.Children.forEach(e,p=>{j.isValidElement(p)&&(n[p.props.id]=p)});const s="--smp-grid-template-cols",o="--smp-grid-template-rows",a=Fd(t.sections??[],Object.keys(n)),l=p=>p.reduce((g,y)=>{let b="",x={},w={},C="";return y.sections?.length?(b=ve["smp-layout-section-grid"],x=l(y.sections),y.gridCols===void 0&&(C=ve[y.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],y.horizontal||Ou(y.sections)?w=Bu(y.sections,y.horizontal?s:o):w={[s]:"auto",[o]:"auto"})):y.content?.length&&(y.gridCols!==void 0&&y.gridCols>0?(b=ve["smp-layout-section-grid"],C=ve["smp-grid-template-cols"],w={[s]:`repeat(${y.gridCols}, 1fr)`}):b=ve["smp-layout-section-flex"]),{...g,...x,[y.id]:{classes:`${b} ${ve[y.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${C} ${y.justify?`smp-justifyContent-${y.justify}`:""} ${y.align?`smp-alignItems-${y.align}`:""}`,styles:w}}},{}),c=l(a),h=`${ve["smp-layout"]} ${t.horizontal?ve["smp-layout-horizontal"]:ve["smp-layout-vertical"]} ${t.inline?ve["smp-layout-inline"]:""}`;let u={};(t.horizontal||Ou(t.sections||[]))&&(u=Bu(a,t.horizontal?s:o));const f=(p,g)=>{const y=S.jsx("div",{"smp-id":`section-${p.id}`,className:c[p.id].classes,style:c[p.id].styles,children:p.sections?.length?p.sections.map(b=>f(b)):p.content?.map(b=>d(b,p.justify,p.align))},`section-${p.id}`);return p.title&&!g?S.jsxs("div",{className:ve["smp-layout-section-with-title"],children:[S.jsx("span",{className:`${ve["smp-layout-section-title"]} ${p.justify?`smp-justifyContent-${p.justify}`:""} ${p.align?`smp-alignItems-${p.align}`:""}`,children:S.jsx($r,{label:p.title})}),y]},`title-section-${p.id}`):y},d=(p,g,y)=>{const b=n[p.id];if(!b)return null;const w={gridColumnStart:(p.colSpan&&p.colSpan>0?`span ${p.colSpan}`:p.colStart&&p.colStart<1?"1":void 0)??p.colStart,gridColumnEnd:p.colEnd&&p.colEnd>0?p.colEnd:void 0},C=`${ve["smp-layout-cell-container"]} ${g?`smp-justifyContent-${g}`:""} ${y?`smp-alignItems-${y}`:""}`;return S.jsx("div",{className:C,style:w,"smp-id":p.id,children:b},p.id)};return S.jsxs("div",{className:h,style:u,"smp-id":"layout",children:[t.sectionsType==="tab"&&t.sections&&t?.sections.length>1&&S.jsx(jd,{data:{type:"SmeupDataTree",children:a.map(p=>({decode:p.title||p.id||"Tab",obj:{t:"",p:"",k:""},placeholderIcon:"tab",cells:{},children:[],shape:void 0}))},selectedIndex:r,onTabChange:i,toolbar:!1}),t.sectionsType?f(a[r],!0):a.map(p=>f(p))]})},wl=e=>e.t=="D8"||e.t=="A8",zd=e=>e.t=="NR",J1=e=>e.t=="I1",tv=e=>{if(e){const t=e.split(";");if(t.length==3)return{t:t[0],p:t[1],k:t[2]}}return{t:"",p:"",k:""}};class aa{class;value;constructor(t,r){this.class=t,this.value=r}static fromDataObj(t){return new aa(t,t.k=="1"||t.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function ev(e,t){if(Fc(e)){const h=new Date(e);if(!isNaN(h.getTime()))return h}const r=new Date;let i;/[/-]/.test(e)?i=e.split(/[/-]/).map((u,f)=>f<2&&u.length===1?"0"+u:u).join(""):i=e.replaceAll("/","").replaceAll("-","");let n="DDMMYYYY";t==="en"&&(n="MMDDYYYY");const s=n.indexOf("DD"),o=n.indexOf("MM");let a=0,l=0,c="";switch(i.length){case 1:case 2:return a=parseInt(i),r.setDate(a),Ts(r)?r:e;case 3:case 4:return a=parseInt(i.substring(0,2)),l=parseInt(i.substring(2,4)),o===0?(r.setMonth(a-1),r.setDate(l)):s===0&&(r.setMonth(l-1),r.setDate(a)),Ts(r)?r:e;case 5:case 6:{a=parseInt(i.substring(0,2)),l=parseInt(i.substring(2,4)),Number(i.substring(4))>=50?c="19"+i.substring(4):c="20"+i.substring(4);let h=0,u=0;return o===0?(h=l,u=a-1,r.setFullYear(parseInt(c),u,h)):s===0&&(h=a,u=l-1,r.setFullYear(parseInt(c),u,h)),Cl(a,u,parseInt(c))&&Ts(r)?r:e}case 7:case 8:{a=parseInt(i.substring(0,2)),l=parseInt(i.substring(2,4)),c=i.substring(4);let h=0,u=0;return o===0?(h=l,u=a-1,r.setFullYear(parseInt(c),u,h)):s===0&&(h=a,u=l-1,r.setFullYear(parseInt(c),u,h)),Cl(h,u,parseInt(c))&&Ts(r)?r:e}}return e}function Fc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)&&e.length===10}function Ts(e){return e instanceof Date&&!isNaN(e.getTime())}function rv(e){if(!/^\d{8}$/.test(e))return!1;const t=parseInt(e.slice(0,4),10),r=parseInt(e.slice(4,6),10),i=parseInt(e.slice(6,8),10);return Cl(i,r-1,t)}function Cl(e,t,r){const i=[31,iv(r)?29:28,31,30,31,30,31,31,30,31,30,31];return!(t<0||t>11||e<1||e>i[t])}function iv(e){return e%4===0&&(e%100!==0||e%400===0)}function nv(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return isNaN(t)||isNaN(Number(r))||isNaN(Number(i))?e.toString():`${t}-${r}-${i}`}class oa{class;date;constructor(t,r){this.class=t,this.date=r}static fromDataObj(t){const r=Fu.get(`${t.t}${t.p}`);if(r)return new oa(t,r.legacyToIso(t.k));throw new Error(`Date creation from ${t.t}${t.p} not implemented yet`)}getLegacyValue(){const t=Fu.get(`${this.class.t}${this.class.p}`);if(t)return t.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const Fu=new Map([["D8*YYMD",{legacyToIso(e){return rv(e)&&`${e.substring(0,4)}-${e.substring(4,6)}-${e.substring(6,8)}`||e},isoToLegacy(e){return Fc(e)&&e.replaceAll("-","")||e}}],["A8",{legacyToIso(e){return e},isoToLegacy(e){return e}}]]),vt=e=>typeof e=="string",un=()=>{let e,t;const r=new Promise((i,n)=>{e=i,t=n});return r.resolve=e,r.reject=t,r},Iu=e=>e==null?"":""+e,sv=(e,t,r)=>{e.forEach(i=>{t[i]&&(r[i]=t[i])})},av=/###/g,Nu=e=>e&&e.indexOf("###")>-1?e.replace(av,"."):e,Pu=e=>!e||vt(e),Dn=(e,t,r)=>{const i=vt(t)?t.split("."):t;let n=0;for(;n<i.length-1;){if(Pu(e))return{};const s=Nu(i[n]);!e[s]&&r&&(e[s]=new r),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++n}return Pu(e)?{}:{obj:e,k:Nu(i[n])}},ju=(e,t,r)=>{const{obj:i,k:n}=Dn(e,t,Object);if(i!==void 0||t.length===1){i[n]=r;return}let s=t[t.length-1],o=t.slice(0,t.length-1),a=Dn(e,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=Dn(e,o,Object),a?.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=r},ov=(e,t,r,i)=>{const{obj:n,k:s}=Dn(e,t,Object);n[s]=n[s]||[],n[s].push(r)},la=(e,t)=>{const{obj:r,k:i}=Dn(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,i))return r[i]},lv=(e,t,r)=>{const i=la(e,r);return i!==void 0?i:la(t,r)},Wd=(e,t,r)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(i in e?vt(e[i])||e[i]instanceof String||vt(t[i])||t[i]instanceof String?r&&(e[i]=t[i]):Wd(e[i],t[i],r):e[i]=t[i]);return e},bi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var cv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const hv=e=>vt(e)?e.replace(/[&<>"'\/]/g,t=>cv[t]):e;class uv{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const fv=[" ",",","?","!",";"],dv=new uv(20),pv=(e,t,r)=>{t=t||"",r=r||"";const i=fv.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(i.length===0)return!0;const n=dv.getRegExp(`(${i.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!n.test(e);if(!s){const o=e.indexOf(r);o>0&&!n.test(e.substring(0,o))&&(s=!0)}return s},_l=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const i=t.split(r);let n=e;for(let s=0;s<i.length;){if(!n||typeof n!="object")return;let o,a="";for(let l=s;l<i.length;++l)if(l!==s&&(a+=r),a+=i[l],o=n[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<i.length-1)continue;s+=l-s+1;break}n=o}return n},Wn=e=>e?.replace("_","-"),gv={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ca{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||gv,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,i,n){return n&&!this.debug?null:(vt(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new ca(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ca(this.logger,t)}}var Ve=new ca;class Ga{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const n=this.observers[i].get(r)||0;this.observers[i].set(r,n+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([n,s])=>{for(let o=0;o<s;o++)n(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,s])=>{for(let o=0;o<s;o++)n.apply(n,[t,...r])})}}class zu extends Ga{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,i,n={}){const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,o=n.ignoreJSONStructure!==void 0?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,r],i&&(Array.isArray(i)?a.push(...i):vt(i)&&s?a.push(...i.split(s)):a.push(i)));const l=la(this.data,a);return!l&&!r&&!i&&t.indexOf(".")>-1&&(t=a[0],r=a[1],i=a.slice(2).join(".")),l||!o||!vt(i)?l:_l(this.data?.[t]?.[r],i,s)}addResource(t,r,i,n,s={silent:!1}){const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[t,r];i&&(a=a.concat(o?i.split(o):i)),t.indexOf(".")>-1&&(a=t.split("."),n=r,r=a[1]),this.addNamespaces(r),ju(this.data,a,n),s.silent||this.emit("added",t,r,i,n)}addResources(t,r,i,n={silent:!1}){for(const s in i)(vt(i[s])||Array.isArray(i[s]))&&this.addResource(t,r,s,i[s],{silent:!0});n.silent||this.emit("added",t,r,i)}addResourceBundle(t,r,i,n,s,o={silent:!1,skipCopy:!1}){let a=[t,r];t.indexOf(".")>-1&&(a=t.split("."),n=i,i=r,r=a[1]),this.addNamespaces(r);let l=la(this.data,a)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),n?Wd(l,i,s):l={...l,...i},ju(this.data,a,l),o.silent||this.emit("added",t,r,i)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(n=>r[n]&&Object.keys(r[n]).length>0)}toJSON(){return this.data}}var qd={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,i,n){return e.forEach(s=>{t=this.processors[s]?.process(t,r,i,n)??t}),t}};const Hd=Symbol("i18next/PATH_KEY");function mv(){const e=[],t=Object.create(null);let r;return t.get=(i,n)=>(r?.revoke?.(),n===Hd?e:(e.push(n),r=Proxy.revocable(i,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Sl(e,t){const{[Hd]:r}=e(mv());return r.join(t?.keySeparator??".")}const Wu={},qu=e=>!vt(e)&&typeof e!="boolean"&&typeof e!="number";class ha extends Ga{constructor(t,r={}){super(),sv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ve.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const i={...r};return t==null?!1:this.resolve(t,i)?.res!==void 0}extractFromKey(t,r){let i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const n=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=i&&t.indexOf(i)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!pv(t,i,n);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:vt(s)?[s]:s};const c=t.split(i);(i!==n||i===n&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(n)}return{key:t,namespaces:vt(s)?[s]:s}}translate(t,r,i){let n=typeof r=="object"?{...r}:r;if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";typeof t=="function"&&(t=Sl(t,{...this.options,...n})),Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(t[t.length-1],n),c=l[l.length-1];let h=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;h===void 0&&(h=":");const u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u?.toLowerCase()==="cimode")return f?s?{res:`${c}${h}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${h}${a}`:s?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a;const d=this.resolve(t,n);let p=d?.res;const g=d?.usedKey||a,y=d?.exactUsedKey||a,b=["[object Number]","[object Function]","[object RegExp]"],x=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,C=n.count!==void 0&&!vt(n.count),v=ha.hasDefaultValue(n),E=C?this.pluralResolver.getSuffix(u,n.count,n):"",T=n.ordinal&&C?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",P=C&&!n.ordinal&&n.count===0,N=P&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${T}`]||n.defaultValue;let F=p;w&&!p&&v&&(F=N);const k=qu(F),L=Object.prototype.toString.apply(F);if(w&&F&&k&&b.indexOf(L)<0&&!(vt(x)&&Array.isArray(F))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,F,{...n,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(d.res=O,d.usedParams=this.getUsedParamsDetails(n),d):O}if(o){const O=Array.isArray(F),B=O?[]:{},I=O?y:g;for(const A in F)if(Object.prototype.hasOwnProperty.call(F,A)){const q=`${I}${o}${A}`;v&&!p?B[A]=this.translate(q,{...n,defaultValue:qu(N)?N[A]:void 0,joinArrays:!1,ns:l}):B[A]=this.translate(q,{...n,joinArrays:!1,ns:l}),B[A]===q&&(B[A]=F[A])}p=B}}else if(w&&vt(x)&&Array.isArray(p))p=p.join(x),p&&(p=this.extendTranslation(p,t,n,i));else{let O=!1,B=!1;!this.isValidLookup(p)&&v&&(O=!0,p=N),this.isValidLookup(p)||(B=!0,p=a);const A=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:p,q=v&&N!==p&&this.options.updateMissing;if(B||O||q){if(this.logger.log(q?"updateKey":"missingKey",u,c,a,q?N:p),o){const M=this.resolve(a,{...n,keySeparator:!1});M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&R&&R[0])for(let M=0;M<R.length;M++)$.push(R[M]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(n.lng||this.language):$.push(n.lng||this.language);const _=(M,H,z)=>{const U=v&&z!==p?z:A;this.options.missingKeyHandler?this.options.missingKeyHandler(M,c,H,U,q,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(M,c,H,U,q,n),this.emit("missingKey",M,c,H,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?$.forEach(M=>{const H=this.pluralResolver.getSuffixes(M,n);P&&n[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(z=>{_([M],a+z,n[`defaultValue${z}`]||N)})}):_($,a,N))}p=this.extendTranslation(p,t,n,d,i),B&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}${h}${a}`),(B||O)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${h}${a}`:a,O?p:void 0,n))}return s?(d.res=p,d.usedParams=this.getUsedParamsDetails(n),d):p}extendTranslation(t,r,i,n,s){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const l=vt(t)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const u=t.match(this.interpolator.nestingRegexp);c=u&&u.length}let h=i.replace&&!vt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||n.usedLng,i),l){const u=t.match(this.interpolator.nestingRegexp),f=u&&u.length;c<f&&(i.nest=!1)}!i.lng&&n&&n.res&&(i.lng=this.language||n.usedLng),i.nest!==!1&&(t=this.interpolator.nest(t,(...u)=>s?.[0]===u[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${u[0]} in key: ${r[0]}`),null):this.translate(...u,r),i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,a=vt(o)?[o]:o;return t!=null&&a?.length&&i.applyPostProcessor!==!1&&(t=qd.handle(a,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,r={}){let i,n,s,o,a;return vt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(i))return;const c=this.extractFromKey(l,r),h=c.key;n=h;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const f=r.count!==void 0&&!vt(r.count),d=f&&!r.ordinal&&r.count===0,p=r.context!==void 0&&(vt(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);u.forEach(y=>{this.isValidLookup(i)||(a=y,!Wu[`${g[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(Wu[`${g[0]}-${y}`]=!0,this.logger.warn(`key "${n}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{if(this.isValidLookup(i))return;o=b;const x=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,h,b,y,r);else{let C;f&&(C=this.pluralResolver.getSuffix(b,r.count,r));const v=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&C.indexOf(E)===0&&x.push(h+C.replace(E,this.options.pluralSeparator)),x.push(h+C),d&&x.push(h+v)),p){const T=`${h}${this.options.contextSeparator||"_"}${r.context}`;x.push(T),f&&(r.ordinal&&C.indexOf(E)===0&&x.push(T+C.replace(E,this.options.pluralSeparator)),x.push(T+C),d&&x.push(T+v))}}let w;for(;w=x.pop();)this.isValidLookup(i)||(s=w,i=this.getResource(b,y,w,r))}))})}),{res:i,usedKey:n,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,i,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,i,n):this.resourceStore.getResource(t,r,i,n)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!vt(t.replace);let n=i?t.replace:t;if(i&&typeof t.count<"u"&&(n.count=t.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!i){n={...n};for(const s of r)delete n[s]}return n}static hasDefaultValue(t){const r="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&r===i.substring(0,r.length)&&t[i]!==void 0)return!0;return!1}}class Hu{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ve.create("languageUtils")}getScriptPartFromCode(t){if(t=Wn(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Wn(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(vt(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(i=>{if(r)return;const n=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(n))&&(r=n)}),!r&&this.options.supportedLngs&&t.forEach(i=>{if(r)return;const n=this.getScriptPartFromCode(i);if(this.isSupportedCode(n))return r=n;const s=this.getLanguagePartFromCode(i);if(this.isSupportedCode(s))return r=s;r=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),vt(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let i=t[r];return i||(i=t[this.getScriptPartFromCode(r)]),i||(i=t[this.formatLanguageCode(r)]),i||(i=t[this.getLanguagePartFromCode(r)]),i||(i=t.default),i||[]}toResolveHierarchy(t,r){const i=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),n=[],s=o=>{o&&(this.isSupportedCode(o)?n.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return vt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):vt(t)&&s(this.formatLanguageCode(t)),i.forEach(o=>{n.indexOf(o)<0&&s(this.formatLanguageCode(o))}),n}}const Uu={zero:0,one:1,two:2,few:3,many:4,other:5},Yu={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class yv{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=Ve.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const i=Wn(t==="dev"?"en":t),n=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:n});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(i,{type:n})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Yu;if(!t.match(/-|_/))return Yu;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,r)}return this.pluralRulesCache[s]=o,o}needsPlural(t,r={}){let i=this.getRule(t,r);return i||(i=this.getRule("dev",r)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,i={}){return this.getSuffixes(t,i).map(n=>`${r}${n}`)}getSuffixes(t,r={}){let i=this.getRule(t,r);return i||(i=this.getRule("dev",r)),i?i.resolvedOptions().pluralCategories.sort((n,s)=>Uu[n]-Uu[s]).map(n=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n}`):[]}getSuffix(t,r,i={}){const n=this.getRule(t,i);return n?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,i))}}const Vu=(e,t,r,i=".",n=!0)=>{let s=lv(e,t,r);return!s&&n&&vt(r)&&(s=_l(e,r,i),s===void 0&&(s=_l(t,r,i))),s},Yo=e=>e.replace(/\$/g,"$$$$");class bv{constructor(t={}){this.logger=Ve.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:i,useRawValueToEscape:n,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:h,unescapePrefix:u,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:y,maxReplaces:b,alwaysFormat:x}=t.interpolation;this.escape=r!==void 0?r:hv,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=n!==void 0?n:!1,this.prefix=s?bi(s):o||"{{",this.suffix=a?bi(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=h?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=f?bi(f):d||bi("$t("),this.nestingSuffix=p?bi(p):g||bi(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=b||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,i)=>r?.source===i?(r.lastIndex=0,r):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,i,n){let s,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=d=>{if(d.indexOf(this.formatSeparator)<0){const b=Vu(r,l,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,i,{...n,...r,interpolationkey:d}):b}const p=d.split(this.formatSeparator),g=p.shift().trim(),y=p.join(this.formatSeparator).trim();return this.format(Vu(r,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),y,i,{...n,...r,interpolationkey:g})};this.resetRegExp();const h=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>Yo(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?Yo(this.escape(d)):Yo(d)}].forEach(d=>{for(a=0;s=d.regex.exec(t);){const p=s[1].trim();if(o=c(p),o===void 0)if(typeof h=="function"){const y=h(t,s,n);o=vt(y)?y:""}else if(n&&Object.prototype.hasOwnProperty.call(n,p))o="";else if(u){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else!vt(o)&&!this.useRawValueToEscape&&(o=Iu(o));const g=d.safeValue(o);if(t=t.replace(s[0],g),u?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=s[0].length):d.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,r,i={}){let n,s,o;const a=(l,c)=>{const h=this.nestingOptionsSeparator;if(l.indexOf(h)<0)return l;const u=l.split(new RegExp(`${h}[ ]*{`));let f=`{${u[1]}`;l=u[0],f=this.interpolate(f,o);const d=f.match(/'/g),p=f.match(/"/g);((d?.length??0)%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),c&&(o={...c,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${h}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;n=this.nestingRegexp.exec(t);){let l=[];o={...i},o=o.replace&&!vt(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const c=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(c!==-1&&(l=n[1].slice(c).split(this.formatSeparator).map(h=>h.trim()).filter(Boolean),n[1]=n[1].slice(0,c)),s=r(a.call(this,n[1].trim(),o),o),s&&n[0]===t&&!vt(s))return s;vt(s)||(s=Iu(s)),s||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),s=""),l.length&&(s=l.reduce((h,u)=>this.format(h,u,i.lng,{...i,interpolationkey:n[1].trim()}),s.trim())),t=t.replace(n[0],s),this.regexp.lastIndex=0}return t}}const xv=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const n=i[1].substring(0,i[1].length-1);t==="currency"&&n.indexOf(":")<0?r.currency||(r.currency=n.trim()):t==="relativetime"&&n.indexOf(":")<0?r.range||(r.range=n.trim()):n.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),h=a.trim();r[h]||(r[h]=c),c==="false"&&(r[h]=!1),c==="true"&&(r[h]=!0),isNaN(c)||(r[h]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},Gu=e=>{const t={};return(r,i,n)=>{let s=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(s={...s,[n.interpolationkey]:void 0});const o=i+JSON.stringify(s);let a=t[o];return a||(a=e(Wn(i),n),t[o]=a),a(r)}},vv=e=>(t,r,i)=>e(Wn(r),i)(t);class wv{constructor(t={}){this.logger=Ve.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const i=r.cacheInBuiltFormats?Gu:vv;this.formats={number:i((n,s)=>{const o=new Intl.NumberFormat(n,{...s});return a=>o.format(a)}),currency:i((n,s)=>{const o=new Intl.NumberFormat(n,{...s,style:"currency"});return a=>o.format(a)}),datetime:i((n,s)=>{const o=new Intl.DateTimeFormat(n,{...s});return a=>o.format(a)}),relativetime:i((n,s)=>{const o=new Intl.RelativeTimeFormat(n,{...s});return a=>o.format(a,s.range||"day")}),list:i((n,s)=>{const o=new Intl.ListFormat(n,{...s});return a=>o.format(a)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=Gu(r)}format(t,r,i,n={}){const s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(a=>a.indexOf(")")>-1)){const a=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,a)].join(this.formatSeparator)}return s.reduce((a,l)=>{const{formatName:c,formatOptions:h}=xv(l);if(this.formats[c]){let u=a;try{const f=n?.formatParams?.[n.interpolationkey]||{},d=f.locale||f.lng||n.locale||n.lng||i;u=this.formats[c](a,d,{...h,...n,...f})}catch(f){this.logger.warn(f)}return u}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}const Cv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class _v extends Ga{constructor(t,r,i,n={}){super(),this.backend=t,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=n,this.logger=Ve.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,n.backend,n)}queueLoad(t,r,i,n){const s={},o={},a={},l={};return t.forEach(c=>{let h=!0;r.forEach(u=>{const f=`${c}|${u}`;!i.reload&&this.store.hasResourceBundle(c,u)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,h=!1,o[f]===void 0&&(o[f]=!0),s[f]===void 0&&(s[f]=!0),l[u]===void 0&&(l[u]=!0)))}),h||(a[c]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,r,i){const n=t.split("|"),s=n[0],o=n[1];r&&this.emit("failedLoading",s,o,r),!r&&i&&this.store.addResourceBundle(s,o,i,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&i&&(this.state[t]=0);const a={};this.queue.forEach(l=>{ov(l.loaded,[s],o),Cv(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const h=l.loaded[c];h.length&&h.forEach(u=>{a[c][u]===void 0&&(a[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,r,i,n=0,s=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:i,tried:n,wait:s,callback:o});return}this.readingCalls++;const a=(c,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(c&&h&&n<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,i,n+1,s*2,o)},s);return}o(c,h)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const c=l(t,r);c&&typeof c.then=="function"?c.then(h=>a(null,h)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,r,a)}prepareLoading(t,r,i={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();vt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),vt(r)&&(r=[r]);const s=this.queueLoad(t,r,i,n);if(!s.toLoad.length)return s.pending.length||n(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,i){this.prepareLoading(t,r,{},i)}reload(t,r,i){this.prepareLoading(t,r,{reload:!0},i)}loadOne(t,r=""){const i=t.split("|"),n=i[0],s=i[1];this.read(n,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${n} failed`,o),!o&&a&&this.logger.log(`${r}loaded namespace ${s} for language ${n}`,a),this.loaded(t,o,a)})}saveMissing(t,r,i,n,s,o={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${i}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const l={...o,isUpdate:s},c=this.backend.create.bind(this.backend);if(c.length<6)try{let h;c.length===5?h=c(t,r,i,n,l):h=c(t,r,i,n),h&&typeof h.then=="function"?h.then(u=>a(null,u)).catch(a):a(null,h)}catch(h){a(h)}else c(t,r,i,n,a,l)}!t||!t[0]||this.store.addResource(t[0],r,i,n)}}}const Xu=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),vt(e[1])&&(t.defaultValue=e[1]),vt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(i=>{t[i]=r[i]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ku=e=>(vt(e.ns)&&(e.ns=[e.ns]),vt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),vt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),Es=()=>{},Sv=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class qn extends Ga{constructor(t={},r){if(super(),this.options=Ku(t),this.services={},this.logger=Ve,this.modules={external:[]},Sv(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(vt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Xu();this.options={...i,...this.options,...Ku(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const n=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Ve.init(n(this.modules.logger),this.options):Ve.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=wv;const h=new Hu(this.options);this.store=new zu(this.options.resources,this.options);const u=this.services;u.logger=Ve,u.resourceStore=this.store,u.languageUtils=h,u.pluralResolver=new yv(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(u.formatter=n(c),u.formatter.init&&u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new bv(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new _v(n(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.languageDetector&&(u.languageDetector=n(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=n(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ha(this.services,this.options),this.translator.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Es),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...h)=>this.store[c](...h)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...h)=>(this.store[c](...h),this)});const a=un(),l=()=>{const c=(h,u)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(u),r(h,u)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(t,r=Es){let i=r;const n=vt(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&s.indexOf(c)<0&&s.push(c)})};n?o(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(a)})}else i(null)}reloadResources(t,r,i){const n=un();return typeof t=="function"&&(i=t,t=void 0),typeof r=="function"&&(i=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),i||(i=Es),this.services.backendConnector.reload(t,r,s=>{n.resolve(),i(s)}),n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&qd.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const i=this.languages[r];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const i=un();this.emit("languageChanging",t);const n=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},s=(a,l)=>{l?this.isLanguageChangingTo===t&&(n(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve((...c)=>this.t(...c)),r&&r(a,(...c)=>this.t(...c))},o=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const l=vt(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(vt(a)?[a]:a);c&&(this.language||n(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,h=>{s(h,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),i}getFixedT(t,r,i){const n=(s,o,...a)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([s,o].concat(a)):l={...o},l.lng=l.lng||n.lng,l.lngs=l.lngs||n.lngs,l.ns=l.ns||n.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||i||n.keyPrefix);const c=this.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(s)?h=s.map(u=>(typeof u=="function"&&(u=Sl(u,{...this.options,...o})),`${l.keyPrefix}${c}${u}`)):(typeof s=="function"&&(s=Sl(s,{...this.options,...o})),h=l.keyPrefix?`${l.keyPrefix}${c}${s}`:s),this.t(h,l)};return vt(t)?n.lng=t:n.lngs=t,n.ns=r,n.keyPrefix=i,n}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=r.lng||this.resolvedLanguage||this.languages[0],n=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(r.precheck){const a=r.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,t)&&(!n||o(s,t)))}loadNamespaces(t,r){const i=un();return this.options.ns?(vt(t)&&(t=[t]),t.forEach(n=>{this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}),this.loadResources(n=>{i.resolve(),r&&r(n)}),i):(r&&r(),Promise.resolve())}loadLanguages(t,r){const i=un();vt(t)&&(t=[t]);const n=this.options.preload||[],s=t.filter(o=>n.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=n.concat(s),this.loadResources(o=>{i.resolve(),r&&r(o)}),i):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const n=new Intl.Locale(t);if(n&&n.getTextInfo){const s=n.getTextInfo();if(s&&s.direction)return s.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services?.languageUtils||new Hu(Xu());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){return new qn(t,r)}cloneInstance(t={},r=Es){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const n={...this.options,...t,isClone:!0},s=new qn(n);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i){const a=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((h,u)=>(h[u]={...l[c][u]},h),l[c]),l),{});s.store=new zu(a,n),s.services.resourceStore=s.store}return s.translator=new ha(s.services,n),s.translator.on("*",(a,...l)=>{s.emit(a,...l)}),s.init(n,r),s.translator.options=n,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Wt=qn.createInstance();Wt.createInstance=qn.createInstance;Wt.createInstance;Wt.dir;Wt.init;Wt.loadResources;Wt.reloadResources;Wt.use;Wt.changeLanguage;Wt.getFixedT;Wt.t;Wt.exists;Wt.setDefaultNamespace;Wt.hasLoadedNamespace;Wt.loadNamespaces;Wt.loadLanguages;const kv={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},Tv={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Ev={AddSubGroup:"Aggiungi sottogruppo",AddFilter:"Aggiungi Filtro",Operator:{String:{Starts:"Inizia per",Contains:"Contiene",Equals:"È uguale a"},Number:{Greater:"Maggiore di",GreaterOrEqual:"Maggiore o uguale a",Less:"Minore di",LessOrEqual:"Minore o uguale a",Equals:"Uguale a",NotEquals:"Diverso da"},Date:{Before:"Prima del",After:"Dopo del",On:"Il giorno"}}},Lv={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando",CheckObjectWrongValidation:"Oggetto non valido",ConfirmButton:"Conferma",AutocompleteDefaultPlaceholder:"Inserisci codice o descrizione"},Av={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:kv,Month:Tv,FilterBuilder:Ev,Generic:Lv},$v={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},Mv={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},Bv={AddSubGroup:"Add Sub Group",AddFilter:"Add Filter",Operator:{String:{Starts:"Starts with",Contains:"Contains",Equals:"Equal to"},Number:{Greater:"Greater than",GreaterOrEqual:"Greater or equal than",Less:"Less than",LessOrEqual:"Less or equal than",Equals:"Equal to",NotEquals:"Other than"},Date:{Before:"Before date",After:"After date",On:"On"}}},Ov={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command",CheckObjectWrongValidation:"Object not valid",ConfirmButton:"Confirm",AutocompleteDefaultPlaceholder:"Type code or description"},Rv={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:$v,Month:Mv,FilterBuilder:Bv,Generic:Ov};function Zu(e,t){return new RegExp(Dv(e),t)}function Dv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Fv=(e,t,r)=>{let i=e;return isNaN(i)||(t!=null&&(i=Math.max(i,t)),r!=null&&(i=Math.min(i,r))),i},Iv=(e,t)=>{const i=Intl.NumberFormat(e).formatToParts(1000.1),n=i.find(o=>o.type==="group")?.value??",",s=t??i.find(o=>o.type==="decimal")?.value??".";return{groupingChar:n,decimalChar:s}};function Nv(e,t,r,i){let n=t;const s=zv(e,r);if(!n){const a=Math.abs(s);a-Math.floor(a)?n="0,0.00":n="0,0"}const o=Wv(n);return new Intl.NumberFormat(i,o).format(s)}const Pv=(e,t,r)=>{const i=e.lastIndexOf(r);if(i!==-1)return e.length-i-1;const n=r==="."?",":".",s=e.lastIndexOf(n);return s!==-1&&!(n===t&&e.length-s-1===3)?e.length-s-1:0},jv=(e,t,r)=>{if(!e)return NaN;let i=e.replace(/\s/g,""),n=r;const s=(i.match(/\./g)||[]).length,o=(i.match(/,/g)||[]).length;if(s&&o)n=i.lastIndexOf(".")>i.lastIndexOf(",")?".":",";else if(!i.includes(r)){const l=i.includes(".")?".":",",c=l==="."?s:o;c>1||c===1&&l===t&&i.length-i.lastIndexOf(l)-1===3||(n=l)}const a=n==="."?",":".";return i=i.replace(new RegExp(`\\${a}`,"g"),""),n!=="."&&(i=i.replace(new RegExp(`\\${n}`,"g"),".")),parseFloat(i)};function zv(e,t,r,i,n){let s=e;if(typeof s!="number"){let a;t&&i===void 0?a=",":a=".";const l=a=="."?",":".";s=s.replace(Zu(l,"g"),""),s=s.replace(Zu(a,"g"),"."),s=Number(s)}const o=Number(s);return isNaN(o)?NaN:o}function Wv(e){const t={};e.includes(",")?t.useGrouping=!0:t.useGrouping=!1;const r=e.indexOf(".");if(r>-1){const n=(e.substring(r+1).match(/0/g)||[]).length;t.minimumFractionDigits=n,t.maximumFractionDigits=n}else t.minimumFractionDigits=0,t.maximumFractionDigits=0;return t}Wt.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(e,t,r,i)=>{const n=i?.type??"number";try{switch(n){case"date":{const s=e instanceof Date?e:new Date(e);return new Intl.DateTimeFormat(r,{dateStyle:t||"short"}).format(s)}default:case"number":{const s=i?.inputIsLocalized??!1;return Nv(e,t,s,r)}}}catch{return e}}},resources:{en:{translation:Rv},it:{translation:Av}}});const qv=(e,t,r,i)=>Wt.format(e,t,r||Wt.language,i),Hv=(e,t)=>Wt.t(e,t);function br(){const e=j.useCallback((i,n,s,o)=>qv(i,n,s||void 0,o),[]),t=j.useCallback(()=>Wt.languages[0],[]),r=j.useCallback((i,n)=>Hv(i,n),[]);return{format:e,getCurrentLanguage:t,translate:r}}var ur=(e=>(e.CALENDAR_FOR="Date.CalendarFor",e.CLOSE="Generic.Close",e.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",e.CHECK_OBJECT_WRONG_VALIDATION="Generic.CheckObjectWrongValidation",e.CONFIRM_BUTTON="Generic.ConfirmButton",e.AUTOCOMPLETE_DEFAULT_PLACEHOLDER="Generic.AutocompleteDefaultPlaceholder",e))(ur||{}),ye=(e=>(e.ADD_SUB_GROUP="FilterBuilder.AddSubGroup",e.ADD_FILTER="FilterBuilder.AddFilter",e.STRING_STARTS="FilterBuilder.Operator.String.Starts",e.STRING_CONTAINS="FilterBuilder.Operator.String.Contains",e.STRING_EQUALS="FilterBuilder.Operator.String.Equals",e.NUMBER_EQUALS="FilterBuilder.Operator.Number.Equals",e.NUMBER_NOTEQUALS="FilterBuilder.Operator.Number.NotEquals",e.NUMBER_GREATER="FilterBuilder.Operator.Number.Greater",e.NUMBER_GREATER_OR_EQUAL="FilterBuilder.Operator.Number.GreaterOrEqual",e.NUMBER_LESS="FilterBuilder.Operator.Number.Less",e.NUMBER_LESS_OR_EQUAL="FilterBuilder.Operator.Number.LessOrEqual",e.DATE_BEFORE="FilterBuilder.Operator.Date.Before",e.DATE_AFTER="FilterBuilder.Operator.Date.After",e.DATE_ON="FilterBuilder.Operator.Date.On",e))(ye||{}),oe=(e=>(e.MONDAY="Day.Monday",e.MONDAY_SHORT="Day.MondayShort",e.TUESDAY="Day.Tuesday",e.TUESDAY_SHORT="Day.TuesdayShort",e.WEDNESDAY="Day.Wednesday",e.WEDNESDAY_SHORT="Day.WednesdayShort",e.THURSDAY="Day.Thursday",e.THURSDAY_SHORT="Day.ThursdayShort",e.FRIDAY="Day.Friday",e.FRIDAY_SHORT="Day.FridayShort",e.SATURDAY="Day.Saturday",e.SATURDAY_SHORT="Day.SaturdayShort",e.SUNDAY="Day.Sunday",e.SUNDAY_SHORT="Day.SundayShort",e))(oe||{}),_e=(e=>(e.JANUARY="Month.January",e.FEBRUARY="Month.February",e.MARCH="Month.March",e.APRIL="Month.April",e.MAY="Month.May",e.JUNE="Month.June",e.JULY="Month.July",e.AUGUST="Month.August",e.SEPTEMBER="Month.September",e.OCTOBER="Month.October",e.NOVEMBER="Month.November",e.DECEMBER="Month.December",e))(_e||{}),kl=(e=>(e.PREVIOUS_DAY="Date.PreviousDay",e.PREVIOUS_WEEK="Date.PreviousWeek",e.PREVIOUS_MONTH="Date.PreviousMonth",e.PREVIOUS_YEAR="Date.PreviousYear",e.NEXT_DAY="Date.NextDay",e.NEXT_WEEK="Date.NextWeek",e.NEXT_MONTH="Date.NextMonth",e.NEXT_YEAR="Date.NextYear",e.YESTERDAY="Date.Yesterday",e.TODAY="Date.Today",e.TOMORROW="Date.Tomorrow",e))(kl||{});const Uv=e=>e?.type==="SmeupDataTree",Yv=e=>e?.type==="SmeupDataTable",zs={obj:{t:"",p:"",k:""},decode:"",shape:void 0},si=e=>{if(Yv(e)){const t=e,r=t.columns.filter(s=>s.visible!==!1),i=r[0]?.name??"",n=r[1]?.name??i;return t.rows.reduce((s,o)=>{const a={...o.cells[i],decode:o.cells[n]?.value||o.cells[i].obj.k};return[...s,a]},[])}else if(Uv(e))return Ud(e.children??[])},Ud=e=>e?.map(t=>({...t,decode:t.decode||t.value||t.obj?.k||"",children:Ud(t.children??[])})),Ic=({bindValue:e,optionalDisplayValue:t,options:r,listDisplayMode:i="Both",isClearable:n=!1,minimumChars:s=1,isEditable:o=!0,fun:a,_changeOnEnter:l=!1,onChange:c,onOptionsRequest:h,onBlur:u,_multiActiveIndex:f,...d})=>{const p=j.useRef(null),[g,y]=j.useState(e),[b,x]=j.useState(t),{translate:w}=br(),[C,v]=j.useState(!1),[E,T]=j.useState(r||[]),[P,N]=j.useState(0),[F,k]=j.useState([e]),{anchorRef:L,targetRef:O,anchorWidth:B}=Ke({position:"bottom",open:C}),I=j.useCallback(()=>{v(!1),p?.current?.focus()},[]);Gi([O],C,()=>I());const A=Id(400),q=z=>{z.length>=s?$(z):I(),y(z),x(""),l||c?.(z,t)},$=z=>{A(async()=>{if(a&&h){const U=await h(a,z),Y=si(U)||[];T(Y),N(Y.length>0?0:-1),v(!0)}})},R=()=>{C||u?.()},_=z=>{l?(y(""),x("")):(y(z.obj?.k),x(z.decode)),c?.(z.obj?.k,z.decode);const U=E.findIndex(Y=>Y.obj?.k===z.obj?.k);N(U),k([z.obj?.k]),I()},M=z=>{z.key==="Escape"&&(I(),N(-1))},H=z=>{if((z.key==="ArrowDown"||z.key==="ArrowUp")&&(z.preventDefault(),C)){const U=z.key==="ArrowDown"?(P+1)%E.length:(P-1+E.length)%E.length;N(U)}switch(z.key){case"Enter":P>=0&&P<E.length?_(E[P]):l&&(c?.(g,""),I(),y(""),x(""));break;case"Escape":I(),N(-1);break}};return S.jsxs("div",{"data-component":"autocomplete",children:[S.jsx(Ie,{...d,bindValue:g,optionalDisplayValue:b,isEditable:o,shapeIcon:"magnify",placeholder:w(ur.AUTOCOMPLETE_DEFAULT_PLACEHOLDER),ref:L,isClearable:n,inputRef:p,onChange:q,onKeyDown:H,onBlur:R,onShapeIconClick:()=>$(g),"aria-autocomplete":"list",maxLength:-1}),C&&S.jsx(Xe,{children:S.jsx(Va,{options:E,displayMode:i,onClick:_,ref:O,selectedIndex:P,activeIndex:f||F,width:B,showFilter:!1,onKeyDown:M,isOpen:C,floating:!0})})]})},Yd=({options:e,fun:t,direction:r="row",disposition:i="start",sizing:n,variant:s,appearance:o,showText:a,showIcon:l,fullWidth:c,disabled:h,justify:u,squared:f,onClick:d,onOptionsRequest:p})=>{const[g,y]=j.useState(e);j.useEffect(()=>{!g&&p&&t&&p(t,void 0).then(w=>y(si(w))).catch(w=>{console.error("Errore nel caricamento delle opzioni per ButtonList",w)})},[g,t,p]);const b={container:`smp-button-list smp-button-list-${r} smp-justifyContent-${i}`},x=g?.map((w,C)=>{const v={bindValue:w.obj.k,optionalDisplayValue:w.decode,fun:w.fun,icon:w.icon,variant:s,appearance:o,showText:a,showIcon:l,fullWidth:c,disabled:h,sizing:n,justify:u,squared:f,onClick:()=>{d?.(w.obj.k,w.fun)}};return S.jsx(Qt,{...v},`button-${C}`)});return S.jsx("div",{role:"list","data-component":"button-list",className:b.container,children:x})},Vv={"smp-checkbox-wrapper":"_smp-checkbox-wrapper_d8uan_2"},Xa=({bindValue:e,_dataComponent:t="checkbox",disabled:r,label:i,isEditable:n=!0,onChange:s,onBlur:o,variant:a="checkbox",...l})=>{const c=j.useId(),h=f=>{n&&s&&s(f.target.checked)},u={wrapper:`${Vv["smp-checkbox-wrapper"]}`};return S.jsxs("div",{className:u.wrapper,"data-component":t,children:[i&&S.jsx($r,{label:i,disabled:r,htmlFor:c,helper:l.helper}),S.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:e,onChange:h,onBlur:o,role:a==="switch"?"switch":"checkbox",id:c})]})};function Nc(e,t){const r=j.useRef(null);j.useEffect(()=>{if(!e)return;const i=typeof t=="object"&&t!==null&&"current"in t?t.current:null;if(!i)return;r.current=document.activeElement;const n=()=>i?Array.from(i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null):[];(()=>{const c=n();c.length>0&&requestAnimationFrame(()=>c[0].focus())})();const o=c=>{if(c.key==="Escape"||c.key!=="Tab")return;const h=n();if(h.length===0)return;const u=h[0],f=h[h.length-1];c.shiftKey&&document.activeElement===u?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),u.focus())},a=c=>{if(i&&!i.contains(c.target)){c.preventDefault();const h=n();h.length>0&&h[0].focus()}};document.addEventListener("keydown",o),document.addEventListener("mousedown",a);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.removeEventListener("mousedown",a),document.body.style.overflow=l,r.current&&requestAnimationFrame(()=>{r.current?.focus()})}},[e,t])}const ua=({bindValue:e,onChange:t,options:r=[],optionalDisplayValue:i,isEditable:n,listDisplayMode:s="Both",fun:o,onOptionsRequest:a,multiActiveIndex:l,...c})=>{const h=j.useRef(null),[u,f]=j.useState(!1),[d,p]=j.useState(r),[g,y]=j.useState(-1),[b,x]=j.useState([e]),w=j.useId(),{anchorRef:C,targetRef:v,anchorWidth:E}=Ke({position:"bottom",open:u}),T=j.useCallback(()=>{f(!1),h?.current?.focus()},[]);Gi([v,C],u,()=>T()),Nc(u,v);const P=L=>{t?.(L.obj.k,L.decode);const O=d.findIndex(B=>B.obj.k===L.obj.k);y(O),x([L.obj.k]),T()},N=L=>{L.key==="Escape"&&(T(),y(-1))},F=L=>{(L.key==="ArrowDown"||L.key==="ArrowUp")&&(L.preventDefault(),k())},k=()=>{n&&(o&&a?u?f(!1):a(o,void 0).then(L=>{const O=si(L)||[];p(O),y(O.length>0?0:-1),f(!0)}):f(L=>!L))};return S.jsxs("div",{role:"combobox","aria-expanded":u,"aria-controls":w,"aria-owns":w,"data-component":"combobox",children:[S.jsx(Ie,{...c,bindValue:e,optionalDisplayValue:i,onShapeIconClick:k,onKeyDown:F,onClick:k,shapeIcon:"arrow_drop_down",rotatedShapeIcon:u,isEditable:n,ref:C,inputRef:h,"aria-autocomplete":"list",variant:"notSelectable"}),u&&S.jsx(Xe,{children:S.jsx(Va,{id:w,options:d,displayMode:s,ref:v,isOpen:u,selectedIndex:g,activeIndex:l||b,width:E,onClick:P,onKeyDown:N,floating:!0})})]})},Gv={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_1lf9g_1"};function Xv({selectedDate:e,onDateChange:t,disabledDateRanges:r=[],initialValue:i,targetRef:n}){const{translate:s}=br(),o=()=>{if(!i)return;const R=new Date(i);return isNaN(R.getTime())?void 0:R},[a]=j.useState(new Date),[l,c]=j.useState(e||o()||new Date),[h,u]=j.useState(l?l.getMonth():new Date().getMonth()),[f,d]=j.useState(l?l.getFullYear():new Date().getFullYear()),[p,g]=j.useState(l?l.getDate():null),y=j.useRef(null),b=j.useRef([]),x=[s(_e.JANUARY),s(_e.FEBRUARY),s(_e.MARCH),s(_e.APRIL),s(_e.MAY),s(_e.JUNE),s(_e.JULY),s(_e.AUGUST),s(_e.SEPTEMBER),s(_e.OCTOBER),s(_e.NOVEMBER),s(_e.DECEMBER)],w=[{value:s(oe.SUNDAY_SHORT),full:s(oe.SUNDAY)},{value:s(oe.MONDAY_SHORT),full:s(oe.MONDAY)},{value:s(oe.TUESDAY_SHORT),full:s(oe.TUESDAY)},{value:s(oe.WEDNESDAY_SHORT),full:s(oe.WEDNESDAY)},{value:s(oe.THURSDAY_SHORT),full:s(oe.THURSDAY)},{value:s(oe.FRIDAY_SHORT),full:s(oe.FRIDAY)},{value:s(oe.SATURDAY_SHORT),full:s(oe.SATURDAY)}],C=R=>r.some(_=>{const M=_.start.getTime(),H=_.end.getTime(),z=R.getTime();return z>=M&&z<=H}),v=R=>{C(R)||(c(R),g(R.getDate()),t&&t(nv(R)))},E=()=>{h===0?(u(11),d(f-1)):u(h-1),g(1)},T=()=>{h===11?(u(0),d(f+1)):u(h+1),g(1)},P=(R,_)=>new Date(R,_+1,0).getDate(),N=(R,_)=>new Date(R,_,1).getDay(),F=R=>{const _=B.findIndex(M=>M!==null&&M.getDate()===R);_!==-1&&b.current[_]&&(b.current[_]?.focus(),g(R))},k=(R,_)=>{const M=B[_];if(!M)return;const H=P(f,h),z=M.getDate();switch(R.key){case"ArrowRight":R.preventDefault();{let U=z+1,Y=new Date(f,h,U);if(U>H){const K=h===11?f+1:f,Z=h===11?0:h+1;U=1,Y=new Date(K,Z,U),T(),setTimeout(()=>{L(1,"forward")},0);return}C(Y)?L(U,"forward"):F(U)}break;case"Tab":break;case"ArrowLeft":R.preventDefault();{let U=z-1,Y=new Date(f,h,U);if(U<1){const K=h===0?f-1:f,Z=h===0?11:h-1,Q=P(K,Z);U=Q,Y=new Date(K,Z,U),E(),setTimeout(()=>{L(Q,"backward")},0);return}C(Y)?L(U,"backward"):F(U)}break;case"ArrowUp":R.preventDefault();{let U=z-7,Y=new Date(f,h,U);if(U<1){const K=h===0?f-1:f,Z=h===0?11:h-1;U=P(K,Z)+U,Y=new Date(K,Z,U),E(),setTimeout(()=>{L(U,"backward")},0);return}C(Y)?L(U,"backward"):F(U)}break;case"ArrowDown":R.preventDefault();{let U=z+7,Y=new Date(f,h,U);if(U>H){const K=h===11?f+1:f,Z=h===11?0:h+1;U=U-H,Y=new Date(K,Z,U),T(),setTimeout(()=>{L(U,"forward")},0);return}C(Y)?L(U,"forward"):F(U)}break;case"Home":R.preventDefault(),L(1,"forward");break;case"End":R.preventDefault(),L(H,"backward");break;case"PageUp":R.preventDefault(),E(),setTimeout(()=>{const U=P(h===0?f-1:f,h===0?11:h-1),Y=Math.min(z,U);L(Y,"forward")},0);break;case"PageDown":R.preventDefault(),T(),setTimeout(()=>{const U=P(h===11?f+1:f,h===11?0:h+1),Y=Math.min(z,U);L(Y,"forward")},0);break;case" ":case"Space":if(C(M))return;g(M.getDate()),c(M);break;case"Enter":R.preventDefault(),v(M);break}},L=(R,_)=>{const M=P(f,h);if(_==="forward"){for(let H=R;H<=M;H++){const z=new Date(f,h,H);if(!C(z)){F(H);return}}T(),setTimeout(()=>{L(1,"forward")},0)}else{for(let Y=R;Y>=1;Y--){const K=new Date(f,h,Y);if(!C(K)){F(Y);return}}const H=h===0?f-1:f,z=h===0?11:h-1,U=P(H,z);E(),setTimeout(()=>{L(U,"backward")},0)}},B=(()=>{const R=P(f,h),_=N(f,h),M=[];for(let H=0;H<_;H++)M.push(null);for(let H=1;H<=R;H++){const z=new Date(f,h,H);M.push(z)}return M})(),I=[];let A=[];B.forEach((R,_)=>{if(A.push(R),A.length===7||_===B.length-1){for(;A.length<7;)A.push(null);I.push(A),A=[]}}),j.useEffect(()=>{if(p!==null){const R=B.findIndex(_=>_!==null&&_.getDate()===p);R!==-1&&b.current[R]&&b.current[R]?.focus()}},[h,f,p,B]);const q={label:"smp-datepickercalendar-label",wrapper:`smp-datepickercalendar ${Gv["smp-datepickercalendar-position"]}`,calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(R,_,M,H)=>`smp-datepickercalendar-td
|
|
46
|
+
${R?"smp-datepickercalendar-td-today":""}
|
|
47
|
+
${_?"smp-datepickercalendar-td-selected":""}
|
|
48
|
+
${M?"smp-datepickercalendar-td-focused":""}
|
|
49
|
+
${H?"smp-datepickercalendar-td-disabled":""}`},$=()=>`${x[h]} ${f.toString()}`;return S.jsxs("div",{className:q.wrapper,ref:n,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[S.jsx(Qt,{onClick:E,ariaLabel:s(kl.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),S.jsx("div",{"aria-label":$(),className:q.label,children:$()}),S.jsx(Qt,{onClick:T,ariaLabel:s(kl.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),S.jsxs("table",{ref:y,role:"grid","aria-label":`${s(ur.CALENDAR_FOR)} ${x[h]} ${f}`,className:q.table,children:[S.jsx("thead",{children:S.jsx("tr",{children:w.map(R=>S.jsx("th",{scope:"col",abbr:R.full,className:q.th,children:R.value},R.value))})}),S.jsx("tbody",{children:I.map((R,_)=>S.jsx("tr",{children:R.map((M,H)=>{const z=_*7+H;if(M===null)return S.jsx("td",{className:q.td(!1,!1,!1,!0)},`empty-${H}`);const U=M.getDate()===a.getDate()&&M.getMonth()===a.getMonth()&&M.getFullYear()===a.getFullYear(),Y=l&&M.getDate()===l.getDate()&&M.getMonth()===l.getMonth()&&M.getFullYear()===l.getFullYear(),K=p===M.getDate(),Z=C(M);return S.jsx("td",{role:"gridcell","aria-selected":Y,tabIndex:K?0:-1,onClick:()=>v(M),onKeyDown:Q=>k(Q,z),"aria-label":`${M.getDate()} ${x[M.getMonth()]} ${M.getFullYear()}`,"data-selected":Y,"aria-disabled":Z,ref:Q=>{b.current[z]=Q},className:q.td(U,Y,K,Z),children:M.getDate()},`day-${H}`)})},`week-${_}`))})]})]})}const Pc=({bindValue:e,optionalDisplayValue:t,label:r,className:i,style:n,...s})=>{const o={wrapper:"smp-text-wrapper"};return r?S.jsxs("div",{className:o.wrapper,children:[S.jsx($r,{label:r,helper:s.helper}),S.jsx(Ae,{variant:"body",bindValue:t||e,className:i,style:n})]}):S.jsx(Ae,{variant:"body",bindValue:t||e,className:i,style:n})},jc=({bindValue:e,placeholder:t,onChange:r,disabledDateRanges:i,isEditable:n=!0,isOptimized:s,...o})=>{const a=j.useRef(null),[l,c]=j.useState(!1),[h,u]=j.useState(e||""),[f,d]=j.useState(""),{anchorRef:p,targetRef:g}=Ke({position:"bottom",open:l}),y=j.useCallback(()=>{c(!1),a?.current?.focus()},[]);Gi([g,p],l,()=>{y()}),Nc(l,g);const{format:b,getCurrentLanguage:x}=br(),w=j.useCallback(F=>{const k=F.length>5&&ev(F,x())||F,L=b(k,void 0,void 0,{type:"date"}),O=typeof k!="string",B=O&&k.toISOString().substring(0,10)||"";return{isValid:O,formattedDate:L,isoDate:B,normalizedDate:k}},[x,b]);j.useEffect(()=>{const{formattedDate:F,isoDate:k,isValid:L}=w(e);u(L&&k||e),d(L&&F||e)},[e,b,w]);const C=()=>c(F=>!F),v=()=>{T(f)},E=F=>{T(F),y()},T=F=>{const{isoDate:k,isValid:L}=w(F);r&&r(L&&k||F)},P=F=>{d(F)},N=F=>{F.key==="Enter"&&(F.preventDefault(),T(f))};return S.jsx("div",{"data-component":"date-picker",children:s?S.jsx(Pc,{bindValue:f}):S.jsxs(S.Fragment,{children:[S.jsx(Ie,{...o,bindValue:f,placeholder:t,onBlur:v,onChange:P,onKeyDown:N,shapeIcon:"calendar",onShapeIconClick:C,ref:p,inputRef:a,isEditable:n,size:10,maxLength:o.maxLength?o.maxLength:10}),l&&S.jsx(Xe,{children:S.jsx(Xv,{disabledDateRanges:i,onDateChange:E,initialValue:Fc(h)&&h||"",targetRef:g})})]})})},zc=({elements:e,isEditable:t=!1,displayMode:r="Both",onChange:i,color:n,backgroundColor:s,isDraggable:o=!1})=>{const[a,l]=j.useState(null),c={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},h=d=>{i?.(e.filter((p,g)=>g!==d))},u=d=>{l(d)},f=d=>{if(a===null||a===d)return;const p=[...e],[g]=p.splice(a,1);p.splice(d,0,g),i?.(p),l(null)};return S.jsx("div",{className:c.container,role:"list","data-component":"chip",children:e.flatMap((d,p)=>{const g=as(d.bindValue,d.optionalDisplayValue,r),y=S.jsxs("div",{className:c.element,role:"listitem",draggable:o,onDragStart:()=>u(p),onDragOver:x=>o&&x.preventDefault(),onDrop:()=>o&&f(p),style:{"--smp-chips-backgroundColor-base":s},children:[o&&S.jsx(Ot,{icon:"drag_indicator_horizontal",isInteractable:!0}),S.jsx(Ae,{variant:"label",bindValue:g,color:n}),t&&S.jsx(Ot,{icon:"close",isInteractable:!0,onClick:()=>h(p),color:n})]},`chip-${p}`),b=o&&p<e.length-1?S.jsx(Ot,{icon:"chevron-right",color:n},`separator-${p}`):null;return[y,b].filter(Boolean)})})},Kv=({elements:e,displayMode:t,minimumChars:r,listDisplayMode:i,isEditable:n,placeholder:s,label:o,disabled:a,fun:l,error:c,onOptionsRequest:h,onChange:u,onBlur:f,autocomplete:d=!0,...p})=>{const g=e.map(x=>x.bindValue),y=(x,w)=>{const C=[...e];if(x=="")C.pop();else{const v=C.findIndex(E=>E.bindValue===x&&E.optionalDisplayValue===w);v>=0?C.splice(v,1):C.push({bindValue:x,optionalDisplayValue:w})}u?.(C)},b={container:"smp-multipleAutocomplete-container"};return S.jsxs("div",{className:b.container,"data-component":"multiple-autocomplete",children:[o&&S.jsx($r,{label:o,disabled:a,helper:p.helper}),S.jsx(zc,{elements:e,displayMode:t,isEditable:n,onChange:x=>{u?.(x)}}),d&&S.jsx(Ic,{...p,bindValue:"",fun:l,isEditable:n,onChange:y,_changeOnEnter:!0,listDisplayMode:i,minimumChars:r,placeholder:s,onOptionsRequest:h,_multiActiveIndex:g,error:c,onBlur:f})]})},Vd=({...e})=>{const[t,r]=j.useState(!1),i=t?"visibility-off":"visibility";return S.jsx(Ie,{...e,inputType:t?"text":"password",shapeIcon:i,onShapeIconClick:()=>r(!t),ariaLabel:"password","data-component":"password"})},Zv=({...e})=>{const[t,r]=j.useState(e.bindValue),{translate:i}=br(),n=o=>{o.key==="Enter"&&(o.preventDefault(),e.onEnter?.(t))},s=o=>{r(o),e.onChange?.(o)};return S.jsx(Ie,{...e,placeholder:e.placeholder?e.placeholder:i(ur.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:t,onChange:s,onKeyDown:n,ariaLabel:"search bar",_dataComponent:"search-bar"})};class Kr{class;value;constructor(t,r){this.class=t,this.value=r}static fromDataObj(t){return new Kr(t,t.k==""?[]:t.k.split(";"))}static fromString(t){return new Kr({t:"",p:""},t.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const Nr=(e,t,r)=>({obj:{t:e.obj.t,p:e.obj.p,k:t},decode:r??e.decode,shape:e.shape,fun:e.fun,data:e.data}),Qv=e=>{const t=Kr.fromDataObj(e.obj),r=e.decode?Kr.fromString(e.decode).getValue():[];return t.getValue().map((i,n)=>({bindValue:i,optionalDisplayValue:r.length>=n?r[n]:""}))},Jv=(e,t)=>{const r=new Kr(e.obj,t.map(n=>n.bindValue)).getLegacyValue(),i=new Kr(e.obj,t.map(n=>n.optionalDisplayValue?n.optionalDisplayValue:"")).getLegacyValue();return Nr(e,r,i)},Gd=({min:e,max:t,step:r=1,inputMode:i="decimal",dSep:n,bindValue:s,onChange:o,onEnter:a,isOptimized:l,...c})=>{const{getCurrentLanguage:h}=br(),u=j.useRef(null),f=h(),{groupingChar:d,decimalChar:p}=j.useMemo(()=>Iv(f,n),[f,n]),g=j.useCallback((O,B)=>new Intl.NumberFormat(f,{minimumFractionDigits:B,maximumFractionDigits:B,useGrouping:!0}).format(O),[f]),y=j.useCallback(jv,[d,p]),b=j.useCallback(Fv,[e,t]),x=s!=null&&s.toString().includes(".")?s.toString().split(".")[1].length:0,[w,C]=j.useState(x),[v,E]=j.useState(s!=null?g(s,w):""),T=j.useRef(s??null);j.useEffect(()=>{if(s==null){E(""),T.current=null;return}const O=s.toString().includes(".")?s.toString().split(".")[1].length:0,B=O===0?w:O;B!==w&&C(B),E(g(s,B)),T.current=s},[s,g]);const P=j.useCallback((O,B=!1)=>{if(O.trim()===""){E(""),T.current=null,o?.(void 0,""),B&&a?.(void 0);return}const I=y(O,d,p);if(isNaN(I))if(T.current!=null){const A=g(T.current,w);E(A)}else E("");else{const A=b(I,e,t),q=Pv(O,d,p);C(q);const $=g(A,q);E($),T.current=A,o?.(A,$),B&&a?.(A)}},[y,d,p,b,e,t,g,o,a,w]),N=O=>E(O),F=()=>P(v),k=O=>{if(O.key==="Enter"){O.preventDefault(),P(v,!0);return}if(O.key==="ArrowUp"||O.key==="ArrowDown"){O.preventDefault();const B=O.key==="ArrowUp"?1:-1,I=T.current??0,A=b(I+B*r,e,t);P(g(A,w))}},L=O=>{if(!O.currentTarget.contains(document.activeElement))return;O.preventDefault();const B=O.deltaY<0?1:-1,I=T.current??0,A=b(I+B*r,e,t);P(g(A,w))};return S.jsx("div",{ref:u,"data-component":"input-number",onWheel:L,children:l?S.jsx(Pc,{bindValue:v,className:`smp-text-number${T.current!=null&&T.current<0?" smp-text-negative":""}`}):S.jsx(Ie,{...c,"aria-valuemin":e,"aria-valuemax":t,"aria-valuenow":T.current??void 0,bindValue:v,inputType:"text",inputMode:i,min:e,max:t,step:r,onChange:N,onBlur:F,onKeyDown:k})})};class Hn{class;value;decimalSeparator;constructor(t,r,i="."){this.class=t,this.value=r,this.decimalSeparator=i}static fromDataObj(t,r){const i=r==="."?",":".";if(t.k==="")return new Hn(t,void 0,r);let n=t.k.trim();const s=n.endsWith("-");s&&(n=n.slice(0,-1));const a=n.replace(new RegExp(`\\${i}`,"g"),"").replace(r,"."),l=parseFloat(a),c=s?-l:l;return new Hn(t,c,r)}getLegacyValue(){return this.value!=null?this.value.toString().replace(".",this.decimalSeparator):""}getValue(){return this.value}}const Xd=({disabled:e,bindValue:t,onChange:r,placeholder:i,state:n,appearance:s,isEditable:o,inputRef:a,label:l,ariaLabel:c,helperText:h,style:u,error:f,onBlur:d,onKeyDown:p,rows:g=10,cols:y=35,...b})=>{const x=j.useId(),w=`${x}-helper`,C=f?"danger":n,v=h||!!f,E=P=>{r?.(P.target.value)},T={wrapper:"smp-textarea-wrapper",container:`smp-textarea ${e?"smp-textarea-disabled":""} ${i?"smp-textarea-placeholder":""} ${C?`smp-textarea-${C}`:""} ${s?`smp-textarea-${s}`:""} ${o?"":"smp-textarea-readOnly"}`};return S.jsxs("div",{className:T.wrapper,"data-component":"textarea",children:[l&&S.jsx($r,{htmlFor:x,label:l,disabled:e,helper:b.helper}),S.jsx("textarea",{id:x,value:t,placeholder:i,onChange:E,onBlur:d,className:T.container,disabled:e,readOnly:!o,onKeyDown:p,style:u,"aria-label":l?void 0:c,"aria-labelledby":l?x:void 0,"aria-describedby":v?w:void 0,rows:g,cols:y,ref:a}),v&&S.jsx(Rc,{id:w,helperText:f,disabled:e,state:C})]})};var Tl=(e=>(e.PAGE_DIRECTION="pageDirection",e.LINE_DIRECTION="lineDirection",e))(Tl||{});const xi={"smp-radio":"_smp-radio_1fqe8_1","smp-radio-options-container":"_smp-radio-options-container_1fqe8_10","smp-radio-horizontal":"_smp-radio-horizontal_1fqe8_16","smp-radio-element":"_smp-radio-element_1fqe8_20","smp-radio-disabled":"_smp-radio-disabled_1fqe8_26","smp-radio-horizontal-grid":"_smp-radio-horizontal-grid_1fqe8_32"},tw=({disabled:e=!1,displayMode:t="DescOnly",RadLay:r=Tl.PAGE_DIRECTION,RadCol:i,options:n,onOptionsRequest:s,fun:o,label:a,...l})=>{const[c,h]=j.useState(n),u=j.useId();j.useEffect(()=>{!c&&s&&o&&s(o,void 0).then(v=>h(si(v))).catch(v=>{console.error("Error during loading options (radio)",v)})},[c,s,o]);const f=parseInt(i??"",10),d=r===Tl.LINE_DIRECTION,p=d&&!isNaN(f),g=p?xi["smp-radio-horizontal-grid"]:d?xi["smp-radio-horizontal"]:"",y=p?{gridTemplateColumns:`repeat(${f}, 1fr)`}:void 0,b={container:xi["smp-radio"],optionsContainer:`${xi["smp-radio-options-container"]} ${g}`,option:`${xi["smp-radio-element"]} ${e?xi["smp-radio-disabled"]:""}`},x=()=>{e||l.onBlur?.()},w=v=>{e||l.onChange?.(v.obj.k,v.decode)},C=j.useId();return S.jsxs("div",{"smp-id":"radio-container",className:b.container,id:u,children:[a&&S.jsx($r,{label:a,disabled:e,htmlFor:u,helper:l.helper}),S.jsx("div",{className:b.optionsContainer,style:y,children:c?.map((v,E)=>S.jsxs("label",{className:b.option,children:[S.jsx("input",{type:"radio",name:C,value:v.obj.k,disabled:e,checked:v.obj.k===l.bindValue,onChange:()=>w(v),onBlur:x}),S.jsx(Ae,{variant:"body",bindValue:as(v.obj.k,v.decode,t)})]},E))})]})},ew=({value:e,onChange:t,targetRef:r,isOpen:i})=>{const n=j.useRef(null);j.useEffect(()=>{i&&n?.current&&n.current.focus()},[i,n]);const[s,o,a]=e,l=c=>Array.from({length:c},(h,u)=>S.jsx("option",{value:u,children:u.toString().padStart(2,"0")},u));return S.jsxs("div",{className:"smp-timepicker-widget",ref:r,children:[S.jsx("select",{value:s,ref:n,onChange:c=>t(+c.target.value,o,a),id:"time-picker-hours",children:l(24)}),":",S.jsx("select",{value:o,onChange:c=>t(s,+c.target.value,a),id:"time-picker-minutes",children:l(60)}),":",S.jsx("select",{value:a||0,onChange:c=>t(s,o,+c.target.value),id:"time-picker-seconds",children:l(60)})]})},Qu=e=>{const t=e.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!t)return!1;const[,r,i,n]=t,s=parseInt(r,10),o=parseInt(i,10),a=n?parseInt(n,10):0;return s>=0&&s<=23&&o>=0&&o<=59&&(n===void 0||a>=0&&a<=59)},rw=e=>{const t=e.split(":").map(r=>parseInt(r,10));return[t[0]||0,t[1]||0,t[2]||0]},iw=(e,t,r)=>{const i=e!=null&&!isNaN(e)?e.toString().padStart(2,"0"):"",n=t!=null&&!isNaN(t)?t.toString().padStart(2,"0"):"",s=r!=null&&!isNaN(r)?r.toString().padStart(2,"0"):"";return i&&n?`${i}:${n}:${s}`:n?`${n}:${s}`:s},nw=({bindValue:e,placeholder:t="HH:MM:SS",onChange:r,isEditable:i=!0,...n})=>{const s=j.useRef(null),[o,a]=j.useState(!1),[l,c]=j.useState(e||""),[h,u]=j.useState(""),{anchorRef:f,targetRef:d}=Ke({position:"bottom",open:o}),p=j.useCallback(()=>{a(!1),s?.current?.focus()},[]);Gi([d,f],o,()=>a(!1)),Nc(o,d),j.useEffect(()=>{const v=e||"",E=Qu(v)?v:e||"";c(v),u(E)},[e]),j.useEffect(()=>{const v=E=>{E.key==="Escape"&&a(!1)};return o&&document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v)}},[o]);const g=()=>{i&&a(v=>!v)},y=v=>{u(v)},b=(v,E,T)=>{const P=iw(v,E,T);c(P),u(P),r?.(P),p()},x=()=>{C(h)},w=v=>{v.key==="Enter"&&(v.preventDefault(),C(h))},C=v=>{if(v.trim()===""){c(""),u(""),r?.("");return}Qu(v)?(c(v),u(v),r?.(v)):u(v)};return S.jsxs("div",{"data-component":"time-picker",children:[S.jsx(Ie,{...n,bindValue:h,placeholder:t,onChange:y,onBlur:x,onKeyDown:w,shapeIcon:"clock",onShapeIconClick:g,isEditable:i,ref:f,inputRef:s}),o&&S.jsx(Xe,{children:S.jsx(ew,{value:rw(l),onChange:b,targetRef:d,isOpen:o})})]})};function sw(e){return typeof e=="string"&&/^\d{6}$/.test(e)}class fa{class;time;constructor(t,r){this.class=t,this.time=r}static fromDataObj(t){const r=Ju.get(`${t.t}${t.p}`);if(r)return new fa(t,r.legacyToIso(t.k));throw new Error(`time creation from ${t.t}${t.p} not implemented yet`)}getLegacyValue(){const t=Ju.get(`${this.class.t}${this.class.p}`);if(t)return t.isoToLegacy(this.time);throw new Error(`Time object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.time}}const Ju=new Map([["I12",{legacyToIso(e){return sw(e)&&`${e.substring(0,2)}:${e.substring(2,4)}:${e.substring(4,6)}`||e},isoToLegacy(e){return e.replaceAll(":","")||e}}]]),aw={"smp-cell-wrapper":"_smp-cell-wrapper_mdlkz_1"},Nt=e=>e==null?!1:typeof e=="string"?e.toLocaleLowerCase()=="yes"||e.toLocaleLowerCase()=="true":e,Kd=({bindValue:e,disabled:t=!1,label:r,displayMode:i="DescOnly",BtoVer:n="false",options:s,onOptionsRequest:o,fun:a,helper:l,...c})=>{const[h,u]=j.useState(s),f=j.useId(),d=g=>{t||c.onChange?.(g.obj.k,g.decode)};j.useEffect(()=>{!h&&o&&a&&o(a,void 0).then(g=>u(si(g))).catch(g=>{console.error("Error during loading options (button group)",g)})},[h,o,a]);const p={container:`smp-button-group-container ${Nt(n)?"smp-button-group-vertical":""}`,optionsContainer:`smp-button-group-options-container ${Nt(n)?"smp-button-group-vertical":""}`};return S.jsxs("div",{"smp-id":"buttonGroup-container",className:p.container,id:f,children:[r&&S.jsx($r,{label:r,disabled:t,htmlFor:f,helper:l}),S.jsx("div",{className:p.optionsContainer,children:h?.map(g=>S.jsx(Qt,{appearance:"raised",variant:"base",active:e===g.obj.k,onClick:()=>d(g),bindValue:g.obj.k,optionalDisplayValue:as(g.obj.k,g.decode,i),disabled:t,justify:Nt(n)?"start":"center",icon:g.icon,buttonExt:`oneButton-${Nt(n)?"vertical":"horizontal"}`},g.obj.k))})]})};function Ci(e){return!!e&&"children"in e}function Ls(e){return!Ci(e)}const We={"smp-row":"_smp-row_qr95z_2","smp-row-data":"_smp-row-data_qr95z_15","smp-row-selected":"_smp-row-selected_qr95z_26","smp-row-clickable":"_smp-row-clickable_qr95z_36","smp-row-indent":"_smp-row-indent_qr95z_41","smp-row-toggle":"_smp-row-toggle_qr95z_47","smp-row-icon":"_smp-row-icon_qr95z_52","smp-row-wrapperCell":"_smp-row-wrapperCell_qr95z_58","smp-row-leftSection":"_smp-row-leftSection_qr95z_65","smp-row-node-label":"_smp-row-node-label_qr95z_73"},Wc=({row:e,columns:t,columnWidths:r={},level:i=0,rowHeight:n=26,offsetTop:s,enableSelection:o,isSelected:a=!1,onToggleSelect:l,onRowClick:c,onNodeClick:h,onContextMenu:u})=>{const[f,d]=j.useState(Ci(e)),p=Ci(e)&&!!e.children?.length,g=e.cells&&Object.keys(e.cells).length>0,y=p,b=i*16,x=()=>{p&&d(!f)},w={content:`${We["smp-row"]} ${Ls(e)?We["smp-row-data"]:""} ${Ci(e)?We["smp-row-clickable"]:""} ${a?We["smp-row-selected"]:""}`,toggle:`${We["smp-row-toggle"]} ${We["smp-row-icon"]}`,indent:`${We["smp-row-indent"]}`,cell:`${We["smp-row-wrapperCell"]}`,leftSection:`${We["smp-row-leftSection"]}`,nodeLabel:We["smp-row-node-label"]},C=k=>{let L=k.shape;return k.shape==="ACP"||k.shape==="CMB"||k.shape==="ITX"?L="LBL":k.shape==="AML"&&(L="CHI"),S.jsx(Vr,{...k,shape:L,onContextMenu:u,data:{...k.data,isOptimized:!0}})},v=()=>S.jsx("span",{className:w.toggle,children:y&&S.jsx(Ot,{icon:f?"arrow_drop_right":"arrow_drop_down",width:16})}),E=(k,L)=>S.jsx("span",{className:w.toggle,children:S.jsx(Ot,{icon:k,placeholderIcon:L,width:16})}),T=()=>S.jsx("span",{className:w.indent,style:{width:`${b}px`},"aria-hidden":"true"}),P=()=>{if(l)return S.jsx(Xa,{bindValue:a,onChange:()=>{l()}})},N=()=>{const k=Ls(e)?"":e.decode||(g?"":"Untitled"),L=s??n*i,O={height:`${n}px`,lineHeight:`calc(${n}px - 2*2px)`,...Ls(e)&&{transform:`translateY(${L}px)`}};return S.jsxs("tr",{className:w.content,onClick:x,role:Ci(e)?"button":"row","aria-expanded":p?!f:void 0,style:O,children:[o&&S.jsx("td",{className:w.cell,style:{height:`${n}px`,minWidth:40,justifyContent:"center"},children:P()}),Ci(e)&&S.jsxs("td",{className:w.leftSection,style:{height:`${n}px`},onClick:()=>h?.(e),children:[T(),v(),e.icon&&E(e.icon,e.placeholderIcon),S.jsx("span",{className:w.nodeLabel,children:k})]}),t&&t.length>0?t.filter(B=>B.visible!==!1).map((B,I)=>{const A=e.cells?.[B.name];return A?S.jsx("td",{className:w.cell,onClick:()=>{c?.(e,B.name)},style:{width:r[B.name],minWidth:r[B.name],height:`${n}px`},children:C({...A,id:B.name})},B.name+I):null}):e.cells&&Object.entries(e.cells).map(([B,I])=>{const A=e.cells?.[B];return A?S.jsx("td",{className:w.cell,style:{height:`${n}px`},children:C({...A,id:B})},B+I):null})]})},F=()=>f||!p||Ls(e)?null:S.jsx(S.Fragment,{children:e.children?.map((k,L)=>S.jsx(Wc,{row:k,level:i+1,columns:t,columnWidths:r,onNodeClick:()=>h?.(k),onContextMenu:u},`child-${L}`))});return S.jsxs(S.Fragment,{children:[N(),F()]})},ow={"smp-tree":"_smp-tree_19u9h_1"},lw=({fun:e,onOptionsRequest:t,onClick:r})=>{const[i,n]=j.useState(void 0);j.useEffect(()=>{!i&&t&&e&&t(e,void 0).then(o=>n(si(o))).catch(o=>{console.error("Errore nel caricamento delle opzioni per il Tree",o)})},[i,e,t]);const s={table:ow["smp-tree"]};return i&&i.length&&S.jsx("table",{className:s.table,children:S.jsx("tbody",{children:i.map((o,a)=>S.jsx(Wc,{row:o,onNodeClick:r},a))})})},fn={"smp-breadcrumbs":"_smp-breadcrumbs_uvzzx_1","smp-breadcrumb-item":"_smp-breadcrumb-item_uvzzx_6","smp-breadcrumb-link":"_smp-breadcrumb-link_uvzzx_12","smp-breadcrumb-ellipsis":"_smp-breadcrumb-ellipsis_uvzzx_26"},cw=({data:e,fun:t,onOptionsRequest:r,onClick:i,options:n})=>{const s=e?.children||n,[o,a]=j.useState(s),l=j.useRef(null),[c,h]=j.useState(!1),[u,f]=j.useState(0);j.useEffect(()=>{!o&&r&&t&&r(t,void 0).then(N=>a(si(N)||[])).catch(N=>{console.error("Errore nel caricamento delle opzioni per ButtonList",N)})},[o,t,r]);const{anchorRef:d,targetRef:p,anchorWidth:g}=Ke({position:"bottom",open:c}),y=j.useCallback(()=>{h(!1),l?.current?.focus()},[]);Gi([p],c,()=>y());const b={breadcrumbs:fn["smp-breadcrumbs"],breacrumbItem:fn["smp-breadcrumb-item"],link:fn["smp-breadcrumb-link"],lastElement:fn["smp-breadcrumb-current"],ellipsis:fn["smp-breadcrumb-ellipsis"]},x=N=>{N.key==="Escape"&&y()},w=N=>{i?.(N)},C=(N,F,k)=>{const L=N?.decode||N?.obj?.k;return S.jsxs("li",{className:b.breacrumbItem,"aria-current":k?"page":void 0,children:[(N?.icon||N?.placeholderIcon)&&S.jsx(Ot,{icon:N.icon||N.placeholderIcon||""}),N?.fun&&!k?S.jsx("a",{href:"/",onClick:O=>{O.preventDefault(),w?.(N)},className:b.link,children:S.jsx(Ae,{variant:"body",bindValue:L||""})}):S.jsx("div",{className:b.lastElement,children:S.jsx(Ae,{variant:"body",bindValue:L||"",toolbar:!0})})]},F)},v=o&&o.length>3,E=o&&o[0],T=o&&o[o.length-1],P=o&&o.slice(1,o.length-1);return S.jsx("nav",{"aria-label":"Breadcrumbs",children:S.jsxs("ol",{className:b.breadcrumbs,children:[C(E,0,!1),v&&S.jsxs("li",{ref:l,className:`${b.breacrumbItem} ${b.ellipsis}`,children:[S.jsx("div",{ref:d,"aria-label":"Show more breadcrumbs",children:S.jsx(Ot,{icon:"more_horizontal",isInteractable:!0,tabIndex:0,onClick:N=>{N.preventDefault(),h(F=>!F),f(0)}})}),c&&S.jsx(Xe,{children:S.jsx(Va,{options:P||[],onClick:w,ref:p,width:g,showFilter:!1,onKeyDown:x,isOpen:c,floating:!0,selectedIndex:u})})]}),!v&&P?.map((N,F)=>C(N,F+1,!1)),C(T,o&&o.length-1||0,!0)]})})},Vr=({id:e,decode:t,shape:r,obj:i,data:n,icon:s,fun:o,placeholderIcon:a,label:l,helper:c,tooltip:h,options:u,inputSettings:f,style:d,onChange:p,onClick:g,onEnter:y,onBlur:b,onOptionsRequest:x,onContextMenu:w,isEditable:C,dSep:v=".",value:E})=>{const T={obj:{...i,k:f?.forceUppercase?i.k.toLocaleUpperCase():i.k},shape:r,decode:t,icon:s,fun:o,data:n,style:d},P=()=>zd(T.obj)?"INR":wl(T.obj)?"CAL":r,N=T.data&&T.data.size&&T.data.size>=256&&(P()==="ITX"||!P())?"MEM":P(),F=t||E,k={id:e,onBlur:b,onOptionsRequest:x,fun:o,icon:s,placeholderIcon:a,tooltip:h,label:l,helper:c,isEditable:C,style:d,size:T.data&&T.data.size?T.data.size:20,isOptimized:T.data?.isOptimized,...n},L=($,R,_)=>wl(i)?Nr($,new oa(i,R).getLegacyValue()):J1(i)?Nr($,new fa(i,R).getLegacyValue()):f?.forceUppercase?Nr($,R.toLocaleUpperCase(),_):Nr($,R,_),O=($,R)=>Nr($,new Hn(i,R,v).getLegacyValue()),B=$=>Nr(T,new aa(i,$).getLegacyValue()),I=$=>Jv(T,$),A=()=>{switch(N){case St.AUTOCOMPLETE:{const $={...k,bindValue:T.obj.k,optionalDisplayValue:F,onChange:(R,_)=>{p?.(L(T,R,_))}};return S.jsx(Ic,{...$})}case St.BUTTON:{const $=n?.label&&typeof n.label=="string"?n.label:void 0,R={...k,bindValue:$||"",showText:!!$,onClick:()=>{g?.(L(T,i.k))}};return S.jsx(Qt,{...R})}case St.BUTTON_LIST:{const $={...k,options:u,onClick:(R,_)=>{const M={...T,fun:_};g?.(L(M,R))}};return S.jsx(Yd,{...$})}case St.BREADCRUMBS:{const $={...k,options:u,onClick:R=>{g?.(R)}};return S.jsx(cw,{...$})}case St.CHECKBOX:case St.SWITCH:{const $=r===St.SWITCH,R={...k,bindValue:aa.fromDataObj(i).getValue(),optionalDisplayValue:F,onChange:_=>{p?.(B(_))},...$&&{variant:"switch"}};return S.jsx(Xa,{...R})}case St.COMBOBOX:{const $={...k,bindValue:T.obj.k,optionalDisplayValue:F,onChange:(R,_)=>{p?.(L(T,R,_))}};return S.jsx(ua,{...$})}case St.DATE:{const $={...k,bindValue:oa.fromDataObj(i).getValue(),onChange:R=>{p?.(L(T,R))}};return S.jsx(jc,{...$})}case St.ICON:case St.IMAGE:{const $={...k,icon:s,isInteractable:!!k.fun,onClick:()=>{g?.(L(T,i.k))}};return S.jsx(Ot,{...$})}case St.INPUT_NUMBER:{const $={...k,bindValue:Hn.fromDataObj(i,v).getValue(),onChange:R=>{p?.(O(T,R))}};return S.jsx(Gd,{...$})}case St.EDITOR:case St.MEMO:{const $={...k,bindValue:i.k,optionalDisplayValue:F,onChange:R=>{p?.(L(T,R))}};return S.jsx(Xd,{...$})}case St.CHIP:case St.MULTI_AUTOCOMPLETE:{const $=r===St.CHIP,R={...k,elements:Qv(T),onChange:_=>{p?.(I(_))},...$&&!C&&{autocomplete:!1}};return S.jsx(Kv,{...R})}case St.MULTI_CONFIG:{const $={...k,bindValue:l||"",showText:!!l,icon:s??"list",onClick:()=>{g?.(L(T,i.k))}};return S.jsx(Qt,{...$})}case St.PASSWORD:{const $={...k,bindValue:T.obj.k,onChange:R=>{p?.(L(T,R))}};return S.jsx(Vd,{...$})}case St.RADIO:{const $={...k,bindValue:i.k,onChange:(R,_)=>{p?.(L(T,R,_))}};return S.jsx(tw,{...$})}case St.SPOTLIGHT:{const $={...k,bindValue:T.obj.k,onEnter:R=>{y?.(L(T,R))},onChange:(R,_)=>{p?.(L(T,R,_))}};return S.jsx(Zv,{...$})}case St.TEXT_FIELD:{const $={...k,bindValue:T.obj.k,optionalDisplayValue:F,onChange:R=>{p?.(L(T,R))}};return S.jsx(Ie,{...$})}case St.BUTTON_GROUP:{const $={...k,bindValue:i.k,onChange:(R,_)=>{p?.(L(T,R,_))}};return S.jsx(Kd,{...$})}case St.TIME:{const $={...k,bindValue:fa.fromDataObj(i).getValue(),onChange:R=>{p?.(L(T,R))}};return S.jsx(nw,{...$})}case St.TREE:{const $={...k,onClick:R=>{g?.(R)}};return S.jsx(lw,{...$})}default:{const $={...k,bindValue:T.obj.k,optionalDisplayValue:F};return S.jsx(Pc,{...$})}}},q={wrapper:`${aw["smp-cell-wrapper"]}`};return S.jsx("span",{className:q.wrapper,onContextMenu:$=>{w&&h&&($.preventDefault(),w(T,$.currentTarget))},children:A()})},hw=({data:e,onClick:t,onEnter:r,onContextMenu:i})=>{const[n,s]=j.useState(),o=j.useCallback(a=>{if(!a.rows?.length||!a.columns?.length)return{};const l=a.rows[0];return a.columns.filter(c=>c.visible).reduce((c,h)=>{const u=l.cells[h.name],f={...u,id:h.name,onChange:d=>{s(p=>p&&{...p,[h.name]:{...p[h.name],obj:{...p[h.name].obj,k:d.obj.k}}})},onClick:()=>{u.fun&&t&&t({...u})},onEnter:d=>{r&&r(d)},onContextMenu:(d,p)=>{i&&i(d,p)}};return{...c,[h.name]:f}},{})},[t,r,i]);return j.useEffect(()=>{e&&s(o(e))},[e,o]),!e?.rows?.length||!e.columns?.length?null:n&&S.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:S.jsx(sa,{layout:e.rows[0].layout,children:Object.values(n).map(a=>S.jsx(Vr,{...a}))})})},uw=({ColumnsNumber:e=1,data:t={},ForceText:r,TextColName:i,TextColor:n="var(--smp-dashList-color-base)",Fillspace:s,FontSize:o,Horizontal:a,ForceIcon:l,IconColName:c,IconColor:h="var(--smp-dashList-color-base)",NumberFormat:u,ForceUM:f,UmColName:d,UmColor:p="var(--smp-dashList-color-base)",ForceValue:g,ValueColName:y,ValueColor:b="var(--smp-dashList-color-base)",SelectLayout:x="1",onClick:w})=>{const C="N/A",v=t?.columns||[],E=t?.rows||[],T=E.length>0,P="--smp-dashList-color",N="smp-layout",F="descr",k="icon",L="um",O="value",B=o||"1em",I="18px",A="--smp-dashList-columns",q="--smp-dashList-fontSize",$={dash:(it="1")=>{const bt=_(it),tt=bt,pt=M(bt,F),Tt=M(bt,k),It=M(bt,L),Lt=M(bt,O);return{container:tt,descr:pt,icon:Tt,um:It,value:Lt}},dashList:`smp-dash-list ${Nt(s)?"smp-dash-list-fill-space":""}
|
|
50
|
+
${Nt(a)?"smp-dash-list-horizontal":""}`},{format:R}=br(),_=it=>`${N}-${it}`,M=(it,bt)=>`${it}__${bt}`,H=it=>`${P}-${it}`,z=it=>{const bt=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(bt.test(it)){const pt=it.match(bt)||[];if(pt?.length>3)return"rgb("+pt[1]+","+pt[2]+","+pt[3]+")"}return it},U=it=>{if(!u)return it;const[bt,tt]=Y(u).map(pe=>parseInt(pe||"0")),pt="0,0"+(tt?"."+"0".repeat(tt):""),Tt=R(it,pt,"it");if(!bt)return Tt;const[It,Lt]=Tt.split(",");return It+(Lt?`,${Lt}`:"")},Y=it=>it.includes(";")?it.split(";"):[it],K=it=>{const bt=pt=>{if(pt)return it?.cells[pt]?.obj.k},tt=pt=>{if(!(v.length<=pt))return it?.cells[v[pt].name]?.obj?.k};return{descr:r||bt(i)||tt(2)||"",icon:l||bt(c)||tt(3)||"",um:f||bt(d)||tt(1)||"",value:g||bt(y)||tt(0)||""}},Z=it=>{w?.(it)},Q=(it,bt)=>{(it.key==="Enter"||it.key===" ")&&(it.preventDefault(),it.stopPropagation(),Z(bt))},et=(it=>{const bt=$.dash(it);return{className:bt,descr:tt=>S.jsx("div",{className:bt.descr,children:tt},`${it}-${F}`),icon:tt=>S.jsx("div",{className:bt.icon,children:S.jsx(Ot,{color:h,height:I,icon:tt,width:I})},`${it}-${k}`),um:tt=>S.jsx("div",{className:bt.um,children:tt},`${it}-${L}`),value:tt=>S.jsx("div",{className:bt.value,children:tt},`${it}-${O}`)}})(x),wt=it=>{const{descr:bt,icon:tt,um:pt,value:Tt}=K(it),It={[H(F)]:z(n),[H(L)]:z(p),[H(O)]:z(b)},Lt=[],pe=U(Tt);switch(x){case"2":tt&&Lt.push(et.icon(tt)),Lt.push(et.descr(bt)),Lt.push(et.value(pt?pe+" "+pt:pe));break;default:case"1":Lt.push(et.descr(bt)),Lt.push(et.value(pt?pe+" "+pt:pe))}return S.jsx("div",{className:et.className.container,role:"button",style:It,tabIndex:0,onClick:()=>Z(it),onKeyDown:fi=>Q(fi,it),children:Lt},it.rowId)},G={[A]:String(e),[q]:B};return S.jsx("div",{className:$.dashList,style:G,children:T?E.map(it=>wt(it)):C})},Zd={"smp-table":"_smp-table_v715o_1"};function fw(e,t){const r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function dw(e,t){return e.map(r=>{const i=t.find(n=>n.column===r.bindValue);return{column:r.bindValue,visible:i?.visible??!0}})}function pw(e,t,r,i){const n=[];let s=0;return o(e,0,[]),{flatRows:n,offset:s};function o(u,f,d){if(f>=t.length){h(u);return}const p=t[f].column,g=a(u,p);for(const[y,b]of g){const x=[...d,y],w=l(x,f),C=i.has(w);n.push(c(y,w,f,C)),s+=r,C&&o(b,f+1,x)}}function a(u,f){const d=new Map;for(const p of u){const g=(p.cells[f]?.decode||p.cells[f]?.value)??"N/D";d.has(g)||d.set(g,[]),d.get(g).push(p)}return d}function l(u,f){return`group-${u.join("-")}-${f}`}function c(u,f,d,p){return{isGroup:!0,value:u,cells:{},id:f,level:d,isExpanded:p}}function h(u){for(const f of u)n.push(f),s+=r}}const gw=({columns:e,rows:t,containerRef:r,sizingMode:i})=>{const[n,s]=j.useState({}),o=3,a=7;return j.useEffect(()=>{if(!(!e||e.length===0)){if(i==="fixed"){const c=Object.fromEntries(e.map(h=>[h.name,120]));s(c)}else if(i==="fit-grid"){const l=r.current?.offsetWidth||800,c=e.filter(f=>f.visible!==!1),h=l/c.length,u=Object.fromEntries(c.map(f=>[f.name,h]));s(u)}else if(i==="fit-content"){const l={},c=[...t].sort(()=>.5-Math.random()).slice(0,100),h=t.slice(0,100).concat(c);for(const u of e){if(!u.visible)continue;const f=u.title?.length+o*2||0,d=Math.max(f,...h.map(p=>{const g=p.cells?.[u.name];return`${g?.decode??g?.value??""}`.length}));l[u.name]=d*a+24}s(l)}}},[e,t,r,i]),[n,s]};function mw(e,t){return e.map(r=>{const i=t?.[r.name],n=yw(r);return{obj:{t:"",p:"",k:r.name},decode:r.title,shape:void 0,type:i??n}})}function yw(e){return e.obj&&zd(e.obj)?"number":e.obj&&wl(e.obj)?"date":"string"}function tf(e,t){return e?typeof e=="object"&&"logic"in e&&"filters"in e?e:typeof e=="string"?bw(e,t):{logic:"and",filters:[]}:{logic:"and",filters:[]}}function bw(e,t){const r=e.split("|").map(n=>n.trim()).filter(Boolean),i=[];for(const n of r){const s=xw(n,t);s&&i.push(s)}return{logic:"and",filters:i}}function xw(e,t){if(!e.trim())return null;if(e.includes(";OR;")){const i=e.split(";OR;").map(l=>l.trim()).filter(Boolean);if(i.length===0)return null;const n=Vo(i[0],t);if(!n)return null;const s=n.field,o=n.columnsType,a=i.slice(1).map(l=>Vo(l,t,s?.obj?.k,o)).filter(l=>l!==null);return{logic:"or",filters:[n,...a]}}else{const i=Vo(e,t);return i?{logic:"and",filters:[i]}:null}}function Vo(e,t,r,i){const n=e.split(";").map(u=>u.trim());let s,o,a;if(n.length===3)[s,o,a]=n;else if(n.length===2&&r&&i)[o,a]=n,s=r;else return null;const l=t.find(u=>u?.obj?.k===s)??(r&&i?{obj:{t:"",p:"",k:r},decode:r,type:i,shape:void 0}:void 0);if(!l)throw new Error(`Campo '${s}' non trovato nei FieldOption.`);const c={...zs,obj:{t:"",p:"",k:o}},h=vw(a,l.type);return{field:l,columnsType:l.type,operator:c,value:h}}function vw(e,t){switch(t){case"number":return Number(e);case"date":return new Date(e);default:return e}}function ww(e,t){return!t||"filters"in t&&t.filters.length===0?e:e.filter(r=>Qd(t,r))}function Qd(e,t){if("filters"in e){const{logic:r,filters:i}=e;if(i.length===0)return!0;const n=i.map(s=>Qd(s,t));return r==="and"?n.every(Boolean):n.some(Boolean)}return Cw(e,t)}function Cw(e,t){const{field:r,operator:i,value:n,columnsType:s}=e,o=t.cells?.[r?.obj?.k],a=_w(o);if(a==null)return!1;switch(s){case"string":return Sw(a,i.obj.k,n);case"number":return kw(a,i.obj.k,n);case"date":return Tw(a,i.obj.k,n);default:return!1}}function _w(e){if(e==null||typeof e!="object")return e;if("value"in e)return e.value;if("decode"in e)return e.decode}function Sw(e,t,r){const i=String(e).toLowerCase(),n=String(r).toLowerCase();switch(t.toLowerCase()){case"contains":return i.includes(n);case"starts":return i.startsWith(n);case"eq":return i===n;case"neq":return i!==n;default:return!1}}function kw(e,t,r){const i=Number(e),n=Number(r);if(isNaN(i)||isNaN(n))return!1;switch(t.toLowerCase()){case"eq":return i===n;case"neq":return i!==n;case"gt":return i>n;case"lt":return i<n;case"gte":return i>=n;case"lte":return i<=n;default:return!1}}function Tw(e,t,r){const i=new Date(e),n=new Date(r);if(isNaN(i.getTime())||isNaN(n.getTime()))return!1;switch(t.toLowerCase()){case"eq":case"on":return i.toDateString()===n.toDateString();case"after":return i>n;case"before":return i<n;case"onorafter":return i>=n;case"onorbefore":return i<=n;default:return!1}}const Ew=(e,t)=>{const r=i=>i.filters.some(n=>"filters"in n?r(n):n.field?.obj?.k===e&&n.operator&&n.value!=="");return r(t)},Lw=e=>{const t=r=>r.filters.reduce((i,n)=>"filters"in n?i+t(n):i+1,0);return t(e)};function Aw(e,t){const r=j.useRef(null),i=j.useCallback(o=>{r.current=o},[]),n=j.useCallback(o=>{o.preventDefault(),o.dataTransfer.dropEffect="move"},[]),s=j.useCallback(o=>{const a=r.current;if(!a||a===o)return;const l=e.findIndex(f=>f.name===a),c=e.findIndex(f=>f.name===o);if(l===-1||c===-1)return;const h=[...e],[u]=h.splice(l,1);h.splice(c,0,u),t(h),r.current=null},[e,t]);return{handleDragStart:i,handleDragOver:n,handleDrop:s}}function Jd(e,t,r){const n=e.columns.find(o=>o.name===t)?.obj?.t,s=[...e.rows].sort((o,a)=>{const l=o.cells[t]?.obj?.k,c=a.cells[t]?.obj?.k;if(l==null&&c!=null)return r==="asc"?1:-1;if(l!=null&&c==null)return r==="asc"?-1:1;if(l==null&&c==null)return 0;switch(n){case"NR":{const h=Number(l),u=Number(c);return r==="asc"?h-u:u-h}case"DATE":{const h=new Date(l),u=new Date(c);return r==="asc"?h.getTime()-u.getTime():u.getTime()-h.getTime()}default:return r==="asc"?String(l).localeCompare(String(c)):String(c).localeCompare(String(l))}});return{...e,rows:s}}function $w(e){const[t,r]=j.useState(null),[i,n]=j.useState("asc");return{sortedRows:j.useMemo(()=>t?Jd({...e,rows:e.rows},t,i).rows:e.rows,[e,t,i]),sortBy:t,sortOrder:i,handleSort:a=>{r(l=>l===a?(n(c=>c==="asc"?"desc":"asc"),a):(n("asc"),a))}}}const Mw=({columns:e,columnWidths:t})=>S.jsx("tfoot",{children:S.jsx("tr",{children:e.map(r=>r.visible&&S.jsx("td",{className:Zd["smp-headerCell"],style:{width:t[r.name],minWidth:t[r.name],maxWidth:t[r.name]}},r.name))})}),Bw=({label:e,rowHeight:t=28,offsetTop:r=0,level:i=0,onClick:n,isExpanded:s})=>{const o={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return S.jsx("tr",{className:o.tr,style:{height:t,top:r,lineHeight:`${t}px`},onClick:n,children:S.jsxs("td",{className:o.td,style:{paddingLeft:10+i*20},children:[S.jsx(Ot,{icon:s?"arrow_drop_down":"arrow_drop_right",width:16}),S.jsx(Ae,{variant:"title",bindValue:e})]})})};function Ow(e){return e.split("|")}function Rw(e,t){return e.columns.map(r=>({...r,visible:t.includes(r.name)}))}const ki={"smp-filter-wrapper":"_smp-filter-wrapper_1dest_1","smp-filter-group":"_smp-filter-group_1dest_10","smp-filter-row":"_smp-filter-row_1dest_18","smp-filter-list":"_smp-filter-list_1dest_24","smp-filter-toolbar":"_smp-filter-toolbar_1dest_31","smp-filter-actionButtons":"_smp-filter-actionButtons_1dest_41"},Dw=({filter:e,onChange:t,onDelete:r,fieldOptions:i,hasCurrentColumn:n})=>{const{translate:s}=br(),o={string:[{obj:{t:"",p:"",k:"st"},shape:void 0,decode:s(ye.STRING_STARTS)},{obj:{t:"",p:"",k:"contains"},shape:void 0,decode:s(ye.STRING_CONTAINS)},{obj:{t:"",p:"",k:"eq"},shape:void 0,decode:s(ye.STRING_EQUALS)}],number:[{obj:{t:"",p:"",k:"eq"},shape:void 0,decode:s(ye.NUMBER_EQUALS)},{obj:{t:"",p:"",k:"gt"},shape:void 0,decode:s(ye.NUMBER_GREATER)},{obj:{t:"",p:"",k:"ge"},shape:void 0,decode:s(ye.NUMBER_GREATER_OR_EQUAL)},{obj:{t:"",p:"",k:"lt"},shape:void 0,decode:s(ye.NUMBER_LESS)},{obj:{t:"",p:"",k:"le"},shape:void 0,decode:s(ye.NUMBER_LESS_OR_EQUAL)}],date:[{obj:{t:"",p:"",k:"before"},shape:void 0,decode:s(ye.DATE_BEFORE)},{obj:{t:"",p:"",k:"after"},shape:void 0,decode:s(ye.DATE_AFTER)},{obj:{t:"",p:"",k:"on"},shape:void 0,decode:s(ye.DATE_ON)}]},a=f=>{const d=i.find(g=>g?.obj?.k===f);if(!d)return;const p=o[d.type]?.[0]||{obj:{t:"",p:"",k:""},decode:"",shape:void 0};t({...e,field:d,columnsType:d.type,operator:p,value:""})},l=f=>{const d=o[e.columnsType]?.find(p=>p.obj.k===f);d&&t({...e,operator:d})},c=f=>{t({...e,value:f})},h=()=>{switch(e.columnsType){case"string":return S.jsx(Ie,{bindValue:e.value,onChange:c});case"number":return S.jsx(Gd,{bindValue:e.value,onChange:c});case"date":return S.jsx(jc,{bindValue:e.value,onChange:c})}},u={row:`${ki["smp-filter-row"]}`};return S.jsxs("div",{className:u.row,children:[!n&&S.jsx(ua,{bindValue:e.field.obj.k,options:i.map(f=>({obj:{t:"",p:"",k:f?.obj?.k},decode:f.decode,shape:void 0})),onChange:a,listDisplayMode:Tn.BOTH,displayMode:Tn.CODE_ONLY,isEditable:!0}),S.jsx(ua,{bindValue:e.operator?.obj?.k,options:o[e.columnsType],onChange:l,listDisplayMode:Tn.BOTH,displayMode:Tn.CODE_ONLY,isEditable:!0},e.columnsType),h(),S.jsx(Qt,{bindValue:"",showText:!1,label:"Delete",onClick:r,appearance:"ghost",variant:"base",icon:"delete"})]})},tp=({group:e,onChange:t,onDelete:r,onClose:i,level:n=0,fieldOptions:s,hasSubGroups:o=!0,hasSubFilters:a=!0,currentColumnName:l,hasButtonGroup:c=!0})=>{const{translate:h}=br(),u=(b,x)=>{const w=[...e.filters];w[b]=x,t({...e,filters:w})},f=b=>{const x=[...e.filters];x.splice(b,1),t({...e,filters:x})},d=()=>{const b=s[0],x={...zs},w={field:b,columnsType:b?.type||"string",operator:x,value:""};t({...e,filters:[...e.filters,w]})},p=()=>{let b;if(l){const w=s.find(v=>v.obj.k===l),C={...zs};b={field:w||s[0]||"",columnsType:w?.type||s[0]?.type||"string",operator:C,value:""}}else{const w={...zs};b={field:s[0]||"",columnsType:s[0]?.type||"string",operator:w,value:""}}const x={logic:"and",filters:[b]};t({...e,filters:[...e.filters,x]})},g=b=>{t({...e,logic:b})},y={filterGroup:`${ki["smp-filter-group"]}`,filterToolbar:`${ki["smp-filter-toolbar"]}`,filterList:`${ki["smp-filter-list"]}`,actionButtons:`${ki["smp-filter-actionButtons"]}`};return S.jsxs("div",{className:y.filterGroup,style:n!=0?{marginLeft:20}:void 0,"data-component":n===0?"filter":void 0,children:[S.jsxs("div",{className:y.filterToolbar,children:[c&&S.jsx(Kd,{options:[{shape:void 0,decode:"AND",obj:{t:"",p:"",k:"and"}},{shape:void 0,decode:"OR",obj:{t:"",p:"",k:"or"}}],bindValue:e.logic,onChange:g}),S.jsxs("div",{className:y.actionButtons,children:[a&&S.jsx(Qt,{onClick:d,bindValue:h(ye.ADD_FILTER),icon:"plus",appearance:"outlined",variant:"base"}),o&&S.jsx(Qt,{onClick:p,bindValue:h(ye.ADD_SUB_GROUP),icon:"plus",appearance:"outlined",variant:"base"}),r&&S.jsx(Qt,{bindValue:"",showText:!1,label:"Delete",onClick:r,appearance:"outlined",variant:"base",icon:"delete"}),i&&S.jsx(Qt,{bindValue:h(ur.CLOSE),showText:!0,label:"Delete",onClick:i,icon:"close",appearance:"outlined",variant:"base"})]})]}),S.jsx("div",{className:y.filterList,children:e.filters.map((b,x)=>({filter:b,index:x})).filter(({filter:b})=>l?"logic"in b?b.filters.some(x=>"logic"in x?!1:x.field?.obj?.k===l):b.field?.obj?.k===l:!0).map(({filter:b,index:x})=>"logic"in b?S.jsx(tp,{group:b,onChange:w=>u(x,w),onDelete:()=>f(x),level:n+1,fieldOptions:s,hasSubGroups:!1,hasSubFilters:!0,currentColumnName:l,hasButtonGroup:!0},x):S.jsx(Dw,{filter:b,onChange:w=>u(x,w),onDelete:()=>f(x),fieldOptions:s,hasCurrentColumn:!!l},x))})]})},ef=({filters:e,onChange:t,fieldOptions:r,hasSubGroups:i,hasSubFilters:n,ref:s,currentColumnName:o,hasButtonGroup:a,onClose:l})=>{const c={filterWrapper:`${ki["smp-filter-wrapper"]}`};return S.jsx("div",{className:c.filterWrapper,ref:s,children:S.jsx(tp,{group:e,onChange:t,fieldOptions:r,hasSubFilters:n,hasSubGroups:i,currentColumnName:o,hasButtonGroup:a,onClose:l})})},Fw=({groups:e=[],isDraggable:t=!0,isEditable:r=!0,onChange:i,onDrop:n,onDragOver:s})=>{const o=e.map(a=>({bindValue:a.column}));return S.jsxs("th",{className:"smp-groupBar-container",onDragOver:s,onDrop:n,children:[S.jsx(Ot,{icon:"groups"}),S.jsx(zc,{elements:o,isEditable:r,isDraggable:t,displayMode:"CodeOnly",onChange:i})]})},Fr={"smp-headerCell":"_smp-headerCell_laepr_1","smp-headerCell-container":"_smp-headerCell-container_laepr_9","smp-headerCell-iconNotification":"_smp-headerCell-iconNotification_laepr_16","smp-resizer":"_smp-resizer_laepr_34","smp-datatable-toolbar":"_smp-datatable-toolbar_laepr_52","smp-datatable-filter":"_smp-datatable-filter_laepr_53"},Iw=({columns:e,columnWidths:t,groups:r,groupState:i,showGroupBar:n,showFilter:s,filterColumn:o,activeFilters:a,fieldOptions:l,Filter:c,enableSelection:h,allVisibleRowsSelected:u,sortBy:f,sortOrder:d,onToggleFilter:p,onToggleColumnFilter:g,onFiltersChange:y,onResetFilters:b,onGroupChange:x,onGroupDrop:w,onGroupDragOver:C,onMouseDown:v,onToggleAllRows:E,onSort:T,onDragStart:P,onDragOver:N,onDrop:F})=>{const k=j.useRef({}),{anchorRef:L,targetRef:O}=Ke({position:"bottom",open:s}),{anchorRef:B,targetRef:I}=Ke({position:"bottom",open:o!==null}),A=j.useCallback(R=>Ew(R,a),[a]),q=j.useMemo(()=>Lw(a),[a]),$={headerCell:`${Fr["smp-headerCell"]}`,headerCellContainer:`${Fr["smp-headerCell-container"]}`,resizer:`${Fr["smp-resizer"]}`,datatableToolbar:`${Fr["smp-datatable-toolbar"]} ${Fr["smp-headerCell-"]}`,datatableFilter:`${Fr["smp-datatable-filter"]}`};return S.jsxs("thead",{children:[S.jsxs("tr",{className:$.datatableToolbar,children:[S.jsx("th",{children:S.jsxs("div",{ref:L,className:$.datatableFilter,children:[S.jsx(Qt,{onClick:p,bindValue:`${q}`,label:s?"Nascondi filtri":"Mostra filtri",icon:"filter_list",variant:"base"}),(c||q>0)&&S.jsx(S.Fragment,{children:S.jsx(Qt,{onClick:b,bindValue:"Reset",icon:"cancel",appearance:"ghost",variant:"base",label:"Rimuovi tutti i filtri"})})]})}),(r||n)&&S.jsx(Fw,{groups:i,onChange:x,onDrop:w,onDragOver:C})]}),s&&S.jsx(Xe,{children:S.jsx(ef,{filters:a,fieldOptions:l,onChange:y,hasSubGroups:!0,ref:O,hasSubFilters:!1,onClose:p})}),S.jsxs("tr",{children:[h&&S.jsx("th",{className:$.headerCell,style:{minWidth:40,justifyContent:"center"},children:S.jsx(Xa,{bindValue:u,onChange:E})}),e&&e?.map(R=>R.visible&&S.jsx("th",{tabIndex:0,role:"columnheader",onClick:()=>T(R.name),onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),T(R.name))},onDragStart:()=>P(R.name),onDragOver:N,onDrop:()=>F(R.name),className:$.headerCell,style:{width:t[R.name],minWidth:t[R.name],maxWidth:t[R.name]},ref:_=>{k.current[R.name]=_,o===R.name&&_&&(typeof B=="function"?B(_):B&&"current"in B&&(B.current=_))},children:S.jsxs("div",{draggable:!0,onDragStart:_=>{_.dataTransfer.setData("text/plain",R.name)},className:$.headerCellContainer,children:[S.jsx(Ae,{variant:"title",bindValue:R.title}),S.jsxs("div",{children:[f===R.name?S.jsx(Ot,{icon:d==="asc"?"arrow-up":"arrow-down",isInteractable:!0}):S.jsx("span",{style:{minWidth:"0.875rem",minHeight:"0.875rem"}}),S.jsx("span",{className:`${A(R.name)?Fr["smp-headerCell-iconNotification"]:""}`,children:S.jsx(Ot,{icon:"filter_list",onClick:_=>{g(R.name),_.stopPropagation()},tabIndex:0,isInteractable:!0})})]}),o===R.name&&S.jsx(Xe,{children:S.jsx(ef,{filters:a,fieldOptions:l.filter(_=>_.obj.k===o),onChange:y,hasSubGroups:!0,ref:I,hasSubFilters:!1,currentColumnName:o,hasButtonGroup:!1,onClose:()=>g(R.name)})}),S.jsx("div",{className:$.resizer,onMouseDown:_=>{v(_,R.name)},role:"region"})]})},R.name))]})]})},Nw=({data:e,lineHeight:t=28,TableHeight:r=400,groups:i,columnSizingMode:n="fit-content",ShowGroup:s="Yes",Filter:o,MultiSelect:a="No",Columns:l,onRowClick:c,onMultiSelectionChange:h,onContextMenu:u})=>{const[f,d]=j.useState(()=>e?{columns:l?Rw(e,Ow(l)):e.columns,rows:e.rows??[]}:{columns:[],rows:[]}),[p,g]=j.useState(i||[]),[y,b]=j.useState(new Set),[x,w]=j.useState(!1),[C,v]=j.useState(new Set),[E,T]=j.useState(null),P=j.useMemo(()=>mw(e?.columns||[]),[e?.columns]),[N,F]=j.useState(()=>tf(o,P)),k=j.useRef(null),[L,O]=gw({columns:f?.columns??[],rows:f?.rows??[],containerRef:k,sizingMode:n}),{handleDragStart:B,handleDragOver:I,handleDrop:A}=Aw(f.columns,tt=>d(pt=>({...pt,columns:tt}))),q=j.useMemo(()=>{const tt=f.rows.map((pt,Tt)=>Tt);return tt.every(pt=>C.has(pt))&&tt.length>0},[C,f.rows]),{sortBy:$,sortOrder:R,handleSort:_}=$w({...f,rows:f.rows}),{virtualItems:M,containerProps:H,innerProps:z}=Nd({items:f?.rows??[],itemHeight:t,containerHeight:r,overscan:5});j.useEffect(()=>{if(Nt(a)&&h){const tt=Array.from(C).map(pt=>f.rows[pt]).filter(Boolean);h(tt)}},[C,a,f.rows,h]),j.useEffect(()=>{let tt=e?.rows??[];N?.filters?.length>0&&(tt=ww(tt,N));let pt=tt;$&&(pt=Jd({...e??{columns:[],rows:[]},rows:tt},$,R).rows);let Tt=pt;if(p?.length&&pt.length>0){const{flatRows:It}=pw(pt,p,t,y);Tt=It}d(It=>({...It,rows:Tt}))},[e,p,y,t,N,$,R]);const U=j.useCallback(tt=>{F(tt)},[]),Y=j.useCallback(()=>{F(tf(o,P))},[o,P]),K=j.useCallback(()=>{w(tt=>!tt)},[]),Z=j.useCallback(tt=>{T(pt=>pt===tt?null:tt)},[]),Q=tt=>{g(dw(tt,p))},ct=tt=>{tt.preventDefault();const pt=tt.dataTransfer.getData("text/plain");if(!pt||p.some(Lt=>Lt.column===pt))return;const It=[...p,{column:pt,visible:!0}];g(It)},et=tt=>{tt.preventDefault()},wt=(tt,pt)=>{const Tt=tt.clientX,It=L[pt],Lt=fi=>{const $o=fi.clientX-Tt,sn=Math.max(50,It+$o);O(Dr=>({...Dr,[pt]:sn}))},pe=()=>{window.removeEventListener("mousemove",Lt),window.removeEventListener("mouseup",pe)};window.addEventListener("mousemove",Lt),window.addEventListener("mouseup",pe)},G=tt=>{v(pt=>{const Tt=new Set(pt);return tt.every(Lt=>Tt.has(Lt))?tt.forEach(Lt=>Tt.delete(Lt)):tt.forEach(Lt=>Tt.add(Lt)),Tt})},it=()=>{const tt=f.rows.map((pt,Tt)=>Tt);G(tt)},bt={smpTable:`${Zd["smp-table"]}`};return f&&S.jsx("div",{className:bt.smpTable,...H,ref:k,children:S.jsxs("table",{children:[S.jsx(Iw,{columns:f.columns,columnWidths:L,groups:i,groupState:p,showGroupBar:Nt(s),showFilter:x,filterColumn:E,activeFilters:N,fieldOptions:P,Filter:o,enableSelection:Nt(a),allVisibleRowsSelected:q,sortBy:$,sortOrder:R,onToggleFilter:K,onToggleColumnFilter:Z,onFiltersChange:U,onResetFilters:Y,onGroupChange:Q,onGroupDrop:ct,onGroupDragOver:et,onMouseDown:wt,onToggleAllRows:it,onSort:_,onDragStart:B,onDragOver:I,onDrop:A}),S.jsx("tbody",{...z,children:M.map(({item:tt,index:pt,offsetTop:Tt})=>{const It=tt.id||tt.value||`${tt.isGroup?"group":"row"}-${pt}`;return tt.isGroup?S.jsx(Bw,{label:tt.value||"",rowHeight:t,offsetTop:Tt,level:tt.level,onClick:()=>{const Lt=tt.id;Lt&&b(pe=>fw(pe,Lt))},isExpanded:tt.isExpanded},`group-${It}`):S.jsx(Wc,{row:tt,columns:f.columns,columnWidths:L,rowHeight:t,offsetTop:Tt,isGroup:!1,enableSelection:Nt(a),isSelected:C.has(pt),onToggleSelect:()=>{G([pt])},onRowClick:c,onContextMenu:u},`row-${It}`)})}),S.jsx(Mw,{columns:f.columns,columnWidths:L})]})})},Pw=({data:e,logo:t,open:r,minifiedOnClose:i=!0,customHeight:n="100vh",onClick:s,onEnter:o,onClose:a,loadOptions:l,onContextMenu:c})=>{const[h,u]=j.useState(),[f,d]=j.useState(r??!0),p=j.useRef(null),g=n.trim()?n:"100vh",y=j.useCallback(C=>{if(!C?.rows?.length||!C?.columns?.length)return{};const v=C.rows[0];return C.columns.filter(E=>E.visible??!0).reduce((E,T)=>{const P=v.cells[T.name];if(!P||!f&&Nt(i)&&P.shape!==St.BUTTON&&P.shape!==St.BUTTON_LIST)return E;const N={...P,id:T.name,onOptionsRequest:l,onChange:F=>{u(k=>{const L={...k};return L?.[T.name]&&(L[T.name].obj.k=F.obj.k),L})},onClick:F=>{F.fun&&s&&s(F)},onEnter:F=>{o&&o(F)},onContextMenu:(F,k)=>{c&&c(F,k)}};return!f&&Nt(i)&&(N.data={...N.data,showText:!1,justify:"center",squared:!0}),{...E,[T.name]:N}},{})},[f,i,s,o,l,c]),b=j.useCallback(()=>{a?.()},[a]),x=()=>{Nt(i)?d(C=>!C):(d(!1),a?.())};if(j.useEffect(()=>{u(y(e))},[e]),j.useEffect(()=>{if(!p.current)return;if(!Nt(i)){u(y(e));return}const C=getComputedStyle(p.current).getPropertyValue("--smp-drawer-slide-transition");let v=Number(C);C.endsWith("ms")?v=parseFloat(C):C.endsWith("s")&&(v=parseFloat(C)*1e3),setTimeout(()=>{u(y(e))},v/2)},[f,i]),j.useEffect(()=>{r!==void 0&&!Nt(i)&&d(r)},[i,r]),!e?.rows?.length||!e.columns?.length)return null;const w={drawer:`smp-drawer ${Nt(i)?"smp-drawer-minified":"smp-drawer-fixed"} ${f?"smp-drawer-open":""} ${!Nt(i)&&!f?"smp-drawer-no-border":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${f?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${f?"smp-drawer-backdrop-open":""}`};return h&&S.jsxs(S.Fragment,{children:[!Nt(i)&&S.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:w.backdrop,onClick:b}),S.jsx("aside",{ref:p,className:w.drawer,style:{height:g},"aria-label":"Drawer","smp-id":"drawer",children:S.jsxs("div",{className:w.container,children:[S.jsxs("div",{className:w.containerHeader,children:[t&&S.jsx("div",{className:w.containerLogo,children:S.jsx(Ot,{icon:t,title:"drawer_logo",width:"100%",height:24})}),S.jsx("div",{className:w.containerIcon,children:S.jsx(Ot,{icon:Nt(i)?"menu_close":"close",title:"drawer_icon",rotated:!f,isInteractable:!0,onClick:x,width:20,height:20})})]}),S.jsx("div",{className:w.containerLayout,children:S.jsx(sa,{layout:e.rows[0].layout,children:Object.values(h).map(C=>S.jsx(Vr,{...C}))})})]})})]})},jw=({data:e,Type:t,ShowSubmit:r=!1,SubmitPosition:i="Right",DefaultValue:n,Label:s,LabelPosition:o="Left",Helper:a,onBlur:l,onClick:c,onOptionsRequest:h})=>{const[u,f]=j.useState();j.useEffect(()=>{f(()=>{if(!e)return;const y={...e};return t&&(y.shape=t),y.shape==null&&(y.shape=St.TEXT_FIELD),n&&(y.obj=tv(n)),y})},[e,n,t]);const p={container:`smp-field-container ${Nt(r)?`smp-field-position-${i}`:""}`},g=()=>{Nt(r)||l?.(u)};if(u)return S.jsxs("div",{className:p.container,children:[S.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:S.jsx(Vr,{...u,id:"FLD",onChange:f,onOptionsRequest:h,fun:e?.fun,onBlur:g,label:s,labelPosition:o,helper:a})}),Nt(r)&&S.jsx(Qt,{optionalDisplayValue:"Confirm",onClick:()=>c?.(u),bindValue:"Confirm"})]})},El="command-submit",Go=(e,t)=>({before:e,after:{type:"SmeupDataTable",columns:JSON.parse(JSON.stringify(e.columns)),rows:[{cells:JSON.parse(JSON.stringify(t)),id:"1"}]}}),rf=(e,t,r)=>{if(!e.rows?.length||!e.columns?.length)return{};const i=e.rows?.[0];return e.columns.filter(n=>n.visible??!0).reduce((n,s)=>{const o={...i.cells[s.name],id:s.name,label:s.title,dSep:t,helper:s.helper,data:{...i.cells[s.name].data,dSep:t}};return o.isEditable==null&&(o.isEditable=!0),r&&(o.isEditable=!1),o.isEditable&&o.shape==null&&(o.shape=St.TEXT_FIELD),{...n,[s.name]:o}},{})},zw={"smp-form":"_smp-form_9ox03_1"},Ww=({data:e,id:t,readOnly:r=!1,hiddenSubmitButton:i=!1,updateOnClick:n=!1,decimalSeparator:s=".",autoFocus:o,autoSkip:a,optionsHandler:l,onSubmit:c,onCheck:h,onCheckObj:u,onContextMenu:f,onButtonClick:d})=>{const p=j.useRef(!1),g=j.useRef([]),[y,b]=j.useState(()=>rf(e,s,r)),{translate:x}=br(),w=j.useId(),C=j.useRef(null);j.useEffect(()=>{const k=C.current;if(!k)return;const L=O=>{E(O.detail.id)};return k.addEventListener(El,L),()=>{k.removeEventListener(El,L)}},[]),j.useEffect(()=>{p.current?b(rf(e,s,r)):(p.current=!0,C.current&&C.current.querySelectorAll('[type="text"]').forEach(L=>{L instanceof HTMLInputElement&&g.current.push(L)}))},[e]),j.useEffect(()=>{o&&C.current&&g.current.length>0&&g.current[0].focus()},[o]);const v=(k,L)=>{if(b(O=>({...O,[k]:{...O[k],obj:{...O[k].obj,k:L.obj.k},decode:L.decode,data:{...O[k].data,error:void 0},value:L.obj.k}})),n&&(L.shape==St.CHECKBOX||L.shape==St.SWITCH)){const O=structuredClone(y);O[k].obj.k=L.obj.k,O[k].value=L.obj.k,c({value:Go(e,O),cell:k})}if(a&&L.data?.maxLength&&L.data.maxLength<=L.obj.k.length){const O=g.current.findIndex(B=>B.name==k);O<g.current.length-1&&g.current[O+1].focus()}},E=k=>{const L=Go(e,y);c({value:L,cell:k})},T=(k,L)=>{d?.({cellId:k,currentState:{type:"SmeupDataTable",columns:e.columns,rows:[{cells:y,id:"1"}]},fun:L||""})},P=async k=>{if(y[k].obj.k!=e.rows[0].cells[k].obj.k&&(y[k].inputSettings?.checkObject&&u&&((await u({obj:y[k].obj,fun:y[k].fun,cellId:k})).valid||b(O=>({...O,[k]:{...O[k],data:{...O[k].data,error:x(ur.CHECK_OBJECT_WRONG_VALIDATION)}}}))),y[k].inputSettings?.checkValueOnExit)){const L=Go(e,y);h?.({value:L,cell:k})}},N=e.setup?.commands?.map((k,L)=>j.createElement(Vr,{...k,decode:k.value,data:{label:k.value},id:`command-${L}`,key:`command-${L}`,shape:St.BUTTON,onClick:()=>E(k.obj.k)}))||[];i||N.unshift(S.jsx(Vr,{decode:x(ur.CONFIRM_BUTTON),shape:St.BUTTON,id:"",obj:{t:"",p:"",k:""},data:{submit:!0,label:x(ur.CONFIRM_BUTTON),title:x(ur.CONFIRM_BUTTON)}},"submit-command"));const F={smpForm:`${zw["smp-form"]}`};return y&&S.jsxs("form",{"data-component":"input-panel",className:F.smpForm,id:t||w,onSubmit:k=>{k.preventDefault(),E()},ref:C,role:"form",children:[e.rows?.length>0&&S.jsx(sa,{layout:e.rows[0].layout,children:Object.values(y).map(k=>S.jsx(Vr,{...k,onOptionsRequest:k.fun?async(L,O)=>await l(L,O,e,k.id):void 0,onChange:L=>v(k.id,L),onBlur:()=>P(k.id),onContextMenu:f,onClick:()=>{(k.shape=="BTN"||k.shape=="CFM")&&T(k.id,k.fun)},data:{...k.data,autocomplete:"off"}}))}),N.length>0&&S.jsx(sa,{layout:{sections:[{id:"1",horizontal:!0,justify:"start",content:N.map(k=>({id:k.props.id}))}]},children:N})]})};var Ll={name:"mermaid",version:"11.11.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.28.9","typedoc-plugin-markdown":"^4.8.0",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Ws={exports:{}},qw=Ws.exports,nf;function Hw(){return nf||(nf=1,function(e,t){(function(r,i){e.exports=i()})(qw,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",p="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,x={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(B){var I=["th","st","nd","rd"],A=B%100;return"["+B+(I[(A-20)%10]||I[A]||I[0])+"]"}},w=function(B,I,A){var q=String(B);return!q||q.length>=I?B:""+Array(I+1-q.length).join(A)+B},C={s:w,z:function(B){var I=-B.utcOffset(),A=Math.abs(I),q=Math.floor(A/60),$=A%60;return(I<=0?"+":"-")+w(q,2,"0")+":"+w($,2,"0")},m:function B(I,A){if(I.date()<A.date())return-B(A,I);var q=12*(A.year()-I.year())+(A.month()-I.month()),$=I.clone().add(q,u),R=A-$<0,_=I.clone().add(q+(R?-1:1),u);return+(-(q+(A-$)/(R?$-_:_-$))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:u,y:d,w:h,d:c,D:p,h:l,m:a,s:o,ms:s,Q:f}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},v="en",E={};E[v]=x;var T="$isDayjsObject",P=function(B){return B instanceof L||!(!B||!B[T])},N=function B(I,A,q){var $;if(!I)return v;if(typeof I=="string"){var R=I.toLowerCase();E[R]&&($=R),A&&(E[R]=A,$=R);var _=I.split("-");if(!$&&_.length>1)return B(_[0])}else{var M=I.name;E[M]=I,$=M}return!q&&$&&(v=$),$||!q&&v},F=function(B,I){if(P(B))return B.clone();var A=typeof I=="object"?I:{};return A.date=B,A.args=arguments,new L(A)},k=C;k.l=N,k.i=P,k.w=function(B,I){return F(B,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var L=function(){function B(A){this.$L=N(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[T]=!0}var I=B.prototype;return I.parse=function(A){this.$d=function(q){var $=q.date,R=q.utc;if($===null)return new Date(NaN);if(k.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var _=$.match(y);if(_){var M=_[2]-1||0,H=(_[7]||"0").substring(0,3);return R?new Date(Date.UTC(_[1],M,_[3]||1,_[4]||0,_[5]||0,_[6]||0,H)):new Date(_[1],M,_[3]||1,_[4]||0,_[5]||0,_[6]||0,H)}}return new Date($)}(A),this.init()},I.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},I.$utils=function(){return k},I.isValid=function(){return this.$d.toString()!==g},I.isSame=function(A,q){var $=F(A);return this.startOf(q)<=$&&$<=this.endOf(q)},I.isAfter=function(A,q){return F(A)<this.startOf(q)},I.isBefore=function(A,q){return this.endOf(q)<F(A)},I.$g=function(A,q,$){return k.u(A)?this[q]:this.set($,A)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(A,q){var $=this,R=!!k.u(q)||q,_=k.p(A),M=function(ct,et){var wt=k.w($.$u?Date.UTC($.$y,et,ct):new Date($.$y,et,ct),$);return R?wt:wt.endOf(c)},H=function(ct,et){return k.w($.toDate()[ct].apply($.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(et)),$)},z=this.$W,U=this.$M,Y=this.$D,K="set"+(this.$u?"UTC":"");switch(_){case d:return R?M(1,0):M(31,11);case u:return R?M(1,U):M(0,U+1);case h:var Z=this.$locale().weekStart||0,Q=(z<Z?z+7:z)-Z;return M(R?Y-Q:Y+(6-Q),U);case c:case p:return H(K+"Hours",0);case l:return H(K+"Minutes",1);case a:return H(K+"Seconds",2);case o:return H(K+"Milliseconds",3);default:return this.clone()}},I.endOf=function(A){return this.startOf(A,!1)},I.$set=function(A,q){var $,R=k.p(A),_="set"+(this.$u?"UTC":""),M=($={},$[c]=_+"Date",$[p]=_+"Date",$[u]=_+"Month",$[d]=_+"FullYear",$[l]=_+"Hours",$[a]=_+"Minutes",$[o]=_+"Seconds",$[s]=_+"Milliseconds",$)[R],H=R===c?this.$D+(q-this.$W):q;if(R===u||R===d){var z=this.clone().set(p,1);z.$d[M](H),z.init(),this.$d=z.set(p,Math.min(this.$D,z.daysInMonth())).$d}else M&&this.$d[M](H);return this.init(),this},I.set=function(A,q){return this.clone().$set(A,q)},I.get=function(A){return this[k.p(A)]()},I.add=function(A,q){var $,R=this;A=Number(A);var _=k.p(q),M=function(U){var Y=F(R);return k.w(Y.date(Y.date()+Math.round(U*A)),R)};if(_===u)return this.set(u,this.$M+A);if(_===d)return this.set(d,this.$y+A);if(_===c)return M(1);if(_===h)return M(7);var H=($={},$[a]=i,$[l]=n,$[o]=r,$)[_]||1,z=this.$d.getTime()+A*H;return k.w(z,this)},I.subtract=function(A,q){return this.add(-1*A,q)},I.format=function(A){var q=this,$=this.$locale();if(!this.isValid())return $.invalidDate||g;var R=A||"YYYY-MM-DDTHH:mm:ssZ",_=k.z(this),M=this.$H,H=this.$m,z=this.$M,U=$.weekdays,Y=$.months,K=$.meridiem,Z=function(et,wt,G,it){return et&&(et[wt]||et(q,R))||G[wt].slice(0,it)},Q=function(et){return k.s(M%12||12,et,"0")},ct=K||function(et,wt,G){var it=et<12?"AM":"PM";return G?it.toLowerCase():it};return R.replace(b,function(et,wt){return wt||function(G){switch(G){case"YY":return String(q.$y).slice(-2);case"YYYY":return k.s(q.$y,4,"0");case"M":return z+1;case"MM":return k.s(z+1,2,"0");case"MMM":return Z($.monthsShort,z,Y,3);case"MMMM":return Z(Y,z);case"D":return q.$D;case"DD":return k.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return Z($.weekdaysMin,q.$W,U,2);case"ddd":return Z($.weekdaysShort,q.$W,U,3);case"dddd":return U[q.$W];case"H":return String(M);case"HH":return k.s(M,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return ct(M,H,!0);case"A":return ct(M,H,!1);case"m":return String(H);case"mm":return k.s(H,2,"0");case"s":return String(q.$s);case"ss":return k.s(q.$s,2,"0");case"SSS":return k.s(q.$ms,3,"0");case"Z":return _}return null}(et)||_.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(A,q,$){var R,_=this,M=k.p(q),H=F(A),z=(H.utcOffset()-this.utcOffset())*i,U=this-H,Y=function(){return k.m(_,H)};switch(M){case d:R=Y()/12;break;case u:R=Y();break;case f:R=Y()/3;break;case h:R=(U-z)/6048e5;break;case c:R=(U-z)/864e5;break;case l:R=U/n;break;case a:R=U/i;break;case o:R=U/r;break;default:R=U}return $?R:k.a(R)},I.daysInMonth=function(){return this.endOf(u).$D},I.$locale=function(){return E[this.$L]},I.locale=function(A,q){if(!A)return this.$L;var $=this.clone(),R=N(A,q,!0);return R&&($.$L=R),$},I.clone=function(){return k.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},B}(),O=L.prototype;return F.prototype=O,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",d],["$D",p]].forEach(function(B){O[B[1]]=function(I){return this.$g(I,B[0],B[1])}}),F.extend=function(B,I){return B.$i||(B(I,L,F),B.$i=!0),F},F.locale=N,F.isDayjs=P,F.unix=function(B){return F(1e3*B)},F.en=E[v],F.Ls=E,F.p={},F})}(Ws)),Ws.exports}var Uw=Hw();const ep=Md(Uw);var rp=Object.defineProperty,m=(e,t)=>rp(e,"name",{value:t,configurable:!0}),ip=(e,t)=>{for(var r in t)rp(e,r,{get:t[r],enumerable:!0})},nr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},V={trace:m((...e)=>{},"trace"),debug:m((...e)=>{},"debug"),info:m((...e)=>{},"info"),warn:m((...e)=>{},"warn"),error:m((...e)=>{},"error"),fatal:m((...e)=>{},"fatal")},qc=m(function(e="fatal"){let t=nr.fatal;typeof e=="string"?e.toLowerCase()in nr&&(t=nr[e]):typeof e=="number"&&(t=e),V.trace=()=>{},V.debug=()=>{},V.info=()=>{},V.warn=()=>{},V.error=()=>{},V.fatal=()=>{},t<=nr.fatal&&(V.fatal=console.error?console.error.bind(console,Te("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Te("FATAL"))),t<=nr.error&&(V.error=console.error?console.error.bind(console,Te("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Te("ERROR"))),t<=nr.warn&&(V.warn=console.warn?console.warn.bind(console,Te("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Te("WARN"))),t<=nr.info&&(V.info=console.info?console.info.bind(console,Te("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Te("INFO"))),t<=nr.debug&&(V.debug=console.debug?console.debug.bind(console,Te("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Te("DEBUG"))),t<=nr.trace&&(V.trace=console.debug?console.debug.bind(console,Te("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Te("TRACE")))},"setLogLevel"),Te=m(e=>`%c${ep().format("ss.SSS")} : ${e} : `,"format");const qs={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 qs.hue2rgb(s,n,e+1/3)*255;case"g":return qs.hue2rgb(s,n,e)*255;case"b":return qs.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),o=(n+s)/2;if(i==="l")return o*100;if(n===s)return 0;const a=n-s,l=o>.5?a/(2-n-s):a/(n+s);if(i==="s")return l*100;switch(n){case e:return((t-r)/a+(t<r?6:0))*60;case t:return((r-e)/a+2)*60;case r:return((e-t)/a+4)*60;default:return-1}}},Yw={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},Vw={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},xt={channel:qs,lang:Yw,unit:Vw},Cr={};for(let e=0;e<=255;e++)Cr[e]=xt.unit.dec2hex(e);const re={ALL:0,RGB:1,HSL:2};class Gw{constructor(){this.type=re.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=re.ALL}is(t){return this.type===t}}class Xw{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Gw}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=re.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=xt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=xt.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=xt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=xt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=xt.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=xt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(re.HSL)&&r!==void 0?r:(this._ensureHSL(),xt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(re.HSL)&&r!==void 0?r:(this._ensureHSL(),xt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(re.HSL)&&r!==void 0?r:(this._ensureHSL(),xt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(re.RGB)&&r!==void 0?r:(this._ensureRGB(),xt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(re.RGB)&&r!==void 0?r:(this._ensureRGB(),xt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(re.RGB)&&r!==void 0?r:(this._ensureRGB(),xt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(re.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(re.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(re.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(re.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(re.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(re.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ka=new Xw({r:0,g:0,b:0,a:0},"transparent"),Ei={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ei.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,s=n%4===0,o=n>4,a=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return Ka.set({r:(i>>l*(c+3)&h)*a,g:(i>>l*(c+2)&h)*a,b:(i>>l*(c+1)&h)*a,a:s?(i&h)*a/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Cr[Math.round(t)]}${Cr[Math.round(r)]}${Cr[Math.round(i)]}${Cr[Math.round(n*255)]}`:`#${Cr[Math.round(t)]}${Cr[Math.round(r)]}${Cr[Math.round(i)]}`}},Wr={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(Wr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return xt.channel.clamp.h(parseFloat(r)*.9);case"rad":return xt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return xt.channel.clamp.h(parseFloat(r)*360)}}return xt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Wr.re);if(!r)return;const[,i,n,s,o,a]=r;return Ka.set({h:Wr._hue2deg(i),s:xt.channel.clamp.s(parseFloat(n)),l:xt.channel.clamp.l(parseFloat(s)),a:o?xt.channel.clamp.a(a?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${xt.lang.round(t)}, ${xt.lang.round(r)}%, ${xt.lang.round(i)}%, ${n})`:`hsl(${xt.lang.round(t)}, ${xt.lang.round(r)}%, ${xt.lang.round(i)}%)`}},Fn={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=Fn.colors[e];if(t)return Ei.parse(t)},stringify:e=>{const t=Ei.stringify(e);for(const r in Fn.colors)if(Fn.colors[r]===t)return r}},En={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(En.re);if(!r)return;const[,i,n,s,o,a,l,c,h]=r;return Ka.set({r:xt.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:xt.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:xt.channel.clamp.b(l?parseFloat(a)*2.55:parseFloat(a)),a:c?xt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${xt.lang.round(t)}, ${xt.lang.round(r)}, ${xt.lang.round(i)}, ${xt.lang.round(n)})`:`rgb(${xt.lang.round(t)}, ${xt.lang.round(r)}, ${xt.lang.round(i)})`}},Fe={format:{keyword:Fn,hex:Ei,rgb:En,rgba:En,hsl:Wr,hsla:Wr},parse:e=>{if(typeof e!="string")return e;const t=Ei.parse(e)||En.parse(e)||Wr.parse(e)||Fn.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(re.HSL)||e.data.r===void 0?Wr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?En.stringify(e):Ei.stringify(e)},np=(e,t)=>{const r=Fe.parse(e);for(const i in t)r[i]=xt.channel.clamp[i](t[i]);return Fe.stringify(r)},Li=(e,t,r=0,i=1)=>{if(typeof e!="number")return np(e,{a:t});const n=Ka.set({r:xt.channel.clamp.r(e),g:xt.channel.clamp.g(t),b:xt.channel.clamp.b(r),a:xt.channel.clamp.a(i)});return Fe.stringify(n)},Kw=e=>{const{r:t,g:r,b:i}=Fe.parse(e),n=.2126*xt.channel.toLinear(t)+.7152*xt.channel.toLinear(r)+.0722*xt.channel.toLinear(i);return xt.lang.round(n)},Zw=e=>Kw(e)>=.5,Xi=e=>!Zw(e),sp=(e,t,r)=>{const i=Fe.parse(e),n=i[t],s=xt.channel.clamp[t](n+r);return n!==s&&(i[t]=s),Fe.stringify(i)},nt=(e,t)=>sp(e,"l",t),ft=(e,t)=>sp(e,"l",-t),W=(e,t)=>{const r=Fe.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return np(e,i)},Qw=(e,t,r=50)=>{const{r:i,g:n,b:s,a:o}=Fe.parse(e),{r:a,g:l,b:c,a:h}=Fe.parse(t),u=r/100,f=u*2-1,d=o-h,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-g,b=i*g+a*y,x=n*g+l*y,w=s*g+c*y,C=o*u+h*(1-u);return Li(b,x,w,C)},J=(e,t=100)=>{const r=Fe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Qw(r,e,t)};/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:ap,setPrototypeOf:sf,isFrozen:Jw,getPrototypeOf:tC,getOwnPropertyDescriptor:eC}=Object;let{freeze:fe,seal:$e,create:op}=Object,{apply:Al,construct:$l}=typeof Reflect<"u"&&Reflect;fe||(fe=function(t){return t});$e||($e=function(t){return t});Al||(Al=function(t,r,i){return t.apply(r,i)});$l||($l=function(t,r){return new t(...r)});const As=de(Array.prototype.forEach),rC=de(Array.prototype.lastIndexOf),af=de(Array.prototype.pop),dn=de(Array.prototype.push),iC=de(Array.prototype.splice),Hs=de(String.prototype.toLowerCase),Xo=de(String.prototype.toString),of=de(String.prototype.match),pn=de(String.prototype.replace),nC=de(String.prototype.indexOf),sC=de(String.prototype.trim),Be=de(Object.prototype.hasOwnProperty),ae=de(RegExp.prototype.test),gn=aC(TypeError);function de(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 Al(e,t,i)}}function aC(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return $l(e,r)}}function Ct(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hs;sf&&sf(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const s=r(n);s!==n&&(Jw(t)||(t[i]=s),n=s)}e[n]=!0}return e}function oC(e){for(let t=0;t<e.length;t++)Be(e,t)||(e[t]=null);return e}function or(e){const t=op(null);for(const[r,i]of ap(e))Be(e,r)&&(Array.isArray(i)?t[r]=oC(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=or(i):t[r]=i);return t}function mn(e,t){for(;e!==null;){const i=eC(e,t);if(i){if(i.get)return de(i.get);if(typeof i.value=="function")return de(i.value)}e=tC(e)}function r(){return null}return r}const lf=fe(["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","section","select","shadow","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"]),Ko=fe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Zo=fe(["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"]),lC=fe(["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"]),Qo=fe(["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"]),cC=fe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cf=fe(["#text"]),hf=fe(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Jo=fe(["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","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"]),uf=fe(["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"]),$s=fe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hC=$e(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uC=$e(/<%[\w\W]*|[\w\W]*%>/gm),fC=$e(/\$\{[\w\W]*/gm),dC=$e(/^data-[\-\w.\u00B7-\uFFFF]+$/),pC=$e(/^aria-[\-\w]+$/),lp=$e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gC=$e(/^(?:\w+script|data):/i),mC=$e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cp=$e(/^html$/i),yC=$e(/^[a-z][.\w]*(-[.\w]+)+$/i);var ff=Object.freeze({__proto__:null,ARIA_ATTR:pC,ATTR_WHITESPACE:mC,CUSTOM_ELEMENT:yC,DATA_ATTR:dC,DOCTYPE_NAME:cp,ERB_EXPR:uC,IS_ALLOWED_URI:lp,IS_SCRIPT_OR_DATA:gC,MUSTACHE_EXPR:hC,TMPLIT_EXPR:fC});const yn={element:1,text:3,progressingInstruction:7,comment:8,document:9},bC=function(){return typeof window>"u"?null:window},xC=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(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},df=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hp(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bC();const t=dt=>hp(dt);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==yn.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,p=l.prototype,g=mn(p,"cloneNode"),y=mn(p,"remove"),b=mn(p,"nextSibling"),x=mn(p,"childNodes"),w=mn(p,"parentNode");if(typeof o=="function"){const dt=r.createElement("template");dt.content&&dt.content.ownerDocument&&(r=dt.content.ownerDocument)}let C,v="";const{implementation:E,createNodeIterator:T,createDocumentFragment:P,getElementsByTagName:N}=r,{importNode:F}=i;let k=df();t.isSupported=typeof ap=="function"&&typeof w=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:O,TMPLIT_EXPR:B,DATA_ATTR:I,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:R}=ff;let{IS_ALLOWED_URI:_}=ff,M=null;const H=Ct({},[...lf,...Ko,...Zo,...Qo,...cf]);let z=null;const U=Ct({},[...hf,...Jo,...uf,...$s]);let Y=Object.seal(op(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}})),K=null,Z=null,Q=!0,ct=!0,et=!1,wt=!0,G=!1,it=!0,bt=!1,tt=!1,pt=!1,Tt=!1,It=!1,Lt=!1,pe=!0,fi=!1;const $o="user-content-";let sn=!0,Dr=!1,di={},pi=null;const Zh=Ct({},["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 Qh=null;const Jh=Ct({},["audio","video","img","source","image","track"]);let Mo=null;const tu=Ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gs="http://www.w3.org/1998/Math/MathML",ms="http://www.w3.org/2000/svg",er="http://www.w3.org/1999/xhtml";let gi=er,Bo=!1,Oo=null;const s1=Ct({},[gs,ms,er],Xo);let ys=Ct({},["mi","mo","mn","ms","mtext"]),bs=Ct({},["annotation-xml"]);const a1=Ct({},["title","style","font","a","script"]);let an=null;const o1=["application/xhtml+xml","text/html"],l1="text/html";let Gt=null,mi=null;const c1=r.createElement("form"),eu=function(D){return D instanceof RegExp||D instanceof Function},Ro=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(mi&&mi===D)){if((!D||typeof D!="object")&&(D={}),D=or(D),an=o1.indexOf(D.PARSER_MEDIA_TYPE)===-1?l1:D.PARSER_MEDIA_TYPE,Gt=an==="application/xhtml+xml"?Xo:Hs,M=Be(D,"ALLOWED_TAGS")?Ct({},D.ALLOWED_TAGS,Gt):H,z=Be(D,"ALLOWED_ATTR")?Ct({},D.ALLOWED_ATTR,Gt):U,Oo=Be(D,"ALLOWED_NAMESPACES")?Ct({},D.ALLOWED_NAMESPACES,Xo):s1,Mo=Be(D,"ADD_URI_SAFE_ATTR")?Ct(or(tu),D.ADD_URI_SAFE_ATTR,Gt):tu,Qh=Be(D,"ADD_DATA_URI_TAGS")?Ct(or(Jh),D.ADD_DATA_URI_TAGS,Gt):Jh,pi=Be(D,"FORBID_CONTENTS")?Ct({},D.FORBID_CONTENTS,Gt):Zh,K=Be(D,"FORBID_TAGS")?Ct({},D.FORBID_TAGS,Gt):or({}),Z=Be(D,"FORBID_ATTR")?Ct({},D.FORBID_ATTR,Gt):or({}),di=Be(D,"USE_PROFILES")?D.USE_PROFILES:!1,Q=D.ALLOW_ARIA_ATTR!==!1,ct=D.ALLOW_DATA_ATTR!==!1,et=D.ALLOW_UNKNOWN_PROTOCOLS||!1,wt=D.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=D.SAFE_FOR_TEMPLATES||!1,it=D.SAFE_FOR_XML!==!1,bt=D.WHOLE_DOCUMENT||!1,Tt=D.RETURN_DOM||!1,It=D.RETURN_DOM_FRAGMENT||!1,Lt=D.RETURN_TRUSTED_TYPE||!1,pt=D.FORCE_BODY||!1,pe=D.SANITIZE_DOM!==!1,fi=D.SANITIZE_NAMED_PROPS||!1,sn=D.KEEP_CONTENT!==!1,Dr=D.IN_PLACE||!1,_=D.ALLOWED_URI_REGEXP||lp,gi=D.NAMESPACE||er,ys=D.MATHML_TEXT_INTEGRATION_POINTS||ys,bs=D.HTML_INTEGRATION_POINTS||bs,Y=D.CUSTOM_ELEMENT_HANDLING||{},D.CUSTOM_ELEMENT_HANDLING&&eu(D.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=D.CUSTOM_ELEMENT_HANDLING.tagNameCheck),D.CUSTOM_ELEMENT_HANDLING&&eu(D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),D.CUSTOM_ELEMENT_HANDLING&&typeof D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Y.allowCustomizedBuiltInElements=D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(ct=!1),It&&(Tt=!0),di&&(M=Ct({},cf),z=[],di.html===!0&&(Ct(M,lf),Ct(z,hf)),di.svg===!0&&(Ct(M,Ko),Ct(z,Jo),Ct(z,$s)),di.svgFilters===!0&&(Ct(M,Zo),Ct(z,Jo),Ct(z,$s)),di.mathMl===!0&&(Ct(M,Qo),Ct(z,uf),Ct(z,$s))),D.ADD_TAGS&&(M===H&&(M=or(M)),Ct(M,D.ADD_TAGS,Gt)),D.ADD_ATTR&&(z===U&&(z=or(z)),Ct(z,D.ADD_ATTR,Gt)),D.ADD_URI_SAFE_ATTR&&Ct(Mo,D.ADD_URI_SAFE_ATTR,Gt),D.FORBID_CONTENTS&&(pi===Zh&&(pi=or(pi)),Ct(pi,D.FORBID_CONTENTS,Gt)),sn&&(M["#text"]=!0),bt&&Ct(M,["html","head","body"]),M.table&&(Ct(M,["tbody"]),delete K.tbody),D.TRUSTED_TYPES_POLICY){if(typeof D.TRUSTED_TYPES_POLICY.createHTML!="function")throw gn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof D.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw gn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=D.TRUSTED_TYPES_POLICY,v=C.createHTML("")}else C===void 0&&(C=xC(d,n)),C!==null&&typeof v=="string"&&(v=C.createHTML(""));fe&&fe(D),mi=D}},ru=Ct({},[...Ko,...Zo,...lC]),iu=Ct({},[...Qo,...cC]),h1=function(D){let X=w(D);(!X||!X.tagName)&&(X={namespaceURI:gi,tagName:"template"});const ht=Hs(D.tagName),Dt=Hs(X.tagName);return Oo[D.namespaceURI]?D.namespaceURI===ms?X.namespaceURI===er?ht==="svg":X.namespaceURI===gs?ht==="svg"&&(Dt==="annotation-xml"||ys[Dt]):!!ru[ht]:D.namespaceURI===gs?X.namespaceURI===er?ht==="math":X.namespaceURI===ms?ht==="math"&&bs[Dt]:!!iu[ht]:D.namespaceURI===er?X.namespaceURI===ms&&!bs[Dt]||X.namespaceURI===gs&&!ys[Dt]?!1:!iu[ht]&&(a1[ht]||!ru[ht]):!!(an==="application/xhtml+xml"&&Oo[D.namespaceURI]):!1},Pe=function(D){dn(t.removed,{element:D});try{w(D).removeChild(D)}catch{y(D)}},yi=function(D,X){try{dn(t.removed,{attribute:X.getAttributeNode(D),from:X})}catch{dn(t.removed,{attribute:null,from:X})}if(X.removeAttribute(D),D==="is")if(Tt||It)try{Pe(X)}catch{}else try{X.setAttribute(D,"")}catch{}},nu=function(D){let X=null,ht=null;if(pt)D="<remove></remove>"+D;else{const Ht=of(D,/^[\r\n\t ]+/);ht=Ht&&Ht[0]}an==="application/xhtml+xml"&&gi===er&&(D='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+D+"</body></html>");const Dt=C?C.createHTML(D):D;if(gi===er)try{X=new f().parseFromString(Dt,an)}catch{}if(!X||!X.documentElement){X=E.createDocument(gi,"template",null);try{X.documentElement.innerHTML=Bo?v:Dt}catch{}}const te=X.body||X.documentElement;return D&&ht&&te.insertBefore(r.createTextNode(ht),te.childNodes[0]||null),gi===er?N.call(X,bt?"html":"body")[0]:bt?X.documentElement:te},su=function(D){return T.call(D.ownerDocument||D,D,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Do=function(D){return D instanceof u&&(typeof D.nodeName!="string"||typeof D.textContent!="string"||typeof D.removeChild!="function"||!(D.attributes instanceof h)||typeof D.removeAttribute!="function"||typeof D.setAttribute!="function"||typeof D.namespaceURI!="string"||typeof D.insertBefore!="function"||typeof D.hasChildNodes!="function")},au=function(D){return typeof a=="function"&&D instanceof a};function rr(dt,D,X){As(dt,ht=>{ht.call(t,D,X,mi)})}const ou=function(D){let X=null;if(rr(k.beforeSanitizeElements,D,null),Do(D))return Pe(D),!0;const ht=Gt(D.nodeName);if(rr(k.uponSanitizeElement,D,{tagName:ht,allowedTags:M}),it&&D.hasChildNodes()&&!au(D.firstElementChild)&&ae(/<[/\w!]/g,D.innerHTML)&&ae(/<[/\w!]/g,D.textContent)||D.nodeType===yn.progressingInstruction||it&&D.nodeType===yn.comment&&ae(/<[/\w]/g,D.data))return Pe(D),!0;if(!M[ht]||K[ht]){if(!K[ht]&&cu(ht)&&(Y.tagNameCheck instanceof RegExp&&ae(Y.tagNameCheck,ht)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(ht)))return!1;if(sn&&!pi[ht]){const Dt=w(D)||D.parentNode,te=x(D)||D.childNodes;if(te&&Dt){const Ht=te.length;for(let ge=Ht-1;ge>=0;--ge){const ir=g(te[ge],!0);ir.__removalCount=(D.__removalCount||0)+1,Dt.insertBefore(ir,b(D))}}}return Pe(D),!0}return D instanceof l&&!h1(D)||(ht==="noscript"||ht==="noembed"||ht==="noframes")&&ae(/<\/no(script|embed|frames)/i,D.innerHTML)?(Pe(D),!0):(G&&D.nodeType===yn.text&&(X=D.textContent,As([L,O,B],Dt=>{X=pn(X,Dt," ")}),D.textContent!==X&&(dn(t.removed,{element:D.cloneNode()}),D.textContent=X)),rr(k.afterSanitizeElements,D,null),!1)},lu=function(D,X,ht){if(pe&&(X==="id"||X==="name")&&(ht in r||ht in c1))return!1;if(!(ct&&!Z[X]&&ae(I,X))){if(!(Q&&ae(A,X))){if(!z[X]||Z[X]){if(!(cu(D)&&(Y.tagNameCheck instanceof RegExp&&ae(Y.tagNameCheck,D)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(D))&&(Y.attributeNameCheck instanceof RegExp&&ae(Y.attributeNameCheck,X)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(X))||X==="is"&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&ae(Y.tagNameCheck,ht)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(ht))))return!1}else if(!Mo[X]){if(!ae(_,pn(ht,$,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&D!=="script"&&nC(ht,"data:")===0&&Qh[D])){if(!(et&&!ae(q,pn(ht,$,"")))){if(ht)return!1}}}}}}return!0},cu=function(D){return D!=="annotation-xml"&&of(D,R)},hu=function(D){rr(k.beforeSanitizeAttributes,D,null);const{attributes:X}=D;if(!X||Do(D))return;const ht={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let Dt=X.length;for(;Dt--;){const te=X[Dt],{name:Ht,namespaceURI:ge,value:ir}=te,on=Gt(Ht),Fo=ir;let ee=Ht==="value"?Fo:sC(Fo);if(ht.attrName=on,ht.attrValue=ee,ht.keepAttr=!0,ht.forceKeepAttr=void 0,rr(k.uponSanitizeAttribute,D,ht),ee=ht.attrValue,fi&&(on==="id"||on==="name")&&(yi(Ht,D),ee=$o+ee),it&&ae(/((--!?|])>)|<\/(style|title)/i,ee)){yi(Ht,D);continue}if(ht.forceKeepAttr)continue;if(!ht.keepAttr){yi(Ht,D);continue}if(!wt&&ae(/\/>/i,ee)){yi(Ht,D);continue}G&&As([L,O,B],fu=>{ee=pn(ee,fu," ")});const uu=Gt(D.nodeName);if(!lu(uu,on,ee)){yi(Ht,D);continue}if(C&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!ge)switch(d.getAttributeType(uu,on)){case"TrustedHTML":{ee=C.createHTML(ee);break}case"TrustedScriptURL":{ee=C.createScriptURL(ee);break}}if(ee!==Fo)try{ge?D.setAttributeNS(ge,Ht,ee):D.setAttribute(Ht,ee),Do(D)?Pe(D):af(t.removed)}catch{yi(Ht,D)}}rr(k.afterSanitizeAttributes,D,null)},u1=function dt(D){let X=null;const ht=su(D);for(rr(k.beforeSanitizeShadowDOM,D,null);X=ht.nextNode();)rr(k.uponSanitizeShadowNode,X,null),ou(X),hu(X),X.content instanceof s&&dt(X.content);rr(k.afterSanitizeShadowDOM,D,null)};return t.sanitize=function(dt){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,ht=null,Dt=null,te=null;if(Bo=!dt,Bo&&(dt="<!-->"),typeof dt!="string"&&!au(dt))if(typeof dt.toString=="function"){if(dt=dt.toString(),typeof dt!="string")throw gn("dirty is not a string, aborting")}else throw gn("toString is not a function");if(!t.isSupported)return dt;if(tt||Ro(D),t.removed=[],typeof dt=="string"&&(Dr=!1),Dr){if(dt.nodeName){const ir=Gt(dt.nodeName);if(!M[ir]||K[ir])throw gn("root node is forbidden and cannot be sanitized in-place")}}else if(dt instanceof a)X=nu("<!---->"),ht=X.ownerDocument.importNode(dt,!0),ht.nodeType===yn.element&&ht.nodeName==="BODY"||ht.nodeName==="HTML"?X=ht:X.appendChild(ht);else{if(!Tt&&!G&&!bt&&dt.indexOf("<")===-1)return C&&Lt?C.createHTML(dt):dt;if(X=nu(dt),!X)return Tt?null:Lt?v:""}X&&pt&&Pe(X.firstChild);const Ht=su(Dr?dt:X);for(;Dt=Ht.nextNode();)ou(Dt),hu(Dt),Dt.content instanceof s&&u1(Dt.content);if(Dr)return dt;if(Tt){if(It)for(te=P.call(X.ownerDocument);X.firstChild;)te.appendChild(X.firstChild);else te=X;return(z.shadowroot||z.shadowrootmode)&&(te=F.call(i,te,!0)),te}let ge=bt?X.outerHTML:X.innerHTML;return bt&&M["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&ae(cp,X.ownerDocument.doctype.name)&&(ge="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
51
|
+
`+ge),G&&As([L,O,B],ir=>{ge=pn(ge,ir," ")}),C&&Lt?C.createHTML(ge):ge},t.setConfig=function(){let dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ro(dt),tt=!0},t.clearConfig=function(){mi=null,tt=!1},t.isValidAttribute=function(dt,D,X){mi||Ro({});const ht=Gt(dt),Dt=Gt(D);return lu(ht,Dt,X)},t.addHook=function(dt,D){typeof D=="function"&&dn(k[dt],D)},t.removeHook=function(dt,D){if(D!==void 0){const X=rC(k[dt],D);return X===-1?void 0:iC(k[dt],X,1)[0]}return af(k[dt])},t.removeHooks=function(dt){k[dt]=[]},t.removeAllHooks=function(){k=df()},t}var Pi=hp(),up=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,In=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vC=/\s*%%.*\n/gm,Mi,fp=(Mi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},m(Mi,"UnknownDiagramError"),Mi),Zr={},Hc=m(function(e,t){e=e.replace(up,"").replace(In,"").replace(vC,`
|
|
52
|
+
`);for(const[r,{detector:i}]of Object.entries(Zr))if(i(e,t))return r;throw new fp(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ml=m((...e)=>{for(const{id:t,detector:r,loader:i}of e)dp(t,r,i)},"registerLazyLoadedDiagrams"),dp=m((e,t,r)=>{Zr[e]&&V.warn(`Detector with key ${e} already exists. Overwriting.`),Zr[e]={detector:t,loader:r},V.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),wC=m(e=>Zr[e].loader,"getDiagramLoader"),Bl=m((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Bl(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"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Bl(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),zt=Bl,Za="#ffffff",Qa="#f2f2f2",le=m((e,t)=>t?W(e,{s:-40,l:10}):W(e,{s:-40,l:-10}),"mkBorder"),Bi,CC=(Bi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||W(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||W(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||le(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||le(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||le(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(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||nt(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ft(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10)):(this.rowOdd=this.rowOdd||nt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||nt(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||W(this.primaryColor,{h:30}),this.cScale4=this.cScale4||W(this.primaryColor,{h:60}),this.cScale5=this.cScale5||W(this.primaryColor,{h:90}),this.cScale6=this.cScale6||W(this.primaryColor,{h:120}),this.cScale7=this.cScale7||W(this.primaryColor,{h:150}),this.cScale8=this.cScale8||W(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||W(this.primaryColor,{h:270}),this.cScale10=this.cScale10||W(this.primaryColor,{h:300}),this.cScale11=this.cScale11||W(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=ft(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=ft(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||nt(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||ft(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||W(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||W(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||W(this.primaryColor,{h:64}),this.fillType3=this.fillType3||W(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||W(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||W(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||W(this.primaryColor,{h:128}),this.fillType7=this.fillType7||W(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||W(this.primaryColor,{l:-10}),this.pie5=this.pie5||W(this.secondaryColor,{l:-10}),this.pie6=this.pie6||W(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||W(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||W(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||W(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||W(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||W(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||W(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.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.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||W(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||W(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||W(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||W(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||W(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||W(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?nt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||W(this.primaryColor,{h:-30}),this.git4=this.git4||W(this.primaryColor,{h:-60}),this.git5=this.git5||W(this.primaryColor,{h:-90}),this.git6=this.git6||W(this.primaryColor,{h:60}),this.git7=this.git7||W(this.primaryColor,{h:120}),this.darkMode?(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.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}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]})}},m(Bi,"Theme"),Bi),_C=m(e=>{const t=new CC;return t.calculate(e),t},"getThemeVariables"),Oi,SC=(Oi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=nt(this.primaryColor,16),this.tertiaryColor=W(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=le(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=nt(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Li(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.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.sectionBkgColor=ft("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ft(this.sectionBkgColor,10),this.taskBorderColor=Li(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Li(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||nt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=nt(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=nt(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=nt(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=this.darkTextColor,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=W(this.primaryColor,{h:64}),this.fillType3=W(this.secondaryColor,{h:64}),this.fillType4=W(this.primaryColor,{h:-64}),this.fillType5=W(this.secondaryColor,{h:-64}),this.fillType6=W(this.primaryColor,{h:128}),this.fillType7=W(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||W(this.primaryColor,{h:30}),this.cScale4=this.cScale4||W(this.primaryColor,{h:60}),this.cScale5=this.cScale5||W(this.primaryColor,{h:90}),this.cScale6=this.cScale6||W(this.primaryColor,{h:120}),this.cScale7=this.cScale7||W(this.primaryColor,{h:150}),this.cScale8=this.cScale8||W(this.primaryColor,{h:210}),this.cScale9=this.cScale9||W(this.primaryColor,{h:270}),this.cScale10=this.cScale10||W(this.primaryColor,{h:300}),this.cScale11=this.cScale11||W(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||J(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||nt(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||W(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||W(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||W(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||W(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||W(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||W(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||W(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||W(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?nt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=nt(this.secondaryColor,20),this.git1=nt(this.pie2||this.secondaryColor,20),this.git2=nt(this.pie3||this.tertiaryColor,20),this.git3=nt(this.pie4||W(this.primaryColor,{h:-30}),20),this.git4=nt(this.pie5||W(this.primaryColor,{h:-60}),20),this.git5=nt(this.pie6||W(this.primaryColor,{h:-90}),10),this.git6=nt(this.pie7||W(this.primaryColor,{h:60}),10),this.git7=nt(this.pie8||W(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||nt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt(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]})}},m(Oi,"Theme"),Oi),kC=m(e=>{const t=new SC;return t.calculate(e),t},"getThemeVariables"),Ri,TC=(Ri=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=W(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=W(this.primaryColor,{h:-160}),this.primaryBorderColor=le(this.primaryColor,this.darkMode),this.secondaryBorderColor=le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=le(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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=Li(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||W(this.primaryColor,{h:30}),this.cScale4=this.cScale4||W(this.primaryColor,{h:60}),this.cScale5=this.cScale5||W(this.primaryColor,{h:90}),this.cScale6=this.cScale6||W(this.primaryColor,{h:120}),this.cScale7=this.cScale7||W(this.primaryColor,{h:150}),this.cScale8=this.cScale8||W(this.primaryColor,{h:210}),this.cScale9=this.cScale9||W(this.primaryColor,{h:270}),this.cScale10=this.cScale10||W(this.primaryColor,{h:300}),this.cScale11=this.cScale11||W(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=ft(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||ft(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||W(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||W(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||W(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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=nt(this.border1,23),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||nt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||nt(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=W(this.primaryColor,{h:64}),this.fillType3=W(this.secondaryColor,{h:64}),this.fillType4=W(this.primaryColor,{h:-64}),this.fillType5=W(this.secondaryColor,{h:-64}),this.fillType6=W(this.primaryColor,{h:128}),this.fillType7=W(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||W(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||W(this.primaryColor,{l:-10}),this.pie5=this.pie5||W(this.secondaryColor,{l:-30}),this.pie6=this.pie6||W(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||W(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||W(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||W(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||W(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||W(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||W(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||W(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||W(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||W(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||W(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||W(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||W(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?nt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||W(this.primaryColor,{h:-30}),this.git4=this.git4||W(this.primaryColor,{h:-60}),this.git5=this.git5||W(this.primaryColor,{h:-90}),this.git6=this.git6||W(this.primaryColor,{h:60}),this.git7=this.git7||W(this.primaryColor,{h:120}),this.darkMode?(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.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||ft(J(this.git0),25),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}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]})}},m(Ri,"Theme"),Ri),pp=m(e=>{const t=new TC;return t.calculate(e),t},"getThemeVariables"),Di,EC=(Di=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=nt("#cde498",10),this.primaryBorderColor=le(this.primaryColor,this.darkMode),this.secondaryBorderColor=le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=le(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.primaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.THEME_COLOR_LIMIT=12,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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=ft(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||W(this.primaryColor,{h:30}),this.cScale4=this.cScale4||W(this.primaryColor,{h:60}),this.cScale5=this.cScale5||W(this.primaryColor,{h:90}),this.cScale6=this.cScale6||W(this.primaryColor,{h:120}),this.cScale7=this.cScale7||W(this.primaryColor,{h:150}),this.cScale8=this.cScale8||W(this.primaryColor,{h:210}),this.cScale9=this.cScale9||W(this.primaryColor,{h:270}),this.cScale10=this.cScale10||W(this.primaryColor,{h:300}),this.cScale11=this.cScale11||W(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=ft(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||ft(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||W(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||W(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||W(this.mainBkg,{h:30,s:-30,l:-(8+t*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||nt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||nt(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=W(this.primaryColor,{h:64}),this.fillType3=W(this.secondaryColor,{h:64}),this.fillType4=W(this.primaryColor,{h:-64}),this.fillType5=W(this.secondaryColor,{h:-64}),this.fillType6=W(this.primaryColor,{h:128}),this.fillType7=W(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||W(this.primaryColor,{l:-30}),this.pie5=this.pie5||W(this.secondaryColor,{l:-30}),this.pie6=this.pie6||W(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||W(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||W(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||W(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||W(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||W(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||W(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||W(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||W(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||W(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||W(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||W(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||W(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?nt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||W(this.primaryColor,{h:-30}),this.git4=this.git4||W(this.primaryColor,{h:-60}),this.git5=this.git5||W(this.primaryColor,{h:-90}),this.git6=this.git6||W(this.primaryColor,{h:60}),this.git7=this.git7||W(this.primaryColor,{h:120}),this.darkMode?(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.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}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]})}},m(Di,"Theme"),Di),LC=m(e=>{const t=new EC;return t.calculate(e),t},"getThemeVariables"),Fi,AC=(Fi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=nt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=W(this.primaryColor,{h:-160}),this.primaryBorderColor=le(this.primaryColor,this.darkMode),this.secondaryBorderColor=le(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=le(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(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.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.rowOdd=this.rowOdd||nt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=nt(this.contrast,55),this.border2=this.contrast,this.actorBorder=nt(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||J(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||nt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||ft(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||W(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||W(this.mainBkg,{l:-(8+t*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=nt(this.contrast,30),this.sectionBkgColor2=nt(this.contrast,30),this.taskBorderColor=ft(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=nt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ft(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=W(this.primaryColor,{h:64}),this.fillType3=W(this.secondaryColor,{h:64}),this.fillType4=W(this.primaryColor,{h:-64}),this.fillType5=W(this.secondaryColor,{h:-64}),this.fillType6=W(this.primaryColor,{h:128}),this.fillType7=W(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||W(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||W(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||W(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||W(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||W(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||W(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?nt(this.quadrant1Fill):ft(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ft(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||W(this.primaryColor,{h:-30}),this.git4=this.pie5||W(this.primaryColor,{h:-60}),this.git5=this.pie6||W(this.primaryColor,{h:-90}),this.git6=this.pie7||W(this.primaryColor,{h:60}),this.git7=this.pie8||W(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Za,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qa}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]})}},m(Fi,"Theme"),Fi),$C=m(e=>{const t=new AC;return t.calculate(e),t},"getThemeVariables"),pr={base:{getThemeVariables:_C},dark:{getThemeVariables:kC},default:{getThemeVariables:pp},forest:{getThemeVariables:LC},neutral:{getThemeVariables:$C}},qe={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,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,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"},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},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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},gp={...qe,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:pr.default.getThemeVariables(),sequence:{...qe.sequence,messageFont:m(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:m(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:m(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...qe.gantt,tickInterval:void 0,useWidth:void 0},c4:{...qe.c4,useWidth:void 0,personFont:m(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...qe.flowchart,inheritDir:!1},external_personFont:m(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:m(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:m(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:m(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:m(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:m(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:m(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:m(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:m(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:m(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:m(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:m(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:m(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:m(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:m(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:m(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:m(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:m(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:m(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:m(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:m(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...qe.pie,useWidth:984},xyChart:{...qe.xyChart,useWidth:void 0},requirement:{...qe.requirement,useWidth:void 0},packet:{...qe.packet},radar:{...qe.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},mp=m((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...mp(e[i],"")]:[...r,t+i],[]),"keyify"),MC=new Set(mp(gp,"")),Uc=gp,da=m(e=>{if(V.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>da(t));return}for(const t of Object.keys(e)){if(V.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!MC.has(t)||e[t]==null){V.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){V.debug("sanitizing object",t),da(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(V.debug("sanitizing css option",t),e[t]=BC(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}V.debug("After sanitization",e)}},"sanitizeDirective"),BC=m(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"),ji=Object.freeze(Uc),be=zt({},ji),pa,Qr=[],Nn=zt({},ji),Ja=m((e,t)=>{let r=zt({},e),i={};for(const n of t)xp(n),i=zt(i,n);if(r=zt(r,i),i.theme&&i.theme in pr){const n=zt({},pa),s=zt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in pr&&(r.themeVariables=pr[r.theme].getThemeVariables(s))}return Nn=r,vp(Nn),Nn},"updateCurrentConfig"),OC=m(e=>(be=zt({},ji),be=zt(be,e),e.theme&&pr[e.theme]&&(be.themeVariables=pr[e.theme].getThemeVariables(e.themeVariables)),Ja(be,Qr),be),"setSiteConfig"),RC=m(e=>{pa=zt({},e)},"saveConfigFromInitialize"),DC=m(e=>(be=zt(be,e),Ja(be,Qr),be),"updateSiteConfig"),yp=m(()=>zt({},be),"getSiteConfig"),bp=m(e=>(vp(e),zt(Nn,e),Jt()),"setConfig"),Jt=m(()=>zt({},Nn),"getConfig"),xp=m(e=>{e&&(["secure",...be.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(V.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"&&xp(e[t])}))},"sanitize"),FC=m(e=>{da(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Qr.push(e),Ja(be,Qr)},"addDirective"),ga=m((e=be)=>{Qr=[],Ja(e,Qr)},"reset"),IC={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},pf={},NC=m(e=>{pf[e]||(V.warn(IC[e]),pf[e]=!0)},"issueWarning"),vp=m(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&NC("LAZY_LOAD_DEPRECATED")},"checkConfig"),PC=m(()=>{let e={};pa&&(e=zt(e,pa));for(const t of Qr)e=zt(e,t);return e},"getUserDefinedConfig"),Ki=/<br\s*\/?>/gi,jC=m(e=>e?_p(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),zC=(()=>{let e=!1;return()=>{e||(wp(),e=!0)}})();function wp(){const e="data-temp-href-target";Pi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Pi.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"))})}m(wp,"setupDompurifyHooks");var Cp=m(e=>(zC(),Pi.sanitize(e)),"removeScript"),gf=m((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Cp(e):r!=="loose"&&(e=_p(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=UC(e))}return e},"sanitizeMore"),Se=m((e,t)=>e&&(t.dompurifyConfig?e=Pi.sanitize(gf(e,t),t.dompurifyConfig).toString():e=Pi.sanitize(gf(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),WC=m((e,t)=>typeof e=="string"?Se(e,t):e.flat().map(r=>Se(r,t)),"sanitizeTextOrArray"),qC=m(e=>Ki.test(e),"hasBreaks"),HC=m(e=>e.split(Ki),"splitBreaks"),UC=m(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),_p=m(e=>e.replace(Ki,"#br#"),"breakToPlaceholder"),Yc=m(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),qt=m(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),YC=m(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),VC=m(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ol=m(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],o=t[i+1];GC(s,o)&&(n=s+","+o,i++,r.pop())}r.push(XC(n))}return r.join("")},"parseGenericTypes"),Rl=m((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),GC=m((e,t)=>{const r=Rl(e,"~"),i=Rl(t,"~");return r===1&&i===1},"shouldCombineSets"),XC=m(e=>{const t=Rl(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"),mf=m(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Dl=/\$\$(.*)\$\$/g,Jr=m(e=>(e.match(Dl)?.length??0)>0,"hasKatex"),KC=m(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await to(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),ZC=m(async(e,t)=>{if(!Jr(e))return e;if(!(mf()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Dl,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-C2g-EhzP.cjs")),i=t.forceLegacyMathML||!mf()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ki).map(n=>Jr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Dl,(n,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),to=m(async(e,t)=>Se(await ZC(e,t),t),"renderKatexSanitized"),ai={getRows:jC,sanitizeText:Se,sanitizeTextOrArray:WC,hasBreaks:qC,splitBreaks:HC,lineBreakRegex:Ki,removeScript:Cp,getUrl:Yc,evaluate:qt,getMax:YC,getMin:VC},QC=m(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),JC=m(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"),Vc=m(function(e,t,r,i){const n=JC(t,r,i);QC(e,n)},"configureSvgSize"),Sp=m(function(e,t,r,i){const n=t.node().getBBox(),s=n.width,o=n.height;V.info(`SVG bounds: ${s}x${o}`,n);let a=0,l=0;V.info(`Graph bounds: ${a}x${l}`,e),a=s+r*2,l=o+r*2,V.info(`Calculated bounds: ${a}x${l}`),Vc(t,l,a,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Us={},t_=m((e,t,r)=>{let i="";return e in Us&&Us[e]?i=Us[e](r):V.warn(`No theme found for ${e}`),` & {
|
|
53
|
+
font-family: ${r.fontFamily};
|
|
54
|
+
font-size: ${r.fontSize};
|
|
55
|
+
fill: ${r.textColor}
|
|
56
|
+
}
|
|
57
|
+
@keyframes edge-animation-frame {
|
|
58
|
+
from {
|
|
59
|
+
stroke-dashoffset: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
@keyframes dash {
|
|
63
|
+
to {
|
|
64
|
+
stroke-dashoffset: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
& .edge-animation-slow {
|
|
68
|
+
stroke-dasharray: 9,5 !important;
|
|
69
|
+
stroke-dashoffset: 900;
|
|
70
|
+
animation: dash 50s linear infinite;
|
|
71
|
+
stroke-linecap: round;
|
|
72
|
+
}
|
|
73
|
+
& .edge-animation-fast {
|
|
74
|
+
stroke-dasharray: 9,5 !important;
|
|
75
|
+
stroke-dashoffset: 900;
|
|
76
|
+
animation: dash 20s linear infinite;
|
|
77
|
+
stroke-linecap: round;
|
|
78
|
+
}
|
|
79
|
+
/* Classes common for multiple diagrams */
|
|
80
|
+
|
|
81
|
+
& .error-icon {
|
|
82
|
+
fill: ${r.errorBkgColor};
|
|
83
|
+
}
|
|
84
|
+
& .error-text {
|
|
85
|
+
fill: ${r.errorTextColor};
|
|
86
|
+
stroke: ${r.errorTextColor};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
& .edge-thickness-normal {
|
|
90
|
+
stroke-width: 1px;
|
|
91
|
+
}
|
|
92
|
+
& .edge-thickness-thick {
|
|
93
|
+
stroke-width: 3.5px
|
|
94
|
+
}
|
|
95
|
+
& .edge-pattern-solid {
|
|
96
|
+
stroke-dasharray: 0;
|
|
97
|
+
}
|
|
98
|
+
& .edge-thickness-invisible {
|
|
99
|
+
stroke-width: 0;
|
|
100
|
+
fill: none;
|
|
101
|
+
}
|
|
102
|
+
& .edge-pattern-dashed{
|
|
103
|
+
stroke-dasharray: 3;
|
|
104
|
+
}
|
|
105
|
+
.edge-pattern-dotted {
|
|
106
|
+
stroke-dasharray: 2;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
& .marker {
|
|
110
|
+
fill: ${r.lineColor};
|
|
111
|
+
stroke: ${r.lineColor};
|
|
112
|
+
}
|
|
113
|
+
& .marker.cross {
|
|
114
|
+
stroke: ${r.lineColor};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
& svg {
|
|
118
|
+
font-family: ${r.fontFamily};
|
|
119
|
+
font-size: ${r.fontSize};
|
|
120
|
+
}
|
|
121
|
+
& p {
|
|
122
|
+
margin: 0
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
${i}
|
|
126
|
+
|
|
127
|
+
${t}
|
|
128
|
+
`},"getStyles"),e_=m((e,t)=>{t!==void 0&&(Us[e]=t)},"addStylesForDiagram"),r_=t_,Gc={};ip(Gc,{clear:()=>kp,getAccDescription:()=>Ap,getAccTitle:()=>Ep,getDiagramTitle:()=>Mp,setAccDescription:()=>Lp,setAccTitle:()=>Tp,setDiagramTitle:()=>$p});var Xc="",Kc="",Zc="",Qc=m(e=>Se(e,Jt()),"sanitizeText"),kp=m(()=>{Xc="",Zc="",Kc=""},"clear"),Tp=m(e=>{Xc=Qc(e).replace(/^\s+/g,"")},"setAccTitle"),Ep=m(()=>Xc,"getAccTitle"),Lp=m(e=>{Zc=Qc(e).replace(/\n\s+/g,`
|
|
129
|
+
`)},"setAccDescription"),Ap=m(()=>Zc,"getAccDescription"),$p=m(e=>{Kc=Qc(e)},"setDiagramTitle"),Mp=m(()=>Kc,"getDiagramTitle"),yf=V,i_=qc,Et=Jt,n_=bp,s_=ji,Jc=m(e=>Se(e,Et()),"sanitizeText"),Bp=Sp,a_=m(()=>Gc,"getCommonDb"),ma={},ya=m((e,t,r)=>{ma[e]&&yf.warn(`Diagram with id ${e} already registered. Overwriting.`),ma[e]=t,r&&dp(e,r),e_(e,t.styles),t.injectUtils?.(yf,i_,Et,Jc,Bp,a_(),()=>{})},"registerDiagram"),Fl=m(e=>{if(e in ma)return ma[e];throw new o_(e)},"getDiagram"),Ii,o_=(Ii=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},m(Ii,"DiagramNotFoundError"),Ii),l_={value:()=>{}};function Op(){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 Ys(r)}function Ys(e){this._=e}function c_(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}})}Ys.prototype=Op.prototype={constructor:Ys,on:function(e,t){var r=this._,i=c_(e+"",r),n,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((n=(e=i[s]).type)&&(n=h_(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(n=(e=i[s]).type)r[n]=bf(r[n],e.name,t);else if(t==null)for(n in r)r[n]=bf(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 Ys(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 h_(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function bf(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=l_,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Il="http://www.w3.org/1999/xhtml";const xf={svg:"http://www.w3.org/2000/svg",xhtml:Il,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function eo(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),xf.hasOwnProperty(t)?{space:xf[t],local:e}:e}function u_(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Il&&t.documentElement.namespaceURI===Il?t.createElement(e):t.createElementNS(r,e)}}function f_(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rp(e){var t=eo(e);return(t.local?f_:u_)(t)}function d_(){}function th(e){return e==null?d_:function(){return this.querySelector(e)}}function p_(e){typeof e!="function"&&(e=th(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],o=s.length,a=i[n]=new Array(o),l,c,h=0;h<o;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new ke(i,this._parents)}function g_(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function m_(){return[]}function Dp(e){return e==null?m_:function(){return this.querySelectorAll(e)}}function y_(e){return function(){return g_(e.apply(this,arguments))}}function b_(e){typeof e=="function"?e=y_(e):e=Dp(e);for(var t=this._groups,r=t.length,i=[],n=[],s=0;s<r;++s)for(var o=t[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),n.push(l));return new ke(i,n)}function Fp(e){return function(){return this.matches(e)}}function Ip(e){return function(t){return t.matches(e)}}var x_=Array.prototype.find;function v_(e){return function(){return x_.call(this.children,e)}}function w_(){return this.firstElementChild}function C_(e){return this.select(e==null?w_:v_(typeof e=="function"?e:Ip(e)))}var __=Array.prototype.filter;function S_(){return Array.from(this.children)}function k_(e){return function(){return __.call(this.children,e)}}function T_(e){return this.selectAll(e==null?S_:k_(typeof e=="function"?e:Ip(e)))}function E_(e){typeof e!="function"&&(e=Fp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],o=s.length,a=i[n]=[],l,c=0;c<o;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&a.push(l);return new ke(i,this._parents)}function Np(e){return new Array(e.length)}function L_(){return new ke(this._enter||this._groups.map(Np),this._parents)}function ba(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ba.prototype={constructor:ba,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 A_(e){return function(){return e}}function $_(e,t,r,i,n,s){for(var o=0,a,l=t.length,c=s.length;o<c;++o)(a=t[o])?(a.__data__=s[o],i[o]=a):r[o]=new ba(e,s[o]);for(;o<l;++o)(a=t[o])&&(n[o]=a)}function M_(e,t,r,i,n,s,o){var a,l,c=new Map,h=t.length,u=s.length,f=new Array(h),d;for(a=0;a<h;++a)(l=t[a])&&(f[a]=d=o.call(l,l.__data__,a,t)+"",c.has(d)?n[a]=l:c.set(d,l));for(a=0;a<u;++a)d=o.call(e,s[a],a,s)+"",(l=c.get(d))?(i[a]=l,l.__data__=s[a],c.delete(d)):r[a]=new ba(e,s[a]);for(a=0;a<h;++a)(l=t[a])&&c.get(f[a])===l&&(n[a]=l)}function B_(e){return e.__data__}function O_(e,t){if(!arguments.length)return Array.from(this,B_);var r=t?M_:$_,i=this._parents,n=this._groups;typeof e!="function"&&(e=A_(e));for(var s=n.length,o=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var h=i[c],u=n[c],f=u.length,d=R_(e.call(h,h&&h.__data__,c,i)),p=d.length,g=a[c]=new Array(p),y=o[c]=new Array(p),b=l[c]=new Array(f);r(h,u,g,y,b,d,t);for(var x=0,w=0,C,v;x<p;++x)if(C=g[x]){for(x>=w&&(w=x+1);!(v=y[w])&&++w<p;);C._next=v||null}}return o=new ke(o,i),o._enter=a,o._exit=l,o}function R_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function D_(){return new ke(this._exit||this._groups.map(Np),this._parents)}function F_(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 I_(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,s=i.length,o=Math.min(n,s),a=new Array(n),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,f=a[l]=new Array(u),d,p=0;p<u;++p)(d=c[p]||h[p])&&(f[p]=d);for(;l<n;++l)a[l]=r[l];return new ke(a,this._parents)}function N_(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,s=i[n],o;--n>=0;)(o=i[n])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function P_(e){e||(e=j_);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var o=r[s],a=o.length,l=n[s]=new Array(a),c,h=0;h<a;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new ke(n,this._parents).order()}function j_(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function z_(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function W_(){return Array.from(this)}function q_(){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 o=i[n];if(o)return o}return null}function H_(){let e=0;for(const t of this)++e;return e}function U_(){return!this.node()}function Y_(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],s=0,o=n.length,a;s<o;++s)(a=n[s])&&e.call(a,a.__data__,s,n);return this}function V_(e){return function(){this.removeAttribute(e)}}function G_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function X_(e,t){return function(){this.setAttribute(e,t)}}function K_(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Z_(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Q_(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 J_(e,t){var r=eo(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?G_:V_:typeof t=="function"?r.local?Q_:Z_:r.local?K_:X_)(r,t))}function Pp(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function tS(e){return function(){this.style.removeProperty(e)}}function eS(e,t,r){return function(){this.style.setProperty(e,t,r)}}function rS(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function iS(e,t,r){return arguments.length>1?this.each((t==null?tS:typeof t=="function"?rS:eS)(e,t,r??"")):zi(this.node(),e)}function zi(e,t){return e.style.getPropertyValue(t)||Pp(e).getComputedStyle(e,null).getPropertyValue(t)}function nS(e){return function(){delete this[e]}}function sS(e,t){return function(){this[e]=t}}function aS(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function oS(e,t){return arguments.length>1?this.each((t==null?nS:typeof t=="function"?aS:sS)(e,t)):this.node()[e]}function jp(e){return e.trim().split(/^|\s+/)}function eh(e){return e.classList||new zp(e)}function zp(e){this._node=e,this._names=jp(e.getAttribute("class")||"")}zp.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 Wp(e,t){for(var r=eh(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function qp(e,t){for(var r=eh(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function lS(e){return function(){Wp(this,e)}}function cS(e){return function(){qp(this,e)}}function hS(e,t){return function(){(t.apply(this,arguments)?Wp:qp)(this,e)}}function uS(e,t){var r=jp(e+"");if(arguments.length<2){for(var i=eh(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?hS:t?lS:cS)(r,t))}function fS(){this.textContent=""}function dS(e){return function(){this.textContent=e}}function pS(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function gS(e){return arguments.length?this.each(e==null?fS:(typeof e=="function"?pS:dS)(e)):this.node().textContent}function mS(){this.innerHTML=""}function yS(e){return function(){this.innerHTML=e}}function bS(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function xS(e){return arguments.length?this.each(e==null?mS:(typeof e=="function"?bS:yS)(e)):this.node().innerHTML}function vS(){this.nextSibling&&this.parentNode.appendChild(this)}function wS(){return this.each(vS)}function CS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _S(){return this.each(CS)}function SS(e){var t=typeof e=="function"?e:Rp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function kS(){return null}function TS(e,t){var r=typeof e=="function"?e:Rp(e),i=t==null?kS:typeof t=="function"?t:th(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ES(){var e=this.parentNode;e&&e.removeChild(this)}function LS(){return this.each(ES)}function AS(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $S(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function MS(e){return this.select(e?$S:AS)}function BS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function OS(e){return function(t){e.call(this,t,this.__data__)}}function RS(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 DS(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 FS(e,t,r){return function(){var i=this.__on,n,s=OS(t);if(i){for(var o=0,a=i.length;o<a;++o)if((n=i[o]).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 IS(e,t,r){var i=RS(e+""),n,s=i.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(n=0,h=a[l];n<s;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(a=t?FS:DS,n=0;n<s;++n)this.each(a(i[n],t,r));return this}function Hp(e,t,r){var i=Pp(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 NS(e,t){return function(){return Hp(this,e,t)}}function PS(e,t){return function(){return Hp(this,e,t.apply(this,arguments))}}function jS(e,t){return this.each((typeof t=="function"?PS:NS)(e,t))}function*zS(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length,o;n<s;++n)(o=i[n])&&(yield o)}var Up=[null];function ke(e,t){this._groups=e,this._parents=t}function os(){return new ke([[document.documentElement]],Up)}function WS(){return this}ke.prototype=os.prototype={constructor:ke,select:p_,selectAll:b_,selectChild:C_,selectChildren:T_,filter:E_,data:O_,enter:L_,exit:D_,join:F_,merge:I_,selection:WS,order:N_,sort:P_,call:z_,nodes:W_,node:q_,size:H_,empty:U_,each:Y_,attr:J_,style:iS,property:oS,classed:uS,text:gS,html:xS,raise:wS,lower:_S,append:SS,insert:TS,remove:LS,clone:MS,datum:BS,on:IS,dispatch:jS,[Symbol.iterator]:zS};function kt(e){return typeof e=="string"?new ke([[document.querySelector(e)]],[document.documentElement]):new ke([[e]],Up)}function ro(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function rh(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Zi(){}var Un=.7,xa=1/Un,Ai="\\s*([+-]?\\d+)\\s*",Yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qS=/^#([0-9a-f]{3,8})$/,HS=new RegExp(`^rgb\\(${Ai},${Ai},${Ai}\\)$`),US=new RegExp(`^rgb\\(${Ge},${Ge},${Ge}\\)$`),YS=new RegExp(`^rgba\\(${Ai},${Ai},${Ai},${Yn}\\)$`),VS=new RegExp(`^rgba\\(${Ge},${Ge},${Ge},${Yn}\\)$`),GS=new RegExp(`^hsl\\(${Yn},${Ge},${Ge}\\)$`),XS=new RegExp(`^hsla\\(${Yn},${Ge},${Ge},${Yn}\\)$`),vf={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};ro(Zi,Wi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wf,formatHex:wf,formatHex8:KS,formatHsl:ZS,formatRgb:Cf,toString:Cf});function wf(){return this.rgb().formatHex()}function KS(){return this.rgb().formatHex8()}function ZS(){return Vp(this).formatHsl()}function Cf(){return this.rgb().formatRgb()}function Wi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qS.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?_f(t):r===3?new ce(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ms(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=HS.exec(e))?new ce(t[1],t[2],t[3],1):(t=US.exec(e))?new ce(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=YS.exec(e))?Ms(t[1],t[2],t[3],t[4]):(t=VS.exec(e))?Ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=GS.exec(e))?Tf(t[1],t[2]/100,t[3]/100,1):(t=XS.exec(e))?Tf(t[1],t[2]/100,t[3]/100,t[4]):vf.hasOwnProperty(e)?_f(vf[e]):e==="transparent"?new ce(NaN,NaN,NaN,0):null}function _f(e){return new ce(e>>16&255,e>>8&255,e&255,1)}function Ms(e,t,r,i){return i<=0&&(e=t=r=NaN),new ce(e,t,r,i)}function Yp(e){return e instanceof Zi||(e=Wi(e)),e?(e=e.rgb(),new ce(e.r,e.g,e.b,e.opacity)):new ce}function Nl(e,t,r,i){return arguments.length===1?Yp(e):new ce(e,t,r,i??1)}function ce(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}ro(ce,Nl,rh(Zi,{brighter(e){return e=e==null?xa:Math.pow(xa,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Un:Math.pow(Un,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ce(Gr(this.r),Gr(this.g),Gr(this.b),va(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:Sf,formatHex:Sf,formatHex8:QS,formatRgb:kf,toString:kf}));function Sf(){return`#${qr(this.r)}${qr(this.g)}${qr(this.b)}`}function QS(){return`#${qr(this.r)}${qr(this.g)}${qr(this.b)}${qr((isNaN(this.opacity)?1:this.opacity)*255)}`}function kf(){const e=va(this.opacity);return`${e===1?"rgb(":"rgba("}${Gr(this.r)}, ${Gr(this.g)}, ${Gr(this.b)}${e===1?")":`, ${e})`}`}function va(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qr(e){return e=Gr(e),(e<16?"0":"")+e.toString(16)}function Tf(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Oe(e,t,r,i)}function Vp(e){if(e instanceof Oe)return new Oe(e.h,e.s,e.l,e.opacity);if(e instanceof Zi||(e=Wi(e)),!e)return new Oe;if(e instanceof Oe)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),o=NaN,a=s-n,l=(s+n)/2;return a?(t===s?o=(r-i)/a+(r<i)*6:r===s?o=(i-t)/a+2:o=(t-r)/a+4,a/=l<.5?s+n:2-s-n,o*=60):a=l>0&&l<1?0:o,new Oe(o,a,l,e.opacity)}function JS(e,t,r,i){return arguments.length===1?Vp(e):new Oe(e,t,r,i??1)}function Oe(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}ro(Oe,JS,rh(Zi,{brighter(e){return e=e==null?xa:Math.pow(xa,e),new Oe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Un:Math.pow(Un,e),new Oe(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 ce(tl(e>=240?e-240:e+120,n,i),tl(e,n,i),tl(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Oe(Ef(this.h),Bs(this.s),Bs(this.l),va(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=va(this.opacity);return`${e===1?"hsl(":"hsla("}${Ef(this.h)}, ${Bs(this.s)*100}%, ${Bs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ef(e){return e=(e||0)%360,e<0?e+360:e}function Bs(e){return Math.max(0,Math.min(1,e||0))}function tl(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 io=e=>()=>e;function Gp(e,t){return function(r){return e+r*t}}function tk(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 ek(e,t){var r=t-e;return r?Gp(e,r>180||r<-180?r-360*Math.round(r/360):r):io(isNaN(e)?t:e)}function rk(e){return(e=+e)==1?ih:function(t,r){return r-t?tk(t,r,e):io(isNaN(t)?r:t)}}function ih(e,t){var r=t-e;return r?Gp(e,r):io(isNaN(e)?t:e)}const Pl=function e(t){var r=rk(t);function i(n,s){var o=r((n=Nl(n)).r,(s=Nl(s)).r),a=r(n.g,s.g),l=r(n.b,s.b),c=ih(n.opacity,s.opacity);return function(h){return n.r=o(h),n.g=a(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i}(1);function hr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var jl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,el=new RegExp(jl.source,"g");function ik(e){return function(){return e}}function nk(e){return function(t){return e(t)+""}}function Xp(e,t){var r=jl.lastIndex=el.lastIndex=0,i,n,s,o=-1,a=[],l=[];for(e=e+"",t=t+"";(i=jl.exec(e))&&(n=el.exec(t));)(s=n.index)>r&&(s=t.slice(r,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,l.push({i:o,x:hr(i,n)})),r=el.lastIndex;return r<t.length&&(s=t.slice(r),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?nk(l[0].x):ik(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}var Lf=180/Math.PI,zl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kp(e,t,r,i,n,s){var o,a,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(a=Math.sqrt(r*r+i*i))&&(r/=a,i/=a,l/=a),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*Lf,skewX:Math.atan(l)*Lf,scaleX:o,scaleY:a}}var Os;function sk(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zl:Kp(t.a,t.b,t.c,t.d,t.e,t.f)}function ak(e){return e==null||(Os||(Os=document.createElementNS("http://www.w3.org/2000/svg","g")),Os.setAttribute("transform",e),!(e=Os.transform.baseVal.consolidate()))?zl:(e=e.matrix,Kp(e.a,e.b,e.c,e.d,e.e,e.f))}function Zp(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function s(c,h,u,f,d,p){if(c!==u||h!==f){var g=d.push("translate(",null,t,null,r);p.push({i:g-4,x:hr(c,u)},{i:g-2,x:hr(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:hr(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function a(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:hr(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,d,p){if(c!==u||h!==f){var g=d.push(n(d)+"scale(",null,",",null,")");p.push({i:g-4,x:hr(c,u)},{i:g-2,x:hr(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),s(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var p=-1,g=f.length,y;++p<g;)u[(y=f[p]).i]=y.x(d);return u.join("")}}}var ok=Zp(sk,"px, ","px)","deg)"),lk=Zp(ak,", ",")",")"),qi=0,Ln=0,bn=0,Qp=1e3,wa,An,Ca=0,ti=0,no=0,Vn=typeof performance=="object"&&performance.now?performance:Date,Jp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function nh(){return ti||(Jp(ck),ti=Vn.now()+no)}function ck(){ti=0}function _a(){this._call=this._time=this._next=null}_a.prototype=tg.prototype={constructor:_a,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?nh():+r)+(t==null?0:+t),!this._next&&An!==this&&(An?An._next=this:wa=this,An=this),this._call=e,this._time=r,Wl()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wl())}};function tg(e,t,r){var i=new _a;return i.restart(e,t,r),i}function hk(){nh(),++qi;for(var e=wa,t;e;)(t=ti-e._time)>=0&&e._call.call(void 0,t),e=e._next;--qi}function Af(){ti=(Ca=Vn.now())+no,qi=Ln=0;try{hk()}finally{qi=0,fk(),ti=0}}function uk(){var e=Vn.now(),t=e-Ca;t>Qp&&(no-=t,Ca=e)}function fk(){for(var e,t=wa,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:wa=r);An=e,Wl(i)}function Wl(e){if(!qi){Ln&&(Ln=clearTimeout(Ln));var t=e-ti;t>24?(e<1/0&&(Ln=setTimeout(Af,e-Vn.now()-no)),bn&&(bn=clearInterval(bn))):(bn||(Ca=Vn.now(),bn=setInterval(uk,Qp)),qi=1,Jp(Af))}}function $f(e,t,r){var i=new _a;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var dk=Op("start","end","cancel","interrupt"),pk=[],eg=0,Mf=1,ql=2,Vs=3,Bf=4,Hl=5,Gs=6;function so(e,t,r,i,n,s){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;gk(e,r,{name:t,index:i,group:n,on:dk,tween:pk,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:eg})}function sh(e,t){var r=Ne(e,t);if(r.state>eg)throw new Error("too late; already scheduled");return r}function Je(e,t){var r=Ne(e,t);if(r.state>Vs)throw new Error("too late; already running");return r}function Ne(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function gk(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=tg(s,0,r.time);function s(c){r.state=Mf,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,d;if(r.state!==Mf)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Vs)return $f(o);d.state===Bf?(d.state=Gs,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Gs,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if($f(function(){r.state===Vs&&(r.state=Bf,r.timer.restart(a,r.delay,r.time),a(c))}),r.state=ql,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ql){for(r.state=Vs,n=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function a(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Hl,1),u=-1,f=n.length;++u<f;)n[u].call(e,h);r.state===Hl&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Gs,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function mk(e,t){var r=e.__transition,i,n,s=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){s=!1;continue}n=i.state>ql&&i.state<Hl,i.state=Gs,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}s&&delete e.__transition}}function yk(e){return this.each(function(){mk(this,e)})}function bk(e,t){var r,i;return function(){var n=Je(this,e),s=n.tween;if(s!==r){i=r=s;for(var o=0,a=i.length;o<a;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function xk(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=Je(this,e),o=s.tween;if(o!==i){n=(i=o).slice();for(var a={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=a;break}l===c&&n.push(a)}s.tween=n}}function vk(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Ne(this.node(),r).tween,n=0,s=i.length,o;n<s;++n)if((o=i[n]).name===e)return o.value;return null}return this.each((t==null?bk:xk)(r,e,t))}function ah(e,t,r){var i=e._id;return e.each(function(){var n=Je(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return Ne(n,i).value[t]}}function rg(e,t){var r;return(typeof t=="number"?hr:t instanceof Wi?Pl:(r=Wi(t))?(t=r,Pl):Xp)(e,t)}function wk(e){return function(){this.removeAttribute(e)}}function Ck(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _k(e,t,r){var i,n=r+"",s;return function(){var o=this.getAttribute(e);return o===n?null:o===i?s:s=t(i=o,r)}}function Sk(e,t,r){var i,n=r+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?s:s=t(i=o,r)}}function kk(e,t,r){var i,n,s;return function(){var o,a=r(this),l;return a==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=a+"",o===l?null:o===i&&l===n?s:(n=l,s=t(i=o,a)))}}function Tk(e,t,r){var i,n,s;return function(){var o,a=r(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=a+"",o===l?null:o===i&&l===n?s:(n=l,s=t(i=o,a)))}}function Ek(e,t){var r=eo(e),i=r==="transform"?lk:rg;return this.attrTween(e,typeof t=="function"?(r.local?Tk:kk)(r,i,ah(this,"attr."+e,t)):t==null?(r.local?Ck:wk)(r):(r.local?Sk:_k)(r,i,t))}function Lk(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Ak(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function $k(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Ak(e,s)),r}return n._value=t,n}function Mk(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Lk(e,s)),r}return n._value=t,n}function Bk(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=eo(e);return this.tween(r,(i.local?$k:Mk)(i,t))}function Ok(e,t){return function(){sh(this,e).delay=+t.apply(this,arguments)}}function Rk(e,t){return t=+t,function(){sh(this,e).delay=t}}function Dk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ok:Rk)(t,e)):Ne(this.node(),t).delay}function Fk(e,t){return function(){Je(this,e).duration=+t.apply(this,arguments)}}function Ik(e,t){return t=+t,function(){Je(this,e).duration=t}}function Nk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fk:Ik)(t,e)):Ne(this.node(),t).duration}function Pk(e,t){if(typeof t!="function")throw new Error;return function(){Je(this,e).ease=t}}function jk(e){var t=this._id;return arguments.length?this.each(Pk(t,e)):Ne(this.node(),t).ease}function zk(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Je(this,e).ease=r}}function Wk(e){if(typeof e!="function")throw new Error;return this.each(zk(this._id,e))}function qk(e){typeof e!="function"&&(e=Fp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],o=s.length,a=i[n]=[],l,c=0;c<o;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&a.push(l);return new mr(i,this._parents,this._name,this._id)}function Hk(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),o=new Array(i),a=0;a<s;++a)for(var l=t[a],c=r[a],h=l.length,u=o[a]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;a<i;++a)o[a]=t[a];return new mr(o,this._parents,this._name,this._id)}function Uk(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 Yk(e,t,r){var i,n,s=Uk(t)?sh:Je;return function(){var o=s(this,e),a=o.on;a!==i&&(n=(i=a).copy()).on(t,r),o.on=n}}function Vk(e,t){var r=this._id;return arguments.length<2?Ne(this.node(),r).on.on(e):this.each(Yk(r,e,t))}function Gk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Xk(){return this.on("end.remove",Gk(this._id))}function Kk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=th(e));for(var i=this._groups,n=i.length,s=new Array(n),o=0;o<n;++o)for(var a=i[o],l=a.length,c=s[o]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=e.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,so(c[f],t,r,f,c,Ne(h,r)));return new mr(s,this._parents,t,r)}function Zk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Dp(e));for(var i=this._groups,n=i.length,s=[],o=[],a=0;a<n;++a)for(var l=i[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,p=Ne(h,r),g=0,y=f.length;g<y;++g)(d=f[g])&&so(d,t,r,g,f,p);s.push(f),o.push(h)}return new mr(s,o,t,r)}var Qk=os.prototype.constructor;function Jk(){return new Qk(this._groups,this._parents)}function t2(e,t){var r,i,n;return function(){var s=zi(this,e),o=(this.style.removeProperty(e),zi(this,e));return s===o?null:s===r&&o===i?n:n=t(r=s,i=o)}}function ig(e){return function(){this.style.removeProperty(e)}}function e2(e,t,r){var i,n=r+"",s;return function(){var o=zi(this,e);return o===n?null:o===i?s:s=t(i=o,r)}}function r2(e,t,r){var i,n,s;return function(){var o=zi(this,e),a=r(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),zi(this,e))),o===l?null:o===i&&l===n?s:(n=l,s=t(i=o,a))}}function i2(e,t){var r,i,n,s="style."+t,o="end."+s,a;return function(){var l=Je(this,e),c=l.on,h=l.value[s]==null?a||(a=ig(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(o,n=h),l.on=i}}function n2(e,t,r){var i=(e+="")=="transform"?ok:rg;return t==null?this.styleTween(e,t2(e,i)).on("end.style."+e,ig(e)):typeof t=="function"?this.styleTween(e,r2(e,i,ah(this,"style."+e,t))).each(i2(this._id,e)):this.styleTween(e,e2(e,i,t),r).on("end.style."+e,null)}function s2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function a2(e,t,r){var i,n;function s(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&s2(e,o,r)),i}return s._value=t,s}function o2(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,a2(e,t,r??""))}function l2(e){return function(){this.textContent=e}}function c2(e){return function(){var t=e(this);this.textContent=t??""}}function h2(e){return this.tween("text",typeof e=="function"?c2(ah(this,"text",e)):l2(e==null?"":e+""))}function u2(e){return function(t){this.textContent=e.call(this,t)}}function f2(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&u2(n)),t}return i._value=e,i}function d2(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,f2(e))}function p2(){for(var e=this._name,t=this._id,r=ng(),i=this._groups,n=i.length,s=0;s<n;++s)for(var o=i[s],a=o.length,l,c=0;c<a;++c)if(l=o[c]){var h=Ne(l,t);so(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new mr(i,this._parents,e,r)}function g2(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(s,o){var a={value:o},l={value:function(){--n===0&&s()}};r.each(function(){var c=Je(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),n===0&&s()})}var m2=0;function mr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function ng(){return++m2}var sr=os.prototype;mr.prototype={constructor:mr,select:Kk,selectAll:Zk,selectChild:sr.selectChild,selectChildren:sr.selectChildren,filter:qk,merge:Hk,selection:Jk,transition:p2,call:sr.call,nodes:sr.nodes,node:sr.node,size:sr.size,empty:sr.empty,each:sr.each,on:Vk,attr:Ek,attrTween:Bk,style:n2,styleTween:o2,text:h2,textTween:d2,remove:Xk,tween:vk,delay:Dk,duration:Nk,ease:jk,easeVarying:Wk,end:g2,[Symbol.iterator]:sr[Symbol.iterator]};function y2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var b2={time:null,delay:0,duration:250,ease:y2};function x2(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 v2(e){var t,r;e instanceof mr?(t=e._id,e=e._name):(t=ng(),(r=b2).time=nh(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var o=i[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&so(l,e,t,c,o,r||x2(l,t));return new mr(i,this._parents,e,t)}os.prototype.interrupt=yk;os.prototype.transition=v2;const Ul=Math.PI,Yl=2*Ul,Pr=1e-6,w2=Yl-Pr;function sg(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function C2(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return sg;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 _2{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?sg:C2(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,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+s},${this._y1=+o}`}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 o=this._x1,a=this._y1,l=i-t,c=n-r,h=o-t,u=a-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Pr)if(!(Math.abs(u*l-c*h)>Pr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,p=n-a,g=l*l+c*c,y=d*d+p*p,b=Math.sqrt(g),x=Math.sqrt(f),w=s*Math.tan((Ul-Math.acos((g+f-y)/(2*b*x)))/2),C=w/x,v=w/b;Math.abs(C-1)>Pr&&this._append`L${t+C*h},${r+C*u}`,this._append`A${s},${s},0,0,${+(u*d>h*p)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,n,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(n),l=i*Math.sin(n),c=t+a,h=r+l,u=1^o,f=o?n-s:s-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Pr||Math.abs(this._y1-h)>Pr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Yl+Yl),f>w2?this._append`A${i},${i},0,1,${u},${t-a},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>Pr&&this._append`A${i},${i},0,${+(f>=Ul)},${u},${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 jr(e){return function(){return e}}const S2=Math.abs,k2=Math.atan2,T2=Math.cos,E2=Math.max,L2=Math.min,A2=Math.sin,$2=Math.sqrt,Vl=1e-12,ao=Math.PI,Gl=ao/2,M2=2*ao;function B2(e){return e>1?0:e<-1?ao:Math.acos(e)}function O2(e){return e>=1?Gl:e<=-1?-Gl:Math.asin(e)}function ag(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 _2(t)}function og(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lg(e){this._context=e}lg.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 Sa(e){return new lg(e)}function R2(e){return e[0]}function D2(e){return e[1]}function cg(e,t){var r=jr(!0),i=null,n=Sa,s=null,o=ag(a);e=typeof e=="function"?e:e===void 0?R2:jr(e),t=typeof t=="function"?t:t===void 0?D2:jr(t);function a(l){var c,h=(l=og(l)).length,u,f=!1,d;for(i==null&&(s=n(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(u,c,l),+t(u,c,l));if(d)return s=null,d+""||null}return a.x=function(l){return arguments.length?(e=typeof l=="function"?l:jr(+l),a):e},a.y=function(l){return arguments.length?(t=typeof l=="function"?l:jr(+l),a):t},a.defined=function(l){return arguments.length?(r=typeof l=="function"?l:jr(!!l),a):r},a.curve=function(l){return arguments.length?(n=l,i!=null&&(s=n(i)),a):n},a.context=function(l){return arguments.length?(l==null?i=s=null:s=n(i=l),a):i},a}class hg{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 ug(e){return new hg(e,!0)}function fg(e){return new hg(e,!1)}function Tr(){}function ka(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 oo(e){this._context=e}oo.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:ka(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:ka(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pn(e){return new oo(e)}function dg(e){this._context=e}dg.prototype={areaStart:Tr,areaEnd:Tr,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:ka(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function F2(e){return new dg(e)}function pg(e){this._context=e}pg.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:ka(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function I2(e){return new pg(e)}function gg(e,t){this._basis=new oo(e),this._beta=t}gg.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,o=t[r]-n,a=-1,l;++a<=r;)l=a/r,this._basis.point(this._beta*e[a]+(1-this._beta)*(i+l*s),this._beta*t[a]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const N2=function e(t){function r(i){return t===1?new oo(i):new gg(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Ta(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 oh(e,t){this._context=e,this._k=(1-t)/6}oh.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:Ta(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:Ta(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 mg=function e(t){function r(i){return new oh(i,t)}return r.tension=function(i){return e(+i)},r}(0);function lh(e,t){this._context=e,this._k=(1-t)/6}lh.prototype={areaStart:Tr,areaEnd:Tr,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:Ta(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 P2=function e(t){function r(i){return new lh(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ch(e,t){this._context=e,this._k=(1-t)/6}ch.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:Ta(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 j2=function e(t){function r(i){return new ch(i,t)}return r.tension=function(i){return e(+i)},r}(0);function hh(e,t,r){var i=e._x1,n=e._y1,s=e._x2,o=e._y2;if(e._l01_a>Vl){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Vl){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,s,o,e._x2,e._y2)}function yg(e,t){this._context=e,this._alpha=t}yg.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:hh(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 bg=function e(t){function r(i){return t?new yg(i,t):new oh(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function xg(e,t){this._context=e,this._alpha=t}xg.prototype={areaStart:Tr,areaEnd:Tr,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:hh(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 z2=function e(t){function r(i){return t?new xg(i,t):new lh(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function vg(e,t){this._context=e,this._alpha=t}vg.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:hh(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 vg(i,t):new ch(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function wg(e){this._context=e}wg.prototype={areaStart:Tr,areaEnd:Tr,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 q2(e){return new wg(e)}function Of(e){return e<0?-1:1}function Rf(e,t,r){var i=e._x1-e._x0,n=t-e._x1,s=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),a=(s*n+o*i)/(i+n);return(Of(s)+Of(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function Df(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function rl(e,t,r){var i=e._x0,n=e._y0,s=e._x1,o=e._y1,a=(s-i)/3;e._context.bezierCurveTo(i+a,n+a*t,s-a,o-a*r,s,o)}function Ea(e){this._context=e}Ea.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:rl(this,this._t0,Df(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,rl(this,Df(this,r=Rf(this,e,t)),r);break;default:rl(this,this._t0,r=Rf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Cg(e){this._context=new _g(e)}(Cg.prototype=Object.create(Ea.prototype)).point=function(e,t){Ea.prototype.point.call(this,t,e)};function _g(e){this._context=e}_g.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 Sg(e){return new Ea(e)}function kg(e){return new Cg(e)}function Tg(e){this._context=e}Tg.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=Ff(e),n=Ff(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],e[o],t[o]);(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 Ff(e){var t,r=e.length-1,i,n=new Array(r),s=new Array(r),o=new Array(r);for(n[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(n[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)n[t]=(o[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 Eg(e){return new Tg(e)}function lo(e,t){this._context=e,this._t=t}lo.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 Lg(e){return new lo(e,.5)}function Ag(e){return new lo(e,0)}function $g(e){return new lo(e,1)}function $n(e,t,r){this.k=e,this.x=t,this.y=r}$n.prototype={constructor:$n,scale:function(e){return e===1?this:new $n(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $n(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+")"}};$n.prototype;var Mg=m(e=>{const{securityLevel:t}=Et();let r=kt("body");if(t==="sandbox"){const s=kt(`#i${e}`).node()?.contentDocument??document;r=kt(s.body)}return r.select(`#${e}`)},"selectSvgElement");function uh(e){return typeof e>"u"||e===null}m(uh,"isNothing");function Bg(e){return typeof e=="object"&&e!==null}m(Bg,"isObject");function Og(e){return Array.isArray(e)?e:uh(e)?[]:[e]}m(Og,"toArray");function Rg(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}m(Rg,"extend");function Dg(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}m(Dg,"repeat");function Fg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}m(Fg,"isNegativeZero");var H2=uh,U2=Bg,Y2=Og,V2=Dg,G2=Fg,X2=Rg,Vt={isNothing:H2,isObject:U2,toArray:Y2,repeat:V2,isNegativeZero:G2,extend:X2};function fh(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+=`
|
|
130
|
+
|
|
131
|
+
`+e.mark.snippet),i+" "+r):i}m(fh,"formatError");function Hi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=fh(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}m(Hi,"YAMLException$1");Hi.prototype=Object.create(Error.prototype);Hi.prototype.constructor=Hi;Hi.prototype.toString=m(function(t){return this.name+": "+fh(this,t)},"toString");var xe=Hi;function Xs(e,t,r,i,n){var s="",o="",a=Math.floor(n/2)-1;return i-t>a&&(s=" ... ",t=i-a+s.length),r-i>a&&(o=" ...",r=i+a-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}m(Xs,"getLine");function Ks(e,t){return Vt.repeat(" ",t-e.length)+e}m(Ks,"padStart");function Ig(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,o=-1;s=r.exec(e.buffer);)n.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var a="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Xs(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),a=Vt.repeat(" ",t.indent)+Ks((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
132
|
+
`+a;for(c=Xs(e.buffer,i[o],n[o],e.position,u),a+=Vt.repeat(" ",t.indent)+Ks((e.line+1).toString(),h)+" | "+c.str+`
|
|
133
|
+
`,a+=Vt.repeat("-",t.indent+h+3+c.pos)+`^
|
|
134
|
+
`,l=1;l<=t.linesAfter&&!(o+l>=n.length);l++)c=Xs(e.buffer,i[o+l],n[o+l],e.position-(i[o]-i[o+l]),u),a+=Vt.repeat(" ",t.indent)+Ks((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
135
|
+
`;return a.replace(/\n$/,"")}m(Ig,"makeSnippet");var K2=Ig,Z2=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Q2=["scalar","sequence","mapping"];function Ng(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}m(Ng,"compileStyleAliases");function Pg(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Z2.indexOf(r)===-1)throw new xe('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=Ng(t.styleAliases||null),Q2.indexOf(this.kind)===-1)throw new xe('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}m(Pg,"Type$1");var ie=Pg;function Xl(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=o)}),r[n]=i}),r}m(Xl,"compileList");function jg(){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(m(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}m(jg,"compileMap");function La(e){return this.extend(e)}m(La,"Schema$1");La.prototype.extend=m(function(t){var r=[],i=[];if(t instanceof ie)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 xe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof ie))throw new xe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new xe("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 xe("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 ie))throw new xe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(La.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Xl(n,"implicit"),n.compiledExplicit=Xl(n,"explicit"),n.compiledTypeMap=jg(n.compiledImplicit,n.compiledExplicit),n},"extend");var J2=La,tT=new ie("tag:yaml.org,2002:str",{kind:"scalar",construct:m(function(e){return e!==null?e:""},"construct")}),eT=new ie("tag:yaml.org,2002:seq",{kind:"sequence",construct:m(function(e){return e!==null?e:[]},"construct")}),rT=new ie("tag:yaml.org,2002:map",{kind:"mapping",construct:m(function(e){return e!==null?e:{}},"construct")}),iT=new J2({explicit:[tT,eT,rT]});function zg(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}m(zg,"resolveYamlNull");function Wg(){return null}m(Wg,"constructYamlNull");function qg(e){return e===null}m(qg,"isNull");var nT=new ie("tag:yaml.org,2002:null",{kind:"scalar",resolve:zg,construct:Wg,predicate:qg,represent:{canonical:m(function(){return"~"},"canonical"),lowercase:m(function(){return"null"},"lowercase"),uppercase:m(function(){return"NULL"},"uppercase"),camelcase:m(function(){return"Null"},"camelcase"),empty:m(function(){return""},"empty")},defaultStyle:"lowercase"});function Hg(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")}m(Hg,"resolveYamlBoolean");function Ug(e){return e==="true"||e==="True"||e==="TRUE"}m(Ug,"constructYamlBoolean");function Yg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}m(Yg,"isBoolean");var sT=new ie("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Hg,construct:Ug,predicate:Yg,represent:{lowercase:m(function(e){return e?"true":"false"},"lowercase"),uppercase:m(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:m(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Vg(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}m(Vg,"isHexCode");function Gg(e){return 48<=e&&e<=55}m(Gg,"isOctCode");function Xg(e){return 48<=e&&e<=57}m(Xg,"isDecCode");function Kg(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(!Vg(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Gg(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Xg(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}m(Kg,"resolveYamlInteger");function Zg(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)}m(Zg,"constructYamlInteger");function Qg(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Vt.isNegativeZero(e)}m(Qg,"isInteger");var aT=new ie("tag:yaml.org,2002:int",{kind:"scalar",resolve:Kg,construct:Zg,predicate:Qg,represent:{binary:m(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:m(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:m(function(e){return e.toString(10)},"decimal"),hexadecimal:m(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"]}}),oT=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Jg(e){return!(e===null||!oT.test(e)||e[e.length-1]==="_")}m(Jg,"resolveYamlFloat");function tm(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)}m(tm,"constructYamlFloat");var lT=/^[-+]?[0-9]+e/;function em(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(Vt.isNegativeZero(e))return"-0.0";return r=e.toString(10),lT.test(r)?r.replace("e",".e"):r}m(em,"representYamlFloat");function rm(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Vt.isNegativeZero(e))}m(rm,"isFloat");var cT=new ie("tag:yaml.org,2002:float",{kind:"scalar",resolve:Jg,construct:tm,predicate:rm,represent:em,defaultStyle:"lowercase"}),im=iT.extend({implicit:[nT,sT,aT,cT]}),hT=im,nm=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),sm=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 am(e){return e===null?!1:nm.exec(e)!==null||sm.exec(e)!==null}m(am,"resolveYamlTimestamp");function om(e){var t,r,i,n,s,o,a,l=0,c=null,h,u,f;if(t=nm.exec(e),t===null&&(t=sm.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],o=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}m(om,"constructYamlTimestamp");function lm(e){return e.toISOString()}m(lm,"representYamlTimestamp");var uT=new ie("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:am,construct:om,instanceOf:Date,represent:lm});function cm(e){return e==="<<"||e===null}m(cm,"resolveYamlMerge");var fT=new ie("tag:yaml.org,2002:merge",{kind:"scalar",resolve:cm}),dh=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
136
|
+
\r`;function hm(e){if(e===null)return!1;var t,r,i=0,n=e.length,s=dh;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}m(hm,"resolveYamlBinary");function um(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,s=dh,o=0,a=[];for(t=0;t<n;t++)t%4===0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=n%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}m(um,"constructYamlBinary");function fm(e){var t="",r=0,i,n,s=e.length,o=dh;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=s%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}m(fm,"representYamlBinary");function dm(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}m(dm,"isBinary");var dT=new ie("tag:yaml.org,2002:binary",{kind:"scalar",resolve:hm,construct:um,predicate:dm,represent:fm}),pT=Object.prototype.hasOwnProperty,gT=Object.prototype.toString;function pm(e){if(e===null)return!0;var t=[],r,i,n,s,o,a=e;for(r=0,i=a.length;r<i;r+=1){if(n=a[r],o=!1,gT.call(n)!=="[object Object]")return!1;for(s in n)if(pT.call(n,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}m(pm,"resolveYamlOmap");function gm(e){return e!==null?e:[]}m(gm,"constructYamlOmap");var mT=new ie("tag:yaml.org,2002:omap",{kind:"sequence",resolve:pm,construct:gm}),yT=Object.prototype.toString;function mm(e){if(e===null)return!0;var t,r,i,n,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],yT.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[t]=[n[0],i[n[0]]]}return!0}m(mm,"resolveYamlPairs");function ym(e){if(e===null)return[];var t,r,i,n,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),s[t]=[n[0],i[n[0]]];return s}m(ym,"constructYamlPairs");var bT=new ie("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:mm,construct:ym}),xT=Object.prototype.hasOwnProperty;function bm(e){if(e===null)return!0;var t,r=e;for(t in r)if(xT.call(r,t)&&r[t]!==null)return!1;return!0}m(bm,"resolveYamlSet");function xm(e){return e!==null?e:{}}m(xm,"constructYamlSet");var vT=new ie("tag:yaml.org,2002:set",{kind:"mapping",resolve:bm,construct:xm}),vm=hT.extend({implicit:[uT,fT],explicit:[dT,mT,bT,vT]}),Er=Object.prototype.hasOwnProperty,Aa=1,wm=2,Cm=3,$a=4,il=1,wT=2,If=3,CT=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_T=/[\x85\u2028\u2029]/,ST=/[,\[\]\{\}]/,_m=/^(?:!|!!|![a-z\-]+!)$/i,Sm=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Kl(e){return Object.prototype.toString.call(e)}m(Kl,"_class");function Re(e){return e===10||e===13}m(Re,"is_EOL");function kr(e){return e===9||e===32}m(kr,"is_WHITE_SPACE");function he(e){return e===9||e===32||e===10||e===13}m(he,"is_WS_OR_EOL");function Hr(e){return e===44||e===91||e===93||e===123||e===125}m(Hr,"is_FLOW_INDICATOR");function km(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}m(km,"fromHexCode");function Tm(e){return e===120?2:e===117?4:e===85?8:0}m(Tm,"escapedHexLen");function Em(e){return 48<=e&&e<=57?e-48:-1}m(Em,"fromDecimalCode");function Zl(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
137
|
+
`: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":""}m(Zl,"simpleEscapeSequence");function Lm(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}m(Lm,"charFromCodepoint");var Am=new Array(256),$m=new Array(256);for(Ir=0;Ir<256;Ir++)Am[Ir]=Zl(Ir)?1:0,$m[Ir]=Zl(Ir);var Ir;function Mm(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||vm,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=[]}m(Mm,"State$1");function ph(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=K2(r),new xe(t,r)}m(ph,"generateError");function ut(e,t){throw ph(e,t)}m(ut,"throwError");function Gn(e,t){e.onWarning&&e.onWarning.call(null,ph(e,t))}m(Gn,"throwWarning");var Nf={YAML:m(function(t,r,i){var n,s,o;t.version!==null&&ut(t,"duplication of %YAML directive"),i.length!==1&&ut(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&ut(t,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&ut(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Gn(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:m(function(t,r,i){var n,s;i.length!==2&&ut(t,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],_m.test(n)||ut(t,"ill-formed tag handle (first argument) of the TAG directive"),Er.call(t.tagMap,n)&&ut(t,'there is a previously declared suffix for "'+n+'" tag handle'),Sm.test(s)||ut(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{ut(t,"tag prefix is malformed: "+s)}t.tagMap[n]=s},"handleTagDirective")};function gr(e,t,r,i){var n,s,o,a;if(t<r){if(a=e.input.slice(t,r),i)for(n=0,s=a.length;n<s;n+=1)o=a.charCodeAt(n),o===9||32<=o&&o<=1114111||ut(e,"expected valid JSON character");else CT.test(a)&&ut(e,"the stream contains non-printable characters");e.result+=a}}m(gr,"captureSegment");function Ql(e,t,r,i){var n,s,o,a;for(Vt.isObject(r)||ut(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,a=n.length;o<a;o+=1)s=n[o],Er.call(t,s)||(t[s]=r[s],i[s]=!0)}m(Ql,"mergeMappings");function Ur(e,t,r,i,n,s,o,a,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&ut(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Kl(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Kl(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Ql(e,t,s[c],r);else Ql(e,t,s,r);else!e.json&&!Er.call(r,n)&&Er.call(t,n)&&(e.line=o||e.line,e.lineStart=a||e.lineStart,e.position=l||e.position,ut(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[n]=s,delete r[n];return t}m(Ur,"storeMappingPair");function co(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++):ut(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}m(co,"readLineBreak");function Pt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;kr(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(Re(n))for(co(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&&Gn(e,"deficient indentation"),i}m(Pt,"skipSeparationSpace");function ls(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||he(r)))}m(ls,"testDocumentSeparator");function ho(e,t){t===1?e.result+=" ":t>1&&(e.result+=Vt.repeat(`
|
|
138
|
+
`,t-1))}m(ho,"writeFoldedLines");function Bm(e,t,r){var i,n,s,o,a,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),he(d)||Hr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),he(n)||r&&Hr(n)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),he(n)||r&&Hr(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),he(i))break}else{if(e.position===e.lineStart&&ls(e)||r&&Hr(d))break;if(Re(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,Pt(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}a&&(gr(e,s,o,!1),ho(e,e.line-l),s=o=e.position,a=!1),kr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return gr(e,s,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}m(Bm,"readPlainScalar");function Om(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(gr(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 Re(r)?(gr(e,i,n,!0),ho(e,Pt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&ls(e)?ut(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);ut(e,"unexpected end of the stream within a single quoted scalar")}m(Om,"readSingleQuotedScalar");function Rm(e,t){var r,i,n,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return gr(e,r,e.position,!0),e.position++,!0;if(a===92){if(gr(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),Re(a))Pt(e,!1,t);else if(a<256&&Am[a])e.result+=$m[a],e.position++;else if((o=Tm(a))>0){for(n=o,s=0;n>0;n--)a=e.input.charCodeAt(++e.position),(o=km(a))>=0?s=(s<<4)+o:ut(e,"expected hexadecimal character");e.result+=Lm(s),e.position++}else ut(e,"unknown escape sequence");r=i=e.position}else Re(a)?(gr(e,r,i,!0),ho(e,Pt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ls(e)?ut(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ut(e,"unexpected end of the stream within a double quoted scalar")}m(Rm,"readDoubleQuotedScalar");function Dm(e,t){var r=!0,i,n,s,o=e.tag,a,l=e.anchor,c,h,u,f,d,p=Object.create(null),g,y,b,x;if(x=e.input.charCodeAt(e.position),x===91)h=93,d=!1,a=[];else if(x===123)h=125,d=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),x=e.input.charCodeAt(++e.position);x!==0;){if(Pt(e,!0,t),x=e.input.charCodeAt(e.position),x===h)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=a,!0;r?x===44&&ut(e,"expected the node content, but found ','"):ut(e,"missed comma between flow collection entries"),y=g=b=null,u=f=!1,x===63&&(c=e.input.charCodeAt(e.position+1),he(c)&&(u=f=!0,e.position++,Pt(e,!0,t))),i=e.line,n=e.lineStart,s=e.position,ei(e,t,Aa,!1,!0),y=e.tag,g=e.result,Pt(e,!0,t),x=e.input.charCodeAt(e.position),(f||e.line===i)&&x===58&&(u=!0,x=e.input.charCodeAt(++e.position),Pt(e,!0,t),ei(e,t,Aa,!1,!0),b=e.result),d?Ur(e,a,p,y,g,b,i,n,s):u?a.push(Ur(e,null,p,y,g,b,i,n,s)):a.push(g),Pt(e,!0,t),x=e.input.charCodeAt(e.position),x===44?(r=!0,x=e.input.charCodeAt(++e.position)):r=!1}ut(e,"unexpected end of the stream within a flow collection")}m(Dm,"readFlowCollection");function Fm(e,t){var r,i,n=il,s=!1,o=!1,a=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)il===n?n=u===43?If:wT:ut(e,"repeat of a chomping mode identifier");else if((h=Em(u))>=0)h===0?ut(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ut(e,"repeat of an indentation width identifier"):(a=t+h-1,o=!0);else break;if(kr(u)){do u=e.input.charCodeAt(++e.position);while(kr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Re(u)&&u!==0)}for(;u!==0;){for(co(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),Re(u)){l++;continue}if(e.lineIndent<a){n===If?e.result+=Vt.repeat(`
|
|
139
|
+
`,s?1+l:l):n===il&&s&&(e.result+=`
|
|
140
|
+
`);break}for(i?kr(u)?(c=!0,e.result+=Vt.repeat(`
|
|
141
|
+
`,s?1+l:l)):c?(c=!1,e.result+=Vt.repeat(`
|
|
142
|
+
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Vt.repeat(`
|
|
143
|
+
`,l):e.result+=Vt.repeat(`
|
|
144
|
+
`,s?1+l:l),s=!0,o=!0,l=0,r=e.position;!Re(u)&&u!==0;)u=e.input.charCodeAt(++e.position);gr(e,r,e.position,!1)}return!0}m(Fm,"readBlockScalar");function Jl(e,t){var r,i=e.tag,n=e.anchor,s=[],o,a=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ut(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!he(o))));){if(a=!0,e.position++,Pt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,ei(e,t,Cm,!1,!0),s.push(e.result),Pt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)ut(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=s,!0):!1}m(Jl,"readBlockSequence");function Im(e,t,r){var i,n,s,o,a,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,p=null,g=null,y=!1,b=!1,x;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),x=e.input.charCodeAt(e.position);x!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ut(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(x===63||x===58)&&he(i))x===63?(y&&(Ur(e,u,f,d,p,null,o,a,l),d=p=g=null),b=!0,y=!0,n=!0):y?(y=!1,n=!0):ut(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,x=i;else{if(o=e.line,a=e.lineStart,l=e.position,!ei(e,r,wm,!1,!0))break;if(e.line===s){for(x=e.input.charCodeAt(e.position);kr(x);)x=e.input.charCodeAt(++e.position);if(x===58)x=e.input.charCodeAt(++e.position),he(x)||ut(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ur(e,u,f,d,p,null,o,a,l),d=p=g=null),b=!0,y=!1,n=!1,d=e.tag,p=e.result;else if(b)ut(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(b)ut(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(o=e.line,a=e.lineStart,l=e.position),ei(e,t,$a,!0,n)&&(y?p=e.result:g=e.result),y||(Ur(e,u,f,d,p,g,o,a,l),d=p=g=null),Pt(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&x!==0)ut(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ur(e,u,f,d,p,null,o,a,l),b&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),b}m(Im,"readBlockMapping");function Nm(e){var t,r=!1,i=!1,n,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&ut(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):ut(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!he(o);)o===33&&(i?ut(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),_m.test(n)||ut(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),ST.test(s)&&ut(e,"tag suffix cannot contain flow indicator characters")}s&&!Sm.test(s)&&ut(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{ut(e,"tag name is malformed: "+s)}return r?e.tag=s:Er.call(e.tagMap,n)?e.tag=e.tagMap[n]+s:n==="!"?e.tag="!"+s:n==="!!"?e.tag="tag:yaml.org,2002:"+s:ut(e,'undeclared tag handle "'+n+'"'),!0}m(Nm,"readTagProperty");function Pm(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&ut(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!he(r)&&!Hr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ut(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}m(Pm,"readAnchorProperty");function jm(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&&!he(i)&&!Hr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ut(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Er.call(e.anchorMap,r)||ut(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Pt(e,!0,-1),!0}m(jm,"readAlias");function ei(e,t,r,i,n){var s,o,a,l=1,c=!1,h=!1,u,f,d,p,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=a=$a===r||Cm===r,i&&Pt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Nm(e)||Pm(e);)Pt(e,!0,-1)?(c=!0,a=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=c||n),(l===1||$a===r)&&(Aa===r||wm===r?g=t:g=t+1,y=e.position-e.lineStart,l===1?a&&(Jl(e,y)||Im(e,y,g))||Dm(e,g)?h=!0:(o&&Fm(e,g)||Om(e,g)||Rm(e,g)?h=!0:jm(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&ut(e,"alias node should not have any properties")):Bm(e,g,Aa===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=a&&Jl(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ut(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(p=e.implicitTypes[u],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Er.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){p=d[u];break}p||ut(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&ut(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ut(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}m(ei,"composeNode");function zm(e){var t=e.position,r,i,n,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Pt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!he(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&ut(e,"directive name must not be less than one character in length");o!==0;){for(;kr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Re(o));break}if(Re(o))break;for(r=e.position;o!==0&&!he(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&co(e),Er.call(Nf,i)?Nf[i](e,i,n):Gn(e,'unknown document directive "'+i+'"')}if(Pt(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,Pt(e,!0,-1)):s&&ut(e,"directives end mark is expected"),ei(e,e.lineIndent-1,$a,!1,!0),Pt(e,!0,-1),e.checkLineBreaks&&_T.test(e.input.slice(t,e.position))&&Gn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ls(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Pt(e,!0,-1));return}if(e.position<e.length-1)ut(e,"end of the stream or a document separator is expected");else return}m(zm,"readDocument");function gh(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
145
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Mm(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,ut(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;)zm(r);return r.documents}m(gh,"loadDocuments");function kT(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=gh(e,r);if(typeof t!="function")return i;for(var n=0,s=i.length;n<s;n+=1)t(i[n])}m(kT,"loadAll$1");function Wm(e,t){var r=gh(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new xe("expected a single document in the stream, but found more")}}m(Wm,"load$1");var TT=Wm,ET={load:TT},qm=Object.prototype.toString,Hm=Object.prototype.hasOwnProperty,mh=65279,LT=9,Xn=10,AT=13,$T=32,MT=33,BT=34,tc=35,OT=37,RT=38,DT=39,FT=42,Um=44,IT=45,Ma=58,NT=61,PT=62,jT=63,zT=64,Ym=91,Vm=93,WT=96,Gm=123,qT=124,Xm=125,se={};se[0]="\\0";se[7]="\\a";se[8]="\\b";se[9]="\\t";se[10]="\\n";se[11]="\\v";se[12]="\\f";se[13]="\\r";se[27]="\\e";se[34]='\\"';se[92]="\\\\";se[133]="\\N";se[160]="\\_";se[8232]="\\L";se[8233]="\\P";var HT=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],UT=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Km(e,t){var r,i,n,s,o,a,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,s=i.length;n<s;n+=1)o=i[n],a=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Hm.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[o]=a;return r}m(Km,"compileStyleMap");function Zm(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 xe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Vt.repeat("0",i-t.length)+t}m(Zm,"encodeHex");var YT=1,Kn=2;function Qm(e){this.schema=e.schema||vm,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Vt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Km(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==='"'?Kn:YT,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}m(Qm,"State");function ec(e,t){for(var r=Vt.repeat(" ",t),i=0,n=-1,s="",o,a=e.length;i<a;)n=e.indexOf(`
|
|
146
|
+
`,i),n===-1?(o=e.slice(i),i=a):(o=e.slice(i,n+1),i=n+1),o.length&&o!==`
|
|
147
|
+
`&&(s+=r),s+=o;return s}m(ec,"indentString");function Ba(e,t){return`
|
|
148
|
+
`+Vt.repeat(" ",e.indent*t)}m(Ba,"generateNextLine");function Jm(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}m(Jm,"testImplicitResolving");function Zn(e){return e===$T||e===LT}m(Zn,"isWhitespace");function Ui(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==mh||65536<=e&&e<=1114111}m(Ui,"isPrintable");function rc(e){return Ui(e)&&e!==mh&&e!==AT&&e!==Xn}m(rc,"isNsCharOrWhitespace");function ic(e,t,r){var i=rc(e),n=i&&!Zn(e);return(r?i:i&&e!==Um&&e!==Ym&&e!==Vm&&e!==Gm&&e!==Xm)&&e!==tc&&!(t===Ma&&!n)||rc(t)&&!Zn(t)&&e===tc||t===Ma&&n}m(ic,"isPlainSafe");function ty(e){return Ui(e)&&e!==mh&&!Zn(e)&&e!==IT&&e!==jT&&e!==Ma&&e!==Um&&e!==Ym&&e!==Vm&&e!==Gm&&e!==Xm&&e!==tc&&e!==RT&&e!==FT&&e!==MT&&e!==qT&&e!==NT&&e!==PT&&e!==DT&&e!==BT&&e!==OT&&e!==zT&&e!==WT}m(ty,"isPlainSafeFirst");function ey(e){return!Zn(e)&&e!==Ma}m(ey,"isPlainSafeLast");function Ti(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}m(Ti,"codePointAt");function yh(e){var t=/^\n* /;return t.test(e)}m(yh,"needIndentIndicator");var ry=1,nc=2,iy=3,ny=4,_i=5;function sy(e,t,r,i,n,s,o,a){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,p=-1,g=ty(Ti(e,0))&&ey(Ti(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Ti(e,l),!Ui(c))return _i;g=g&&ic(c,h,a),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Ti(e,l),c===Xn)u=!0,d&&(f=f||l-p-1>i&&e[p+1]!==" ",p=l);else if(!Ui(c))return _i;g=g&&ic(c,h,a),h=c}f=f||d&&l-p-1>i&&e[p+1]!==" "}return!u&&!f?g&&!o&&!n(e)?ry:s===Kn?_i:nc:r>9&&yh(e)?_i:o?s===Kn?_i:nc:f?ny:iy}m(sy,"chooseScalarStyle");function ay(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===Kn?'""':"''";if(!e.noCompatMode&&(HT.indexOf(t)!==-1||UT.test(t)))return e.quotingType===Kn?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),a=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Jm(e,c)}switch(m(l,"testAmbiguity"),sy(t,a,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case ry:return t;case nc:return"'"+t.replace(/'/g,"''")+"'";case iy:return"|"+sc(t,e.indent)+ac(ec(t,s));case ny:return">"+sc(t,e.indent)+ac(ec(oy(t,o),s));case _i:return'"'+ly(t)+'"';default:throw new xe("impossible error: invalid scalar style")}}()}m(ay,"writeScalar");function sc(e,t){var r=yh(e)?String(t):"",i=e[e.length-1]===`
|
|
149
|
+
`,n=i&&(e[e.length-2]===`
|
|
150
|
+
`||e===`
|
|
151
|
+
`),s=n?"+":i?"":"-";return r+s+`
|
|
152
|
+
`}m(sc,"blockHeader");function ac(e){return e[e.length-1]===`
|
|
153
|
+
`?e.slice(0,-1):e}m(ac,"dropEndingNewline");function oy(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
|
|
154
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,oc(e.slice(0,c),t)}(),n=e[0]===`
|
|
155
|
+
`||e[0]===" ",s,o;o=r.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?`
|
|
156
|
+
`:"")+oc(l,t),n=s}return i}m(oy,"foldString");function oc(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=r.exec(e);)a=i.index,a-n>t&&(s=o>n?o:a,l+=`
|
|
157
|
+
`+e.slice(n,s),n=s+1),o=a;return l+=`
|
|
158
|
+
`,e.length-n>t&&o>n?l+=e.slice(n,o)+`
|
|
159
|
+
`+e.slice(o+1):l+=e.slice(n),l.slice(1)}m(oc,"foldLine");function ly(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Ti(e,n),i=se[r],!i&&Ui(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Zm(r);return t}m(ly,"escapeString");function cy(e,t,r){var i="",n=e.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],e.replacer&&(a=e.replacer.call(r,String(s),a)),(Ze(e,t,a,!1,!1)||typeof a>"u"&&Ze(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}m(cy,"writeFlowSequence");function lc(e,t,r,i){var n="",s=e.tag,o,a,l;for(o=0,a=r.length;o<a;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Ze(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ze(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Ba(e,t)),e.dump&&Xn===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=s,e.dump=n||"[]"}m(lc,"writeBlockSequence");function hy(e,t,r){var i="",n=e.tag,s=Object.keys(r),o,a,l,c,h;for(o=0,a=s.length;o<a;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Ze(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ze(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}m(hy,"writeFlowMapping");function uy(e,t,r,i){var n="",s=e.tag,o=Object.keys(r),a,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new xe("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)f="",(!i||n!=="")&&(f+=Ba(e,t)),c=o[a],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Ze(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Xn===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Ba(e,t)),Ze(e,t+1,h,!0,u)&&(e.dump&&Xn===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=s,e.dump=n||"{}"}m(uy,"writeBlockMapping");function cc(e,t,r){var i,n,s,o,a,l;for(n=r?e.explicitTypes:e.implicitTypes,s=0,o=n.length;s<o;s+=1)if(a=n[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,qm.call(a.represent)==="[object Function]")i=a.represent(t,l);else if(Hm.call(a.represent,l))i=a.represent[l](t,l);else throw new xe("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}m(cc,"detectType");function Ze(e,t,r,i,n,s,o){e.tag=null,e.dump=r,cc(e,r,!1)||cc(e,r,!0);var a=qm.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=a==="[object Object]"||a==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),a==="[object Object]")i&&Object.keys(e.dump).length!==0?(uy(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(hy(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(a==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?lc(e,t-1,e.dump,n):lc(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(cy(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&ay(e,e.dump,t,s,l);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new xe("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}m(Ze,"writeNode");function fy(e,t){var r=[],i=[],n,s;for(Oa(e,r,i),n=0,s=i.length;n<s;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(s)}m(fy,"getDuplicateReferences");function Oa(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)Oa(e[n],t,r);else for(i=Object.keys(e),n=0,s=i.length;n<s;n+=1)Oa(e[i[n]],t,r)}m(Oa,"inspectNode");function VT(e,t){t=t||{};var r=new Qm(t);r.noRefs||fy(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ze(r,0,i,!0,!0)?r.dump+`
|
|
160
|
+
`:""}m(VT,"dump$1");function GT(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.")}}m(GT,"renamed");var dy=im,py=ET.load;/*! Bundled license information:
|
|
161
|
+
|
|
162
|
+
js-yaml/dist/js-yaml.mjs:
|
|
163
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
164
|
+
*/var Ee={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Mn(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Ft(e),t=Ft(t);const[r,i]=[e.x,e.y],[n,s]=[t.x,t.y],o=n-r,a=s-i;return{angle:Math.atan(a/o),deltaX:o,deltaY:a}}m(Mn,"calculateDeltaAndAngle");var Ft=m(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),gy=m(e=>({x:m(function(t,r,i){let n=0;const s=Ft(i[0]).x<Ft(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ee,e.arrowTypeStart)){const{angle:d,deltaX:p}=Mn(i[0],i[1]);n=Ee[e.arrowTypeStart]*Math.cos(d)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ee,e.arrowTypeEnd)){const{angle:d,deltaX:p}=Mn(i[i.length-1],i[i.length-2]);n=Ee[e.arrowTypeEnd]*Math.cos(d)*(p>=0?1:-1)}const o=Math.abs(Ft(t).x-Ft(i[i.length-1]).x),a=Math.abs(Ft(t).y-Ft(i[i.length-1]).y),l=Math.abs(Ft(t).x-Ft(i[0]).x),c=Math.abs(Ft(t).y-Ft(i[0]).y),h=Ee[e.arrowTypeStart],u=Ee[e.arrowTypeEnd],f=1;if(o<u&&o>0&&a<u){let d=u+f-o;d*=s==="right"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=s==="right"?-1:1,n+=d}return Ft(t).x+n},"x"),y:m(function(t,r,i){let n=0;const s=Ft(i[0]).y<Ft(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ee,e.arrowTypeStart)){const{angle:d,deltaY:p}=Mn(i[0],i[1]);n=Ee[e.arrowTypeStart]*Math.abs(Math.sin(d))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ee,e.arrowTypeEnd)){const{angle:d,deltaY:p}=Mn(i[i.length-1],i[i.length-2]);n=Ee[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(p>=0?1:-1)}const o=Math.abs(Ft(t).y-Ft(i[i.length-1]).y),a=Math.abs(Ft(t).x-Ft(i[i.length-1]).x),l=Math.abs(Ft(t).y-Ft(i[0]).y),c=Math.abs(Ft(t).x-Ft(i[0]).x),h=Ee[e.arrowTypeStart],u=Ee[e.arrowTypeEnd],f=1;if(o<u&&o>0&&a<u){let d=u+f-o;d*=s==="up"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=s==="up"?-1:1,n+=d}return Ft(t).y+n},"y")}),"getLineFunctionsWithOffset"),uo=m(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),XT=m(e=>{const{handDrawnSeed:t}=Et();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Qi=m(e=>{const t=KT([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),KT=m(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),bh=m(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=m(e=>{const{stylesArray:t}=Qi(e),r=[],i=[],n=[],s=[];return t.forEach(o=>{const a=o[0];bh(a)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),a.includes("stroke")&&n.push(o.join(":")+" !important"),a==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:s}},"styles2String"),at=m((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Et(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:o}=Qi(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:ZT(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),ZT=m(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"),xn={},Yt={},Pf;function QT(){return Pf||(Pf=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.BLANK_URL=Yt.relativeFirstCharacters=Yt.whitespaceEscapeCharsRegex=Yt.urlSchemeRegex=Yt.ctrlCharactersRegex=Yt.htmlCtrlEntityRegex=Yt.htmlEntitiesRegex=Yt.invalidProtocolRegex=void 0,Yt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Yt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Yt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Yt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Yt.urlSchemeRegex=/^.+(:|:)/gim,Yt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Yt.relativeFirstCharacters=[".","/"],Yt.BLANK_URL="about:blank"),Yt}var jf;function JT(){if(jf)return xn;jf=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.sanitizeUrl=void 0;var e=QT();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var a=o.replace(e.ctrlCharactersRegex,"");return a.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var a,l=n(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),a=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d}return xn.sanitizeUrl=s,xn}var my=JT(),yy=typeof global=="object"&&global&&global.Object===Object&&global,tE=typeof self=="object"&&self&&self.Object===Object&&self,tr=yy||tE||Function("return this")(),Qn=tr.Symbol,by=Object.prototype,eE=by.hasOwnProperty,rE=by.toString,vn=Qn?Qn.toStringTag:void 0;function iE(e){var t=eE.call(e,vn),r=e[vn];try{e[vn]=void 0;var i=!0}catch{}var n=rE.call(e);return i&&(t?e[vn]=r:delete e[vn]),n}var nE=Object.prototype,sE=nE.toString;function aE(e){return sE.call(e)}var oE="[object Null]",lE="[object Undefined]",zf=Qn?Qn.toStringTag:void 0;function oi(e){return e==null?e===void 0?lE:oE:zf&&zf in Object(e)?iE(e):aE(e)}function Mr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cE="[object AsyncFunction]",hE="[object Function]",uE="[object GeneratorFunction]",fE="[object Proxy]";function fo(e){if(!Mr(e))return!1;var t=oi(e);return t==hE||t==uE||t==cE||t==fE}var nl=tr["__core-js_shared__"],Wf=function(){var e=/[^.]+$/.exec(nl&&nl.keys&&nl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dE(e){return!!Wf&&Wf in e}var pE=Function.prototype,gE=pE.toString;function li(e){if(e!=null){try{return gE.call(e)}catch{}try{return e+""}catch{}}return""}var mE=/[\\^$.*+?()[\]{}|]/g,yE=/^\[object .+?Constructor\]$/,bE=Function.prototype,xE=Object.prototype,vE=bE.toString,wE=xE.hasOwnProperty,CE=RegExp("^"+vE.call(wE).replace(mE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _E(e){if(!Mr(e)||dE(e))return!1;var t=fo(e)?CE:yE;return t.test(li(e))}function SE(e,t){return e?.[t]}function ci(e,t){var r=SE(e,t);return _E(r)?r:void 0}var Jn=ci(Object,"create");function kE(){this.__data__=Jn?Jn(null):{},this.size=0}function TE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var EE="__lodash_hash_undefined__",LE=Object.prototype,AE=LE.hasOwnProperty;function $E(e){var t=this.__data__;if(Jn){var r=t[e];return r===EE?void 0:r}return AE.call(t,e)?t[e]:void 0}var ME=Object.prototype,BE=ME.hasOwnProperty;function OE(e){var t=this.__data__;return Jn?t[e]!==void 0:BE.call(t,e)}var RE="__lodash_hash_undefined__";function DE(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Jn&&t===void 0?RE:t,this}function ri(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])}}ri.prototype.clear=kE;ri.prototype.delete=TE;ri.prototype.get=$E;ri.prototype.has=OE;ri.prototype.set=DE;function FE(){this.__data__=[],this.size=0}function cs(e,t){return e===t||e!==e&&t!==t}function po(e,t){for(var r=e.length;r--;)if(cs(e[r][0],t))return r;return-1}var IE=Array.prototype,NE=IE.splice;function PE(e){var t=this.__data__,r=po(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():NE.call(t,r,1),--this.size,!0}function jE(e){var t=this.__data__,r=po(t,e);return r<0?void 0:t[r][1]}function zE(e){return po(this.__data__,e)>-1}function WE(e,t){var r=this.__data__,i=po(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function xr(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])}}xr.prototype.clear=FE;xr.prototype.delete=PE;xr.prototype.get=jE;xr.prototype.has=zE;xr.prototype.set=WE;var ts=ci(tr,"Map");function qE(){this.size=0,this.__data__={hash:new ri,map:new(ts||xr),string:new ri}}function HE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function go(e,t){var r=e.__data__;return HE(t)?r[typeof t=="string"?"string":"hash"]:r.map}function UE(e){var t=go(this,e).delete(e);return this.size-=t?1:0,t}function YE(e){return go(this,e).get(e)}function VE(e){return go(this,e).has(e)}function GE(e,t){var r=go(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function vr(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])}}vr.prototype.clear=qE;vr.prototype.delete=UE;vr.prototype.get=YE;vr.prototype.has=VE;vr.prototype.set=GE;var XE="Expected a function";function Ji(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(XE);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 o=e.apply(this,i);return r.cache=s.set(n,o)||s,o};return r.cache=new(Ji.Cache||vr),r}Ji.Cache=vr;function KE(){this.__data__=new xr,this.size=0}function ZE(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function QE(e){return this.__data__.get(e)}function JE(e){return this.__data__.has(e)}var tL=200;function eL(e,t){var r=this.__data__;if(r instanceof xr){var i=r.__data__;if(!ts||i.length<tL-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new vr(i)}return r.set(e,t),this.size=r.size,this}function hi(e){var t=this.__data__=new xr(e);this.size=t.size}hi.prototype.clear=KE;hi.prototype.delete=ZE;hi.prototype.get=QE;hi.prototype.has=JE;hi.prototype.set=eL;var Ra=function(){try{var e=ci(Object,"defineProperty");return e({},"",{}),e}catch{}}();function mo(e,t,r){t=="__proto__"&&Ra?Ra(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function hc(e,t,r){(r!==void 0&&!cs(e[t],r)||r===void 0&&!(t in e))&&mo(e,t,r)}function rL(e){return function(t,r,i){for(var n=-1,s=Object(t),o=i(t),a=o.length;a--;){var l=o[++n];if(r(s[l],l,s)===!1)break}return t}}var xy=rL(),vy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qf=vy&&typeof module=="object"&&module&&!module.nodeType&&module,iL=qf&&qf.exports===vy,Hf=iL?tr.Buffer:void 0,Uf=Hf?Hf.allocUnsafe:void 0;function wy(e,t){if(t)return e.slice();var r=e.length,i=Uf?Uf(r):new e.constructor(r);return e.copy(i),i}var uc=tr.Uint8Array;function Cy(e){var t=new e.constructor(e.byteLength);return new uc(t).set(new uc(e)),t}function _y(e,t){var r=t?Cy(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Sy(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Yf=Object.create,nL=function(){function e(){}return function(t){if(!Mr(t))return{};if(Yf)return Yf(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function ky(e,t){return function(r){return e(t(r))}}var xh=ky(Object.getPrototypeOf,Object),sL=Object.prototype;function hs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||sL;return e===r}function Ty(e){return typeof e.constructor=="function"&&!hs(e)?nL(xh(e)):{}}function tn(e){return e!=null&&typeof e=="object"}var aL="[object Arguments]";function Vf(e){return tn(e)&&oi(e)==aL}var Ey=Object.prototype,oL=Ey.hasOwnProperty,lL=Ey.propertyIsEnumerable,es=Vf(function(){return arguments}())?Vf:function(e){return tn(e)&&oL.call(e,"callee")&&!lL.call(e,"callee")},rs=Array.isArray,cL=9007199254740991;function vh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cL}function us(e){return e!=null&&vh(e.length)&&!fo(e)}function Ly(e){return tn(e)&&us(e)}function hL(){return!1}var Ay=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gf=Ay&&typeof module=="object"&&module&&!module.nodeType&&module,uL=Gf&&Gf.exports===Ay,Xf=uL?tr.Buffer:void 0,fL=Xf?Xf.isBuffer:void 0,yo=fL||hL,dL="[object Object]",pL=Function.prototype,gL=Object.prototype,$y=pL.toString,mL=gL.hasOwnProperty,yL=$y.call(Object);function bL(e){if(!tn(e)||oi(e)!=dL)return!1;var t=xh(e);if(t===null)return!0;var r=mL.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&$y.call(r)==yL}var xL="[object Arguments]",vL="[object Array]",wL="[object Boolean]",CL="[object Date]",_L="[object Error]",SL="[object Function]",kL="[object Map]",TL="[object Number]",EL="[object Object]",LL="[object RegExp]",AL="[object Set]",$L="[object String]",ML="[object WeakMap]",BL="[object ArrayBuffer]",OL="[object DataView]",RL="[object Float32Array]",DL="[object Float64Array]",FL="[object Int8Array]",IL="[object Int16Array]",NL="[object Int32Array]",PL="[object Uint8Array]",jL="[object Uint8ClampedArray]",zL="[object Uint16Array]",WL="[object Uint32Array]",Rt={};Rt[RL]=Rt[DL]=Rt[FL]=Rt[IL]=Rt[NL]=Rt[PL]=Rt[jL]=Rt[zL]=Rt[WL]=!0;Rt[xL]=Rt[vL]=Rt[BL]=Rt[wL]=Rt[OL]=Rt[CL]=Rt[_L]=Rt[SL]=Rt[kL]=Rt[TL]=Rt[EL]=Rt[LL]=Rt[AL]=Rt[$L]=Rt[ML]=!1;function qL(e){return tn(e)&&vh(e.length)&&!!Rt[oi(e)]}function My(e){return function(t){return e(t)}}var By=typeof exports=="object"&&exports&&!exports.nodeType&&exports,jn=By&&typeof module=="object"&&module&&!module.nodeType&&module,HL=jn&&jn.exports===By,sl=HL&&yy.process,fc=function(){try{var e=jn&&jn.require&&jn.require("util").types;return e||sl&&sl.binding&&sl.binding("util")}catch{}}(),Kf=fc&&fc.isTypedArray,bo=Kf?My(Kf):qL;function dc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var UL=Object.prototype,YL=UL.hasOwnProperty;function Oy(e,t,r){var i=e[t];(!(YL.call(e,t)&&cs(i,r))||r===void 0&&!(t in e))&&mo(e,t,r)}function Ry(e,t,r,i){var n=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),n?mo(r,a,l):Oy(r,a,l)}return r}function VL(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var GL=9007199254740991,XL=/^(?:0|[1-9]\d*)$/;function wh(e,t){var r=typeof e;return t=t??GL,!!t&&(r=="number"||r!="symbol"&&XL.test(e))&&e>-1&&e%1==0&&e<t}var KL=Object.prototype,ZL=KL.hasOwnProperty;function Dy(e,t){var r=rs(e),i=!r&&es(e),n=!r&&!i&&yo(e),s=!r&&!i&&!n&&bo(e),o=r||i||n||s,a=o?VL(e.length,String):[],l=a.length;for(var c in e)(t||ZL.call(e,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wh(c,l)))&&a.push(c);return a}function QL(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var JL=Object.prototype,tA=JL.hasOwnProperty;function eA(e){if(!Mr(e))return QL(e);var t=hs(e),r=[];for(var i in e)i=="constructor"&&(t||!tA.call(e,i))||r.push(i);return r}function Ch(e){return us(e)?Dy(e,!0):eA(e)}function rA(e){return Ry(e,Ch(e))}function iA(e,t,r,i,n,s,o){var a=dc(e,r),l=dc(t,r),c=o.get(l);if(c){hc(e,r,c);return}var h=s?s(a,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=rs(l),d=!f&&yo(l),p=!f&&!d&&bo(l);h=l,f||d||p?rs(a)?h=a:Ly(a)?h=Sy(a):d?(u=!1,h=wy(l,!0)):p?(u=!1,h=_y(l,!0)):h=[]:bL(l)||es(l)?(h=a,es(a)?h=rA(a):(!Mr(a)||fo(a))&&(h=Ty(l))):u=!1}u&&(o.set(l,h),n(h,l,i,s,o),o.delete(l)),hc(e,r,h)}function Fy(e,t,r,i,n){e!==t&&xy(t,function(s,o){if(n||(n=new hi),Mr(s))iA(e,t,o,r,Fy,i,n);else{var a=i?i(dc(e,o),s,o+"",e,t,n):void 0;a===void 0&&(a=s),hc(e,o,a)}},Ch)}function _h(e){return e}function nA(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 Zf=Math.max;function Iy(e,t,r){return t=Zf(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,s=Zf(i.length-t,0),o=Array(s);++n<s;)o[n]=i[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=i[n];return a[t]=r(o),nA(e,this,a)}}function Ny(e){return function(){return e}}var sA=Ra?function(e,t){return Ra(e,"toString",{configurable:!0,enumerable:!1,value:Ny(t),writable:!0})}:_h,aA=800,oA=16,lA=Date.now;function cA(e){var t=0,r=0;return function(){var i=lA(),n=oA-(i-r);if(r=i,n>0){if(++t>=aA)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Py=cA(sA);function jy(e,t){return Py(Iy(e,t,_h),e+"")}function zy(e,t,r){if(!Mr(r))return!1;var i=typeof t;return(i=="number"?us(r)&&wh(t,r.length):i=="string"&&t in r)?cs(r[t],e):!1}function Wy(e){return jy(function(t,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(n--,s):void 0,o&&zy(r[0],r[1],o)&&(s=n<3?void 0:s,n=1),t=Object(t);++i<n;){var a=r[i];a&&e(t,a,i,s)}return t})}var qy=Wy(function(e,t,r){Fy(e,t,r)}),Hy="",hA={curveBasis:Pn,curveBasisClosed:F2,curveBasisOpen:I2,curveBumpX:ug,curveBumpY:fg,curveBundle:N2,curveCardinalClosed:P2,curveCardinalOpen:j2,curveCardinal:mg,curveCatmullRomClosed:z2,curveCatmullRomOpen:W2,curveCatmullRom:bg,curveLinear:Sa,curveLinearClosed:q2,curveMonotoneX:Sg,curveMonotoneY:kg,curveNatural:Eg,curveStep:Lg,curveStepAfter:$g,curveStepBefore:Ag},uA=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,fA=m(function(e,t){const r=Uy(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(a=>a.args);da(o),i=zt(i,[...o])}else i=r.args;if(!i)return;let n=Hc(e,t);const s="config";return i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s]),i},"detectInit"),Uy=m(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${uA.source})(?=[}][%]{2}).*
|
|
165
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),V.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=In.exec(e))!==null;)if(i.index===In.lastIndex&&In.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:s,args:o})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return V.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),dA=m(function(e){return e.replace(In,"")},"removeDirectives"),pA=m(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Sh(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return hA[r]??t}m(Sh,"interpolateToCurve");function Yy(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?my.sanitizeUrl(r):r}m(Yy,"formatUrl");var gA=m((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){V.error(`Function name: ${e} not found in window`);return}s[n](...t)},"runFunc");function kh(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}m(kh,"distance");function Vy(e){let t,r=0;e.forEach(n=>{r+=kh(n,t),t=n});const i=r/2;return Th(e,i)}m(Vy,"traverseEdge");function Gy(e){return e.length===1?e[0]:Vy(e)}m(Gy,"calcLabelPosition");var Qf=m((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Th=m((e,t)=>{let r,i=t;for(const n of e){if(r){const s=kh(n,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:Qf((1-o)*r.x+o*n.x,5),y:Qf((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),mA=m((e,t,r)=>{V.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Th(t,25),s=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),a={x:0,y:0};return a.x=Math.sin(o)*s+(t[0].x+n.x)/2,a.y=-Math.cos(o)*s+(t[0].y+n.y)/2,a},"calcCardinalityPosition");function Xy(e,t,r){const i=structuredClone(r);V.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,s=Th(i,n),o=10+e*.5,a=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(a+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(a+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(a-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(a-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(a)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(a)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(a)*o+(i[0].x+s.x)/2,l.y=-Math.cos(a)*o+(i[0].y+s.y)/2),l}m(Xy,"calcTerminalLabelPosition");function Eh(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}}m(Eh,"getStylesFromArray");var Jf=0,Ky=m(()=>(Jf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Jf),"generateId");function Zy(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}m(Zy,"makeRandomHex");var Qy=m(e=>Zy(e.length),"random"),yA=m(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"),bA=m(function(e,t){const r=t.text.replace(ai.lineBreakRegex," "),[,i]=fs(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"),Jy=Ji((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ai.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let s="";return i.forEach((o,a)=>{const l=Qe(`${o} `,r),c=Qe(s,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=xA(o,t,"-",r);n.push(s,...f),s=d}else c+l>=t?(n.push(s),s=o):s=[s,o].filter(Boolean).join(" ");a+1===i.length&&n.push(s)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),xA=Ji((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],s=[];let o="";return n.forEach((a,l)=>{const c=`${o}${a}`;if(Qe(c,i)>=t){const u=l+1,f=n.length===u,d=`${c}${r}`;s.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Lh(e,t){return Ah(e,t).height}m(Lh,"calculateTextHeight");function Qe(e,t){return Ah(e,t).width}m(Qe,"calculateTextWidth");var Ah=Ji((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,s]=fs(r),o=["sans-serif",i],a=e.split(ai.lineBreakRegex),l=[],c=kt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const p={width:0,height:0,lineHeight:0};for(const g of a){const y=yA();y.text=g||Hy;const b=bA(h,y).style("font-size",s).style("font-weight",n).style("font-family",f),x=(b._groups||b)[0][0].getBBox();if(x.width===0&&x.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,x.width)),d=Math.round(x.height),p.height+=d,p.lineHeight=Math.round(Math.max(p.lineHeight,d))}l.push(p)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ni,vA=(Ni=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},m(Ni,"InitIDGenerator"),Ni),Rs,wA=m(function(e){return Rs=Rs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Rs.innerHTML=e,unescape(Rs.textContent)},"entityDecode");function $h(e){return"str"in e}m($h,"isDetailedError");var CA=m((e,t,r,i)=>{if(!i)return;const n=e.node()?.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"),fs=m(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 xo(e,t){return qy({},e,t)}m(xo,"cleanAndMerge");var Le={assignWithDepth:zt,wrapLabel:Jy,calculateTextHeight:Lh,calculateTextWidth:Qe,calculateTextDimensions:Ah,cleanAndMerge:xo,detectInit:fA,detectDirective:Uy,isSubstringInArray:pA,interpolateToCurve:Sh,calcLabelPosition:Gy,calcCardinalityPosition:mA,calcTerminalLabelPosition:Xy,formatUrl:Yy,getStylesFromArray:Eh,generateId:Ky,random:Qy,runFunc:gA,entityDecode:wA,insertTitle:CA,isLabelCoordinateInPath:t0,parseFontSize:fs,InitIDGenerator:vA},_A=m(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"),Br=m(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),SA=m((e,t,{counter:r=0,prefix:i,suffix:n},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function ne(e){return e??null}m(ne,"handleUndefinedAttr");function t0(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())}m(t0,"isLabelCoordinateInPath");const kA=Object.freeze({left:0,top:0,width:16,height:16}),Da=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),e0=Object.freeze({...kA,...Da}),TA=Object.freeze({...e0,body:"",hidden:!1}),EA=Object.freeze({width:null,height:null}),LA=Object.freeze({...EA,...Da}),AA=(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 a=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:a};return al(c)?c:null}const s=n[0],o=s.split("-");if(o.length>1){const a={provider:i,prefix:o.shift(),name:o.join("-")};return al(a)?a:null}if(r&&i===""){const a={provider:i,prefix:"",name:s};return al(a,r)?a:null}return null},al=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function $A(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 td(e,t){const r=$A(e,t);for(const i in TA)i in Da?i in e&&!(i in r)&&(r[i]=Da[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function MA(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const a=i[o]&&i[o].parent,l=a&&s(a);l&&(n[o]=[a].concat(l))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),n}function ed(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let s={};function o(a){s=td(i[a]||n[a],s)}return o(t),r.forEach(o),td(e,s)}function BA(e,t){if(e.icons[t])return ed(e,t,[]);const r=MA(e,[t])[t];return r?ed(e,t,r):null}const OA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,RA=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function rd(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(OA);if(i===null||!i.length)return e;const n=[];let s=i.shift(),o=RA.test(s);for(;;){if(o){const a=parseFloat(s);isNaN(a)?n.push(s):n.push(Math.ceil(a*t*r)/r)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");o=!o}}function DA(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 o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function FA(e,t){return e?"<defs>"+e+"</defs>"+t:t}function IA(e,t,r){const i=DA(e);return FA(i.defs,t+i.content+r)}const NA=e=>e==="unset"||e==="undefined"||e==="none";function PA(e,t){const r={...e0,...e},i={...LA,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(g=>{const y=[],b=g.hFlip,x=g.vFlip;let w=g.rotate;b?x?w+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):x&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let C;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:C=n.height/2+n.top,y.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:C=n.width/2+n.left,y.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}w%2===1&&(n.left!==n.top&&(C=n.left,n.left=n.top,n.top=C),n.width!==n.height&&(C=n.width,n.width=n.height,n.height=C)),y.length&&(s=IA(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,a=i.height,l=n.width,c=n.height;let h,u;o===null?(u=a===null?"1em":a==="auto"?c:a,h=rd(u,l/c)):(h=o==="auto"?l:o,u=a===null?rd(h,c/l):a==="auto"?c:a);const f={},d=(g,y)=>{NA(y)||(f[g]=y.toString())};d("width",h),d("height",u);const p=[n.left,n.top,l,c];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:s}}const jA=/\sid="(\S+)"/g,zA="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let WA=0;function qA(e,t=zA){const r=[];let i;for(;i=jA.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const o=typeof t=="function"?t(s):t+(WA++).toString(),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function HA(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 Mh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ui=Mh();function r0(e){ui=e}var zn={exec:()=>null};function Bt(e,t=""){let r=typeof e=="string"?e:e.source;const i={replace:(n,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(ue.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var ue={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")},UA=/^(?:[ \t]*(?:\n|$))+/,YA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,VA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ds=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,GA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bh=/(?:[*+-]|\d{1,9}[.)])/,i0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,n0=Bt(i0).replace(/bull/g,Bh).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(),XA=Bt(i0).replace(/bull/g,Bh).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(),Oh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,KA=/^[^\n]+/,Rh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ZA=Bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Rh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),QA=Bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bh).getRegex(),vo="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",Dh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,JA=Bt("^ {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",Dh).replace("tag",vo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),s0=Bt(Oh).replace("hr",ds).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",vo).getRegex(),t$=Bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",s0).getRegex(),Fh={blockquote:t$,code:YA,def:ZA,fences:VA,heading:GA,hr:ds,html:JA,lheading:n0,list:QA,newline:UA,paragraph:s0,table:zn,text:KA},id=Bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ds).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",vo).getRegex(),e$={...Fh,lheading:XA,table:id,paragraph:Bt(Oh).replace("hr",ds).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",id).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",vo).getRegex()},r$={...Fh,html:Bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dh).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:zn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Bt(Oh).replace("hr",ds).replace("heading",` *#{1,6} *[^
|
|
166
|
+
]`).replace("lheading",n0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},i$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,n$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,a0=/^( {2,}|\\)\n(?!\s*$)/,s$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,wo=/[\p{P}\p{S}]/u,Ih=/[\s\p{P}\p{S}]/u,o0=/[^\s\p{P}\p{S}]/u,a$=Bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ih).getRegex(),l0=/(?!~)[\p{P}\p{S}]/u,o$=/(?!~)[\s\p{P}\p{S}]/u,l$=/(?:[^\s\p{P}\p{S}]|~)/u,c$=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,c0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,h$=Bt(c0,"u").replace(/punct/g,wo).getRegex(),u$=Bt(c0,"u").replace(/punct/g,l0).getRegex(),h0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",f$=Bt(h0,"gu").replace(/notPunctSpace/g,o0).replace(/punctSpace/g,Ih).replace(/punct/g,wo).getRegex(),d$=Bt(h0,"gu").replace(/notPunctSpace/g,l$).replace(/punctSpace/g,o$).replace(/punct/g,l0).getRegex(),p$=Bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,o0).replace(/punctSpace/g,Ih).replace(/punct/g,wo).getRegex(),g$=Bt(/\\(punct)/,"gu").replace(/punct/g,wo).getRegex(),m$=Bt(/^<(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(),y$=Bt(Dh).replace("(?:-->|$)","-->").getRegex(),b$=Bt("^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",y$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Fa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,x$=Bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Fa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),u0=Bt(/^!?\[(label)\]\[(ref)\]/).replace("label",Fa).replace("ref",Rh).getRegex(),f0=Bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Rh).getRegex(),v$=Bt("reflink|nolink(?!\\()","g").replace("reflink",u0).replace("nolink",f0).getRegex(),Nh={_backpedal:zn,anyPunctuation:g$,autolink:m$,blockSkip:c$,br:a0,code:n$,del:zn,emStrongLDelim:h$,emStrongRDelimAst:f$,emStrongRDelimUnd:p$,escape:i$,link:x$,nolink:f0,punctuation:a$,reflink:u0,reflinkSearch:v$,tag:b$,text:s$,url:zn},w$={...Nh,link:Bt(/^!?\[(label)\]\((.*?)\)/).replace("label",Fa).getRegex(),reflink:Bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Fa).getRegex()},pc={...Nh,emStrongRDelimAst:d$,emStrongLDelim:u$,url:Bt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},C$={...pc,br:Bt(a0).replace("{2,}","*").getRegex(),text:Bt(pc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ds={normal:Fh,gfm:e$,pedantic:r$},wn={normal:Nh,gfm:pc,breaks:C$,pedantic:w$},_$={"&":"&","<":"<",">":">",'"':""","'":"'"},nd=e=>_$[e];function He(e,t){if(t){if(ue.escapeTest.test(e))return e.replace(ue.escapeReplace,nd)}else if(ue.escapeTestNoEncode.test(e))return e.replace(ue.escapeReplaceNoEncode,nd);return e}function sd(e){try{e=encodeURI(e).replace(ue.percentDecode,"%")}catch{return null}return e}function ad(e,t){const r=e.replace(ue.findPipe,(s,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(ue.splitPipe);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.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(ue.slashPipe,"|");return i}function Cn(e,t,r){const 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 S$(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 od(e,t,r,i,n){const s=t.href,o=t.title||null,a=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function k$(e,t,r){const i=e.match(r.other.indentCodeCompensation);if(i===null)return t;const n=i[1];return t.split(`
|
|
167
|
+
`).map(s=>{const o=s.match(r.other.beginningSpace);if(o===null)return s;const[a]=o;return a.length>=n.length?s.slice(n.length):s}).join(`
|
|
168
|
+
`)}var Ia=class{options;rules;lexer;constructor(e){this.options=e||ui}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Cn(r,`
|
|
169
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],i=k$(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const i=Cn(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Cn(t[0],`
|
|
170
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=Cn(t[0],`
|
|
171
|
+
`).split(`
|
|
172
|
+
`),i="",n="";const s=[];for(;r.length>0;){let o=!1;const a=[];let l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))a.push(r[l]),o=!0;else if(!o)a.push(r[l]);else break;r=r.slice(l);const c=a.join(`
|
|
173
|
+
`),h=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
174
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
175
|
+
${c}`:c,n=n?`${n}
|
|
176
|
+
${h}`:h;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=u,r.length===0)break;const f=s.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){const d=f,p=d.raw+`
|
|
177
|
+
`+r.join(`
|
|
178
|
+
`),g=this.blockquote(p);s[s.length-1]=g,i=i.substring(0,i.length-d.raw.length)+g.raw,n=n.substring(0,n.length-d.text.length)+g.text;break}else if(f?.type==="list"){const d=f,p=d.raw+`
|
|
179
|
+
`+r.join(`
|
|
180
|
+
`),g=this.list(p);s[s.length-1]=g,i=i.substring(0,i.length-f.raw.length)+g.raw,n=n.substring(0,n.length-d.raw.length)+g.raw,r=p.substring(s.at(-1).raw.length).split(`
|
|
181
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const s=this.rules.other.listItemRegex(r);let o=!1;for(;e;){let l=!1,c="",h="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let u=t[2].split(`
|
|
182
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=e.split(`
|
|
183
|
+
`,1)[0],d=!u.trim(),p=0;if(this.options.pedantic?(p=2,h=u.trimStart()):d?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,h=u.slice(p),p+=t[1].length),d&&this.rules.other.blankLine.test(f)&&(c+=f+`
|
|
184
|
+
`,e=e.substring(f.length+1),l=!0),!l){const b=this.rules.other.nextBulletRegex(p),x=this.rules.other.hrRegex(p),w=this.rules.other.fencesBeginRegex(p),C=this.rules.other.headingBeginRegex(p),v=this.rules.other.htmlBeginRegex(p);for(;e;){const E=e.split(`
|
|
185
|
+
`,1)[0];let T;if(f=E,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),T=f):T=f.replace(this.rules.other.tabCharGlobal," "),w.test(f)||C.test(f)||v.test(f)||b.test(f)||x.test(f))break;if(T.search(this.rules.other.nonSpaceChar)>=p||!f.trim())h+=`
|
|
186
|
+
`+T.slice(p);else{if(d||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(u)||C.test(u)||x.test(u))break;h+=`
|
|
187
|
+
`+f}!d&&!f.trim()&&(d=!0),c+=E+`
|
|
188
|
+
`,e=e.substring(E.length+1),u=T.slice(p)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let g=null,y;this.options.gfm&&(g=this.rules.other.listIsTask.exec(h),g&&(y=g[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:c,task:!!g,checked:y,loose:!1,text:h,tokens:[]}),n.raw+=c}const a=n.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l=0;l<n.items.length;l++)if(this.lexer.state.top=!1,n.items[l].tokens=this.lexer.blockTokens(n.items[l].text,[]),!n.loose){const c=n.items[l].tokens.filter(u=>u.type==="space"),h=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=h}if(n.loose)for(let l=0;l<n.items.length;l++)n.items[l].loose=!0;return n}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=ad(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
189
|
+
`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const o of i)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<r.length;o++)s.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:s.align[o]});for(const o of n)s.rows.push(ad(o,s.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:s.align[l]})));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
190
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const s=Cn(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=S$(t[2],"()");if(s===-2)return;if(s>-1){const a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],n=s[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),od(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return od(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const s=[...i[0]].length-1;let o,a,l=s,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+s);(i=h.exec(t))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(a=[...o].length,i[3]||i[4]){l+=a;continue}else if((i[5]||i[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);const u=[...i[0]][0].length,f=e.slice(0,s+i.index+u+a);if(Math.min(s,a)%2){const p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}const d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},fr=class gc{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ui,this.options.tokenizer=this.options.tokenizer||new Ia,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:ue,block:Ds.normal,inline:wn.normal};this.options.pedantic?(r.block=Ds.pedantic,r.inline=wn.pedantic):this.options.gfm&&(r.block=Ds.gfm,this.options.breaks?r.inline=wn.breaks:r.inline=wn.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ds,inline:wn}}static lex(t,r){return new gc(r).lex(t)}static lexInline(t,r){return new gc(r).inlineTokens(t)}lex(t){t=t.replace(ue.carriageReturn,`
|
|
191
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(ue.tabCharGlobal," ").replace(ue.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);const o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
|
|
192
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
|
|
193
|
+
`+n.raw,o.text+=`
|
|
194
|
+
`+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
|
|
195
|
+
`+n.raw,o.text+=`
|
|
196
|
+
`+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0;const a=t.slice(1);let l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s))){const o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=`
|
|
197
|
+
`+n.raw,o.text+=`
|
|
198
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),i=s.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);const o=r.at(-1);o?.type==="text"?(o.raw+=`
|
|
199
|
+
`+n.raw,o.text+=`
|
|
200
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){const a=Object.keys(this.tokens.links);if(a.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)a.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);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,o="";for(;t;){s||(o=""),s=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);const c=r.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(a=this.tokenizer.emStrong(t,i,o)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),r.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),r.push(a);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0;const h=t.slice(1);let u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),s=!0;const c=r.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},Na=class{options;parser;constructor(e){this.options=e||ui}space(e){return""}code({text:e,lang:t,escaped:r}){const i=(t||"").match(ue.notSpaceStart)?.[0],n=e.replace(ue.endingNewline,"")+`
|
|
201
|
+
`;return i?'<pre><code class="language-'+He(i)+'">'+(r?n:He(n,!0))+`</code></pre>
|
|
202
|
+
`:"<pre><code>"+(r?n:He(n,!0))+`</code></pre>
|
|
203
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
204
|
+
${this.parser.parse(e)}</blockquote>
|
|
205
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
206
|
+
`}hr(e){return`<hr>
|
|
207
|
+
`}list(e){const t=e.ordered,r=e.start;let i="";for(let o=0;o<e.items.length;o++){const a=e.items[o];i+=this.listitem(a)}const n=t?"ol":"ul",s=t&&r!==1?' start="'+r+'"':"";return"<"+n+s+`>
|
|
208
|
+
`+i+"</"+n+`>
|
|
209
|
+
`}listitem(e){let t="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+He(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
210
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
211
|
+
`}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let i="";for(let n=0;n<e.rows.length;n++){const s=e.rows[n];r="";for(let o=0;o<s.length;o++)r+=this.tablecell(s[o]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
212
|
+
<thead>
|
|
213
|
+
`+t+`</thead>
|
|
214
|
+
`+i+`</table>
|
|
215
|
+
`}tablerow({text:e}){return`<tr>
|
|
216
|
+
${e}</tr>
|
|
217
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
218
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${He(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const i=this.parser.parseInline(r),n=sd(e);if(n===null)return i;e=n;let s='<a href="'+e+'"';return t&&(s+=' title="'+He(t)+'"'),s+=">"+i+"</a>",s}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));const n=sd(e);if(n===null)return He(r);e=n;let s=`<img src="${e}" alt="${r}"`;return t&&(s+=` title="${He(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:He(e.text)}},Ph=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},dr=class mc{options;renderer;textRenderer;constructor(t){this.options=t||ui,this.options.renderer=this.options.renderer||new Na,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ph}static parse(t,r){return new mc(r).parse(t)}static parseInline(t,r){return new mc(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){const s=t[n];if(this.options.extensions?.renderers?.[s.type]){const a=s,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){i+=l||"";continue}}const o=s;switch(o.type){case"space":{i+=this.renderer.space(o);continue}case"hr":{i+=this.renderer.hr(o);continue}case"heading":{i+=this.renderer.heading(o);continue}case"code":{i+=this.renderer.code(o);continue}case"table":{i+=this.renderer.table(o);continue}case"blockquote":{i+=this.renderer.blockquote(o);continue}case"list":{i+=this.renderer.list(o);continue}case"html":{i+=this.renderer.html(o);continue}case"paragraph":{i+=this.renderer.paragraph(o);continue}case"text":{let a=o,l=this.renderer.text(a);for(;n+1<t.length&&t[n+1].type==="text";)a=t[++n],l+=`
|
|
219
|
+
`+this.renderer.text(a);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){const s=t[n];if(this.options.extensions?.renderers?.[s.type]){const a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=a||"";continue}}const o=s;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},Zs=class{options;block;constructor(e){this.options=e||ui}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?fr.lex:fr.lexInline}provideParser(){return this.block?dr.parse:dr.parseInline}},T$=class{defaults=Mh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=dr;Renderer=Na;TextRenderer=Ph;Lexer=fr;Tokenizer=Ia;Hooks=Zs;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(const i of e)switch(r=r.concat(t.call(this,i)),i.type){case"table":{const n=i;for(const s of n.header)r=r.concat(this.walkTokens(s.tokens,t));for(const s of n.rows)for(const o of s)r=r.concat(this.walkTokens(o.tokens,t));break}case"list":{const n=i;r=r.concat(this.walkTokens(n.items,t));break}default:{const n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(s=>{const o=n[s].flat(1/0);r=r.concat(this.walkTokens(o,t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const s=t.renderers[n.name];s?t.renderers[n.name]=function(...o){let a=n.renderer.apply(this,o);return a===!1&&(a=s.apply(this,o)),a}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=t[n.level];s?s.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){const n=this.defaults.renderer||new Na(this.defaults);for(const s in r.renderer){if(!(s in n))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const o=s,a=r.renderer[o],l=n[o];n[o]=(...c)=>{let h=a.apply(n,c);return h===!1&&(h=l.apply(n,c)),h||""}}i.renderer=n}if(r.tokenizer){const n=this.defaults.tokenizer||new Ia(this.defaults);for(const s in r.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const o=s,a=r.tokenizer[o],l=n[o];n[o]=(...c)=>{let h=a.apply(n,c);return h===!1&&(h=l.apply(n,c)),h}}i.tokenizer=n}if(r.hooks){const n=this.defaults.hooks||new Zs;for(const s in r.hooks){if(!(s in n))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const o=s,a=r.hooks[o],l=n[o];Zs.passThroughHooks.has(s)?n[o]=c=>{if(this.defaults.async)return Promise.resolve(a.call(n,c)).then(u=>l.call(n,u));const h=a.call(n,c);return l.call(n,h)}:n[o]=(...c)=>{let h=a.apply(n,c);return h===!1&&(h=l.apply(n,c)),h}}i.hooks=n}if(r.walkTokens){const n=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(o){let a=[];return a.push(s.call(this,o)),n&&(a=a.concat(n.call(this,o))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return fr.lex(e,t??this.defaults)}parser(e,t){return dr.parse(e,t??this.defaults)}parseMarkdown(e){return(r,i)=>{const n={...i},s={...this.defaults,...n},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return o(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 o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);const a=s.hooks?s.hooks.provideLexer():e?fr.lex:fr.lexInline,l=s.hooks?s.hooks.provideParser():e?dr.parse:dr.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(c=>a(c,s)).then(c=>s.hooks?s.hooks.processAllTokens(c):c).then(c=>s.walkTokens?Promise.all(this.walkTokens(c,s.walkTokens)).then(()=>c):c).then(c=>l(c,s)).then(c=>s.hooks?s.hooks.postprocess(c):c).catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let c=a(r,s);s.hooks&&(c=s.hooks.processAllTokens(c)),s.walkTokens&&this.walkTokens(c,s.walkTokens);let h=l(c,s);return s.hooks&&(h=s.hooks.postprocess(h)),h}catch(c){return o(c)}}}onError(e,t){return r=>{if(r.message+=`
|
|
220
|
+
Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+He(r.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},ii=new T$;function Mt(e,t){return ii.parse(e,t)}Mt.options=Mt.setOptions=function(e){return ii.setOptions(e),Mt.defaults=ii.defaults,r0(Mt.defaults),Mt};Mt.getDefaults=Mh;Mt.defaults=ui;Mt.use=function(...e){return ii.use(...e),Mt.defaults=ii.defaults,r0(Mt.defaults),Mt};Mt.walkTokens=function(e,t){return ii.walkTokens(e,t)};Mt.parseInline=ii.parseInline;Mt.Parser=dr;Mt.parser=dr.parse;Mt.Renderer=Na;Mt.TextRenderer=Ph;Mt.Lexer=fr;Mt.lexer=fr.lex;Mt.Tokenizer=Ia;Mt.Hooks=Zs;Mt.parse=Mt;Mt.options;Mt.setOptions;Mt.use;Mt.walkTokens;Mt.parseInline;dr.parse;fr.lex;function d0(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(a,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):a},[]);if(n.length){var s=new RegExp(`
|
|
221
|
+
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(a){return a.replace(s,`
|
|
222
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(a,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=a;typeof a=="string"&&a.includes(`
|
|
223
|
+
`)&&(u=String(a).split(`
|
|
224
|
+
`).map(function(f,d){return d===0?f:""+h+f}).join(`
|
|
225
|
+
`)),o+=u+i[l+1]}),o}var p0={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},yc=new Map,g0=new Map,m0=m(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(V.debug("Registering icon pack:",t.name),"loader"in t)g0.set(t.name,t.loader);else if("icons"in t)yc.set(t.name,t.icons);else throw V.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),y0=m(async(e,t)=>{const r=AA(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=yc.get(i);if(!n){const o=g0.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},yc.set(i,n)}catch(a){throw V.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=BA(n,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),E$=m(async e=>{try{return await y0(e),!0}catch{return!1}},"isIconAvailable"),en=m(async(e,t,r)=>{let i;try{i=await y0(e,t?.fallbackPrefix)}catch(o){V.error(o),i=p0}const n=PA(i,t),s=HA(qA(n.body),{...n.attributes,...r});return Se(s,Jt())},"getIconSVG");function b0(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
226
|
+
`).replace(/\n{2,}/g,`
|
|
227
|
+
`),n=d0(i);return t===!1?n.replace(/ /g," "):n}m(b0,"preprocessMarkdown");function x0(e,t={}){const r=b0(e,t),i=Mt.lexer(r),n=[[]];let s=0;function o(a,l="normal"){a.type==="text"?a.text.split(`
|
|
228
|
+
`).forEach((h,u)=>{u!==0&&(s++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&n[s].push({content:f,type:l})})}):a.type==="strong"||a.type==="em"?a.tokens.forEach(c=>{o(c,a.type)}):a.type==="html"&&n[s].push({content:a.text,type:"normal"})}return m(o,"processNode"),i.forEach(a=>{a.type==="paragraph"?a.tokens?.forEach(l=>{o(l)}):a.type==="html"?n[s].push({content:a.text,type:"normal"}):n[s].push({content:a.raw,type:"normal"})}),n}m(x0,"markdownToLines");function v0(e,{markdownAutoWrap:t}={}){const r=Mt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g," "):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(V.warn(`Unsupported markdown: ${n.type}`),n.raw)}return m(i,"output"),r.map(i).join("")}m(v0,"markdownToHTML");function w0(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}m(w0,"splitTextToChars");function C0(e,t){const r=w0(t.content);return jh(e,[],r,t.type)}m(C0,"splitWordToFitWidth");function jh(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...s]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?jh(e,o,s,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}m(jh,"splitWordToFitWidthRecursion");function _0(e,t){if(e.some(({content:r})=>r.includes(`
|
|
229
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Pa(e,t)}m(_0,"splitLineToFitWidth");function Pa(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"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(s),t(o))return Pa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[a,l]=C0(t,s);r.push([a]),l.content&&e.unshift(l)}return Pa(e,t,r)}m(Pa,"splitLineToFitWidthRecursion");function bc(e,t){t&&e.attr("style",t)}m(bc,"applyStyle");async function S0(e,t,r,i,n=!1,s=Jt()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const a=o.append("xhtml:div"),l=Jr(t.label)?await to(t.label.replace(ai.lineBreakRegex,`
|
|
230
|
+
`),s):Se(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=a.append("span");h.html(l),bc(h,t.labelStyle),h.attr("class",`${c} ${i}`),bc(a,t.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),a.style("max-width",r+"px"),a.style("text-align","center"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&a.attr("class","labelBkg");let u=a.node().getBoundingClientRect();return u.width===r&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",r+"px"),u=a.node().getBoundingClientRect()),o.node()}m(S0,"addHtmlSpan");function Co(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}m(Co,"createTspan");function k0(e,t,r){const i=e.append("text"),n=Co(i,1,t);_o(n,r);const s=n.node().getComputedTextLength();return i.remove(),s}m(k0,"computeWidthOfText");function T0(e,t,r){const i=e.append("text"),n=Co(i,1,t);_o(n,[{content:r,type:"normal"}]);const s=n.node()?.getBoundingClientRect();return s&&i.remove(),s}m(T0,"computeDimensionOfText");function E0(e,t,r,i=!1){const s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),a=s.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=m(f=>k0(s,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:_0(c,h);for(const f of u){const d=Co(a,l,1.1);_o(d,f),l++}}if(i){const c=a.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),s.node()}else return a.node()}m(E0,"createFormattedText");function _o(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(r.content):n.text(" "+r.content)})}m(_o,"updateTextContentAndStyles");async function zh(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,s,o)=>(r.push((async()=>{const a=`${s}:${o}`;return await E$(a)?await en(a,void 0,{class:"label-icon"}):`<i class='${Se(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}m(zh,"replaceIconSubstring");var wr=m(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:s=!0,isNode:o=!0,width:a=200,addSvgBackground:l=!1}={},c)=>{if(V.debug("XYZ createText",t,r,i,n,s,o,"addSvgBackground: ",l),s){const h=v0(t,c),u=await zh(Br(h),c),f=t.replace(/\\\\/g,"\\"),d={isNode:o,label:Jr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await S0(e,d,a,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=x0(h.replace("<br>","<br/>"),c),f=E0(a,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");kt(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");kt(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");kt(f).select("text").attr("style",p)}return f}},"createText");function ol(e,t,r){if(e&&e.length){const[i,n]=t,s=Math.PI/180*r,o=Math.cos(s),a=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-n)*a+i,l[1]=(c-i)*a+(h-n)*o+n}}}function L$(e,t){return e[0]===t[0]&&e[1]===t[1]}function A$(e,t,r,i=1){const n=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(n)for(const c of o)ol(c,a,n);const l=function(c,h,u){const f=[];for(const x of c){const w=[...x];L$(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&f.push(w)}const d=[];h=Math.max(h,.1);const p=[];for(const x of f)for(let w=0;w<x.length-1;w++){const C=x[w],v=x[w+1];if(C[1]!==v[1]){const E=Math.min(C[1],v[1]);p.push({ymin:E,ymax:Math.max(C[1],v[1]),x:E===C[1]?C[0]:v[0],islope:(v[0]-C[0])/(v[1]-C[1])})}}if(p.sort((x,w)=>x.ymin<w.ymin?-1:x.ymin>w.ymin?1:x.x<w.x?-1:x.x>w.x?1:x.ymax===w.ymax?0:(x.ymax-w.ymax)/Math.abs(x.ymax-w.ymax)),!p.length)return d;let g=[],y=p[0].ymin,b=0;for(;g.length||p.length;){if(p.length){let x=-1;for(let w=0;w<p.length&&!(p[w].ymin>y);w++)x=w;p.splice(0,x+1).forEach(w=>{g.push({s:y,edge:w})})}if(g=g.filter(x=>!(x.edge.ymax<=y)),g.sort((x,w)=>x.edge.x===w.edge.x?0:(x.edge.x-w.edge.x)/Math.abs(x.edge.x-w.edge.x)),(u!==1||b%h==0)&&g.length>1)for(let x=0;x<g.length;x+=2){const w=x+1;if(w>=g.length)break;const C=g[x].edge,v=g[w].edge;d.push([[Math.round(C.x),y],[Math.round(v.x),y]])}y+=u,g.forEach(x=>{x.edge.x=x.edge.x+u*x.edge.islope}),b++}return d}(o,s,i);if(n){for(const c of o)ol(c,a,-n);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),ol(f,h,u)})(l,a,-n)}return l}function ps(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),A$(e,n,i,s||1)}class Wh{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ps(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 So(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 $$ extends Wh{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=ps(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],a=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of n)So([c,h])&&o.push([[c[0]-a,c[1]+l],[...h]],[[c[0]+a,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class M$ extends Wh{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 B${constructor(t){this.helper=t}fillPolygons(t,r){const i=ps(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 o=n/4;for(const a of t){const l=So(a),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let p=0;p<h;p++){const g=d+u+p*n,y=f-o+2*Math.random()*o,b=g-o+2*Math.random()*o,x=this.helper.ellipse(y,b,s,s,r);i.push(...x.ops)}}return{type:"fillSketch",ops:i}}}class O${constructor(t){this.helper=t}fillPolygons(t,r){const i=ps(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(o=>{const a=So(o),l=Math.floor(a/(i+n)),c=(a+n-l*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const p=d*(i+n),g=p+i,y=[h[0]+p*Math.cos(f)+c*Math.cos(f),h[1]+p*Math.sin(f)+c*Math.sin(f)],b=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)];s.push(...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],r))}}),s}}class R${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=ps(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 o=So(s),a=Math.round(o/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<a;u++){const f=2*u*r,d=2*(u+1)*r,p=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],b=[g[0]+p*Math.cos(h+Math.PI/4),g[1]+p*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(g[0],g[1],b[0],b[1],i),...this.helper.doubleLineOps(b[0],b[1],y[0],y[1],i))}}),n}}const me={};class D${constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const F$=0,ll=1,ld=2,Fs={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 cl(e,t){return e.type===t}function qh(e){const t=[],r=function(o){const a=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:F$,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:ll,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return a[a.length]={type:ld,text:""},a}(e);let i="BOD",n=0,s=r[n];for(;!cl(s,ld);){let o=0;const a=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return qh("M0,0"+e);n++,o=Fs[s.text],i=s.text}else cl(s,ll)?o=Fs[i]:(n++,o=Fs[s.text],i=s.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let l=n;l<n+o;l++){const c=r[l];if(!cl(c,ll))throw new Error("Param not a number: "+i+","+c.text);a[a.length]=+c.text}if(typeof Fs[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:a};t.push(l),n+=o,s=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function L0(e){let t=0,r=0,i=0,n=0;const s=[];for(const{key:o,data:a}of e)switch(o){case"M":s.push({key:"M",data:[...a]}),[t,r]=a,[i,n]=a;break;case"m":t+=a[0],r+=a[1],s.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":s.push({key:"L",data:[...a]}),[t,r]=a;break;case"l":t+=a[0],r+=a[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...a]}),t=a[4],r=a[5];break;case"c":{const l=a.map((c,h)=>h%2?c+r:c+t);s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...a]}),t=a[2],r=a[3];break;case"q":{const l=a.map((c,h)=>h%2?c+r:c+t);s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...a]}),t=a[5],r=a[6];break;case"a":t+=a[5],r+=a[6],s.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,r]});break;case"H":s.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...a]}),r=a[0];break;case"v":r+=a[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...a]}),t=a[2],r=a[3];break;case"s":{const l=a.map((c,h)=>h%2?c+r:c+t);s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...a]}),t=a[0],r=a[1];break;case"t":t+=a[0],r+=a[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 A0(e){const t=[];let r="",i=0,n=0,s=0,o=0,a=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],a=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-a),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),a=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,p=0;r==="Q"||r==="T"?(d=i+(i-a),p=n+(n-l)):(d=i,p=n);const g=i+2*(d-i)/3,y=n+2*(p-n)/3,b=u+2*(d-u)/3,x=f+2*(p-f)/3;t.push({key:"C",data:[g,y,b,x,u,f]}),a=d,l=p,i=u,n=f;break}case"Q":{const[u,f,d,p]=h,g=i+2*(u-i)/3,y=n+2*(f-n)/3,b=d+2*(u-d)/3,x=p+2*(f-p)/3;t.push({key:"C",data:[g,y,b,x,d,p]}),a=u,l=f,i=d,n=p;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],p=h[3],g=h[4],y=h[5],b=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,b,y,b]}),i=y,n=b):(i!==y||n!==b)&&($0(i,n,y,b,u,f,d,p,g).forEach(function(x){t.push({key:"C",data:x})}),i=y,n=b);break}case"Z":t.push({key:"Z",data:[]}),i=s,n=o}r=c}return t}function _n(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function $0(e,t,r,i,n,s,o,a,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,p=0,g=0,y=0;if(c)[d,p,g,y]=c;else{[e,t]=_n(e,t,-h),[r,i]=_n(r,i,-h);const O=(e-r)/2,B=(t-i)/2;let I=O*O/(n*n)+B*B/(s*s);I>1&&(I=Math.sqrt(I),n*=I,s*=I);const A=n*n,q=s*s,$=A*q-A*B*B-q*O*O,R=A*B*B+q*O*O,_=(a===l?-1:1)*Math.sqrt(Math.abs($/R));g=_*n*B/s+(e+r)/2,y=_*-s*O/n+(t+i)/2,d=Math.asin(parseFloat(((t-y)/s).toFixed(9))),p=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI)}let b=p-d;if(Math.abs(b)>120*Math.PI/180){const O=p,B=r,I=i;p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=$0(r=g+n*Math.cos(p),i=y+s*Math.sin(p),B,I,n,s,o,0,l,[p,O,g,y])}b=p-d;const x=Math.cos(d),w=Math.sin(d),C=Math.cos(p),v=Math.sin(p),E=Math.tan(b/4),T=4/3*n*E,P=4/3*s*E,N=[e,t],F=[e+T*w,t-P*x],k=[r+T*v,i-P*C],L=[r,i];if(F[0]=2*N[0]-F[0],F[1]=2*N[1]-F[1],c)return[F,k,L].concat(f);{f=[F,k,L].concat(f);const O=[];for(let B=0;B<f.length;B+=3){const I=_n(f[B][0],f[B][1],h),A=_n(f[B+1][0],f[B+1][1],h),q=_n(f[B+2][0],f[B+2][1],h);O.push([I[0],I[1],A[0],A[1],q[0],q[1]])}return O}}const I$={randOffset:function(e,t){return yt(e,t)},randOffsetWithRange:function(e,t,r){return ja(e,t,r)},ellipse:function(e,t,r,i,n){const s=B0(r,i,n);return xc(e,t,n,s).opset},doubleLineOps:function(e,t,r,i,n){return Lr(e,t,r,i,n,!0)}};function M0(e,t,r,i,n){return{type:"path",ops:Lr(e,t,r,i,n)}}function Qs(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let s=0;s<i-1;s++)n.push(...Lr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&n.push(...Lr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?M0(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function N$(e,t,r,i,n){return function(s,o){return Qs(s,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function cd(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Is(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Is(r[0],1.5*(1+.22*t.roughness),fd(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const a=Is(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Is(o,1.5*(1+.22*t.roughness),fd(t));for(const c of a)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function B0(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 o=Math.abs(e/2),a=Math.abs(t/2);const l=1-r.curveFitting;return o+=yt(o*l,r),a+=yt(a*l,r),{increment:s,rx:o,ry:a}}function xc(e,t,r,i){const[n,s]=dd(i.increment,e,t,i.rx,i.ry,1,i.increment*ja(.1,ja(.4,1,r),r),r);let o=za(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[a]=dd(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=za(a,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function hd(e,t,r,i,n,s,o,a,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=yt(.01*u,l),f+=yt(.01*f,l);let d=n,p=s;for(;d<0;)d+=2*Math.PI,p+=2*Math.PI;p-d>2*Math.PI&&(d=0,p=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(p-d)/2),b=pd(y,c,h,u,f,d,p,1,l);if(!l.disableMultiStroke){const x=pd(y,c,h,u,f,d,p,1.5,l);b.push(...x)}return o&&(a?b.push(...Lr(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...Lr(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l)):b.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:b}}function ud(e,t){const r=A0(L0(qh(e))),i=[];let n=[0,0],s=[0,0];for(const{key:o,data:a}of r)switch(o){case"M":s=[a[0],a[1]],n=[a[0],a[1]];break;case"L":i.push(...Lr(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]];break;case"C":{const[l,c,h,u,f,d]=a;i.push(...P$(l,c,h,u,f,d,s,t)),s=[f,d];break}case"Z":i.push(...Lr(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]]}return{type:"path",ops:i}}function hl(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]+yt(n,t),i[0][1]+yt(n,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+yt(n,t),i[o][1]+yt(n,t)]})}}return{type:"fillPath",ops:r}}function vi(e,t){return function(r,i){let n=r.fillStyle||"hachure";if(!me[n])switch(n){case"zigzag":me[n]||(me[n]=new $$(i));break;case"cross-hatch":me[n]||(me[n]=new M$(i));break;case"dots":me[n]||(me[n]=new B$(i));break;case"dashed":me[n]||(me[n]=new O$(i));break;case"zigzag-line":me[n]||(me[n]=new R$(i));break;default:n="hachure",me[n]||(me[n]=new Wh(i))}return me[n]}(t,I$).fillPolygons(e,t)}function fd(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function O0(e){return e.randomizer||(e.randomizer=new D$(e.seed||0)),e.randomizer.next()}function ja(e,t,r,i=1){return r.roughness*i*(O0(r)*(t-e)+e)}function yt(e,t,r=1){return ja(-e,e,t,r)}function Lr(e,t,r,i,n,s=!1){const o=s?n.disableMultiStrokeFill:n.disableMultiStroke,a=vc(e,t,r,i,n,!0,!1);if(o)return a;const l=vc(e,t,r,i,n,!0,!0);return a.concat(l)}function vc(e,t,r,i,n,s,o){const a=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>a&&(h=l/10);const u=h/2,f=.2+.2*O0(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,p=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=yt(d,n,c),p=yt(p,n,c);const g=[],y=()=>yt(u,n,c),b=()=>yt(h,n,c),x=n.preserveVertices;return o?g.push({op:"move",data:[e+(x?0:y()),t+(x?0:y())]}):g.push({op:"move",data:[e+(x?0:yt(h,n,c)),t+(x?0:yt(h,n,c))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),p+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),p+t+2*(i-t)*f+y(),r+(x?0:y()),i+(x?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*f+b(),p+t+(i-t)*f+b(),d+e+2*(r-e)*f+b(),p+t+2*(i-t)*f+b(),r+(x?0:b()),i+(x?0:b())]}),g}function Is(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+yt(t,r),e[0][1]+yt(t,r)]),i.push([e[0][0]+yt(t,r),e[0][1]+yt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+yt(t,r),e[n][1]+yt(t,r)]),n===e.length-1&&i.push([e[n][0]+yt(t,r),e[n][1]+yt(t,r)]);return za(i,null,r)}function za(e,t,r){const i=e.length,n=[];if(i>3){const s=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let a=1;a+2<i;a++){const l=e[a];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[a+1][0]-o*e[a-1][0])/6,l[1]+(o*e[a+1][1]-o*e[a-1][1])/6],s[2]=[e[a+1][0]+(o*e[a][0]-o*e[a+2][0])/6,e[a+1][1]+(o*e[a][1]-o*e[a+2][1])/6],s[3]=[e[a+1][0],e[a+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(...vc(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function dd(e,t,r,i,n,s,o,a){const l=[],c=[];if(a.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=yt(.5,a)-Math.PI/2;c.push([yt(s,a)+t+.9*i*Math.cos(h-e),yt(s,a)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[yt(s,a)+t+i*Math.cos(f),yt(s,a)+r+n*Math.sin(f)];l.push(d),c.push(d)}c.push([yt(s,a)+t+i*Math.cos(h+2*Math.PI+.5*o),yt(s,a)+r+n*Math.sin(h+2*Math.PI+.5*o)]),c.push([yt(s,a)+t+.98*i*Math.cos(h+o),yt(s,a)+r+.98*n*Math.sin(h+o)]),c.push([yt(s,a)+t+.9*i*Math.cos(h+.5*o),yt(s,a)+r+.9*n*Math.sin(h+.5*o)])}return[c,l]}function pd(e,t,r,i,n,s,o,a,l){const c=s+yt(.1,l),h=[];h.push([yt(a,l)+t+.9*i*Math.cos(c-e),yt(a,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([yt(a,l)+t+i*Math.cos(u),yt(a,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),za(h,null,l)}function P$(e,t,r,i,n,s,o,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let h=[0,0];const u=a.disableMultiStroke?1:2,f=a.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:yt(c[0],a)),o[1]+(f?0:yt(c[0],a))]}),h=f?[n,s]:[n+yt(c[d],a),s+yt(c[d],a)],l.push({op:"bcurveTo",data:[e+yt(c[d],a),t+yt(c[d],a),r+yt(c[d],a),i+yt(c[d],a),h[0],h[1]]});return l}function Sn(e){return[...e]}function gd(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(Sn(e[0]),Sn(e[1]),Sn(e[2]),Sn(e[2]));else{const n=[];n.push(e[0],e[0]);for(let a=1;a<e.length;a++)n.push(e[a]),a===e.length-1&&n.push(e[a]);const s=[],o=1-t;i.push(Sn(n[0]));for(let a=1;a+2<n.length;a++){const l=n[a];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*n[a+1][0]-o*n[a-1][0])/6,l[1]+(o*n[a+1][1]-o*n[a-1][1])/6],s[2]=[n[a+1][0]+(o*n[a][0]-o*n[a+2][0])/6,n[a+1][1]+(o*n[a][1]-o*n[a+2][1])/6],s[3]=[n[a+1][0],n[a+1][1]],i.push(s[1],s[2],s[3])}}return i}function Js(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function j$(e,t,r){const i=Js(t,r);if(i===0)return Js(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)),Js(e,zr(t,r,n))}function zr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function wc(e,t,r,i){const n=i||[];if(function(a,l){const c=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let p=3*h[1]-2*c[1]-f[1];p*=p;let g=3*u[0]-2*f[0]-c[0];g*=g;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<g&&(d=g),p<y&&(p=y),d+p}(e,t)<r){const a=e[t+0];n.length?(s=n[n.length-1],o=a,Math.sqrt(Js(s,o))>1&&n.push(a)):n.push(a),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=zr(l,c,.5),d=zr(c,h,.5),p=zr(h,u,.5),g=zr(f,d,.5),y=zr(d,p,.5),b=zr(g,y,.5);wc([l,f,g,b],0,r,n),wc([b,y,p,u],0,r,n)}var s,o;return n}function z$(e,t){return Wa(e,0,e.length,t)}function Wa(e,t,r,i,n){const s=n||[],o=e[t],a=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=j$(e[h],o,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Wa(e,t,c+1,i,s),Wa(e,c,r,i,s)):(s.length||s.push(o),s.push(a)),s}function ul(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let s=0;s<n;s++)wc(e,3*s,t,i);return r&&r>0?Wa(i,0,i.length,r):i}const Ce="none";class qa{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 o=this._o(s);return this._d("line",[M0(t,r,i,n,o)],o)}rectangle(t,r,i,n,s){const o=this._o(s),a=[],l=N$(t,r,i,n,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?a.push(hl([c],o)):a.push(vi([c],o))}return o.stroke!==Ce&&a.push(l),this._d("rectangle",a,o)}ellipse(t,r,i,n,s){const o=this._o(s),a=[],l=B0(i,n,o),c=xc(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=xc(t,r,o,l).opset;h.type="fillPath",a.push(h)}else a.push(vi([c.estimatedPoints],o));return o.stroke!==Ce&&a.push(c.opset),this._d("ellipse",a,o)}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",[Qs(t,!1,i)],i)}arc(t,r,i,n,s,o,a=!1,l){const c=this._o(l),h=[],u=hd(t,r,i,n,s,o,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=hd(t,r,i,n,s,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,p,g,y,b,x){const w=f,C=d;let v=Math.abs(p/2),E=Math.abs(g/2);v+=yt(.01*v,x),E+=yt(.01*E,x);let T=y,P=b;for(;T<0;)T+=2*Math.PI,P+=2*Math.PI;P-T>2*Math.PI&&(T=0,P=2*Math.PI);const N=(P-T)/x.curveStepCount,F=[];for(let k=T;k<=P;k+=N)F.push([w+v*Math.cos(k),C+E*Math.sin(k)]);return F.push([w+v*Math.cos(P),C+E*Math.sin(P)]),F.push([w,C]),vi([F],x)}(t,r,i,n,s,o,c));return c.stroke!==Ce&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],s=cd(t,i);if(i.fill&&i.fill!==Ce)if(i.fillStyle==="solid"){const o=cd(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],a=t;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...ul(gd([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...ul(gd(c),10,(1+i.roughness)/2))}o.length&&n.push(vi([o],i))}return i.stroke!==Ce&&n.push(s),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],s=Qs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(hl([t],i)):n.push(vi([t],i))),i.stroke!==Ce&&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!==Ce,o=i.stroke!==Ce,a=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=A0(L0(qh(h))),p=[];let g=[],y=[0,0],b=[];const x=()=>{b.length>=4&&g.push(...ul(b,u)),b=[]},w=()=>{x(),g.length&&(p.push(g),g=[])};for(const{key:v,data:E}of d)switch(v){case"M":w(),y=[E[0],E[1]],g.push(y);break;case"L":x(),g.push([E[0],E[1]]);break;case"C":if(!b.length){const T=g.length?g[g.length-1]:y;b.push([T[0],T[1]])}b.push([E[0],E[1]]),b.push([E[2],E[3]]),b.push([E[4],E[5]]);break;case"Z":x(),g.push([y[0],y[1]])}if(w(),!f)return p;const C=[];for(const v of p){const E=z$(v,f);E.length&&C.push(E)}return C}(t,1,a?4-4*(i.simplification||1):(1+i.roughness)/2),c=ud(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=ud(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(hl(l,i));else n.push(vi(l,i));return o&&(a?l.forEach(h=>{n.push(Qs(h,!1,i))}):n.push(c)),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(o=>+o.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 o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ce};break;case"fillPath":o={d:this.opsToPath(s),stroke:Ce,strokeWidth:0,fill:i.fill||Ce};break;case"fillSketch":o=this.fillSketch(s,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ce,strokeWidth:i,fill:Ce}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class W${constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new qa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.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,o,s),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,s,a),n.restore();break}case"fillSketch":this.fillSketch(n,o,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 o=typeof i=="number"&&i>=0?s.data.map(a=>+a.toFixed(i)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[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 o=this.gen.line(t,r,i,n,s);return this.draw(o),o}rectangle(t,r,i,n,s){const o=this.gen.rectangle(t,r,i,n,s);return this.draw(o),o}ellipse(t,r,i,n,s){const o=this.gen.ellipse(t,r,i,n,s);return this.draw(o),o}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,o,a=!1,l){const c=this.gen.arc(t,r,i,n,s,o,a,l);return this.draw(c),c}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 Ns="http://www.w3.org/2000/svg";class q${constructor(t,r){this.svg=t,this.gen=new qa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,s=n.createElementNS(Ns,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of r){let l=null;switch(a.type){case"path":l=n.createElementNS(Ns,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(Ns,"path"),l.setAttribute("d",this.opsToPath(a,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,a,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const s=t.createElementNS(Ns,"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 o=this.gen.line(t,r,i,n,s);return this.draw(o)}rectangle(t,r,i,n,s){const o=this.gen.rectangle(t,r,i,n,s);return this.draw(o)}ellipse(t,r,i,n,s){const o=this.gen.ellipse(t,r,i,n,s);return this.draw(o)}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,o,a=!1,l){const c=this.gen.arc(t,r,i,n,s,o,a,l);return this.draw(c)}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 st={canvas:(e,t)=>new W$(e,t),svg:(e,t)=>new q$(e,t),generator:e=>new qa(e),newSeed:()=>qa.newSeed()},mt=m(async(e,t,r)=>{let i;const n=t.useHtmlLabels||qt(Et()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",ne(t.labelStyle));let a;t.label===void 0?a="":a=typeof t.label=="string"?t.label:t.label[0];const l=await wr(o,Se(Br(a),Et()),{useHtmlLabels:n,width:t.width||Et().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],f=kt(l),d=u.getElementsByTagName("img");if(d){const p=a.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function b(){if(g.style.display="flex",g.style.flexDirection="column",p){const x=Et().fontSize?Et().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[C=Uc.fontSize]=fs(x),v=C*w+"px";g.style.minWidth=v,g.style.maxWidth=v}else g.style.width="100%";y(g)}m(b,"setupImage"),setTimeout(()=>{g.complete&&b()}),g.addEventListener("error",b),g.addEventListener("load",b)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:c,halfPadding:h,label:o}},"labelHelper"),fl=m(async(e,t,r)=>{const i=r.useHtmlLabels||qt(Et()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await wr(n,Se(Br(t),Et()),{useHtmlLabels:i,width:r.width||Et()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const a=r.padding/2;if(qt(Et()?.flowchart?.htmlLabels)){const l=s.children[0],c=kt(s);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:a,label:n}},"insertLabel"),ot=m((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),gt=m((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function _t(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}m(_t,"createPathFromPoints");function Ar(e,t,r,i,n,s){const o=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const p=d/50,g=e+p*l,y=f+n*Math.sin(u*(g-e));o.push({x:g,y})}return o}m(Ar,"generateFullSineWavePoints");function is(e,t,r,i,n,s){const o=[],a=n*Math.PI/180,h=(s*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}m(is,"generateCirclePoints");var H$=m((e,t)=>{var r=e.x,i=e.y,n=t.x-r,s=t.y-i,o=e.width/2,a=e.height/2,l,c;return Math.abs(s)*o>Math.abs(n)*a?(s<0&&(a=-a),l=s===0?0:a*n/s,c=a):(n<0&&(o=-o),l=o,c=n===0?0:o*s/n),{x:r+l,y:i+c}},"intersectRect"),rn=H$;function R0(e,t){t&&e.attr("style",t)}m(R0,"applyStyle");async function D0(e){const t=kt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=Et();let n=e.label;e.label&&Jr(e.label)&&(n=await to(e.label.replace(ai.lineBreakRegex,`
|
|
231
|
+
`),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(Se(o,i)),R0(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}m(D0,"addHtmlLabel");var U$=m(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),qt(Et().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),V.info("vertexText"+n);const s={isNode:i,label:Br(n).replace(/fa[blrs]?:fa-[\w-]+/g,a=>`<i class='${a.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await D0(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const a of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=a.trim(),s.appendChild(l)}return s}},"createLabel"),Yr=U$,Or=m((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"),F0=m(async(e,t)=>{V.info("Creating subgraph rect for ",t.id,t);const r=Et(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:a,nodeStyles:l,borderStyles:c,backgroundStyles:h}=lt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=qt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),p=await wr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let g=p.getBBox();if(qt(r.flowchart.htmlLabels)){const T=p.children[0],P=kt(p);g=T.getBoundingClientRect(),P.attr("width",g.width),P.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height,x=t.x-y/2,w=t.y-b/2;V.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=st.svg(u),P=at(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:n}),N=T.path(Or(x,w,y,b,0),P);C=u.insert(()=>(V.debug("Rough node insert CXC",N),N),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",w).attr("width",y).attr("height",b);const{subGraphTitleTopMargin:v}=uo(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+v})`),a){const T=d.select("span");T&&T.attr("style",a)}const E=C.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=g.height-t.padding/2,t.intersect=function(T){return rn(t,T)},{cluster:u,labelBBox:g}},"rect"),Y$=m((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),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 o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(a){return rn(t,a)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),V$=m(async(e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:a,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=u.node().appendChild(await Yr(t.label,t.labelStyle,void 0,!0));let p=d.getBBox();if(qt(r.flowchart.htmlLabels)){const N=d.children[0],F=kt(d);p=N.getBoundingClientRect(),F.attr("width",p.width),F.attr("height",p.height)}const g=0*t.padding,y=g/2,b=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+g;t.width<=p.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height+g,w=t.height+g-p.height-6,C=t.x-b/2,v=t.y-x/2;t.width=b;const E=t.y-t.height/2-y+p.height+2;let T;if(t.look==="handDrawn"){const N=t.cssClasses.includes("statediagram-cluster-alt"),F=st.svg(c),k=t.rx||t.ry?F.path(Or(C,v,b,x,10),{roughness:.7,fill:a,fillStyle:"solid",stroke:l,seed:n}):F.rectangle(C,v,b,x,{seed:n});T=c.insert(()=>k,":first-child");const L=F.rectangle(C,E,b,w,{fill:N?s:o,fillStyle:N?"hachure":"solid",stroke:l,seed:n});T=c.insert(()=>k,":first-child"),f=c.insert(()=>L)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",C).attr("y",v).attr("width",b).attr("height",x).attr("data-look",t.look),f.attr("class","inner").attr("x",C).attr("y",E).attr("width",b).attr("height",w);u.attr("transform",`translate(${t.x-p.width/2}, ${v+1-(qt(r.flowchart.htmlLabels)?0:3)})`);const P=T.node().getBBox();return t.height=P.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(N){return rn(t,N)},{cluster:c,labelBBox:p}},"roundedWithTitle"),G$=m(async(e,t)=>{V.info("Creating subgraph rect for ",t.id,t);const r=Et(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:a,nodeStyles:l,borderStyles:c,backgroundStyles:h}=lt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=qt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),p=await wr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let g=p.getBBox();if(qt(r.flowchart.htmlLabels)){const T=p.children[0],P=kt(p);g=T.getBoundingClientRect(),P.attr("width",g.width),P.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height,x=t.x-y/2,w=t.y-b/2;V.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=st.svg(u),P=at(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:n}),N=T.path(Or(x,w,y,b,t.rx),P);C=u.insert(()=>(V.debug("Rough node insert CXC",N),N),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",w).attr("width",y).attr("height",b);const{subGraphTitleTopMargin:v}=uo(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+v})`),a){const T=d.select("span");T&&T.attr("style",a)}const E=C.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=g.height-t.padding/2,t.intersect=function(T){return rn(t,T)},{cluster:u,labelBBox:g}},"kanbanSection"),X$=m((e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),a=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=st.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:n});d=o.insert(()=>y,":first-child")}else d=a.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const p=d.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return rn(t,g)},{cluster:o,labelBBox:{}}},"divider"),K$=F0,Z$={rect:F0,squareRect:K$,roundedWithTitle:V$,noteGroup:Y$,divider:X$,kanbanSection:G$},I0=new Map,N0=m(async(e,t)=>{const r=t.shape||"rect",i=await Z$[r](e,t);return I0.set(t.id,i),i},"insertCluster"),Q$=m(()=>{I0=new Map},"clear");function P0(e,t){return e.intersect(t)}m(P0,"intersectNode");var J$=P0;function j0(e,t,r,i){var n=e.x,s=e.y,o=n-i.x,a=s-i.y,l=Math.sqrt(t*t*a*a+r*r*o*o),c=Math.abs(t*r*o/l);i.x<n&&(c=-c);var h=Math.abs(t*r*a/l);return i.y<s&&(h=-h),{x:n+c,y:s+h}}m(j0,"intersectEllipse");var z0=j0;function W0(e,t,r){return z0(e,t,t,r)}m(W0,"intersectCircle");var tM=W0;function q0(e,t,r,i){{const n=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,a=n*r.x+s*r.y+o,l=n*i.x+s*i.y+o,c=1e-6;if(a!==0&&l!==0&&Cc(a,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,p=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(p)<c&&Cc(d,p))return;const g=n*u-h*s;if(g===0)return;const y=Math.abs(g/2);let b=s*f-u*o;const x=b<0?(b-y)/g:(b+y)/g;b=h*o-n*f;const w=b<0?(b-y)/g:(b+y)/g;return{x,y:w}}}m(q0,"intersectLine");function Cc(e,t){return e*t>0}m(Cc,"sameSign");var eM=q0;function H0(e,t,r){let i=e.x,n=e.y,s=[],o=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),a=Math.min(a,h.y)}):(o=Math.min(o,t.x),a=Math.min(a,t.y));let l=i-e.width/2-o,c=n-e.height/2-a;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=eM(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,p=Math.sqrt(f*f+d*d),g=u.x-r.x,y=u.y-r.y,b=Math.sqrt(g*g+y*y);return p<b?-1:p===b?0:1}),s[0]):e}m(H0,"intersectPolygon");var rM=H0,rt={node:J$,circle:tM,ellipse:z0,polygon:rM,rect:rn};function U0(e,t){const{labelStyles:r}=lt(t);t.labelStyle=r;const i=gt(t);let n=i;i||(n="anchor");const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:a}=t,l=st.svg(s),c=at(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",ne(a)),ot(t,u),t.intersect=function(f){return V.info("Circle intersect",t,o,f),rt.circle(t,o,f)},s}m(U0,"anchor");function _c(e,t,r,i,n,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,p=f/s,g=Math.sqrt(d**2+p**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),b=l+y*s*Math.sin(h)*(o?-1:1),x=c-y*n*Math.cos(h)*(o?-1:1),w=Math.atan2((t-x)/s,(e-b)/n);let v=Math.atan2((i-x)/s,(r-b)/n)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const E=[];for(let T=0;T<20;T++){const P=T/19,N=w+P*v,F=b+n*Math.cos(N),k=x+s*Math.sin(N);E.push({x:F,y:k})}return E}m(_c,"generateArcPoints");async function Y0(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=s.width+t.padding+20,a=s.height+t.padding,l=a/2,c=l/(2.5+a/50),{cssStyles:h}=t,u=[{x:o/2,y:-a/2},{x:-o/2,y:-a/2},..._c(-o/2,-a/2,-o/2,a/2,c,l,!1),{x:o/2,y:a/2},..._c(o/2,a/2,o/2,-a/2,c,l,!0)],f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=_t(u),g=f.path(p,d),y=n.insert(()=>g,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),ot(t,y),t.intersect=function(b){return rt.polygon(t,u,b)},n}m(Y0,"bowTieRect");function Rr(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+")")}m(Rr,"insertPolygonShape");async function V0(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=s.height+t.padding,a=12,l=s.width+t.padding+a,c=0,h=l,u=-o,f=0,d=[{x:c+a,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+a},{x:c+a,y:u}];let p;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=st.svg(n),b=at(t,{}),x=_t(d),w=y.path(x,b);p=n.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),g&&p.attr("style",g)}else p=Rr(n,l,o,d);return i&&p.attr("style",i),ot(t,p),t.intersect=function(y){return rt.polygon(t,d,y)},n}m(V0,"card");function G0(e,t){const{nodeStyles:r}=lt(t);t.label="";const i=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],a=st.svg(i),l=at(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=_t(o),h=a.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return rt.polygon(t,o,f)},i}m(G0,"choice");async function Hh(e,t,r){const{labelStyles:i,nodeStyles:n}=lt(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:a}=await mt(e,t,gt(t)),l=r?.padding??a,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=st.svg(s),d=at(t,{}),p=f.circle(0,0,c*2,d);h=s.insert(()=>p,":first-child"),h.attr("class","basic label-container").attr("style",ne(u))}else h=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return ot(t,h),t.calcIntersect=function(f,d){const p=f.width/2;return rt.circle(f,p,d)},t.intersect=function(f){return V.info("Circle intersect",t,c,f),rt.circle(t,c,f)},s}m(Hh,"circle");function X0(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},o={x:-(i/2)*t,y:-(i/2)*r},a={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${a.x},${a.y}
|
|
232
|
+
M ${n.x},${n.y} L ${o.x},${o.y}`}m(X0,"createLine");function K0(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:o}=t,a=st.svg(n),l=at(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=a.circle(0,0,s*2,l),h=X0(s),u=a.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),ot(t,f),t.intersect=function(d){return V.info("crossedCircle intersect",t,{radius:s,point:d}),rt.circle(t,s,d)},n}m(K0,"crossedCircle");function lr(e,t,r,i=100,n=0,s=180){const o=[],a=n*Math.PI/180,h=(s*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}m(lr,"generateCirclePoints");async function Z0(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...lr(a/2,-l/2,c,30,-90,0),{x:-a/2-c,y:c},...lr(a/2+c*2,-c,c,20,-180,-270),...lr(a/2+c*2,c,c,20,-90,-180),{x:-a/2-c,y:-l/2},...lr(a/2,l/2,c,20,0,90)],f=[{x:a/2,y:-l/2-c},{x:-a/2,y:-l/2-c},...lr(a/2,-l/2,c,20,-90,0),{x:-a/2-c,y:-c},...lr(a/2+a*.1,-c,c,20,-180,-270),...lr(a/2+a*.1,c,c,20,-90,-180),{x:-a/2-c,y:l/2},...lr(a/2,l/2,c,20,0,90),{x:-a/2,y:l/2+c},{x:a/2,y:l/2+c}],d=st.svg(n),p=at(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=_t(u).replace("Z",""),b=d.path(y,p),x=_t(f),w=d.path(x,{...p}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>b,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-a/2+c-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ot(t,C),t.intersect=function(v){return rt.polygon(t,f,v)},n}m(Z0,"curlyBraceLeft");function cr(e,t,r,i=100,n=0,s=180){const o=[],a=n*Math.PI/180,h=(s*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:d,y:p})}return o}m(cr,"generateCirclePoints");async function Q0(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...cr(a/2,-l/2,c,20,-90,0),{x:a/2+c,y:-c},...cr(a/2+c*2,-c,c,20,-180,-270),...cr(a/2+c*2,c,c,20,-90,-180),{x:a/2+c,y:l/2},...cr(a/2,l/2,c,20,0,90)],f=[{x:-a/2,y:-l/2-c},{x:a/2,y:-l/2-c},...cr(a/2,-l/2,c,20,-90,0),{x:a/2+c,y:-c},...cr(a/2+c*2,-c,c,20,-180,-270),...cr(a/2+c*2,c,c,20,-90,-180),{x:a/2+c,y:l/2},...cr(a/2,l/2,c,20,0,90),{x:a/2,y:l/2+c},{x:-a/2,y:l/2+c}],d=st.svg(n),p=at(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=_t(u).replace("Z",""),b=d.path(y,p),x=_t(f),w=d.path(x,{...p}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>b,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-a/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ot(t,C),t.intersect=function(v){return rt.polygon(t,f,v)},n}m(Q0,"curlyBraceRight");function Xt(e,t,r,i=100,n=0,s=180){const o=[],a=n*Math.PI/180,h=(s*Math.PI/180-a)/(i-1);for(let u=0;u<i;u++){const f=a+u*h,d=e+r*Math.cos(f),p=t+r*Math.sin(f);o.push({x:-d,y:-p})}return o}m(Xt,"generateCirclePoints");async function J0(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Xt(a/2,-l/2,c,30,-90,0),{x:-a/2-c,y:c},...Xt(a/2+c*2,-c,c,20,-180,-270),...Xt(a/2+c*2,c,c,20,-90,-180),{x:-a/2-c,y:-l/2},...Xt(a/2,l/2,c,20,0,90)],f=[...Xt(-a/2+c+c/2,-l/2,c,20,-90,-180),{x:a/2-c/2,y:c},...Xt(-a/2-c/2,-c,c,20,0,90),...Xt(-a/2-c/2,c,c,20,-90,0),{x:a/2-c/2,y:-c},...Xt(-a/2+c+c/2,l/2,c,30,-180,-270)],d=[{x:a/2,y:-l/2-c},{x:-a/2,y:-l/2-c},...Xt(a/2,-l/2,c,20,-90,0),{x:-a/2-c,y:-c},...Xt(a/2+c*2,-c,c,20,-180,-270),...Xt(a/2+c*2,c,c,20,-90,-180),{x:-a/2-c,y:l/2},...Xt(a/2,l/2,c,20,0,90),{x:-a/2,y:l/2+c},{x:a/2-c-c/2,y:l/2+c},...Xt(-a/2+c+c/2,-l/2,c,20,-90,-180),{x:a/2-c/2,y:c},...Xt(-a/2-c/2,-c,c,20,0,90),...Xt(-a/2-c/2,c,c,20,-90,0),{x:a/2-c/2,y:-c},...Xt(-a/2+c+c/2,l/2,c,30,-180,-270)],p=st.svg(n),g=at(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=_t(u).replace("Z",""),x=p.path(b,g),C=_t(f).replace("Z",""),v=p.path(C,g),E=_t(d),T=p.path(E,{...g}),P=n.insert("g",":first-child");return P.insert(()=>T,":first-child").attr("stroke-opacity",0),P.insert(()=>x,":first-child"),P.insert(()=>v,":first-child"),P.attr("class","text"),h&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-a/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ot(t,P),t.intersect=function(N){return rt.polygon(t,d,N)},n}m(J0,"curlyBraces");async function tb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=80,a=20,l=Math.max(o,(s.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=l,g=c,y=p-h,b=g/4,x=[{x:y,y:0},{x:b,y:0},{x:0,y:g/2},{x:b,y:g},{x:y,y:g},...is(-y,-g/2,h,50,270,90)],w=_t(x),C=f.path(w,d),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-l/2}, ${-c/2})`),ot(t,v),t.intersect=function(E){return rt.polygon(t,x,E)},n}m(tb,"curvedTrapezoid");var iM=m((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"),nM=m((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"),sM=m((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function eb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+t.padding,t.width??0),l=a/2,c=l/(2.5+a/50),h=Math.max(s.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=st.svg(n),p=nM(0,0,a,h,l,c),g=sM(0,c,a,h,l,c),y=d.path(p,at(t,{})),b=d.path(g,at(t,{fill:"none"}));u=n.insert(()=>b,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=iM(0,0,a,h,l,c);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",ne(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-a/2}, ${-(h/2+c)})`),ot(t,u),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(d){const p=rt.rect(t,d),g=p.x-(t.x??0);if(l!=0&&(Math.abs(g)<(t.width??0)/2||Math.abs(g)==(t.width??0)/2&&Math.abs(p.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-g*g/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),p.y+=y}return p},n}m(eb,"cylinder");async function rb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=s.width+t.padding,l=s.height+t.padding,c=l*.2,h=-a/2,u=-l/2-c/2,{cssStyles:f}=t,d=st.svg(n),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(g.map(x=>[x.x,x.y]),p),b=n.insert(()=>y,":first-child");return b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(s.x-(s.left??0))}, ${u+c+(t.padding??0)/2-(s.y-(s.top??0))})`),ot(t,b),t.intersect=function(x){return rt.rect(t,x)},n}m(rb,"dividedRectangle");async function ib(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o}=await mt(e,t,gt(t)),l=s.width/2+o+5,c=s.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=st.svg(n),d=at(t,{roughness:.2,strokeWidth:2.5}),p=at(t,{roughness:.2,strokeWidth:1.5}),g=f.circle(0,0,l*2,d),y=f.circle(0,0,c*2,p);h=n.insert("g",":first-child"),h.attr("class",ne(t.cssClasses)).attr("style",ne(u)),h.node()?.appendChild(g),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return ot(t,h),t.intersect=function(f){return V.info("DoubleCircle intersect",t,l,f),rt.circle(t,l,f)},n}m(ib,"doublecircle");function nb(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=lt(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:a}=t,l=st.svg(s),{nodeBorder:c}=r,h=at(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=s.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),a&&a.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),ot(t,f),t.intersect=function(d){return V.info("filledCircle intersect",t,{radius:o,point:d}),rt.circle(t,o,d)},s}m(nb,"filledCircle");async function sb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=s.width+(t.padding??0),l=a+s.height,c=a+s.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=_t(h),g=f.path(p,d),y=n.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=a,t.height=l,ot(t,y),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-l/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(b){return V.info("Triangle intersect",t,h,b),rt.polygon(t,h,b)},n}m(sb,"flippedTriangle");function ab(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:s}=lt(t);t.label="";const o=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,f=st.svg(o),d=at(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=f.rectangle(h,u,l,c,d),g=o.insert(()=>p,":first-child");a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),ot(t,g);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(b){return rt.rect(t,b)},o}m(ab,"forkJoin");async function ob(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const n=80,s=50,{shapeSvg:o,bbox:a}=await mt(e,t,gt(t)),l=Math.max(n,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=st.svg(o),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...is(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],g=_t(p),y=f.path(g,d),b=o.insert(()=>y,":first-child");return b.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),ot(t,b),t.intersect=function(x){return V.info("Pill intersect",t,{radius:h,point:x}),rt.polygon(t,p,x)},o}m(ob,"halfRoundedRectangle");async function lb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=s.height+(t.padding??0),a=s.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=st.svg(n),h=at(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=a/2;const f=u/6;u=u+f;const d=o/2,p=d/2,g=u-p,y=[{x:-g,y:-d},{x:0,y:-d},{x:g,y:-d},{x:u,y:0},{x:g,y:d},{x:0,y:d},{x:-g,y:d},{x:-u,y:0}],b=_t(y),x=c.path(b,h),w=n.insert(()=>x,":first-child");return w.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=a,t.height=o,ot(t,w),t.intersect=function(C){return rt.polygon(t,y,C)},n}m(lb,"hexagon");async function cb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await mt(e,t,gt(t)),s=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:a}=t,l=st.svg(n),c=at(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=_t(h),f=l.path(u,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),a&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",a),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-o/2})`),ot(t,d),t.intersect=function(p){return V.info("Pill intersect",t,{points:h}),rt.polygon(t,h,p)},n}m(cb,"hourglass");async function hb(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=lt(t);t.labelStyle=n;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,label:u}=await mt(e,t,"icon-shape default"),f=t.pos==="t",d=a,p=a,{nodeBorder:g}=r,{stylesMap:y}=Qi(t),b=-p/2,x=-d/2,w=t.label?8:0,C=st.svg(c),v=at(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const E=C.rectangle(b,x,p,d,v),T=Math.max(p,h.width),P=d+h.height+w,N=C.rectangle(-T/2,-P/2,T,P,{...v,fill:"transparent",stroke:"none"}),F=c.insert(()=>E,":first-child"),k=c.insert(()=>N);if(t.icon){const L=c.append("g");L.html(`<g>${await en(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const O=L.node().getBBox(),B=O.width,I=O.height,A=O.x,q=O.y;L.attr("transform",`translate(${-B/2-A},${f?h.height/2+w/2-I/2-q:-h.height/2-w/2-I/2-q})`),L.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-P/2:P/2-h.height})`),F.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),ot(t,k),t.intersect=function(L){if(V.info("iconSquare intersect",t,L),!t.label)return rt.rect(t,L);const O=t.x??0,B=t.y??0,I=t.height??0;let A=[];return f?A=[{x:O-h.width/2,y:B-I/2},{x:O+h.width/2,y:B-I/2},{x:O+h.width/2,y:B-I/2+h.height+w},{x:O+p/2,y:B-I/2+h.height+w},{x:O+p/2,y:B+I/2},{x:O-p/2,y:B+I/2},{x:O-p/2,y:B-I/2+h.height+w},{x:O-h.width/2,y:B-I/2+h.height+w}]:A=[{x:O-p/2,y:B-I/2},{x:O+p/2,y:B-I/2},{x:O+p/2,y:B-I/2+d},{x:O+h.width/2,y:B-I/2+d},{x:O+h.width/2/2,y:B+I/2},{x:O-h.width/2,y:B+I/2},{x:O-h.width/2,y:B-I/2+d},{x:O-p/2,y:B-I/2+d}],rt.polygon(t,A,L)},c}m(hb,"icon");async function ub(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=lt(t);t.labelStyle=n;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,label:u}=await mt(e,t,"icon-shape default"),f=20,d=t.label?8:0,p=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:b}=Qi(t),x=st.svg(c),w=at(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.get("fill");w.stroke=C??y;const v=c.append("g");t.icon&&v.html(`<g>${await en(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const E=v.node().getBBox(),T=E.width,P=E.height,N=E.x,F=E.y,k=Math.max(T,P)*Math.SQRT2+f*2,L=x.circle(0,0,k,w),O=Math.max(k,h.width),B=k+h.height+d,I=x.rectangle(-O/2,-B/2,O,B,{...w,fill:"transparent",stroke:"none"}),A=c.insert(()=>L,":first-child"),q=c.insert(()=>I);return v.attr("transform",`translate(${-T/2-N},${p?h.height/2+d/2-P/2-F:-h.height/2-d/2-P/2-F})`),v.attr("style",`color: ${b.get("stroke")??g};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-B/2:B/2-h.height})`),A.attr("transform",`translate(0,${p?h.height/2+d/2:-h.height/2-d/2})`),ot(t,q),t.intersect=function($){return V.info("iconSquare intersect",t,$),rt.rect(t,$)},c}m(ub,"iconCircle");async function fb(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=lt(t);t.labelStyle=n;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await mt(e,t,"icon-shape default"),d=t.pos==="t",p=a+u*2,g=a+u*2,{nodeBorder:y,mainBkg:b}=r,{stylesMap:x}=Qi(t),w=-g/2,C=-p/2,v=t.label?8:0,E=st.svg(c),T=at(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const P=x.get("fill");T.stroke=P??b;const N=E.path(Or(w,C,g,p,5),T),F=Math.max(g,h.width),k=p+h.height+v,L=E.rectangle(-F/2,-k/2,F,k,{...T,fill:"transparent",stroke:"none"}),O=c.insert(()=>N,":first-child").attr("class","icon-shape2"),B=c.insert(()=>L);if(t.icon){const I=c.append("g");I.html(`<g>${await en(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const A=I.node().getBBox(),q=A.width,$=A.height,R=A.x,_=A.y;I.attr("transform",`translate(${-q/2-R},${d?h.height/2+v/2-$/2-_:-h.height/2-v/2-$/2-_})`),I.attr("style",`color: ${x.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-k/2:k/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),ot(t,B),t.intersect=function(I){if(V.info("iconSquare intersect",t,I),!t.label)return rt.rect(t,I);const A=t.x??0,q=t.y??0,$=t.height??0;let R=[];return d?R=[{x:A-h.width/2,y:q-$/2},{x:A+h.width/2,y:q-$/2},{x:A+h.width/2,y:q-$/2+h.height+v},{x:A+g/2,y:q-$/2+h.height+v},{x:A+g/2,y:q+$/2},{x:A-g/2,y:q+$/2},{x:A-g/2,y:q-$/2+h.height+v},{x:A-h.width/2,y:q-$/2+h.height+v}]:R=[{x:A-g/2,y:q-$/2},{x:A+g/2,y:q-$/2},{x:A+g/2,y:q-$/2+p},{x:A+h.width/2,y:q-$/2+p},{x:A+h.width/2/2,y:q+$/2},{x:A-h.width/2,y:q+$/2},{x:A-h.width/2,y:q-$/2+p},{x:A-g/2,y:q-$/2+p}],rt.polygon(t,R,I)},c}m(fb,"iconRounded");async function db(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=lt(t);t.labelStyle=n;const s=t.assetHeight??48,o=t.assetWidth??48,a=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(a,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await mt(e,t,"icon-shape default"),d=t.pos==="t",p=a+u*2,g=a+u*2,{nodeBorder:y,mainBkg:b}=r,{stylesMap:x}=Qi(t),w=-g/2,C=-p/2,v=t.label?8:0,E=st.svg(c),T=at(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const P=x.get("fill");T.stroke=P??b;const N=E.path(Or(w,C,g,p,.1),T),F=Math.max(g,h.width),k=p+h.height+v,L=E.rectangle(-F/2,-k/2,F,k,{...T,fill:"transparent",stroke:"none"}),O=c.insert(()=>N,":first-child"),B=c.insert(()=>L);if(t.icon){const I=c.append("g");I.html(`<g>${await en(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const A=I.node().getBBox(),q=A.width,$=A.height,R=A.x,_=A.y;I.attr("transform",`translate(${-q/2-R},${d?h.height/2+v/2-$/2-_:-h.height/2-v/2-$/2-_})`),I.attr("style",`color: ${x.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-k/2:k/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),ot(t,B),t.intersect=function(I){if(V.info("iconSquare intersect",t,I),!t.label)return rt.rect(t,I);const A=t.x??0,q=t.y??0,$=t.height??0;let R=[];return d?R=[{x:A-h.width/2,y:q-$/2},{x:A+h.width/2,y:q-$/2},{x:A+h.width/2,y:q-$/2+h.height+v},{x:A+g/2,y:q-$/2+h.height+v},{x:A+g/2,y:q+$/2},{x:A-g/2,y:q+$/2},{x:A-g/2,y:q-$/2+h.height+v},{x:A-h.width/2,y:q-$/2+h.height+v}]:R=[{x:A-g/2,y:q-$/2},{x:A+g/2,y:q-$/2},{x:A+g/2,y:q-$/2+p},{x:A+h.width/2,y:q-$/2+p},{x:A+h.width/2/2,y:q+$/2},{x:A-h.width/2,y:q+$/2},{x:A-h.width/2,y:q-$/2+p},{x:A-g/2,y:q-$/2+p}],rt.polygon(t,R,I)},c}m(db,"iconSquare");async function pb(e,t,{config:{flowchart:r}}){const i=new Image;i.src=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:o}=lt(t);t.labelStyle=o;const a=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?a??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,a??0);const{shapeSvg:u,bbox:f,label:d}=await mt(e,t,"image-shape default"),p=t.pos==="t",g=-c/2,y=-h/2,b=t.label?8:0,x=st.svg(u),w=at(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=x.rectangle(g,y,c,h,w),v=Math.max(c,f.width),E=h+f.height+b,T=x.rectangle(-v/2,-E/2,v,E,{...w,fill:"none",stroke:"none"}),P=u.insert(()=>C,":first-child"),N=u.insert(()=>T);if(t.img){const F=u.append("image");F.attr("href",t.img),F.attr("width",c),F.attr("height",h),F.attr("preserveAspectRatio","none"),F.attr("transform",`translate(${-c/2},${p?E/2-h:-E/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-h/2-f.height/2-b/2:h/2-f.height/2+b/2})`),P.attr("transform",`translate(0,${p?f.height/2+b/2:-f.height/2-b/2})`),ot(t,N),t.intersect=function(F){if(V.info("iconSquare intersect",t,F),!t.label)return rt.rect(t,F);const k=t.x??0,L=t.y??0,O=t.height??0;let B=[];return p?B=[{x:k-f.width/2,y:L-O/2},{x:k+f.width/2,y:L-O/2},{x:k+f.width/2,y:L-O/2+f.height+b},{x:k+c/2,y:L-O/2+f.height+b},{x:k+c/2,y:L+O/2},{x:k-c/2,y:L+O/2},{x:k-c/2,y:L-O/2+f.height+b},{x:k-f.width/2,y:L-O/2+f.height+b}]:B=[{x:k-c/2,y:L-O/2},{x:k+c/2,y:L-O/2},{x:k+c/2,y:L-O/2+h},{x:k+f.width/2,y:L-O/2+h},{x:k+f.width/2/2,y:L+O/2},{x:k-f.width/2,y:L+O/2},{x:k-f.width/2,y:L-O/2+h},{x:k-c/2,y:L-O/2+h}],rt.polygon(t,B,F)},u}m(pb,"imageSquare");async function gb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),a=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*a/6,y:-a},{x:-3*a/6,y:-a}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=st.svg(n),f=at(t,{}),d=_t(l),p=u.path(d,f);c=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),h&&c.attr("style",h)}else c=Rr(n,o,a,l);return i&&c.attr("style",i),t.width=o,t.height=a,ot(t,c),t.intersect=function(u){return rt.polygon(t,l,u)},n}m(gb,"inv_trapezoid");async function ko(e,t,r){const{labelStyles:i,nodeStyles:n}=lt(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await mt(e,t,gt(t)),a=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-a/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:p}=t;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const g=st.svg(s),y=at(t,{}),b=f||d?g.path(Or(c,h,a,l,f||0),y):g.rectangle(c,h,a,l,y);u=s.insert(()=>b,":first-child"),u.attr("class","basic label-container").attr("style",ne(p))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",ne(f)).attr("ry",ne(d)).attr("x",c).attr("y",h).attr("width",a).attr("height",l);return ot(t,u),t.calcIntersect=function(g,y){return rt.rect(g,y)},t.intersect=function(g){return rt.rect(t,g)},s}m(ko,"drawRect");async function mb(e,t){const{shapeSvg:r,bbox:i,label:n}=await mt(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))})`),ot(t,s),t.intersect=function(l){return rt.rect(t,l)},r}m(mb,"labelRect");async function yb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),a=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*a/6,y:0},{x:o,y:-a},{x:-(3*a)/6,y:-a}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=st.svg(n),f=at(t,{}),d=_t(l),p=u.path(d,f);c=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),h&&c.attr("style",h)}else c=Rr(n,o,a,l);return i&&c.attr("style",i),t.width=o,t.height=a,ot(t,c),t.intersect=function(u){return rt.polygon(t,l,u)},n}m(yb,"lean_left");async function bb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),a=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:-3*a/6,y:0},{x:o,y:0},{x:o+3*a/6,y:-a},{x:0,y:-a}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=st.svg(n),f=at(t,{}),d=_t(l),p=u.path(d,f);c=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),h&&c.attr("style",h)}else c=Rr(n,o,a,l);return i&&c.attr("style",i),t.width=o,t.height=a,ot(t,c),t.intersect=function(u){return rt.polygon(t,l,u)},n}m(bb,"lean_right");function xb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,t?.width??0),a=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:a+l/2},{x:o-2*l,y:a+l/2},{x:0,y:2*a},{x:o,y:a-l/2},{x:2*l,y:a-l/2}],h=st.svg(n),u=at(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=_t(c),d=h.path(f,u),p=n.insert(()=>d,":first-child");return s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${o/2},${-a})`),ot(t,p),t.intersect=function(g){return V.info("lightningBolt intersect",t,g),rt.polygon(t,c,g)},n}m(xb,"lightningBolt");var aM=m((e,t,r,i,n,s,o)=>[`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+o}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oM=m((e,t,r,i,n,s,o)=>[`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+o}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lM=m((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function vb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0),t.width??0),l=a/2,c=l/(2.5+a/50),h=Math.max(s.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=st.svg(n),g=oM(0,0,a,h,l,c,u),y=lM(0,c,a,h,l,c),b=at(t,{}),x=p.path(g,b),w=p.path(y,b);n.insert(()=>w,":first-child").attr("class","line"),f=n.insert(()=>x,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const p=aM(0,0,a,h,l,c,u);f=n.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",ne(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-a/2}, ${-(h/2+c)})`),ot(t,f),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),t.intersect=function(p){const g=rt.rect(t,p),y=g.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let b=c*c*(1-y*y/(l*l));b>0&&(b=Math.sqrt(b)),b=c-b,p.y-(t.y??0)>0&&(b=-b),g.y+=b}return g},n}m(vb,"linedCylinder");async function wb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-a/2-a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:h/2},...Ar(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,c,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2},{x:-a/2,y:-h/2},{x:-a/2,y:h/2*1.1},{x:-a/2,y:-h/2}],g=f.polygon(p.map(b=>[b.x,b.y]),d),y=n.insert(()=>g,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),ot(t,y),t.intersect=function(b){return rt.polygon(t,p,b)},n}m(wb,"linedWaveEdgedRect");async function Cb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,h=-a/2,u=-l/2,{cssStyles:f}=t,d=st.svg(n),p=at(t,{}),g=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+a-c,y:u+l+c},{x:h+a-c,y:u+l},{x:h+a,y:u+l},{x:h+a,y:u+l-c},{x:h+a+c,y:u+l-c},{x:h+a+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+a-c,y:u+c},{x:h+a-c,y:u+l},{x:h+a,y:u+l},{x:h+a,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const b=_t(g),x=d.path(b,p),w=_t(y),C=d.path(w,{...p,fill:"none"}),v=n.insert(()=>C,":first-child");return v.insert(()=>x,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)-c-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),ot(t,v),t.intersect=function(E){return rt.polygon(t,g,E)},n}m(Cb,"multiRect");async function _b(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-a/2,f=-h/2,d=5,{cssStyles:p}=t,g=Ar(u-d,f+h+d,u+a-d,f+h+d,c,.8),y=g?.[g.length-1],b=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...g,{x:u+a-d,y:y.y-d},{x:u+a,y:y.y-d},{x:u+a,y:y.y-2*d},{x:u+a+d,y:y.y-2*d},{x:u+a+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],x=[{x:u,y:f+d},{x:u+a-d,y:f+d},{x:u+a-d,y:y.y-d},{x:u+a,y:y.y-d},{x:u+a,y:f},{x:u,y:f}],w=st.svg(n),C=at(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=_t(b),E=w.path(v,C),T=_t(x),P=w.path(T,C),N=n.insert(()=>E,":first-child");return N.insert(()=>P),N.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)+d-c/2-(s.y-(s.top??0))})`),ot(t,N),t.intersect=function(F){return rt.polygon(t,b,F)},n}m(_b,"multiWaveEdgedRectangle");async function Sb(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=lt(t);t.labelStyle=i,t.useHtmlLabels||Jt().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:a,label:l}=await mt(e,t,gt(t)),c=Math.max(a.width+(t.padding??0)*2,t?.width??0),h=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=-c/2,f=-h/2,{cssStyles:d}=t,p=st.svg(o),g=at(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=p.rectangle(u,f,c,h,g),b=o.insert(()=>y,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",n),l.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),ot(t,b),t.intersect=function(x){return rt.rect(t,x)},o}m(Sb,"note");var cM=m((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 kb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=s.width+t.padding,a=s.height+t.padding,l=o+a,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=st.svg(n),p=at(t,{}),g=cM(0,0,l),y=d.path(g,p);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Rr(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),ot(t,u),t.calcIntersect=function(d,p){const g=d.width,y=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],b=rt.polygon(d,y,p);return{x:b.x-.5,y:b.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},n}m(kb,"question");async function Tb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0),t?.width??0),l=Math.max(s.height+(t.padding??0),t?.height??0),c=-a/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,p=st.svg(n),g=at(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=_t(f),b=p.path(y,g),x=n.insert(()=>b,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),ot(t,x),t.intersect=function(w){return rt.polygon(t,f,w)},n}m(Tb,"rect_left_inv_arrow");async function Eb(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),o=s.insert("g"),a=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=a.node().appendChild(await Yr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(qt(Et()?.flowchart?.htmlLabels)){const P=h.children[0],N=kt(h);u=P.getBoundingClientRect(),N.attr("width",u.width),N.attr("height",u.height)}V.info("Text 2",l);const f=l||[],d=h.getBBox(),p=a.node().appendChild(await Yr(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),g=p.children[0],y=kt(p);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const b=(t.padding||0)/2;kt(p).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+b+5)+")"),kt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=a.node().getBBox(),a.attr("transform","translate("+-u.width/2+", "+(-u.height/2-b+3)+")");const x=u.width+(t.padding||0),w=u.height+(t.padding||0),C=-u.width/2-b,v=-u.height/2-b;let E,T;if(t.look==="handDrawn"){const P=st.svg(s),N=at(t,{}),F=P.path(Or(C,v,x,w,t.rx||0),N),k=P.line(-u.width/2-b,-u.height/2-b+d.height+b,u.width/2+b,-u.height/2-b+d.height+b,N);T=s.insert(()=>(V.debug("Rough node insert CXC",F),k),":first-child"),E=s.insert(()=>(V.debug("Rough node insert CXC",F),F),":first-child")}else E=o.insert("rect",":first-child"),T=o.insert("line"),E.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-b).attr("y",-u.height/2-b).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-b).attr("x2",u.width/2+b).attr("y1",-u.height/2-b+d.height+b).attr("y2",-u.height/2-b+d.height+b);return ot(t,E),t.intersect=function(P){return rt.rect(t,P)},s}m(Eb,"rectWithTitle");function Bn(e,t,r,i,n,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,p=f/s,g=Math.sqrt(d**2+p**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),b=l+y*s*Math.sin(h)*(o?-1:1),x=c-y*n*Math.cos(h)*(o?-1:1),w=Math.atan2((t-x)/s,(e-b)/n);let v=Math.atan2((i-x)/s,(r-b)/n)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const E=[];for(let T=0;T<20;T++){const P=T/19,N=w+P*v,F=b+n*Math.cos(N),k=x+s*Math.sin(N);E.push({x:F,y:k})}return E}m(Bn,"generateArcPoints");async function Lb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=t?.padding??0,a=t?.padding??0,l=(t?.width?t?.width:s.width)+o*2,c=(t?.height?t?.height:s.height)+a*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,d=st.svg(n),p=at(t,{});t.stroke&&(p.stroke=t.stroke),t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...Bn(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...Bn(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...Bn(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...Bn(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=_t(g),b=d.path(y,p),x=n.insert(()=>b,":first-child");return x.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),ot(t,x),t.intersect=function(w){return rt.polygon(t,g,w)},n}m(Lb,"roundedRect");async function Ab(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=t?.padding??0,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=-s.width/2-a,u=-s.height/2-a,{cssStyles:f}=t,d=st.svg(n),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(g.map(x=>[x.x,x.y]),p),b=n.insert(()=>y,":first-child");return b.attr("class","basic label-container").attr("style",ne(f)),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-(s.y-(s.top??0))})`),ot(t,b),t.intersect=function(x){return rt.rect(t,x)},n}m(Ab,"shadedProcess");async function $b(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=-a/2,h=-l/2,{cssStyles:u}=t,f=st.svg(n),d=at(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:c,y:h},{x:c,y:h+l},{x:c+a,y:h+l},{x:c+a,y:h-l/2}],g=_t(p),y=f.path(g,d),b=n.insert(()=>y,":first-child");return b.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),b.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))}, ${-l/4+(t.padding??0)-(s.y-(s.top??0))})`),ot(t,b),t.intersect=function(x){return rt.polygon(t,p,x)},n}m($b,"slopedRect");async function Mb(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return ko(e,t,r)}m(Mb,"squareRect");async function Bb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=s.height+t.padding,a=s.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=st.svg(n),u=at(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-a/2+l,y:-o/2},{x:a/2-l,y:-o/2},...is(-a/2+l,0,l,50,90,270),{x:a/2-l,y:o/2},...is(a/2-l,0,l,50,270,450)],d=_t(f),p=h.path(d,u),g=n.insert(()=>p,":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),ot(t,g),t.intersect=function(y){return rt.polygon(t,f,y)},n}m(Bb,"stadium");async function Ob(e,t){return ko(e,t,{rx:5,ry:5})}m(Ob,"state");function Rb(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=lt(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:a,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=st.svg(c),u=at(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=a??l,p=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),g=c.insert(()=>f,":first-child");return g.insert(()=>p),s&&g.selectAll("path").attr("style",s),n&&g.selectAll("path").attr("style",n),ot(t,g),t.intersect=function(y){return rt.circle(t,7,y)},c}m(Rb,"stateEnd");function Db(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const a=st.svg(n).circle(0,0,14,XT(i));s=n.insert(()=>a),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=n.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return ot(t,s),t.intersect=function(o){return rt.circle(t,7,o)},n}m(Db,"stateStart");async function Fb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=(t?.padding||0)/2,a=s.width+t.padding,l=s.height+t.padding,c=-s.width/2-o,h=-s.height/2-o,u=[{x:0,y:0},{x:a,y:0},{x:a,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=st.svg(n),d=at(t,{}),p=f.rectangle(c-8,h,a+16,l,d),g=f.line(c,h,c,h+l,d),y=f.line(c+a,h,c+a,h+l,d);n.insert(()=>g,":first-child"),n.insert(()=>y,":first-child");const b=n.insert(()=>p,":first-child"),{cssStyles:x}=t;b.attr("class","basic label-container").attr("style",ne(x)),ot(t,b)}else{const f=Rr(n,a,l,u);i&&f.attr("style",i),ot(t,f)}return t.intersect=function(f){return rt.polygon(t,u,f)},n}m(Fb,"subroutine");async function Ib(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),a=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-a/2,h=.2*a,u=.2*a,{cssStyles:f}=t,d=st.svg(n),p=at(t,{}),g=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+a},{x:l-h/2,y:c+a}],y=[{x:l+o-h/2,y:c+a},{x:l+o+h/2,y:c+a},{x:l+o+h/2,y:c+a-u}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const b=_t(g),x=d.path(b,p),w=_t(y),C=d.path(w,{...p,fillStyle:"solid"}),v=n.insert(()=>C,":first-child");return v.insert(()=>x,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),ot(t,v),t.intersect=function(E){return rt.polygon(t,g,E)},n}m(Ib,"taggedRect");async function Nb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*a,u=.2*l,f=l+c,{cssStyles:d}=t,p=st.svg(n),g=at(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-a/2-a/2*.1,y:f/2},...Ar(-a/2-a/2*.1,f/2,a/2+a/2*.1,f/2,c,.8),{x:a/2+a/2*.1,y:-f/2},{x:-a/2-a/2*.1,y:-f/2}],b=-a/2+a/2*.1,x=-f/2-u*.4,w=[{x:b+a-h,y:(x+l)*1.4},{x:b+a,y:x+l-u},{x:b+a,y:(x+l)*.9},...Ar(b+a,(x+l)*1.3,b+a-h,(x+l)*1.5,-l*.03,.5)],C=_t(y),v=p.path(C,g),E=_t(w),T=p.path(E,{...g,fillStyle:"solid"}),P=n.insert(()=>T,":first-child");return P.insert(()=>v,":first-child"),P.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),ot(t,P),t.intersect=function(N){return rt.polygon(t,y,N)},n}m(Nb,"taggedWaveEdgedRectangle");async function Pb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=Math.max(s.width+t.padding,t?.width||0),a=Math.max(s.height+t.padding,t?.height||0),l=-o/2,c=-a/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",a),ot(t,h),t.intersect=function(u){return rt.rect(t,u)},n}m(Pb,"text");var hM=m((e,t,r,i,n,s)=>`M${e},${t}
|
|
233
|
+
a${n},${s} 0,0,1 0,${-i}
|
|
234
|
+
l${r},0
|
|
235
|
+
a${n},${s} 0,0,1 0,${i}
|
|
236
|
+
M${r},${-i}
|
|
237
|
+
a${n},${s} 0,0,0 0,${i}
|
|
238
|
+
l${-r},0`,"createCylinderPathD"),uM=m((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"),fM=m((e,t,r,i,n,s)=>[`M${e+r/2},${-i/2}`,`a${n},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function jb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o,halfPadding:a}=await mt(e,t,gt(t)),l=t.look==="neo"?a*2:a,c=s.height+l,h=c/2,u=h/(2.5+c/50),f=s.width+u+l,{cssStyles:d}=t;let p;if(t.look==="handDrawn"){const g=st.svg(n),y=uM(0,0,f,c,u,h),b=fM(0,0,f,c,u,h),x=g.path(y,at(t,{})),w=g.path(b,at(t,{fill:"none"}));p=n.insert(()=>w,":first-child"),p=n.insert(()=>x,":first-child"),p.attr("class","basic label-container"),d&&p.attr("style",d)}else{const g=hM(0,0,f,c,u,h);p=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",ne(d)).attr("style",i),p.attr("class","basic label-container"),d&&p.selectAll("path").attr("style",d),i&&p.selectAll("path").attr("style",i)}return p.attr("label-offset-x",u),p.attr("transform",`translate(${-f/2}, ${c/2} )`),o.attr("transform",`translate(${-(s.width/2)-u-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),ot(t,p),t.intersect=function(g){const y=rt.rect(t,g),b=y.y-(t.y??0);if(h!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let x=u*u*(1-b*b/(h*h));x!=0&&(x=Math.sqrt(Math.abs(x))),x=u-x,g.x-(t.x??0)>0&&(x=-x),y.x+=x}return y},n}m(jb,"tiltedCylinder");async function zb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=s.width+t.padding,a=s.height+t.padding,l=[{x:-3*a/6,y:0},{x:o+3*a/6,y:0},{x:o,y:-a},{x:0,y:-a}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=st.svg(n),f=at(t,{}),d=_t(l),p=u.path(d,f);c=n.insert(()=>p,":first-child").attr("transform",`translate(${-o/2}, ${a/2})`),h&&c.attr("style",h)}else c=Rr(n,o,a,l);return i&&c.attr("style",i),t.width=o,t.height=a,ot(t,c),t.intersect=function(u){return rt.polygon(t,l,u)},n}m(zb,"trapezoid");async function Wb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=60,a=20,l=Math.max(o,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=st.svg(n),f=at(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],p=_t(d),g=u.path(p,f),y=n.insert(()=>g,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),ot(t,y),t.intersect=function(b){return rt.polygon(t,d,b)},n}m(Wb,"trapezoidalPentagon");async function qb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=qt(Et().flowchart?.htmlLabels),l=s.width+(t.padding??0),c=l+s.height,h=l+s.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=st.svg(n),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=_t(u),y=d.path(g,p),b=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=l,t.height=c,ot(t,b),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${c/2-(s.height+(t.padding??0)/(a?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(x){return V.info("Triangle intersect",t,u,x),rt.polygon(t,u,x)},n}m(qb,"triangle");async function Hb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-a,p=d>0?d/2:0,g=st.svg(n),y=at(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=[{x:-a/2-p,y:h/2},...Ar(-a/2-p,h/2,a/2+p,h/2,c,.8),{x:a/2+p,y:-h/2},{x:-a/2-p,y:-h/2}],x=_t(b),w=g.path(x,y),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-a/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c-(s.y-(s.top??0))})`),ot(t,C),t.intersect=function(v){return rt.polygon(t,b,v)},n}m(Hb,"waveEdgedRectangle");async function Ub(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await mt(e,t,gt(t)),o=100,a=50,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,a);const d=Math.min(f*.2,f/4),p=f+d*2,{cssStyles:g}=t,y=st.svg(n),b=at(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-u/2,y:p/2},...Ar(-u/2,p/2,u/2,p/2,d,1),{x:u/2,y:-p/2},...Ar(u/2,-p/2,-u/2,-p/2,d,-1)],w=_t(x),C=y.path(w,b),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),ot(t,v),t.intersect=function(E){return rt.polygon(t,x,E)},n}m(Ub,"waveRectangle");async function Yb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:o}=await mt(e,t,gt(t)),a=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,h=-a/2,u=-l/2,{cssStyles:f}=t,d=st.svg(n),p=at(t,{}),g=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+a,y:u+l},{x:h+a,y:u-c}],y=`M${h-c},${u-c} L${h+a},${u-c} L${h+a},${u+l} L${h-c},${u+l} L${h-c},${u-c}
|
|
239
|
+
M${h-c},${u} L${h+a},${u}
|
|
240
|
+
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const b=d.path(y,p),x=n.insert(()=>b,":first-child");return x.attr("transform",`translate(${c/2}, ${c/2})`),x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)+c/2-(s.x-(s.left??0))}, ${-(s.height/2)+c/2-(s.y-(s.top??0))})`),ot(t,x),t.intersect=function(w){return rt.polygon(t,g,w)},n}m(Yb,"windowPane");async function Uh(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:H}=Jt(),{background:z}=H,U={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${z}`]};await Uh(e,U)}const i=Jt();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,s=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:a,nodeStyles:l}=lt(t);if(r.attributes.length===0&&t.label){const H={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};Qe(t.label,i)+H.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const z=await ko(e,t,H);if(!qt(i.htmlLabels)){const U=z.select("text"),Y=U.node()?.getBBox();U.attr("transform",`translate(${-Y.width/2}, 0)`)}return z}i.htmlLabels||(n*=1.25,s*=1.25);let c=gt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await Si(h,t.label??"",i,0,0,["name"],a);u.height+=s;let f=0;const d=[],p=[];let g=0,y=0,b=0,x=0,w=!0,C=!0;for(const H of r.attributes){const z=await Si(h,H.type,i,0,f,["attribute-type"],a);g=Math.max(g,z.width+n);const U=await Si(h,H.name,i,0,f,["attribute-name"],a);y=Math.max(y,U.width+n);const Y=await Si(h,H.keys.join(),i,0,f,["attribute-keys"],a);b=Math.max(b,Y.width+n);const K=await Si(h,H.comment,i,0,f,["attribute-comment"],a);x=Math.max(x,K.width+n);const Z=Math.max(z.height,U.height,Y.height,K.height)+s;p.push({yOffset:f,rowHeight:Z}),f+=Z}let v=4;b<=n&&(w=!1,b=0,v--),x<=n&&(C=!1,x=0,v--);const E=h.node().getBBox();if(u.width+n*2-(g+y+b+x)>0){const H=u.width+n*2-(g+y+b+x);g+=H/v,y+=H/v,b>0&&(b+=H/v),x>0&&(x+=H/v)}const T=g+y+b+x,P=st.svg(h),N=at(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");let F=0;p.length>0&&(F=p.reduce((H,z)=>H+(z?.rowHeight??0),0));const k=Math.max(E.width+n*2,t?.width||0,T),L=Math.max((F??0)+u.height,t?.height||0),O=-k/2,B=-L/2;h.selectAll("g:not(:first-child)").each((H,z,U)=>{const Y=kt(U[z]),K=Y.attr("transform");let Z=0,Q=0;if(K){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(K);et&&(Z=parseFloat(et[1]),Q=parseFloat(et[2]),Y.attr("class").includes("attribute-name")?Z+=g:Y.attr("class").includes("attribute-keys")?Z+=g+y:Y.attr("class").includes("attribute-comment")&&(Z+=g+y+b))}Y.attr("transform",`translate(${O+n/2+Z}, ${Q+B+u.height+s/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(B+s/2)+")");const I=P.rectangle(O,B,k,L,N),A=h.insert(()=>I,":first-child").attr("style",o.join("")),{themeVariables:q}=Jt(),{rowEven:$,rowOdd:R,nodeBorder:_}=q;d.push(0);for(const[H,z]of p.entries()){const Y=(H+1)%2===0&&z.yOffset!==0,K=P.rectangle(O,u.height+B+z?.yOffset,k,z?.rowHeight,{...N,fill:Y?$:R,stroke:_});h.insert(()=>K,"g.label").attr("style",o.join("")).attr("class",`row-rect-${Y?"even":"odd"}`)}let M=P.line(O,u.height+B,k+O,u.height+B,N);h.insert(()=>M).attr("class","divider"),M=P.line(g+O,u.height+B,g+O,L+B,N),h.insert(()=>M).attr("class","divider"),w&&(M=P.line(g+y+O,u.height+B,g+y+O,L+B,N),h.insert(()=>M).attr("class","divider")),C&&(M=P.line(g+y+b+O,u.height+B,g+y+b+O,L+B,N),h.insert(()=>M).attr("class","divider"));for(const H of d)M=P.line(O,u.height+B+H,k+O,u.height+B+H,N),h.insert(()=>M).attr("class","divider");if(ot(t,A),l&&t.look!=="handDrawn"){const z=l.split(";")?.filter(U=>U.includes("stroke"))?.map(U=>`${U}`).join("; ");h.selectAll("path").attr("style",z??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(H){return rt.rect(t,H)},h}m(Uh,"erBox");async function Si(e,t,r,i=0,n=0,s=[],o=""){const a=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==Ol(t)&&(t=Ol(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=a.node().appendChild(await wr(a,t,{width:Qe(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(qt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=kt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}m(Si,"addText");async function Vb(e,t,r,i,n=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",gt(t)).attr("id",t.domId||t.id);let a=null,l=null,c=null,h=null,u=0,f=0,d=0;if(a=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const x=t.annotations[0];await On(a,{text:`«${x}»`},0),u=a.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await On(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();f=p.height,c=o.insert("g").attr("class","members-group text");let g=0;for(const x of t.members){const w=await On(c,x,g,[x.parseClassifier()]);g+=w+s}d=c.node().getBBox().height,d<=0&&(d=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const x of t.methods){const w=await On(h,x,y,[x.parseClassifier()]);y+=w+s}let b=o.node().getBBox();if(a!==null){const x=a.node().getBBox();a.attr("transform",`translate(${-x.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${u})`),b=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),b=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),b=o.node().getBBox(),{shapeSvg:o,bbox:b}}m(Vb,"textHelper");async function On(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Jt();let o="useHtmlLabels"in t?t.useHtmlLabels:qt(s.htmlLabels)??!0,a="";"text"in t?a=t.text:a=t.label,!o&&a.startsWith("\\")&&(a=a.substring(1)),Jr(a)&&(o=!0);const l=await wr(n,Jc(Br(a)),{width:Qe(a,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let c,h=1;if(o){const u=l.children[0],f=kt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const p=a.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function b(){if(g.style.display="flex",g.style.flexDirection="column",p){const x=s.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,C=parseInt(x,10)*5+"px";g.style.minWidth=C,g.style.maxWidth=C}else g.style.width="100%";y(g)}m(b,"setupImage"),setTimeout(()=>{g.complete&&b()}),g.addEventListener("error",b),g.addEventListener("load",b)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&kt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=a[0]+a.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),a[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}m(On,"addText");async function Gb(e,t){const r=Et(),i=r.class.padding??12,n=i,s=t.useHtmlLabels??qt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:a,bbox:l}=await Vb(e,t,r,s,n),{labelStyles:c,nodeStyles:h}=lt(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,d=st.svg(a),p=at(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=n:o.members.length>0&&o.methods.length===0&&(y+=n*2);const b=-g/2,x=-y/2,w=d.rectangle(b-i,x-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),g+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),p),C=a.insert(()=>w,":first-child");C.attr("class","basic label-container");const v=C.node().getBBox();a.selectAll(".text").each((N,F,k)=>{const L=kt(k[F]),O=L.attr("transform");let B=0;if(O){const $=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);$&&(B=parseFloat($[2]))}let I=B+x+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);s||(I-=4);let A=b;(L.attr("class").includes("label-group")||L.attr("class").includes("annotation-group"))&&(A=-L.node()?.getBBox().width/2||0,a.selectAll("text").each(function(q,$,R){window.getComputedStyle(R[$]).textAnchor==="middle"&&(A=0)})),L.attr("transform",`translate(${A}, ${I})`)});const E=a.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,T=a.select(".label-group").node().getBBox().height-(f?i/2:0)||0,P=a.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const N=d.line(v.x,E+T+x+i,v.x+v.width,E+T+x+i,p);a.insert(()=>N).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const N=d.line(v.x,E+T+P+x+n*2+i,v.x+v.width,E+T+P+x+i+n*2,p);a.insert(()=>N).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&a.selectAll("path").attr("style",u),C.select(":nth-child(2)").attr("style",u),a.selectAll(".divider").select("path").attr("style",u),t.labelStyle?a.selectAll("span").attr("style",t.labelStyle):a.selectAll("span").attr("style",u),!s){const N=RegExp(/color\s*:\s*([^;]*)/),F=N.exec(u);if(F){const k=F[0].replace("color","fill");a.selectAll("tspan").attr("style",k)}else if(c){const k=N.exec(c);if(k){const L=k[0].replace("color","fill");a.selectAll("tspan").attr("style",L)}}}return ot(t,C),t.intersect=function(N){return rt.rect(t,N)},a}m(Gb,"classBox");async function Xb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const n=t,s=t,o=20,a=20,l="verifyMethod"in t,c=gt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await Ue(h,`<<${n.type}>>`,0,t.labelStyle):u=await Ue(h,"<<Element>>",0,t.labelStyle);let f=u;const d=await Ue(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+a,l){const E=await Ue(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,f,t.labelStyle);f+=E;const T=await Ue(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=T;const P=await Ue(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=P,await Ue(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const E=await Ue(h,`${s.type?`Type: ${s.type}`:""}`,f,t.labelStyle);f+=E,await Ue(h,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,f,t.labelStyle)}const p=(h.node()?.getBBox().width??200)+o,g=(h.node()?.getBBox().height??200)+o,y=-p/2,b=-g/2,x=st.svg(h),w=at(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=x.rectangle(y,b,p,g,w),v=h.insert(()=>C,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((E,T,P)=>{const N=kt(P[T]),F=N.attr("transform");let k=0,L=0;if(F){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(F);A&&(k=parseFloat(A[1]),L=parseFloat(A[2]))}const O=L-g/2;let B=y+o/2;(T===0||T===1)&&(B=k),N.attr("transform",`translate(${B}, ${O+o})`)}),f>u+d+a){const E=x.line(y,b+u+d+a,y+p,b+u+d+a,w);h.insert(()=>E).attr("style",i)}return ot(t,v),t.intersect=function(E){return rt.rect(t,E)},h}m(Xb,"requirementBox");async function Ue(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),s=Et(),o=s.htmlLabels??!0,a=await wr(n,Jc(Br(t)),{width:Qe(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let l;if(o){const c=a.children[0],h=kt(a);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=a.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=a.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}m(Ue,"addText");var dM=m(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 Kb(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=lt(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:a,bbox:l,label:c}=await mt(e,t,gt(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,g;f?{label:p,bbox:g}=await fl(f,"ticket"in t&&t.ticket||"",d):{label:p,bbox:g}=await fl(a,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:b}=await fl(a,"assigned"in t&&t.assigned||"",d);t.width=o;const x=10,w=t?.width||0,C=Math.max(g.height,b.height)/2,v=Math.max(l.height+x*2,t?.height||0)+C,E=-w/2,T=-v/2;c.attr("transform","translate("+(h-w/2)+", "+(-C-l.height/2)+")"),p.attr("transform","translate("+(h-w/2)+", "+(-C+l.height/2)+")"),y.attr("transform","translate("+(h+w/2-b.width-2*s)+", "+(-C+l.height/2)+")");let P;const{rx:N,ry:F}=t,{cssStyles:k}=t;if(t.look==="handDrawn"){const L=st.svg(a),O=at(t,{}),B=N||F?L.path(Or(E,T,w,v,N||0),O):L.rectangle(E,T,w,v,O);P=a.insert(()=>B,":first-child"),P.attr("class","basic label-container").attr("style",k||null)}else{P=a.insert("rect",":first-child"),P.attr("class","basic label-container __APA__").attr("style",n).attr("rx",N??5).attr("ry",F??5).attr("x",E).attr("y",T).attr("width",w).attr("height",v);const L="priority"in t&&t.priority;if(L){const O=a.append("line"),B=E+2,I=T+Math.floor((N??0)/2),A=T+v-Math.floor((N??0)/2);O.attr("x1",B).attr("y1",I).attr("x2",B).attr("y2",A).attr("stroke-width","4").attr("stroke",dM(L))}}return ot(t,P),t.height=v,t.intersect=function(L){return rt.rect(t,L)},a}m(Kb,"kanbanItem");async function Zb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o,label:a}=await mt(e,t,gt(t)),l=s.width+10*o,c=s.height+8*o,h=.15*l,{cssStyles:u}=t,f=s.width+20,d=s.height+20,p=Math.max(l,f),g=Math.max(c,d);a.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const b=`M0 0
|
|
241
|
+
a${h},${h} 1 0,0 ${p*.25},${-1*g*.1}
|
|
242
|
+
a${h},${h} 1 0,0 ${p*.25},0
|
|
243
|
+
a${h},${h} 1 0,0 ${p*.25},0
|
|
244
|
+
a${h},${h} 1 0,0 ${p*.25},${g*.1}
|
|
245
|
+
|
|
246
|
+
a${h},${h} 1 0,0 ${p*.15},${g*.33}
|
|
247
|
+
a${h*.8},${h*.8} 1 0,0 0,${g*.34}
|
|
248
|
+
a${h},${h} 1 0,0 ${-1*p*.15},${g*.33}
|
|
249
|
+
|
|
250
|
+
a${h},${h} 1 0,0 ${-1*p*.25},${g*.15}
|
|
251
|
+
a${h},${h} 1 0,0 ${-1*p*.25},0
|
|
252
|
+
a${h},${h} 1 0,0 ${-1*p*.25},0
|
|
253
|
+
a${h},${h} 1 0,0 ${-1*p*.25},${-1*g*.15}
|
|
254
|
+
|
|
255
|
+
a${h},${h} 1 0,0 ${-1*p*.1},${-1*g*.33}
|
|
256
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*g*.34}
|
|
257
|
+
a${h},${h} 1 0,0 ${p*.1},${-1*g*.33}
|
|
258
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=st.svg(n),w=at(t,{}),C=x.path(b,w);y=n.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",ne(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",b);return y.attr("transform",`translate(${-p/2}, ${-g/2})`),ot(t,y),t.calcIntersect=function(x,w){return rt.rect(x,w)},t.intersect=function(x){return V.info("Bang intersect",t,x),rt.rect(t,x)},n}m(Zb,"bang");async function Qb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o,label:a}=await mt(e,t,gt(t)),l=s.width+2*o,c=s.height+2*o,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:p}=t;let g;const y=`M0 0
|
|
259
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
260
|
+
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
261
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
262
|
+
|
|
263
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
264
|
+
a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
|
|
265
|
+
|
|
266
|
+
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
267
|
+
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
268
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
269
|
+
|
|
270
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
271
|
+
a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
|
|
272
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=st.svg(n),x=at(t,{}),w=b.path(y,x);g=n.insert(()=>w,":first-child"),g.attr("class","basic label-container").attr("style",ne(p))}else g=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return a.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),g.attr("transform",`translate(${-l/2}, ${-c/2})`),ot(t,g),t.calcIntersect=function(b,x){return rt.rect(b,x)},t.intersect=function(b){return V.info("Cloud intersect",t,b),rt.rect(t,b)},n}m(Qb,"cloud");async function Jb(e,t){const{labelStyles:r,nodeStyles:i}=lt(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:o,label:a}=await mt(e,t,gt(t)),l=s.width+8*o,c=s.height+2*o,h=5,u=`
|
|
273
|
+
M${-l/2} ${c/2-h}
|
|
274
|
+
v${-c+2*h}
|
|
275
|
+
q0,-${h} ${h},-${h}
|
|
276
|
+
h${l-2*h}
|
|
277
|
+
q${h},0 ${h},${h}
|
|
278
|
+
v${c-2*h}
|
|
279
|
+
q0,${h} -${h},${h}
|
|
280
|
+
h${-l+2*h}
|
|
281
|
+
q-${h},0 -${h},-${h}
|
|
282
|
+
Z
|
|
283
|
+
`,f=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),a.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),n.append(()=>a.node()),ot(t,f),t.calcIntersect=function(d,p){return rt.rect(d,p)},t.intersect=function(d){return rt.rect(t,d)},n}m(Jb,"defaultMindmapNode");async function tx(e,t){const r={padding:t.padding??0};return Hh(e,t,r)}m(tx,"mindmapCircle");var pM=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Mb},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Lb},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Bb},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Fb},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:eb},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Hh},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Zb},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Qb},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:kb},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:lb},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bb},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:yb},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:zb},{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:gb},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ib},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Pb},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:V0},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ab},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Db},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Rb},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ab},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:cb},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Z0},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Q0},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:J0},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:xb},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Hb},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ob},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:jb},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:vb},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tb},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:rb},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:qb},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Yb},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:nb},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Wb},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:sb},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$b},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:_b},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Cb},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Y0},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:K0},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Nb},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ib},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ub},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Tb},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:wb}],gM=m(()=>{const t=[...Object.entries({state:Ob,choice:G0,note:Sb,rectWithTitle:Eb,labelRect:mb,iconSquare:db,iconCircle:ub,icon:hb,iconRounded:fb,imageSquare:pb,anchor:U0,kanbanItem:Kb,mindmapCircle:tx,defaultMindmapNode:Jb,classBox:Gb,erBox:Uh,requirementBox:Xb}),...pM.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ex=gM();function rx(e){return e in ex}m(rx,"isValidShape");var To=new Map;async function Yh(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?ex[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await s(i,t,r)}else n=await s(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),To.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}m(Yh,"insertNode");var mM=m((e,t)=>{To.set(t.id,e)},"setNodeElem"),yM=m(()=>{To.clear()},"clear"),bM=m(e=>{const t=To.get(e.id);V.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"),xM=m((e,t,r,i,n,s)=>{t.arrowTypeStart&&md(e,"start",t.arrowTypeStart,r,i,n,s),t.arrowTypeEnd&&md(e,"end",t.arrowTypeEnd,r,i,n,s)},"addEdgeMarkers"),vM={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{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}},md=m((e,t,r,i,n,s,o)=>{const a=vM[r];if(!a){V.warn(`Unknown arrow type: ${r}`);return}const l=a.type,h=`${n}_${s}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const p=d.cloneNode(!0);p.id=f,p.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),a.fill&&y.setAttribute("fill",o)}),d.parentNode?.appendChild(p)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Ha=new Map,Zt=new Map,wM=m(()=>{Ha.clear(),Zt.clear()},"clear"),kn=m(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),ix=m(async(e,t)=>{let r=qt(Et().flowchart.htmlLabels);const i=await wr(e,t.label,{style:kn(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});V.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),s=n.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();if(r){const l=i.children[0],c=kt(i);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Ha.set(t.id,n),t.width=o.width,t.height=o.height;let a;if(t.startLabelLeft){const l=await Yr(t.startLabelLeft,kn(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");a=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Zt.get(t.id)||Zt.set(t.id,{}),Zt.get(t.id).startLeft=c,Rn(a,t.startLabelLeft)}if(t.startLabelRight){const l=await Yr(t.startLabelRight,kn(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");a=c.node().appendChild(l),h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Zt.get(t.id)||Zt.set(t.id,{}),Zt.get(t.id).startRight=c,Rn(a,t.startLabelRight)}if(t.endLabelLeft){const l=await Yr(t.endLabelLeft,kn(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");a=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Zt.get(t.id)||Zt.set(t.id,{}),Zt.get(t.id).endLeft=c,Rn(a,t.endLabelLeft)}if(t.endLabelRight){const l=await Yr(t.endLabelRight,kn(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");a=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Zt.get(t.id)||Zt.set(t.id,{}),Zt.get(t.id).endRight=c,Rn(a,t.endLabelRight)}return i},"insertEdgeLabel");function Rn(e,t){Et().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}m(Rn,"setTerminalWidth");var nx=m((e,t)=>{V.debug("Moving label abc88 ",e.id,e.label,Ha.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Et(),{subGraphTitleTotalMargin:n}=uo(i);if(e.label){const s=Ha.get(e.id);let o=e.x,a=e.y;if(r){const l=Le.calcLabelPosition(r);V.debug("Moving label "+e.label+" from (",o,",",a,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,a=l.y)}s.attr("transform",`translate(${o}, ${a+n/2})`)}if(e.startLabelLeft){const s=Zt.get(e.id).startLeft;let o=e.x,a=e.y;if(r){const l=Le.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.startLabelRight){const s=Zt.get(e.id).startRight;let o=e.x,a=e.y;if(r){const l=Le.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.endLabelLeft){const s=Zt.get(e.id).endLeft;let o=e.x,a=e.y;if(r){const l=Le.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}if(e.endLabelRight){const s=Zt.get(e.id).endRight;let o=e.x,a=e.y;if(r){const l=Le.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,a=l.y}s.attr("transform",`translate(${o}, ${a})`)}},"positionEdgeLabel"),CM=m((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,a=e.height/2;return n>=o||s>=a},"outsideNode"),_M=m((e,t,r)=>{V.debug(`intersection calc abc89:
|
|
284
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
285
|
+
insidePoint : ${JSON.stringify(r)}
|
|
286
|
+
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),o=e.width/2;let a=r.x<t.x?o-s:o+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;a=h*u/c;const f={x:r.x<t.x?r.x+a:r.x-h+a,y:r.y<t.y?r.y+c-u:r.y-c+u};return a===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),V.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${a}`,f),f}else{r.x<t.x?a=t.x-o-i:a=i-o-t.x;let u=c*a/h,f=r.x<t.x?r.x+h-a:r.x-h+a,d=r.y<t.y?r.y+u:r.y-u;return V.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${a}`,{_x:f,_y:d}),a===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),yd=m((e,t)=>{V.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(s=>{if(V.info("abc88 checking point",s,t),!CM(t,s)&&!n){const o=_M(t,i,s);V.debug("abc88 inside",s,i,o),V.debug("abc88 intersection",o,t);let a=!1;r.forEach(l=>{a=a||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?V.warn("abc88 no intersect",o,r):r.push(o),n=!0}else V.warn("abc88 outside",s,i),i=s,n||r.push(s)}),V.debug("returning points",r),r},"cutPathAtIntersect");function sx(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],s=e[i],o=e[i+1];(n.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-n.y)>5||n.y===s.y&&s.x===o.x&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}m(sx,"extractCornerPoints");var bd=m(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,s=Math.sqrt(i*i+n*n),o=r/s;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),SM=m(function(e){const{cornerPointPositions:t}=sx(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],s=e[i+1],o=e[i],a=bd(n,o,5),l=bd(s,o,5),c=l.x-a.x,h=l.y-a.y;r.push(a);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(s.x-n.x)>10&&Math.abs(s.y-n.y)>=10){V.debug("Corner point fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));const d=5;o.x===a.x?f={x:c<0?a.x-d+u:a.x+d-u,y:h<0?a.y-u:a.y+u}:f={x:c<0?a.x-u:a.x+u,y:h<0?a.y-d+u:a.y+d-u}}else V.debug("Corner point skipping fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),ax=m(function(e,t,r,i,n,s,o){const{handDrawnSeed:a}=Et();let l=t.points,c=!1;const h=n;var u=s;const f=[];for(const k in t.cssCompiledStyles)bh(k)||f.push(t.cssCompiledStyles[k]);u.intersect&&h.intersect&&(l=l.slice(1,t.points.length-1),l.unshift(h.intersect(l[0])),V.debug("Last point APA12",t.start,"-->",t.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),t.toCluster&&(V.info("to cluster abc88",r.get(t.toCluster)),l=yd(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(V.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=yd(l.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let d=l.filter(k=>!Number.isNaN(k.y));d=SM(d);let p=Pn;switch(p=Sa,t.curve){case"linear":p=Sa;break;case"basis":p=Pn;break;case"cardinal":p=mg;break;case"bumpX":p=ug;break;case"bumpY":p=fg;break;case"catmullRom":p=bg;break;case"monotoneX":p=Sg;break;case"monotoneY":p=kg;break;case"natural":p=Eg;break;case"step":p=Lg;break;case"stepAfter":p=$g;break;case"stepBefore":p=Ag;break;default:p=Pn}const{x:g,y}=gy(t),b=cg().x(g).y(y).curve(p);let x;switch(t.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible";break;default:x="edge-thickness-normal"}switch(t.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break;default:x+=" edge-pattern-solid"}let w,C=b(d);const v=Array.isArray(t.style)?t.style:t.style?[t.style]:[];let E=v.find(k=>k?.startsWith("stroke:"));if(t.look==="handDrawn"){const k=st.svg(e);Object.assign([],d);const L=k.path(C,{roughness:.3,seed:a});x+=" transition",w=kt(L).select("path").attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((B,I)=>B+";"+I,""):"");let O=w.attr("d");w.attr("d",O),e.node().appendChild(w.node())}else{const k=f.join(";"),L=v?v.reduce((I,A)=>I+A+";",""):"";let O="";t.animate&&(O=" edge-animation-fast"),t.animation&&(O=" edge-animation-"+t.animation);const B=k?k+";"+L+";":L;w=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")+(O??"")).attr("style",B),E=B.match(/stroke:([^;]+)/)?.[1]}let T="";(Et().flowchart.arrowMarkerAbsolute||Et().state.arrowMarkerAbsolute)&&(T=Yc(!0)),V.info("arrowTypeStart",t.arrowTypeStart),V.info("arrowTypeEnd",t.arrowTypeEnd),xM(w,t,T,o,i,E);const P=Math.floor(l.length/2),N=l[P];Le.isLabelCoordinateInPath(N,w.attr("d"))||(c=!0);let F={};return c&&(F.updatedPath=l),F.originalPath=t.points,F},"insertEdge"),kM=m((e,t,r,i)=>{t.forEach(n=>{zM[n](e,r,i)})},"insertMarkers"),TM=m((e,t,r)=>{V.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").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")},"extension"),EM=m((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")},"composition"),LM=m((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")},"aggregation"),AM=m((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")},"dependency"),$M=m((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("stroke","black").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("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),MM=m((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")},"point"),BM=m((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")},"circle"),OM=m((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")},"cross"),RM=m((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"),DM=m((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"),FM=m((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"),IM=m((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"),NM=m((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"),PM=m((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
|
|
287
|
+
L20,10
|
|
288
|
+
M20,10
|
|
289
|
+
L0,20`)},"requirement_arrow"),jM=m((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"),zM={extension:TM,composition:EM,aggregation:LM,dependency:AM,lollipop:$M,point:MM,circle:BM,cross:OM,barb:RM,only_one:DM,zero_or_one:FM,one_or_more:IM,zero_or_more:NM,requirement_arrow:PM,requirement_contains:jM},ox=kM,WM={common:ai,getConfig:Jt,insertCluster:N0,insertEdge:ax,insertEdgeLabel:ix,insertMarkers:ox,insertNode:Yh,interpolateToCurve:Sh,labelHelper:mt,log:V,positionEdgeLabel:nx},ns={},lx=m(e=>{for(const t of e)ns[t.name]=t},"registerLayoutLoaders"),qM=m(()=>{lx([{name:"dagre",loader:m(async()=>await Promise.resolve().then(()=>require("./dagre-5GWH7T2D-CtZ0NZo_.cjs")),"loader")},{name:"cose-bilkent",loader:m(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-D_u9ib7t.cjs")),"loader")}])},"registerDefaultLayoutLoaders");qM();var HM=m(async(e,t)=>{if(!(e.layoutAlgorithm in ns))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=ns[e.layoutAlgorithm];return(await r.loader()).render(e,t,WM,{algorithm:r.algorithm})},"render"),UM=m((e="",{fallback:t="dagre"}={})=>{if(e in ns)return e;if(t in ns)return V.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"),cx="comm",hx="rule",ux="decl",YM="@import",VM="@namespace",GM="@keyframes",XM="@layer",fx=Math.abs,Vh=String.fromCharCode;function dx(e){return e.trim()}function ta(e,t,r){return e.replace(t,r)}function KM(e,t,r){return e.indexOf(t,r)}function $i(e,t){return e.charCodeAt(t)|0}function Yi(e,t,r){return e.slice(t,r)}function Ye(e){return e.length}function ZM(e){return e.length}function Ps(e,t){return t.push(e),e}var Eo=1,Vi=1,px=0,Me=0,jt=0,nn="";function Gh(e,t,r,i,n,s,o,a){return{value:e,root:t,parent:r,type:i,props:n,children:s,line:Eo,column:Vi,length:o,return:"",siblings:a}}function QM(){return jt}function JM(){return jt=Me>0?$i(nn,--Me):0,Vi--,jt===10&&(Vi=1,Eo--),jt}function De(){return jt=Me<px?$i(nn,Me++):0,Vi++,jt===10&&(Vi=1,Eo++),jt}function Sr(){return $i(nn,Me)}function ea(){return Me}function Lo(e,t){return Yi(nn,e,t)}function ss(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 tB(e){return Eo=Vi=1,px=Ye(nn=e),Me=0,[]}function eB(e){return nn="",e}function dl(e){return dx(Lo(Me-1,Sc(e===91?e+2:e===40?e+1:e)))}function rB(e){for(;(jt=Sr())&&jt<33;)De();return ss(e)>2||ss(jt)>3?"":" "}function iB(e,t){for(;--t&&De()&&!(jt<48||jt>102||jt>57&&jt<65||jt>70&&jt<97););return Lo(e,ea()+(t<6&&Sr()==32&&De()==32))}function Sc(e){for(;De();)switch(jt){case e:return Me;case 34:case 39:e!==34&&e!==39&&Sc(jt);break;case 40:e===41&&Sc(e);break;case 92:De();break}return Me}function nB(e,t){for(;De()&&e+jt!==57;)if(e+jt===84&&Sr()===47)break;return"/*"+Lo(t,Me-1)+"*"+Vh(e===47?e:De())}function sB(e){for(;!ss(Sr());)De();return Lo(e,Me)}function aB(e){return eB(ra("",null,null,null,[""],e=tB(e),0,[0],e))}function ra(e,t,r,i,n,s,o,a,l){for(var c=0,h=0,u=o,f=0,d=0,p=0,g=1,y=1,b=1,x=0,w="",C=n,v=s,E=i,T=w;y;)switch(p=x,x=De()){case 40:if(p!=108&&$i(T,u-1)==58){KM(T+=ta(dl(x),"&","&\f"),"&\f",fx(c?a[c-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:T+=dl(x);break;case 9:case 10:case 13:case 32:T+=rB(p);break;case 92:T+=iB(ea()-1,7);continue;case 47:switch(Sr()){case 42:case 47:Ps(oB(nB(De(),ea()),t,r,l),l),(ss(p||1)==5||ss(Sr()||1)==5)&&Ye(T)&&Yi(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*g:a[c++]=Ye(T)*b;case 125*g:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+h:b==-1&&(T=ta(T,/\f/g,"")),d>0&&(Ye(T)-u||g===0&&p===47)&&Ps(d>32?vd(T+";",i,r,u-1,l):vd(ta(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(Ps(E=xd(T,t,r,c,h,n,a,w,C=[],v=[],u,s),s),x===123)if(h===0)ra(T,t,E,E,C,s,u,a,v);else{switch(f){case 99:if($i(T,3)===110)break;case 108:if($i(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ra(e,E,E,i&&Ps(xd(e,E,E,0,0,n,a,w,n,C=[],u,v),v),n,v,u,a,i?C:v):ra(T,E,E,E,[""],v,0,a,v)}}c=h=d=0,g=b=1,w=T="",u=o;break;case 58:u=1+Ye(T),d=p;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&JM()==125)continue}switch(T+=Vh(x),x*g){case 38:b=h>0?1:(T+="\f",-1);break;case 44:a[c++]=(Ye(T)-1)*b,b=1;break;case 64:Sr()===45&&(T+=dl(De())),f=Sr(),h=u=Ye(w=T+=sB(ea())),x++;break;case 45:p===45&&Ye(T)==2&&(g=0)}}return s}function xd(e,t,r,i,n,s,o,a,l,c,h,u){for(var f=n-1,d=n===0?s:[""],p=ZM(d),g=0,y=0,b=0;g<i;++g)for(var x=0,w=Yi(e,f+1,f=fx(y=o[g])),C=e;x<p;++x)(C=dx(y>0?d[x]+" "+w:ta(w,/&\f/g,d[x])))&&(l[b++]=C);return Gh(e,t,r,n===0?hx:a,l,c,h,u)}function oB(e,t,r,i){return Gh(e,t,r,cx,Vh(QM()),Yi(e,2,-2),0,i)}function vd(e,t,r,i,n){return Gh(e,t,r,ux,Yi(e,0,i),Yi(e,i+1,-1),i,n)}function kc(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function lB(e,t,r,i){switch(e.type){case XM:if(e.children.length)break;case YM:case VM:case ux:return e.return=e.return||e.value;case cx:return"";case GM:return e.return=e.value+"{"+kc(e.children,i)+"}";case hx:if(!Ye(e.value=e.props.join(",")))return""}return Ye(r=kc(e.children,i))?e.return=e.value+"{"+r+"}":""}var cB=ky(Object.keys,Object),hB=Object.prototype,uB=hB.hasOwnProperty;function gx(e){if(!hs(e))return cB(e);var t=[];for(var r in Object(e))uB.call(e,r)&&r!="constructor"&&t.push(r);return t}var Tc=ci(tr,"DataView"),Ec=ci(tr,"Promise"),Ua=ci(tr,"Set"),Lc=ci(tr,"WeakMap"),wd="[object Map]",fB="[object Object]",Cd="[object Promise]",_d="[object Set]",Sd="[object WeakMap]",kd="[object DataView]",dB=li(Tc),pB=li(ts),gB=li(Ec),mB=li(Ua),yB=li(Lc);exports.getTag=oi;(Tc&&exports.getTag(new Tc(new ArrayBuffer(1)))!=kd||ts&&exports.getTag(new ts)!=wd||Ec&&exports.getTag(Ec.resolve())!=Cd||Ua&&exports.getTag(new Ua)!=_d||Lc&&exports.getTag(new Lc)!=Sd)&&(exports.getTag=function(e){var t=oi(e),r=t==fB?e.constructor:void 0,i=r?li(r):"";if(i)switch(i){case dB:return kd;case pB:return wd;case gB:return Cd;case mB:return _d;case yB:return Sd}return t});var bB="[object Map]",xB="[object Set]",vB=Object.prototype,wB=vB.hasOwnProperty;function Ac(e){if(e==null)return!0;if(us(e)&&(rs(e)||typeof e=="string"||typeof e.splice=="function"||yo(e)||bo(e)||es(e)))return!e.length;var t=exports.getTag(e);if(t==bB||t==xB)return!e.size;if(hs(e))return!gx(e).length;for(var r in e)if(wB.call(e,r))return!1;return!0}var mx="c4",CB=m(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),_B=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-FPNF74CW-BFz1Fliu.cjs"));return{id:mx,diagram:e}},"loader"),SB={id:mx,detector:CB,loader:_B},kB=SB,yx="flowchart",TB=m((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),EB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-PVAE7QVJ-CuIY3tu-.cjs"));return{id:yx,diagram:e}},"loader"),LB={id:yx,detector:TB,loader:EB},AB=LB,bx="flowchart-v2",$B=m((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),MB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-PVAE7QVJ-CuIY3tu-.cjs"));return{id:bx,diagram:e}},"loader"),BB={id:bx,detector:$B,loader:MB},OB=BB,xx="er",RB=m(e=>/^\s*erDiagram/.test(e),"detector"),DB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-AWTI2OKA-CIpa-Oz9.cjs"));return{id:xx,diagram:e}},"loader"),FB={id:xx,detector:RB,loader:DB},IB=FB,vx="gitGraph",NB=m(e=>/^\s*gitGraph/.test(e),"detector"),PB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-Qk5kCNdF.cjs"));return{id:vx,diagram:e}},"loader"),jB={id:vx,detector:NB,loader:PB},zB=jB,wx="gantt",WB=m(e=>/^\s*gantt/.test(e),"detector"),qB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-OWAHRB6G-DkDxl3ww.cjs"));return{id:wx,diagram:e}},"loader"),HB={id:wx,detector:WB,loader:qB},UB=HB,Cx="info",YB=m(e=>/^\s*info/.test(e),"detector"),VB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-STP46IZ2-BHoDbP4r.cjs"));return{id:Cx,diagram:e}},"loader"),GB={id:Cx,detector:YB,loader:VB},_x="pie",XB=m(e=>/^\s*pie/.test(e),"detector"),KB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-B8uOR0EF.cjs"));return{id:_x,diagram:e}},"loader"),ZB={id:_x,detector:XB,loader:KB},Sx="quadrantChart",QB=m(e=>/^\s*quadrantChart/.test(e),"detector"),JB=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-LMRXKWRM-B0HyG11H.cjs"));return{id:Sx,diagram:e}},"loader"),tO={id:Sx,detector:QB,loader:JB},eO=tO,kx="xychart",rO=m(e=>/^\s*xychart(-beta)?/.test(e),"detector"),iO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-6GGTOJPD-iNRGxMjU.cjs"));return{id:kx,diagram:e}},"loader"),nO={id:kx,detector:rO,loader:iO},sO=nO,Tx="requirement",aO=m(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),oO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-4UW4RH46-Cibzf9eD.cjs"));return{id:Tx,diagram:e}},"loader"),lO={id:Tx,detector:aO,loader:oO},cO=lO,Ex="sequence",hO=m(e=>/^\s*sequenceDiagram/.test(e),"detector"),uO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-C3RYC4MD-BK5bmD_o.cjs"));return{id:Ex,diagram:e}},"loader"),fO={id:Ex,detector:hO,loader:uO},dO=fO,Lx="class",pO=m((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),gO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-KNZD7YFC-CWG1cA2z.cjs"));return{id:Lx,diagram:e}},"loader"),mO={id:Lx,detector:pO,loader:gO},yO=mO,Ax="classDiagram",bO=m((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),xO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-RKCZMP56-CWG1cA2z.cjs"));return{id:Ax,diagram:e}},"loader"),vO={id:Ax,detector:bO,loader:xO},wO=vO,$x="state",CO=m((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),_O=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-KXAO66HF-Cr2HjxcV.cjs"));return{id:$x,diagram:e}},"loader"),SO={id:$x,detector:CO,loader:_O},kO=SO,Mx="stateDiagram",TO=m((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),EO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-UMBNRL4Z-D3dOiWSt.cjs"));return{id:Mx,diagram:e}},"loader"),LO={id:Mx,detector:TO,loader:EO},AO=LO,Bx="journey",$O=m(e=>/^\s*journey/.test(e),"detector"),MO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-BIP6EPQ6-DerBhJ75.cjs"));return{id:Bx,diagram:e}},"loader"),BO={id:Bx,detector:$O,loader:MO},OO=BO,RO=m((e,t,r)=>{V.debug(`rendering svg for syntax error
|
|
290
|
+
`);const i=Mg(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Vc(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"),Ox={draw:RO},DO=Ox,FO={db:{},renderer:Ox,parser:{parse:m(()=>{},"parse")}},IO=FO,Rx="flowchart-elk",NO=m((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),PO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-PVAE7QVJ-CuIY3tu-.cjs"));return{id:Rx,diagram:e}},"loader"),jO={id:Rx,detector:NO,loader:PO},zO=jO,Dx="timeline",WO=m(e=>/^\s*timeline/.test(e),"detector"),qO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-XQNQX7LJ-B9-olSzM.cjs"));return{id:Dx,diagram:e}},"loader"),HO={id:Dx,detector:WO,loader:qO},UO=HO,Fx="mindmap",YO=m(e=>/^\s*mindmap/.test(e),"detector"),VO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-Q6HEUPPD-u3hjSRlQ.cjs"));return{id:Fx,diagram:e}},"loader"),GO={id:Fx,detector:YO,loader:VO},XO=GO,Ix="kanban",KO=m(e=>/^\s*kanban/.test(e),"detector"),ZO=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-6OIFK2YF-U0gLGtxY.cjs"));return{id:Ix,diagram:e}},"loader"),QO={id:Ix,detector:KO,loader:ZO},JO=QO,Nx="sankey",tR=m(e=>/^\s*sankey(-beta)?/.test(e),"detector"),eR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-GR3RE2ED-CQRxflg7.cjs"));return{id:Nx,diagram:e}},"loader"),rR={id:Nx,detector:tR,loader:eR},iR=rR,Px="packet",nR=m(e=>/^\s*packet(-beta)?/.test(e),"detector"),sR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-CaeUDn9g.cjs"));return{id:Px,diagram:e}},"loader"),aR={id:Px,detector:nR,loader:sR},jx="radar",oR=m(e=>/^\s*radar-beta/.test(e),"detector"),lR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-DLOehBeq.cjs"));return{id:jx,diagram:e}},"loader"),cR={id:jx,detector:oR,loader:lR},zx="block",hR=m(e=>/^\s*block(-beta)?/.test(e),"detector"),uR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-QIGZ2CNN-DkAbcYNH.cjs"));return{id:zx,diagram:e}},"loader"),fR={id:zx,detector:hR,loader:uR},dR=fR,Wx="architecture",pR=m(e=>/^\s*architecture/.test(e),"detector"),gR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-W76B3OCA-Cvjlkwyl.cjs"));return{id:Wx,diagram:e}},"loader"),mR={id:Wx,detector:pR,loader:gR},yR=mR,qx="treemap",bR=m(e=>/^\s*treemap/.test(e),"detector"),xR=m(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-N5W7TBWH-3Mv1I4jU.cjs"));return{id:qx,diagram:e}},"loader"),vR={id:qx,detector:bR,loader:xR},Td=!1,Ao=m(()=>{Td||(Td=!0,ya("error",IO,e=>e.toLowerCase().trim()==="error"),ya("---",{db:{clear:m(()=>{},"clear")},styles:{},renderer:{draw:m(()=>{},"draw")},parser:{parse:m(()=>{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:m(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ml(zO,XO,yR),Ml(kB,JO,wO,yO,IB,UB,GB,ZB,cO,dO,OB,AB,UO,zB,AO,kO,OO,eO,iR,aR,sO,dR,cR,vR))},"addDiagrams"),wR=m(async()=>{V.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Zr).map(async([r,{detector:i,loader:n}])=>{if(n)try{Fl(r)}catch{try{const{diagram:s,id:o}=await n();ya(o,s,i)}catch(s){throw V.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Zr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){V.error(`Failed to load ${t.length} external diagrams`);for(const r of t)V.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),CR="graphics-document document";function Hx(e,t){e.attr("role",CR),t!==""&&e.attr("aria-roledescription",t)}m(Hx,"setA11yDiagramInfo");function Ux(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)}}}m(Ux,"addSVGa11yTitleDescription");var Xr,$c=(Xr=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={}){const i=Jt(),n=Hc(t,i);t=_A(t)+`
|
|
291
|
+
`;try{Fl(n)}catch{const c=wC(n);if(!c)throw new fp(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();ya(h,u)}const{db:s,parser:o,renderer:a,init:l}=Fl(n);return o.parser&&(o.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await o.parse(t),new Xr(n,t,s,o,a)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},m(Xr,"Diagram"),Xr),Ed=[],_R=m(()=>{Ed.forEach(e=>{e()}),Ed=[]},"attachFunctions"),SR=m(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Yx(e){const t=e.match(up);if(!t)return{text:e,metadata:{}};let r=py(t[1],{schema:dy})??{};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}}m(Yx,"extractFrontMatter");var kR=m(e=>e.replace(/\r\n?/g,`
|
|
292
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),TR=m(e=>{const{text:t,metadata:r}=Yx(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"),ER=m(e=>{const t=Le.detectInit(e)??{},r=Le.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:dA(e),directive:t}},"processDirectives");function Xh(e){const t=kR(e),r=TR(t),i=ER(r.text),n=xo(r.config,i.directive);return e=SR(i.text),{code:e,title:r.title,config:n}}m(Xh,"preprocessDiagram");function Vx(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}m(Vx,"toBase64");var LR=5e4,AR="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",$R="sandbox",MR="loose",BR="http://www.w3.org/2000/svg",OR="http://www.w3.org/1999/xlink",RR="http://www.w3.org/1999/xhtml",DR="100%",FR="100%",IR="border:0;margin:0;",NR="margin:0",PR="allow-top-navigation-by-user-activation allow-popups",jR='The "iframe" tag is not supported by your browser.',zR=["foreignobject"],WR=["dominant-baseline"];function Kh(e){const t=Xh(e);return ga(),FC(t.config??{}),t}m(Kh,"processAndSetConfigs");async function Gx(e,t){Ao();try{const{code:r,config:i}=Kh(e);return{diagramType:(await Kx(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}m(Gx,"parse");var Ld=m((e,t,r=[])=>`
|
|
293
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),qR=m((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
294
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
295
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
296
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(a=>{Ac(a.styles)||o.forEach(l=>{r+=Ld(a.id,l,a.styles)}),Ac(a.textStyles)||(r+=Ld(a.id,"tspan",(a?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),HR=m((e,t,r,i)=>{const n=qR(e,r),s=r_(t,n,e.themeVariables);return kc(aB(`${i}{${s}}`),lB)},"createUserStyles"),UR=m((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Br(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),YR=m((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":FR,i=Vx(`<body style="${NR}">${e}</body>`);return`<iframe style="width:${DR};height:${r};${IR}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${PR}">
|
|
297
|
+
${jR}
|
|
298
|
+
</iframe>`},"putIntoIFrame"),Ad=m((e,t,r,i,n)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",BR);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function Mc(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}m(Mc,"sandboxedIframe");var VR=m((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),GR=m(async function(e,t,r){Ao();const i=Kh(t);t=i.code;const n=Jt();V.debug(n),t.length>(n?.maxTextSize??LR)&&(t=AR);const s="#"+e,o="i"+e,a="#"+o,l="d"+e,c="#"+l,h=m(()=>{const O=kt(f?a:c).node();O&&"remove"in O&&O.remove()},"removeTempElements");let u=kt("body");const f=n.securityLevel===$R,d=n.securityLevel===MR,p=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const L=Mc(kt(r),o);u=kt(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=kt(r);Ad(u,e,l,`font-family: ${p}`,OR)}else{if(VR(document,e,l,o),f){const L=Mc(kt("body"),o);u=kt(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=kt("body");Ad(u,e,l)}let g,y;try{g=await $c.fromText(t,{title:i.title})}catch(L){if(n.suppressErrorRendering)throw h(),L;g=await $c.fromText("error"),y=L}const b=u.select(c).node(),x=g.type,w=b.firstChild,C=w.firstChild,v=g.renderer.getClasses?.(t,g),E=HR(n,x,v,s),T=document.createElement("style");T.innerHTML=E,w.insertBefore(T,C);try{await g.renderer.draw(t,e,Ll.version,g)}catch(L){throw n.suppressErrorRendering?h():DO.draw(t,e,Ll.version),L}const P=u.select(`${c} svg`),N=g.db.getAccTitle?.(),F=g.db.getAccDescription?.();Zx(x,P,N,F),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",RR);let k=u.select(c).node().innerHTML;if(V.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),k=UR(k,f,qt(n.arrowMarkerAbsolute)),f){const L=u.select(c+" svg").node();k=YR(k,L)}else d||(k=Pi.sanitize(k,{ADD_TAGS:zR,ADD_ATTR:WR,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(_R(),y)throw y;return h(),{diagramType:x,svg:k,bindFunctions:g.db.bindFunctions}},"render");function Xx(e={}){const t=zt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),RC(t),t?.theme&&t.theme in pr?t.themeVariables=pr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=pr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?OC(t):yp();qc(r.logLevel),Ao()}m(Xx,"initialize");var Kx=m((e,t={})=>{const{code:r}=Xh(e);return $c.fromText(r,t)},"getDiagramFromText");function Zx(e,t,r,i){Hx(t,e),Ux(t,r,i,t.attr("id"))}m(Zx,"addA11yInfo");var ni=Object.freeze({render:GR,parse:Gx,getDiagramFromText:Kx,initialize:Xx,getConfig:Jt,setConfig:bp,getSiteConfig:yp,updateSiteConfig:DC,reset:m(()=>{ga()},"reset"),globalReset:m(()=>{ga(ji)},"globalReset"),defaultConfig:ji});qc(Jt().logLevel);ga(Jt());var XR=m((e,t,r)=>{V.warn(e),$h(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"),Qx=m(async function(e={querySelector:".mermaid"}){try{await KR(e)}catch(t){if($h(t)&&V.error(t.str),yr.parseError&&yr.parseError(t),!e.suppressErrors)throw V.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KR=m(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ni.getConfig();V.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");V.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(V.debug("Start On Load: "+i?.startOnLoad),ni.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new Le.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const a=[];for(const l of Array.from(n)){if(V.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;o=l.innerHTML,o=d0(Le.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Le.detectInit(o);h&&V.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await r1(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){XR(u,a,yr.parseError)}}if(a.length>0)throw a[0]},"runThrowsErrors"),Jx=m(function(e){ni.initialize(e)},"initialize"),ZR=m(async function(e,t,r){V.warn("mermaid.init is deprecated. Please use run instead."),e&&Jx(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Qx(i)},"init"),QR=m(async(e,{lazyLoad:t=!0}={})=>{Ao(),Ml(...e),t===!1&&await wR()},"registerExternalDiagrams"),t1=m(function(){if(yr.startOnLoad){const{startOnLoad:e}=ni.getConfig();e&&yr.run().catch(t=>V.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",t1,!1);var JR=m(function(e){yr.parseError=e},"setParseErrorHandler"),Ya=[],pl=!1,e1=m(async()=>{if(!pl){for(pl=!0;Ya.length>0;){const e=Ya.shift();if(e)try{await e()}catch(t){V.error("Error executing queue",t)}}pl=!1}},"executeQueue"),tD=m(async(e,t)=>new Promise((r,i)=>{const n=m(()=>new Promise((s,o)=>{ni.parse(e,t).then(a=>{s(a),r(a)},a=>{V.error("Error parsing",a),yr.parseError?.(a),o(a),i(a)})}),"performCall");Ya.push(n),e1().catch(i)}),"parse"),r1=m((e,t,r)=>new Promise((i,n)=>{const s=m(()=>new Promise((o,a)=>{ni.render(e,t,r).then(l=>{o(l),i(l)},l=>{V.error("Error parsing",l),yr.parseError?.(l),a(l),n(l)})}),"performCall");Ya.push(s),e1().catch(n)}),"render"),eD=m(()=>Object.keys(Zr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),yr={startOnLoad:!0,mermaidAPI:ni,parse:tD,render:r1,init:ZR,run:Qx,registerExternalDiagrams:QR,registerLayoutLoaders:lx,initialize:Jx,parseError:void 0,contentLoaded:t1,setParseErrorHandler:JR,detectType:Hc,registerIconPacks:m0,getRegisteredDiagramsMetadata:eD},i1=yr;/*! Check if previously processed *//*!
|
|
299
|
+
* Wait for document loaded before starting the execution
|
|
300
|
+
*/const Kt=[];for(let e=0;e<256;++e)Kt.push((e+256).toString(16).slice(1));function rD(e,t=0){return(Kt[e[t+0]]+Kt[e[t+1]]+Kt[e[t+2]]+Kt[e[t+3]]+"-"+Kt[e[t+4]]+Kt[e[t+5]]+"-"+Kt[e[t+6]]+Kt[e[t+7]]+"-"+Kt[e[t+8]]+Kt[e[t+9]]+"-"+Kt[e[t+10]]+Kt[e[t+11]]+Kt[e[t+12]]+Kt[e[t+13]]+Kt[e[t+14]]+Kt[e[t+15]]).toLowerCase()}let gl;const iD=new Uint8Array(16);function nD(){if(!gl){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");gl=crypto.getRandomValues.bind(crypto)}return gl(iD)}const sD=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$d={randomUUID:sD};function n1(e,t,r){if($d.randomUUID&&!e)return $d.randomUUID();e=e||{};const i=e.random??e.rng?.()??nD();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,rD(i)}const aD={"smp-mermaid-chart":"_smp-mermaid-chart_128vn_1"};i1.initialize({startOnLoad:!0,securityLevel:"loose"});const oD=({data:e})=>{const[t,r]=j.useState(""),i=j.useRef(`mermaid-chart-${n1()}`),n=j.useCallback(o=>{if(o?.obj?.k?.trim())return o.obj.k;if(Array.isArray(o.children))for(const a of o.children){const l=n(a);if(l)return l}return null},[]);j.useEffect(()=>{(async()=>{const a=e.children?.map(n).find(l=>l)??null;if(a)try{const l=await i1.render(i.current,a);r(l.svg)}catch(l){r(`<pre style="color:red">Mermaid render error:
|
|
301
|
+
${String(l)}</pre>`)}else r('<pre style="color:orange">No valid Mermaid chart code found in data.</pre>')})()},[e,n]);const s={container:aD["smp-mermaid-chart"]};return S.jsx("div",{className:s.container,"data-component":"mermaid",dangerouslySetInnerHTML:{__html:t}})};exports.AppBar=hw;exports.Autocomplete=Ic;exports.Button=Qt;exports.ButtonList=Yd;exports.Checkbox=Xa;exports.Chips=zc;exports.Color=Fe;exports.Color$1=Zi;exports.Combobox=ua;exports.DashList=uw;exports.DataTableComponent=Nw;exports.DatePicker=jc;exports.Drawer=Pw;exports.Field=jw;exports.INPUT_PANEL_COMMAND_SUBMIT_EVENT_NAME=El;exports.Icon=Ot;exports.InputPanel=Ww;exports.JSON_SCHEMA=dy;exports.MapCache=vr;exports.MermaidChart=oD;exports.Password=Vd;exports.Rgb=ce;exports.Set=Ua;exports.Stack=hi;exports.Symbol=Qn;exports.TabBar=jd;exports.Textarea=Xd;exports.Textfield=Ie;exports.Toolbar=Pd;exports.Typography=Ae;exports.Uint8Array=uc;exports.Utils=xt;exports.ZERO_WIDTH_SPACE=Hy;exports.__export=ip;exports.__name=m;exports.abs=S2;exports.acos=B2;exports.array=og;exports.arrayLikeKeys=Dy;exports.asin=O2;exports.assignValue=Oy;exports.assignWithDepth_default=zt;exports.atan2=k2;exports.baseAssignValue=mo;exports.baseFor=xy;exports.baseGetTag=oi;exports.baseKeys=gx;exports.baseRest=jy;exports.baseUnary=My;exports.calculateMathMLDimensions=KC;exports.calculateTextHeight=Lh;exports.calculateTextWidth=Qe;exports.cleanAndMerge=xo;exports.clear=kp;exports.clear$1=wM;exports.clear$2=Q$;exports.clear2=yM;exports.cloneArrayBuffer=Cy;exports.cloneBuffer=wy;exports.cloneTypedArray=_y;exports.color=Wi;exports.commonDb_exports=Gc;exports.common_default=ai;exports.computeDimensionOfText=T0;exports.configurePaths=N1;exports.configureSvgSize=Vc;exports.constant=jr;exports.constant$1=Ny;exports.constant$2=io;exports.copyArray=Sy;exports.copyObject=Ry;exports.cos=T2;exports.createAssigner=Wy;exports.createText=wr;exports.curveBasis=Pn;exports.darken=ft;exports.dayjs2=ep;exports.decodeEntities=Br;exports.defaultConfig2=s_;exports.defaultConfig_default=Uc;exports.define=ro;exports.distExports=my;exports.epsilon=Vl;exports.eq=cs;exports.evaluate=qt;exports.extend=rh;exports.generateId=Ky;exports.getAccDescription=Ap;exports.getAccTitle=Ep;exports.getConfig=Jt;exports.getConfig2=Et;exports.getDefaultExportFromCjs=Md;exports.getDiagramTitle=Mp;exports.getEdgeId=SA;exports.getIconSVG=en;exports.getLineFunctionsWithOffset=gy;exports.getPrototype=xh;exports.getRegisteredLayoutAlgorithm=UM;exports.getStylesFromArray=Eh;exports.getSubGraphTitleMargins=uo;exports.getThemeVariables3=pp;exports.getUrl=Yc;exports.getUserDefinedConfig=PC;exports.halfPi=Gl;exports.hasKatex=Jr;exports.hue=ek;exports.identity=_h;exports.initCloneObject=Ty;exports.insertCluster=N0;exports.insertEdge=ax;exports.insertEdgeLabel=ix;exports.insertNode=Yh;exports.interpolateNumber=hr;exports.interpolateRgb=Pl;exports.interpolateString=Xp;exports.isArguments=es;exports.isArray=rs;exports.isArrayLike=us;exports.isArrayLikeObject=Ly;exports.isBuffer=yo;exports.isDark=Xi;exports.isEmpty=Ac;exports.isFunction=fo;exports.isIndex=wh;exports.isIterateeCall=zy;exports.isLabelStyle=bh;exports.isLength=vh;exports.isObject=Mr;exports.isObjectLike=tn;exports.isPrototype=hs;exports.isTypedArray=bo;exports.isValidShape=rx;exports.keysIn=Ch;exports.lighten=nt;exports.line=cg;exports.lineBreakRegex=Ki;exports.load=py;exports.log=V;exports.markers_default=ox;exports.max=E2;exports.memoize=Ji;exports.merge=qy;exports.min=L2;exports.nodeUtil=fc;exports.nogamma=ih;exports.overRest=Iy;exports.package_default=Ll;exports.parseFontSize=fs;exports.parseGenericTypes=Ol;exports.pi=ao;exports.positionEdgeLabel=nx;exports.positionNode=bM;exports.random=Qy;exports.registerIconPacks=m0;exports.render=HM;exports.renderKatexSanitized=to;exports.replaceIconSubstring=zh;exports.rgbConvert=Yp;exports.rgba=Li;exports.sanitizeText=Se;exports.select=kt;exports.selectSvgElement=Mg;exports.setAccDescription=Lp;exports.setAccTitle=Tp;exports.setConfig2=n_;exports.setDiagramTitle=$p;exports.setNodeElem=mM;exports.setToString=Py;exports.setupGraphViewbox=Sp;exports.setupGraphViewbox2=Bp;exports.sin=A2;exports.sqrt=$2;exports.styles2String=lt;exports.tau=M2;exports.unknownIcon=p0;exports.updateNodeBounds=ot;exports.utils_default=Le;exports.v4=n1;exports.withPath=ag;exports.wrapLabel=Jy;
|