@luzmo/analytics-components-kit 1.0.4-beta.4 → 1.0.4

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 (1143) hide show
  1. package/README.md +11 -5
  2. package/components/area-chart-options.config-CJYI-zcZ.cjs +20 -0
  3. package/components/area-chart-options.config-CxJWxcD9.js +146 -0
  4. package/components/area-chart-positioning.config-CE8lOCfT.cjs +20 -0
  5. package/components/area-chart-positioning.config-CQW5h7Eg.js +55 -0
  6. package/components/area-chart-slots.config-B56LJaky.cjs +20 -0
  7. package/components/area-chart-slots.config-C22ZF9l0.js +55 -0
  8. package/components/bar-chart-options.config-BAatAyhW.js +220 -0
  9. package/components/bar-chart-options.config-D2a-U6kG.cjs +20 -0
  10. package/components/bar-chart-positioning.config-DFI1wzOQ.cjs +20 -0
  11. package/components/bar-chart-positioning.config-DaH_x_VU.js +59 -0
  12. package/components/bar-chart-slots.config-BbgFihbK.js +50 -0
  13. package/components/bar-chart-slots.config-CkOVmYcA.cjs +20 -0
  14. package/components/base-CYiGlWug.cjs +20 -0
  15. package/components/base-p2I4mVSW.js +248 -0
  16. package/components/base-store-D0jbv0bE.js +160 -0
  17. package/components/base-store-ab2wBsBE.cjs +20 -0
  18. package/components/box-plot-options.config-BuX2wNhp.js +296 -0
  19. package/components/box-plot-options.config-Di28EvZb.cjs +20 -0
  20. package/components/box-plot-positioning.config-FOyav5Zq.cjs +20 -0
  21. package/components/box-plot-positioning.config-K2tQGMig.js +48 -0
  22. package/components/box-plot-slots.config-DL-tTTn9.cjs +20 -0
  23. package/components/box-plot-slots.config-OeublT6p.js +40 -0
  24. package/components/bubble-chart-options.config-C_XQOHgH.js +115 -0
  25. package/components/bubble-chart-options.config-CnpBrIo6.cjs +20 -0
  26. package/components/bubble-chart-positioning.config-B6DXfqa4.cjs +20 -0
  27. package/components/bubble-chart-positioning.config-D2fwO2JM.js +55 -0
  28. package/components/bubble-chart-slots.config-Bdy20Xqs.js +47 -0
  29. package/components/bubble-chart-slots.config-smlOOwcK.cjs +20 -0
  30. package/components/bullet-chart-options.config-6nATAuC3.cjs +20 -0
  31. package/components/bullet-chart-options.config-h5BFyszP.js +75 -0
  32. package/components/bullet-chart-positioning.config-DOAG2wFN.js +56 -0
  33. package/components/bullet-chart-positioning.config-DZqzqZSQ.cjs +20 -0
  34. package/components/bullet-chart-slots.config-BaTbWYvU.cjs +20 -0
  35. package/components/bullet-chart-slots.config-Cqj3i1qo.js +46 -0
  36. package/components/choropleth-map-options.config-CmtZtBAC.cjs +20 -0
  37. package/components/choropleth-map-options.config-YCo77O3q.js +348 -0
  38. package/components/choropleth-map-positioning.config-C3jO3j8R.cjs +20 -0
  39. package/components/choropleth-map-positioning.config-Jw6fAFM1.js +55 -0
  40. package/components/choropleth-map-slots.config-ClMcW8wV.cjs +20 -0
  41. package/components/choropleth-map-slots.config-D4vxtdtH.js +53 -0
  42. package/components/circle-pack-chart-options.config-BA_G1sQ8.cjs +20 -0
  43. package/components/circle-pack-chart-options.config-C0cEtjgC.js +54 -0
  44. package/components/circle-pack-chart-positioning.config-Ckb-1sUG.js +48 -0
  45. package/components/circle-pack-chart-positioning.config-DJT6ivEy.cjs +20 -0
  46. package/components/circle-pack-chart-slots.config-Dks8K3uQ.js +38 -0
  47. package/components/circle-pack-chart-slots.config-IH2KV7z1.cjs +20 -0
  48. package/components/circular-gauge-options.config-BtP-YDIr.cjs +20 -0
  49. package/components/circular-gauge-options.config-Cdnk-Sp0.js +188 -0
  50. package/components/circular-gauge-positioning.config-B8gL5Br9.cjs +20 -0
  51. package/components/circular-gauge-positioning.config-BGlDGhYZ.js +48 -0
  52. package/components/circular-gauge-slots.config-B6ajddW-.cjs +20 -0
  53. package/components/circular-gauge-slots.config-Wf4sHmk6.js +39 -0
  54. package/components/color-CXw2IfjN.js +3812 -0
  55. package/components/color-range-utils-u4ziqRRA.js +63 -0
  56. package/components/column-chart-options.config-DoZLlIRM.js +219 -0
  57. package/components/column-chart-options.config-eJ1Cexxe.cjs +20 -0
  58. package/components/column-chart-positioning.config-BJGWvFLD.js +55 -0
  59. package/components/column-chart-positioning.config-LzBETWIy.cjs +20 -0
  60. package/components/column-chart-slots.config-BY6y_rvE.cjs +20 -0
  61. package/components/column-chart-slots.config-BhVqSbKw.js +50 -0
  62. package/components/combination-chart-options.config-C3kZ2fpK.cjs +20 -0
  63. package/components/combination-chart-options.config-D7ZXfn61.js +87 -0
  64. package/components/combination-chart-positioning.config-DjmWx90S.cjs +20 -0
  65. package/components/combination-chart-positioning.config-DtneKdwK.js +48 -0
  66. package/components/combination-chart-slots.config-CK8YBgUl.js +43 -0
  67. package/components/combination-chart-slots.config-Ciza_y3a.cjs +20 -0
  68. package/components/conditional-number-options.config-BwSMI5Ax.js +205 -0
  69. package/components/conditional-number-options.config-CadHLi0m.cjs +20 -0
  70. package/components/conditional-number-positioning.config-C8bRdffQ.cjs +20 -0
  71. package/components/conditional-number-positioning.config-Ccb2yjJU.js +48 -0
  72. package/components/conditional-number-slots.config-CWX6OuUa.cjs +20 -0
  73. package/components/conditional-number-slots.config-xSNaYD4u.js +39 -0
  74. package/components/data-broker-BH5WDG0j.cjs +20 -0
  75. package/components/data-broker-CVDImE1j.js +1674 -0
  76. package/components/data-field/index.cjs +1 -1
  77. package/components/data-field/index.d.ts +0 -1
  78. package/components/data-field/index.js +1 -1
  79. package/components/data-field-iGBGWoGH.cjs +89 -0
  80. package/components/data-field-ll2oFVG2.js +340 -0
  81. package/components/data-field-panel/index.cjs +1 -1
  82. package/components/data-field-panel/index.d.ts +0 -1
  83. package/components/data-field-panel/index.js +1 -1
  84. package/components/data-field-panel-NktuTUUp.cjs +87 -0
  85. package/components/data-field-panel-ntgCpQ_2.js +384 -0
  86. package/components/data-fields-select-DJFkrrPs.js +261 -0
  87. package/components/data-fields-select-DL1nFRg3.cjs +41 -0
  88. package/components/date-comparison-filter-options.config--clPxHFt.cjs +20 -0
  89. package/components/date-comparison-filter-options.config-DCCm5Adt.js +126 -0
  90. package/components/date-comparison-filter-slots.config-KO9B0lfS.cjs +20 -0
  91. package/components/date-comparison-filter-slots.config-s7FcuKia.js +33 -0
  92. package/components/date-filter-options.config-BdNFe-Ds.cjs +20 -0
  93. package/components/date-filter-options.config-DBwcMXzp.js +118 -0
  94. package/components/date-filter-slots.config-BrQoD-EF.cjs +20 -0
  95. package/components/date-filter-slots.config-pbd3rG9z.js +37 -0
  96. package/components/de-DqwsqE-U.js +478 -0
  97. package/components/de-tUSOg_BJ.cjs +20 -0
  98. package/components/display-settings-binning-CQKXGp11.cjs +56 -0
  99. package/components/display-settings-binning-DGxEB9Fa.js +112 -0
  100. package/components/display-settings-datetime-25LwuZM_.cjs +217 -0
  101. package/components/display-settings-datetime-CLx9sxA7.js +415 -0
  102. package/components/display-settings-grand-totals-1tBdxbFY.cjs +44 -0
  103. package/components/display-settings-grand-totals-B0Px90rH.js +91 -0
  104. package/components/display-settings-numeric-Bbx4qmpA.cjs +190 -0
  105. package/components/display-settings-numeric-CdEgzO7W.js +481 -0
  106. package/components/display-settings-period-over-period-4bJbXWB7.cjs +229 -0
  107. package/components/display-settings-period-over-period-lo3myRfT.js +434 -0
  108. package/components/donut-chart-options.config-Buas8fzJ.js +207 -0
  109. package/components/donut-chart-options.config-K-HkE7sL.cjs +20 -0
  110. package/components/donut-chart-positioning.config-2cYbI6p-.cjs +20 -0
  111. package/components/donut-chart-positioning.config-Dh3XI5f4.js +48 -0
  112. package/components/donut-chart-slots.config-CZWRHxZe.js +39 -0
  113. package/components/donut-chart-slots.config-RxPnpO6M.cjs +20 -0
  114. package/components/dropdown-filter-options.config-B-Vvy0Nq.cjs +20 -0
  115. package/components/dropdown-filter-options.config-gv1y1OkC.js +153 -0
  116. package/components/dropdown-filter-slots.config-BBZChIHC.cjs +20 -0
  117. package/components/dropdown-filter-slots.config-aP5hvp2K.js +38 -0
  118. package/components/en-GB-D7N1nMuy.js +28 -0
  119. package/components/en-GB-DCZl8CPc.cjs +20 -0
  120. package/components/en-OJGeTneC.js +21 -0
  121. package/components/en-US-OJGeTneC.js +21 -0
  122. package/components/en-US-hPjCnvK0.cjs +20 -0
  123. package/components/en-hPjCnvK0.cjs +20 -0
  124. package/components/es-C-5Yqnck.js +478 -0
  125. package/components/es-Czecz2xB.cjs +20 -0
  126. package/components/evolution-number-options.config-B1IomzV1.js +228 -0
  127. package/components/evolution-number-options.config-Bt1FZqqQ.cjs +20 -0
  128. package/components/evolution-number-positioning.config-BQQrOKbD.js +48 -0
  129. package/components/evolution-number-positioning.config-BX1lWtDL.cjs +20 -0
  130. package/components/evolution-number-slots.config-CYxdcD-x.cjs +20 -0
  131. package/components/evolution-number-slots.config-eOQDWZyb.js +37 -0
  132. package/components/filters/index.cjs +1 -1
  133. package/components/filters/index.js +1 -1
  134. package/components/filters-Bzx4DYm-.cjs +323 -0
  135. package/components/filters-DSod7vIq.js +1637 -0
  136. package/components/formula/index.cjs +1 -1
  137. package/components/formula/index.js +1 -1
  138. package/components/formula-DcCDYDt4.cjs +45 -0
  139. package/components/formula-TyfDRy5X.js +137 -0
  140. package/components/formula-codemirror-B6ktT1Dm.js +11971 -0
  141. package/components/formula-codemirror-Bewi7Xgc.cjs +215 -0
  142. package/components/formula-display-store-DxjO7Q-n.cjs +20 -0
  143. package/components/formula-display-store-ycPV0gru.js +1119 -0
  144. package/components/formula-editor/index.cjs +1 -1
  145. package/components/formula-editor/index.d.ts +0 -1
  146. package/components/formula-editor/index.js +3 -4
  147. package/components/formula-editor-DQp_XiX5.cjs +247 -0
  148. package/components/formula-editor-HkD4KWnN.js +871 -0
  149. package/components/fr-BvgQLvx5.js +478 -0
  150. package/components/fr-CQyhQN6j.cjs +20 -0
  151. package/components/funnel-chart-options.config-BAIgb6x9.cjs +20 -0
  152. package/components/funnel-chart-options.config-DAv3185m.js +187 -0
  153. package/components/funnel-chart-positioning.config-9blBdgB7.js +48 -0
  154. package/components/funnel-chart-positioning.config-iHk--8l3.cjs +20 -0
  155. package/components/funnel-chart-slots.config-BsNj6Mbb.js +43 -0
  156. package/components/funnel-chart-slots.config-CSI5mdma.cjs +20 -0
  157. package/components/get-css-variable-B1BZoBcs.cjs +20 -0
  158. package/components/get-css-variable-COcan5CX.js +63 -0
  159. package/components/heat-map-options.config-Ckw8voNV.js +224 -0
  160. package/components/heat-map-options.config-Ct-93RVQ.cjs +20 -0
  161. package/components/heat-map-positioning.config-CqkTB8nU.cjs +20 -0
  162. package/components/heat-map-positioning.config-DgrZWNiT.js +48 -0
  163. package/components/heat-map-slots.config-BFK5TF9k.js +37 -0
  164. package/components/heat-map-slots.config-D0mwjImu.cjs +20 -0
  165. package/components/heat-table-options.config-7IS5wa9l.cjs +20 -0
  166. package/components/heat-table-options.config-PpOf4o94.js +372 -0
  167. package/components/heat-table-positioning.config-BqsqkftW.js +55 -0
  168. package/components/heat-table-positioning.config-Ca-WBNR-.cjs +20 -0
  169. package/components/heat-table-slots.config-3q2hG4nF.js +49 -0
  170. package/components/heat-table-slots.config-CH6Q9203.cjs +20 -0
  171. package/components/hexbin-map-options.config-CUAv6zuD.cjs +20 -0
  172. package/components/hexbin-map-options.config-D88DHYrl.js +276 -0
  173. package/components/hexbin-map-positioning.config-gkLfwTS6.js +48 -0
  174. package/components/hexbin-map-positioning.config-sUIrPJP4.cjs +20 -0
  175. package/components/hexbin-map-slots.config-BdkQVzI7.cjs +20 -0
  176. package/components/hexbin-map-slots.config-BfbHCCUe.js +37 -0
  177. package/components/image-options.config-ByIPpr29.js +153 -0
  178. package/components/image-options.config-DXqA7sAa.cjs +20 -0
  179. package/components/image-slots.config-B4MFjNWt.js +24 -0
  180. package/components/image-slots.config-DprzKxj3.cjs +20 -0
  181. package/components/index.cjs +749 -1
  182. package/components/index.js +5577 -64
  183. package/components/item-grid/index.cjs +1 -1
  184. package/components/item-grid/index.js +1 -1
  185. package/components/item-grid-B59uyBDP.js +4558 -0
  186. package/components/item-grid-C6nEE4Uj.cjs +113 -0
  187. package/components/item-option/index.cjs +1 -1
  188. package/components/item-option/index.js +1 -1
  189. package/components/item-option-C4c-e1QF.cjs +252 -0
  190. package/components/item-option-action-button-group/index.cjs +1 -1
  191. package/components/item-option-action-button-group/index.js +1 -1
  192. package/components/item-option-action-button-group-BEXRueVH.js +118 -0
  193. package/components/item-option-action-button-group-BU1wvtEd.cjs +53 -0
  194. package/components/item-option-base-DATaPQ-m.cjs +56 -0
  195. package/components/item-option-base-DqDKIqRP.js +123 -0
  196. package/components/item-option-color-palette-picker/index.cjs +1 -1
  197. package/components/item-option-color-palette-picker/index.js +1 -1
  198. package/components/item-option-color-palette-picker-Cc2nTuxC.cjs +40 -0
  199. package/components/item-option-color-palette-picker-dk5Nm1XB.js +2041 -0
  200. package/components/item-option-color-picker/index.cjs +1 -1
  201. package/components/item-option-color-picker/index.js +1 -1
  202. package/components/item-option-color-picker-Czr_ojzh.cjs +34 -0
  203. package/components/item-option-color-picker-oG-wrEZh.js +87 -0
  204. package/components/item-option-color-range/index.cjs +1 -1
  205. package/components/item-option-color-range/index.js +1 -1
  206. package/components/item-option-color-range-CTnHZ72E.cjs +98 -0
  207. package/components/item-option-color-range-RbnPnI3s.js +220 -0
  208. package/components/item-option-multi-language-field/index.cjs +1 -1
  209. package/components/item-option-multi-language-field/index.js +1 -1
  210. package/components/item-option-multi-language-field-BpyuIPcO.cjs +33 -0
  211. package/components/item-option-multi-language-field-BqhBRIFH.js +82 -0
  212. package/components/item-option-number-field/index.cjs +1 -1
  213. package/components/item-option-number-field/index.js +1 -1
  214. package/components/item-option-number-field-BDPEAzdF.js +102 -0
  215. package/components/item-option-number-field-CV2xpQrk.cjs +38 -0
  216. package/components/item-option-panel/index.cjs +1 -1
  217. package/components/item-option-panel/index.js +1 -1
  218. package/components/item-option-panel-CMrjUb2s.cjs +67 -0
  219. package/components/item-option-panel-XhTxaBZp.js +183 -0
  220. package/components/item-option-picker/index.cjs +1 -1
  221. package/components/item-option-picker/index.js +1 -1
  222. package/components/item-option-picker-CvEfEy99.cjs +37 -0
  223. package/components/item-option-picker-D_Od3am8.js +77 -0
  224. package/components/item-option-position-picker/index.cjs +1 -1
  225. package/components/item-option-position-picker/index.js +1 -1
  226. package/components/item-option-position-picker-BKw29tj-.js +117 -0
  227. package/components/item-option-position-picker-DBs4JlFi.cjs +32 -0
  228. package/components/item-option-positions-number-field/index.cjs +1 -1
  229. package/components/item-option-positions-number-field/index.js +1 -1
  230. package/components/item-option-positions-number-field-DIIEFHd4.cjs +49 -0
  231. package/components/item-option-positions-number-field-lrJdfydy.js +164 -0
  232. package/components/item-option-radio-button-group/index.cjs +1 -1
  233. package/components/item-option-radio-button-group/index.js +1 -1
  234. package/components/item-option-radio-button-group-DTyHPaz_.js +74 -0
  235. package/components/item-option-radio-button-group-DrjpL6YU.cjs +37 -0
  236. package/components/item-option-slider/index.cjs +1 -1
  237. package/components/item-option-slider/index.js +1 -1
  238. package/components/item-option-slider-BwKBgW0y.cjs +33 -0
  239. package/components/item-option-slider-CIDoZhZl.js +81 -0
  240. package/components/item-option-switch/index.cjs +1 -1
  241. package/components/item-option-switch/index.js +1 -1
  242. package/components/item-option-switch-CQtvbTfI.cjs +30 -0
  243. package/components/item-option-switch-DxC1yjeN.js +69 -0
  244. package/components/item-option-text-field/index.cjs +1 -1
  245. package/components/item-option-text-field/index.js +1 -1
  246. package/components/item-option-text-field-CZtJ1yIj.js +80 -0
  247. package/components/item-option-text-field-pLQzcE25.cjs +33 -0
  248. package/components/item-option-zz-Rqh6o.js +969 -0
  249. package/components/item-options-configs.cjs +1 -1
  250. package/components/item-options-configs.js +45 -45
  251. package/components/item-slot-drop/index.cjs +1 -1
  252. package/components/item-slot-drop/index.d.ts +0 -2
  253. package/components/item-slot-drop/index.js +1 -1
  254. package/components/item-slot-drop/item-slot-drop.d.ts +1 -0
  255. package/components/item-slot-drop-SqYpfTGj.js +326 -0
  256. package/components/item-slot-drop-UygcXM5D.cjs +91 -0
  257. package/components/item-slot-drop-panel/index.cjs +1 -1
  258. package/components/item-slot-drop-panel/index.js +1 -1
  259. package/components/item-slot-drop-panel-9T8BWejl.cjs +57 -0
  260. package/components/item-slot-drop-panel-DoWCzjqb.js +354 -0
  261. package/components/item-slot-picker/index.cjs +1 -1
  262. package/components/item-slot-picker/index.js +1 -1
  263. package/components/item-slot-picker/item-slot-picker.d.ts +3 -0
  264. package/components/item-slot-picker-CadZEvOA.js +500 -0
  265. package/components/item-slot-picker-Rnb_wwCV.cjs +174 -0
  266. package/components/item-slot-picker-panel/index.cjs +1 -1
  267. package/components/item-slot-picker-panel/index.js +1 -1
  268. package/components/item-slot-picker-panel-2VJY6C0b.cjs +81 -0
  269. package/components/item-slot-picker-panel-Bhr6d6Ya.js +447 -0
  270. package/components/item-slots-configs.cjs +1 -1
  271. package/components/item-slots-configs.js +45 -45
  272. package/components/line-chart-options.config-DKQ1k4lg.cjs +20 -0
  273. package/components/line-chart-options.config-DMjvCs-4.js +168 -0
  274. package/components/line-chart-positioning.config-BIkHxiyg.cjs +20 -0
  275. package/components/line-chart-positioning.config-CdnYQBah.js +55 -0
  276. package/components/line-chart-slots.config-Cjp4btvG.cjs +20 -0
  277. package/components/line-chart-slots.config-CrQEwa4W.js +55 -0
  278. package/components/load-data-fields-for-datasets-CU75T9Az.js +86 -0
  279. package/components/load-data-fields-for-datasets-DkK1JsFd.cjs +20 -0
  280. package/components/localized-mixin-CBMYHOPv.js +52 -0
  281. package/components/localized-mixin-DAOiXh71.cjs +20 -0
  282. package/components/marker-map-options.config-C52a3boH.js +117 -0
  283. package/components/marker-map-options.config-DBPPcGN4.cjs +20 -0
  284. package/components/marker-map-positioning.config-BSz4P-W9.js +48 -0
  285. package/components/marker-map-positioning.config-t66fioVz.cjs +20 -0
  286. package/components/marker-map-slots.config-BOQ8AwRv.cjs +20 -0
  287. package/components/marker-map-slots.config-eJAxjIaQ.js +37 -0
  288. package/components/nl-BwK5iXtO.cjs +20 -0
  289. package/components/nl-D-Wa6DnD.js +478 -0
  290. package/components/ohlc-chart-options.config-38qB2VKc.js +65 -0
  291. package/components/ohlc-chart-options.config-D9h-VLdq.cjs +20 -0
  292. package/components/ohlc-chart-positioning.config-BGueS7CJ.cjs +20 -0
  293. package/components/ohlc-chart-positioning.config-tQPPutWX.js +78 -0
  294. package/components/ohlc-chart-slots.config-CUBUexI-.cjs +20 -0
  295. package/components/ohlc-chart-slots.config-SOs4oD-Q.js +68 -0
  296. package/components/parallel-coordinates-plot-options.config-DfZ80jLX.js +42 -0
  297. package/components/parallel-coordinates-plot-options.config-ovgY0A7j.cjs +20 -0
  298. package/components/parallel-coordinates-plot-positioning.config-MkX-qYHX.js +48 -0
  299. package/components/parallel-coordinates-plot-positioning.config-NrJ2LNM8.cjs +20 -0
  300. package/components/parallel-coordinates-plot-slots.config-BXZ-NmbH.cjs +20 -0
  301. package/components/parallel-coordinates-plot-slots.config-DgsHiCqT.js +46 -0
  302. package/components/period-over-period-condition.const-DLA60ptm.js +1664 -0
  303. package/components/period-over-period-condition.const-DystGY6B.cjs +20 -0
  304. package/components/pivot-table-options.config-5udtucDD.js +245 -0
  305. package/components/pivot-table-options.config-BxKo1DCU.cjs +20 -0
  306. package/components/pivot-table-positioning.config-DgJ5PPB9.cjs +20 -0
  307. package/components/pivot-table-positioning.config-Dr_0v4TM.js +55 -0
  308. package/components/pivot-table-slots.config-CRL6EW5R.js +55 -0
  309. package/components/pivot-table-slots.config-VxbOGtmB.cjs +20 -0
  310. package/components/pragmatic-element-adapter-U3ppsQDe.cjs +24 -0
  311. package/components/pragmatic-element-adapter-e5LbH_lv.js +1252 -0
  312. package/components/pyramid-chart-options.config-iP2MzTeb.js +240 -0
  313. package/components/pyramid-chart-options.config-lioHQSoq.cjs +20 -0
  314. package/components/pyramid-chart-positioning.config-BGRtXKWh.cjs +20 -0
  315. package/components/pyramid-chart-positioning.config-DB0BI8vW.js +55 -0
  316. package/components/pyramid-chart-slots.config-CN_Q2YsP.cjs +20 -0
  317. package/components/pyramid-chart-slots.config-DM3lYlDg.js +50 -0
  318. package/components/radar-chart-options.config-DhnoFEzo.cjs +20 -0
  319. package/components/radar-chart-options.config-aR5sQal-.js +130 -0
  320. package/components/radar-chart-positioning.config-D6UfRMMA.js +55 -0
  321. package/components/radar-chart-positioning.config-DQiJ-Z1s.cjs +20 -0
  322. package/components/radar-chart-slots.config-BISYnTom.cjs +20 -0
  323. package/components/radar-chart-slots.config-msW05r4n.js +53 -0
  324. package/components/regular-table-options.config-Bk6CBPgj.cjs +20 -0
  325. package/components/regular-table-options.config-kbARlJ1E.js +148 -0
  326. package/components/regular-table-slots.config-BU6Ff96U.cjs +20 -0
  327. package/components/regular-table-slots.config-DAwLOM5T.js +35 -0
  328. package/components/route-map-options.config-CAi93e7I.cjs +20 -0
  329. package/components/route-map-options.config-DCBAfq09.js +326 -0
  330. package/components/route-map-positioning.config-Cbic0Cbz.cjs +20 -0
  331. package/components/route-map-positioning.config-D_ZoyhwX.js +66 -0
  332. package/components/route-map-slots.config-DNiRtoRC.js +59 -0
  333. package/components/route-map-slots.config-Dznp0DT3.cjs +20 -0
  334. package/components/sankey-diagram-options.config-CKjVnYnF.js +126 -0
  335. package/components/sankey-diagram-options.config-D7ZrZV0g.cjs +20 -0
  336. package/components/sankey-diagram-positioning.config-CQNdImz0.js +66 -0
  337. package/components/sankey-diagram-positioning.config-CZDPh7CR.cjs +20 -0
  338. package/components/sankey-diagram-slots.config-CVD2P6RJ.js +61 -0
  339. package/components/sankey-diagram-slots.config-TKCUvHOD.cjs +20 -0
  340. package/components/scatter-plot-options.config--AfAxaGf.js +302 -0
  341. package/components/scatter-plot-options.config-DXqKb34r.cjs +20 -0
  342. package/components/scatter-plot-positioning.config-BPEymo3a.cjs +20 -0
  343. package/components/scatter-plot-positioning.config-BTOiZ8cF.js +77 -0
  344. package/components/scatter-plot-slots.config-CPsk9FUg.cjs +20 -0
  345. package/components/scatter-plot-slots.config-D57rd66g.js +74 -0
  346. package/components/search-filter-options.config-DQwMOiXm.js +103 -0
  347. package/components/search-filter-options.config-DojMfRR_.cjs +20 -0
  348. package/components/search-filter-slots.config-AhwsTdYC.cjs +20 -0
  349. package/components/search-filter-slots.config-DQybwP4H.js +39 -0
  350. package/components/set-locale-BCnD4yp_.cjs +20 -0
  351. package/components/set-locale-CamOWu7o.js +43 -0
  352. package/components/slicer-filter-options.config-BhLn4U1W.cjs +20 -0
  353. package/components/slicer-filter-options.config-DVE33GEz.js +226 -0
  354. package/components/slicer-filter-positioning.config-CC7uoU2D.js +48 -0
  355. package/components/slicer-filter-positioning.config-CQE4ocpD.cjs +20 -0
  356. package/components/slicer-filter-slots.config-Bcz9RsdR.js +44 -0
  357. package/components/slicer-filter-slots.config-zV15NWWS.cjs +20 -0
  358. package/components/slider-filter-options.config-B8am9mmE.cjs +20 -0
  359. package/components/slider-filter-options.config-BwaAvOvt.js +72 -0
  360. package/components/slider-filter-slots.config-Bc8Qk7fb.js +43 -0
  361. package/components/slider-filter-slots.config-D9Hra0zE.cjs +20 -0
  362. package/components/slot-menu-BL772rj7.js +1048 -0
  363. package/components/slot-menu-CCbZ-krJ.cjs +215 -0
  364. package/components/speedometer-chart-options.config-D4-8n5pn.js +246 -0
  365. package/components/speedometer-chart-options.config-DEW_D9w1.cjs +20 -0
  366. package/components/speedometer-chart-positioning.config-ChH-uAdS.js +48 -0
  367. package/components/speedometer-chart-positioning.config-DpBVarun.cjs +20 -0
  368. package/components/speedometer-chart-slots.config-1BqQZ2vP.cjs +20 -0
  369. package/components/speedometer-chart-slots.config-B4zqf0f_.js +39 -0
  370. package/components/spike-map-options.config-CM46vw7B.js +413 -0
  371. package/components/spike-map-options.config-LPAyKMHe.cjs +20 -0
  372. package/components/spike-map-positioning.config-BnEQJ-rD.js +55 -0
  373. package/components/spike-map-positioning.config-DrSoa8Ol.cjs +20 -0
  374. package/components/spike-map-slots.config-B7OehIoc.cjs +20 -0
  375. package/components/spike-map-slots.config-BeXzuzh0.js +47 -0
  376. package/components/strip-plot-options.config-BlneYJOy.js +53 -0
  377. package/components/strip-plot-options.config-vBd38UQs.cjs +20 -0
  378. package/components/strip-plot-positioning.config-Be5Desz2.js +48 -0
  379. package/components/strip-plot-positioning.config-DlkZ1i6m.cjs +20 -0
  380. package/components/strip-plot-slots.config-BGQIQtMK.js +38 -0
  381. package/components/strip-plot-slots.config-CAU0z3q4.cjs +20 -0
  382. package/components/sunburst-chart-options.config-8xopRyBB.js +160 -0
  383. package/components/sunburst-chart-options.config-CUFOuT2J.cjs +20 -0
  384. package/components/sunburst-chart-positioning.config-D4zzci9s.cjs +20 -0
  385. package/components/sunburst-chart-positioning.config-RUEkAgKJ.js +48 -0
  386. package/components/sunburst-chart-slots.config-BCNUNkd9.cjs +20 -0
  387. package/components/sunburst-chart-slots.config-BhKeTqTo.js +38 -0
  388. package/components/symbol-map-options.config-CR07hvK0.cjs +20 -0
  389. package/components/symbol-map-options.config-nJAvVQIh.js +157 -0
  390. package/components/symbol-map-positioning.config-Dmgmyhv7.cjs +20 -0
  391. package/components/symbol-map-positioning.config-JzgtULMk.js +55 -0
  392. package/components/symbol-map-slots.config-D9E-oBE4.js +53 -0
  393. package/components/symbol-map-slots.config-Dz_tor5P.cjs +20 -0
  394. package/components/text-options.config-DCF3IVzO.js +67 -0
  395. package/components/text-options.config-JI2D64hs.cjs +20 -0
  396. package/components/text-slots.config-0A6csMfd.cjs +20 -0
  397. package/components/text-slots.config-C60nJ0OX.js +24 -0
  398. package/components/treemap-chart-options.config-RFQTphEG.js +184 -0
  399. package/components/treemap-chart-options.config-p21eSXKG.cjs +20 -0
  400. package/components/treemap-chart-positioning.config-CSt_vVgw.js +55 -0
  401. package/components/treemap-chart-positioning.config-CqHJxz2j.cjs +20 -0
  402. package/components/treemap-chart-slots.config-BJqqnUEF.cjs +20 -0
  403. package/components/treemap-chart-slots.config-CZRP7PZH.js +47 -0
  404. package/components/utils/base.cjs +1 -1
  405. package/components/utils/base.js +2 -2
  406. package/components/utils/store.cjs +1 -1
  407. package/components/utils/store.js +2 -2
  408. package/components/utils-DLTDAer5.js +239 -0
  409. package/components/utils-Ez3j4EOS.cjs +20 -0
  410. package/components/utils.cjs +1 -1
  411. package/components/utils.js +6 -9
  412. package/components/v4-BK7K-jy_.js +49 -0
  413. package/components/validate-CJkVJaL1.cjs +20 -0
  414. package/components/validate-J3P0rm_n.js +28 -0
  415. package/components/venn-diagram-options.config-EmRhf40r.cjs +20 -0
  416. package/components/venn-diagram-options.config-uCJ5dei5.js +24 -0
  417. package/components/venn-diagram-positioning.config-CzhNTma3.cjs +20 -0
  418. package/components/venn-diagram-positioning.config-DsPI8qfG.js +55 -0
  419. package/components/venn-diagram-slots.config-DOljH_uI.js +47 -0
  420. package/components/venn-diagram-slots.config-MpkJTf5q.cjs +20 -0
  421. package/components/video-options.config-Dh_lU4c1.cjs +20 -0
  422. package/components/video-options.config-DkLrX1gP.js +127 -0
  423. package/components/video-slots.config-Bmh6mcUv.cjs +20 -0
  424. package/components/video-slots.config-CqMIkttE.js +24 -0
  425. package/components/wordcloud-chart-options.config-C2ZILp7a.js +90 -0
  426. package/components/wordcloud-chart-options.config-mx2CbmrI.cjs +20 -0
  427. package/components/wordcloud-chart-positioning.config-BUE8e4fN.js +55 -0
  428. package/components/wordcloud-chart-positioning.config-moNJfL1M.cjs +20 -0
  429. package/components/wordcloud-chart-slots.config-B8s8B47F.js +45 -0
  430. package/components/wordcloud-chart-slots.config-C303nwAz.cjs +20 -0
  431. package/custom-elements.json +5893 -15939
  432. package/index.d.ts +0 -24
  433. package/package.json +3 -128
  434. package/react/README.md +6 -31
  435. package/react/esm/index.d.ts +2 -27
  436. package/react/esm/index.js +2 -102
  437. package/react/esm/types.d.ts +0 -15
  438. package/react/index.ts +2 -102
  439. package/react/luzmo-stub.d.ts +0 -164
  440. package/react/types.ts +0 -12
  441. package/react/utils/slot-content/ad-hoc-slot-content.d.ts +7 -0
  442. package/react/utils/slot-content/render-calculation-label.d.ts +7 -0
  443. package/react/utils/slot-state/slot-store.d.ts +2 -2
  444. package/react/utils/store/index.d.ts +5 -5
  445. package/react/utils/store/store-registry.d.ts +1 -1
  446. package/types/slot.types.d.ts +10 -1
  447. package/types.d.ts +0 -8
  448. package/utils/slot-content/ad-hoc-slot-content.d.ts +7 -0
  449. package/utils/slot-content/render-calculation-label.d.ts +7 -0
  450. package/utils/slot-state/slot-store.d.ts +2 -2
  451. package/utils/store/index.d.ts +5 -5
  452. package/utils/store/store-registry.d.ts +1 -1
  453. package/components/ai-chat/ai-chat-events.d.ts +0 -123
  454. package/components/ai-chat/ai-chat-request.d.ts +0 -11
  455. package/components/ai-chat/ai-chat.d.ts +0 -302
  456. package/components/ai-chat/ai-prompt-types.d.ts +0 -94
  457. package/components/ai-chat/empty-state/ai-chat-empty-state.d.ts +0 -46
  458. package/components/ai-chat/empty-state/index.d.ts +0 -8
  459. package/components/ai-chat/empty-state/types.d.ts +0 -14
  460. package/components/ai-chat/index.cjs +0 -20
  461. package/components/ai-chat/index.d.ts +0 -20
  462. package/components/ai-chat/index.js +0 -28
  463. package/components/ai-chat/session/ai-chat-session-controller.d.ts +0 -51
  464. package/components/ai-chat/session/ai-chat-session-types.d.ts +0 -88
  465. package/components/ai-chat/session/ai-chat-session.d.ts +0 -91
  466. package/components/ai-chat/session/index.d.ts +0 -2
  467. package/components/ai-chat/stream/chunk-extractors.d.ts +0 -27
  468. package/components/ai-chat/stream/index.d.ts +0 -52
  469. package/components/ai-chat/stream/progress.d.ts +0 -3
  470. package/components/ai-chat/stream/registry.d.ts +0 -6
  471. package/components/ai-chat/stream/stream-processor.d.ts +0 -2
  472. package/components/ai-chat/stream/transport.d.ts +0 -26
  473. package/components/ai-chat/stream/types.d.ts +0 -55
  474. package/components/ai-chat-CpK99nb7.cjs +0 -300
  475. package/components/ai-chat-e2lg3FLg.js +0 -3835
  476. package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +0 -135
  477. package/components/ai-interaction-textarea/index.cjs +0 -20
  478. package/components/ai-interaction-textarea/index.d.ts +0 -8
  479. package/components/ai-interaction-textarea/index.js +0 -28
  480. package/components/ai-interaction-textarea/types.d.ts +0 -5
  481. package/components/ai-interaction-textarea-CSrEsHXV.cjs +0 -68
  482. package/components/ai-interaction-textarea-cAXXLnoj.js +0 -299
  483. package/components/area-chart-options.config-Cf1VrUNv.cjs +0 -20
  484. package/components/area-chart-options.config-DdYBA1_Q.js +0 -146
  485. package/components/area-chart-positioning.config-CZgo9lkr.cjs +0 -20
  486. package/components/area-chart-positioning.config-DAEbeAVX.js +0 -55
  487. package/components/area-chart-slots.config-BOhwdLnr.cjs +0 -20
  488. package/components/area-chart-slots.config-Cmdkui4v.js +0 -55
  489. package/components/bar-chart-options.config-BF7Q15FL.cjs +0 -20
  490. package/components/bar-chart-options.config-Cx3n0tCr.js +0 -220
  491. package/components/bar-chart-positioning.config-71sM-GEA.js +0 -59
  492. package/components/bar-chart-positioning.config-9_GWwUur.cjs +0 -20
  493. package/components/bar-chart-slots.config-BWvrLYv5.js +0 -50
  494. package/components/bar-chart-slots.config-DMWjAd5a.cjs +0 -20
  495. package/components/base-DbEAseAh.cjs +0 -20
  496. package/components/base-store-DHC2m2Os.cjs +0 -20
  497. package/components/base-store-DmDe0dTU.js +0 -160
  498. package/components/base-vk9LuivN.js +0 -249
  499. package/components/box-plot-options.config-BkD5CYGz.cjs +0 -20
  500. package/components/box-plot-options.config-DB9iCCZg.js +0 -296
  501. package/components/box-plot-positioning.config-BxIFcn-c.cjs +0 -20
  502. package/components/box-plot-positioning.config-DIck_I13.js +0 -48
  503. package/components/box-plot-slots.config-5B_pTjPJ.cjs +0 -20
  504. package/components/box-plot-slots.config-BknEys-m.js +0 -40
  505. package/components/bubble-chart-options.config-4f9FUNhc.cjs +0 -20
  506. package/components/bubble-chart-options.config-D8o_9z0b.js +0 -115
  507. package/components/bubble-chart-positioning.config-BJi-Te33.js +0 -55
  508. package/components/bubble-chart-positioning.config-Cf7K70G6.cjs +0 -20
  509. package/components/bubble-chart-slots.config-Djb-py0h.js +0 -47
  510. package/components/bubble-chart-slots.config-VHKuntJk.cjs +0 -20
  511. package/components/bullet-chart-options.config-CmC75LQ8.js +0 -75
  512. package/components/bullet-chart-options.config-DDygYBiy.cjs +0 -20
  513. package/components/bullet-chart-positioning.config-3yE6MOJU.cjs +0 -20
  514. package/components/bullet-chart-positioning.config-ByVG8aFe.js +0 -56
  515. package/components/bullet-chart-slots.config-BECcf-yZ.js +0 -46
  516. package/components/bullet-chart-slots.config-CZfTgKZ4.cjs +0 -20
  517. package/components/choropleth-map-options.config-5W6nNlL7.cjs +0 -20
  518. package/components/choropleth-map-options.config-Bt-vXkKW.js +0 -348
  519. package/components/choropleth-map-positioning.config-BmUOKuYh.js +0 -55
  520. package/components/choropleth-map-positioning.config-QpuHLCDR.cjs +0 -20
  521. package/components/choropleth-map-slots.config-CZKWF1qV.cjs +0 -20
  522. package/components/choropleth-map-slots.config-DVrgJYSA.js +0 -53
  523. package/components/circle-pack-chart-options.config-CD8MWMTw.cjs +0 -20
  524. package/components/circle-pack-chart-options.config-CLA-ur8J.js +0 -54
  525. package/components/circle-pack-chart-positioning.config-EN3LKHeo.cjs +0 -20
  526. package/components/circle-pack-chart-positioning.config-K_yHBCSG.js +0 -48
  527. package/components/circle-pack-chart-slots.config-BG6Gh03S.js +0 -38
  528. package/components/circle-pack-chart-slots.config-GL7T5_o4.cjs +0 -20
  529. package/components/circular-gauge-options.config-BFBmfsPn.js +0 -188
  530. package/components/circular-gauge-options.config-D9gcbX57.cjs +0 -20
  531. package/components/circular-gauge-positioning.config-AH32vSIN.js +0 -48
  532. package/components/circular-gauge-positioning.config-CurZIsZj.cjs +0 -20
  533. package/components/circular-gauge-slots.config-BSzOAb8B.js +0 -39
  534. package/components/circular-gauge-slots.config-DUHabt3G.cjs +0 -20
  535. package/components/color-BWnYpOu7.js +0 -3812
  536. package/components/color-range-utils-CwwtLDX_.js +0 -63
  537. package/components/column-chart-options.config-CiIw23Yo.cjs +0 -20
  538. package/components/column-chart-options.config-V7v9PtQA.js +0 -219
  539. package/components/column-chart-positioning.config-DS8sLc1p.js +0 -55
  540. package/components/column-chart-positioning.config-Dn7Ri3op.cjs +0 -20
  541. package/components/column-chart-slots.config-5BjkTrbt.js +0 -50
  542. package/components/column-chart-slots.config-CM5aytbj.cjs +0 -20
  543. package/components/combination-chart-options.config-CgSqqLLE.js +0 -87
  544. package/components/combination-chart-options.config-DaTYSfnr.cjs +0 -20
  545. package/components/combination-chart-positioning.config-RNhQd78t.cjs +0 -20
  546. package/components/combination-chart-positioning.config-u9poMkSd.js +0 -48
  547. package/components/combination-chart-slots.config-BwUOXFCR.cjs +0 -20
  548. package/components/combination-chart-slots.config-DgM_T-9r.js +0 -43
  549. package/components/conditional-number-options.config-3_vXSC0j.js +0 -205
  550. package/components/conditional-number-options.config-BPzCxo2q.cjs +0 -20
  551. package/components/conditional-number-positioning.config-Cq4uJ35g.cjs +0 -20
  552. package/components/conditional-number-positioning.config-Dnq3OP76.js +0 -48
  553. package/components/conditional-number-slots.config-B7maHIaG.cjs +0 -20
  554. package/components/conditional-number-slots.config-CzVPP4me.js +0 -39
  555. package/components/convert-data-field-to-slot-content-C6IIqU7G.js +0 -53
  556. package/components/convert-data-field-to-slot-content-DLzkk6dT.cjs +0 -20
  557. package/components/convert-datasets-to-data-fields-B13rl1an.cjs +0 -20
  558. package/components/convert-datasets-to-data-fields-PmQzeVLG.js +0 -68
  559. package/components/data-broker-Bdv5V8Yp.js +0 -1680
  560. package/components/data-broker-DWEXs6-2.cjs +0 -20
  561. package/components/data-field-CGY-TeOZ.js +0 -121
  562. package/components/data-field-CXK_vezu.cjs +0 -54
  563. package/components/data-field-level/data-field-level.d.ts +0 -40
  564. package/components/data-field-level/helpers/generate-preview.d.ts +0 -9
  565. package/components/data-field-level/index.cjs +0 -20
  566. package/components/data-field-level/index.d.ts +0 -8
  567. package/components/data-field-level/index.js +0 -28
  568. package/components/data-field-level-BsJ3eRQt.js +0 -247
  569. package/components/data-field-level-CxF3DZmD.cjs +0 -55
  570. package/components/data-field-panel-Brzkhc5r.cjs +0 -87
  571. package/components/data-field-panel-CNiGw9_F.js +0 -385
  572. package/components/data-fields-select/data-fields-select.d.ts +0 -127
  573. package/components/data-fields-select/index.cjs +0 -20
  574. package/components/data-fields-select/index.d.ts +0 -9
  575. package/components/data-fields-select/index.js +0 -28
  576. package/components/data-fields-select/types.d.ts +0 -4
  577. package/components/data-fields-select-BcMFFFJV.js +0 -262
  578. package/components/data-fields-select-D-nSjOep.cjs +0 -41
  579. package/components/dataset-icon/dataset-icon.d.ts +0 -45
  580. package/components/dataset-icon/index.cjs +0 -20
  581. package/components/dataset-icon/index.d.ts +0 -8
  582. package/components/dataset-icon/index.js +0 -28
  583. package/components/dataset-icon/types.d.ts +0 -11
  584. package/components/dataset-icon-BAV0S4sZ.cjs +0 -64
  585. package/components/dataset-icon-CWT5Ju8w.js +0 -125
  586. package/components/dataset-selector-list/dataset-selector-list.d.ts +0 -102
  587. package/components/dataset-selector-list/index.cjs +0 -20
  588. package/components/dataset-selector-list/index.d.ts +0 -8
  589. package/components/dataset-selector-list/index.js +0 -28
  590. package/components/dataset-selector-list-2Kz1oNFa.cjs +0 -75
  591. package/components/dataset-selector-list-CvjSPfPj.js +0 -313
  592. package/components/dataset-selector-row/dataset-selector-row.d.ts +0 -89
  593. package/components/dataset-selector-row/index.cjs +0 -20
  594. package/components/dataset-selector-row/index.d.ts +0 -8
  595. package/components/dataset-selector-row/index.js +0 -28
  596. package/components/dataset-selector-row-Beo9owAy.js +0 -273
  597. package/components/dataset-selector-row-DOhPbfDh.cjs +0 -79
  598. package/components/date-comparison-filter-options.config-4yHPEJSU.cjs +0 -20
  599. package/components/date-comparison-filter-options.config-CsDlmT6L.js +0 -126
  600. package/components/date-comparison-filter-slots.config-EEgNP09x.js +0 -33
  601. package/components/date-comparison-filter-slots.config-oABOLs3D.cjs +0 -20
  602. package/components/date-filter-options.config-AFAngO_i.cjs +0 -20
  603. package/components/date-filter-options.config-b8EHOjR1.js +0 -118
  604. package/components/date-filter-slots.config-Cuzz0RjE.cjs +0 -20
  605. package/components/date-filter-slots.config-PJ_h3Aj7.js +0 -37
  606. package/components/de-BY1wWZE8.cjs +0 -20
  607. package/components/de-D-xQoqdB.js +0 -473
  608. package/components/decompose-numeric-format-DGJua3rU.cjs +0 -20
  609. package/components/decompose-numeric-format-DS0j2wa1.js +0 -36
  610. package/components/decorate-DCJt-2rt.cjs +0 -20
  611. package/components/decorate-DyMgX_Uh.js +0 -28
  612. package/components/display-settings/display-settings.d.ts +0 -98
  613. package/components/display-settings/index.cjs +0 -20
  614. package/components/display-settings/index.d.ts +0 -8
  615. package/components/display-settings/index.js +0 -28
  616. package/components/display-settings/types.d.ts +0 -9
  617. package/components/display-settings-BNoRfE1e.js +0 -272
  618. package/components/display-settings-JuegpHpn.cjs +0 -120
  619. package/components/display-settings-binning/display-settings-binning.d.ts +0 -32
  620. package/components/display-settings-binning/index.cjs +0 -20
  621. package/components/display-settings-binning/index.d.ts +0 -8
  622. package/components/display-settings-binning/index.js +0 -28
  623. package/components/display-settings-binning-D4fXWXY_.js +0 -110
  624. package/components/display-settings-binning-DFA-s8JY.cjs +0 -56
  625. package/components/display-settings-datetime/display-settings-datetime.d.ts +0 -86
  626. package/components/display-settings-datetime/index.cjs +0 -20
  627. package/components/display-settings-datetime/index.d.ts +0 -8
  628. package/components/display-settings-datetime/index.js +0 -28
  629. package/components/display-settings-datetime-CcZ-aQjs.js +0 -413
  630. package/components/display-settings-datetime-DjfBfyzM.cjs +0 -217
  631. package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +0 -29
  632. package/components/display-settings-grand-totals/index.cjs +0 -20
  633. package/components/display-settings-grand-totals/index.d.ts +0 -8
  634. package/components/display-settings-grand-totals/index.js +0 -28
  635. package/components/display-settings-grand-totals-CUlIPreM.js +0 -89
  636. package/components/display-settings-grand-totals-lf_RFqaR.cjs +0 -44
  637. package/components/display-settings-numeric/display-settings-numeric.d.ts +0 -82
  638. package/components/display-settings-numeric/helpers/constants.d.ts +0 -19
  639. package/components/display-settings-numeric/index.cjs +0 -20
  640. package/components/display-settings-numeric/index.d.ts +0 -8
  641. package/components/display-settings-numeric/index.js +0 -28
  642. package/components/display-settings-numeric-C707pX1_.cjs +0 -190
  643. package/components/display-settings-numeric-VVEUpoAy.js +0 -479
  644. package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +0 -68
  645. package/components/display-settings-period-over-period/helpers/constants.d.ts +0 -44
  646. package/components/display-settings-period-over-period/index.cjs +0 -20
  647. package/components/display-settings-period-over-period/index.d.ts +0 -8
  648. package/components/display-settings-period-over-period/index.js +0 -28
  649. package/components/display-settings-period-over-period-02Elu2Rn.js +0 -433
  650. package/components/display-settings-period-over-period-Be_A5whA.cjs +0 -229
  651. package/components/donut-chart-options.config-D8Bvo6Cc.cjs +0 -20
  652. package/components/donut-chart-options.config-N0MWtn-o.js +0 -207
  653. package/components/donut-chart-positioning.config-ByXtDyY9.cjs +0 -20
  654. package/components/donut-chart-positioning.config-CH5pTYpi.js +0 -48
  655. package/components/donut-chart-slots.config-Bi08z-XB.cjs +0 -20
  656. package/components/donut-chart-slots.config-dQrT0g_x.js +0 -39
  657. package/components/dropdown-filter-options.config-BRzYD0KE.cjs +0 -20
  658. package/components/dropdown-filter-options.config-CziqJFPz.js +0 -153
  659. package/components/dropdown-filter-slots.config-CQo3-kIo.js +0 -38
  660. package/components/dropdown-filter-slots.config-CR-Ko6q_.cjs +0 -20
  661. package/components/en-CcLhGxIh.js +0 -21
  662. package/components/en-GB-DzkdeUQh.js +0 -28
  663. package/components/en-GB-uxY5qmIM.cjs +0 -20
  664. package/components/en-US-CcLhGxIh.js +0 -21
  665. package/components/en-US-q_Ruzags.cjs +0 -20
  666. package/components/en-q_Ruzags.cjs +0 -20
  667. package/components/es-BIaD4kOL.cjs +0 -20
  668. package/components/es-CLnBAiLu.js +0 -473
  669. package/components/evolution-number-options.config-BfYN1Qgk.js +0 -228
  670. package/components/evolution-number-options.config-CkqNYgWn.cjs +0 -20
  671. package/components/evolution-number-positioning.config-B2_CNZP0.js +0 -48
  672. package/components/evolution-number-positioning.config-IFgvO_iZ.cjs +0 -20
  673. package/components/evolution-number-slots.config-CBS0b0Yk.js +0 -37
  674. package/components/evolution-number-slots.config-CikuQYgm.cjs +0 -20
  675. package/components/filter-expression-picker/filter-expression-picker.d.ts +0 -73
  676. package/components/filter-expression-picker/index.cjs +0 -20
  677. package/components/filter-expression-picker/index.d.ts +0 -7
  678. package/components/filter-expression-picker/index.js +0 -28
  679. package/components/filter-expression-picker-0eNf_L9I.cjs +0 -38
  680. package/components/filter-expression-picker-C0FJhbHk.js +0 -425
  681. package/components/filter-item/filter-item.d.ts +0 -84
  682. package/components/filter-item/index.cjs +0 -20
  683. package/components/filter-item/index.d.ts +0 -7
  684. package/components/filter-item/index.js +0 -28
  685. package/components/filter-item-C0AXDA_F.js +0 -242
  686. package/components/filter-item-C5O2G3Um.cjs +0 -58
  687. package/components/filter-parameter-picker/filter-parameter-picker.d.ts +0 -25
  688. package/components/filter-parameter-picker/index.cjs +0 -22
  689. package/components/filter-parameter-picker/index.d.ts +0 -7
  690. package/components/filter-parameter-picker/index.js +0 -58
  691. package/components/filter-value-picker/filter-value-picker.d.ts +0 -65
  692. package/components/filter-value-picker/index.cjs +0 -20
  693. package/components/filter-value-picker/index.d.ts +0 -7
  694. package/components/filter-value-picker/index.js +0 -28
  695. package/components/filter-value-picker-BOL1zvCR.cjs +0 -60
  696. package/components/filter-value-picker-DZORmKwM.js +0 -151
  697. package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +0 -42
  698. package/components/filter-value-picker-datetime/index.cjs +0 -20
  699. package/components/filter-value-picker-datetime/index.d.ts +0 -7
  700. package/components/filter-value-picker-datetime/index.js +0 -28
  701. package/components/filter-value-picker-datetime-0gRfWBzr.js +0 -139
  702. package/components/filter-value-picker-datetime-dCo1_pma.cjs +0 -42
  703. package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +0 -81
  704. package/components/filter-value-picker-hierarchy/index.cjs +0 -20
  705. package/components/filter-value-picker-hierarchy/index.d.ts +0 -7
  706. package/components/filter-value-picker-hierarchy/index.js +0 -28
  707. package/components/filter-value-picker-hierarchy-D8n6gV78.cjs +0 -47
  708. package/components/filter-value-picker-hierarchy-Dt7VNcSd.js +0 -232
  709. package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +0 -82
  710. package/components/filter-value-picker-numeric/index.cjs +0 -20
  711. package/components/filter-value-picker-numeric/index.d.ts +0 -7
  712. package/components/filter-value-picker-numeric/index.js +0 -28
  713. package/components/filter-value-picker-numeric-Cr7ll53O.js +0 -219
  714. package/components/filter-value-picker-numeric-DBw1TZtm.cjs +0 -48
  715. package/components/filters-B3zHSR73.js +0 -400
  716. package/components/filters-DIDatBfn.cjs +0 -150
  717. package/components/formatter-BeXmurVe.cjs +0 -20
  718. package/components/formatter-Cq5dFCyU.js +0 -1473
  719. package/components/formula-CPrZC9BC.cjs +0 -45
  720. package/components/formula-codemirror/formula-codemirror.d.ts +0 -79
  721. package/components/formula-codemirror/index.d.ts +0 -7
  722. package/components/formula-codemirror/pills/formula-aggregation/formula-aggregation.d.ts +0 -125
  723. package/components/formula-codemirror/pills/formula-aggregation/index.d.ts +0 -7
  724. package/components/formula-codemirror/pills/formula-empty-argument-pill/formula-empty-argument-pill.d.ts +0 -28
  725. package/components/formula-codemirror/pills/formula-empty-argument-pill/index.d.ts +0 -7
  726. package/components/formula-codemirror/pills/formula-include-exclude-panel.d.ts +0 -38
  727. package/components/formula-codemirror-DycN-ivp.js +0 -12018
  728. package/components/formula-codemirror-uXTVVacE.cjs +0 -215
  729. package/components/formula-display-store-B6dtlBPk.js +0 -1086
  730. package/components/formula-display-store-CCxSWPEB.cjs +0 -20
  731. package/components/formula-draggable-field/formula-draggable-field.d.ts +0 -53
  732. package/components/formula-draggable-field/index.d.ts +0 -8
  733. package/components/formula-draggable-field/types.d.ts +0 -24
  734. package/components/formula-editor-BPMeTS5F.cjs +0 -218
  735. package/components/formula-editor-BqHWUVdh.js +0 -666
  736. package/components/formula-field/formula-field.d.ts +0 -20
  737. package/components/formula-field/index.cjs +0 -20
  738. package/components/formula-field/index.d.ts +0 -7
  739. package/components/formula-field/index.js +0 -28
  740. package/components/formula-field-Bfy1qysp.js +0 -40
  741. package/components/formula-field-CAtaDtSP.cjs +0 -20
  742. package/components/formula-ibsKYWEh.js +0 -138
  743. package/components/formula-input-base-Cs71sKh1.js +0 -236
  744. package/components/formula-input-base-_-8MncrA.cjs +0 -49
  745. package/components/fr-CHG2Tcby.cjs +0 -20
  746. package/components/fr-DIwbOnwC.js +0 -473
  747. package/components/funnel-chart-options.config-BVmrhzna.cjs +0 -20
  748. package/components/funnel-chart-options.config-D8fqrJvi.js +0 -187
  749. package/components/funnel-chart-positioning.config-BUMX4e-7.js +0 -48
  750. package/components/funnel-chart-positioning.config-CY042Tro.cjs +0 -20
  751. package/components/funnel-chart-slots.config-B8zC6Q6_.cjs +0 -20
  752. package/components/funnel-chart-slots.config-CeGu8stc.js +0 -43
  753. package/components/get-css-variable-B8sJUuig.cjs +0 -20
  754. package/components/get-css-variable-r1spgqX0.js +0 -63
  755. package/components/get-dataset-name-Dwuh7DWE.cjs +0 -20
  756. package/components/get-dataset-name-SfDNjsuR.js +0 -27
  757. package/components/groupings-DuX9SnZa.cjs +0 -20
  758. package/components/groupings-OLk5e7JO.js +0 -52
  759. package/components/heat-map-options.config-5zjlVaa0.js +0 -224
  760. package/components/heat-map-options.config-xPdOcXDk.cjs +0 -20
  761. package/components/heat-map-positioning.config-C7W5YbvL.js +0 -48
  762. package/components/heat-map-positioning.config-CjaNs9QU.cjs +0 -20
  763. package/components/heat-map-slots.config-DBkkcvMN.js +0 -37
  764. package/components/heat-map-slots.config-Wp_oS8JQ.cjs +0 -20
  765. package/components/heat-table-options.config-Blcs4JjF.js +0 -372
  766. package/components/heat-table-options.config-DPbTFoRn.cjs +0 -20
  767. package/components/heat-table-positioning.config-B2ko43lN.cjs +0 -20
  768. package/components/heat-table-positioning.config-C6d8wmTk.js +0 -55
  769. package/components/heat-table-slots.config-BN7rtHZG.cjs +0 -20
  770. package/components/heat-table-slots.config-CJOXI-Sf.js +0 -49
  771. package/components/hexbin-map-options.config-CSFSqpMU.cjs +0 -20
  772. package/components/hexbin-map-options.config-D5o0k890.js +0 -276
  773. package/components/hexbin-map-positioning.config-B9Af5odq.js +0 -48
  774. package/components/hexbin-map-positioning.config-CaP2fsiE.cjs +0 -20
  775. package/components/hexbin-map-slots.config-CpJIfl6o.js +0 -37
  776. package/components/hexbin-map-slots.config-mx5zUTrA.cjs +0 -20
  777. package/components/image-options.config-C46UQpMq.js +0 -153
  778. package/components/image-options.config-DZ5q1D63.cjs +0 -20
  779. package/components/image-slots.config-DjaT4mUk.js +0 -24
  780. package/components/image-slots.config-ODQBVz5H.cjs +0 -20
  781. package/components/interactive-viz-item/helpers/chart-helpers.d.ts +0 -7
  782. package/components/interactive-viz-item/index.cjs +0 -20
  783. package/components/interactive-viz-item/index.d.ts +0 -10
  784. package/components/interactive-viz-item/index.js +0 -28
  785. package/components/interactive-viz-item/interactive-viz-item.d.ts +0 -96
  786. package/components/interactive-viz-item/types.d.ts +0 -117
  787. package/components/interactive-viz-item-CKRpHIwI.js +0 -693
  788. package/components/interactive-viz-item-D8btvzeg.cjs +0 -247
  789. package/components/item-grid-BEwohat_.js +0 -4559
  790. package/components/item-grid-CtW-2roU.cjs +0 -113
  791. package/components/item-menu/item-list/item-list.d.ts +0 -37
  792. package/components/item-option-CSc3jmeo.js +0 -919
  793. package/components/item-option-DkqkbwtF.cjs +0 -252
  794. package/components/item-option-action-button-group-BoZWUGPs.cjs +0 -53
  795. package/components/item-option-action-button-group-D_K-T_wB.js +0 -118
  796. package/components/item-option-base/item-option-base.d.ts +0 -23
  797. package/components/item-option-base-Do3zK0fN.js +0 -123
  798. package/components/item-option-base-yH3-Snf-.cjs +0 -56
  799. package/components/item-option-color-palette-picker-B9Umcsw_.cjs +0 -40
  800. package/components/item-option-color-palette-picker-CTvaiVJ1.js +0 -2041
  801. package/components/item-option-color-picker-BLF9-2WR.js +0 -87
  802. package/components/item-option-color-picker-FIPCBMIC.cjs +0 -34
  803. package/components/item-option-color-range-BznRsx45.cjs +0 -98
  804. package/components/item-option-color-range-mvlBVdZK.js +0 -220
  805. package/components/item-option-multi-language-field-BMJdbHOd.js +0 -82
  806. package/components/item-option-multi-language-field-Rypasjvk.cjs +0 -33
  807. package/components/item-option-number-field-Bu4IYyNe.js +0 -102
  808. package/components/item-option-number-field-sNlrQ5mG.cjs +0 -38
  809. package/components/item-option-panel-Bmm9IeZR.js +0 -183
  810. package/components/item-option-panel-DEPAMt-A.cjs +0 -67
  811. package/components/item-option-picker-6-VRIzb5.js +0 -77
  812. package/components/item-option-picker-DXZce4bl.cjs +0 -37
  813. package/components/item-option-position-picker-DBy46OLT.js +0 -117
  814. package/components/item-option-position-picker-DW12bwRL.cjs +0 -32
  815. package/components/item-option-positions-number-field-BFW0c-PE.js +0 -164
  816. package/components/item-option-positions-number-field-HofP9ee6.cjs +0 -49
  817. package/components/item-option-radio-button-group-BN_a7dSl.cjs +0 -37
  818. package/components/item-option-radio-button-group-CpdXh9GA.js +0 -74
  819. package/components/item-option-slider-B-CM9FzR.cjs +0 -33
  820. package/components/item-option-slider-CRjRQP3Z.js +0 -81
  821. package/components/item-option-switch-CY6zMkI-.cjs +0 -30
  822. package/components/item-option-switch-Q-IaH1Xr.js +0 -69
  823. package/components/item-option-text-field-BzHaYPud.js +0 -80
  824. package/components/item-option-text-field-C2_1-zLs.cjs +0 -33
  825. package/components/item-slot-drop-CNX2TBXB.js +0 -324
  826. package/components/item-slot-drop-CR-dvLaD.cjs +0 -91
  827. package/components/item-slot-drop-panel-BaJoR9Zc.js +0 -355
  828. package/components/item-slot-drop-panel-DTvbJtNW.cjs +0 -57
  829. package/components/item-slot-picker-CnKeeXp5.cjs +0 -158
  830. package/components/item-slot-picker-panel-BMapBAxj.js +0 -448
  831. package/components/item-slot-picker-panel-Dw682RiT.cjs +0 -81
  832. package/components/item-slot-picker-tHRu_jaI.js +0 -474
  833. package/components/line-chart-options.config-BkK829A2.cjs +0 -20
  834. package/components/line-chart-options.config-KFAaQqB_.js +0 -168
  835. package/components/line-chart-positioning.config-Bwe9-1yw.js +0 -55
  836. package/components/line-chart-positioning.config-CfVRqaxT.cjs +0 -20
  837. package/components/line-chart-slots.config-D0jaC82U.js +0 -55
  838. package/components/line-chart-slots.config-vv66fcoE.cjs +0 -20
  839. package/components/load-data-fields-for-datasets-BNnr8x3m.js +0 -42
  840. package/components/load-data-fields-for-datasets-CW4Voiex.cjs +0 -20
  841. package/components/localized-mixin-BvQbkZEL.js +0 -45
  842. package/components/localized-mixin-DrK3QZNa.cjs +0 -20
  843. package/components/marker-map-options.config-BfPFVxpD.cjs +0 -20
  844. package/components/marker-map-options.config-D0RmFKKM.js +0 -117
  845. package/components/marker-map-positioning.config-DLXbw6Yd.cjs +0 -20
  846. package/components/marker-map-positioning.config-DLehY4Lv.js +0 -48
  847. package/components/marker-map-slots.config-DigZk7lN.cjs +0 -20
  848. package/components/marker-map-slots.config-DsMklO0v.js +0 -37
  849. package/components/nl-C_g1Le3t.js +0 -473
  850. package/components/nl-PxN5EqzT.cjs +0 -20
  851. package/components/ohlc-chart-options.config-BBdUKmJ9.js +0 -65
  852. package/components/ohlc-chart-options.config-BsBVP-Io.cjs +0 -20
  853. package/components/ohlc-chart-positioning.config-BGU-mDPW.cjs +0 -20
  854. package/components/ohlc-chart-positioning.config-Cz3zieDp.js +0 -78
  855. package/components/ohlc-chart-slots.config-BiQn5Kdg.js +0 -68
  856. package/components/ohlc-chart-slots.config-D3fzoQJH.cjs +0 -20
  857. package/components/parallel-coordinates-plot-options.config--6iJkURT.cjs +0 -20
  858. package/components/parallel-coordinates-plot-options.config-KJrOL0Sr.js +0 -42
  859. package/components/parallel-coordinates-plot-positioning.config-CXIMbncP.cjs +0 -20
  860. package/components/parallel-coordinates-plot-positioning.config-Cc8k6gqG.js +0 -48
  861. package/components/parallel-coordinates-plot-slots.config-B7QY714-.js +0 -46
  862. package/components/parallel-coordinates-plot-slots.config-s_tLqGA-.cjs +0 -20
  863. package/components/period-over-period-condition.const-BZ7j5Z5t.js +0 -29
  864. package/components/period-over-period-condition.const-C1NZ9Bkp.cjs +0 -20
  865. package/components/pivot-table-options.config-CKGnnXa_.cjs +0 -20
  866. package/components/pivot-table-options.config-DEmZ_EQi.js +0 -245
  867. package/components/pivot-table-positioning.config-BBd6xf8q.cjs +0 -20
  868. package/components/pivot-table-positioning.config-BK7wgw1A.js +0 -55
  869. package/components/pivot-table-slots.config-DpDaXLdw.js +0 -55
  870. package/components/pivot-table-slots.config-KlYXL90k.cjs +0 -20
  871. package/components/pragmatic-element-adapter-C_7HSvGV.js +0 -1252
  872. package/components/pragmatic-element-adapter-DPWYJiW9.cjs +0 -24
  873. package/components/pyramid-chart-options.config-8QtjhcJC.cjs +0 -20
  874. package/components/pyramid-chart-options.config-DiD3QFps.js +0 -240
  875. package/components/pyramid-chart-positioning.config-C7STytAm.cjs +0 -20
  876. package/components/pyramid-chart-positioning.config-CGjiKyPG.js +0 -55
  877. package/components/pyramid-chart-slots.config-BrKgartT.js +0 -50
  878. package/components/pyramid-chart-slots.config-CreUpxI2.cjs +0 -20
  879. package/components/radar-chart-options.config-COBM2L3R.js +0 -130
  880. package/components/radar-chart-options.config-DvW36_zk.cjs +0 -20
  881. package/components/radar-chart-positioning.config-6xWEPHjC.js +0 -55
  882. package/components/radar-chart-positioning.config-p0s42Zyt.cjs +0 -20
  883. package/components/radar-chart-slots.config-B3oIp-8w.cjs +0 -20
  884. package/components/radar-chart-slots.config-SivEBhuj.js +0 -53
  885. package/components/regular-table-options.config-B0WNqEjR.cjs +0 -20
  886. package/components/regular-table-options.config-B0zRcsWM.js +0 -148
  887. package/components/regular-table-slots.config-M2axBXl4.js +0 -35
  888. package/components/regular-table-slots.config-UwzWj6gg.cjs +0 -20
  889. package/components/route-map-options.config-CYNKz_Xm.cjs +0 -20
  890. package/components/route-map-options.config-CrMrDQ_l.js +0 -326
  891. package/components/route-map-positioning.config-B2qAh6WW.js +0 -66
  892. package/components/route-map-positioning.config-C8KmQ33c.cjs +0 -20
  893. package/components/route-map-slots.config-COCoP99E.js +0 -59
  894. package/components/route-map-slots.config-DfYT65BF.cjs +0 -20
  895. package/components/sankey-diagram-options.config-BYLiy1UX.js +0 -126
  896. package/components/sankey-diagram-options.config-D49IZ1y3.cjs +0 -20
  897. package/components/sankey-diagram-positioning.config-CBLQktr4.js +0 -66
  898. package/components/sankey-diagram-positioning.config-DAF803wR.cjs +0 -20
  899. package/components/sankey-diagram-slots.config-C-sqtrS-.js +0 -61
  900. package/components/sankey-diagram-slots.config-D-_u4w36.cjs +0 -20
  901. package/components/scatter-plot-options.config-BETVLevv.cjs +0 -20
  902. package/components/scatter-plot-options.config-BpUYcLt-.js +0 -302
  903. package/components/scatter-plot-positioning.config-0hj66nn4.cjs +0 -20
  904. package/components/scatter-plot-positioning.config-Be9hQ727.js +0 -77
  905. package/components/scatter-plot-slots.config-CrG6wQtV.cjs +0 -20
  906. package/components/scatter-plot-slots.config-Dg78lS25.js +0 -74
  907. package/components/search-filter-options.config-B-dGVPhS.cjs +0 -20
  908. package/components/search-filter-options.config-lGQ-biU5.js +0 -103
  909. package/components/search-filter-slots.config-BhDSDpNd.js +0 -39
  910. package/components/search-filter-slots.config-DP06ulJA.cjs +0 -20
  911. package/components/set-locale-DB1FMgtK.js +0 -43
  912. package/components/set-locale-DKCZkJVL.cjs +0 -20
  913. package/components/slicer-filter-options.config-7OXpRWtw.cjs +0 -20
  914. package/components/slicer-filter-options.config-B6rxZYcl.js +0 -226
  915. package/components/slicer-filter-positioning.config-BQoRGx8R.js +0 -48
  916. package/components/slicer-filter-positioning.config-CvcZ3qkf.cjs +0 -20
  917. package/components/slicer-filter-slots.config-CHKpdJvF.cjs +0 -20
  918. package/components/slicer-filter-slots.config-XtuZoiId.js +0 -44
  919. package/components/slider-filter-options.config-C7-5aoaC.js +0 -72
  920. package/components/slider-filter-options.config-CRdbX1IJ.cjs +0 -20
  921. package/components/slider-filter-slots.config-9R298H0t.cjs +0 -20
  922. package/components/slider-filter-slots.config-BYkIGVvh.js +0 -43
  923. package/components/slot-menu/index.cjs +0 -20
  924. package/components/slot-menu/index.d.ts +0 -10
  925. package/components/slot-menu/index.js +0 -28
  926. package/components/slot-menu/slot-menu.d.ts +0 -143
  927. package/components/slot-menu/types.d.ts +0 -24
  928. package/components/slot-menu-CkiIhk9e.cjs +0 -64
  929. package/components/slot-menu-DZPe7qUA.js +0 -404
  930. package/components/slot-menu-list/index.cjs +0 -20
  931. package/components/slot-menu-list/index.d.ts +0 -8
  932. package/components/slot-menu-list/index.js +0 -28
  933. package/components/slot-menu-list/slot-menu-list.d.ts +0 -42
  934. package/components/slot-menu-list-BRsAe3-b.js +0 -326
  935. package/components/slot-menu-list-CCrkNqq8.cjs +0 -38
  936. package/components/slots-config-DMC15sjT.js +0 -77
  937. package/components/slots-config-DVH0lz6t.cjs +0 -20
  938. package/components/speedometer-chart-options.config-Bd3-G7S7.js +0 -246
  939. package/components/speedometer-chart-options.config-BsIu28S3.cjs +0 -20
  940. package/components/speedometer-chart-positioning.config-CAsBGyZ7.cjs +0 -20
  941. package/components/speedometer-chart-positioning.config-CsgmgREh.js +0 -48
  942. package/components/speedometer-chart-slots.config-CkeiXSCy.js +0 -39
  943. package/components/speedometer-chart-slots.config-S_hQm2MV.cjs +0 -20
  944. package/components/spike-map-options.config-B_2BXI_9.js +0 -413
  945. package/components/spike-map-options.config-aaiZyME6.cjs +0 -20
  946. package/components/spike-map-positioning.config-BS8MuRkQ.js +0 -55
  947. package/components/spike-map-positioning.config-D4isshlL.cjs +0 -20
  948. package/components/spike-map-slots.config-C44Vxsit.js +0 -47
  949. package/components/spike-map-slots.config-cKfaD6dQ.cjs +0 -20
  950. package/components/strip-plot-options.config-By62J2Jj.js +0 -53
  951. package/components/strip-plot-options.config-TB3rkoj2.cjs +0 -20
  952. package/components/strip-plot-positioning.config-CufC8vJi.js +0 -48
  953. package/components/strip-plot-positioning.config-NpwP9QGU.cjs +0 -20
  954. package/components/strip-plot-slots.config-DNYlrK_c.cjs +0 -20
  955. package/components/strip-plot-slots.config-xsNFXerT.js +0 -38
  956. package/components/sunburst-chart-options.config-Ckk_kY_s.cjs +0 -20
  957. package/components/sunburst-chart-options.config-DwQwkQxR.js +0 -160
  958. package/components/sunburst-chart-positioning.config-C5UCbZWE.cjs +0 -20
  959. package/components/sunburst-chart-positioning.config-D60TNhUU.js +0 -48
  960. package/components/sunburst-chart-slots.config-D6Z2_Kh_.js +0 -38
  961. package/components/sunburst-chart-slots.config-DkUUt5RF.cjs +0 -20
  962. package/components/symbol-map-options.config-56eoWz4w.cjs +0 -20
  963. package/components/symbol-map-options.config-uXEbOHWD.js +0 -157
  964. package/components/symbol-map-positioning.config-D1esOfIw.js +0 -55
  965. package/components/symbol-map-positioning.config-D__gPAF-.cjs +0 -20
  966. package/components/symbol-map-slots.config-CHTIkMw4.js +0 -53
  967. package/components/symbol-map-slots.config-DwNf547A.cjs +0 -20
  968. package/components/text-options.config-B5y7YAqT.js +0 -67
  969. package/components/text-options.config-BwBCG2yo.cjs +0 -20
  970. package/components/text-slots.config-CPghLc8b.cjs +0 -20
  971. package/components/text-slots.config-sFoowMc6.js +0 -24
  972. package/components/treemap-chart-options.config-BouAbrk0.js +0 -184
  973. package/components/treemap-chart-options.config-r6biULUj.cjs +0 -20
  974. package/components/treemap-chart-positioning.config-BZ1yMqy5.cjs +0 -20
  975. package/components/treemap-chart-positioning.config-DEnYiZKj.js +0 -55
  976. package/components/treemap-chart-slots.config-BjHBRWDJ.js +0 -47
  977. package/components/treemap-chart-slots.config-CS3ot6ZJ.cjs +0 -20
  978. package/components/utils-Bn8v7iuu.cjs +0 -20
  979. package/components/utils-CIxpLDLh.js +0 -352
  980. package/components/v4-DIjJgmR0.js +0 -49
  981. package/components/venn-diagram-options.config-BZWBYEhB.js +0 -24
  982. package/components/venn-diagram-options.config-BamlR1qo.cjs +0 -20
  983. package/components/venn-diagram-positioning.config-DMceiBb8.js +0 -55
  984. package/components/venn-diagram-positioning.config-DUvGRRSh.cjs +0 -20
  985. package/components/venn-diagram-slots.config-CM0HPIPD.js +0 -47
  986. package/components/venn-diagram-slots.config-DYTmU8v2.cjs +0 -20
  987. package/components/video-options.config-BhBpkaLJ.cjs +0 -20
  988. package/components/video-options.config-DWuy1OHa.js +0 -127
  989. package/components/video-slots.config-B_aDlTp6.js +0 -24
  990. package/components/video-slots.config-DMut7o7r.cjs +0 -20
  991. package/components/viz-item-menu/index.cjs +0 -20
  992. package/components/viz-item-menu/index.d.ts +0 -8
  993. package/components/viz-item-menu/index.js +0 -28
  994. package/components/viz-item-menu/types.d.ts +0 -9
  995. package/components/viz-item-menu/viz-item-menu.d.ts +0 -75
  996. package/components/viz-item-menu-BisYrhhJ.js +0 -170
  997. package/components/viz-item-menu-DEpm1w7U.cjs +0 -55
  998. package/components/wordcloud-chart-options.config-D041tFDG.js +0 -90
  999. package/components/wordcloud-chart-options.config-DgH4JgN2.cjs +0 -20
  1000. package/components/wordcloud-chart-positioning.config-CeP0_j_m.cjs +0 -20
  1001. package/components/wordcloud-chart-positioning.config-tVRXTpdQ.js +0 -55
  1002. package/components/wordcloud-chart-slots.config-Cy-Jgcaq.js +0 -45
  1003. package/components/wordcloud-chart-slots.config-V29v2Fhr.cjs +0 -20
  1004. package/react/components/ai-chat/empty-state/index.ts +0 -1
  1005. package/react/components/ai-chat/empty-state/types.ts +0 -16
  1006. package/react/components/ai-chat/stream/index.ts +0 -1
  1007. package/react/components/ai-chat/stream/types.ts +0 -60
  1008. package/react/components/ai-chat.component.ts +0 -45
  1009. package/react/components/ai-interaction-textarea/index.ts +0 -1
  1010. package/react/components/ai-interaction-textarea/types.ts +0 -6
  1011. package/react/components/ai-interaction-textarea.component.ts +0 -30
  1012. package/react/components/data-field-level.component.ts +0 -30
  1013. package/react/components/data-fields-select/index.ts +0 -1
  1014. package/react/components/data-fields-select/types.ts +0 -5
  1015. package/react/components/data-fields-select.component.ts +0 -27
  1016. package/react/components/dataset-icon/index.ts +0 -1
  1017. package/react/components/dataset-icon/types.ts +0 -8
  1018. package/react/components/dataset-icon.component.ts +0 -22
  1019. package/react/components/dataset-selector-list.component.ts +0 -27
  1020. package/react/components/dataset-selector-row.component.ts +0 -30
  1021. package/react/components/display-settings/index.ts +0 -1
  1022. package/react/components/display-settings/types.ts +0 -12
  1023. package/react/components/display-settings-binning.component.ts +0 -27
  1024. package/react/components/display-settings-datetime.component.ts +0 -27
  1025. package/react/components/display-settings-grand-totals.component.ts +0 -27
  1026. package/react/components/display-settings-numeric.component.ts +0 -27
  1027. package/react/components/display-settings-period-over-period.component.ts +0 -27
  1028. package/react/components/display-settings.component.ts +0 -33
  1029. package/react/components/filter-expression-picker.component.ts +0 -27
  1030. package/react/components/filter-item.component.ts +0 -27
  1031. package/react/components/filter-parameter-picker.component.ts +0 -22
  1032. package/react/components/filter-value-picker-datetime.component.ts +0 -27
  1033. package/react/components/filter-value-picker-hierarchy.component.ts +0 -27
  1034. package/react/components/filter-value-picker-numeric.component.ts +0 -27
  1035. package/react/components/filter-value-picker.component.ts +0 -27
  1036. package/react/components/formula-draggable-field/index.ts +0 -1
  1037. package/react/components/formula-draggable-field/types.ts +0 -26
  1038. package/react/components/formula-field.component.ts +0 -30
  1039. package/react/components/interactive-viz-item/index.ts +0 -1
  1040. package/react/components/interactive-viz-item/types.ts +0 -122
  1041. package/react/components/interactive-viz-item.component.ts +0 -33
  1042. package/react/components/slot-menu/index.ts +0 -1
  1043. package/react/components/slot-menu/types.ts +0 -29
  1044. package/react/components/slot-menu-list.component.ts +0 -27
  1045. package/react/components/slot-menu.component.ts +0 -42
  1046. package/react/components/viz-item-menu/index.ts +0 -1
  1047. package/react/components/viz-item-menu/types.ts +0 -11
  1048. package/react/components/viz-item-menu.component.ts +0 -33
  1049. package/react/esm/components/ai-chat/empty-state/index.d.ts +0 -1
  1050. package/react/esm/components/ai-chat/empty-state/index.js +0 -1
  1051. package/react/esm/components/ai-chat/empty-state/types.d.ts +0 -14
  1052. package/react/esm/components/ai-chat/stream/index.d.ts +0 -1
  1053. package/react/esm/components/ai-chat/stream/index.js +0 -1
  1054. package/react/esm/components/ai-chat/stream/types.d.ts +0 -55
  1055. package/react/esm/components/ai-chat.component.d.ts +0 -24
  1056. package/react/esm/components/ai-chat.component.js +0 -29
  1057. package/react/esm/components/ai-interaction-textarea/index.d.ts +0 -1
  1058. package/react/esm/components/ai-interaction-textarea/index.js +0 -1
  1059. package/react/esm/components/ai-interaction-textarea/types.d.ts +0 -5
  1060. package/react/esm/components/ai-interaction-textarea.component.d.ts +0 -14
  1061. package/react/esm/components/ai-interaction-textarea.component.js +0 -19
  1062. package/react/esm/components/data-field-level.component.d.ts +0 -14
  1063. package/react/esm/components/data-field-level.component.js +0 -19
  1064. package/react/esm/components/data-fields-select/index.d.ts +0 -1
  1065. package/react/esm/components/data-fields-select/index.js +0 -1
  1066. package/react/esm/components/data-fields-select/types.d.ts +0 -4
  1067. package/react/esm/components/data-fields-select.component.d.ts +0 -12
  1068. package/react/esm/components/data-fields-select.component.js +0 -17
  1069. package/react/esm/components/dataset-icon/index.d.ts +0 -1
  1070. package/react/esm/components/dataset-icon/index.js +0 -1
  1071. package/react/esm/components/dataset-icon/types.d.ts +0 -11
  1072. package/react/esm/components/dataset-icon/types.js +0 -1
  1073. package/react/esm/components/dataset-icon.component.d.ts +0 -8
  1074. package/react/esm/components/dataset-icon.component.js +0 -13
  1075. package/react/esm/components/dataset-selector-list.component.d.ts +0 -12
  1076. package/react/esm/components/dataset-selector-list.component.js +0 -17
  1077. package/react/esm/components/dataset-selector-row.component.d.ts +0 -14
  1078. package/react/esm/components/dataset-selector-row.component.js +0 -19
  1079. package/react/esm/components/display-settings/index.d.ts +0 -1
  1080. package/react/esm/components/display-settings/index.js +0 -1
  1081. package/react/esm/components/display-settings/types.d.ts +0 -9
  1082. package/react/esm/components/display-settings/types.js +0 -1
  1083. package/react/esm/components/display-settings-binning.component.d.ts +0 -12
  1084. package/react/esm/components/display-settings-binning.component.js +0 -17
  1085. package/react/esm/components/display-settings-datetime.component.d.ts +0 -12
  1086. package/react/esm/components/display-settings-datetime.component.js +0 -17
  1087. package/react/esm/components/display-settings-grand-totals.component.d.ts +0 -12
  1088. package/react/esm/components/display-settings-grand-totals.component.js +0 -17
  1089. package/react/esm/components/display-settings-numeric.component.d.ts +0 -12
  1090. package/react/esm/components/display-settings-numeric.component.js +0 -17
  1091. package/react/esm/components/display-settings-period-over-period.component.d.ts +0 -12
  1092. package/react/esm/components/display-settings-period-over-period.component.js +0 -17
  1093. package/react/esm/components/display-settings.component.d.ts +0 -16
  1094. package/react/esm/components/display-settings.component.js +0 -21
  1095. package/react/esm/components/filter-expression-picker.component.d.ts +0 -12
  1096. package/react/esm/components/filter-expression-picker.component.js +0 -17
  1097. package/react/esm/components/filter-item.component.d.ts +0 -12
  1098. package/react/esm/components/filter-item.component.js +0 -17
  1099. package/react/esm/components/filter-parameter-picker.component.d.ts +0 -8
  1100. package/react/esm/components/filter-parameter-picker.component.js +0 -13
  1101. package/react/esm/components/filter-value-picker-datetime.component.d.ts +0 -12
  1102. package/react/esm/components/filter-value-picker-datetime.component.js +0 -17
  1103. package/react/esm/components/filter-value-picker-hierarchy.component.d.ts +0 -12
  1104. package/react/esm/components/filter-value-picker-hierarchy.component.js +0 -17
  1105. package/react/esm/components/filter-value-picker-numeric.component.d.ts +0 -12
  1106. package/react/esm/components/filter-value-picker-numeric.component.js +0 -17
  1107. package/react/esm/components/filter-value-picker.component.d.ts +0 -12
  1108. package/react/esm/components/filter-value-picker.component.js +0 -17
  1109. package/react/esm/components/formula-draggable-field/index.d.ts +0 -1
  1110. package/react/esm/components/formula-draggable-field/index.js +0 -1
  1111. package/react/esm/components/formula-draggable-field/types.d.ts +0 -24
  1112. package/react/esm/components/formula-draggable-field/types.js +0 -1
  1113. package/react/esm/components/formula-field.component.d.ts +0 -14
  1114. package/react/esm/components/formula-field.component.js +0 -19
  1115. package/react/esm/components/interactive-viz-item/index.d.ts +0 -1
  1116. package/react/esm/components/interactive-viz-item/index.js +0 -1
  1117. package/react/esm/components/interactive-viz-item/types.d.ts +0 -117
  1118. package/react/esm/components/interactive-viz-item/types.js +0 -16
  1119. package/react/esm/components/interactive-viz-item.component.d.ts +0 -16
  1120. package/react/esm/components/interactive-viz-item.component.js +0 -21
  1121. package/react/esm/components/slot-menu/index.d.ts +0 -1
  1122. package/react/esm/components/slot-menu/index.js +0 -1
  1123. package/react/esm/components/slot-menu/types.d.ts +0 -24
  1124. package/react/esm/components/slot-menu/types.js +0 -1
  1125. package/react/esm/components/slot-menu-list.component.d.ts +0 -12
  1126. package/react/esm/components/slot-menu-list.component.js +0 -17
  1127. package/react/esm/components/slot-menu.component.d.ts +0 -22
  1128. package/react/esm/components/slot-menu.component.js +0 -27
  1129. package/react/esm/components/viz-item-menu/index.d.ts +0 -1
  1130. package/react/esm/components/viz-item-menu/index.js +0 -1
  1131. package/react/esm/components/viz-item-menu/types.d.ts +0 -9
  1132. package/react/esm/components/viz-item-menu/types.js +0 -1
  1133. package/react/esm/components/viz-item-menu.component.d.ts +0 -16
  1134. package/react/esm/components/viz-item-menu.component.js +0 -21
  1135. package/storybook/inject-global-vars.d.ts +0 -1
  1136. package/storybook/register-components.d.ts +0 -51
  1137. package/types/ai-chat.types.d.ts +0 -90
  1138. package/types/data-field-events.types.d.ts +0 -7
  1139. /package/components/{rolldown-runtime-mLOUI7ql.cjs → chunk-mLOUI7ql.cjs} +0 -0
  1140. /package/react/{esm/components/ai-chat/empty-state/types.js → utils/formula/config/tests/build-datasets.test.d.ts} +0 -0
  1141. /package/react/{esm/components/ai-chat/stream/types.js → utils/slot-content/tests/ad-hoc-slot-content.test.d.ts} +0 -0
  1142. /package/{react/esm/components/ai-interaction-textarea/types.js → utils/formula/config/tests/build-datasets.test.d.ts} +0 -0
  1143. /package/{react/esm/components/data-fields-select/types.js → utils/slot-content/tests/ad-hoc-slot-content.test.d.ts} +0 -0
