@sme.up/ketchup2 2.0.0-SNAPSHOT-20251119154424 → 2.0.0-SNAPSHOT-20251120105433

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/{_basePickBy-DnKFPnNZ.js → _basePickBy-CHKK-SYY.js} +2 -2
  2. package/dist/{_basePickBy-DvfzxNw5.cjs → _basePickBy-o5fbvdR5.cjs} +1 -1
  3. package/dist/{_baseUniq-COH1dcgi.cjs → _baseUniq-Cq704oJI.cjs} +1 -1
  4. package/dist/{_baseUniq-1-1Inw3x.js → _baseUniq-qeLlWx85.js} +1 -1
  5. package/dist/{arc-DNa6ege7.cjs → arc-B161_nr8.cjs} +1 -1
  6. package/dist/{arc-DS_L5fkS.js → arc-CKqwjsie.js} +1 -1
  7. package/dist/{architecture-O4VJ6CD3-D2vsyqEt.js → architecture-O4VJ6CD3-Bw0ESx4x.js} +1 -1
  8. package/dist/{architecture-O4VJ6CD3-Da0fz581.cjs → architecture-O4VJ6CD3-DqzGtn_l.cjs} +1 -1
  9. package/dist/{architectureDiagram-VXUJARFQ-hFw6mCH4.js → architectureDiagram-VXUJARFQ-6Lo4d4w7.js} +3 -3
  10. package/dist/{architectureDiagram-VXUJARFQ-DlUHisI3.cjs → architectureDiagram-VXUJARFQ-DA8C_GTw.cjs} +1 -1
  11. package/dist/{blockDiagram-VD42YOAC-BTyE8xuu.cjs → blockDiagram-VD42YOAC-D3431SfW.cjs} +1 -1
  12. package/dist/{blockDiagram-VD42YOAC-DGuGhSXc.js → blockDiagram-VD42YOAC-D6paJjNJ.js} +5 -5
  13. package/dist/{c4Diagram-YG6GDRKO-EA3kZtAl.js → c4Diagram-YG6GDRKO-CNZ1Ak2d.js} +2 -2
  14. package/dist/{c4Diagram-YG6GDRKO-DQvyOnuU.cjs → c4Diagram-YG6GDRKO-mLXX3lzU.cjs} +1 -1
  15. package/dist/{channel-089gLvAM.js → channel-B27n-5ug.js} +1 -1
  16. package/dist/channel-BL9pz1iO.cjs +1 -0
  17. package/dist/{chunk-4BX2VUAB-B_TDyIpz.cjs → chunk-4BX2VUAB-B5kargBm.cjs} +1 -1
  18. package/dist/{chunk-4BX2VUAB-c_8dp7Wq.js → chunk-4BX2VUAB-Cl6tnOMq.js} +1 -1
  19. package/dist/{chunk-55IACEB6-DcvfPdCW.js → chunk-55IACEB6-CVMqsY3a.js} +1 -1
  20. package/dist/{chunk-55IACEB6-CbtEub-f.cjs → chunk-55IACEB6-qv_5ZL4o.cjs} +1 -1
  21. package/dist/{chunk-B4BG7PRW-vnFrbDNw.cjs → chunk-B4BG7PRW-BhckSQ6Q.cjs} +1 -1
  22. package/dist/{chunk-B4BG7PRW-CaRHgu9h.js → chunk-B4BG7PRW-C5n-ZBd3.js} +4 -4
  23. package/dist/{chunk-DI55MBZ5-C2JGcwc4.cjs → chunk-DI55MBZ5-CMA0JWce.cjs} +1 -1
  24. package/dist/{chunk-DI55MBZ5-C550qqba.js → chunk-DI55MBZ5-xU_5y7iY.js} +3 -3
  25. package/dist/{chunk-FMBD7UC4-D2Enkcg0.cjs → chunk-FMBD7UC4-CkKrcn1W.cjs} +1 -1
  26. package/dist/{chunk-FMBD7UC4-DXhi02is.js → chunk-FMBD7UC4-twvep3jq.js} +1 -1
  27. package/dist/{chunk-QN33PNHL-CmWhshQE.cjs → chunk-QN33PNHL-CvEmuw1t.cjs} +1 -1
  28. package/dist/{chunk-QN33PNHL-CXFNJw4_.js → chunk-QN33PNHL-tYAm0u6H.js} +1 -1
  29. package/dist/{chunk-QZHKN3VN-D16VZWkv.cjs → chunk-QZHKN3VN-C4kkg318.cjs} +1 -1
  30. package/dist/{chunk-QZHKN3VN-COn-RcOK.js → chunk-QZHKN3VN-CHGjK1CF.js} +1 -1
  31. package/dist/{chunk-TZMSLE5B-DC_szopJ.js → chunk-TZMSLE5B-C0oKBS_C.js} +1 -1
  32. package/dist/{chunk-TZMSLE5B-D0e5_vAG.cjs → chunk-TZMSLE5B-CwJULZsa.cjs} +1 -1
  33. package/dist/{classDiagram-v2-WZHVMYZB-B7LlIkTc.js → classDiagram-2ON5EDUG-B7AH3RaQ.js} +2 -2
  34. package/dist/{classDiagram-2ON5EDUG-CDyTGl1H.cjs → classDiagram-2ON5EDUG-DrIoV3T-.cjs} +1 -1
  35. package/dist/{classDiagram-2ON5EDUG-B7LlIkTc.js → classDiagram-v2-WZHVMYZB-B7AH3RaQ.js} +2 -2
  36. package/dist/{classDiagram-v2-WZHVMYZB-CDyTGl1H.cjs → classDiagram-v2-WZHVMYZB-DrIoV3T-.cjs} +1 -1
  37. package/dist/{clone-BOPc8hbt.js → clone-CdgWsNHv.js} +1 -1
  38. package/dist/clone-CkR8Khye.cjs +1 -0
  39. package/dist/{cose-bilkent-S5V4N54A-DKbi8shb.cjs → cose-bilkent-S5V4N54A-Dic_-Qu2.cjs} +1 -1
  40. package/dist/{cose-bilkent-S5V4N54A-CkFPv5xZ.js → cose-bilkent-S5V4N54A-qepObLMN.js} +1 -1
  41. package/dist/{dagre-6UL2VRFP-CtsEreSY.cjs → dagre-6UL2VRFP-Dez70xlt.cjs} +1 -1
  42. package/dist/{dagre-6UL2VRFP-BELBC5uB.js → dagre-6UL2VRFP-Dgjf-umk.js} +6 -6
  43. package/dist/{diagram-PSM6KHXK-CToKf0j9.cjs → diagram-PSM6KHXK-CWaZA0wa.cjs} +1 -1
  44. package/dist/{diagram-PSM6KHXK-Bz6XW55u.js → diagram-PSM6KHXK-bdRFm3Z5.js} +4 -4
  45. package/dist/{diagram-QEK2KX5R-CJfnBXeq.js → diagram-QEK2KX5R-BHTXD114.js} +3 -3
  46. package/dist/{diagram-QEK2KX5R-C-csoKRw.cjs → diagram-QEK2KX5R-D5fp7M3l.cjs} +1 -1
  47. package/dist/{diagram-S2PKOQOG-DKYXbDSS.js → diagram-S2PKOQOG-73tMHeJW.js} +3 -3
  48. package/dist/{diagram-S2PKOQOG-CYCHTx3p.cjs → diagram-S2PKOQOG-BmiebNze.cjs} +1 -1
  49. package/dist/{erDiagram-Q2GNP2WA-BqX5D5Q7.js → erDiagram-Q2GNP2WA-Bj6tR_6g.js} +4 -4
  50. package/dist/{erDiagram-Q2GNP2WA-BSr3wCCt.cjs → erDiagram-Q2GNP2WA-DfXsPvCr.cjs} +1 -1
  51. package/dist/{flowDiagram-NV44I4VS-DXIIYxFi.cjs → flowDiagram-NV44I4VS-BeoT8u5w.cjs} +1 -1
  52. package/dist/{flowDiagram-NV44I4VS-CmEN3i03.js → flowDiagram-NV44I4VS-DsPRncle.js} +5 -5
  53. package/dist/functional-components/layout/layout.d.ts.map +1 -1
  54. package/dist/{ganttDiagram-LVOFAZNH-ChBGXvIi.cjs → ganttDiagram-LVOFAZNH-DFo-OByh.cjs} +1 -1
  55. package/dist/{ganttDiagram-LVOFAZNH-DyUVSpnL.js → ganttDiagram-LVOFAZNH-V2fLsaYZ.js} +2 -2
  56. package/dist/{gitGraph-ZV4HHKMB-BU0eAAPz.js → gitGraph-ZV4HHKMB-C6aX7I9n.js} +1 -1
  57. package/dist/{gitGraph-ZV4HHKMB-DHyDqXiG.cjs → gitGraph-ZV4HHKMB-DyHq6lQP.cjs} +1 -1
  58. package/dist/{gitGraphDiagram-NY62KEGX-Cpb6WlC2.cjs → gitGraphDiagram-NY62KEGX-B5hkK0V5.cjs} +1 -1
  59. package/dist/{gitGraphDiagram-NY62KEGX-Du-hp4k8.js → gitGraphDiagram-NY62KEGX-GEO2egXR.js} +4 -4
  60. package/dist/{graph-BCWEK2V9.cjs → graph-Bw2wLNz1.cjs} +1 -1
  61. package/dist/{graph-CExw0H9f.js → graph-DD4GPUWk.js} +2 -2
  62. package/dist/{index-CA8le7MX.js → index-D4MDjAlt.js} +33 -36
  63. package/dist/{index-CNy9ZBSN.cjs → index-DNFdUd9-.cjs} +3 -3
  64. package/dist/{info-63CPKGFF-CRevtTn5.cjs → info-63CPKGFF--cg13SFp.cjs} +1 -1
  65. package/dist/info-63CPKGFF-CQupzyF2.js +5 -0
  66. package/dist/{infoDiagram-F6ZHWCRC-Ch9jHYYl.cjs → infoDiagram-F6ZHWCRC-BGgfhkE3.cjs} +1 -1
  67. package/dist/{infoDiagram-F6ZHWCRC-98p901Sq.js → infoDiagram-F6ZHWCRC-D3XR9ART.js} +2 -2
  68. package/dist/{journeyDiagram-XKPGCS4Q-CLvXSfG9.js → journeyDiagram-XKPGCS4Q-D1tLzPF-.js} +4 -4
  69. package/dist/{journeyDiagram-XKPGCS4Q-CNWXX95-.cjs → journeyDiagram-XKPGCS4Q-_q47PPFe.cjs} +1 -1
  70. package/dist/{kanban-definition-3W4ZIXB7-21n1BvP-.js → kanban-definition-3W4ZIXB7-CrrrI3PA.js} +2 -2
  71. package/dist/{kanban-definition-3W4ZIXB7-DzqByhlj.cjs → kanban-definition-3W4ZIXB7-zHukPxII.cjs} +1 -1
  72. package/dist/ketchup2.cjs.js +1 -1
  73. package/dist/ketchup2.es.js +1 -1
  74. package/dist/{layout-BNXFnEXB.cjs → layout-BmEQMRbC.cjs} +1 -1
  75. package/dist/{layout-CFf5-3GT.js → layout-C0f3IcCW.js} +4 -4
  76. package/dist/{linear-BtGdl-c3.js → linear-DNj2FuZR.js} +1 -1
  77. package/dist/{linear-zjiSizt4.cjs → linear-WJcPCP-6.cjs} +1 -1
  78. package/dist/{mermaid-parser.core-XgCunIin.cjs → mermaid-parser.core-B5DsarpA.cjs} +2 -2
  79. package/dist/{mermaid-parser.core-D3sFM1Gc.js → mermaid-parser.core-CC7psYsF.js} +11 -11
  80. package/dist/{mindmap-definition-VGOIOE7T-B0v1l_mf.cjs → mindmap-definition-VGOIOE7T-CQPM_zhD.cjs} +1 -1
  81. package/dist/{mindmap-definition-VGOIOE7T-YcKLlHS7.js → mindmap-definition-VGOIOE7T-aWaGX90C.js} +3 -3
  82. package/dist/{packet-HUATNLJX-pwMohAhk.js → packet-HUATNLJX-DXNTZl51.js} +1 -1
  83. package/dist/{packet-HUATNLJX-DdbqNZ-O.cjs → packet-HUATNLJX-DfJlB0w9.cjs} +1 -1
  84. package/dist/pie-WTHONI2E-CwjYUkyS.js +5 -0
  85. package/dist/{pie-WTHONI2E-DC7DxkfY.cjs → pie-WTHONI2E-DTlq6gWR.cjs} +1 -1
  86. package/dist/{pieDiagram-ADFJNKIX-DyphgS4x.cjs → pieDiagram-ADFJNKIX-Bedfo3Wq.cjs} +1 -1
  87. package/dist/{pieDiagram-ADFJNKIX-c4QL_q_i.js → pieDiagram-ADFJNKIX-ni1BYcoG.js} +4 -4
  88. package/dist/{quadrantDiagram-AYHSOK5B-B4k0pjeO.cjs → quadrantDiagram-AYHSOK5B-73dC68tI.cjs} +1 -1
  89. package/dist/{quadrantDiagram-AYHSOK5B-BWLbiuaO.js → quadrantDiagram-AYHSOK5B-DmpOd7JU.js} +2 -2
  90. package/dist/{radar-NJJJXTRR-B2GCSzN8.cjs → radar-NJJJXTRR-B3bJF8_p.cjs} +1 -1
  91. package/dist/radar-NJJJXTRR-BP49MwOc.js +5 -0
  92. package/dist/{requirementDiagram-UZGBJVZJ-zmBF_XI0.js → requirementDiagram-UZGBJVZJ-BOz7RJcY.js} +3 -3
  93. package/dist/{requirementDiagram-UZGBJVZJ-BRFanah7.cjs → requirementDiagram-UZGBJVZJ-Cd0Ta0fS.cjs} +1 -1
  94. package/dist/{sankeyDiagram-TZEHDZUN-Bl_cLWbZ.cjs → sankeyDiagram-TZEHDZUN-Coc4H987.cjs} +1 -1
  95. package/dist/{sankeyDiagram-TZEHDZUN-CCmeY1Dc.js → sankeyDiagram-TZEHDZUN-F_O8038A.js} +1 -1
  96. package/dist/{sequenceDiagram-WL72ISMW-BYobcK3J.cjs → sequenceDiagram-WL72ISMW-Ch-xgk0a.cjs} +1 -1
  97. package/dist/{sequenceDiagram-WL72ISMW-CGnibLmY.js → sequenceDiagram-WL72ISMW-H1nfzpg0.js} +3 -3
  98. package/dist/{stateDiagram-FKZM4ZOC-CPG1iz7L.cjs → stateDiagram-FKZM4ZOC-B-s9k70t.cjs} +1 -1
  99. package/dist/{stateDiagram-FKZM4ZOC-BsuNO1cp.js → stateDiagram-FKZM4ZOC-CdwZe0O0.js} +4 -4
  100. package/dist/{stateDiagram-v2-4FDKWEC3-CdscyTFL.js → stateDiagram-v2-4FDKWEC3-BvXARP4V.js} +2 -2
  101. package/dist/{stateDiagram-v2-4FDKWEC3-CAriny2a.cjs → stateDiagram-v2-4FDKWEC3-MwS6m11m.cjs} +1 -1
  102. package/dist/{timeline-definition-IT6M3QCI-BSIB08ic.js → timeline-definition-IT6M3QCI-BixZP4_1.js} +2 -2
  103. package/dist/{timeline-definition-IT6M3QCI-CA_ns01i.cjs → timeline-definition-IT6M3QCI-BjzBVe0q.cjs} +1 -1
  104. package/dist/{treemap-75Q7IDZK-hzENFSgN.js → treemap-75Q7IDZK-Crc3oD-M.js} +1 -1
  105. package/dist/{treemap-75Q7IDZK-DHFRrkYk.cjs → treemap-75Q7IDZK-Dhnx3VRO.cjs} +1 -1
  106. package/dist/{xychartDiagram-PRI3JC2R-CLFA8hMQ.js → xychartDiagram-PRI3JC2R-6VDWuTpO.js} +2 -2
  107. package/dist/{xychartDiagram-PRI3JC2R-CZpnOjvp.cjs → xychartDiagram-PRI3JC2R-CwRU4l2m.cjs} +1 -1
  108. package/package.json +1 -1
  109. package/dist/channel-CzSxe9c2.cjs +0 -1
  110. package/dist/clone-CFTwVOPu.cjs +0 -1
  111. package/dist/info-63CPKGFF-CXf7ytkX.js +0 -5
  112. package/dist/pie-WTHONI2E-BLbc6_5_.js +0 -5
  113. package/dist/radar-NJJJXTRR-PWOg2iiE.js +0 -5
