@sme.up/ketchup2 2.0.0-SNAPSHOT-20250911130320 → 2.0.0-SNAPSHOT-20250915155251
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-C3RxQnku.cjs → _basePickBy-BbCYVhPc.cjs} +1 -1
- package/dist/{_basePickBy-kiDgGFE9.js → _basePickBy-BmWB5rZ6.js} +2 -2
- package/dist/{_baseUniq-D-NLNbIo.cjs → _baseUniq-BWdXrmKB.cjs} +1 -1
- package/dist/{_baseUniq-DMFzFwna.js → _baseUniq-DRyURa1z.js} +1 -1
- package/dist/{arc-g0ruoH-N.cjs → arc-5V7sO5NX.cjs} +1 -1
- package/dist/{arc-C1GVDp2P.js → arc-6CU29Xfc.js} +1 -1
- package/dist/{architecture-O4VJ6CD3-BkZesdxh.js → architecture-O4VJ6CD3-Bs_qHelP.js} +1 -1
- package/dist/{architecture-O4VJ6CD3-BNIfd8BY.cjs → architecture-O4VJ6CD3-DBaN0Whg.cjs} +1 -1
- package/dist/{architectureDiagram-W76B3OCA-DXPyAN0h.js → architectureDiagram-W76B3OCA-Baighq8Y.js} +3 -3
- package/dist/{architectureDiagram-W76B3OCA-Cvjlkwyl.cjs → architectureDiagram-W76B3OCA-CxlYS6Cc.cjs} +1 -1
- package/dist/{blockDiagram-QIGZ2CNN-HRX3yuAg.js → blockDiagram-QIGZ2CNN-BeiQb_HJ.js} +5 -5
- package/dist/{blockDiagram-QIGZ2CNN-DkAbcYNH.cjs → blockDiagram-QIGZ2CNN-CY2dt8Cm.cjs} +1 -1
- package/dist/{c4Diagram-FPNF74CW-BFz1Fliu.cjs → c4Diagram-FPNF74CW-CB_0WEuB.cjs} +1 -1
- package/dist/{c4Diagram-FPNF74CW-BkKP7vd5.js → c4Diagram-FPNF74CW-URbghjeF.js} +2 -2
- package/dist/channel-DtvTiKAH.cjs +1 -0
- package/dist/{channel-CbpcSP8q.js → channel-G8-Rd2_X.js} +1 -1
- package/dist/{chunk-4BX2VUAB-DLuA6-Bc.cjs → chunk-4BX2VUAB-OO78jSkY.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-DLSi4Szk.js → chunk-4BX2VUAB-toQAhgFS.js} +1 -1
- package/dist/{chunk-55IACEB6-1suIdhsZ.js → chunk-55IACEB6-CVIcF5vX.js} +1 -1
- package/dist/{chunk-55IACEB6-CrI1wk4o.cjs → chunk-55IACEB6-QaHi3teu.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-CSW-gfZ8.cjs → chunk-FMBD7UC4-CINtGAuV.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-C7kXC6Rn.js → chunk-FMBD7UC4-H_vIf_iU.js} +1 -1
- package/dist/{chunk-K7UQS3LO-DExXLOWg.js → chunk-K7UQS3LO-B9A29IM-.js} +4 -4
- package/dist/{chunk-K7UQS3LO-B6NkOC8c.cjs → chunk-K7UQS3LO-BA_OhQzk.cjs} +1 -1
- package/dist/{chunk-QN33PNHL-ekvXp_v0.cjs → chunk-QN33PNHL-Bib-2jHn.cjs} +1 -1
- package/dist/{chunk-QN33PNHL-DrzOxePv.js → chunk-QN33PNHL-aod2lsCc.js} +1 -1
- package/dist/{chunk-QZHKN3VN-CDKd4oAU.js → chunk-QZHKN3VN-BrOuL9Nk.js} +1 -1
- package/dist/{chunk-QZHKN3VN-B00bJvcr.cjs → chunk-QZHKN3VN-D3X-toz8.cjs} +1 -1
- package/dist/{chunk-TVAH2DTR-BagQUOXR.cjs → chunk-TVAH2DTR-CYu7OEGv.cjs} +1 -1
- package/dist/{chunk-TVAH2DTR-C8eD0GIP.js → chunk-TVAH2DTR-DlEZczZV.js} +3 -3
- package/dist/{chunk-TZMSLE5B-Plrb7WH3.js → chunk-TZMSLE5B-CaUfUnpI.js} +1 -1
- package/dist/{chunk-TZMSLE5B-Bv76EXkN.cjs → chunk-TZMSLE5B-bokiop4i.cjs} +1 -1
- package/dist/{classDiagram-v2-RKCZMP56-afu2hHoQ.js → classDiagram-KNZD7YFC-6nOa_g5r.js} +2 -2
- package/dist/{classDiagram-KNZD7YFC-CWG1cA2z.cjs → classDiagram-KNZD7YFC-Cy1-HMWX.cjs} +1 -1
- package/dist/{classDiagram-KNZD7YFC-afu2hHoQ.js → classDiagram-v2-RKCZMP56-6nOa_g5r.js} +2 -2
- package/dist/{classDiagram-v2-RKCZMP56-CWG1cA2z.cjs → classDiagram-v2-RKCZMP56-Cy1-HMWX.cjs} +1 -1
- package/dist/clone-SdP74fac.cjs +1 -0
- package/dist/{clone-K_cx1pOn.js → clone-oL3rvw1b.js} +1 -1
- package/dist/components/echarts.tsx/echarts-graph-types.d.ts +8 -0
- package/dist/components/echarts.tsx/echarts-graph-types.d.ts.map +1 -0
- package/dist/components/echarts.tsx/echarts-graph.d.ts +4 -0
- package/dist/components/echarts.tsx/echarts-graph.d.ts.map +1 -0
- package/dist/{cose-bilkent-S5V4N54A-D_u9ib7t.cjs → cose-bilkent-S5V4N54A-D0bfRrTL.cjs} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-C4ueJGXG.js → cose-bilkent-S5V4N54A-DBtaOMbe.js} +1 -1
- package/dist/{dagre-5GWH7T2D-CtZ0NZo_.cjs → dagre-5GWH7T2D-B3U6vGrW.cjs} +1 -1
- package/dist/{dagre-5GWH7T2D-DQw2tWTc.js → dagre-5GWH7T2D-BB8CvjnE.js} +6 -6
- package/dist/{diagram-N5W7TBWH-3Mv1I4jU.cjs → diagram-N5W7TBWH-CRXhr906.cjs} +1 -1
- package/dist/{diagram-N5W7TBWH-gec-tJLC.js → diagram-N5W7TBWH-oz2ahfex.js} +4 -4
- package/dist/{diagram-QEK2KX5R-CuLFpR9b.js → diagram-QEK2KX5R-BNJuQxCM.js} +3 -3
- package/dist/{diagram-QEK2KX5R-DLOehBeq.cjs → diagram-QEK2KX5R-GQo7wbPJ.cjs} +1 -1
- package/dist/{diagram-S2PKOQOG-BVIUFJfs.js → diagram-S2PKOQOG-2DUpwhbV.js} +3 -3
- package/dist/{diagram-S2PKOQOG-CaeUDn9g.cjs → diagram-S2PKOQOG-D7wf2SWu.cjs} +1 -1
- package/dist/{erDiagram-AWTI2OKA-CIpa-Oz9.cjs → erDiagram-AWTI2OKA-BmjrwQ8P.cjs} +1 -1
- package/dist/{erDiagram-AWTI2OKA-CF2oIjDK.js → erDiagram-AWTI2OKA-FBFtogEZ.js} +4 -4
- package/dist/{flowDiagram-PVAE7QVJ-CuIY3tu-.cjs → flowDiagram-PVAE7QVJ-07EBTuoe.cjs} +1 -1
- package/dist/{flowDiagram-PVAE7QVJ-Bc-NqcLl.js → flowDiagram-PVAE7QVJ-BQOMtBAK.js} +5 -5
- package/dist/{ganttDiagram-OWAHRB6G-DkDxl3ww.cjs → ganttDiagram-OWAHRB6G-DyqWvQ1H.cjs} +1 -1
- package/dist/{ganttDiagram-OWAHRB6G-C-obPFPz.js → ganttDiagram-OWAHRB6G-O4OlZmZN.js} +2 -2
- package/dist/{gitGraph-ZV4HHKMB-Blb3x7FR.js → gitGraph-ZV4HHKMB-CUo6iJlO.js} +1 -1
- package/dist/{gitGraph-ZV4HHKMB-C1puLJme.cjs → gitGraph-ZV4HHKMB-Cm87TE_x.cjs} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-Qk5kCNdF.cjs → gitGraphDiagram-NY62KEGX--nqUL_Ir.cjs} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-Ak6FhOD1.js → gitGraphDiagram-NY62KEGX-Byx13cyo.js} +4 -4
- package/dist/{graph-g9ylX5Ik.cjs → graph-DDUw9O9L.cjs} +1 -1
- package/dist/{graph-DbdIqiSC.js → graph-DY4111UH.js} +2 -2
- package/dist/{index-CcciJZk9.js → index-CsPph1wp.js} +30 -30
- package/dist/{index-Ce0aIQ6-.cjs → index-Dv2-YIcp.cjs} +3 -3
- package/dist/info-63CPKGFF-DkqdFbdr.js +5 -0
- package/dist/{info-63CPKGFF-Bxwg_B4g.cjs → info-63CPKGFF-xh0EllK5.cjs} +1 -1
- package/dist/{infoDiagram-STP46IZ2-BHoDbP4r.cjs → infoDiagram-STP46IZ2-DXGZln64.cjs} +1 -1
- package/dist/{infoDiagram-STP46IZ2-CHVFsdl2.js → infoDiagram-STP46IZ2-JInw1azq.js} +2 -2
- package/dist/{journeyDiagram-BIP6EPQ6-BuP9dB12.js → journeyDiagram-BIP6EPQ6-CWTlifgE.js} +4 -4
- package/dist/{journeyDiagram-BIP6EPQ6-DerBhJ75.cjs → journeyDiagram-BIP6EPQ6-Dkuxcamk.cjs} +1 -1
- package/dist/{kanban-definition-6OIFK2YF-l9FvvPm4.js → kanban-definition-6OIFK2YF-CngcavXT.js} +2 -2
- package/dist/{kanban-definition-6OIFK2YF-U0gLGtxY.cjs → kanban-definition-6OIFK2YF-DozjHbjn.cjs} +1 -1
- package/dist/ketchup2.cjs.js +1 -1
- package/dist/ketchup2.es.js +1 -1
- package/dist/{layout-Cqcyezix.cjs → layout-3V023owX.cjs} +1 -1
- package/dist/{layout-DOM56cVR.js → layout-CpJj5oZH.js} +4 -4
- package/dist/{linear-ysAgR6lb.js → linear-CjkySnCB.js} +1 -1
- package/dist/{linear-BUmmD3lB.cjs → linear-DJuvRCcX.cjs} +1 -1
- package/dist/{mermaid-parser.core-qgY08dpL.cjs → mermaid-parser.core-D3qgidz8.cjs} +2 -2
- package/dist/{mermaid-parser.core-Ho0tPRpR.js → mermaid-parser.core-Dhj0AO_U.js} +11 -11
- package/dist/{mindmap-definition-Q6HEUPPD-D8viMuNR.js → mindmap-definition-Q6HEUPPD-CbzJ26Bz.js} +3 -3
- package/dist/{mindmap-definition-Q6HEUPPD-u3hjSRlQ.cjs → mindmap-definition-Q6HEUPPD-CfpWtELs.cjs} +1 -1
- package/dist/{packet-HUATNLJX-DWcimLFl.js → packet-HUATNLJX-ByFr9E5c.js} +1 -1
- package/dist/{packet-HUATNLJX-Bkx4EDzY.cjs → packet-HUATNLJX-DJQghHB4.cjs} +1 -1
- package/dist/{pie-WTHONI2E-Cktfy1vU.cjs → pie-WTHONI2E-B7CRf7TJ.cjs} +1 -1
- package/dist/pie-WTHONI2E-CQ75tJb9.js +5 -0
- package/dist/{pieDiagram-ADFJNKIX-B8uOR0EF.cjs → pieDiagram-ADFJNKIX-CSebYLzh.cjs} +1 -1
- package/dist/{pieDiagram-ADFJNKIX-e7Tgil2x.js → pieDiagram-ADFJNKIX-CnUSw25w.js} +4 -4
- package/dist/{quadrantDiagram-LMRXKWRM-B0HyG11H.cjs → quadrantDiagram-LMRXKWRM-DbU2AmgV.cjs} +1 -1
- package/dist/{quadrantDiagram-LMRXKWRM-CJJg8tNT.js → quadrantDiagram-LMRXKWRM-mRUrF8Id.js} +2 -2
- package/dist/radar-NJJJXTRR-MLP-9UDw.js +5 -0
- package/dist/{radar-NJJJXTRR-BdR5a6c4.cjs → radar-NJJJXTRR-qNkJd7ld.cjs} +1 -1
- package/dist/{requirementDiagram-4UW4RH46-Cibzf9eD.cjs → requirementDiagram-4UW4RH46-CCY5YO80.cjs} +1 -1
- package/dist/{requirementDiagram-4UW4RH46-D8ZTonEs.js → requirementDiagram-4UW4RH46-DGGl_Ezj.js} +3 -3
- package/dist/{sankeyDiagram-GR3RE2ED-BeKa18N1.js → sankeyDiagram-GR3RE2ED-B8qJBJtI.js} +1 -1
- package/dist/{sankeyDiagram-GR3RE2ED-CQRxflg7.cjs → sankeyDiagram-GR3RE2ED-Bs81eAc3.cjs} +1 -1
- package/dist/{sequenceDiagram-C3RYC4MD-qd8uxQ6z.js → sequenceDiagram-C3RYC4MD-BloRHs67.js} +3 -3
- package/dist/{sequenceDiagram-C3RYC4MD-BK5bmD_o.cjs → sequenceDiagram-C3RYC4MD-BvZ5-w2i.cjs} +1 -1
- package/dist/{stateDiagram-KXAO66HF-Cr2HjxcV.cjs → stateDiagram-KXAO66HF-1YqVWXxO.cjs} +1 -1
- package/dist/{stateDiagram-KXAO66HF-CuSQwx3i.js → stateDiagram-KXAO66HF-BSwWqFfa.js} +4 -4
- package/dist/{stateDiagram-v2-UMBNRL4Z-CTIwHOm7.js → stateDiagram-v2-UMBNRL4Z-C99ueWX8.js} +2 -2
- package/dist/{stateDiagram-v2-UMBNRL4Z-D3dOiWSt.cjs → stateDiagram-v2-UMBNRL4Z-DP-9fsT6.cjs} +1 -1
- package/dist/{timeline-definition-XQNQX7LJ-B9-olSzM.cjs → timeline-definition-XQNQX7LJ-BA1yDoMH.cjs} +1 -1
- package/dist/{timeline-definition-XQNQX7LJ-B82HVUDD.js → timeline-definition-XQNQX7LJ-C9OKLYQR.js} +2 -2
- package/dist/{treemap-75Q7IDZK-CbcEeu9F.js → treemap-75Q7IDZK-Bp7gn_kA.js} +1 -1
- package/dist/{treemap-75Q7IDZK-CBFlXz6K.cjs → treemap-75Q7IDZK-x097FPDY.cjs} +1 -1
- package/dist/{xychartDiagram-6GGTOJPD-iNRGxMjU.cjs → xychartDiagram-6GGTOJPD-CkpEZxvl.cjs} +1 -1
- package/dist/{xychartDiagram-6GGTOJPD-D_MFD1Hh.js → xychartDiagram-6GGTOJPD-TtyxV4YX.js} +2 -2
- package/package.json +2 -1
- package/dist/channel-BDCWHq8D.cjs +0 -1
- package/dist/clone-wpX3uV87.cjs +0 -1
- package/dist/info-63CPKGFF-JyL5SKFd.js +0 -5
- package/dist/pie-WTHONI2E-BkA3NWZy.js +0 -5
- package/dist/radar-NJJJXTRR-CGPf70aQ.js +0 -5
|
@@ -46,7 +46,7 @@ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var G=wt(Z,et,U,Y,K+"."+
|
|
|
46
46
|
${R?"smp-datepickercalendar-td-today":""}
|
|
47
47
|
${_?"smp-datepickercalendar-td-selected":""}
|
|
48
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":""}
|
|
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:T.decode,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
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
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
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}`),` & {
|
|
@@ -286,8 +286,8 @@ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An err
|
|
|
286
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
287
|
L20,10
|
|
288
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-
|
|
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-B3U6vGrW.cjs")),"loader")},{name:"cose-bilkent",loader:m(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-D0bfRrTL.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-CB_0WEuB.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-07EBTuoe.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-07EBTuoe.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-BmjrwQ8P.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--nqUL_Ir.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-DyqWvQ1H.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-DXGZln64.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-CSebYLzh.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-DbU2AmgV.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-CkpEZxvl.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-CCY5YO80.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-BvZ5-w2i.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-Cy1-HMWX.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-Cy1-HMWX.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-1YqVWXxO.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-DP-9fsT6.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-Dkuxcamk.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-07EBTuoe.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-BA1yDoMH.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-CfpWtELs.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-DozjHbjn.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-Bs81eAc3.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-D7wf2SWu.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-GQo7wbPJ.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-CY2dt8Cm.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-CxlYS6Cc.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-CRXhr906.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
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
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
293
|
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),qR=m((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|