@@ -1,3835 +0,0 @@
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-vk9LuivN.js";
21
- import { t } from "./decorate-DyMgX_Uh.js";
22
- import "./ai-interaction-textarea-cAXXLnoj.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/button";
26
- import "@luzmo/lucero/chat-message";
27
- import "@luzmo/lucero/icon";
28
- import "@luzmo/lucero/overlay";
29
- import "@luzmo/lucero/popover";
30
- import "@luzmo/lucero/progress-steps";
31
- import { html as o, nothing as s, unsafeCSS as c } from "lit";
32
- import { property as l, state as u } from "lit/decorators.js";
33
- import { unsafeHTML as d } from "lit/directives/unsafe-html.js";
34
- import "@luzmo/lucero/action-button";
35
- //#region node_modules/dompurify/dist/purify.es.mjs
36
- function ee(e, t) {
37
- (t == null || t > e.length) && (t = e.length);
38
- for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
39
- return r;
40
- }
41
- function te(e) {
42
- if (Array.isArray(e)) return e;
43
- }
44
- function ne(e, t) {
45
- var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
46
- if (n != null) {
47
- var r, i, a, o, s = [], c = !0, l = !1;
48
- try {
49
- 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);
50
- } catch (e) {
51
- l = !0, i = e;
52
- } finally {
53
- try {
54
- if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
55
- } finally {
56
- if (l) throw i;
57
- }
58
- }
59
- return s;
60
- }
61
- }
62
- function re() {
63
- throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
64
- }
65
- function ie(e, t) {
66
- return te(e) || ne(e, t) || ae(e, t) || re();
67
- }
68
- function ae(e, t) {
69
- if (e) {
70
- if (typeof e == "string") return ee(e, t);
71
- var n = {}.toString.call(e).slice(8, -1);
72
- 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;
73
- }
74
- }
75
- 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;
76
- h ||= function(e) {
77
- return e;
78
- }, g ||= function(e) {
79
- return e;
80
- }, le ||= function(e, t) {
81
- var n = [...arguments].slice(2);
82
- return e.apply(t, n);
83
- }, ue ||= function(e) {
84
- return new e(...[...arguments].slice(1));
85
- };
86
- 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);
87
- function x(e) {
88
- return function(t) {
89
- t instanceof RegExp && (t.lastIndex = 0);
90
- var n = [...arguments].slice(1);
91
- return le(e, t, n);
92
- };
93
- }
94
- function Oe(e) {
95
- return function() {
96
- return ue(e, [...arguments]);
97
- };
98
- }
99
- function S(e, t) {
100
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _e;
101
- if (se && se(e, null), !ge(t)) return e;
102
- let r = t.length;
103
- for (; r--;) {
104
- let i = t[r];
105
- if (typeof i == "string") {
106
- let e = n(i);
107
- e !== i && (f(t) || (t[r] = e), i = e);
108
- }
109
- e[i] = !0;
110
- }
111
- return e;
112
- }
113
- function ke(e) {
114
- for (let t = 0; t < e.length; t++) y(e, t) || (e[t] = null);
115
- return e;
116
- }
117
- function C(e) {
118
- let t = ce(null);
119
- for (let r of oe(e)) {
120
- var n = ie(r, 2);
121
- let i = n[0], a = n[1];
122
- y(e, i) && (ge(a) ? t[i] = ke(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = C(a) : t[i] = a);
123
- }
124
- return t;
125
- }
126
- function Ae(e) {
127
- switch (typeof e) {
128
- case "string": return e;
129
- case "number": return Ce(e);
130
- case "boolean": return we(e);
131
- case "bigint": return v ? v(e) : "0";
132
- case "symbol": return Te ? Te(e) : "Symbol()";
133
- case "undefined": return Ee(e);
134
- case "function":
135
- case "object": {
136
- if (e === null) return Ee(e);
137
- let t = e, n = w(t, "toString");
138
- if (typeof n == "function") {
139
- let e = n(t);
140
- return typeof e == "string" ? e : Ee(e);
141
- }
142
- return Ee(e);
143
- }
144
- default: return Ee(e);
145
- }
146
- }
147
- function w(e, t) {
148
- for (; e !== null;) {
149
- let n = m(e, t);
150
- if (n) {
151
- if (n.get) return x(n.get);
152
- if (typeof n.value == "function") return x(n.value);
153
- }
154
- e = p(e);
155
- }
156
- function n() {
157
- return null;
158
- }
159
- return n;
160
- }
161
- function je(e) {
162
- try {
163
- return b(e, ""), !0;
164
- } catch {
165
- return !1;
166
- }
167
- }
168
- 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([
169
- "feBlend",
170
- "feColorMatrix",
171
- "feComponentTransfer",
172
- "feComposite",
173
- "feConvolveMatrix",
174
- "feDiffuseLighting",
175
- "feDisplacementMap",
176
- "feDistantLight",
177
- "feDropShadow",
178
- "feFlood",
179
- "feFuncA",
180
- "feFuncB",
181
- "feFuncG",
182
- "feFuncR",
183
- "feGaussianBlur",
184
- "feImage",
185
- "feMerge",
186
- "feMergeNode",
187
- "feMorphology",
188
- "feOffset",
189
- "fePointLight",
190
- "feSpecularLighting",
191
- "feSpotLight",
192
- "feTile",
193
- "feTurbulence"
194
- ]), Fe = h([
195
- "animate",
196
- "color-profile",
197
- "cursor",
198
- "discard",
199
- "font-face",
200
- "font-face-format",
201
- "font-face-name",
202
- "font-face-src",
203
- "font-face-uri",
204
- "foreignobject",
205
- "hatch",
206
- "hatchpath",
207
- "mesh",
208
- "meshgradient",
209
- "meshpatch",
210
- "meshrow",
211
- "missing-glyph",
212
- "script",
213
- "set",
214
- "solidcolor",
215
- "unknown",
216
- "use"
217
- ]), 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([
218
- "maction",
219
- "maligngroup",
220
- "malignmark",
221
- "mlongdiv",
222
- "mscarries",
223
- "mscarry",
224
- "msgroup",
225
- "mstack",
226
- "msline",
227
- "msrow",
228
- "semantics",
229
- "annotation",
230
- "annotation-xml",
231
- "mprescripts",
232
- "none"
233
- ]), 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([
234
- "xlink:href",
235
- "xml:id",
236
- "xlink:title",
237
- "xml:space",
238
- "xmlns:xlink"
239
- ]), 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 = {
240
- element: 1,
241
- attribute: 2,
242
- text: 3,
243
- cdataSection: 4,
244
- entityReference: 5,
245
- entityNode: 6,
246
- processingInstruction: 7,
247
- comment: 8,
248
- document: 9,
249
- documentType: 10,
250
- documentFragment: 11,
251
- notation: 12
252
- }, rt = function() {
253
- return typeof window > "u" ? null : window;
254
- }, it = function(e, t) {
255
- if (typeof e != "object" || typeof e.createPolicy != "function") return null;
256
- let n = null, r = "data-tt-policy-suffix";
257
- t && t.hasAttribute(r) && (n = t.getAttribute(r));
258
- let i = "dompurify" + (n ? "#" + n : "");
259
- try {
260
- return e.createPolicy(i, {
261
- createHTML(e) {
262
- return e;
263
- },
264
- createScriptURL(e) {
265
- return e;
266
- }
267
- });
268
- } catch {
269
- return console.warn("TrustedTypes policy " + i + " could not be created."), null;
270
- }
271
- }, at = function() {
272
- return {
273
- afterSanitizeAttributes: [],
274
- afterSanitizeElements: [],
275
- afterSanitizeShadowDOM: [],
276
- beforeSanitizeAttributes: [],
277
- beforeSanitizeElements: [],
278
- beforeSanitizeShadowDOM: [],
279
- uponSanitizeAttribute: [],
280
- uponSanitizeElement: [],
281
- uponSanitizeShadowNode: []
282
- };
283
- }, E = function(e, t, n, r) {
284
- return y(e, t) && ge(e[t]) ? S(r.base ? C(r.base) : {}, e[t], r.transform) : n;
285
- };
286
- function ot() {
287
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rt(), t = (e) => ot(e);
288
- if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== T.document || !e.Element) return t.isSupported = !1, t;
289
- let n = e.document, r = n, i = r.currentScript;
290
- e.DocumentFragment;
291
- let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
292
- e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
293
- 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;
294
- if (typeof a == "function") {
295
- let e = n.createElement("template");
296
- e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
297
- }
298
- let m, _ = "", le, ue = !1, Ce = 0, we = function() {
299
- 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.");
300
- }, v = function(e) {
301
- we(), Ce++;
302
- try {
303
- return m.createHTML(e);
304
- } finally {
305
- Ce--;
306
- }
307
- }, Te = function(e) {
308
- we(), Ce++;
309
- try {
310
- return m.createScriptURL(e);
311
- } finally {
312
- Ce--;
313
- }
314
- }, Ee = function() {
315
- return ue ||= (le = it(u, i), !0), le;
316
- }, x = n, Oe = x.implementation, ke = x.createNodeIterator, st = x.createDocumentFragment, ct = x.getElementsByTagName, D = r.importNode, O = at();
317
- t.isSupported = typeof oe == "function" && typeof ie == "function" && Oe && Oe.createHTMLDocument !== void 0;
318
- let k = Ue, lt = We, A = Ge, ut = Ke, j = qe, dt = Ye, ft = Xe, pt = Qe, mt = Je, M = null, ht = S({}, [
319
- ...Me,
320
- ...Ne,
321
- ...Pe,
322
- ...Ie,
323
- ...Re
324
- ]), N = null, gt = S({}, [
325
- ...ze,
326
- ...Be,
327
- ...Ve,
328
- ...He
329
- ]), P = Object.seal(ce(null, {
330
- tagNameCheck: {
331
- writable: !0,
332
- configurable: !1,
333
- enumerable: !0,
334
- value: null
335
- },
336
- attributeNameCheck: {
337
- writable: !0,
338
- configurable: !1,
339
- enumerable: !0,
340
- value: null
341
- },
342
- allowCustomizedBuiltInElements: {
343
- writable: !0,
344
- configurable: !1,
345
- enumerable: !0,
346
- value: !1
347
- }
348
- })), _t = null, vt = null, F = Object.seal(ce(null, {
349
- tagCheck: {
350
- writable: !0,
351
- configurable: !1,
352
- enumerable: !0,
353
- value: null
354
- },
355
- attributeCheck: {
356
- writable: !0,
357
- configurable: !1,
358
- enumerable: !0,
359
- value: null
360
- }
361
- })), 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({}, [
362
- "audio",
363
- "video",
364
- "img",
365
- "source",
366
- "image",
367
- "track"
368
- ]), zt = null, Bt = S({}, [
369
- "alt",
370
- "class",
371
- "for",
372
- "id",
373
- "label",
374
- "name",
375
- "pattern",
376
- "placeholder",
377
- "role",
378
- "summary",
379
- "title",
380
- "value",
381
- "style",
382
- "xmlns"
383
- ]), 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({}, [
384
- Vt,
385
- Ht,
386
- B
387
- ], ve), qt = h([
388
- "mi",
389
- "mo",
390
- "mn",
391
- "ms",
392
- "mtext"
393
- ]), Jt = S({}, qt), Yt = h(["annotation-xml"]), Xt = S({}, Yt), Zt = S({}, [
394
- "title",
395
- "style",
396
- "font",
397
- "a",
398
- "script"
399
- ]), Qt = null, $t = ["application/xhtml+xml", "text/html"], V = null, H = null, en = n.createElement("form"), tn = function(e) {
400
- return e instanceof RegExp || e instanceof Function;
401
- }, nn = function() {
402
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
403
- if (H && H === e) return;
404
- (!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, {
405
- transform: V,
406
- base: Bt
407
- }), Lt = E(e, "ADD_DATA_URI_TAGS", Rt, {
408
- transform: V,
409
- base: Rt
410
- }), 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);
411
- let t = y(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? C(e.CUSTOM_ELEMENT_HANDLING) : ce(null);
412
- 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, [
413
- "html",
414
- "head",
415
- "body"
416
- ]), M.table && (S(M, ["tbody"]), delete _t.tbody), e.TRUSTED_TYPES_POLICY) {
417
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
418
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw De("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
419
- let t = m;
420
- m = e.TRUSTED_TYPES_POLICY;
421
- try {
422
- _ = v("");
423
- } catch (e) {
424
- throw m = t, e;
425
- }
426
- } else e.TRUSTED_TYPES_POLICY === null ? (m = void 0, _ = "") : (m === void 0 && (m = Ee()), m && typeof _ == "string" && (_ = v("")));
427
- h && h(e), H = e;
428
- }, rn = S({}, [
429
- ...Ne,
430
- ...Pe,
431
- ...Fe
432
- ]), an = S({}, [...Ie, ...Le]), on = function(e, t, n) {
433
- return t.namespaceURI === B ? e === "svg" : t.namespaceURI === Vt ? e === "svg" && (n === "annotation-xml" || Jt[n]) : !!rn[e];
434
- }, sn = function(e, t, n) {
435
- return t.namespaceURI === B ? e === "math" : t.namespaceURI === Ht ? e === "math" && Xt[n] : !!an[e];
436
- }, U = function(e, t, n) {
437
- return t.namespaceURI === Ht && !Xt[n] || t.namespaceURI === Vt && !Jt[n] ? !1 : !an[e] && (Zt[e] || !rn[e]);
438
- }, cn = function(e) {
439
- let t = ie(e);
440
- (!t || !t.tagName) && (t = {
441
- namespaceURI: Ut,
442
- tagName: "template"
443
- });
444
- let n = _e(e.tagName), r = _e(t.tagName);
445
- 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;
446
- }, W = function(e) {
447
- me(t.removed, { element: e });
448
- try {
449
- ie(e).removeChild(e);
450
- } catch {
451
- 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");
452
- }
453
- }, G = function(e) {
454
- let t = re(e);
455
- if (t) {
456
- let e = [];
457
- de(t, (t) => {
458
- me(e, t);
459
- }), de(e, (e) => {
460
- try {
461
- te(e);
462
- } catch {}
463
- });
464
- }
465
- let n = se(e);
466
- if (n) for (let t = n.length - 1; t >= 0; --t) {
467
- let r = n[t], i = r && r.name;
468
- if (typeof i == "string") try {
469
- e.removeAttribute(i);
470
- } catch {}
471
- }
472
- }, K = function(e, n) {
473
- try {
474
- me(t.removed, {
475
- attribute: n.getAttributeNode(e),
476
- from: n
477
- });
478
- } catch {
479
- me(t.removed, {
480
- attribute: null,
481
- from: n
482
- });
483
- }
484
- if (n.removeAttribute(e), e === "is") if (Ot || kt) try {
485
- W(n);
486
- } catch {}
487
- else try {
488
- n.setAttribute(e, "");
489
- } catch {}
490
- }, ln = function(e) {
491
- let t = se(e);
492
- if (t) for (let n = t.length - 1; n >= 0; --n) {
493
- let r = t[n], i = r && r.name;
494
- if (!(typeof i != "string" || N[V(i)])) try {
495
- e.removeAttribute(i);
496
- } catch {}
497
- }
498
- }, un = function(e) {
499
- let t = [e];
500
- for (; t.length > 0;) {
501
- let e = t.pop();
502
- (f ? f(e) : e.nodeType) === T.element && ln(e);
503
- let n = re(e);
504
- if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
505
- }
506
- }, dn = function(e) {
507
- let t = null, r = null;
508
- if (Dt) e = "<remove></remove>" + e;
509
- else {
510
- let t = ye(e, /^[\r\n\t ]+/);
511
- r = t && t[0];
512
- }
513
- Qt === "application/xhtml+xml" && Ut === B && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
514
- let i = m ? v(e) : e;
515
- if (Ut === B) try {
516
- t = new l().parseFromString(i, Qt);
517
- } catch {}
518
- if (!t || !t.documentElement) {
519
- t = Oe.createDocument(Ut, "template", null);
520
- try {
521
- t.documentElement.innerHTML = Wt ? _ : i;
522
- } catch {}
523
- }
524
- let a = t.body || t.documentElement;
525
- 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;
526
- }, fn = function(e) {
527
- 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);
528
- }, pn = function(e) {
529
- return e = be(e, k, " "), e = be(e, lt, " "), e = be(e, A, " "), e;
530
- }, q = function(e) {
531
- e.normalize();
532
- 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();
533
- for (; n;) n.data = pn(n.data), n = t.nextNode();
534
- let r = e.querySelectorAll?.call(e, "template");
535
- r && de(r, (e) => {
536
- Y(e.content) && q(e.content);
537
- });
538
- }, J = function(e) {
539
- let t = p ? p(e) : null;
540
- 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);
541
- }, Y = function(e) {
542
- if (!f || typeof e != "object" || !e) return !1;
543
- try {
544
- return f(e) === T.documentFragment;
545
- } catch {
546
- return !1;
547
- }
548
- }, X = function(e) {
549
- if (!f || typeof e != "object" || !e) return !1;
550
- try {
551
- return typeof f(e) == "number";
552
- } catch {
553
- return !1;
554
- }
555
- };
556
- function Z(e, n, r) {
557
- e.length !== 0 && de(e, (e) => {
558
- e.call(t, n, r, H);
559
- });
560
- }
561
- let mn = function(e, t) {
562
- 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));
563
- }, Q = function(e, t) {
564
- if (!_t[t] && vn(t) && (P.tagNameCheck instanceof RegExp && b(P.tagNameCheck, t) || P.tagNameCheck instanceof Function && P.tagNameCheck(t))) return !1;
565
- if (Nt && !z[t]) {
566
- let t = ie(e), n = re(e);
567
- if (n && t) {
568
- let r = n.length;
569
- for (let i = r - 1; i >= 0; --i) {
570
- let r = Pt ? n[i] : ee(n[i], !0);
571
- t.insertBefore(r, ne(e));
572
- }
573
- }
574
- }
575
- return W(e), !0;
576
- }, hn = function(e) {
577
- if (Z(O.beforeSanitizeElements, e, null), J(e)) return W(e), !0;
578
- let n = V(p ? p(e) : e.nodeName);
579
- if (Z(O.uponSanitizeElement, e, {
580
- tagName: n,
581
- allowedTags: M
582
- }), mn(e, n)) return W(e), !0;
583
- if (_t[n] || !(F.tagCheck instanceof Function && F.tagCheck(n)) && !M[n]) return Q(e, n);
584
- if ((f ? f(e) : e.nodeType) === T.element && !cn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && b(tt, e.innerHTML)) return W(e), !0;
585
- if (I && e.nodeType === T.text) {
586
- let n = pn(e.textContent);
587
- e.textContent !== n && (me(t.removed, { element: e.cloneNode() }), e.textContent = n);
588
- }
589
- return Z(O.afterSanitizeElements, e, null), !1;
590
- }, gn = function(e, t, r) {
591
- if (vt[t] || R && (t === "id" || t === "name") && (r in n || r in en)) return !1;
592
- let i = N[t] || F.attributeCheck instanceof Function && F.attributeCheck(t, e);
593
- if (!(bt && b(ut, t)) && !(yt && b(j, t))) {
594
- if (!i) {
595
- 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;
596
- } 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;
597
- }
598
- return !0;
599
- }, _n = S({}, [
600
- "annotation-xml",
601
- "color-profile",
602
- "font-face",
603
- "font-face-format",
604
- "font-face-name",
605
- "font-face-src",
606
- "font-face-uri",
607
- "missing-glyph"
608
- ]), vn = function(e) {
609
- return !_n[_e(e)] && b(pt, e);
610
- }, yn = function(e, t, n, r) {
611
- if (m && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
612
- case "TrustedHTML": return v(r);
613
- case "TrustedScriptURL": return Te(r);
614
- }
615
- return r;
616
- }, bn = function(e, n, r, i) {
617
- try {
618
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), J(e) ? W(e) : pe(t.removed);
619
- } catch {
620
- K(n, e);
621
- }
622
- }, xn = function(e) {
623
- Z(O.beforeSanitizeAttributes, e, null);
624
- let t = e.attributes;
625
- if (!t || J(e)) return;
626
- let n = {
627
- attrName: "",
628
- attrValue: "",
629
- keepAttr: !0,
630
- allowedAttributes: N,
631
- forceKeepAttr: void 0
632
- }, r = t.length, i = V(e.nodeName);
633
- for (; r--;) {
634
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = V(o), u = c, d = o === "value" ? u : Se(u);
635
- 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)) {
636
- K(o, e);
637
- continue;
638
- }
639
- if (l === "attributename" && ye(d, "href")) {
640
- K(o, e);
641
- continue;
642
- }
643
- if (!n.forceKeepAttr) {
644
- if (!n.keepAttr) {
645
- K(o, e);
646
- continue;
647
- }
648
- if (!St && b(nt, d)) {
649
- K(o, e);
650
- continue;
651
- }
652
- if (I && (d = pn(d)), !gn(i, l, d)) {
653
- K(o, e);
654
- continue;
655
- }
656
- d = yn(i, l, s, d), d !== u && bn(e, o, s, d);
657
- }
658
- }
659
- Z(O.afterSanitizeAttributes, e, null);
660
- }, Sn = function(e) {
661
- let t = null, n = fn(e);
662
- 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) {
663
- let e = ae(t);
664
- Y(e) && (Cn(e), Sn(e));
665
- }
666
- Z(O.afterSanitizeShadowDOM, e, null);
667
- }, Cn = function(e) {
668
- let t = [{
669
- node: e,
670
- shadow: null
671
- }];
672
- for (; t.length > 0;) {
673
- let e = t.pop();
674
- if (e.shadow) {
675
- Sn(e.shadow);
676
- continue;
677
- }
678
- let n = e.node, r = (f ? f(n) : n.nodeType) === T.element, i = re(n);
679
- if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
680
- node: i[e],
681
- shadow: null
682
- });
683
- if (r) {
684
- let e = p ? p(n) : null;
685
- if (typeof e == "string" && V(e) === "template") {
686
- let e = n.content;
687
- Y(e) && t.push({
688
- node: e,
689
- shadow: null
690
- });
691
- }
692
- }
693
- if (r) {
694
- let e = ae(n);
695
- Y(e) && t.push({
696
- node: null,
697
- shadow: e
698
- }, {
699
- node: e,
700
- shadow: null
701
- });
702
- }
703
- }
704
- };
705
- return t.sanitize = function(e) {
706
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
707
- if (Wt = !e, Wt && (e = "<!-->"), typeof e != "string" && !X(e) && (e = Ae(e), typeof e != "string")) throw De("dirty is not a string, aborting");
708
- if (!t.isSupported) return e;
709
- 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 = [];
710
- let c = Pt && typeof e != "string" && X(e);
711
- if (c) {
712
- let t = p ? p(e) : e.nodeName;
713
- if (typeof t == "string") {
714
- let e = V(t);
715
- if (!M[e] || _t[e]) throw De("root node is forbidden and cannot be sanitized in-place");
716
- }
717
- if (J(e)) throw De("root node is clobbered and cannot be sanitized in-place");
718
- try {
719
- Cn(e);
720
- } catch (t) {
721
- throw G(e), t;
722
- }
723
- } 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);
724
- else {
725
- if (!Ot && !I && !L && e.indexOf("<") === -1) return m && At ? v(e) : e;
726
- if (i = dn(e), !i) return Ot ? null : At ? _ : "";
727
- }
728
- i && Dt && W(i.firstChild);
729
- let l = fn(c ? e : i);
730
- try {
731
- for (; o = l.nextNode();) hn(o), xn(o), Y(o.content) && Sn(o.content);
732
- } catch (t) {
733
- throw c && G(e), t;
734
- }
735
- if (c) return de(t.removed, (e) => {
736
- e.element && un(e.element);
737
- }), I && q(e), e;
738
- if (Ot) {
739
- if (I && q(i), kt) for (s = st.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
740
- else s = i;
741
- return (N.shadowroot || N.shadowrootmode) && (s = D.call(r, s, !0)), s;
742
- }
743
- let u = L ? i.outerHTML : i.innerHTML;
744
- 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;
745
- }, t.setConfig = function() {
746
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
747
- nn(e), wt = !0, Tt = M, Et = N;
748
- }, t.clearConfig = function() {
749
- H = null, wt = !1, Tt = null, Et = null, m = le, _ = "";
750
- }, t.isValidAttribute = function(e, t, n) {
751
- H || nn({});
752
- let r = V(e), i = V(t);
753
- return gn(r, i, n);
754
- }, t.addHook = function(e, t) {
755
- typeof t == "function" && y(O, e) && me(O[e], t);
756
- }, t.removeHook = function(e, t) {
757
- if (y(O, e)) {
758
- if (t !== void 0) {
759
- let n = fe(O[e], t);
760
- return n === -1 ? void 0 : he(O[e], n, 1)[0];
761
- }
762
- return pe(O[e]);
763
- }
764
- }, t.removeHooks = function(e) {
765
- y(O, e) && (O[e] = []);
766
- }, t.removeAllHooks = function() {
767
- O = at();
768
- }, t;
769
- }
770
- var st = ot();
771
- //#endregion
772
- //#region node_modules/marked/lib/marked.esm.js
773
- function ct() {
774
- return {
775
- async: !1,
776
- breaks: !1,
777
- extensions: null,
778
- gfm: !0,
779
- hooks: null,
780
- pedantic: !1,
781
- renderer: null,
782
- silent: !1,
783
- tokenizer: null,
784
- walkTokens: null
785
- };
786
- }
787
- var D = ct();
788
- function O(e) {
789
- D = e;
790
- }
791
- var k = { exec: () => null };
792
- function lt(e) {
793
- let t = [];
794
- return (n) => {
795
- let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
796
- return i || (i = e(r), t[r] = i), i;
797
- };
798
- }
799
- function A(e, t = "") {
800
- let n = typeof e == "string" ? e : e.source, r = {
801
- replace: (e, t) => {
802
- let i = typeof t == "string" ? t : t.source;
803
- return i = i.replace(j.caret, "$1"), n = n.replace(e, i), r;
804
- },
805
- getRegex: () => new RegExp(n, t)
806
- };
807
- return r;
808
- }
809
- var ut = ((e = "") => {
810
- try {
811
- return !!RegExp("(?<=1)(?<!1)" + e);
812
- } catch {
813
- return !1;
814
- }
815
- })(), j = {
816
- codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
817
- outputLinkReplace: /\\([\[\]])/g,
818
- indentCodeCompensation: /^(\s+)(?:```)/,
819
- beginningSpace: /^\s+/,
820
- endingHash: /#$/,
821
- startingSpaceChar: /^ /,
822
- endingSpaceChar: / $/,
823
- nonSpaceChar: /[^ ]/,
824
- newLineCharGlobal: /\n/g,
825
- tabCharGlobal: /\t/g,
826
- multipleSpaceGlobal: /\s+/g,
827
- blankLine: /^[ \t]*$/,
828
- doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
829
- blockquoteStart: /^ {0,3}>/,
830
- blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
831
- blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
832
- listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
833
- listIsTask: /^\[[ xX]\] +\S/,
834
- listReplaceTask: /^\[[ xX]\] +/,
835
- listTaskCheckbox: /\[[ xX]\]/,
836
- anyLine: /\n.*\n/,
837
- hrefBrackets: /^<(.*)>$/,
838
- tableDelimiter: /[:|]/,
839
- tableAlignChars: /^\||\| *$/g,
840
- tableRowBlankLine: /\n[ \t]*$/,
841
- tableAlignRight: /^ *-+: *$/,
842
- tableAlignCenter: /^ *:-+: *$/,
843
- tableAlignLeft: /^ *:-+ *$/,
844
- startATag: /^<a /i,
845
- endATag: /^<\/a>/i,
846
- startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
847
- endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
848
- startAngleBracket: /^</,
849
- endAngleBracket: />$/,
850
- pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
851
- unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
852
- escapeTest: /[&<>"']/,
853
- escapeReplace: /[&<>"']/g,
854
- escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
855
- escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
856
- caret: /(^|[^\[])\^/g,
857
- percentDecode: /%25/g,
858
- findPipe: /\|/g,
859
- splitPipe: / \|/,
860
- slashPipe: /\\\|/g,
861
- carriageReturn: /\r\n|\r/g,
862
- spaceLine: /^ +$/gm,
863
- notSpaceStart: /^\S*/,
864
- endingNewline: /\n$/,
865
- listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
866
- nextBulletRegex: lt((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
867
- hrRegex: lt((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
868
- fencesBeginRegex: lt((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
869
- headingBeginRegex: lt((e) => RegExp(`^ {0,${e}}#`)),
870
- htmlBeginRegex: lt((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
871
- blockquoteBeginRegex: lt((e) => RegExp(`^ {0,${e}}>`))
872
- }, 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 = {
873
- blockquote: A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ct).getRegex(),
874
- code: ft,
875
- def: yt,
876
- fences: pt,
877
- heading: M,
878
- hr: mt,
879
- html: I,
880
- lheading: gt,
881
- list: bt,
882
- newline: dt,
883
- paragraph: Ct,
884
- table: k,
885
- text: vt
886
- }, 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 = {
887
- ...L,
888
- lheading: P,
889
- table: wt,
890
- 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()
891
- }, Et = {
892
- ...L,
893
- 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(),
894
- def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
895
- heading: /^(#{1,6})(.*)(?:\n+|$)/,
896
- fences: k,
897
- lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
898
- 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()
899
- }, 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 = {
900
- _backpedal: k,
901
- anyPunctuation: Gt,
902
- autolink: Kt,
903
- blockSkip: It,
904
- br: kt,
905
- code: Ot,
906
- del: k,
907
- delLDelim: k,
908
- delRDelim: k,
909
- emStrongLDelim: Rt,
910
- emStrongRDelimAst: Vt,
911
- emStrongRDelimUnd: B,
912
- escape: Dt,
913
- link: Xt,
914
- nolink: Qt,
915
- punctuation: Nt,
916
- reflink: Zt,
917
- reflinkSearch: $t,
918
- tag: Jt,
919
- text: At,
920
- url: k
921
- }, en = {
922
- ...H,
923
- link: A(/^!?\[(label)\]\((.*?)\)/).replace("label", Yt).getRegex(),
924
- reflink: A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Yt).getRegex()
925
- }, tn = {
926
- ...H,
927
- emStrongRDelimAst: Ht,
928
- emStrongLDelim: zt,
929
- delLDelim: Ut,
930
- delRDelim: Wt,
931
- 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(),
932
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
933
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
934
- 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()
935
- }, nn = {
936
- ...tn,
937
- br: A(kt).replace("{2,}", "*").getRegex(),
938
- text: A(tn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
939
- }, rn = {
940
- normal: L,
941
- gfm: Tt,
942
- pedantic: Et
943
- }, an = {
944
- normal: H,
945
- gfm: tn,
946
- breaks: nn,
947
- pedantic: en
948
- }, on = {
949
- "&": "&amp;",
950
- "<": "&lt;",
951
- ">": "&gt;",
952
- "\"": "&quot;",
953
- "'": "&#39;"
954
- }, sn = (e) => on[e];
955
- function U(e, t) {
956
- if (t) {
957
- if (j.escapeTest.test(e)) return e.replace(j.escapeReplace, sn);
958
- } else if (j.escapeTestNoEncode.test(e)) return e.replace(j.escapeReplaceNoEncode, sn);
959
- return e;
960
- }
961
- function cn(e) {
962
- try {
963
- e = encodeURI(e).replace(j.percentDecode, "%");
964
- } catch {
965
- return null;
966
- }
967
- return e;
968
- }
969
- function W(e, t) {
970
- let n = e.replace(j.findPipe, (e, t, n) => {
971
- let r = !1, i = t;
972
- for (; --i >= 0 && n[i] === "\\";) r = !r;
973
- return r ? "|" : " |";
974
- }).split(j.splitPipe), r = 0;
975
- if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
976
- else for (; n.length < t;) n.push("");
977
- for (; r < n.length; r++) n[r] = n[r].trim().replace(j.slashPipe, "|");
978
- return n;
979
- }
980
- function G(e, t, n) {
981
- let r = e.length;
982
- if (r === 0) return "";
983
- let i = 0;
984
- for (; i < r;) {
985
- let a = e.charAt(r - i - 1);
986
- if (a === t && !n) i++;
987
- else if (a !== t && n) i++;
988
- else break;
989
- }
990
- return e.slice(0, r - i);
991
- }
992
- function K(e) {
993
- let t = e.split("\n"), n = t.length - 1;
994
- for (; n >= 0 && j.blankLine.test(t[n]);) n--;
995
- return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
996
- }
997
- function ln(e, t) {
998
- if (e.indexOf(t[1]) === -1) return -1;
999
- let n = 0;
1000
- for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
1001
- else if (e[r] === t[0]) n++;
1002
- else if (e[r] === t[1] && (n--, n < 0)) return r;
1003
- return n > 0 ? -2 : -1;
1004
- }
1005
- function un(e, t = 0) {
1006
- let n = t, r = "";
1007
- for (let t of e) if (t === " ") {
1008
- let e = 4 - n % 4;
1009
- r += " ".repeat(e), n += e;
1010
- } else r += t, n++;
1011
- return r;
1012
- }
1013
- function dn(e, t, n, r, i) {
1014
- let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
1015
- r.state.inLink = !0;
1016
- let c = {
1017
- type: e[0].charAt(0) === "!" ? "image" : "link",
1018
- raw: n,
1019
- href: a,
1020
- title: o,
1021
- text: s,
1022
- tokens: r.inlineTokens(s)
1023
- };
1024
- return r.state.inLink = !1, c;
1025
- }
1026
- function fn(e, t, n) {
1027
- let r = e.match(n.other.indentCodeCompensation);
1028
- if (r === null) return t;
1029
- let i = r[1];
1030
- return t.split("\n").map((e) => {
1031
- let t = e.match(n.other.beginningSpace);
1032
- if (t === null) return e;
1033
- let [r] = t;
1034
- return r.length >= i.length ? e.slice(i.length) : e;
1035
- }).join("\n");
1036
- }
1037
- var pn = class {
1038
- options;
1039
- rules;
1040
- lexer;
1041
- constructor(e) {
1042
- this.options = e || D;
1043
- }
1044
- space(e) {
1045
- let t = this.rules.block.newline.exec(e);
1046
- if (t && t[0].length > 0) return {
1047
- type: "space",
1048
- raw: t[0]
1049
- };
1050
- }
1051
- code(e) {
1052
- let t = this.rules.block.code.exec(e);
1053
- if (t) {
1054
- let e = this.options.pedantic ? t[0] : K(t[0]);
1055
- return {
1056
- type: "code",
1057
- raw: e,
1058
- codeBlockStyle: "indented",
1059
- text: e.replace(this.rules.other.codeRemoveIndent, "")
1060
- };
1061
- }
1062
- }
1063
- fences(e) {
1064
- let t = this.rules.block.fences.exec(e);
1065
- if (t) {
1066
- let e = t[0], n = fn(e, t[3] || "", this.rules);
1067
- return {
1068
- type: "code",
1069
- raw: e,
1070
- lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
1071
- text: n
1072
- };
1073
- }
1074
- }
1075
- heading(e) {
1076
- let t = this.rules.block.heading.exec(e);
1077
- if (t) {
1078
- let e = t[2].trim();
1079
- if (this.rules.other.endingHash.test(e)) {
1080
- let t = G(e, "#");
1081
- (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
1082
- }
1083
- return {
1084
- type: "heading",
1085
- raw: G(t[0], "\n"),
1086
- depth: t[1].length,
1087
- text: e,
1088
- tokens: this.lexer.inline(e)
1089
- };
1090
- }
1091
- }
1092
- hr(e) {
1093
- let t = this.rules.block.hr.exec(e);
1094
- if (t) return {
1095
- type: "hr",
1096
- raw: G(t[0], "\n")
1097
- };
1098
- }
1099
- blockquote(e) {
1100
- let t = this.rules.block.blockquote.exec(e);
1101
- if (t) {
1102
- let e = G(t[0], "\n").split("\n"), n = "", r = "", i = [];
1103
- for (; e.length > 0;) {
1104
- let t = !1, a = [], o;
1105
- for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1106
- else if (!t) a.push(e[o]);
1107
- else break;
1108
- e = e.slice(o);
1109
- let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1110
- n = n ? `${n}
1111
- ${s}` : s, r = r ? `${r}
1112
- ${c}` : c;
1113
- let l = this.lexer.state.top;
1114
- if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
1115
- let u = i.at(-1);
1116
- if (u?.type === "code") break;
1117
- if (u?.type === "blockquote") {
1118
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
1119
- 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;
1120
- break;
1121
- } else if (u?.type === "list") {
1122
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
1123
- 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");
1124
- continue;
1125
- }
1126
- }
1127
- return {
1128
- type: "blockquote",
1129
- raw: n,
1130
- tokens: i,
1131
- text: r
1132
- };
1133
- }
1134
- }
1135
- list(e) {
1136
- let t = this.rules.block.list.exec(e);
1137
- if (t) {
1138
- let n = t[1].trim(), r = n.length > 1, i = {
1139
- type: "list",
1140
- raw: "",
1141
- ordered: r,
1142
- start: r ? +n.slice(0, -1) : "",
1143
- loose: !1,
1144
- items: []
1145
- };
1146
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1147
- let a = this.rules.other.listItemRegex(n), o = !1;
1148
- for (; e;) {
1149
- let n = !1, r = "", s = "";
1150
- if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1151
- r = t[0], e = e.substring(r.length);
1152
- let c = un(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
1153
- 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) {
1154
- 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);
1155
- for (; e;) {
1156
- let te = e.split("\n", 1)[0], ne;
1157
- 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;
1158
- if (ne.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + ne.slice(d);
1159
- else {
1160
- if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
1161
- s += "\n" + l;
1162
- }
1163
- u = !l.trim(), r += te + "\n", e = e.substring(te.length + 1), c = ne.slice(d);
1164
- }
1165
- }
1166
- i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
1167
- type: "list_item",
1168
- raw: r,
1169
- task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
1170
- loose: !1,
1171
- text: s,
1172
- tokens: []
1173
- }), i.raw += r;
1174
- }
1175
- let s = i.items.at(-1);
1176
- if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1177
- else return;
1178
- i.raw = i.raw.trimEnd();
1179
- for (let e of i.items) {
1180
- this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []);
1181
- let t = e.tokens[0];
1182
- if (e.task && (t?.type === "text" || t?.type === "paragraph")) {
1183
- 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, "");
1184
- for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
1185
- this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
1186
- break;
1187
- }
1188
- let n = this.rules.other.listTaskCheckbox.exec(e.raw);
1189
- if (n) {
1190
- let t = {
1191
- type: "checkbox",
1192
- raw: n[0] + " ",
1193
- checked: n[0] !== "[ ]"
1194
- };
1195
- 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({
1196
- type: "paragraph",
1197
- raw: t.raw,
1198
- text: t.raw,
1199
- tokens: [t]
1200
- }) : e.tokens.unshift(t);
1201
- }
1202
- } else e.task &&= !1;
1203
- if (!i.loose) {
1204
- let t = e.tokens.filter((e) => e.type === "space");
1205
- i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
1206
- }
1207
- }
1208
- if (i.loose) for (let e of i.items) {
1209
- e.loose = !0;
1210
- for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
1211
- }
1212
- return i;
1213
- }
1214
- }
1215
- html(e) {
1216
- let t = this.rules.block.html.exec(e);
1217
- if (t) {
1218
- let e = K(t[0]);
1219
- return {
1220
- type: "html",
1221
- block: !0,
1222
- raw: e,
1223
- pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
1224
- text: e
1225
- };
1226
- }
1227
- }
1228
- def(e) {
1229
- let t = this.rules.block.def.exec(e);
1230
- if (t) {
1231
- 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];
1232
- return {
1233
- type: "def",
1234
- tag: e,
1235
- raw: G(t[0], "\n"),
1236
- href: n,
1237
- title: r
1238
- };
1239
- }
1240
- }
1241
- table(e) {
1242
- let t = this.rules.block.table.exec(e);
1243
- if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1244
- 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 = {
1245
- type: "table",
1246
- raw: G(t[0], "\n"),
1247
- header: [],
1248
- align: [],
1249
- rows: []
1250
- };
1251
- if (n.length === r.length) {
1252
- 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);
1253
- for (let e = 0; e < n.length; e++) a.header.push({
1254
- text: n[e],
1255
- tokens: this.lexer.inline(n[e]),
1256
- header: !0,
1257
- align: a.align[e]
1258
- });
1259
- for (let e of i) a.rows.push(W(e, a.header.length).map((e, t) => ({
1260
- text: e,
1261
- tokens: this.lexer.inline(e),
1262
- header: !1,
1263
- align: a.align[t]
1264
- })));
1265
- return a;
1266
- }
1267
- }
1268
- lheading(e) {
1269
- let t = this.rules.block.lheading.exec(e);
1270
- if (t) {
1271
- let e = t[1].trim();
1272
- return {
1273
- type: "heading",
1274
- raw: G(t[0], "\n"),
1275
- depth: t[2].charAt(0) === "=" ? 1 : 2,
1276
- text: e,
1277
- tokens: this.lexer.inline(e)
1278
- };
1279
- }
1280
- }
1281
- paragraph(e) {
1282
- let t = this.rules.block.paragraph.exec(e);
1283
- if (t) {
1284
- let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1285
- return {
1286
- type: "paragraph",
1287
- raw: t[0],
1288
- text: e,
1289
- tokens: this.lexer.inline(e)
1290
- };
1291
- }
1292
- }
1293
- text(e) {
1294
- let t = this.rules.block.text.exec(e);
1295
- if (t) return {
1296
- type: "text",
1297
- raw: t[0],
1298
- text: t[0],
1299
- tokens: this.lexer.inline(t[0])
1300
- };
1301
- }
1302
- escape(e) {
1303
- let t = this.rules.inline.escape.exec(e);
1304
- if (t) return {
1305
- type: "escape",
1306
- raw: t[0],
1307
- text: t[1]
1308
- };
1309
- }
1310
- tag(e) {
1311
- let t = this.rules.inline.tag.exec(e);
1312
- 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), {
1313
- type: "html",
1314
- raw: t[0],
1315
- inLink: this.lexer.state.inLink,
1316
- inRawBlock: this.lexer.state.inRawBlock,
1317
- block: !1,
1318
- text: t[0]
1319
- };
1320
- }
1321
- link(e) {
1322
- let t = this.rules.inline.link.exec(e);
1323
- if (t) {
1324
- let e = t[2].trim();
1325
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1326
- if (!this.rules.other.endAngleBracket.test(e)) return;
1327
- let t = G(e.slice(0, -1), "\\");
1328
- if ((e.length - t.length) % 2 == 0) return;
1329
- } else {
1330
- let e = ln(t[2], "()");
1331
- if (e === -2) return;
1332
- if (e > -1) {
1333
- let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1334
- t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1335
- }
1336
- }
1337
- let n = t[2], r = "";
1338
- if (this.options.pedantic) {
1339
- let e = this.rules.other.pedanticHrefTitle.exec(n);
1340
- e && (n = e[1], r = e[3]);
1341
- } else r = t[3] ? t[3].slice(1, -1) : "";
1342
- 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, {
1343
- href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1344
- title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1345
- }, t[0], this.lexer, this.rules);
1346
- }
1347
- }
1348
- reflink(e, t) {
1349
- let n;
1350
- if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1351
- let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1352
- if (!e) {
1353
- let e = n[0].charAt(0);
1354
- return {
1355
- type: "text",
1356
- raw: e,
1357
- text: e
1358
- };
1359
- }
1360
- return dn(n, e, n[0], this.lexer, this.rules);
1361
- }
1362
- }
1363
- emStrong(e, t, n = "") {
1364
- let r = this.rules.inline.emStrongLDelim.exec(e);
1365
- 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))) {
1366
- let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1367
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
1368
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1369
- if (a = [...i].length, r[3] || r[4]) {
1370
- o += a;
1371
- continue;
1372
- } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1373
- s += a;
1374
- continue;
1375
- }
1376
- if (o -= a, o > 0) continue;
1377
- a = Math.min(a, a + o + s);
1378
- let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1379
- if (Math.min(n, a) % 2) {
1380
- let e = c.slice(1, -1);
1381
- return {
1382
- type: "em",
1383
- raw: c,
1384
- text: e,
1385
- tokens: this.lexer.inlineTokens(e)
1386
- };
1387
- }
1388
- let l = c.slice(2, -2);
1389
- return {
1390
- type: "strong",
1391
- raw: c,
1392
- text: l,
1393
- tokens: this.lexer.inlineTokens(l)
1394
- };
1395
- }
1396
- }
1397
- }
1398
- codespan(e) {
1399
- let t = this.rules.inline.code.exec(e);
1400
- if (t) {
1401
- 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);
1402
- return n && r && (e = e.substring(1, e.length - 1)), {
1403
- type: "codespan",
1404
- raw: t[0],
1405
- text: e
1406
- };
1407
- }
1408
- }
1409
- br(e) {
1410
- let t = this.rules.inline.br.exec(e);
1411
- if (t) return {
1412
- type: "br",
1413
- raw: t[0]
1414
- };
1415
- }
1416
- del(e, t, n = "") {
1417
- let r = this.rules.inline.delLDelim.exec(e);
1418
- if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
1419
- let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
1420
- for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
1421
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
1422
- if (r[3] || r[4]) {
1423
- o += a;
1424
- continue;
1425
- }
1426
- if (o -= a, o > 0) continue;
1427
- a = Math.min(a, a + o);
1428
- let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
1429
- return {
1430
- type: "del",
1431
- raw: s,
1432
- text: c,
1433
- tokens: this.lexer.inlineTokens(c)
1434
- };
1435
- }
1436
- }
1437
- }
1438
- autolink(e) {
1439
- let t = this.rules.inline.autolink.exec(e);
1440
- if (t) {
1441
- let e, n;
1442
- return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1443
- type: "link",
1444
- raw: t[0],
1445
- text: e,
1446
- href: n,
1447
- tokens: [{
1448
- type: "text",
1449
- raw: e,
1450
- text: e
1451
- }]
1452
- };
1453
- }
1454
- }
1455
- url(e) {
1456
- let t;
1457
- if (t = this.rules.inline.url.exec(e)) {
1458
- let e, n;
1459
- if (t[2] === "@") e = t[0], n = "mailto:" + e;
1460
- else {
1461
- let r;
1462
- do
1463
- r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1464
- while (r !== t[0]);
1465
- e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1466
- }
1467
- return {
1468
- type: "link",
1469
- raw: t[0],
1470
- text: e,
1471
- href: n,
1472
- tokens: [{
1473
- type: "text",
1474
- raw: e,
1475
- text: e
1476
- }]
1477
- };
1478
- }
1479
- }
1480
- inlineText(e) {
1481
- let t = this.rules.inline.text.exec(e);
1482
- if (t) {
1483
- let e = this.lexer.state.inRawBlock;
1484
- return {
1485
- type: "text",
1486
- raw: t[0],
1487
- text: t[0],
1488
- escaped: e
1489
- };
1490
- }
1491
- }
1492
- }, q = class e {
1493
- tokens;
1494
- options;
1495
- state;
1496
- inlineQueue;
1497
- tokenizer;
1498
- constructor(e) {
1499
- 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 = {
1500
- inLink: !1,
1501
- inRawBlock: !1,
1502
- top: !0
1503
- };
1504
- let t = {
1505
- other: j,
1506
- block: rn.normal,
1507
- inline: an.normal
1508
- };
1509
- 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;
1510
- }
1511
- static get rules() {
1512
- return {
1513
- block: rn,
1514
- inline: an
1515
- };
1516
- }
1517
- static lex(t, n) {
1518
- return new e(n).lex(t);
1519
- }
1520
- static lexInline(t, n) {
1521
- return new e(n).inlineTokens(t);
1522
- }
1523
- lex(e) {
1524
- e = e.replace(j.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1525
- for (let e = 0; e < this.inlineQueue.length; e++) {
1526
- let t = this.inlineQueue[e];
1527
- this.inlineTokens(t.src, t.tokens);
1528
- }
1529
- return this.inlineQueue = [], this.tokens;
1530
- }
1531
- blockTokens(e, t = [], n = !1) {
1532
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(j.tabCharGlobal, " ").replace(j.spaceLine, ""));
1533
- let r = Infinity;
1534
- for (; e;) {
1535
- if (e.length < r) r = e.length;
1536
- else {
1537
- this.infiniteLoopError(e.charCodeAt(0));
1538
- break;
1539
- }
1540
- let i;
1541
- 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;
1542
- if (i = this.tokenizer.space(e)) {
1543
- e = e.substring(i.raw.length);
1544
- let n = t.at(-1);
1545
- i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
1546
- continue;
1547
- }
1548
- if (i = this.tokenizer.code(e)) {
1549
- e = e.substring(i.raw.length);
1550
- let n = t.at(-1);
1551
- 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);
1552
- continue;
1553
- }
1554
- if (i = this.tokenizer.fences(e)) {
1555
- e = e.substring(i.raw.length), t.push(i);
1556
- continue;
1557
- }
1558
- if (i = this.tokenizer.heading(e)) {
1559
- e = e.substring(i.raw.length), t.push(i);
1560
- continue;
1561
- }
1562
- if (i = this.tokenizer.hr(e)) {
1563
- e = e.substring(i.raw.length), t.push(i);
1564
- continue;
1565
- }
1566
- if (i = this.tokenizer.blockquote(e)) {
1567
- e = e.substring(i.raw.length), t.push(i);
1568
- continue;
1569
- }
1570
- if (i = this.tokenizer.list(e)) {
1571
- e = e.substring(i.raw.length), t.push(i);
1572
- continue;
1573
- }
1574
- if (i = this.tokenizer.html(e)) {
1575
- e = e.substring(i.raw.length), t.push(i);
1576
- continue;
1577
- }
1578
- if (i = this.tokenizer.def(e)) {
1579
- e = e.substring(i.raw.length);
1580
- let n = t.at(-1);
1581
- 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] = {
1582
- href: i.href,
1583
- title: i.title
1584
- }, t.push(i));
1585
- continue;
1586
- }
1587
- if (i = this.tokenizer.table(e)) {
1588
- e = e.substring(i.raw.length), t.push(i);
1589
- continue;
1590
- }
1591
- if (i = this.tokenizer.lheading(e)) {
1592
- e = e.substring(i.raw.length), t.push(i);
1593
- continue;
1594
- }
1595
- let a = e;
1596
- if (this.options.extensions?.startBlock) {
1597
- let t = Infinity, n = e.slice(1), r;
1598
- this.options.extensions.startBlock.forEach((e) => {
1599
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1600
- }), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
1601
- }
1602
- if (this.state.top && (i = this.tokenizer.paragraph(a))) {
1603
- let r = t.at(-1);
1604
- 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);
1605
- continue;
1606
- }
1607
- if (i = this.tokenizer.text(e)) {
1608
- e = e.substring(i.raw.length);
1609
- let n = t.at(-1);
1610
- 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);
1611
- continue;
1612
- }
1613
- if (e) {
1614
- this.infiniteLoopError(e.charCodeAt(0));
1615
- break;
1616
- }
1617
- }
1618
- return this.state.top = !0, t;
1619
- }
1620
- inline(e, t = []) {
1621
- return this.inlineQueue.push({
1622
- src: e,
1623
- tokens: t
1624
- }), t;
1625
- }
1626
- inlineTokens(e, t = []) {
1627
- this.tokenizer.lexer = this;
1628
- let n = e, r = null;
1629
- if (this.tokens.links) {
1630
- let e = Object.keys(this.tokens.links);
1631
- 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));
1632
- }
1633
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1634
- let i;
1635
- 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);
1636
- n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
1637
- let a = !1, o = "", s = Infinity;
1638
- for (; e;) {
1639
- if (e.length < s) s = e.length;
1640
- else {
1641
- this.infiniteLoopError(e.charCodeAt(0));
1642
- break;
1643
- }
1644
- a || (o = ""), a = !1;
1645
- let r;
1646
- 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;
1647
- if (r = this.tokenizer.escape(e)) {
1648
- e = e.substring(r.raw.length), t.push(r);
1649
- continue;
1650
- }
1651
- if (r = this.tokenizer.tag(e)) {
1652
- e = e.substring(r.raw.length), t.push(r);
1653
- continue;
1654
- }
1655
- if (r = this.tokenizer.link(e)) {
1656
- e = e.substring(r.raw.length), t.push(r);
1657
- continue;
1658
- }
1659
- if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1660
- e = e.substring(r.raw.length);
1661
- let n = t.at(-1);
1662
- r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1663
- continue;
1664
- }
1665
- if (r = this.tokenizer.emStrong(e, n, o)) {
1666
- e = e.substring(r.raw.length), t.push(r);
1667
- continue;
1668
- }
1669
- if (r = this.tokenizer.codespan(e)) {
1670
- e = e.substring(r.raw.length), t.push(r);
1671
- continue;
1672
- }
1673
- if (r = this.tokenizer.br(e)) {
1674
- e = e.substring(r.raw.length), t.push(r);
1675
- continue;
1676
- }
1677
- if (r = this.tokenizer.del(e, n, o)) {
1678
- e = e.substring(r.raw.length), t.push(r);
1679
- continue;
1680
- }
1681
- if (r = this.tokenizer.autolink(e)) {
1682
- e = e.substring(r.raw.length), t.push(r);
1683
- continue;
1684
- }
1685
- if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1686
- e = e.substring(r.raw.length), t.push(r);
1687
- continue;
1688
- }
1689
- let i = e;
1690
- if (this.options.extensions?.startInline) {
1691
- let t = Infinity, n = e.slice(1), r;
1692
- this.options.extensions.startInline.forEach((e) => {
1693
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1694
- }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1695
- }
1696
- if (r = this.tokenizer.inlineText(i)) {
1697
- e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
1698
- let n = t.at(-1);
1699
- n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1700
- continue;
1701
- }
1702
- if (e) {
1703
- this.infiniteLoopError(e.charCodeAt(0));
1704
- break;
1705
- }
1706
- }
1707
- return t;
1708
- }
1709
- infiniteLoopError(e) {
1710
- let t = "Infinite loop on byte: " + e;
1711
- if (this.options.silent) console.error(t);
1712
- else throw Error(t);
1713
- }
1714
- }, J = class {
1715
- options;
1716
- parser;
1717
- constructor(e) {
1718
- this.options = e || D;
1719
- }
1720
- space(e) {
1721
- return "";
1722
- }
1723
- code({ text: e, lang: t, escaped: n }) {
1724
- let r = (t || "").match(j.notSpaceStart)?.[0], i = e.replace(j.endingNewline, "") + "\n";
1725
- 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";
1726
- }
1727
- blockquote({ tokens: e }) {
1728
- return `<blockquote>
1729
- ${this.parser.parse(e)}</blockquote>
1730
- `;
1731
- }
1732
- html({ text: e }) {
1733
- return e;
1734
- }
1735
- def(e) {
1736
- return "";
1737
- }
1738
- heading({ tokens: e, depth: t }) {
1739
- return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1740
- `;
1741
- }
1742
- hr(e) {
1743
- return "<hr>\n";
1744
- }
1745
- list(e) {
1746
- let t = e.ordered, n = e.start, r = "";
1747
- for (let t = 0; t < e.items.length; t++) {
1748
- let n = e.items[t];
1749
- r += this.listitem(n);
1750
- }
1751
- let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1752
- return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1753
- }
1754
- listitem(e) {
1755
- return `<li>${this.parser.parse(e.tokens)}</li>
1756
- `;
1757
- }
1758
- checkbox({ checked: e }) {
1759
- return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1760
- }
1761
- paragraph({ tokens: e }) {
1762
- return `<p>${this.parser.parseInline(e)}</p>
1763
- `;
1764
- }
1765
- table(e) {
1766
- let t = "", n = "";
1767
- for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1768
- t += this.tablerow({ text: n });
1769
- let r = "";
1770
- for (let t = 0; t < e.rows.length; t++) {
1771
- let i = e.rows[t];
1772
- n = "";
1773
- for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1774
- r += this.tablerow({ text: n });
1775
- }
1776
- return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1777
- }
1778
- tablerow({ text: e }) {
1779
- return `<tr>
1780
- ${e}</tr>
1781
- `;
1782
- }
1783
- tablecell(e) {
1784
- let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1785
- return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1786
- `;
1787
- }
1788
- strong({ tokens: e }) {
1789
- return `<strong>${this.parser.parseInline(e)}</strong>`;
1790
- }
1791
- em({ tokens: e }) {
1792
- return `<em>${this.parser.parseInline(e)}</em>`;
1793
- }
1794
- codespan({ text: e }) {
1795
- return `<code>${U(e, !0)}</code>`;
1796
- }
1797
- br(e) {
1798
- return "<br>";
1799
- }
1800
- del({ tokens: e }) {
1801
- return `<del>${this.parser.parseInline(e)}</del>`;
1802
- }
1803
- link({ href: e, title: t, tokens: n }) {
1804
- let r = this.parser.parseInline(n), i = cn(e);
1805
- if (i === null) return r;
1806
- e = i;
1807
- let a = "<a href=\"" + e + "\"";
1808
- return t && (a += " title=\"" + U(t) + "\""), a += ">" + r + "</a>", a;
1809
- }
1810
- image({ href: e, title: t, text: n, tokens: r }) {
1811
- r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1812
- let i = cn(e);
1813
- if (i === null) return U(n);
1814
- e = i;
1815
- let a = `<img src="${e}" alt="${U(n)}"`;
1816
- return t && (a += ` title="${U(t)}"`), a += ">", a;
1817
- }
1818
- text(e) {
1819
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : U(e.text);
1820
- }
1821
- }, Y = class {
1822
- strong({ text: e }) {
1823
- return e;
1824
- }
1825
- em({ text: e }) {
1826
- return e;
1827
- }
1828
- codespan({ text: e }) {
1829
- return e;
1830
- }
1831
- del({ text: e }) {
1832
- return e;
1833
- }
1834
- html({ text: e }) {
1835
- return e;
1836
- }
1837
- text({ text: e }) {
1838
- return e;
1839
- }
1840
- link({ text: e }) {
1841
- return "" + e;
1842
- }
1843
- image({ text: e }) {
1844
- return "" + e;
1845
- }
1846
- br() {
1847
- return "";
1848
- }
1849
- checkbox({ raw: e }) {
1850
- return e;
1851
- }
1852
- }, X = class e {
1853
- options;
1854
- renderer;
1855
- textRenderer;
1856
- constructor(e) {
1857
- 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();
1858
- }
1859
- static parse(t, n) {
1860
- return new e(n).parse(t);
1861
- }
1862
- static parseInline(t, n) {
1863
- return new e(n).parseInline(t);
1864
- }
1865
- parse(e) {
1866
- this.renderer.parser = this;
1867
- let t = "";
1868
- for (let n = 0; n < e.length; n++) {
1869
- let r = e[n];
1870
- if (this.options.extensions?.renderers?.[r.type]) {
1871
- let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1872
- if (n !== !1 || ![
1873
- "space",
1874
- "hr",
1875
- "heading",
1876
- "code",
1877
- "table",
1878
- "blockquote",
1879
- "list",
1880
- "html",
1881
- "def",
1882
- "paragraph",
1883
- "text"
1884
- ].includes(e.type)) {
1885
- t += n || "";
1886
- continue;
1887
- }
1888
- }
1889
- let i = r;
1890
- switch (i.type) {
1891
- case "space":
1892
- t += this.renderer.space(i);
1893
- break;
1894
- case "hr":
1895
- t += this.renderer.hr(i);
1896
- break;
1897
- case "heading":
1898
- t += this.renderer.heading(i);
1899
- break;
1900
- case "code":
1901
- t += this.renderer.code(i);
1902
- break;
1903
- case "table":
1904
- t += this.renderer.table(i);
1905
- break;
1906
- case "blockquote":
1907
- t += this.renderer.blockquote(i);
1908
- break;
1909
- case "list":
1910
- t += this.renderer.list(i);
1911
- break;
1912
- case "checkbox":
1913
- t += this.renderer.checkbox(i);
1914
- break;
1915
- case "html":
1916
- t += this.renderer.html(i);
1917
- break;
1918
- case "def":
1919
- t += this.renderer.def(i);
1920
- break;
1921
- case "paragraph":
1922
- t += this.renderer.paragraph(i);
1923
- break;
1924
- case "text":
1925
- t += this.renderer.text(i);
1926
- break;
1927
- default: {
1928
- let e = "Token with \"" + i.type + "\" type was not found.";
1929
- if (this.options.silent) return console.error(e), "";
1930
- throw Error(e);
1931
- }
1932
- }
1933
- }
1934
- return t;
1935
- }
1936
- parseInline(e, t = this.renderer) {
1937
- this.renderer.parser = this;
1938
- let n = "";
1939
- for (let r = 0; r < e.length; r++) {
1940
- let i = e[r];
1941
- if (this.options.extensions?.renderers?.[i.type]) {
1942
- let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1943
- if (e !== !1 || ![
1944
- "escape",
1945
- "html",
1946
- "link",
1947
- "image",
1948
- "strong",
1949
- "em",
1950
- "codespan",
1951
- "br",
1952
- "del",
1953
- "text"
1954
- ].includes(i.type)) {
1955
- n += e || "";
1956
- continue;
1957
- }
1958
- }
1959
- let a = i;
1960
- switch (a.type) {
1961
- case "escape":
1962
- n += t.text(a);
1963
- break;
1964
- case "html":
1965
- n += t.html(a);
1966
- break;
1967
- case "link":
1968
- n += t.link(a);
1969
- break;
1970
- case "image":
1971
- n += t.image(a);
1972
- break;
1973
- case "checkbox":
1974
- n += t.checkbox(a);
1975
- break;
1976
- case "strong":
1977
- n += t.strong(a);
1978
- break;
1979
- case "em":
1980
- n += t.em(a);
1981
- break;
1982
- case "codespan":
1983
- n += t.codespan(a);
1984
- break;
1985
- case "br":
1986
- n += t.br(a);
1987
- break;
1988
- case "del":
1989
- n += t.del(a);
1990
- break;
1991
- case "text":
1992
- n += t.text(a);
1993
- break;
1994
- default: {
1995
- let e = "Token with \"" + a.type + "\" type was not found.";
1996
- if (this.options.silent) return console.error(e), "";
1997
- throw Error(e);
1998
- }
1999
- }
2000
- }
2001
- return n;
2002
- }
2003
- }, Z = class {
2004
- options;
2005
- block;
2006
- constructor(e) {
2007
- this.options = e || D;
2008
- }
2009
- static passThroughHooks = /* @__PURE__ */ new Set([
2010
- "preprocess",
2011
- "postprocess",
2012
- "processAllTokens",
2013
- "emStrongMask"
2014
- ]);
2015
- static passThroughHooksRespectAsync = /* @__PURE__ */ new Set([
2016
- "preprocess",
2017
- "postprocess",
2018
- "processAllTokens"
2019
- ]);
2020
- preprocess(e) {
2021
- return e;
2022
- }
2023
- postprocess(e) {
2024
- return e;
2025
- }
2026
- processAllTokens(e) {
2027
- return e;
2028
- }
2029
- emStrongMask(e) {
2030
- return e;
2031
- }
2032
- provideLexer(e = this.block) {
2033
- return e ? q.lex : q.lexInline;
2034
- }
2035
- provideParser(e = this.block) {
2036
- return e ? X.parse : X.parseInline;
2037
- }
2038
- }, mn = new class {
2039
- defaults = ct();
2040
- options = this.setOptions;
2041
- parse = this.parseMarkdown(!0);
2042
- parseInline = this.parseMarkdown(!1);
2043
- Parser = X;
2044
- Renderer = J;
2045
- TextRenderer = Y;
2046
- Lexer = q;
2047
- Tokenizer = pn;
2048
- Hooks = Z;
2049
- constructor(...e) {
2050
- this.use(...e);
2051
- }
2052
- walkTokens(e, t) {
2053
- let n = [];
2054
- for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
2055
- case "table": {
2056
- let e = r;
2057
- for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
2058
- for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
2059
- break;
2060
- }
2061
- case "list": {
2062
- let e = r;
2063
- n = n.concat(this.walkTokens(e.items, t));
2064
- break;
2065
- }
2066
- default: {
2067
- let e = r;
2068
- this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2069
- let i = e[r].flat(Infinity);
2070
- n = n.concat(this.walkTokens(i, t));
2071
- }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
2072
- }
2073
- }
2074
- return n;
2075
- }
2076
- use(...e) {
2077
- let t = this.defaults.extensions || {
2078
- renderers: {},
2079
- childTokens: {}
2080
- };
2081
- return e.forEach((e) => {
2082
- let n = { ...e };
2083
- if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
2084
- if (!e.name) throw Error("extension name required");
2085
- if ("renderer" in e) {
2086
- let n = t.renderers[e.name];
2087
- n ? t.renderers[e.name] = function(...t) {
2088
- let r = e.renderer.apply(this, t);
2089
- return r === !1 && (r = n.apply(this, t)), r;
2090
- } : t.renderers[e.name] = e.renderer;
2091
- }
2092
- if ("tokenizer" in e) {
2093
- if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
2094
- let n = t[e.level];
2095
- 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]));
2096
- }
2097
- "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2098
- }), n.extensions = t), e.renderer) {
2099
- let t = this.defaults.renderer || new J(this.defaults);
2100
- for (let n in e.renderer) {
2101
- if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2102
- if (["options", "parser"].includes(n)) continue;
2103
- let r = n, i = e.renderer[r], a = t[r];
2104
- t[r] = (...e) => {
2105
- let n = i.apply(t, e);
2106
- return n === !1 && (n = a.apply(t, e)), n || "";
2107
- };
2108
- }
2109
- n.renderer = t;
2110
- }
2111
- if (e.tokenizer) {
2112
- let t = this.defaults.tokenizer || new pn(this.defaults);
2113
- for (let n in e.tokenizer) {
2114
- if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2115
- if ([
2116
- "options",
2117
- "rules",
2118
- "lexer"
2119
- ].includes(n)) continue;
2120
- let r = n, i = e.tokenizer[r], a = t[r];
2121
- t[r] = (...e) => {
2122
- let n = i.apply(t, e);
2123
- return n === !1 && (n = a.apply(t, e)), n;
2124
- };
2125
- }
2126
- n.tokenizer = t;
2127
- }
2128
- if (e.hooks) {
2129
- let t = this.defaults.hooks || new Z();
2130
- for (let n in e.hooks) {
2131
- if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2132
- if (["options", "block"].includes(n)) continue;
2133
- let r = n, i = e.hooks[r], a = t[r];
2134
- Z.passThroughHooks.has(n) ? t[r] = (e) => {
2135
- if (this.defaults.async && Z.passThroughHooksRespectAsync.has(n)) return (async () => {
2136
- let n = await i.call(t, e);
2137
- return a.call(t, n);
2138
- })();
2139
- let r = i.call(t, e);
2140
- return a.call(t, r);
2141
- } : t[r] = (...e) => {
2142
- if (this.defaults.async) return (async () => {
2143
- let n = await i.apply(t, e);
2144
- return n === !1 && (n = await a.apply(t, e)), n;
2145
- })();
2146
- let n = i.apply(t, e);
2147
- return n === !1 && (n = a.apply(t, e)), n;
2148
- };
2149
- }
2150
- n.hooks = t;
2151
- }
2152
- if (e.walkTokens) {
2153
- let t = this.defaults.walkTokens, r = e.walkTokens;
2154
- n.walkTokens = function(e) {
2155
- let n = [];
2156
- return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
2157
- };
2158
- }
2159
- this.defaults = {
2160
- ...this.defaults,
2161
- ...n
2162
- };
2163
- }), this;
2164
- }
2165
- setOptions(e) {
2166
- return this.defaults = {
2167
- ...this.defaults,
2168
- ...e
2169
- }, this;
2170
- }
2171
- lexer(e, t) {
2172
- return q.lex(e, t ?? this.defaults);
2173
- }
2174
- parser(e, t) {
2175
- return X.parse(e, t ?? this.defaults);
2176
- }
2177
- parseMarkdown(e) {
2178
- return (t, n) => {
2179
- let r = { ...n }, i = {
2180
- ...this.defaults,
2181
- ...r
2182
- }, a = this.onError(!!i.silent, !!i.async);
2183
- 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."));
2184
- if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
2185
- if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
2186
- if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
2187
- 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;
2188
- i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
2189
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(a, i);
2190
- return i.hooks ? await i.hooks.postprocess(o) : o;
2191
- })().catch(a);
2192
- try {
2193
- i.hooks && (t = i.hooks.preprocess(t));
2194
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
2195
- i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
2196
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? X.parse : X.parseInline)(n, i);
2197
- return i.hooks && (r = i.hooks.postprocess(r)), r;
2198
- } catch (e) {
2199
- return a(e);
2200
- }
2201
- };
2202
- }
2203
- onError(e, t) {
2204
- return (n) => {
2205
- if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
2206
- let e = "<p>An error occurred:</p><pre>" + U(n.message + "", !0) + "</pre>";
2207
- return t ? Promise.resolve(e) : e;
2208
- }
2209
- if (t) return Promise.reject(n);
2210
- throw n;
2211
- };
2212
- }
2213
- }();
2214
- function Q(e, t) {
2215
- return mn.parse(e, t);
2216
- }
2217
- Q.options = Q.setOptions = function(e) {
2218
- return mn.setOptions(e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2219
- }, Q.getDefaults = ct, Q.defaults = D, Q.use = function(...e) {
2220
- return mn.use(...e), Q.defaults = mn.defaults, O(Q.defaults), Q;
2221
- }, Q.walkTokens = function(e, t) {
2222
- return mn.walkTokens(e, t);
2223
- }, 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;
2224
- //#endregion
2225
- //#region src/components/ai-chat/ai-chat.module.scss?inline
2226
- var hn = ":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.assistant-message-actions--confirming{flex-direction:column;align-items:flex-start}:host .assistant-message-actions .assistant-message-action-confirm-message{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));white-space:pre-line}:host .assistant-message-actions .assistant-message-action-confirm-controls{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:flex}:host .assistant-message-actions luzmo-button.assistant-message-action,: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-3);--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)}", gn = ":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))}", _n = class extends e {
2227
- constructor(...e) {
2228
- 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;
2229
- }
2230
- static {
2231
- this.styles = c(gn);
2232
- }
2233
- static {
2234
- this.tagName = "luzmo-ai-chat-empty-state";
2235
- }
2236
- _handleSuggestionActivate(e) {
2237
- if (this.disabled) return;
2238
- let t = e.prompt ?? e.label;
2239
- this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
2240
- detail: {
2241
- label: e.label,
2242
- prompt: t,
2243
- selectedDatasets: e.selectedDatasets
2244
- },
2245
- bubbles: !0,
2246
- composed: !0
2247
- }));
2248
- }
2249
- render() {
2250
- let e = this.suggestions.length > 0;
2251
- return o`
2252
- <section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
2253
- <header class="header">
2254
- <h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
2255
- </header>
2256
-
2257
- ${e ? o`
2258
- <div class="actions">
2259
- ${this.subtitle ? o`<p class="subtitle">${this.subtitle}</p>` : s}
2260
- <div
2261
- class="suggestions"
2262
- role="group"
2263
- aria-label=${n("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
2264
- >
2265
- ${this.suggestions.map((e) => o`
2266
- <luzmo-action-button
2267
- variant="accent"
2268
- size="s"
2269
- ?disabled=${this.disabled}
2270
- @click=${() => this._handleSuggestionActivate(e)}
2271
- >
2272
- ${e.label}
2273
- </luzmo-action-button>
2274
- `)}
2275
- </div>
2276
- </div>
2277
- ` : s}
2278
- </section>
2279
- `;
2280
- }
2281
- };
2282
- //#endregion
2283
- //#region src/components/ai-chat/empty-state/index.ts
2284
- t([l({ type: String })], _n.prototype, "title", void 0), t([l({ type: String })], _n.prototype, "subtitle", void 0), t([l({ type: Array })], _n.prototype, "suggestions", void 0), t([l({
2285
- type: Boolean,
2286
- reflect: !0
2287
- })], _n.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", _n);
2288
- //#endregion
2289
- //#region src/components/ai-chat/ai-chat-request.ts
2290
- function vn(e, t) {
2291
- return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
2292
- }
2293
- function yn(e) {
2294
- return e.type === "placeholder" ? null : {
2295
- ...e,
2296
- version: e.version || "",
2297
- title: e.title || e.options?.title,
2298
- filters: e.filterGroups || [],
2299
- aichartId: e.aichartId || ""
2300
- };
2301
- }
2302
- function bn(e, t) {
2303
- return [{
2304
- type: "text",
2305
- text: e
2306
- }, ...t.map((e) => ({
2307
- type: "dataset",
2308
- id: e
2309
- }))];
2310
- }
2311
- function xn(e, t, n) {
2312
- return {
2313
- agent: e,
2314
- task: t,
2315
- stream: n.stream ?? !0,
2316
- response_mode: "mixed",
2317
- ...n.conversationId ? { conversation_id: n.conversationId } : {},
2318
- ...n.localeId ? { locale_id: n.localeId } : {}
2319
- };
2320
- }
2321
- function Sn(e) {
2322
- let t = bn(e.prompt, e.datasetIds), n = e.chart ? yn(e.chart) : null;
2323
- return n && t.push({
2324
- type: "item",
2325
- value: n
2326
- }), {
2327
- ...xn("item", e.task ?? "generate", e),
2328
- input: t
2329
- };
2330
- }
2331
- function Cn(e) {
2332
- let t = bn(e.prompt, e.datasetIds);
2333
- return e.dashboard && t.push({
2334
- type: "dashboard",
2335
- value: e.dashboard,
2336
- ...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
2337
- }), {
2338
- ...xn("dashboard", "generate", e),
2339
- timezone_id: e.timezoneId ?? "UTC",
2340
- input: t
2341
- };
2342
- }
2343
- function wn(e) {
2344
- return {
2345
- ...xn("analyst", "generate", e),
2346
- input: bn(e.prompt, e.datasetIds)
2347
- };
2348
- }
2349
- function Tn(e, t) {
2350
- switch (e) {
2351
- case "dashboard": return Cn(t);
2352
- case "analyst": return wn(t);
2353
- default: return Sn(t);
2354
- }
2355
- }
2356
- function En(e, t) {
2357
- let { authKey: n, authToken: r, apiVersion: i = "0.1.0" } = t;
2358
- return {
2359
- key: n,
2360
- token: r,
2361
- action: "create",
2362
- version: i,
2363
- properties: Tn(e, t)
2364
- };
2365
- }
2366
- function Dn(e, t, n, r = "0.1.0", i = null) {
2367
- return {
2368
- key: t,
2369
- token: n,
2370
- action: "delete",
2371
- version: r,
2372
- properties: {
2373
- agent: "item",
2374
- restore_to_message_id: e,
2375
- ...i ? { conversation_id: i } : {}
2376
- }
2377
- };
2378
- }
2379
- //#endregion
2380
- //#region src/components/ai-chat/stream/transport.ts
2381
- async function On(e) {
2382
- let t = await fetch(e.url, {
2383
- method: "POST",
2384
- headers: { "Content-Type": "application/json" },
2385
- mode: "cors",
2386
- body: JSON.stringify(e.body),
2387
- signal: e.signal
2388
- });
2389
- if (!t.ok) {
2390
- let e = await t.json().catch(() => null);
2391
- throw Error(e?.message || `API request failed with status ${t.status}`);
2392
- }
2393
- if (!t.body) throw Error("Response body is not readable");
2394
- return {
2395
- body: t.body,
2396
- conversationId: t.headers.get("x-conversation-id")
2397
- };
2398
- }
2399
- function kn(e) {
2400
- let t = e.trim();
2401
- if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
2402
- let n = t;
2403
- return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
2404
- }
2405
- function An(e, t) {
2406
- try {
2407
- let n = kn(e);
2408
- n && t(n);
2409
- } catch {
2410
- console.error("Failed to parse stream line");
2411
- }
2412
- }
2413
- async function jn(e, t) {
2414
- let n = e.getReader(), r = new TextDecoder(), i = "";
2415
- try {
2416
- for (;;) {
2417
- let { done: e, value: a } = await n.read();
2418
- if (e) break;
2419
- i += r.decode(a, { stream: !0 });
2420
- let o = i.split(/\r?\n/);
2421
- i = o.pop() ?? "";
2422
- for (let e of o) An(e, t);
2423
- }
2424
- i += r.decode();
2425
- let e = i.trim();
2426
- e && An(e, t);
2427
- } finally {
2428
- n.releaseLock();
2429
- }
2430
- }
2431
- //#endregion
2432
- //#region src/components/ai-chat/stream/progress.ts
2433
- function Mn() {
2434
- return {
2435
- id: "root",
2436
- step: "root",
2437
- status: "pending",
2438
- children: [{
2439
- id: "client-init",
2440
- step: "iqInit",
2441
- status: "inProgress",
2442
- description: n("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
2443
- }]
2444
- };
2445
- }
2446
- function Nn(e) {
2447
- let t = e.progress;
2448
- return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
2449
- }
2450
- //#endregion
2451
- //#region src/components/ai-chat/stream/chunk-extractors.ts
2452
- function Pn(e) {
2453
- if (!e || typeof e != "object") return "";
2454
- let t = e.assistant_message;
2455
- if (!t || typeof t != "object") return "";
2456
- if (typeof t.message == "string") return t.message;
2457
- if (typeof t.text == "string") return t.text;
2458
- if (typeof t.summary == "string") return t.summary;
2459
- let n = t.content;
2460
- return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
2461
- }
2462
- function Fn(e) {
2463
- 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 : "";
2464
- }
2465
- function In(e) {
2466
- return Pn(e.result);
2467
- }
2468
- function Ln(e) {
2469
- return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
2470
- }
2471
- function Rn(e, t) {
2472
- let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
2473
- n && t.callbacks.onConversationIdChange(n);
2474
- }
2475
- function zn(e) {
2476
- for (let t of e) if (t && typeof t == "object" && t.type === "item") {
2477
- let e = t.value;
2478
- if (e && typeof e == "object") return e;
2479
- }
2480
- return null;
2481
- }
2482
- function Bn(e) {
2483
- let t = e.chart ?? e.generatedChart;
2484
- if (t && typeof t == "object") return t;
2485
- let n = e.aiMessageAssets ?? e.ai_message_assets;
2486
- if (Array.isArray(n)) {
2487
- let e = zn(n);
2488
- if (e) return e;
2489
- }
2490
- let r = e.result;
2491
- if (r && typeof r == "object") {
2492
- let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2493
- if (Array.isArray(t)) return zn(t);
2494
- }
2495
- return null;
2496
- }
2497
- function Vn(e) {
2498
- for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2499
- let e = t.value;
2500
- if (e && typeof e == "object" && Array.isArray(e.views)) return e;
2501
- }
2502
- return null;
2503
- }
2504
- function Hn(e) {
2505
- for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2506
- let e = t.name;
2507
- if (e && typeof e == "object") return e;
2508
- }
2509
- }
2510
- function Un(...e) {
2511
- return e.find(Array.isArray);
2512
- }
2513
- function Wn(e) {
2514
- if (e.views && Array.isArray(e.views)) return e;
2515
- let t = e.aiMessageAssets ?? e.ai_message_assets;
2516
- if (Array.isArray(t)) return Vn(t);
2517
- let n = e.result;
2518
- if (n && typeof n == "object") {
2519
- let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2520
- if (Array.isArray(t)) return Vn(t);
2521
- }
2522
- return null;
2523
- }
2524
- function Gn(e) {
2525
- let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Un(t, n?.aiMessageAssets ?? n?.ai_message_assets);
2526
- return r ? Hn(r) : void 0;
2527
- }
2528
- //#endregion
2529
- //#region src/components/ai-chat/stream/stream-processor.ts
2530
- var Kn = /* @__PURE__ */ new Set([
2531
- "conversation-id",
2532
- "conversation_id",
2533
- "keepalive",
2534
- "ping",
2535
- "finish",
2536
- "done"
2537
- ]);
2538
- function qn(e, t, n) {
2539
- return {
2540
- agent: n.agent,
2541
- conversationId: t.callbacks.getConversationId(),
2542
- ...typeof e.messageId == "string" ? { messageId: e.messageId } : {},
2543
- raw: e
2544
- };
2545
- }
2546
- function Jn(e, t, n, r, i) {
2547
- let a = {
2548
- ...qn(n, e, t),
2549
- recognized: !0,
2550
- type: r,
2551
- data: i
2552
- };
2553
- e.callbacks.onStep(a);
2554
- }
2555
- function Yn(e, t, n, r, i) {
2556
- let a = {
2557
- ...qn(n, e, t),
2558
- recognized: !1,
2559
- type: r,
2560
- data: i
2561
- };
2562
- e.callbacks.onStep(a);
2563
- }
2564
- function Xn(e) {
2565
- e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
2566
- }
2567
- function Zn(e, t) {
2568
- Xn(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
2569
- }
2570
- function Qn(e) {
2571
- if (!e) return null;
2572
- let t = e.descriptionMetadata?.decision;
2573
- if (t === "create" || t === "edit" || t === "question") return t;
2574
- for (let t of e.children ?? []) {
2575
- let e = Qn(t);
2576
- if (e) return e;
2577
- }
2578
- return null;
2579
- }
2580
- function $n(e, t, n) {
2581
- if (!Nn(e)) return !1;
2582
- let r = e.progress;
2583
- if (t.callbacks.onProgress(r), Jn(t, n, e, "progress", r), t.state.decision === null) {
2584
- let i = Qn(r);
2585
- i && (t.state.decision = i, Jn(t, n, e, "decision", { decision: i }));
2586
- }
2587
- return !0;
2588
- }
2589
- function er(e) {
2590
- return !!e.error || e.type === "error" || typeof e.error_text == "string";
2591
- }
2592
- function tr(e) {
2593
- 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" });
2594
- }
2595
- function nr(e, t, n) {
2596
- if (!er(e)) return !1;
2597
- let r = tr(e);
2598
- return t.aiMessage.message = r, t.aiMessage.isError = !0, t.callbacks.onMessageUpdate(t.aiMessage), Cr(e, t, n, e.error ?? r), !0;
2599
- }
2600
- function rr(e) {
2601
- return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
2602
- }
2603
- function ir(e, t, n) {
2604
- if (e.type !== "interrupt") return !1;
2605
- let r = rr(e);
2606
- return r && (t.state.interruptQuestion = r, Zn(t, r), Jn(t, n, e, "interrupt", { question: r })), Cr(e, t, n), !0;
2607
- }
2608
- function ar(e) {
2609
- return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
2610
- }
2611
- function or(e) {
2612
- return typeof e.asset_type == "string" ? e.asset_type : "";
2613
- }
2614
- function sr(e) {
2615
- return {
2616
- assetType: or(e),
2617
- snapshot: {}
2618
- };
2619
- }
2620
- function cr(e, t) {
2621
- return {
2622
- ...e,
2623
- ...t
2624
- };
2625
- }
2626
- function lr(e) {
2627
- let t = e.asset_delta ?? e.delta;
2628
- return t && typeof t == "object" ? t : null;
2629
- }
2630
- function ur(e, t) {
2631
- t.state.assets[ar(e)] = sr(e);
2632
- }
2633
- function dr(e, t) {
2634
- let n = ar(e), r = t.state.assets[n] ?? sr(e), i = lr(e);
2635
- i && (r.snapshot = cr(r.snapshot, i)), t.state.assets[n] = r;
2636
- }
2637
- function fr(e, t) {
2638
- let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
2639
- return n && typeof n == "object" ? cr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
2640
- }
2641
- function pr(e, t, n) {
2642
- let r = ar(e), i = t.state.assets[r], a = i?.assetType || or(e), o = fr(e, i);
2643
- delete t.state.assets[r], gr(a, o, e, t, n);
2644
- }
2645
- function mr(e, t, n) {
2646
- switch (e.type) {
2647
- case "asset_start": return ur(e, t), !0;
2648
- case "asset_delta": return dr(e, t), !0;
2649
- case "asset_end": return pr(e, t, n), !0;
2650
- default: return !1;
2651
- }
2652
- }
2653
- function hr(e, t, n, r) {
2654
- n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), Jn(n, r, t, "chart", e);
2655
- }
2656
- function gr(e, t, n, r, i) {
2657
- switch (e) {
2658
- case "dashboard-title": {
2659
- let e = t.name;
2660
- e && typeof e == "object" && (r.state.dashboardName = e, Jn(r, i, n, "dashboard-title", { name: e }));
2661
- return;
2662
- }
2663
- case "dashboard-layout":
2664
- Jn(r, i, n, "dashboard-layout", t);
2665
- return;
2666
- case "dashboard-item":
2667
- Jn(r, i, n, "dashboard-item", {
2668
- slot: Number(t.slot),
2669
- chart: t.chart ?? t
2670
- });
2671
- return;
2672
- case "dashboard":
2673
- r.state.dashboardSnapshot = t;
2674
- return;
2675
- default: _r(e, t, n, r, i);
2676
- }
2677
- }
2678
- function _r(e, t, n, r, i) {
2679
- if (i.chartAssetType && e === i.chartAssetType) {
2680
- hr(t, n, r, i);
2681
- return;
2682
- }
2683
- if (i.dashboardAssetType && e === i.dashboardAssetType) {
2684
- r.state.dashboardSnapshot = t;
2685
- return;
2686
- }
2687
- Yn(r, i, n, e || "asset", t);
2688
- }
2689
- function vr(e, t, n) {
2690
- let r = !1;
2691
- if (n.dashboardAssetType) {
2692
- let n = Wn(e);
2693
- if (n) {
2694
- t.state.dashboardSnapshot = n;
2695
- let i = Gn(e);
2696
- i && (t.state.dashboardName = i), r = !0;
2697
- }
2698
- }
2699
- if (n.chartAssetType && !t.state.chartSnapshot) {
2700
- let i = Bn(e);
2701
- i && (hr(i, e, t, n), r = !0);
2702
- }
2703
- return r;
2704
- }
2705
- function yr(e, t, n) {
2706
- return {
2707
- ...e,
2708
- generatedChart: t,
2709
- conversationId: n.callbacks.getConversationId()
2710
- };
2711
- }
2712
- function br(e, t, n) {
2713
- for (let r of Object.keys(t.state.assets)) {
2714
- let i = t.state.assets[r];
2715
- delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot) && gr(i.assetType, i.snapshot, e, t, n);
2716
- }
2717
- }
2718
- function xr(e, t) {
2719
- let n = In(e);
2720
- !n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
2721
- }
2722
- function Sr(e, t, n) {
2723
- let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Wn(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? Bn(e) : null);
2724
- return {
2725
- agent: n.agent,
2726
- conversationId: t.callbacks.getConversationId(),
2727
- message: t.aiMessage,
2728
- ...r ? { dashboard: r } : {},
2729
- ...i ? { chart: yr(e, i, t) } : {},
2730
- ...t.state.dashboardName ? { name: t.state.dashboardName } : {},
2731
- raw: e
2732
- };
2733
- }
2734
- function Cr(e, t, n, r) {
2735
- if (!t.state.completed) {
2736
- if (t.state.completed = !0, br(e, t, n), Xn(t), r !== void 0) {
2737
- t.callbacks.onComplete({
2738
- agent: n.agent,
2739
- conversationId: t.callbacks.getConversationId(),
2740
- message: t.aiMessage,
2741
- error: r,
2742
- raw: e
2743
- });
2744
- return;
2745
- }
2746
- xr(e, t), t.callbacks.onComplete(Sr(e, t, n));
2747
- }
2748
- }
2749
- function wr(e) {
2750
- return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
2751
- }
2752
- function Tr(e, t, n) {
2753
- let r = Fn(e);
2754
- return r ? (t.state.accumulatedText += r, Zn(t, r), Jn(t, n, e, "text", {
2755
- delta: r,
2756
- text: t.state.accumulatedText
2757
- }), !0) : !1;
2758
- }
2759
- function Er(e, t, n, r, i) {
2760
- if (r || i) return;
2761
- let a = wr(e);
2762
- a && !Kn.has(a) && Yn(t, n, e, a, e);
2763
- }
2764
- function Dr(e, t, n) {
2765
- if (Rn(e, t), $n(e, t, n) || nr(e, t, n) || ir(e, t, n) || mr(e, t, n)) return;
2766
- let r = Tr(e, t, n), i = vr(e, t, n), a = r || i, o = Ln(e);
2767
- Er(e, t, n, a, o), o && Cr(e, t, n);
2768
- }
2769
- //#endregion
2770
- //#region src/components/ai-chat/stream/registry.ts
2771
- function Or(e) {
2772
- switch (e) {
2773
- case "dashboard": return {
2774
- agent: e,
2775
- dashboardAssetType: "dashboard"
2776
- };
2777
- case "item": return {
2778
- agent: e,
2779
- chartAssetType: "item"
2780
- };
2781
- default: return { agent: e };
2782
- }
2783
- }
2784
- function kr(e) {
2785
- let t = Or(e);
2786
- return (e, n) => Dr(e, n, t);
2787
- }
2788
- function Ar() {
2789
- return {
2790
- progressCollapsed: !1,
2791
- accumulatedText: "",
2792
- decision: null,
2793
- assets: {},
2794
- dashboardSnapshot: null,
2795
- dashboardName: void 0,
2796
- chartSnapshot: null,
2797
- interruptQuestion: null,
2798
- completed: !1
2799
- };
2800
- }
2801
- //#endregion
2802
- //#region src/components/ai-chat/session/ai-chat-session.ts
2803
- function jr() {
2804
- return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
2805
- }
2806
- var Mr = class {
2807
- constructor(e, t = {}) {
2808
- this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
2809
- messages: [],
2810
- selectedDatasets: [],
2811
- isGenerating: !1,
2812
- progress: null,
2813
- progressCollapsed: !1,
2814
- conversationId: null,
2815
- inflightMessage: null
2816
- }, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
2817
- apiUrl: "https://api.luzmo.com",
2818
- apiVersion: "0.1.0",
2819
- stream: !0,
2820
- ...e
2821
- }, this._hostCallbacks = t, this._state = {
2822
- ...this._state,
2823
- messages: e.messages ? [...e.messages] : [],
2824
- selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
2825
- conversationId: e.conversationId ?? null,
2826
- isGenerating: e.isGenerating ?? !1,
2827
- progress: e.progress ?? null,
2828
- progressCollapsed: e.progressCollapsed ?? !1
2829
- };
2830
- }
2831
- get state() {
2832
- return this._state;
2833
- }
2834
- get isGenerating() {
2835
- return this._state.isGenerating;
2836
- }
2837
- subscribe(e) {
2838
- return this._subscribers.add(e), e(this._state), () => {
2839
- this._subscribers.delete(e);
2840
- };
2841
- }
2842
- setUiBridge(e) {
2843
- this._uiBridgeCallbacks = e;
2844
- }
2845
- updateConfig(e) {
2846
- this._config = {
2847
- ...this._config,
2848
- ...e
2849
- };
2850
- let t = {};
2851
- if ("conversationId" in e) {
2852
- let n = e.conversationId ?? null;
2853
- n !== this._state.conversationId && (t.conversationId = n);
2854
- }
2855
- if ("selectedDatasets" in e && e.selectedDatasets) {
2856
- let n = [...e.selectedDatasets];
2857
- this._areSelectedDatasetsEqual(n, this._state.selectedDatasets) || (t.selectedDatasets = n);
2858
- }
2859
- if ("messages" in e && e.messages) {
2860
- let n = [...e.messages];
2861
- this._areChatMessagesEqual(n, this._state.messages) || (t.messages = n);
2862
- }
2863
- "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);
2864
- }
2865
- setSelectedDatasets(e) {
2866
- this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
2867
- }
2868
- addDataset(e) {
2869
- this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2870
- }
2871
- removeDataset(e) {
2872
- let t = this._state.selectedDatasets.filter((t) => t.id !== e);
2873
- t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2874
- }
2875
- isDatasetRequirementMet() {
2876
- return !this._config.requireDataset || this._state.selectedDatasets.length > 0;
2877
- }
2878
- getAiPromptUrl() {
2879
- return vn(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
2880
- }
2881
- buildRequestBody(e, t) {
2882
- return En(this._config.agent, {
2883
- prompt: e,
2884
- datasetIds: t,
2885
- authKey: this._config.authKey,
2886
- authToken: this._config.authToken,
2887
- conversationId: this._state.conversationId,
2888
- chart: this._config.chart ?? null,
2889
- dashboard: this._config.dashboard ?? null,
2890
- currentScreenMode: this._config.currentScreenMode,
2891
- localeId: this._config.localeId,
2892
- timezoneId: this._config.timezoneId,
2893
- task: this._config.task,
2894
- modelPreference: this._config.modelPreference,
2895
- apiVersion: this._config.apiVersion,
2896
- stream: this._config.stream
2897
- });
2898
- }
2899
- buildPromptSubmittedDetail(e, t, n, r) {
2900
- return {
2901
- prompt: e,
2902
- selectedDatasets: t,
2903
- datasetIds: n,
2904
- agent: this._config.agent,
2905
- request: this.buildRequestBody(e, n),
2906
- url: this.getAiPromptUrl(),
2907
- ...r ? { signal: r } : {}
2908
- };
2909
- }
2910
- async submit(e) {
2911
- let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
2912
- if (!this.isDatasetRequirementMet()) return;
2913
- this._abortInflight();
2914
- let n = {
2915
- id: e.aiMessageId ?? jr(),
2916
- type: "ai",
2917
- message: ""
2918
- }, r = [...this._state.messages];
2919
- if (!e.skipUserMessage) {
2920
- let t = {
2921
- id: jr(),
2922
- type: "user",
2923
- message: e.prompt
2924
- };
2925
- r = [...r, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
2926
- }
2927
- r = [...r, n], this._inflightMessage = n, this._receivedProgress = !1;
2928
- let i = new AbortController();
2929
- this._abortController = i, this._patchState({
2930
- messages: r,
2931
- isGenerating: !0,
2932
- progress: Mn(),
2933
- progressCollapsed: !1,
2934
- inflightMessage: n
2935
- });
2936
- let a = t, o = [...this._state.selectedDatasets];
2937
- if (this._hasCallback("onPromptSubmitted")) {
2938
- let t = this.buildPromptSubmittedDetail(e.prompt, o, a, i.signal);
2939
- try {
2940
- await this._invokeCallback("onPromptSubmitted", t);
2941
- } catch (e) {
2942
- e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, n), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
2943
- }
2944
- return;
2945
- }
2946
- let s = this.buildRequestBody(e.prompt, t), c = kr(this._config.agent), l = {
2947
- aiMessage: n,
2948
- callbacks: this._createStreamCallbacks(),
2949
- state: Ar()
2950
- }, u = this._config.fetchStreaming ?? On, d = !1;
2951
- try {
2952
- let { body: e, conversationId: t } = await u({
2953
- url: this.getAiPromptUrl(),
2954
- body: s,
2955
- signal: i.signal
2956
- });
2957
- t && this._setConversationId(t), await jn(e, (e) => c(e, l)), d = !0;
2958
- } catch (e) {
2959
- e.name !== "AbortError" && (this._handleSubmitError(e, n), d = !0);
2960
- } finally {
2961
- this._abortController === i && (d ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
2962
- }
2963
- }
2964
- async restore(e) {
2965
- if (this._config.agent !== "item") return {};
2966
- let t = Dn(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
2967
- if (this._patchState({
2968
- isGenerating: !0,
2969
- progress: null,
2970
- progressCollapsed: !1
2971
- }), this._hasCallback("onRestoreRequested")) {
2972
- let n = {
2973
- apiMessageId: e.restoreToMessageId,
2974
- messageIndex: e.messageIndex,
2975
- request: t,
2976
- url: this.getAiPromptUrl()
2977
- };
2978
- try {
2979
- await this._invokeCallback("onRestoreRequested", n);
2980
- } finally {
2981
- this._patchState({ isGenerating: !1 });
2982
- }
2983
- return {};
2984
- }
2985
- try {
2986
- let n = await fetch(this.getAiPromptUrl(), {
2987
- method: "POST",
2988
- headers: { "Content-Type": "application/json" },
2989
- mode: "cors",
2990
- body: JSON.stringify(t)
2991
- });
2992
- if (!n.ok) {
2993
- let e = await n.json().catch(() => null);
2994
- throw Error(e?.message || `API request failed with status ${n.status}`);
2995
- }
2996
- let r = await n.json().catch(() => null), i = r?.generatedChart ?? (r ? Bn(r) : null), a = {
2997
- ...typeof r?.message == "string" ? { message: r.message } : {},
2998
- ...i ? { chart: {
2999
- ...r,
3000
- generatedChart: i
3001
- } } : {}
3002
- }, o = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
3003
- if (a.message && o[e.messageIndex]?.type === "ai" && (o[e.messageIndex] = {
3004
- ...o[e.messageIndex],
3005
- message: a.message
3006
- }), this._patchState({ messages: [...o] }), a.chart || a.message) {
3007
- let t = o[e.messageIndex], n = t?.type === "ai" ? t : {
3008
- id: jr(),
3009
- type: "ai",
3010
- message: a.message ?? ""
3011
- };
3012
- this._emit("onComplete", {
3013
- agent: this._config.agent,
3014
- conversationId: this._state.conversationId,
3015
- message: n,
3016
- ...a.chart ? { chart: a.chart } : {},
3017
- ...r ? { raw: r } : {}
3018
- });
3019
- }
3020
- return a;
3021
- } finally {
3022
- this._patchState({ isGenerating: !1 });
3023
- }
3024
- }
3025
- buildRestoreRequest(e) {
3026
- return Dn(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3027
- }
3028
- abort(e = {}) {
3029
- this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
3030
- isGenerating: !1,
3031
- progress: null,
3032
- progressCollapsed: !1
3033
- }), e.notify && this._emit("onPromptStopped");
3034
- }
3035
- _abortInflight() {
3036
- this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
3037
- }
3038
- _createStreamCallbacks() {
3039
- return {
3040
- onConversationIdChange: (e) => this._setConversationId(e),
3041
- onProgress: (e) => {
3042
- this._receivedProgress = !0, this._patchState({ progress: e });
3043
- },
3044
- onProgressCollapsed: (e) => {
3045
- this._patchState({ progressCollapsed: e });
3046
- },
3047
- onMessageUpdate: (e) => {
3048
- this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
3049
- },
3050
- getConversationId: () => this._state.conversationId,
3051
- onStep: (e) => {
3052
- this._emit("onStep", e);
3053
- },
3054
- onComplete: (e) => {
3055
- this._emit("onComplete", e);
3056
- }
3057
- };
3058
- }
3059
- _setConversationId(e) {
3060
- this._config = {
3061
- ...this._config,
3062
- conversationId: e
3063
- }, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
3064
- }
3065
- _upsertMessage(e) {
3066
- let t = this._state.messages.findIndex((t) => t.id === e.id);
3067
- if (t === -1) {
3068
- this._patchState({ messages: [...this._state.messages, { ...e }] });
3069
- return;
3070
- }
3071
- let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
3072
- this._patchState({ messages: n });
3073
- }
3074
- _finalizeInflightMessage() {
3075
- 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({
3076
- progress: null,
3077
- progressCollapsed: !1,
3078
- inflightMessage: null
3079
- }));
3080
- }
3081
- _removeInflightFromMessages() {
3082
- this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
3083
- }
3084
- _markInflightCancelled(e) {
3085
- 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 }));
3086
- }
3087
- _discardInflightMessage() {
3088
- let e = !!(this._inflightMessage || this._state.inflightMessage);
3089
- this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
3090
- }
3091
- _handleSubmitError(e, t) {
3092
- 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({
3093
- inflightMessage: { ...t },
3094
- progress: null,
3095
- progressCollapsed: !1
3096
- }), this._emit("onComplete", {
3097
- agent: this._config.agent,
3098
- conversationId: this._state.conversationId,
3099
- message: t,
3100
- error: e
3101
- });
3102
- }
3103
- _hasCallback(e) {
3104
- return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
3105
- }
3106
- _emit(e, ...t) {
3107
- this._invokeCallback(e, ...t);
3108
- }
3109
- async _invokeCallback(e, ...t) {
3110
- let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
3111
- typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
3112
- }
3113
- _patchState(e) {
3114
- this._state = {
3115
- ...this._state,
3116
- ...e
3117
- }, this._emit("onStateChange", this._state);
3118
- for (let e of this._subscribers) e(this._state);
3119
- }
3120
- _areSelectedDatasetsEqual(e, t) {
3121
- return e.length === t.length && e.every((e, n) => e.id === t[n]?.id);
3122
- }
3123
- _areChatMessagesEqual(e, t) {
3124
- return e.length === t.length && e.every((e, n) => {
3125
- let r = t[n];
3126
- 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) && JSON.stringify(e.actions ?? null) === JSON.stringify(r?.actions ?? null);
3127
- });
3128
- }
3129
- };
3130
- function Nr(e, t) {
3131
- return new Mr(e, t);
3132
- }
3133
- //#endregion
3134
- //#region src/components/ai-chat/session/ai-chat-session-controller.ts
3135
- var Pr = class {
3136
- constructor(e) {
3137
- this.options = e, this._session = null, this._ownsSession = !1, this._seededFromProps = !1, this._unsubscribe = null;
3138
- }
3139
- get current() {
3140
- return this._session;
3141
- }
3142
- get state() {
3143
- if (this._session) return this._session.state;
3144
- let e = this.options.getSeed();
3145
- return {
3146
- messages: e.messages,
3147
- selectedDatasets: e.selectedDatasets,
3148
- isGenerating: !1,
3149
- progress: null,
3150
- progressCollapsed: !1,
3151
- conversationId: e.conversationId,
3152
- inflightMessage: null
3153
- };
3154
- }
3155
- get ownsCurrentSession() {
3156
- return this._ownsSession;
3157
- }
3158
- setSession(e) {
3159
- if (!e) {
3160
- this._clearSession();
3161
- return;
3162
- }
3163
- this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, e.updateConfig(this.options.getConfig()), this._wire(e);
3164
- }
3165
- syncProperties(e) {
3166
- if (!e.has("chatSession")) {
3167
- if (this._createSessionIfMissing(), this._session) {
3168
- let t = this.options.getConfig();
3169
- Object.keys(t).some((t) => e.has(t)) && this._session.updateConfig(t);
3170
- }
3171
- (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3172
- }
3173
- }
3174
- requireSession() {
3175
- return this._createSessionIfMissing(), this._session.updateConfig(this.options.getConfig()), this._session;
3176
- }
3177
- connect() {
3178
- this._session && this._wire(this._session);
3179
- }
3180
- teardown() {
3181
- this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3182
- }
3183
- _createSessionIfMissing() {
3184
- if (this._session) return;
3185
- let e = this.options.getSeed();
3186
- this._session = Nr({
3187
- ...this.options.getConfig(),
3188
- messages: e.messages.length > 0 ? [...e.messages] : void 0,
3189
- selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3190
- }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3191
- }
3192
- _clearSession() {
3193
- this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3194
- }
3195
- _seedFromPropsOnce() {
3196
- if (!this._ownsSession || this._seededFromProps) return;
3197
- let e = this.requireSession(), t = this.options.getSeed(), n = {};
3198
- 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);
3199
- }
3200
- _wire(e) {
3201
- this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3202
- this.options.onRenderNeeded();
3203
- });
3204
- }
3205
- _unwire() {
3206
- this._unsubscribe?.(), this._unsubscribe = null;
3207
- }
3208
- }, $ = class t extends e {
3209
- constructor(...e) {
3210
- 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._assistantMessageActionsSlotHasContent = !1, this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._lastProcessedInitialPrompt = null, this._session = new Pr({
3211
- getConfig: () => this._buildSessionConfig(),
3212
- getSeed: () => ({
3213
- messages: this.messages,
3214
- selectedDatasets: this.selectedDatasets,
3215
- conversationId: this.conversationId
3216
- }),
3217
- createDomBridge: () => this._createDomBridgeCallbacks(),
3218
- onRenderNeeded: () => {
3219
- this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
3220
- }
3221
- }), this._handleAssistantMessageActionsSlotChange = (e) => {
3222
- let t = e.target.assignedElements({ flatten: !0 }).length > 0;
3223
- this._setAssistantMessageActionsSlotHasContent(t);
3224
- }, this._handleAssistantMessageActionConfirmKeydown = (e) => {
3225
- e.key !== "Escape" || !this._pendingAssistantMessageAction || (e.preventDefault(), e.stopPropagation(), this._cancelAssistantMessageActionConfirm());
3226
- };
3227
- }
3228
- static {
3229
- this.styles = c(hn);
3230
- }
3231
- static {
3232
- this.tagName = "luzmo-ai-chat";
3233
- }
3234
- static {
3235
- this.assistantMessageActionsSlot = "assistant-message-actions";
3236
- }
3237
- get session() {
3238
- return this._session.current;
3239
- }
3240
- _getRenderState() {
3241
- return this._session.state;
3242
- }
3243
- _createDomBridgeCallbacks() {
3244
- return {
3245
- onMessageSent: (e, t) => {
3246
- this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3247
- detail: {
3248
- message: e,
3249
- selectedDatasets: t
3250
- },
3251
- bubbles: !0,
3252
- composed: !0
3253
- }));
3254
- },
3255
- onDatasetsChanged: (e) => {
3256
- this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3257
- detail: { selectedDatasets: e },
3258
- bubbles: !0,
3259
- composed: !0
3260
- }));
3261
- },
3262
- onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3263
- onStep: (e) => {
3264
- this.dispatchEvent(new CustomEvent("luzmo-step", {
3265
- detail: e,
3266
- bubbles: !0,
3267
- composed: !0
3268
- }));
3269
- },
3270
- onComplete: (e) => {
3271
- this.dispatchEvent(new CustomEvent("luzmo-complete", {
3272
- detail: e,
3273
- bubbles: !0,
3274
- composed: !0
3275
- }));
3276
- },
3277
- onPromptStopped: () => {
3278
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3279
- bubbles: !0,
3280
- composed: !0
3281
- }));
3282
- }
3283
- };
3284
- }
3285
- _buildSessionConfig() {
3286
- return {
3287
- agent: this.agent,
3288
- authKey: this.authKey,
3289
- authToken: this.authToken,
3290
- apiUrl: this.apiUrl,
3291
- apiVersion: this.apiVersion,
3292
- stream: this.stream,
3293
- conversationId: this.conversationId,
3294
- chart: this.chart,
3295
- dashboard: this.dashboard,
3296
- currentScreenMode: this.currentScreenMode,
3297
- localeId: this.localeId,
3298
- timezoneId: this.timezoneId,
3299
- task: this.task,
3300
- modelPreference: this.modelPreference,
3301
- requireDataset: this.requireDataset
3302
- };
3303
- }
3304
- _emitConversationIdChanged(e) {
3305
- this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3306
- detail: { conversationId: e },
3307
- bubbles: !0,
3308
- composed: !0
3309
- }));
3310
- }
3311
- async _restoreViaSession(e, t) {
3312
- await this._session.requireSession().restore({
3313
- restoreToMessageId: e,
3314
- messageIndex: t
3315
- });
3316
- }
3317
- async _handleRestoreState(e, t) {
3318
- if (e.apiMessageId && this.agent === "item") try {
3319
- await this._restoreViaSession(e.apiMessageId, t);
3320
- } catch (e) {
3321
- console.error("AI restore error:", e);
3322
- }
3323
- }
3324
- _handleDatasetSelected(e) {
3325
- this._session.requireSession().addDataset(e.detail);
3326
- }
3327
- _handleDatasetRemoved(e) {
3328
- this._session.requireSession().removeDataset(e.detail.id);
3329
- }
3330
- async _submitViaSession(e, t = {}) {
3331
- let n = this._session.requireSession();
3332
- if (n.isDatasetRequirementMet()) {
3333
- this._textareaValue = "";
3334
- try {
3335
- await n.submit({
3336
- prompt: e,
3337
- ...t
3338
- });
3339
- } catch (e) {
3340
- e.name !== "AbortError" && console.error("AI prompt session error:", e);
3341
- }
3342
- }
3343
- }
3344
- async _handlePromptSubmitted(e) {
3345
- await this._submitViaSession(e.detail.prompt);
3346
- }
3347
- _handlePromptStopped() {
3348
- let e = this._session.current;
3349
- if (this._textareaValue = "", e) {
3350
- e.abort({
3351
- notify: !0,
3352
- cancelledMessage: this.cancelledMessage ?? void 0
3353
- });
3354
- return;
3355
- }
3356
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3357
- bubbles: !0,
3358
- composed: !0
3359
- }));
3360
- }
3361
- async _handleEmptyStateSuggestionSelected(e) {
3362
- let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3363
- n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
3364
- }
3365
- async _processInitialPrompt() {
3366
- !this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
3367
- }
3368
- connectedCallback() {
3369
- super.connectedCallback(), this._session.connect();
3370
- }
3371
- disconnectedCallback() {
3372
- super.disconnectedCallback(), this._session.teardown();
3373
- }
3374
- _scrollToBottom() {
3375
- let e = this.shadowRoot?.querySelector(".chat-messages-container");
3376
- e && requestAnimationFrame(() => {
3377
- requestAnimationFrame(() => {
3378
- e.scrollTop = e.scrollHeight;
3379
- });
3380
- });
3381
- }
3382
- willUpdate(e) {
3383
- super.willUpdate?.(e), this._syncPendingAssistantMessageAction();
3384
- }
3385
- updated(e) {
3386
- super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), this.updateComplete.then(() => {
3387
- this._syncAssistantMessageActionsVisibility(), this._focusPendingAssistantMessageActionConfirm();
3388
- });
3389
- }
3390
- _syncSession(e) {
3391
- if (e.has("chatSession")) {
3392
- this._session.setSession(this.chatSession);
3393
- return;
3394
- }
3395
- this._session.syncProperties(e);
3396
- }
3397
- _handleInitialPromptChange() {
3398
- this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3399
- }
3400
- _renderMarkdown(e) {
3401
- let t = String(Q.parse(e, { async: !1 }));
3402
- return st.sanitize(t, {
3403
- 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("."),
3404
- ALLOWED_ATTR: [
3405
- "href",
3406
- "title",
3407
- "target",
3408
- "rel"
3409
- ],
3410
- ALLOW_DATA_ATTR: !1,
3411
- FORBID_TAGS: [
3412
- "script",
3413
- "style",
3414
- "iframe",
3415
- "object",
3416
- "embed",
3417
- "link",
3418
- "form",
3419
- "input",
3420
- "button"
3421
- ],
3422
- FORBID_ATTR: [
3423
- "onerror",
3424
- "onload",
3425
- "onclick",
3426
- "onmouseover",
3427
- "onfocus",
3428
- "onblur"
3429
- ]
3430
- });
3431
- }
3432
- _renderProgress() {
3433
- let { progress: e, progressCollapsed: t } = this._getRenderState();
3434
- return e?.children?.length ? o`
3435
- <luzmo-progress-steps
3436
- .progress=${e}
3437
- ?collapsed=${t}
3438
- size="s"
3439
- ></luzmo-progress-steps>
3440
- ` : s;
3441
- }
3442
- _isLastAiMessageWithProgress(e, t) {
3443
- 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;
3444
- return !1;
3445
- }
3446
- _syncAssistantMessageActionsVisibility() {
3447
- let e = ((this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`) ?? null)?.assignedElements({ flatten: !0 }).length ?? 0) > 0;
3448
- this._setAssistantMessageActionsSlotHasContent(e);
3449
- }
3450
- _setAssistantMessageActionsSlotHasContent(e) {
3451
- e !== this._assistantMessageActionsSlotHasContent && (this._assistantMessageActionsSlotHasContent = e);
3452
- }
3453
- _isLatestAssistantMessage(e, t) {
3454
- return !!(t && e === t);
3455
- }
3456
- _hasBuiltInAssistantMessageActions(e) {
3457
- return (e.actions?.length ?? 0) > 0;
3458
- }
3459
- _assistantMessageActionsFooterHasContent(e, t) {
3460
- return this._hasBuiltInAssistantMessageActions(e) || t && this._assistantMessageActionsSlotHasContent;
3461
- }
3462
- _syncPendingAssistantMessageAction() {
3463
- let e = this._pendingAssistantMessageAction;
3464
- if (!e) return;
3465
- let { messages: t } = this._getRenderState(), n = t.find((t) => t.id === e.messageId), r = n?.actions?.find((t) => t.id === e.actionId);
3466
- (!n || !r?.confirm) && (this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1);
3467
- }
3468
- _getDefaultAssistantMessageActionConfirmMessage() {
3469
- return n("Are you sure?", { desc: "Default assistant message action confirmation prompt" });
3470
- }
3471
- _isAssistantMessageActionConfirming(e) {
3472
- let t = this._pendingAssistantMessageAction, n = e.id;
3473
- return !!(t && n && t.messageId === n);
3474
- }
3475
- _getPendingAssistantMessageAction(e) {
3476
- let t = this._pendingAssistantMessageAction, n = e.id;
3477
- if (!(!t || !n || t.messageId !== n)) return e.actions?.find((e) => e.id === t.actionId);
3478
- }
3479
- _handleAssistantMessageAction(e, t) {
3480
- let n = e.id;
3481
- n && this.dispatchEvent(new CustomEvent("luzmo-assistant-message-action", {
3482
- detail: {
3483
- messageId: n,
3484
- actionId: t.id,
3485
- message: e
3486
- },
3487
- bubbles: !0,
3488
- composed: !0
3489
- }));
3490
- }
3491
- _handleAssistantMessageActionClick(e, t) {
3492
- let n = e.id;
3493
- if (n) {
3494
- if (t.confirm) {
3495
- this._pendingAssistantMessageAction = {
3496
- messageId: n,
3497
- actionId: t.id
3498
- }, this._shouldFocusAssistantMessageActionConfirm = !0;
3499
- return;
3500
- }
3501
- this._handleAssistantMessageAction(e, t);
3502
- }
3503
- }
3504
- _cancelAssistantMessageActionConfirm() {
3505
- this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1;
3506
- }
3507
- _confirmAssistantMessageAction(e, t) {
3508
- this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._handleAssistantMessageAction(e, t);
3509
- }
3510
- _focusPendingAssistantMessageActionConfirm() {
3511
- !this._shouldFocusAssistantMessageActionConfirm || !this._pendingAssistantMessageAction || (this._shouldFocusAssistantMessageActionConfirm = !1, (this.shadowRoot?.querySelector("luzmo-button.assistant-message-action-confirm-cancel"))?.focus?.());
3512
- }
3513
- _renderBuiltInAssistantMessageAction(e, t) {
3514
- return o`
3515
- <luzmo-button
3516
- class="assistant-message-action"
3517
- size="xs"
3518
- variant="neutral"
3519
- treatment="outline"
3520
- ?disabled=${this.disabled || t.disabled || !e.id}
3521
- @click=${() => this._handleAssistantMessageActionClick(e, t)}
3522
- >
3523
- ${t.icon ? o`<luzmo-icon slot="icon" .icon=${t.icon} size="xs"></luzmo-icon>` : s}
3524
- ${t.label}
3525
- </luzmo-button>
3526
- `;
3527
- }
3528
- _renderAssistantMessageActionConfirm(e) {
3529
- let t = this._getPendingAssistantMessageAction(e);
3530
- if (!t) return s;
3531
- let r = t.confirmMessage ?? this._getDefaultAssistantMessageActionConfirmMessage(), i = this.disabled || t.disabled || !e.id;
3532
- return o`
3533
- <span class="assistant-message-action-confirm-message" role="status" aria-live="polite">${r}</span>
3534
- <div class="assistant-message-action-confirm-controls">
3535
- <luzmo-button
3536
- class="assistant-message-action-confirm-cancel"
3537
- size="xs"
3538
- variant="neutral"
3539
- treatment="outline"
3540
- quiet
3541
- ?disabled=${this.disabled}
3542
- @click=${this._cancelAssistantMessageActionConfirm}
3543
- >
3544
- ${n("Cancel", { desc: "Cancel assistant message action confirmation" })}
3545
- </luzmo-button>
3546
- <luzmo-button
3547
- class="assistant-message-action-confirm-confirm"
3548
- size="xs"
3549
- variant=${t.confirmVariant ?? "negative"}
3550
- ?disabled=${i}
3551
- @click=${() => this._confirmAssistantMessageAction(e, t)}
3552
- >
3553
- ${t.label}
3554
- </luzmo-button>
3555
- </div>
3556
- `;
3557
- }
3558
- _renderAssistantMessageActions(e, n) {
3559
- let r = e.actions ?? [], i = r.length > 0, a = this._isLatestAssistantMessage(e, n), c = this._isAssistantMessageActionConfirming(e);
3560
- return !i && !a ? s : o`
3561
- <div
3562
- class="assistant-message-actions ${this._assistantMessageActionsFooterHasContent(e, a) ? "assistant-message-actions--has-content" : ""} ${c ? "assistant-message-actions--confirming" : ""}"
3563
- @keydown=${c ? this._handleAssistantMessageActionConfirmKeydown : s}
3564
- >
3565
- ${c ? this._renderAssistantMessageActionConfirm(e) : o`
3566
- ${r.map((t) => this._renderBuiltInAssistantMessageAction(e, t))}
3567
- ${a ? o`
3568
- <slot
3569
- name=${t.assistantMessageActionsSlot}
3570
- @slotchange=${this._handleAssistantMessageActionsSlotChange}
3571
- ></slot>
3572
- ` : s}
3573
- `}
3574
- </div>
3575
- `;
3576
- }
3577
- _renderRestoreMenu(e, t, a, c = !1) {
3578
- if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== a)) return s;
3579
- let l = `context-menu-trigger-${e.apiMessageId}`;
3580
- return o`
3581
- <div class="assistant-context-menu">
3582
- <button
3583
- id=${l}
3584
- class="assistant-context-menu-trigger"
3585
- type="button"
3586
- aria-label=${n("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
3587
- aria-haspopup="menu"
3588
- ?disabled=${c}
3589
- >
3590
- ${i(r)}
3591
- </button>
3592
- <luzmo-overlay
3593
- trigger="${l}@click"
3594
- placement="bottom-end"
3595
- >
3596
- <luzmo-popover>
3597
- <button
3598
- class="assistant-context-menu-item"
3599
- type="button"
3600
- ?disabled=${c}
3601
- @click=${() => this._handleRestoreState(e, t)}
3602
- >
3603
- ${n("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
3604
- </button>
3605
- </luzmo-popover>
3606
- </luzmo-overlay>
3607
- </div>
3608
- `;
3609
- }
3610
- _renderMessages() {
3611
- let { messages: e, inflightMessage: t, isGenerating: n } = this._getRenderState(), r = t !== null, i = e.filter((e) => !t || e.id !== t.id), a = [...i].reverse().find((e) => e.type === "ai"), c = a?.id;
3612
- return i.map((t) => {
3613
- let l = !!t.progress?.children?.length, u = l && this._isLastAiMessageWithProgress(t, i), ee = l && (r || n || !u), te = l ? o`
3614
- <luzmo-progress-steps
3615
- .progress=${t.progress}
3616
- ?condensed=${ee}
3617
- collapsed
3618
- no-animate
3619
- size="s"
3620
- ></luzmo-progress-steps>
3621
- ` : s;
3622
- if (t.type === "user") return o`
3623
- <luzmo-chat-message
3624
- avatar-placement="bottom"
3625
- position="right"
3626
- variant="primary"
3627
- size="s"
3628
- >
3629
- ${t.message}
3630
- </luzmo-chat-message>
3631
- `;
3632
- let ne = e.indexOf(t), re = t.isError ? "error" : t.isCancelled ? "cancelled" : "", ie = t.isCancelled ? t.message : o`<div class="markdown-content">${d(this._renderMarkdown(t.message))}</div>`;
3633
- return o`
3634
- ${te}
3635
- <div class="assistant-message-wrapper">
3636
- <div class="assistant-message-body">
3637
- <luzmo-chat-message
3638
- class=${re}
3639
- role=${t.isError ? "alert" : s}
3640
- avatar-placement="bottom"
3641
- position="left"
3642
- quiet
3643
- size="s"
3644
- >
3645
- ${ie}
3646
- </luzmo-chat-message>
3647
-
3648
- ${this._renderRestoreMenu(t, ne, c, r)}
3649
- </div>
3650
-
3651
- ${this._renderAssistantMessageActions(t, a)}
3652
- </div>
3653
- `;
3654
- });
3655
- }
3656
- _renderStreamingResponse() {
3657
- let { inflightMessage: e } = this._getRenderState();
3658
- return e?.message ? o`
3659
- <luzmo-chat-message
3660
- avatar-placement="bottom"
3661
- position="left"
3662
- quiet
3663
- size="s"
3664
- >
3665
- <div class="markdown-content">${d(this._renderMarkdown(e.message))}</div>
3666
- </luzmo-chat-message>
3667
- ` : s;
3668
- }
3669
- _renderLoadingMessage() {
3670
- let { isGenerating: e, progress: t, inflightMessage: r } = this._getRenderState();
3671
- if (!e || t?.children?.length || r?.message) return s;
3672
- 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" });
3673
- return o`
3674
- <luzmo-chat-message
3675
- avatar-placement="bottom"
3676
- position="left"
3677
- quiet
3678
- size="s"
3679
- >
3680
- <div class="loading-message" role="status" aria-live="polite">
3681
- <span class="icon-lg">${i(a, { className: "spin" })}</span>
3682
- <span class="loading-message-text">${this.loadingMessage || l}</span>
3683
- </div>
3684
- </luzmo-chat-message>
3685
- `;
3686
- }
3687
- _renderEmptyState() {
3688
- if (this._getRenderState().messages.length > 0) return s;
3689
- let e = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
3690
- return o`
3691
- <luzmo-ai-chat-empty-state
3692
- .title=${this.emptyStateTitle || e}
3693
- .subtitle=${t ? this.emptyStateSubtitle : ""}
3694
- .suggestions=${this.emptyStateSuggestions}
3695
- ?disabled=${this.disabled || this._getRenderState().isGenerating}
3696
- @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
3697
- ></luzmo-ai-chat-empty-state>
3698
- `;
3699
- }
3700
- render() {
3701
- let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
3702
- return o`
3703
- <div class="chat-container" role="region" aria-label=${n("AI Chat", { desc: "Accessible label for AI chat region" })}>
3704
- <div class="chat-messages-container" role="log" aria-live="polite">
3705
- ${this._renderEmptyState()}
3706
- ${this._renderMessages()}
3707
- ${this._renderProgress()}
3708
- ${this._renderStreamingResponse()}
3709
- ${this._renderLoadingMessage()}
3710
- </div>
3711
-
3712
- <luzmo-ai-interaction-textarea
3713
- role="group"
3714
- aria-label=${n("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
3715
- .value=${this._textareaValue}
3716
- .selectedDatasets=${e}
3717
- .placeholder=${this.placeholder}
3718
- ?disabled=${this.disabled}
3719
- ?is-generating=${t}
3720
- ?stoppable=${this.stoppable}
3721
- ?hide-dataset-button=${this.hideDatasetButton}
3722
- ?hide-dataset-icons=${this.hideDatasetIcons}
3723
- ?disable-dataset-modification=${this.disableDatasetModification}
3724
- ?hide-selected-datasets=${this.hideSelectedDatasets}
3725
- ?disable-column-mentions=${this.disableColumnMentions}
3726
- ?require-dataset=${this.requireDataset}
3727
- auth-key=${this.authKey}
3728
- auth-token=${this.authToken}
3729
- api-url=${this.apiUrl}
3730
- app-server=${this.appServer}
3731
- ?flag-opendata=${this.flagOpendata}
3732
- @prompt-submitted=${this._handlePromptSubmitted}
3733
- @prompt-stopped=${this._handlePromptStopped}
3734
- @dataset-selected=${this._handleDatasetSelected}
3735
- @dataset-removed=${this._handleDatasetRemoved}
3736
- ></luzmo-ai-interaction-textarea>
3737
- </div>
3738
- `;
3739
- }
3740
- };
3741
- t([l({ type: Array })], $.prototype, "messages", void 0), t([l({
3742
- type: Array,
3743
- attribute: "selected-datasets"
3744
- })], $.prototype, "selectedDatasets", void 0), t([l({ type: String })], $.prototype, "placeholder", void 0), t([l({
3745
- type: Boolean,
3746
- reflect: !0
3747
- })], $.prototype, "disabled", void 0), t([l({
3748
- type: Boolean,
3749
- reflect: !0
3750
- })], $.prototype, "stoppable", void 0), t([l({
3751
- type: Boolean,
3752
- attribute: "show-assistant-context-menu"
3753
- })], $.prototype, "showAssistantContextMenu", void 0), t([l({
3754
- type: String,
3755
- attribute: "auth-key"
3756
- })], $.prototype, "authKey", void 0), t([l({
3757
- type: String,
3758
- attribute: "auth-token"
3759
- })], $.prototype, "authToken", void 0), t([l({
3760
- type: String,
3761
- attribute: "api-url"
3762
- })], $.prototype, "apiUrl", void 0), t([l({
3763
- type: String,
3764
- attribute: "app-server"
3765
- })], $.prototype, "appServer", void 0), t([l({
3766
- type: Boolean,
3767
- attribute: "flag-opendata"
3768
- })], $.prototype, "flagOpendata", void 0), t([l({
3769
- type: Boolean,
3770
- attribute: "hide-dataset-button"
3771
- })], $.prototype, "hideDatasetButton", void 0), t([l({
3772
- type: Boolean,
3773
- attribute: "hide-dataset-icons"
3774
- })], $.prototype, "hideDatasetIcons", void 0), t([l({
3775
- type: Boolean,
3776
- attribute: "disable-dataset-modification"
3777
- })], $.prototype, "disableDatasetModification", void 0), t([l({
3778
- type: Boolean,
3779
- attribute: "hide-selected-datasets"
3780
- })], $.prototype, "hideSelectedDatasets", void 0), t([l({
3781
- type: Boolean,
3782
- attribute: "disable-column-mentions"
3783
- })], $.prototype, "disableColumnMentions", void 0), t([l({
3784
- type: Boolean,
3785
- attribute: "require-dataset"
3786
- })], $.prototype, "requireDataset", void 0), t([l({ type: String })], $.prototype, "agent", void 0), t([l({ type: String })], $.prototype, "task", void 0), t([l({
3787
- type: String,
3788
- attribute: "model-preference"
3789
- })], $.prototype, "modelPreference", void 0), t([l({ attribute: !1 })], $.prototype, "chatSession", void 0), t([l({
3790
- type: String,
3791
- attribute: "conversation-id"
3792
- })], $.prototype, "conversationId", void 0), t([l({
3793
- type: Object,
3794
- attribute: "chart"
3795
- })], $.prototype, "chart", void 0), t([l({ type: Object })], $.prototype, "dashboard", void 0), t([l({
3796
- type: String,
3797
- attribute: "current-screen-mode"
3798
- })], $.prototype, "currentScreenMode", void 0), t([l({
3799
- type: String,
3800
- attribute: "locale-id"
3801
- })], $.prototype, "localeId", void 0), t([l({
3802
- type: String,
3803
- attribute: "timezone-id"
3804
- })], $.prototype, "timezoneId", void 0), t([l({
3805
- type: String,
3806
- attribute: "api-version"
3807
- })], $.prototype, "apiVersion", void 0), t([l({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), t([l({
3808
- type: String,
3809
- attribute: "loading-message"
3810
- })], $.prototype, "loadingMessage", void 0), t([l({
3811
- type: String,
3812
- attribute: "cancelled-message"
3813
- })], $.prototype, "cancelledMessage", void 0), t([l({
3814
- type: String,
3815
- attribute: "initial-prompt"
3816
- })], $.prototype, "initialPrompt", void 0), t([l({
3817
- type: String,
3818
- attribute: "empty-state-title"
3819
- })], $.prototype, "emptyStateTitle", void 0), t([l({
3820
- type: String,
3821
- attribute: "empty-state-subtitle"
3822
- })], $.prototype, "emptyStateSubtitle", void 0), t([l({
3823
- type: Array,
3824
- attribute: !1
3825
- })], $.prototype, "emptyStateSuggestions", void 0), t([u()], $.prototype, "_textareaValue", void 0), t([u()], $.prototype, "_assistantMessageActionsSlotHasContent", void 0), t([u()], $.prototype, "_pendingAssistantMessageAction", void 0);
3826
- //#endregion
3827
- //#region src/components/ai-chat/ai-chat-events.ts
3828
- function Fr(e) {
3829
- return e.recognized === !0;
3830
- }
3831
- //#endregion
3832
- //#region src/components/ai-chat/index.ts
3833
- customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
3834
- //#endregion
3835
- export { yn as C, Sn as S, _n as T, Dn as _, Nr as a, wn as b, Or as c, Wn as d, Mn as f, jn as g, kn as h, Mr as i, Dr as l, On as m, $ as n, Ar as o, Nn as p, Pr as r, kr as s, Fr as t, Bn as u, Tn as v, vn as w, Cn as x, En as y };