@@ -46,7 +46,7 @@ Valid keys: `+JSON.stringify(Object.keys(z),null," "));var X=Q(K,U,j,H,tt+"."+U
46
46
  ${$?wi["smp-datepickercalendar-td-today"]:""}
47
47
  ${z?wi["smp-datepickercalendar-td-selected"]:""}
48
48
  ${R?wi["smp-datepickercalendar-td-focused"]:""}
49
- ${B?wi["smp-datepickercalendar-td-disabled"]:""}`},O=()=>`${y[c]} ${f.toString()}`;return F.jsxs("div",{className:V.wrapper,ref:i,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[F.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[F.jsx(ye,{onClick:S,ariaLabel:a(YS.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),F.jsx("div",{"aria-label":O(),className:V.label,children:O()}),F.jsx(ye,{onClick:w,ariaLabel:a(YS.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),F.jsxs("table",{ref:g,role:"grid","aria-label":`${a(ya.CALENDAR_FOR)} ${y[c]} ${f}`,className:V.table,children:[F.jsx("thead",{children:F.jsx("tr",{children:_.map($=>F.jsx("th",{scope:"col",abbr:$.full,className:V.th,children:$.value},$.value))})}),F.jsx("tbody",{children:P.map(($,z)=>F.jsx("tr",{children:$.map((R,B)=>{const G=z*7+B;if(R===null)return F.jsx("td",{className:V.td(!1,!1,!1,!0)},`empty-${B}`);const j=R.getDate()===s.getDate()&&R.getMonth()===s.getMonth()&&R.getFullYear()===s.getFullYear(),H=l&&R.getDate()===l.getDate()&&R.getMonth()===l.getMonth()&&R.getFullYear()===l.getFullYear(),tt=p===R.getDate(),K=x(R);return F.jsx("td",{role:"gridcell","aria-selected":H,tabIndex:tt?0:-1,onClick:()=>b(R),onKeyDown:et=>T(et,G),"aria-label":`${R.getDate()} ${y[R.getMonth()]} ${R.getFullYear()}`,"data-selected":H,"aria-disabled":K,ref:et=>{m.current[G]=et},className:V.td(j,H,tt,K),children:R.getDate()},`day-${B}`)})},`week-${z}`))})]})]})}const IX={"smp-text-wrapper":"_smp-text-wrapper_1hhsc_1"},Xd=({bindValue:e,optionalDisplayValue:t,label:r,className:n,obj:i,style:a,justifiedContent:o,...s})=>{const l={wrapper:`${IX["smp-text-wrapper"]}`},u=()=>F.jsx(hr,{...s,variant:MY(i)?"link":"body",bindValue:t||e,className:n,style:a,justifiedContent:o});return r?F.jsxs("div",{className:l.wrapper,children:[F.jsx($i,{label:r,helper:s.helper}),u()]}):u()},w2=({bindValue:e,placeholder:t,onChange:r,onConfirmedChange:n,onBlur:i,disabledDateRanges:a,isEditable:o=!0,isVisualOnly:s,...l})=>{const u=W.useRef(null),[c,h]=W.useState(!1),[f,d]=W.useState(e||""),[p,v]=W.useState(""),{anchorRef:g,targetRef:m}=Fi({position:"bottom",open:c}),y=W.useCallback(()=>{h(!1),u?.current?.focus()},[]);mu([m,g],c,()=>{y()}),S2(c,m);const{format:_,getCurrentLanguage:x}=xi(),b=W.useCallback(L=>{const D=L.length>5&&PY(L,x())||L,I=_(D,void 0,void 0,{type:"date"}),P=typeof D!="string",M=P&&D.toISOString().substring(0,10)||"";return{isValid:P,formattedDate:I,isoDate:M,normalizedDate:D}},[x,_]);W.useEffect(()=>{const{formattedDate:L,isoDate:D,isValid:I}=b(e);d(I&&D||e),v(I&&L||e)},[e,_,b]);const S=()=>h(L=>!L),w=()=>{const L=A(p,!1);i?.(L)},C=L=>{A(L,!0),y()},A=(L,D)=>{const{isoDate:I,isValid:P}=b(L),V={bindValue:P&&I||L};return r?.(V),D&&n?.(V),V},k=L=>{v(L)},T=L=>{L.key==="Enter"&&(L.preventDefault(),A(p,!0))};return F.jsx("div",{"data-component":"date-picker",children:s?F.jsx(Xd,{bindValue:p}):F.jsxs(F.Fragment,{children:[F.jsx(_i,{...l,bindValue:p,placeholder:t,onBlur:w,onChange:L=>k(L.bindValue),onKeyDown:T,shapeIcon:"calendar",onShapeIconClick:S,ref:g,inputRef:u,isEditable:o,size:10,maxLength:l.maxLength?l.maxLength:10}),c&&F.jsx(pi,{children:F.jsx(MX,{disabledDateRanges:a,onDateChange:C,initialValue:kc(f)&&f||"",targetRef:m})})]})})},Ar={"smp-file-upload":"_smp-file-upload_1cqy6_1","smp-file-upload-disabled":"_smp-file-upload-disabled_1cqy6_13","smp-file-upload-dropzone":"_smp-file-upload-dropzone_1cqy6_18","smp-file-upload-dropzone__dragover":"_smp-file-upload-dropzone__dragover_1cqy6_28","smp-file-upload-actions":"_smp-file-upload-actions_1cqy6_33","smp-file-upload-list":"_smp-file-upload-list_1cqy6_38","smp-file-upload-item-wrapper":"_smp-file-upload-item-wrapper_1cqy6_46","smp-file-upload-item":"_smp-file-upload-item_1cqy6_46","smp-file-upload-item-meta":"_smp-file-upload-item-meta_1cqy6_61","smp-file-upload-item-name":"_smp-file-upload-item-name_1cqy6_67","smp-file-upload-item-size":"_smp-file-upload-item-size_1cqy6_71","smp-file-upload-item-thumbnail":"_smp-file-upload-item-thumbnail_1cqy6_76","smp-file-upload-item-progress":"_smp-file-upload-item-progress_1cqy6_84","smp-file-upload-item-status-error":"_smp-file-upload-item-status-error_1cqy6_98","smp-file-upload-validation":"_smp-file-upload-validation_1cqy6_102","smp-file-upload-success":"_smp-file-upload-success_1cqy6_108","smp-file-upload-item-path":"_smp-file-upload-item-path_1cqy6_114","smp-file-upload-item-message":"_smp-file-upload-item-message_1cqy6_120","smp-file-upload-dropzone-big":"_smp-file-upload-dropzone-big_1cqy6_126","smp-file-upload-dropzone-small":"_smp-file-upload-dropzone-small_1cqy6_130"},tE=()=>Math.random().toString(36).slice(2,9),W5=({initialFiles:e=[],FupAty:t,FupMul:r=!0,maxFiles:n,FupSzl:i,FupDir:a,disabled:o=!1,onChange:s,onUploadRequest:l,FupAut:u=!1,className:c,FupCho:h,FupMsg:f,FupDrg:d})=>{const{translate:p}=xi(),v=typeof i=="string"?parseInt(i,10)||void 0:i,g=r==="1"||r==="true"||r===!0,m=u==="1"||u==="true"||u===!0,y=W.useRef(null),[_,x]=W.useState(()=>e.map(H=>({id:tE(),file:H,status:"idle"}))),[b,S]=W.useState(!1),[w,C]=W.useState(null),[A,k]=W.useState(!1),[T,L]=W.useState(!1),D=(...H)=>H.filter(Boolean).join(" "),I=W.useCallback(H=>v&&H.size>v?`${p(Ci.FILE_TOO_LARGE)} (${(H.size/1024).toFixed(0)} KB)`:null,[v,p]),P=W.useMemo(()=>{if(t)return t.includes("|")&&!t.includes("/")?t.split("|").map(H=>H.trim()).filter(Boolean).map(H=>H.startsWith(".")?H:`.${H}`).join(","):t},[t]),M=W.useCallback(async()=>{if(!l||A)return;const H=_.filter(tt=>tt.status==="idle"||tt.status==="error");if(H.length!==0){k(!0),x(tt=>tt.map(K=>H.some(et=>et.id===K.id)?{...K,status:"uploading"}:K));try{const tt=await l({files:H.map(K=>K.file),uploadFolder:a});x(K=>{const et=K.map(U=>{const Q=H.findIndex(X=>X.id===U.id);if(Q>=0&&tt.files[Q]){const X=tt.files[Q];return X.success?{...U,status:"done",uploadFolder:X.uploadFolder,uploadMessage:f||"Upload successful"}:{...U,status:"error",error:"Upload failed"}}return U}),it=et.filter(U=>U.status==="done").map(U=>({fileInstance:U.file,uploadFolder:U.uploadFolder||""}));if(it.length>0){const U=it.map(X=>({bindValue:X.uploadFolder,optionalDisplayValue:X.fileInstance.name})),Q=U.length===1?U[0]:U;s?.(Q)}return et})}catch(tt){x(K=>K.map(et=>et.status==="uploading"?{...et,status:"error",error:String(tt)}:et))}finally{k(!1)}}},[l,A,_,a,f,s]);W.useEffect(()=>{T&&m&&l&&!A&&(_.filter(tt=>tt.status==="idle"||tt.status==="error").length>0&&M(),L(!1))},[T,m,l,A,_,M]);const V=W.useCallback(H=>{const tt=Array.from(H),K=[];for(const et of tt){const it=I(et);if(it){C(it);continue}const U={id:tE(),file:et,status:"idle"};if(et.type.startsWith("image/"))try{U.preview=URL.createObjectURL(et)}catch{}K.push(U)}K.length!==0&&(x(et=>{const it=et.concat(K);return typeof n=="number"?it.slice(0,n):it}),m&&l&&L(!0))},[n,I,m,l]),O=H=>{const tt=H.target.files;if(tt){V(tt);try{y.current&&(y.current.value="")}catch{}}},$=H=>{H.preventDefault(),S(!1),!o&&H.dataTransfer.files&&H.dataTransfer.files.length&&V(H.dataTransfer.files)},z=H=>{const tt=_.find(K=>K.id===H);if(tt){if(tt.preview)try{URL.revokeObjectURL(tt.preview)}catch{}x(K=>K.filter(et=>et.id!==H))}},R=()=>{o||y.current?.click()},B=()=>{M()},G=()=>{k(!1),x(H=>H.map(tt=>tt.status==="uploading"?{...tt,status:"idle"}:tt))},j=H=>{x(tt=>tt.map(K=>K.id===H?{...K,status:"idle",error:null}:K))};return F.jsxs("div",{className:D(Ar["smp-file-upload"],c||void 0,o?Ar["smp-file-upload-disabled"]:void 0),onDragOver:H=>{H.preventDefault(),!o&&S(!0)},onDragLeave:()=>S(!1),onDrop:$,"data-component":"file-upload",children:[F.jsx("div",{className:D(Ar["smp-file-upload-dropzone"],b?Ar["smp-file-upload-dropzone__dragover"]:void 0,d?Ar[`smp-file-upload-dropzone-${d?.toLowerCase()}`]:void 0),onClick:R,role:"button",tabIndex:0,onKeyDown:H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),R())},children:F.jsx("div",{children:p(Ci.DROP_AREA_LABEL)})}),F.jsxs("div",{className:Ar["smp-file-upload-actions"],children:[F.jsx(ye,{ariaLabel:p(Ci.SELECT_FILES),bindValue:"",onClick:R,disabled:o,optionalDisplayValue:h??p(Ci.SELECT_FILES)}),!m&&F.jsxs(F.Fragment,{children:[F.jsx(ye,{ariaLabel:p(Ci.UPLOAD),bindValue:"",onClick:B,disabled:o||!_.length||A,optionalDisplayValue:p(Ci.UPLOAD)}),F.jsx(ye,{ariaLabel:p(Ci.CANCEL),bindValue:"",onClick:G,disabled:o||!A,optionalDisplayValue:p(Ci.CANCEL)})]})]}),F.jsx("input",{ref:y,type:"file",style:{display:"none"},onChange:O,accept:P,multiple:g,"aria-hidden":!0}),w&&F.jsx("div",{className:Ar["smp-file-upload-validation"],children:w}),F.jsx("div",{className:Ar["smp-file-upload-list"],children:_.map(H=>F.jsxs("div",{className:Ar["smp-file-upload-item"],children:[F.jsxs("div",{className:Ar["smp-file-upload-item-wrapper"],children:[H.preview&&F.jsx("img",{className:Ar["smp-file-upload-item-thumbnail"],src:H.preview,alt:"preview"}),F.jsxs("div",{className:Ar["smp-file-upload-item-meta"],children:[F.jsx("span",{className:Ar["smp-file-upload-item-name"],children:H.file.name}),F.jsxs("span",{className:Ar["smp-file-upload-item-size"],children:[(H.file.size/1024).toFixed(1)," KB"]}),H.status==="done"&&H.uploadFolder&&F.jsx("div",{className:Ar["smp-file-upload-item-path"],children:H.uploadFolder}),H.status==="done"&&H.uploadMessage&&F.jsx("div",{className:Ar["smp-file-upload-item-message"],children:H.uploadMessage}),H.status==="uploading"&&F.jsx("div",{className:Ar["smp-file-upload-item-progress"],children:"Uploading..."}),H.status==="error"&&F.jsx("div",{className:Ar["smp-file-upload-item-status-error"],children:H.error})]})]}),F.jsx("div",{children:H.status==="uploading"?F.jsx(ye,{bindValue:"",onClick:G,optionalDisplayValue:p(Ci.CANCEL)}):F.jsxs(F.Fragment,{children:[F.jsx(ye,{bindValue:"",icon:"close",onClick:()=>z(H.id),ariaLabel:`Remove ${H.file.name}`,appearance:"ghost"}),H.status==="error"&&F.jsx(ye,{bindValue:"",onClick:()=>j(H.id),optionalDisplayValue:p(Ci.RETRY)})]})})]},H.id))})]})},H5=({min:e,max:t,step:r=1,inputMode:n="decimal",dSep:i,bindValue:a,onChange:o,onEnter:s,onBlur:l,isVisualOnly:u,decimals:c=2,...h})=>{const{getCurrentLanguage:f}=xi(),d=W.useRef(null),p=f(),{groupingChar:v,decimalChar:g}=W.useMemo(()=>SX(p,i),[p,i]),m=W.useCallback(T=>new Intl.NumberFormat(p,{minimumFractionDigits:c,maximumFractionDigits:c,useGrouping:!0}).format(T),[p,c]),y=W.useCallback(CX,[v,g]),_=W.useCallback(bX,[e,t]),[x,b]=W.useState(a?m(a):""),S=W.useRef(a??null);W.useEffect(()=>{a?(b(m(a)),S.current=a):(b(""),S.current=null)},[a,m]);const w=W.useCallback((T,L=!1)=>{if(T.trim()===""){b(""),S.current=null,o?.(void 0,""),L?s?.(void 0):l?.(void 0);return}const D=y(T,v,g);if(isNaN(D))b(S.current?m(S.current):"");else{const I=_(D,e,t),P=m(I);b(P),S.current=I,o?.(I,P),L?s?.(I):l?.(I)}},[y,v,g,o,s,l,m,_,e,t]),C=T=>b(T),A=()=>w(x),k=T=>{if(T.key==="Enter"){T.preventDefault(),w(x,!0);return}if(T.key==="ArrowUp"||T.key==="ArrowDown"){T.preventDefault();const L=T.key==="ArrowUp"?1:-1,D=S.current??0,I=_(D+L*r,e,t);w(m(I))}};return F.jsx("div",{ref:d,"data-component":"input-number",children:u?F.jsx(Xd,{...h,bindValue:x,justifiedContent:"right",className:`smp-text-number ${S.current!=null&&S.current<0?" smp-text-negative":""}`}):F.jsx(_i,{...h,"aria-valuemin":e,"aria-valuemax":t,"aria-valuenow":S.current??void 0,bindValue:x,inputType:"text",inputMode:n,min:e,max:t,step:r,onChange:T=>C(T.bindValue),onBlur:A,onKeyDown:k})})},PX={"smp-multipleField-container":"_smp-multipleField-container_jxqxn_1"},eE={"smp-chips-container":"_smp-chips-container_fz2nd_1","smp-chips-element":"_smp-chips-element_fz2nd_7"},X0=({elements:e,isEditable:t=!1,displayMode:r="Both",onChange:n,color:i,backgroundColor:a,isDraggable:o=!1})=>{const[s,l]=W.useState(null),u={container:`${eE["smp-chips-container"]}`,element:`${eE["smp-chips-element"]}`},c=d=>{n?.(e.filter((p,v)=>v!==d))},h=d=>{l(d)},f=d=>{if(s===null||s===d)return;const p=[...e],[v]=p.splice(s,1);p.splice(d,0,v),n?.(p),l(null)};return F.jsx("div",{className:u.container,role:"list","data-component":"chip",children:e.flatMap((d,p)=>{const v=zp(d.bindValue,d.optionalDisplayValue,r),g=F.jsxs("div",{className:u.element,role:"listitem",draggable:o,onDragStart:()=>h(p),onDragOver:y=>o&&y.preventDefault(),onDrop:()=>o&&f(p),style:{"--smp-chips-backgroundColor-base":a},children:[o&&F.jsx(me,{icon:"drag_indicator_horizontal",isInteractable:!0}),F.jsx(hr,{variant:"label",bindValue:v,color:i}),t&&F.jsx(me,{icon:"close",isInteractable:!0,onClick:()=>c(p),color:i})]},`chip-${p}`),m=o&&p<e.length-1?F.jsx(me,{icon:"chevron-right",color:i},`separator-${p}`):null;return[g,m].filter(Boolean)})})},C2=({label:e,elements:t,displayMode:r="CodeOnly",helper:n,dataComponent:i,disabled:a,isEditable:o,onChange:s,renderField:l})=>{const u=h=>{const f=[...t];if(h.bindValue=="")f.pop();else{const d=f.findIndex(p=>p.bindValue===h.bindValue);d>=0?f.splice(d,1):f.push({bindValue:h.bindValue,optionalDisplayValue:h.optionalDisplayValue})}s?.(f)},c={container:PX["smp-multipleField-container"]};return F.jsxs("div",{className:c.container,"data-component":i,children:[e&&F.jsx($i,{label:e,disabled:a,helper:n}),F.jsx(X0,{elements:t,displayMode:r,isEditable:o,onChange:h=>{s?.(h)}}),l({addElement:u})]})},j5=({elements:e,displayMode:t="Both",listDisplayMode:r="Both",label:n,disabled:i,isEditable:a=!0,fun:o,error:s,helper:l,_disableAutocomplete:u=!1,onOptionsRequest:c,onChange:h,onConfirmedChange:f,onBlur:d,...p})=>{const v=e.map(g=>g.bindValue);return F.jsx(C2,{label:n,elements:e,displayMode:t,disabled:i,error:s,helper:l,isEditable:a,dataComponent:u?"multiple-combobox":"multiple-autocomplete",onChange:g=>{h?.(g),f?.(g)},renderField:({addElement:g})=>F.jsx(q0,{...p,bindValue:"",fun:o,isEditable:a,_changeOnEnter:!0,listDisplayMode:r,onOptionsRequest:c,_multiActiveIndex:v,_disableAutocomplete:u,error:s,onEnter:g,onBlur:()=>d?.(e),onConfirmedChange:g})})},U5=({...e})=>{const[t,r]=W.useState(!1),n=t?"visibility-off":"visibility";return F.jsx(_i,{...e,inputType:t?"text":"password",shapeIcon:n,onShapeIconClick:()=>r(!t),ariaLabel:"password","data-component":"password"})};var ZS=(e=>(e.PAGE_DIRECTION="pageDirection",e.LINE_DIRECTION="lineDirection",e))(ZS||{});const Gu={"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"},RX=({disabled:e=!1,displayMode:t="DescOnly",RadLay:r=ZS.PAGE_DIRECTION,RadCol:n,options:i,onOptionsRequest:a,onConfirmedChange:o,fun:s,label:l,...u})=>{const[c,h]=W.useState(i),f=W.useId();W.useEffect(()=>{!c&&a&&s&&a(s,void 0).then(b=>h(Ta(b))).catch(b=>{console.error("Error during loading options (radio)",b)})},[c,a,s]);const d=parseInt(n??"",10),p=r===ZS.LINE_DIRECTION,v=p&&!isNaN(d),g=v?Gu["smp-radio-horizontal-grid"]:p?Gu["smp-radio-horizontal"]:"",m=v?{gridTemplateColumns:`repeat(${d}, 1fr)`}:void 0,y={container:Gu["smp-radio"],optionsContainer:`${Gu["smp-radio-options-container"]} ${g}`,option:`${Gu["smp-radio-element"]} ${e?Gu["smp-radio-disabled"]:""}`},_=b=>{e||(u.onChange?.(vo(b)),o?.(vo(b)))},x=W.useId();return F.jsxs("div",{"smp-id":"radio-container","data-component":"radio",className:y.container,id:f,children:[l&&F.jsx($i,{label:l,disabled:e,htmlFor:f,helper:u.helper}),F.jsx("div",{className:y.optionsContainer,style:m,children:c?.map((b,S)=>F.jsxs("label",{className:y.option,children:[F.jsx("input",{type:"radio",name:x,value:b.obj?.k,disabled:e,checked:b.obj?.k===u.bindValue,onChange:()=>_(b)}),F.jsx(hr,{variant:"body",bindValue:zp(b.obj?.k,b.decode,t)})]},S))})]})},q5=({onChange:e,onEnter:t,...r})=>{const[n,i]=W.useState(r.bindValue),{translate:a}=xi(),o=l=>{t?.({bindValue:l.bindValue})},s=l=>{i(l.bindValue),e?.(l)};return W.useEffect(()=>{i(r.bindValue)},[r.bindValue]),F.jsx(_i,{...r,placeholder:r.placeholder?r.placeholder:a(ya.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:n,onChange:s,onEnter:o,ariaLabel:"search bar",autocomplete:"off",_dataComponent:"search-bar"})},$s={"smp-textarea-wrapper":"_smp-textarea-wrapper_1kzoq_4","smp-textarea":"_smp-textarea_1kzoq_4","smp-textarea-input":"_smp-textarea-input_1kzoq_32","smp-textarea-outlined":"_smp-textarea-outlined_1kzoq_55","smp-textarea-danger":"_smp-textarea-danger_1kzoq_66","smp-textarea-readOnly":"_smp-textarea-readOnly_1kzoq_70","smp-textarea-variant-notSelectable":"_smp-textarea-variant-notSelectable_1kzoq_75","smp-textarea-disabled":"_smp-textarea-disabled_1kzoq_85","smp-textarea-FullWidth":"_smp-textarea-FullWidth_1kzoq_94"},T2=({disabled:e,bindValue:t,onChange:r,placeholder:n,state:i,appearance:a,isEditable:o=!0,inputRef:s,label:l,ariaLabel:u,helperText:c,style:h,error:f,onBlur:d,onKeyDown:p,onEnter:v,rows:g=10,cols:m=35,...y})=>{const _=W.useId(),x=`${_}-helper`,b=f?"danger":i,S=c||!!f,w=k=>{r?.({bindValue:k.target.value})},C=k=>{k.key=="Enter"&&k.ctrlKey&&v?.({bindValue:t}),p?.(k)},A={wrapper:`${$s["smp-textarea-wrapper"]}`,container:`${$s["smp-textarea"]} ${e?$s["smp-textarea-disabled"]:""} ${n?$s["smp-textarea-placeholder"]:""} ${b?$s[`smp-textarea-${b}`]:""} ${a?$s[`smp-textarea-${a}`]:""} ${o?"":$s["smp-textarea-readOnly"]}`};return F.jsxs("div",{className:A.wrapper,"data-component":"textarea",children:[l&&F.jsx($i,{htmlFor:_,label:l,disabled:e,helper:y.helper}),F.jsx("textarea",{id:_,value:t,placeholder:n,onChange:w,onBlur:()=>d?.({bindValue:t}),className:A.container,disabled:e,readOnly:!o,onKeyDown:C,style:h,"aria-label":l?void 0:u,"aria-labelledby":l?_:void 0,"aria-describedby":S?x:void 0,rows:g,cols:m,ref:s}),S&&F.jsx(H0,{id:x,helperText:f,disabled:e,state:b})]})},NX=({value:e,onChange:t,targetRef:r,isOpen:n})=>{const i=W.useRef(null);W.useEffect(()=>{n&&i?.current&&i.current.focus()},[n,i]);const[a,o,s]=e,l=u=>Array.from({length:u},(c,h)=>F.jsx("option",{value:h,children:h.toString().padStart(2,"0")},h));return F.jsxs("div",{className:"smp-timepicker-widget",ref:r,children:[F.jsx("select",{value:a,ref:i,onChange:u=>t(+u.target.value,o,s),id:"time-picker-hours",children:l(24)}),":",F.jsx("select",{value:o,onChange:u=>t(a,+u.target.value,s),id:"time-picker-minutes",children:l(60)}),":",F.jsx("select",{value:s||0,onChange:u=>t(a,o,+u.target.value),id:"time-picker-seconds",children:l(60)})]})},rE=e=>{const t=e.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!t)return!1;const[,r,n,i]=t,a=parseInt(r,10),o=parseInt(n,10),s=i?parseInt(i,10):0;return a>=0&&a<=23&&o>=0&&o<=59&&(i===void 0||s>=0&&s<=59)},OX=e=>{const t=e.split(":").map(r=>parseInt(r,10));return[t[0]||0,t[1]||0,t[2]||0]},BX=(e,t,r)=>{const n=e!=null&&!isNaN(e)?e.toString().padStart(2,"0"):"",i=t!=null&&!isNaN(t)?t.toString().padStart(2,"0"):"",a=r!=null&&!isNaN(r)?r.toString().padStart(2,"0"):"";return n&&i?`${n}:${i}:${a}`:i?`${i}:${a}`:a},FX=({bindValue:e,placeholder:t="HH:MM:SS",isVisualOnly:r,onChange:n,onConfirmedChange:i,onBlur:a,isEditable:o=!0,...s})=>{const l=W.useRef(null),[u,c]=W.useState(!1),[h,f]=W.useState(e||""),[d,p]=W.useState(""),{anchorRef:v,targetRef:g}=Fi({position:"bottom",open:u}),m=W.useCallback(()=>{c(!1),l?.current?.focus()},[]);mu([g,v],u,()=>c(!1)),S2(u,g),W.useEffect(()=>{const C=e||"",A=rE(C)?C:e||"";f(C),p(A)},[e]),W.useEffect(()=>{const C=A=>{A.key==="Escape"&&c(!1)};return u&&document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[u]);const y=()=>{o&&c(C=>!C)},_=C=>{p(C)},x=(C,A,k)=>{const T=BX(C,A,k);f(T),p(T),n?.({bindValue:T}),m()},b=()=>{const C=w(d,!1);C&&a?.(C)},S=C=>{C.key==="Enter"&&(C.preventDefault(),w(d,!0))},w=(C,A)=>{if(C.trim()===""){f(""),p("");const T={bindValue:""};return n?.(T),A&&i?.(T),T}if(rE(C)){f(C),p(C);const T={bindValue:C};return n?.(T),A&&i?.(T),T}else p(C)};return F.jsxs("div",{"data-component":"time-picker",children:[r?F.jsx(Xd,{bindValue:d}):F.jsx(_i,{...s,bindValue:d,placeholder:t,onChange:C=>_(C.bindValue),onBlur:b,onKeyDown:S,shapeIcon:"clock",onShapeIconClick:y,isEditable:o,ref:v,inputRef:l}),u&&F.jsx(pi,{children:F.jsx(NX,{value:OX(h),onChange:x,targetRef:g,isOpen:u})})]})};function _c(e){return!!e&&"children"in e}function Mv(e){return!_c(e)}const Ji={"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"},A2=({row:e,columns:t,columnWidths:r={},level:n=0,rowHeight:i=26,offsetTop:a,enableSelection:o,isSelected:s=!1,decimalSeparator:l=".",onToggleSelect:u,onRowClick:c,onNodeClick:h,onContextMenu:f})=>{const[d,p]=W.useState(_c(e)),v=_c(e)&&!!e.children?.length,g=e.cells&&Object.keys(e.cells).length>0,m=v,y=n*16,_=()=>{v&&p(!d)},x={content:`${Ji["smp-row"]} ${Mv(e)?Ji["smp-row-data"]:""} ${_c(e)?Ji["smp-row-clickable"]:""} ${s?Ji["smp-row-selected"]:""}`,toggle:`${Ji["smp-row-toggle"]} ${Ji["smp-row-icon"]}`,indent:`${Ji["smp-row-indent"]}`,cell:`${Ji["smp-row-wrapperCell"]}`,leftSection:`${Ji["smp-row-leftSection"]}`,nodeLabel:Ji["smp-row-node-label"]},b=L=>{let D=L.shape;return L.shape==="ACP"||L.shape==="CMB"||L.shape==="ITX"?D="LBL":L.shape==="AML"&&(D="CHI"),F.jsx(fi,{...L,shape:D,onContextMenu:f,dSep:l,data:{...L.data,isVisualOnly:!0}})},S=()=>F.jsx("span",{className:x.toggle,children:m&&F.jsx(me,{icon:d?"arrow_drop_right":"arrow_drop_down",width:16})}),w=(L,D)=>F.jsx("span",{className:x.toggle,children:F.jsx(me,{icon:L,placeholderIcon:D,width:16})}),C=()=>F.jsx("span",{className:x.indent,style:{width:`${y}px`},"aria-hidden":"true"}),A=()=>{if(u)return F.jsx(Y0,{bindValue:s,onChange:()=>{u()}})},k=()=>{const L=Mv(e)?"":e.decode||(g?"":"Untitled"),D=a??i*n,I={height:`${i}px`,lineHeight:`calc(${i}px - 2*2px)`,...Mv(e)&&{transform:`translateY(${D}px)`}};return F.jsxs("tr",{className:x.content,onClick:_,role:_c(e)?"button":"row","aria-expanded":v?!d:void 0,style:I,children:[o&&F.jsx("td",{className:x.cell,style:{height:`${i}px`,minWidth:40,justifyContent:"center"},children:A()}),_c(e)&&F.jsxs("td",{className:x.leftSection,style:{height:`${i}px`},onClick:P=>h?.(P,e),children:[C(),S(),e.icon&&w(e.icon,e.placeholderIcon),F.jsx("span",{className:x.nodeLabel,children:F.jsx(hr,{variant:"body",bindValue:L})})]}),t&&t.length>0?t.filter(P=>P.visible!==!1).map((P,M)=>{const V=e.cells?.[P.name];return V?F.jsx("td",{className:x.cell,onClick:()=>{c?.(e,P.name)},style:{width:r[P.name],minWidth:r[P.name],height:`${i}px`},children:b({...V,id:P.name})},P.name+M):null}):e.cells&&Object.entries(e.cells).map(([P,M])=>{const V=e.cells?.[P];return V?F.jsx("td",{className:x.cell,style:{height:`${i}px`},children:b({...V,id:P})},P+M):null})]})},T=()=>d||!v||Mv(e)?null:F.jsx(F.Fragment,{children:e.children?.map((L,D)=>F.jsx(A2,{row:L,level:n+1,columns:t,columnWidths:r,onNodeClick:h,onContextMenu:f},`child-${D}`))});return F.jsxs(F.Fragment,{children:[k(),T()]})},$X={"smp-tree":"_smp-tree_19u9h_1"},VX=({fun:e,onOptionsRequest:t,onClick:r})=>{const[n,i]=W.useState(void 0);W.useEffect(()=>{!n&&t&&e&&t(e,void 0).then(o=>i(Ta(o))).catch(o=>{console.error("Errore nel caricamento delle opzioni per il Tree",o)})},[n,e,t]);const a={table:$X["smp-tree"]};return n&&n.length&&F.jsx("table",{className:a.table,"data-component":"tree",children:F.jsx("tbody",{children:n.map((o,s)=>F.jsx(A2,{row:o,onNodeClick:(l,u)=>r?.(l,u)},s))})})},zX={"smp-cell-wrapper":"_smp-cell-wrapper_mdlkz_1"},GX=({elements:e,displayMode:t,label:r,disabled:n,error:i,isEditable:a=!0,onChange:o,onConfirmedChange:s,onBlur:l,...u})=>{const{translate:c}=xi(),[h,f]=W.useState("");return F.jsx(C2,{dataComponent:"chips",label:r,elements:e,displayMode:t,disabled:n,error:i,isEditable:a,helper:u.helper,onChange:d=>{o?.(d),s?.(d)},renderField:({addElement:d})=>F.jsx(_i,{bindValue:h,placeholder:c(ya.CHIPS_INPUT_DEFAULT_PLACEHOLDER),onChange:p=>f(p.bindValue),onEnter:p=>{d(p),f("")},onBlur:()=>l?.(e),isEditable:a,error:i})})},Zd=({bindValue:e,onChange:t,options:r=[],optionalDisplayValue:n,isEditable:i,listDisplayMode:a="Both",autoSelectOptionIndex:o,fun:s,onOptionsRequest:l,onConfirmedChange:u,_multiActiveIndex:c,displayMode:h,...f})=>{const d=W.useRef(null),[p,v]=W.useState(!1),[g,m]=W.useState(r),[y,_]=W.useState(-1),[x,b]=W.useState([e]),S=W.useId(),{anchorRef:w,targetRef:C,anchorWidth:A}=Fi({position:"bottom",open:p}),k=W.useCallback(()=>{v(!1),d?.current?.focus()},[]);mu([C,w],p,()=>k()),S2(p,C),W.useEffect(()=>{o!=null&&(l&&(!g||g.length==0)?l(s,void 0).then(P=>{const M=Ta(P)||[];m(M),o<M.length&&T(M[o])}):o<g.length&&T(r[o]))},[]);const T=P=>{t?.(vo(P)),u?.(vo(P));const M=g.findIndex(V=>V.obj?.k===P.obj?.k);_(M),b([P.obj?.k||""]),k()},L=P=>{P.key==="Escape"&&(k(),_(-1))},D=P=>{(P.key==="ArrowDown"||P.key==="ArrowUp")&&(P.preventDefault(),I())},I=()=>{i&&(s&&l?p?v(!1):l(s,void 0).then(P=>{const M=Ta(P)||[];m(M),_(M.length>0?0:-1),v(!0)}):v(P=>!P))};return F.jsxs("div",{role:"combobox","aria-expanded":p,"aria-controls":S,"aria-owns":S,"data-component":"select",children:[F.jsx(_i,{...f,bindValue:e,optionalDisplayValue:n,displayMode:h,onShapeIconClick:I,onKeyDown:D,onClick:I,shapeIcon:"arrow_drop_down",rotatedShapeIcon:p,isEditable:i,ref:w,inputRef:d,autocomplete:"off","aria-autocomplete":"list",variant:"notSelectable"}),p&&F.jsx(pi,{children:F.jsx(j0,{id:S,options:g,displayMode:a,ref:C,isOpen:p,selectedIndex:y,activeIndex:c||x,width:A,onClick:(P,M)=>T(M),onKeyDown:L,floating:!0})})]})},Y5=({...e})=>F.jsx(q0,{...e,_disableAutocomplete:!0,AcpWtm:" "}),WX=({...e})=>F.jsx(j5,{...e,_disableAutocomplete:!0}),X5=({elements:e,displayMode:t="Both",listDisplayMode:r="Both",label:n,disabled:i,isEditable:a=!0,fun:o,error:s,helper:l,onOptionsRequest:u,onChange:c,onConfirmedChange:h})=>{const f=e.map(d=>d.bindValue);return F.jsx(C2,{label:n,elements:e,displayMode:t,disabled:i,error:s,helper:l,isEditable:a,dataComponent:"multiple-select",onChange:d=>{c?.(d),h?.(d)},renderField:({addElement:d})=>F.jsx(Zd,{bindValue:"",fun:o,isEditable:a,listDisplayMode:r,onOptionsRequest:u,_multiActiveIndex:f,error:s,onConfirmedChange:d})})},Iv={"smp-text-editor-wrapper":"_smp-text-editor-wrapper_1y1nl_1","smp-text-editor-content":"_smp-text-editor-content_1y1nl_7","smp-text-editor-commands":"_smp-text-editor-commands_1y1nl_21","smp-text-editor-content-editable":"_smp-text-editor-content-editable_1y1nl_28"},Z5={bold:"strong, b",italic:"em, i",underline:"u",dashed:"strike, s"},HX={bold:"strong",italic:"em",underline:"u",dashed:"s"},cf=(e,t)=>{if(!e||e.rangeCount===0)return!1;let n=e.getRangeAt(0).commonAncestorContainer;return n.nodeType===Node.TEXT_NODE&&n.parentElement!==null&&(n=n.parentElement),n instanceof Element?n.closest(Z5[t])!==null:!1},jX=(e,t,r)=>{if(r.current&&e&&e.rangeCount>0&&r.current.contains(e.anchorNode)){const n=e.getRangeAt(0);if(!n.collapsed){const i=document.createElement(HX[t]);i.appendChild(n.extractContents()),n.insertNode(i);const a=document.createRange();a.selectNodeContents(i),e.removeAllRanges(),e.addRange(a),r.current&&r.current.focus()}}},UX=(e,t,r)=>{if(r.current&&e&&e.rangeCount>0&&r.current.contains(e.anchorNode)){const n=e.getRangeAt(0);if(!n.collapsed){const i=n.commonAncestorContainer,o=(i.nodeType===Node.TEXT_NODE?i.parentElement:i)?.closest(Z5[t]);if(o){const s=o.textContent||"",l=document.createTextNode(s);if(o.parentNode?.replaceChild(l,o),s){const c=document.createRange();c.setStart(l,0),c.setEnd(l,s.length),e.removeAllRanges(),e.addRange(c),r.current&&r.current.focus()}}}}},qX=({bindValue:e,helper:t,label:r,onChange:n,onBlur:i})=>{const a=W.useRef(null),[o,s]=W.useState({bold:!1,italic:!1,underline:!1,dashed:!1}),l=[{type:"bold",icon:"format_bold"},{type:"italic",icon:"format_italic"},{type:"underline",icon:"format-underline"},{type:"dashed",icon:"format-strikethrough"}],u={smpTextEditorWrapper:`${Iv["smp-text-editor-wrapper"]}`,smpTextEditorContent:`${Iv["smp-text-editor-content"]}`,smpTextEditorCommands:`${Iv["smp-text-editor-commands"]}`,smpTextEditorContentEditable:`${Iv["smp-text-editor-content-editable"]}`};W.useEffect(()=>{a.current&&(e.startsWith("<p")?a.current.innerHTML=e:a.current.innerHTML=`<p>${e!=""?e:"<br>"}</p>`)},[e]);const c=W.useCallback(()=>{const d=window.getSelection();if(a.current&&d&&a.current.contains(d.anchorNode)){const p={bold:cf(d,"bold"),italic:cf(d,"italic"),underline:cf(d,"underline"),dashed:cf(d,"dashed")};s(p)}else s({bold:!1,italic:!1,underline:!1,dashed:!1})},[]);W.useEffect(()=>(document.addEventListener("selectionchange",c),c(),()=>{document.removeEventListener("selectionchange",c)}),[c]);const h=d=>p=>{if(p.stopPropagation(),p.preventDefault(),a.current){const v=window.getSelection();v&&v.rangeCount>0&&(cf(v,d)?UX(v,d,a):jX(v,d,a),setTimeout(()=>{c()},0))}},f=d=>{d.key=="Enter"&&d.stopPropagation()};return F.jsxs("div",{"data-component":"text-editor",className:u.smpTextEditorWrapper,children:[r&&F.jsx($i,{label:r,helper:t}),F.jsxs("div",{className:u.smpTextEditorContent,onBlur:d=>{const p=d.currentTarget,v=d.relatedTarget;p.contains(v)||(n?.({bindValue:a.current?.innerHTML||""}),i?.({bindValue:a.current?.innerHTML||""}))},tabIndex:-1,children:[F.jsx("div",{className:u.smpTextEditorCommands,children:l.map(({type:d,icon:p})=>F.jsx(ye,{variant:"base",appearance:"ghost",icon:p,onClick:h(d),active:o[d],bindValue:"",showText:!1},d))}),F.jsx("div",{ref:a,className:u.smpTextEditorContentEditable,contentEditable:!0,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true",tabIndex:0,onKeyDown:f})]})]})},fi=({id:e,decode:t,shape:r,obj:n,data:i,icon:a,fun:o,placeholderIcon:s,label:l,helper:u,tooltip:c,options:h,inputSettings:f,style:d,autoSelectOptionIndex:p,isVisualOnly:v=!1,onChange:g,onConfirmedChange:m,onClick:y,onEnter:_,onBlur:x,onOptionsRequest:b,onUploadRequest:S,onContextMenu:w,isEditable:C,dSep:A=".",value:k})=>{const T={obj:{t:n?.t||"",p:n?.p||"",k:n?.k?f?.forceUppercase?n?.k.toLocaleUpperCase():n.k:""},shape:r,decode:t,icon:a,fun:o,data:i,isEditable:C,options:h,style:d,inputSettings:f,placeholderIcon:s,tooltip:c},L=EX(n,r,i?.size),D=t||k,I={id:e,onOptionsRequest:b,fun:o,icon:a,placeholderIcon:s,tooltip:c,obj:n,label:l,helper:u,isEditable:C,style:d,size:T.data&&T.data.size?T.data.size:20,isVisualOnly:v,options:h,autoSelectOptionIndex:p,...i},P=(R,B)=>b2(n)?pl(R,{bindValue:new eh(n,B.bindValue).getLegacyValue()}):B5(n)?pl(R,{bindValue:new qm(n,B.bindValue).getLegacyValue()}):f?.forceUppercase?pl(R,{bindValue:B.bindValue.toLocaleUpperCase(),optionalDisplayValue:B.optionalDisplayValue}):pl(R,B),M=(R,B)=>pl(R,{bindValue:new Kl(n,B,A).getLegacyValue()}),V=R=>pl(T,{bindValue:new jm(n,R).getLegacyValue()}),O=R=>LX(T,R),$=()=>{switch(L){case xt.AUTOCOMPLETE:{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D,obj:T.obj,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(q0,{...R})}case xt.BUTTON:{const R=i?.label&&typeof i.label=="string"?i.label:void 0,B={...I,bindValue:R||"",showText:i?.showText?i.showText:!!R,onClick:G=>{y?.(G,P(T,{bindValue:n.k}))}};return F.jsx(ye,{...B})}case xt.BUTTON_LIST:{const R={...I,onClick:(B,G)=>{y?.(B,G)}};return F.jsx(G5,{...R})}case xt.BREADCRUMBS:{const R={...I,onClick:(B,G)=>{y?.(B,G)}};return F.jsx(N5,{...R})}case xt.CHECKBOX:case xt.SWITCH:{const R=L===xt.SWITCH,B={...I,bindValue:jm.fromDataObj(n).getValue(),optionalDisplayValue:D,onChange:G=>{g?.(V(G))},onConfirmedChange:G=>{m?.(V(G))},...R&&{variant:"switch"}};return F.jsx(Y0,{...B})}case xt.COMBOBOX:{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D,obj:T.obj,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(Y5,{...R})}case xt.DATE:{const R={...I,bindValue:eh.fromDataObj(n).getValue(),obj:T.obj,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(w2,{...R})}case xt.ICON:case xt.IMAGE:{const R={...I,icon:a,isInteractable:!!I.fun,onClick:B=>{y?.(B,P(T,{bindValue:n.k}))}};return F.jsx(me,{...R})}case xt.INPUT_NUMBER:{const R={...I,bindValue:Kl.fromDataObj(n,A).getValue(),onChange:B=>{g?.(M(T,B))},onEnter:B=>{_?.(M(T,B))},onBlur:B=>{x?.(M(T,B))}};return F.jsx(H5,{...R})}case xt.EDITOR:{const R={...I,bindValue:n.k,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(qX,{...R})}case xt.MEMO:{const R={...I,bindValue:n.k,optionalDisplayValue:D,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(T2,{...R})}case xt.CHIP:{const R={...I,elements:Lv(T),onChange:B=>{g?.(O(B))},onConfirmedChange:B=>{m?.(O(B))}};return C?F.jsx(GX,{...R}):F.jsx(X0,{...R})}case xt.MULTI_AUTOCOMPLETE:{const R={...I,elements:Lv(T),onChange:B=>{g?.(O(B))},onConfirmedChange:B=>{m?.(O(B))}};return F.jsx(j5,{...R})}case xt.MULTI_CONFIG:{const R={...I,bindValue:l||"",showText:!!l,icon:a??"list",onClick:B=>{y?.(B,P(T,{bindValue:n.k}))}};return F.jsx(ye,{...R})}case xt.MULTI_COMBOBOX:{const R={...I,elements:Lv(T),onChange:B=>{g?.(O(B))},onConfirmedChange:B=>{m?.(O(B))}};return F.jsx(WX,{...R})}case xt.MULTI_SELECT:{const R={...I,elements:Lv(T),onChange:B=>{g?.(O(B))},onConfirmedChange:B=>{m?.(O(B))}};return F.jsx(X5,{...R})}case xt.PASSWORD:{const R={...I,bindValue:T.obj.k,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(U5,{...R})}case xt.RADIO:{const R={...I,bindValue:n.k,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))}};return F.jsx(RX,{...R})}case xt.SELECT:{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D,obj:T.obj,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))}};return F.jsx(Zd,{...R})}case xt.SPOTLIGHT:{const R={...I,bindValue:T.obj.k,obj:T.obj,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(q5,{...R})}case xt.BUTTON_GROUP:{const R={...I,bindValue:n.k,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))}};return F.jsx(z5,{...R})}case xt.TIME:{const R={...I,bindValue:qm.fromDataObj(n).getValue(),onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(FX,{...R})}case xt.TREE:{const R={...I,onClick:(B,G)=>{y?.(B,G)}};return F.jsx(VX,{...R})}case xt.FILE_UPLOAD:{const R=T.data||{},B={...I,...R&&typeof R=="object"?R:{},disabled:I.isEditable===!1,onUploadRequest:S,onChange:G=>{Array.isArray(G)?(g?.(O(G.map(j=>({bindValue:j.bindValue})))),x?.(O(G.map(j=>({bindValue:j.bindValue}))))):(g?.(P(T,G)),x?.(P(T,G)))}};return F.jsx(W5,{...B})}case xt.LABEL:{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D};return F.jsx(Xd,{...R})}default:if(I.isEditable){const R={...I,bindValue:T.obj.k,optionalDisplayValue:T.decode,obj:T.obj,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(_i,{...R})}else{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D};return F.jsx(Xd,{...R})}}},z={wrapper:`${zX["smp-cell-wrapper"]}`};return F.jsx("span",{className:z.wrapper,onContextMenu:R=>{w&&c&&(R.preventDefault(),w(T,R.currentTarget))},children:$()})},Kd=({children:e,layout:t={horizontal:!1,sectionsType:"tab",sections:[{id:"1",content:Array.isArray(e)?e.map(r=>({id:r.props.id})):[{id:e.props.id}]}]}})=>{const[r,n]=W.useState(0),i={};W.Children.forEach(e,p=>{W.isValidElement(p)&&(i[p.props.id]=p)});const a="--smp-grid-template-cols",o="--smp-grid-template-rows",s=D5(t.sections??[],Object.keys(i)),l=p=>p.reduce((v,g)=>{let m="",y={},_={},x="";return g.sections?.length?(m=wn["smp-layout-section-grid"],y=l(g.sections),x=wn[g.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],g.horizontal||IL(g.sections)?_=ML(g.sections,g.horizontal?a:o):_={[a]:"auto",[o]:"auto"}):g.content?.length&&(g.columns!==void 0&&+g.columns>0?(m=wn["smp-layout-section-grid"],x=wn["smp-grid-template-cols"],_={[a]:`repeat(${g.columns}, 1fr)`}):g.horizontal?m=wn["smp-layout-section-flex"]:m=wn["smp-layout-section-grid"]),{...v,...y,[g.id||""]:{classes:`${m} ${wn[g.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${x} ${g.layoutAttributes?.map(b=>`smp-${b}`).join(" ")??""}`,styles:_}}},{}),u=l(s),c=`${wn["smp-layout"]} ${t.horizontal?wn["smp-layout-horizontal"]:wn["smp-layout-vertical"]} ${t.inline?wn["smp-layout-inline"]:""}`;let h={};(t.horizontal||IL(t.sections||[]))&&(h=ML(s,t.horizontal?a:o));const f=(p,v)=>{const g=F.jsx("div",{"smp-id":`section-${p.id}`,className:u[p.id||""].classes,style:u[p.id||""].styles,children:p.sections?.length?p.sections.map(m=>f(m)):p.content?.map(m=>d(m))},`section-${p.id}`);return p.title&&!v?F.jsxs("div",{className:wn["smp-layout-section-with-title"],children:[F.jsx("span",{className:`${wn["smp-layout-section-title"]}`,children:F.jsx($i,{label:p.title})}),g]},`title-section-${p.id}`):g},d=p=>{if(p.visible!==!1){let v=i[p.id||""];v?(p.style||p.isEditable!=null)&&(v=W.cloneElement(v,{...p,...p.style&&{style:{...p.style,...v.props.style}}})):v=F.jsx(fi,{...p,id:p.id??"",style:p.style});const g=`${wn["smp-layout-cell-container"]} ${p.layoutAttributes?.map(m=>`smp-${m}`).join(" ")??""}`;return F.jsx("div",{className:g,"smp-id":p.id,children:v},p.id)}};return F.jsxs("div",{className:c,style:h,"smp-id":"layout",children:[t.sectionsType==="tab"&&t.sections&&t?.sections.length>1&&F.jsx(M5,{data:{type:"SmeupDataTree",children:s.map(p=>({decode:p.title||p.id||"Tab",obj:{t:"",p:"",k:""},placeholderIcon:"tab",cells:{},children:[],shape:void 0,toolbar:!1}))},selectedIndex:r,onTabChange:n}),t.sectionsType?f(s[r],!0):s.map(p=>f(p))]})},YX={"smp-appbar":"_smp-appbar_ui0tb_1"},XX=({data:e,advanceResearchAutoSelect:t,onClick:r,onEnter:n,onContextMenu:i,onAdvanceResearchLoadInitialData:a,onAdvanceResearchLeafNodeClick:o,onMenuClick:s})=>{const[l,u]=W.useState(),c=W.useCallback(h=>{if(!h.rows?.length||!h.columns?.length)return{};const f=h.rows[0];return h.columns.filter(d=>d.visible).reduce((d,p)=>{const g={...f.cells?.[p.name],id:p.name,onChange:m=>{u(y=>y&&{...y,[p.name]:{...y[p.name],obj:{t:y[p.name].obj?.t||"",p:y[p.name].obj?.p||"",k:m.obj?.k||""}}})},onClick:(m,y)=>{r&&r(y)},onEnter:m=>{n&&n(m)},onContextMenu:(m,y)=>{i&&i(m,y)}};return{...d,[p.name]:g}},{})},[r,n,i]);return W.useEffect(()=>{e&&u(c(e))},[e,c]),!e?.rows?.length||!e.columns?.length?null:l&&F.jsx(kh.Provider,{value:{onAdvanceResearchLoadInitialData:a,onAdvanceResearchLeafNodeClick:o,advanceResearchAutoSelect:t},children:F.jsxs("header",{className:YX["smp-appbar"],"aria-label":"App Bar","data-component":"app-bar",children:[F.jsx(ye,{bindValue:"",icon:"menu",variant:"base",sizing:"large",title:"Menu",showText:!1,onClick:()=>s?.()}),F.jsx(Kd,{layout:e.rows[0].layout,children:Object.values(l).map(h=>F.jsx(fi,{...h}))})]})})},$x={"smp-box-list":"_smp-box-list_1x5st_1","smp-box-element":"_smp-box-element_1x5st_10","smp-box-global-filter":"_smp-box-global-filter_1x5st_28"},ZX=(e,t)=>{const r=t.toLowerCase();return e.rows.filter(n=>n.cells?Object.values(n.cells).some(i=>{const a=i.value?.toLowerCase().includes(r),o=i.obj?.k.toLowerCase().includes(r);return a||o}):!1)},KX=(e,t)=>{switch(t){case"2":return JX(e);case"3":return QX(e);case"4":return tZ(e);case"5":return eZ(e);case"6":return rZ(e);case"7":return nZ(e);case"8":return iZ(e);default:return Dh(e)}},Dh=e=>({sections:e.map(t=>({id:`section-${t.name}`,layoutAttributes:["grid-cols-2"],content:[{id:`label-${t.name}`,obj:{t:"",p:"",k:t.title||t.name}},{id:t.name,style:{fontWeight:"bold"}}]}))}),JX=e=>({sections:e.map(t=>({id:`section-${t.name}`,layoutAttributes:["grid-cols-2"],content:[{id:`label-${t.name}`,obj:{t:"",p:"",k:t.title||t.name}},{layoutAttributes:["justify-end"],id:t.name,style:{fontWeight:"bold"}}]}))}),QX=e=>({sections:[{id:"content",layoutAttributes:[`grid-cols-${e.length}`,"justify-center"],sections:e.map(t=>({id:`section-${t.name}`,layoutAttributes:["grid-cols-2"],content:[{id:`label-${t.name}`,layoutAttributes:["justify-end"],obj:{t:"",p:"",k:t.title||t.name}},{layoutAttributes:["justify-start"],id:t.name,style:{fontWeight:"bold"}}]}))}]}),tZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0||r.length==0?(console.warn("LayoutNbr 4 required at least 1 image or icon and one field"),Dh(e)):{sections:[{id:"content",layoutAttributes:["grid-col-1","justify-center"],content:[{layoutAttributes:["justify-center"],id:t[0].name},{layoutAttributes:["justify-center"],id:r[0].name}]}]}},eZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0?(console.warn("LayoutNbr 5 required at least 1 image or icon"),Dh(e)):{sections:[{id:"content",layoutAttributes:["grid-cols-2"],sections:[{id:"image",content:[{layoutAttributes:["justify-center","items-center"],id:t[0].name}]},{sections:r.map(n=>({id:`section-${n.name}`,layoutAttributes:["grid-cols-2"],sections:[{layoutAttributes:["justify-end"],id:`label-${n.name}`,content:[{obj:{t:"",p:"",k:n.title||n.name}}]},{layoutAttributes:["justify-start"],id:`value-${n.name}`,content:[{id:n.name,style:{fontWeight:"bold"}}]}]}))}]}]}},rZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0?(console.warn("LayoutNbr 6 required at least 1 image or icon"),Dh(e)):{sections:[{id:"content",layoutAttributes:["grid-cols-2"],sections:[{id:"image",content:[{layoutAttributes:["justify-center","items-center"],id:t[0].name}]},{sections:r.map(n=>({id:`section-${n.name}`,layoutAttributes:["grid-cols-1","gap-4"],content:[{id:`label-${n.name}`,obj:{t:"",p:"",k:n.title||n.name}},{id:n.name,style:{fontWeight:"bold"}}]}))}]}]}},nZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0?(console.warn("LayoutNbr 7 required at least 1 image or icon"),Dh(e)):{sections:[{id:"content",sections:[{id:"image",content:[{layoutAttributes:["justify-center"],id:t[0].name}]},{sections:r.map(n=>({id:`section-${n.name}`,layoutAttributes:["grid-cols-2","gap-4"],content:[{id:`label-${n.name}`,obj:{t:"",p:"",k:n.title||n.name}},{id:n.name,style:{fontWeight:"bold"}}]}))}]}]}},iZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0?(console.warn("LayoutNbr 8 required at least 1 image or icon"),Dh(e)):{sections:[{id:"content",sections:[{id:"image",content:[{layoutAttributes:["justify-center"],id:t[0].name}]},{sections:r.map(n=>({id:`section-${n.name}`,layoutAttributes:["grid-cols-1","gap-4"],content:[{id:`label-${n.name}`,obj:{t:"",p:"",k:n.title||n.name}},{id:n.name,style:{fontWeight:"bold"}}]}))}]}]}},aZ=({data:e,dSep:t,SelectRow:r,SelFirst:n="No",GlobalFilter:i="No",Columns:a,Cols:o,LayoutNbr:s="1",onCellClick:l,onClick:u})=>{const[c,h]=W.useState(e.rows),[f,d]=W.useState(""),p={smpBoxList:`${$x["smp-box-list"]}`,smpBoxElement:`${$x["smp-box-element"]}`,smpBoxGlobalFilter:`${$x["smp-box-global-filter"]}`},v=W.useMemo(()=>{if(a){const _=a.split("|");return e.columns.filter(b=>_.includes(b.name)).sort((b,S)=>_.indexOf(b.name)-_.indexOf(S.name))}return e.columns.filter(_=>_.visible==null||_.visible==!0)},[a,e.columns]);W.useEffect(()=>{Pe(n)&&e.rows.length>0&&u?.({row:e.rows[0]}),r&&parseInt(r)-1<=e.rows.length&&u?.({row:e.rows[parseInt(r)-1]})},[]);const g=(_,x)=>F.jsx(fi,{id:_.name,...x.cells?.[_.name],isVisualOnly:!0,isEditable:!1,dSep:t,onClick:(b,S)=>{b.stopPropagation(),l({cell:S,column:_,row:x})}}),m=W.useMemo(()=>o&&parseInt(o)>0?parseInt(o):1,[o]),y=W.useMemo(()=>({"--smp-box-list-cols":m.toString()}),[m]);return F.jsxs("div",{"data-component":"box-list",children:[Pe(i)&&F.jsx("div",{className:p.smpBoxGlobalFilter,children:F.jsx(q5,{bindValue:f,onChange:_=>{d(_.bindValue),h(ZX(e,_.bindValue))},FullWidth:"Yes",placeholder:"Search..."})}),F.jsx("div",{"data-component":"box-list-grid",className:p.smpBoxList,style:y,children:c.map((_,x)=>_.cells?F.jsx("div",{"data-component":"box-list-element",className:p.smpBoxElement,onClick:()=>u({row:_}),children:F.jsx(Kd,{layout:_.layout?.sections&&_.layout.sections.length>0?_.layout:KX(v,s),children:v.map(b=>g(b,_))})},`box-${x}`):null)})]})},Yn={"smp-dash-list":"_smp-dash-list_x2rzc_1","smp-dash-list-fill-space":"_smp-dash-list-fill-space_x2rzc_8","smp-dash-list-horizontal":"_smp-dash-list-horizontal_x2rzc_13","smp-layout-1":"_smp-layout-1_x2rzc_17","smp-layout-2":"_smp-layout-2_x2rzc_21","smp-layout-3":"_smp-layout-3_x2rzc_29","smp-layout-1__descr":"_smp-layout-1__descr_x2rzc_58","smp-layout-2__descr":"_smp-layout-2__descr_x2rzc_59","smp-layout-3__descr":"_smp-layout-3__descr_x2rzc_60","smp-layout-1__value":"_smp-layout-1__value_x2rzc_68","smp-layout-2__value":"_smp-layout-2__value_x2rzc_69","smp-layout-3__value":"_smp-layout-3__value_x2rzc_70","smp-layout-2__icon":"_smp-layout-2__icon_x2rzc_77"},oZ=({ColumnsNumber:e=1,data:t,ForceText:r,TextColName:n,TextColor:i="var(--smp-dashList-color-base)",Fillspace:a,FontSize:o,Horizontal:s,ForceIcon:l,IconColName:u,IconColor:c="var(--smp-dashList-color-base)",NumberFormat:h,ForceUM:f,UmColName:d,UmColor:p="var(--smp-dashList-color-base)",ForceValue:v,ValueColName:g,ValueColor:m="var(--smp-dashList-color-base)",SelectLayout:y="1",onClick:_})=>{const x="N/A",b=t?.columns||[],S=t?.rows||[],w=S.length>0,C="--smp-dashList-color",A="descr",k="icon",T="um",L="value",D=o||"1em",I="18px",P="--smp-dashList-columns",M="--smp-dashList-fontSize",V={dash:(U="1")=>({container:Yn[`smp-layout-${U}`]||Yn["smp-layout-1"],descr:Yn[`smp-layout-${U}__descr`]||Yn["smp-layout-1__descr"],icon:Yn[`smp-layout-${U}__icon`]||Yn["smp-layout-2__icon"],um:Yn[`smp-layout-${U}__um`]||"",value:Yn[`smp-layout-${U}__value`]||Yn["smp-layout-1__value"]}),dashList:`${Yn["smp-dash-list"]} ${Pe(a)?Yn["smp-dash-list-fill-space"]:""} ${Pe(s)?Yn["smp-dash-list-horizontal"]:""}`},{format:O}=xi(),$=U=>`${C}-${U}`,z=U=>{const Q=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(Q.test(U)){const nt=U.match(Q)||[];if(nt?.length>3)return"rgb("+nt[1]+","+nt[2]+","+nt[3]+")"}return U},R=U=>{if(!h)return U;const[Q,X]=B(h).map(ue=>parseInt(ue||"0")),nt="0,0"+(X?"."+"0".repeat(X):""),st=O(U,nt,"it");if(!Q)return st;const[mt,Bt]=st.split(",");return mt+(Bt?`,${Bt}`:"")},B=U=>U.includes(";")?U.split(";"):[U],G=U=>{const Q=nt=>{if(nt)return U?.cells?.[nt]?.obj?.k},X=nt=>{if(!(b.length<=nt))return U?.cells?.[b[nt].name]?.obj?.k};return{descr:r||Q(n)||X(2)||"",icon:l||Q(u)||X(3)||"",um:f||Q(d)||X(1)||"",value:v||Q(g)||X(0)||""}},j=U=>{_?.(U)},H=(U,Q)=>{(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),U.stopPropagation(),j(Q))},K=(U=>{const Q=V.dash(U);return{className:Q,descr:X=>F.jsx("div",{className:Q.descr,children:X},`${U}-${A}`),icon:X=>F.jsx("div",{className:Q.icon,children:F.jsx(me,{color:c,height:I,icon:X,width:I})},`${U}-${k}`),um:X=>F.jsx("div",{className:Q.um,children:X},`${U}-${T}`),value:X=>F.jsx("div",{className:Q.value,children:X},`${U}-${L}`)}})(y),et=U=>{const{descr:Q,icon:X,um:nt,value:st}=G(U),mt={[$(A)]:z(i),[$(T)]:z(p),[$(L)]:z(m)},Bt=[],ue=R(st);switch(y){case"2":X&&Bt.push(K.icon(X)),Bt.push(K.descr(Q)),Bt.push(K.value(nt?ue+" "+nt:ue));break;default:case"1":Bt.push(K.descr(Q)),Bt.push(K.value(nt?ue+" "+nt:ue))}return F.jsx("div",{className:K.className.container,role:"button",style:mt,tabIndex:0,onClick:()=>j(U),onKeyDown:Ve=>H(Ve,U),children:Bt},U.rowId)},it={[P]:String(e),[M]:D};return F.jsx("div",{className:V.dashList,style:it,"data-component":"dash-list",children:w?S.map(U=>et(U)):x})},sZ={"smp-table":"_smp-table_v715o_1"};function lZ(e,t){const r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function uZ(e,t){return e.map(r=>{const n=t.find(i=>i.column===r.bindValue);return{column:r.bindValue,visible:n?.visible??!0}})}function cZ(e){const t=[];return e?.split("|").forEach(r=>{const n=r.split(","),i=n[0],o=(n[1]??"").toUpperCase()!=="H";i.trim()&&t.push({column:i,visible:o})}),t}function hZ(e){return!e||typeof e!="string"?[]:e.split("|").map(t=>t.trim()).filter(Boolean).map(t=>{const r=t.match(/^(\w+)\(([^)]+)\)$/);return r?{func:r[1].toUpperCase(),field:r[2].trim()}:null}).filter(Boolean)}function K5(e,t){const r={};for(const{func:n,field:i}of t){const a=e.map(o=>{const s=o?.cells?.[i]?.value,l=typeof s=="number"?s:parseFloat(s??"");return isNaN(l)?0:l}).filter(o=>typeof o=="number");switch(n){case"SUM":r[i]=a.reduce((o,s)=>o+s,0);break;case"COUNT":r[i]=a.length;break;case"AVG":r[i]=a.length>0?a.reduce((o,s)=>o+s,0)/a.length:0;break}}return r}function fZ(e,t,r,n,i){const a=[];let o=0;return s(e,0,[]),{flatRows:a,offset:o};function s(f,d,p){if(d>=t.length){h(f);return}const v=t[d].column,g=l(f,v);let m=0;for(const[y,_]of g){const x=[...p,m.toString()],b=u(x),S=n.has(b),w=c(y,b,d,S,_);a.push(w),o+=r,S&&s(_,d+1,x),m++}}function l(f,d){const p=new Map;for(const v of f){const g=(v.cells?.[d]?.decode||v.cells?.[d]?.value)??"N/D";p.has(g)||p.set(g,[]),p.get(g).push(v)}return p}function u(f){return`${f.join("-")}`}function c(f,d,p,v,g){const m={};if(i&&g.length>0){const y=K5(g,i);for(const _ in y)m[_]={value:String(y[_]),obj:{t:"NR",p:"",k:String(y[_])},options:[],decode:String(y[_]),shape:xt.LABEL,isEditable:!1,data:{isVisualOnly:!0}}}return{isGroup:!0,value:f,cells:m,id:d,level:p,isExpanded:v}}function h(f){for(const d of f)a.push(d),o+=r}}const dZ=({columns:e,rows:t,containerRef:r,sizingMode:n})=>{const[i,a]=W.useState({}),o=3,s=7;return W.useEffect(()=>{if(!(!e||e.length===0)){if(n==="fixed"){const u=Object.fromEntries(e.map(c=>[c.name,120]));a(u)}else if(n==="fit-grid"){const l=r.current?.offsetWidth||800,u=e.filter(f=>f.visible!==!1),c=l/u.length,h=Object.fromEntries(u.map(f=>[f.name,c]));a(h)}else if(n==="fit-content"){const l={},u=[...t].sort(()=>.5-Math.random()).slice(0,100),c=t.slice(0,100).concat(u);for(const h of e){if(!h.visible)continue;const f=h.title?.length+o*2||0,d=Math.max(f,...c.map(p=>{const v=p.cells?.[h.name];return`${v?.decode??v?.value??""}`.length}));l[h.name]=d*s+24}a(l)}}},[e,t,r,n]),[i,a]},pZ={EQ:{label:"eq",function:(e,t)=>e.toDateString()===t.toDateString()},ON:{label:"on",function:(e,t)=>e.toDateString()===t.toDateString()},AFTER:{label:"after",function:(e,t)=>e>t},ONORAFTER:{label:"onorafter",function:(e,t)=>e>=t},BEFORE:{label:"before",function:(e,t)=>e<t},ONORBEFORE:{label:"onorbefore",function:(e,t)=>e<=t}},vZ={CONTAINS:{label:"contains",function:(e,t)=>e.includes(t)},STARTS:{label:"starts",function:(e,t)=>e.startsWith(t)},EQ:{label:"eq",function:(e,t)=>e===t},NEQ:{label:"neq",function:(e,t)=>e!==t}},gZ={EQ:{label:"eq",function:(e,t)=>e===t},NEQ:{label:"neq",function:(e,t)=>e!==t},GT:{label:"gt",function:(e,t)=>e>t},GTE:{label:"ge",function:(e,t)=>e>=t},LT:{label:"lt",function:(e,t)=>e<t},LTE:{label:"le",function:(e,t)=>e<=t}},mZ=e=>Object.values(pZ).find(r=>r.label===e.toLowerCase())?.function??(()=>null),yZ=e=>Object.values(vZ).find(r=>r.label===e.toLowerCase())?.function??(()=>null),_Z=e=>Object.values(gZ).find(r=>r.label===e.toLowerCase())?.function??(()=>null);function xZ(e,t){return e.map(r=>{const n=t?.[r.name],i=bZ(r);return{obj:{t:r.obj?.t||"",p:r.obj?.p||"",k:r.name},decode:r.title,shape:void 0,type:n??i}})}function bZ(e){return e.obj?O5(e.obj)?"number":b2(e.obj)?"date":"string":"string"}function nE(e,t){const r={logic:"and",filters:[]};return e?typeof e=="object"&&"logic"in e&&"filters"in e?e:typeof e=="string"?SZ(e,t):r:r}function SZ(e,t){const r=e.split("|").map(i=>i.trim()).filter(Boolean),n=[];for(const i of r){const a=wZ(i,t);a&&n.push(a)}return{logic:"and",filters:n}}function wZ(e,t){if(!e.trim())return null;if(e.includes(";OR;")){const n=e.split(";OR;").map(l=>l.trim()).filter(Boolean);if(n.length===0)return null;const i=Vx(n[0],t);if(!i)return null;const a=i.field,o=i.columnsType,s=n.slice(1).map(l=>Vx(l,t,a?.obj?.k,o)).filter(l=>l!==null);return{logic:"or",filters:[i,...s]}}else{const n=Vx(e,t);return n?{logic:"and",filters:[n]}:null}}function Vx(e,t,r,n){const i=e.split(";").map(h=>h.trim());let a,o,s;if(i.length===3)[a,o,s]=i;else if(i.length===2&&r&&n)[o,s]=i,a=r;else return null;const l=t.find(h=>h?.obj?.k===a)??(r&&n?{obj:{t:"",p:"",k:r},decode:r,type:n,shape:void 0}:null);if(!l)throw new Error(`Campo '${a}' non trovato nei FieldOption.`);const u={...sm,obj:{t:"",p:"",k:o}},c=CZ(s,l.type);return{field:l,columnsType:l.type,operator:u,value:c}}function CZ(e,t){switch(t){case"number":return Number(e);case"date":return new Date(e);case"string":return e;default:return null}}function TZ(e,t){return!t||"filters"in t&&t.filters.length===0?e:e.filter(r=>J5(t,r))}function J5(e,t){if("filters"in e){const{logic:r,filters:n}=e;if(n.length===0)return!0;const i=n.map(a=>J5(a,t));return r==="and"?i.every(Boolean):i.some(Boolean)}return AZ(e,t)}function AZ(e,t){const{field:r,operator:n,value:i,columnsType:a}=e,o=t.cells?.[r?.obj?.k||""],s=kZ(o);if(!s)return!1;switch(a){case"string":return DZ(s,n.obj?.k||"",i);case"number":return LZ(s,n.obj?.k||"",i);case"date":return EZ(s,n.obj?.k||"",i);default:return!0}}function kZ(e){if(!e||typeof e!="object")return e;if("decode"in e)return e.decode;if("value"in e)return e.value}function DZ(e,t,r){const n=String(e).toLowerCase(),i=String(r).toLowerCase();return yZ(t)(n,i)??!0}function LZ(e,t,r){const n=Number(e),i=Number(r);return r===""?!0:isNaN(n)||isNaN(i)?!1:_Z(t)(n,i)??!0}function EZ(e,t,r){const n=new Date(e),i=new Date(r);return r===""?!0:isNaN(n.getTime())||isNaN(i.getTime())?!1:mZ(t)(n,i)??!0}const MZ=(e,t)=>{const r=n=>n.filters.some(i=>"filters"in i?r(i):i.field?.obj?.k===e&&i.operator&&i.value!=="");return r(t)},IZ=e=>{const t=r=>r.filters.reduce((n,i)=>"filters"in i?n+t(i):n+1,0);return t(e)};function PZ(e,t){const r=W.useRef(null),n=W.useCallback(o=>{r.current=o},[]),i=W.useCallback(o=>{o.preventDefault(),o.dataTransfer.dropEffect="move"},[]),a=W.useCallback(o=>{const s=r.current;if(!s||s===o)return;const l=e.findIndex(f=>f.name===s),u=e.findIndex(f=>f.name===o);if(l===-1||u===-1)return;const c=[...e],[h]=c.splice(l,1);c.splice(u,0,h),t(c),r.current=null},[e,t]);return{handleDragStart:n,handleDragOver:i,handleDrop:a}}function Q5(e,t,r,n="."){const i=e.columns.find(o=>o.name===t);if(!i)return e;const a=[...e.rows].sort((o,s)=>{const l=o.cells?.[t].obj,u=s.cells?.[t].obj;if(l?.k==null&&u?.k!=null)return r==="asc"?1:-1;if(l?.k!=null&&u?.k==null)return r==="asc"?-1:1;if(l?.k==null&&u?.k==null)return 0;switch(i.obj?.t){case"NR":{const c=Kl.fromDataObj(l,n).getValue()??NaN,h=Kl.fromDataObj(u,n).getValue()??NaN;return isNaN(c)&&isNaN(h)?0:isNaN(c)?r==="asc"?-1:1:isNaN(h)?r==="asc"?1:-1:r==="asc"?c-h:h-c}case"D8":case"DATE":{const c=new Date(eh.fromDataObj(l).getValue()),h=new Date(eh.fromDataObj(u).getValue());return isNaN(c.getTime())&&isNaN(h.getTime())?0:isNaN(c.getTime())?r==="asc"?1:-1:isNaN(h.getTime())?r==="asc"?-1:1:r==="asc"?c.getTime()-h.getTime():h.getTime()-c.getTime()}default:{const c=o.cells?.[t]?.decode||o.cells?.[t]?.value||l?.k,h=s.cells?.[t]?.decode||s.cells?.[t]?.value||u?.k;return c!=null&&h!=null?r==="asc"?String(c).localeCompare(String(h)):String(h).localeCompare(String(c)):c==null&&h!=null?r==="asc"?1:-1:c!=null&&h==null?r==="asc"?-1:1:0}}});return{...e,rows:a}}function RZ(e,t){const[r,n]=W.useState(null),[i,a]=W.useState("asc");return{sortedRows:W.useMemo(()=>r?Q5({...e,rows:e.rows},r,i,t).rows:e.rows,[e,r,i,t]),sortBy:r,sortOrder:i,handleSort:l=>{n(u=>u===l?(a(c=>c==="asc"?"desc":"asc"),l):(a("asc"),l))}}}const iE={"smp-footer-tr":"_smp-footer-tr_22pj9_1","smp-footer-td":"_smp-footer-td_22pj9_6"},NZ=({columns:e,columnWidths:t,totals:r,rows:n=[],hasGroups:i=!1})=>{const a={td:`${iE["smp-footer-td"]}`,tr:`${iE["smp-footer-tr"]}`},o=i?n.filter(l=>l.isGroup&&l.level===0):n.filter(l=>!l.isGroup),s=r&&o.length>0?K5(o,r):{};return F.jsx("tfoot",{children:F.jsx("tr",{className:a.tr,children:e.map(l=>l.visible&&F.jsx("td",{className:a.td,style:{width:t[l.name],minWidth:t[l.name],maxWidth:t[l.name]},children:s[l.name]!=null?F.jsx(fi,{value:String(s[l.name]),obj:{t:"NR",p:"",k:String(s[l.name])},options:[],decode:String(s[l.name]),shape:xt.INPUT_NUMBER,id:l.name,data:{isVisualOnly:!0,style:{fontWeight:"bold"}}}):null},l.name))})})},OZ=({label:e,rowHeight:t=28,offsetTop:r=0,level:n=0,onClick:i,isExpanded:a,cells:o,columns:s,columnWidths:l})=>{const u={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return F.jsx("tr",{className:u.tr,style:{height:t,top:r,lineHeight:`${t}px`},onClick:i,children:s?.map((c,h)=>{const f=h===0,d=f?F.jsxs(F.Fragment,{children:[F.jsx(me,{icon:a?"arrow_drop_down":"arrow_drop_right",width:16}),F.jsx(hr,{variant:"title",bindValue:e})]}):o?.[c.name]?.value!=null?F.jsx(fi,{...o[c.name],id:c.name}):null;return F.jsx("td",{className:u.td,style:{width:l?.[c.name],paddingLeft:f?10+n*20:void 0},children:d},c.name)})})};function BZ(e){return e.split("|")}function FZ(e,t){return e.columns.map(r=>({...r,visible:t.includes(r.name)}))}const Dc={"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"},$Z=({filter:e,onChange:t,onDelete:r,fieldOptions:n,hasCurrentColumn:i})=>{const{translate:a}=xi(),o={string:[{obj:{t:"",p:"",k:"starts"},shape:void 0,decode:a(kn.STRING_STARTS)},{obj:{t:"",p:"",k:"contains"},shape:void 0,decode:a(kn.STRING_CONTAINS)},{obj:{t:"",p:"",k:"eq"},shape:void 0,decode:a(kn.STRING_EQUALS)}],number:[{obj:{t:"",p:"",k:"eq"},shape:void 0,decode:a(kn.NUMBER_EQUALS)},{obj:{t:"",p:"",k:"gt"},shape:void 0,decode:a(kn.NUMBER_GREATER)},{obj:{t:"",p:"",k:"ge"},shape:void 0,decode:a(kn.NUMBER_GREATER_OR_EQUAL)},{obj:{t:"",p:"",k:"lt"},shape:void 0,decode:a(kn.NUMBER_LESS)},{obj:{t:"",p:"",k:"le"},shape:void 0,decode:a(kn.NUMBER_LESS_OR_EQUAL)}],date:[{obj:{t:"",p:"",k:"before"},shape:void 0,decode:a(kn.DATE_BEFORE)},{obj:{t:"",p:"",k:"after"},shape:void 0,decode:a(kn.DATE_AFTER)},{obj:{t:"",p:"",k:"on"},shape:void 0,decode:a(kn.DATE_ON)}]},s=f=>{const d=n.find(v=>v?.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})},u=f=>{t({...e,value:f})},c=()=>{switch(e.columnsType){case"string":return F.jsx(_i,{bindValue:e.value,onChange:f=>u(f.bindValue)});case"number":return F.jsx(H5,{bindValue:e.value,onChange:f=>{f&&u(f)}});case"date":return F.jsx(w2,{bindValue:e.value,onChange:f=>u(f.bindValue)})}},h={row:`${Dc["smp-filter-row"]}`};return F.jsxs("div",{className:h.row,children:[!i&&F.jsx(Zd,{bindValue:e.field.obj.k,options:n.map(f=>({obj:{t:"",p:"",k:f?.obj?.k||""},decode:f.decode,shape:void 0})),onChange:f=>s(f.bindValue),listDisplayMode:nd.BOTH,displayMode:nd.CODE_ONLY,isEditable:!0}),F.jsx(Zd,{bindValue:e.operator?.obj.k,options:o[e.columnsType],onChange:f=>l(f.bindValue),listDisplayMode:nd.BOTH,displayMode:nd.CODE_ONLY,isEditable:!0},e.columnsType),c(),F.jsx(ye,{bindValue:"",showText:!1,label:"Delete",onClick:r,appearance:"ghost",variant:"base",icon:"delete"})]})},t$=({group:e,onChange:t,onDelete:r,onClose:n,level:i=0,fieldOptions:a,hasSubGroups:o=!0,hasSubFilters:s=!0,currentColumnName:l,hasButtonGroup:u=!0})=>{const{translate:c}=xi(),h=(m,y)=>{const _=[...e.filters];_[m]=y,t({...e,filters:_})},f=m=>{const y=[...e.filters];y.splice(m,1),t({...e,filters:y})},d=()=>{const m=a[0],y={...sm},_={field:m,columnsType:m?.type||"string",operator:y,value:""};t({...e,filters:[...e.filters,_]})},p=()=>{let m;if(l){const _=a.find(b=>b.obj?.k===l),x={...sm};m={field:_||a[0]||"",columnsType:_?.type||a[0]?.type||"string",operator:x,value:""}}else{const _={...sm};m={field:a[0]||"",columnsType:a[0]?.type||"string",operator:_,value:""}}const y={logic:"and",filters:[m]};t({...e,filters:[...e.filters,y]})},v=m=>{t({...e,logic:m})},g={filterGroup:`${Dc["smp-filter-group"]}`,filterToolbar:`${Dc["smp-filter-toolbar"]}`,filterList:`${Dc["smp-filter-list"]}`,actionButtons:`${Dc["smp-filter-actionButtons"]}`};return F.jsxs("div",{className:g.filterGroup,style:i!=0?{marginLeft:20}:void 0,"data-component":i===0?"filter":void 0,children:[F.jsxs("div",{className:g.filterToolbar,children:[u&&F.jsx(z5,{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:m=>v(m.bindValue)}),F.jsxs("div",{className:g.actionButtons,children:[s&&F.jsx(ye,{onClick:d,bindValue:c(kn.ADD_FILTER),icon:"plus",appearance:"outlined",variant:"base"}),o&&F.jsx(ye,{onClick:p,bindValue:c(kn.ADD_SUB_GROUP),icon:"plus",appearance:"outlined",variant:"base"}),r&&F.jsx(ye,{bindValue:"",showText:!1,label:"Delete",onClick:r,appearance:"outlined",variant:"base",icon:"delete"}),n&&F.jsx(ye,{bindValue:c(ya.CLOSE),showText:!0,label:"Delete",onClick:n,icon:"close",appearance:"outlined",variant:"base"})]})]}),F.jsx("div",{className:g.filterList,children:e.filters.map((m,y)=>({filter:m,index:y})).filter(({filter:m})=>l?"logic"in m?m.filters.some(y=>"logic"in y?!1:y.field?.obj?.k===l):m.field?.obj?.k===l:!0).map(({filter:m,index:y})=>"logic"in m?F.jsx(t$,{group:m,onChange:_=>h(y,_),onDelete:()=>f(y),level:i+1,fieldOptions:a,hasSubGroups:!1,hasSubFilters:!0,currentColumnName:l,hasButtonGroup:!0},y):F.jsx($Z,{filter:m,onChange:_=>h(y,_),onDelete:()=>f(y),fieldOptions:a,hasCurrentColumn:!!l},y))})]})},aE=({filters:e,onChange:t,fieldOptions:r,hasSubGroups:n,hasSubFilters:i,ref:a,currentColumnName:o,hasButtonGroup:s,onClose:l})=>{const u={filterWrapper:`${Dc["smp-filter-wrapper"]}`};return F.jsx("div",{onClick:c=>{c.stopPropagation()},"aria-hidden":"true",children:F.jsx("div",{className:u.filterWrapper,ref:a,children:F.jsx(t$,{group:e,onChange:t,fieldOptions:r,hasSubFilters:i,hasSubGroups:n,currentColumnName:o,hasButtonGroup:s,onClose:l})})})},VZ={"smp-groupBar-container":"_smp-groupBar-container_hxnfs_1"},zZ=({groups:e=[],isDraggable:t=!0,isEditable:r=!0,onChange:n,onDrop:i,onDragOver:a})=>{const o=e.map(s=>({bindValue:s.column}));return F.jsxs("th",{className:VZ["smp-groupBar-container"],onDragOver:a,onDrop:i,children:[F.jsx(me,{icon:"groups"}),F.jsx(X0,{elements:o,isEditable:r,isDraggable:t,displayMode:"CodeOnly",onChange:n})]})},Vs={"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"},GZ=({columns:e,columnWidths:t,groups:r,showGroupBar:n,showFilter:i,filterColumn:a,activeFilters:o,fieldOptions:s,Filter:l,enableSelection:u,allVisibleRowsSelected:c,sortBy:h,sortOrder:f,onToggleFilter:d,onToggleColumnFilter:p,onFiltersChange:v,onResetFilters:g,onGroupChange:m,onGroupDrop:y,onGroupDragOver:_,onMouseDown:x,onToggleAllRows:b,onSort:S,onDragStart:w,onDragOver:C,onDrop:A})=>{const k=W.useRef({}),{anchorRef:T,targetRef:L}=Fi({position:"bottom",open:i}),{anchorRef:D,targetRef:I}=Fi({position:"bottom",open:a!==null}),P=W.useCallback(O=>MZ(O,o),[o]),M=W.useMemo(()=>IZ(o),[o]),V={headerCell:`${Vs["smp-headerCell"]}`,headerCellContainer:`${Vs["smp-headerCell-container"]}`,resizer:`${Vs["smp-resizer"]}`,datatableToolbar:`${Vs["smp-datatable-toolbar"]} ${Vs["smp-headerCell-"]}`,datatableFilter:`${Vs["smp-datatable-filter"]}`};return F.jsxs("thead",{children:[F.jsxs("tr",{className:V.datatableToolbar,children:[F.jsx("th",{children:F.jsxs("div",{ref:T,className:V.datatableFilter,children:[F.jsx(ye,{onClick:d,bindValue:`${M}`,label:i?"Nascondi filtri":"Mostra filtri",icon:"filter_list",variant:"base"}),(l||M>0)&&F.jsx(F.Fragment,{children:F.jsx(ye,{onClick:g,bindValue:"Reset",icon:"cancel",appearance:"ghost",variant:"base",label:"Rimuovi tutti i filtri"})})]})}),(r||n)&&F.jsx(zZ,{groups:r,onChange:m,onDrop:y,onDragOver:_})]}),i&&F.jsx(pi,{children:F.jsx(aE,{filters:o,fieldOptions:s,onChange:v,hasSubGroups:!0,ref:L,hasSubFilters:!1,onClose:d})}),F.jsxs("tr",{children:[u&&F.jsx("th",{className:V.headerCell,style:{minWidth:40,justifyContent:"center"},children:F.jsx(Y0,{bindValue:c,onChange:b})}),e&&e?.map(O=>O.visible&&F.jsx("th",{tabIndex:0,role:"columnheader",onClick:()=>S(O.name),onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),S(O.name))},onDragStart:()=>w(O.name),onDragOver:C,onDrop:()=>A(O.name),className:V.headerCell,style:{width:t[O.name],minWidth:t[O.name],maxWidth:t[O.name]},ref:$=>{k.current[O.name]=$,a===O.name&&$&&(typeof D=="function"?D($):D&&"current"in D&&(D.current=$))},children:F.jsxs("div",{draggable:!0,onDragStart:$=>{$.dataTransfer.setData("text/plain",O.name)},className:V.headerCellContainer,children:[F.jsx(hr,{variant:"title",bindValue:O.title}),F.jsxs("div",{children:[h===O.name?F.jsx(me,{icon:f==="asc"?"arrow-up":"arrow-down",isInteractable:!0}):F.jsx("span",{style:{minWidth:"0.875rem",minHeight:"0.875rem"}}),F.jsx("span",{className:`${P(O.name)?Vs["smp-headerCell-iconNotification"]:""}`,children:F.jsx(me,{icon:"filter_list",onClick:$=>{p(O.name),$.stopPropagation()},tabIndex:0,isInteractable:!0})})]}),a===O.name&&F.jsx(pi,{children:F.jsx(aE,{filters:o,fieldOptions:s.filter($=>$.obj?.k===a),onChange:v,hasSubGroups:!0,ref:I,hasSubFilters:!1,currentColumnName:a,hasButtonGroup:!1,onClose:()=>p(O.name)})}),F.jsx("div",{className:V.resizer,onMouseDown:$=>{x($,O.name)},role:"region"})]})},O.name))]})]})},WZ=({data:e,lineHeight:t=28,TableHeight:r=400,decimalSeparator:n=".",DftGroup:i,expandedGroups:a,columnSizingMode:o="fit-content",ShowGroup:s="Yes",Filter:l,MultiSelect:u="No",Columns:c,onRowClick:h,onMultiSelectionChange:f,onContextMenu:d,DftTotal:p})=>{const[v]=W.useState(hZ(p||"")),[g,m]=W.useState(()=>e?{columns:c?FZ(e,BZ(c)):e.columns,rows:e.rows??[]}:{columns:[],rows:[]}),[y,_]=W.useState(cZ(i)),[x,b]=W.useState(new Set(a??[])),[S,w]=W.useState(!1),[C,A]=W.useState(new Set),[k,T]=W.useState(null),L=W.useMemo(()=>xZ(e?.columns||[]),[e?.columns]),[D,I]=W.useState(()=>nE(l,L)),P=W.useRef(null),[M,V]=dZ({columns:g?.columns??[],rows:g?.rows??[],containerRef:P,sizingMode:o}),{handleDragStart:O,handleDragOver:$,handleDrop:z}=PZ(g.columns,Nt=>m(re=>({...re,columns:Nt}))),{sortBy:R,sortOrder:B,handleSort:G}=RZ({...g,rows:g.rows},n),j=W.useMemo(()=>{let Nt=e?.rows??[];D?.filters?.length>0&&(Nt=TZ(Nt,D));let re=Nt;R&&(re=Q5({...e??{columns:[],rows:[]},rows:Nt},R,B,n).rows);let Fe=re;if(y?.length&&re.length>0){const{flatRows:Rr}=fZ(re,y,t,x,v);Fe=Rr}return Fe},[e,D,R,y,B,n,t,x,v]),{virtualItems:H,containerProps:tt,innerProps:K}=E5({items:j,itemHeight:t,containerHeight:He(r),overscan:5}),et=W.useMemo(()=>{const Nt=j.map((re,Fe)=>Fe);return Nt.every(re=>C.has(re))&&Nt.length>0},[C,j]);W.useEffect(()=>{if(Pe(u)&&f){const Nt=Array.from(C).map(re=>j[re]).filter(Boolean);f(Nt)}},[C,u,j,f]);const it=W.useCallback(Nt=>{I(Nt)},[]),U=W.useCallback(()=>{I(nE(l,L))},[l,L]),Q=W.useCallback(()=>{w(Nt=>!Nt)},[]),X=W.useCallback(Nt=>{T(re=>re===Nt?null:Nt)},[]),nt=Nt=>{_(uZ(Nt,y))},st=Nt=>{Nt.preventDefault();const re=Nt.dataTransfer.getData("text/plain");if(!re||y.some(ve=>ve.column===re))return;const Rr=[...y,{column:re,visible:!0}];_(Rr)},mt=Nt=>{Nt.preventDefault()},Bt=(Nt,re)=>{const Fe=Nt.clientX,Rr=M[re],ve=dv=>{const pv=dv.clientX-Fe,vv=Math.max(50,Rr+pv);V(ef=>({...ef,[re]:vv}))},Si=()=>{window.removeEventListener("mousemove",ve),window.removeEventListener("mouseup",Si)};window.addEventListener("mousemove",ve),window.addEventListener("mouseup",Si)},ue=Nt=>{A(re=>{const Fe=new Set(re);return Nt.every(ve=>Fe.has(ve))?Nt.forEach(ve=>Fe.delete(ve)):Nt.forEach(ve=>Fe.add(ve)),Fe})},Ve=()=>{const Nt=g.rows.map((re,Fe)=>Fe);ue(Nt)};function He(Nt){if(typeof Nt=="number")return Nt;const re=document.createElement("div");re.style.position="absolute",re.style.visibility="hidden",re.style.height=Nt,re.style.padding="0",re.style.margin="0",re.style.border="none",document.body.appendChild(re);const Fe=parseFloat(getComputedStyle(re).height);return re.remove(),Fe}const bn={smpTable:`${sZ["smp-table"]}`};return g&&F.jsx("div",{className:bn.smpTable,...tt,ref:P,children:F.jsxs("table",{children:[F.jsx(GZ,{columns:g.columns,columnWidths:M,groups:y,showGroupBar:Pe(s),showFilter:S,filterColumn:k,activeFilters:D,fieldOptions:L,Filter:l,enableSelection:Pe(u),allVisibleRowsSelected:et,sortBy:R,sortOrder:B,onToggleFilter:Q,onToggleColumnFilter:X,onFiltersChange:it,onResetFilters:U,onGroupChange:nt,onGroupDrop:st,onGroupDragOver:mt,onMouseDown:Bt,onToggleAllRows:Ve,onSort:G,onDragStart:O,onDragOver:$,onDrop:z}),F.jsx("tbody",{...K,children:H.map(({item:Nt,index:re,offsetTop:Fe})=>Nt.isGroup?F.jsx(OZ,{label:Nt.value||"",rowHeight:t,offsetTop:Fe,level:Nt.level,cells:Nt.cells,columns:g.columns,columnWidths:M,onClick:()=>{const Rr=Nt.id;Rr&&b(ve=>lZ(ve,Rr))},isExpanded:Nt.isExpanded},re):F.jsx(A2,{row:Nt,columns:g.columns,columnWidths:M,rowHeight:t,offsetTop:Fe,decimalSeparator:n,isGroup:!1,enableSelection:Pe(u),isSelected:C.has(re),onToggleSelect:()=>{ue([re])},onRowClick:h,onContextMenu:d},re))}),F.jsx(NZ,{columns:g.columns,columnWidths:M,totals:v,rows:j,hasGroups:!!y?.length})]})})},HZ="_slideOut_cxsow_1",hf={"smp-overlay-panel":"_smp-overlay-panel_cxsow_2","smp-overlay-panel-left":"_smp-overlay-panel-left_cxsow_22","smp-overlay-panel-closing":"_smp-overlay-panel-closing_cxsow_31","smp-overlay-panel-right":"_smp-overlay-panel-right_cxsow_37","smp-overlay-panel-top":"_smp-overlay-panel-top_cxsow_52","smp-overlay-panel-bottom":"_smp-overlay-panel-bottom_cxsow_64","smp-overlay-panel-center":"_smp-overlay-panel-center_cxsow_92",slideOut:HZ,"smp-overlay-panel-backdrop":"_smp-overlay-panel-backdrop_cxsow_132","smp-backdrop-closing":"_smp-backdrop-closing_cxsow_142"},jZ=(e,t={})=>{const{exitDuration:r=300}=t,[n,i]=W.useState(e),[a,o]=W.useState(!1);return W.useEffect(()=>{if(e)i(!0),o(!1);else if(n){o(!0);const s=setTimeout(()=>{i(!1),o(!1)},r);return()=>clearTimeout(s)}},[e,n,r]),{shouldRender:n,isExiting:a,isVisible:n&&!a}},e$=({open:e,position:t="center",width:r,isModal:n=!0,closeOnClickOutside:i=!1,onClose:a,children:o,className:s})=>{const l=W.useRef(null),u=W.useRef(null),{shouldRender:c,isExiting:h,isVisible:f}=jZ(e,{exitDuration:300});mu([l],e&&i&&!n,()=>{a&&a()});const d=`
49
+ ${B?wi["smp-datepickercalendar-td-disabled"]:""}`},O=()=>`${y[c]} ${f.toString()}`;return F.jsxs("div",{className:V.wrapper,ref:i,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[F.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[F.jsx(ye,{onClick:S,ariaLabel:a(YS.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),F.jsx("div",{"aria-label":O(),className:V.label,children:O()}),F.jsx(ye,{onClick:w,ariaLabel:a(YS.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),F.jsxs("table",{ref:g,role:"grid","aria-label":`${a(ya.CALENDAR_FOR)} ${y[c]} ${f}`,className:V.table,children:[F.jsx("thead",{children:F.jsx("tr",{children:_.map($=>F.jsx("th",{scope:"col",abbr:$.full,className:V.th,children:$.value},$.value))})}),F.jsx("tbody",{children:P.map(($,z)=>F.jsx("tr",{children:$.map((R,B)=>{const G=z*7+B;if(R===null)return F.jsx("td",{className:V.td(!1,!1,!1,!0)},`empty-${B}`);const j=R.getDate()===s.getDate()&&R.getMonth()===s.getMonth()&&R.getFullYear()===s.getFullYear(),H=l&&R.getDate()===l.getDate()&&R.getMonth()===l.getMonth()&&R.getFullYear()===l.getFullYear(),tt=p===R.getDate(),K=x(R);return F.jsx("td",{role:"gridcell","aria-selected":H,tabIndex:tt?0:-1,onClick:()=>b(R),onKeyDown:et=>T(et,G),"aria-label":`${R.getDate()} ${y[R.getMonth()]} ${R.getFullYear()}`,"data-selected":H,"aria-disabled":K,ref:et=>{m.current[G]=et},className:V.td(j,H,tt,K),children:R.getDate()},`day-${B}`)})},`week-${z}`))})]})]})}const IX={"smp-text-wrapper":"_smp-text-wrapper_1hhsc_1"},Xd=({bindValue:e,optionalDisplayValue:t,label:r,className:n,obj:i,style:a,justifiedContent:o,...s})=>{const l={wrapper:`${IX["smp-text-wrapper"]}`},u=()=>F.jsx(hr,{...s,variant:MY(i)?"link":"body",bindValue:t||e,className:n,style:a,justifiedContent:o});return r?F.jsxs("div",{className:l.wrapper,children:[F.jsx($i,{label:r,helper:s.helper}),u()]}):u()},w2=({bindValue:e,placeholder:t,onChange:r,onConfirmedChange:n,onBlur:i,disabledDateRanges:a,isEditable:o=!0,isVisualOnly:s,...l})=>{const u=W.useRef(null),[c,h]=W.useState(!1),[f,d]=W.useState(e||""),[p,v]=W.useState(""),{anchorRef:g,targetRef:m}=Fi({position:"bottom",open:c}),y=W.useCallback(()=>{h(!1),u?.current?.focus()},[]);mu([m,g],c,()=>{y()}),S2(c,m);const{format:_,getCurrentLanguage:x}=xi(),b=W.useCallback(L=>{const D=L.length>5&&PY(L,x())||L,I=_(D,void 0,void 0,{type:"date"}),P=typeof D!="string",M=P&&D.toISOString().substring(0,10)||"";return{isValid:P,formattedDate:I,isoDate:M,normalizedDate:D}},[x,_]);W.useEffect(()=>{const{formattedDate:L,isoDate:D,isValid:I}=b(e);d(I&&D||e),v(I&&L||e)},[e,_,b]);const S=()=>h(L=>!L),w=()=>{const L=A(p,!1);i?.(L)},C=L=>{A(L,!0),y()},A=(L,D)=>{const{isoDate:I,isValid:P}=b(L),V={bindValue:P&&I||L};return r?.(V),D&&n?.(V),V},k=L=>{v(L)},T=L=>{L.key==="Enter"&&(L.preventDefault(),A(p,!0))};return F.jsx("div",{"data-component":"date-picker",children:s?F.jsx(Xd,{bindValue:p}):F.jsxs(F.Fragment,{children:[F.jsx(_i,{...l,bindValue:p,placeholder:t,onBlur:w,onChange:L=>k(L.bindValue),onKeyDown:T,shapeIcon:"calendar",onShapeIconClick:S,ref:g,inputRef:u,isEditable:o,size:10,maxLength:l.maxLength?l.maxLength:10}),c&&F.jsx(pi,{children:F.jsx(MX,{disabledDateRanges:a,onDateChange:C,initialValue:kc(f)&&f||"",targetRef:m})})]})})},Ar={"smp-file-upload":"_smp-file-upload_1cqy6_1","smp-file-upload-disabled":"_smp-file-upload-disabled_1cqy6_13","smp-file-upload-dropzone":"_smp-file-upload-dropzone_1cqy6_18","smp-file-upload-dropzone__dragover":"_smp-file-upload-dropzone__dragover_1cqy6_28","smp-file-upload-actions":"_smp-file-upload-actions_1cqy6_33","smp-file-upload-list":"_smp-file-upload-list_1cqy6_38","smp-file-upload-item-wrapper":"_smp-file-upload-item-wrapper_1cqy6_46","smp-file-upload-item":"_smp-file-upload-item_1cqy6_46","smp-file-upload-item-meta":"_smp-file-upload-item-meta_1cqy6_61","smp-file-upload-item-name":"_smp-file-upload-item-name_1cqy6_67","smp-file-upload-item-size":"_smp-file-upload-item-size_1cqy6_71","smp-file-upload-item-thumbnail":"_smp-file-upload-item-thumbnail_1cqy6_76","smp-file-upload-item-progress":"_smp-file-upload-item-progress_1cqy6_84","smp-file-upload-item-status-error":"_smp-file-upload-item-status-error_1cqy6_98","smp-file-upload-validation":"_smp-file-upload-validation_1cqy6_102","smp-file-upload-success":"_smp-file-upload-success_1cqy6_108","smp-file-upload-item-path":"_smp-file-upload-item-path_1cqy6_114","smp-file-upload-item-message":"_smp-file-upload-item-message_1cqy6_120","smp-file-upload-dropzone-big":"_smp-file-upload-dropzone-big_1cqy6_126","smp-file-upload-dropzone-small":"_smp-file-upload-dropzone-small_1cqy6_130"},tE=()=>Math.random().toString(36).slice(2,9),W5=({initialFiles:e=[],FupAty:t,FupMul:r=!0,maxFiles:n,FupSzl:i,FupDir:a,disabled:o=!1,onChange:s,onUploadRequest:l,FupAut:u=!1,className:c,FupCho:h,FupMsg:f,FupDrg:d})=>{const{translate:p}=xi(),v=typeof i=="string"?parseInt(i,10)||void 0:i,g=r==="1"||r==="true"||r===!0,m=u==="1"||u==="true"||u===!0,y=W.useRef(null),[_,x]=W.useState(()=>e.map(H=>({id:tE(),file:H,status:"idle"}))),[b,S]=W.useState(!1),[w,C]=W.useState(null),[A,k]=W.useState(!1),[T,L]=W.useState(!1),D=(...H)=>H.filter(Boolean).join(" "),I=W.useCallback(H=>v&&H.size>v?`${p(Ci.FILE_TOO_LARGE)} (${(H.size/1024).toFixed(0)} KB)`:null,[v,p]),P=W.useMemo(()=>{if(t)return t.includes("|")&&!t.includes("/")?t.split("|").map(H=>H.trim()).filter(Boolean).map(H=>H.startsWith(".")?H:`.${H}`).join(","):t},[t]),M=W.useCallback(async()=>{if(!l||A)return;const H=_.filter(tt=>tt.status==="idle"||tt.status==="error");if(H.length!==0){k(!0),x(tt=>tt.map(K=>H.some(et=>et.id===K.id)?{...K,status:"uploading"}:K));try{const tt=await l({files:H.map(K=>K.file),uploadFolder:a});x(K=>{const et=K.map(U=>{const Q=H.findIndex(X=>X.id===U.id);if(Q>=0&&tt.files[Q]){const X=tt.files[Q];return X.success?{...U,status:"done",uploadFolder:X.uploadFolder,uploadMessage:f||"Upload successful"}:{...U,status:"error",error:"Upload failed"}}return U}),it=et.filter(U=>U.status==="done").map(U=>({fileInstance:U.file,uploadFolder:U.uploadFolder||""}));if(it.length>0){const U=it.map(X=>({bindValue:X.uploadFolder,optionalDisplayValue:X.fileInstance.name})),Q=U.length===1?U[0]:U;s?.(Q)}return et})}catch(tt){x(K=>K.map(et=>et.status==="uploading"?{...et,status:"error",error:String(tt)}:et))}finally{k(!1)}}},[l,A,_,a,f,s]);W.useEffect(()=>{T&&m&&l&&!A&&(_.filter(tt=>tt.status==="idle"||tt.status==="error").length>0&&M(),L(!1))},[T,m,l,A,_,M]);const V=W.useCallback(H=>{const tt=Array.from(H),K=[];for(const et of tt){const it=I(et);if(it){C(it);continue}const U={id:tE(),file:et,status:"idle"};if(et.type.startsWith("image/"))try{U.preview=URL.createObjectURL(et)}catch{}K.push(U)}K.length!==0&&(x(et=>{const it=et.concat(K);return typeof n=="number"?it.slice(0,n):it}),m&&l&&L(!0))},[n,I,m,l]),O=H=>{const tt=H.target.files;if(tt){V(tt);try{y.current&&(y.current.value="")}catch{}}},$=H=>{H.preventDefault(),S(!1),!o&&H.dataTransfer.files&&H.dataTransfer.files.length&&V(H.dataTransfer.files)},z=H=>{const tt=_.find(K=>K.id===H);if(tt){if(tt.preview)try{URL.revokeObjectURL(tt.preview)}catch{}x(K=>K.filter(et=>et.id!==H))}},R=()=>{o||y.current?.click()},B=()=>{M()},G=()=>{k(!1),x(H=>H.map(tt=>tt.status==="uploading"?{...tt,status:"idle"}:tt))},j=H=>{x(tt=>tt.map(K=>K.id===H?{...K,status:"idle",error:null}:K))};return F.jsxs("div",{className:D(Ar["smp-file-upload"],c||void 0,o?Ar["smp-file-upload-disabled"]:void 0),onDragOver:H=>{H.preventDefault(),!o&&S(!0)},onDragLeave:()=>S(!1),onDrop:$,"data-component":"file-upload",children:[F.jsx("div",{className:D(Ar["smp-file-upload-dropzone"],b?Ar["smp-file-upload-dropzone__dragover"]:void 0,d?Ar[`smp-file-upload-dropzone-${d?.toLowerCase()}`]:void 0),onClick:R,role:"button",tabIndex:0,onKeyDown:H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),R())},children:F.jsx("div",{children:p(Ci.DROP_AREA_LABEL)})}),F.jsxs("div",{className:Ar["smp-file-upload-actions"],children:[F.jsx(ye,{ariaLabel:p(Ci.SELECT_FILES),bindValue:"",onClick:R,disabled:o,optionalDisplayValue:h??p(Ci.SELECT_FILES)}),!m&&F.jsxs(F.Fragment,{children:[F.jsx(ye,{ariaLabel:p(Ci.UPLOAD),bindValue:"",onClick:B,disabled:o||!_.length||A,optionalDisplayValue:p(Ci.UPLOAD)}),F.jsx(ye,{ariaLabel:p(Ci.CANCEL),bindValue:"",onClick:G,disabled:o||!A,optionalDisplayValue:p(Ci.CANCEL)})]})]}),F.jsx("input",{ref:y,type:"file",style:{display:"none"},onChange:O,accept:P,multiple:g,"aria-hidden":!0}),w&&F.jsx("div",{className:Ar["smp-file-upload-validation"],children:w}),F.jsx("div",{className:Ar["smp-file-upload-list"],children:_.map(H=>F.jsxs("div",{className:Ar["smp-file-upload-item"],children:[F.jsxs("div",{className:Ar["smp-file-upload-item-wrapper"],children:[H.preview&&F.jsx("img",{className:Ar["smp-file-upload-item-thumbnail"],src:H.preview,alt:"preview"}),F.jsxs("div",{className:Ar["smp-file-upload-item-meta"],children:[F.jsx("span",{className:Ar["smp-file-upload-item-name"],children:H.file.name}),F.jsxs("span",{className:Ar["smp-file-upload-item-size"],children:[(H.file.size/1024).toFixed(1)," KB"]}),H.status==="done"&&H.uploadFolder&&F.jsx("div",{className:Ar["smp-file-upload-item-path"],children:H.uploadFolder}),H.status==="done"&&H.uploadMessage&&F.jsx("div",{className:Ar["smp-file-upload-item-message"],children:H.uploadMessage}),H.status==="uploading"&&F.jsx("div",{className:Ar["smp-file-upload-item-progress"],children:"Uploading..."}),H.status==="error"&&F.jsx("div",{className:Ar["smp-file-upload-item-status-error"],children:H.error})]})]}),F.jsx("div",{children:H.status==="uploading"?F.jsx(ye,{bindValue:"",onClick:G,optionalDisplayValue:p(Ci.CANCEL)}):F.jsxs(F.Fragment,{children:[F.jsx(ye,{bindValue:"",icon:"close",onClick:()=>z(H.id),ariaLabel:`Remove ${H.file.name}`,appearance:"ghost"}),H.status==="error"&&F.jsx(ye,{bindValue:"",onClick:()=>j(H.id),optionalDisplayValue:p(Ci.RETRY)})]})})]},H.id))})]})},H5=({min:e,max:t,step:r=1,inputMode:n="decimal",dSep:i,bindValue:a,onChange:o,onEnter:s,onBlur:l,isVisualOnly:u,decimals:c=2,...h})=>{const{getCurrentLanguage:f}=xi(),d=W.useRef(null),p=f(),{groupingChar:v,decimalChar:g}=W.useMemo(()=>SX(p,i),[p,i]),m=W.useCallback(T=>new Intl.NumberFormat(p,{minimumFractionDigits:c,maximumFractionDigits:c,useGrouping:!0}).format(T),[p,c]),y=W.useCallback(CX,[v,g]),_=W.useCallback(bX,[e,t]),[x,b]=W.useState(a?m(a):""),S=W.useRef(a??null);W.useEffect(()=>{a?(b(m(a)),S.current=a):(b(""),S.current=null)},[a,m]);const w=W.useCallback((T,L=!1)=>{if(T.trim()===""){b(""),S.current=null,o?.(void 0,""),L?s?.(void 0):l?.(void 0);return}const D=y(T,v,g);if(isNaN(D))b(S.current?m(S.current):"");else{const I=_(D,e,t),P=m(I);b(P),S.current=I,o?.(I,P),L?s?.(I):l?.(I)}},[y,v,g,o,s,l,m,_,e,t]),C=T=>b(T),A=()=>w(x),k=T=>{if(T.key==="Enter"){T.preventDefault(),w(x,!0);return}if(T.key==="ArrowUp"||T.key==="ArrowDown"){T.preventDefault();const L=T.key==="ArrowUp"?1:-1,D=S.current??0,I=_(D+L*r,e,t);w(m(I))}};return F.jsx("div",{ref:d,"data-component":"input-number",children:u?F.jsx(Xd,{...h,bindValue:x,justifiedContent:"right",className:`smp-text-number ${S.current!=null&&S.current<0?" smp-text-negative":""}`}):F.jsx(_i,{...h,"aria-valuemin":e,"aria-valuemax":t,"aria-valuenow":S.current??void 0,bindValue:x,inputType:"text",inputMode:n,min:e,max:t,step:r,onChange:T=>C(T.bindValue),onBlur:A,onKeyDown:k})})},PX={"smp-multipleField-container":"_smp-multipleField-container_jxqxn_1"},eE={"smp-chips-container":"_smp-chips-container_fz2nd_1","smp-chips-element":"_smp-chips-element_fz2nd_7"},X0=({elements:e,isEditable:t=!1,displayMode:r="Both",onChange:n,color:i,backgroundColor:a,isDraggable:o=!1})=>{const[s,l]=W.useState(null),u={container:`${eE["smp-chips-container"]}`,element:`${eE["smp-chips-element"]}`},c=d=>{n?.(e.filter((p,v)=>v!==d))},h=d=>{l(d)},f=d=>{if(s===null||s===d)return;const p=[...e],[v]=p.splice(s,1);p.splice(d,0,v),n?.(p),l(null)};return F.jsx("div",{className:u.container,role:"list","data-component":"chip",children:e.flatMap((d,p)=>{const v=zp(d.bindValue,d.optionalDisplayValue,r),g=F.jsxs("div",{className:u.element,role:"listitem",draggable:o,onDragStart:()=>h(p),onDragOver:y=>o&&y.preventDefault(),onDrop:()=>o&&f(p),style:{"--smp-chips-backgroundColor-base":a},children:[o&&F.jsx(me,{icon:"drag_indicator_horizontal",isInteractable:!0}),F.jsx(hr,{variant:"label",bindValue:v,color:i}),t&&F.jsx(me,{icon:"close",isInteractable:!0,onClick:()=>c(p),color:i})]},`chip-${p}`),m=o&&p<e.length-1?F.jsx(me,{icon:"chevron-right",color:i},`separator-${p}`):null;return[g,m].filter(Boolean)})})},C2=({label:e,elements:t,displayMode:r="CodeOnly",helper:n,dataComponent:i,disabled:a,isEditable:o,onChange:s,renderField:l})=>{const u=h=>{const f=[...t];if(h.bindValue=="")f.pop();else{const d=f.findIndex(p=>p.bindValue===h.bindValue);d>=0?f.splice(d,1):f.push({bindValue:h.bindValue,optionalDisplayValue:h.optionalDisplayValue})}s?.(f)},c={container:PX["smp-multipleField-container"]};return F.jsxs("div",{className:c.container,"data-component":i,children:[e&&F.jsx($i,{label:e,disabled:a,helper:n}),F.jsx(X0,{elements:t,displayMode:r,isEditable:o,onChange:h=>{s?.(h)}}),l({addElement:u})]})},j5=({elements:e,displayMode:t="Both",listDisplayMode:r="Both",label:n,disabled:i,isEditable:a=!0,fun:o,error:s,helper:l,_disableAutocomplete:u=!1,onOptionsRequest:c,onChange:h,onConfirmedChange:f,onBlur:d,...p})=>{const v=e.map(g=>g.bindValue);return F.jsx(C2,{label:n,elements:e,displayMode:t,disabled:i,error:s,helper:l,isEditable:a,dataComponent:u?"multiple-combobox":"multiple-autocomplete",onChange:g=>{h?.(g),f?.(g)},renderField:({addElement:g})=>F.jsx(q0,{...p,bindValue:"",fun:o,isEditable:a,_changeOnEnter:!0,listDisplayMode:r,onOptionsRequest:c,_multiActiveIndex:v,_disableAutocomplete:u,error:s,onEnter:g,onBlur:()=>d?.(e),onConfirmedChange:g})})},U5=({...e})=>{const[t,r]=W.useState(!1),n=t?"visibility-off":"visibility";return F.jsx(_i,{...e,inputType:t?"text":"password",shapeIcon:n,onShapeIconClick:()=>r(!t),ariaLabel:"password","data-component":"password"})};var ZS=(e=>(e.PAGE_DIRECTION="pageDirection",e.LINE_DIRECTION="lineDirection",e))(ZS||{});const Gu={"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"},RX=({disabled:e=!1,displayMode:t="DescOnly",RadLay:r=ZS.PAGE_DIRECTION,RadCol:n,options:i,onOptionsRequest:a,onConfirmedChange:o,fun:s,label:l,...u})=>{const[c,h]=W.useState(i),f=W.useId();W.useEffect(()=>{!c&&a&&s&&a(s,void 0).then(b=>h(Ta(b))).catch(b=>{console.error("Error during loading options (radio)",b)})},[c,a,s]);const d=parseInt(n??"",10),p=r===ZS.LINE_DIRECTION,v=p&&!isNaN(d),g=v?Gu["smp-radio-horizontal-grid"]:p?Gu["smp-radio-horizontal"]:"",m=v?{gridTemplateColumns:`repeat(${d}, 1fr)`}:void 0,y={container:Gu["smp-radio"],optionsContainer:`${Gu["smp-radio-options-container"]} ${g}`,option:`${Gu["smp-radio-element"]} ${e?Gu["smp-radio-disabled"]:""}`},_=b=>{e||(u.onChange?.(vo(b)),o?.(vo(b)))},x=W.useId();return F.jsxs("div",{"smp-id":"radio-container","data-component":"radio",className:y.container,id:f,children:[l&&F.jsx($i,{label:l,disabled:e,htmlFor:f,helper:u.helper}),F.jsx("div",{className:y.optionsContainer,style:m,children:c?.map((b,S)=>F.jsxs("label",{className:y.option,children:[F.jsx("input",{type:"radio",name:x,value:b.obj?.k,disabled:e,checked:b.obj?.k===u.bindValue,onChange:()=>_(b)}),F.jsx(hr,{variant:"body",bindValue:zp(b.obj?.k,b.decode,t)})]},S))})]})},q5=({onChange:e,onEnter:t,...r})=>{const[n,i]=W.useState(r.bindValue),{translate:a}=xi(),o=l=>{t?.({bindValue:l.bindValue})},s=l=>{i(l.bindValue),e?.(l)};return W.useEffect(()=>{i(r.bindValue)},[r.bindValue]),F.jsx(_i,{...r,placeholder:r.placeholder?r.placeholder:a(ya.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:n,onChange:s,onEnter:o,ariaLabel:"search bar",autocomplete:"off",_dataComponent:"search-bar"})},$s={"smp-textarea-wrapper":"_smp-textarea-wrapper_1kzoq_4","smp-textarea":"_smp-textarea_1kzoq_4","smp-textarea-input":"_smp-textarea-input_1kzoq_32","smp-textarea-outlined":"_smp-textarea-outlined_1kzoq_55","smp-textarea-danger":"_smp-textarea-danger_1kzoq_66","smp-textarea-readOnly":"_smp-textarea-readOnly_1kzoq_70","smp-textarea-variant-notSelectable":"_smp-textarea-variant-notSelectable_1kzoq_75","smp-textarea-disabled":"_smp-textarea-disabled_1kzoq_85","smp-textarea-FullWidth":"_smp-textarea-FullWidth_1kzoq_94"},T2=({disabled:e,bindValue:t,onChange:r,placeholder:n,state:i,appearance:a,isEditable:o=!0,inputRef:s,label:l,ariaLabel:u,helperText:c,style:h,error:f,onBlur:d,onKeyDown:p,onEnter:v,rows:g=10,cols:m=35,...y})=>{const _=W.useId(),x=`${_}-helper`,b=f?"danger":i,S=c||!!f,w=k=>{r?.({bindValue:k.target.value})},C=k=>{k.key=="Enter"&&k.ctrlKey&&v?.({bindValue:t}),p?.(k)},A={wrapper:`${$s["smp-textarea-wrapper"]}`,container:`${$s["smp-textarea"]} ${e?$s["smp-textarea-disabled"]:""} ${n?$s["smp-textarea-placeholder"]:""} ${b?$s[`smp-textarea-${b}`]:""} ${a?$s[`smp-textarea-${a}`]:""} ${o?"":$s["smp-textarea-readOnly"]}`};return F.jsxs("div",{className:A.wrapper,"data-component":"textarea",children:[l&&F.jsx($i,{htmlFor:_,label:l,disabled:e,helper:y.helper}),F.jsx("textarea",{id:_,value:t,placeholder:n,onChange:w,onBlur:()=>d?.({bindValue:t}),className:A.container,disabled:e,readOnly:!o,onKeyDown:C,style:h,"aria-label":l?void 0:u,"aria-labelledby":l?_:void 0,"aria-describedby":S?x:void 0,rows:g,cols:m,ref:s}),S&&F.jsx(H0,{id:x,helperText:f,disabled:e,state:b})]})},NX=({value:e,onChange:t,targetRef:r,isOpen:n})=>{const i=W.useRef(null);W.useEffect(()=>{n&&i?.current&&i.current.focus()},[n,i]);const[a,o,s]=e,l=u=>Array.from({length:u},(c,h)=>F.jsx("option",{value:h,children:h.toString().padStart(2,"0")},h));return F.jsxs("div",{className:"smp-timepicker-widget",ref:r,children:[F.jsx("select",{value:a,ref:i,onChange:u=>t(+u.target.value,o,s),id:"time-picker-hours",children:l(24)}),":",F.jsx("select",{value:o,onChange:u=>t(a,+u.target.value,s),id:"time-picker-minutes",children:l(60)}),":",F.jsx("select",{value:s||0,onChange:u=>t(a,o,+u.target.value),id:"time-picker-seconds",children:l(60)})]})},rE=e=>{const t=e.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!t)return!1;const[,r,n,i]=t,a=parseInt(r,10),o=parseInt(n,10),s=i?parseInt(i,10):0;return a>=0&&a<=23&&o>=0&&o<=59&&(i===void 0||s>=0&&s<=59)},OX=e=>{const t=e.split(":").map(r=>parseInt(r,10));return[t[0]||0,t[1]||0,t[2]||0]},BX=(e,t,r)=>{const n=e!=null&&!isNaN(e)?e.toString().padStart(2,"0"):"",i=t!=null&&!isNaN(t)?t.toString().padStart(2,"0"):"",a=r!=null&&!isNaN(r)?r.toString().padStart(2,"0"):"";return n&&i?`${n}:${i}:${a}`:i?`${i}:${a}`:a},FX=({bindValue:e,placeholder:t="HH:MM:SS",isVisualOnly:r,onChange:n,onConfirmedChange:i,onBlur:a,isEditable:o=!0,...s})=>{const l=W.useRef(null),[u,c]=W.useState(!1),[h,f]=W.useState(e||""),[d,p]=W.useState(""),{anchorRef:v,targetRef:g}=Fi({position:"bottom",open:u}),m=W.useCallback(()=>{c(!1),l?.current?.focus()},[]);mu([g,v],u,()=>c(!1)),S2(u,g),W.useEffect(()=>{const C=e||"",A=rE(C)?C:e||"";f(C),p(A)},[e]),W.useEffect(()=>{const C=A=>{A.key==="Escape"&&c(!1)};return u&&document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[u]);const y=()=>{o&&c(C=>!C)},_=C=>{p(C)},x=(C,A,k)=>{const T=BX(C,A,k);f(T),p(T),n?.({bindValue:T}),m()},b=()=>{const C=w(d,!1);C&&a?.(C)},S=C=>{C.key==="Enter"&&(C.preventDefault(),w(d,!0))},w=(C,A)=>{if(C.trim()===""){f(""),p("");const T={bindValue:""};return n?.(T),A&&i?.(T),T}if(rE(C)){f(C),p(C);const T={bindValue:C};return n?.(T),A&&i?.(T),T}else p(C)};return F.jsxs("div",{"data-component":"time-picker",children:[r?F.jsx(Xd,{bindValue:d}):F.jsx(_i,{...s,bindValue:d,placeholder:t,onChange:C=>_(C.bindValue),onBlur:b,onKeyDown:S,shapeIcon:"clock",onShapeIconClick:y,isEditable:o,ref:v,inputRef:l}),u&&F.jsx(pi,{children:F.jsx(NX,{value:OX(h),onChange:x,targetRef:g,isOpen:u})})]})};function _c(e){return!!e&&"children"in e}function Mv(e){return!_c(e)}const Ji={"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"},A2=({row:e,columns:t,columnWidths:r={},level:n=0,rowHeight:i=26,offsetTop:a,enableSelection:o,isSelected:s=!1,decimalSeparator:l=".",onToggleSelect:u,onRowClick:c,onNodeClick:h,onContextMenu:f})=>{const[d,p]=W.useState(_c(e)),v=_c(e)&&!!e.children?.length,g=e.cells&&Object.keys(e.cells).length>0,m=v,y=n*16,_=()=>{v&&p(!d)},x={content:`${Ji["smp-row"]} ${Mv(e)?Ji["smp-row-data"]:""} ${_c(e)?Ji["smp-row-clickable"]:""} ${s?Ji["smp-row-selected"]:""}`,toggle:`${Ji["smp-row-toggle"]} ${Ji["smp-row-icon"]}`,indent:`${Ji["smp-row-indent"]}`,cell:`${Ji["smp-row-wrapperCell"]}`,leftSection:`${Ji["smp-row-leftSection"]}`,nodeLabel:Ji["smp-row-node-label"]},b=L=>{let D=L.shape;return L.shape==="ACP"||L.shape==="CMB"||L.shape==="ITX"?D="LBL":L.shape==="AML"&&(D="CHI"),F.jsx(fi,{...L,shape:D,onContextMenu:f,dSep:l,data:{...L.data,isVisualOnly:!0}})},S=()=>F.jsx("span",{className:x.toggle,children:m&&F.jsx(me,{icon:d?"arrow_drop_right":"arrow_drop_down",width:16})}),w=(L,D)=>F.jsx("span",{className:x.toggle,children:F.jsx(me,{icon:L,placeholderIcon:D,width:16})}),C=()=>F.jsx("span",{className:x.indent,style:{width:`${y}px`},"aria-hidden":"true"}),A=()=>{if(u)return F.jsx(Y0,{bindValue:s,onChange:()=>{u()}})},k=()=>{const L=Mv(e)?"":e.decode||(g?"":"Untitled"),D=a??i*n,I={height:`${i}px`,lineHeight:`calc(${i}px - 2*2px)`,...Mv(e)&&{transform:`translateY(${D}px)`}};return F.jsxs("tr",{className:x.content,onClick:_,role:_c(e)?"button":"row","aria-expanded":v?!d:void 0,style:I,children:[o&&F.jsx("td",{className:x.cell,style:{height:`${i}px`,minWidth:40,justifyContent:"center"},children:A()}),_c(e)&&F.jsxs("td",{className:x.leftSection,style:{height:`${i}px`},onClick:P=>h?.(P,e),children:[C(),S(),e.icon&&w(e.icon,e.placeholderIcon),F.jsx("span",{className:x.nodeLabel,children:F.jsx(hr,{variant:"body",bindValue:L})})]}),t&&t.length>0?t.filter(P=>P.visible!==!1).map((P,M)=>{const V=e.cells?.[P.name];return V?F.jsx("td",{className:x.cell,onClick:()=>{c?.(e,P.name)},style:{width:r[P.name],minWidth:r[P.name],height:`${i}px`},children:b({...V,id:P.name})},P.name+M):null}):e.cells&&Object.entries(e.cells).map(([P,M])=>{const V=e.cells?.[P];return V?F.jsx("td",{className:x.cell,style:{height:`${i}px`},children:b({...V,id:P})},P+M):null})]})},T=()=>d||!v||Mv(e)?null:F.jsx(F.Fragment,{children:e.children?.map((L,D)=>F.jsx(A2,{row:L,level:n+1,columns:t,columnWidths:r,onNodeClick:h,onContextMenu:f},`child-${D}`))});return F.jsxs(F.Fragment,{children:[k(),T()]})},$X={"smp-tree":"_smp-tree_19u9h_1"},VX=({fun:e,onOptionsRequest:t,onClick:r})=>{const[n,i]=W.useState(void 0);W.useEffect(()=>{!n&&t&&e&&t(e,void 0).then(o=>i(Ta(o))).catch(o=>{console.error("Errore nel caricamento delle opzioni per il Tree",o)})},[n,e,t]);const a={table:$X["smp-tree"]};return n&&n.length&&F.jsx("table",{className:a.table,"data-component":"tree",children:F.jsx("tbody",{children:n.map((o,s)=>F.jsx(A2,{row:o,onNodeClick:(l,u)=>r?.(l,u)},s))})})},zX={"smp-cell-wrapper":"_smp-cell-wrapper_mdlkz_1"},GX=({elements:e,displayMode:t,label:r,disabled:n,error:i,isEditable:a=!0,onChange:o,onConfirmedChange:s,onBlur:l,...u})=>{const{translate:c}=xi(),[h,f]=W.useState("");return F.jsx(C2,{dataComponent:"chips",label:r,elements:e,displayMode:t,disabled:n,error:i,isEditable:a,helper:u.helper,onChange:d=>{o?.(d),s?.(d)},renderField:({addElement:d})=>F.jsx(_i,{bindValue:h,placeholder:c(ya.CHIPS_INPUT_DEFAULT_PLACEHOLDER),onChange:p=>f(p.bindValue),onEnter:p=>{d(p),f("")},onBlur:()=>l?.(e),isEditable:a,error:i})})},Zd=({bindValue:e,onChange:t,options:r=[],optionalDisplayValue:n,isEditable:i,listDisplayMode:a="Both",autoSelectOptionIndex:o,fun:s,onOptionsRequest:l,onConfirmedChange:u,_multiActiveIndex:c,displayMode:h,...f})=>{const d=W.useRef(null),[p,v]=W.useState(!1),[g,m]=W.useState(r),[y,_]=W.useState(-1),[x,b]=W.useState([e]),S=W.useId(),{anchorRef:w,targetRef:C,anchorWidth:A}=Fi({position:"bottom",open:p}),k=W.useCallback(()=>{v(!1),d?.current?.focus()},[]);mu([C,w],p,()=>k()),S2(p,C),W.useEffect(()=>{o!=null&&(l&&(!g||g.length==0)?l(s,void 0).then(P=>{const M=Ta(P)||[];m(M),o<M.length&&T(M[o])}):o<g.length&&T(r[o]))},[]);const T=P=>{t?.(vo(P)),u?.(vo(P));const M=g.findIndex(V=>V.obj?.k===P.obj?.k);_(M),b([P.obj?.k||""]),k()},L=P=>{P.key==="Escape"&&(k(),_(-1))},D=P=>{(P.key==="ArrowDown"||P.key==="ArrowUp")&&(P.preventDefault(),I())},I=()=>{i&&(s&&l?p?v(!1):l(s,void 0).then(P=>{const M=Ta(P)||[];m(M),_(M.length>0?0:-1),v(!0)}):v(P=>!P))};return F.jsxs("div",{role:"combobox","aria-expanded":p,"aria-controls":S,"aria-owns":S,"data-component":"select",children:[F.jsx(_i,{...f,bindValue:e,optionalDisplayValue:n,displayMode:h,onShapeIconClick:I,onKeyDown:D,onClick:I,shapeIcon:"arrow_drop_down",rotatedShapeIcon:p,isEditable:i,ref:w,inputRef:d,autocomplete:"off","aria-autocomplete":"list",variant:"notSelectable"}),p&&F.jsx(pi,{children:F.jsx(j0,{id:S,options:g,displayMode:a,ref:C,isOpen:p,selectedIndex:y,activeIndex:c||x,width:A,onClick:(P,M)=>T(M),onKeyDown:L,floating:!0})})]})},Y5=({...e})=>F.jsx(q0,{...e,_disableAutocomplete:!0,AcpWtm:" "}),WX=({...e})=>F.jsx(j5,{...e,_disableAutocomplete:!0}),X5=({elements:e,displayMode:t="Both",listDisplayMode:r="Both",label:n,disabled:i,isEditable:a=!0,fun:o,error:s,helper:l,onOptionsRequest:u,onChange:c,onConfirmedChange:h})=>{const f=e.map(d=>d.bindValue);return F.jsx(C2,{label:n,elements:e,displayMode:t,disabled:i,error:s,helper:l,isEditable:a,dataComponent:"multiple-select",onChange:d=>{c?.(d),h?.(d)},renderField:({addElement:d})=>F.jsx(Zd,{bindValue:"",fun:o,isEditable:a,listDisplayMode:r,onOptionsRequest:u,_multiActiveIndex:f,error:s,onConfirmedChange:d})})},Iv={"smp-text-editor-wrapper":"_smp-text-editor-wrapper_1y1nl_1","smp-text-editor-content":"_smp-text-editor-content_1y1nl_7","smp-text-editor-commands":"_smp-text-editor-commands_1y1nl_21","smp-text-editor-content-editable":"_smp-text-editor-content-editable_1y1nl_28"},Z5={bold:"strong, b",italic:"em, i",underline:"u",dashed:"strike, s"},HX={bold:"strong",italic:"em",underline:"u",dashed:"s"},cf=(e,t)=>{if(!e||e.rangeCount===0)return!1;let n=e.getRangeAt(0).commonAncestorContainer;return n.nodeType===Node.TEXT_NODE&&n.parentElement!==null&&(n=n.parentElement),n instanceof Element?n.closest(Z5[t])!==null:!1},jX=(e,t,r)=>{if(r.current&&e&&e.rangeCount>0&&r.current.contains(e.anchorNode)){const n=e.getRangeAt(0);if(!n.collapsed){const i=document.createElement(HX[t]);i.appendChild(n.extractContents()),n.insertNode(i);const a=document.createRange();a.selectNodeContents(i),e.removeAllRanges(),e.addRange(a),r.current&&r.current.focus()}}},UX=(e,t,r)=>{if(r.current&&e&&e.rangeCount>0&&r.current.contains(e.anchorNode)){const n=e.getRangeAt(0);if(!n.collapsed){const i=n.commonAncestorContainer,o=(i.nodeType===Node.TEXT_NODE?i.parentElement:i)?.closest(Z5[t]);if(o){const s=o.textContent||"",l=document.createTextNode(s);if(o.parentNode?.replaceChild(l,o),s){const c=document.createRange();c.setStart(l,0),c.setEnd(l,s.length),e.removeAllRanges(),e.addRange(c),r.current&&r.current.focus()}}}}},qX=({bindValue:e,helper:t,label:r,onChange:n,onBlur:i})=>{const a=W.useRef(null),[o,s]=W.useState({bold:!1,italic:!1,underline:!1,dashed:!1}),l=[{type:"bold",icon:"format_bold"},{type:"italic",icon:"format_italic"},{type:"underline",icon:"format-underline"},{type:"dashed",icon:"format-strikethrough"}],u={smpTextEditorWrapper:`${Iv["smp-text-editor-wrapper"]}`,smpTextEditorContent:`${Iv["smp-text-editor-content"]}`,smpTextEditorCommands:`${Iv["smp-text-editor-commands"]}`,smpTextEditorContentEditable:`${Iv["smp-text-editor-content-editable"]}`};W.useEffect(()=>{a.current&&(e.startsWith("<p")?a.current.innerHTML=e:a.current.innerHTML=`<p>${e!=""?e:"<br>"}</p>`)},[e]);const c=W.useCallback(()=>{const d=window.getSelection();if(a.current&&d&&a.current.contains(d.anchorNode)){const p={bold:cf(d,"bold"),italic:cf(d,"italic"),underline:cf(d,"underline"),dashed:cf(d,"dashed")};s(p)}else s({bold:!1,italic:!1,underline:!1,dashed:!1})},[]);W.useEffect(()=>(document.addEventListener("selectionchange",c),c(),()=>{document.removeEventListener("selectionchange",c)}),[c]);const h=d=>p=>{if(p.stopPropagation(),p.preventDefault(),a.current){const v=window.getSelection();v&&v.rangeCount>0&&(cf(v,d)?UX(v,d,a):jX(v,d,a),setTimeout(()=>{c()},0))}},f=d=>{d.key=="Enter"&&d.stopPropagation()};return F.jsxs("div",{"data-component":"text-editor",className:u.smpTextEditorWrapper,children:[r&&F.jsx($i,{label:r,helper:t}),F.jsxs("div",{className:u.smpTextEditorContent,onBlur:d=>{const p=d.currentTarget,v=d.relatedTarget;p.contains(v)||(n?.({bindValue:a.current?.innerHTML||""}),i?.({bindValue:a.current?.innerHTML||""}))},tabIndex:-1,children:[F.jsx("div",{className:u.smpTextEditorCommands,children:l.map(({type:d,icon:p})=>F.jsx(ye,{variant:"base",appearance:"ghost",icon:p,onClick:h(d),active:o[d],bindValue:"",showText:!1},d))}),F.jsx("div",{ref:a,className:u.smpTextEditorContentEditable,contentEditable:!0,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true",tabIndex:0,onKeyDown:f})]})]})},fi=({id:e,decode:t,shape:r,obj:n,data:i,icon:a,fun:o,placeholderIcon:s,label:l,helper:u,tooltip:c,options:h,inputSettings:f,style:d,autoSelectOptionIndex:p,isVisualOnly:v=!1,onChange:g,onConfirmedChange:m,onClick:y,onEnter:_,onBlur:x,onOptionsRequest:b,onUploadRequest:S,onContextMenu:w,isEditable:C,dSep:A=".",value:k})=>{const T={obj:{t:n?.t||"",p:n?.p||"",k:n?.k?f?.forceUppercase?n?.k.toLocaleUpperCase():n.k:""},shape:r,decode:t,icon:a,fun:o,data:i,isEditable:C,options:h,style:d,inputSettings:f,placeholderIcon:s,tooltip:c},L=EX(n,r,i?.size),D=t||k,I={id:e,onOptionsRequest:b,fun:o,icon:a,placeholderIcon:s,tooltip:c,obj:n,label:l,helper:u,isEditable:C,style:d,size:T.data&&T.data.size?T.data.size:20,isVisualOnly:v,options:h,autoSelectOptionIndex:p,...i},P=(R,B)=>b2(n)?pl(R,{bindValue:new eh(n,B.bindValue).getLegacyValue()}):B5(n)?pl(R,{bindValue:new qm(n,B.bindValue).getLegacyValue()}):f?.forceUppercase?pl(R,{bindValue:B.bindValue.toLocaleUpperCase(),optionalDisplayValue:B.optionalDisplayValue}):pl(R,B),M=(R,B)=>pl(R,{bindValue:new Kl(n,B,A).getLegacyValue()}),V=R=>pl(T,{bindValue:new jm(n,R).getLegacyValue()}),O=R=>LX(T,R),$=()=>{switch(L){case xt.AUTOCOMPLETE:{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D,obj:T.obj,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(q0,{...R})}case xt.BUTTON:{const R=i?.label&&typeof i.label=="string"?i.label:void 0,B={...I,bindValue:R||"",showText:i?.showText?i.showText:!!R,onClick:G=>{y?.(G,P(T,{bindValue:n.k}))}};return F.jsx(ye,{...B})}case xt.BUTTON_LIST:{const R={...I,onClick:(B,G)=>{y?.(B,G)}};return F.jsx(G5,{...R})}case xt.BREADCRUMBS:{const R={...I,onClick:(B,G)=>{y?.(B,G)}};return F.jsx(N5,{...R})}case xt.CHECKBOX:case xt.SWITCH:{const R=L===xt.SWITCH,B={...I,bindValue:jm.fromDataObj(n).getValue(),optionalDisplayValue:D,onChange:G=>{g?.(V(G))},onConfirmedChange:G=>{m?.(V(G))},...R&&{variant:"switch"}};return F.jsx(Y0,{...B})}case xt.COMBOBOX:{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D,obj:T.obj,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(Y5,{...R})}case xt.DATE:{const R={...I,bindValue:eh.fromDataObj(n).getValue(),obj:T.obj,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(w2,{...R})}case xt.ICON:case xt.IMAGE:{const R={...I,icon:a,isInteractable:!!I.fun,onClick:B=>{y?.(B,P(T,{bindValue:n.k}))}};return F.jsx(me,{...R})}case xt.INPUT_NUMBER:{const R={...I,bindValue:Kl.fromDataObj(n,A).getValue(),onChange:B=>{g?.(M(T,B))},onEnter:B=>{_?.(M(T,B))},onBlur:B=>{x?.(M(T,B))}};return F.jsx(H5,{...R})}case xt.EDITOR:{const R={...I,bindValue:n.k,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(qX,{...R})}case xt.MEMO:{const R={...I,bindValue:n.k,optionalDisplayValue:D,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(T2,{...R})}case xt.CHIP:{const R={...I,elements:Lv(T),onChange:B=>{g?.(O(B))},onConfirmedChange:B=>{m?.(O(B))}};return C?F.jsx(GX,{...R}):F.jsx(X0,{...R})}case xt.MULTI_AUTOCOMPLETE:{const R={...I,elements:Lv(T),onChange:B=>{g?.(O(B))},onConfirmedChange:B=>{m?.(O(B))}};return F.jsx(j5,{...R})}case xt.MULTI_CONFIG:{const R={...I,bindValue:l||"",showText:!!l,icon:a??"list",onClick:B=>{y?.(B,P(T,{bindValue:n.k}))}};return F.jsx(ye,{...R})}case xt.MULTI_COMBOBOX:{const R={...I,elements:Lv(T),onChange:B=>{g?.(O(B))},onConfirmedChange:B=>{m?.(O(B))}};return F.jsx(WX,{...R})}case xt.MULTI_SELECT:{const R={...I,elements:Lv(T),onChange:B=>{g?.(O(B))},onConfirmedChange:B=>{m?.(O(B))}};return F.jsx(X5,{...R})}case xt.PASSWORD:{const R={...I,bindValue:T.obj.k,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(U5,{...R})}case xt.RADIO:{const R={...I,bindValue:n.k,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))}};return F.jsx(RX,{...R})}case xt.SELECT:{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D,obj:T.obj,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))}};return F.jsx(Zd,{...R})}case xt.SPOTLIGHT:{const R={...I,bindValue:T.obj.k,obj:T.obj,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(q5,{...R})}case xt.BUTTON_GROUP:{const R={...I,bindValue:n.k,onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))}};return F.jsx(z5,{...R})}case xt.TIME:{const R={...I,bindValue:qm.fromDataObj(n).getValue(),onChange:B=>{g?.(P(T,B))},onConfirmedChange:B=>{m?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(FX,{...R})}case xt.TREE:{const R={...I,onClick:(B,G)=>{y?.(B,G)}};return F.jsx(VX,{...R})}case xt.FILE_UPLOAD:{const R=T.data||{},B={...I,...R&&typeof R=="object"?R:{},disabled:I.isEditable===!1,onUploadRequest:S,onChange:G=>{Array.isArray(G)?(g?.(O(G.map(j=>({bindValue:j.bindValue})))),x?.(O(G.map(j=>({bindValue:j.bindValue}))))):(g?.(P(T,G)),x?.(P(T,G)))}};return F.jsx(W5,{...B})}case xt.LABEL:{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D};return F.jsx(Xd,{...R})}default:if(I.isEditable){const R={...I,bindValue:T.obj.k,optionalDisplayValue:T.decode,obj:T.obj,onChange:B=>{g?.(P(T,B))},onEnter:B=>{_?.(P(T,B))},onBlur:B=>{x?.(P(T,B))}};return F.jsx(_i,{...R})}else{const R={...I,bindValue:T.obj.k,optionalDisplayValue:D};return F.jsx(Xd,{...R})}}},z={wrapper:`${zX["smp-cell-wrapper"]}`};return F.jsx("span",{className:z.wrapper,onContextMenu:R=>{w&&c&&(R.preventDefault(),w(T,R.currentTarget))},children:$()})},Kd=({children:e,layout:t={horizontal:!1,sectionsType:"tab",sections:[{id:"1",content:Array.isArray(e)?e.map(r=>({id:r.props.id})):[{id:e.props.id}]}]}})=>{const[r,n]=W.useState(0),i={};W.Children.forEach(e,p=>{W.isValidElement(p)&&(i[p.props.id]=p)});const a="--smp-grid-template-cols",o="--smp-grid-template-rows",s=D5(t.sections??[],Object.keys(i)),l=p=>p.reduce((v,g)=>{let m="",y={},_={},x="";return g.sections?.length?(m=wn["smp-layout-section-grid"],y=l(g.sections),x=wn[g.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],g.horizontal||IL(g.sections)?_=ML(g.sections,g.horizontal?a:o):_={[a]:"auto",[o]:"auto"}):g.content?.length&&(g.columns!==void 0&&+g.columns>0?(m=wn["smp-layout-section-grid"],x=wn["smp-grid-template-cols"],_={[a]:`repeat(${g.columns}, 1fr)`}):g.horizontal?m=wn["smp-layout-section-flex"]:m=wn["smp-layout-section-grid"]),{...v,...y,[g.id||""]:{classes:`${m} ${wn[g.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${x} ${g.layoutAttributes?.map(b=>`smp-${b}`).join(" ")??""}`,styles:_}}},{}),u=l(s),c=`${wn["smp-layout"]} ${t.horizontal?wn["smp-layout-horizontal"]:wn["smp-layout-vertical"]} ${t.inline?wn["smp-layout-inline"]:""}`;let h={};(t.horizontal||IL(t.sections||[]))&&(h=ML(s,t.horizontal?a:o));const f=(p,v)=>{const g=F.jsx("div",{"smp-id":`section-${p.id}`,className:u[p.id||""].classes,style:u[p.id||""].styles,children:p.sections?.length?p.sections.map(m=>f(m)):p.content?.map(m=>d(m))},`section-${p.id}`);return p.title&&!v?F.jsxs("div",{className:wn["smp-layout-section-with-title"],children:[F.jsx("span",{className:`${wn["smp-layout-section-title"]}`,children:F.jsx($i,{label:p.title})}),g]},`title-section-${p.id}`):g},d=p=>{if(p.visible!==!1){let v=i[p.id||""];v?p.style&&(v=W.cloneElement(v,{style:{...p.style,...v.props.style}})):v=F.jsx(fi,{...p,id:p.id??"",style:p.style});const g=`${wn["smp-layout-cell-container"]} ${p.layoutAttributes?.map(m=>`smp-${m}`).join(" ")??""}`;return F.jsx("div",{className:g,"smp-id":p.id,children:v},p.id)}};return F.jsxs("div",{className:c,style:h,"smp-id":"layout",children:[t.sectionsType==="tab"&&t.sections&&t?.sections.length>1&&F.jsx(M5,{data:{type:"SmeupDataTree",children:s.map(p=>({decode:p.title||p.id||"Tab",obj:{t:"",p:"",k:""},placeholderIcon:"tab",cells:{},children:[],shape:void 0,toolbar:!1}))},selectedIndex:r,onTabChange:n}),t.sectionsType?f(s[r],!0):s.map(p=>f(p))]})},YX={"smp-appbar":"_smp-appbar_ui0tb_1"},XX=({data:e,advanceResearchAutoSelect:t,onClick:r,onEnter:n,onContextMenu:i,onAdvanceResearchLoadInitialData:a,onAdvanceResearchLeafNodeClick:o,onMenuClick:s})=>{const[l,u]=W.useState(),c=W.useCallback(h=>{if(!h.rows?.length||!h.columns?.length)return{};const f=h.rows[0];return h.columns.filter(d=>d.visible).reduce((d,p)=>{const g={...f.cells?.[p.name],id:p.name,onChange:m=>{u(y=>y&&{...y,[p.name]:{...y[p.name],obj:{t:y[p.name].obj?.t||"",p:y[p.name].obj?.p||"",k:m.obj?.k||""}}})},onClick:(m,y)=>{r&&r(y)},onEnter:m=>{n&&n(m)},onContextMenu:(m,y)=>{i&&i(m,y)}};return{...d,[p.name]:g}},{})},[r,n,i]);return W.useEffect(()=>{e&&u(c(e))},[e,c]),!e?.rows?.length||!e.columns?.length?null:l&&F.jsx(kh.Provider,{value:{onAdvanceResearchLoadInitialData:a,onAdvanceResearchLeafNodeClick:o,advanceResearchAutoSelect:t},children:F.jsxs("header",{className:YX["smp-appbar"],"aria-label":"App Bar","data-component":"app-bar",children:[F.jsx(ye,{bindValue:"",icon:"menu",variant:"base",sizing:"large",title:"Menu",showText:!1,onClick:()=>s?.()}),F.jsx(Kd,{layout:e.rows[0].layout,children:Object.values(l).map(h=>F.jsx(fi,{...h}))})]})})},$x={"smp-box-list":"_smp-box-list_1x5st_1","smp-box-element":"_smp-box-element_1x5st_10","smp-box-global-filter":"_smp-box-global-filter_1x5st_28"},ZX=(e,t)=>{const r=t.toLowerCase();return e.rows.filter(n=>n.cells?Object.values(n.cells).some(i=>{const a=i.value?.toLowerCase().includes(r),o=i.obj?.k.toLowerCase().includes(r);return a||o}):!1)},KX=(e,t)=>{switch(t){case"2":return JX(e);case"3":return QX(e);case"4":return tZ(e);case"5":return eZ(e);case"6":return rZ(e);case"7":return nZ(e);case"8":return iZ(e);default:return Dh(e)}},Dh=e=>({sections:e.map(t=>({id:`section-${t.name}`,layoutAttributes:["grid-cols-2"],content:[{id:`label-${t.name}`,obj:{t:"",p:"",k:t.title||t.name}},{id:t.name,style:{fontWeight:"bold"}}]}))}),JX=e=>({sections:e.map(t=>({id:`section-${t.name}`,layoutAttributes:["grid-cols-2"],content:[{id:`label-${t.name}`,obj:{t:"",p:"",k:t.title||t.name}},{layoutAttributes:["justify-end"],id:t.name,style:{fontWeight:"bold"}}]}))}),QX=e=>({sections:[{id:"content",layoutAttributes:[`grid-cols-${e.length}`,"justify-center"],sections:e.map(t=>({id:`section-${t.name}`,layoutAttributes:["grid-cols-2"],content:[{id:`label-${t.name}`,layoutAttributes:["justify-end"],obj:{t:"",p:"",k:t.title||t.name}},{layoutAttributes:["justify-start"],id:t.name,style:{fontWeight:"bold"}}]}))}]}),tZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0||r.length==0?(console.warn("LayoutNbr 4 required at least 1 image or icon and one field"),Dh(e)):{sections:[{id:"content",layoutAttributes:["grid-col-1","justify-center"],content:[{layoutAttributes:["justify-center"],id:t[0].name},{layoutAttributes:["justify-center"],id:r[0].name}]}]}},eZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0?(console.warn("LayoutNbr 5 required at least 1 image or icon"),Dh(e)):{sections:[{id:"content",layoutAttributes:["grid-cols-2"],sections:[{id:"image",content:[{layoutAttributes:["justify-center","items-center"],id:t[0].name}]},{sections:r.map(n=>({id:`section-${n.name}`,layoutAttributes:["grid-cols-2"],sections:[{layoutAttributes:["justify-end"],id:`label-${n.name}`,content:[{obj:{t:"",p:"",k:n.title||n.name}}]},{layoutAttributes:["justify-start"],id:`value-${n.name}`,content:[{id:n.name,style:{fontWeight:"bold"}}]}]}))}]}]}},rZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0?(console.warn("LayoutNbr 6 required at least 1 image or icon"),Dh(e)):{sections:[{id:"content",layoutAttributes:["grid-cols-2"],sections:[{id:"image",content:[{layoutAttributes:["justify-center","items-center"],id:t[0].name}]},{sections:r.map(n=>({id:`section-${n.name}`,layoutAttributes:["grid-cols-1","gap-4"],content:[{id:`label-${n.name}`,obj:{t:"",p:"",k:n.title||n.name}},{id:n.name,style:{fontWeight:"bold"}}]}))}]}]}},nZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0?(console.warn("LayoutNbr 7 required at least 1 image or icon"),Dh(e)):{sections:[{id:"content",sections:[{id:"image",content:[{layoutAttributes:["justify-center"],id:t[0].name}]},{sections:r.map(n=>({id:`section-${n.name}`,layoutAttributes:["grid-cols-2","gap-4"],content:[{id:`label-${n.name}`,obj:{t:"",p:"",k:n.title||n.name}},{id:n.name,style:{fontWeight:"bold"}}]}))}]}]}},iZ=e=>{const t=e.filter(n=>n.shape==xt.IMAGE||n.shape==xt.ICON),r=e.filter(n=>n.shape!=xt.IMAGE&&n.shape!=xt.ICON);return t.length==0?(console.warn("LayoutNbr 8 required at least 1 image or icon"),Dh(e)):{sections:[{id:"content",sections:[{id:"image",content:[{layoutAttributes:["justify-center"],id:t[0].name}]},{sections:r.map(n=>({id:`section-${n.name}`,layoutAttributes:["grid-cols-1","gap-4"],content:[{id:`label-${n.name}`,obj:{t:"",p:"",k:n.title||n.name}},{id:n.name,style:{fontWeight:"bold"}}]}))}]}]}},aZ=({data:e,dSep:t,SelectRow:r,SelFirst:n="No",GlobalFilter:i="No",Columns:a,Cols:o,LayoutNbr:s="1",onCellClick:l,onClick:u})=>{const[c,h]=W.useState(e.rows),[f,d]=W.useState(""),p={smpBoxList:`${$x["smp-box-list"]}`,smpBoxElement:`${$x["smp-box-element"]}`,smpBoxGlobalFilter:`${$x["smp-box-global-filter"]}`},v=W.useMemo(()=>{if(a){const _=a.split("|");return e.columns.filter(b=>_.includes(b.name)).sort((b,S)=>_.indexOf(b.name)-_.indexOf(S.name))}return e.columns.filter(_=>_.visible==null||_.visible==!0)},[a,e.columns]);W.useEffect(()=>{Pe(n)&&e.rows.length>0&&u?.({row:e.rows[0]}),r&&parseInt(r)-1<=e.rows.length&&u?.({row:e.rows[parseInt(r)-1]})},[]);const g=(_,x)=>F.jsx(fi,{id:_.name,...x.cells?.[_.name],isVisualOnly:!0,isEditable:!1,dSep:t,onClick:(b,S)=>{b.stopPropagation(),l({cell:S,column:_,row:x})}}),m=W.useMemo(()=>o&&parseInt(o)>0?parseInt(o):1,[o]),y=W.useMemo(()=>({"--smp-box-list-cols":m.toString()}),[m]);return F.jsxs("div",{"data-component":"box-list",children:[Pe(i)&&F.jsx("div",{className:p.smpBoxGlobalFilter,children:F.jsx(q5,{bindValue:f,onChange:_=>{d(_.bindValue),h(ZX(e,_.bindValue))},FullWidth:"Yes",placeholder:"Search..."})}),F.jsx("div",{"data-component":"box-list-grid",className:p.smpBoxList,style:y,children:c.map((_,x)=>_.cells?F.jsx("div",{"data-component":"box-list-element",className:p.smpBoxElement,onClick:()=>u({row:_}),children:F.jsx(Kd,{layout:_.layout?.sections&&_.layout.sections.length>0?_.layout:KX(v,s),children:v.map(b=>g(b,_))})},`box-${x}`):null)})]})},Yn={"smp-dash-list":"_smp-dash-list_x2rzc_1","smp-dash-list-fill-space":"_smp-dash-list-fill-space_x2rzc_8","smp-dash-list-horizontal":"_smp-dash-list-horizontal_x2rzc_13","smp-layout-1":"_smp-layout-1_x2rzc_17","smp-layout-2":"_smp-layout-2_x2rzc_21","smp-layout-3":"_smp-layout-3_x2rzc_29","smp-layout-1__descr":"_smp-layout-1__descr_x2rzc_58","smp-layout-2__descr":"_smp-layout-2__descr_x2rzc_59","smp-layout-3__descr":"_smp-layout-3__descr_x2rzc_60","smp-layout-1__value":"_smp-layout-1__value_x2rzc_68","smp-layout-2__value":"_smp-layout-2__value_x2rzc_69","smp-layout-3__value":"_smp-layout-3__value_x2rzc_70","smp-layout-2__icon":"_smp-layout-2__icon_x2rzc_77"},oZ=({ColumnsNumber:e=1,data:t,ForceText:r,TextColName:n,TextColor:i="var(--smp-dashList-color-base)",Fillspace:a,FontSize:o,Horizontal:s,ForceIcon:l,IconColName:u,IconColor:c="var(--smp-dashList-color-base)",NumberFormat:h,ForceUM:f,UmColName:d,UmColor:p="var(--smp-dashList-color-base)",ForceValue:v,ValueColName:g,ValueColor:m="var(--smp-dashList-color-base)",SelectLayout:y="1",onClick:_})=>{const x="N/A",b=t?.columns||[],S=t?.rows||[],w=S.length>0,C="--smp-dashList-color",A="descr",k="icon",T="um",L="value",D=o||"1em",I="18px",P="--smp-dashList-columns",M="--smp-dashList-fontSize",V={dash:(U="1")=>({container:Yn[`smp-layout-${U}`]||Yn["smp-layout-1"],descr:Yn[`smp-layout-${U}__descr`]||Yn["smp-layout-1__descr"],icon:Yn[`smp-layout-${U}__icon`]||Yn["smp-layout-2__icon"],um:Yn[`smp-layout-${U}__um`]||"",value:Yn[`smp-layout-${U}__value`]||Yn["smp-layout-1__value"]}),dashList:`${Yn["smp-dash-list"]} ${Pe(a)?Yn["smp-dash-list-fill-space"]:""} ${Pe(s)?Yn["smp-dash-list-horizontal"]:""}`},{format:O}=xi(),$=U=>`${C}-${U}`,z=U=>{const Q=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(Q.test(U)){const nt=U.match(Q)||[];if(nt?.length>3)return"rgb("+nt[1]+","+nt[2]+","+nt[3]+")"}return U},R=U=>{if(!h)return U;const[Q,X]=B(h).map(ue=>parseInt(ue||"0")),nt="0,0"+(X?"."+"0".repeat(X):""),st=O(U,nt,"it");if(!Q)return st;const[mt,Bt]=st.split(",");return mt+(Bt?`,${Bt}`:"")},B=U=>U.includes(";")?U.split(";"):[U],G=U=>{const Q=nt=>{if(nt)return U?.cells?.[nt]?.obj?.k},X=nt=>{if(!(b.length<=nt))return U?.cells?.[b[nt].name]?.obj?.k};return{descr:r||Q(n)||X(2)||"",icon:l||Q(u)||X(3)||"",um:f||Q(d)||X(1)||"",value:v||Q(g)||X(0)||""}},j=U=>{_?.(U)},H=(U,Q)=>{(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),U.stopPropagation(),j(Q))},K=(U=>{const Q=V.dash(U);return{className:Q,descr:X=>F.jsx("div",{className:Q.descr,children:X},`${U}-${A}`),icon:X=>F.jsx("div",{className:Q.icon,children:F.jsx(me,{color:c,height:I,icon:X,width:I})},`${U}-${k}`),um:X=>F.jsx("div",{className:Q.um,children:X},`${U}-${T}`),value:X=>F.jsx("div",{className:Q.value,children:X},`${U}-${L}`)}})(y),et=U=>{const{descr:Q,icon:X,um:nt,value:st}=G(U),mt={[$(A)]:z(i),[$(T)]:z(p),[$(L)]:z(m)},Bt=[],ue=R(st);switch(y){case"2":X&&Bt.push(K.icon(X)),Bt.push(K.descr(Q)),Bt.push(K.value(nt?ue+" "+nt:ue));break;default:case"1":Bt.push(K.descr(Q)),Bt.push(K.value(nt?ue+" "+nt:ue))}return F.jsx("div",{className:K.className.container,role:"button",style:mt,tabIndex:0,onClick:()=>j(U),onKeyDown:Ve=>H(Ve,U),children:Bt},U.rowId)},it={[P]:String(e),[M]:D};return F.jsx("div",{className:V.dashList,style:it,"data-component":"dash-list",children:w?S.map(U=>et(U)):x})},sZ={"smp-table":"_smp-table_v715o_1"};function lZ(e,t){const r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function uZ(e,t){return e.map(r=>{const n=t.find(i=>i.column===r.bindValue);return{column:r.bindValue,visible:n?.visible??!0}})}function cZ(e){const t=[];return e?.split("|").forEach(r=>{const n=r.split(","),i=n[0],o=(n[1]??"").toUpperCase()!=="H";i.trim()&&t.push({column:i,visible:o})}),t}function hZ(e){return!e||typeof e!="string"?[]:e.split("|").map(t=>t.trim()).filter(Boolean).map(t=>{const r=t.match(/^(\w+)\(([^)]+)\)$/);return r?{func:r[1].toUpperCase(),field:r[2].trim()}:null}).filter(Boolean)}function K5(e,t){const r={};for(const{func:n,field:i}of t){const a=e.map(o=>{const s=o?.cells?.[i]?.value,l=typeof s=="number"?s:parseFloat(s??"");return isNaN(l)?0:l}).filter(o=>typeof o=="number");switch(n){case"SUM":r[i]=a.reduce((o,s)=>o+s,0);break;case"COUNT":r[i]=a.length;break;case"AVG":r[i]=a.length>0?a.reduce((o,s)=>o+s,0)/a.length:0;break}}return r}function fZ(e,t,r,n,i){const a=[];let o=0;return s(e,0,[]),{flatRows:a,offset:o};function s(f,d,p){if(d>=t.length){h(f);return}const v=t[d].column,g=l(f,v);let m=0;for(const[y,_]of g){const x=[...p,m.toString()],b=u(x),S=n.has(b),w=c(y,b,d,S,_);a.push(w),o+=r,S&&s(_,d+1,x),m++}}function l(f,d){const p=new Map;for(const v of f){const g=(v.cells?.[d]?.decode||v.cells?.[d]?.value)??"N/D";p.has(g)||p.set(g,[]),p.get(g).push(v)}return p}function u(f){return`${f.join("-")}`}function c(f,d,p,v,g){const m={};if(i&&g.length>0){const y=K5(g,i);for(const _ in y)m[_]={value:String(y[_]),obj:{t:"NR",p:"",k:String(y[_])},options:[],decode:String(y[_]),shape:xt.LABEL,isEditable:!1,data:{isVisualOnly:!0}}}return{isGroup:!0,value:f,cells:m,id:d,level:p,isExpanded:v}}function h(f){for(const d of f)a.push(d),o+=r}}const dZ=({columns:e,rows:t,containerRef:r,sizingMode:n})=>{const[i,a]=W.useState({}),o=3,s=7;return W.useEffect(()=>{if(!(!e||e.length===0)){if(n==="fixed"){const u=Object.fromEntries(e.map(c=>[c.name,120]));a(u)}else if(n==="fit-grid"){const l=r.current?.offsetWidth||800,u=e.filter(f=>f.visible!==!1),c=l/u.length,h=Object.fromEntries(u.map(f=>[f.name,c]));a(h)}else if(n==="fit-content"){const l={},u=[...t].sort(()=>.5-Math.random()).slice(0,100),c=t.slice(0,100).concat(u);for(const h of e){if(!h.visible)continue;const f=h.title?.length+o*2||0,d=Math.max(f,...c.map(p=>{const v=p.cells?.[h.name];return`${v?.decode??v?.value??""}`.length}));l[h.name]=d*s+24}a(l)}}},[e,t,r,n]),[i,a]},pZ={EQ:{label:"eq",function:(e,t)=>e.toDateString()===t.toDateString()},ON:{label:"on",function:(e,t)=>e.toDateString()===t.toDateString()},AFTER:{label:"after",function:(e,t)=>e>t},ONORAFTER:{label:"onorafter",function:(e,t)=>e>=t},BEFORE:{label:"before",function:(e,t)=>e<t},ONORBEFORE:{label:"onorbefore",function:(e,t)=>e<=t}},vZ={CONTAINS:{label:"contains",function:(e,t)=>e.includes(t)},STARTS:{label:"starts",function:(e,t)=>e.startsWith(t)},EQ:{label:"eq",function:(e,t)=>e===t},NEQ:{label:"neq",function:(e,t)=>e!==t}},gZ={EQ:{label:"eq",function:(e,t)=>e===t},NEQ:{label:"neq",function:(e,t)=>e!==t},GT:{label:"gt",function:(e,t)=>e>t},GTE:{label:"ge",function:(e,t)=>e>=t},LT:{label:"lt",function:(e,t)=>e<t},LTE:{label:"le",function:(e,t)=>e<=t}},mZ=e=>Object.values(pZ).find(r=>r.label===e.toLowerCase())?.function??(()=>null),yZ=e=>Object.values(vZ).find(r=>r.label===e.toLowerCase())?.function??(()=>null),_Z=e=>Object.values(gZ).find(r=>r.label===e.toLowerCase())?.function??(()=>null);function xZ(e,t){return e.map(r=>{const n=t?.[r.name],i=bZ(r);return{obj:{t:r.obj?.t||"",p:r.obj?.p||"",k:r.name},decode:r.title,shape:void 0,type:n??i}})}function bZ(e){return e.obj?O5(e.obj)?"number":b2(e.obj)?"date":"string":"string"}function nE(e,t){const r={logic:"and",filters:[]};return e?typeof e=="object"&&"logic"in e&&"filters"in e?e:typeof e=="string"?SZ(e,t):r:r}function SZ(e,t){const r=e.split("|").map(i=>i.trim()).filter(Boolean),n=[];for(const i of r){const a=wZ(i,t);a&&n.push(a)}return{logic:"and",filters:n}}function wZ(e,t){if(!e.trim())return null;if(e.includes(";OR;")){const n=e.split(";OR;").map(l=>l.trim()).filter(Boolean);if(n.length===0)return null;const i=Vx(n[0],t);if(!i)return null;const a=i.field,o=i.columnsType,s=n.slice(1).map(l=>Vx(l,t,a?.obj?.k,o)).filter(l=>l!==null);return{logic:"or",filters:[i,...s]}}else{const n=Vx(e,t);return n?{logic:"and",filters:[n]}:null}}function Vx(e,t,r,n){const i=e.split(";").map(h=>h.trim());let a,o,s;if(i.length===3)[a,o,s]=i;else if(i.length===2&&r&&n)[o,s]=i,a=r;else return null;const l=t.find(h=>h?.obj?.k===a)??(r&&n?{obj:{t:"",p:"",k:r},decode:r,type:n,shape:void 0}:null);if(!l)throw new Error(`Campo '${a}' non trovato nei FieldOption.`);const u={...sm,obj:{t:"",p:"",k:o}},c=CZ(s,l.type);return{field:l,columnsType:l.type,operator:u,value:c}}function CZ(e,t){switch(t){case"number":return Number(e);case"date":return new Date(e);case"string":return e;default:return null}}function TZ(e,t){return!t||"filters"in t&&t.filters.length===0?e:e.filter(r=>J5(t,r))}function J5(e,t){if("filters"in e){const{logic:r,filters:n}=e;if(n.length===0)return!0;const i=n.map(a=>J5(a,t));return r==="and"?i.every(Boolean):i.some(Boolean)}return AZ(e,t)}function AZ(e,t){const{field:r,operator:n,value:i,columnsType:a}=e,o=t.cells?.[r?.obj?.k||""],s=kZ(o);if(!s)return!1;switch(a){case"string":return DZ(s,n.obj?.k||"",i);case"number":return LZ(s,n.obj?.k||"",i);case"date":return EZ(s,n.obj?.k||"",i);default:return!0}}function kZ(e){if(!e||typeof e!="object")return e;if("decode"in e)return e.decode;if("value"in e)return e.value}function DZ(e,t,r){const n=String(e).toLowerCase(),i=String(r).toLowerCase();return yZ(t)(n,i)??!0}function LZ(e,t,r){const n=Number(e),i=Number(r);return r===""?!0:isNaN(n)||isNaN(i)?!1:_Z(t)(n,i)??!0}function EZ(e,t,r){const n=new Date(e),i=new Date(r);return r===""?!0:isNaN(n.getTime())||isNaN(i.getTime())?!1:mZ(t)(n,i)??!0}const MZ=(e,t)=>{const r=n=>n.filters.some(i=>"filters"in i?r(i):i.field?.obj?.k===e&&i.operator&&i.value!=="");return r(t)},IZ=e=>{const t=r=>r.filters.reduce((n,i)=>"filters"in i?n+t(i):n+1,0);return t(e)};function PZ(e,t){const r=W.useRef(null),n=W.useCallback(o=>{r.current=o},[]),i=W.useCallback(o=>{o.preventDefault(),o.dataTransfer.dropEffect="move"},[]),a=W.useCallback(o=>{const s=r.current;if(!s||s===o)return;const l=e.findIndex(f=>f.name===s),u=e.findIndex(f=>f.name===o);if(l===-1||u===-1)return;const c=[...e],[h]=c.splice(l,1);c.splice(u,0,h),t(c),r.current=null},[e,t]);return{handleDragStart:n,handleDragOver:i,handleDrop:a}}function Q5(e,t,r,n="."){const i=e.columns.find(o=>o.name===t);if(!i)return e;const a=[...e.rows].sort((o,s)=>{const l=o.cells?.[t].obj,u=s.cells?.[t].obj;if(l?.k==null&&u?.k!=null)return r==="asc"?1:-1;if(l?.k!=null&&u?.k==null)return r==="asc"?-1:1;if(l?.k==null&&u?.k==null)return 0;switch(i.obj?.t){case"NR":{const c=Kl.fromDataObj(l,n).getValue()??NaN,h=Kl.fromDataObj(u,n).getValue()??NaN;return isNaN(c)&&isNaN(h)?0:isNaN(c)?r==="asc"?-1:1:isNaN(h)?r==="asc"?1:-1:r==="asc"?c-h:h-c}case"D8":case"DATE":{const c=new Date(eh.fromDataObj(l).getValue()),h=new Date(eh.fromDataObj(u).getValue());return isNaN(c.getTime())&&isNaN(h.getTime())?0:isNaN(c.getTime())?r==="asc"?1:-1:isNaN(h.getTime())?r==="asc"?-1:1:r==="asc"?c.getTime()-h.getTime():h.getTime()-c.getTime()}default:{const c=o.cells?.[t]?.decode||o.cells?.[t]?.value||l?.k,h=s.cells?.[t]?.decode||s.cells?.[t]?.value||u?.k;return c!=null&&h!=null?r==="asc"?String(c).localeCompare(String(h)):String(h).localeCompare(String(c)):c==null&&h!=null?r==="asc"?1:-1:c!=null&&h==null?r==="asc"?-1:1:0}}});return{...e,rows:a}}function RZ(e,t){const[r,n]=W.useState(null),[i,a]=W.useState("asc");return{sortedRows:W.useMemo(()=>r?Q5({...e,rows:e.rows},r,i,t).rows:e.rows,[e,r,i,t]),sortBy:r,sortOrder:i,handleSort:l=>{n(u=>u===l?(a(c=>c==="asc"?"desc":"asc"),l):(a("asc"),l))}}}const iE={"smp-footer-tr":"_smp-footer-tr_22pj9_1","smp-footer-td":"_smp-footer-td_22pj9_6"},NZ=({columns:e,columnWidths:t,totals:r,rows:n=[],hasGroups:i=!1})=>{const a={td:`${iE["smp-footer-td"]}`,tr:`${iE["smp-footer-tr"]}`},o=i?n.filter(l=>l.isGroup&&l.level===0):n.filter(l=>!l.isGroup),s=r&&o.length>0?K5(o,r):{};return F.jsx("tfoot",{children:F.jsx("tr",{className:a.tr,children:e.map(l=>l.visible&&F.jsx("td",{className:a.td,style:{width:t[l.name],minWidth:t[l.name],maxWidth:t[l.name]},children:s[l.name]!=null?F.jsx(fi,{value:String(s[l.name]),obj:{t:"NR",p:"",k:String(s[l.name])},options:[],decode:String(s[l.name]),shape:xt.INPUT_NUMBER,id:l.name,data:{isVisualOnly:!0,style:{fontWeight:"bold"}}}):null},l.name))})})},OZ=({label:e,rowHeight:t=28,offsetTop:r=0,level:n=0,onClick:i,isExpanded:a,cells:o,columns:s,columnWidths:l})=>{const u={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return F.jsx("tr",{className:u.tr,style:{height:t,top:r,lineHeight:`${t}px`},onClick:i,children:s?.map((c,h)=>{const f=h===0,d=f?F.jsxs(F.Fragment,{children:[F.jsx(me,{icon:a?"arrow_drop_down":"arrow_drop_right",width:16}),F.jsx(hr,{variant:"title",bindValue:e})]}):o?.[c.name]?.value!=null?F.jsx(fi,{...o[c.name],id:c.name}):null;return F.jsx("td",{className:u.td,style:{width:l?.[c.name],paddingLeft:f?10+n*20:void 0},children:d},c.name)})})};function BZ(e){return e.split("|")}function FZ(e,t){return e.columns.map(r=>({...r,visible:t.includes(r.name)}))}const Dc={"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"},$Z=({filter:e,onChange:t,onDelete:r,fieldOptions:n,hasCurrentColumn:i})=>{const{translate:a}=xi(),o={string:[{obj:{t:"",p:"",k:"starts"},shape:void 0,decode:a(kn.STRING_STARTS)},{obj:{t:"",p:"",k:"contains"},shape:void 0,decode:a(kn.STRING_CONTAINS)},{obj:{t:"",p:"",k:"eq"},shape:void 0,decode:a(kn.STRING_EQUALS)}],number:[{obj:{t:"",p:"",k:"eq"},shape:void 0,decode:a(kn.NUMBER_EQUALS)},{obj:{t:"",p:"",k:"gt"},shape:void 0,decode:a(kn.NUMBER_GREATER)},{obj:{t:"",p:"",k:"ge"},shape:void 0,decode:a(kn.NUMBER_GREATER_OR_EQUAL)},{obj:{t:"",p:"",k:"lt"},shape:void 0,decode:a(kn.NUMBER_LESS)},{obj:{t:"",p:"",k:"le"},shape:void 0,decode:a(kn.NUMBER_LESS_OR_EQUAL)}],date:[{obj:{t:"",p:"",k:"before"},shape:void 0,decode:a(kn.DATE_BEFORE)},{obj:{t:"",p:"",k:"after"},shape:void 0,decode:a(kn.DATE_AFTER)},{obj:{t:"",p:"",k:"on"},shape:void 0,decode:a(kn.DATE_ON)}]},s=f=>{const d=n.find(v=>v?.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})},u=f=>{t({...e,value:f})},c=()=>{switch(e.columnsType){case"string":return F.jsx(_i,{bindValue:e.value,onChange:f=>u(f.bindValue)});case"number":return F.jsx(H5,{bindValue:e.value,onChange:f=>{f&&u(f)}});case"date":return F.jsx(w2,{bindValue:e.value,onChange:f=>u(f.bindValue)})}},h={row:`${Dc["smp-filter-row"]}`};return F.jsxs("div",{className:h.row,children:[!i&&F.jsx(Zd,{bindValue:e.field.obj.k,options:n.map(f=>({obj:{t:"",p:"",k:f?.obj?.k||""},decode:f.decode,shape:void 0})),onChange:f=>s(f.bindValue),listDisplayMode:nd.BOTH,displayMode:nd.CODE_ONLY,isEditable:!0}),F.jsx(Zd,{bindValue:e.operator?.obj.k,options:o[e.columnsType],onChange:f=>l(f.bindValue),listDisplayMode:nd.BOTH,displayMode:nd.CODE_ONLY,isEditable:!0},e.columnsType),c(),F.jsx(ye,{bindValue:"",showText:!1,label:"Delete",onClick:r,appearance:"ghost",variant:"base",icon:"delete"})]})},t$=({group:e,onChange:t,onDelete:r,onClose:n,level:i=0,fieldOptions:a,hasSubGroups:o=!0,hasSubFilters:s=!0,currentColumnName:l,hasButtonGroup:u=!0})=>{const{translate:c}=xi(),h=(m,y)=>{const _=[...e.filters];_[m]=y,t({...e,filters:_})},f=m=>{const y=[...e.filters];y.splice(m,1),t({...e,filters:y})},d=()=>{const m=a[0],y={...sm},_={field:m,columnsType:m?.type||"string",operator:y,value:""};t({...e,filters:[...e.filters,_]})},p=()=>{let m;if(l){const _=a.find(b=>b.obj?.k===l),x={...sm};m={field:_||a[0]||"",columnsType:_?.type||a[0]?.type||"string",operator:x,value:""}}else{const _={...sm};m={field:a[0]||"",columnsType:a[0]?.type||"string",operator:_,value:""}}const y={logic:"and",filters:[m]};t({...e,filters:[...e.filters,y]})},v=m=>{t({...e,logic:m})},g={filterGroup:`${Dc["smp-filter-group"]}`,filterToolbar:`${Dc["smp-filter-toolbar"]}`,filterList:`${Dc["smp-filter-list"]}`,actionButtons:`${Dc["smp-filter-actionButtons"]}`};return F.jsxs("div",{className:g.filterGroup,style:i!=0?{marginLeft:20}:void 0,"data-component":i===0?"filter":void 0,children:[F.jsxs("div",{className:g.filterToolbar,children:[u&&F.jsx(z5,{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:m=>v(m.bindValue)}),F.jsxs("div",{className:g.actionButtons,children:[s&&F.jsx(ye,{onClick:d,bindValue:c(kn.ADD_FILTER),icon:"plus",appearance:"outlined",variant:"base"}),o&&F.jsx(ye,{onClick:p,bindValue:c(kn.ADD_SUB_GROUP),icon:"plus",appearance:"outlined",variant:"base"}),r&&F.jsx(ye,{bindValue:"",showText:!1,label:"Delete",onClick:r,appearance:"outlined",variant:"base",icon:"delete"}),n&&F.jsx(ye,{bindValue:c(ya.CLOSE),showText:!0,label:"Delete",onClick:n,icon:"close",appearance:"outlined",variant:"base"})]})]}),F.jsx("div",{className:g.filterList,children:e.filters.map((m,y)=>({filter:m,index:y})).filter(({filter:m})=>l?"logic"in m?m.filters.some(y=>"logic"in y?!1:y.field?.obj?.k===l):m.field?.obj?.k===l:!0).map(({filter:m,index:y})=>"logic"in m?F.jsx(t$,{group:m,onChange:_=>h(y,_),onDelete:()=>f(y),level:i+1,fieldOptions:a,hasSubGroups:!1,hasSubFilters:!0,currentColumnName:l,hasButtonGroup:!0},y):F.jsx($Z,{filter:m,onChange:_=>h(y,_),onDelete:()=>f(y),fieldOptions:a,hasCurrentColumn:!!l},y))})]})},aE=({filters:e,onChange:t,fieldOptions:r,hasSubGroups:n,hasSubFilters:i,ref:a,currentColumnName:o,hasButtonGroup:s,onClose:l})=>{const u={filterWrapper:`${Dc["smp-filter-wrapper"]}`};return F.jsx("div",{onClick:c=>{c.stopPropagation()},"aria-hidden":"true",children:F.jsx("div",{className:u.filterWrapper,ref:a,children:F.jsx(t$,{group:e,onChange:t,fieldOptions:r,hasSubFilters:i,hasSubGroups:n,currentColumnName:o,hasButtonGroup:s,onClose:l})})})},VZ={"smp-groupBar-container":"_smp-groupBar-container_hxnfs_1"},zZ=({groups:e=[],isDraggable:t=!0,isEditable:r=!0,onChange:n,onDrop:i,onDragOver:a})=>{const o=e.map(s=>({bindValue:s.column}));return F.jsxs("th",{className:VZ["smp-groupBar-container"],onDragOver:a,onDrop:i,children:[F.jsx(me,{icon:"groups"}),F.jsx(X0,{elements:o,isEditable:r,isDraggable:t,displayMode:"CodeOnly",onChange:n})]})},Vs={"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"},GZ=({columns:e,columnWidths:t,groups:r,showGroupBar:n,showFilter:i,filterColumn:a,activeFilters:o,fieldOptions:s,Filter:l,enableSelection:u,allVisibleRowsSelected:c,sortBy:h,sortOrder:f,onToggleFilter:d,onToggleColumnFilter:p,onFiltersChange:v,onResetFilters:g,onGroupChange:m,onGroupDrop:y,onGroupDragOver:_,onMouseDown:x,onToggleAllRows:b,onSort:S,onDragStart:w,onDragOver:C,onDrop:A})=>{const k=W.useRef({}),{anchorRef:T,targetRef:L}=Fi({position:"bottom",open:i}),{anchorRef:D,targetRef:I}=Fi({position:"bottom",open:a!==null}),P=W.useCallback(O=>MZ(O,o),[o]),M=W.useMemo(()=>IZ(o),[o]),V={headerCell:`${Vs["smp-headerCell"]}`,headerCellContainer:`${Vs["smp-headerCell-container"]}`,resizer:`${Vs["smp-resizer"]}`,datatableToolbar:`${Vs["smp-datatable-toolbar"]} ${Vs["smp-headerCell-"]}`,datatableFilter:`${Vs["smp-datatable-filter"]}`};return F.jsxs("thead",{children:[F.jsxs("tr",{className:V.datatableToolbar,children:[F.jsx("th",{children:F.jsxs("div",{ref:T,className:V.datatableFilter,children:[F.jsx(ye,{onClick:d,bindValue:`${M}`,label:i?"Nascondi filtri":"Mostra filtri",icon:"filter_list",variant:"base"}),(l||M>0)&&F.jsx(F.Fragment,{children:F.jsx(ye,{onClick:g,bindValue:"Reset",icon:"cancel",appearance:"ghost",variant:"base",label:"Rimuovi tutti i filtri"})})]})}),(r||n)&&F.jsx(zZ,{groups:r,onChange:m,onDrop:y,onDragOver:_})]}),i&&F.jsx(pi,{children:F.jsx(aE,{filters:o,fieldOptions:s,onChange:v,hasSubGroups:!0,ref:L,hasSubFilters:!1,onClose:d})}),F.jsxs("tr",{children:[u&&F.jsx("th",{className:V.headerCell,style:{minWidth:40,justifyContent:"center"},children:F.jsx(Y0,{bindValue:c,onChange:b})}),e&&e?.map(O=>O.visible&&F.jsx("th",{tabIndex:0,role:"columnheader",onClick:()=>S(O.name),onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),S(O.name))},onDragStart:()=>w(O.name),onDragOver:C,onDrop:()=>A(O.name),className:V.headerCell,style:{width:t[O.name],minWidth:t[O.name],maxWidth:t[O.name]},ref:$=>{k.current[O.name]=$,a===O.name&&$&&(typeof D=="function"?D($):D&&"current"in D&&(D.current=$))},children:F.jsxs("div",{draggable:!0,onDragStart:$=>{$.dataTransfer.setData("text/plain",O.name)},className:V.headerCellContainer,children:[F.jsx(hr,{variant:"title",bindValue:O.title}),F.jsxs("div",{children:[h===O.name?F.jsx(me,{icon:f==="asc"?"arrow-up":"arrow-down",isInteractable:!0}):F.jsx("span",{style:{minWidth:"0.875rem",minHeight:"0.875rem"}}),F.jsx("span",{className:`${P(O.name)?Vs["smp-headerCell-iconNotification"]:""}`,children:F.jsx(me,{icon:"filter_list",onClick:$=>{p(O.name),$.stopPropagation()},tabIndex:0,isInteractable:!0})})]}),a===O.name&&F.jsx(pi,{children:F.jsx(aE,{filters:o,fieldOptions:s.filter($=>$.obj?.k===a),onChange:v,hasSubGroups:!0,ref:I,hasSubFilters:!1,currentColumnName:a,hasButtonGroup:!1,onClose:()=>p(O.name)})}),F.jsx("div",{className:V.resizer,onMouseDown:$=>{x($,O.name)},role:"region"})]})},O.name))]})]})},WZ=({data:e,lineHeight:t=28,TableHeight:r=400,decimalSeparator:n=".",DftGroup:i,expandedGroups:a,columnSizingMode:o="fit-content",ShowGroup:s="Yes",Filter:l,MultiSelect:u="No",Columns:c,onRowClick:h,onMultiSelectionChange:f,onContextMenu:d,DftTotal:p})=>{const[v]=W.useState(hZ(p||"")),[g,m]=W.useState(()=>e?{columns:c?FZ(e,BZ(c)):e.columns,rows:e.rows??[]}:{columns:[],rows:[]}),[y,_]=W.useState(cZ(i)),[x,b]=W.useState(new Set(a??[])),[S,w]=W.useState(!1),[C,A]=W.useState(new Set),[k,T]=W.useState(null),L=W.useMemo(()=>xZ(e?.columns||[]),[e?.columns]),[D,I]=W.useState(()=>nE(l,L)),P=W.useRef(null),[M,V]=dZ({columns:g?.columns??[],rows:g?.rows??[],containerRef:P,sizingMode:o}),{handleDragStart:O,handleDragOver:$,handleDrop:z}=PZ(g.columns,Nt=>m(re=>({...re,columns:Nt}))),{sortBy:R,sortOrder:B,handleSort:G}=RZ({...g,rows:g.rows},n),j=W.useMemo(()=>{let Nt=e?.rows??[];D?.filters?.length>0&&(Nt=TZ(Nt,D));let re=Nt;R&&(re=Q5({...e??{columns:[],rows:[]},rows:Nt},R,B,n).rows);let Fe=re;if(y?.length&&re.length>0){const{flatRows:Rr}=fZ(re,y,t,x,v);Fe=Rr}return Fe},[e,D,R,y,B,n,t,x,v]),{virtualItems:H,containerProps:tt,innerProps:K}=E5({items:j,itemHeight:t,containerHeight:He(r),overscan:5}),et=W.useMemo(()=>{const Nt=j.map((re,Fe)=>Fe);return Nt.every(re=>C.has(re))&&Nt.length>0},[C,j]);W.useEffect(()=>{if(Pe(u)&&f){const Nt=Array.from(C).map(re=>j[re]).filter(Boolean);f(Nt)}},[C,u,j,f]);const it=W.useCallback(Nt=>{I(Nt)},[]),U=W.useCallback(()=>{I(nE(l,L))},[l,L]),Q=W.useCallback(()=>{w(Nt=>!Nt)},[]),X=W.useCallback(Nt=>{T(re=>re===Nt?null:Nt)},[]),nt=Nt=>{_(uZ(Nt,y))},st=Nt=>{Nt.preventDefault();const re=Nt.dataTransfer.getData("text/plain");if(!re||y.some(ve=>ve.column===re))return;const Rr=[...y,{column:re,visible:!0}];_(Rr)},mt=Nt=>{Nt.preventDefault()},Bt=(Nt,re)=>{const Fe=Nt.clientX,Rr=M[re],ve=dv=>{const pv=dv.clientX-Fe,vv=Math.max(50,Rr+pv);V(ef=>({...ef,[re]:vv}))},Si=()=>{window.removeEventListener("mousemove",ve),window.removeEventListener("mouseup",Si)};window.addEventListener("mousemove",ve),window.addEventListener("mouseup",Si)},ue=Nt=>{A(re=>{const Fe=new Set(re);return Nt.every(ve=>Fe.has(ve))?Nt.forEach(ve=>Fe.delete(ve)):Nt.forEach(ve=>Fe.add(ve)),Fe})},Ve=()=>{const Nt=g.rows.map((re,Fe)=>Fe);ue(Nt)};function He(Nt){if(typeof Nt=="number")return Nt;const re=document.createElement("div");re.style.position="absolute",re.style.visibility="hidden",re.style.height=Nt,re.style.padding="0",re.style.margin="0",re.style.border="none",document.body.appendChild(re);const Fe=parseFloat(getComputedStyle(re).height);return re.remove(),Fe}const bn={smpTable:`${sZ["smp-table"]}`};return g&&F.jsx("div",{className:bn.smpTable,...tt,ref:P,children:F.jsxs("table",{children:[F.jsx(GZ,{columns:g.columns,columnWidths:M,groups:y,showGroupBar:Pe(s),showFilter:S,filterColumn:k,activeFilters:D,fieldOptions:L,Filter:l,enableSelection:Pe(u),allVisibleRowsSelected:et,sortBy:R,sortOrder:B,onToggleFilter:Q,onToggleColumnFilter:X,onFiltersChange:it,onResetFilters:U,onGroupChange:nt,onGroupDrop:st,onGroupDragOver:mt,onMouseDown:Bt,onToggleAllRows:Ve,onSort:G,onDragStart:O,onDragOver:$,onDrop:z}),F.jsx("tbody",{...K,children:H.map(({item:Nt,index:re,offsetTop:Fe})=>Nt.isGroup?F.jsx(OZ,{label:Nt.value||"",rowHeight:t,offsetTop:Fe,level:Nt.level,cells:Nt.cells,columns:g.columns,columnWidths:M,onClick:()=>{const Rr=Nt.id;Rr&&b(ve=>lZ(ve,Rr))},isExpanded:Nt.isExpanded},re):F.jsx(A2,{row:Nt,columns:g.columns,columnWidths:M,rowHeight:t,offsetTop:Fe,decimalSeparator:n,isGroup:!1,enableSelection:Pe(u),isSelected:C.has(re),onToggleSelect:()=>{ue([re])},onRowClick:h,onContextMenu:d},re))}),F.jsx(NZ,{columns:g.columns,columnWidths:M,totals:v,rows:j,hasGroups:!!y?.length})]})})},HZ="_slideOut_cxsow_1",hf={"smp-overlay-panel":"_smp-overlay-panel_cxsow_2","smp-overlay-panel-left":"_smp-overlay-panel-left_cxsow_22","smp-overlay-panel-closing":"_smp-overlay-panel-closing_cxsow_31","smp-overlay-panel-right":"_smp-overlay-panel-right_cxsow_37","smp-overlay-panel-top":"_smp-overlay-panel-top_cxsow_52","smp-overlay-panel-bottom":"_smp-overlay-panel-bottom_cxsow_64","smp-overlay-panel-center":"_smp-overlay-panel-center_cxsow_92",slideOut:HZ,"smp-overlay-panel-backdrop":"_smp-overlay-panel-backdrop_cxsow_132","smp-backdrop-closing":"_smp-backdrop-closing_cxsow_142"},jZ=(e,t={})=>{const{exitDuration:r=300}=t,[n,i]=W.useState(e),[a,o]=W.useState(!1);return W.useEffect(()=>{if(e)i(!0),o(!1);else if(n){o(!0);const s=setTimeout(()=>{i(!1),o(!1)},r);return()=>clearTimeout(s)}},[e,n,r]),{shouldRender:n,isExiting:a,isVisible:n&&!a}},e$=({open:e,position:t="center",width:r,isModal:n=!0,closeOnClickOutside:i=!1,onClose:a,children:o,className:s})=>{const l=W.useRef(null),u=W.useRef(null),{shouldRender:c,isExiting:h,isVisible:f}=jZ(e,{exitDuration:300});mu([l],e&&i&&!n,()=>{a&&a()});const d=`
50
50
  ${hf["smp-overlay-panel"]}
51
51
  ${hf[`smp-overlay-panel-${t}`]||""}
52
52
  ${h?hf["smp-overlay-panel-closing"]:""}
@@ -293,8 +293,8 @@ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error
293
293
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const l=e.height/2,u=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*o>Math.abs(n-t.x)*l){let h=r.y<t.y?t.y-l-i:i-l-t.y;s=c*h/u;const f={x:r.x<t.x?r.x+s:r.x-c+s,y:r.y<t.y?r.y+u-h:r.y-u+h};return s===0&&(f.x=t.x,f.y=t.y),c===0&&(f.x=t.x),u===0&&(f.y=t.y),lt.debug(`abc89 top/bottom calc, Q ${u}, q ${h}, R ${c}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-n:s=n-o-t.x;let h=u*s/c,f=r.x<t.x?r.x+c-s:r.x-c+s,d=r.y<t.y?r.y+h:r.y-h;return lt.debug(`sides calc abc89, Q ${u}, q ${h}, R ${c}, r ${s}`,{_x:f,_y:d}),s===0&&(f=t.x,d=t.y),c===0&&(f=t.x),u===0&&(d=t.y),{x:f,y:d}}},"intersection"),SM=E((e,t)=>{lt.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(lt.info("abc88 checking point",a,t),!Rst(t,a)&&!i){const o=Nst(t,n,a);lt.debug("abc88 inside",a,n,o),lt.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?lt.warn("abc88 no intersect",o,r):r.push(o),i=!0}else lt.warn("abc88 outside",a,n),n=a,i||r.push(a)}),lt.debug("returning points",r),r},"cutPathAtIntersect");function sW(e){const t=[],r=[];for(let n=1;n<e.length-1;n++){const i=e[n-1],a=e[n],o=e[n+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}E(sW,"extractCornerPoints");var wM=E(function(e,t,r){const n=t.x-e.x,i=t.y-e.y,a=Math.sqrt(n*n+i*i),o=r/a;return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),Ost=E(function(e){const{cornerPointPositions:t}=sW(e),r=[];for(let n=0;n<e.length;n++)if(t.includes(n)){const i=e[n-1],a=e[n+1],o=e[n],s=wM(i,o,5),l=wM(a,o,5),u=l.x-s.x,c=l.y-s.y;r.push(s);const h=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){lt.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));const d=5;o.x===s.x?f={x:u<0?s.x-d+h:s.x+d-h,y:c<0?s.y-h:s.y+h}:f={x:u<0?s.x-h:s.x+h,y:c<0?s.y-d+h:s.y+d-h}}else lt.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(f,l)}else r.push(e[n]);return r},"fixCorners"),Bst=E((e,t,r)=>{const n=e-t-r,i=2,a=2,o=i+a,s=Math.floor(n/o),l=Array(s).fill(`${i} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),lW=E(function(e,t,r,n,i,a,o,s=!1){const{handDrawnSeed:l}=xe();let u=t.points,c=!1;const h=i;var f=a;const d=[];for(const I in t.cssCompiledStyles)eA(I)||d.push(t.cssCompiledStyles[I]);lt.debug("UIO intersect check",t.points,f.x,h.x),f.intersect&&h.intersect&&!s&&(u=u.slice(1,t.points.length-1),u.unshift(h.intersect(u[0])),lt.debug("Last point UIO",t.start,"-->",t.end,u[u.length-1],f,f.intersect(u[u.length-1])),u.push(f.intersect(u[u.length-1])));const p=btoa(JSON.stringify(u));t.toCluster&&(lt.info("to cluster abc88",r.get(t.toCluster)),u=SM(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(lt.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=SM(u.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let v=u.filter(I=>!Number.isNaN(I.y));v=Ost(v);let g=Md;switch(g=ly,t.curve){case"linear":g=ly;break;case"basis":g=Md;break;case"cardinal":g=y3;break;case"bumpX":g=d3;break;case"bumpY":g=p3;break;case"catmullRom":g=x3;break;case"monotoneX":g=A3;break;case"monotoneY":g=k3;break;case"natural":g=L3;break;case"step":g=E3;break;case"stepAfter":g=I3;break;case"stepBefore":g=M3;break;default:g=Md}const{x:m,y}=mz(t),_=h3().x(m).y(y).curve(g);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 b,S=t.curve==="rounded"?uW(cW(v,t),5):_(v);const w=Array.isArray(t.style)?t.style:[t.style];let C=w.find(I=>I?.startsWith("stroke:")),A=!1;if(t.look==="handDrawn"){const I=It.svg(e);Object.assign([],v);const P=I.path(S,{roughness:.3,seed:l});x+=" transition",b=ge(P).select("path").attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",w?w.reduce((V,O)=>V+";"+O,""):"");let M=b.attr("d");b.attr("d",M),e.node().appendChild(b.node())}else{const I=d.join(";"),P=w?w.reduce((B,G)=>B+G+";",""):"";let M="";t.animate&&(M=" edge-animation-fast"),t.animation&&(M=" edge-animation-"+t.animation);const V=(I?I+";"+P+";":P)+";"+(w?w.reduce((B,G)=>B+";"+G,""):"");b=e.append("path").attr("d",S).attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")+(M??"")).attr("style",V),C=V.match(/stroke:([^;]+)/)?.[1],A=t.animate===!0||!!t.animation||I.includes("animation");const O=b.node(),$=typeof O.getTotalLength=="function"?O.getTotalLength():0,z=WE[t.arrowTypeStart]||0,R=WE[t.arrowTypeEnd]||0;if(t.look==="neo"&&!A){const G=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Bst($,z,R):`0 ${z} ${$-z-R} ${R}`}; stroke-dashoffset: 0;`;b.attr("style",G+b.attr("style"))}}b.attr("data-edge",!0),b.attr("data-et","edge"),b.attr("data-id",t.id),b.attr("data-points",p),t.showPoints&&v.forEach(I=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",I.x).attr("cy",I.y)});let k="";(xe().flowchart.arrowMarkerAbsolute||xe().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),lt.info("arrowTypeStart",t.arrowTypeStart),lt.info("arrowTypeEnd",t.arrowTypeEnd),Mst(b,t,k,o,n,C);const T=Math.floor(u.length/2),L=u[T];si.isLabelCoordinateInPath(L,b.attr("d"))||(c=!0);let D={};return c&&(D.updatedPath=u),D.originalPath=t.points,D},"insertEdge");function uW(e,t){if(e.length<2)return"";let r="";const n=e.length,i=1e-5;for(let a=0;a<n;a++){const o=e[a],s=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===n-1)r+=`L${o.x},${o.y}`;else{const u=o.x-s.x,c=o.y-s.y,h=l.x-o.x,f=l.y-o.y,d=Math.hypot(u,c),p=Math.hypot(h,f);if(d<i||p<i){r+=`L${o.x},${o.y}`;continue}const v=u/d,g=c/d,m=h/p,y=f/p,_=v*m+g*y,x=Math.max(-1,Math.min(1,_)),b=Math.acos(x);if(b<i||Math.abs(Math.PI-b)<i){r+=`L${o.x},${o.y}`;continue}const S=Math.min(t/Math.sin(b/2),d/2,p/2),w=o.x-v*S,C=o.y-g*S,A=o.x+m*S,k=o.y+y*S;r+=`L${w},${C}`,r+=`Q${o.x},${o.y} ${A},${k}`}}return r}E(uW,"generateRoundedPath");function Yw(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,n=t.y-e.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}E(Yw,"calculateDeltaAndAngle");function cW(e,t){const r=e.map(i=>({...i}));if(e.length>=2&&qr[t.arrowTypeStart]){const i=qr[t.arrowTypeStart],a=e[0],o=e[1],{angle:s}=Yw(a,o),l=i*Math.cos(s),u=i*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+u}const n=e.length;if(n>=2&&qr[t.arrowTypeEnd]){const i=qr[t.arrowTypeEnd],a=e[n-1],o=e[n-2],{angle:s}=Yw(o,a),l=i*Math.cos(s),u=i*Math.sin(s);r[n-1].x=a.x-l,r[n-1].y=a.y-u}return r}E(cW,"applyMarkerOffsetsToPoints");var Fst=E((e,t,r,n)=>{t.forEach(i=>{tlt[i](e,r,n)})},"insertMarkers"),$st=E((e,t,r)=>{lt.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").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"),Vst=E((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"),zst=E((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"),Gst=E((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"),Wst=E((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"),Hst=E((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"),jst=E((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"),Ust=E((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"),qst=E((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"),Yst=E((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"),Xst=E((e,t,r)=>{const n=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");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=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");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Zst=E((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"),Kst=E((e,t,r)=>{const n=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");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=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");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Jst=E((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
294
294
  L20,10
295
295
  M20,10
296
- L0,20`)},"requirement_arrow"),Qst=E((e,t,r)=>{const n=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");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),tlt={extension:$st,composition:Vst,aggregation:zst,dependency:Gst,lollipop:Wst,point:Hst,circle:jst,cross:Ust,barb:qst,only_one:Yst,zero_or_one:Xst,one_or_more:Zst,zero_or_more:Kst,requirement_arrow:Jst,requirement_contains:Qst},hW=Fst,elt={common:yu,getConfig:zr,insertCluster:V4,insertEdge:lW,insertEdgeLabel:aW,insertMarkers:hW,insertNode:LA,interpolateToCurve:sA,labelHelper:Yt,log:lt,positionEdgeLabel:oW},hp={},fW=E(e=>{for(const t of e)hp[t.name]=t},"registerLayoutLoaders"),rlt=E(()=>{fW([{name:"dagre",loader:E(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-CtsEreSY.cjs")),"loader")},{name:"cose-bilkent",loader:E(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-DKbi8shb.cjs")),"loader")}])},"registerDefaultLayoutLoaders");rlt();var nlt=E(async(e,t)=>{if(!(e.layoutAlgorithm in hp))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=hp[e.layoutAlgorithm];return(await r.loader()).render(e,t,elt,{algorithm:r.algorithm})},"render"),ilt=E((e="",{fallback:t="dagre"}={})=>{if(e in hp)return e;if(t in hp)return lt.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),dW="comm",pW="rule",vW="decl",alt="@import",olt="@namespace",slt="@keyframes",llt="@layer",gW=Math.abs,EA=String.fromCharCode;function mW(e){return e.trim()}function _m(e,t,r){return e.replace(t,r)}function ult(e,t,r){return e.indexOf(t,r)}function Vc(e,t){return e.charCodeAt(t)|0}function uh(e,t,r){return e.slice(t,r)}function fa(e){return e.length}function clt(e){return e.length}function jv(e,t){return t.push(e),e}var A_=1,ch=1,yW=0,gi=0,sr=0,Bh="";function MA(e,t,r,n,i,a,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:A_,column:ch,length:o,return:"",siblings:s}}function hlt(){return sr}function flt(){return sr=gi>0?Vc(Bh,--gi):0,ch--,sr===10&&(ch=1,A_--),sr}function Pi(){return sr=gi<yW?Vc(Bh,gi++):0,ch++,sr===10&&(ch=1,A_++),sr}function rs(){return Vc(Bh,gi)}function xm(){return gi}function k_(e,t){return uh(Bh,e,t)}function fp(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 dlt(e){return A_=ch=1,yW=fa(Bh=e),gi=0,[]}function plt(e){return Bh="",e}function sb(e){return mW(k_(gi-1,Xw(e===91?e+2:e===40?e+1:e)))}function vlt(e){for(;(sr=rs())&&sr<33;)Pi();return fp(e)>2||fp(sr)>3?"":" "}function glt(e,t){for(;--t&&Pi()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return k_(e,xm()+(t<6&&rs()==32&&Pi()==32))}function Xw(e){for(;Pi();)switch(sr){case e:return gi;case 34:case 39:e!==34&&e!==39&&Xw(sr);break;case 40:e===41&&Xw(e);break;case 92:Pi();break}return gi}function mlt(e,t){for(;Pi()&&e+sr!==57;)if(e+sr===84&&rs()===47)break;return"/*"+k_(t,gi-1)+"*"+EA(e===47?e:Pi())}function ylt(e){for(;!fp(rs());)Pi();return k_(e,gi)}function _lt(e){return plt(bm("",null,null,null,[""],e=dlt(e),0,[0],e))}function bm(e,t,r,n,i,a,o,s,l){for(var u=0,c=0,h=o,f=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Pi()){case 40:if(p!=108&&Vc(w,h-1)==58){ult(w+=_m(sb(y),"&","&\f"),"&\f",gW(u?s[u-1]:0))!=-1&&(m=-1);break}case 34:case 39:case 91:w+=sb(y);break;case 9:case 10:case 13:case 32:w+=vlt(p);break;case 92:w+=glt(xm()-1,7);continue;case 47:switch(rs()){case 42:case 47:jv(xlt(mlt(Pi(),xm()),t,r,l),l),(fp(p||1)==5||fp(rs()||1)==5)&&fa(w)&&uh(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*v:s[u++]=fa(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=_m(w,/\f/g,"")),d>0&&(fa(w)-h||v===0&&p===47)&&jv(d>32?TM(w+";",n,r,h-1,l):TM(_m(w," ","")+";",n,r,h-2,l),l);break;case 59:w+=";";default:if(jv(S=CM(w,t,r,u,c,i,s,_,x=[],b=[],h,a),a),y===123)if(c===0)bm(w,t,S,S,x,a,h,s,b);else{switch(f){case 99:if(Vc(w,3)===110)break;case 108:if(Vc(w,2)===97)break;default:c=0;case 100:case 109:case 115:}c?bm(e,S,S,n&&jv(CM(e,S,S,0,0,i,s,_,i,x=[],h,b),b),i,b,h,s,n?x:b):bm(w,S,S,S,[""],b,0,s,b)}}u=c=d=0,v=m=1,_=w="",h=o;break;case 58:h=1+fa(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&flt()==125)continue}switch(w+=EA(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[u++]=(fa(w)-1)*m,m=1;break;case 64:rs()===45&&(w+=sb(Pi())),f=rs(),c=h=fa(_=w+=ylt(xm())),y++;break;case 45:p===45&&fa(w)==2&&(v=0)}}return a}function CM(e,t,r,n,i,a,o,s,l,u,c,h){for(var f=i-1,d=i===0?a:[""],p=clt(d),v=0,g=0,m=0;v<n;++v)for(var y=0,_=uh(e,f+1,f=gW(g=o[v])),x=e;y<p;++y)(x=mW(g>0?d[y]+" "+_:_m(_,/&\f/g,d[y])))&&(l[m++]=x);return MA(e,t,r,i===0?pW:s,l,u,c,h)}function xlt(e,t,r,n){return MA(e,t,r,dW,EA(hlt()),uh(e,2,-2),0,n)}function TM(e,t,r,n,i){return MA(e,t,r,vW,uh(e,0,n),uh(e,n+1,-1),n,i)}function Zw(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function blt(e,t,r,n){switch(e.type){case llt:if(e.children.length)break;case alt:case olt:case vW:return e.return=e.return||e.value;case dW:return"";case slt:return e.return=e.value+"{"+Zw(e.children,n)+"}";case pW:if(!fa(e.value=e.props.join(",")))return""}return fa(r=Zw(e.children,n))?e.return=e.value+"{"+r+"}":""}var Slt=kz(Object.keys,Object),wlt=Object.prototype,Clt=wlt.hasOwnProperty;function _W(e){if(!jp(e))return Slt(e);var t=[];for(var r in Object(e))Clt.call(e,r)&&r!="constructor"&&t.push(r);return t}var Kw=bu(Ga,"DataView"),Jw=bu(Ga,"Promise"),Ly=bu(Ga,"Set"),Qw=bu(Ga,"WeakMap"),AM="[object Map]",Tlt="[object Object]",kM="[object Promise]",DM="[object Set]",LM="[object WeakMap]",EM="[object DataView]",Alt=xu(Kw),klt=xu(sp),Dlt=xu(Jw),Llt=xu(Ly),Elt=xu(Qw);exports.getTag=_u;(Kw&&exports.getTag(new Kw(new ArrayBuffer(1)))!=EM||sp&&exports.getTag(new sp)!=AM||Jw&&exports.getTag(Jw.resolve())!=kM||Ly&&exports.getTag(new Ly)!=DM||Qw&&exports.getTag(new Qw)!=LM)&&(exports.getTag=function(e){var t=_u(e),r=t==Tlt?e.constructor:void 0,n=r?xu(r):"";if(n)switch(n){case Alt:return EM;case klt:return AM;case Dlt:return kM;case Llt:return DM;case Elt:return LM}return t});var Mlt="[object Map]",Ilt="[object Set]",Plt=Object.prototype,Rlt=Plt.hasOwnProperty;function tC(e){if(e==null)return!0;if(Up(e)&&(up(e)||typeof e=="string"||typeof e.splice=="function"||g_(e)||m_(e)||lp(e)))return!e.length;var t=exports.getTag(e);if(t==Mlt||t==Ilt)return!e.size;if(jp(e))return!_W(e).length;for(var r in e)if(Rlt.call(e,r))return!1;return!0}var xW="c4",Nlt=E(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Olt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-DQvyOnuU.cjs"));return{id:xW,diagram:e}},"loader"),Blt={id:xW,detector:Nlt,loader:Olt},Flt=Blt,bW="flowchart",$lt=E((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Vlt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DXIIYxFi.cjs"));return{id:bW,diagram:e}},"loader"),zlt={id:bW,detector:$lt,loader:Vlt},Glt=zlt,SW="flowchart-v2",Wlt=E((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"),Hlt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DXIIYxFi.cjs"));return{id:SW,diagram:e}},"loader"),jlt={id:SW,detector:Wlt,loader:Hlt},Ult=jlt,wW="er",qlt=E(e=>/^\s*erDiagram/.test(e),"detector"),Ylt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-BSr3wCCt.cjs"));return{id:wW,diagram:e}},"loader"),Xlt={id:wW,detector:qlt,loader:Ylt},Zlt=Xlt,CW="gitGraph",Klt=E(e=>/^\s*gitGraph/.test(e),"detector"),Jlt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-Cpb6WlC2.cjs"));return{id:CW,diagram:e}},"loader"),Qlt={id:CW,detector:Klt,loader:Jlt},tut=Qlt,TW="gantt",eut=E(e=>/^\s*gantt/.test(e),"detector"),rut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-ChBGXvIi.cjs"));return{id:TW,diagram:e}},"loader"),nut={id:TW,detector:eut,loader:rut},iut=nut,AW="info",aut=E(e=>/^\s*info/.test(e),"detector"),out=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-F6ZHWCRC-Ch9jHYYl.cjs"));return{id:AW,diagram:e}},"loader"),sut={id:AW,detector:aut,loader:out},kW="pie",lut=E(e=>/^\s*pie/.test(e),"detector"),uut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-DyphgS4x.cjs"));return{id:kW,diagram:e}},"loader"),cut={id:kW,detector:lut,loader:uut},DW="quadrantChart",hut=E(e=>/^\s*quadrantChart/.test(e),"detector"),fut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-B4k0pjeO.cjs"));return{id:DW,diagram:e}},"loader"),dut={id:DW,detector:hut,loader:fut},put=dut,LW="xychart",vut=E(e=>/^\s*xychart(-beta)?/.test(e),"detector"),gut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-CZpnOjvp.cjs"));return{id:LW,diagram:e}},"loader"),mut={id:LW,detector:vut,loader:gut},yut=mut,EW="requirement",_ut=E(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),xut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-BRFanah7.cjs"));return{id:EW,diagram:e}},"loader"),but={id:EW,detector:_ut,loader:xut},Sut=but,MW="sequence",wut=E(e=>/^\s*sequenceDiagram/.test(e),"detector"),Cut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-BYobcK3J.cjs"));return{id:MW,diagram:e}},"loader"),Tut={id:MW,detector:wut,loader:Cut},Aut=Tut,IW="class",kut=E((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Dut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-CDyTGl1H.cjs"));return{id:IW,diagram:e}},"loader"),Lut={id:IW,detector:kut,loader:Dut},Eut=Lut,PW="classDiagram",Mut=E((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Iut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-CDyTGl1H.cjs"));return{id:PW,diagram:e}},"loader"),Put={id:PW,detector:Mut,loader:Iut},Rut=Put,RW="state",Nut=E((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),Out=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-CPG1iz7L.cjs"));return{id:RW,diagram:e}},"loader"),But={id:RW,detector:Nut,loader:Out},Fut=But,NW="stateDiagram",$ut=E((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Vut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-CAriny2a.cjs"));return{id:NW,diagram:e}},"loader"),zut={id:NW,detector:$ut,loader:Vut},Gut=zut,OW="journey",Wut=E(e=>/^\s*journey/.test(e),"detector"),Hut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-CNWXX95-.cjs"));return{id:OW,diagram:e}},"loader"),jut={id:OW,detector:Wut,loader:Hut},Uut=jut,qut=E((e,t,r)=>{lt.debug(`rendering svg for syntax error
297
- `);const n=P3(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),E2(n,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),BW={draw:qut},Yut=BW,Xut={db:{},renderer:BW,parser:{parse:E(()=>{},"parse")}},Zut=Xut,FW="flowchart-elk",Kut=E((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),Jut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DXIIYxFi.cjs"));return{id:FW,diagram:e}},"loader"),Qut={id:FW,detector:Kut,loader:Jut},tct=Qut,$W="timeline",ect=E(e=>/^\s*timeline/.test(e),"detector"),rct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-CA_ns01i.cjs"));return{id:$W,diagram:e}},"loader"),nct={id:$W,detector:ect,loader:rct},ict=nct,VW="mindmap",act=E(e=>/^\s*mindmap/.test(e),"detector"),oct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-B0v1l_mf.cjs"));return{id:VW,diagram:e}},"loader"),sct={id:VW,detector:act,loader:oct},lct=sct,zW="kanban",uct=E(e=>/^\s*kanban/.test(e),"detector"),cct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-DzqByhlj.cjs"));return{id:zW,diagram:e}},"loader"),hct={id:zW,detector:uct,loader:cct},fct=hct,GW="sankey",dct=E(e=>/^\s*sankey(-beta)?/.test(e),"detector"),pct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-Bl_cLWbZ.cjs"));return{id:GW,diagram:e}},"loader"),vct={id:GW,detector:dct,loader:pct},gct=vct,WW="packet",mct=E(e=>/^\s*packet(-beta)?/.test(e),"detector"),yct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-CYCHTx3p.cjs"));return{id:WW,diagram:e}},"loader"),_ct={id:WW,detector:mct,loader:yct},HW="radar",xct=E(e=>/^\s*radar-beta/.test(e),"detector"),bct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-C-csoKRw.cjs"));return{id:HW,diagram:e}},"loader"),Sct={id:HW,detector:xct,loader:bct},jW="block",wct=E(e=>/^\s*block(-beta)?/.test(e),"detector"),Cct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-BTyE8xuu.cjs"));return{id:jW,diagram:e}},"loader"),Tct={id:jW,detector:wct,loader:Cct},Act=Tct,UW="architecture",kct=E(e=>/^\s*architecture/.test(e),"detector"),Dct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-DlUHisI3.cjs"));return{id:UW,diagram:e}},"loader"),Lct={id:UW,detector:kct,loader:Dct},Ect=Lct,qW="treemap",Mct=E(e=>/^\s*treemap/.test(e),"detector"),Ict=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-CToKf0j9.cjs"));return{id:qW,diagram:e}},"loader"),Pct={id:qW,detector:Mct,loader:Ict},MM=!1,D_=E(()=>{MM||(MM=!0,ey("error",Zut,e=>e.toLowerCase().trim()==="error"),ey("---",{db:{clear:E(()=>{},"clear")},styles:{},renderer:{draw:E(()=>{},"draw")},parser:{parse:E(()=>{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:E(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ew(tct,lct,Ect),ew(Flt,fct,Rut,Eut,Zlt,iut,sut,cut,Sut,Aut,Ult,Glt,ict,tut,Gut,Fut,Uut,put,gct,_ct,yut,Act,Sct,Pct))},"addDiagrams"),Rct=E(async()=>{lt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ql).map(async([r,{detector:n,loader:i}])=>{if(i)try{ow(r)}catch{try{const{diagram:a,id:o}=await i();ey(o,a,n)}catch(a){throw lt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ql[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){lt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)lt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Nct="graphics-document document";function YW(e,t){e.attr("role",Nct),t!==""&&e.attr("aria-roledescription",t)}E(YW,"setA11yDiagramInfo");function XW(e,t,r,n){if(e.insert!==void 0){if(r){const i=`chart-desc-${n}`;e.attr("aria-describedby",i),e.insert("desc",":first-child").attr("id",i).text(r)}if(t){const i=`chart-title-${n}`;e.attr("aria-labelledby",i),e.insert("title",":first-child").attr("id",i).text(t)}}}E(XW,"addSVGa11yTitleDescription");var Zl,eC=(Zl=class{constructor(t,r,n,i,a){this.type=t,this.text=r,this.db=n,this.parser=i,this.renderer=a}static async fromText(t,r={}){const n=zr(),i=D2(t,n);t=Nat(t)+`
296
+ L0,20`)},"requirement_arrow"),Qst=E((e,t,r)=>{const n=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");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),tlt={extension:$st,composition:Vst,aggregation:zst,dependency:Gst,lollipop:Wst,point:Hst,circle:jst,cross:Ust,barb:qst,only_one:Yst,zero_or_one:Xst,one_or_more:Zst,zero_or_more:Kst,requirement_arrow:Jst,requirement_contains:Qst},hW=Fst,elt={common:yu,getConfig:zr,insertCluster:V4,insertEdge:lW,insertEdgeLabel:aW,insertMarkers:hW,insertNode:LA,interpolateToCurve:sA,labelHelper:Yt,log:lt,positionEdgeLabel:oW},hp={},fW=E(e=>{for(const t of e)hp[t.name]=t},"registerLayoutLoaders"),rlt=E(()=>{fW([{name:"dagre",loader:E(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-Dez70xlt.cjs")),"loader")},{name:"cose-bilkent",loader:E(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-Dic_-Qu2.cjs")),"loader")}])},"registerDefaultLayoutLoaders");rlt();var nlt=E(async(e,t)=>{if(!(e.layoutAlgorithm in hp))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=hp[e.layoutAlgorithm];return(await r.loader()).render(e,t,elt,{algorithm:r.algorithm})},"render"),ilt=E((e="",{fallback:t="dagre"}={})=>{if(e in hp)return e;if(t in hp)return lt.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),dW="comm",pW="rule",vW="decl",alt="@import",olt="@namespace",slt="@keyframes",llt="@layer",gW=Math.abs,EA=String.fromCharCode;function mW(e){return e.trim()}function _m(e,t,r){return e.replace(t,r)}function ult(e,t,r){return e.indexOf(t,r)}function Vc(e,t){return e.charCodeAt(t)|0}function uh(e,t,r){return e.slice(t,r)}function fa(e){return e.length}function clt(e){return e.length}function jv(e,t){return t.push(e),e}var A_=1,ch=1,yW=0,gi=0,sr=0,Bh="";function MA(e,t,r,n,i,a,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:A_,column:ch,length:o,return:"",siblings:s}}function hlt(){return sr}function flt(){return sr=gi>0?Vc(Bh,--gi):0,ch--,sr===10&&(ch=1,A_--),sr}function Pi(){return sr=gi<yW?Vc(Bh,gi++):0,ch++,sr===10&&(ch=1,A_++),sr}function rs(){return Vc(Bh,gi)}function xm(){return gi}function k_(e,t){return uh(Bh,e,t)}function fp(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 dlt(e){return A_=ch=1,yW=fa(Bh=e),gi=0,[]}function plt(e){return Bh="",e}function sb(e){return mW(k_(gi-1,Xw(e===91?e+2:e===40?e+1:e)))}function vlt(e){for(;(sr=rs())&&sr<33;)Pi();return fp(e)>2||fp(sr)>3?"":" "}function glt(e,t){for(;--t&&Pi()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return k_(e,xm()+(t<6&&rs()==32&&Pi()==32))}function Xw(e){for(;Pi();)switch(sr){case e:return gi;case 34:case 39:e!==34&&e!==39&&Xw(sr);break;case 40:e===41&&Xw(e);break;case 92:Pi();break}return gi}function mlt(e,t){for(;Pi()&&e+sr!==57;)if(e+sr===84&&rs()===47)break;return"/*"+k_(t,gi-1)+"*"+EA(e===47?e:Pi())}function ylt(e){for(;!fp(rs());)Pi();return k_(e,gi)}function _lt(e){return plt(bm("",null,null,null,[""],e=dlt(e),0,[0],e))}function bm(e,t,r,n,i,a,o,s,l){for(var u=0,c=0,h=o,f=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Pi()){case 40:if(p!=108&&Vc(w,h-1)==58){ult(w+=_m(sb(y),"&","&\f"),"&\f",gW(u?s[u-1]:0))!=-1&&(m=-1);break}case 34:case 39:case 91:w+=sb(y);break;case 9:case 10:case 13:case 32:w+=vlt(p);break;case 92:w+=glt(xm()-1,7);continue;case 47:switch(rs()){case 42:case 47:jv(xlt(mlt(Pi(),xm()),t,r,l),l),(fp(p||1)==5||fp(rs()||1)==5)&&fa(w)&&uh(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*v:s[u++]=fa(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=_m(w,/\f/g,"")),d>0&&(fa(w)-h||v===0&&p===47)&&jv(d>32?TM(w+";",n,r,h-1,l):TM(_m(w," ","")+";",n,r,h-2,l),l);break;case 59:w+=";";default:if(jv(S=CM(w,t,r,u,c,i,s,_,x=[],b=[],h,a),a),y===123)if(c===0)bm(w,t,S,S,x,a,h,s,b);else{switch(f){case 99:if(Vc(w,3)===110)break;case 108:if(Vc(w,2)===97)break;default:c=0;case 100:case 109:case 115:}c?bm(e,S,S,n&&jv(CM(e,S,S,0,0,i,s,_,i,x=[],h,b),b),i,b,h,s,n?x:b):bm(w,S,S,S,[""],b,0,s,b)}}u=c=d=0,v=m=1,_=w="",h=o;break;case 58:h=1+fa(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&flt()==125)continue}switch(w+=EA(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[u++]=(fa(w)-1)*m,m=1;break;case 64:rs()===45&&(w+=sb(Pi())),f=rs(),c=h=fa(_=w+=ylt(xm())),y++;break;case 45:p===45&&fa(w)==2&&(v=0)}}return a}function CM(e,t,r,n,i,a,o,s,l,u,c,h){for(var f=i-1,d=i===0?a:[""],p=clt(d),v=0,g=0,m=0;v<n;++v)for(var y=0,_=uh(e,f+1,f=gW(g=o[v])),x=e;y<p;++y)(x=mW(g>0?d[y]+" "+_:_m(_,/&\f/g,d[y])))&&(l[m++]=x);return MA(e,t,r,i===0?pW:s,l,u,c,h)}function xlt(e,t,r,n){return MA(e,t,r,dW,EA(hlt()),uh(e,2,-2),0,n)}function TM(e,t,r,n,i){return MA(e,t,r,vW,uh(e,0,n),uh(e,n+1,-1),n,i)}function Zw(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function blt(e,t,r,n){switch(e.type){case llt:if(e.children.length)break;case alt:case olt:case vW:return e.return=e.return||e.value;case dW:return"";case slt:return e.return=e.value+"{"+Zw(e.children,n)+"}";case pW:if(!fa(e.value=e.props.join(",")))return""}return fa(r=Zw(e.children,n))?e.return=e.value+"{"+r+"}":""}var Slt=kz(Object.keys,Object),wlt=Object.prototype,Clt=wlt.hasOwnProperty;function _W(e){if(!jp(e))return Slt(e);var t=[];for(var r in Object(e))Clt.call(e,r)&&r!="constructor"&&t.push(r);return t}var Kw=bu(Ga,"DataView"),Jw=bu(Ga,"Promise"),Ly=bu(Ga,"Set"),Qw=bu(Ga,"WeakMap"),AM="[object Map]",Tlt="[object Object]",kM="[object Promise]",DM="[object Set]",LM="[object WeakMap]",EM="[object DataView]",Alt=xu(Kw),klt=xu(sp),Dlt=xu(Jw),Llt=xu(Ly),Elt=xu(Qw);exports.getTag=_u;(Kw&&exports.getTag(new Kw(new ArrayBuffer(1)))!=EM||sp&&exports.getTag(new sp)!=AM||Jw&&exports.getTag(Jw.resolve())!=kM||Ly&&exports.getTag(new Ly)!=DM||Qw&&exports.getTag(new Qw)!=LM)&&(exports.getTag=function(e){var t=_u(e),r=t==Tlt?e.constructor:void 0,n=r?xu(r):"";if(n)switch(n){case Alt:return EM;case klt:return AM;case Dlt:return kM;case Llt:return DM;case Elt:return LM}return t});var Mlt="[object Map]",Ilt="[object Set]",Plt=Object.prototype,Rlt=Plt.hasOwnProperty;function tC(e){if(e==null)return!0;if(Up(e)&&(up(e)||typeof e=="string"||typeof e.splice=="function"||g_(e)||m_(e)||lp(e)))return!e.length;var t=exports.getTag(e);if(t==Mlt||t==Ilt)return!e.size;if(jp(e))return!_W(e).length;for(var r in e)if(Rlt.call(e,r))return!1;return!0}var xW="c4",Nlt=E(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Olt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-mLXX3lzU.cjs"));return{id:xW,diagram:e}},"loader"),Blt={id:xW,detector:Nlt,loader:Olt},Flt=Blt,bW="flowchart",$lt=E((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Vlt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BeoT8u5w.cjs"));return{id:bW,diagram:e}},"loader"),zlt={id:bW,detector:$lt,loader:Vlt},Glt=zlt,SW="flowchart-v2",Wlt=E((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"),Hlt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BeoT8u5w.cjs"));return{id:SW,diagram:e}},"loader"),jlt={id:SW,detector:Wlt,loader:Hlt},Ult=jlt,wW="er",qlt=E(e=>/^\s*erDiagram/.test(e),"detector"),Ylt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-DfXsPvCr.cjs"));return{id:wW,diagram:e}},"loader"),Xlt={id:wW,detector:qlt,loader:Ylt},Zlt=Xlt,CW="gitGraph",Klt=E(e=>/^\s*gitGraph/.test(e),"detector"),Jlt=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-B5hkK0V5.cjs"));return{id:CW,diagram:e}},"loader"),Qlt={id:CW,detector:Klt,loader:Jlt},tut=Qlt,TW="gantt",eut=E(e=>/^\s*gantt/.test(e),"detector"),rut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-DFo-OByh.cjs"));return{id:TW,diagram:e}},"loader"),nut={id:TW,detector:eut,loader:rut},iut=nut,AW="info",aut=E(e=>/^\s*info/.test(e),"detector"),out=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-F6ZHWCRC-BGgfhkE3.cjs"));return{id:AW,diagram:e}},"loader"),sut={id:AW,detector:aut,loader:out},kW="pie",lut=E(e=>/^\s*pie/.test(e),"detector"),uut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-Bedfo3Wq.cjs"));return{id:kW,diagram:e}},"loader"),cut={id:kW,detector:lut,loader:uut},DW="quadrantChart",hut=E(e=>/^\s*quadrantChart/.test(e),"detector"),fut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-73dC68tI.cjs"));return{id:DW,diagram:e}},"loader"),dut={id:DW,detector:hut,loader:fut},put=dut,LW="xychart",vut=E(e=>/^\s*xychart(-beta)?/.test(e),"detector"),gut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-CwRU4l2m.cjs"));return{id:LW,diagram:e}},"loader"),mut={id:LW,detector:vut,loader:gut},yut=mut,EW="requirement",_ut=E(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),xut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-Cd0Ta0fS.cjs"));return{id:EW,diagram:e}},"loader"),but={id:EW,detector:_ut,loader:xut},Sut=but,MW="sequence",wut=E(e=>/^\s*sequenceDiagram/.test(e),"detector"),Cut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-Ch-xgk0a.cjs"));return{id:MW,diagram:e}},"loader"),Tut={id:MW,detector:wut,loader:Cut},Aut=Tut,IW="class",kut=E((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Dut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-DrIoV3T-.cjs"));return{id:IW,diagram:e}},"loader"),Lut={id:IW,detector:kut,loader:Dut},Eut=Lut,PW="classDiagram",Mut=E((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Iut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-DrIoV3T-.cjs"));return{id:PW,diagram:e}},"loader"),Put={id:PW,detector:Mut,loader:Iut},Rut=Put,RW="state",Nut=E((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),Out=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-B-s9k70t.cjs"));return{id:RW,diagram:e}},"loader"),But={id:RW,detector:Nut,loader:Out},Fut=But,NW="stateDiagram",$ut=E((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Vut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-MwS6m11m.cjs"));return{id:NW,diagram:e}},"loader"),zut={id:NW,detector:$ut,loader:Vut},Gut=zut,OW="journey",Wut=E(e=>/^\s*journey/.test(e),"detector"),Hut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-_q47PPFe.cjs"));return{id:OW,diagram:e}},"loader"),jut={id:OW,detector:Wut,loader:Hut},Uut=jut,qut=E((e,t,r)=>{lt.debug(`rendering svg for syntax error
297
+ `);const n=P3(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),E2(n,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),BW={draw:qut},Yut=BW,Xut={db:{},renderer:BW,parser:{parse:E(()=>{},"parse")}},Zut=Xut,FW="flowchart-elk",Kut=E((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),Jut=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BeoT8u5w.cjs"));return{id:FW,diagram:e}},"loader"),Qut={id:FW,detector:Kut,loader:Jut},tct=Qut,$W="timeline",ect=E(e=>/^\s*timeline/.test(e),"detector"),rct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-BjzBVe0q.cjs"));return{id:$W,diagram:e}},"loader"),nct={id:$W,detector:ect,loader:rct},ict=nct,VW="mindmap",act=E(e=>/^\s*mindmap/.test(e),"detector"),oct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-CQPM_zhD.cjs"));return{id:VW,diagram:e}},"loader"),sct={id:VW,detector:act,loader:oct},lct=sct,zW="kanban",uct=E(e=>/^\s*kanban/.test(e),"detector"),cct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-zHukPxII.cjs"));return{id:zW,diagram:e}},"loader"),hct={id:zW,detector:uct,loader:cct},fct=hct,GW="sankey",dct=E(e=>/^\s*sankey(-beta)?/.test(e),"detector"),pct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-Coc4H987.cjs"));return{id:GW,diagram:e}},"loader"),vct={id:GW,detector:dct,loader:pct},gct=vct,WW="packet",mct=E(e=>/^\s*packet(-beta)?/.test(e),"detector"),yct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-BmiebNze.cjs"));return{id:WW,diagram:e}},"loader"),_ct={id:WW,detector:mct,loader:yct},HW="radar",xct=E(e=>/^\s*radar-beta/.test(e),"detector"),bct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-D5fp7M3l.cjs"));return{id:HW,diagram:e}},"loader"),Sct={id:HW,detector:xct,loader:bct},jW="block",wct=E(e=>/^\s*block(-beta)?/.test(e),"detector"),Cct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-D3431SfW.cjs"));return{id:jW,diagram:e}},"loader"),Tct={id:jW,detector:wct,loader:Cct},Act=Tct,UW="architecture",kct=E(e=>/^\s*architecture/.test(e),"detector"),Dct=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-DA8C_GTw.cjs"));return{id:UW,diagram:e}},"loader"),Lct={id:UW,detector:kct,loader:Dct},Ect=Lct,qW="treemap",Mct=E(e=>/^\s*treemap/.test(e),"detector"),Ict=E(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-CWaZA0wa.cjs"));return{id:qW,diagram:e}},"loader"),Pct={id:qW,detector:Mct,loader:Ict},MM=!1,D_=E(()=>{MM||(MM=!0,ey("error",Zut,e=>e.toLowerCase().trim()==="error"),ey("---",{db:{clear:E(()=>{},"clear")},styles:{},renderer:{draw:E(()=>{},"draw")},parser:{parse:E(()=>{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:E(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ew(tct,lct,Ect),ew(Flt,fct,Rut,Eut,Zlt,iut,sut,cut,Sut,Aut,Ult,Glt,ict,tut,Gut,Fut,Uut,put,gct,_ct,yut,Act,Sct,Pct))},"addDiagrams"),Rct=E(async()=>{lt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ql).map(async([r,{detector:n,loader:i}])=>{if(i)try{ow(r)}catch{try{const{diagram:a,id:o}=await i();ey(o,a,n)}catch(a){throw lt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ql[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){lt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)lt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Nct="graphics-document document";function YW(e,t){e.attr("role",Nct),t!==""&&e.attr("aria-roledescription",t)}E(YW,"setA11yDiagramInfo");function XW(e,t,r,n){if(e.insert!==void 0){if(r){const i=`chart-desc-${n}`;e.attr("aria-describedby",i),e.insert("desc",":first-child").attr("id",i).text(r)}if(t){const i=`chart-title-${n}`;e.attr("aria-labelledby",i),e.insert("title",":first-child").attr("id",i).text(t)}}}E(XW,"addSVGa11yTitleDescription");var Zl,eC=(Zl=class{constructor(t,r,n,i,a){this.type=t,this.text=r,this.db=n,this.parser=i,this.renderer=a}static async fromText(t,r={}){const n=zr(),i=D2(t,n);t=Nat(t)+`
298
298
  `;try{ow(i)}catch{const u=MK(i);if(!u)throw new d$(`Diagram ${i} not found.`);const{id:c,diagram:h}=await u();ey(c,h)}const{db:a,parser:o,renderer:s,init:l}=ow(i);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new Zl(i,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},E(Zl,"Diagram"),Zl),IM=[],Oct=E(()=>{IM.forEach(e=>{e()}),IM=[]},"attachFunctions"),Bct=E(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ZW(e){const t=e.match(f$);if(!t)return{text:e,metadata:{}};let r=gz(t[1],{schema:vz})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:e.slice(t[0].length),metadata:n}}E(ZW,"extractFrontMatter");var Fct=E(e=>e.replace(/\r\n?/g,`
299
299
  `).replace(/<(\w+)([^>]*)>/g,(t,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),$ct=E(e=>{const{text:t,metadata:r}=ZW(e),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:t}},"processFrontmatter"),Vct=E(e=>{const t=si.detectInit(e)??{},r=si.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:Tat(e),directive:t}},"processDirectives");function IA(e){const t=Fct(e),r=$ct(t),n=Vct(r.text),i=y_(r.config,n.directive);return e=Bct(n.text),{code:e,title:r.title,config:i}}E(IA,"preprocessDiagram");function KW(e){const t=new TextEncoder().encode(e),r=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(r)}E(KW,"toBase64");var zct=5e4,Gct="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Wct="sandbox",Hct="loose",jct="http://www.w3.org/2000/svg",Uct="http://www.w3.org/1999/xlink",qct="http://www.w3.org/1999/xhtml",Yct="100%",Xct="100%",Zct="border:0;margin:0;",Kct="margin:0",Jct="allow-top-navigation-by-user-activation allow-popups",Qct='The "iframe" tag is not supported by your browser.',tht=["foreignobject"],eht=["dominant-baseline"];function PA(e){const t=IA(e);return Qm(),UK(t.config??{}),t}E(PA,"processAndSetConfigs");async function JW(e,t){D_();try{const{code:r,config:n}=PA(e);return{diagramType:(await tH(r)).type,config:n}}catch(r){if(t?.suppressErrors)return!1;throw r}}E(JW,"parse");var PM=E((e,t,r=[])=>`
300
300
  .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),rht=E((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-XgCunIin.cjs");exports.InfoModule=e.InfoModule;exports.createInfoServices=e.createInfoServices;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-B5DsarpA.cjs");exports.InfoModule=e.InfoModule;exports.createInfoServices=e.createInfoServices;
@@ -0,0 +1,5 @@
1
+ import { I as r, c as a } from "./mermaid-parser.core-CC7psYsF.js";
2
+ export {
3
+ r as InfoModule,
4
+ a as createInfoServices
5
+ };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CNy9ZBSN.cjs"),s=require("./mermaid-parser.core-XgCunIin.cjs");var o={parse:e.__name(async r=>{const a=await s.parse("info",r);e.log.debug(a)},"parse")},i={version:e.package_default.version+""},g=e.__name(()=>i.version,"getVersion"),d={getVersion:g},v=e.__name((r,a,n)=>{e.log.debug(`rendering info diagram
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DNFdUd9-.cjs"),s=require("./mermaid-parser.core-B5DsarpA.cjs");var o={parse:e.__name(async r=>{const a=await s.parse("info",r);e.log.debug(a)},"parse")},i={version:e.package_default.version+""},g=e.__name(()=>i.version,"getVersion"),d={getVersion:g},v=e.__name((r,a,n)=>{e.log.debug(`rendering info diagram
2
2
  `+r);const t=e.selectSvgElement(a);e.configureSvgSize(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),c={draw:v},p={parser:o,db:d,renderer:c};exports.diagram=p;