@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,3715 @@
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 { i as e } from "./base-DYkpEuMf.js";
21
+ import { t } from "./decorate-CaYbmmmm.js";
22
+ import "./ai-interaction-textarea-DSrZkuh9.js";
23
+ import { msg as n } from "@lit/localize/lit-localize";
24
+ import { luzmoEllipsisVertical as r, luzmoIcon as i, luzmoSpin as a } from "@luzmo/icons";
25
+ import "@luzmo/lucero/chat-message";
26
+ import "@luzmo/lucero/overlay";
27
+ import "@luzmo/lucero/popover";
28
+ import "@luzmo/lucero/progress-steps";
29
+ import { html as o, nothing as s, unsafeCSS as c } from "lit";
30
+ import { property as l, state as u } from "lit/decorators.js";
31
+ import { unsafeHTML as d } from "lit/directives/unsafe-html.js";
32
+ import "@luzmo/lucero/action-button";
33
+ //#region node_modules/dompurify/dist/purify.es.mjs
34
+ function ee(e, t) {
35
+ (t == null || t > e.length) && (t = e.length);
36
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
37
+ return r;
38
+ }
39
+ function te(e) {
40
+ if (Array.isArray(e)) return e;
41
+ }
42
+ function ne(e, t) {
43
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
44
+ if (n != null) {
45
+ var r, i, a, o, s = [], c = !0, l = !1;
46
+ try {
47
+ if (a = (n = n.call(e)).next, t !== 0) for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
48
+ } catch (e) {
49
+ l = !0, i = e;
50
+ } finally {
51
+ try {
52
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
53
+ } finally {
54
+ if (l) throw i;
55
+ }
56
+ }
57
+ return s;
58
+ }
59
+ }
60
+ function re() {
61
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
+ }
63
+ function ie(e, t) {
64
+ return te(e) || ne(e, t) || ae(e, t) || re();
65
+ }
66
+ function ae(e, t) {
67
+ if (e) {
68
+ if (typeof e == "string") return ee(e, t);
69
+ var n = {}.toString.call(e).slice(8, -1);
70
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ee(e, t) : void 0;
71
+ }
72
+ }
73
+ var oe = Object.entries, se = Object.setPrototypeOf, f = Object.isFrozen, p = Object.getPrototypeOf, m = Object.getOwnPropertyDescriptor, h = Object.freeze, g = Object.seal, ce = Object.create, _ = typeof Reflect < "u" && Reflect, le = _.apply, ue = _.construct;
74
+ h ||= function(e) {
75
+ return e;
76
+ }, g ||= function(e) {
77
+ return e;
78
+ }, le ||= function(e, t) {
79
+ var n = [...arguments].slice(2);
80
+ return e.apply(t, n);
81
+ }, ue ||= function(e) {
82
+ return new e(...[...arguments].slice(1));
83
+ };
84
+ var de = x(Array.prototype.forEach), fe = x(Array.prototype.lastIndexOf), pe = x(Array.prototype.pop), me = x(Array.prototype.push), he = x(Array.prototype.splice), ge = Array.isArray, _e = x(String.prototype.toLowerCase), ve = x(String.prototype.toString), ye = x(String.prototype.match), be = x(String.prototype.replace), xe = x(String.prototype.indexOf), Se = x(String.prototype.trim), Ce = x(Number.prototype.toString), we = x(Boolean.prototype.toString), v = typeof BigInt > "u" ? null : x(BigInt.prototype.toString), Te = typeof Symbol > "u" ? null : x(Symbol.prototype.toString), y = x(Object.prototype.hasOwnProperty), Ee = x(Object.prototype.toString), b = x(RegExp.prototype.test), De = Oe(TypeError);
85
+ function x(e) {
86
+ return function(t) {
87
+ t instanceof RegExp && (t.lastIndex = 0);
88
+ var n = [...arguments].slice(1);
89
+ return le(e, t, n);
90
+ };
91
+ }
92
+ function Oe(e) {
93
+ return function() {
94
+ return ue(e, [...arguments]);
95
+ };
96
+ }
97
+ function S(e, t) {
98
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _e;
99
+ if (se && se(e, null), !ge(t)) return e;
100
+ let r = t.length;
101
+ for (; r--;) {
102
+ let i = t[r];
103
+ if (typeof i == "string") {
104
+ let e = n(i);
105
+ e !== i && (f(t) || (t[r] = e), i = e);
106
+ }
107
+ e[i] = !0;
108
+ }
109
+ return e;
110
+ }
111
+ function ke(e) {
112
+ for (let t = 0; t < e.length; t++) y(e, t) || (e[t] = null);
113
+ return e;
114
+ }
115
+ function C(e) {
116
+ let t = ce(null);
117
+ for (let r of oe(e)) {
118
+ var n = ie(r, 2);
119
+ let i = n[0], a = n[1];
120
+ y(e, i) && (ge(a) ? t[i] = ke(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = C(a) : t[i] = a);
121
+ }
122
+ return t;
123
+ }
124
+ function Ae(e) {
125
+ switch (typeof e) {
126
+ case "string": return e;
127
+ case "number": return Ce(e);
128
+ case "boolean": return we(e);
129
+ case "bigint": return v ? v(e) : "0";
130
+ case "symbol": return Te ? Te(e) : "Symbol()";
131
+ case "undefined": return Ee(e);
132
+ case "function":
133
+ case "object": {
134
+ if (e === null) return Ee(e);
135
+ let t = e, n = w(t, "toString");
136
+ if (typeof n == "function") {
137
+ let e = n(t);
138
+ return typeof e == "string" ? e : Ee(e);
139
+ }
140
+ return Ee(e);
141
+ }
142
+ default: return Ee(e);
143
+ }
144
+ }
145
+ function w(e, t) {
146
+ for (; e !== null;) {
147
+ let n = m(e, t);
148
+ if (n) {
149
+ if (n.get) return x(n.get);
150
+ if (typeof n.value == "function") return x(n.value);
151
+ }
152
+ e = p(e);
153
+ }
154
+ function n() {
155
+ return null;
156
+ }
157
+ return n;
158
+ }
159
+ function je(e) {
160
+ try {
161
+ return b(e, ""), !0;
162
+ } catch {
163
+ return !1;
164
+ }
165
+ }
166
+ var Me = h(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ne = h(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Pe = h([
167
+ "feBlend",
168
+ "feColorMatrix",
169
+ "feComponentTransfer",
170
+ "feComposite",
171
+ "feConvolveMatrix",
172
+ "feDiffuseLighting",
173
+ "feDisplacementMap",
174
+ "feDistantLight",
175
+ "feDropShadow",
176
+ "feFlood",
177
+ "feFuncA",
178
+ "feFuncB",
179
+ "feFuncG",
180
+ "feFuncR",
181
+ "feGaussianBlur",
182
+ "feImage",
183
+ "feMerge",
184
+ "feMergeNode",
185
+ "feMorphology",
186
+ "feOffset",
187
+ "fePointLight",
188
+ "feSpecularLighting",
189
+ "feSpotLight",
190
+ "feTile",
191
+ "feTurbulence"
192
+ ]), Fe = h([
193
+ "animate",
194
+ "color-profile",
195
+ "cursor",
196
+ "discard",
197
+ "font-face",
198
+ "font-face-format",
199
+ "font-face-name",
200
+ "font-face-src",
201
+ "font-face-uri",
202
+ "foreignobject",
203
+ "hatch",
204
+ "hatchpath",
205
+ "mesh",
206
+ "meshgradient",
207
+ "meshpatch",
208
+ "meshrow",
209
+ "missing-glyph",
210
+ "script",
211
+ "set",
212
+ "solidcolor",
213
+ "unknown",
214
+ "use"
215
+ ]), Ie = h(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Le = h([
216
+ "maction",
217
+ "maligngroup",
218
+ "malignmark",
219
+ "mlongdiv",
220
+ "mscarries",
221
+ "mscarry",
222
+ "msgroup",
223
+ "mstack",
224
+ "msline",
225
+ "msrow",
226
+ "semantics",
227
+ "annotation",
228
+ "annotation-xml",
229
+ "mprescripts",
230
+ "none"
231
+ ]), Re = h(["#text"]), ze = h(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Be = h(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ve = h(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), He = h([
232
+ "xlink:href",
233
+ "xml:id",
234
+ "xlink:title",
235
+ "xml:space",
236
+ "xmlns:xlink"
237
+ ]), Ue = g(/{{[\w\W]*|^[\w\W]*}}/g), We = g(/<%[\w\W]*|^[\w\W]*%>/g), Ge = g(/\${[\w\W]*/g), Ke = g(/^data-[\-\w.\u00B7-\uFFFF]+$/), qe = g(/^aria-[\-\w]+$/), Je = g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ye = g(/^(?:\w+script|data):/i), Xe = g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ze = g(/^html$/i), Qe = g(/^[a-z][.\w]*(-[.\w]+)+$/i), $e = g(/<[/\w!]/g), et = g(/<[/\w]/g), tt = g(/<\/no(script|embed|frames)/i), nt = g(/\/>/i), T = {
238
+ element: 1,
239
+ attribute: 2,
240
+ text: 3,
241
+ cdataSection: 4,
242
+ entityReference: 5,
243
+ entityNode: 6,
244
+ processingInstruction: 7,
245
+ comment: 8,
246
+ document: 9,
247
+ documentType: 10,
248
+ documentFragment: 11,
249
+ notation: 12
250
+ }, rt = function() {
251
+ return typeof window > "u" ? null : window;
252
+ }, it = function(e, t) {
253
+ if (typeof e != "object" || typeof e.createPolicy != "function") return null;
254
+ let n = null, r = "data-tt-policy-suffix";
255
+ t && t.hasAttribute(r) && (n = t.getAttribute(r));
256
+ let i = "dompurify" + (n ? "#" + n : "");
257
+ try {
258
+ return e.createPolicy(i, {
259
+ createHTML(e) {
260
+ return e;
261
+ },
262
+ createScriptURL(e) {
263
+ return e;
264
+ }
265
+ });
266
+ } catch {
267
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
268
+ }
269
+ }, at = function() {
270
+ return {
271
+ afterSanitizeAttributes: [],
272
+ afterSanitizeElements: [],
273
+ afterSanitizeShadowDOM: [],
274
+ beforeSanitizeAttributes: [],
275
+ beforeSanitizeElements: [],
276
+ beforeSanitizeShadowDOM: [],
277
+ uponSanitizeAttribute: [],
278
+ uponSanitizeElement: [],
279
+ uponSanitizeShadowNode: []
280
+ };
281
+ }, E = function(e, t, n, r) {
282
+ return y(e, t) && ge(e[t]) ? S(r.base ? C(r.base) : {}, e[t], r.transform) : n;
283
+ };
284
+ function ot() {
285
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rt(), t = (e) => ot(e);
286
+ if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== T.document || !e.Element) return t.isSupported = !1, t;
287
+ let n = e.document, r = n, i = r.currentScript;
288
+ e.DocumentFragment;
289
+ let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
290
+ e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
291
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, ee = w(d, "cloneNode"), te = w(d, "remove"), ne = w(d, "nextSibling"), re = w(d, "childNodes"), ie = w(d, "parentNode"), ae = w(d, "shadowRoot"), se = w(d, "attributes"), f = o && o.prototype ? w(o.prototype, "nodeType") : null, p = o && o.prototype ? w(o.prototype, "nodeName") : null;
292
+ if (typeof a == "function") {
293
+ let e = n.createElement("template");
294
+ e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
295
+ }
296
+ let m, _ = "", le, ue = !1, Ce = 0, we = function() {
297
+ if (Ce > 0) throw De("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
298
+ }, v = function(e) {
299
+ we(), Ce++;
300
+ try {
301
+ return m.createHTML(e);
302
+ } finally {
303
+ Ce--;
304
+ }
305
+ }, Te = function(e) {
306
+ we(), Ce++;
307
+ try {
308
+ return m.createScriptURL(e);
309
+ } finally {
310
+ Ce--;
311
+ }
312
+ }, Ee = function() {
313
+ return ue ||= (le = it(u, i), !0), le;
314
+ }, x = n, Oe = x.implementation, ke = x.createNodeIterator, st = x.createDocumentFragment, ct = x.getElementsByTagName, D = r.importNode, O = at();
315
+ t.isSupported = typeof oe == "function" && typeof ie == "function" && Oe && Oe.createHTMLDocument !== void 0;
316
+ let k = Ue, lt = We, A = Ge, ut = Ke, j = qe, dt = Ye, ft = Xe, pt = Qe, mt = Je, M = null, ht = S({}, [
317
+ ...Me,
318
+ ...Ne,
319
+ ...Pe,
320
+ ...Ie,
321
+ ...Re
322
+ ]), N = null, gt = S({}, [
323
+ ...ze,
324
+ ...Be,
325
+ ...Ve,
326
+ ...He
327
+ ]), P = Object.seal(ce(null, {
328
+ tagNameCheck: {
329
+ writable: !0,
330
+ configurable: !1,
331
+ enumerable: !0,
332
+ value: null
333
+ },
334
+ attributeNameCheck: {
335
+ writable: !0,
336
+ configurable: !1,
337
+ enumerable: !0,
338
+ value: null
339
+ },
340
+ allowCustomizedBuiltInElements: {
341
+ writable: !0,
342
+ configurable: !1,
343
+ enumerable: !0,
344
+ value: !1
345
+ }
346
+ })), _t = null, vt = null, F = Object.seal(ce(null, {
347
+ tagCheck: {
348
+ writable: !0,
349
+ configurable: !1,
350
+ enumerable: !0,
351
+ value: null
352
+ },
353
+ attributeCheck: {
354
+ writable: !0,
355
+ configurable: !1,
356
+ enumerable: !0,
357
+ value: null
358
+ }
359
+ })), yt = !0, bt = !0, xt = !1, St = !0, I = !1, Ct = !0, L = !1, wt = !1, Tt = null, Et = null, Dt = !1, Ot = !1, kt = !1, At = !1, R = !0, jt = !1, Mt = "user-content-", Nt = !0, Pt = !1, Ft = {}, z = null, It = S({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Lt = null, Rt = S({}, [
360
+ "audio",
361
+ "video",
362
+ "img",
363
+ "source",
364
+ "image",
365
+ "track"
366
+ ]), zt = null, Bt = S({}, [
367
+ "alt",
368
+ "class",
369
+ "for",
370
+ "id",
371
+ "label",
372
+ "name",
373
+ "pattern",
374
+ "placeholder",
375
+ "role",
376
+ "summary",
377
+ "title",
378
+ "value",
379
+ "style",
380
+ "xmlns"
381
+ ]), Vt = "http://www.w3.org/1998/Math/MathML", Ht = "http://www.w3.org/2000/svg", B = "http://www.w3.org/1999/xhtml", Ut = B, Wt = !1, Gt = null, Kt = S({}, [
382
+ Vt,
383
+ Ht,
384
+ B
385
+ ], ve), qt = h([
386
+ "mi",
387
+ "mo",
388
+ "mn",
389
+ "ms",
390
+ "mtext"
391
+ ]), Jt = S({}, qt), Yt = h(["annotation-xml"]), Xt = S({}, Yt), Zt = S({}, [
392
+ "title",
393
+ "style",
394
+ "font",
395
+ "a",
396
+ "script"
397
+ ]), Qt = null, $t = ["application/xhtml+xml", "text/html"], V = null, H = null, en = n.createElement("form"), tn = function(e) {
398
+ return e instanceof RegExp || e instanceof Function;
399
+ }, nn = function() {
400
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
401
+ if (H && H === e) return;
402
+ (!e || typeof e != "object") && (e = {}), e = C(e), Qt = $t.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, V = Qt === "application/xhtml+xml" ? ve : _e, M = E(e, "ALLOWED_TAGS", ht, { transform: V }), N = E(e, "ALLOWED_ATTR", gt, { transform: V }), Gt = E(e, "ALLOWED_NAMESPACES", Kt, { transform: ve }), zt = E(e, "ADD_URI_SAFE_ATTR", Bt, {
403
+ transform: V,
404
+ base: Bt
405
+ }), Lt = E(e, "ADD_DATA_URI_TAGS", Rt, {
406
+ transform: V,
407
+ base: Rt
408
+ }), z = E(e, "FORBID_CONTENTS", It, { transform: V }), _t = E(e, "FORBID_TAGS", C({}), { transform: V }), vt = E(e, "FORBID_ATTR", C({}), { transform: V }), Ft = y(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? C(e.USE_PROFILES) : e.USE_PROFILES : !1, yt = e.ALLOW_ARIA_ATTR !== !1, bt = e.ALLOW_DATA_ATTR !== !1, xt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, St = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, I = e.SAFE_FOR_TEMPLATES || !1, Ct = e.SAFE_FOR_XML !== !1, L = e.WHOLE_DOCUMENT || !1, Ot = e.RETURN_DOM || !1, kt = e.RETURN_DOM_FRAGMENT || !1, At = e.RETURN_TRUSTED_TYPE || !1, Dt = e.FORCE_BODY || !1, R = e.SANITIZE_DOM !== !1, jt = e.SANITIZE_NAMED_PROPS || !1, Nt = e.KEEP_CONTENT !== !1, Pt = e.IN_PLACE || !1, mt = je(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Je, Ut = typeof e.NAMESPACE == "string" ? e.NAMESPACE : B, Jt = y(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? C(e.MATHML_TEXT_INTEGRATION_POINTS) : S({}, qt), Xt = y(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? C(e.HTML_INTEGRATION_POINTS) : S({}, Yt);
409
+ let t = y(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? C(e.CUSTOM_ELEMENT_HANDLING) : ce(null);
410
+ if (P = ce(null), y(t, "tagNameCheck") && tn(t.tagNameCheck) && (P.tagNameCheck = t.tagNameCheck), y(t, "attributeNameCheck") && tn(t.attributeNameCheck) && (P.attributeNameCheck = t.attributeNameCheck), y(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), g(P), I && (bt = !1), kt && (Ot = !0), Ft && (M = S({}, Re), N = ce(null), Ft.html === !0 && (S(M, Me), S(N, ze)), Ft.svg === !0 && (S(M, Ne), S(N, Be), S(N, He)), Ft.svgFilters === !0 && (S(M, Pe), S(N, Be), S(N, He)), Ft.mathMl === !0 && (S(M, Ie), S(N, Ve), S(N, He))), F.tagCheck = null, F.attributeCheck = null, y(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? F.tagCheck = e.ADD_TAGS : ge(e.ADD_TAGS) && (M === ht && (M = C(M)), S(M, e.ADD_TAGS, V))), y(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? F.attributeCheck = e.ADD_ATTR : ge(e.ADD_ATTR) && (N === gt && (N = C(N)), S(N, e.ADD_ATTR, V))), y(e, "ADD_URI_SAFE_ATTR") && ge(e.ADD_URI_SAFE_ATTR) && S(zt, e.ADD_URI_SAFE_ATTR, V), y(e, "FORBID_CONTENTS") && ge(e.FORBID_CONTENTS) && (z === It && (z = C(z)), S(z, e.FORBID_CONTENTS, V)), y(e, "ADD_FORBID_CONTENTS") && ge(e.ADD_FORBID_CONTENTS) && (z === It && (z = C(z)), S(z, e.ADD_FORBID_CONTENTS, V)), Nt && (M["#text"] = !0), L && S(M, [
411
+ "html",
412
+ "head",
413
+ "body"
414
+ ]), M.table && (S(M, ["tbody"]), delete _t.tbody), e.TRUSTED_TYPES_POLICY) {
415
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
416
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
417
+ let t = m;
418
+ m = e.TRUSTED_TYPES_POLICY;
419
+ try {
420
+ _ = v("");
421
+ } catch (e) {
422
+ throw m = t, e;
423
+ }
424
+ } else e.TRUSTED_TYPES_POLICY === null ? (m = void 0, _ = "") : (m === void 0 && (m = Ee()), m && typeof _ == "string" && (_ = v("")));
425
+ h && h(e), H = e;
426
+ }, rn = S({}, [
427
+ ...Ne,
428
+ ...Pe,
429
+ ...Fe
430
+ ]), an = S({}, [...Ie, ...Le]), on = function(e, t, n) {
431
+ return t.namespaceURI === B ? e === "svg" : t.namespaceURI === Vt ? e === "svg" && (n === "annotation-xml" || Jt[n]) : !!rn[e];
432
+ }, sn = function(e, t, n) {
433
+ return t.namespaceURI === B ? e === "math" : t.namespaceURI === Ht ? e === "math" && Xt[n] : !!an[e];
434
+ }, U = function(e, t, n) {
435
+ return t.namespaceURI === Ht && !Xt[n] || t.namespaceURI === Vt && !Jt[n] ? !1 : !an[e] && (Zt[e] || !rn[e]);
436
+ }, cn = function(e) {
437
+ let t = ie(e);
438
+ (!t || !t.tagName) && (t = {
439
+ namespaceURI: Ut,
440
+ tagName: "template"
441
+ });
442
+ let n = _e(e.tagName), r = _e(t.tagName);
443
+ return Gt[e.namespaceURI] ? e.namespaceURI === Ht ? on(n, t, r) : e.namespaceURI === Vt ? sn(n, t, r) : e.namespaceURI === B ? U(n, t, r) : !!(Qt === "application/xhtml+xml" && Gt[e.namespaceURI]) : !1;
444
+ }, W = function(e) {
445
+ me(t.removed, { element: e });
446
+ try {
447
+ ie(e).removeChild(e);
448
+ } catch {
449
+ if (te(e), !ie(e)) throw De("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
450
+ }
451
+ }, G = function(e) {
452
+ let t = re(e);
453
+ if (t) {
454
+ let e = [];
455
+ de(t, (t) => {
456
+ me(e, t);
457
+ }), de(e, (e) => {
458
+ try {
459
+ te(e);
460
+ } catch {}
461
+ });
462
+ }
463
+ let n = se(e);
464
+ if (n) for (let t = n.length - 1; t >= 0; --t) {
465
+ let r = n[t], i = r && r.name;
466
+ if (typeof i == "string") try {
467
+ e.removeAttribute(i);
468
+ } catch {}
469
+ }
470
+ }, K = function(e, n) {
471
+ try {
472
+ me(t.removed, {
473
+ attribute: n.getAttributeNode(e),
474
+ from: n
475
+ });
476
+ } catch {
477
+ me(t.removed, {
478
+ attribute: null,
479
+ from: n
480
+ });
481
+ }
482
+ if (n.removeAttribute(e), e === "is") if (Ot || kt) try {
483
+ W(n);
484
+ } catch {}
485
+ else try {
486
+ n.setAttribute(e, "");
487
+ } catch {}
488
+ }, ln = function(e) {
489
+ let t = se(e);
490
+ if (t) for (let n = t.length - 1; n >= 0; --n) {
491
+ let r = t[n], i = r && r.name;
492
+ if (!(typeof i != "string" || N[V(i)])) try {
493
+ e.removeAttribute(i);
494
+ } catch {}
495
+ }
496
+ }, un = function(e) {
497
+ let t = [e];
498
+ for (; t.length > 0;) {
499
+ let e = t.pop();
500
+ (f ? f(e) : e.nodeType) === T.element && ln(e);
501
+ let n = re(e);
502
+ if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
503
+ }
504
+ }, dn = function(e) {
505
+ let t = null, r = null;
506
+ if (Dt) e = "<remove></remove>" + e;
507
+ else {
508
+ let t = ye(e, /^[\r\n\t ]+/);
509
+ r = t && t[0];
510
+ }
511
+ Qt === "application/xhtml+xml" && Ut === B && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
512
+ let i = m ? v(e) : e;
513
+ if (Ut === B) try {
514
+ t = new l().parseFromString(i, Qt);
515
+ } catch {}
516
+ if (!t || !t.documentElement) {
517
+ t = Oe.createDocument(Ut, "template", null);
518
+ try {
519
+ t.documentElement.innerHTML = Wt ? _ : i;
520
+ } catch {}
521
+ }
522
+ let a = t.body || t.documentElement;
523
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ut === B ? ct.call(t, L ? "html" : "body")[0] : L ? t.documentElement : a;
524
+ }, fn = function(e) {
525
+ return ke.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
526
+ }, pn = function(e) {
527
+ return e = be(e, k, " "), e = be(e, lt, " "), e = be(e, A, " "), e;
528
+ }, q = function(e) {
529
+ e.normalize();
530
+ let t = ke.call(e.ownerDocument || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
531
+ for (; n;) n.data = pn(n.data), n = t.nextNode();
532
+ let r = e.querySelectorAll?.call(e, "template");
533
+ r && de(r, (e) => {
534
+ Y(e.content) && q(e.content);
535
+ });
536
+ }, J = function(e) {
537
+ let t = p ? p(e) : null;
538
+ return typeof t != "string" || V(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== se(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== f(e) || e.childNodes !== re(e);
539
+ }, Y = function(e) {
540
+ if (!f || typeof e != "object" || !e) return !1;
541
+ try {
542
+ return f(e) === T.documentFragment;
543
+ } catch {
544
+ return !1;
545
+ }
546
+ }, X = function(e) {
547
+ if (!f || typeof e != "object" || !e) return !1;
548
+ try {
549
+ return typeof f(e) == "number";
550
+ } catch {
551
+ return !1;
552
+ }
553
+ };
554
+ function Z(e, n, r) {
555
+ e.length !== 0 && de(e, (e) => {
556
+ e.call(t, n, r, H);
557
+ });
558
+ }
559
+ let mn = function(e, t) {
560
+ return !!(Ct && e.hasChildNodes() && !X(e.firstElementChild) && b($e, e.textContent) && b($e, e.innerHTML) || Ct && e.namespaceURI === B && t === "style" && X(e.firstElementChild) || e.nodeType === T.processingInstruction || Ct && e.nodeType === T.comment && b(et, e.data));
561
+ }, Q = function(e, t) {
562
+ if (!_t[t] && vn(t) && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, t) || P.tagNameCheck instanceof Function && P.tagNameCheck(t))) return !1;
563
+ if (Nt && !z[t]) {
564
+ let t = ie(e), n = re(e);
565
+ if (n && t) {
566
+ let r = n.length;
567
+ for (let i = r - 1; i >= 0; --i) {
568
+ let r = Pt ? n[i] : ee(n[i], !0);
569
+ t.insertBefore(r, ne(e));
570
+ }
571
+ }
572
+ }
573
+ return W(e), !0;
574
+ }, hn = function(e) {
575
+ if (Z(O.beforeSanitizeElements, e, null), J(e)) return W(e), !0;
576
+ let n = V(p ? p(e) : e.nodeName);
577
+ if (Z(O.uponSanitizeElement, e, {
578
+ tagName: n,
579
+ allowedTags: M
580
+ }), mn(e, n)) return W(e), !0;
581
+ if (_t[n] || !(F.tagCheck instanceof Function && F.tagCheck(n)) && !M[n]) return Q(e, n);
582
+ if ((f ? f(e) : e.nodeType) === T.element && !cn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && b(tt, e.innerHTML)) return W(e), !0;
583
+ if (I && e.nodeType === T.text) {
584
+ let n = pn(e.textContent);
585
+ e.textContent !== n && (me(t.removed, { element: e.cloneNode() }), e.textContent = n);
586
+ }
587
+ return Z(O.afterSanitizeElements, e, null), !1;
588
+ }, gn = function(e, t, r) {
589
+ if (vt[t] || R && (t === "id" || t === "name") && (r in n || r in en)) return !1;
590
+ let i = N[t] || F.attributeCheck instanceof Function && F.attributeCheck(t, e);
591
+ if (!(bt && b(ut, t)) && !(yt && b(j, t))) {
592
+ if (!i) {
593
+ if (!(vn(e) && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, e) || P.tagNameCheck instanceof Function && P.tagNameCheck(e)) && (P.attributeNameCheck instanceof RegExp && b(P.attributeNameCheck, t) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(t, e)) || t === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, r) || P.tagNameCheck instanceof Function && P.tagNameCheck(r)))) return !1;
594
+ } else if (!zt[t] && !b(mt, be(r, ft, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && xe(r, "data:") === 0 && Lt[e]) && !(xt && !b(dt, be(r, ft, ""))) && r) return !1;
595
+ }
596
+ return !0;
597
+ }, _n = S({}, [
598
+ "annotation-xml",
599
+ "color-profile",
600
+ "font-face",
601
+ "font-face-format",
602
+ "font-face-name",
603
+ "font-face-src",
604
+ "font-face-uri",
605
+ "missing-glyph"
606
+ ]), vn = function(e) {
607
+ return !_n[_e(e)] && b(pt, e);
608
+ }, yn = function(e, t, n, r) {
609
+ if (m && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
610
+ case "TrustedHTML": return v(r);
611
+ case "TrustedScriptURL": return Te(r);
612
+ }
613
+ return r;
614
+ }, bn = function(e, n, r, i) {
615
+ try {
616
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), J(e) ? W(e) : pe(t.removed);
617
+ } catch {
618
+ K(n, e);
619
+ }
620
+ }, xn = function(e) {
621
+ Z(O.beforeSanitizeAttributes, e, null);
622
+ let t = e.attributes;
623
+ if (!t || J(e)) return;
624
+ let n = {
625
+ attrName: "",
626
+ attrValue: "",
627
+ keepAttr: !0,
628
+ allowedAttributes: N,
629
+ forceKeepAttr: void 0
630
+ }, r = t.length, i = V(e.nodeName);
631
+ for (; r--;) {
632
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = V(o), u = c, d = o === "value" ? u : Se(u);
633
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, Z(O.uponSanitizeAttribute, e, n), d = n.attrValue, jt && (l === "id" || l === "name") && xe(d, Mt) !== 0 && (K(o, e), d = Mt + d), Ct && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
634
+ K(o, e);
635
+ continue;
636
+ }
637
+ if (l === "attributename" && ye(d, "href")) {
638
+ K(o, e);
639
+ continue;
640
+ }
641
+ if (!n.forceKeepAttr) {
642
+ if (!n.keepAttr) {
643
+ K(o, e);
644
+ continue;
645
+ }
646
+ if (!St && b(nt, d)) {
647
+ K(o, e);
648
+ continue;
649
+ }
650
+ if (I && (d = pn(d)), !gn(i, l, d)) {
651
+ K(o, e);
652
+ continue;
653
+ }
654
+ d = yn(i, l, s, d), d !== u && bn(e, o, s, d);
655
+ }
656
+ }
657
+ Z(O.afterSanitizeAttributes, e, null);
658
+ }, Sn = function(e) {
659
+ let t = null, n = fn(e);
660
+ for (Z(O.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Z(O.uponSanitizeShadowNode, t, null), hn(t), xn(t), Y(t.content) && Sn(t.content), (f ? f(t) : t.nodeType) === T.element) {
661
+ let e = ae(t);
662
+ Y(e) && (Cn(e), Sn(e));
663
+ }
664
+ Z(O.afterSanitizeShadowDOM, e, null);
665
+ }, Cn = function(e) {
666
+ let t = [{
667
+ node: e,
668
+ shadow: null
669
+ }];
670
+ for (; t.length > 0;) {
671
+ let e = t.pop();
672
+ if (e.shadow) {
673
+ Sn(e.shadow);
674
+ continue;
675
+ }
676
+ let n = e.node, r = (f ? f(n) : n.nodeType) === T.element, i = re(n);
677
+ if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
678
+ node: i[e],
679
+ shadow: null
680
+ });
681
+ if (r) {
682
+ let e = p ? p(n) : null;
683
+ if (typeof e == "string" && V(e) === "template") {
684
+ let e = n.content;
685
+ Y(e) && t.push({
686
+ node: e,
687
+ shadow: null
688
+ });
689
+ }
690
+ }
691
+ if (r) {
692
+ let e = ae(n);
693
+ Y(e) && t.push({
694
+ node: null,
695
+ shadow: e
696
+ }, {
697
+ node: e,
698
+ shadow: null
699
+ });
700
+ }
701
+ }
702
+ };
703
+ return t.sanitize = function(e) {
704
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
705
+ if (Wt = !e, Wt && (e = "<!-->"), typeof e != "string" && !X(e) && (e = Ae(e), typeof e != "string")) throw De("dirty is not a string, aborting");
706
+ if (!t.isSupported) return e;
707
+ wt ? (M = Tt, N = Et) : nn(n), (O.uponSanitizeElement.length > 0 || O.uponSanitizeAttribute.length > 0) && (M = C(M)), O.uponSanitizeAttribute.length > 0 && (N = C(N)), t.removed = [];
708
+ let c = Pt && typeof e != "string" && X(e);
709
+ if (c) {
710
+ let t = p ? p(e) : e.nodeName;
711
+ if (typeof t == "string") {
712
+ let e = V(t);
713
+ if (!M[e] || _t[e]) throw De("root node is forbidden and cannot be sanitized in-place");
714
+ }
715
+ if (J(e)) throw De("root node is clobbered and cannot be sanitized in-place");
716
+ try {
717
+ Cn(e);
718
+ } catch (t) {
719
+ throw G(e), t;
720
+ }
721
+ } else if (X(e)) i = dn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === T.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Cn(a);
722
+ else {
723
+ if (!Ot && !I && !L && e.indexOf("<") === -1) return m && At ? v(e) : e;
724
+ if (i = dn(e), !i) return Ot ? null : At ? _ : "";
725
+ }
726
+ i && Dt && W(i.firstChild);
727
+ let l = fn(c ? e : i);
728
+ try {
729
+ for (; o = l.nextNode();) hn(o), xn(o), Y(o.content) && Sn(o.content);
730
+ } catch (t) {
731
+ throw c && G(e), t;
732
+ }
733
+ if (c) return de(t.removed, (e) => {
734
+ e.element && un(e.element);
735
+ }), I && q(e), e;
736
+ if (Ot) {
737
+ if (I && q(i), kt) for (s = st.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
738
+ else s = i;
739
+ return (N.shadowroot || N.shadowrootmode) && (s = D.call(r, s, !0)), s;
740
+ }
741
+ let u = L ? i.outerHTML : i.innerHTML;
742
+ return L && M["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && b(Ze, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), I && (u = pn(u)), m && At ? v(u) : u;
743
+ }, t.setConfig = function() {
744
+ nn(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), wt = !0, Tt = M, Et = N;
745
+ }, t.clearConfig = function() {
746
+ H = null, wt = !1, Tt = null, Et = null, m = le, _ = "";
747
+ }, t.isValidAttribute = function(e, t, n) {
748
+ return H || nn({}), gn(V(e), V(t), n);
749
+ }, t.addHook = function(e, t) {
750
+ typeof t == "function" && y(O, e) && me(O[e], t);
751
+ }, t.removeHook = function(e, t) {
752
+ if (y(O, e)) {
753
+ if (t !== void 0) {
754
+ let n = fe(O[e], t);
755
+ return n === -1 ? void 0 : he(O[e], n, 1)[0];
756
+ }
757
+ return pe(O[e]);
758
+ }
759
+ }, t.removeHooks = function(e) {
760
+ y(O, e) && (O[e] = []);
761
+ }, t.removeAllHooks = function() {
762
+ O = at();
763
+ }, t;
764
+ }
765
+ var st = ot();
766
+ //#endregion
767
+ //#region node_modules/marked/lib/marked.esm.js
768
+ function ct() {
769
+ return {
770
+ async: !1,
771
+ breaks: !1,
772
+ extensions: null,
773
+ gfm: !0,
774
+ hooks: null,
775
+ pedantic: !1,
776
+ renderer: null,
777
+ silent: !1,
778
+ tokenizer: null,
779
+ walkTokens: null
780
+ };
781
+ }
782
+ var D = ct();
783
+ function O(e) {
784
+ D = e;
785
+ }
786
+ var k = { exec: () => null };
787
+ function lt(e) {
788
+ let t = [];
789
+ return (n) => {
790
+ let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
791
+ return i || (i = e(r), t[r] = i), i;
792
+ };
793
+ }
794
+ function A(e, t = "") {
795
+ let n = typeof e == "string" ? e : e.source, r = {
796
+ replace: (e, t) => {
797
+ let i = typeof t == "string" ? t : t.source;
798
+ return i = i.replace(j.caret, "$1"), n = n.replace(e, i), r;
799
+ },
800
+ getRegex: () => new RegExp(n, t)
801
+ };
802
+ return r;
803
+ }
804
+ var ut = ((e = "") => {
805
+ try {
806
+ return !!RegExp("(?<=1)(?<!1)" + e);
807
+ } catch {
808
+ return !1;
809
+ }
810
+ })(), j = {
811
+ codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
812
+ outputLinkReplace: /\\([\[\]])/g,
813
+ indentCodeCompensation: /^(\s+)(?:```)/,
814
+ beginningSpace: /^\s+/,
815
+ endingHash: /#$/,
816
+ startingSpaceChar: /^ /,
817
+ endingSpaceChar: / $/,
818
+ nonSpaceChar: /[^ ]/,
819
+ newLineCharGlobal: /\n/g,
820
+ tabCharGlobal: /\t/g,
821
+ multipleSpaceGlobal: /\s+/g,
822
+ blankLine: /^[ \t]*$/,
823
+ doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
824
+ blockquoteStart: /^ {0,3}>/,
825
+ blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
826
+ blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
827
+ listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
828
+ listIsTask: /^\[[ xX]\] +\S/,
829
+ listReplaceTask: /^\[[ xX]\] +/,
830
+ listTaskCheckbox: /\[[ xX]\]/,
831
+ anyLine: /\n.*\n/,
832
+ hrefBrackets: /^<(.*)>$/,
833
+ tableDelimiter: /[:|]/,
834
+ tableAlignChars: /^\||\| *$/g,
835
+ tableRowBlankLine: /\n[ \t]*$/,
836
+ tableAlignRight: /^ *-+: *$/,
837
+ tableAlignCenter: /^ *:-+: *$/,
838
+ tableAlignLeft: /^ *:-+ *$/,
839
+ startATag: /^<a /i,
840
+ endATag: /^<\/a>/i,
841
+ startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
842
+ endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
843
+ startAngleBracket: /^</,
844
+ endAngleBracket: />$/,
845
+ pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
846
+ unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
847
+ escapeTest: /[&<>"']/,
848
+ escapeReplace: /[&<>"']/g,
849
+ escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
850
+ escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
851
+ caret: /(^|[^\[])\^/g,
852
+ percentDecode: /%25/g,
853
+ findPipe: /\|/g,
854
+ splitPipe: / \|/,
855
+ slashPipe: /\\\|/g,
856
+ carriageReturn: /\r\n|\r/g,
857
+ spaceLine: /^ +$/gm,
858
+ notSpaceStart: /^\S*/,
859
+ endingNewline: /\n$/,
860
+ listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
861
+ nextBulletRegex: lt((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
862
+ hrRegex: lt((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
863
+ fencesBeginRegex: lt((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
864
+ headingBeginRegex: lt((e) => RegExp(`^ {0,${e}}#`)),
865
+ htmlBeginRegex: lt((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
866
+ blockquoteBeginRegex: lt((e) => RegExp(`^ {0,${e}}>`))
867
+ }, dt = /^(?:[ \t]*(?:\n|$))+/, ft = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, pt = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, mt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, M = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ht = / {0,3}(?:[*+-]|\d{1,9}[.)])/, N = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, gt = A(N).replace(/bull/g, ht).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), P = A(N).replace(/bull/g, ht).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), _t = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, vt = /^[^\n]+/, F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, yt = A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), bt = A(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, ht).getRegex(), xt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", St = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, I = A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", St).replace("tag", xt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ct = A(_t).replace("hr", mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", xt).getRegex(), L = {
868
+ blockquote: A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ct).getRegex(),
869
+ code: ft,
870
+ def: yt,
871
+ fences: pt,
872
+ heading: M,
873
+ hr: mt,
874
+ html: I,
875
+ lheading: gt,
876
+ list: bt,
877
+ newline: dt,
878
+ paragraph: Ct,
879
+ table: k,
880
+ text: vt
881
+ }, wt = A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", xt).getRegex(), Tt = {
882
+ ...L,
883
+ lheading: P,
884
+ table: wt,
885
+ paragraph: A(_t).replace("hr", mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", wt).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", xt).getRegex()
886
+ }, Et = {
887
+ ...L,
888
+ html: A("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", St).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
889
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
890
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
891
+ fences: k,
892
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
893
+ paragraph: A(_t).replace("hr", mt).replace("heading", " *#{1,6} *[^\n]").replace("lheading", gt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
894
+ }, Dt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ot = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, kt = /^( {2,}|\\)\n(?!\s*$)/, At = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, R = /[\p{P}\p{S}]/u, jt = /[\s\p{P}\p{S}]/u, Mt = /[^\s\p{P}\p{S}]/u, Nt = A(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, jt).getRegex(), Pt = /(?!~)[\p{P}\p{S}]/u, Ft = /(?!~)[\s\p{P}\p{S}]/u, z = /(?:[^\s\p{P}\p{S}]|~)/u, It = A(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ut ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Lt = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rt = A(Lt, "u").replace(/punct/g, R).getRegex(), zt = A(Lt, "u").replace(/punct/g, Pt).getRegex(), Bt = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Vt = A(Bt, "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Ht = A(Bt, "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, Ft).replace(/punct/g, Pt).getRegex(), B = A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Ut = A(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, R).getRegex(), Wt = A("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Mt).replace(/punctSpace/g, jt).replace(/punct/g, R).getRegex(), Gt = A(/\\(punct)/, "gu").replace(/punct/g, R).getRegex(), Kt = A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), qt = A(St).replace("(?:-->|$)", "-->").getRegex(), Jt = A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", qt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Yt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Xt = A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Yt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Zt = A(/^!?\[(label)\]\[(ref)\]/).replace("label", Yt).replace("ref", F).getRegex(), Qt = A(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(), $t = A("reflink|nolink(?!\\()", "g").replace("reflink", Zt).replace("nolink", Qt).getRegex(), V = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, H = {
895
+ _backpedal: k,
896
+ anyPunctuation: Gt,
897
+ autolink: Kt,
898
+ blockSkip: It,
899
+ br: kt,
900
+ code: Ot,
901
+ del: k,
902
+ delLDelim: k,
903
+ delRDelim: k,
904
+ emStrongLDelim: Rt,
905
+ emStrongRDelimAst: Vt,
906
+ emStrongRDelimUnd: B,
907
+ escape: Dt,
908
+ link: Xt,
909
+ nolink: Qt,
910
+ punctuation: Nt,
911
+ reflink: Zt,
912
+ reflinkSearch: $t,
913
+ tag: Jt,
914
+ text: At,
915
+ url: k
916
+ }, en = {
917
+ ...H,
918
+ link: A(/^!?\[(label)\]\((.*?)\)/).replace("label", Yt).getRegex(),
919
+ reflink: A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Yt).getRegex()
920
+ }, tn = {
921
+ ...H,
922
+ emStrongRDelimAst: Ht,
923
+ emStrongLDelim: zt,
924
+ delLDelim: Ut,
925
+ delRDelim: Wt,
926
+ url: A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", V).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
927
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
928
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
929
+ text: A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", V).getRegex()
930
+ }, nn = {
931
+ ...tn,
932
+ br: A(kt).replace("{2,}", "*").getRegex(),
933
+ text: A(tn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
934
+ }, rn = {
935
+ normal: L,
936
+ gfm: Tt,
937
+ pedantic: Et
938
+ }, an = {
939
+ normal: H,
940
+ gfm: tn,
941
+ breaks: nn,
942
+ pedantic: en
943
+ }, on = {
944
+ "&": "&amp;",
945
+ "<": "&lt;",
946
+ ">": "&gt;",
947
+ "\"": "&quot;",
948
+ "'": "&#39;"
949
+ }, sn = (e) => on[e];
950
+ function U(e, t) {
951
+ if (t) {
952
+ if (j.escapeTest.test(e)) return e.replace(j.escapeReplace, sn);
953
+ } else if (j.escapeTestNoEncode.test(e)) return e.replace(j.escapeReplaceNoEncode, sn);
954
+ return e;
955
+ }
956
+ function cn(e) {
957
+ try {
958
+ e = encodeURI(e).replace(j.percentDecode, "%");
959
+ } catch {
960
+ return null;
961
+ }
962
+ return e;
963
+ }
964
+ function W(e, t) {
965
+ let n = e.replace(j.findPipe, (e, t, n) => {
966
+ let r = !1, i = t;
967
+ for (; --i >= 0 && n[i] === "\\";) r = !r;
968
+ return r ? "|" : " |";
969
+ }).split(j.splitPipe), r = 0;
970
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
971
+ else for (; n.length < t;) n.push("");
972
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(j.slashPipe, "|");
973
+ return n;
974
+ }
975
+ function G(e, t, n) {
976
+ let r = e.length;
977
+ if (r === 0) return "";
978
+ let i = 0;
979
+ for (; i < r;) {
980
+ let a = e.charAt(r - i - 1);
981
+ if (a === t && !n) i++;
982
+ else if (a !== t && n) i++;
983
+ else break;
984
+ }
985
+ return e.slice(0, r - i);
986
+ }
987
+ function K(e) {
988
+ let t = e.split("\n"), n = t.length - 1;
989
+ for (; n >= 0 && j.blankLine.test(t[n]);) n--;
990
+ return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
991
+ }
992
+ function ln(e, t) {
993
+ if (e.indexOf(t[1]) === -1) return -1;
994
+ let n = 0;
995
+ for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
996
+ else if (e[r] === t[0]) n++;
997
+ else if (e[r] === t[1] && (n--, n < 0)) return r;
998
+ return n > 0 ? -2 : -1;
999
+ }
1000
+ function un(e, t = 0) {
1001
+ let n = t, r = "";
1002
+ for (let t of e) if (t === " ") {
1003
+ let e = 4 - n % 4;
1004
+ r += " ".repeat(e), n += e;
1005
+ } else r += t, n++;
1006
+ return r;
1007
+ }
1008
+ function dn(e, t, n, r, i) {
1009
+ let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
1010
+ r.state.inLink = !0;
1011
+ let c = {
1012
+ type: e[0].charAt(0) === "!" ? "image" : "link",
1013
+ raw: n,
1014
+ href: a,
1015
+ title: o,
1016
+ text: s,
1017
+ tokens: r.inlineTokens(s)
1018
+ };
1019
+ return r.state.inLink = !1, c;
1020
+ }
1021
+ function fn(e, t, n) {
1022
+ let r = e.match(n.other.indentCodeCompensation);
1023
+ if (r === null) return t;
1024
+ let i = r[1];
1025
+ return t.split("\n").map((e) => {
1026
+ let t = e.match(n.other.beginningSpace);
1027
+ if (t === null) return e;
1028
+ let [r] = t;
1029
+ return r.length >= i.length ? e.slice(i.length) : e;
1030
+ }).join("\n");
1031
+ }
1032
+ var pn = class {
1033
+ options;
1034
+ rules;
1035
+ lexer;
1036
+ constructor(e) {
1037
+ this.options = e || D;
1038
+ }
1039
+ space(e) {
1040
+ let t = this.rules.block.newline.exec(e);
1041
+ if (t && t[0].length > 0) return {
1042
+ type: "space",
1043
+ raw: t[0]
1044
+ };
1045
+ }
1046
+ code(e) {
1047
+ let t = this.rules.block.code.exec(e);
1048
+ if (t) {
1049
+ let e = this.options.pedantic ? t[0] : K(t[0]);
1050
+ return {
1051
+ type: "code",
1052
+ raw: e,
1053
+ codeBlockStyle: "indented",
1054
+ text: e.replace(this.rules.other.codeRemoveIndent, "")
1055
+ };
1056
+ }
1057
+ }
1058
+ fences(e) {
1059
+ let t = this.rules.block.fences.exec(e);
1060
+ if (t) {
1061
+ let e = t[0], n = fn(e, t[3] || "", this.rules);
1062
+ return {
1063
+ type: "code",
1064
+ raw: e,
1065
+ lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
1066
+ text: n
1067
+ };
1068
+ }
1069
+ }
1070
+ heading(e) {
1071
+ let t = this.rules.block.heading.exec(e);
1072
+ if (t) {
1073
+ let e = t[2].trim();
1074
+ if (this.rules.other.endingHash.test(e)) {
1075
+ let t = G(e, "#");
1076
+ (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
1077
+ }
1078
+ return {
1079
+ type: "heading",
1080
+ raw: G(t[0], "\n"),
1081
+ depth: t[1].length,
1082
+ text: e,
1083
+ tokens: this.lexer.inline(e)
1084
+ };
1085
+ }
1086
+ }
1087
+ hr(e) {
1088
+ let t = this.rules.block.hr.exec(e);
1089
+ if (t) return {
1090
+ type: "hr",
1091
+ raw: G(t[0], "\n")
1092
+ };
1093
+ }
1094
+ blockquote(e) {
1095
+ let t = this.rules.block.blockquote.exec(e);
1096
+ if (t) {
1097
+ let e = G(t[0], "\n").split("\n"), n = "", r = "", i = [];
1098
+ for (; e.length > 0;) {
1099
+ let t = !1, a = [], o;
1100
+ for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1101
+ else if (!t) a.push(e[o]);
1102
+ else break;
1103
+ e = e.slice(o);
1104
+ let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1105
+ n = n ? `${n}
1106
+ ${s}` : s, r = r ? `${r}
1107
+ ${c}` : c;
1108
+ let l = this.lexer.state.top;
1109
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
1110
+ let u = i.at(-1);
1111
+ if (u?.type === "code") break;
1112
+ if (u?.type === "blockquote") {
1113
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
1114
+ i[i.length - 1] = o, n = n.substring(0, n.length - t.raw.length) + o.raw, r = r.substring(0, r.length - t.text.length) + o.text;
1115
+ break;
1116
+ } else if (u?.type === "list") {
1117
+ let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
1118
+ i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
1119
+ continue;
1120
+ }
1121
+ }
1122
+ return {
1123
+ type: "blockquote",
1124
+ raw: n,
1125
+ tokens: i,
1126
+ text: r
1127
+ };
1128
+ }
1129
+ }
1130
+ list(e) {
1131
+ let t = this.rules.block.list.exec(e);
1132
+ if (t) {
1133
+ let n = t[1].trim(), r = n.length > 1, i = {
1134
+ type: "list",
1135
+ raw: "",
1136
+ ordered: r,
1137
+ start: r ? +n.slice(0, -1) : "",
1138
+ loose: !1,
1139
+ items: []
1140
+ };
1141
+ n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1142
+ let a = this.rules.other.listItemRegex(n), o = !1;
1143
+ for (; e;) {
1144
+ let n = !1, r = "", s = "";
1145
+ if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1146
+ r = t[0], e = e.substring(r.length);
1147
+ let c = un(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
1148
+ if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
1149
+ let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), ee = this.rules.other.blockquoteBeginRegex(d);
1150
+ for (; e;) {
1151
+ let te = e.split("\n", 1)[0], ne;
1152
+ if (l = te, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), ne = l) : ne = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || ee.test(l) || t.test(l) || n.test(l)) break;
1153
+ if (ne.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ne.slice(d);
1154
+ else {
1155
+ if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
1156
+ s += "\n" + l;
1157
+ }
1158
+ u = !l.trim(), r += te + "\n", e = e.substring(te.length + 1), c = ne.slice(d);
1159
+ }
1160
+ }
1161
+ i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
1162
+ type: "list_item",
1163
+ raw: r,
1164
+ task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
1165
+ loose: !1,
1166
+ text: s,
1167
+ tokens: []
1168
+ }), i.raw += r;
1169
+ }
1170
+ let s = i.items.at(-1);
1171
+ if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1172
+ else return;
1173
+ i.raw = i.raw.trimEnd();
1174
+ for (let e of i.items) {
1175
+ this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []);
1176
+ let t = e.tokens[0];
1177
+ if (e.task && (t?.type === "text" || t?.type === "paragraph")) {
1178
+ e.text = e.text.replace(this.rules.other.listReplaceTask, ""), t.raw = t.raw.replace(this.rules.other.listReplaceTask, ""), t.text = t.text.replace(this.rules.other.listReplaceTask, "");
1179
+ for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
1180
+ this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
1181
+ break;
1182
+ }
1183
+ let n = this.rules.other.listTaskCheckbox.exec(e.raw);
1184
+ if (n) {
1185
+ let t = {
1186
+ type: "checkbox",
1187
+ raw: n[0] + " ",
1188
+ checked: n[0] !== "[ ]"
1189
+ };
1190
+ e.checked = t.checked, i.loose ? e.tokens[0] && ["paragraph", "text"].includes(e.tokens[0].type) && "tokens" in e.tokens[0] && e.tokens[0].tokens ? (e.tokens[0].raw = t.raw + e.tokens[0].raw, e.tokens[0].text = t.raw + e.tokens[0].text, e.tokens[0].tokens.unshift(t)) : e.tokens.unshift({
1191
+ type: "paragraph",
1192
+ raw: t.raw,
1193
+ text: t.raw,
1194
+ tokens: [t]
1195
+ }) : e.tokens.unshift(t);
1196
+ }
1197
+ } else e.task &&= !1;
1198
+ if (!i.loose) {
1199
+ let t = e.tokens.filter((e) => e.type === "space");
1200
+ i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
1201
+ }
1202
+ }
1203
+ if (i.loose) for (let e of i.items) {
1204
+ e.loose = !0;
1205
+ for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
1206
+ }
1207
+ return i;
1208
+ }
1209
+ }
1210
+ html(e) {
1211
+ let t = this.rules.block.html.exec(e);
1212
+ if (t) {
1213
+ let e = K(t[0]);
1214
+ return {
1215
+ type: "html",
1216
+ block: !0,
1217
+ raw: e,
1218
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
1219
+ text: e
1220
+ };
1221
+ }
1222
+ }
1223
+ def(e) {
1224
+ let t = this.rules.block.def.exec(e);
1225
+ if (t) {
1226
+ let e = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1227
+ return {
1228
+ type: "def",
1229
+ tag: e,
1230
+ raw: G(t[0], "\n"),
1231
+ href: n,
1232
+ title: r
1233
+ };
1234
+ }
1235
+ }
1236
+ table(e) {
1237
+ let t = this.rules.block.table.exec(e);
1238
+ if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1239
+ let n = W(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1240
+ type: "table",
1241
+ raw: G(t[0], "\n"),
1242
+ header: [],
1243
+ align: [],
1244
+ rows: []
1245
+ };
1246
+ if (n.length === r.length) {
1247
+ for (let e of r) this.rules.other.tableAlignRight.test(e) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(e) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(e) ? a.align.push("left") : a.align.push(null);
1248
+ for (let e = 0; e < n.length; e++) a.header.push({
1249
+ text: n[e],
1250
+ tokens: this.lexer.inline(n[e]),
1251
+ header: !0,
1252
+ align: a.align[e]
1253
+ });
1254
+ for (let e of i) a.rows.push(W(e, a.header.length).map((e, t) => ({
1255
+ text: e,
1256
+ tokens: this.lexer.inline(e),
1257
+ header: !1,
1258
+ align: a.align[t]
1259
+ })));
1260
+ return a;
1261
+ }
1262
+ }
1263
+ lheading(e) {
1264
+ let t = this.rules.block.lheading.exec(e);
1265
+ if (t) {
1266
+ let e = t[1].trim();
1267
+ return {
1268
+ type: "heading",
1269
+ raw: G(t[0], "\n"),
1270
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
1271
+ text: e,
1272
+ tokens: this.lexer.inline(e)
1273
+ };
1274
+ }
1275
+ }
1276
+ paragraph(e) {
1277
+ let t = this.rules.block.paragraph.exec(e);
1278
+ if (t) {
1279
+ let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1280
+ return {
1281
+ type: "paragraph",
1282
+ raw: t[0],
1283
+ text: e,
1284
+ tokens: this.lexer.inline(e)
1285
+ };
1286
+ }
1287
+ }
1288
+ text(e) {
1289
+ let t = this.rules.block.text.exec(e);
1290
+ if (t) return {
1291
+ type: "text",
1292
+ raw: t[0],
1293
+ text: t[0],
1294
+ tokens: this.lexer.inline(t[0])
1295
+ };
1296
+ }
1297
+ escape(e) {
1298
+ let t = this.rules.inline.escape.exec(e);
1299
+ if (t) return {
1300
+ type: "escape",
1301
+ raw: t[0],
1302
+ text: t[1]
1303
+ };
1304
+ }
1305
+ tag(e) {
1306
+ let t = this.rules.inline.tag.exec(e);
1307
+ if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
1308
+ type: "html",
1309
+ raw: t[0],
1310
+ inLink: this.lexer.state.inLink,
1311
+ inRawBlock: this.lexer.state.inRawBlock,
1312
+ block: !1,
1313
+ text: t[0]
1314
+ };
1315
+ }
1316
+ link(e) {
1317
+ let t = this.rules.inline.link.exec(e);
1318
+ if (t) {
1319
+ let e = t[2].trim();
1320
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1321
+ if (!this.rules.other.endAngleBracket.test(e)) return;
1322
+ let t = G(e.slice(0, -1), "\\");
1323
+ if ((e.length - t.length) % 2 == 0) return;
1324
+ } else {
1325
+ let e = ln(t[2], "()");
1326
+ if (e === -2) return;
1327
+ if (e > -1) {
1328
+ let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1329
+ t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1330
+ }
1331
+ }
1332
+ let n = t[2], r = "";
1333
+ if (this.options.pedantic) {
1334
+ let e = this.rules.other.pedanticHrefTitle.exec(n);
1335
+ e && (n = e[1], r = e[3]);
1336
+ } else r = t[3] ? t[3].slice(1, -1) : "";
1337
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), dn(t, {
1338
+ href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1339
+ title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1340
+ }, t[0], this.lexer, this.rules);
1341
+ }
1342
+ }
1343
+ reflink(e, t) {
1344
+ let n;
1345
+ if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1346
+ let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1347
+ if (!e) {
1348
+ let e = n[0].charAt(0);
1349
+ return {
1350
+ type: "text",
1351
+ raw: e,
1352
+ text: e
1353
+ };
1354
+ }
1355
+ return dn(n, e, n[0], this.lexer, this.rules);
1356
+ }
1357
+ }
1358
+ emStrong(e, t, n = "") {
1359
+ let r = this.rules.inline.emStrongLDelim.exec(e);
1360
+ if (!(!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[3]) || !n || this.rules.inline.punctuation.exec(n))) {
1361
+ let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1362
+ for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
1363
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1364
+ if (a = [...i].length, r[3] || r[4]) {
1365
+ o += a;
1366
+ continue;
1367
+ } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1368
+ s += a;
1369
+ continue;
1370
+ }
1371
+ if (o -= a, o > 0) continue;
1372
+ a = Math.min(a, a + o + s);
1373
+ let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1374
+ if (Math.min(n, a) % 2) {
1375
+ let e = c.slice(1, -1);
1376
+ return {
1377
+ type: "em",
1378
+ raw: c,
1379
+ text: e,
1380
+ tokens: this.lexer.inlineTokens(e)
1381
+ };
1382
+ }
1383
+ let l = c.slice(2, -2);
1384
+ return {
1385
+ type: "strong",
1386
+ raw: c,
1387
+ text: l,
1388
+ tokens: this.lexer.inlineTokens(l)
1389
+ };
1390
+ }
1391
+ }
1392
+ }
1393
+ codespan(e) {
1394
+ let t = this.rules.inline.code.exec(e);
1395
+ if (t) {
1396
+ let e = t[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(e), r = this.rules.other.startingSpaceChar.test(e) && this.rules.other.endingSpaceChar.test(e);
1397
+ return n && r && (e = e.substring(1, e.length - 1)), {
1398
+ type: "codespan",
1399
+ raw: t[0],
1400
+ text: e
1401
+ };
1402
+ }
1403
+ }
1404
+ br(e) {
1405
+ let t = this.rules.inline.br.exec(e);
1406
+ if (t) return {
1407
+ type: "br",
1408
+ raw: t[0]
1409
+ };
1410
+ }
1411
+ del(e, t, n = "") {
1412
+ let r = this.rules.inline.delLDelim.exec(e);
1413
+ if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
1414
+ let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
1415
+ for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
1416
+ if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
1417
+ if (r[3] || r[4]) {
1418
+ o += a;
1419
+ continue;
1420
+ }
1421
+ if (o -= a, o > 0) continue;
1422
+ a = Math.min(a, a + o);
1423
+ let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
1424
+ return {
1425
+ type: "del",
1426
+ raw: s,
1427
+ text: c,
1428
+ tokens: this.lexer.inlineTokens(c)
1429
+ };
1430
+ }
1431
+ }
1432
+ }
1433
+ autolink(e) {
1434
+ let t = this.rules.inline.autolink.exec(e);
1435
+ if (t) {
1436
+ let e, n;
1437
+ return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1438
+ type: "link",
1439
+ raw: t[0],
1440
+ text: e,
1441
+ href: n,
1442
+ tokens: [{
1443
+ type: "text",
1444
+ raw: e,
1445
+ text: e
1446
+ }]
1447
+ };
1448
+ }
1449
+ }
1450
+ url(e) {
1451
+ let t;
1452
+ if (t = this.rules.inline.url.exec(e)) {
1453
+ let e, n;
1454
+ if (t[2] === "@") e = t[0], n = "mailto:" + e;
1455
+ else {
1456
+ let r;
1457
+ do
1458
+ r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1459
+ while (r !== t[0]);
1460
+ e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1461
+ }
1462
+ return {
1463
+ type: "link",
1464
+ raw: t[0],
1465
+ text: e,
1466
+ href: n,
1467
+ tokens: [{
1468
+ type: "text",
1469
+ raw: e,
1470
+ text: e
1471
+ }]
1472
+ };
1473
+ }
1474
+ }
1475
+ inlineText(e) {
1476
+ let t = this.rules.inline.text.exec(e);
1477
+ if (t) {
1478
+ let e = this.lexer.state.inRawBlock;
1479
+ return {
1480
+ type: "text",
1481
+ raw: t[0],
1482
+ text: t[0],
1483
+ escaped: e
1484
+ };
1485
+ }
1486
+ }
1487
+ }, q = class e {
1488
+ tokens;
1489
+ options;
1490
+ state;
1491
+ inlineQueue;
1492
+ tokenizer;
1493
+ constructor(e) {
1494
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || D, this.options.tokenizer = this.options.tokenizer || new pn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1495
+ inLink: !1,
1496
+ inRawBlock: !1,
1497
+ top: !0
1498
+ };
1499
+ let t = {
1500
+ other: j,
1501
+ block: rn.normal,
1502
+ inline: an.normal
1503
+ };
1504
+ this.options.pedantic ? (t.block = rn.pedantic, t.inline = an.pedantic) : this.options.gfm && (t.block = rn.gfm, this.options.breaks ? t.inline = an.breaks : t.inline = an.gfm), this.tokenizer.rules = t;
1505
+ }
1506
+ static get rules() {
1507
+ return {
1508
+ block: rn,
1509
+ inline: an
1510
+ };
1511
+ }
1512
+ static lex(t, n) {
1513
+ return new e(n).lex(t);
1514
+ }
1515
+ static lexInline(t, n) {
1516
+ return new e(n).inlineTokens(t);
1517
+ }
1518
+ lex(e) {
1519
+ e = e.replace(j.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1520
+ for (let e = 0; e < this.inlineQueue.length; e++) {
1521
+ let t = this.inlineQueue[e];
1522
+ this.inlineTokens(t.src, t.tokens);
1523
+ }
1524
+ return this.inlineQueue = [], this.tokens;
1525
+ }
1526
+ blockTokens(e, t = [], n = !1) {
1527
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(j.tabCharGlobal, " ").replace(j.spaceLine, ""));
1528
+ let r = Infinity;
1529
+ for (; e;) {
1530
+ if (e.length < r) r = e.length;
1531
+ else {
1532
+ this.infiniteLoopError(e.charCodeAt(0));
1533
+ break;
1534
+ }
1535
+ let i;
1536
+ if (this.options.extensions?.block?.some((n) => (i = n.call({ lexer: this }, e, t)) ? (e = e.substring(i.raw.length), t.push(i), !0) : !1)) continue;
1537
+ if (i = this.tokenizer.space(e)) {
1538
+ e = e.substring(i.raw.length);
1539
+ let n = t.at(-1);
1540
+ i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
1541
+ continue;
1542
+ }
1543
+ if (i = this.tokenizer.code(e)) {
1544
+ e = e.substring(i.raw.length);
1545
+ let n = t.at(-1);
1546
+ n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.at(-1).src = n.text) : t.push(i);
1547
+ continue;
1548
+ }
1549
+ if (i = this.tokenizer.fences(e)) {
1550
+ e = e.substring(i.raw.length), t.push(i);
1551
+ continue;
1552
+ }
1553
+ if (i = this.tokenizer.heading(e)) {
1554
+ e = e.substring(i.raw.length), t.push(i);
1555
+ continue;
1556
+ }
1557
+ if (i = this.tokenizer.hr(e)) {
1558
+ e = e.substring(i.raw.length), t.push(i);
1559
+ continue;
1560
+ }
1561
+ if (i = this.tokenizer.blockquote(e)) {
1562
+ e = e.substring(i.raw.length), t.push(i);
1563
+ continue;
1564
+ }
1565
+ if (i = this.tokenizer.list(e)) {
1566
+ e = e.substring(i.raw.length), t.push(i);
1567
+ continue;
1568
+ }
1569
+ if (i = this.tokenizer.html(e)) {
1570
+ e = e.substring(i.raw.length), t.push(i);
1571
+ continue;
1572
+ }
1573
+ if (i = this.tokenizer.def(e)) {
1574
+ e = e.substring(i.raw.length);
1575
+ let n = t.at(-1);
1576
+ n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.raw, this.inlineQueue.at(-1).src = n.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = {
1577
+ href: i.href,
1578
+ title: i.title
1579
+ }, t.push(i));
1580
+ continue;
1581
+ }
1582
+ if (i = this.tokenizer.table(e)) {
1583
+ e = e.substring(i.raw.length), t.push(i);
1584
+ continue;
1585
+ }
1586
+ if (i = this.tokenizer.lheading(e)) {
1587
+ e = e.substring(i.raw.length), t.push(i);
1588
+ continue;
1589
+ }
1590
+ let a = e;
1591
+ if (this.options.extensions?.startBlock) {
1592
+ let t = Infinity, n = e.slice(1), r;
1593
+ this.options.extensions.startBlock.forEach((e) => {
1594
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1595
+ }), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
1596
+ }
1597
+ if (this.state.top && (i = this.tokenizer.paragraph(a))) {
1598
+ let r = t.at(-1);
1599
+ n && r?.type === "paragraph" ? (r.raw += (r.raw.endsWith("\n") ? "" : "\n") + i.raw, r.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = r.text) : t.push(i), n = a.length !== e.length, e = e.substring(i.raw.length);
1600
+ continue;
1601
+ }
1602
+ if (i = this.tokenizer.text(e)) {
1603
+ e = e.substring(i.raw.length);
1604
+ let n = t.at(-1);
1605
+ n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n.text) : t.push(i);
1606
+ continue;
1607
+ }
1608
+ if (e) {
1609
+ this.infiniteLoopError(e.charCodeAt(0));
1610
+ break;
1611
+ }
1612
+ }
1613
+ return this.state.top = !0, t;
1614
+ }
1615
+ inline(e, t = []) {
1616
+ return this.inlineQueue.push({
1617
+ src: e,
1618
+ tokens: t
1619
+ }), t;
1620
+ }
1621
+ inlineTokens(e, t = []) {
1622
+ this.tokenizer.lexer = this;
1623
+ let n = e, r = null;
1624
+ if (this.tokens.links) {
1625
+ let e = Object.keys(this.tokens.links);
1626
+ if (e.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null;) e.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
1627
+ }
1628
+ for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1629
+ let i;
1630
+ for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1631
+ n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
1632
+ let a = !1, o = "", s = Infinity;
1633
+ for (; e;) {
1634
+ if (e.length < s) s = e.length;
1635
+ else {
1636
+ this.infiniteLoopError(e.charCodeAt(0));
1637
+ break;
1638
+ }
1639
+ a || (o = ""), a = !1;
1640
+ let r;
1641
+ if (this.options.extensions?.inline?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
1642
+ if (r = this.tokenizer.escape(e)) {
1643
+ e = e.substring(r.raw.length), t.push(r);
1644
+ continue;
1645
+ }
1646
+ if (r = this.tokenizer.tag(e)) {
1647
+ e = e.substring(r.raw.length), t.push(r);
1648
+ continue;
1649
+ }
1650
+ if (r = this.tokenizer.link(e)) {
1651
+ e = e.substring(r.raw.length), t.push(r);
1652
+ continue;
1653
+ }
1654
+ if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1655
+ e = e.substring(r.raw.length);
1656
+ let n = t.at(-1);
1657
+ r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1658
+ continue;
1659
+ }
1660
+ if (r = this.tokenizer.emStrong(e, n, o)) {
1661
+ e = e.substring(r.raw.length), t.push(r);
1662
+ continue;
1663
+ }
1664
+ if (r = this.tokenizer.codespan(e)) {
1665
+ e = e.substring(r.raw.length), t.push(r);
1666
+ continue;
1667
+ }
1668
+ if (r = this.tokenizer.br(e)) {
1669
+ e = e.substring(r.raw.length), t.push(r);
1670
+ continue;
1671
+ }
1672
+ if (r = this.tokenizer.del(e, n, o)) {
1673
+ e = e.substring(r.raw.length), t.push(r);
1674
+ continue;
1675
+ }
1676
+ if (r = this.tokenizer.autolink(e)) {
1677
+ e = e.substring(r.raw.length), t.push(r);
1678
+ continue;
1679
+ }
1680
+ if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1681
+ e = e.substring(r.raw.length), t.push(r);
1682
+ continue;
1683
+ }
1684
+ let i = e;
1685
+ if (this.options.extensions?.startInline) {
1686
+ let t = Infinity, n = e.slice(1), r;
1687
+ this.options.extensions.startInline.forEach((e) => {
1688
+ r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1689
+ }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1690
+ }
1691
+ if (r = this.tokenizer.inlineText(i)) {
1692
+ e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
1693
+ let n = t.at(-1);
1694
+ n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1695
+ continue;
1696
+ }
1697
+ if (e) {
1698
+ this.infiniteLoopError(e.charCodeAt(0));
1699
+ break;
1700
+ }
1701
+ }
1702
+ return t;
1703
+ }
1704
+ infiniteLoopError(e) {
1705
+ let t = "Infinite loop on byte: " + e;
1706
+ if (this.options.silent) console.error(t);
1707
+ else throw Error(t);
1708
+ }
1709
+ }, J = class {
1710
+ options;
1711
+ parser;
1712
+ constructor(e) {
1713
+ this.options = e || D;
1714
+ }
1715
+ space(e) {
1716
+ return "";
1717
+ }
1718
+ code({ text: e, lang: t, escaped: n }) {
1719
+ let r = (t || "").match(j.notSpaceStart)?.[0], i = e.replace(j.endingNewline, "") + "\n";
1720
+ return r ? "<pre><code class=\"language-" + U(r) + "\">" + (n ? i : U(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : U(i, !0)) + "</code></pre>\n";
1721
+ }
1722
+ blockquote({ tokens: e }) {
1723
+ return `<blockquote>
1724
+ ${this.parser.parse(e)}</blockquote>
1725
+ `;
1726
+ }
1727
+ html({ text: e }) {
1728
+ return e;
1729
+ }
1730
+ def(e) {
1731
+ return "";
1732
+ }
1733
+ heading({ tokens: e, depth: t }) {
1734
+ return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1735
+ `;
1736
+ }
1737
+ hr(e) {
1738
+ return "<hr>\n";
1739
+ }
1740
+ list(e) {
1741
+ let t = e.ordered, n = e.start, r = "";
1742
+ for (let t = 0; t < e.items.length; t++) {
1743
+ let n = e.items[t];
1744
+ r += this.listitem(n);
1745
+ }
1746
+ let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1747
+ return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1748
+ }
1749
+ listitem(e) {
1750
+ return `<li>${this.parser.parse(e.tokens)}</li>
1751
+ `;
1752
+ }
1753
+ checkbox({ checked: e }) {
1754
+ return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1755
+ }
1756
+ paragraph({ tokens: e }) {
1757
+ return `<p>${this.parser.parseInline(e)}</p>
1758
+ `;
1759
+ }
1760
+ table(e) {
1761
+ let t = "", n = "";
1762
+ for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1763
+ t += this.tablerow({ text: n });
1764
+ let r = "";
1765
+ for (let t = 0; t < e.rows.length; t++) {
1766
+ let i = e.rows[t];
1767
+ n = "";
1768
+ for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1769
+ r += this.tablerow({ text: n });
1770
+ }
1771
+ return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1772
+ }
1773
+ tablerow({ text: e }) {
1774
+ return `<tr>
1775
+ ${e}</tr>
1776
+ `;
1777
+ }
1778
+ tablecell(e) {
1779
+ let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1780
+ return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1781
+ `;
1782
+ }
1783
+ strong({ tokens: e }) {
1784
+ return `<strong>${this.parser.parseInline(e)}</strong>`;
1785
+ }
1786
+ em({ tokens: e }) {
1787
+ return `<em>${this.parser.parseInline(e)}</em>`;
1788
+ }
1789
+ codespan({ text: e }) {
1790
+ return `<code>${U(e, !0)}</code>`;
1791
+ }
1792
+ br(e) {
1793
+ return "<br>";
1794
+ }
1795
+ del({ tokens: e }) {
1796
+ return `<del>${this.parser.parseInline(e)}</del>`;
1797
+ }
1798
+ link({ href: e, title: t, tokens: n }) {
1799
+ let r = this.parser.parseInline(n), i = cn(e);
1800
+ if (i === null) return r;
1801
+ e = i;
1802
+ let a = "<a href=\"" + e + "\"";
1803
+ return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
1804
+ }
1805
+ image({ href: e, title: t, text: n, tokens: r }) {
1806
+ r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1807
+ let i = cn(e);
1808
+ if (i === null) return U(n);
1809
+ e = i;
1810
+ let a = `<img src="${e}" alt="${U(n)}"`;
1811
+ return t && (a += ` title="${U(t)}"`), a += ">", a;
1812
+ }
1813
+ text(e) {
1814
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
1815
+ }
1816
+ }, Y = class {
1817
+ strong({ text: e }) {
1818
+ return e;
1819
+ }
1820
+ em({ text: e }) {
1821
+ return e;
1822
+ }
1823
+ codespan({ text: e }) {
1824
+ return e;
1825
+ }
1826
+ del({ text: e }) {
1827
+ return e;
1828
+ }
1829
+ html({ text: e }) {
1830
+ return e;
1831
+ }
1832
+ text({ text: e }) {
1833
+ return e;
1834
+ }
1835
+ link({ text: e }) {
1836
+ return "" + e;
1837
+ }
1838
+ image({ text: e }) {
1839
+ return "" + e;
1840
+ }
1841
+ br() {
1842
+ return "";
1843
+ }
1844
+ checkbox({ raw: e }) {
1845
+ return e;
1846
+ }
1847
+ }, X = class e {
1848
+ options;
1849
+ renderer;
1850
+ textRenderer;
1851
+ constructor(e) {
1852
+ this.options = e || D, this.options.renderer = this.options.renderer || new J(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Y();
1853
+ }
1854
+ static parse(t, n) {
1855
+ return new e(n).parse(t);
1856
+ }
1857
+ static parseInline(t, n) {
1858
+ return new e(n).parseInline(t);
1859
+ }
1860
+ parse(e) {
1861
+ this.renderer.parser = this;
1862
+ let t = "";
1863
+ for (let n = 0; n < e.length; n++) {
1864
+ let r = e[n];
1865
+ if (this.options.extensions?.renderers?.[r.type]) {
1866
+ let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1867
+ if (n !== !1 || ![
1868
+ "space",
1869
+ "hr",
1870
+ "heading",
1871
+ "code",
1872
+ "table",
1873
+ "blockquote",
1874
+ "list",
1875
+ "html",
1876
+ "def",
1877
+ "paragraph",
1878
+ "text"
1879
+ ].includes(e.type)) {
1880
+ t += n || "";
1881
+ continue;
1882
+ }
1883
+ }
1884
+ let i = r;
1885
+ switch (i.type) {
1886
+ case "space":
1887
+ t += this.renderer.space(i);
1888
+ break;
1889
+ case "hr":
1890
+ t += this.renderer.hr(i);
1891
+ break;
1892
+ case "heading":
1893
+ t += this.renderer.heading(i);
1894
+ break;
1895
+ case "code":
1896
+ t += this.renderer.code(i);
1897
+ break;
1898
+ case "table":
1899
+ t += this.renderer.table(i);
1900
+ break;
1901
+ case "blockquote":
1902
+ t += this.renderer.blockquote(i);
1903
+ break;
1904
+ case "list":
1905
+ t += this.renderer.list(i);
1906
+ break;
1907
+ case "checkbox":
1908
+ t += this.renderer.checkbox(i);
1909
+ break;
1910
+ case "html":
1911
+ t += this.renderer.html(i);
1912
+ break;
1913
+ case "def":
1914
+ t += this.renderer.def(i);
1915
+ break;
1916
+ case "paragraph":
1917
+ t += this.renderer.paragraph(i);
1918
+ break;
1919
+ case "text":
1920
+ t += this.renderer.text(i);
1921
+ break;
1922
+ default: {
1923
+ let e = "Token with \"" + i.type + "\" type was not found.";
1924
+ if (this.options.silent) return console.error(e), "";
1925
+ throw Error(e);
1926
+ }
1927
+ }
1928
+ }
1929
+ return t;
1930
+ }
1931
+ parseInline(e, t = this.renderer) {
1932
+ this.renderer.parser = this;
1933
+ let n = "";
1934
+ for (let r = 0; r < e.length; r++) {
1935
+ let i = e[r];
1936
+ if (this.options.extensions?.renderers?.[i.type]) {
1937
+ let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1938
+ if (e !== !1 || ![
1939
+ "escape",
1940
+ "html",
1941
+ "link",
1942
+ "image",
1943
+ "strong",
1944
+ "em",
1945
+ "codespan",
1946
+ "br",
1947
+ "del",
1948
+ "text"
1949
+ ].includes(i.type)) {
1950
+ n += e || "";
1951
+ continue;
1952
+ }
1953
+ }
1954
+ let a = i;
1955
+ switch (a.type) {
1956
+ case "escape":
1957
+ n += t.text(a);
1958
+ break;
1959
+ case "html":
1960
+ n += t.html(a);
1961
+ break;
1962
+ case "link":
1963
+ n += t.link(a);
1964
+ break;
1965
+ case "image":
1966
+ n += t.image(a);
1967
+ break;
1968
+ case "checkbox":
1969
+ n += t.checkbox(a);
1970
+ break;
1971
+ case "strong":
1972
+ n += t.strong(a);
1973
+ break;
1974
+ case "em":
1975
+ n += t.em(a);
1976
+ break;
1977
+ case "codespan":
1978
+ n += t.codespan(a);
1979
+ break;
1980
+ case "br":
1981
+ n += t.br(a);
1982
+ break;
1983
+ case "del":
1984
+ n += t.del(a);
1985
+ break;
1986
+ case "text":
1987
+ n += t.text(a);
1988
+ break;
1989
+ default: {
1990
+ let e = "Token with \"" + a.type + "\" type was not found.";
1991
+ if (this.options.silent) return console.error(e), "";
1992
+ throw Error(e);
1993
+ }
1994
+ }
1995
+ }
1996
+ return n;
1997
+ }
1998
+ }, Z = class {
1999
+ options;
2000
+ block;
2001
+ constructor(e) {
2002
+ this.options = e || D;
2003
+ }
2004
+ static passThroughHooks = new Set([
2005
+ "preprocess",
2006
+ "postprocess",
2007
+ "processAllTokens",
2008
+ "emStrongMask"
2009
+ ]);
2010
+ static passThroughHooksRespectAsync = new Set([
2011
+ "preprocess",
2012
+ "postprocess",
2013
+ "processAllTokens"
2014
+ ]);
2015
+ preprocess(e) {
2016
+ return e;
2017
+ }
2018
+ postprocess(e) {
2019
+ return e;
2020
+ }
2021
+ processAllTokens(e) {
2022
+ return e;
2023
+ }
2024
+ emStrongMask(e) {
2025
+ return e;
2026
+ }
2027
+ provideLexer(e = this.block) {
2028
+ return e ? q.lex : q.lexInline;
2029
+ }
2030
+ provideParser(e = this.block) {
2031
+ return e ? X.parse : X.parseInline;
2032
+ }
2033
+ }, mn = new class {
2034
+ defaults = ct();
2035
+ options = this.setOptions;
2036
+ parse = this.parseMarkdown(!0);
2037
+ parseInline = this.parseMarkdown(!1);
2038
+ Parser = X;
2039
+ Renderer = J;
2040
+ TextRenderer = Y;
2041
+ Lexer = q;
2042
+ Tokenizer = pn;
2043
+ Hooks = Z;
2044
+ constructor(...e) {
2045
+ this.use(...e);
2046
+ }
2047
+ walkTokens(e, t) {
2048
+ let n = [];
2049
+ for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
2050
+ case "table": {
2051
+ let e = r;
2052
+ for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
2053
+ for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
2054
+ break;
2055
+ }
2056
+ case "list": {
2057
+ let e = r;
2058
+ n = n.concat(this.walkTokens(e.items, t));
2059
+ break;
2060
+ }
2061
+ default: {
2062
+ let e = r;
2063
+ this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2064
+ let i = e[r].flat(Infinity);
2065
+ n = n.concat(this.walkTokens(i, t));
2066
+ }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
2067
+ }
2068
+ }
2069
+ return n;
2070
+ }
2071
+ use(...e) {
2072
+ let t = this.defaults.extensions || {
2073
+ renderers: {},
2074
+ childTokens: {}
2075
+ };
2076
+ return e.forEach((e) => {
2077
+ let n = { ...e };
2078
+ if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
2079
+ if (!e.name) throw Error("extension name required");
2080
+ if ("renderer" in e) {
2081
+ let n = t.renderers[e.name];
2082
+ n ? t.renderers[e.name] = function(...t) {
2083
+ let r = e.renderer.apply(this, t);
2084
+ return r === !1 && (r = n.apply(this, t)), r;
2085
+ } : t.renderers[e.name] = e.renderer;
2086
+ }
2087
+ if ("tokenizer" in e) {
2088
+ if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
2089
+ let n = t[e.level];
2090
+ n ? n.unshift(e.tokenizer) : t[e.level] = [e.tokenizer], e.start && (e.level === "block" ? t.startBlock ? t.startBlock.push(e.start) : t.startBlock = [e.start] : e.level === "inline" && (t.startInline ? t.startInline.push(e.start) : t.startInline = [e.start]));
2091
+ }
2092
+ "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2093
+ }), n.extensions = t), e.renderer) {
2094
+ let t = this.defaults.renderer || new J(this.defaults);
2095
+ for (let n in e.renderer) {
2096
+ if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2097
+ if (["options", "parser"].includes(n)) continue;
2098
+ let r = n, i = e.renderer[r], a = t[r];
2099
+ t[r] = (...e) => {
2100
+ let n = i.apply(t, e);
2101
+ return n === !1 && (n = a.apply(t, e)), n || "";
2102
+ };
2103
+ }
2104
+ n.renderer = t;
2105
+ }
2106
+ if (e.tokenizer) {
2107
+ let t = this.defaults.tokenizer || new pn(this.defaults);
2108
+ for (let n in e.tokenizer) {
2109
+ if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2110
+ if ([
2111
+ "options",
2112
+ "rules",
2113
+ "lexer"
2114
+ ].includes(n)) continue;
2115
+ let r = n, i = e.tokenizer[r], a = t[r];
2116
+ t[r] = (...e) => {
2117
+ let n = i.apply(t, e);
2118
+ return n === !1 && (n = a.apply(t, e)), n;
2119
+ };
2120
+ }
2121
+ n.tokenizer = t;
2122
+ }
2123
+ if (e.hooks) {
2124
+ let t = this.defaults.hooks || new Z();
2125
+ for (let n in e.hooks) {
2126
+ if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2127
+ if (["options", "block"].includes(n)) continue;
2128
+ let r = n, i = e.hooks[r], a = t[r];
2129
+ Z.passThroughHooks.has(n) ? t[r] = (e) => {
2130
+ if (this.defaults.async && Z.passThroughHooksRespectAsync.has(n)) return (async () => {
2131
+ let n = await i.call(t, e);
2132
+ return a.call(t, n);
2133
+ })();
2134
+ let r = i.call(t, e);
2135
+ return a.call(t, r);
2136
+ } : t[r] = (...e) => {
2137
+ if (this.defaults.async) return (async () => {
2138
+ let n = await i.apply(t, e);
2139
+ return n === !1 && (n = await a.apply(t, e)), n;
2140
+ })();
2141
+ let n = i.apply(t, e);
2142
+ return n === !1 && (n = a.apply(t, e)), n;
2143
+ };
2144
+ }
2145
+ n.hooks = t;
2146
+ }
2147
+ if (e.walkTokens) {
2148
+ let t = this.defaults.walkTokens, r = e.walkTokens;
2149
+ n.walkTokens = function(e) {
2150
+ let n = [];
2151
+ return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
2152
+ };
2153
+ }
2154
+ this.defaults = {
2155
+ ...this.defaults,
2156
+ ...n
2157
+ };
2158
+ }), this;
2159
+ }
2160
+ setOptions(e) {
2161
+ return this.defaults = {
2162
+ ...this.defaults,
2163
+ ...e
2164
+ }, this;
2165
+ }
2166
+ lexer(e, t) {
2167
+ return q.lex(e, t ?? this.defaults);
2168
+ }
2169
+ parser(e, t) {
2170
+ return X.parse(e, t ?? this.defaults);
2171
+ }
2172
+ parseMarkdown(e) {
2173
+ return (t, n) => {
2174
+ let r = { ...n }, i = {
2175
+ ...this.defaults,
2176
+ ...r
2177
+ }, a = this.onError(!!i.silent, !!i.async);
2178
+ if (this.defaults.async === !0 && r.async === !1) return a(/* @__PURE__ */ Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
2179
+ if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
2180
+ if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
2181
+ if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
2182
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
2183
+ i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
2184
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(a, i);
2185
+ return i.hooks ? await i.hooks.postprocess(o) : o;
2186
+ })().catch(a);
2187
+ try {
2188
+ i.hooks && (t = i.hooks.preprocess(t));
2189
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
2190
+ i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
2191
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(n, i);
2192
+ return i.hooks && (r = i.hooks.postprocess(r)), r;
2193
+ } catch (e) {
2194
+ return a(e);
2195
+ }
2196
+ };
2197
+ }
2198
+ onError(e, t) {
2199
+ return (n) => {
2200
+ if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
2201
+ let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
2202
+ return t ? Promise.resolve(e) : e;
2203
+ }
2204
+ if (t) return Promise.reject(n);
2205
+ throw n;
2206
+ };
2207
+ }
2208
+ }();
2209
+ function Q(e, t) {
2210
+ return mn.parse(e, t);
2211
+ }
2212
+ Q.options = Q.setOptions = function(e) {
2213
+ return mn.setOptions(e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2214
+ }, Q.getDefaults = ct, Q.defaults = D, Q.use = function(...e) {
2215
+ return mn.use(...e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2216
+ }, Q.walkTokens = function(e, t) {
2217
+ return mn.walkTokens(e, t);
2218
+ }, Q.parseInline = mn.parseInline, Q.Parser = X, Q.parser = X.parse, Q.Renderer = J, Q.TextRenderer = Y, Q.Lexer = q, Q.lexer = q.lex, Q.Tokenizer = pn, Q.Hooks = Z, Q.parse = Q, Q.options, Q.setOptions, Q.use, Q.walkTokens, Q.parseInline, X.parse, q.lex;
2219
+ //#endregion
2220
+ //#region src/components/ai-chat/empty-state/ai-chat-empty-state.module.scss?inline
2221
+ var hn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(--luzmo-ai-chat-empty-state-padding-block,var(--ai-chat-empty-state-padding-block));padding-inline:var(--luzmo-ai-chat-empty-state-padding-inline,var(--ai-chat-empty-state-padding-inline));flex:1;justify-content:center;align-items:center;display:flex}.empty-state{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-header-actions-gap,var(--ai-chat-empty-state-header-actions-gap));width:100%;max-width:var(--luzmo-ai-chat-empty-state-max-width,var(--ai-chat-empty-state-max-width));text-align:center;flex-direction:column;display:flex}.header{flex-direction:column;align-items:center;width:100%;display:flex}.actions{align-items:center;gap:var(--luzmo-ai-chat-empty-state-actions-gap,var(--ai-chat-empty-state-actions-gap));flex-direction:column;width:100%;display:flex}.title{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-title-font-size,var(--ai-chat-empty-state-title-font-size));font-weight:var(--luzmo-ai-chat-empty-state-title-font-weight,var(--ai-chat-empty-state-title-font-weight));line-height:var(--luzmo-ai-chat-empty-state-title-line-height,var(--ai-chat-empty-state-title-line-height));color:var(--luzmo-ai-chat-empty-state-title-color,var(--ai-chat-empty-state-title-color));text-wrap:balance;margin:0}.subtitle{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-subtitle-font-size,var(--ai-chat-empty-state-subtitle-font-size));font-weight:var(--luzmo-ai-chat-empty-state-subtitle-font-weight,var(--ai-chat-empty-state-subtitle-font-weight));line-height:var(--luzmo-ai-chat-empty-state-subtitle-line-height,var(--ai-chat-empty-state-subtitle-line-height));color:var(--luzmo-ai-chat-empty-state-subtitle-color,var(--ai-chat-empty-state-subtitle-color));margin:0}.suggestions{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-suggestions-gap,var(--ai-chat-empty-state-suggestions-gap));flex-wrap:wrap;width:100%;display:flex}luzmo-action-button{max-width:100%}:host{--ai-chat-empty-state-header-actions-gap:1.5rem;--ai-chat-empty-state-actions-gap:var(--luzmo-spacing-4);--ai-chat-empty-state-suggestions-gap:var(--luzmo-spacing-3);--ai-chat-empty-state-max-width:22.5rem;--ai-chat-empty-state-padding-block:2rem;--ai-chat-empty-state-padding-inline:var(--luzmo-spacing-5);--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-l);--ai-chat-empty-state-title-font-weight:var(--luzmo-font-weight-strong,600);--ai-chat-empty-state-title-line-height:1.4;--ai-chat-empty-state-title-color:var(--luzmo-font-color);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-s);--ai-chat-empty-state-subtitle-font-weight:var(--luzmo-font-weight);--ai-chat-empty-state-subtitle-line-height:var(--luzmo-line-height);--ai-chat-empty-state-subtitle-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed))}", gn = class extends e {
2222
+ constructor(...e) {
2223
+ super(...e), this.title = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), this.subtitle = "", this.suggestions = [], this.disabled = !1;
2224
+ }
2225
+ static {
2226
+ this.styles = c(hn);
2227
+ }
2228
+ static {
2229
+ this.tagName = "luzmo-ai-chat-empty-state";
2230
+ }
2231
+ _handleSuggestionActivate(e) {
2232
+ if (this.disabled) return;
2233
+ let t = e.prompt ?? e.label;
2234
+ this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
2235
+ detail: {
2236
+ label: e.label,
2237
+ prompt: t,
2238
+ selectedDatasets: e.selectedDatasets
2239
+ },
2240
+ bubbles: !0,
2241
+ composed: !0
2242
+ }));
2243
+ }
2244
+ render() {
2245
+ let e = this.suggestions.length > 0;
2246
+ return o`
2247
+ <section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
2248
+ <header class="header">
2249
+ <h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
2250
+ </header>
2251
+
2252
+ ${e ? o`
2253
+ <div class="actions">
2254
+ ${this.subtitle ? o`<p class="subtitle">${this.subtitle}</p>` : s}
2255
+ <div
2256
+ class="suggestions"
2257
+ role="group"
2258
+ aria-label=${n("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
2259
+ >
2260
+ ${this.suggestions.map((e) => o`
2261
+ <luzmo-action-button
2262
+ variant="accent"
2263
+ size="s"
2264
+ ?disabled=${this.disabled}
2265
+ @click=${() => this._handleSuggestionActivate(e)}
2266
+ >
2267
+ ${e.label}
2268
+ </luzmo-action-button>
2269
+ `)}
2270
+ </div>
2271
+ </div>
2272
+ ` : s}
2273
+ </section>
2274
+ `;
2275
+ }
2276
+ };
2277
+ //#endregion
2278
+ //#region src/components/ai-chat/empty-state/index.ts
2279
+ t([l({ type: String })], gn.prototype, "title", void 0), t([l({ type: String })], gn.prototype, "subtitle", void 0), t([l({ type: Array })], gn.prototype, "suggestions", void 0), t([l({
2280
+ type: Boolean,
2281
+ reflect: !0
2282
+ })], gn.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", gn);
2283
+ //#endregion
2284
+ //#region src/components/ai-chat/ai-chat-request.ts
2285
+ function _n(e, t) {
2286
+ return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
2287
+ }
2288
+ function vn(e) {
2289
+ return e.type === "placeholder" ? null : {
2290
+ ...e,
2291
+ version: e.version || "",
2292
+ title: e.title || e.options?.title,
2293
+ filters: e.filterGroups || [],
2294
+ aichartId: e.aichartId || ""
2295
+ };
2296
+ }
2297
+ function yn(e, t) {
2298
+ return [{
2299
+ type: "text",
2300
+ text: e
2301
+ }, ...t.map((e) => ({
2302
+ type: "dataset",
2303
+ id: e
2304
+ }))];
2305
+ }
2306
+ function bn(e, t, n) {
2307
+ return {
2308
+ agent: e,
2309
+ task: t,
2310
+ stream: n.stream ?? !0,
2311
+ response_mode: "mixed",
2312
+ ...n.conversationId ? { conversation_id: n.conversationId } : {},
2313
+ ...n.localeId ? { locale_id: n.localeId } : {}
2314
+ };
2315
+ }
2316
+ function xn(e) {
2317
+ let t = yn(e.prompt, e.datasetIds), n = e.chart ? vn(e.chart) : null;
2318
+ return n && t.push({
2319
+ type: "item",
2320
+ value: n
2321
+ }), {
2322
+ ...bn("item", e.task ?? "generate", e),
2323
+ input: t
2324
+ };
2325
+ }
2326
+ function Sn(e) {
2327
+ let t = yn(e.prompt, e.datasetIds);
2328
+ return e.dashboard && t.push({
2329
+ type: "dashboard",
2330
+ value: e.dashboard,
2331
+ ...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
2332
+ }), {
2333
+ ...bn("dashboard", "generate", e),
2334
+ timezone_id: e.timezoneId ?? "UTC",
2335
+ input: t
2336
+ };
2337
+ }
2338
+ function Cn(e) {
2339
+ return {
2340
+ ...bn("analyst", "generate", e),
2341
+ input: yn(e.prompt, e.datasetIds)
2342
+ };
2343
+ }
2344
+ function wn(e, t) {
2345
+ switch (e) {
2346
+ case "dashboard": return Sn(t);
2347
+ case "analyst": return Cn(t);
2348
+ default: return xn(t);
2349
+ }
2350
+ }
2351
+ function Tn(e, t) {
2352
+ let { authKey: n, authToken: r, apiVersion: i = "0.1.0" } = t;
2353
+ return {
2354
+ key: n,
2355
+ token: r,
2356
+ action: "create",
2357
+ version: i,
2358
+ properties: wn(e, t)
2359
+ };
2360
+ }
2361
+ function En(e, t, n, r = "0.1.0", i = null) {
2362
+ return {
2363
+ key: t,
2364
+ token: n,
2365
+ action: "delete",
2366
+ version: r,
2367
+ properties: {
2368
+ agent: "item",
2369
+ restore_to_message_id: e,
2370
+ ...i ? { conversation_id: i } : {}
2371
+ }
2372
+ };
2373
+ }
2374
+ //#endregion
2375
+ //#region src/components/ai-chat/stream/transport.ts
2376
+ async function Dn(e) {
2377
+ let t = await fetch(e.url, {
2378
+ method: "POST",
2379
+ headers: { "Content-Type": "application/json" },
2380
+ mode: "cors",
2381
+ body: JSON.stringify(e.body),
2382
+ signal: e.signal
2383
+ });
2384
+ if (!t.ok) {
2385
+ let e = await t.json().catch(() => null);
2386
+ throw Error(e?.message || `API request failed with status ${t.status}`);
2387
+ }
2388
+ if (!t.body) throw Error("Response body is not readable");
2389
+ return {
2390
+ body: t.body,
2391
+ conversationId: t.headers.get("x-conversation-id")
2392
+ };
2393
+ }
2394
+ function On(e) {
2395
+ let t = e.trim();
2396
+ if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
2397
+ let n = t;
2398
+ return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
2399
+ }
2400
+ function kn(e, t) {
2401
+ try {
2402
+ let n = On(e);
2403
+ n && t(n);
2404
+ } catch {
2405
+ console.error("Failed to parse stream line");
2406
+ }
2407
+ }
2408
+ async function An(e, t) {
2409
+ let n = e.getReader(), r = new TextDecoder(), i = "";
2410
+ try {
2411
+ for (;;) {
2412
+ let { done: e, value: a } = await n.read();
2413
+ if (e) break;
2414
+ i += r.decode(a, { stream: !0 });
2415
+ let o = i.split(/\r?\n/);
2416
+ i = o.pop() ?? "";
2417
+ for (let e of o) kn(e, t);
2418
+ }
2419
+ i += r.decode();
2420
+ let e = i.trim();
2421
+ e && kn(e, t);
2422
+ } finally {
2423
+ n.releaseLock();
2424
+ }
2425
+ }
2426
+ //#endregion
2427
+ //#region src/components/ai-chat/stream/progress.ts
2428
+ function jn() {
2429
+ return {
2430
+ id: "root",
2431
+ step: "root",
2432
+ status: "pending",
2433
+ children: [{
2434
+ id: "client-init",
2435
+ step: "iqInit",
2436
+ status: "inProgress",
2437
+ description: n("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
2438
+ }]
2439
+ };
2440
+ }
2441
+ function Mn(e) {
2442
+ let t = e.progress;
2443
+ return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
2444
+ }
2445
+ //#endregion
2446
+ //#region src/components/ai-chat/stream/chunk-extractors.ts
2447
+ function Nn(e) {
2448
+ if (!e || typeof e != "object") return "";
2449
+ let t = e.assistant_message;
2450
+ if (!t || typeof t != "object") return "";
2451
+ if (typeof t.message == "string") return t.message;
2452
+ if (typeof t.text == "string") return t.text;
2453
+ if (typeof t.summary == "string") return t.summary;
2454
+ let n = t.content;
2455
+ return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
2456
+ }
2457
+ function Pn(e) {
2458
+ return e.type === "text_delta" && typeof e.delta == "string" ? e.delta : typeof e.text_delta == "string" ? e.text_delta : typeof e.chunk == "string" ? e.chunk : typeof e.message == "string" ? e.message : typeof e.summary == "string" ? e.summary : "";
2459
+ }
2460
+ function Fn(e) {
2461
+ return Nn(e.result);
2462
+ }
2463
+ function In(e) {
2464
+ return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
2465
+ }
2466
+ function Ln(e, t) {
2467
+ let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
2468
+ n && t.callbacks.onConversationIdChange(n);
2469
+ }
2470
+ function Rn(e) {
2471
+ for (let t of e) if (t && typeof t == "object" && t.type === "item") {
2472
+ let e = t.value;
2473
+ if (e && typeof e == "object") return e;
2474
+ }
2475
+ return null;
2476
+ }
2477
+ function zn(e) {
2478
+ let t = e.chart ?? e.generatedChart;
2479
+ if (t && typeof t == "object") return t;
2480
+ let n = e.aiMessageAssets ?? e.ai_message_assets;
2481
+ if (Array.isArray(n)) {
2482
+ let e = Rn(n);
2483
+ if (e) return e;
2484
+ }
2485
+ let r = e.result;
2486
+ if (r && typeof r == "object") {
2487
+ let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2488
+ if (Array.isArray(t)) return Rn(t);
2489
+ }
2490
+ return null;
2491
+ }
2492
+ function Bn(e) {
2493
+ for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2494
+ let e = t.value;
2495
+ if (e && typeof e == "object" && Array.isArray(e.views)) return e;
2496
+ }
2497
+ return null;
2498
+ }
2499
+ function Vn(e) {
2500
+ for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2501
+ let e = t.name;
2502
+ if (e && typeof e == "object") return e;
2503
+ }
2504
+ }
2505
+ function Hn(...e) {
2506
+ return e.find(Array.isArray);
2507
+ }
2508
+ function Un(e) {
2509
+ if (e.views && Array.isArray(e.views)) return e;
2510
+ let t = e.aiMessageAssets ?? e.ai_message_assets;
2511
+ if (Array.isArray(t)) return Bn(t);
2512
+ let n = e.result;
2513
+ if (n && typeof n == "object") {
2514
+ let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2515
+ if (Array.isArray(t)) return Bn(t);
2516
+ }
2517
+ return null;
2518
+ }
2519
+ function Wn(e) {
2520
+ let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Hn(t, n?.aiMessageAssets ?? n?.ai_message_assets);
2521
+ return r ? Vn(r) : void 0;
2522
+ }
2523
+ //#endregion
2524
+ //#region src/components/ai-chat/stream/stream-processor.ts
2525
+ var Gn = new Set([
2526
+ "conversation-id",
2527
+ "conversation_id",
2528
+ "keepalive",
2529
+ "ping",
2530
+ "finish",
2531
+ "done"
2532
+ ]);
2533
+ function Kn(e, t, n) {
2534
+ return {
2535
+ agent: n.agent,
2536
+ conversationId: t.callbacks.getConversationId(),
2537
+ ...typeof e.messageId == "string" ? { messageId: e.messageId } : {},
2538
+ raw: e
2539
+ };
2540
+ }
2541
+ function qn(e, t, n, r, i) {
2542
+ let a = {
2543
+ ...Kn(n, e, t),
2544
+ recognized: !0,
2545
+ type: r,
2546
+ data: i
2547
+ };
2548
+ e.callbacks.onStep(a);
2549
+ }
2550
+ function Jn(e, t, n, r, i) {
2551
+ let a = {
2552
+ ...Kn(n, e, t),
2553
+ recognized: !1,
2554
+ type: r,
2555
+ data: i
2556
+ };
2557
+ e.callbacks.onStep(a);
2558
+ }
2559
+ function Yn(e) {
2560
+ e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
2561
+ }
2562
+ function Xn(e, t) {
2563
+ Yn(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
2564
+ }
2565
+ function Zn(e) {
2566
+ if (!e) return null;
2567
+ let t = e.descriptionMetadata?.decision;
2568
+ if (t === "create" || t === "edit" || t === "question") return t;
2569
+ for (let t of e.children ?? []) {
2570
+ let e = Zn(t);
2571
+ if (e) return e;
2572
+ }
2573
+ return null;
2574
+ }
2575
+ function Qn(e, t, n) {
2576
+ if (!Mn(e)) return !1;
2577
+ let r = e.progress;
2578
+ if (t.callbacks.onProgress(r), qn(t, n, e, "progress", r), t.state.decision === null) {
2579
+ let i = Zn(r);
2580
+ i && (t.state.decision = i, qn(t, n, e, "decision", { decision: i }));
2581
+ }
2582
+ return !0;
2583
+ }
2584
+ function $n(e) {
2585
+ return !!e.error || e.type === "error" || typeof e.error_text == "string";
2586
+ }
2587
+ function er(e) {
2588
+ return typeof e.error_text == "string" && e.error_text ? e.error_text : typeof e.error == "string" && e.error ? e.error : n("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" });
2589
+ }
2590
+ function tr(e, t, n) {
2591
+ if (!$n(e)) return !1;
2592
+ let r = er(e);
2593
+ return t.aiMessage.message = r, t.aiMessage.isError = !0, t.callbacks.onMessageUpdate(t.aiMessage), Sr(e, t, n, e.error ?? r), !0;
2594
+ }
2595
+ function nr(e) {
2596
+ return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
2597
+ }
2598
+ function rr(e, t, n) {
2599
+ if (e.type !== "interrupt") return !1;
2600
+ let r = nr(e);
2601
+ return r && (t.state.interruptQuestion = r, Xn(t, r), qn(t, n, e, "interrupt", { question: r })), Sr(e, t, n), !0;
2602
+ }
2603
+ function ir(e) {
2604
+ return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
2605
+ }
2606
+ function ar(e) {
2607
+ return typeof e.asset_type == "string" ? e.asset_type : "";
2608
+ }
2609
+ function or(e) {
2610
+ return {
2611
+ assetType: ar(e),
2612
+ snapshot: {}
2613
+ };
2614
+ }
2615
+ function sr(e, t) {
2616
+ return {
2617
+ ...e,
2618
+ ...t
2619
+ };
2620
+ }
2621
+ function cr(e) {
2622
+ let t = e.asset_delta ?? e.delta;
2623
+ return t && typeof t == "object" ? t : null;
2624
+ }
2625
+ function lr(e, t) {
2626
+ t.state.assets[ir(e)] = or(e);
2627
+ }
2628
+ function ur(e, t) {
2629
+ let n = ir(e), r = t.state.assets[n] ?? or(e), i = cr(e);
2630
+ i && (r.snapshot = sr(r.snapshot, i)), t.state.assets[n] = r;
2631
+ }
2632
+ function dr(e, t) {
2633
+ let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
2634
+ return n && typeof n == "object" ? sr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
2635
+ }
2636
+ function fr(e, t, n) {
2637
+ let r = ir(e), i = t.state.assets[r], a = i?.assetType || ar(e), o = dr(e, i);
2638
+ delete t.state.assets[r], hr(a, o, e, t, n);
2639
+ }
2640
+ function pr(e, t, n) {
2641
+ switch (e.type) {
2642
+ case "asset_start": return lr(e, t), !0;
2643
+ case "asset_delta": return ur(e, t), !0;
2644
+ case "asset_end": return fr(e, t, n), !0;
2645
+ default: return !1;
2646
+ }
2647
+ }
2648
+ function mr(e, t, n, r) {
2649
+ n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), qn(n, r, t, "chart", e);
2650
+ }
2651
+ function hr(e, t, n, r, i) {
2652
+ switch (e) {
2653
+ case "dashboard-title": {
2654
+ let e = t.name;
2655
+ e && typeof e == "object" && (r.state.dashboardName = e, qn(r, i, n, "dashboard-title", { name: e }));
2656
+ return;
2657
+ }
2658
+ case "dashboard-layout":
2659
+ qn(r, i, n, "dashboard-layout", t);
2660
+ return;
2661
+ case "dashboard-item":
2662
+ qn(r, i, n, "dashboard-item", {
2663
+ slot: Number(t.slot),
2664
+ chart: t.chart ?? t
2665
+ });
2666
+ return;
2667
+ case "dashboard":
2668
+ r.state.dashboardSnapshot = t;
2669
+ return;
2670
+ default: gr(e, t, n, r, i);
2671
+ }
2672
+ }
2673
+ function gr(e, t, n, r, i) {
2674
+ if (i.chartAssetType && e === i.chartAssetType) {
2675
+ mr(t, n, r, i);
2676
+ return;
2677
+ }
2678
+ if (i.dashboardAssetType && e === i.dashboardAssetType) {
2679
+ r.state.dashboardSnapshot = t;
2680
+ return;
2681
+ }
2682
+ Jn(r, i, n, e || "asset", t);
2683
+ }
2684
+ function _r(e, t, n) {
2685
+ let r = !1;
2686
+ if (n.dashboardAssetType) {
2687
+ let n = Un(e);
2688
+ if (n) {
2689
+ t.state.dashboardSnapshot = n;
2690
+ let i = Wn(e);
2691
+ i && (t.state.dashboardName = i), r = !0;
2692
+ }
2693
+ }
2694
+ if (n.chartAssetType && !t.state.chartSnapshot) {
2695
+ let i = zn(e);
2696
+ i && (mr(i, e, t, n), r = !0);
2697
+ }
2698
+ return r;
2699
+ }
2700
+ function vr(e, t, n) {
2701
+ return {
2702
+ ...e,
2703
+ generatedChart: t,
2704
+ conversationId: n.callbacks.getConversationId()
2705
+ };
2706
+ }
2707
+ function yr(e, t, n) {
2708
+ for (let r of Object.keys(t.state.assets)) {
2709
+ let i = t.state.assets[r];
2710
+ delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot) && hr(i.assetType, i.snapshot, e, t, n);
2711
+ }
2712
+ }
2713
+ function br(e, t) {
2714
+ let n = Fn(e);
2715
+ !n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
2716
+ }
2717
+ function xr(e, t, n) {
2718
+ let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Un(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? zn(e) : null);
2719
+ return {
2720
+ agent: n.agent,
2721
+ conversationId: t.callbacks.getConversationId(),
2722
+ message: t.aiMessage,
2723
+ ...r ? { dashboard: r } : {},
2724
+ ...i ? { chart: vr(e, i, t) } : {},
2725
+ ...t.state.dashboardName ? { name: t.state.dashboardName } : {},
2726
+ raw: e
2727
+ };
2728
+ }
2729
+ function Sr(e, t, n, r) {
2730
+ if (!t.state.completed) {
2731
+ if (t.state.completed = !0, yr(e, t, n), Yn(t), r !== void 0) {
2732
+ t.callbacks.onComplete({
2733
+ agent: n.agent,
2734
+ conversationId: t.callbacks.getConversationId(),
2735
+ message: t.aiMessage,
2736
+ error: r,
2737
+ raw: e
2738
+ });
2739
+ return;
2740
+ }
2741
+ br(e, t), t.callbacks.onComplete(xr(e, t, n));
2742
+ }
2743
+ }
2744
+ function Cr(e) {
2745
+ return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
2746
+ }
2747
+ function wr(e, t, n) {
2748
+ let r = Pn(e);
2749
+ return r ? (t.state.accumulatedText += r, Xn(t, r), qn(t, n, e, "text", {
2750
+ delta: r,
2751
+ text: t.state.accumulatedText
2752
+ }), !0) : !1;
2753
+ }
2754
+ function Tr(e, t, n, r, i) {
2755
+ if (r || i) return;
2756
+ let a = Cr(e);
2757
+ a && !Gn.has(a) && Jn(t, n, e, a, e);
2758
+ }
2759
+ function Er(e, t, n) {
2760
+ if (Ln(e, t), Qn(e, t, n) || tr(e, t, n) || rr(e, t, n) || pr(e, t, n)) return;
2761
+ let r = wr(e, t, n), i = _r(e, t, n), a = r || i, o = In(e);
2762
+ Tr(e, t, n, a, o), o && Sr(e, t, n);
2763
+ }
2764
+ //#endregion
2765
+ //#region src/components/ai-chat/stream/registry.ts
2766
+ function Dr(e) {
2767
+ switch (e) {
2768
+ case "dashboard": return {
2769
+ agent: e,
2770
+ dashboardAssetType: "dashboard"
2771
+ };
2772
+ case "item": return {
2773
+ agent: e,
2774
+ chartAssetType: "item"
2775
+ };
2776
+ default: return { agent: e };
2777
+ }
2778
+ }
2779
+ function Or(e) {
2780
+ let t = Dr(e);
2781
+ return (e, n) => Er(e, n, t);
2782
+ }
2783
+ function kr() {
2784
+ return {
2785
+ progressCollapsed: !1,
2786
+ accumulatedText: "",
2787
+ decision: null,
2788
+ assets: {},
2789
+ dashboardSnapshot: null,
2790
+ dashboardName: void 0,
2791
+ chartSnapshot: null,
2792
+ interruptQuestion: null,
2793
+ completed: !1
2794
+ };
2795
+ }
2796
+ //#endregion
2797
+ //#region src/components/ai-chat/session/ai-chat-session.ts
2798
+ function Ar() {
2799
+ return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
2800
+ }
2801
+ var jr = class {
2802
+ constructor(e, t = {}) {
2803
+ this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
2804
+ messages: [],
2805
+ selectedDatasets: [],
2806
+ isGenerating: !1,
2807
+ progress: null,
2808
+ progressCollapsed: !1,
2809
+ conversationId: null,
2810
+ inflightMessage: null
2811
+ }, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
2812
+ apiUrl: "https://api.luzmo.com",
2813
+ apiVersion: "0.1.0",
2814
+ stream: !0,
2815
+ ...e
2816
+ }, this._hostCallbacks = t, this._state = {
2817
+ ...this._state,
2818
+ messages: e.messages ? [...e.messages] : [],
2819
+ selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
2820
+ conversationId: e.conversationId ?? null,
2821
+ isGenerating: e.isGenerating ?? !1,
2822
+ progress: e.progress ?? null,
2823
+ progressCollapsed: e.progressCollapsed ?? !1
2824
+ };
2825
+ }
2826
+ get state() {
2827
+ return this._state;
2828
+ }
2829
+ get isGenerating() {
2830
+ return this._state.isGenerating;
2831
+ }
2832
+ subscribe(e) {
2833
+ return this._subscribers.add(e), e(this._state), () => {
2834
+ this._subscribers.delete(e);
2835
+ };
2836
+ }
2837
+ setUiBridge(e) {
2838
+ this._uiBridgeCallbacks = e;
2839
+ }
2840
+ updateConfig(e) {
2841
+ this._config = {
2842
+ ...this._config,
2843
+ ...e
2844
+ };
2845
+ let t = {};
2846
+ if ("conversationId" in e) {
2847
+ let n = e.conversationId ?? null;
2848
+ n !== this._state.conversationId && (t.conversationId = n);
2849
+ }
2850
+ if ("selectedDatasets" in e && e.selectedDatasets) {
2851
+ let n = [...e.selectedDatasets];
2852
+ this._areSelectedDatasetsEqual(n, this._state.selectedDatasets) || (t.selectedDatasets = n);
2853
+ }
2854
+ if ("messages" in e && e.messages) {
2855
+ let n = [...e.messages];
2856
+ this._areChatMessagesEqual(n, this._state.messages) || (t.messages = n);
2857
+ }
2858
+ "isGenerating" in e && e.isGenerating !== this._state.isGenerating && (t.isGenerating = e.isGenerating), "progress" in e && (t.progress = e.progress ?? null), "progressCollapsed" in e && e.progressCollapsed !== this._state.progressCollapsed && (t.progressCollapsed = e.progressCollapsed), Object.keys(t).length > 0 && this._patchState(t);
2859
+ }
2860
+ setSelectedDatasets(e) {
2861
+ this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
2862
+ }
2863
+ addDataset(e) {
2864
+ this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2865
+ }
2866
+ removeDataset(e) {
2867
+ let t = this._state.selectedDatasets.filter((t) => t.id !== e);
2868
+ t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2869
+ }
2870
+ isDatasetRequirementMet() {
2871
+ return !this._config.requireDataset || this._state.selectedDatasets.length > 0;
2872
+ }
2873
+ getAiPromptUrl() {
2874
+ return _n(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
2875
+ }
2876
+ buildRequestBody(e, t) {
2877
+ return Tn(this._config.agent, {
2878
+ prompt: e,
2879
+ datasetIds: t,
2880
+ authKey: this._config.authKey,
2881
+ authToken: this._config.authToken,
2882
+ conversationId: this._state.conversationId,
2883
+ chart: this._config.chart ?? null,
2884
+ dashboard: this._config.dashboard ?? null,
2885
+ currentScreenMode: this._config.currentScreenMode,
2886
+ localeId: this._config.localeId,
2887
+ timezoneId: this._config.timezoneId,
2888
+ task: this._config.task,
2889
+ modelPreference: this._config.modelPreference,
2890
+ apiVersion: this._config.apiVersion,
2891
+ stream: this._config.stream
2892
+ });
2893
+ }
2894
+ buildPromptSubmittedDetail(e, t, n, r) {
2895
+ return {
2896
+ prompt: e,
2897
+ selectedDatasets: t,
2898
+ datasetIds: n,
2899
+ agent: this._config.agent,
2900
+ request: this.buildRequestBody(e, n),
2901
+ url: this.getAiPromptUrl(),
2902
+ ...r ? { signal: r } : {}
2903
+ };
2904
+ }
2905
+ async submit(e) {
2906
+ let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
2907
+ if (!this.isDatasetRequirementMet()) return;
2908
+ this._abortInflight();
2909
+ let n = {
2910
+ id: e.aiMessageId ?? Ar(),
2911
+ type: "ai",
2912
+ message: ""
2913
+ }, r = [...this._state.messages];
2914
+ if (!e.skipUserMessage) {
2915
+ let t = {
2916
+ id: Ar(),
2917
+ type: "user",
2918
+ message: e.prompt
2919
+ };
2920
+ r = [...r, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
2921
+ }
2922
+ r = [...r, n], this._inflightMessage = n, this._receivedProgress = !1;
2923
+ let i = new AbortController();
2924
+ this._abortController = i, this._patchState({
2925
+ messages: r,
2926
+ isGenerating: !0,
2927
+ progress: jn(),
2928
+ progressCollapsed: !1,
2929
+ inflightMessage: n
2930
+ });
2931
+ let a = t, o = [...this._state.selectedDatasets];
2932
+ if (this._hasCallback("onPromptSubmitted")) {
2933
+ let t = this.buildPromptSubmittedDetail(e.prompt, o, a, i.signal);
2934
+ try {
2935
+ await this._invokeCallback("onPromptSubmitted", t);
2936
+ } catch (e) {
2937
+ e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, n), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
2938
+ }
2939
+ return;
2940
+ }
2941
+ let s = this.buildRequestBody(e.prompt, t), c = Or(this._config.agent), l = {
2942
+ aiMessage: n,
2943
+ callbacks: this._createStreamCallbacks(),
2944
+ state: kr()
2945
+ }, u = this._config.fetchStreaming ?? Dn, d = !1;
2946
+ try {
2947
+ let { body: e, conversationId: t } = await u({
2948
+ url: this.getAiPromptUrl(),
2949
+ body: s,
2950
+ signal: i.signal
2951
+ });
2952
+ t && this._setConversationId(t), await An(e, (e) => c(e, l)), d = !0;
2953
+ } catch (e) {
2954
+ e.name !== "AbortError" && (this._handleSubmitError(e, n), d = !0);
2955
+ } finally {
2956
+ this._abortController === i && (d ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
2957
+ }
2958
+ }
2959
+ async restore(e) {
2960
+ if (this._config.agent !== "item") return {};
2961
+ let t = En(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
2962
+ if (this._patchState({
2963
+ isGenerating: !0,
2964
+ progress: null,
2965
+ progressCollapsed: !1
2966
+ }), this._hasCallback("onRestoreRequested")) {
2967
+ let n = {
2968
+ apiMessageId: e.restoreToMessageId,
2969
+ messageIndex: e.messageIndex,
2970
+ request: t,
2971
+ url: this.getAiPromptUrl()
2972
+ };
2973
+ try {
2974
+ await this._invokeCallback("onRestoreRequested", n);
2975
+ } finally {
2976
+ this._patchState({ isGenerating: !1 });
2977
+ }
2978
+ return {};
2979
+ }
2980
+ try {
2981
+ let n = await fetch(this.getAiPromptUrl(), {
2982
+ method: "POST",
2983
+ headers: { "Content-Type": "application/json" },
2984
+ mode: "cors",
2985
+ body: JSON.stringify(t)
2986
+ });
2987
+ if (!n.ok) {
2988
+ let e = await n.json().catch(() => null);
2989
+ throw Error(e?.message || `API request failed with status ${n.status}`);
2990
+ }
2991
+ let r = await n.json().catch(() => null), i = r?.generatedChart ?? (r ? zn(r) : null), a = {
2992
+ ...typeof r?.message == "string" ? { message: r.message } : {},
2993
+ ...i ? { chart: {
2994
+ ...r,
2995
+ generatedChart: i
2996
+ } } : {}
2997
+ }, o = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
2998
+ if (a.message && o[e.messageIndex]?.type === "ai" && (o[e.messageIndex] = {
2999
+ ...o[e.messageIndex],
3000
+ message: a.message
3001
+ }), this._patchState({ messages: [...o] }), a.chart || a.message) {
3002
+ let t = o[e.messageIndex], n = t?.type === "ai" ? t : {
3003
+ id: Ar(),
3004
+ type: "ai",
3005
+ message: a.message ?? ""
3006
+ };
3007
+ this._emit("onComplete", {
3008
+ agent: this._config.agent,
3009
+ conversationId: this._state.conversationId,
3010
+ message: n,
3011
+ ...a.chart ? { chart: a.chart } : {},
3012
+ ...r ? { raw: r } : {}
3013
+ });
3014
+ }
3015
+ return a;
3016
+ } finally {
3017
+ this._patchState({ isGenerating: !1 });
3018
+ }
3019
+ }
3020
+ buildRestoreRequest(e) {
3021
+ return En(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3022
+ }
3023
+ abort(e = {}) {
3024
+ this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
3025
+ isGenerating: !1,
3026
+ progress: null,
3027
+ progressCollapsed: !1
3028
+ }), e.notify && this._emit("onPromptStopped");
3029
+ }
3030
+ _abortInflight() {
3031
+ this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
3032
+ }
3033
+ _createStreamCallbacks() {
3034
+ return {
3035
+ onConversationIdChange: (e) => this._setConversationId(e),
3036
+ onProgress: (e) => {
3037
+ this._receivedProgress = !0, this._patchState({ progress: e });
3038
+ },
3039
+ onProgressCollapsed: (e) => {
3040
+ this._patchState({ progressCollapsed: e });
3041
+ },
3042
+ onMessageUpdate: (e) => {
3043
+ this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
3044
+ },
3045
+ getConversationId: () => this._state.conversationId,
3046
+ onStep: (e) => {
3047
+ this._emit("onStep", e);
3048
+ },
3049
+ onComplete: (e) => {
3050
+ this._emit("onComplete", e);
3051
+ }
3052
+ };
3053
+ }
3054
+ _setConversationId(e) {
3055
+ this._config = {
3056
+ ...this._config,
3057
+ conversationId: e
3058
+ }, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
3059
+ }
3060
+ _upsertMessage(e) {
3061
+ let t = this._state.messages.findIndex((t) => t.id === e.id);
3062
+ if (t === -1) {
3063
+ this._patchState({ messages: [...this._state.messages, { ...e }] });
3064
+ return;
3065
+ }
3066
+ let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
3067
+ this._patchState({ messages: n });
3068
+ }
3069
+ _finalizeInflightMessage() {
3070
+ this._inflightMessage && (this._state.progress && this._receivedProgress && (this._inflightMessage.progress = structuredClone(this._state.progress), this._upsertMessage(this._inflightMessage)), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({
3071
+ progress: null,
3072
+ progressCollapsed: !1,
3073
+ inflightMessage: null
3074
+ }));
3075
+ }
3076
+ _removeInflightFromMessages() {
3077
+ this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
3078
+ }
3079
+ _markInflightCancelled(e) {
3080
+ this._inflightMessage && (this._inflightMessage.message = e ?? n("Response cancelled.", { desc: "Placeholder shown in ai chat where the assistant reply would appear when the user stops an in-flight response" }), this._inflightMessage.isCancelled = !0, this._inflightMessage.hasChart = !1, delete this._inflightMessage.progress, this._upsertMessage(this._inflightMessage), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({ inflightMessage: null }));
3081
+ }
3082
+ _discardInflightMessage() {
3083
+ let e = !!(this._inflightMessage || this._state.inflightMessage);
3084
+ this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
3085
+ }
3086
+ _handleSubmitError(e, t) {
3087
+ t.message = n("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" }), t.isError = !0, delete t.progress, this._inflightMessage = t, this._upsertMessage(t), this._patchState({
3088
+ inflightMessage: { ...t },
3089
+ progress: null,
3090
+ progressCollapsed: !1
3091
+ }), this._emit("onComplete", {
3092
+ agent: this._config.agent,
3093
+ conversationId: this._state.conversationId,
3094
+ message: t,
3095
+ error: e
3096
+ });
3097
+ }
3098
+ _hasCallback(e) {
3099
+ return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
3100
+ }
3101
+ _emit(e, ...t) {
3102
+ this._invokeCallback(e, ...t);
3103
+ }
3104
+ async _invokeCallback(e, ...t) {
3105
+ let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
3106
+ typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
3107
+ }
3108
+ _patchState(e) {
3109
+ this._state = {
3110
+ ...this._state,
3111
+ ...e
3112
+ }, this._emit("onStateChange", this._state);
3113
+ for (let e of this._subscribers) e(this._state);
3114
+ }
3115
+ _areSelectedDatasetsEqual(e, t) {
3116
+ return e.length === t.length ? e.every((e, n) => e.id === t[n]?.id) : !1;
3117
+ }
3118
+ _areChatMessagesEqual(e, t) {
3119
+ return e.length === t.length ? e.every((e, n) => {
3120
+ let r = t[n];
3121
+ return e.id === r?.id && e.apiMessageId === r?.apiMessageId && e.type === r?.type && e.message === r?.message && e.isError === r?.isError && e.isCancelled === r?.isCancelled && e.hasChart === r?.hasChart && JSON.stringify(e.progress ?? null) === JSON.stringify(r?.progress ?? null);
3122
+ }) : !1;
3123
+ }
3124
+ };
3125
+ function Mr(e, t) {
3126
+ return new jr(e, t);
3127
+ }
3128
+ //#endregion
3129
+ //#region src/components/ai-chat/session/ai-chat-session-controller.ts
3130
+ var Nr = class {
3131
+ constructor(e) {
3132
+ this.options = e, this._session = null, this._ownsSession = !1, this._seededFromProps = !1, this._unsubscribe = null;
3133
+ }
3134
+ get current() {
3135
+ return this._session;
3136
+ }
3137
+ get state() {
3138
+ if (this._session) return this._session.state;
3139
+ let e = this.options.getSeed();
3140
+ return {
3141
+ messages: e.messages,
3142
+ selectedDatasets: e.selectedDatasets,
3143
+ isGenerating: !1,
3144
+ progress: null,
3145
+ progressCollapsed: !1,
3146
+ conversationId: e.conversationId,
3147
+ inflightMessage: null
3148
+ };
3149
+ }
3150
+ get ownsCurrentSession() {
3151
+ return this._ownsSession;
3152
+ }
3153
+ setSession(e) {
3154
+ if (!e) {
3155
+ this._clearSession();
3156
+ return;
3157
+ }
3158
+ this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, e.updateConfig(this.options.getConfig()), this._wire(e);
3159
+ }
3160
+ syncProperties(e) {
3161
+ if (!e.has("chatSession")) {
3162
+ if (this._createSessionIfMissing(), this._session) {
3163
+ let t = this.options.getConfig();
3164
+ Object.keys(t).some((t) => e.has(t)) && this._session.updateConfig(t);
3165
+ }
3166
+ (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3167
+ }
3168
+ }
3169
+ requireSession() {
3170
+ return this._createSessionIfMissing(), this._session.updateConfig(this.options.getConfig()), this._session;
3171
+ }
3172
+ connect() {
3173
+ this._session && this._wire(this._session);
3174
+ }
3175
+ teardown() {
3176
+ this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3177
+ }
3178
+ _createSessionIfMissing() {
3179
+ if (this._session) return;
3180
+ let e = this.options.getSeed();
3181
+ this._session = Mr({
3182
+ ...this.options.getConfig(),
3183
+ messages: e.messages.length > 0 ? [...e.messages] : void 0,
3184
+ selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3185
+ }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3186
+ }
3187
+ _clearSession() {
3188
+ this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3189
+ }
3190
+ _seedFromPropsOnce() {
3191
+ if (!this._ownsSession || this._seededFromProps) return;
3192
+ let e = this.requireSession(), t = this.options.getSeed(), n = {};
3193
+ e.state.messages.length === 0 && t.messages.length > 0 && (n.messages = [...t.messages]), e.state.selectedDatasets.length === 0 && t.selectedDatasets.length > 0 && (n.selectedDatasets = [...t.selectedDatasets]), Object.keys(n).length > 0 && (e.updateConfig(n), this._seededFromProps = !0);
3194
+ }
3195
+ _wire(e) {
3196
+ this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3197
+ this.options.onRenderNeeded();
3198
+ });
3199
+ }
3200
+ _unwire() {
3201
+ this._unsubscribe?.(), this._unsubscribe = null;
3202
+ }
3203
+ }, Pr = ":host{box-sizing:border-box;flex-direction:column;width:100%;height:100%;display:flex}:host .chat-container{background:var(--luzmo-ai-chat-background,var(--ai-chat-background));border-radius:var(--luzmo-ai-chat-border-radius,var(--ai-chat-border-radius));width:100%;height:100%;min-height:0;padding:var(--luzmo-ai-chat-padding,var(--ai-chat-padding));gap:var(--luzmo-ai-chat-gap,var(--ai-chat-gap));border:var(--luzmo-ai-chat-border,var(--ai-chat-border));box-shadow:var(--luzmo-ai-chat-box-shadow,var(--ai-chat-box-shadow));box-sizing:border-box;flex-direction:column;flex:1;display:flex;overflow:hidden}:host .chat-messages-container{gap:var(--luzmo-ai-chat-gap,var(--ai-chat-gap));flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}:host .chat-messages-container luzmo-ai-chat-empty-state{flex:1;min-height:0}:host .chat-messages-container::-webkit-scrollbar{width:var(--luzmo-ai-chat-scrollbar-width,var(--ai-chat-scrollbar-width))}:host .chat-messages-container::-webkit-scrollbar-track{background:var(--luzmo-ai-chat-scrollbar-track-background,var(--ai-chat-scrollbar-track-background));border-radius:var(--luzmo-ai-chat-scrollbar-track-border-radius,var(--ai-chat-scrollbar-track-border-radius))}:host .chat-messages-container::-webkit-scrollbar-thumb{background:var(--luzmo-ai-chat-scrollbar-thumb-background,var(--ai-chat-scrollbar-thumb-background));border-radius:var(--luzmo-ai-chat-scrollbar-thumb-border-radius,var(--ai-chat-scrollbar-thumb-border-radius))}:host .chat-messages-container::-webkit-scrollbar-thumb:hover{background:var(--luzmo-ai-chat-scrollbar-thumb-hover-background,var(--ai-chat-scrollbar-thumb-hover-background))}:host .chat-messages-container{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-ai-chat-scrollbar-thumb-background,var(--ai-chat-scrollbar-thumb-background)) var(--luzmo-ai-chat-scrollbar-track-background,var(--ai-chat-scrollbar-track-background))}:host luzmo-chat-message{--luzmo-primary:rgba(var(--luzmo-primary-rgb), .08);--chat-message-primary-text-color:var(--luzmo-font-color);--chat-message-primary-border-color:transparent}:host luzmo-chat-message.error{color:var(--luzmo-ai-chat-error-message-color,var(--ai-chat-error-message-color))}:host luzmo-chat-message.cancelled{color:var(--luzmo-ai-chat-cancelled-message-color,var(--ai-chat-cancelled-message-color));font-style:italic}:host .markdown-content{line-height:var(--luzmo-ai-chat-markdown-line-height,var(--ai-chat-markdown-line-height))}:host .markdown-content>:first-child{margin-top:0}:host .markdown-content>:last-child{margin-bottom:0}:host .markdown-content p,:host .markdown-content ul,:host .markdown-content ol,:host .markdown-content blockquote,:host .markdown-content pre,:host .markdown-content table{margin:0 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing))}:host .markdown-content h1,:host .markdown-content h2,:host .markdown-content h3,:host .markdown-content h4,:host .markdown-content h5,:host .markdown-content h6{margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing));font-weight:var(--luzmo-ai-chat-markdown-heading-font-weight,var(--ai-chat-markdown-heading-font-weight))}:host .markdown-content ul,:host .markdown-content ol{padding-inline-start:var(--luzmo-ai-chat-markdown-list-indent,var(--ai-chat-markdown-list-indent))}:host .markdown-content a{color:var(--luzmo-ai-chat-markdown-link-color,var(--ai-chat-markdown-link-color))}:host .markdown-content code{font-family:var(--luzmo-ai-chat-markdown-code-font-family,var(--ai-chat-markdown-code-font-family));font-size:var(--luzmo-ai-chat-markdown-code-font-size,var(--ai-chat-markdown-code-font-size));background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.1em .3em}:host .markdown-content pre{background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.75em 1em;overflow-x:auto}:host .markdown-content pre code{background:0 0;padding:0}:host .markdown-content blockquote{border-inline-start:.1875rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));padding-inline-start:.75rem}:host .markdown-content hr{border:0;border-top:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0}:host .markdown-content table{border-collapse:collapse;width:100%}:host .markdown-content th,:host .markdown-content td{border:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));text-align:start;padding:.375rem .625rem}:host .markdown-content th{background:var(--luzmo-ai-chat-markdown-table-header-background,var(--ai-chat-markdown-table-header-background));font-weight:600}:host .assistant-message-wrapper{gap:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));--chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--luzmo-chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--luzmo-chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));--luzmo-chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));flex-direction:column;display:flex}:host .assistant-message-body{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-actions{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:none}:host .assistant-message-actions.assistant-message-actions--has-content{display:flex}:host .assistant-message-actions slot::slotted(luzmo-button),:host .assistant-message-actions slot::slotted(button),:host .assistant-message-actions slot::slotted(a),:host .assistant-message-actions slot::slotted(input),:host .assistant-message-actions slot::slotted(select),:host .assistant-message-actions slot::slotted(textarea){font-style:normal}:host .assistant-message-actions slot::slotted(:not(luzmo-button):not(button):not(a):not(input):not(select):not(textarea)){font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style));color:var(--luzmo-ai-chat-assistant-message-actions-color,var(--ai-chat-assistant-message-actions-color))}:host .assistant-context-menu-trigger{width:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));height:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));border:.0625rem solid var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));border-radius:var(--luzmo-ai-chat-context-menu-trigger-border-radius,var(--ai-chat-context-menu-trigger-border-radius));background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color));cursor:pointer;justify-content:center;align-items:center;padding:0;font-size:.875rem;line-height:1;transition:all .15s;display:inline-flex}:host .assistant-context-menu-trigger:hover{background:var(--luzmo-ai-chat-context-menu-trigger-hover-background,var(--ai-chat-context-menu-trigger-hover-background));border-color:var(--luzmo-ai-chat-context-menu-trigger-hover-border-color,var(--ai-chat-context-menu-trigger-hover-border-color));color:var(--luzmo-ai-chat-context-menu-trigger-hover-color,var(--ai-chat-context-menu-trigger-hover-color))}:host .assistant-context-menu-trigger:disabled{cursor:not-allowed;opacity:.6}:host .assistant-context-menu-trigger:disabled:hover{background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));border-color:var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color))}:host .assistant-context-menu-item{width:100%;color:var(--luzmo-font-color);text-align:start;cursor:pointer;font-family:var(--luzmo-ai-chat-context-menu-item-font-family,var(--ai-chat-context-menu-item-font-family));background:0 0;border:0;padding:.5rem .75rem}:host .assistant-context-menu-item:hover{background:var(--luzmo-ai-chat-context-menu-item-hover-background,var(--ai-chat-context-menu-item-hover-background))}:host .assistant-context-menu-item:disabled{opacity:.4;cursor:not-allowed}:host .assistant-context-menu-item:disabled:hover{background:0 0}:host luzmo-ai-interaction-textarea{flex-grow:0;flex-shrink:0}:host luzmo-progress-steps{padding:0 .25rem}:host .loading-message{color:var(--luzmo-font-color);align-items:center;gap:.5rem;display:flex}:host .loading-message svg{color:var(--luzmo-ai-chat-loading-message-color,var(--ai-chat-loading-message-color));font-size:var(--luzmo-ai-chat-loading-message-icon-font-size,var(--ai-chat-loading-message-icon-font-size,1rem));justify-content:center;align-items:center;display:flex}:host .loading-message svg.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){:host .assistant-context-menu-trigger{transition:none}:host .loading-message svg.spin{animation:none}}:host{--ai-chat-background:var(--luzmo-background-color);--ai-chat-border-radius:0;--ai-chat-padding:0;--ai-chat-gap:1rem;--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:1rem;--ai-chat-error-message-color:var(--luzmo-danger,#dc3545);--ai-chat-cancelled-message-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed));--ai-chat-scrollbar-width:var(--luzmo-scrollbar-size);--ai-chat-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--ai-chat-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--ai-chat-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--ai-chat-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--ai-chat-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--ai-chat-context-menu-trigger-size:1.5rem;--ai-chat-context-menu-trigger-border-color:var(--luzmo-border-color);--ai-chat-context-menu-trigger-border-radius:.375rem;--ai-chat-context-menu-trigger-background:var(--luzmo-background-color,transparent);--ai-chat-context-menu-trigger-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-trigger-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-trigger-hover-border-color:var(--luzmo-border-color-hover,var(--luzmo-border-color));--ai-chat-context-menu-trigger-hover-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-item-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-item-font-family:var(--luzmo-font-family);--ai-chat-markdown-line-height:1.5;--ai-chat-markdown-spacing:var(--luzmo-spacing-3);--ai-chat-markdown-heading-spacing:var(--luzmo-spacing-4);--ai-chat-markdown-heading-font-weight:var(--luzmo-font-weight-bold);--ai-chat-markdown-list-indent:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-markdown-link-color:var(--luzmo-primary);--ai-chat-markdown-code-font-family:var(--luzmo-font-family-mono,ui-monospace, monospace);--ai-chat-markdown-code-font-size:.875em;--ai-chat-markdown-code-background:var(--luzmo-background-color-highlight);--ai-chat-markdown-code-border-radius:var(--luzmo-border-radius-s);--ai-chat-markdown-border-color:var(--luzmo-border-color);--ai-chat-markdown-table-header-background:var(--luzmo-background-color-highlight);--ai-chat-assistant-message-actions-gap:var(--luzmo-spacing-2);--ai-chat-assistant-message-actions-margin-top:var(--luzmo-spacing-2);--ai-chat-assistant-message-actions-color:var(--luzmo-font-color-extra-dimmed);--ai-chat-assistant-message-actions-font-style:italic;--ai-chat-assistant-message-font-family:var(--luzmo-font-family);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-s,12px);--ai-chat-assistant-message-line-height:var(--ai-chat-markdown-line-height)}", $ = class t extends e {
3204
+ constructor(...e) {
3205
+ super(...e), this.messages = [], this.selectedDatasets = [], this.placeholder = "Describe your change", this.disabled = !1, this.stoppable = !1, this.showAssistantContextMenu = !1, this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.flagOpendata = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = null, this.timezoneId = "UTC", this.apiVersion = "0.1.0", this.stream = !0, this.loadingMessage = null, this.cancelledMessage = null, this.initialPrompt = null, this.emptyStateTitle = "", this.emptyStateSubtitle = "", this.emptyStateSuggestions = [], this._textareaValue = "", this._assistantMessageActionsHasContent = !1, this._lastProcessedInitialPrompt = null, this._session = new Nr({
3206
+ getConfig: () => this._buildSessionConfig(),
3207
+ getSeed: () => ({
3208
+ messages: this.messages,
3209
+ selectedDatasets: this.selectedDatasets,
3210
+ conversationId: this.conversationId
3211
+ }),
3212
+ createDomBridge: () => this._createDomBridgeCallbacks(),
3213
+ onRenderNeeded: () => {
3214
+ this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
3215
+ }
3216
+ }), this._handleAssistantMessageActionsSlotChange = (e) => {
3217
+ let t = e.target;
3218
+ this._setAssistantMessageActionsHasContent(t.assignedElements({ flatten: !0 }).length > 0);
3219
+ };
3220
+ }
3221
+ static {
3222
+ this.styles = c(Pr);
3223
+ }
3224
+ static {
3225
+ this.tagName = "luzmo-ai-chat";
3226
+ }
3227
+ static {
3228
+ this.assistantMessageActionsSlot = "assistant-message-actions";
3229
+ }
3230
+ get session() {
3231
+ return this._session.current;
3232
+ }
3233
+ _getRenderState() {
3234
+ return this._session.state;
3235
+ }
3236
+ _createDomBridgeCallbacks() {
3237
+ return {
3238
+ onMessageSent: (e, t) => {
3239
+ this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3240
+ detail: {
3241
+ message: e,
3242
+ selectedDatasets: t
3243
+ },
3244
+ bubbles: !0,
3245
+ composed: !0
3246
+ }));
3247
+ },
3248
+ onDatasetsChanged: (e) => {
3249
+ this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3250
+ detail: { selectedDatasets: e },
3251
+ bubbles: !0,
3252
+ composed: !0
3253
+ }));
3254
+ },
3255
+ onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3256
+ onStep: (e) => {
3257
+ this.dispatchEvent(new CustomEvent("luzmo-step", {
3258
+ detail: e,
3259
+ bubbles: !0,
3260
+ composed: !0
3261
+ }));
3262
+ },
3263
+ onComplete: (e) => {
3264
+ this.dispatchEvent(new CustomEvent("luzmo-complete", {
3265
+ detail: e,
3266
+ bubbles: !0,
3267
+ composed: !0
3268
+ }));
3269
+ },
3270
+ onPromptStopped: () => {
3271
+ this.dispatchEvent(new CustomEvent("luzmo-stop", {
3272
+ bubbles: !0,
3273
+ composed: !0
3274
+ }));
3275
+ }
3276
+ };
3277
+ }
3278
+ _buildSessionConfig() {
3279
+ return {
3280
+ agent: this.agent,
3281
+ authKey: this.authKey,
3282
+ authToken: this.authToken,
3283
+ apiUrl: this.apiUrl,
3284
+ apiVersion: this.apiVersion,
3285
+ stream: this.stream,
3286
+ conversationId: this.conversationId,
3287
+ chart: this.chart,
3288
+ dashboard: this.dashboard,
3289
+ currentScreenMode: this.currentScreenMode,
3290
+ localeId: this.localeId,
3291
+ timezoneId: this.timezoneId,
3292
+ task: this.task,
3293
+ modelPreference: this.modelPreference,
3294
+ requireDataset: this.requireDataset
3295
+ };
3296
+ }
3297
+ _emitConversationIdChanged(e) {
3298
+ this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3299
+ detail: { conversationId: e },
3300
+ bubbles: !0,
3301
+ composed: !0
3302
+ }));
3303
+ }
3304
+ async _restoreViaSession(e, t) {
3305
+ await this._session.requireSession().restore({
3306
+ restoreToMessageId: e,
3307
+ messageIndex: t
3308
+ });
3309
+ }
3310
+ async _handleRestoreState(e, t) {
3311
+ if (e.apiMessageId && this.agent === "item") try {
3312
+ await this._restoreViaSession(e.apiMessageId, t);
3313
+ } catch (e) {
3314
+ console.error("AI restore error:", e);
3315
+ }
3316
+ }
3317
+ _handleDatasetSelected(e) {
3318
+ this._session.requireSession().addDataset(e.detail);
3319
+ }
3320
+ _handleDatasetRemoved(e) {
3321
+ this._session.requireSession().removeDataset(e.detail.id);
3322
+ }
3323
+ async _submitViaSession(e, t = {}) {
3324
+ let n = this._session.requireSession();
3325
+ if (n.isDatasetRequirementMet()) {
3326
+ this._textareaValue = "";
3327
+ try {
3328
+ await n.submit({
3329
+ prompt: e,
3330
+ ...t
3331
+ });
3332
+ } catch (e) {
3333
+ e.name !== "AbortError" && console.error("AI prompt session error:", e);
3334
+ }
3335
+ }
3336
+ }
3337
+ async _handlePromptSubmitted(e) {
3338
+ await this._submitViaSession(e.detail.prompt);
3339
+ }
3340
+ _handlePromptStopped() {
3341
+ let e = this._session.current;
3342
+ if (this._textareaValue = "", e) {
3343
+ e.abort({
3344
+ notify: !0,
3345
+ cancelledMessage: this.cancelledMessage ?? void 0
3346
+ });
3347
+ return;
3348
+ }
3349
+ this.dispatchEvent(new CustomEvent("luzmo-stop", {
3350
+ bubbles: !0,
3351
+ composed: !0
3352
+ }));
3353
+ }
3354
+ async _handleEmptyStateSuggestionSelected(e) {
3355
+ let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3356
+ n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
3357
+ }
3358
+ async _processInitialPrompt() {
3359
+ !this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
3360
+ }
3361
+ connectedCallback() {
3362
+ super.connectedCallback(), this._session.connect();
3363
+ }
3364
+ disconnectedCallback() {
3365
+ super.disconnectedCallback(), this._session.teardown();
3366
+ }
3367
+ _scrollToBottom() {
3368
+ let e = this.shadowRoot?.querySelector(".chat-messages-container");
3369
+ e && requestAnimationFrame(() => {
3370
+ requestAnimationFrame(() => {
3371
+ e.scrollTop = e.scrollHeight;
3372
+ });
3373
+ });
3374
+ }
3375
+ updated(e) {
3376
+ super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), this.updateComplete.then(() => this._syncAssistantMessageActionsVisibility());
3377
+ }
3378
+ _syncSession(e) {
3379
+ if (e.has("chatSession")) {
3380
+ this._session.setSession(this.chatSession);
3381
+ return;
3382
+ }
3383
+ this._session.syncProperties(e);
3384
+ }
3385
+ _handleInitialPromptChange() {
3386
+ this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3387
+ }
3388
+ _renderMarkdown(e) {
3389
+ let t = String(Q.parse(e, { async: !1 }));
3390
+ return st.sanitize(t, {
3391
+ ALLOWED_TAGS: /* @__PURE__ */ "p.br.strong.em.b.i.u.s.code.pre.blockquote.hr.ul.ol.li.h1.h2.h3.h4.h5.h6.table.thead.tbody.tr.th.td.a".split("."),
3392
+ ALLOWED_ATTR: [
3393
+ "href",
3394
+ "title",
3395
+ "target",
3396
+ "rel"
3397
+ ],
3398
+ ALLOW_DATA_ATTR: !1,
3399
+ FORBID_TAGS: [
3400
+ "script",
3401
+ "style",
3402
+ "iframe",
3403
+ "object",
3404
+ "embed",
3405
+ "link",
3406
+ "form",
3407
+ "input",
3408
+ "button"
3409
+ ],
3410
+ FORBID_ATTR: [
3411
+ "onerror",
3412
+ "onload",
3413
+ "onclick",
3414
+ "onmouseover",
3415
+ "onfocus",
3416
+ "onblur"
3417
+ ]
3418
+ });
3419
+ }
3420
+ _renderProgress() {
3421
+ let { progress: e, progressCollapsed: t } = this._getRenderState();
3422
+ return e?.children?.length ? o`
3423
+ <luzmo-progress-steps
3424
+ .progress=${e}
3425
+ ?collapsed=${t}
3426
+ size="s"
3427
+ ></luzmo-progress-steps>
3428
+ ` : s;
3429
+ }
3430
+ _isLastAiMessageWithProgress(e, t) {
3431
+ for (let n = t.length - 1; n >= 0; n--) if (t[n].type === "ai" && t[n].progress?.children?.length) return t[n].id === e.id;
3432
+ return !1;
3433
+ }
3434
+ _syncAssistantMessageActionsVisibility() {
3435
+ let e = this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`);
3436
+ if (!e) {
3437
+ this._setAssistantMessageActionsHasContent(!1);
3438
+ return;
3439
+ }
3440
+ this._setAssistantMessageActionsHasContent(e.assignedElements({ flatten: !0 }).length > 0);
3441
+ }
3442
+ _setAssistantMessageActionsHasContent(e) {
3443
+ e !== this._assistantMessageActionsHasContent && (this._assistantMessageActionsHasContent = e);
3444
+ }
3445
+ _renderAssistantMessageActions(e, n) {
3446
+ return !n || e.id !== n ? s : o`
3447
+ <div
3448
+ class="assistant-message-actions ${this._assistantMessageActionsHasContent ? "assistant-message-actions--has-content" : ""}"
3449
+ >
3450
+ <slot
3451
+ name=${t.assistantMessageActionsSlot}
3452
+ @slotchange=${this._handleAssistantMessageActionsSlotChange}
3453
+ ></slot>
3454
+ </div>
3455
+ `;
3456
+ }
3457
+ _renderRestoreMenu(e, t, a, c = !1) {
3458
+ if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== a)) return s;
3459
+ let l = `context-menu-trigger-${e.apiMessageId}`;
3460
+ return o`
3461
+ <div class="assistant-context-menu">
3462
+ <button
3463
+ id=${l}
3464
+ class="assistant-context-menu-trigger"
3465
+ type="button"
3466
+ aria-label=${n("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
3467
+ aria-haspopup="menu"
3468
+ ?disabled=${c}
3469
+ >
3470
+ ${i(r)}
3471
+ </button>
3472
+ <luzmo-overlay
3473
+ trigger="${l}@click"
3474
+ placement="bottom-end"
3475
+ >
3476
+ <luzmo-popover>
3477
+ <button
3478
+ class="assistant-context-menu-item"
3479
+ type="button"
3480
+ ?disabled=${c}
3481
+ @click=${() => this._handleRestoreState(e, t)}
3482
+ >
3483
+ ${n("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
3484
+ </button>
3485
+ </luzmo-popover>
3486
+ </luzmo-overlay>
3487
+ </div>
3488
+ `;
3489
+ }
3490
+ _renderMessages() {
3491
+ let { messages: e, inflightMessage: t, isGenerating: n } = this._getRenderState(), r = t !== null, i = [...e].reverse().find((e) => e.type === "ai")?.id, a = e.filter((e) => !t || e.id !== t.id);
3492
+ return a.map((t) => {
3493
+ let c = !!t.progress?.children?.length, l = c && this._isLastAiMessageWithProgress(t, a), u = c && (r || n || !l), ee = c ? o`
3494
+ <luzmo-progress-steps
3495
+ .progress=${t.progress}
3496
+ ?condensed=${u}
3497
+ collapsed
3498
+ no-animate
3499
+ size="s"
3500
+ ></luzmo-progress-steps>
3501
+ ` : s;
3502
+ if (t.type === "user") return o`
3503
+ <luzmo-chat-message
3504
+ avatar-placement="bottom"
3505
+ position="right"
3506
+ variant="primary"
3507
+ size="s"
3508
+ >
3509
+ ${t.message}
3510
+ </luzmo-chat-message>
3511
+ `;
3512
+ let te = e.indexOf(t), ne = t.isError ? "error" : t.isCancelled ? "cancelled" : "", re = t.isCancelled ? t.message : o`<div class="markdown-content">${d(this._renderMarkdown(t.message))}</div>`;
3513
+ return o`
3514
+ ${ee}
3515
+ <div class="assistant-message-wrapper">
3516
+ <div class="assistant-message-body">
3517
+ <luzmo-chat-message
3518
+ class=${ne}
3519
+ role=${t.isError ? "alert" : s}
3520
+ avatar-placement="bottom"
3521
+ position="left"
3522
+ quiet
3523
+ size="s"
3524
+ >
3525
+ ${re}
3526
+ </luzmo-chat-message>
3527
+
3528
+ ${this._renderRestoreMenu(t, te, i, r)}
3529
+ </div>
3530
+
3531
+ ${this._renderAssistantMessageActions(t, i)}
3532
+ </div>
3533
+ `;
3534
+ });
3535
+ }
3536
+ _renderStreamingResponse() {
3537
+ let { inflightMessage: e } = this._getRenderState();
3538
+ return e?.message ? o`
3539
+ <luzmo-chat-message
3540
+ avatar-placement="bottom"
3541
+ position="left"
3542
+ quiet
3543
+ size="s"
3544
+ >
3545
+ <div class="markdown-content">${d(this._renderMarkdown(e.message))}</div>
3546
+ </luzmo-chat-message>
3547
+ ` : s;
3548
+ }
3549
+ _renderLoadingMessage() {
3550
+ let { isGenerating: e, progress: t, inflightMessage: r } = this._getRenderState();
3551
+ if (!e || t?.children?.length || r?.message) return s;
3552
+ let c = this.agent === "dashboard" ? !this.dashboard : this.chart?.type === "placeholder", l = this.agent === "dashboard" ? c ? n("Creating dashboard...", { desc: "Label for ai chat creating dashboard message" }) : n("Updating dashboard...", { desc: "Label for ai chat updating dashboard message" }) : c ? n("Creating item...", { desc: "Label for ai chat creating item message" }) : n("Updating item...", { desc: "Label for ai chat updating item message" });
3553
+ return o`
3554
+ <luzmo-chat-message
3555
+ avatar-placement="bottom"
3556
+ position="left"
3557
+ quiet
3558
+ size="s"
3559
+ >
3560
+ <div class="loading-message" role="status" aria-live="polite">
3561
+ <span class="icon-lg">${i(a, { className: "spin" })}</span>
3562
+ <span class="loading-message-text">${this.loadingMessage || l}</span>
3563
+ </div>
3564
+ </luzmo-chat-message>
3565
+ `;
3566
+ }
3567
+ _renderEmptyState() {
3568
+ if (this._getRenderState().messages.length > 0) return s;
3569
+ let e = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
3570
+ return o`
3571
+ <luzmo-ai-chat-empty-state
3572
+ .title=${this.emptyStateTitle || e}
3573
+ .subtitle=${t ? this.emptyStateSubtitle : ""}
3574
+ .suggestions=${this.emptyStateSuggestions}
3575
+ ?disabled=${this.disabled || this._getRenderState().isGenerating}
3576
+ @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
3577
+ ></luzmo-ai-chat-empty-state>
3578
+ `;
3579
+ }
3580
+ render() {
3581
+ let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
3582
+ return o`
3583
+ <div class="chat-container" role="region" aria-label=${n("AI Chat", { desc: "Accessible label for AI chat region" })}>
3584
+ <div class="chat-messages-container" role="log" aria-live="polite">
3585
+ ${this._renderEmptyState()}
3586
+ ${this._renderMessages()}
3587
+ ${this._renderProgress()}
3588
+ ${this._renderStreamingResponse()}
3589
+ ${this._renderLoadingMessage()}
3590
+ </div>
3591
+
3592
+ <luzmo-ai-interaction-textarea
3593
+ role="group"
3594
+ aria-label=${n("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
3595
+ .value=${this._textareaValue}
3596
+ .selectedDatasets=${e}
3597
+ .placeholder=${this.placeholder}
3598
+ ?disabled=${this.disabled}
3599
+ ?is-generating=${t}
3600
+ ?stoppable=${this.stoppable}
3601
+ ?hide-dataset-button=${this.hideDatasetButton}
3602
+ ?hide-dataset-icons=${this.hideDatasetIcons}
3603
+ ?disable-dataset-modification=${this.disableDatasetModification}
3604
+ ?hide-selected-datasets=${this.hideSelectedDatasets}
3605
+ ?disable-column-mentions=${this.disableColumnMentions}
3606
+ ?require-dataset=${this.requireDataset}
3607
+ auth-key=${this.authKey}
3608
+ auth-token=${this.authToken}
3609
+ api-url=${this.apiUrl}
3610
+ app-server=${this.appServer}
3611
+ ?flag-opendata=${this.flagOpendata}
3612
+ @prompt-submitted=${this._handlePromptSubmitted}
3613
+ @prompt-stopped=${this._handlePromptStopped}
3614
+ @dataset-selected=${this._handleDatasetSelected}
3615
+ @dataset-removed=${this._handleDatasetRemoved}
3616
+ ></luzmo-ai-interaction-textarea>
3617
+ </div>
3618
+ `;
3619
+ }
3620
+ };
3621
+ t([l({ type: Array })], $.prototype, "messages", void 0), t([l({
3622
+ type: Array,
3623
+ attribute: "selected-datasets"
3624
+ })], $.prototype, "selectedDatasets", void 0), t([l({ type: String })], $.prototype, "placeholder", void 0), t([l({
3625
+ type: Boolean,
3626
+ reflect: !0
3627
+ })], $.prototype, "disabled", void 0), t([l({
3628
+ type: Boolean,
3629
+ reflect: !0
3630
+ })], $.prototype, "stoppable", void 0), t([l({
3631
+ type: Boolean,
3632
+ attribute: "show-assistant-context-menu"
3633
+ })], $.prototype, "showAssistantContextMenu", void 0), t([l({
3634
+ type: String,
3635
+ attribute: "auth-key"
3636
+ })], $.prototype, "authKey", void 0), t([l({
3637
+ type: String,
3638
+ attribute: "auth-token"
3639
+ })], $.prototype, "authToken", void 0), t([l({
3640
+ type: String,
3641
+ attribute: "api-url"
3642
+ })], $.prototype, "apiUrl", void 0), t([l({
3643
+ type: String,
3644
+ attribute: "app-server"
3645
+ })], $.prototype, "appServer", void 0), t([l({
3646
+ type: Boolean,
3647
+ attribute: "flag-opendata"
3648
+ })], $.prototype, "flagOpendata", void 0), t([l({
3649
+ type: Boolean,
3650
+ attribute: "hide-dataset-button"
3651
+ })], $.prototype, "hideDatasetButton", void 0), t([l({
3652
+ type: Boolean,
3653
+ attribute: "hide-dataset-icons"
3654
+ })], $.prototype, "hideDatasetIcons", void 0), t([l({
3655
+ type: Boolean,
3656
+ attribute: "disable-dataset-modification"
3657
+ })], $.prototype, "disableDatasetModification", void 0), t([l({
3658
+ type: Boolean,
3659
+ attribute: "hide-selected-datasets"
3660
+ })], $.prototype, "hideSelectedDatasets", void 0), t([l({
3661
+ type: Boolean,
3662
+ attribute: "disable-column-mentions"
3663
+ })], $.prototype, "disableColumnMentions", void 0), t([l({
3664
+ type: Boolean,
3665
+ attribute: "require-dataset"
3666
+ })], $.prototype, "requireDataset", void 0), t([l({ type: String })], $.prototype, "agent", void 0), t([l({ type: String })], $.prototype, "task", void 0), t([l({
3667
+ type: String,
3668
+ attribute: "model-preference"
3669
+ })], $.prototype, "modelPreference", void 0), t([l({ attribute: !1 })], $.prototype, "chatSession", void 0), t([l({
3670
+ type: String,
3671
+ attribute: "conversation-id"
3672
+ })], $.prototype, "conversationId", void 0), t([l({
3673
+ type: Object,
3674
+ attribute: "chart"
3675
+ })], $.prototype, "chart", void 0), t([l({ type: Object })], $.prototype, "dashboard", void 0), t([l({
3676
+ type: String,
3677
+ attribute: "current-screen-mode"
3678
+ })], $.prototype, "currentScreenMode", void 0), t([l({
3679
+ type: String,
3680
+ attribute: "locale-id"
3681
+ })], $.prototype, "localeId", void 0), t([l({
3682
+ type: String,
3683
+ attribute: "timezone-id"
3684
+ })], $.prototype, "timezoneId", void 0), t([l({
3685
+ type: String,
3686
+ attribute: "api-version"
3687
+ })], $.prototype, "apiVersion", void 0), t([l({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), t([l({
3688
+ type: String,
3689
+ attribute: "loading-message"
3690
+ })], $.prototype, "loadingMessage", void 0), t([l({
3691
+ type: String,
3692
+ attribute: "cancelled-message"
3693
+ })], $.prototype, "cancelledMessage", void 0), t([l({
3694
+ type: String,
3695
+ attribute: "initial-prompt"
3696
+ })], $.prototype, "initialPrompt", void 0), t([l({
3697
+ type: String,
3698
+ attribute: "empty-state-title"
3699
+ })], $.prototype, "emptyStateTitle", void 0), t([l({
3700
+ type: String,
3701
+ attribute: "empty-state-subtitle"
3702
+ })], $.prototype, "emptyStateSubtitle", void 0), t([l({
3703
+ type: Array,
3704
+ attribute: !1
3705
+ })], $.prototype, "emptyStateSuggestions", void 0), t([u()], $.prototype, "_textareaValue", void 0), t([u()], $.prototype, "_assistantMessageActionsHasContent", void 0);
3706
+ //#endregion
3707
+ //#region src/components/ai-chat/ai-chat-events.ts
3708
+ function Fr(e) {
3709
+ return e.recognized === !0;
3710
+ }
3711
+ //#endregion
3712
+ //#region src/components/ai-chat/index.ts
3713
+ customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
3714
+ //#endregion
3715
+ export { vn as C, xn as S, gn as T, En as _, Mr as a, Cn as b, Dr as c, Un as d, jn as f, An as g, On as h, jr as i, Er as l, Dn as m, $ as n, kr as o, Mn as p, Nr as r, Or as s, Fr as t, zn as u, wn as v, _n as w, Sn as x, Tn as y };