@luzmo/analytics-components-kit 1.0.4-beta.1 → 1.0.4-beta.3

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 (941) hide show
  1. package/README.md +1 -1
  2. package/components/ai-chat/index.cjs +1 -1
  3. package/components/ai-chat/index.js +1 -1
  4. package/components/ai-chat-CXt4wCe0.js +3715 -0
  5. package/components/ai-chat-Dnf-C838.cjs +258 -0
  6. package/components/ai-interaction-textarea/index.cjs +1 -1
  7. package/components/ai-interaction-textarea/index.js +1 -1
  8. package/components/ai-interaction-textarea-B_-aZ9mc.cjs +68 -0
  9. package/components/ai-interaction-textarea-DSrZkuh9.js +299 -0
  10. package/components/area-chart-options.config-BjdRY1sr.js +146 -0
  11. package/components/area-chart-options.config-CJYI-zcZ.cjs +20 -0
  12. package/components/area-chart-positioning.config-PZ-MmeDb.cjs +20 -0
  13. package/components/area-chart-positioning.config-hLhrDJ3v.js +55 -0
  14. package/components/area-chart-slots.config-B56LJaky.cjs +20 -0
  15. package/components/area-chart-slots.config-BpvvqFy_.js +55 -0
  16. package/components/bar-chart-options.config-D2a-U6kG.cjs +20 -0
  17. package/components/bar-chart-options.config-DxNHV39Y.js +220 -0
  18. package/components/bar-chart-positioning.config-C6wWTn1o.js +59 -0
  19. package/components/bar-chart-positioning.config-DI8tOMbI.cjs +20 -0
  20. package/components/bar-chart-slots.config-CfIirCOX.js +50 -0
  21. package/components/bar-chart-slots.config-CkOVmYcA.cjs +20 -0
  22. package/components/base-BCmPH4SF.cjs +20 -0
  23. package/components/base-DYkpEuMf.js +249 -0
  24. package/components/base-store-D0jbv0bE.js +160 -0
  25. package/components/base-store-ab2wBsBE.cjs +20 -0
  26. package/components/box-plot-options.config-CXey4hvi.js +296 -0
  27. package/components/box-plot-options.config-Di28EvZb.cjs +20 -0
  28. package/components/box-plot-positioning.config-D_qhNWth.cjs +20 -0
  29. package/components/box-plot-positioning.config-XG-WcIlA.js +48 -0
  30. package/components/box-plot-slots.config-DL-tTTn9.cjs +20 -0
  31. package/components/box-plot-slots.config-DclNulnH.js +40 -0
  32. package/components/bubble-chart-options.config-CeaOv4eF.js +115 -0
  33. package/components/bubble-chart-options.config-CnpBrIo6.cjs +20 -0
  34. package/components/bubble-chart-positioning.config-CHYBh_Nb.cjs +20 -0
  35. package/components/bubble-chart-positioning.config-o_r-GWQG.js +55 -0
  36. package/components/bubble-chart-slots.config-D7vQta7G.js +47 -0
  37. package/components/bubble-chart-slots.config-smlOOwcK.cjs +20 -0
  38. package/components/bullet-chart-options.config-6nATAuC3.cjs +20 -0
  39. package/components/bullet-chart-options.config-CLn7sV4W.js +75 -0
  40. package/components/bullet-chart-positioning.config-BF8PflF6.cjs +20 -0
  41. package/components/bullet-chart-positioning.config-DE5oy4M6.js +56 -0
  42. package/components/bullet-chart-slots.config-BaTbWYvU.cjs +20 -0
  43. package/components/bullet-chart-slots.config-IX7zJWc7.js +46 -0
  44. package/components/choropleth-map-options.config-CmtZtBAC.cjs +20 -0
  45. package/components/choropleth-map-options.config-DzTlJSO3.js +348 -0
  46. package/components/choropleth-map-positioning.config-Cf8bEIns.js +55 -0
  47. package/components/choropleth-map-positioning.config-DT1WWljP.cjs +20 -0
  48. package/components/choropleth-map-slots.config-ClMcW8wV.cjs +20 -0
  49. package/components/choropleth-map-slots.config-y0y9rf6i.js +53 -0
  50. package/components/circle-pack-chart-options.config-BA_G1sQ8.cjs +20 -0
  51. package/components/circle-pack-chart-options.config-DoLPbnPq.js +54 -0
  52. package/components/circle-pack-chart-positioning.config-DDpnake6.cjs +20 -0
  53. package/components/circle-pack-chart-positioning.config-Dy-DZ_de.js +48 -0
  54. package/components/circle-pack-chart-slots.config-IH2KV7z1.cjs +20 -0
  55. package/components/circle-pack-chart-slots.config-X9WVAykN.js +38 -0
  56. package/components/circular-gauge-options.config-BPUFjqx8.js +188 -0
  57. package/components/circular-gauge-options.config-BtP-YDIr.cjs +20 -0
  58. package/components/circular-gauge-positioning.config-D2t_3T1J.cjs +20 -0
  59. package/components/circular-gauge-positioning.config-DljBe7e-.js +48 -0
  60. package/components/circular-gauge-slots.config-B6ajddW-.cjs +20 -0
  61. package/components/circular-gauge-slots.config-NIEmIAIG.js +39 -0
  62. package/components/color-CXw2IfjN.js +3812 -0
  63. package/components/color-range-utils-u4ziqRRA.js +63 -0
  64. package/components/column-chart-options.config-DQts3cE4.js +219 -0
  65. package/components/column-chart-options.config-eJ1Cexxe.cjs +20 -0
  66. package/components/column-chart-positioning.config-Bob00Qnq.js +55 -0
  67. package/components/column-chart-positioning.config-Uvvr5PxW.cjs +20 -0
  68. package/components/column-chart-slots.config-BY6y_rvE.cjs +20 -0
  69. package/components/column-chart-slots.config-CoFarLvo.js +50 -0
  70. package/components/combination-chart-options.config-C3kZ2fpK.cjs +20 -0
  71. package/components/combination-chart-options.config-CjSV6Ic4.js +87 -0
  72. package/components/combination-chart-positioning.config-BzbcDQ2O.cjs +20 -0
  73. package/components/combination-chart-positioning.config-DG2CM16I.js +48 -0
  74. package/components/combination-chart-slots.config-BGRHSwfr.js +43 -0
  75. package/components/combination-chart-slots.config-Ciza_y3a.cjs +20 -0
  76. package/components/conditional-number-options.config-CZFqw31c.js +205 -0
  77. package/components/conditional-number-options.config-CadHLi0m.cjs +20 -0
  78. package/components/conditional-number-positioning.config-CT8PqxDT.js +48 -0
  79. package/components/conditional-number-positioning.config-DpORiYgh.cjs +20 -0
  80. package/components/conditional-number-slots.config-CWX6OuUa.cjs +20 -0
  81. package/components/conditional-number-slots.config-r_C8T2HH.js +39 -0
  82. package/components/convert-data-field-to-slot-content-BQkSy_8B.cjs +20 -0
  83. package/components/convert-data-field-to-slot-content-C6IIqU7G.js +53 -0
  84. package/components/data-broker-BH5WDG0j.cjs +20 -0
  85. package/components/data-broker-CVDImE1j.js +1674 -0
  86. package/components/data-field/index.cjs +1 -1
  87. package/components/data-field/index.js +1 -1
  88. package/components/data-field-CxUItUcs.cjs +54 -0
  89. package/components/data-field-RzkD37hR.js +121 -0
  90. package/components/data-field-level/index.cjs +1 -1
  91. package/components/data-field-level/index.js +1 -1
  92. package/components/data-field-level-55bJkqFt.cjs +55 -0
  93. package/components/data-field-level-zbu4U2m5.js +246 -0
  94. package/components/data-field-panel/index.cjs +1 -1
  95. package/components/data-field-panel/index.js +1 -1
  96. package/components/data-field-panel-C3O77CIF.cjs +87 -0
  97. package/components/data-field-panel-Ob-hNZwz.js +385 -0
  98. package/components/data-fields-select/index.cjs +1 -1
  99. package/components/data-fields-select/index.js +1 -1
  100. package/components/data-fields-select-CYQy6Ow-.js +262 -0
  101. package/components/data-fields-select-D-nSjOep.cjs +41 -0
  102. package/components/dataset-icon/index.js +1 -1
  103. package/components/dataset-icon-BXEgg_8O.js +125 -0
  104. package/components/dataset-selector-list/index.cjs +1 -1
  105. package/components/dataset-selector-list/index.js +1 -1
  106. package/components/dataset-selector-list-BW5v_7_L.cjs +75 -0
  107. package/components/dataset-selector-list-DwfeaUGu.js +313 -0
  108. package/components/dataset-selector-row/index.cjs +1 -1
  109. package/components/dataset-selector-row/index.js +1 -1
  110. package/components/dataset-selector-row-BU7YhT7l.cjs +79 -0
  111. package/components/dataset-selector-row-CLbx0joD.js +273 -0
  112. package/components/date-comparison-filter-options.config--clPxHFt.cjs +20 -0
  113. package/components/date-comparison-filter-options.config-s16IGX_4.js +126 -0
  114. package/components/date-comparison-filter-slots.config-DQBKeCRX.js +33 -0
  115. package/components/date-comparison-filter-slots.config-KO9B0lfS.cjs +20 -0
  116. package/components/date-filter-options.config-BdNFe-Ds.cjs +20 -0
  117. package/components/date-filter-options.config-ChFEIjN3.js +118 -0
  118. package/components/date-filter-slots.config-BrQoD-EF.cjs +20 -0
  119. package/components/date-filter-slots.config-DREsncpE.js +37 -0
  120. package/components/de-BY1wWZE8.cjs +20 -0
  121. package/components/de-D-xQoqdB.js +473 -0
  122. package/components/decorate-CaYbmmmm.js +28 -0
  123. package/components/display-settings/index.cjs +1 -1
  124. package/components/display-settings/index.js +1 -1
  125. package/components/display-settings-COYLimuI.cjs +120 -0
  126. package/components/display-settings-ajA8j6kr.js +272 -0
  127. package/components/display-settings-binning/index.cjs +1 -1
  128. package/components/display-settings-binning/index.js +1 -1
  129. package/components/display-settings-binning-GKaol6nW.cjs +56 -0
  130. package/components/display-settings-binning-MHns2Ns6.js +110 -0
  131. package/components/display-settings-datetime/index.cjs +1 -1
  132. package/components/display-settings-datetime/index.js +1 -1
  133. package/components/display-settings-datetime-CLRXVpld.cjs +217 -0
  134. package/components/display-settings-datetime-D5eBAfWQ.js +413 -0
  135. package/components/display-settings-grand-totals/index.cjs +1 -1
  136. package/components/display-settings-grand-totals/index.js +1 -1
  137. package/components/display-settings-grand-totals-CpulhtNX.js +89 -0
  138. package/components/display-settings-grand-totals-DltI_Z-x.cjs +44 -0
  139. package/components/display-settings-numeric/index.cjs +1 -1
  140. package/components/display-settings-numeric/index.js +1 -1
  141. package/components/display-settings-numeric-CurqaTi5.cjs +190 -0
  142. package/components/display-settings-numeric-DnyXOV_x.js +479 -0
  143. package/components/display-settings-period-over-period/index.cjs +1 -1
  144. package/components/display-settings-period-over-period/index.js +1 -1
  145. package/components/display-settings-period-over-period-DP2grX4n.cjs +229 -0
  146. package/components/display-settings-period-over-period-Do4qG7yY.js +433 -0
  147. package/components/donut-chart-options.config-K-HkE7sL.cjs +20 -0
  148. package/components/donut-chart-options.config-WNOpb2n9.js +207 -0
  149. package/components/donut-chart-positioning.config-BLnTmwTZ.cjs +20 -0
  150. package/components/donut-chart-positioning.config-Bl96um6F.js +48 -0
  151. package/components/donut-chart-slots.config-DEQ3Cw6c.js +39 -0
  152. package/components/donut-chart-slots.config-RxPnpO6M.cjs +20 -0
  153. package/components/dropdown-filter-options.config-B-Vvy0Nq.cjs +20 -0
  154. package/components/dropdown-filter-options.config-DBNawOPR.js +153 -0
  155. package/components/dropdown-filter-slots.config-BBZChIHC.cjs +20 -0
  156. package/components/dropdown-filter-slots.config-DcStZGjV.js +38 -0
  157. package/components/en-B34alchz.cjs +20 -0
  158. package/components/en-GB-B3xz84vF.cjs +20 -0
  159. package/components/en-US-B34alchz.cjs +20 -0
  160. package/components/es-BIaD4kOL.cjs +20 -0
  161. package/components/es-CLnBAiLu.js +473 -0
  162. package/components/evolution-number-options.config-Bt1FZqqQ.cjs +20 -0
  163. package/components/evolution-number-options.config-CrIM2GTn.js +228 -0
  164. package/components/evolution-number-positioning.config-DSoC35zp.cjs +20 -0
  165. package/components/evolution-number-positioning.config-DXNPD29G.js +48 -0
  166. package/components/evolution-number-slots.config-Bq_JlxgK.js +37 -0
  167. package/components/evolution-number-slots.config-CYxdcD-x.cjs +20 -0
  168. package/components/filter-expression-picker/index.cjs +1 -1
  169. package/components/filter-expression-picker/index.js +1 -1
  170. package/components/filter-expression-picker-0eNf_L9I.cjs +38 -0
  171. package/components/filter-expression-picker-D_buTmzJ.js +425 -0
  172. package/components/filter-item/index.cjs +1 -1
  173. package/components/filter-item/index.js +1 -1
  174. package/components/filter-item-DGnRmeaB.cjs +58 -0
  175. package/components/filter-item-VzEHDr04.js +242 -0
  176. package/components/filter-parameter-picker/index.js +1 -1
  177. package/components/filter-value-picker/index.cjs +1 -1
  178. package/components/filter-value-picker/index.js +1 -1
  179. package/components/filter-value-picker-C1lDTmKM.cjs +60 -0
  180. package/components/filter-value-picker-CIblY-PW.js +151 -0
  181. package/components/filter-value-picker-datetime/index.cjs +1 -1
  182. package/components/filter-value-picker-datetime/index.js +1 -1
  183. package/components/filter-value-picker-datetime-DQpEf_tv.js +139 -0
  184. package/components/filter-value-picker-datetime-dCo1_pma.cjs +42 -0
  185. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  186. package/components/filter-value-picker-hierarchy/index.js +1 -1
  187. package/components/filter-value-picker-hierarchy-DaZlasgM.cjs +47 -0
  188. package/components/filter-value-picker-hierarchy-DzHUrpyk.js +232 -0
  189. package/components/filter-value-picker-numeric/index.cjs +1 -1
  190. package/components/filter-value-picker-numeric/index.js +1 -1
  191. package/components/filter-value-picker-numeric-BU975w8c.js +219 -0
  192. package/components/filter-value-picker-numeric-D-dUSGAP.cjs +48 -0
  193. package/components/filters/index.cjs +1 -1
  194. package/components/filters/index.js +1 -1
  195. package/components/filters-BgTnxSKg.js +400 -0
  196. package/components/filters-Cx1S1-vx.cjs +150 -0
  197. package/components/formatter-8m-wrIM-.cjs +20 -0
  198. package/components/formula/index.cjs +1 -1
  199. package/components/formula/index.js +1 -1
  200. package/components/formula-CeDEKB7D.js +138 -0
  201. package/components/formula-D7E8UieE.cjs +45 -0
  202. package/components/formula-codemirror-CFMYytMd.cjs +215 -0
  203. package/components/formula-codemirror-MygWCu2u.js +11973 -0
  204. package/components/formula-display-store-BYa910x_.js +1086 -0
  205. package/components/formula-display-store-DjjsQ5mW.cjs +20 -0
  206. package/components/formula-editor/index.cjs +1 -1
  207. package/components/formula-editor/index.js +3 -3
  208. package/components/formula-editor-4PoZ3BlC.cjs +218 -0
  209. package/components/formula-editor-DeYzzLDr.js +666 -0
  210. package/components/formula-field/index.cjs +1 -1
  211. package/components/formula-field/index.js +1 -1
  212. package/components/formula-field-DXdxspyY.js +40 -0
  213. package/components/formula-field-DkKXMIMg.cjs +20 -0
  214. package/components/formula-input-base-Bz_XVZcs.cjs +49 -0
  215. package/components/formula-input-base-Dok5ujvH.js +236 -0
  216. package/components/fr-CHG2Tcby.cjs +20 -0
  217. package/components/fr-DIwbOnwC.js +473 -0
  218. package/components/funnel-chart-options.config-BAIgb6x9.cjs +20 -0
  219. package/components/funnel-chart-options.config-k0X4rkj-.js +187 -0
  220. package/components/funnel-chart-positioning.config-BcsV1xp7.cjs +20 -0
  221. package/components/funnel-chart-positioning.config-CWSM8nTo.js +48 -0
  222. package/components/funnel-chart-slots.config-CSI5mdma.cjs +20 -0
  223. package/components/funnel-chart-slots.config-DKhaZf_r.js +43 -0
  224. package/components/get-css-variable-Bpma6ZOo.js +63 -0
  225. package/components/get-css-variable-rHTFFWYM.cjs +20 -0
  226. package/components/get-dataset-name-Dwuh7DWE.cjs +20 -0
  227. package/components/get-dataset-name-SfDNjsuR.js +27 -0
  228. package/components/groupings-BNrLlXIB.cjs +20 -0
  229. package/components/groupings-okwLJKoG.js +52 -0
  230. package/components/heat-map-options.config-Ct-93RVQ.cjs +20 -0
  231. package/components/heat-map-options.config-_xxAm6iG.js +224 -0
  232. package/components/heat-map-positioning.config-C0dkG5_9.cjs +20 -0
  233. package/components/heat-map-positioning.config-DQJP4mTG.js +48 -0
  234. package/components/heat-map-slots.config-BDfEGgq5.js +37 -0
  235. package/components/heat-map-slots.config-D0mwjImu.cjs +20 -0
  236. package/components/heat-table-options.config-7IS5wa9l.cjs +20 -0
  237. package/components/heat-table-options.config-DxRbWqJ8.js +372 -0
  238. package/components/heat-table-positioning.config-BzSpf7ed.cjs +20 -0
  239. package/components/heat-table-positioning.config-WUHNZPT-.js +55 -0
  240. package/components/heat-table-slots.config-CH6Q9203.cjs +20 -0
  241. package/components/heat-table-slots.config-CVh1TEJJ.js +49 -0
  242. package/components/hexbin-map-options.config-CUAv6zuD.cjs +20 -0
  243. package/components/hexbin-map-options.config-CmAmK-jM.js +276 -0
  244. package/components/hexbin-map-positioning.config-CJPhgdt2.js +48 -0
  245. package/components/hexbin-map-positioning.config-Cno9WIc9.cjs +20 -0
  246. package/components/hexbin-map-slots.config-BdkQVzI7.cjs +20 -0
  247. package/components/hexbin-map-slots.config-rxPZ4kwL.js +37 -0
  248. package/components/image-options.config-DJ2DEf7g.js +153 -0
  249. package/components/image-options.config-DXqA7sAa.cjs +20 -0
  250. package/components/image-slots.config-DprzKxj3.cjs +20 -0
  251. package/components/image-slots.config-bDNDmiWy.js +24 -0
  252. package/components/index.cjs +1 -1
  253. package/components/index.js +63 -62
  254. package/components/interactive-viz-item/helpers/chart-helpers.d.ts +7 -0
  255. package/components/interactive-viz-item/index.cjs +20 -0
  256. package/components/interactive-viz-item/index.d.ts +10 -0
  257. package/components/interactive-viz-item/index.js +28 -0
  258. package/components/interactive-viz-item/interactive-viz-item.d.ts +96 -0
  259. package/components/interactive-viz-item/types.d.ts +117 -0
  260. package/components/interactive-viz-item-63pap_oz.cjs +247 -0
  261. package/components/interactive-viz-item-QVji6wbp.js +693 -0
  262. package/components/item-grid/index.cjs +1 -1
  263. package/components/item-grid/index.js +1 -1
  264. package/components/item-grid-CO_cqGqJ.js +4559 -0
  265. package/components/item-grid-CRAoMdCq.cjs +113 -0
  266. package/components/item-option/index.cjs +1 -1
  267. package/components/item-option/index.js +1 -1
  268. package/components/item-option-Bc6qXONK.js +969 -0
  269. package/components/item-option-action-button-group/index.cjs +1 -1
  270. package/components/item-option-action-button-group/index.js +1 -1
  271. package/components/item-option-action-button-group-VpgTKSIV.js +118 -0
  272. package/components/item-option-action-button-group-jPUDKP3M.cjs +53 -0
  273. package/components/item-option-base-Bk9L8Ie7.cjs +56 -0
  274. package/components/item-option-base-VV7gyznL.js +123 -0
  275. package/components/item-option-color-palette-picker/index.cjs +1 -1
  276. package/components/item-option-color-palette-picker/index.js +1 -1
  277. package/components/item-option-color-palette-picker-CQgG_NPQ.js +2041 -0
  278. package/components/item-option-color-palette-picker-kch0Ep_5.cjs +40 -0
  279. package/components/item-option-color-picker/index.cjs +1 -1
  280. package/components/item-option-color-picker/index.js +1 -1
  281. package/components/item-option-color-picker-BmQBTQzb.js +87 -0
  282. package/components/item-option-color-picker-DeDwpICb.cjs +34 -0
  283. package/components/item-option-color-range/index.cjs +1 -1
  284. package/components/item-option-color-range/index.js +1 -1
  285. package/components/item-option-color-range-Cj6sZ72F.cjs +98 -0
  286. package/components/item-option-color-range-D2kHXssY.js +220 -0
  287. package/components/item-option-iQM2pOGK.cjs +252 -0
  288. package/components/item-option-multi-language-field/index.cjs +1 -1
  289. package/components/item-option-multi-language-field/index.js +1 -1
  290. package/components/item-option-multi-language-field-Cc9ph205.cjs +33 -0
  291. package/components/item-option-multi-language-field-DbqcqhhN.js +82 -0
  292. package/components/item-option-number-field/index.cjs +1 -1
  293. package/components/item-option-number-field/index.js +1 -1
  294. package/components/item-option-number-field-B6GFKuLN.cjs +38 -0
  295. package/components/item-option-number-field-BbCVJeXZ.js +102 -0
  296. package/components/item-option-panel/index.cjs +1 -1
  297. package/components/item-option-panel/index.js +1 -1
  298. package/components/item-option-panel-6UFGCcnF.cjs +67 -0
  299. package/components/item-option-panel-CrNZ0xIF.js +183 -0
  300. package/components/item-option-picker/index.cjs +1 -1
  301. package/components/item-option-picker/index.js +1 -1
  302. package/components/item-option-picker-DJKTAG9w.cjs +37 -0
  303. package/components/item-option-picker-YquXTQNY.js +77 -0
  304. package/components/item-option-position-picker/index.cjs +1 -1
  305. package/components/item-option-position-picker/index.js +1 -1
  306. package/components/item-option-position-picker-Csc4Y6dN.cjs +32 -0
  307. package/components/item-option-position-picker-DKvsF-VQ.js +117 -0
  308. package/components/item-option-positions-number-field/index.cjs +1 -1
  309. package/components/item-option-positions-number-field/index.js +1 -1
  310. package/components/item-option-positions-number-field-Bxcbu_IR.js +164 -0
  311. package/components/item-option-positions-number-field-DBV6Yekk.cjs +49 -0
  312. package/components/item-option-radio-button-group/index.cjs +1 -1
  313. package/components/item-option-radio-button-group/index.js +1 -1
  314. package/components/item-option-radio-button-group-Bzh4RtSn.cjs +37 -0
  315. package/components/item-option-radio-button-group-Cw-xUSUS.js +74 -0
  316. package/components/item-option-slider/index.cjs +1 -1
  317. package/components/item-option-slider/index.js +1 -1
  318. package/components/item-option-slider-BwQnaxvO.js +81 -0
  319. package/components/item-option-slider-DUqo3Fw0.cjs +33 -0
  320. package/components/item-option-switch/index.cjs +1 -1
  321. package/components/item-option-switch/index.js +1 -1
  322. package/components/item-option-switch-DBsakQjy.cjs +30 -0
  323. package/components/item-option-switch-IixoilYJ.js +69 -0
  324. package/components/item-option-text-field/index.cjs +1 -1
  325. package/components/item-option-text-field/index.js +1 -1
  326. package/components/item-option-text-field-B4V_sKnM.cjs +33 -0
  327. package/components/item-option-text-field-CdWylobQ.js +80 -0
  328. package/components/item-options-configs.cjs +1 -1
  329. package/components/item-options-configs.js +45 -45
  330. package/components/item-slot-drop/index.cjs +1 -1
  331. package/components/item-slot-drop/index.js +1 -1
  332. package/components/item-slot-drop-BmvMi3dI.js +324 -0
  333. package/components/item-slot-drop-D8KI2kny.cjs +91 -0
  334. package/components/item-slot-drop-panel/index.cjs +1 -1
  335. package/components/item-slot-drop-panel/index.js +1 -1
  336. package/components/item-slot-drop-panel-Crw-ktDj.cjs +57 -0
  337. package/components/item-slot-drop-panel-D5vaJidp.js +355 -0
  338. package/components/item-slot-picker/index.cjs +1 -1
  339. package/components/item-slot-picker/index.js +1 -1
  340. package/components/item-slot-picker-BZV33YoP.js +474 -0
  341. package/components/item-slot-picker-BgQAviso.cjs +158 -0
  342. package/components/item-slot-picker-panel/index.cjs +1 -1
  343. package/components/item-slot-picker-panel/index.js +1 -1
  344. package/components/item-slot-picker-panel-C26kZ4zE.cjs +81 -0
  345. package/components/item-slot-picker-panel-DyhRlAKN.js +448 -0
  346. package/components/item-slots-configs.cjs +1 -1
  347. package/components/item-slots-configs.js +45 -45
  348. package/components/line-chart-options.config-CfHRdG6O.js +168 -0
  349. package/components/line-chart-options.config-DKQ1k4lg.cjs +20 -0
  350. package/components/line-chart-positioning.config-Cfcgse1N.js +55 -0
  351. package/components/line-chart-positioning.config-pSGQm1C1.cjs +20 -0
  352. package/components/line-chart-slots.config-Cjp4btvG.cjs +20 -0
  353. package/components/line-chart-slots.config-DKy4D4Yt.js +55 -0
  354. package/components/load-data-fields-for-datasets-BVGaku2J.cjs +20 -0
  355. package/components/load-data-fields-for-datasets-DeXLqWt4.js +42 -0
  356. package/components/localized-mixin-BYWQe1fg.js +45 -0
  357. package/components/localized-mixin-DrK3QZNa.cjs +20 -0
  358. package/components/marker-map-options.config-C_aGdRQQ.js +117 -0
  359. package/components/marker-map-options.config-DBPPcGN4.cjs +20 -0
  360. package/components/marker-map-positioning.config-B-HitobG.cjs +20 -0
  361. package/components/marker-map-positioning.config-DTCPGbnG.js +48 -0
  362. package/components/marker-map-slots.config-BKRRAGwB.js +37 -0
  363. package/components/marker-map-slots.config-BOQ8AwRv.cjs +20 -0
  364. package/components/nl-C_g1Le3t.js +473 -0
  365. package/components/nl-PxN5EqzT.cjs +20 -0
  366. package/components/ohlc-chart-options.config-Bd-vLN0I.js +65 -0
  367. package/components/ohlc-chart-options.config-D9h-VLdq.cjs +20 -0
  368. package/components/ohlc-chart-positioning.config-D0kJJkXw.js +78 -0
  369. package/components/ohlc-chart-positioning.config-NhpIR1T3.cjs +20 -0
  370. package/components/ohlc-chart-slots.config-CUBUexI-.cjs +20 -0
  371. package/components/ohlc-chart-slots.config-DC8NCD0o.js +68 -0
  372. package/components/parallel-coordinates-plot-options.config-BUo6XxfP.js +42 -0
  373. package/components/parallel-coordinates-plot-options.config-ovgY0A7j.cjs +20 -0
  374. package/components/parallel-coordinates-plot-positioning.config-DLF0U4lZ.cjs +20 -0
  375. package/components/parallel-coordinates-plot-positioning.config-Dzd0eaka.js +48 -0
  376. package/components/parallel-coordinates-plot-slots.config-BXZ-NmbH.cjs +20 -0
  377. package/components/parallel-coordinates-plot-slots.config-Dy-9mztD.js +46 -0
  378. package/components/pivot-table-options.config-BxKo1DCU.cjs +20 -0
  379. package/components/pivot-table-options.config-DrzB4qVX.js +245 -0
  380. package/components/pivot-table-positioning.config-BvUjUkG3.cjs +20 -0
  381. package/components/pivot-table-positioning.config-PKXfqjiN.js +55 -0
  382. package/components/pivot-table-slots.config-OQe8tS40.js +55 -0
  383. package/components/pivot-table-slots.config-VxbOGtmB.cjs +20 -0
  384. package/components/pragmatic-element-adapter-BFUFSRw6.js +1252 -0
  385. package/components/pragmatic-element-adapter-CKhTZWGj.cjs +24 -0
  386. package/components/pyramid-chart-options.config-Dux8839h.js +240 -0
  387. package/components/pyramid-chart-options.config-lioHQSoq.cjs +20 -0
  388. package/components/pyramid-chart-positioning.config-48iZhPdi.cjs +20 -0
  389. package/components/pyramid-chart-positioning.config-C8yiD0R3.js +55 -0
  390. package/components/pyramid-chart-slots.config-CN_Q2YsP.cjs +20 -0
  391. package/components/pyramid-chart-slots.config-DwlZaBAF.js +50 -0
  392. package/components/radar-chart-options.config-ColtKo6Z.js +130 -0
  393. package/components/radar-chart-options.config-DhnoFEzo.cjs +20 -0
  394. package/components/radar-chart-positioning.config-CpqhJjoz.cjs +20 -0
  395. package/components/radar-chart-positioning.config-L5Eu5W1I.js +55 -0
  396. package/components/radar-chart-slots.config-BISYnTom.cjs +20 -0
  397. package/components/radar-chart-slots.config-BuHg4Zeg.js +53 -0
  398. package/components/regular-table-options.config-Bk6CBPgj.cjs +20 -0
  399. package/components/regular-table-options.config-DopdB4eB.js +148 -0
  400. package/components/regular-table-slots.config--SVEN5Cu.js +35 -0
  401. package/components/regular-table-slots.config-BU6Ff96U.cjs +20 -0
  402. package/components/route-map-options.config-BCuJw5k3.js +326 -0
  403. package/components/route-map-options.config-CAi93e7I.cjs +20 -0
  404. package/components/route-map-positioning.config-DTwMkeiu.cjs +20 -0
  405. package/components/route-map-positioning.config-DVb_Jiws.js +66 -0
  406. package/components/route-map-slots.config-CmVIxDkx.js +59 -0
  407. package/components/route-map-slots.config-Dznp0DT3.cjs +20 -0
  408. package/components/sankey-diagram-options.config-BH3kpjFs.js +126 -0
  409. package/components/sankey-diagram-options.config-D7ZrZV0g.cjs +20 -0
  410. package/components/sankey-diagram-positioning.config-Dk0siSAo.js +66 -0
  411. package/components/sankey-diagram-positioning.config-_kyrBnJ4.cjs +20 -0
  412. package/components/sankey-diagram-slots.config-TKCUvHOD.cjs +20 -0
  413. package/components/sankey-diagram-slots.config-lbkF8DWJ.js +61 -0
  414. package/components/scatter-plot-options.config-DXqKb34r.cjs +20 -0
  415. package/components/scatter-plot-options.config-Dn6ILlJw.js +302 -0
  416. package/components/scatter-plot-positioning.config-440yA7x5.js +77 -0
  417. package/components/scatter-plot-positioning.config-DaYstFV8.cjs +20 -0
  418. package/components/scatter-plot-slots.config-CPsk9FUg.cjs +20 -0
  419. package/components/scatter-plot-slots.config-DEFWWj0_.js +74 -0
  420. package/components/search-filter-options.config-DWKVxBc5.js +103 -0
  421. package/components/search-filter-options.config-DojMfRR_.cjs +20 -0
  422. package/components/search-filter-slots.config-AhwsTdYC.cjs +20 -0
  423. package/components/search-filter-slots.config-vyPYIXE7.js +39 -0
  424. package/components/set-locale-DB1FMgtK.js +43 -0
  425. package/components/set-locale-DKCZkJVL.cjs +20 -0
  426. package/components/slicer-filter-options.config-BhLn4U1W.cjs +20 -0
  427. package/components/slicer-filter-options.config-C6HPrjIw.js +226 -0
  428. package/components/slicer-filter-positioning.config-B6wPo539.js +48 -0
  429. package/components/slicer-filter-positioning.config-DdfTuXdV.cjs +20 -0
  430. package/components/slicer-filter-slots.config-BZWCSkX4.js +44 -0
  431. package/components/slicer-filter-slots.config-zV15NWWS.cjs +20 -0
  432. package/components/slider-filter-options.config-B8am9mmE.cjs +20 -0
  433. package/components/slider-filter-options.config-CvqHWJIX.js +72 -0
  434. package/components/slider-filter-slots.config-BY9X2rlz.js +43 -0
  435. package/components/slider-filter-slots.config-D9Hra0zE.cjs +20 -0
  436. package/components/slot-menu/index.cjs +1 -1
  437. package/components/slot-menu/index.js +1 -1
  438. package/components/slot-menu-BBnibMJU.cjs +64 -0
  439. package/components/slot-menu-list/index.cjs +1 -1
  440. package/components/slot-menu-list/index.js +1 -1
  441. package/components/slot-menu-list-D193fsQX.cjs +38 -0
  442. package/components/slot-menu-list-gKDiWsHB.js +325 -0
  443. package/components/slot-menu-w7sla2N0.js +400 -0
  444. package/components/slots-config-DIBoffEb.js +77 -0
  445. package/components/slots-config-YdyClHLc.cjs +20 -0
  446. package/components/speedometer-chart-options.config-DEW_D9w1.cjs +20 -0
  447. package/components/speedometer-chart-options.config-wX3KzciD.js +246 -0
  448. package/components/speedometer-chart-positioning.config-BVYrl1_s.cjs +20 -0
  449. package/components/speedometer-chart-positioning.config-rI2Jxymu.js +48 -0
  450. package/components/speedometer-chart-slots.config-0Tv8EtKT.js +39 -0
  451. package/components/speedometer-chart-slots.config-1BqQZ2vP.cjs +20 -0
  452. package/components/spike-map-options.config-DpgsB_L-.js +413 -0
  453. package/components/spike-map-options.config-LPAyKMHe.cjs +20 -0
  454. package/components/spike-map-positioning.config-2XZLrk9D.cjs +20 -0
  455. package/components/spike-map-positioning.config-CiY2ju4c.js +55 -0
  456. package/components/spike-map-slots.config-B7OehIoc.cjs +20 -0
  457. package/components/spike-map-slots.config-C6e0NXiD.js +47 -0
  458. package/components/strip-plot-options.config-BzhxzU-s.js +53 -0
  459. package/components/strip-plot-options.config-vBd38UQs.cjs +20 -0
  460. package/components/strip-plot-positioning.config-CFQPdgei.js +48 -0
  461. package/components/strip-plot-positioning.config-CkC8JUwR.cjs +20 -0
  462. package/components/strip-plot-slots.config-BjwAuVoh.js +38 -0
  463. package/components/strip-plot-slots.config-CAU0z3q4.cjs +20 -0
  464. package/components/sunburst-chart-options.config-Ba_H54ip.js +160 -0
  465. package/components/sunburst-chart-options.config-CUFOuT2J.cjs +20 -0
  466. package/components/sunburst-chart-positioning.config-BHJf7n-T.js +48 -0
  467. package/components/sunburst-chart-positioning.config-DVt84HYB.cjs +20 -0
  468. package/components/sunburst-chart-slots.config-BCNUNkd9.cjs +20 -0
  469. package/components/sunburst-chart-slots.config-h114Cuzh.js +38 -0
  470. package/components/symbol-map-options.config-CR07hvK0.cjs +20 -0
  471. package/components/symbol-map-options.config-DeJyZILi.js +157 -0
  472. package/components/symbol-map-positioning.config-DQK1q4GP.cjs +20 -0
  473. package/components/symbol-map-positioning.config-tZp8vwwl.js +55 -0
  474. package/components/symbol-map-slots.config-BmvI5_VE.js +53 -0
  475. package/components/symbol-map-slots.config-Dz_tor5P.cjs +20 -0
  476. package/components/text-options.config-BXuZMKTG.js +67 -0
  477. package/components/text-options.config-JI2D64hs.cjs +20 -0
  478. package/components/text-slots.config-0A6csMfd.cjs +20 -0
  479. package/components/text-slots.config-18Chz73A.js +24 -0
  480. package/components/treemap-chart-options.config-Be-LBEGy.js +184 -0
  481. package/components/treemap-chart-options.config-p21eSXKG.cjs +20 -0
  482. package/components/treemap-chart-positioning.config-CEYAh7Uc.js +55 -0
  483. package/components/treemap-chart-positioning.config-DQfHJ-ZS.cjs +20 -0
  484. package/components/treemap-chart-slots.config-BJqqnUEF.cjs +20 -0
  485. package/components/treemap-chart-slots.config-e7ORieH-.js +47 -0
  486. package/components/utils/base.cjs +1 -1
  487. package/components/utils/base.js +2 -2
  488. package/components/utils/store.cjs +1 -1
  489. package/components/utils/store.js +2 -2
  490. package/components/utils-CJf8VNzX.cjs +20 -0
  491. package/components/utils-Ci1YA9yB.js +352 -0
  492. package/components/utils.cjs +1 -1
  493. package/components/utils.js +9 -9
  494. package/components/v4-BK7K-jy_.js +49 -0
  495. package/components/validate-CJkVJaL1.cjs +20 -0
  496. package/components/validate-J3P0rm_n.js +28 -0
  497. package/components/venn-diagram-options.config-D3bEFsYa.js +24 -0
  498. package/components/venn-diagram-options.config-EmRhf40r.cjs +20 -0
  499. package/components/venn-diagram-positioning.config-2rUFGTJh.js +55 -0
  500. package/components/venn-diagram-positioning.config-DQa6-GAn.cjs +20 -0
  501. package/components/venn-diagram-slots.config-Dm-IC6JS.js +47 -0
  502. package/components/venn-diagram-slots.config-MpkJTf5q.cjs +20 -0
  503. package/components/video-options.config-B5aOwGa4.js +127 -0
  504. package/components/video-options.config-Dh_lU4c1.cjs +20 -0
  505. package/components/video-slots.config-Bmh6mcUv.cjs +20 -0
  506. package/components/video-slots.config-D2MtpAGI.js +24 -0
  507. package/components/viz-item-menu/index.cjs +1 -1
  508. package/components/viz-item-menu/index.js +1 -1
  509. package/components/viz-item-menu-B4BJBNEq.js +170 -0
  510. package/components/viz-item-menu-DD8ndROu.cjs +55 -0
  511. package/components/wordcloud-chart-options.config-DntH4Hvg.js +90 -0
  512. package/components/wordcloud-chart-options.config-mx2CbmrI.cjs +20 -0
  513. package/components/wordcloud-chart-positioning.config-C3Zulr2Q.js +55 -0
  514. package/components/wordcloud-chart-positioning.config-DhoAsQP-.cjs +20 -0
  515. package/components/wordcloud-chart-slots.config-C303nwAz.cjs +20 -0
  516. package/components/wordcloud-chart-slots.config-CsFBBXDz.js +45 -0
  517. package/custom-elements.json +487 -0
  518. package/index.d.ts +1 -0
  519. package/package.json +7 -2
  520. package/react/README.md +1 -0
  521. package/react/components/interactive-viz-item/index.ts +1 -0
  522. package/react/components/interactive-viz-item/types.ts +122 -0
  523. package/react/components/interactive-viz-item.component.ts +33 -0
  524. package/react/esm/components/interactive-viz-item/index.d.ts +1 -0
  525. package/react/esm/components/interactive-viz-item/index.js +1 -0
  526. package/react/esm/components/interactive-viz-item/types.d.ts +117 -0
  527. package/react/esm/components/interactive-viz-item/types.js +16 -0
  528. package/react/esm/components/interactive-viz-item.component.d.ts +16 -0
  529. package/react/esm/components/interactive-viz-item.component.js +21 -0
  530. package/react/esm/index.d.ts +3 -2
  531. package/react/esm/index.js +4 -0
  532. package/react/index.ts +4 -0
  533. package/react/luzmo-stub.d.ts +8 -0
  534. package/react/utils/index.d.ts +1 -0
  535. package/react/utils/store/index.d.ts +5 -5
  536. package/react/utils/store/store-registry.d.ts +1 -1
  537. package/react/utils/timezone/datetime-timezone.d.ts +25 -0
  538. package/react/utils/timezone/tests/datetime-timezone.test.d.ts +1 -0
  539. package/utils/index.d.ts +1 -0
  540. package/utils/store/index.d.ts +5 -5
  541. package/utils/store/store-registry.d.ts +1 -1
  542. package/utils/timezone/datetime-timezone.d.ts +25 -0
  543. package/utils/timezone/tests/datetime-timezone.test.d.ts +1 -0
  544. package/components/ai-chat-BMDfKnEj.cjs +0 -258
  545. package/components/ai-chat-Cd26aDpX.js +0 -3718
  546. package/components/ai-interaction-textarea-CPfJqTB0.cjs +0 -68
  547. package/components/ai-interaction-textarea-DkBglh6Q.js +0 -299
  548. package/components/area-chart-options.config-4OY_kXkB.js +0 -146
  549. package/components/area-chart-options.config-Cf1VrUNv.cjs +0 -20
  550. package/components/area-chart-positioning.config-CAPrtEZW.js +0 -55
  551. package/components/area-chart-positioning.config-CfC43YUW.cjs +0 -20
  552. package/components/area-chart-slots.config--pd_dBTn.js +0 -55
  553. package/components/area-chart-slots.config-BOhwdLnr.cjs +0 -20
  554. package/components/bar-chart-options.config-BF7Q15FL.cjs +0 -20
  555. package/components/bar-chart-options.config-C3puwFpi.js +0 -220
  556. package/components/bar-chart-positioning.config-C1MLYyl9.js +0 -59
  557. package/components/bar-chart-positioning.config-vJOALpQP.cjs +0 -20
  558. package/components/bar-chart-slots.config-DMWjAd5a.cjs +0 -20
  559. package/components/bar-chart-slots.config-Dr7v4xxd.js +0 -50
  560. package/components/base-B_wdCOxV.js +0 -249
  561. package/components/base-kQ6cjcIZ.cjs +0 -20
  562. package/components/base-store-DHC2m2Os.cjs +0 -20
  563. package/components/base-store-DmDe0dTU.js +0 -160
  564. package/components/box-plot-options.config-B486nCds.js +0 -296
  565. package/components/box-plot-options.config-BkD5CYGz.cjs +0 -20
  566. package/components/box-plot-positioning.config-CA27sCpO.js +0 -48
  567. package/components/box-plot-positioning.config-DVNeh9kg.cjs +0 -20
  568. package/components/box-plot-slots.config-5B_pTjPJ.cjs +0 -20
  569. package/components/box-plot-slots.config-Bdb7pkky.js +0 -40
  570. package/components/bubble-chart-options.config-4f9FUNhc.cjs +0 -20
  571. package/components/bubble-chart-options.config-BymUqNR5.js +0 -115
  572. package/components/bubble-chart-positioning.config-Dg92VJnB.cjs +0 -20
  573. package/components/bubble-chart-positioning.config-OlbBZU4m.js +0 -55
  574. package/components/bubble-chart-slots.config-B4tsJDuz.js +0 -47
  575. package/components/bubble-chart-slots.config-VHKuntJk.cjs +0 -20
  576. package/components/bullet-chart-options.config-BtyRdRk2.js +0 -75
  577. package/components/bullet-chart-options.config-DDygYBiy.cjs +0 -20
  578. package/components/bullet-chart-positioning.config-BwqxpSSL.cjs +0 -20
  579. package/components/bullet-chart-positioning.config-Y18yvzoc.js +0 -56
  580. package/components/bullet-chart-slots.config-CZfTgKZ4.cjs +0 -20
  581. package/components/bullet-chart-slots.config-ccCSNJ5q.js +0 -46
  582. package/components/choropleth-map-options.config-5W6nNlL7.cjs +0 -20
  583. package/components/choropleth-map-options.config-CqCciAvW.js +0 -348
  584. package/components/choropleth-map-positioning.config-Dmzy3fMc.js +0 -55
  585. package/components/choropleth-map-positioning.config-y-bYMoxr.cjs +0 -20
  586. package/components/choropleth-map-slots.config-CZKWF1qV.cjs +0 -20
  587. package/components/choropleth-map-slots.config-X2YYrSXc.js +0 -53
  588. package/components/circle-pack-chart-options.config-CD8MWMTw.cjs +0 -20
  589. package/components/circle-pack-chart-options.config-D9C-ltHA.js +0 -54
  590. package/components/circle-pack-chart-positioning.config-YDdY2cc2.js +0 -48
  591. package/components/circle-pack-chart-positioning.config-wKIQDFe8.cjs +0 -20
  592. package/components/circle-pack-chart-slots.config-BIO1dZsK.js +0 -38
  593. package/components/circle-pack-chart-slots.config-GL7T5_o4.cjs +0 -20
  594. package/components/circular-gauge-options.config-D9gcbX57.cjs +0 -20
  595. package/components/circular-gauge-options.config-De6SlTLT.js +0 -188
  596. package/components/circular-gauge-positioning.config-C41euPS9.js +0 -48
  597. package/components/circular-gauge-positioning.config-CKNanoFX.cjs +0 -20
  598. package/components/circular-gauge-slots.config-DUHabt3G.cjs +0 -20
  599. package/components/circular-gauge-slots.config-Dv_7fAD_.js +0 -39
  600. package/components/color-BWnYpOu7.js +0 -3812
  601. package/components/color-range-utils-CwwtLDX_.js +0 -63
  602. package/components/column-chart-options.config-5Dbg3FmH.js +0 -219
  603. package/components/column-chart-options.config-CiIw23Yo.cjs +0 -20
  604. package/components/column-chart-positioning.config-BdyuErF8.js +0 -55
  605. package/components/column-chart-positioning.config-Enx15Dqh.cjs +0 -20
  606. package/components/column-chart-slots.config-CM5aytbj.cjs +0 -20
  607. package/components/column-chart-slots.config-eHvTwZLX.js +0 -50
  608. package/components/combination-chart-options.config-BzmLGCal.js +0 -87
  609. package/components/combination-chart-options.config-DaTYSfnr.cjs +0 -20
  610. package/components/combination-chart-positioning.config-BQRn0EfF.js +0 -48
  611. package/components/combination-chart-positioning.config-CqlKA__j.cjs +0 -20
  612. package/components/combination-chart-slots.config-BwUOXFCR.cjs +0 -20
  613. package/components/combination-chart-slots.config-CG40JjE3.js +0 -43
  614. package/components/conditional-number-options.config-BPzCxo2q.cjs +0 -20
  615. package/components/conditional-number-options.config-CVgV7s7f.js +0 -205
  616. package/components/conditional-number-positioning.config-BBivi4ps.js +0 -48
  617. package/components/conditional-number-positioning.config-CR45rPru.cjs +0 -20
  618. package/components/conditional-number-slots.config-B7maHIaG.cjs +0 -20
  619. package/components/conditional-number-slots.config-o22l-qLv.js +0 -39
  620. package/components/data-broker-Bdv5V8Yp.js +0 -1680
  621. package/components/data-broker-DWEXs6-2.cjs +0 -20
  622. package/components/data-field-CAGprHjS.cjs +0 -54
  623. package/components/data-field-CLfUWgK9.js +0 -121
  624. package/components/data-field-level-7qi9K__S.cjs +0 -55
  625. package/components/data-field-level-CfJ0dmxo.js +0 -247
  626. package/components/data-field-panel-DUc8y4WA.cjs +0 -87
  627. package/components/data-field-panel-N7mukLj6.js +0 -385
  628. package/components/data-fields-select-B1pwPYt6.js +0 -262
  629. package/components/data-fields-select-qCWuzckJ.cjs +0 -41
  630. package/components/dataset-icon-CWT5Ju8w.js +0 -125
  631. package/components/dataset-selector-list-BPBZ04Lf.cjs +0 -75
  632. package/components/dataset-selector-list-DmajZuNC.js +0 -313
  633. package/components/dataset-selector-row-SJzYIpO6.js +0 -273
  634. package/components/dataset-selector-row-qxfmcxpm.cjs +0 -79
  635. package/components/date-comparison-filter-options.config-4yHPEJSU.cjs +0 -20
  636. package/components/date-comparison-filter-options.config-BJg_WqL4.js +0 -126
  637. package/components/date-comparison-filter-slots.config-BIK5aZ6P.js +0 -33
  638. package/components/date-comparison-filter-slots.config-oABOLs3D.cjs +0 -20
  639. package/components/date-filter-options.config-AFAngO_i.cjs +0 -20
  640. package/components/date-filter-options.config-N6eGgPGL.js +0 -118
  641. package/components/date-filter-slots.config-CJJ4P0v6.js +0 -37
  642. package/components/date-filter-slots.config-Cuzz0RjE.cjs +0 -20
  643. package/components/de-BHQ-FfU0.js +0 -465
  644. package/components/de-DnADyZVQ.cjs +0 -20
  645. package/components/decorate-DyMgX_Uh.js +0 -28
  646. package/components/default-acceptable-data-field-types-DFOFWWnT.js +0 -53
  647. package/components/default-acceptable-data-field-types-fPsz64ka.cjs +0 -20
  648. package/components/display-settings-CkkjJjem.js +0 -272
  649. package/components/display-settings-DnzOjr-1.cjs +0 -120
  650. package/components/display-settings-binning-BohjN2qK.js +0 -110
  651. package/components/display-settings-binning-C7-gByrp.cjs +0 -56
  652. package/components/display-settings-datetime-7pUcku_h.js +0 -413
  653. package/components/display-settings-datetime-DL0Qcz8Y.cjs +0 -217
  654. package/components/display-settings-grand-totals-CV5guBhH.js +0 -89
  655. package/components/display-settings-grand-totals-DHQSZqMI.cjs +0 -44
  656. package/components/display-settings-numeric--5zk8_7K.cjs +0 -190
  657. package/components/display-settings-numeric-D2LjMepO.js +0 -479
  658. package/components/display-settings-period-over-period-BE22oHvV.cjs +0 -229
  659. package/components/display-settings-period-over-period-sqZU6Zj_.js +0 -433
  660. package/components/donut-chart-options.config-C66yOoed.js +0 -207
  661. package/components/donut-chart-options.config-D8Bvo6Cc.cjs +0 -20
  662. package/components/donut-chart-positioning.config-B9sm4yFV.cjs +0 -20
  663. package/components/donut-chart-positioning.config-DtaPAgXE.js +0 -48
  664. package/components/donut-chart-slots.config-2XbT9Uu8.js +0 -39
  665. package/components/donut-chart-slots.config-Bi08z-XB.cjs +0 -20
  666. package/components/dropdown-filter-options.config-BRzYD0KE.cjs +0 -20
  667. package/components/dropdown-filter-options.config-Cm_wK0mn.js +0 -153
  668. package/components/dropdown-filter-slots.config-CR-Ko6q_.cjs +0 -20
  669. package/components/dropdown-filter-slots.config-CnESCGuw.js +0 -38
  670. package/components/en-GB-uxY5qmIM.cjs +0 -20
  671. package/components/en-US-q_Ruzags.cjs +0 -20
  672. package/components/en-q_Ruzags.cjs +0 -20
  673. package/components/es-B4xWcOeJ.cjs +0 -20
  674. package/components/es-CkCov6l7.js +0 -465
  675. package/components/evolution-number-options.config-07Jd0oUL.js +0 -228
  676. package/components/evolution-number-options.config-CkqNYgWn.cjs +0 -20
  677. package/components/evolution-number-positioning.config-DVXhBZYj.cjs +0 -20
  678. package/components/evolution-number-positioning.config-v8_6kB1H.js +0 -48
  679. package/components/evolution-number-slots.config-BKdD3cKw.js +0 -37
  680. package/components/evolution-number-slots.config-CikuQYgm.cjs +0 -20
  681. package/components/filter-expression-picker-CF4Otpll.cjs +0 -38
  682. package/components/filter-expression-picker-DCrCAIhg.js +0 -425
  683. package/components/filter-item-CKg3oQlZ.cjs +0 -58
  684. package/components/filter-item-DtdK1jvx.js +0 -242
  685. package/components/filter-value-picker-B5fHoLAG.cjs +0 -60
  686. package/components/filter-value-picker-datetime-CFCV2jkK.js +0 -139
  687. package/components/filter-value-picker-datetime-D20WnWar.cjs +0 -42
  688. package/components/filter-value-picker-hierarchy-CSM0RPvX.cjs +0 -47
  689. package/components/filter-value-picker-hierarchy-DEbN7h5L.js +0 -232
  690. package/components/filter-value-picker-numeric-BYspQRSi.js +0 -219
  691. package/components/filter-value-picker-numeric-BtZaQvkr.cjs +0 -48
  692. package/components/filter-value-picker-tyoO5ISM.js +0 -151
  693. package/components/filters-C8fHs4_m.js +0 -400
  694. package/components/filters-sR8GxUGw.cjs +0 -150
  695. package/components/formatter-BeXmurVe.cjs +0 -20
  696. package/components/formula-BPHH_GKB.cjs +0 -45
  697. package/components/formula-DYdcMG-v.js +0 -138
  698. package/components/formula-codemirror-CFgPlkN8.cjs +0 -215
  699. package/components/formula-codemirror-CQonNhmd.js +0 -12018
  700. package/components/formula-display-store-BGzj13Cs.js +0 -1086
  701. package/components/formula-display-store-DFAvw21p.cjs +0 -20
  702. package/components/formula-editor-CtCvJkyS.cjs +0 -218
  703. package/components/formula-editor-KXxQlh2n.js +0 -666
  704. package/components/formula-field-OcD4TWAn.js +0 -40
  705. package/components/formula-field-aiqX7nRp.cjs +0 -20
  706. package/components/formula-input-base-CGe2ABn6.cjs +0 -49
  707. package/components/formula-input-base-CQPGmISj.js +0 -236
  708. package/components/fr-BOivrXqX.cjs +0 -20
  709. package/components/fr-BSFpJ50_.js +0 -465
  710. package/components/funnel-chart-options.config-BVmrhzna.cjs +0 -20
  711. package/components/funnel-chart-options.config-PV1Hlu91.js +0 -187
  712. package/components/funnel-chart-positioning.config-BT-YoTgv.js +0 -48
  713. package/components/funnel-chart-positioning.config-C5Z3JkuS.cjs +0 -20
  714. package/components/funnel-chart-slots.config-B8zC6Q6_.cjs +0 -20
  715. package/components/funnel-chart-slots.config-_9HUPvTb.js +0 -43
  716. package/components/get-css-variable-CBXsAxR6.cjs +0 -20
  717. package/components/get-css-variable-DYnldi15.js +0 -63
  718. package/components/get-dataset-name-BGCvfcdY.js +0 -27
  719. package/components/get-dataset-name-EkeeFzI3.cjs +0 -20
  720. package/components/groupings-CrE-yp0S.js +0 -52
  721. package/components/groupings-dIFi0bJY.cjs +0 -20
  722. package/components/heat-map-options.config-CQY6t9AL.js +0 -224
  723. package/components/heat-map-options.config-xPdOcXDk.cjs +0 -20
  724. package/components/heat-map-positioning.config-BpFis567.js +0 -48
  725. package/components/heat-map-positioning.config-HPftgmdz.cjs +0 -20
  726. package/components/heat-map-slots.config-B4AswVSo.js +0 -37
  727. package/components/heat-map-slots.config-Wp_oS8JQ.cjs +0 -20
  728. package/components/heat-table-options.config-DPbTFoRn.cjs +0 -20
  729. package/components/heat-table-options.config-IlVPk4Q4.js +0 -372
  730. package/components/heat-table-positioning.config-Canc3aEE.js +0 -55
  731. package/components/heat-table-positioning.config-wkrm8Fbk.cjs +0 -20
  732. package/components/heat-table-slots.config-BN7rtHZG.cjs +0 -20
  733. package/components/heat-table-slots.config-CB509zU4.js +0 -49
  734. package/components/hexbin-map-options.config-CSFSqpMU.cjs +0 -20
  735. package/components/hexbin-map-options.config-vzw6ovva.js +0 -276
  736. package/components/hexbin-map-positioning.config-CBv6Lij5.js +0 -48
  737. package/components/hexbin-map-positioning.config-D0hAchxV.cjs +0 -20
  738. package/components/hexbin-map-slots.config-Dyse0pui.js +0 -37
  739. package/components/hexbin-map-slots.config-mx5zUTrA.cjs +0 -20
  740. package/components/image-options.config-Cmrsd8Yu.js +0 -153
  741. package/components/image-options.config-DZ5q1D63.cjs +0 -20
  742. package/components/image-slots.config-CVj-DM07.js +0 -24
  743. package/components/image-slots.config-ODQBVz5H.cjs +0 -20
  744. package/components/item-grid-BXZXJV3g.cjs +0 -339
  745. package/components/item-grid-uWM-Unjx.js +0 -8814
  746. package/components/item-option-CEwjJc1p.cjs +0 -252
  747. package/components/item-option-action-button-group-BOxQFfBF.js +0 -118
  748. package/components/item-option-action-button-group-DXCVJqpt.cjs +0 -53
  749. package/components/item-option-base-DKieCS-Y.cjs +0 -56
  750. package/components/item-option-base-Dr5-WxZ9.js +0 -123
  751. package/components/item-option-color-palette-picker-7vSSpj5o.cjs +0 -40
  752. package/components/item-option-color-palette-picker-D_mABGWh.js +0 -2041
  753. package/components/item-option-color-picker-COLBYeRy.js +0 -87
  754. package/components/item-option-color-picker-DMyNeD2e.cjs +0 -34
  755. package/components/item-option-color-range-BFr0B6Vf.cjs +0 -98
  756. package/components/item-option-color-range-CueVlyT2.js +0 -220
  757. package/components/item-option-multi-language-field-CMuQwrwQ.js +0 -82
  758. package/components/item-option-multi-language-field-q7txF5xA.cjs +0 -33
  759. package/components/item-option-number-field-BODNSx66.js +0 -102
  760. package/components/item-option-number-field-DWeJWUxY.cjs +0 -38
  761. package/components/item-option-panel-CxOfVI0z.js +0 -183
  762. package/components/item-option-panel-D0dxyUfE.cjs +0 -67
  763. package/components/item-option-picker-BsP_0XyD.cjs +0 -37
  764. package/components/item-option-picker-CyX7qqrb.js +0 -77
  765. package/components/item-option-position-picker-CcmBYyqF.cjs +0 -32
  766. package/components/item-option-position-picker-LOg6P4Gl.js +0 -117
  767. package/components/item-option-positions-number-field-BCbWb1R6.js +0 -164
  768. package/components/item-option-positions-number-field-o3Qckgwd.cjs +0 -49
  769. package/components/item-option-radio-button-group-CDebmEn3.js +0 -74
  770. package/components/item-option-radio-button-group-CjLhWTEJ.cjs +0 -37
  771. package/components/item-option-slider-C9ZJZcdg.js +0 -81
  772. package/components/item-option-slider-CHbkJHLK.cjs +0 -33
  773. package/components/item-option-switch-BVMOOWya.js +0 -69
  774. package/components/item-option-switch-FRAZWozp.cjs +0 -30
  775. package/components/item-option-text-field-DkYqHfdJ.cjs +0 -33
  776. package/components/item-option-text-field-e6NLDlSq.js +0 -80
  777. package/components/item-option-uyAsPcfE.js +0 -919
  778. package/components/item-slot-drop-BUCjEfJf.cjs +0 -91
  779. package/components/item-slot-drop-CoReI68M.js +0 -324
  780. package/components/item-slot-drop-panel-CEI1q060.js +0 -355
  781. package/components/item-slot-drop-panel-DqekQtOr.cjs +0 -57
  782. package/components/item-slot-picker-CvbXFh6Z.cjs +0 -158
  783. package/components/item-slot-picker-dy5hVID5.js +0 -474
  784. package/components/item-slot-picker-panel-BUyp6Hbg.cjs +0 -81
  785. package/components/item-slot-picker-panel-CG0NyMDX.js +0 -448
  786. package/components/line-chart-options.config-1TpSJqeb.js +0 -168
  787. package/components/line-chart-options.config-BkK829A2.cjs +0 -20
  788. package/components/line-chart-positioning.config-61uNfPZs.js +0 -55
  789. package/components/line-chart-positioning.config-BNtGFWUK.cjs +0 -20
  790. package/components/line-chart-slots.config-CcCpwWzZ.js +0 -55
  791. package/components/line-chart-slots.config-vv66fcoE.cjs +0 -20
  792. package/components/load-data-fields-for-datasets-BNnr8x3m.js +0 -42
  793. package/components/load-data-fields-for-datasets-CW4Voiex.cjs +0 -20
  794. package/components/localized-mixin-CiBWThrZ.cjs +0 -20
  795. package/components/localized-mixin-EpweDrTk.js +0 -45
  796. package/components/marker-map-options.config-BfPFVxpD.cjs +0 -20
  797. package/components/marker-map-options.config-DTaax79J.js +0 -117
  798. package/components/marker-map-positioning.config-Bi5WCVgJ.js +0 -48
  799. package/components/marker-map-positioning.config-C2cL7uZJ.cjs +0 -20
  800. package/components/marker-map-slots.config-BOWmS_IZ.js +0 -37
  801. package/components/marker-map-slots.config-DigZk7lN.cjs +0 -20
  802. package/components/nl-DS4Y_g8B.cjs +0 -20
  803. package/components/nl-D_MleIlk.js +0 -465
  804. package/components/ohlc-chart-options.config-BsBVP-Io.cjs +0 -20
  805. package/components/ohlc-chart-options.config-Dfes8ROC.js +0 -65
  806. package/components/ohlc-chart-positioning.config-DFx99k9A.js +0 -78
  807. package/components/ohlc-chart-positioning.config-IAOfu4ue.cjs +0 -20
  808. package/components/ohlc-chart-slots.config-D3fzoQJH.cjs +0 -20
  809. package/components/ohlc-chart-slots.config-JRztPEXL.js +0 -68
  810. package/components/parallel-coordinates-plot-options.config--6iJkURT.cjs +0 -20
  811. package/components/parallel-coordinates-plot-options.config-NSk_HC0H.js +0 -42
  812. package/components/parallel-coordinates-plot-positioning.config-Bf0Leksw.cjs +0 -20
  813. package/components/parallel-coordinates-plot-positioning.config-C9TqUuGC.js +0 -48
  814. package/components/parallel-coordinates-plot-slots.config-pmbO5DnL.js +0 -46
  815. package/components/parallel-coordinates-plot-slots.config-s_tLqGA-.cjs +0 -20
  816. package/components/pivot-table-options.config-B3wYlzEq.js +0 -245
  817. package/components/pivot-table-options.config-CKGnnXa_.cjs +0 -20
  818. package/components/pivot-table-positioning.config-CPXqqtcR.js +0 -55
  819. package/components/pivot-table-positioning.config-D1R3VO88.cjs +0 -20
  820. package/components/pivot-table-slots.config-DaLfGOP9.js +0 -55
  821. package/components/pivot-table-slots.config-KlYXL90k.cjs +0 -20
  822. package/components/pragmatic-element-adapter-D0LRKx5U.js +0 -1253
  823. package/components/pragmatic-element-adapter-DdyH32ix.cjs +0 -24
  824. package/components/pyramid-chart-options.config-8QtjhcJC.cjs +0 -20
  825. package/components/pyramid-chart-options.config-DIyiyqGM.js +0 -240
  826. package/components/pyramid-chart-positioning.config-BfXdJS8g.cjs +0 -20
  827. package/components/pyramid-chart-positioning.config-JAUQpA0B.js +0 -55
  828. package/components/pyramid-chart-slots.config-CreUpxI2.cjs +0 -20
  829. package/components/pyramid-chart-slots.config-DtnUlw5y.js +0 -50
  830. package/components/radar-chart-options.config-DvW36_zk.cjs +0 -20
  831. package/components/radar-chart-options.config-UVOzUnVT.js +0 -130
  832. package/components/radar-chart-positioning.config-Bixdrod2.cjs +0 -20
  833. package/components/radar-chart-positioning.config-CdJSazt4.js +0 -55
  834. package/components/radar-chart-slots.config-B3oIp-8w.cjs +0 -20
  835. package/components/radar-chart-slots.config-CkLoeAV7.js +0 -53
  836. package/components/regular-table-options.config-B0WNqEjR.cjs +0 -20
  837. package/components/regular-table-options.config-CBvnxTdd.js +0 -148
  838. package/components/regular-table-slots.config-Cc6hL7iu.js +0 -35
  839. package/components/regular-table-slots.config-UwzWj6gg.cjs +0 -20
  840. package/components/route-map-options.config-CYNKz_Xm.cjs +0 -20
  841. package/components/route-map-options.config-DZrlGa5o.js +0 -326
  842. package/components/route-map-positioning.config-7aca5Iex.cjs +0 -20
  843. package/components/route-map-positioning.config-Bk_BndTS.js +0 -66
  844. package/components/route-map-slots.config-CQxB8gKC.js +0 -59
  845. package/components/route-map-slots.config-DfYT65BF.cjs +0 -20
  846. package/components/sankey-diagram-options.config-D49IZ1y3.cjs +0 -20
  847. package/components/sankey-diagram-options.config-s_QRVr1r.js +0 -126
  848. package/components/sankey-diagram-positioning.config-Bvus3RDi.cjs +0 -20
  849. package/components/sankey-diagram-positioning.config-DPgQELIu.js +0 -66
  850. package/components/sankey-diagram-slots.config-C9tIfWHU.js +0 -61
  851. package/components/sankey-diagram-slots.config-D-_u4w36.cjs +0 -20
  852. package/components/scatter-plot-options.config-BETVLevv.cjs +0 -20
  853. package/components/scatter-plot-options.config-DI4hlqi5.js +0 -302
  854. package/components/scatter-plot-positioning.config-D-ifHW9P.js +0 -77
  855. package/components/scatter-plot-positioning.config-DBDCDDad.cjs +0 -20
  856. package/components/scatter-plot-slots.config-CUURijrN.js +0 -74
  857. package/components/scatter-plot-slots.config-CrG6wQtV.cjs +0 -20
  858. package/components/search-filter-options.config-B-dGVPhS.cjs +0 -20
  859. package/components/search-filter-options.config-CPzfgUWV.js +0 -103
  860. package/components/search-filter-slots.config-DD119qkk.js +0 -39
  861. package/components/search-filter-slots.config-DP06ulJA.cjs +0 -20
  862. package/components/set-locale-DTFOOSog.cjs +0 -20
  863. package/components/set-locale-UK0ghkg9.js +0 -43
  864. package/components/slicer-filter-options.config-7OXpRWtw.cjs +0 -20
  865. package/components/slicer-filter-options.config-F2CZ8ckV.js +0 -226
  866. package/components/slicer-filter-positioning.config-0uGZ8EgN.js +0 -48
  867. package/components/slicer-filter-positioning.config-Bx2_7jxp.cjs +0 -20
  868. package/components/slicer-filter-slots.config-CHKpdJvF.cjs +0 -20
  869. package/components/slicer-filter-slots.config-D-BhCuA9.js +0 -44
  870. package/components/slider-filter-options.config-CRdbX1IJ.cjs +0 -20
  871. package/components/slider-filter-options.config-DO0HHK2l.js +0 -72
  872. package/components/slider-filter-slots.config-9R298H0t.cjs +0 -20
  873. package/components/slider-filter-slots.config-CGQG6JqK.js +0 -43
  874. package/components/slot-menu-Cw5HJ_bk.js +0 -404
  875. package/components/slot-menu-DkyDLDSd.cjs +0 -64
  876. package/components/slot-menu-list-BZllvntQ.cjs +0 -38
  877. package/components/slot-menu-list-CTJ-owp1.js +0 -326
  878. package/components/slots-config-BuHluMEl.js +0 -77
  879. package/components/slots-config-DVH0lz6t.cjs +0 -20
  880. package/components/speedometer-chart-options.config-BsIu28S3.cjs +0 -20
  881. package/components/speedometer-chart-options.config-jK_yQjy2.js +0 -246
  882. package/components/speedometer-chart-positioning.config-CNOKIw7e.cjs +0 -20
  883. package/components/speedometer-chart-positioning.config-FzFxMi0X.js +0 -48
  884. package/components/speedometer-chart-slots.config-CjkHAHNX.js +0 -39
  885. package/components/speedometer-chart-slots.config-S_hQm2MV.cjs +0 -20
  886. package/components/spike-map-options.config-aaiZyME6.cjs +0 -20
  887. package/components/spike-map-options.config-cj07bETE.js +0 -413
  888. package/components/spike-map-positioning.config-B4NYfmEw.js +0 -55
  889. package/components/spike-map-positioning.config-Bcdt8670.cjs +0 -20
  890. package/components/spike-map-slots.config-cKfaD6dQ.cjs +0 -20
  891. package/components/spike-map-slots.config-yMkdy-0w.js +0 -47
  892. package/components/strip-plot-options.config-DmAxeY2S.js +0 -53
  893. package/components/strip-plot-options.config-TB3rkoj2.cjs +0 -20
  894. package/components/strip-plot-positioning.config-BjcqWJoD.cjs +0 -20
  895. package/components/strip-plot-positioning.config-n9OIxpa_.js +0 -48
  896. package/components/strip-plot-slots.config-C07nIM5s.js +0 -38
  897. package/components/strip-plot-slots.config-DNYlrK_c.cjs +0 -20
  898. package/components/sunburst-chart-options.config-CLyQG-8x.js +0 -160
  899. package/components/sunburst-chart-options.config-Ckk_kY_s.cjs +0 -20
  900. package/components/sunburst-chart-positioning.config-BIpSCpSi.cjs +0 -20
  901. package/components/sunburst-chart-positioning.config-CcGOcwOK.js +0 -48
  902. package/components/sunburst-chart-slots.config-BU9ma0xm.js +0 -38
  903. package/components/sunburst-chart-slots.config-DkUUt5RF.cjs +0 -20
  904. package/components/symbol-map-options.config-56eoWz4w.cjs +0 -20
  905. package/components/symbol-map-options.config-I_gykFhh.js +0 -157
  906. package/components/symbol-map-positioning.config-DPv89eCY.cjs +0 -20
  907. package/components/symbol-map-positioning.config-H3n2ngaa.js +0 -55
  908. package/components/symbol-map-slots.config-CQJgV5bh.js +0 -53
  909. package/components/symbol-map-slots.config-DwNf547A.cjs +0 -20
  910. package/components/text-options.config-BwBCG2yo.cjs +0 -20
  911. package/components/text-options.config-DUMx63Ol.js +0 -67
  912. package/components/text-slots.config-CPghLc8b.cjs +0 -20
  913. package/components/text-slots.config-YmmXsb-0.js +0 -24
  914. package/components/treemap-chart-options.config-CAWPa5jK.js +0 -184
  915. package/components/treemap-chart-options.config-r6biULUj.cjs +0 -20
  916. package/components/treemap-chart-positioning.config-Dzp4TodY.js +0 -55
  917. package/components/treemap-chart-positioning.config-W2sl4gZ0.cjs +0 -20
  918. package/components/treemap-chart-slots.config-CS3ot6ZJ.cjs +0 -20
  919. package/components/treemap-chart-slots.config-QEVbKZyS.js +0 -47
  920. package/components/utils-3XO8ba12.cjs +0 -20
  921. package/components/utils-B6EE0gvH.js +0 -313
  922. package/components/v4-DIjJgmR0.js +0 -49
  923. package/components/venn-diagram-options.config-BamlR1qo.cjs +0 -20
  924. package/components/venn-diagram-options.config-KKD89q3q.js +0 -24
  925. package/components/venn-diagram-positioning.config-BLSj3JqA.js +0 -55
  926. package/components/venn-diagram-positioning.config-Bv3pFJIU.cjs +0 -20
  927. package/components/venn-diagram-slots.config-DYTmU8v2.cjs +0 -20
  928. package/components/venn-diagram-slots.config-DsIqVOI2.js +0 -47
  929. package/components/video-options.config-BhBpkaLJ.cjs +0 -20
  930. package/components/video-options.config-D2SEyNrP.js +0 -127
  931. package/components/video-slots.config-B680gLmP.js +0 -24
  932. package/components/video-slots.config-DMut7o7r.cjs +0 -20
  933. package/components/viz-item-menu-CiEJJddu.js +0 -170
  934. package/components/viz-item-menu-Dry8xpRA.cjs +0 -55
  935. package/components/wordcloud-chart-options.config-DLN2RAEK.js +0 -90
  936. package/components/wordcloud-chart-options.config-DgH4JgN2.cjs +0 -20
  937. package/components/wordcloud-chart-positioning.config-DVPWXJXb.js +0 -55
  938. package/components/wordcloud-chart-positioning.config-ZTO2VLdY.cjs +0 -20
  939. package/components/wordcloud-chart-slots.config-V29v2Fhr.cjs +0 -20
  940. package/components/wordcloud-chart-slots.config-mFvqkiQE.js +0 -45
  941. /package/components/{rolldown-runtime-mLOUI7ql.cjs → chunk-mLOUI7ql.cjs} +0 -0
@@ -0,0 +1,4559 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2026 Luzmo
4
+ * All rights reserved.
5
+ * Luzmo web components (“Luzmo Web Components”)
6
+ * must be used according to the Luzmo Terms of Service.
7
+ * This license allows users with a current active Luzmo account
8
+ * to use the Luzmo Web Components. This license terminates
9
+ * automatically if a user no longer has an active Luzmo account.
10
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ * SOFTWARE.
19
+ * */
20
+ import { t as e } from "./decorate-CaYbmmmm.js";
21
+ import { t } from "./localized-mixin-BYWQe1fg.js";
22
+ import { t as n } from "./color-CXw2IfjN.js";
23
+ import { n as r, t as i } from "./themes-CQZd578_.js";
24
+ import { t as a } from "./v4-BK7K-jy_.js";
25
+ import { itemTypes as o } from "./item-list.js";
26
+ import { luzmoArrows as s, luzmoCircle as c, luzmoClone as l, luzmoCog as u, luzmoFilterOutline as d, luzmoLockOutline as f, luzmoPencil as p, luzmoTable as m, luzmoTrashOutline as h } from "@luzmo/icons";
27
+ import { html as g, nothing as _, render as v, unsafeCSS as y } from "lit";
28
+ import { property as b, query as x, queryAll as ee, state as S } from "lit/decorators.js";
29
+ import { localized as C, msg as w } from "@lit/localize";
30
+ import "@luzmo/lucero/icon";
31
+ import "@luzmo/lucero/tooltip";
32
+ import { repeat as te } from "lit/directives/repeat.js";
33
+ import "@luzmo/lucero/action-button";
34
+ import "@luzmo/embed";
35
+ import "@luzmo/lucero/action-group";
36
+ import { LuzmoElement as ne } from "@luzmo/lucero/utils";
37
+ import { guard as re } from "lit/directives/guard.js";
38
+ //#region node_modules/gridstack/dist/gridstack.min.css?inline
39
+ var ie = ".grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;width:auto;margin:0;position:absolute;z-index:0!important}.grid-stack>.grid-stack-item{width:var(--gs-column-width);height:var(--gs-cell-height);padding:0;position:absolute;top:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{width:auto;margin:0;position:absolute;overflow:hidden auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{-ms-touch-action:none;touch-action:none;font-size:.1px;display:block;position:absolute}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url(\"data:image/svg+xml;utf8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" stroke=\\\"%23666\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m10 3 2 2H8l2-2v14l-2-2h4l-2 2\\\"/></svg>\");background-position:50%;background-repeat:no-repeat}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{opacity:.8;box-shadow:1px 4px 6px #0003}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left,right,top,height,width}.grid-stack>.grid-stack-item[gs-y=\"0\"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x=\"0\"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x=\"0\"]{right:0}", ae = (e, t) => {
40
+ e.forEach((e) => {
41
+ let n = e.querySelector("luzmo-embed-viz-item");
42
+ n && (n.options = {
43
+ ...n.options,
44
+ locale: t
45
+ });
46
+ });
47
+ }, oe = ({ action: e, actionType: t, active: n, items: r, element: i, itemId: a, item: o, deletedId: s, originalElement: c, updatedItems: l }) => ({
48
+ action: e,
49
+ actionType: t,
50
+ active: n,
51
+ items: r,
52
+ element: i,
53
+ item: {
54
+ ...o,
55
+ id: a,
56
+ filters: o?.filters ?? []
57
+ },
58
+ ...s && { deletedId: s },
59
+ ...c && { originalElement: c },
60
+ ...l && { updatedItems: l }
61
+ }), T = ({ target: e, action: t, actionType: n, active: r, items: i, element: a, itemId: o, item: s, deletedId: c, originalElement: l, updatedItems: u }) => {
62
+ e.dispatchEvent(new CustomEvent("luzmo-item-grid-item-action", {
63
+ detail: oe({
64
+ action: t,
65
+ actionType: n,
66
+ active: r,
67
+ items: i,
68
+ element: a,
69
+ itemId: o,
70
+ item: s,
71
+ deletedId: c,
72
+ originalElement: l,
73
+ updatedItems: u
74
+ }),
75
+ bubbles: !0,
76
+ composed: !0,
77
+ cancelable: !0
78
+ }));
79
+ }, E = ({ target: e, itemStates: t, updatedItemStates: n, changedItemStates: r }) => {
80
+ e.dispatchEvent(new CustomEvent("luzmo-item-grid-item-states-changed", {
81
+ detail: {
82
+ itemStates: t,
83
+ updatedItemStates: n,
84
+ changedItemStates: r
85
+ },
86
+ bubbles: !0,
87
+ composed: !0
88
+ }));
89
+ }, se = ({ target: e, eventName: t, detail: n }) => {
90
+ e.dispatchEvent(new CustomEvent(t, {
91
+ detail: n,
92
+ bubbles: !0,
93
+ composed: !0
94
+ }));
95
+ }, ce = (e) => e instanceof Element ? e : void 0, le = (e) => ce(e)?.closest(".grid-stack-item"), ue = ({ event: e, gridItem: t }) => ce(e.relatedTarget)?.closest(".grid-item-actions-popover") ? !1 : !t.hasAttribute("active"), de = ({ event: e, focusedItemElement: t, removeItemActionsMenuPopover: n }) => {
96
+ let r = le(e.target);
97
+ return r ? (t && t !== r && (t.removeAttribute("focused"), n(t)), r.setAttribute("focused", "true"), r) : t;
98
+ }, fe = ({ event: e, focusedItemElement: t, removeItemActionsMenuPopover: n }) => t ? ce(e.relatedTarget)?.closest("luzmo-item-grid-item-actions-menu") ? {
99
+ focusedItemElement: t,
100
+ shouldFocusGrid: !1
101
+ } : (t.removeAttribute("focused"), n(t), {
102
+ focusedItemElement: void 0,
103
+ shouldFocusGrid: !0
104
+ }) : {
105
+ focusedItemElement: void 0,
106
+ shouldFocusGrid: !1
107
+ }, pe = ({ item: e, activeItemElement: t, gridElement: n, removeItemActionsMenuPopover: r }) => {
108
+ if (e.removeAttribute("active"), r(e), t === e) {
109
+ n.removeAttribute("has-active-item");
110
+ return;
111
+ }
112
+ return t;
113
+ }, me = ({ event: e, gridElement: t, items: n, state: r, cleanupActiveItem: i, dispatchItemActionEvent: a, createItemActionsMenuPopover: o }) => {
114
+ e.stopPropagation();
115
+ let s = e.detail, c = e.target?.closest(".grid-stack-item");
116
+ if (!c) return r;
117
+ let l = c.getAttribute("gs-id"), u = n.find((e) => e.id === l);
118
+ return s.type === "toggle" && s.action === r.activeItemActionToggle && c === r.activeItemElement ? (r.activeItemElement = void 0, r.activeItemActionToggle = void 0, t.removeAttribute("has-active-item"), c.removeAttribute("active"), i(c), l && a(s.action, s.type, !1, c, l, u), r) : (t.querySelectorAll(".grid-stack-item").forEach((e) => {
119
+ e !== c && i(e);
120
+ }), s.type === "toggle" ? (r.activeItemElement = c, r.activeItemActionToggle = s.action, t.setAttribute("has-active-item", "true"), c.setAttribute("active", "true"), o(c, [s.action])) : r.activeItemElement && r.activeItemElement !== c && (r.activeItemElement = void 0, r.activeItemActionToggle = void 0), l && a(s.action, s.type, s.active, c, l, u), r);
121
+ }, he = ({ event: e, gridElement: t, hostElement: n, items: r, activeItemActionToggle: i, cleanupActiveItem: a, dispatchItemActionEvent: o }) => {
122
+ let s = e.composedPath();
123
+ if (!s.includes(t) && !s.includes(n)) return { activeItemActionToggle: i };
124
+ let c = t.querySelector(".grid-stack-item[active]");
125
+ if (!c || s.includes(c)) return { activeItemActionToggle: i };
126
+ let l = c.querySelector(".grid-item-actions-popover");
127
+ if (l && s.includes(l)) return { activeItemActionToggle: i };
128
+ let u = c.getAttribute("gs-id"), d = r.find((e) => e.id === u);
129
+ return a(c), i && u && o(i, "toggle", !1, c, u, d), { activeItemActionToggle: void 0 };
130
+ }, ge = ({ gridElement: e, items: t, gridItemData: n, itemId: r, action: i, options: a, state: o, cleanupActiveItem: s, dispatchItemActionEvent: c, createItemActionsMenuPopover: l }) => {
131
+ if (!n?.element) return {
132
+ result: void 0,
133
+ state: o
134
+ };
135
+ let u = n.element, d = n.item, f = i === o.activeItemActionToggle && u === o.activeItemElement, p = a?.active ?? !f;
136
+ if (a?.active !== void 0 && p === f) return {
137
+ result: f,
138
+ state: o
139
+ };
140
+ if (!p) return o.activeItemElement = void 0, o.activeItemActionToggle = void 0, e.removeAttribute("has-active-item"), u.removeAttribute("active"), s(u), c(i, "toggle", !1, u, r, d), {
141
+ result: !1,
142
+ state: o
143
+ };
144
+ if (o.activeItemElement && o.activeItemElement !== u) {
145
+ let e = o.activeItemElement.getAttribute("gs-id"), n = t.find((t) => t.id === e), r = o.activeItemActionToggle, i = o.activeItemElement;
146
+ s(o.activeItemElement), o.activeItemElement = void 0, o.activeItemActionToggle = void 0, r && e && n && c(r, "toggle", !1, i, e, n);
147
+ }
148
+ return o.activeItemElement = u, o.activeItemActionToggle = i, e.setAttribute("has-active-item", "true"), u.setAttribute("active", "true"), l(u, [i]), c(i, "toggle", !0, u, r, d), {
149
+ result: !0,
150
+ state: o
151
+ };
152
+ }, _e = ({ gridElement: e, items: t, state: n, cleanupActiveItem: r, dispatchItemActionEvent: i }) => {
153
+ let a = 0;
154
+ if (n.activeItemElement && n.activeItemActionToggle) {
155
+ let o = n.activeItemElement.getAttribute("gs-id"), s = t.find((e) => e.id === o), c = n.activeItemActionToggle, l = n.activeItemElement;
156
+ r(n.activeItemElement), n.activeItemElement = void 0, n.activeItemActionToggle = void 0, e.removeAttribute("has-active-item"), c && o && s && (i(c, "toggle", !1, l, o, s), a++);
157
+ }
158
+ return {
159
+ deactivatedCount: a,
160
+ state: n
161
+ };
162
+ }, ve = {
163
+ sizeX: 1,
164
+ sizeY: 1,
165
+ col: 0,
166
+ row: 0
167
+ }, ye = (e) => {
168
+ e.forEach((e) => {
169
+ if (!e.id) throw Error("Grid item id is required");
170
+ });
171
+ }, be = (e) => {
172
+ if (!e.id) throw Error("Grid item id is required");
173
+ return e.id;
174
+ }, xe = (e, t) => ({
175
+ id: t,
176
+ x: e?.position?.col ?? 0,
177
+ y: e?.position?.row ?? 0,
178
+ w: e?.position?.sizeX ?? 1,
179
+ h: e?.position?.sizeY ?? 1
180
+ }), Se = (e, t) => ({
181
+ ...structuredClone(e),
182
+ id: t,
183
+ position: {
184
+ ...ve,
185
+ ...structuredClone(e.position)
186
+ },
187
+ canFilter: e.canFilter ?? "all"
188
+ }), Ce = (e, t) => {
189
+ if (t) {
190
+ for (let n of e) if (n.getAttribute("luzmo-item-grid-item-id") === t) return n;
191
+ }
192
+ }, we = (e, t) => e.map((e) => {
193
+ let n = {
194
+ item: e,
195
+ element: t.querySelector(`[gs-id="${e.id}"]`)
196
+ }, r = n.element?.querySelector("luzmo-embed-viz-item");
197
+ return r && (n.luzmoElement = r), n;
198
+ }), Te = ({ item: e, engine: t, existingItems: n, autoPosition: r, excludeNodeId: i }) => {
199
+ let a = e.position, o = i ? t.nodes.filter((e) => e.id !== i) : t.nodes, s = new t.constructor({
200
+ column: t.column,
201
+ float: t.float,
202
+ nodes: o.map((e) => ({ ...e }))
203
+ }), c = {
204
+ x: a.col,
205
+ y: a.row,
206
+ w: a.sizeX,
207
+ h: a.sizeY,
208
+ id: e.id,
209
+ autoPosition: r
210
+ };
211
+ s.addNode(c);
212
+ let l = {
213
+ ...e,
214
+ position: {
215
+ col: c.x ?? a.col,
216
+ row: c.y ?? a.row,
217
+ sizeX: c.w ?? a.sizeX,
218
+ sizeY: c.h ?? a.sizeY
219
+ }
220
+ };
221
+ return {
222
+ resolvedItem: l,
223
+ updatedItems: [...n.map((e) => {
224
+ let t = s.nodes.find((t) => t.id === e.id);
225
+ return t && t.x != null && t.y != null && t.w != null && t.h != null ? {
226
+ ...e,
227
+ position: {
228
+ col: t.x,
229
+ row: t.y,
230
+ sizeX: t.w,
231
+ sizeY: t.h
232
+ }
233
+ } : e;
234
+ }), l]
235
+ };
236
+ }, Ee = ({ itemId: e, patch: t, engine: n, existingItems: r }) => {
237
+ let i = r.find((t) => t.id === e);
238
+ if (!i?.position) return r;
239
+ let { resolvedItem: a, updatedItems: o } = Te({
240
+ item: {
241
+ ...i,
242
+ position: {
243
+ ...i.position,
244
+ ...t
245
+ }
246
+ },
247
+ engine: n,
248
+ existingItems: r.filter((t) => t.id !== e),
249
+ autoPosition: !1,
250
+ excludeNodeId: e
251
+ });
252
+ return r.map((t) => t.id === e ? a : o.find((e) => e.id === t.id) ?? t);
253
+ }, De = (e) => Se(e, e.id), Oe = Math.min, D = Math.max, ke = Math.round, Ae = Math.floor, O = (e) => ({
254
+ x: e,
255
+ y: e
256
+ }), je = {
257
+ left: "right",
258
+ right: "left",
259
+ bottom: "top",
260
+ top: "bottom"
261
+ };
262
+ function Me(e, t) {
263
+ return typeof e == "function" ? e(t) : e;
264
+ }
265
+ function k(e) {
266
+ return e.split("-")[0];
267
+ }
268
+ function Ne(e) {
269
+ return e.split("-")[1];
270
+ }
271
+ function Pe(e) {
272
+ return e === "x" ? "y" : "x";
273
+ }
274
+ function Fe(e) {
275
+ return e === "y" ? "height" : "width";
276
+ }
277
+ function A(e) {
278
+ let t = e[0];
279
+ return t === "t" || t === "b" ? "y" : "x";
280
+ }
281
+ function Ie(e) {
282
+ return Pe(A(e));
283
+ }
284
+ function Le(e, t, n) {
285
+ n === void 0 && (n = !1);
286
+ let r = Ne(e), i = Ie(e), a = Fe(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
287
+ return t.reference[a] > t.floating[a] && (o = Ke(o)), [o, Ke(o)];
288
+ }
289
+ function Re(e) {
290
+ let t = Ke(e);
291
+ return [
292
+ ze(e),
293
+ t,
294
+ ze(t)
295
+ ];
296
+ }
297
+ function ze(e) {
298
+ return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
299
+ }
300
+ var Be = ["left", "right"], Ve = ["right", "left"], He = ["top", "bottom"], Ue = ["bottom", "top"];
301
+ function We(e, t, n) {
302
+ switch (e) {
303
+ case "top":
304
+ case "bottom": return n ? t ? Ve : Be : t ? Be : Ve;
305
+ case "left":
306
+ case "right": return t ? He : Ue;
307
+ default: return [];
308
+ }
309
+ }
310
+ function Ge(e, t, n, r) {
311
+ let i = Ne(e), a = We(k(e), n === "start", r);
312
+ return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(ze)))), a;
313
+ }
314
+ function Ke(e) {
315
+ let t = k(e);
316
+ return je[t] + e.slice(t.length);
317
+ }
318
+ function qe(e) {
319
+ return {
320
+ top: 0,
321
+ right: 0,
322
+ bottom: 0,
323
+ left: 0,
324
+ ...e
325
+ };
326
+ }
327
+ function Je(e) {
328
+ return typeof e == "number" ? {
329
+ top: e,
330
+ right: e,
331
+ bottom: e,
332
+ left: e
333
+ } : qe(e);
334
+ }
335
+ function Ye(e) {
336
+ let { x: t, y: n, width: r, height: i } = e;
337
+ return {
338
+ width: r,
339
+ height: i,
340
+ top: n,
341
+ left: t,
342
+ right: t + r,
343
+ bottom: n + i,
344
+ x: t,
345
+ y: n
346
+ };
347
+ }
348
+ //#endregion
349
+ //#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
350
+ function Xe(e, t, n) {
351
+ let { reference: r, floating: i } = e, a = A(t), o = Ie(t), s = Fe(o), c = k(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
352
+ switch (c) {
353
+ case "top":
354
+ p = {
355
+ x: u,
356
+ y: r.y - i.height
357
+ };
358
+ break;
359
+ case "bottom":
360
+ p = {
361
+ x: u,
362
+ y: r.y + r.height
363
+ };
364
+ break;
365
+ case "right":
366
+ p = {
367
+ x: r.x + r.width,
368
+ y: d
369
+ };
370
+ break;
371
+ case "left":
372
+ p = {
373
+ x: r.x - i.width,
374
+ y: d
375
+ };
376
+ break;
377
+ default: p = {
378
+ x: r.x,
379
+ y: r.y
380
+ };
381
+ }
382
+ switch (Ne(t)) {
383
+ case "start":
384
+ p[o] -= f * (n && l ? -1 : 1);
385
+ break;
386
+ case "end":
387
+ p[o] += f * (n && l ? -1 : 1);
388
+ break;
389
+ }
390
+ return p;
391
+ }
392
+ async function Ze(e, t) {
393
+ t === void 0 && (t = {});
394
+ let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = Me(t, e), p = Je(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Ye(await i.getClippingRect({
395
+ element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
396
+ boundary: c,
397
+ rootBoundary: l,
398
+ strategy: s
399
+ })), g = u === "floating" ? {
400
+ x: n,
401
+ y: r,
402
+ width: a.floating.width,
403
+ height: a.floating.height
404
+ } : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
405
+ x: 1,
406
+ y: 1
407
+ }, y = Ye(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
408
+ elements: o,
409
+ rect: g,
410
+ offsetParent: _,
411
+ strategy: s
412
+ }) : g);
413
+ return {
414
+ top: (h.top - y.top + p.top) / v.y,
415
+ bottom: (y.bottom - h.bottom + p.bottom) / v.y,
416
+ left: (h.left - y.left + p.left) / v.x,
417
+ right: (y.right - h.right + p.right) / v.x
418
+ };
419
+ }
420
+ var Qe = 50, $e = async (e, t, n) => {
421
+ let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
422
+ ...o,
423
+ detectOverflow: Ze
424
+ }, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
425
+ reference: e,
426
+ floating: t,
427
+ strategy: i
428
+ }), { x: u, y: d } = Xe(l, r, c), f = r, p = 0, m = {};
429
+ for (let n = 0; n < a.length; n++) {
430
+ let h = a[n];
431
+ if (!h) continue;
432
+ let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
433
+ x: u,
434
+ y: d,
435
+ initialPlacement: r,
436
+ placement: f,
437
+ strategy: i,
438
+ middlewareData: m,
439
+ rects: l,
440
+ platform: s,
441
+ elements: {
442
+ reference: e,
443
+ floating: t
444
+ }
445
+ });
446
+ u = v ?? u, d = y ?? d, m[g] = {
447
+ ...m[g],
448
+ ...b
449
+ }, x && p < Qe && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
450
+ reference: e,
451
+ floating: t,
452
+ strategy: i
453
+ }) : x.rects), {x: u, y: d} = Xe(l, f, c)), n = -1);
454
+ }
455
+ return {
456
+ x: u,
457
+ y: d,
458
+ placement: f,
459
+ strategy: i,
460
+ middlewareData: m
461
+ };
462
+ }, et = function(e) {
463
+ return e === void 0 && (e = {}), {
464
+ name: "flip",
465
+ options: e,
466
+ async fn(t) {
467
+ var n;
468
+ let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = Me(e, t);
469
+ if ((n = i.arrow) != null && n.alignmentOffset) return {};
470
+ let g = k(r), _ = A(o), v = k(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Ke(o)] : Re(o)), x = p !== "none";
471
+ !d && x && b.push(...Ge(o, m, p, y));
472
+ let ee = [o, ...b], S = await s.detectOverflow(t, h), C = [], w = i.flip?.overflows || [];
473
+ if (l && C.push(S[g]), u) {
474
+ let e = Le(r, a, y);
475
+ C.push(S[e[0]], S[e[1]]);
476
+ }
477
+ if (w = [...w, {
478
+ placement: r,
479
+ overflows: C
480
+ }], !C.every((e) => e <= 0)) {
481
+ let e = (i.flip?.index || 0) + 1, t = ee[e];
482
+ if (t && (!(u === "alignment" && _ !== A(t)) || w.every((e) => A(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
483
+ data: {
484
+ index: e,
485
+ overflows: w
486
+ },
487
+ reset: { placement: t }
488
+ };
489
+ let n = w.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
490
+ if (!n) switch (f) {
491
+ case "bestFit": {
492
+ let e = w.filter((e) => {
493
+ if (x) {
494
+ let t = A(e.placement);
495
+ return t === _ || t === "y";
496
+ }
497
+ return !0;
498
+ }).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
499
+ e && (n = e);
500
+ break;
501
+ }
502
+ case "initialPlacement":
503
+ n = o;
504
+ break;
505
+ }
506
+ if (r !== n) return { reset: { placement: n } };
507
+ }
508
+ return {};
509
+ }
510
+ };
511
+ }, tt = /*#__PURE__*/ new Set(["left", "top"]);
512
+ async function nt(e, t) {
513
+ let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = k(n), s = Ne(n), c = A(n) === "y", l = tt.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = Me(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
514
+ mainAxis: d,
515
+ crossAxis: 0,
516
+ alignmentAxis: null
517
+ } : {
518
+ mainAxis: d.mainAxis || 0,
519
+ crossAxis: d.crossAxis || 0,
520
+ alignmentAxis: d.alignmentAxis
521
+ };
522
+ return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
523
+ x: p * u,
524
+ y: f * l
525
+ } : {
526
+ x: f * l,
527
+ y: p * u
528
+ };
529
+ }
530
+ var rt = function(e) {
531
+ return e === void 0 && (e = 0), {
532
+ name: "offset",
533
+ options: e,
534
+ async fn(t) {
535
+ var n;
536
+ let { x: r, y: i, placement: a, middlewareData: o } = t, s = await nt(t, e);
537
+ return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
538
+ x: r + s.x,
539
+ y: i + s.y,
540
+ data: {
541
+ ...s,
542
+ placement: a
543
+ }
544
+ };
545
+ }
546
+ };
547
+ };
548
+ //#endregion
549
+ //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
550
+ function it() {
551
+ return typeof window < "u";
552
+ }
553
+ function j(e) {
554
+ return at(e) ? (e.nodeName || "").toLowerCase() : "#document";
555
+ }
556
+ function M(e) {
557
+ var t;
558
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
559
+ }
560
+ function N(e) {
561
+ return ((at(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
562
+ }
563
+ function at(e) {
564
+ return it() ? e instanceof Node || e instanceof M(e).Node : !1;
565
+ }
566
+ function P(e) {
567
+ return it() ? e instanceof Element || e instanceof M(e).Element : !1;
568
+ }
569
+ function F(e) {
570
+ return it() ? e instanceof HTMLElement || e instanceof M(e).HTMLElement : !1;
571
+ }
572
+ function ot(e) {
573
+ return !it() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof M(e).ShadowRoot;
574
+ }
575
+ function st(e) {
576
+ let { overflow: t, overflowX: n, overflowY: r, display: i } = R(e);
577
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
578
+ }
579
+ function ct(e) {
580
+ return /^(table|td|th)$/.test(j(e));
581
+ }
582
+ function lt(e) {
583
+ try {
584
+ if (e.matches(":popover-open")) return !0;
585
+ } catch {}
586
+ try {
587
+ return e.matches(":modal");
588
+ } catch {
589
+ return !1;
590
+ }
591
+ }
592
+ var ut = /transform|translate|scale|rotate|perspective|filter/, dt = /paint|layout|strict|content/, I = (e) => !!e && e !== "none", ft;
593
+ function pt(e) {
594
+ let t = P(e) ? R(e) : e;
595
+ return I(t.transform) || I(t.translate) || I(t.scale) || I(t.rotate) || I(t.perspective) || !ht() && (I(t.backdropFilter) || I(t.filter)) || ut.test(t.willChange || "") || dt.test(t.contain || "");
596
+ }
597
+ function mt(e) {
598
+ let t = z(e);
599
+ for (; F(t) && !L(t);) {
600
+ if (pt(t)) return t;
601
+ if (lt(t)) return null;
602
+ t = z(t);
603
+ }
604
+ return null;
605
+ }
606
+ function ht() {
607
+ return ft ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), ft;
608
+ }
609
+ function L(e) {
610
+ return /^(html|body|#document)$/.test(j(e));
611
+ }
612
+ function R(e) {
613
+ return M(e).getComputedStyle(e);
614
+ }
615
+ function gt(e) {
616
+ return P(e) ? {
617
+ scrollLeft: e.scrollLeft,
618
+ scrollTop: e.scrollTop
619
+ } : {
620
+ scrollLeft: e.scrollX,
621
+ scrollTop: e.scrollY
622
+ };
623
+ }
624
+ function z(e) {
625
+ if (j(e) === "html") return e;
626
+ let t = e.assignedSlot || e.parentNode || ot(e) && e.host || N(e);
627
+ return ot(t) ? t.host : t;
628
+ }
629
+ function _t(e) {
630
+ let t = z(e);
631
+ return L(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : F(t) && st(t) ? t : _t(t);
632
+ }
633
+ function B(e, t, n) {
634
+ t === void 0 && (t = []), n === void 0 && (n = !0);
635
+ let r = _t(e), i = r === e.ownerDocument?.body, a = M(r);
636
+ if (i) {
637
+ let e = vt(a);
638
+ return t.concat(a, a.visualViewport || [], st(r) ? r : [], e && n ? B(e) : []);
639
+ } else return t.concat(r, B(r, [], n));
640
+ }
641
+ function vt(e) {
642
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
643
+ }
644
+ //#endregion
645
+ //#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
646
+ function yt(e) {
647
+ let t = R(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = F(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = ke(n) !== a || ke(r) !== o;
648
+ return s && (n = a, r = o), {
649
+ width: n,
650
+ height: r,
651
+ $: s
652
+ };
653
+ }
654
+ function bt(e) {
655
+ return P(e) ? e : e.contextElement;
656
+ }
657
+ function V(e) {
658
+ let t = bt(e);
659
+ if (!F(t)) return O(1);
660
+ let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = yt(t), o = (a ? ke(n.width) : n.width) / r, s = (a ? ke(n.height) : n.height) / i;
661
+ return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
662
+ x: o,
663
+ y: s
664
+ };
665
+ }
666
+ var xt = /*#__PURE__*/ O(0);
667
+ function St(e) {
668
+ let t = M(e);
669
+ return !ht() || !t.visualViewport ? xt : {
670
+ x: t.visualViewport.offsetLeft,
671
+ y: t.visualViewport.offsetTop
672
+ };
673
+ }
674
+ function Ct(e, t, n) {
675
+ return t === void 0 && (t = !1), !n || t && n !== M(e) ? !1 : t;
676
+ }
677
+ function H(e, t, n, r) {
678
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
679
+ let i = e.getBoundingClientRect(), a = bt(e), o = O(1);
680
+ t && (r ? P(r) && (o = V(r)) : o = V(e));
681
+ let s = Ct(a, n, r) ? St(a) : O(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
682
+ if (a) {
683
+ let e = M(a), t = r && P(r) ? M(r) : r, n = e, i = vt(n);
684
+ for (; i && r && t !== n;) {
685
+ let e = V(i), t = i.getBoundingClientRect(), r = R(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
686
+ c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = M(i), i = vt(n);
687
+ }
688
+ }
689
+ return Ye({
690
+ width: u,
691
+ height: d,
692
+ x: c,
693
+ y: l
694
+ });
695
+ }
696
+ function wt(e, t) {
697
+ let n = gt(e).scrollLeft;
698
+ return t ? t.left + n : H(N(e)).left + n;
699
+ }
700
+ function Tt(e, t) {
701
+ let n = e.getBoundingClientRect();
702
+ return {
703
+ x: n.left + t.scrollLeft - wt(e, n),
704
+ y: n.top + t.scrollTop
705
+ };
706
+ }
707
+ function Et(e) {
708
+ let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = N(r), s = t ? lt(t.floating) : !1;
709
+ if (r === o || s && a) return n;
710
+ let c = {
711
+ scrollLeft: 0,
712
+ scrollTop: 0
713
+ }, l = O(1), u = O(0), d = F(r);
714
+ if ((d || !d && !a) && ((j(r) !== "body" || st(o)) && (c = gt(r)), d)) {
715
+ let e = H(r);
716
+ l = V(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
717
+ }
718
+ let f = o && !d && !a ? Tt(o, c) : O(0);
719
+ return {
720
+ width: n.width * l.x,
721
+ height: n.height * l.y,
722
+ x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
723
+ y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
724
+ };
725
+ }
726
+ function Dt(e) {
727
+ return Array.from(e.getClientRects());
728
+ }
729
+ function Ot(e) {
730
+ let t = N(e), n = gt(e), r = e.ownerDocument.body, i = D(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = D(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + wt(e), s = -n.scrollTop;
731
+ return R(r).direction === "rtl" && (o += D(t.clientWidth, r.clientWidth) - i), {
732
+ width: i,
733
+ height: a,
734
+ x: o,
735
+ y: s
736
+ };
737
+ }
738
+ var kt = 25;
739
+ function At(e, t) {
740
+ let n = M(e), r = N(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
741
+ if (i) {
742
+ a = i.width, o = i.height;
743
+ let e = ht();
744
+ (!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
745
+ }
746
+ let l = wt(r);
747
+ if (l <= 0) {
748
+ let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
749
+ o <= kt && (a -= o);
750
+ } else l <= kt && (a += l);
751
+ return {
752
+ width: a,
753
+ height: o,
754
+ x: s,
755
+ y: c
756
+ };
757
+ }
758
+ function jt(e, t) {
759
+ let n = H(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = F(e) ? V(e) : O(1);
760
+ return {
761
+ width: e.clientWidth * a.x,
762
+ height: e.clientHeight * a.y,
763
+ x: i * a.x,
764
+ y: r * a.y
765
+ };
766
+ }
767
+ function Mt(e, t, n) {
768
+ let r;
769
+ if (t === "viewport") r = At(e, n);
770
+ else if (t === "document") r = Ot(N(e));
771
+ else if (P(t)) r = jt(t, n);
772
+ else {
773
+ let n = St(e);
774
+ r = {
775
+ x: t.x - n.x,
776
+ y: t.y - n.y,
777
+ width: t.width,
778
+ height: t.height
779
+ };
780
+ }
781
+ return Ye(r);
782
+ }
783
+ function Nt(e, t) {
784
+ let n = z(e);
785
+ return n === t || !P(n) || L(n) ? !1 : R(n).position === "fixed" || Nt(n, t);
786
+ }
787
+ function Pt(e, t) {
788
+ let n = t.get(e);
789
+ if (n) return n;
790
+ let r = B(e, [], !1).filter((e) => P(e) && j(e) !== "body"), i = null, a = R(e).position === "fixed", o = a ? z(e) : e;
791
+ for (; P(o) && !L(o);) {
792
+ let t = R(o), n = pt(o);
793
+ !n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || st(o) && !n && Nt(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = z(o);
794
+ }
795
+ return t.set(e, r), r;
796
+ }
797
+ function Ft(e) {
798
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? lt(t) ? [] : Pt(t, this._c) : [].concat(n), r], o = Mt(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
799
+ for (let e = 1; e < a.length; e++) {
800
+ let n = Mt(t, a[e], i);
801
+ s = D(n.top, s), c = Oe(n.right, c), l = Oe(n.bottom, l), u = D(n.left, u);
802
+ }
803
+ return {
804
+ width: c - u,
805
+ height: l - s,
806
+ x: u,
807
+ y: s
808
+ };
809
+ }
810
+ function It(e) {
811
+ let { width: t, height: n } = yt(e);
812
+ return {
813
+ width: t,
814
+ height: n
815
+ };
816
+ }
817
+ function Lt(e, t, n) {
818
+ let r = F(t), i = N(t), a = n === "fixed", o = H(e, !0, a, t), s = {
819
+ scrollLeft: 0,
820
+ scrollTop: 0
821
+ }, c = O(0);
822
+ function l() {
823
+ c.x = wt(i);
824
+ }
825
+ if (r || !r && !a) if ((j(t) !== "body" || st(i)) && (s = gt(t)), r) {
826
+ let e = H(t, !0, a, t);
827
+ c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
828
+ } else i && l();
829
+ a && !r && i && l();
830
+ let u = i && !r && !a ? Tt(i, s) : O(0);
831
+ return {
832
+ x: o.left + s.scrollLeft - c.x - u.x,
833
+ y: o.top + s.scrollTop - c.y - u.y,
834
+ width: o.width,
835
+ height: o.height
836
+ };
837
+ }
838
+ function Rt(e) {
839
+ return R(e).position === "static";
840
+ }
841
+ function zt(e, t) {
842
+ if (!F(e) || R(e).position === "fixed") return null;
843
+ if (t) return t(e);
844
+ let n = e.offsetParent;
845
+ return N(e) === n && (n = n.ownerDocument.body), n;
846
+ }
847
+ function Bt(e, t) {
848
+ let n = M(e);
849
+ if (lt(e)) return n;
850
+ if (!F(e)) {
851
+ let t = z(e);
852
+ for (; t && !L(t);) {
853
+ if (P(t) && !Rt(t)) return t;
854
+ t = z(t);
855
+ }
856
+ return n;
857
+ }
858
+ let r = zt(e, t);
859
+ for (; r && ct(r) && Rt(r);) r = zt(r, t);
860
+ return r && L(r) && Rt(r) && !pt(r) ? n : r || mt(e) || n;
861
+ }
862
+ var Vt = async function(e) {
863
+ let t = this.getOffsetParent || Bt, n = this.getDimensions, r = await n(e.floating);
864
+ return {
865
+ reference: Lt(e.reference, await t(e.floating), e.strategy),
866
+ floating: {
867
+ x: 0,
868
+ y: 0,
869
+ width: r.width,
870
+ height: r.height
871
+ }
872
+ };
873
+ };
874
+ function Ht(e) {
875
+ return R(e).direction === "rtl";
876
+ }
877
+ var Ut = {
878
+ convertOffsetParentRelativeRectToViewportRelativeRect: Et,
879
+ getDocumentElement: N,
880
+ getClippingRect: Ft,
881
+ getOffsetParent: Bt,
882
+ getElementRects: Vt,
883
+ getClientRects: Dt,
884
+ getDimensions: It,
885
+ getScale: V,
886
+ isElement: P,
887
+ isRTL: Ht
888
+ };
889
+ function Wt(e, t) {
890
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
891
+ }
892
+ function Gt(e, t) {
893
+ let n = null, r, i = N(e);
894
+ function a() {
895
+ var e;
896
+ clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
897
+ }
898
+ function o(s, c) {
899
+ s === void 0 && (s = !1), c === void 0 && (c = 1), a();
900
+ let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
901
+ if (s || t(), !f || !p) return;
902
+ let m = Ae(d), h = Ae(i.clientWidth - (u + f)), g = Ae(i.clientHeight - (d + p)), _ = Ae(u), v = {
903
+ rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
904
+ threshold: D(0, Oe(1, c)) || 1
905
+ }, y = !0;
906
+ function b(t) {
907
+ let n = t[0].intersectionRatio;
908
+ if (n !== c) {
909
+ if (!y) return o();
910
+ n ? o(!1, n) : r = setTimeout(() => {
911
+ o(!1, 1e-7);
912
+ }, 1e3);
913
+ }
914
+ n === 1 && !Wt(l, e.getBoundingClientRect()) && o(), y = !1;
915
+ }
916
+ try {
917
+ n = new IntersectionObserver(b, {
918
+ ...v,
919
+ root: i.ownerDocument
920
+ });
921
+ } catch {
922
+ n = new IntersectionObserver(b, v);
923
+ }
924
+ n.observe(e);
925
+ }
926
+ return o(!0), a;
927
+ }
928
+ function Kt(e, t, n, r) {
929
+ r === void 0 && (r = {});
930
+ let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = bt(e), u = i || a ? [...l ? B(l) : [], ...t ? B(t) : []] : [];
931
+ u.forEach((e) => {
932
+ i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
933
+ });
934
+ let d = l && s ? Gt(l, n) : null, f = -1, p = null;
935
+ o && (p = new ResizeObserver((e) => {
936
+ let [r] = e;
937
+ r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
938
+ var e;
939
+ (e = p) == null || e.observe(t);
940
+ })), n();
941
+ }), l && !c && p.observe(l), t && p.observe(t));
942
+ let m, h = c ? H(e) : null;
943
+ c && g();
944
+ function g() {
945
+ let t = H(e);
946
+ h && !Wt(h, t) && n(), h = t, m = requestAnimationFrame(g);
947
+ }
948
+ return n(), () => {
949
+ var e;
950
+ u.forEach((e) => {
951
+ i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
952
+ }), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
953
+ };
954
+ }
955
+ var qt = rt, Jt = et, Yt = (e, t, n) => {
956
+ let r = /* @__PURE__ */ new Map(), i = {
957
+ platform: Ut,
958
+ ...n
959
+ }, a = {
960
+ ...i.platform,
961
+ _c: r
962
+ };
963
+ return $e(e, t, {
964
+ ...i,
965
+ platform: a
966
+ });
967
+ }, Xt = /* @__PURE__ */ new WeakMap(), Zt = (e, t) => {
968
+ Qt(e), Xt.set(e, t);
969
+ }, Qt = (e) => {
970
+ let t = Xt.get(e);
971
+ t && (t(), Xt.delete(e));
972
+ }, $t = ({ element: e, activeActions: t, getGridItemById: n, placementItemActionsMenu: r, renderOverlayContent: i, removeItemActionsMenuPopover: a, itemActionsDocumentPopover: o = !0 }) => {
973
+ let s = e.querySelector(".grid-item-actions-popover"), c = e.querySelector(".grid-stack-item-content"), l = n(e.getAttribute("gs-id") ?? "");
974
+ if (t && t.length > 0 && s && (a(e), s = null), !s) {
975
+ let n = document.createDocumentFragment();
976
+ v(i(l?.item, t), n), s = n.querySelector(".grid-item-actions-popover"), e.append(s);
977
+ }
978
+ let u = o ? "absolute" : "fixed", d = Kt(c, s, async () => {
979
+ let { x: e, y: t } = await Yt(c, s, {
980
+ placement: l?.item?.placementActionsMenu ?? r ?? "right-start",
981
+ strategy: u,
982
+ middleware: [qt(0), Jt({ crossAxis: !1 })]
983
+ });
984
+ s.style.left = `${e}px`, s.style.top = `${t}px`, o || (s.style.position = "fixed", s.style.right = "auto", s.style.bottom = "auto", s.style.margin = "0");
985
+ });
986
+ Zt(s, d), o && s.isConnected && !s.matches(":popover-open") && s.showPopover();
987
+ }, en = (e) => {
988
+ let t = e.querySelector(".grid-item-actions-popover");
989
+ t && (Qt(t), t.hasAttribute("popover") && t.matches(":popover-open") && t.hidePopover(), t.remove());
990
+ }, tn = (e) => e === "ArrowLeft" || e === "ArrowRight" || e === "ArrowUp" || e === "ArrowDown", nn = ({ key: e, node: t, maxColumns: n, shiftKey: r, ctrlKey: i, metaKey: a }) => {
991
+ let o = {
992
+ ArrowLeft: {
993
+ move: { x: t.x - 1 },
994
+ resize: {
995
+ x: t.x - 1,
996
+ w: t.w + 1
997
+ },
998
+ shrink: { w: t.w - 1 },
999
+ canMove: t.x > 0,
1000
+ canResize: t.x > 0,
1001
+ canShrink: t.w > 1
1002
+ },
1003
+ ArrowRight: {
1004
+ move: { x: t.x + 1 },
1005
+ resize: { w: t.w + 1 },
1006
+ shrink: {
1007
+ x: t.x + 1,
1008
+ w: t.w - 1
1009
+ },
1010
+ canMove: t.x < n - t.w,
1011
+ canResize: t.x + t.w < n,
1012
+ canShrink: t.w > 1
1013
+ },
1014
+ ArrowUp: {
1015
+ move: { y: t.y - 1 },
1016
+ resize: {
1017
+ y: t.y - 1,
1018
+ h: t.h + 1
1019
+ },
1020
+ shrink: { h: t.h - 1 },
1021
+ canMove: t.y > 0,
1022
+ canResize: t.y > 0,
1023
+ canShrink: t.h > 1
1024
+ },
1025
+ ArrowDown: {
1026
+ move: { y: t.y + 1 },
1027
+ resize: { h: t.h + 1 },
1028
+ shrink: {
1029
+ y: t.y + 1,
1030
+ h: t.h - 1
1031
+ },
1032
+ canMove: !0,
1033
+ canResize: !0,
1034
+ canShrink: t.h > 1
1035
+ }
1036
+ }[e];
1037
+ if (r && o.canResize) return o.resize;
1038
+ if ((i || a) && o.canShrink) return o.shrink;
1039
+ if (o.canMove) return o.move;
1040
+ }, rn = ({ event: e, viewMode: t, focusedItemElement: n, activeItemElement: r, gridElement: i, grid: a, columns: o, onDeleteRequest: s, removeItemActionsMenuPopover: c, createItemActionsMenuPopover: l }) => {
1041
+ if (t) return {
1042
+ focusedItemElement: n,
1043
+ activeItemElement: r
1044
+ };
1045
+ let u = n, d = r;
1046
+ if (e.key === "Delete" && n) {
1047
+ let e = n.nextElementSibling ?? n.previousElementSibling;
1048
+ s(n), u = e ?? void 0, u ? requestAnimationFrame(() => u?.focus()) : i.focus(), r === n && (d = void 0);
1049
+ } else if (e.key === "Escape" && n) n.removeAttribute("focused"), c(n), u = void 0, i.focus();
1050
+ else if (e.key === "Enter" && n) e.preventDefault(), e.stopPropagation(), r && (r.removeAttribute("active"), i.removeAttribute("has-active-item"), c(r), d = void 0), i.querySelectorAll(".grid-stack-item").forEach((e) => {
1051
+ e !== n && c(e);
1052
+ }), l(n), requestAnimationFrame(() => {
1053
+ let e = n.querySelector("luzmo-item-grid-item-actions-menu");
1054
+ e && e.focus();
1055
+ });
1056
+ else if (n && a && tn(e.key)) {
1057
+ e.preventDefault(), e.stopPropagation();
1058
+ let t = n.gridstackNode;
1059
+ if (!t) return {
1060
+ focusedItemElement: u,
1061
+ activeItemElement: d
1062
+ };
1063
+ let r = nn({
1064
+ key: e.key,
1065
+ node: t,
1066
+ maxColumns: o,
1067
+ shiftKey: e.shiftKey,
1068
+ ctrlKey: e.ctrlKey,
1069
+ metaKey: e.metaKey
1070
+ });
1071
+ r && a.update(n, r);
1072
+ }
1073
+ return {
1074
+ focusedItemElement: u,
1075
+ activeItemElement: d
1076
+ };
1077
+ }, U = {
1078
+ lock: {
1079
+ icon: f,
1080
+ label: "Lock",
1081
+ tooltip: "Lock",
1082
+ action: "lock",
1083
+ type: "toggle"
1084
+ },
1085
+ edit: {
1086
+ icon: p,
1087
+ label: "Edit",
1088
+ tooltip: "Edit",
1089
+ action: "edit",
1090
+ type: "toggle"
1091
+ },
1092
+ "edit-data": {
1093
+ icon: m,
1094
+ label: "Edit data",
1095
+ tooltip: "Data",
1096
+ action: "edit-data",
1097
+ type: "toggle"
1098
+ },
1099
+ "item-options": {
1100
+ icon: u,
1101
+ label: "Item options",
1102
+ tooltip: "Options",
1103
+ action: "item-options",
1104
+ type: "toggle"
1105
+ },
1106
+ filters: {
1107
+ icon: d,
1108
+ label: "Filters",
1109
+ tooltip: "Filters",
1110
+ action: "filters",
1111
+ type: "toggle"
1112
+ },
1113
+ clone: {
1114
+ icon: l,
1115
+ label: "Clone",
1116
+ tooltip: "Clone",
1117
+ action: "clone",
1118
+ type: "button"
1119
+ },
1120
+ delete: {
1121
+ icon: h,
1122
+ label: "Delete",
1123
+ tooltip: "Delete",
1124
+ action: "delete",
1125
+ type: "button"
1126
+ }
1127
+ }, an = (e) => {
1128
+ if (e) return structuredClone(e).map((e) => {
1129
+ if (e.type === "group") return e.actions = e.actions ?? [], e.actions = e.actions.map((e) => {
1130
+ if (typeof e == "string" && Object.hasOwn(U, e)) return { ...U[e] };
1131
+ if (typeof e == "object") return e.icon = e.icon ?? c, e.label = e.label ?? e.action, e.tooltip = e.tooltip ?? e.label ?? e.action, e.type = ["toggle", "button"].includes(e.type ?? "") ? e.type : "button", e;
1132
+ }).filter(Boolean), e;
1133
+ }).filter(Boolean);
1134
+ }, on = () => [{
1135
+ type: "group",
1136
+ actions: [
1137
+ { ...U["edit-data"] },
1138
+ { ...U["item-options"] },
1139
+ { ...U.clone }
1140
+ ]
1141
+ }, {
1142
+ type: "group",
1143
+ actions: [{ ...U.delete }]
1144
+ }], sn = 16, cn = 10, W = (e, t) => t >= 1 ? `rgba(${e.r},${e.g},${e.b},1)` : t <= 0 ? `rgba(${e.r},${e.g},${e.b},0)` : `rgba(${e.r},${e.g},${e.b},${t})`, ln = async ({ theme: e, currentTheme: t }) => e?.type === "custom" ? structuredClone(e) : e?.id && r.includes(e.id) && t?.id !== e.id ? {
1145
+ ...await i(e.id),
1146
+ id: e.id
1147
+ } : e?.id && t?.id !== e.id || !e && t ? t : await i("default"), un = (e) => [(e?.margins?.[0] ?? sn) / 2, (e?.margins?.[1] ?? sn) / 2], dn = (e) => cn - (e?.margins?.[0] ?? cn), fn = (e) => {
1148
+ let t = e?.boxShadow;
1149
+ if (!t) return "";
1150
+ let r = new n(t.color), i = {
1151
+ r: Math.round(r.srgb.r * 255),
1152
+ g: Math.round(r.srgb.g * 255),
1153
+ b: Math.round(r.srgb.b * 255)
1154
+ }, a = e?.margins?.[0] ?? sn, o = Math.min(a / 10, 2);
1155
+ return t.size === "none" ? "none" : t.size === "S" ? `0 ${o * 2}px ${o * 4}px ${W(i, .16)}, 0 ${o * 2}px ${o * 4}px ${W(i, .23)}` : t.size === "M" ? `0 ${o * 8}px ${o * 16}px ${W(i, .19)}, 0 ${o * 4}px ${o * 4}px ${W(i, .23)}` : t.size === "L" ? `0 ${o * 12}px ${o * 24}px ${W(i, .25)}, 0 ${o * 8}px ${o * 8}px ${W(i, .22)}` : "";
1156
+ }, pn = (e) => {
1157
+ let t = fn(e);
1158
+ return new Map([
1159
+ ["--grid-font-family", e?.font?.fontFamily],
1160
+ ["--grid-background", e?.background],
1161
+ ["--grid-item-box-shadow", t],
1162
+ ["--grid-item-background", e?.itemsBackground],
1163
+ ["--grid-item-border-color", e?.borders?.["border-color"]],
1164
+ ["--grid-item-border-style", e?.borders?.["border-style"]],
1165
+ ["--grid-item-border-radius", e?.borders?.["border-radius"]],
1166
+ ["--grid-item-border-width", `${e?.borders?.["border-top-width"]}`],
1167
+ ["--grid-item-border-top-width", e?.borders?.["border-top-width"]],
1168
+ ["--grid-item-border-right-width", e?.borders?.["border-right-width"]],
1169
+ ["--grid-item-border-bottom-width", e?.borders?.["border-bottom-width"]],
1170
+ ["--grid-item-border-left-width", e?.borders?.["border-left-width"]]
1171
+ ]);
1172
+ }, mn = (e) => {
1173
+ let t = e?.itemsBackground ?? e?.background;
1174
+ return t ? new n(t).luminance < .5 : !1;
1175
+ }, hn = (e, t) => {
1176
+ t && pn(t).forEach((t, n) => {
1177
+ t ? e.setProperty(n, t) : e.removeProperty(n);
1178
+ });
1179
+ }, gn = ({ item: e, defaultItemActionsMenu: t, activeActions: n }) => {
1180
+ let r = an(e?.actionsMenu) ?? an(t) ?? on();
1181
+ if (!o.find((t) => t.type === e?.type)?.containsData && !e?.actionsMenu && !t && (r = r.map((e) => ({
1182
+ ...e,
1183
+ actions: e.actions?.filter((e) => e.action !== "edit-data")
1184
+ }))), n && n.length > 0) {
1185
+ let e = new Set(n);
1186
+ r = r.map((t) => ({
1187
+ ...t,
1188
+ actions: t.actions?.map((t) => ({
1189
+ ...t,
1190
+ active: t.action && e.has(t.action) ? !0 : t.active
1191
+ }))
1192
+ }));
1193
+ }
1194
+ return r;
1195
+ }, _n = ({ item: e, activeActions: t, defaultItemActionsMenu: n, placementItemActionsMenu: r, language: i, handleAction: a, itemActionsDocumentPopover: o = !0 }) => {
1196
+ let s = gn({
1197
+ item: e,
1198
+ defaultItemActionsMenu: n,
1199
+ activeActions: t
1200
+ });
1201
+ return g`
1202
+ <div class="grid-item-actions-popover" popover=${o ? "manual" : _}>
1203
+ <luzmo-item-grid-item-actions-menu
1204
+ .actions=${s}
1205
+ placement=${e?.placementActionsMenu ?? r ?? "right-start"}
1206
+ .language=${i}
1207
+ @luzmo-item-grid-item-action=${a}
1208
+ >
1209
+ </luzmo-item-grid-item-actions-menu>
1210
+ </div>
1211
+ `;
1212
+ }, vn = ({ item: e, index: t, initialized: n, viewMode: r, contentLanguage: i, fullTheme: a, appServer: o, apiHost: c, authKey: l, authToken: u, handleMouseover: d, handleMouseout: f, handleFocus: p, handleBlur: m }) => {
1213
+ let h = {
1214
+ ...e.options,
1215
+ locale: i
1216
+ };
1217
+ h.theme ||= a?.id ? { id: a.id } : structuredClone(a);
1218
+ let _ = !r;
1219
+ return g`
1220
+ <div
1221
+ class="luzmo-item-grid-item has-luzmo-viz-item"
1222
+ luzmo-item-grid-item-id=${e.id ?? ""}
1223
+ tabindex="0"
1224
+ role="row"
1225
+ @mouseover=${d}
1226
+ @mouseout=${f}
1227
+ @focus=${p}
1228
+ @blur=${m}
1229
+ >
1230
+ <div
1231
+ class="grid-stack-item-content"
1232
+ role="gridcell"
1233
+ aria-label=${w("Grid item", { desc: "Accessible label prefix for grid items" }) + ` ${t + 1}`}
1234
+ >
1235
+ ${_ ? g`
1236
+ <div class="grid-item-drag-handle">
1237
+ <luzmo-icon .icon=${s} size="s"></luzmo-icon>
1238
+ </div>
1239
+ ` : g`
1240
+
1241
+ `}
1242
+ ${n ? g`
1243
+ <luzmo-embed-viz-item
1244
+ .appServer=${o}
1245
+ .apiHost=${c}
1246
+ .authKey=${l}
1247
+ .authToken=${u}
1248
+ .type=${e.type}
1249
+ .slots=${e.slots}
1250
+ .options=${h}
1251
+ .filters=${e.filters}
1252
+ .language=${i}
1253
+ .canFilter=${e.canFilter ?? "all"}
1254
+ ></luzmo-embed-viz-item>` : g`
1255
+
1256
+ `}
1257
+ </div>
1258
+ </div>
1259
+ `;
1260
+ }, yn = ({ items: e, initialized: t, viewMode: n, contentLanguage: r, fullTheme: i, appServer: a, apiHost: o, authKey: s, authToken: c, renderItem: l }) => te(e, (e) => e.id, (e, u) => re([
1261
+ e,
1262
+ t,
1263
+ n,
1264
+ r,
1265
+ i,
1266
+ a,
1267
+ o,
1268
+ s,
1269
+ c
1270
+ ], () => l(e, u))), bn = ({ items: e, initialized: t, viewMode: n, contentLanguage: r, fullTheme: i, appServer: a, apiHost: o, authKey: s, authToken: c, columns: l, ensureGridItemId: u, handleMouseover: d, handleMouseout: f, handleFocus: p, handleBlur: m }) => {
1271
+ e.forEach((e) => {
1272
+ u(e);
1273
+ });
1274
+ let h = yn({
1275
+ items: e,
1276
+ initialized: t,
1277
+ viewMode: n,
1278
+ contentLanguage: r,
1279
+ fullTheme: i,
1280
+ appServer: a,
1281
+ apiHost: o,
1282
+ authKey: s,
1283
+ authToken: c,
1284
+ renderItem: (e, l) => vn({
1285
+ item: e,
1286
+ index: l,
1287
+ initialized: t,
1288
+ viewMode: n,
1289
+ contentLanguage: r,
1290
+ fullTheme: i,
1291
+ appServer: a,
1292
+ apiHost: o,
1293
+ authKey: s,
1294
+ authToken: c,
1295
+ handleMouseover: d,
1296
+ handleMouseout: f,
1297
+ handleFocus: p,
1298
+ handleBlur: m
1299
+ })
1300
+ });
1301
+ return g`
1302
+ <div
1303
+ ?dark-background=${t ? mn(i) : !1}
1304
+ class="grid-stack"
1305
+ data-grid-columns=${l}
1306
+ role="grid"
1307
+ aria-label=${w("Dashboard grid", { desc: "Accessible label for the dashboard grid" })}
1308
+ >
1309
+ ${h}
1310
+ </div>
1311
+ `;
1312
+ }, G = class e {
1313
+ static getElements(e, t = document) {
1314
+ if (typeof e == "string") {
1315
+ let n = "getElementById" in t ? t : void 0;
1316
+ if (n && !isNaN(+e[0])) {
1317
+ let t = n.getElementById(e);
1318
+ return t ? [t] : [];
1319
+ }
1320
+ let r = t.querySelectorAll(e);
1321
+ if (!r.length && e[0] !== "." && e[0] !== "#" && (r = t.querySelectorAll("." + e), r.length || (r = t.querySelectorAll("#" + e)), !r.length)) {
1322
+ let n = t.querySelector(`[gs-id="${e}"]`);
1323
+ return n ? [n] : [];
1324
+ }
1325
+ return Array.from(r);
1326
+ }
1327
+ return [e];
1328
+ }
1329
+ static getElement(e, t = document) {
1330
+ if (typeof e == "string") {
1331
+ let n = "getElementById" in t ? t : void 0;
1332
+ if (!e.length) return null;
1333
+ if (n && e[0] === "#") return n.getElementById(e.substring(1));
1334
+ if (e[0] === "#" || e[0] === "." || e[0] === "[") return t.querySelector(e);
1335
+ if (n && !isNaN(+e[0])) return n.getElementById(e);
1336
+ let r = t.querySelector(e);
1337
+ return n && !r && (r = n.getElementById(e)), r ||= t.querySelector("." + e), r;
1338
+ }
1339
+ return e;
1340
+ }
1341
+ static lazyLoad(e) {
1342
+ return e.lazyLoad || e.grid?.opts?.lazyLoad && e.lazyLoad !== !1;
1343
+ }
1344
+ static createDiv(e, t) {
1345
+ let n = document.createElement("div");
1346
+ return e.forEach((e) => {
1347
+ e && n.classList.add(e);
1348
+ }), t?.appendChild(n), n;
1349
+ }
1350
+ static shouldSizeToContent(e, t = !1) {
1351
+ return e?.grid && (t ? e.sizeToContent === !0 || e.grid.opts.sizeToContent === !0 && e.sizeToContent === void 0 : !!e.sizeToContent || e.grid.opts.sizeToContent && e.sizeToContent !== !1);
1352
+ }
1353
+ static isIntercepted(e, t) {
1354
+ return !(e.y >= t.y + t.h || e.y + e.h <= t.y || e.x + e.w <= t.x || e.x >= t.x + t.w);
1355
+ }
1356
+ static isTouching(t, n) {
1357
+ return e.isIntercepted(t, {
1358
+ x: n.x - .5,
1359
+ y: n.y - .5,
1360
+ w: n.w + 1,
1361
+ h: n.h + 1
1362
+ });
1363
+ }
1364
+ static areaIntercept(e, t) {
1365
+ let n = e.x > t.x ? e.x : t.x, r = e.x + e.w < t.x + t.w ? e.x + e.w : t.x + t.w;
1366
+ if (r <= n) return 0;
1367
+ let i = e.y > t.y ? e.y : t.y, a = e.y + e.h < t.y + t.h ? e.y + e.h : t.y + t.h;
1368
+ return a <= i ? 0 : (r - n) * (a - i);
1369
+ }
1370
+ static area(e) {
1371
+ return e.w * e.h;
1372
+ }
1373
+ static sort(e, t = 1) {
1374
+ let n = 1e4;
1375
+ return e.sort((e, r) => {
1376
+ let i = t * ((e.y ?? n) - (r.y ?? n));
1377
+ return i === 0 ? t * ((e.x ?? n) - (r.x ?? n)) : i;
1378
+ });
1379
+ }
1380
+ static find(e, t) {
1381
+ return t ? e.find((e) => e.id === t) : void 0;
1382
+ }
1383
+ static toBool(e) {
1384
+ return typeof e == "boolean" ? e : typeof e == "string" ? (e = e.toLowerCase(), !(e === "" || e === "no" || e === "false" || e === "0")) : !!e;
1385
+ }
1386
+ static toNumber(e) {
1387
+ return e === null || e.length === 0 ? void 0 : Number(e);
1388
+ }
1389
+ static parseHeight(e) {
1390
+ let t, n = "px";
1391
+ if (typeof e == "string") if (e === "auto" || e === "") t = 0;
1392
+ else {
1393
+ let r = e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);
1394
+ if (!r) throw Error(`Invalid height val = ${e}`);
1395
+ n = r[2] || "px", t = parseFloat(r[1]);
1396
+ }
1397
+ else t = e;
1398
+ return {
1399
+ h: t,
1400
+ unit: n
1401
+ };
1402
+ }
1403
+ static defaults(t, ...n) {
1404
+ return n.forEach((n) => {
1405
+ for (let r in n) {
1406
+ if (!n.hasOwnProperty(r)) return;
1407
+ t[r] === null || t[r] === void 0 ? t[r] = n[r] : typeof n[r] == "object" && typeof t[r] == "object" && e.defaults(t[r], n[r]);
1408
+ }
1409
+ }), t;
1410
+ }
1411
+ static same(e, t) {
1412
+ if (typeof e != "object") return e == t;
1413
+ if (typeof e != typeof t || Object.keys(e).length !== Object.keys(t).length) return !1;
1414
+ for (let n in e) if (e[n] !== t[n]) return !1;
1415
+ return !0;
1416
+ }
1417
+ static copyPos(e, t, n = !1) {
1418
+ return t.x !== void 0 && (e.x = t.x), t.y !== void 0 && (e.y = t.y), t.w !== void 0 && (e.w = t.w), t.h !== void 0 && (e.h = t.h), n && (t.minW && (e.minW = t.minW), t.minH && (e.minH = t.minH), t.maxW && (e.maxW = t.maxW), t.maxH && (e.maxH = t.maxH)), e;
1419
+ }
1420
+ static samePos(e, t) {
1421
+ return e && t && e.x === t.x && e.y === t.y && (e.w || 1) === (t.w || 1) && (e.h || 1) === (t.h || 1);
1422
+ }
1423
+ static sanitizeMinMax(e) {
1424
+ e.minW || delete e.minW, e.minH || delete e.minH, e.maxW || delete e.maxW, e.maxH || delete e.maxH;
1425
+ }
1426
+ static removeInternalAndSame(t, n) {
1427
+ if (!(typeof t != "object" || typeof n != "object") && !(Array.isArray(t) || Array.isArray(n))) for (let r in t) {
1428
+ let i = t[r], a = n[r];
1429
+ r[0] === "_" || i === a ? delete t[r] : i && typeof i == "object" && a !== void 0 && (e.removeInternalAndSame(i, a), Object.keys(i).length || delete t[r]);
1430
+ }
1431
+ }
1432
+ static removeInternalForSave(e, t = !0) {
1433
+ for (let t in e) (t[0] === "_" || e[t] === null || e[t] === void 0) && delete e[t];
1434
+ delete e.grid, t && delete e.el, e.autoPosition || delete e.autoPosition, e.noResize || delete e.noResize, e.noMove || delete e.noMove, e.locked || delete e.locked, (e.w === 1 || e.w === e.minW) && delete e.w, (e.h === 1 || e.h === e.minH) && delete e.h;
1435
+ }
1436
+ static throttle(e, t) {
1437
+ let n = !1;
1438
+ return (...r) => {
1439
+ n || (n = !0, setTimeout(() => {
1440
+ e(...r), n = !1;
1441
+ }, t));
1442
+ };
1443
+ }
1444
+ static removePositioningStyles(e) {
1445
+ let t = e.style;
1446
+ t.position && t.removeProperty("position"), t.left && t.removeProperty("left"), t.top && t.removeProperty("top"), t.width && t.removeProperty("width"), t.height && t.removeProperty("height");
1447
+ }
1448
+ static getScrollElement(t) {
1449
+ if (!t) return document.scrollingElement || document.documentElement;
1450
+ let n = getComputedStyle(t).overflowY;
1451
+ return (n === "auto" || n === "scroll") && t.scrollHeight > t.clientHeight ? t : e.getScrollElement(t.parentElement);
1452
+ }
1453
+ static updateScrollResize(t, n, r) {
1454
+ let i = e.getScrollElement(n), a = i.clientHeight, o = i === e.getScrollElement() ? 0 : i.getBoundingClientRect().top, s = t.clientY - o, c = s < r, l = s > a - r;
1455
+ c ? i.scrollBy({
1456
+ behavior: "smooth",
1457
+ top: s - r
1458
+ }) : l && i.scrollBy({
1459
+ behavior: "smooth",
1460
+ top: r - (a - s)
1461
+ });
1462
+ }
1463
+ static clone(e) {
1464
+ return typeof e != "object" || !e ? e : e instanceof Array ? [...e] : { ...e };
1465
+ }
1466
+ static cloneDeep(t) {
1467
+ let n = [
1468
+ "parentGrid",
1469
+ "el",
1470
+ "grid",
1471
+ "subGrid",
1472
+ "engine"
1473
+ ], r = e.clone(t);
1474
+ for (let i in r) r.hasOwnProperty(i) && typeof r[i] == "object" && i.substring(0, 2) !== "__" && !n.find((e) => e === i) && (r[i] = e.cloneDeep(t[i]));
1475
+ return r;
1476
+ }
1477
+ static cloneNode(e) {
1478
+ let t = e.cloneNode(!0);
1479
+ return t.removeAttribute("id"), t;
1480
+ }
1481
+ static appendTo(t, n) {
1482
+ let r;
1483
+ r = typeof n == "string" ? e.getElement(n) : n, r && r.appendChild(t);
1484
+ }
1485
+ static addElStyles(e, t) {
1486
+ if (t instanceof Object) for (let n in t) t.hasOwnProperty(n) && (Array.isArray(t[n]) ? t[n].forEach((t) => {
1487
+ e.style[n] = t;
1488
+ }) : e.style[n] = t[n]);
1489
+ }
1490
+ static initEvent(e, t) {
1491
+ let n = { type: t.type }, r = {
1492
+ button: 0,
1493
+ which: 0,
1494
+ buttons: 1,
1495
+ bubbles: !0,
1496
+ cancelable: !0,
1497
+ target: t.target ? t.target : e.target
1498
+ };
1499
+ return [
1500
+ "altKey",
1501
+ "ctrlKey",
1502
+ "metaKey",
1503
+ "shiftKey"
1504
+ ].forEach((t) => n[t] = e[t]), [
1505
+ "pageX",
1506
+ "pageY",
1507
+ "clientX",
1508
+ "clientY",
1509
+ "screenX",
1510
+ "screenY"
1511
+ ].forEach((t) => n[t] = e[t]), {
1512
+ ...n,
1513
+ ...r
1514
+ };
1515
+ }
1516
+ static simulateMouseEvent(e, t, n) {
1517
+ let r = e, i = new MouseEvent(t, {
1518
+ bubbles: !0,
1519
+ composed: !0,
1520
+ cancelable: !0,
1521
+ view: window,
1522
+ detail: 1,
1523
+ screenX: e.screenX,
1524
+ screenY: e.screenY,
1525
+ clientX: e.clientX,
1526
+ clientY: e.clientY,
1527
+ ctrlKey: r.ctrlKey ?? !1,
1528
+ altKey: r.altKey ?? !1,
1529
+ shiftKey: r.shiftKey ?? !1,
1530
+ metaKey: r.metaKey ?? !1,
1531
+ button: 0,
1532
+ relatedTarget: e.target
1533
+ });
1534
+ (n || e.target).dispatchEvent(i);
1535
+ }
1536
+ static getValuesFromTransformedElement(t) {
1537
+ let n = document.createElement("div");
1538
+ e.addElStyles(n, {
1539
+ opacity: "0",
1540
+ position: "fixed",
1541
+ top: "0px",
1542
+ left: "0px",
1543
+ width: "1px",
1544
+ height: "1px",
1545
+ zIndex: "-999999"
1546
+ }), t.appendChild(n);
1547
+ let r = n.getBoundingClientRect();
1548
+ return t.removeChild(n), n.remove(), {
1549
+ xScale: 1 / r.width,
1550
+ yScale: 1 / r.height,
1551
+ xOffset: r.left,
1552
+ yOffset: r.top
1553
+ };
1554
+ }
1555
+ static swap(e, t, n) {
1556
+ if (!e) return;
1557
+ let r = e[t];
1558
+ e[t] = e[n], e[n] = r;
1559
+ }
1560
+ static canBeRotated(e) {
1561
+ return !(!e || e.w === e.h || e.locked || e.noResize || e.grid?.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
1562
+ }
1563
+ }, xn = class e {
1564
+ constructor(e = {}) {
1565
+ this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
1566
+ }
1567
+ batchUpdate(e = !0, t = !0) {
1568
+ return !!this.batchMode === e ? this : (this.batchMode = e, e ? (this._prevFloat = this._float, this._float = !0, this.cleanNodes(), this.saveInitial()) : (this._float = this._prevFloat, delete this._prevFloat, t && this._packNodes(), this._notify()), this);
1569
+ }
1570
+ _useEntireRowArea(e, t) {
1571
+ return (!this.float || this.batchMode && !this._prevFloat) && !this._hasLocked && (!e._moving || e._skipDown || t.y <= e.y);
1572
+ }
1573
+ _fixCollisions(e, t = e, n, r = {}) {
1574
+ if (this.sortNodes(-1), n ||= this.collide(e, t), !n) return !1;
1575
+ if (e._moving && !r.nested && !this.float && this.swap(e, n)) return !0;
1576
+ let i = t;
1577
+ !this._loading && this._useEntireRowArea(e, t) && (i = {
1578
+ x: 0,
1579
+ w: this.column,
1580
+ y: t.y,
1581
+ h: t.h
1582
+ }, n = this.collide(e, i, r.skip));
1583
+ let a = !1, o = {
1584
+ nested: !0,
1585
+ pack: !1
1586
+ }, s = 0;
1587
+ for (; n ||= this.collide(e, i, r.skip);) {
1588
+ if (s++ > this.nodes.length * 2) throw Error("Infinite collide check");
1589
+ let i;
1590
+ if (n.locked || this._loading || e._moving && !e._skipDown && t.y > e.y && !this.float && (!this.collide(n, {
1591
+ ...n,
1592
+ y: e.y
1593
+ }, e) || !this.collide(n, {
1594
+ ...n,
1595
+ y: t.y - n.h
1596
+ }, e))) {
1597
+ e._skipDown = e._skipDown || t.y > e.y;
1598
+ let s = {
1599
+ ...t,
1600
+ y: n.y + n.h,
1601
+ ...o
1602
+ };
1603
+ i = this._loading && G.samePos(e, s) ? !0 : this.moveNode(e, s), (n.locked || this._loading) && i ? G.copyPos(t, e) : !n.locked && i && r.pack && (this._packNodes(), t.y = n.y + n.h, G.copyPos(e, t)), a ||= i;
1604
+ } else i = this.moveNode(n, {
1605
+ ...n,
1606
+ y: t.y + t.h,
1607
+ skip: e,
1608
+ ...o
1609
+ });
1610
+ if (!i) return a;
1611
+ n = void 0;
1612
+ }
1613
+ return a;
1614
+ }
1615
+ collide(e, t = e, n) {
1616
+ let r = e._id, i = n?._id;
1617
+ return this.nodes.find((e) => e._id !== r && e._id !== i && G.isIntercepted(e, t));
1618
+ }
1619
+ collideAll(e, t = e, n) {
1620
+ let r = e._id, i = n?._id;
1621
+ return this.nodes.filter((e) => e._id !== r && e._id !== i && G.isIntercepted(e, t));
1622
+ }
1623
+ directionCollideCoverage(e, t, n) {
1624
+ if (!t.rect || !e._rect) return;
1625
+ let r = e._rect, i = { ...t.rect };
1626
+ i.y > r.y ? (i.h += i.y - r.y, i.y = r.y) : i.h += r.y - i.y, i.x > r.x ? (i.w += i.x - r.x, i.x = r.x) : i.w += r.x - i.x;
1627
+ let a, o = .5;
1628
+ for (let e of n) {
1629
+ if (e.locked || !e._rect) break;
1630
+ let t = e._rect, n = Number.MAX_VALUE, s = Number.MAX_VALUE;
1631
+ r.y < t.y ? n = (i.y + i.h - t.y) / t.h : r.y + r.h > t.y + t.h && (n = (t.y + t.h - i.y) / t.h), r.x < t.x ? s = (i.x + i.w - t.x) / t.w : r.x + r.w > t.x + t.w && (s = (t.x + t.w - i.x) / t.w);
1632
+ let c = Math.min(s, n);
1633
+ c > o && (o = c, a = e);
1634
+ }
1635
+ return t.collide = a, a;
1636
+ }
1637
+ cacheRects(e, t, n, r, i, a) {
1638
+ return this.nodes.forEach((o) => o._rect = {
1639
+ y: o.y * t + n,
1640
+ x: o.x * e + a,
1641
+ w: o.w * e - a - r,
1642
+ h: o.h * t - n - i
1643
+ }), this;
1644
+ }
1645
+ swap(e, t) {
1646
+ if (!t || t.locked || !e || e.locked) return !1;
1647
+ function n() {
1648
+ let n = t.x, r = t.y;
1649
+ return t.x = e.x, t.y = e.y, e.h == t.h ? e.w == t.w ? (e.x = n, e.y = r) : (e.x = t.x + t.w, e.y = r) : (e.x = n, e.y = t.y + t.h), e._dirty = t._dirty = !0, !0;
1650
+ }
1651
+ let r;
1652
+ if (e.w === t.w && e.h === t.h && (e.x === t.x || e.y === t.y) && (r = G.isTouching(e, t))) return n();
1653
+ if (r !== !1) {
1654
+ if (e.w === t.w && e.x === t.x && (r ||= G.isTouching(e, t))) {
1655
+ if (t.y < e.y) {
1656
+ let n = e;
1657
+ e = t, t = n;
1658
+ }
1659
+ return n();
1660
+ }
1661
+ if (r !== !1) {
1662
+ if (e.h === t.h && e.y === t.y && (r ||= G.isTouching(e, t))) {
1663
+ if (t.x < e.x) {
1664
+ let n = e;
1665
+ e = t, t = n;
1666
+ }
1667
+ return n();
1668
+ }
1669
+ return !1;
1670
+ }
1671
+ }
1672
+ }
1673
+ isAreaEmpty(e, t, n, r) {
1674
+ let i = {
1675
+ x: e || 0,
1676
+ y: t || 0,
1677
+ w: n || 1,
1678
+ h: r || 1
1679
+ };
1680
+ return !this.collide(i);
1681
+ }
1682
+ compact(e = "compact", t = !0) {
1683
+ if (this.nodes.length === 0) return this;
1684
+ t && this.sortNodes();
1685
+ let n = this.batchMode;
1686
+ n || this.batchUpdate();
1687
+ let r = this._inColumnResize;
1688
+ r || (this._inColumnResize = !0);
1689
+ let i = this.nodes;
1690
+ return this.nodes = [], i.forEach((t, n, r) => {
1691
+ let i;
1692
+ t.locked || (t.autoPosition = !0, e === "list" && n && (i = r[n - 1])), this.addNode(t, !1, i);
1693
+ }), r || delete this._inColumnResize, n || this.batchUpdate(!1), this;
1694
+ }
1695
+ set float(e) {
1696
+ this._float !== e && (this._float = e || !1, e || this._packNodes()._notify());
1697
+ }
1698
+ get float() {
1699
+ return this._float || !1;
1700
+ }
1701
+ sortNodes(e = 1) {
1702
+ return this.nodes = G.sort(this.nodes, e), this;
1703
+ }
1704
+ _packNodes() {
1705
+ return this.batchMode ? this : (this.sortNodes(), this.float ? this.nodes.forEach((e) => {
1706
+ if (e._updating || e._orig === void 0 || e.y === e._orig.y) return;
1707
+ let t = e.y;
1708
+ for (; t > e._orig.y;) --t, this.collide(e, {
1709
+ x: e.x,
1710
+ y: t,
1711
+ w: e.w,
1712
+ h: e.h
1713
+ }) || (e._dirty = !0, e.y = t);
1714
+ }) : this.nodes.forEach((e, t) => {
1715
+ if (!e.locked) for (; e.y > 0;) {
1716
+ let n = t === 0 ? 0 : e.y - 1;
1717
+ if (!(t === 0 || !this.collide(e, {
1718
+ x: e.x,
1719
+ y: n,
1720
+ w: e.w,
1721
+ h: e.h
1722
+ }))) break;
1723
+ e._dirty = e.y !== n, e.y = n;
1724
+ }
1725
+ }), this);
1726
+ }
1727
+ prepareNode(t, n) {
1728
+ t._id = t._id ?? e._idSeq++;
1729
+ let r = t.id;
1730
+ if (r) {
1731
+ let e = 1;
1732
+ for (; this.nodes.find((e) => e.id === t.id && e !== t);) t.id = r + "_" + e++;
1733
+ }
1734
+ (t.x === void 0 || t.y === void 0 || t.x === null || t.y === null) && (t.autoPosition = !0);
1735
+ let i = {
1736
+ x: 0,
1737
+ y: 0,
1738
+ w: 1,
1739
+ h: 1
1740
+ };
1741
+ return G.defaults(t, i), t.autoPosition || delete t.autoPosition, t.noResize || delete t.noResize, t.noMove || delete t.noMove, G.sanitizeMinMax(t), typeof t.x == "string" && (t.x = Number(t.x)), typeof t.y == "string" && (t.y = Number(t.y)), typeof t.w == "string" && (t.w = Number(t.w)), typeof t.h == "string" && (t.h = Number(t.h)), isNaN(t.x) && (t.x = i.x, t.autoPosition = !0), isNaN(t.y) && (t.y = i.y, t.autoPosition = !0), isNaN(t.w) && (t.w = i.w), isNaN(t.h) && (t.h = i.h), this.nodeBoundFix(t, n), t;
1742
+ }
1743
+ nodeBoundFix(e, t) {
1744
+ let n = e._orig || G.copyPos({}, e);
1745
+ if (e.maxW && (e.w = Math.min(e.w || 1, e.maxW)), e.maxH && (e.h = Math.min(e.h || 1, e.maxH)), e.minW && (e.w = Math.max(e.w || 1, e.minW)), e.minH && (e.h = Math.max(e.h || 1, e.minH)), (e.x || 0) + (e.w || 1) > this.column && this.column < this.defaultColumn && !this._inColumnResize && !this.skipCacheUpdate && e._id != null && this.findCacheLayout(e, this.defaultColumn) === -1) {
1746
+ let t = { ...e };
1747
+ t.autoPosition || t.x === void 0 ? (delete t.x, delete t.y) : t.x = Math.min(this.defaultColumn - 1, t.x), t.w = Math.min(this.defaultColumn, t.w || 1), this.cacheOneLayout(t, this.defaultColumn);
1748
+ }
1749
+ return e.w > this.column ? e.w = this.column : e.w < 1 && (e.w = 1), this.maxRow && e.h > this.maxRow ? e.h = this.maxRow : e.h < 1 && (e.h = 1), e.x < 0 && (e.x = 0), e.y < 0 && (e.y = 0), e.x + e.w > this.column && (t ? e.w = this.column - e.x : e.x = this.column - e.w), this.maxRow && e.y + e.h > this.maxRow && (t ? e.h = this.maxRow - e.y : e.y = this.maxRow - e.h), G.samePos(e, n) || (e._dirty = !0), this;
1750
+ }
1751
+ getDirtyNodes(e) {
1752
+ return e ? this.nodes.filter((e) => e._dirty && !G.samePos(e, e._orig)) : this.nodes.filter((e) => e._dirty);
1753
+ }
1754
+ _notify(e) {
1755
+ if (this.batchMode || !this.onChange) return this;
1756
+ let t = (e || []).concat(this.getDirtyNodes());
1757
+ return this.onChange(t), this;
1758
+ }
1759
+ cleanNodes() {
1760
+ return this.batchMode || this.nodes.forEach((e) => {
1761
+ delete e._dirty, delete e._lastTried;
1762
+ }), this;
1763
+ }
1764
+ saveInitial() {
1765
+ return this.nodes.forEach((e) => {
1766
+ e._orig = G.copyPos({}, e), delete e._dirty;
1767
+ }), this._hasLocked = this.nodes.some((e) => e.locked), this;
1768
+ }
1769
+ restoreInitial() {
1770
+ return this.nodes.forEach((e) => {
1771
+ !e._orig || G.samePos(e, e._orig) || (G.copyPos(e, e._orig), e._dirty = !0);
1772
+ }), this._notify(), this;
1773
+ }
1774
+ findEmptyPosition(e, t = this.nodes, n = this.column, r) {
1775
+ let i = r ? r.y * n + (r.x + r.w) : 0, a = !1;
1776
+ for (let r = i; !a; ++r) {
1777
+ let i = r % n, o = Math.floor(r / n);
1778
+ if (i + e.w > n) continue;
1779
+ let s = {
1780
+ x: i,
1781
+ y: o,
1782
+ w: e.w,
1783
+ h: e.h
1784
+ };
1785
+ t.find((e) => G.isIntercepted(s, e)) || ((e.x !== i || e.y !== o) && (e._dirty = !0), e.x = i, e.y = o, delete e.autoPosition, a = !0);
1786
+ }
1787
+ return a;
1788
+ }
1789
+ addNode(e, t = !1, n) {
1790
+ let r = this.nodes.find((t) => t._id === e._id);
1791
+ if (r) return r;
1792
+ this._inColumnResize ? this.nodeBoundFix(e) : this.prepareNode(e), delete e._temporaryRemoved, delete e._removeDOM;
1793
+ let i;
1794
+ return e.autoPosition && this.findEmptyPosition(e, this.nodes, this.column, n) && (delete e.autoPosition, i = !0), this.nodes.push(e), t && this.addedNodes.push(e), i || this._fixCollisions(e), this.batchMode || this._packNodes()._notify(), e;
1795
+ }
1796
+ removeNode(e, t = !0, n = !1) {
1797
+ return this.nodes.find((t) => t._id === e._id) ? (n && this.removedNodes.push(e), t && (e._removeDOM = !0), this.nodes = this.nodes.filter((t) => t._id !== e._id), e._isAboutToRemove || this._packNodes(), this._notify([e]), this) : this;
1798
+ }
1799
+ removeAll(e = !0, t = !0) {
1800
+ if (delete this._layouts, !this.nodes.length) return this;
1801
+ e && this.nodes.forEach((e) => e._removeDOM = !0);
1802
+ let n = this.nodes;
1803
+ return this.removedNodes = t ? n : [], this.nodes = [], this._notify(n);
1804
+ }
1805
+ moveNodeCheck(t, n) {
1806
+ if (!this.changedPosConstrain(t, n)) return !1;
1807
+ if (n.pack = !0, !this.maxRow) return this.moveNode(t, n);
1808
+ let r, i = new e({
1809
+ column: this.column,
1810
+ float: this.float,
1811
+ nodes: this.nodes.map((e) => e._id === t._id ? (r = { ...e }, r) : { ...e })
1812
+ });
1813
+ if (!r) return !1;
1814
+ let a = i.moveNode(r, n) && i.getRow() <= Math.max(this.getRow(), this.maxRow);
1815
+ if (!a && !n.resizing && n.collide) {
1816
+ let e = n.collide.el.gridstackNode;
1817
+ if (this.swap(t, e)) return this._notify(), !0;
1818
+ }
1819
+ return a ? (i.nodes.filter((e) => e._dirty).forEach((e) => {
1820
+ let t = this.nodes.find((t) => t._id === e._id);
1821
+ t && (G.copyPos(t, e), t._dirty = !0);
1822
+ }), this._notify(), !0) : !1;
1823
+ }
1824
+ willItFit(t) {
1825
+ if (delete t._willFitPos, !this.maxRow) return !0;
1826
+ let n = new e({
1827
+ column: this.column,
1828
+ float: this.float,
1829
+ nodes: this.nodes.map((e) => ({ ...e }))
1830
+ }), r = { ...t };
1831
+ return this.cleanupNode(r), delete r.el, delete r._id, delete r.content, delete r.grid, n.addNode(r), n.getRow() <= this.maxRow ? (t._willFitPos = G.copyPos({}, r), !0) : !1;
1832
+ }
1833
+ changedPosConstrain(e, t) {
1834
+ return t.w = t.w || e.w, t.h = t.h || e.h, e.x !== t.x || e.y !== t.y ? !0 : (e.maxW && (t.w = Math.min(t.w, e.maxW)), e.maxH && (t.h = Math.min(t.h, e.maxH)), e.minW && (t.w = Math.max(t.w, e.minW)), e.minH && (t.h = Math.max(t.h, e.minH)), e.w !== t.w || e.h !== t.h);
1835
+ }
1836
+ moveNode(e, t) {
1837
+ if (!e || !t) return !1;
1838
+ let n;
1839
+ t.pack === void 0 && !this.batchMode && (n = t.pack = !0), typeof t.x != "number" && (t.x = e.x), typeof t.y != "number" && (t.y = e.y), typeof t.w != "number" && (t.w = e.w), typeof t.h != "number" && (t.h = e.h);
1840
+ let r = e.w !== t.w || e.h !== t.h, i = G.copyPos({}, e, !0);
1841
+ if (G.copyPos(i, t), this.nodeBoundFix(i, r), G.copyPos(t, i), !t.forceCollide && G.samePos(e, t)) return !1;
1842
+ let a = G.copyPos({}, e), o = this.collideAll(e, i, t.skip), s = !0;
1843
+ if (o.length) {
1844
+ let r = e._moving && !t.nested, a = r ? this.directionCollideCoverage(e, t, o) : o[0];
1845
+ if (r && a && e.grid?.opts?.subGridDynamic && !e.grid._isTemp) {
1846
+ let n = G.areaIntercept(t.rect, a._rect), r = G.area(t.rect), i = G.area(a._rect);
1847
+ n / (r < i ? r : i) > .8 && (a.grid.makeSubGrid(a.el, void 0, e), a = void 0);
1848
+ }
1849
+ a ? s = !this._fixCollisions(e, i, a, t) : (s = !1, n && delete t.pack);
1850
+ }
1851
+ return s && !G.samePos(e, i) && (e._dirty = !0, G.copyPos(e, i)), t.pack && this._packNodes()._notify(), !G.samePos(e, a);
1852
+ }
1853
+ getRow() {
1854
+ return this.nodes.reduce((e, t) => Math.max(e, t.y + t.h), 0);
1855
+ }
1856
+ beginUpdate(e) {
1857
+ return e._updating || (e._updating = !0, delete e._skipDown, this.batchMode || this.saveInitial()), this;
1858
+ }
1859
+ endUpdate() {
1860
+ let e = this.nodes.find((e) => e._updating);
1861
+ return e && (delete e._updating, delete e._skipDown), this;
1862
+ }
1863
+ save(e = !0, t, n) {
1864
+ let r = this._layouts?.length || 0, i;
1865
+ r && (n ? n !== this.column && (i = this._layouts[n]) : this.column !== r - 1 && (i = this._layouts[r - 1]));
1866
+ let a = [];
1867
+ return this.sortNodes(), this.nodes.forEach((n) => {
1868
+ let r = i?.find((e) => e._id === n._id), o = {
1869
+ ...n,
1870
+ ...r || {}
1871
+ };
1872
+ G.removeInternalForSave(o, !e), t && t(n, o), a.push(o);
1873
+ }), a;
1874
+ }
1875
+ layoutsNodesChange(e) {
1876
+ return !this._layouts || this._inColumnResize || this._layouts.forEach((t, n) => {
1877
+ if (!t || n === this.column) return this;
1878
+ if (n < this.column) this._layouts[n] = void 0;
1879
+ else {
1880
+ let r = n / this.column;
1881
+ e.forEach((e) => {
1882
+ if (!e._orig) return;
1883
+ let n = t.find((t) => t._id === e._id);
1884
+ n && (n.y >= 0 && e.y !== e._orig.y && (n.y += e.y - e._orig.y, n.y < 0 && (n.y = 0)), e.x !== e._orig.x && (n.x = Math.round(e.x * r), n.x < 0 && (n.x = 0)), e.w !== e._orig.w && (n.w = Math.round(e.w * r), n.w < 1 && (n.w = 1)));
1885
+ });
1886
+ }
1887
+ }), this;
1888
+ }
1889
+ columnChanged(e, t, n = "moveScale") {
1890
+ if (!this.nodes.length || !t || e === t) return this;
1891
+ let r = n === "compact" || n === "list";
1892
+ r && this.sortNodes(1), t < e && this.cacheLayout(this.nodes, e), this.batchUpdate();
1893
+ let i = [], a = r ? this.nodes : G.sort(this.nodes, -1);
1894
+ if (t > e && this._layouts) {
1895
+ let n = this._layouts[t] || [], o = this._layouts.length - 1;
1896
+ !n.length && e !== o && this._layouts[o]?.length && (e = o, this._layouts[o].forEach((e) => {
1897
+ let t = a.find((t) => t._id === e._id);
1898
+ t && (!r && !e.autoPosition && (t.x = e.x ?? t.x, t.y = e.y ?? t.y), t.w = e.w ?? t.w, (e.x == null || e.y === void 0) && (t.autoPosition = !0));
1899
+ })), n.forEach((e) => {
1900
+ let t = a.findIndex((t) => t._id === e._id);
1901
+ if (t !== -1) {
1902
+ let n = a[t];
1903
+ if (r) {
1904
+ n.w = e.w;
1905
+ return;
1906
+ }
1907
+ (e.autoPosition || isNaN(e.x) || isNaN(e.y)) && this.findEmptyPosition(e, i), e.autoPosition || (n.x = e.x ?? n.x, n.y = e.y ?? n.y, n.w = e.w ?? n.w, i.push(n)), a.splice(t, 1);
1908
+ }
1909
+ });
1910
+ }
1911
+ if (r) this.compact(n, !1);
1912
+ else {
1913
+ if (a.length) if (typeof n == "function") n(t, e, i, a);
1914
+ else {
1915
+ let o = r || n === "none" ? 1 : t / e, s = n === "move" || n === "moveScale", c = n === "scale" || n === "moveScale";
1916
+ a.forEach((n) => {
1917
+ n.x = t === 1 ? 0 : s ? Math.round(n.x * o) : Math.min(n.x, t - 1), n.w = t === 1 || e === 1 ? 1 : c ? Math.round(n.w * o) || 1 : Math.min(n.w, t), i.push(n);
1918
+ }), a = [];
1919
+ }
1920
+ i = G.sort(i, -1), this._inColumnResize = !0, this.nodes = [], i.forEach((e) => {
1921
+ this.addNode(e, !1), delete e._orig;
1922
+ });
1923
+ }
1924
+ return this.nodes.forEach((e) => delete e._orig), this.batchUpdate(!1, !r), delete this._inColumnResize, this;
1925
+ }
1926
+ cacheLayout(t, n, r = !1) {
1927
+ let i = [];
1928
+ return t.forEach((t, n) => {
1929
+ t._id === void 0 && (t._id = (t.id ? this.nodes.find((e) => e.id === t.id) : void 0)?._id ?? e._idSeq++), i[n] = {
1930
+ x: t.x,
1931
+ y: t.y,
1932
+ w: t.w,
1933
+ _id: t._id
1934
+ };
1935
+ }), this._layouts = r ? [] : this._layouts || [], this._layouts[n] = i, this;
1936
+ }
1937
+ cacheOneLayout(t, n) {
1938
+ t._id = t._id ?? e._idSeq++;
1939
+ let r = {
1940
+ x: t.x,
1941
+ y: t.y,
1942
+ w: t.w,
1943
+ _id: t._id
1944
+ };
1945
+ (t.autoPosition || t.x === void 0) && (delete r.x, delete r.y, t.autoPosition && (r.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[n] = this._layouts[n] || [];
1946
+ let i = this.findCacheLayout(t, n);
1947
+ return i === -1 ? this._layouts[n].push(r) : this._layouts[n][i] = r, this;
1948
+ }
1949
+ findCacheLayout(e, t) {
1950
+ return this._layouts?.[t]?.findIndex((t) => t._id === e._id) ?? -1;
1951
+ }
1952
+ removeNodeFromLayoutCache(e) {
1953
+ if (this._layouts) for (let t = 0; t < this._layouts.length; t++) {
1954
+ let n = this.findCacheLayout(e, t);
1955
+ n !== -1 && this._layouts[t].splice(n, 1);
1956
+ }
1957
+ }
1958
+ cleanupNode(e) {
1959
+ for (let t in e) t[0] === "_" && t !== "_id" && delete e[t];
1960
+ return this;
1961
+ }
1962
+ };
1963
+ xn._idSeq = 0;
1964
+ //#endregion
1965
+ //#region node_modules/gridstack/dist/types.js
1966
+ var K = {
1967
+ alwaysShowResizeHandle: "mobile",
1968
+ animate: !0,
1969
+ auto: !0,
1970
+ cellHeight: "auto",
1971
+ cellHeightThrottle: 100,
1972
+ cellHeightUnit: "px",
1973
+ column: 12,
1974
+ draggable: {
1975
+ handle: ".grid-stack-item-content",
1976
+ appendTo: "body",
1977
+ scroll: !0
1978
+ },
1979
+ handle: ".grid-stack-item-content",
1980
+ itemClass: "grid-stack-item",
1981
+ margin: 10,
1982
+ marginUnit: "px",
1983
+ maxRow: 0,
1984
+ minRow: 0,
1985
+ placeholderClass: "grid-stack-placeholder",
1986
+ placeholderText: "",
1987
+ removableOptions: {
1988
+ accept: "grid-stack-item",
1989
+ decline: "grid-stack-non-removable"
1990
+ },
1991
+ resizable: { handles: "se" },
1992
+ rtl: "auto"
1993
+ }, q = class {}, J = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0), Y = class {};
1994
+ function Sn(e, t) {
1995
+ e.touches.length > 1 || (e.cancelable && e.preventDefault(), G.simulateMouseEvent(e.changedTouches[0], t));
1996
+ }
1997
+ function Cn(e, t) {
1998
+ e.cancelable && e.preventDefault(), G.simulateMouseEvent(e, t);
1999
+ }
2000
+ function wn(e) {
2001
+ Y.touchHandled || (Y.touchHandled = !0, Sn(e, "mousedown"));
2002
+ }
2003
+ function Tn(e) {
2004
+ Y.touchHandled && Sn(e, "mousemove");
2005
+ }
2006
+ function En(e) {
2007
+ if (!Y.touchHandled) return;
2008
+ Y.pointerLeaveTimeout && (window.clearTimeout(Y.pointerLeaveTimeout), delete Y.pointerLeaveTimeout);
2009
+ let t = !!q.dragElement;
2010
+ Sn(e, "mouseup"), t || Sn(e, "click"), Y.touchHandled = !1;
2011
+ }
2012
+ function Dn(e) {
2013
+ e.pointerType !== "mouse" && e.target.releasePointerCapture(e.pointerId);
2014
+ }
2015
+ function On(e) {
2016
+ q.dragElement && e.pointerType !== "mouse" && Cn(e, "mouseenter");
2017
+ }
2018
+ function kn(e) {
2019
+ q.dragElement && e.pointerType !== "mouse" && (Y.pointerLeaveTimeout = window.setTimeout(() => {
2020
+ delete Y.pointerLeaveTimeout, Cn(e, "mouseleave");
2021
+ }, 10));
2022
+ }
2023
+ //#endregion
2024
+ //#region node_modules/gridstack/dist/dd-resizable-handle.js
2025
+ var An = class e {
2026
+ constructor(e, t, n) {
2027
+ this.host = e, this.dir = t, this.option = n, this.moving = !1, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this._init();
2028
+ }
2029
+ _init() {
2030
+ if (this.option.element) try {
2031
+ this.el = this.option.element instanceof HTMLElement ? this.option.element : this.host.querySelector(this.option.element);
2032
+ } catch (e) {
2033
+ this.option.element = void 0, console.error("Query for resizeable handle failed, falling back", e);
2034
+ }
2035
+ return this.el || (this.el = document.createElement("div"), this.host.appendChild(this.el)), this.el.classList.add("ui-resizable-handle"), this.el.classList.add(`${e.prefix}${this.dir}`), this.el.style.zIndex = "100", this.el.style.userSelect = "none", this.el.addEventListener("mousedown", this._mouseDown), J && (this.el.addEventListener("touchstart", wn), this.el.addEventListener("pointerdown", Dn)), this;
2036
+ }
2037
+ destroy() {
2038
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), J && (this.el.removeEventListener("touchstart", wn), this.el.removeEventListener("pointerdown", Dn)), this.option.element || this.host.removeChild(this.el), delete this.el, delete this.host, this;
2039
+ }
2040
+ _mouseDown(e) {
2041
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, {
2042
+ capture: !0,
2043
+ passive: !0
2044
+ }), document.addEventListener("mouseup", this._mouseUp, !0), J && (this.el.addEventListener("touchmove", Tn), this.el.addEventListener("touchend", En)), e.stopPropagation(), e.preventDefault();
2045
+ }
2046
+ _mouseMove(e) {
2047
+ let t = this.mouseDownEvent;
2048
+ this.moving ? this._triggerEvent("move", e) : Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 2 && (this.moving = !0, this._triggerEvent("start", this.mouseDownEvent), this._triggerEvent("move", e), document.addEventListener("keydown", this._keyEvent)), e.stopPropagation();
2049
+ }
2050
+ _mouseUp(e) {
2051
+ this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), J && (this.el.removeEventListener("touchmove", Tn), this.el.removeEventListener("touchend", En)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2052
+ }
2053
+ _keyEvent(e) {
2054
+ e.key === "Escape" && (this.host.gridstackNode?.grid?.engine.restoreInitial(), this._mouseUp(this.mouseDownEvent));
2055
+ }
2056
+ _triggerEvent(e, t) {
2057
+ return this.option[e] && this.option[e](t), this;
2058
+ }
2059
+ };
2060
+ An.prefix = "ui-resizable-";
2061
+ //#endregion
2062
+ //#region node_modules/gridstack/dist/dd-base-impl.js
2063
+ var jn = class {
2064
+ constructor() {
2065
+ this._eventRegister = {};
2066
+ }
2067
+ get disabled() {
2068
+ return this._disabled;
2069
+ }
2070
+ on(e, t) {
2071
+ this._eventRegister[e] = t;
2072
+ }
2073
+ off(e) {
2074
+ delete this._eventRegister[e];
2075
+ }
2076
+ enable() {
2077
+ this._disabled = !1;
2078
+ }
2079
+ disable() {
2080
+ this._disabled = !0;
2081
+ }
2082
+ destroy() {
2083
+ delete this._eventRegister;
2084
+ }
2085
+ triggerEvent(e, t) {
2086
+ if (!this.disabled && this._eventRegister && this._eventRegister[e]) return this._eventRegister[e](t);
2087
+ }
2088
+ }, Mn = class e extends jn {
2089
+ constructor(e, t = {}) {
2090
+ super(), this.el = e, this.option = t, this.rectScale = {
2091
+ x: 1,
2092
+ y: 1
2093
+ }, this._ui = () => {
2094
+ let e = this.el.parentElement.getBoundingClientRect(), t = {
2095
+ width: this.originalRect.width,
2096
+ height: this.originalRect.height + this.scrolled,
2097
+ left: this.originalRect.left,
2098
+ right: this.originalRect.right,
2099
+ top: this.originalRect.top - this.scrolled
2100
+ }, n = this.temporalRect || t;
2101
+ return {
2102
+ position: {
2103
+ left: this.option.rtl ? (e.right - n.right) * this.rectScale.x : (n.left - e.left) * this.rectScale.x,
2104
+ top: (n.top - e.top) * this.rectScale.y
2105
+ },
2106
+ size: {
2107
+ width: n.width * this.rectScale.x,
2108
+ height: n.height * this.rectScale.y
2109
+ }
2110
+ };
2111
+ }, this._mouseOver = this._mouseOver.bind(this), this._mouseOut = this._mouseOut.bind(this), this.enable(), this._setupAutoHide(this.option.autoHide), this._setupHandlers();
2112
+ }
2113
+ on(e, t) {
2114
+ super.on(e, t);
2115
+ }
2116
+ off(e) {
2117
+ super.off(e);
2118
+ }
2119
+ enable() {
2120
+ super.enable(), this.el.classList.remove("ui-resizable-disabled"), this._setupAutoHide(this.option.autoHide);
2121
+ }
2122
+ disable() {
2123
+ super.disable(), this.el.classList.add("ui-resizable-disabled"), this._setupAutoHide(!1);
2124
+ }
2125
+ destroy() {
2126
+ this._removeHandlers(), this._setupAutoHide(!1), delete this.el, super.destroy();
2127
+ }
2128
+ updateOption(e) {
2129
+ let t = e.handles && e.handles !== this.option.handles, n = e.autoHide && e.autoHide !== this.option.autoHide;
2130
+ return Object.keys(e).forEach((t) => this.option[t] = e[t]), t && (this._removeHandlers(), this._setupHandlers()), n && this._setupAutoHide(this.option.autoHide), this;
2131
+ }
2132
+ _setupAutoHide(e) {
2133
+ return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), q.overResizeElement === this && delete q.overResizeElement), this;
2134
+ }
2135
+ _mouseOver(e) {
2136
+ q.overResizeElement || q.dragElement || (q.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
2137
+ }
2138
+ _mouseOut(e) {
2139
+ q.overResizeElement === this && (delete q.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
2140
+ }
2141
+ _setupHandlers() {
2142
+ return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new An(this.el, e, {
2143
+ element: this.option.element,
2144
+ start: (e) => this._resizeStart(e),
2145
+ stop: (e) => this._resizeStop(e),
2146
+ move: (t) => this._resizing(t, e)
2147
+ })), this;
2148
+ }
2149
+ _resizeStart(e) {
2150
+ this.sizeToContent = G.shouldSizeToContent(this.el.gridstackNode, !0), this.originalRect = this.el.getBoundingClientRect(), this.scrollEl = G.getScrollElement(this.el), this.scrollY = this.scrollEl.scrollTop, this.scrolled = 0, this.startEvent = e, this._setupHelper(), this._applyChange();
2151
+ let t = G.initEvent(e, {
2152
+ type: "resizestart",
2153
+ target: this.el
2154
+ });
2155
+ return this.option.start && this.option.start(t, this._ui()), this.el.classList.add("ui-resizable-resizing"), this.triggerEvent("resizestart", t), this;
2156
+ }
2157
+ _resizing(e, t) {
2158
+ this.scrolled = this.scrollEl.scrollTop - this.scrollY, this.temporalRect = this._getChange(e, t), this._applyChange();
2159
+ let n = G.initEvent(e, {
2160
+ type: "resize",
2161
+ target: this.el
2162
+ });
2163
+ return n.resizeDir = t, n.hasMovedX = this.option.rtl ? t.includes("e") : t.includes("w"), n.hasMovedY = t.includes("n"), this.option.resize && this.option.resize(n, this._ui()), this.triggerEvent("resize", n), this;
2164
+ }
2165
+ _resizeStop(e) {
2166
+ let t = G.initEvent(e, {
2167
+ type: "resizestop",
2168
+ target: this.el
2169
+ });
2170
+ return this._cleanHelper(), this.option.stop && this.option.stop(t), this.el.classList.remove("ui-resizable-resizing"), this.triggerEvent("resizestop", t), delete this.startEvent, delete this.originalRect, delete this.temporalRect, delete this.scrollY, delete this.scrolled, this;
2171
+ }
2172
+ _setupHelper() {
2173
+ this.elOriginStyleVal = e._originStyleProp.map((e) => this.el.style[e]), this.parentOriginStylePosition = this.el.parentElement.style.position;
2174
+ let t = this.el.parentElement, n = G.getValuesFromTransformedElement(t);
2175
+ return this.rectScale = {
2176
+ x: n.xScale,
2177
+ y: n.yScale
2178
+ }, getComputedStyle(this.el.parentElement).position.match(/static/) && (this.el.parentElement.style.position = "relative"), this.el.style.position = "absolute", this.el.style.opacity = "0.8", this;
2179
+ }
2180
+ _cleanHelper() {
2181
+ return e._originStyleProp.forEach((e, t) => {
2182
+ this.el.style[e] = this.elOriginStyleVal[t] || null;
2183
+ }), this.el.parentElement.style.position = this.parentOriginStylePosition || null, this;
2184
+ }
2185
+ _getChange(e, t) {
2186
+ let n = this.startEvent, r = {
2187
+ width: this.originalRect.width,
2188
+ height: this.originalRect.height + this.scrolled,
2189
+ left: this.originalRect.left,
2190
+ right: this.originalRect.right,
2191
+ top: this.originalRect.top - this.scrolled
2192
+ }, i = e.clientX - n.clientX, a = this.sizeToContent ? 0 : e.clientY - n.clientY, o, s, c = this.option.rtl;
2193
+ !c && t.indexOf("e") > -1 ? r.width += i : c && t.indexOf("w") > -1 ? r.width -= i : !c && t.indexOf("w") > -1 ? (r.width -= i, r.left += i, o = !0) : c && t.indexOf("e") > -1 && (r.width += i, r.right += i, o = !0), t.indexOf("s") > -1 ? r.height += a : t.indexOf("n") > -1 && (r.height -= a, r.top += a, s = !0);
2194
+ let l = this._constrainSize(r.width, r.height, o, s);
2195
+ return Math.round(r.width) !== Math.round(l.width) && (!c && t.indexOf("w") > -1 ? r.left += r.width - l.width : c && t.indexOf("e") > -1 && (r.right -= r.width - l.width), r.width = l.width), Math.round(r.height) !== Math.round(l.height) && (t.indexOf("n") > -1 && (r.top += r.height - l.height), r.height = l.height), r;
2196
+ }
2197
+ _constrainSize(e, t, n, r) {
2198
+ let i = this.option, a = (n ? i.maxWidthMoveLeft : i.maxWidth) || 2 ** 53 - 1, o = i.minWidth / this.rectScale.x || e, s = (r ? i.maxHeightMoveUp : i.maxHeight) || 2 ** 53 - 1, c = i.minHeight / this.rectScale.y || t;
2199
+ return {
2200
+ width: Math.min(a, Math.max(o, e)),
2201
+ height: Math.min(s, Math.max(c, t))
2202
+ };
2203
+ }
2204
+ _applyChange() {
2205
+ let e = {
2206
+ left: 0,
2207
+ right: 0,
2208
+ top: 0,
2209
+ width: 0,
2210
+ height: 0
2211
+ };
2212
+ if (this.el.style.position === "absolute") {
2213
+ let { left: t, right: n, top: r } = this.el.parentElement.getBoundingClientRect();
2214
+ e = {
2215
+ left: t,
2216
+ right: n,
2217
+ top: r,
2218
+ width: 0,
2219
+ height: 0
2220
+ };
2221
+ }
2222
+ return this.temporalRect && Object.entries(this.temporalRect).forEach(([t, n]) => {
2223
+ if (this.option.rtl ? t === "left" : t === "right") return;
2224
+ let r = t === "width" || t === "left" || t === "right" ? this.rectScale.x : t === "height" || t === "top" ? this.rectScale.y : 1, i;
2225
+ i = t === "right" ? (e.right - n) * this.rectScale.x + "px" : (n - e[t]) * r + "px", this.el.style[t] = i;
2226
+ }), this;
2227
+ }
2228
+ _removeHandlers() {
2229
+ return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
2230
+ }
2231
+ };
2232
+ Mn._originStyleProp = [
2233
+ "width",
2234
+ "height",
2235
+ "position",
2236
+ "left",
2237
+ "right",
2238
+ "top",
2239
+ "opacity",
2240
+ "zIndex"
2241
+ ];
2242
+ //#endregion
2243
+ //#region node_modules/gridstack/dist/dd-draggable.js
2244
+ var Nn = "input,textarea,button,select,option,[contenteditable=\"true\"],.ui-resizable-handle", Pn = class e extends jn {
2245
+ constructor(e, t = {}) {
2246
+ super(), this.el = e, this.option = t, this.dragTransform = {
2247
+ xScale: 1,
2248
+ yScale: 1,
2249
+ xOffset: 0,
2250
+ yOffset: 0
2251
+ }, this._autoScrollTick = () => {
2252
+ let e = this.helper, t = this._autoScrollContainer;
2253
+ if (!e || !t) {
2254
+ this._stopScrolling();
2255
+ return;
2256
+ }
2257
+ let n = this._getClipping(e, t);
2258
+ if (n === 0) {
2259
+ this._stopScrolling();
2260
+ return;
2261
+ }
2262
+ if (!this._autoScrollMaxSpeed) {
2263
+ let e = window.innerHeight || document.documentElement.clientHeight;
2264
+ this._autoScrollMaxSpeed = Math.max(e / 150, 4);
2265
+ }
2266
+ let r = Math.min(Math.abs(n) * .5, this._autoScrollMaxSpeed), i = n > 0 ? r : -r, a = t.scrollTop;
2267
+ if (t.scrollTop += i, t.scrollTop === a) {
2268
+ this._stopScrolling();
2269
+ return;
2270
+ }
2271
+ this.dragging && this.lastDrag && (this._dragFollow(this.lastDrag), this._callDrag(this.lastDrag)), this._autoScrollAnimId = requestAnimationFrame(this._autoScrollTick);
2272
+ };
2273
+ let n = t?.handle?.substring(1), r = e.gridstackNode;
2274
+ this.dragEls = !n || e.classList.contains(n) ? [e] : r?.subGrid ? [e.querySelector(t.handle) || e] : this.getAllHandles(), this.dragEls.length === 0 && (this.dragEls = [e]), this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this.enable();
2275
+ }
2276
+ getAllHandles() {
2277
+ return Array.from(this.el.querySelectorAll(this.option.handle)).filter((e) => {
2278
+ if (!(e instanceof HTMLElement)) return !1;
2279
+ let t = e.closest(".grid-stack-item");
2280
+ return t === this.el || !t;
2281
+ });
2282
+ }
2283
+ on(e, t) {
2284
+ super.on(e, t);
2285
+ }
2286
+ off(e) {
2287
+ super.off(e);
2288
+ }
2289
+ enable() {
2290
+ this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
2291
+ e.addEventListener("mousedown", this._mouseDown), J && (e.addEventListener("touchstart", wn), e.addEventListener("pointerdown", Dn));
2292
+ }), this.el.classList.remove("ui-draggable-disabled"));
2293
+ }
2294
+ disable(e = !1) {
2295
+ this.disabled !== !0 && (super.disable(), this.dragEls.forEach((e) => {
2296
+ e.removeEventListener("mousedown", this._mouseDown), J && (e.removeEventListener("touchstart", wn), e.removeEventListener("pointerdown", Dn));
2297
+ }), e || this.el.classList.add("ui-draggable-disabled"));
2298
+ }
2299
+ destroy() {
2300
+ this.dragTimeout && window.clearTimeout(this.dragTimeout), delete this.dragTimeout, this.mouseDownEvent && this._mouseUp(this.mouseDownEvent), this.disable(!0), delete this.el, delete this.helper, delete this.option, super.destroy();
2301
+ }
2302
+ updateOption(e) {
2303
+ return Object.keys(e).forEach((t) => this.option[t] = e[t]), this;
2304
+ }
2305
+ _mouseDown(e) {
2306
+ if (Y.touchHandled && e.isTrusted && (Y.touchHandled = !1), !q.mouseHandled) return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Nn) || this.option.cancel && e.target.closest(this.option.cancel) ? !0 : (this.mouseDownEvent = e, delete this.dragging, delete q.dragElement, delete q.dropElement, delete this._autoScrollMaxSpeed, delete this._autoScrollContainer, document.addEventListener("mousemove", this._mouseMove, {
2307
+ capture: !0,
2308
+ passive: !0
2309
+ }), document.addEventListener("mouseup", this._mouseUp, !0), J && (e.currentTarget.addEventListener("touchmove", Tn), e.currentTarget.addEventListener("touchend", En)), e.preventDefault(), document.activeElement && document.activeElement.blur(), q.mouseHandled = !0, !0);
2310
+ }
2311
+ _callDrag(e) {
2312
+ if (!this.dragging) return;
2313
+ let t = G.initEvent(e, {
2314
+ target: this.el,
2315
+ type: "drag"
2316
+ });
2317
+ this.option.drag && this.option.drag(t, this.ui()), this.triggerEvent("drag", t);
2318
+ }
2319
+ _mouseMove(e) {
2320
+ let t = this.mouseDownEvent;
2321
+ if (this.lastDrag = e, this.dragging) if (this._dragFollow(e), q.pauseDrag) {
2322
+ let t = Number.isInteger(q.pauseDrag) ? q.pauseDrag : 100;
2323
+ this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), t);
2324
+ } else this._callDrag(e);
2325
+ else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
2326
+ this.dragging = !0, q.dragElement = this;
2327
+ let t = this.el.gridstackNode?.grid;
2328
+ t ? q.dropElement = t.el.ddElement.ddDroppable : delete q.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = G.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
2329
+ let n = G.initEvent(e, {
2330
+ target: this.el,
2331
+ type: "dragstart"
2332
+ });
2333
+ this.option.start && this.option.start(n, this.ui()), this.triggerEvent("dragstart", n), document.addEventListener("keydown", this._keyEvent);
2334
+ }
2335
+ return !0;
2336
+ }
2337
+ _mouseUp(e) {
2338
+ if (this._stopScrolling(), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), J && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Tn, !0), e.currentTarget.removeEventListener("touchend", En, !0)), this.dragging) {
2339
+ delete this.dragging, delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent), q.dropElement?.el === this.el.parentElement && delete q.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
2340
+ let t = G.initEvent(e, {
2341
+ target: this.el,
2342
+ type: "dragstop"
2343
+ });
2344
+ this.option.stop && this.option.stop(t), this.triggerEvent("dragstop", t), q.dropElement && q.dropElement.drop(e);
2345
+ }
2346
+ delete this.helper, delete this.mouseDownEvent, delete q.dragElement, delete q.dropElement, delete q.mouseHandled, e.preventDefault();
2347
+ }
2348
+ _keyEvent(e) {
2349
+ let t = this.el.gridstackNode, n = t?.grid || q.dropElement?.el?.gridstack;
2350
+ if (e.key === "Escape") t && t._origRotate && (t._orig = t._origRotate, delete t._origRotate), n?.cancelDrag(), this._mouseUp(this.mouseDownEvent);
2351
+ else if (t && n && (e.key === "r" || e.key === "R")) {
2352
+ if (!G.canBeRotated(t)) return;
2353
+ t._origRotate = t._origRotate || { ...t._orig }, delete t._moving, n.setAnimation(!1).rotate(t.el, {
2354
+ top: -this.dragOffset.offsetTop,
2355
+ left: -this.dragOffset.offsetX
2356
+ }).setAnimation(), t._moving = !0, this.dragOffset = this._getDragOffset(this.lastDrag, t.el, this.helperContainment), this.helper.style.width = this.dragOffset.width + "px", this.helper.style.height = this.dragOffset.height + "px", G.swap(t._orig, "w", "h"), delete t._rect, this._mouseMove(this.lastDrag);
2357
+ }
2358
+ }
2359
+ _createHelper() {
2360
+ let t = this.el;
2361
+ return typeof this.option.helper == "function" ? t = this.option.helper(this.el) : this.option.helper === "clone" && (t = G.cloneNode(this.el)), t.parentElement || G.appendTo(t, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = e.originStyleProp.map((e) => this.el.style[e]), t;
2362
+ }
2363
+ _setupHelperStyle(e) {
2364
+ this.helper.classList.add("ui-draggable-dragging"), this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");
2365
+ let t = this.helper.style;
2366
+ return t.pointerEvents = "none", t.width = this.dragOffset.width + "px", t.height = this.dragOffset.height + "px", t.willChange = "left, right, top", t.position = "fixed", this._dragFollow(e), t.transition = "none", setTimeout(() => {
2367
+ this.helper && (t.transition = null);
2368
+ }, 0), this;
2369
+ }
2370
+ _removeHelperStyle() {
2371
+ if (this.helper.classList.remove("ui-draggable-dragging"), this.el.gridstackNode?.grid?.el.classList.remove("grid-stack-dragging"), !this.helper?.gridstackNode?._isAboutToRemove && this.dragElementOriginStyle) {
2372
+ let t = this.helper, n = this.dragElementOriginStyle.transition || null;
2373
+ t.style.transition = this.dragElementOriginStyle.transition = "none", e.originStyleProp.forEach((e) => t.style[e] = this.dragElementOriginStyle[e] || null), setTimeout(() => t.style.transition = n, 50);
2374
+ }
2375
+ return delete this.dragElementOriginStyle, this;
2376
+ }
2377
+ _dragFollow(e) {
2378
+ let t = this.helper.style, n = this.dragOffset;
2379
+ this.option.rtl ? (t.right = (window.innerWidth - e.clientX + n.offsetX) * this.dragTransform.xScale + "px", t.left &&= "") : (t.left = (e.clientX + n.offsetX) * this.dragTransform.xScale + "px", t.right &&= ""), t.top = (e.clientY + n.offsetTop) * this.dragTransform.yScale + "px";
2380
+ }
2381
+ _setupHelperContainmentStyle() {
2382
+ return this.helperContainment = this.helper.parentElement, this.helper.style.position !== "fixed" && (this.parentOriginStylePosition = this.helperContainment.style.position, getComputedStyle(this.helperContainment).position.match(/static/) && (this.helperContainment.style.position = "relative")), this;
2383
+ }
2384
+ _getDragOffset(e, t, n) {
2385
+ let r = 0, i = 0;
2386
+ n && (r = this.dragTransform.xOffset, i = this.dragTransform.yOffset);
2387
+ let a = t.getBoundingClientRect(), o = this.option.rtl ? a.right : a.left, s = this.option.rtl ? e.clientX - a.right + r : -e.clientX + a.left - r;
2388
+ return {
2389
+ x: o,
2390
+ top: a.top,
2391
+ offsetX: s,
2392
+ offsetTop: -e.clientY + a.top - i,
2393
+ width: a.width * this.dragTransform.xScale,
2394
+ height: a.height * this.dragTransform.yScale
2395
+ };
2396
+ }
2397
+ updateScrollPosition(e) {
2398
+ this._autoScrollContainer = G.getScrollElement(e), this._getClipping(this.helper, this._autoScrollContainer) === 0 ? this._stopScrolling() : this._autoScrollAnimId ||= requestAnimationFrame(this._autoScrollTick);
2399
+ }
2400
+ _getClipping(e, t) {
2401
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight || document.documentElement.clientHeight;
2402
+ if (n.bottom < r.top || n.top > r.bottom) return 0;
2403
+ let a = n.bottom - Math.min(r.bottom, i), o = n.top - Math.max(r.top, 0);
2404
+ return o < 0 ? o : a > 0 ? a : 0;
2405
+ }
2406
+ _stopScrolling() {
2407
+ this._autoScrollAnimId && (cancelAnimationFrame(this._autoScrollAnimId), delete this._autoScrollAnimId);
2408
+ }
2409
+ ui() {
2410
+ let e = this.el.parentElement.getBoundingClientRect(), t = this.helper.getBoundingClientRect(), n = this.option.rtl ? (e.right - t.right) * this.dragTransform.xScale : (t.left - e.left) * this.dragTransform.xScale;
2411
+ return { position: {
2412
+ top: (t.top - e.top) * this.dragTransform.yScale,
2413
+ left: n
2414
+ } };
2415
+ }
2416
+ };
2417
+ Pn.originStyleProp = [
2418
+ "width",
2419
+ "height",
2420
+ "transform",
2421
+ "transform-origin",
2422
+ "transition",
2423
+ "pointerEvents",
2424
+ "position",
2425
+ "left",
2426
+ "right",
2427
+ "top",
2428
+ "minWidth",
2429
+ "willChange"
2430
+ ];
2431
+ //#endregion
2432
+ //#region node_modules/gridstack/dist/dd-droppable.js
2433
+ var Fn = class extends jn {
2434
+ constructor(e, t = {}) {
2435
+ super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
2436
+ }
2437
+ on(e, t) {
2438
+ super.on(e, t);
2439
+ }
2440
+ off(e) {
2441
+ super.off(e);
2442
+ }
2443
+ enable() {
2444
+ this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), J && (this.el.addEventListener("pointerenter", On), this.el.addEventListener("pointerleave", kn)));
2445
+ }
2446
+ disable(e = !1) {
2447
+ this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), J && (this.el.removeEventListener("pointerenter", On), this.el.removeEventListener("pointerleave", kn)));
2448
+ }
2449
+ destroy() {
2450
+ this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
2451
+ }
2452
+ updateOption(e) {
2453
+ return Object.keys(e).forEach((t) => this.option[t] = e[t]), this._setupAccept(), this;
2454
+ }
2455
+ _mouseEnter(e) {
2456
+ if (!q.dragElement || Y.touchHandled && e.isTrusted || !this._canDrop(q.dragElement.el)) return;
2457
+ e.preventDefault(), e.stopPropagation(), q.dragElement._stopScrolling(), q.dropElement && q.dropElement !== this && q.dropElement._mouseLeave(e, !0), q.dropElement = this;
2458
+ let t = G.initEvent(e, {
2459
+ target: this.el,
2460
+ type: "dropover"
2461
+ });
2462
+ this.option.over && this.option.over(t, this._ui(q.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
2463
+ }
2464
+ _mouseLeave(e, t = !1) {
2465
+ if (!q.dragElement || q.dropElement !== this) return;
2466
+ e.preventDefault(), e.stopPropagation(), t && q.dragElement._stopScrolling();
2467
+ let n = G.initEvent(e, {
2468
+ target: this.el,
2469
+ type: "dropout"
2470
+ });
2471
+ if (this.option.out && this.option.out(n, this._ui(q.dragElement)), this.triggerEvent("dropout", n), q.dropElement === this && (delete q.dropElement, !t)) {
2472
+ let t, n = this.el.parentElement;
2473
+ for (; !t && n;) t = n.ddElement?.ddDroppable, n = n.parentElement;
2474
+ t && t._mouseEnter(e);
2475
+ }
2476
+ }
2477
+ drop(e) {
2478
+ e.preventDefault();
2479
+ let t = G.initEvent(e, {
2480
+ target: this.el,
2481
+ type: "drop"
2482
+ });
2483
+ this.option.drop && this.option.drop(t, this._ui(q.dragElement)), this.triggerEvent("drop", t);
2484
+ }
2485
+ _canDrop(e) {
2486
+ return e && (!this.accept || this.accept(e));
2487
+ }
2488
+ _setupAccept() {
2489
+ return this.option.accept && (typeof this.option.accept == "string" ? this.accept = (e) => e.classList.contains(this.option.accept) || e.matches(this.option.accept) : this.accept = this.option.accept), this;
2490
+ }
2491
+ _ui(e) {
2492
+ return {
2493
+ draggable: e.el,
2494
+ ...e.ui()
2495
+ };
2496
+ }
2497
+ }, In = class e {
2498
+ static init(t) {
2499
+ return t.ddElement ||= new e(t), t.ddElement;
2500
+ }
2501
+ constructor(e) {
2502
+ this.el = e;
2503
+ }
2504
+ on(e, t) {
2505
+ return this.ddDraggable && [
2506
+ "drag",
2507
+ "dragstart",
2508
+ "dragstop"
2509
+ ].indexOf(e) > -1 ? this.ddDraggable.on(e, t) : this.ddDroppable && [
2510
+ "drop",
2511
+ "dropover",
2512
+ "dropout"
2513
+ ].indexOf(e) > -1 ? this.ddDroppable.on(e, t) : this.ddResizable && [
2514
+ "resizestart",
2515
+ "resize",
2516
+ "resizestop"
2517
+ ].indexOf(e) > -1 && this.ddResizable.on(e, t), this;
2518
+ }
2519
+ off(e) {
2520
+ return this.ddDraggable && [
2521
+ "drag",
2522
+ "dragstart",
2523
+ "dragstop"
2524
+ ].indexOf(e) > -1 ? this.ddDraggable.off(e) : this.ddDroppable && [
2525
+ "drop",
2526
+ "dropover",
2527
+ "dropout"
2528
+ ].indexOf(e) > -1 ? this.ddDroppable.off(e) : this.ddResizable && [
2529
+ "resizestart",
2530
+ "resize",
2531
+ "resizestop"
2532
+ ].indexOf(e) > -1 && this.ddResizable.off(e), this;
2533
+ }
2534
+ setupDraggable(e) {
2535
+ return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new Pn(this.el, e), this;
2536
+ }
2537
+ cleanDraggable() {
2538
+ return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
2539
+ }
2540
+ setupResizable(e) {
2541
+ return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new Mn(this.el, e), this;
2542
+ }
2543
+ cleanResizable() {
2544
+ return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
2545
+ }
2546
+ setupDroppable(e) {
2547
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Fn(this.el, e), this;
2548
+ }
2549
+ cleanDroppable() {
2550
+ return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
2551
+ }
2552
+ }, X = new class {
2553
+ resizable(e, t, n, r) {
2554
+ return this._getDDElements(e, t).forEach((e) => {
2555
+ if (t === "disable" || t === "enable") e.ddResizable && e.ddResizable[t]();
2556
+ else if (t === "destroy") e.ddResizable && e.cleanResizable();
2557
+ else if (t === "option") e.setupResizable({ [n]: r });
2558
+ else {
2559
+ let n = e.el.gridstackNode.grid, r = e.el.getAttribute("gs-resize-handles") || n.opts.resizable.handles || "e,s,se";
2560
+ r === "all" && (r = "n,e,s,w,se,sw,ne,nw");
2561
+ let i = !n.opts.alwaysShowResizeHandle;
2562
+ e.setupResizable({
2563
+ ...n.opts.resizable,
2564
+ handles: r,
2565
+ autoHide: i,
2566
+ start: t.start,
2567
+ stop: t.stop,
2568
+ resize: t.resize,
2569
+ rtl: t.rtl
2570
+ });
2571
+ }
2572
+ }), this;
2573
+ }
2574
+ draggable(e, t, n, r) {
2575
+ return this._getDDElements(e, t).forEach((e) => {
2576
+ if (t === "disable" || t === "enable") e.ddDraggable && e.ddDraggable[t]();
2577
+ else if (t === "destroy") e.ddDraggable && e.cleanDraggable();
2578
+ else if (t === "option") e.setupDraggable({ [n]: r });
2579
+ else {
2580
+ let n = e.el.gridstackNode.grid;
2581
+ e.setupDraggable({
2582
+ ...n.opts.draggable,
2583
+ start: t.start,
2584
+ stop: t.stop,
2585
+ drag: t.drag,
2586
+ rtl: t.rtl
2587
+ });
2588
+ }
2589
+ }), this;
2590
+ }
2591
+ dragIn(e, t) {
2592
+ return this._getDDElements(e).forEach((e) => e.setupDraggable(t)), this;
2593
+ }
2594
+ droppable(e, t, n, r) {
2595
+ return typeof t.accept == "function" && !t._accept && (t._accept = t.accept, t.accept = (e) => t._accept(e)), this._getDDElements(e, t).forEach((e) => {
2596
+ t === "disable" || t === "enable" ? e.ddDroppable && e.ddDroppable[t]() : t === "destroy" ? e.ddDroppable && e.cleanDroppable() : t === "option" ? e.setupDroppable({ [n]: r }) : e.setupDroppable(t);
2597
+ }), this;
2598
+ }
2599
+ isDroppable(e) {
2600
+ return !!(e?.ddElement?.ddDroppable && !e.ddElement.ddDroppable.disabled);
2601
+ }
2602
+ isDraggable(e) {
2603
+ return !!(e?.ddElement?.ddDraggable && !e.ddElement.ddDraggable.disabled);
2604
+ }
2605
+ isResizable(e) {
2606
+ return !!(e?.ddElement?.ddResizable && !e.ddElement.ddResizable.disabled);
2607
+ }
2608
+ on(e, t, n) {
2609
+ return this._getDDElements(e).forEach((e) => e.on(t, (e) => {
2610
+ n(e, q.dragElement ? q.dragElement.el : e.target, q.dragElement ? q.dragElement.helper : null);
2611
+ })), this;
2612
+ }
2613
+ off(e, t) {
2614
+ return this._getDDElements(e).forEach((e) => e.off(t)), this;
2615
+ }
2616
+ _getDDElements(e, t) {
2617
+ let n = e.gridstack || t !== "destroy" && t !== "disable", r = G.getElements(e);
2618
+ return r.length ? r.map((e) => e.ddElement || (n ? In.init(e) : null)).filter((e) => e) : [];
2619
+ }
2620
+ }(), Z = class e {
2621
+ static init(t = {}, n = ".grid-stack") {
2622
+ if (typeof document > "u") return null;
2623
+ let r = e.getGridElement(n);
2624
+ return r ? (r.gridstack ||= new e(r, G.cloneDeep(t)), r.gridstack) : (console.error(typeof n == "string" ? "GridStack.initAll() no grid was found with selector \"" + n + "\" - element missing or wrong selector ?\nNote: \".grid-stack\" is required for proper CSS styling and drag/drop, and is the default selector." : "GridStack.init() no grid element was passed."), null);
2625
+ }
2626
+ static initAll(t = {}, n = ".grid-stack") {
2627
+ let r = [];
2628
+ return typeof document > "u" ? r : (e.getGridElements(n).forEach((n) => {
2629
+ n.gridstack ||= new e(n, G.cloneDeep(t)), r.push(n.gridstack);
2630
+ }), r.length === 0 && console.error("GridStack.initAll() no grid was found with selector \"" + n + "\" - element missing or wrong selector ?\nNote: \".grid-stack\" is required for proper CSS styling and drag/drop, and is the default selector."), r);
2631
+ }
2632
+ static addGrid(t, n = {}) {
2633
+ if (!t) return null;
2634
+ let r = t;
2635
+ if (r.gridstack) {
2636
+ let e = r.gridstack;
2637
+ return n && (e.opts = {
2638
+ ...e.opts,
2639
+ ...n
2640
+ }), n.children !== void 0 && e.load(n.children), e;
2641
+ }
2642
+ return (!t.classList.contains("grid-stack") || e.addRemoveCB) && (r = e.addRemoveCB ? e.addRemoveCB(t, n, !0, !0) : G.createDiv(["grid-stack", n.class], t)), e.init(n, r);
2643
+ }
2644
+ static registerEngine(t) {
2645
+ e.engineClass = t;
2646
+ }
2647
+ get placeholder() {
2648
+ if (!this._placeholder) {
2649
+ this._placeholder = G.createDiv([
2650
+ this.opts.placeholderClass,
2651
+ K.itemClass,
2652
+ this.opts.itemClass
2653
+ ]);
2654
+ let e = G.createDiv(["placeholder-content"], this._placeholder);
2655
+ this.opts.placeholderText && (e.textContent = this.opts.placeholderText);
2656
+ }
2657
+ return this._placeholder;
2658
+ }
2659
+ constructor(t, n = {}) {
2660
+ this.el = t, this.opts = n, this.animationDelay = 310, this._gsEventHandler = {}, this._extraDragRow = 0, this.dragTransform = {
2661
+ xScale: 1,
2662
+ yScale: 1,
2663
+ xOffset: 0,
2664
+ yOffset: 0
2665
+ }, t.gridstack = this, this.opts = n ||= {}, t.classList.contains("grid-stack") || this.el.classList.add("grid-stack"), n.row && (n.minRow = n.maxRow = n.row, delete n.row);
2666
+ let r = G.toNumber(t.getAttribute("gs-row"));
2667
+ n.column === "auto" && delete n.column, n.alwaysShowResizeHandle !== void 0 && (n._alwaysShowResizeHandle = n.alwaysShowResizeHandle);
2668
+ let i = n.columnOpts;
2669
+ if (i) {
2670
+ let e = i.breakpoints;
2671
+ !i.columnWidth && !e?.length ? delete n.columnOpts : (i.columnMax = i.columnMax || 12, e?.length > 1 && e.sort((e, t) => (t.w || 0) - (e.w || 0)));
2672
+ }
2673
+ let a = {
2674
+ ...G.cloneDeep(K),
2675
+ column: G.toNumber(t.getAttribute("gs-column")) || K.column,
2676
+ minRow: r || G.toNumber(t.getAttribute("gs-min-row")) || K.minRow,
2677
+ maxRow: r || G.toNumber(t.getAttribute("gs-max-row")) || K.maxRow,
2678
+ staticGrid: G.toBool(t.getAttribute("gs-static")) || K.staticGrid,
2679
+ sizeToContent: G.toBool(t.getAttribute("gs-size-to-content")) || void 0,
2680
+ draggable: { handle: (n.handleClass ? "." + n.handleClass : n.handle ? n.handle : "") || K.draggable.handle },
2681
+ removableOptions: {
2682
+ accept: n.itemClass || K.removableOptions.accept,
2683
+ decline: K.removableOptions.decline
2684
+ }
2685
+ };
2686
+ t.getAttribute("gs-animate") && (a.animate = G.toBool(t.getAttribute("gs-animate"))), n = G.defaults(n, a), this._initMargin(), this.checkDynamicColumn(), this._updateColumnVar(n), n.rtl === "auto" && (n.rtl = t.style.direction === "rtl"), n.rtl && this.el.classList.add("grid-stack-rtl");
2687
+ let o = this.el.closest("." + K.itemClass)?.gridstackNode;
2688
+ if (o && (o.subGrid = this, this.parentGridNode = o, this.el.classList.add("grid-stack-nested"), o.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = n.cellHeight === "auto", this._isAutoCellHeight || n.cellHeight === "initial") this.cellHeight(void 0);
2689
+ else {
2690
+ typeof n.cellHeight == "number" && n.cellHeightUnit && n.cellHeightUnit !== K.cellHeightUnit && (n.cellHeight += n.cellHeightUnit, delete n.cellHeightUnit);
2691
+ let e = n.cellHeight;
2692
+ delete n.cellHeight, this.cellHeight(e);
2693
+ }
2694
+ n.alwaysShowResizeHandle === "mobile" && (n.alwaysShowResizeHandle = J), this._setStaticClass();
2695
+ let s = n.engineClass || e.engineClass || xn;
2696
+ if (this.engine = new s({
2697
+ column: this.getColumn(),
2698
+ float: n.float,
2699
+ maxRow: n.maxRow,
2700
+ onChange: (e) => {
2701
+ e.forEach((e) => {
2702
+ let t = e.el;
2703
+ t && (e._removeDOM ? (t && t.remove(), delete e._removeDOM) : this._writePosAttr(t, e));
2704
+ }), this._updateContainerHeight();
2705
+ }
2706
+ }), n.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((e) => this._prepareElement(e)), delete this.engine._loading, this.batchUpdate(!1)), n.children) {
2707
+ let e = n.children;
2708
+ delete n.children, e.length && this.load(e);
2709
+ }
2710
+ this.setAnimation(), n.subGridDynamic && !q.pauseDrag && (q.pauseDrag = !0), n.draggable?.pause !== void 0 && (q.pauseDrag = n.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
2711
+ }
2712
+ _updateColumnVar(e = this.opts) {
2713
+ this.el.classList.add("gs-" + e.column), typeof e.column == "number" && this.el.style.setProperty("--gs-column-width", `${100 / e.column}%`);
2714
+ }
2715
+ addWidget(t) {
2716
+ if (!t) return;
2717
+ if (typeof t == "string") {
2718
+ console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");
2719
+ return;
2720
+ }
2721
+ if (t.ELEMENT_NODE) return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"), this.makeWidget(t);
2722
+ let n, r = t;
2723
+ if (r.grid = this, n = r.el ? r.el : e.addRemoveCB ? e.addRemoveCB(this.el, t, !0, !1) : this.createWidgetDivs(r), !n) return;
2724
+ if (r = n.gridstackNode, r && n.parentElement === this.el && this.engine.nodes.find((e) => e._id === r._id)) return n;
2725
+ let i = this._readAttr(n);
2726
+ return G.defaults(t, i), this.engine.prepareNode(t), this.el.appendChild(n), this.makeWidget(n, t), n;
2727
+ }
2728
+ createWidgetDivs(t) {
2729
+ let n = G.createDiv(["grid-stack-item", this.opts.itemClass]), r = G.createDiv(["grid-stack-item-content"], n);
2730
+ return G.lazyLoad(t) ? t.visibleObservable || (t.visibleObservable = new IntersectionObserver(([n]) => {
2731
+ n.isIntersecting && (t.visibleObservable?.disconnect(), delete t.visibleObservable, e.renderCB(r, t), t.grid?.prepareDragDrop(t.el));
2732
+ }), window.setTimeout(() => t.visibleObservable?.observe(n))) : e.renderCB(r, t), n;
2733
+ }
2734
+ makeSubGrid(t, n, r, i = !0) {
2735
+ let a = t.gridstackNode;
2736
+ if (a ||= this.makeWidget(t).gridstackNode, a.subGrid?.el) return a.subGrid;
2737
+ let o, s = this;
2738
+ for (; s && !o;) o = s.opts?.subGridOpts, s = s.parentGridNode?.grid;
2739
+ n = G.cloneDeep({
2740
+ ...this.opts,
2741
+ id: void 0,
2742
+ children: void 0,
2743
+ column: "auto",
2744
+ columnOpts: void 0,
2745
+ layout: "list",
2746
+ subGridOpts: void 0,
2747
+ ...o || {},
2748
+ ...n || a.subGridOpts || {}
2749
+ }), a.subGridOpts = n;
2750
+ let c;
2751
+ n.column === "auto" && (c = !0, n.column = Math.max(a.w || 1, r?.w || 1), delete n.columnOpts);
2752
+ let l = a.el.querySelector(".grid-stack-item-content"), u, d;
2753
+ if (i && (this._removeDD(a.el), d = {
2754
+ ...a,
2755
+ x: 0,
2756
+ y: 0
2757
+ }, G.removeInternalForSave(d), delete d.subGridOpts, a.content && (d.content = a.content, delete a.content), e.addRemoveCB ? u = e.addRemoveCB(this.el, d, !0, !1) : (u = G.createDiv(["grid-stack-item"]), u.appendChild(l), l = G.createDiv(["grid-stack-item-content"], a.el)), this.prepareDragDrop(a.el)), r) {
2758
+ let e = c ? n.column : a.w, t = a.h + r.h, i = a.el.style;
2759
+ i.transition = "none", this.update(a.el, {
2760
+ w: e,
2761
+ h: t
2762
+ }), setTimeout(() => i.transition = null);
2763
+ }
2764
+ let f = a.subGrid = e.addGrid(l, n);
2765
+ return r?._moving && (f._isTemp = !0), c && (f._autoColumn = !0), i && f.makeWidget(u, d), r && (r._moving ? window.setTimeout(() => G.simulateMouseEvent(r._event, "mouseenter", f.el), 0) : f.makeWidget(a.el, a)), this.resizeToContentCheck(!1, a), f;
2766
+ }
2767
+ removeAsSubGrid(e) {
2768
+ let t = this.parentGridNode?.grid;
2769
+ t && (t.batchUpdate(), t.removeWidget(this.parentGridNode.el, !0, !0), this.engine.nodes.forEach((e) => {
2770
+ e.x += this.parentGridNode.x, e.y += this.parentGridNode.y, t.makeWidget(e.el, e);
2771
+ }), t.batchUpdate(!1), this.parentGridNode && delete this.parentGridNode.subGrid, delete this.parentGridNode, e && window.setTimeout(() => G.simulateMouseEvent(e._event, "mouseenter", t.el), 0));
2772
+ }
2773
+ save(t = !0, n = !1, r = e.saveCB, i) {
2774
+ let a = this.engine.save(t, r, i);
2775
+ if (a.forEach((e) => {
2776
+ if (t && e.el && !e.subGrid && !r) e.content = e.el.querySelector(".grid-stack-item-content")?.innerHTML, e.content || delete e.content;
2777
+ else if (!t && !r && delete e.content, e.subGrid?.el) {
2778
+ let i = e.w || e.subGrid.getColumn(), a = e.subGrid.save(t, n, r, i);
2779
+ e.subGridOpts = n ? a : { children: a }, delete e.subGrid;
2780
+ }
2781
+ delete e.el;
2782
+ }), n) {
2783
+ let e = G.cloneDeep(this.opts);
2784
+ e.marginBottom === e.marginTop && e.marginRight === e.marginLeft && e.marginTop === e.marginRight && (e.margin = e.marginTop, delete e.marginTop, delete e.marginRight, delete e.marginBottom, delete e.marginLeft), e.rtl === (this.el.style.direction === "rtl") && (e.rtl = "auto"), this._isAutoCellHeight && (e.cellHeight = "auto"), this._autoColumn && (e.column = "auto");
2785
+ let t = e._alwaysShowResizeHandle;
2786
+ return delete e._alwaysShowResizeHandle, t === void 0 ? delete e.alwaysShowResizeHandle : e.alwaysShowResizeHandle = t, G.removeInternalAndSame(e, K), e.children = a, e;
2787
+ }
2788
+ return a;
2789
+ }
2790
+ load(t, n = e.addRemoveCB || !0) {
2791
+ t.forEach((e) => {
2792
+ e.w = e.w || e.minW || 1, e.h = e.h || e.minH || 1;
2793
+ }), t = G.sort(t), this.engine.skipCacheUpdate = this._ignoreLayoutsNodeChange = !0;
2794
+ let r = 0;
2795
+ t.forEach((e) => {
2796
+ r = Math.max(r, (e.x || 0) + e.w);
2797
+ }), r > this.engine.defaultColumn && (this.engine.defaultColumn = r);
2798
+ let i = this.getColumn();
2799
+ r > i && (this.engine.nodes.length === 0 && this.responseLayout ? (this.engine.nodes = t, this.engine.columnChanged(r, i, this.responseLayout), t = this.engine.nodes, this.engine.nodes = [], delete this.responseLayout) : this.engine.cacheLayout(t, r, !0));
2800
+ let a = e.addRemoveCB;
2801
+ typeof n == "function" && (e.addRemoveCB = n);
2802
+ let o = [];
2803
+ this.batchUpdate();
2804
+ let s = !this.engine.nodes.length, c = s && this.opts.animate;
2805
+ c && this.setAnimation(!1), !s && n && [...this.engine.nodes].forEach((n) => {
2806
+ n.id && (G.find(t, n.id) || (e.addRemoveCB && e.addRemoveCB(this.el, n, !1, !1), o.push(n), this.removeWidget(n.el, !0, !1)));
2807
+ }), this.engine._loading = !0;
2808
+ let l = [];
2809
+ return this.engine.nodes = this.engine.nodes.filter((e) => G.find(t, e.id) ? (l.push(e), !1) : !0), t.forEach((e) => {
2810
+ let t = G.find(l, e.id);
2811
+ if (t) {
2812
+ if (G.shouldSizeToContent(t) && (e.h = t.h), this.engine.nodeBoundFix(e), (e.autoPosition || e.x === void 0 || e.y === void 0) && (e.w = e.w || t.w, e.h = e.h || t.h, this.engine.findEmptyPosition(e)), this.engine.nodes.push(t), G.samePos(t, e) && this.engine.nodes.length > 1 && (this.moveNode(t, {
2813
+ ...e,
2814
+ forceCollide: !0
2815
+ }), G.copyPos(e, t)), this.update(t.el, e), e.subGridOpts?.children) {
2816
+ let n = t.el.querySelector(".grid-stack");
2817
+ n && n.gridstack && n.gridstack.load(e.subGridOpts.children);
2818
+ }
2819
+ } else n && this.addWidget(e);
2820
+ }), delete this.engine._loading, this.engine.removedNodes = o, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, a ? e.addRemoveCB = a : delete e.addRemoveCB, c && this.setAnimation(!0, !0), this;
2821
+ }
2822
+ batchUpdate(e = !0) {
2823
+ return this.engine.batchUpdate(e), e || (this._updateContainerHeight(), this._triggerRemoveEvent(), this._triggerAddEvent(), this._triggerChangeEvent()), this;
2824
+ }
2825
+ getCellHeight(e = !1) {
2826
+ if (this.opts.cellHeight && this.opts.cellHeight !== "auto" && (!e || !this.opts.cellHeightUnit || this.opts.cellHeightUnit === "px")) return this.opts.cellHeight;
2827
+ if (this.opts.cellHeightUnit === "rem") return this.opts.cellHeight * parseFloat(getComputedStyle(document.documentElement).fontSize);
2828
+ if (this.opts.cellHeightUnit === "em") return this.opts.cellHeight * parseFloat(getComputedStyle(this.el).fontSize);
2829
+ if (this.opts.cellHeightUnit === "cm") return this.opts.cellHeight * (96 / 2.54);
2830
+ if (this.opts.cellHeightUnit === "mm") return this.opts.cellHeight * (96 / 2.54) / 10;
2831
+ let t = this.el.querySelector("." + this.opts.itemClass);
2832
+ if (t) {
2833
+ let e = G.toNumber(t.getAttribute("gs-h")) || 1;
2834
+ return Math.round(t.offsetHeight / e);
2835
+ }
2836
+ let n = parseInt(this.el.getAttribute("gs-current-row"));
2837
+ return n ? Math.round(this.el.getBoundingClientRect().height / n) : this.opts.cellHeight;
2838
+ }
2839
+ cellHeight(e) {
2840
+ if (e !== void 0 && this._isAutoCellHeight !== (e === "auto") && (this._isAutoCellHeight = e === "auto", this._updateResizeEvent()), (e === "initial" || e === "auto") && (e = void 0), e === void 0) {
2841
+ let t = -this.opts.marginRight - this.opts.marginLeft + this.opts.marginTop + this.opts.marginBottom;
2842
+ e = this.cellWidth() + t;
2843
+ }
2844
+ let t = G.parseHeight(e);
2845
+ return this.opts.cellHeightUnit === t.unit && this.opts.cellHeight === t.h ? this : (this.opts.cellHeightUnit = t.unit, this.opts.cellHeight = t.h, this.el.style.setProperty("--gs-cell-height", `${this.opts.cellHeight}${this.opts.cellHeightUnit}`), this._updateContainerHeight(), this.resizeToContentCheck(), this);
2846
+ }
2847
+ cellWidth() {
2848
+ return this._widthOrContainer() / this.getColumn();
2849
+ }
2850
+ _widthOrContainer(e = !1) {
2851
+ return e && this.opts.columnOpts?.breakpointForWindow ? window.innerWidth : this.el.clientWidth || this.el.parentElement.clientWidth || window.innerWidth;
2852
+ }
2853
+ checkDynamicColumn() {
2854
+ let e = this.opts.columnOpts;
2855
+ if (!e || !e.columnWidth && !e.breakpoints?.length) return !1;
2856
+ let t = this.getColumn(), n = t, r = this._widthOrContainer(!0);
2857
+ if (e.columnWidth) n = Math.min(Math.round(r / e.columnWidth) || 1, e.columnMax);
2858
+ else {
2859
+ n = e.columnMax;
2860
+ let i = 0;
2861
+ for (; i < e.breakpoints.length && r <= e.breakpoints[i].w;) n = e.breakpoints[i++].c || t;
2862
+ }
2863
+ if (n !== t) {
2864
+ let t = e.breakpoints?.find((e) => e.c === n);
2865
+ return this.column(n, t?.layout || e.layout), !0;
2866
+ }
2867
+ return !1;
2868
+ }
2869
+ compact(e = "compact", t = !0) {
2870
+ return this.engine.compact(e, t), this._triggerChangeEvent(), this;
2871
+ }
2872
+ column(e, t = "moveScale") {
2873
+ if (!e || e < 1 || this.opts.column === e) return this;
2874
+ let n = this.getColumn();
2875
+ return this.opts.column = e, this.engine ? (this.engine.column = e, this.el.classList.remove("gs-" + n), this._updateColumnVar(), this.engine.columnChanged(n, e, t), this._isAutoCellHeight && this.cellHeight(), this.resizeToContentCheck(!0), this._ignoreLayoutsNodeChange = !0, this._triggerChangeEvent(), delete this._ignoreLayoutsNodeChange, this) : (this.responseLayout = t, this);
2876
+ }
2877
+ getColumn() {
2878
+ return this.opts.column;
2879
+ }
2880
+ getGridItems() {
2881
+ return Array.from(this.el.children).filter((e) => e.matches("." + this.opts.itemClass) && !e.matches("." + this.opts.placeholderClass));
2882
+ }
2883
+ isIgnoreChangeCB() {
2884
+ return this._ignoreLayoutsNodeChange;
2885
+ }
2886
+ destroy(e = !0) {
2887
+ if (this.el) return this.offAll(), this._updateResizeEvent(!0), this.setStatic(!0, !1), this.setAnimation(!1), e ? this.el.parentNode.removeChild(this.el) : (this.removeAll(e), this.el.removeAttribute("gs-current-row")), this.parentGridNode && delete this.parentGridNode.subGrid, delete this.parentGridNode, delete this.opts, delete this._placeholder?.gridstackNode, delete this._placeholder, delete this.engine, delete this.el.gridstack, delete this.el, this;
2888
+ }
2889
+ float(e) {
2890
+ return this.opts.float !== e && (this.opts.float = this.engine.float = e, this._triggerChangeEvent()), this;
2891
+ }
2892
+ getFloat() {
2893
+ return this.engine.float;
2894
+ }
2895
+ getCellFromPixel(e, t = !1) {
2896
+ let n = this.el.getBoundingClientRect(), r;
2897
+ r = t ? {
2898
+ top: n.top + document.documentElement.scrollTop,
2899
+ left: n.left
2900
+ } : {
2901
+ top: this.el.offsetTop,
2902
+ left: this.el.offsetLeft
2903
+ };
2904
+ let i = e.left - r.left, a = e.top - r.top, o = n.width / this.getColumn(), s = n.height / parseInt(this.el.getAttribute("gs-current-row"));
2905
+ return {
2906
+ x: Math.floor(i / o),
2907
+ y: Math.floor(a / s)
2908
+ };
2909
+ }
2910
+ getRow() {
2911
+ return Math.max(this.engine.getRow(), this.opts.minRow || 0);
2912
+ }
2913
+ isAreaEmpty(e, t, n, r) {
2914
+ return this.engine.isAreaEmpty(e, t, n, r);
2915
+ }
2916
+ makeWidget(t, n) {
2917
+ let r = e.getElement(t);
2918
+ if (!r || r.gridstackNode) return r;
2919
+ r.parentElement || this.el.appendChild(r), this._prepareElement(r, !0, n);
2920
+ let i = r.gridstackNode;
2921
+ this._updateContainerHeight(), i.subGridOpts && this.makeSubGrid(r, i.subGridOpts, void 0, !1);
2922
+ let a;
2923
+ return this.opts.column === 1 && !this._ignoreLayoutsNodeChange && (a = this._ignoreLayoutsNodeChange = !0), this._triggerAddEvent(), this._triggerChangeEvent(), a && delete this._ignoreLayoutsNodeChange, r;
2924
+ }
2925
+ on(e, t) {
2926
+ return e.indexOf(" ") === -1 ? (e === "change" || e === "added" || e === "removed" || e === "enable" || e === "disable" ? (e === "enable" || e === "disable" ? this._gsEventHandler[e] = (e) => t(e) : this._gsEventHandler[e] = (e) => {
2927
+ e.detail && t(e, e.detail);
2928
+ }, this.el.addEventListener(e, this._gsEventHandler[e])) : e === "drag" || e === "dragstart" || e === "dragstop" || e === "resizestart" || e === "resize" || e === "resizestop" || e === "dropped" || e === "resizecontent" ? this._gsEventHandler[e] = t : console.error("GridStack.on(" + e + ") event not supported"), this) : (e.split(" ").forEach((e) => this.on(e, t)), this);
2929
+ }
2930
+ off(e) {
2931
+ return e.indexOf(" ") === -1 ? ((e === "change" || e === "added" || e === "removed" || e === "enable" || e === "disable") && this._gsEventHandler[e] && this.el.removeEventListener(e, this._gsEventHandler[e]), delete this._gsEventHandler[e], this) : (e.split(" ").forEach((e) => this.off(e)), this);
2932
+ }
2933
+ offAll() {
2934
+ return Object.keys(this._gsEventHandler).forEach((e) => this.off(e)), this;
2935
+ }
2936
+ removeWidget(t, n = !0, r = !0) {
2937
+ return t ? (e.getElements(t).forEach((t) => {
2938
+ if (t.parentElement && t.parentElement !== this.el) return;
2939
+ let i = t.gridstackNode;
2940
+ i ||= this.engine.nodes.find((e) => t === e.el), i && (n && e.addRemoveCB && e.addRemoveCB(this.el, i, !1, !1), delete t.gridstackNode, this._removeDD(t), this.engine.removeNode(i, n, r), n && t.parentElement && t.remove());
2941
+ }), r && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this) : (console.error("Error: GridStack.removeWidget(undefined) called"), this);
2942
+ }
2943
+ removeAll(t = !0, n = !0) {
2944
+ return this.engine.nodes.forEach((n) => {
2945
+ t && e.addRemoveCB && e.addRemoveCB(this.el, n, !1, !1), delete n.el.gridstackNode, this.opts.staticGrid || this._removeDD(n.el);
2946
+ }), this.engine.removeAll(t, n), n && this._triggerRemoveEvent(), this;
2947
+ }
2948
+ setAnimation(e = this.opts.animate, t) {
2949
+ return t ? setTimeout(() => {
2950
+ this.opts && this.setAnimation(e);
2951
+ }) : e ? this.el.classList.add("grid-stack-animate") : this.el.classList.remove("grid-stack-animate"), this.opts.animate = e, this;
2952
+ }
2953
+ hasAnimationCSS() {
2954
+ return this.el.classList.contains("grid-stack-animate");
2955
+ }
2956
+ setStatic(e, t = !0, n = !0) {
2957
+ return !!this.opts.staticGrid === e ? this : (e ? this.opts.staticGrid = !0 : delete this.opts.staticGrid, this._setupRemoveDrop(), this._setupAcceptWidget(), this.engine.nodes.forEach((r) => {
2958
+ this.prepareDragDrop(r.el), r.subGrid && n && r.subGrid.setStatic(e, t, n);
2959
+ }), t && this._setStaticClass(), this);
2960
+ }
2961
+ updateOptions(e) {
2962
+ let t = this.opts;
2963
+ if (e === t) return this;
2964
+ if (e.acceptWidgets !== void 0 && (t.acceptWidgets = e.acceptWidgets, this._setupAcceptWidget()), e.animate !== void 0 && this.setAnimation(e.animate), e.cellHeight && this.cellHeight(e.cellHeight), e.class !== void 0 && e.class !== t.class && (t.class && this.el.classList.remove(t.class), e.class && this.el.classList.add(e.class)), e.columnOpts) {
2965
+ let t = !!this.opts.columnOpts;
2966
+ this.opts.columnOpts = e.columnOpts, t !== !!this.opts.columnOpts && this._updateResizeEvent(), this.checkDynamicColumn();
2967
+ } else e.columnOpts === null && this.opts.columnOpts ? (delete this.opts.columnOpts, this._updateResizeEvent()) : typeof e.column == "number" && this.column(e.column);
2968
+ return e.margin !== void 0 && this.margin(e.margin), e.staticGrid !== void 0 && this.setStatic(e.staticGrid), e.disableDrag !== void 0 && !e.staticGrid && this.enableMove(!e.disableDrag), e.disableResize !== void 0 && !e.staticGrid && this.enableResize(!e.disableResize), e.float !== void 0 && this.float(e.float), e.row === void 0 ? (e.minRow !== void 0 && (t.minRow = e.minRow, this._updateContainerHeight()), e.maxRow !== void 0 && (t.maxRow = this.engine.maxRow = e.maxRow)) : (t.minRow = t.maxRow = t.row = e.row, this._updateContainerHeight()), e.lazyLoad !== void 0 && (t.lazyLoad = e.lazyLoad), e.children?.length && this.load(e.children), this;
2969
+ }
2970
+ update(t, n) {
2971
+ return e.getElements(t).forEach((t) => {
2972
+ let r = t?.gridstackNode;
2973
+ if (!r) return;
2974
+ let i = {
2975
+ ...G.copyPos({}, r),
2976
+ ...G.cloneDeep(n)
2977
+ };
2978
+ this.engine.nodeBoundFix(i), delete i.autoPosition;
2979
+ let a = [
2980
+ "x",
2981
+ "y",
2982
+ "w",
2983
+ "h"
2984
+ ], o;
2985
+ if (a.some((e) => i[e] !== void 0 && i[e] !== r[e]) && (o = {}, a.forEach((e) => {
2986
+ o[e] = i[e] === void 0 ? r[e] : i[e], delete i[e];
2987
+ })), !o && (i.minW || i.minH || i.maxW || i.maxH) && (o = {}), i.content !== void 0) {
2988
+ let n = t.querySelector(".grid-stack-item-content");
2989
+ n && n.textContent !== i.content && (r.content = i.content, e.renderCB(n, i), r.subGrid?.el && (n.appendChild(r.subGrid.el), r.subGrid._updateContainerHeight())), delete i.content;
2990
+ }
2991
+ let s = !1, c = !1;
2992
+ for (let e in i) e[0] !== "_" && r[e] !== i[e] && (r[e] = i[e], s = !0, c ||= !this.opts.staticGrid && (e === "noResize" || e === "noMove" || e === "locked"));
2993
+ if (G.sanitizeMinMax(r), o) {
2994
+ let e = o.w !== void 0 && o.w !== r.w;
2995
+ this.moveNode(r, o), e && r.subGrid ? r.subGrid.onResize(this.hasAnimationCSS() ? r.w : void 0) : this.resizeToContentCheck(e, r), delete r._orig;
2996
+ }
2997
+ (o || s) && this._writeAttr(t, r), c && this.prepareDragDrop(r.el), e.updateCB && e.updateCB(r);
2998
+ }), this;
2999
+ }
3000
+ moveNode(e, t) {
3001
+ let n = e._updating;
3002
+ n || this.engine.cleanNodes().beginUpdate(e), this.engine.moveNode(e, t), this._updateContainerHeight(), n || (this._triggerChangeEvent(), this.engine.endUpdate());
3003
+ }
3004
+ resizeToContent(t) {
3005
+ if (!t || (t.classList.remove("size-to-content-max"), !t.clientHeight)) return;
3006
+ let n = t.gridstackNode;
3007
+ if (!n) return;
3008
+ let r = n.grid;
3009
+ if (!r || t.parentElement !== r.el) return;
3010
+ let i = r.getCellHeight(!0);
3011
+ if (!i) return;
3012
+ let a = n.h ? n.h * i : t.clientHeight, o;
3013
+ if (n.resizeToContentParent && (o = t.querySelector(n.resizeToContentParent)), o ||= t.querySelector(e.resizeToContentParent), !o) return;
3014
+ let s = t.clientHeight - o.clientHeight, c = n.h ? n.h * i - s : o.clientHeight, l;
3015
+ if (n.subGrid) {
3016
+ l = n.subGrid.getRow() * n.subGrid.getCellHeight(!0);
3017
+ let e = n.subGrid.el.getBoundingClientRect(), r = t.getBoundingClientRect();
3018
+ l += e.top - r.top;
3019
+ } else if (n.subGridOpts?.children?.length) return;
3020
+ else {
3021
+ let t = o.firstElementChild;
3022
+ if (!t) {
3023
+ console.error(`Error: GridStack.resizeToContent() widget id:${n.id} '${e.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
3024
+ return;
3025
+ }
3026
+ l = t.getBoundingClientRect().height || c;
3027
+ }
3028
+ if (c === l) return;
3029
+ a += l - c;
3030
+ let u = Math.ceil(a / i), d = Number.isInteger(n.sizeToContent) ? n.sizeToContent : 0;
3031
+ d && u > d && (u = d, t.classList.add("size-to-content-max")), n.minH && u < n.minH ? u = n.minH : n.maxH && u > n.maxH && (u = n.maxH), u !== n.h && (r._ignoreLayoutsNodeChange = !0, r.moveNode(n, { h: u }), delete r._ignoreLayoutsNodeChange);
3032
+ }
3033
+ resizeToContentCBCheck(t) {
3034
+ e.resizeToContentCB ? e.resizeToContentCB(t) : this.resizeToContent(t);
3035
+ }
3036
+ rotate(t, n) {
3037
+ return e.getElements(t).forEach((e) => {
3038
+ let t = e.gridstackNode;
3039
+ if (!G.canBeRotated(t)) return;
3040
+ let r = {
3041
+ w: t.h,
3042
+ h: t.w,
3043
+ minH: t.minW,
3044
+ minW: t.minH,
3045
+ maxH: t.maxW,
3046
+ maxW: t.maxH
3047
+ };
3048
+ if (n) {
3049
+ let e = n.left > 0 ? Math.floor(n.left / this.cellWidth()) : 0, i = n.top > 0 ? Math.floor(n.top / this.opts.cellHeight) : 0;
3050
+ r.x = t.x + e - (t.h - (i + 1)), r.y = t.y + i - e;
3051
+ }
3052
+ Object.keys(r).forEach((e) => {
3053
+ r[e] === void 0 && delete r[e];
3054
+ });
3055
+ let i = t._orig;
3056
+ this.update(e, r), t._orig = i;
3057
+ }), this;
3058
+ }
3059
+ margin(e) {
3060
+ if (!(typeof e == "string" && e.split(" ").length > 1)) {
3061
+ let t = G.parseHeight(e);
3062
+ if (this.opts.marginUnit === t.unit && this.opts.margin === t.h) return;
3063
+ }
3064
+ return this.opts.margin = e, this.opts.marginTop = this.opts.marginBottom = this.opts.marginLeft = this.opts.marginRight = void 0, this._initMargin(), this;
3065
+ }
3066
+ getMargin() {
3067
+ return this.opts.margin;
3068
+ }
3069
+ willItFit(e) {
3070
+ return this.engine.willItFit(e);
3071
+ }
3072
+ _triggerChangeEvent() {
3073
+ if (this.engine.batchMode) return this;
3074
+ let e = this.engine.getDirtyNodes(!0);
3075
+ return e && e.length && (this._ignoreLayoutsNodeChange || this.engine.layoutsNodesChange(e), this._triggerEvent("change", e)), this.engine.saveInitial(), this;
3076
+ }
3077
+ _triggerAddEvent() {
3078
+ if (this.engine.batchMode) return this;
3079
+ if (this.engine.addedNodes?.length) {
3080
+ this._ignoreLayoutsNodeChange || this.engine.layoutsNodesChange(this.engine.addedNodes), this.engine.addedNodes.forEach((e) => {
3081
+ delete e._dirty;
3082
+ });
3083
+ let e = [...this.engine.addedNodes];
3084
+ this.engine.addedNodes = [], this._triggerEvent("added", e);
3085
+ }
3086
+ return this;
3087
+ }
3088
+ _triggerRemoveEvent() {
3089
+ if (this.engine.batchMode) return this;
3090
+ if (this.engine.removedNodes?.length) {
3091
+ let e = [...this.engine.removedNodes];
3092
+ this.engine.removedNodes = [], this._triggerEvent("removed", e);
3093
+ }
3094
+ return this;
3095
+ }
3096
+ _triggerEvent(e, t) {
3097
+ let n = t ? new CustomEvent(e, {
3098
+ bubbles: !1,
3099
+ detail: t
3100
+ }) : new Event(e), r = this;
3101
+ for (; r.parentGridNode;) r = r.parentGridNode.grid;
3102
+ return r.el.dispatchEvent(n), this;
3103
+ }
3104
+ _updateContainerHeight() {
3105
+ if (!this.engine || this.engine.batchMode) return this;
3106
+ let e = this.parentGridNode, t = this.getRow() + this._extraDragRow, n = this.opts.cellHeight, r = this.opts.cellHeightUnit;
3107
+ if (!n) return this;
3108
+ if (!e && !this.opts.minRow) {
3109
+ let e = G.parseHeight(getComputedStyle(this.el).minHeight);
3110
+ if (e.h > 0 && e.unit === r) {
3111
+ let r = Math.floor(e.h / n);
3112
+ t < r && (t = r);
3113
+ }
3114
+ }
3115
+ return this.el.setAttribute("gs-current-row", String(t)), this.el.style.removeProperty("min-height"), this.el.style.removeProperty("height"), t && (this.el.style[e ? "minHeight" : "height"] = t * n + r), e && G.shouldSizeToContent(e) && e.grid.resizeToContentCBCheck(e.el), this;
3116
+ }
3117
+ _prepareElement(e, t = !1, n) {
3118
+ n ||= this._readAttr(e), e.gridstackNode = n, n.el = e, n.grid = this, n = this.engine.addNode(n, t), this._writeAttr(e, n), e.classList.add(K.itemClass, this.opts.itemClass);
3119
+ let r = G.shouldSizeToContent(n);
3120
+ return r ? e.classList.add("size-to-content") : e.classList.remove("size-to-content"), r && this.resizeToContentCheck(!1, n), G.lazyLoad(n) || this.prepareDragDrop(n.el), this;
3121
+ }
3122
+ _writePosAttr(e, t) {
3123
+ if (!t._moving && !t._resizing || this._placeholder === e) {
3124
+ let n = this.opts.rtl ? "right" : "left";
3125
+ e.style.top = t.y ? t.y === 1 ? "var(--gs-cell-height)" : `calc(${t.y} * var(--gs-cell-height))` : null, e.style[n] = t.x ? t.x === 1 ? "var(--gs-column-width)" : `calc(${t.x} * var(--gs-column-width))` : null, e.style.width = t.w > 1 ? `calc(${t.w} * var(--gs-column-width))` : null, e.style.height = t.h > 1 ? `calc(${t.h} * var(--gs-cell-height))` : null;
3126
+ }
3127
+ return e.setAttribute("gs-x", String(t.x)), e.setAttribute("gs-y", String(t.y)), t.w > 1 ? e.setAttribute("gs-w", String(t.w)) : e.removeAttribute("gs-w"), t.h > 1 ? e.setAttribute("gs-h", String(t.h)) : e.removeAttribute("gs-h"), this;
3128
+ }
3129
+ _writeAttr(e, t) {
3130
+ if (!t) return this;
3131
+ this._writePosAttr(e, t);
3132
+ let n = {
3133
+ noResize: "gs-no-resize",
3134
+ noMove: "gs-no-move",
3135
+ locked: "gs-locked",
3136
+ id: "gs-id",
3137
+ sizeToContent: "gs-size-to-content"
3138
+ };
3139
+ for (let r in n) t[r] ? e.setAttribute(n[r], String(t[r])) : e.removeAttribute(n[r]);
3140
+ return this;
3141
+ }
3142
+ _readAttr(e, t = !0) {
3143
+ let n = {};
3144
+ n.x = G.toNumber(e.getAttribute("gs-x")), n.y = G.toNumber(e.getAttribute("gs-y")), n.w = G.toNumber(e.getAttribute("gs-w")), n.h = G.toNumber(e.getAttribute("gs-h")), n.autoPosition = G.toBool(e.getAttribute("gs-auto-position")), n.noResize = G.toBool(e.getAttribute("gs-no-resize")), n.noMove = G.toBool(e.getAttribute("gs-no-move")), n.locked = G.toBool(e.getAttribute("gs-locked"));
3145
+ let r = e.getAttribute("gs-size-to-content");
3146
+ r && (r === "true" || r === "false" ? n.sizeToContent = G.toBool(r) : n.sizeToContent = parseInt(r, 10)), n.id = e.getAttribute("gs-id"), n.maxW = G.toNumber(e.getAttribute("gs-max-w")), n.minW = G.toNumber(e.getAttribute("gs-min-w")), n.maxH = G.toNumber(e.getAttribute("gs-max-h")), n.minH = G.toNumber(e.getAttribute("gs-min-h")), t && (n.w === 1 && e.removeAttribute("gs-w"), n.h === 1 && e.removeAttribute("gs-h"), n.maxW && e.removeAttribute("gs-max-w"), n.minW && e.removeAttribute("gs-min-w"), n.maxH && e.removeAttribute("gs-max-h"), n.minH && e.removeAttribute("gs-min-h"));
3147
+ for (let e in n) {
3148
+ if (!n.hasOwnProperty(e)) return;
3149
+ !n[e] && n[e] !== 0 && e !== "sizeToContent" && delete n[e];
3150
+ }
3151
+ return n;
3152
+ }
3153
+ _setStaticClass() {
3154
+ let e = ["grid-stack-static"];
3155
+ return this.opts.staticGrid ? (this.el.classList.add(...e), this.el.setAttribute("gs-static", "true")) : (this.el.classList.remove(...e), this.el.removeAttribute("gs-static")), this;
3156
+ }
3157
+ onResize(e = this.el?.clientWidth) {
3158
+ if (!e || this.prevWidth === e) return;
3159
+ this.prevWidth = e, this.batchUpdate();
3160
+ let t = !1;
3161
+ return this._autoColumn && this.parentGridNode ? this.opts.column !== this.parentGridNode.w && (this.column(this.parentGridNode.w, this.opts.layout || "list"), t = !0) : t = this.checkDynamicColumn(), this._isAutoCellHeight && this.cellHeight(), this.engine.nodes.forEach((e) => {
3162
+ e.subGrid && e.subGrid.onResize();
3163
+ }), this._skipInitialResize || this.resizeToContentCheck(t), delete this._skipInitialResize, this.batchUpdate(!1), this;
3164
+ }
3165
+ resizeToContentCheck(e = !1, t = void 0) {
3166
+ if (this.engine) {
3167
+ if (e && this.hasAnimationCSS()) return setTimeout(() => this.resizeToContentCheck(!1, t), this.animationDelay);
3168
+ if (t) G.shouldSizeToContent(t) && this.resizeToContentCBCheck(t.el);
3169
+ else if (this.engine.nodes.some((e) => G.shouldSizeToContent(e))) {
3170
+ let e = [...this.engine.nodes];
3171
+ this.batchUpdate(), e.forEach((e) => {
3172
+ G.shouldSizeToContent(e) && this.resizeToContentCBCheck(e.el);
3173
+ }), this._ignoreLayoutsNodeChange = !0, this.batchUpdate(!1), this._ignoreLayoutsNodeChange = !1;
3174
+ }
3175
+ this._gsEventHandler.resizecontent && this._gsEventHandler.resizecontent(null, t ? [t] : this.engine.nodes);
3176
+ }
3177
+ }
3178
+ _updateResizeEvent(e = !1) {
3179
+ let t = !this.parentGridNode && (this._isAutoCellHeight || this.opts.sizeToContent || this.opts.columnOpts || this.engine.nodes.find((e) => e.sizeToContent));
3180
+ return !e && t && !this.resizeObserver ? (this._sizeThrottle = G.throttle(() => this.onResize(), this.opts.cellHeightThrottle), this.resizeObserver = new ResizeObserver(() => this._sizeThrottle()), this.resizeObserver.observe(this.el), this._skipInitialResize = !0) : (e || !t) && this.resizeObserver && (this.resizeObserver.disconnect(), delete this.resizeObserver, delete this._sizeThrottle), this;
3181
+ }
3182
+ static getElement(e = ".grid-stack-item") {
3183
+ return G.getElement(e);
3184
+ }
3185
+ static getElements(e = ".grid-stack-item") {
3186
+ return G.getElements(e);
3187
+ }
3188
+ static getGridElement(t) {
3189
+ return e.getElement(t);
3190
+ }
3191
+ static getGridElements(e) {
3192
+ return G.getElements(e);
3193
+ }
3194
+ _initMargin() {
3195
+ let e, t = 0, n = [];
3196
+ typeof this.opts.margin == "string" && (n = this.opts.margin.split(" ")), n.length === 2 ? (this.opts.marginTop = this.opts.marginBottom = n[0], this.opts.marginLeft = this.opts.marginRight = n[1]) : n.length === 4 ? (this.opts.marginTop = n[0], this.opts.marginRight = n[1], this.opts.marginBottom = n[2], this.opts.marginLeft = n[3]) : (e = G.parseHeight(this.opts.margin), this.opts.marginUnit = e.unit, t = this.opts.margin = e.h), [
3197
+ "marginTop",
3198
+ "marginRight",
3199
+ "marginBottom",
3200
+ "marginLeft"
3201
+ ].forEach((n) => {
3202
+ this.opts[n] === void 0 ? this.opts[n] = t : (e = G.parseHeight(this.opts[n]), this.opts[n] = e.h, delete this.opts.margin);
3203
+ }), this.opts.marginUnit = e.unit, this.opts.marginTop === this.opts.marginBottom && this.opts.marginLeft === this.opts.marginRight && this.opts.marginTop === this.opts.marginRight && (this.opts.margin = this.opts.marginTop);
3204
+ let r = this.el.style;
3205
+ return r.setProperty("--gs-item-margin-top", `${this.opts.marginTop}${this.opts.marginUnit}`), r.setProperty("--gs-item-margin-bottom", `${this.opts.marginBottom}${this.opts.marginUnit}`), r.setProperty("--gs-item-margin-right", `${this.opts.marginRight}${this.opts.marginUnit}`), r.setProperty("--gs-item-margin-left", `${this.opts.marginLeft}${this.opts.marginUnit}`), this;
3206
+ }
3207
+ static getDD() {
3208
+ return X;
3209
+ }
3210
+ static setupDragIn(e, t, n, r = document) {
3211
+ t?.pause !== void 0 && (q.pauseDrag = t.pause), t = {
3212
+ appendTo: "body",
3213
+ helper: "clone",
3214
+ ...t || {}
3215
+ }, (typeof e == "string" ? G.getElements(e, r) : e).forEach((e, r) => {
3216
+ X.isDraggable(e) || X.dragIn(e, t), n?.[r] && (e.gridstackNode = n[r]);
3217
+ });
3218
+ }
3219
+ movable(t, n) {
3220
+ return this.opts.staticGrid || e.getElements(t).forEach((e) => {
3221
+ let t = e.gridstackNode;
3222
+ t && (n ? delete t.noMove : t.noMove = !0, this.prepareDragDrop(t.el));
3223
+ }), this;
3224
+ }
3225
+ resizable(t, n) {
3226
+ return this.opts.staticGrid || e.getElements(t).forEach((e) => {
3227
+ let t = e.gridstackNode;
3228
+ t && (n ? delete t.noResize : t.noResize = !0, this.prepareDragDrop(t.el));
3229
+ }), this;
3230
+ }
3231
+ disable(e = !0) {
3232
+ if (!this.opts.staticGrid) return this.enableMove(!1, e), this.enableResize(!1, e), this._triggerEvent("disable"), this;
3233
+ }
3234
+ enable(e = !0) {
3235
+ if (!this.opts.staticGrid) return this.enableMove(!0, e), this.enableResize(!0, e), this._triggerEvent("enable"), this;
3236
+ }
3237
+ enableMove(e, t = !0) {
3238
+ return this.opts.staticGrid ? this : (e ? delete this.opts.disableDrag : this.opts.disableDrag = !0, this.engine.nodes.forEach((n) => {
3239
+ this.prepareDragDrop(n.el), n.subGrid && t && n.subGrid.enableMove(e, t);
3240
+ }), this);
3241
+ }
3242
+ enableResize(e, t = !0) {
3243
+ return this.opts.staticGrid ? this : (e ? delete this.opts.disableResize : this.opts.disableResize = !0, this.engine.nodes.forEach((n) => {
3244
+ this.prepareDragDrop(n.el), n.subGrid && t && n.subGrid.enableResize(e, t);
3245
+ }), this);
3246
+ }
3247
+ cancelDrag() {
3248
+ let t = this._placeholder?.gridstackNode;
3249
+ t && (t._isExternal ? (t._isAboutToRemove = !0, this.engine.removeNode(t)) : t._isAboutToRemove && e._itemRemoving(t.el, !1), this.engine.restoreInitial());
3250
+ }
3251
+ _removeDD(e) {
3252
+ return X.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
3253
+ }
3254
+ _setupAcceptWidget() {
3255
+ if (this.opts.staticGrid || !this.opts.acceptWidgets && !this.opts.removable) return X.droppable(this.el, "destroy"), this;
3256
+ let t, n, r = (e, r, i) => {
3257
+ i ||= r;
3258
+ let a = i.gridstackNode;
3259
+ if (!a) return;
3260
+ if (!a.grid?.el) {
3261
+ i.style.transform = `scale(${1 / this.dragTransform.xScale},${1 / this.dragTransform.yScale})`;
3262
+ let t = i.getBoundingClientRect();
3263
+ i.style.left = t.x + (this.dragTransform.xScale - 1) * (e.clientX - t.x) / this.dragTransform.xScale + "px", i.style.top = t.y + (this.dragTransform.yScale - 1) * (e.clientY - t.y) / this.dragTransform.yScale + "px", i.style.transformOrigin = "0px 0px";
3264
+ }
3265
+ let { top: o, left: s } = i.getBoundingClientRect(), c = this.el.getBoundingClientRect();
3266
+ s -= c.left, o -= c.top;
3267
+ let l = { position: {
3268
+ top: o * this.dragTransform.xScale,
3269
+ left: s * this.dragTransform.yScale
3270
+ } };
3271
+ if (a._temporaryRemoved) {
3272
+ if (a.x = Math.max(0, Math.round(s / n)), a.y = Math.max(0, Math.round(o / t)), delete a.autoPosition, this.engine.nodeBoundFix(a), !this.engine.willItFit(a)) {
3273
+ if (a.autoPosition = !0, !this.engine.willItFit(a)) {
3274
+ X.off(r, "drag");
3275
+ return;
3276
+ }
3277
+ a._willFitPos && (G.copyPos(a, a._willFitPos), delete a._willFitPos);
3278
+ }
3279
+ this._onStartMoving(i, e, l, a, n, t);
3280
+ } else this._dragOrResize(i, e, l, a, n, t);
3281
+ };
3282
+ return X.droppable(this.el, { accept: (e) => {
3283
+ let t = e.gridstackNode || this._readAttr(e, !1);
3284
+ if (t?.grid === this) return !0;
3285
+ if (!this.opts.acceptWidgets) return !1;
3286
+ let n = !0;
3287
+ if (typeof this.opts.acceptWidgets == "function") n = this.opts.acceptWidgets(e);
3288
+ else {
3289
+ let t = this.opts.acceptWidgets === !0 ? ".grid-stack-item" : this.opts.acceptWidgets;
3290
+ n = e.matches(t);
3291
+ }
3292
+ if (n && t && this.opts.maxRow) {
3293
+ let e = {
3294
+ w: t.w,
3295
+ h: t.h,
3296
+ minW: t.minW,
3297
+ minH: t.minH
3298
+ };
3299
+ n = this.engine.willItFit(e);
3300
+ }
3301
+ return n;
3302
+ } }).on(this.el, "dropover", (i, a, o) => {
3303
+ let s = o?.gridstackNode || a.gridstackNode;
3304
+ if (s?.grid === this && !s._temporaryRemoved) return !1;
3305
+ if (s?._sidebarOrig && (s.w = s._sidebarOrig.w, s.h = s._sidebarOrig.h), s?.grid && s.grid !== this && !s._temporaryRemoved && s.grid._leave(a, o), o ||= a, n = this.cellWidth(), t = this.getCellHeight(!0), !s) {
3306
+ let e = o.getAttribute("data-gs-widget") || o.getAttribute("gridstacknode");
3307
+ if (e) {
3308
+ try {
3309
+ s = JSON.parse(e);
3310
+ } catch {
3311
+ console.error("Gridstack dropover: Bad JSON format: ", e);
3312
+ }
3313
+ o.removeAttribute("data-gs-widget"), o.removeAttribute("gridstacknode");
3314
+ }
3315
+ s ||= this._readAttr(o), s._sidebarOrig = {
3316
+ w: s.w,
3317
+ h: s.h
3318
+ };
3319
+ }
3320
+ s.grid || (s.el || (s = { ...s }), s._isExternal = !0, o.gridstackNode = s);
3321
+ let c = s.w || Math.round(o.offsetWidth / n) || 1, l = s.h || Math.round(o.offsetHeight / t) || 1;
3322
+ return s.grid && s.grid !== this ? (a._gridstackNodeOrig ||= s, a.gridstackNode = s = {
3323
+ ...s,
3324
+ w: c,
3325
+ h: l,
3326
+ grid: this
3327
+ }, delete s.x, delete s.y, this.engine.cleanupNode(s).nodeBoundFix(s), s._initDD = s._isExternal = s._temporaryRemoved = !0) : (s.w = c, s.h = l, s._temporaryRemoved = !0), e._itemRemoving(s.el, !1), X.on(a, "drag", r), r(i, a, o), !1;
3328
+ }).on(this.el, "dropout", (e, t, n) => {
3329
+ let r = n?.gridstackNode || t.gridstackNode;
3330
+ return r && (!r.grid || r.grid === this) && (this._leave(t, n), this._isTemp && this.removeAsSubGrid(r)), !1;
3331
+ }).on(this.el, "drop", (t, n, r) => {
3332
+ let i = r?.gridstackNode || n.gridstackNode;
3333
+ if (i?.grid === this && !i._isExternal) return !1;
3334
+ let a = !!this.placeholder.parentElement, o = n !== r;
3335
+ this.placeholder.remove(), delete this.placeholder.gridstackNode, a && this.opts.animate && (this.setAnimation(!1), this.setAnimation(!0, !0));
3336
+ let s = n._gridstackNodeOrig;
3337
+ if (delete n._gridstackNodeOrig, a && s?.grid && s.grid !== this) {
3338
+ let e = s.grid;
3339
+ e.engine.removeNodeFromLayoutCache(s), e.engine.removedNodes.push(s), e._triggerRemoveEvent()._triggerChangeEvent(), e.parentGridNode && !e.engine.nodes.length && e.opts.subGridDynamic && e.removeAsSubGrid();
3340
+ }
3341
+ if (!i || (a && (this.engine.cleanupNode(i), i.grid = this), delete i.grid?._isTemp, X.off(n, "drag"), r === n ? n.remove() : (r.remove(), n = r), this._removeDD(n), !a)) return !1;
3342
+ let c = i.subGrid?.el?.gridstack;
3343
+ return G.copyPos(i, this._readAttr(this.placeholder)), G.removePositioningStyles(n), o && (i.content || i.subGridOpts || e.addRemoveCB) ? (delete i.el, n = this.addWidget(i)) : (this._prepareElement(n, !0, i), this.el.appendChild(n), this.resizeToContentCheck(!1, i), c && (c.parentGridNode = i), this._updateContainerHeight()), this.engine.addedNodes.push(i), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({
3344
+ ...t,
3345
+ type: "dropped"
3346
+ }, s && s.grid ? s : void 0, i), !1;
3347
+ }), this;
3348
+ }
3349
+ static _itemRemoving(e, t) {
3350
+ if (!e) return;
3351
+ let n = e ? e.gridstackNode : void 0;
3352
+ !n?.grid || e.classList.contains(n.grid.opts.removableOptions.decline) || (t ? n._isAboutToRemove = !0 : delete n._isAboutToRemove, t ? e.classList.add("grid-stack-item-removing") : e.classList.remove("grid-stack-item-removing"));
3353
+ }
3354
+ _setupRemoveDrop() {
3355
+ if (typeof this.opts.removable != "string") return this;
3356
+ let t = document.querySelector(this.opts.removable);
3357
+ return t && !this.opts.staticGrid && !X.isDroppable(t) && X.droppable(t, this.opts.removableOptions).on(t, "dropover", (t, n) => e._itemRemoving(n, !0)).on(t, "dropout", (t, n) => e._itemRemoving(n, !1)), this;
3358
+ }
3359
+ prepareDragDrop(e, t = !1) {
3360
+ let n = e?.gridstackNode;
3361
+ if (!n) return;
3362
+ let r = n.noMove || this.opts.disableDrag, i = n.noResize || this.opts.disableResize, a = this.opts.staticGrid || r && i;
3363
+ if ((t || a) && (n._initDD && (this._removeDD(e), delete n._initDD), a)) return e.classList.add("ui-draggable-disabled", "ui-resizable-disabled"), this;
3364
+ if (!n._initDD) {
3365
+ let t, r, i = (i, a) => {
3366
+ this.triggerEvent(i, i.target), t = this.cellWidth(), r = this.getCellHeight(!0), this._onStartMoving(e, i, a, n, t, r);
3367
+ }, a = (i, a) => {
3368
+ this._dragOrResize(e, i, a, n, t, r);
3369
+ }, o = (t) => {
3370
+ this.placeholder.remove(), delete this.placeholder.gridstackNode, delete n._moving, delete n._resizing, delete n._event, delete n._lastTried;
3371
+ let r = n.w !== n._orig.w, i = t.target;
3372
+ if (!(!i.gridstackNode || i.gridstackNode.grid !== this)) {
3373
+ if (n.el = i, n._isAboutToRemove) {
3374
+ let r = e.gridstackNode.grid;
3375
+ r._gsEventHandler[t.type] && r._gsEventHandler[t.type](t, i), r.engine.nodes.push(n), r.removeWidget(e, !0, !0);
3376
+ } else G.removePositioningStyles(i), n._temporaryRemoved ? (this._writePosAttr(i, n), this.engine.addNode(n)) : this._writePosAttr(i, n), this.triggerEvent(t, i);
3377
+ this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), t.type === "resizestop" && (Number.isInteger(n.sizeToContent) && (n.sizeToContent = n.h), this.resizeToContentCheck(r, n));
3378
+ }
3379
+ };
3380
+ X.draggable(e, {
3381
+ start: i,
3382
+ stop: o,
3383
+ drag: a,
3384
+ rtl: this.opts.rtl
3385
+ }).resizable(e, {
3386
+ start: i,
3387
+ stop: o,
3388
+ resize: a,
3389
+ rtl: this.opts.rtl
3390
+ }), n._initDD = !0;
3391
+ }
3392
+ return X.draggable(e, r ? "disable" : "enable").resizable(e, i ? "disable" : "enable"), this;
3393
+ }
3394
+ _onStartMoving(e, t, n, r, i, a) {
3395
+ if (this.engine.cleanNodes().beginUpdate(r), this._writePosAttr(this.placeholder, r), this.el.appendChild(this.placeholder), this.placeholder.gridstackNode = r, r.grid?.el) this.dragTransform = G.getValuesFromTransformedElement(e);
3396
+ else if (this.placeholder && this.placeholder.closest(".grid-stack")) {
3397
+ let e = this.placeholder.closest(".grid-stack");
3398
+ this.dragTransform = G.getValuesFromTransformedElement(e);
3399
+ } else this.dragTransform = {
3400
+ xScale: 1,
3401
+ xOffset: 0,
3402
+ yScale: 1,
3403
+ yOffset: 0
3404
+ };
3405
+ if (r.el = this.placeholder, r._lastUiPosition = n.position, r._prevYPix = n.position.top, r._moving = t.type === "dragstart", r._resizing = t.type === "resizestart", delete r._lastTried, t.type === "dropover" && r._temporaryRemoved && (this.engine.addNode(r), r._moving = !0), this.engine.cacheRects(i, a, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
3406
+ let t = this.getColumn() - r.x, n = (this.opts.maxRow || 2 ** 53 - 1) - r.y;
3407
+ X.resizable(e, "option", "minWidth", i * Math.min(r.minW || 1, t)).resizable(e, "option", "minHeight", a * Math.min(r.minH || 1, n)).resizable(e, "option", "maxWidth", i * Math.min(r.maxW || 2 ** 53 - 1, t)).resizable(e, "option", "maxWidthMoveLeft", i * Math.min(r.maxW || 2 ** 53 - 1, r.x + r.w)).resizable(e, "option", "maxHeight", a * Math.min(r.maxH || 2 ** 53 - 1, n)).resizable(e, "option", "maxHeightMoveUp", a * Math.min(r.maxH || 2 ** 53 - 1, r.y + r.h));
3408
+ }
3409
+ }
3410
+ _dragOrResize(e, t, n, r, i, a) {
3411
+ let o = { ...r._orig }, s, c = this.opts.marginLeft, l = this.opts.marginRight, u = this.opts.marginTop, d = this.opts.marginBottom, f = Math.round(a * .1), p = Math.round(i * .1);
3412
+ if (c = Math.min(c, p), l = Math.min(l, p), u = Math.min(u, f), d = Math.min(d, f), t.type === "drag") {
3413
+ if (r._temporaryRemoved) return;
3414
+ r._prevYPix = n.position.top, this.opts.draggable.scroll !== !1 && q.dragElement?.updateScrollPosition(this.el);
3415
+ let e = n.position.left + (n.position.left > r._lastUiPosition.left ? -l : c), t = n.position.top + (n.position.top > r._lastUiPosition.top ? -d : u);
3416
+ o.x = Math.round(e / i), o.y = Math.round(t / a);
3417
+ let s = this._extraDragRow;
3418
+ if (this.engine.collide(r, o)) {
3419
+ let e = this.getRow(), t = Math.max(0, o.y + r.h - e);
3420
+ this.opts.maxRow && e + t > this.opts.maxRow && (t = Math.max(0, this.opts.maxRow - e)), this._extraDragRow = t;
3421
+ } else this._extraDragRow = 0;
3422
+ if (this._extraDragRow !== s && this._updateContainerHeight(), r.x === o.x && r.y === o.y) return;
3423
+ } else if (t.type === "resize") {
3424
+ if (o.x < 0 || (G.updateScrollResize(t, e, a), o.w = Math.round((n.size.width - c) / i), o.h = Math.round((n.size.height - u) / a), r.w === o.w && r.h === o.h) || r._lastTried && r._lastTried.w === o.w && r._lastTried.h === o.h) return;
3425
+ if (t.hasMovedX) {
3426
+ let e = n.position.left + c;
3427
+ o.x = Math.round(e / i);
3428
+ }
3429
+ if (t.hasMovedY) {
3430
+ let e = n.position.top + u;
3431
+ o.y = Math.round(e / a);
3432
+ }
3433
+ s = !0;
3434
+ }
3435
+ r._event = t, r._lastTried = o;
3436
+ let m = {
3437
+ x: n.position.left + c,
3438
+ y: n.position.top + u,
3439
+ w: (n.size ? n.size.width : r.w * i) - c - l,
3440
+ h: (n.size ? n.size.height : r.h * a) - u - d
3441
+ };
3442
+ if (this.engine.moveNodeCheck(r, {
3443
+ ...o,
3444
+ cellWidth: i,
3445
+ cellHeight: a,
3446
+ rect: m,
3447
+ resizing: s
3448
+ })) {
3449
+ r._lastUiPosition = n.position, this.engine.cacheRects(i, a, u, l, d, c), delete r._skipDown, s && r.subGrid && r.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
3450
+ let e = t.target;
3451
+ r._sidebarOrig || this._writePosAttr(e, r), this.triggerEvent(t, e);
3452
+ }
3453
+ }
3454
+ triggerEvent(e, t) {
3455
+ let n = this;
3456
+ for (; n.parentGridNode;) n = n.parentGridNode.grid;
3457
+ n._gsEventHandler[e.type] && n._gsEventHandler[e.type](e, t);
3458
+ }
3459
+ _leave(t, n) {
3460
+ n ||= t;
3461
+ let r = n.gridstackNode;
3462
+ if (!r || (n.style.transform = n.style.transformOrigin = null, X.off(t, "drag"), r._temporaryRemoved)) return;
3463
+ r._temporaryRemoved = !0, this.engine.removeNode(r), r.el = r._isExternal && n ? n : t;
3464
+ let i = r._sidebarOrig;
3465
+ r._isExternal && this.engine.cleanupNode(r), r._sidebarOrig = i, this.opts.removable === !0 && e._itemRemoving(t, !0), t._gridstackNodeOrig ? (t.gridstackNode = t._gridstackNodeOrig, delete t._gridstackNodeOrig) : r._isExternal && this.engine.restoreInitial();
3466
+ }
3467
+ };
3468
+ Z.renderCB = (e, t) => {
3469
+ e && t?.content && (e.textContent = t.content);
3470
+ }, Z.resizeToContentParent = ".grid-stack-item-content", Z.Utils = G, Z.Engine = xn, Z.GDRev = "12.6.0";
3471
+ //#endregion
3472
+ //#region src/components/item-grid/helpers/grid-stack-lifecycle.ts
3473
+ var Ln = ({ gridElement: e, gridItemElements: t, items: n, columns: r, rowHeight: i, viewMode: a, fullTheme: o, onCreateOrUpdateDimensionsHint: s, onRemoveDimensionsHint: c, onChange: l }) => {
3474
+ let [u, d] = un(o), f = {
3475
+ column: r,
3476
+ cellHeight: i,
3477
+ marginTop: u,
3478
+ marginLeft: d,
3479
+ marginRight: d,
3480
+ marginBottom: u,
3481
+ animate: !0,
3482
+ auto: !1,
3483
+ float: !1,
3484
+ removable: !1,
3485
+ acceptWidgets: !0,
3486
+ disableDrag: a,
3487
+ disableResize: a,
3488
+ minRow: 1,
3489
+ resizable: { handles: [
3490
+ "n",
3491
+ "ne",
3492
+ "e",
3493
+ "se",
3494
+ "s",
3495
+ "sw",
3496
+ "w",
3497
+ "nw"
3498
+ ].join(", ") },
3499
+ handle: ".grid-item-drag-handle"
3500
+ }, p = Z.init(f, e);
3501
+ return p.batchUpdate(), t.forEach((e) => {
3502
+ let t = e.getAttribute("luzmo-item-grid-item-id"), r = xe(n.find((e) => e.id === t), t ?? void 0);
3503
+ p.makeWidget(e, r);
3504
+ }), p.batchUpdate(!1), p.on("resizestart", (e, t) => {
3505
+ s(t, t.getAttribute("gs-w") ?? "", t.getAttribute("gs-h") ?? "");
3506
+ }), p.on("resize", (e, t) => {
3507
+ s(t, t.getAttribute("gs-w") ?? "", t.getAttribute("gs-h") ?? "");
3508
+ }), p.on("resizestop", (e, t) => {
3509
+ c(t);
3510
+ }), p.on("change", (e, t) => {
3511
+ l(t);
3512
+ }), p;
3513
+ }, Rn = (e, t) => {
3514
+ let n = new Map(t.filter((e) => e.id).map((e) => [e.id, e]));
3515
+ return e.map((e) => {
3516
+ let t = e.id ? n.get(e.id) : void 0;
3517
+ return t ? {
3518
+ ...e,
3519
+ position: {
3520
+ sizeX: t.w ?? 1,
3521
+ sizeY: t.h ?? 1,
3522
+ row: t.y ?? 0,
3523
+ col: t.x ?? 0
3524
+ }
3525
+ } : e;
3526
+ });
3527
+ }, zn = ({ element: e, numberOfColumns: t, numberOfRows: n, offsetHint: r }) => {
3528
+ let i = e.querySelector(".dimensions-hint-popover");
3529
+ if (i) {
3530
+ i.style.display = t.length > 0 && n.length > 0 ? "block" : "none", i.textContent = `${t} × ${n}`;
3531
+ return;
3532
+ }
3533
+ let a = document.createElement("div");
3534
+ a.className = "dimensions-hint-popover", a.setAttribute("popover", "hint"), a.style.display = t.length > 0 && n.length > 0 ? "block" : "none", a.textContent = `${t} × ${n}`, e.append(a), Zt(a, Kt(e, a, async () => {
3535
+ let { x: t, y: n } = await Yt(e, a, {
3536
+ placement: "bottom",
3537
+ middleware: [qt(r), Jt()]
3538
+ });
3539
+ a.style.left = `${t}px`, a.style.top = `${n}px`;
3540
+ })), a.matches(":popover-open") || a.showPopover();
3541
+ }, Bn = (e) => {
3542
+ let t = e.querySelector(".dimensions-hint-popover");
3543
+ t && (Qt(t), t.matches(":popover-open") && t.hidePopover(), t.remove());
3544
+ }, Vn = ({ initialized: e, grid: t, hasItemsChanged: n, gridItemElements: r, items: i }) => {
3545
+ !e || !t || !n || (t.setAnimation(!1), t.batchUpdate(), t.removeAll(!1), i.forEach((e) => {
3546
+ let n = Ce(r, e.id);
3547
+ n && t.makeWidget(n, xe(e, e.id));
3548
+ }), t.batchUpdate(!1), t.setAnimation(!0));
3549
+ }, Hn = ({ initialized: e, grid: t, hasViewModeChanged: n, viewMode: r, previousViewMode: i, activeItemElement: a, gridElement: o, cleanupActiveItem: s }) => {
3550
+ if (!e || !t || !n || r === i) return a;
3551
+ if (r) {
3552
+ if (t.disable(), a) {
3553
+ s(a), o.removeAttribute("has-active-item");
3554
+ return;
3555
+ }
3556
+ return a;
3557
+ }
3558
+ return t.enable(), a;
3559
+ }, Un = ":host{--luzmo-action-button-content-color-default:var(--luzmo-item-grid-item-action-button-content-color-default,#fff);--luzmo-action-button-content-color-hover:var(--luzmo-item-grid-item-action-button-content-color-hover,#fff);--luzmo-action-button-content-color-down:var(--luzmo-item-grid-item-action-button-content-color-down,#fff);--luzmo-action-button-content-color-focus:var(--luzmo-item-grid-item-action-button-content-color-focus,#fff);--luzmo-action-button-background-color-default:var(--luzmo-item-grid-item-action-button-background-color-default,#333);--luzmo-action-button-background-color-hover:var(--luzmo-item-grid-item-action-button-background-color-hover,#444);--luzmo-action-button-background-color-down:var(--luzmo-item-grid-item-action-button-background-color-down,#555);--luzmo-action-button-background-color-focus:var(--luzmo-item-grid-item-action-button-background-color-focus,#666);--grid-item-actions-flex-direction:column;display:block}.action-buttons{gap:var(--luzmo-item-grid-item-action-group-gap,.5rem);flex-direction:var(--luzmo-item-grid-item-actions-flex-direction,var(--grid-item-actions-flex-direction));outline:none;display:flex}.action-button[selected]{--luzmo-action-button-background-color-default:var(--luzmo-primary);--luzmo-action-button-background-color-hover:var(--luzmo-primary-hover);--luzmo-action-button-background-color-down:var(--luzmo-primary-down);--luzmo-action-button-background-color-focus:var(--luzmo-primary-focus);--luzmo-action-button-content-color-default:var(--luzmo-primary-inverse-color);--luzmo-action-button-content-color-hover:var(--luzmo-primary-inverse-color);--luzmo-action-button-content-color-down:var(--luzmo-primary-inverse-color);--luzmo-action-button-content-color-focus:var(--luzmo-primary-inverse-color)}:host .action-buttons{--luzmo-action-button-content-color-default:var(--luzmo-item-grid-item-action-button-content-color-default,#fff);--luzmo-action-button-content-color-hover:var(--luzmo-item-grid-item-action-button-content-color-hover,#fff);--luzmo-action-button-content-color-down:var(--luzmo-item-grid-item-action-button-content-color-down,#fff);--luzmo-action-button-content-color-focus:var(--luzmo-item-grid-item-action-button-content-color-focus,#fff);--luzmo-action-button-background-color-default:var(--luzmo-item-grid-item-action-button-background-color-default,#333);--luzmo-action-button-background-color-hover:var(--luzmo-item-grid-item-action-button-background-color-hover,#444);--luzmo-action-button-background-color-down:var(--luzmo-item-grid-item-action-button-background-color-down,#555);--luzmo-action-button-background-color-focus:var(--luzmo-item-grid-item-action-button-background-color-focus,#666)}.delete-button{--luzmo-action-button-background-color-hover:var(--luzmo-item-grid-item-delete-button-background-color-hover,var(--luzmo-negative-color));--luzmo-action-button-content-color-hover:var(--luzmo-item-grid-item-delete-button-content-color-hover,#fff);--luzmo-action-button-background-color-focus:var(--luzmo-item-grid-item-delete-button-background-color-focus,var(--luzmo-negative-color-focus));--luzmo-action-button-content-color-focus:var(--luzmo-item-grid-item-delete-button-content-color-focus,#fff);--luzmo-action-button-background-color-down:var(--luzmo-item-grid-item-delete-button-background-color-down,var(--luzmo-negative-color-down));--luzmo-action-button-content-color-down:var(--luzmo-item-grid-item-delete-button-content-color-down,#fff)}:host([placement=top-start]),:host([placement=top]),:host([placement=top-end]),:host([placement=bottom-start]),:host([placement=bottom]),:host([placement=bottom-end]){--grid-item-actions-flex-direction:row}", Q = class extends t(ne) {
3560
+ constructor(...e) {
3561
+ super(...e), this.placement = "right-start", this.actions = on();
3562
+ }
3563
+ static get styles() {
3564
+ return [y(Un)];
3565
+ }
3566
+ get isVertical() {
3567
+ return this.placement.includes("left") || this.placement.includes("right");
3568
+ }
3569
+ _dispatchAction(e) {
3570
+ this.dispatchEvent(new CustomEvent("luzmo-item-grid-item-action", {
3571
+ bubbles: !0,
3572
+ composed: !0,
3573
+ detail: {
3574
+ action: e.action,
3575
+ type: e.type,
3576
+ active: e.active
3577
+ }
3578
+ }));
3579
+ }
3580
+ _handleActionClick(e, t) {
3581
+ e.stopPropagation(), t.type === "toggle" && (t.active = !t.active, this.actions.forEach((e) => {
3582
+ e.actions?.forEach((e) => {
3583
+ t !== e && e.active && (e.active = !1);
3584
+ });
3585
+ })), this._dispatchAction(t), this.requestUpdate();
3586
+ }
3587
+ clearActiveToggles() {
3588
+ this.actions = this.actions.map((e) => ({
3589
+ ...e,
3590
+ actions: e.actions?.map((e) => (e.type === "toggle" && (e.active = !1), e)) ?? []
3591
+ }));
3592
+ }
3593
+ focus() {
3594
+ let e = this.shadowRoot?.querySelectorAll("luzmo-action-button[toggles]");
3595
+ e && e[0]?.focus();
3596
+ }
3597
+ _generateActionButton(e) {
3598
+ let t = {
3599
+ Data: w("Data", { desc: "Grid item action tooltip" }),
3600
+ Options: w("Options", { desc: "Grid item action tooltip" }),
3601
+ Clone: w("Clone", { desc: "Grid item action tooltip" }),
3602
+ Delete: w("Delete", { desc: "Delete action label" }),
3603
+ Edit: w("Edit", { desc: "Edit action label" }),
3604
+ Lock: w("Lock", { desc: "Grid item action tooltip" }),
3605
+ Filters: w("Filters", { desc: "Grid item action tooltip" })
3606
+ };
3607
+ return g`
3608
+ <luzmo-action-button
3609
+ class="${e.action}-button action-button"
3610
+ .label=${e.label}
3611
+ ?toggles=${e.type === "toggle"}
3612
+ ?selected=${e.type === "toggle" && e.active}
3613
+ @click=${(t) => this._handleActionClick(t, e)}
3614
+ >
3615
+ <luzmo-icon slot="icon" .icon=${e.icon} size="s"></luzmo-icon>
3616
+ ${e.tooltip ? g`
3617
+ <luzmo-tooltip
3618
+ self-managed
3619
+ delayed
3620
+ placement=${this.placement?.includes("right") ? "right" : this.placement?.includes("left") ? "left" : this.placement?.includes("bottom") ? "bottom" : this.placement?.includes("top") ? "top" : "right"}
3621
+ >
3622
+ ${t[e.tooltip] ?? e.tooltip}
3623
+ </luzmo-tooltip>
3624
+ ` : ""}
3625
+ </luzmo-action-button>
3626
+ `;
3627
+ }
3628
+ _generateActionGroup(e) {
3629
+ let t = e?.actions?.map((e) => this._generateActionButton(e)) ?? [];
3630
+ return t.length > 0 ? g`
3631
+ <luzmo-action-group ?vertical=${this.isVertical} compact
3632
+ >${t}</luzmo-action-group
3633
+ >
3634
+ ` : g`
3635
+
3636
+ `;
3637
+ }
3638
+ render() {
3639
+ let e = this.actions.map((e) => this._generateActionGroup(e));
3640
+ return g`
3641
+ <div class="action-buttons" tabindex="0" role="toolbar" aria-label=${w("Item actions", { desc: "Item actions toolbar label" })}>${e}</div>
3642
+ `;
3643
+ }
3644
+ };
3645
+ e([b({
3646
+ type: String,
3647
+ reflect: !0
3648
+ })], Q.prototype, "placement", void 0), e([b({ type: Array })], Q.prototype, "actions", void 0), Q = e([C()], Q);
3649
+ //#endregion
3650
+ //#region src/components/item-grid/item-grid.module.scss?inline
3651
+ var Wn = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(--luzmo-item-grid-min-height);background:var(--luzmo-item-grid-background,var(--grid-background,var(--luzmo-background-color)));position:relative}.grid-stack[has-active-item] .grid-stack-item:not([active])>.grid-stack-item-content,.grid-stack[has-active-item] .grid-stack-item:not([active])>.grid-item-actions-popover{opacity:.5}.grid-stack .grid-stack-item[active]>.ui-resizable-handle,.grid-stack .grid-stack-item[active].ui-resizable-autohide>.ui-resizable-handle{display:block}.grid-stack .grid-stack-item.ui-resizable-resizing,.grid-stack .grid-stack-item.ui-resizable-resizing>.grid-stack-item-content{opacity:var(--luzmo-item-grid-item-resizing-opacity,.8)!important}.grid-item-drag-handle{color:var(--luzmo-item-grid-item-drag-handle-color,#000);top:var(--luzmo-item-grid-item-drag-handle-position-top,0);left:var(--luzmo-item-grid-item-drag-handle-position-left,0);right:var(--luzmo-item-grid-item-drag-handle-position-right,auto);bottom:var(--luzmo-item-grid-item-drag-handle-position-bottom,auto);padding:var(--luzmo-item-grid-item-drag-handle-padding,.5rem);z-index:var(--luzmo-item-grid-item-drag-handle-z-index,3);cursor:var(--luzmo-item-grid-item-drag-handle-cursor,move);position:absolute}.grid-stack[dark-background] .grid-item-drag-handle{color:var(--luzmo-item-grid-item-drag-handle-color,#fff)}.grid-stack .grid-stack-item .grid-stack-item-content{border-radius:var(--luzmo-item-grid-item-border-radius,var(--grid-item-border-radius,4px));background:var(--luzmo-item-grid-item-background,var(--grid-item-background,transparent));box-shadow:var(--luzmo-item-grid-item-box-shadow,var(--grid-item-box-shadow,none));border-style:var(--luzmo-item-grid-item-border-style,none);border-color:var(--luzmo-item-grid-item-border-color,transparent);-webkit-backdrop-filter:var(--luzmo-item-grid-item-backdrop-filter,none);backdrop-filter:var(--luzmo-item-grid-item-backdrop-filter,none);overflow:hidden}.grid-stack .grid-stack-item:not(.has-luzmo-viz-item) .grid-stack-item-content{border-style:var(--luzmo-item-grid-item-border-style,var(--grid-item-border-style,none));border-color:var(--luzmo-item-grid-item-border-color,var(--grid-item-border-color,transparent));border-width:var(--luzmo-item-grid-item-border-width,var(--grid-item-border-width,0));border-top-width:var(--luzmo-item-grid-item-border-top-width,var(--grid-item-border-top-width,0));border-right-width:var(--luzmo-item-grid-item-border-right-width,var(--grid-item-border-right-width,0));border-bottom-width:var(--luzmo-item-grid-item-border-bottom-width,var(--grid-item-border-bottom-width,0));border-left-width:var(--luzmo-item-grid-item-border-left-width,var(--grid-item-border-left-width,0))}.grid-stack .grid-stack-placeholder>.placeholder-content{border-radius:var(--grid-item-border-radius,4px)}:host .grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack-item:hover>.ui-resizable-handle{z-index:var(--luzmo-item-grid-resize-handle-z-index,100);background:var(--luzmo-item-grid-resize-handle-background,#fff);border-radius:var(--luzmo-item-grid-resize-handle-border-radius,3px);opacity:var(--luzmo-item-grid-resize-handle-opacity,0);transition:var(--luzmo-item-grid-resize-handle-transition,opacity .2s ease);box-shadow:0 0 6px #0000001a,0 0 2px #000000bf;display:block!important;position:absolute!important}:host .grid-stack[dark-background]>.grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack[dark-background]>.grid-stack-item:hover>.ui-resizable-handle{background:var(--luzmo-item-grid-resize-handle-background,#333);box-shadow:0 0 6px #ffffff1a,0 0 2px #ffffffbf}:host .grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack-item:hover>.ui-resizable-handle{opacity:var(--luzmo-item-grid-resize-handle-opacity-hover,1)}:host .grid-stack-item>.ui-resizable-handle:hover{opacity:var(--luzmo-item-grid-resize-handle-opacity-active,1);background:var(--luzmo-item-grid-resize-handle-background-hover,var(--luzmo-background-color-highlight))}:host .grid-stack-item>.ui-resizable-n,:host .grid-stack-item>.ui-resizable-s{height:var(--luzmo-item-grid-resize-handle-edge-size,8px);width:var(--luzmo-item-grid-resize-handle-side-size,18px);left:calc(50% - var(--luzmo-item-grid-resize-handle-side-size,18px) / 2)}:host .grid-stack-item>.ui-resizable-n{cursor:n-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-top,0px))}:host .grid-stack-item>.ui-resizable-s{cursor:s-resize;bottom:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-e,:host .grid-stack-item>.ui-resizable-w{width:var(--luzmo-item-grid-resize-handle-edge-size,8px);height:var(--luzmo-item-grid-resize-handle-side-size,18px);top:calc(50% - var(--luzmo-item-grid-resize-handle-side-size,18px) / 2)}:host .grid-stack-item>.ui-resizable-e{cursor:e-resize;right:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-right,0px))}:host .grid-stack-item>.ui-resizable-w{cursor:w-resize;left:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-left,0px))}:host .grid-stack-item>.ui-resizable-ne,:host .grid-stack-item>.ui-resizable-nw,:host .grid-stack-item>.ui-resizable-se,:host .grid-stack-item>.ui-resizable-sw{width:var(--luzmo-item-grid-resize-handle-corner-size,12px);height:var(--luzmo-item-grid-resize-handle-corner-size,12px);background-image:none;transform:none}:host .grid-stack-item>.ui-resizable-ne{cursor:ne-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-top,0px));right:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-right,0px))}:host .grid-stack-item>.ui-resizable-nw{cursor:nw-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-top,0px));left:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-left,0px))}:host .grid-stack-item>.ui-resizable-se{cursor:se-resize;right:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-right,0px));bottom:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-sw{cursor:sw-resize;left:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-left,0px));bottom:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-resizing .ui-resizable-handle{background:var(--luzmo-item-grid-resize-handle-background-active,var(--luzmo-background-color-highlight));opacity:1!important}.grid-item-actions-popover{z-index:2;background:0 0;border:none;outline:none;margin:0;padding:0;position:absolute;overflow:visible}.grid-item-actions-popover:not([popover]){z-index:var(--luzmo-item-grid-item-actions-in-tree-z-index,50);position:fixed}luzmo-item-grid-item-actions-menu{padding:var(--luzmo-item-grid-item-actions-padding,var(--grid-item-actions-padding))}.dimensions-hint-popover{font-size:var(--luzmo-item-grid-item-dimensions-hint-font-size,var(--luzmo-font-size-xs,10px));font-family:var(--luzmo-item-grid-item-dimensions-hint-font-family,var(--luzmo-font-family,inherit));border-width:var(--luzmo-item-grid-item-dimensions-hint-border-width,var(--luzmo-border-width));border-style:solid;border-color:var(--luzmo-item-grid-item-dimensions-hint-border-color,var(--luzmo-border-color));border-radius:var(--luzmo-item-grid-item-dimensions-hint-border-radius,var(--luzmo-border-radius));padding:var(--luzmo-item-grid-item-dimensions-hint-padding,var(--luzmo-spacing-1) var(--luzmo-spacing-2));z-index:3;background:var(--luzmo-item-grid-item-dimensions-hint-background,var(--luzmo-background-color));color:var(--luzmo-item-grid-item-dimensions-hint-color,var(--luzmo-font-color));pointer-events:none;outline:none;margin:0;position:absolute;overflow:visible}luzmo-item-grid-item-actions-menu{--grid-item-actions-padding:0 .75rem}luzmo-item-grid-item-actions-menu[placement=top-start],luzmo-item-grid-item-actions-menu[placement=top],luzmo-item-grid-item-actions-menu[placement=top-end],luzmo-item-grid-item-actions-menu[placement=bottom-start],luzmo-item-grid-item-actions-menu[placement=bottom],luzmo-item-grid-item-actions-menu[placement=bottom-end]{--grid-item-actions-padding:.75rem 0}.grid-stack-item:focus-visible{outline:none}.grid-stack-item:focus-visible .grid-stack-item-content:after{content:\"\";border:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color,var(--luzmo-primary));box-sizing:border-box;border-radius:var(--luzmo-item-grid-item-border-radius,var(--grid-item-border-radius,4px));z-index:2;width:100%;height:100%;position:absolute;top:0;left:0}", $ = class extends ne {
3652
+ constructor(...e) {
3653
+ super(...e), this.appServer = "https://app.luzmo.com/", this.apiHost = "https://api.luzmo.com", this.language = "en", this.contentLanguage = "en", this.columns = 48, this.rowHeight = 16, this.viewMode = !1, this.itemActionsDocumentPopover = !0, this.placementItemActionsMenu = "right-start", this.clonedItemPositioning = "below-item", this._items = [], this._hasControlledItems = !1, this._initialItems = [], this.renderers = {}, this._initialized = !1, this.defaultRenderer = (e) => g`
3654
+ <div class="grid-item-content">
3655
+ <div class="grid-item-type">${e.type}</div>
3656
+ </div>
3657
+ `, this._internalItemStates = {}, this._initialItemStatesApplied = !1, this._internalItems = [], this._initialItemsApplied = !1, this._hasWarnedControlledAndInitialItems = !1, this._hasWarnedIgnoredInitialItems = !1, this._suppressItemStatesEvent = !1, this._suppressNextLayoutChangedEvent = !1, this._hasWarnedControlledAndInitialStates = !1, this._internalItemsVersion = 0, this._handleMouseout = (e) => {
3658
+ if (this.viewMode) return;
3659
+ let t = le(e.target);
3660
+ t && ue({
3661
+ event: e,
3662
+ gridItem: t
3663
+ }) && this._removeItemActionsMenuPopover(t);
3664
+ }, this._handleKeyDown = (e) => {
3665
+ let t = rn({
3666
+ event: e,
3667
+ viewMode: this.viewMode,
3668
+ focusedItemElement: this._focusedItemElement,
3669
+ activeItemElement: this._activeItemElement,
3670
+ gridElement: this._gridElement,
3671
+ grid: this._grid,
3672
+ columns: this.columns ?? 48,
3673
+ onDeleteRequest: (e) => {
3674
+ let t = e.getAttribute("gs-id");
3675
+ if (!t) return;
3676
+ let n = this._effectiveItems, r = n.find((e) => e.id === t);
3677
+ if (!r) return;
3678
+ this._isControlled || this._clearGridItemUiStateForDelete(e);
3679
+ let i = n.filter((e) => e.id !== t);
3680
+ T({
3681
+ target: this,
3682
+ action: "delete",
3683
+ actionType: "button",
3684
+ active: !1,
3685
+ items: n,
3686
+ element: e,
3687
+ itemId: t,
3688
+ item: r,
3689
+ updatedItems: i
3690
+ }), this._isItemsControlled || this._setInternalItems(i, { reconcileStates: !0 });
3691
+ },
3692
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this),
3693
+ createItemActionsMenuPopover: this._createItemActionsMenuPopover.bind(this)
3694
+ });
3695
+ this._focusedItemElement = t.focusedItemElement, this._activeItemElement = t.activeItemElement;
3696
+ }, this._handleFocus = (e) => {
3697
+ this._focusedItemElement = de({
3698
+ event: e,
3699
+ focusedItemElement: this._focusedItemElement,
3700
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this)
3701
+ });
3702
+ }, this._handleBlur = (e) => {
3703
+ let t = fe({
3704
+ event: e,
3705
+ focusedItemElement: this._focusedItemElement,
3706
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this)
3707
+ });
3708
+ this._focusedItemElement = t.focusedItemElement, t.shouldFocusGrid && this._gridElement.focus();
3709
+ }, this._handleGridClick = (e) => {
3710
+ if (this._isControlled) {
3711
+ this._emitControlledClickAwayDeactivation(e);
3712
+ return;
3713
+ }
3714
+ let t = he({
3715
+ event: e,
3716
+ gridElement: this._gridElement,
3717
+ hostElement: this,
3718
+ items: this.items,
3719
+ activeItemActionToggle: this._activeItemActionToggle,
3720
+ cleanupActiveItem: this._cleanupActiveItem.bind(this),
3721
+ dispatchItemActionEvent: this._dispatchItemActionEvent.bind(this)
3722
+ });
3723
+ this._activeItemActionToggle = t.activeItemActionToggle;
3724
+ }, this._handleAction = (e) => {
3725
+ let t = e.detail, n = e.target?.closest(".grid-stack-item"), r = n?.getAttribute("gs-id");
3726
+ if (["delete", "clone"].includes(t.action)) {
3727
+ if (e.stopPropagation(), !r) return;
3728
+ let i = this._effectiveItems, o = i.find((e) => e.id === r);
3729
+ if (!o) return;
3730
+ let s = this._gridElement.querySelector(".grid-stack-item[active]") ?? this._activeItemElement;
3731
+ if (!this._isControlled && s && s !== n) {
3732
+ let e = s.getAttribute("gs-id"), t = i.find((t) => t.id === e), n = this._activeItemActionToggle, r = s;
3733
+ this._cleanupActiveItem(s), n && e && t && this._dispatchItemActionEvent(n, "toggle", !1, r, e, t), this._activeItemElement = void 0, this._activeItemActionToggle = void 0, this._internalItemStates = {};
3734
+ }
3735
+ if (t.action === "delete") {
3736
+ this._isControlled || this._clearGridItemUiStateForDelete(n);
3737
+ let e = i.filter((e) => e.id !== r);
3738
+ T({
3739
+ target: this,
3740
+ action: "delete",
3741
+ actionType: t.type,
3742
+ active: t.active,
3743
+ items: i,
3744
+ element: n,
3745
+ itemId: r,
3746
+ item: o,
3747
+ updatedItems: e
3748
+ }), this._isItemsControlled || this._setInternalItems(e, { reconcileStates: !0 });
3749
+ } else {
3750
+ let e = {
3751
+ ...structuredClone(o),
3752
+ id: a()
3753
+ }, r = this._simulateCloneLayout(e, o), s = r.find((t) => t.id === e.id) ?? e;
3754
+ T({
3755
+ target: this,
3756
+ action: "clone",
3757
+ actionType: t.type,
3758
+ active: t.active,
3759
+ items: i,
3760
+ element: n,
3761
+ itemId: e.id,
3762
+ item: s,
3763
+ originalElement: n,
3764
+ updatedItems: r
3765
+ }), this._isItemsControlled || this._setInternalItems(r, { reconcileStates: !0 });
3766
+ }
3767
+ return;
3768
+ }
3769
+ if (this._isControlled) {
3770
+ if (e.stopPropagation(), !r) return;
3771
+ let i = this.items.find((e) => e.id === r);
3772
+ if (t.type === "toggle") {
3773
+ let e = this._effectiveItemStates, n = t.active, i = this._computeNextItemStates(r, t.action, n);
3774
+ E({
3775
+ target: this,
3776
+ itemStates: e,
3777
+ updatedItemStates: i,
3778
+ changedItemStates: { [r]: [t.action] }
3779
+ });
3780
+ } else T({
3781
+ target: this,
3782
+ action: t.action,
3783
+ actionType: t.type,
3784
+ active: t.active,
3785
+ items: this.items,
3786
+ element: n,
3787
+ itemId: r,
3788
+ item: i
3789
+ });
3790
+ n && !n.hasAttribute("active") && this._removeItemActionsMenuPopover(n);
3791
+ return;
3792
+ }
3793
+ this._suppressItemStatesEvent = !0;
3794
+ let i = me({
3795
+ event: e,
3796
+ gridElement: this._gridElement,
3797
+ items: this.items,
3798
+ state: {
3799
+ activeItemElement: this._activeItemElement,
3800
+ activeItemActionToggle: this._activeItemActionToggle
3801
+ },
3802
+ cleanupActiveItem: this._cleanupActiveItem.bind(this),
3803
+ dispatchItemActionEvent: this._dispatchItemActionEvent.bind(this),
3804
+ createItemActionsMenuPopover: this._createItemActionsMenuPopover.bind(this)
3805
+ });
3806
+ if (this._suppressItemStatesEvent = !1, this._activeItemElement = i.activeItemElement, this._activeItemActionToggle = i.activeItemActionToggle, t.type === "toggle" && r) {
3807
+ let e = this._effectiveItemStates, a = i.activeItemElement === n && i.activeItemActionToggle === t.action, o = this._computeNextItemStates(r, t.action, a);
3808
+ this._internalItemStates = o, E({
3809
+ target: this,
3810
+ itemStates: e,
3811
+ updatedItemStates: o,
3812
+ changedItemStates: this._diffItemStates(e, o)
3813
+ });
3814
+ }
3815
+ };
3816
+ }
3817
+ static get styles() {
3818
+ return [y(ie), y(Wn)];
3819
+ }
3820
+ set items(e) {
3821
+ let t = this._items, n = structuredClone(e ?? []);
3822
+ this._validateItemsHaveIds(n, "items"), this._items = n, this._hasControlledItems = e !== void 0, this._isItemsControlled && !this._hasControlledItems && (this._setInternalItems(t, { reconcileStates: !0 }), this._initialItemsApplied = !0), this.requestUpdate("items", t);
3823
+ }
3824
+ get items() {
3825
+ return this._effectiveItems;
3826
+ }
3827
+ set initialItems(e) {
3828
+ let t = this._initialItems, n = structuredClone(e ?? []);
3829
+ this._validateItemsHaveIds(n, "initialItems"), !(!this._isItemsControlled && this._initialItemsApplied) && (this._initialItems = n, this._isItemsControlled || (this._initialItemsApplied = !1), this.requestUpdate("initialItems", t));
3830
+ }
3831
+ get initialItems() {
3832
+ return this._initialItems;
3833
+ }
3834
+ set itemStates(e) {
3835
+ let t = this._itemStates;
3836
+ this._itemStates = e ?? void 0, this.requestUpdate("itemStates", t);
3837
+ }
3838
+ get itemStates() {
3839
+ return this._itemStates;
3840
+ }
3841
+ get _isControlled() {
3842
+ return this.itemStates !== void 0;
3843
+ }
3844
+ get _isItemsControlled() {
3845
+ return this._hasControlledItems;
3846
+ }
3847
+ get _effectiveItems() {
3848
+ return this._isItemsControlled ? this._items : this._internalItems;
3849
+ }
3850
+ get _effectiveItemStates() {
3851
+ return this._isControlled ? this.itemStates : this._internalItemStates;
3852
+ }
3853
+ _validateItemsHaveIds(e, t) {
3854
+ for (let n = 0; n < e.length; n += 1) if (!e[n]?.id) throw Error(`luzmo-item-grid: ${t}[${n}] is missing required id`);
3855
+ }
3856
+ async _loadTheme(e) {
3857
+ let t = this._initialized;
3858
+ if (this._fullTheme = await ln({
3859
+ theme: e,
3860
+ currentTheme: this._fullTheme
3861
+ }), this._initialized && hn(this.style, this._fullTheme), !this._initialized && this._gridElement && await new Promise((e) => {
3862
+ requestAnimationFrame(() => {
3863
+ this._initializeGrid(), e();
3864
+ });
3865
+ }), this._grid) {
3866
+ let [e, t] = un(this.theme);
3867
+ this._grid.margin([e, t].join(" "));
3868
+ }
3869
+ t && this.requestUpdate();
3870
+ }
3871
+ firstUpdated() {
3872
+ document.addEventListener("click", this._handleGridClick), this.addEventListener("keydown", this._handleKeyDown);
3873
+ }
3874
+ disconnectedCallback() {
3875
+ super.disconnectedCallback(), this._cleanup(), document.removeEventListener("click", this._handleGridClick), this.removeEventListener("keydown", this._handleKeyDown);
3876
+ }
3877
+ willUpdate(e) {
3878
+ if (super.willUpdate(e), e.has("_initialized") && (hn(this.style, this._fullTheme), this._initialized && this._grid && this._fullTheme?.margins)) {
3879
+ let [e, t] = un(this._fullTheme);
3880
+ this._grid.margin([e, t].join(" "));
3881
+ }
3882
+ }
3883
+ updated(e) {
3884
+ super.updated(e);
3885
+ let t = e.has("contentLanguage"), n = e.has("viewMode"), r = e.has("items"), i = e.has("initialItems"), a = r || e.has("_internalItemsVersion"), o = e.has("theme"), s = e.has("itemStates");
3886
+ this._isItemsControlled && this.initialItems && this.initialItems.length > 0 ? this._hasWarnedControlledAndInitialItems ||= (console.warn("luzmo-item-grid: Both items and initialItems are set. The component will be treated as controlled (initialItems is ignored)."), !0) : this._hasWarnedControlledAndInitialItems = !1, !this._initialItemsApplied && !this._isItemsControlled && this._initialItems.length > 0 ? (this._setInternalItems(this._initialItems, { reconcileStates: !0 }), this._initialItemsApplied = !0) : i && !this._isItemsControlled && this._initialItems.length === 0 && !this._initialItemsApplied && (this._setInternalItems([], { reconcileStates: !0 }), this._initialItemsApplied = !0), this.itemStates !== void 0 && this.initialItemStates !== void 0 ? this._hasWarnedControlledAndInitialStates ||= (console.warn("luzmo-item-grid: Both itemStates and initialItemStates are set. The component will be treated as controlled (initialItemStates is ignored)."), !0) : this._hasWarnedControlledAndInitialStates = !1, !this._initialItemStatesApplied && this.initialItemStates && !this._isControlled && (this._internalItemStates = this._sanitizeInitialItemStates(this.initialItemStates), this._initialItemStatesApplied = !0), ye(this._effectiveItems), Vn({
3887
+ initialized: this._initialized,
3888
+ grid: this._grid,
3889
+ hasItemsChanged: a,
3890
+ gridItemElements: this._gridItemElements,
3891
+ items: this._effectiveItems
3892
+ }), r && this._reconcileStaleItemStates(), t && ae(this._gridItemElements, this.contentLanguage), this._activeItemElement = Hn({
3893
+ initialized: this._initialized,
3894
+ grid: this._grid,
3895
+ hasViewModeChanged: n,
3896
+ viewMode: this.viewMode,
3897
+ previousViewMode: e.get("viewMode"),
3898
+ activeItemElement: this._activeItemElement,
3899
+ gridElement: this._gridElement,
3900
+ cleanupActiveItem: this._cleanupActiveItem.bind(this)
3901
+ }), (o || !this._fullTheme && !this._initialized) && this._loadTheme(this.theme), (a || s) && this._initialized && this._applyItemStates();
3902
+ }
3903
+ _setInternalItems(e, t = {}) {
3904
+ let n = structuredClone(e);
3905
+ this._validateItemsHaveIds(n, "internalItems"), this._internalItems = n, ye(this._internalItems), this._internalItemsVersion += 1, t.reconcileStates && this._reconcileStaleItemStates();
3906
+ }
3907
+ _handleMouseover(e) {
3908
+ if (this.viewMode) return;
3909
+ let t = le(e.target);
3910
+ t && this._createItemActionsMenuPopover(t);
3911
+ }
3912
+ _emitControlledClickAwayDeactivation(e) {
3913
+ let t = this._effectiveItemStates, n = Object.entries(t).filter(([, e]) => e.length > 0);
3914
+ if (!this._gridElement || n.length === 0) return;
3915
+ let r = e.composedPath();
3916
+ if (n.some(([e]) => {
3917
+ let t = Array.from(this._gridElement.querySelectorAll(".grid-stack-item")).find((t) => t.getAttribute("gs-id") === e);
3918
+ if (!t) return !1;
3919
+ if (r.includes(t)) return !0;
3920
+ let n = t.querySelector(".grid-item-actions-popover");
3921
+ return n ? r.includes(n) : !1;
3922
+ })) return;
3923
+ let i = {}, a = { ...t };
3924
+ for (let [e, t] of n) {
3925
+ for (let n of t) a = this._computeNextItemStates(e, n, !1, a);
3926
+ i[e] = [...t];
3927
+ }
3928
+ E({
3929
+ target: this,
3930
+ itemStates: t,
3931
+ updatedItemStates: a,
3932
+ changedItemStates: i
3933
+ });
3934
+ }
3935
+ _cleanupActiveItem(e) {
3936
+ this._activeItemElement = pe({
3937
+ item: e,
3938
+ activeItemElement: this._activeItemElement,
3939
+ gridElement: this._gridElement,
3940
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this)
3941
+ });
3942
+ }
3943
+ _clearGridItemUiStateForDelete(e) {
3944
+ e.hasAttribute("focused") && e.removeAttribute("focused"), e.hasAttribute("active") && e.removeAttribute("active"), this._removeItemActionsMenuPopover(e), this._focusedItemElement === e && (this._focusedItemElement = void 0), this._activeItemElement === e && (this._activeItemElement = void 0, this._activeItemActionToggle = void 0), this._gridElement.querySelector(".grid-stack-item[active]") || this._gridElement.removeAttribute("has-active-item");
3945
+ }
3946
+ _dispatchItemActionEvent(e, t, n, r, i, a, o, s) {
3947
+ if (T({
3948
+ target: this,
3949
+ action: e,
3950
+ actionType: t,
3951
+ active: n,
3952
+ items: this.items,
3953
+ element: r,
3954
+ itemId: i,
3955
+ item: a,
3956
+ deletedId: o,
3957
+ originalElement: s
3958
+ }), t === "toggle" && !this._suppressItemStatesEvent) {
3959
+ let t = this._effectiveItemStates, r = this._computeNextItemStates(i, e, n);
3960
+ this._isControlled || (this._internalItemStates = r), E({
3961
+ target: this,
3962
+ itemStates: t,
3963
+ updatedItemStates: r,
3964
+ changedItemStates: { [i]: [e] }
3965
+ });
3966
+ }
3967
+ }
3968
+ _sanitizeInitialItemStates(e) {
3969
+ let t = Object.entries(e).filter(([, e]) => e.length > 0), n = t.length, r = t.reduce((e, [, t]) => e + t.length, 0);
3970
+ if (n > 1 || r > 1) {
3971
+ console.warn("luzmo-item-grid: initialItemStates contains multiple items or actions. In uncontrolled mode, only one item with one active action is supported at a time. Only the first item and its first action will be applied. Use controlled mode (itemStates) for multiple simultaneous active items.");
3972
+ let [e, n] = t[0];
3973
+ return { [e]: [n[0]] };
3974
+ }
3975
+ return { ...e };
3976
+ }
3977
+ _diffItemStates(e, t) {
3978
+ let n = {}, r = new Set([...Object.keys(e), ...Object.keys(t)]);
3979
+ for (let i of r) {
3980
+ let r = e[i] ?? [], a = t[i] ?? [], o = a.filter((e) => !r.includes(e)), s = r.filter((e) => !a.includes(e)), c = [...o, ...s];
3981
+ c.length > 0 && (n[i] = c);
3982
+ }
3983
+ return n;
3984
+ }
3985
+ _computeNextItemStates(e, t, n, r) {
3986
+ if (!this._isControlled) return n ? { [e]: [t] } : {};
3987
+ let i = { ...r ?? this._effectiveItemStates };
3988
+ if (n) {
3989
+ let n = i[e] ?? [];
3990
+ n.includes(t) || (i[e] = [...n, t]);
3991
+ } else {
3992
+ let n = i[e];
3993
+ if (n) {
3994
+ let r = n.filter((e) => e !== t);
3995
+ r.length === 0 ? delete i[e] : i[e] = r;
3996
+ }
3997
+ }
3998
+ return i;
3999
+ }
4000
+ _filterItemStatesToExistingItems(e) {
4001
+ let t = new Set(this.items.map((e) => e.id).filter((e) => !!e)), n = {};
4002
+ for (let [r, i] of Object.entries(e)) !t.has(r) || i.length === 0 || (n[r] = [...i]);
4003
+ return n;
4004
+ }
4005
+ _reconcileStaleItemStates() {
4006
+ let e = this._isControlled ? this._effectiveItemStates : this._internalItemStates, t = this._filterItemStatesToExistingItems(e), n = {};
4007
+ for (let [r, i] of Object.entries(e)) !t[r] && i.length > 0 && (n[r] = [...i]);
4008
+ Object.keys(n).length > 0 && E({
4009
+ target: this,
4010
+ itemStates: e,
4011
+ updatedItemStates: t,
4012
+ changedItemStates: n
4013
+ }), this._isControlled || (this._internalItemStates = t);
4014
+ }
4015
+ _simulateCloneLayout(e, t) {
4016
+ let n = this._effectiveItems;
4017
+ if (!this._grid) return [...n, e];
4018
+ let r = e.position ?? this._resolvePositionFromEngine(t.id);
4019
+ if (!r) return [...n, e];
4020
+ e = {
4021
+ ...e,
4022
+ position: { ...r }
4023
+ };
4024
+ let i = t.position ?? this._resolvePositionFromEngine(t.id);
4025
+ this.clonedItemPositioning === "below-item" && i && (e.position = {
4026
+ ...e.position,
4027
+ col: i.col,
4028
+ row: i.row + i.sizeY
4029
+ });
4030
+ let a = this.clonedItemPositioning !== "below-item" || !i, { updatedItems: o } = Te({
4031
+ item: e,
4032
+ engine: this._grid.engine,
4033
+ existingItems: this._enrichItemsWithEnginePositions(n),
4034
+ autoPosition: a
4035
+ });
4036
+ return o;
4037
+ }
4038
+ _cleanup() {
4039
+ for (let e of this._gridItemElements) this._cleanupActiveItem(e);
4040
+ this._grid &&= (this._grid.destroy(), void 0), this._initialized = !1;
4041
+ }
4042
+ _restoreItemsLayout(e) {
4043
+ if (!this._grid || !this._gridElement || e.length === 0 || !this._isItemsControlled) return;
4044
+ let t = [];
4045
+ for (let n of e) {
4046
+ if (!n.id) continue;
4047
+ let e = this._effectiveItems.find((e) => e.id === n.id);
4048
+ if (!e) continue;
4049
+ let r = e.position ?? this._resolvePositionFromEngine(e.id);
4050
+ if (!r) continue;
4051
+ let i = this._gridElement.querySelector(`.grid-stack-item[gs-id="${e.id}"]`);
4052
+ i && (n.x !== r.col || n.y !== r.row || n.w !== r.sizeX || n.h !== r.sizeY) && t.push({
4053
+ element: i,
4054
+ position: r
4055
+ });
4056
+ }
4057
+ if (t.length !== 0) {
4058
+ this._suppressNextLayoutChangedEvent = !0, this._grid.batchUpdate();
4059
+ for (let e of t) this._grid.update(e.element, {
4060
+ x: e.position.col,
4061
+ y: e.position.row,
4062
+ w: e.position.sizeX,
4063
+ h: e.position.sizeY
4064
+ });
4065
+ this._grid.batchUpdate(!1), setTimeout(() => {
4066
+ this._suppressNextLayoutChangedEvent &&= !1;
4067
+ }, 0);
4068
+ }
4069
+ }
4070
+ _initializeGrid() {
4071
+ this._initialized || !this._gridElement || (this._grid = Ln({
4072
+ gridElement: this._gridElement,
4073
+ gridItemElements: this._gridItemElements,
4074
+ items: this._effectiveItems,
4075
+ columns: this.columns ?? 48,
4076
+ rowHeight: this.rowHeight ?? 16,
4077
+ viewMode: this.viewMode,
4078
+ fullTheme: this._fullTheme,
4079
+ onCreateOrUpdateDimensionsHint: this._createOrUpdateDimensionsHint.bind(this),
4080
+ onRemoveDimensionsHint: this._removeDimensionsHint.bind(this),
4081
+ onChange: (e) => {
4082
+ if (this._suppressNextLayoutChangedEvent) {
4083
+ this._suppressNextLayoutChangedEvent = !1;
4084
+ return;
4085
+ }
4086
+ let t = this._effectiveItems, n = Rn(t, e);
4087
+ this._isItemsControlled || this._setInternalItems(n, { reconcileStates: !0 }), se({
4088
+ target: this,
4089
+ eventName: "luzmo-item-grid-layout-changed",
4090
+ detail: {
4091
+ element: this._gridElement,
4092
+ grid: this._grid,
4093
+ items: t,
4094
+ updatedItems: n
4095
+ }
4096
+ }), this._restoreItemsLayout(e);
4097
+ }
4098
+ }), this._initialized = !0, se({
4099
+ target: this,
4100
+ eventName: "luzmo-item-grid-ready",
4101
+ detail: {
4102
+ element: this._gridElement,
4103
+ grid: this._grid,
4104
+ items: this._effectiveItems
4105
+ }
4106
+ }), this._applyItemStates());
4107
+ }
4108
+ _applyItemStates() {
4109
+ let e = this._filterItemStatesToExistingItems(this._effectiveItemStates), t = new Set(Object.entries(e).filter(([, e]) => e.length > 0).map(([e]) => e)), n = [], r = this._gridElement?.querySelectorAll(".grid-stack-item[active]");
4110
+ if (r) for (let e of r) {
4111
+ let n = e.getAttribute("gs-id");
4112
+ (!n || !t.has(n)) && (e.removeAttribute("active"), this._removeItemActionsMenuPopover(e));
4113
+ }
4114
+ if (this._activeItemElement = void 0, this._activeItemActionToggle = void 0, t.size === 0) {
4115
+ this._gridElement?.removeAttribute("has-active-item");
4116
+ return;
4117
+ }
4118
+ for (let [t, r] of Object.entries(e)) {
4119
+ if (r.length === 0) continue;
4120
+ let e = this.getGridItemById(t);
4121
+ if (!e?.element) continue;
4122
+ let i = e.element;
4123
+ i.setAttribute("active", "true"), this._gridElement?.setAttribute("has-active-item", "true"), this._createItemActionsMenuPopover(i, r);
4124
+ for (let e of r) n.push({
4125
+ element: i,
4126
+ action: e
4127
+ });
4128
+ }
4129
+ if (n.length === 0) {
4130
+ this._gridElement?.removeAttribute("has-active-item"), this._activeItemElement = void 0, this._activeItemActionToggle = void 0;
4131
+ return;
4132
+ }
4133
+ n.length === 1 ? (this._activeItemElement = n[0].element, this._activeItemActionToggle = n[0].action) : (this._activeItemElement = void 0, this._activeItemActionToggle = void 0);
4134
+ }
4135
+ _createOrUpdateDimensionsHint(e, t, n) {
4136
+ zn({
4137
+ element: e,
4138
+ numberOfColumns: t,
4139
+ numberOfRows: n,
4140
+ offsetHint: dn(this.theme)
4141
+ });
4142
+ }
4143
+ _removeDimensionsHint(e) {
4144
+ Bn(e);
4145
+ }
4146
+ get grid() {
4147
+ return this._grid;
4148
+ }
4149
+ get gridItems() {
4150
+ return we(this.items, this._gridElement);
4151
+ }
4152
+ registerRenderer(e, t) {
4153
+ this.renderers = {
4154
+ ...this.renderers,
4155
+ [e]: t
4156
+ };
4157
+ }
4158
+ _renderOverlayContent(e, t) {
4159
+ return _n({
4160
+ item: e,
4161
+ activeActions: t,
4162
+ defaultItemActionsMenu: this.defaultItemActionsMenu,
4163
+ placementItemActionsMenu: this.placementItemActionsMenu,
4164
+ language: this.language,
4165
+ handleAction: this._handleAction,
4166
+ itemActionsDocumentPopover: this.itemActionsDocumentPopover
4167
+ });
4168
+ }
4169
+ _createItemActionsMenuPopover(e, t) {
4170
+ $t({
4171
+ element: e,
4172
+ activeActions: t,
4173
+ getGridItemById: this.getGridItemById.bind(this),
4174
+ placementItemActionsMenu: this.placementItemActionsMenu,
4175
+ renderOverlayContent: this._renderOverlayContent.bind(this),
4176
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this),
4177
+ itemActionsDocumentPopover: this.itemActionsDocumentPopover
4178
+ });
4179
+ }
4180
+ _removeItemActionsMenuPopover(e) {
4181
+ en(e);
4182
+ }
4183
+ getGridItemById(e) {
4184
+ return this.gridItems.find((t) => t.item.id === e);
4185
+ }
4186
+ scrollToItem(e) {
4187
+ let t = this.getGridItemById(e);
4188
+ if (!t?.element) return;
4189
+ let n = t.element.getBoundingClientRect();
4190
+ (n.bottom > window.innerHeight || n.top < 0) && t.element.scrollIntoView({
4191
+ behavior: "smooth",
4192
+ block: "center"
4193
+ });
4194
+ }
4195
+ _createMissingItemError(e) {
4196
+ return /* @__PURE__ */ Error(`Grid item with id "${e}" not found`);
4197
+ }
4198
+ _requireGridItem(e) {
4199
+ let t = this._effectiveItems.find((t) => t.id === e);
4200
+ if (!t) throw this._createMissingItemError(e);
4201
+ return t;
4202
+ }
4203
+ _resolvePositionFromEngine(e) {
4204
+ let t = this._grid?.engine.nodes.find((t) => t.id === e);
4205
+ if (!(!t || t.x == null || t.y == null || t.w == null || t.h == null)) return {
4206
+ col: t.x,
4207
+ row: t.y,
4208
+ sizeX: t.w,
4209
+ sizeY: t.h
4210
+ };
4211
+ }
4212
+ _requireGridItemWithPosition(e) {
4213
+ let t = this._requireGridItem(e);
4214
+ if (!t.position) {
4215
+ let n = this._resolvePositionFromEngine(e);
4216
+ if (!n) throw Error(`Grid item with id "${e}" does not have a position`);
4217
+ return {
4218
+ ...t,
4219
+ position: n
4220
+ };
4221
+ }
4222
+ return t;
4223
+ }
4224
+ _assertAddItemHasId(e) {
4225
+ if (!e.id) throw Error("addGridItem requires newItem.id");
4226
+ }
4227
+ addGridItem(e) {
4228
+ if (this._assertAddItemHasId(e), this._effectiveItems.some((t) => t.id === e.id)) throw Error(`addGridItem rejected: an item with id "${e.id}" already exists`);
4229
+ let t = De(e), n = this._effectiveItems;
4230
+ if (!this._grid) {
4231
+ let r = e.position?.col == null || e.position?.row == null ? {
4232
+ ...t,
4233
+ position: void 0
4234
+ } : t, i = [...n, r];
4235
+ return this._isItemsControlled || this._setInternalItems(i, { reconcileStates: !0 }), i;
4236
+ }
4237
+ if (!t.position) {
4238
+ let e = [...n, t];
4239
+ return this._isItemsControlled || this._setInternalItems(e, { reconcileStates: !0 }), e;
4240
+ }
4241
+ let r = e.position?.col == null || e.position?.row == null, { updatedItems: i } = Te({
4242
+ item: t,
4243
+ engine: this._grid.engine,
4244
+ existingItems: n,
4245
+ autoPosition: r
4246
+ });
4247
+ return this._isItemsControlled || this._setInternalItems(i, { reconcileStates: !0 }), i;
4248
+ }
4249
+ _enrichItemsWithEnginePositions(e) {
4250
+ return this._grid ? e.map((e) => {
4251
+ if (e.position) return e;
4252
+ let t = this._resolvePositionFromEngine(e.id);
4253
+ return t ? {
4254
+ ...e,
4255
+ position: t
4256
+ } : e;
4257
+ }) : e;
4258
+ }
4259
+ _updateGridItemPosition(e, t) {
4260
+ let n = this._effectiveItems, r = this._requireGridItemWithPosition(e);
4261
+ return n.map((n) => {
4262
+ if (n.id !== e) return n;
4263
+ let i = n.position ?? r.position;
4264
+ return {
4265
+ ...n,
4266
+ position: {
4267
+ ...i,
4268
+ ...t
4269
+ }
4270
+ };
4271
+ });
4272
+ }
4273
+ _dispatchLayoutChangedEvent(e, t) {
4274
+ se({
4275
+ target: this,
4276
+ eventName: "luzmo-item-grid-layout-changed",
4277
+ detail: {
4278
+ element: this._gridElement,
4279
+ grid: this._grid,
4280
+ items: e,
4281
+ updatedItems: t
4282
+ }
4283
+ });
4284
+ }
4285
+ _updateItemField(e, t) {
4286
+ let n = this._effectiveItems;
4287
+ this._requireGridItem(e);
4288
+ let r = n.map((n) => n.id === e ? {
4289
+ ...n,
4290
+ ...t
4291
+ } : n);
4292
+ return this._isItemsControlled || this._setInternalItems(r, { reconcileStates: !0 }), r;
4293
+ }
4294
+ removeGridItem(e) {
4295
+ let t = this._effectiveItems, n = this._requireGridItem(e), r = t.filter((t) => t.id !== e);
4296
+ return T({
4297
+ target: this,
4298
+ action: "delete",
4299
+ actionType: "button",
4300
+ active: !1,
4301
+ items: t,
4302
+ element: this.getGridItemById(e)?.element ?? this,
4303
+ itemId: e,
4304
+ item: n,
4305
+ updatedItems: r
4306
+ }), this._isItemsControlled || this._setInternalItems(r, { reconcileStates: !0 }), r;
4307
+ }
4308
+ cloneGridItem(e) {
4309
+ let t = this._effectiveItems, n = this._requireGridItem(e), r = {
4310
+ ...structuredClone(n),
4311
+ id: a()
4312
+ }, i = this._simulateCloneLayout(r, n), o = i.find((e) => e.id === r.id) ?? r;
4313
+ return T({
4314
+ target: this,
4315
+ action: "clone",
4316
+ actionType: "button",
4317
+ active: !1,
4318
+ items: t,
4319
+ element: this.getGridItemById(e)?.element ?? this,
4320
+ itemId: r.id,
4321
+ item: o,
4322
+ originalElement: this.getGridItemById(e)?.element,
4323
+ updatedItems: i
4324
+ }), this._isItemsControlled || this._setInternalItems(i, { reconcileStates: !0 }), i;
4325
+ }
4326
+ updateGridItemPosition(e, t) {
4327
+ let n = this._updateGridItemPosition(e, t);
4328
+ return this._dispatchLayoutChangedEvent(this._effectiveItems, n), this._isItemsControlled || this._setInternalItems(n, { reconcileStates: !0 }), n;
4329
+ }
4330
+ updateGridItemSize(e, t) {
4331
+ let n = this._updateGridItemPosition(e, t);
4332
+ return this._dispatchLayoutChangedEvent(this._effectiveItems, n), this._isItemsControlled || this._setInternalItems(n, { reconcileStates: !0 }), n;
4333
+ }
4334
+ updateGridItemSlots(e, t) {
4335
+ return this._updateItemField(e, { slots: t });
4336
+ }
4337
+ updateGridItemOptions(e, t) {
4338
+ return this._updateItemField(e, { options: t });
4339
+ }
4340
+ updateGridItemFilters(e, t) {
4341
+ return this._updateItemField(e, { filters: t });
4342
+ }
4343
+ updateGridItemType(e, t) {
4344
+ return this._updateItemField(e, { type: t });
4345
+ }
4346
+ updateGridItem(e, t) {
4347
+ let n = this._effectiveItems;
4348
+ this._requireGridItem(e);
4349
+ let { position: r, ...i } = t, a;
4350
+ return r && this._grid ? (a = Ee({
4351
+ itemId: e,
4352
+ patch: r,
4353
+ engine: this._grid.engine,
4354
+ existingItems: this._enrichItemsWithEnginePositions(n)
4355
+ }), a = a.map((t) => t.id === e ? {
4356
+ ...t,
4357
+ ...i
4358
+ } : t)) : a = n.map((t) => t.id === e ? {
4359
+ ...t,
4360
+ ...i,
4361
+ ...r && t.position ? { position: {
4362
+ ...t.position,
4363
+ ...r
4364
+ } } : r ? { position: r } : {}
4365
+ } : t), t.position && this._dispatchLayoutChangedEvent(n, a), this._isItemsControlled || this._setInternalItems(a, { reconcileStates: !0 }), a;
4366
+ }
4367
+ async triggerItemAction(e, t, n) {
4368
+ await this.updateComplete;
4369
+ let r = this.getGridItemById(e);
4370
+ if (!r?.element) {
4371
+ console.warn(`Grid item with id "${e}" not found`);
4372
+ return;
4373
+ }
4374
+ if (this._isControlled) return this._triggerControlledItemAction(e, t, n);
4375
+ this._suppressItemStatesEvent = !0;
4376
+ let i = ge({
4377
+ gridElement: this._gridElement,
4378
+ items: this.items,
4379
+ gridItemData: r,
4380
+ itemId: e,
4381
+ action: t,
4382
+ options: n,
4383
+ state: {
4384
+ activeItemElement: this._activeItemElement,
4385
+ activeItemActionToggle: this._activeItemActionToggle
4386
+ },
4387
+ cleanupActiveItem: this._cleanupActiveItem.bind(this),
4388
+ dispatchItemActionEvent: this._dispatchItemActionEvent.bind(this),
4389
+ createItemActionsMenuPopover: this._createItemActionsMenuPopover.bind(this)
4390
+ });
4391
+ if (this._suppressItemStatesEvent = !1, this._activeItemElement = i.state.activeItemElement, this._activeItemActionToggle = i.state.activeItemActionToggle, i.result !== void 0) {
4392
+ let n = this._effectiveItemStates, r = this._computeNextItemStates(e, t, i.result);
4393
+ this._internalItemStates = r, E({
4394
+ target: this,
4395
+ itemStates: n,
4396
+ updatedItemStates: r,
4397
+ changedItemStates: this._diffItemStates(n, r)
4398
+ });
4399
+ }
4400
+ return i.result;
4401
+ }
4402
+ activateItemAction(e, t, n) {
4403
+ return this.triggerItemAction(e, t, n);
4404
+ }
4405
+ _triggerControlledItemAction(e, t, n) {
4406
+ let r = (this._effectiveItemStates[e] ?? []).includes(t), i = n?.active ?? !r;
4407
+ if (n?.active !== void 0 && i === r) return r;
4408
+ let a = this._effectiveItemStates, o = this._computeNextItemStates(e, t, i);
4409
+ return E({
4410
+ target: this,
4411
+ itemStates: a,
4412
+ updatedItemStates: o,
4413
+ changedItemStates: { [e]: [t] }
4414
+ }), i;
4415
+ }
4416
+ deactivateItems() {
4417
+ if (this._isControlled) {
4418
+ let e = this._effectiveItemStates, t = Object.entries(e).flatMap(([e, t]) => t.map((t) => ({
4419
+ itemId: e,
4420
+ action: t
4421
+ })));
4422
+ if (t.length === 0) return 0;
4423
+ let n = {}, r = { ...e };
4424
+ for (let e of t) r = this._computeNextItemStates(e.itemId, e.action, !1, r), n[e.itemId] = [...n[e.itemId] ?? [], e.action];
4425
+ return E({
4426
+ target: this,
4427
+ itemStates: e,
4428
+ updatedItemStates: r,
4429
+ changedItemStates: n
4430
+ }), new Set(t.map((e) => e.itemId)).size;
4431
+ }
4432
+ let e = this._effectiveItemStates, t = Object.entries(e).flatMap(([e, t]) => t.map((t) => ({
4433
+ itemId: e,
4434
+ action: t
4435
+ })));
4436
+ this._suppressItemStatesEvent = !0;
4437
+ let n = _e({
4438
+ gridElement: this._gridElement,
4439
+ items: this.items,
4440
+ state: {
4441
+ activeItemElement: this._activeItemElement,
4442
+ activeItemActionToggle: this._activeItemActionToggle
4443
+ },
4444
+ cleanupActiveItem: this._cleanupActiveItem.bind(this),
4445
+ dispatchItemActionEvent: this._dispatchItemActionEvent.bind(this)
4446
+ });
4447
+ if (this._suppressItemStatesEvent = !1, this._activeItemElement = n.state.activeItemElement, this._activeItemActionToggle = n.state.activeItemActionToggle, this._isControlled || (this._internalItemStates = {}), t.length > 0) {
4448
+ let n = {};
4449
+ for (let e of t) n[e.itemId] = [...n[e.itemId] ?? [], e.action];
4450
+ E({
4451
+ target: this,
4452
+ itemStates: e,
4453
+ updatedItemStates: {},
4454
+ changedItemStates: n
4455
+ });
4456
+ }
4457
+ return n.deactivatedCount;
4458
+ }
4459
+ _renderGrid() {
4460
+ return bn({
4461
+ items: this.items,
4462
+ initialized: this._initialized,
4463
+ viewMode: this.viewMode,
4464
+ contentLanguage: this.contentLanguage,
4465
+ fullTheme: this._fullTheme,
4466
+ appServer: this.appServer,
4467
+ apiHost: this.apiHost,
4468
+ authKey: this.authKey,
4469
+ authToken: this.authToken,
4470
+ columns: this.columns ?? 48,
4471
+ ensureGridItemId: (e) => be(e),
4472
+ handleMouseover: this._handleMouseover.bind(this),
4473
+ handleMouseout: this._handleMouseout,
4474
+ handleFocus: this._handleFocus,
4475
+ handleBlur: this._handleBlur
4476
+ });
4477
+ }
4478
+ render() {
4479
+ return this._renderGrid();
4480
+ }
4481
+ };
4482
+ e([b({
4483
+ type: String,
4484
+ attribute: "app-server",
4485
+ reflect: !0
4486
+ })], $.prototype, "appServer", void 0), e([b({
4487
+ type: String,
4488
+ attribute: "api-host",
4489
+ reflect: !0
4490
+ })], $.prototype, "apiHost", void 0), e([b({
4491
+ type: String,
4492
+ attribute: "auth-key",
4493
+ reflect: !0
4494
+ })], $.prototype, "authKey", void 0), e([b({
4495
+ type: String,
4496
+ attribute: "auth-token",
4497
+ reflect: !0
4498
+ })], $.prototype, "authToken", void 0), e([b({
4499
+ type: Number,
4500
+ attribute: "cache-time",
4501
+ reflect: !0
4502
+ })], $.prototype, "cacheTime", void 0), e([b({
4503
+ type: String,
4504
+ reflect: !0
4505
+ })], $.prototype, "language", void 0), e([b({
4506
+ type: String,
4507
+ attribute: "content-language",
4508
+ reflect: !0
4509
+ })], $.prototype, "contentLanguage", void 0), e([b({
4510
+ type: Number,
4511
+ reflect: !0
4512
+ })], $.prototype, "columns", void 0), e([b({
4513
+ type: Number,
4514
+ reflect: !0,
4515
+ attribute: "row-height"
4516
+ })], $.prototype, "rowHeight", void 0), e([b({
4517
+ type: Boolean,
4518
+ reflect: !0,
4519
+ attribute: "view-mode"
4520
+ })], $.prototype, "viewMode", void 0), e([b({
4521
+ type: Boolean,
4522
+ reflect: !0,
4523
+ attribute: "item-actions-document-popover"
4524
+ })], $.prototype, "itemActionsDocumentPopover", void 0), e([b({
4525
+ type: String,
4526
+ reflect: !0,
4527
+ attribute: "placement-item-actions-menu"
4528
+ })], $.prototype, "placementItemActionsMenu", void 0), e([b({
4529
+ type: Array,
4530
+ reflect: !0,
4531
+ attribute: "default-item-actions-menu"
4532
+ })], $.prototype, "defaultItemActionsMenu", void 0), e([b({
4533
+ type: String,
4534
+ reflect: !0,
4535
+ attribute: "cloned-item-positioning"
4536
+ })], $.prototype, "clonedItemPositioning", void 0), e([b({
4537
+ type: Object,
4538
+ reflect: !0
4539
+ })], $.prototype, "theme", void 0), e([b({
4540
+ type: Array,
4541
+ reflect: !1
4542
+ })], $.prototype, "items", null), e([b({
4543
+ type: Array,
4544
+ reflect: !1,
4545
+ attribute: "initial-items"
4546
+ })], $.prototype, "initialItems", null), e([b({
4547
+ type: Object,
4548
+ reflect: !1
4549
+ })], $.prototype, "renderers", void 0), e([b({
4550
+ type: Object,
4551
+ reflect: !1,
4552
+ attribute: "item-states"
4553
+ })], $.prototype, "itemStates", null), e([b({
4554
+ type: Object,
4555
+ reflect: !1,
4556
+ attribute: "initial-item-states"
4557
+ })], $.prototype, "initialItemStates", void 0), e([S()], $.prototype, "_initialized", void 0), e([x(".grid-stack")], $.prototype, "_gridElement", void 0), e([ee(".luzmo-item-grid-item")], $.prototype, "_gridItemElements", void 0), e([S()], $.prototype, "_internalItemsVersion", void 0), customElements.get("luzmo-item-grid") || customElements.define("luzmo-item-grid", $), customElements.get("luzmo-item-grid-item-actions-menu") || customElements.define("luzmo-item-grid-item-actions-menu", Q);
4558
+ //#endregion
4559
+ export { Q as n, $ as t };