@luzmo/analytics-components-kit 1.0.5-beta.3 → 1.0.6

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 (1176) hide show
  1. package/README.md +3 -1
  2. package/components/area-chart-options.config-C49V29Y8.js +229 -0
  3. package/components/area-chart-positioning.config-1oFe5GQZ.cjs +20 -0
  4. package/components/area-chart-positioning.config-CpN8ybzu.js +55 -0
  5. package/components/area-chart-slots.config-DHeIgMLg.js +55 -0
  6. package/components/bar-chart-options.config-CL5P0qO3.js +300 -0
  7. package/components/bar-chart-positioning.config-D8xaCMCZ.cjs +20 -0
  8. package/components/bar-chart-positioning.config-FY7a9tkw.js +59 -0
  9. package/components/bar-chart-slots.config-DwTg8FbR.js +50 -0
  10. package/components/base-C637VyP1.cjs +20 -0
  11. package/components/base-DCUhSENj.js +248 -0
  12. package/components/box-plot-options.config-Qr3EjXtR.js +356 -0
  13. package/components/box-plot-positioning.config-B8KZRp7Z.cjs +20 -0
  14. package/components/box-plot-positioning.config-BDiLuilt.js +48 -0
  15. package/components/box-plot-slots.config-DiKHnGWa.js +40 -0
  16. package/components/bubble-chart-options.config-C5AjfJ-e.js +135 -0
  17. package/components/bubble-chart-positioning.config-B_iuArqa.js +55 -0
  18. package/components/bubble-chart-positioning.config-CjQj2Xw7.cjs +20 -0
  19. package/components/bubble-chart-slots.config-B8jVSy39.js +47 -0
  20. package/components/bullet-chart-options.config-oj1ECQfr.js +75 -0
  21. package/components/bullet-chart-positioning.config-DCIEjZ-u.js +56 -0
  22. package/components/bullet-chart-positioning.config-DYa0-Ssl.cjs +20 -0
  23. package/components/bullet-chart-slots.config-fNIvT9pt.js +46 -0
  24. package/components/choropleth-map-options.config-CBCRL0Q9.js +348 -0
  25. package/components/choropleth-map-positioning.config-CBaaidlT.js +55 -0
  26. package/components/choropleth-map-positioning.config-Cmgu7SkX.cjs +20 -0
  27. package/components/choropleth-map-slots.config-DEFBSjr_.js +53 -0
  28. package/components/circle-pack-chart-options.config-Ql_H79R5.js +54 -0
  29. package/components/circle-pack-chart-positioning.config-BpRTuvX3.js +48 -0
  30. package/components/circle-pack-chart-positioning.config-D-OOazzj.cjs +20 -0
  31. package/components/circle-pack-chart-slots.config-C88i4e0I.js +38 -0
  32. package/components/circular-gauge-options.config-DVqkM9J-.js +188 -0
  33. package/components/circular-gauge-positioning.config-CPmuEH4P.js +48 -0
  34. package/components/circular-gauge-positioning.config-CU5j-YVN.cjs +20 -0
  35. package/components/circular-gauge-slots.config-tCi8lb6r.js +39 -0
  36. package/components/column-chart-options.config-CP6dQDMX.js +299 -0
  37. package/components/column-chart-positioning.config-BZrwf5kb.js +55 -0
  38. package/components/column-chart-positioning.config-COLCV6uF.cjs +20 -0
  39. package/components/column-chart-slots.config-DlgmagVN.js +50 -0
  40. package/components/combination-chart-options.config-CxipfQJd.js +150 -0
  41. package/components/combination-chart-positioning.config-C7x9UeXL.cjs +20 -0
  42. package/components/combination-chart-positioning.config-vlhurz7H.js +48 -0
  43. package/components/combination-chart-slots.config-HWXOi_xL.js +43 -0
  44. package/components/conditional-number-options.config-DEoWU4SM.js +205 -0
  45. package/components/conditional-number-positioning.config-B5cUO8xu.cjs +20 -0
  46. package/components/conditional-number-positioning.config-B_yYXm1g.js +48 -0
  47. package/components/conditional-number-slots.config-B1c3brbY.js +39 -0
  48. package/components/data-field/index.cjs +1 -1
  49. package/components/data-field/index.d.ts +0 -1
  50. package/components/data-field/index.js +2 -2
  51. package/components/data-field-DHgFf3bH.js +341 -0
  52. package/components/data-field-panel/index.cjs +1 -1
  53. package/components/data-field-panel/index.d.ts +0 -1
  54. package/components/data-field-panel/index.js +2 -2
  55. package/components/data-field-panel-D8jv5MJx.js +384 -0
  56. package/components/data-field-panel-DX_D-jOn.cjs +87 -0
  57. package/components/data-field-ud8KRJ4-.cjs +89 -0
  58. package/components/data-fields-select-CfGQXzkr.js +261 -0
  59. package/components/data-fields-select-DdNVT54e.cjs +41 -0
  60. package/components/date-comparison-filter-options.config-b46nQkma.js +126 -0
  61. package/components/date-comparison-filter-slots.config-BO_WlGJf.js +33 -0
  62. package/components/date-filter-options.config-DsAxIR5F.js +118 -0
  63. package/components/date-filter-slots.config-DOwkclvY.js +37 -0
  64. package/components/display-settings-binning-D5PEKaBI.cjs +56 -0
  65. package/components/display-settings-binning-DjRX5Ysr.js +112 -0
  66. package/components/display-settings-datetime-CPBtYtAy.cjs +217 -0
  67. package/components/display-settings-datetime-D0pphxmh.js +415 -0
  68. package/components/display-settings-grand-totals-C4feNejJ.cjs +44 -0
  69. package/components/display-settings-grand-totals-DlTKDKin.js +91 -0
  70. package/components/display-settings-numeric-BFjHxdXz.cjs +190 -0
  71. package/components/display-settings-numeric-CzC7orK1.js +481 -0
  72. package/components/display-settings-period-over-period-CzQW7v30.cjs +229 -0
  73. package/components/display-settings-period-over-period-DFWx_SLM.js +434 -0
  74. package/components/donut-chart-options.config-wVCdbZZr.js +207 -0
  75. package/components/donut-chart-positioning.config-S0YvSx2H.cjs +20 -0
  76. package/components/donut-chart-positioning.config-_6eKwCtI.js +48 -0
  77. package/components/donut-chart-slots.config-BiyZvM68.js +39 -0
  78. package/components/dropdown-filter-options.config-D8Nr-pia.js +153 -0
  79. package/components/dropdown-filter-slots.config-kuGNR6kG.js +38 -0
  80. package/components/en-CSPDwq2y.cjs +20 -0
  81. package/components/en-GB-CJR66Ci_.cjs +20 -0
  82. package/components/en-GB-DPjL71xN.js +28 -0
  83. package/components/en-US-CSPDwq2y.cjs +20 -0
  84. package/components/en-US-dzaDznn9.js +21 -0
  85. package/components/en-dzaDznn9.js +21 -0
  86. package/components/evolution-number-options.config-C3J_ZYpv.js +228 -0
  87. package/components/evolution-number-positioning.config-BOdHq6-i.cjs +20 -0
  88. package/components/evolution-number-positioning.config-tvmjQEaG.js +48 -0
  89. package/components/evolution-number-slots.config-CoDxHhwF.js +37 -0
  90. package/components/filters/index.cjs +1 -1
  91. package/components/filters/index.js +2 -2
  92. package/components/filters-B6jGM3ej.cjs +323 -0
  93. package/components/filters-Dj6sRMSR.js +1644 -0
  94. package/components/formula/index.cjs +1 -1
  95. package/components/formula/index.js +2 -2
  96. package/components/formula-BFcOs8RL.js +137 -0
  97. package/components/formula-BcVDJ9m_.cjs +45 -0
  98. package/components/formula-codemirror-DiVcMrIg.cjs +215 -0
  99. package/components/formula-codemirror-J0QWRZ49.js +12016 -0
  100. package/components/formula-display-store-BH4tCSWY.js +1122 -0
  101. package/components/formula-display-store-BWDj367s.cjs +20 -0
  102. package/components/formula-editor/index.cjs +1 -1
  103. package/components/formula-editor/index.d.ts +0 -1
  104. package/components/formula-editor/index.js +4 -5
  105. package/components/formula-editor-Boo1er25.js +895 -0
  106. package/components/formula-editor-N227w8sy.cjs +253 -0
  107. package/components/funnel-chart-options.config-DjF4mn2V.js +207 -0
  108. package/components/funnel-chart-positioning.config-B27G3I3l.cjs +20 -0
  109. package/components/funnel-chart-positioning.config-qBendkC6.js +48 -0
  110. package/components/funnel-chart-slots.config-YDfkl0W9.js +43 -0
  111. package/components/get-css-variable-N_PVMivH.cjs +20 -0
  112. package/components/get-css-variable-SptLB8Tz.js +63 -0
  113. package/components/heat-map-options.config-Tr3qWkye.js +224 -0
  114. package/components/heat-map-positioning.config-BF2SUfIH.cjs +20 -0
  115. package/components/heat-map-positioning.config-C06WNZYE.js +48 -0
  116. package/components/heat-map-slots.config-BTkTaVV1.js +37 -0
  117. package/components/heat-table-options.config-cXCjQymW.js +372 -0
  118. package/components/heat-table-positioning.config-B6fQCm6r.cjs +20 -0
  119. package/components/heat-table-positioning.config-CtKVYd7I.js +55 -0
  120. package/components/heat-table-slots.config-dqh1PMWX.js +49 -0
  121. package/components/hexbin-map-options.config-Bc5rtsom.js +276 -0
  122. package/components/hexbin-map-positioning.config-CC1odymH.js +48 -0
  123. package/components/hexbin-map-positioning.config-CsDTcimL.cjs +20 -0
  124. package/components/hexbin-map-slots.config-BrfF5JYT.js +37 -0
  125. package/components/image-options.config-BQHeuAsU.js +153 -0
  126. package/components/image-slots.config-ZRSv3b5w.js +24 -0
  127. package/components/index.cjs +793 -1
  128. package/components/index.js +6228 -65
  129. package/components/item-grid/index.cjs +1 -1
  130. package/components/item-grid/index.js +2 -2
  131. package/components/item-grid-B9Y-6W5m.cjs +113 -0
  132. package/components/item-grid-pykaS5G4.js +4558 -0
  133. package/components/item-option/index.cjs +1 -1
  134. package/components/item-option/index.js +2 -2
  135. package/components/item-option-DYXtwzIM.js +919 -0
  136. package/components/item-option-XpGZVVdr.cjs +252 -0
  137. package/components/item-option-action-button-group/index.cjs +1 -1
  138. package/components/item-option-action-button-group/index.js +2 -2
  139. package/components/item-option-action-button-group-CBtZKVx-.js +118 -0
  140. package/components/item-option-action-button-group-DyzXk2JJ.cjs +53 -0
  141. package/components/item-option-base-BrU7dJsV.js +123 -0
  142. package/components/item-option-base-Cqo4amTV.cjs +56 -0
  143. package/components/item-option-color-palette-picker/index.cjs +1 -1
  144. package/components/item-option-color-palette-picker/index.js +2 -2
  145. package/components/item-option-color-palette-picker-DEys6FIg.js +2041 -0
  146. package/components/item-option-color-palette-picker-E49SIqt5.cjs +40 -0
  147. package/components/item-option-color-picker/index.cjs +1 -1
  148. package/components/item-option-color-picker/index.js +2 -2
  149. package/components/item-option-color-picker-B8imRobf.js +87 -0
  150. package/components/item-option-color-picker-DqEWnNcU.cjs +34 -0
  151. package/components/item-option-color-range/index.cjs +1 -1
  152. package/components/item-option-color-range/index.js +2 -2
  153. package/components/item-option-color-range-CJnk4E24.cjs +98 -0
  154. package/components/item-option-color-range-CqJwKIEd.js +220 -0
  155. package/components/item-option-multi-language-field/index.cjs +1 -1
  156. package/components/item-option-multi-language-field/index.js +2 -2
  157. package/components/item-option-multi-language-field-Dp2Mpr5b.js +82 -0
  158. package/components/item-option-multi-language-field-sgiTxGdm.cjs +33 -0
  159. package/components/item-option-number-field/index.cjs +1 -1
  160. package/components/item-option-number-field/index.js +2 -2
  161. package/components/item-option-number-field-C3nRZtW1.js +102 -0
  162. package/components/item-option-number-field-DT2HXuYC.cjs +38 -0
  163. package/components/item-option-panel/index.cjs +1 -1
  164. package/components/item-option-panel/index.js +2 -2
  165. package/components/item-option-panel-DLdIbuAy.cjs +67 -0
  166. package/components/item-option-panel-DwGkEeMw.js +183 -0
  167. package/components/item-option-picker/index.cjs +1 -1
  168. package/components/item-option-picker/index.js +2 -2
  169. package/components/item-option-picker-Crb6PnE8.cjs +37 -0
  170. package/components/item-option-picker-nS_nnfVF.js +77 -0
  171. package/components/item-option-position-picker/index.cjs +1 -1
  172. package/components/item-option-position-picker/index.js +2 -2
  173. package/components/item-option-position-picker-BMuua3Lj.cjs +32 -0
  174. package/components/item-option-position-picker-BbAOSkmu.js +117 -0
  175. package/components/item-option-positions-number-field/index.cjs +1 -1
  176. package/components/item-option-positions-number-field/index.js +2 -2
  177. package/components/item-option-positions-number-field-BOp3cutd.js +164 -0
  178. package/components/item-option-positions-number-field-DKSdRWTW.cjs +49 -0
  179. package/components/item-option-radio-button-group/index.cjs +1 -1
  180. package/components/item-option-radio-button-group/index.js +2 -2
  181. package/components/item-option-radio-button-group-B_iWBD9w.js +74 -0
  182. package/components/item-option-radio-button-group-DGbhldoK.cjs +37 -0
  183. package/components/item-option-slider/index.cjs +1 -1
  184. package/components/item-option-slider/index.js +2 -2
  185. package/components/item-option-slider/item-option-slider.d.ts +5 -0
  186. package/components/item-option-slider-4PSjHHGu.js +96 -0
  187. package/components/item-option-slider-Ct0dd0ci.cjs +33 -0
  188. package/components/item-option-switch/index.cjs +1 -1
  189. package/components/item-option-switch/index.js +2 -2
  190. package/components/item-option-switch-BbqKaspH.js +69 -0
  191. package/components/item-option-switch-DgYg5msr.cjs +30 -0
  192. package/components/item-option-text-field/index.cjs +1 -1
  193. package/components/item-option-text-field/index.js +2 -2
  194. package/components/item-option-text-field-DlDfvOFf.js +80 -0
  195. package/components/item-option-text-field-DsYobVm7.cjs +33 -0
  196. package/components/item-options-configs.js +45 -45
  197. package/components/item-slot-drop/index.cjs +1 -1
  198. package/components/item-slot-drop/index.d.ts +0 -2
  199. package/components/item-slot-drop/index.js +2 -2
  200. package/components/item-slot-drop-BuXYBvhO.js +326 -0
  201. package/components/item-slot-drop-panel/index.cjs +1 -1
  202. package/components/item-slot-drop-panel/index.js +2 -2
  203. package/components/item-slot-drop-panel-4lKBdSdq.js +354 -0
  204. package/components/item-slot-drop-panel-FLuz9znI.cjs +57 -0
  205. package/components/item-slot-drop-pl3ZTBEo.cjs +91 -0
  206. package/components/item-slot-picker/index.cjs +1 -1
  207. package/components/item-slot-picker/index.js +2 -2
  208. package/components/item-slot-picker-BllkOiQu.cjs +174 -0
  209. package/components/item-slot-picker-C-lCNPY_.js +500 -0
  210. package/components/item-slot-picker-panel/index.cjs +1 -1
  211. package/components/item-slot-picker-panel/index.js +2 -2
  212. package/components/item-slot-picker-panel-BsAwO_BR.cjs +81 -0
  213. package/components/item-slot-picker-panel-Dn5yJrZi.js +447 -0
  214. package/components/item-slots-configs.js +45 -45
  215. package/components/line-chart-options.config-DbEfF3_P.js +248 -0
  216. package/components/line-chart-positioning.config-BTYG1EVp.cjs +20 -0
  217. package/components/line-chart-positioning.config-Ca4m3l8g.js +55 -0
  218. package/components/line-chart-slots.config-Dtdt3oil.js +55 -0
  219. package/components/load-data-fields-for-datasets-BOcizGTk.cjs +20 -0
  220. package/components/load-data-fields-for-datasets-B_SpkBqA.js +86 -0
  221. package/components/localized-mixin-C-4Zk9oh.cjs +20 -0
  222. package/components/localized-mixin-CRSfJ73Q.js +52 -0
  223. package/components/marker-map-options.config-B9uOw9qk.js +117 -0
  224. package/components/marker-map-positioning.config-C5VuPrAq.js +48 -0
  225. package/components/marker-map-positioning.config-Ds7dX4x5.cjs +20 -0
  226. package/components/marker-map-slots.config-CF-OLWDb.js +37 -0
  227. package/components/ohlc-chart-options.config-CUXSO5cK.js +124 -0
  228. package/components/ohlc-chart-positioning.config-B1E1qu9y.js +78 -0
  229. package/components/ohlc-chart-positioning.config-BoWmcM8Y.cjs +20 -0
  230. package/components/ohlc-chart-slots.config-BlsG3ikV.js +68 -0
  231. package/components/parallel-coordinates-plot-options.config-BupZFL8M.js +42 -0
  232. package/components/parallel-coordinates-plot-positioning.config-B3J9h4rQ.js +48 -0
  233. package/components/parallel-coordinates-plot-positioning.config-DCn_VF7d.cjs +20 -0
  234. package/components/parallel-coordinates-plot-slots.config-BX9mYub0.js +46 -0
  235. package/components/period-over-period-condition.const-CLEyEn-5.js +1663 -0
  236. package/components/period-over-period-condition.const-DDgiXIfR.cjs +20 -0
  237. package/components/pivot-table-options.config-BhVQ-skJ.js +245 -0
  238. package/components/pivot-table-positioning.config-DEZdZrYw.js +55 -0
  239. package/components/pivot-table-positioning.config-_a8fijeQ.cjs +20 -0
  240. package/components/pivot-table-slots.config-BpyBX1NS.js +55 -0
  241. package/components/pragmatic-element-adapter-Ply5c6uO.js +1252 -0
  242. package/components/pragmatic-element-adapter-SUClsRR1.cjs +24 -0
  243. package/components/pyramid-chart-options.config-B271YknE.js +260 -0
  244. package/components/pyramid-chart-positioning.config-ChK8059K.cjs +20 -0
  245. package/components/pyramid-chart-positioning.config-tDeNGN2t.js +55 -0
  246. package/components/pyramid-chart-slots.config-B8_Qqs5b.js +50 -0
  247. package/components/radar-chart-options.config-kpK-dF2z.js +150 -0
  248. package/components/radar-chart-positioning.config-BohPnY6O.js +55 -0
  249. package/components/radar-chart-positioning.config-C00q0Cjc.cjs +20 -0
  250. package/components/radar-chart-slots.config-rkMoLc6Z.js +53 -0
  251. package/components/regular-table-options.config-CiITNIRD.js +148 -0
  252. package/components/regular-table-slots.config-BU7B9OGz.js +35 -0
  253. package/components/route-map-options.config-D1A47spF.js +326 -0
  254. package/components/route-map-positioning.config-BFoD9vn8.cjs +20 -0
  255. package/components/route-map-positioning.config-BKdyt6ko.js +66 -0
  256. package/components/route-map-slots.config-v3BZi_k3.js +59 -0
  257. package/components/sankey-diagram-options.config-Cs76JI4R.js +126 -0
  258. package/components/sankey-diagram-positioning.config-QtjnfHQb.js +66 -0
  259. package/components/sankey-diagram-positioning.config-lU-WAy9R.cjs +20 -0
  260. package/components/sankey-diagram-slots.config-C7W-p_iq.js +61 -0
  261. package/components/scatter-plot-options.config-KnuZCIK9.js +322 -0
  262. package/components/scatter-plot-positioning.config-BMx7JzXT.js +77 -0
  263. package/components/scatter-plot-positioning.config-Dl3dC8_q.cjs +20 -0
  264. package/components/scatter-plot-slots.config-e4r8rPGq.js +74 -0
  265. package/components/search-filter-options.config-BAxmEAiE.js +103 -0
  266. package/components/search-filter-slots.config-Bh5AkIlV.js +39 -0
  267. package/components/slicer-filter-options.config-B9G5S-w5.js +235 -0
  268. package/components/slicer-filter-positioning.config-D0ySBKRi.js +48 -0
  269. package/components/slicer-filter-positioning.config-V0xQ7zn4.cjs +20 -0
  270. package/components/slicer-filter-slots.config-ClnjpKoR.js +44 -0
  271. package/components/slider-filter-options.config-pVni2VeP.js +72 -0
  272. package/components/slider-filter-slots.config-C8ndKeOs.js +43 -0
  273. package/components/slot-menu-B18viCq_.js +1056 -0
  274. package/components/slot-menu-I0ZOhAwn.cjs +215 -0
  275. package/components/speedometer-chart-options.config-CRfWCHWe.js +246 -0
  276. package/components/speedometer-chart-positioning.config-Bxh2OpBf.cjs +20 -0
  277. package/components/speedometer-chart-positioning.config-DtvW38X7.js +48 -0
  278. package/components/speedometer-chart-slots.config-BkKyAqra.js +39 -0
  279. package/components/spike-map-options.config-01V52me2.js +413 -0
  280. package/components/spike-map-positioning.config-DkEQ8a85.cjs +20 -0
  281. package/components/spike-map-positioning.config-q0Ko-o6u.js +55 -0
  282. package/components/spike-map-slots.config-Bu63-9ET.js +47 -0
  283. package/components/strip-plot-options.config-CT8sqO2c.js +53 -0
  284. package/components/strip-plot-positioning.config-DFPJ4BKu.cjs +20 -0
  285. package/components/strip-plot-positioning.config-DVCL5TLA.js +48 -0
  286. package/components/strip-plot-slots.config-QBq7bq-Q.js +38 -0
  287. package/components/sunburst-chart-options.config-BIcUx_Ml.js +180 -0
  288. package/components/sunburst-chart-positioning.config--XMbmimi.cjs +20 -0
  289. package/components/sunburst-chart-positioning.config-Dy1GtLwf.js +48 -0
  290. package/components/sunburst-chart-slots.config-BDR8g83g.js +38 -0
  291. package/components/symbol-map-options.config-sY3sR_13.js +177 -0
  292. package/components/symbol-map-positioning.config-CS7s_Zrs.js +55 -0
  293. package/components/symbol-map-positioning.config-Cc_p6btx.cjs +20 -0
  294. package/components/symbol-map-slots.config-BhHW2t4h.js +53 -0
  295. package/components/text-options.config-zV8AxiZ-.js +67 -0
  296. package/components/text-slots.config-CexlYey1.js +24 -0
  297. package/components/treemap-chart-options.config-DaBT0Bud.js +204 -0
  298. package/components/treemap-chart-positioning.config-C6iouW1J.js +55 -0
  299. package/components/treemap-chart-positioning.config-DZ2hZtsF.cjs +20 -0
  300. package/components/treemap-chart-slots.config-vuiywUbz.js +47 -0
  301. package/components/utils/base.cjs +1 -1
  302. package/components/utils/base.js +2 -2
  303. package/components/utils/store.js +1 -1
  304. package/components/utils-5J0VIvk6.cjs +20 -0
  305. package/components/utils-C6ysI98r.js +239 -0
  306. package/components/utils.cjs +1 -1
  307. package/components/utils.js +5 -8
  308. package/components/venn-diagram-options.config-CQIZxPZm.js +24 -0
  309. package/components/venn-diagram-positioning.config-8NrocJLI.cjs +20 -0
  310. package/components/venn-diagram-positioning.config-m2jp6blI.js +55 -0
  311. package/components/venn-diagram-slots.config-VYaBQMGD.js +47 -0
  312. package/components/video-options.config-CvyslCJl.js +127 -0
  313. package/components/video-slots.config-CBtjayTL.js +24 -0
  314. package/components/wordcloud-chart-options.config-B47Oxu0A.js +90 -0
  315. package/components/wordcloud-chart-positioning.config-ClALXn39.js +55 -0
  316. package/components/wordcloud-chart-positioning.config-DGD93axw.cjs +20 -0
  317. package/components/wordcloud-chart-slots.config-CLNtT9m5.js +45 -0
  318. package/custom-elements.json +5916 -16537
  319. package/index.d.ts +0 -24
  320. package/package.json +4 -129
  321. package/react/esm/index.d.ts +2 -27
  322. package/react/esm/index.js +2 -102
  323. package/react/index.ts +2 -102
  324. package/react/luzmo-stub.d.ts +0 -139
  325. package/react/package.json +2 -2
  326. package/types.d.ts +0 -8
  327. package/utils/formula/store/formula-display-store.d.ts +6 -0
  328. package/angular/README.md +0 -40
  329. package/angular/components/ai-chat-empty-state.ts +0 -98
  330. package/angular/components/ai-chat.ts +0 -412
  331. package/angular/components/ai-interaction-textarea.ts +0 -256
  332. package/angular/components/data-field-level.ts +0 -130
  333. package/angular/components/data-field-panel.ts +0 -256
  334. package/angular/components/data-field.ts +0 -130
  335. package/angular/components/data-fields-select.ts +0 -205
  336. package/angular/components/dataset-icon.ts +0 -83
  337. package/angular/components/dataset-selector-list.ts +0 -140
  338. package/angular/components/dataset-selector-row.ts +0 -143
  339. package/angular/components/display-settings-binning.ts +0 -92
  340. package/angular/components/display-settings-datetime.ts +0 -100
  341. package/angular/components/display-settings-grand-totals.ts +0 -92
  342. package/angular/components/display-settings-numeric.ts +0 -113
  343. package/angular/components/display-settings-period-over-period.ts +0 -107
  344. package/angular/components/display-settings.ts +0 -227
  345. package/angular/components/filter-expression-picker.ts +0 -168
  346. package/angular/components/filter-item.ts +0 -160
  347. package/angular/components/filter-parameter-picker.ts +0 -103
  348. package/angular/components/filter-value-picker-datetime.ts +0 -125
  349. package/angular/components/filter-value-picker-hierarchy.ts +0 -146
  350. package/angular/components/filter-value-picker-numeric.ts +0 -146
  351. package/angular/components/filter-value-picker.ts +0 -160
  352. package/angular/components/filters.ts +0 -169
  353. package/angular/components/formula-editor.ts +0 -229
  354. package/angular/components/formula-field.ts +0 -198
  355. package/angular/components/formula.ts +0 -170
  356. package/angular/components/interactive-viz-item.ts +0 -186
  357. package/angular/components/item-grid-item-actions-menu.ts +0 -113
  358. package/angular/components/item-grid.ts +0 -242
  359. package/angular/components/item-option-action-button-group.ts +0 -105
  360. package/angular/components/item-option-color-palette-picker.ts +0 -126
  361. package/angular/components/item-option-color-picker.ts +0 -134
  362. package/angular/components/item-option-color-range.ts +0 -168
  363. package/angular/components/item-option-multi-language-field.ts +0 -133
  364. package/angular/components/item-option-number-field.ts +0 -161
  365. package/angular/components/item-option-panel.ts +0 -149
  366. package/angular/components/item-option-picker.ts +0 -120
  367. package/angular/components/item-option-position-picker.ts +0 -98
  368. package/angular/components/item-option-positions-number-field.ts +0 -140
  369. package/angular/components/item-option-radio-button-group.ts +0 -119
  370. package/angular/components/item-option-slider.ts +0 -126
  371. package/angular/components/item-option-switch.ts +0 -98
  372. package/angular/components/item-option-text-field.ts +0 -112
  373. package/angular/components/item-option.ts +0 -163
  374. package/angular/components/item-slot-drop-panel.ts +0 -236
  375. package/angular/components/item-slot-drop.ts +0 -231
  376. package/angular/components/item-slot-picker-panel.ts +0 -299
  377. package/angular/components/item-slot-picker.ts +0 -241
  378. package/angular/components/slot-menu-list.ts +0 -121
  379. package/angular/components/slot-menu.ts +0 -304
  380. package/angular/components/viz-item-menu.ts +0 -118
  381. package/angular/esm/components/ai-chat-empty-state.d.ts +0 -39
  382. package/angular/esm/components/ai-chat-empty-state.js +0 -99
  383. package/angular/esm/components/ai-chat.d.ts +0 -137
  384. package/angular/esm/components/ai-chat.js +0 -423
  385. package/angular/esm/components/ai-interaction-textarea.d.ts +0 -97
  386. package/angular/esm/components/ai-interaction-textarea.js +0 -273
  387. package/angular/esm/components/data-field-level.d.ts +0 -50
  388. package/angular/esm/components/data-field-level.js +0 -129
  389. package/angular/esm/components/data-field-panel.d.ts +0 -86
  390. package/angular/esm/components/data-field-panel.js +0 -268
  391. package/angular/esm/components/data-field.d.ts +0 -50
  392. package/angular/esm/components/data-field.js +0 -129
  393. package/angular/esm/components/data-fields-select.d.ts +0 -79
  394. package/angular/esm/components/data-fields-select.js +0 -219
  395. package/angular/esm/components/dataset-icon.d.ts +0 -34
  396. package/angular/esm/components/dataset-icon.js +0 -86
  397. package/angular/esm/components/dataset-selector-list.d.ts +0 -53
  398. package/angular/esm/components/dataset-selector-list.js +0 -147
  399. package/angular/esm/components/dataset-selector-row.d.ts +0 -53
  400. package/angular/esm/components/dataset-selector-row.js +0 -145
  401. package/angular/esm/components/display-settings-binning.d.ts +0 -37
  402. package/angular/esm/components/display-settings-binning.js +0 -91
  403. package/angular/esm/components/display-settings-datetime.d.ts +0 -40
  404. package/angular/esm/components/display-settings-datetime.js +0 -99
  405. package/angular/esm/components/display-settings-grand-totals.d.ts +0 -37
  406. package/angular/esm/components/display-settings-grand-totals.js +0 -91
  407. package/angular/esm/components/display-settings-numeric.d.ts +0 -45
  408. package/angular/esm/components/display-settings-numeric.js +0 -115
  409. package/angular/esm/components/display-settings-period-over-period.d.ts +0 -44
  410. package/angular/esm/components/display-settings-period-over-period.js +0 -107
  411. package/angular/esm/components/display-settings.d.ts +0 -83
  412. package/angular/esm/components/display-settings.js +0 -231
  413. package/angular/esm/components/filter-expression-picker.d.ts +0 -64
  414. package/angular/esm/components/filter-expression-picker.js +0 -179
  415. package/angular/esm/components/filter-item.d.ts +0 -57
  416. package/angular/esm/components/filter-item.js +0 -171
  417. package/angular/esm/components/filter-parameter-picker.d.ts +0 -41
  418. package/angular/esm/components/filter-parameter-picker.js +0 -110
  419. package/angular/esm/components/filter-value-picker-datetime.d.ts +0 -47
  420. package/angular/esm/components/filter-value-picker-datetime.js +0 -131
  421. package/angular/esm/components/filter-value-picker-hierarchy.d.ts +0 -53
  422. package/angular/esm/components/filter-value-picker-hierarchy.js +0 -155
  423. package/angular/esm/components/filter-value-picker-numeric.d.ts +0 -53
  424. package/angular/esm/components/filter-value-picker-numeric.js +0 -155
  425. package/angular/esm/components/filter-value-picker.d.ts +0 -57
  426. package/angular/esm/components/filter-value-picker.js +0 -171
  427. package/angular/esm/components/filters.d.ts +0 -61
  428. package/angular/esm/components/filters.js +0 -179
  429. package/angular/esm/components/formula-editor.d.ts +0 -78
  430. package/angular/esm/components/formula-editor.js +0 -236
  431. package/angular/esm/components/formula-field.d.ts +0 -70
  432. package/angular/esm/components/formula-field.js +0 -209
  433. package/angular/esm/components/formula.d.ts +0 -60
  434. package/angular/esm/components/formula.js +0 -177
  435. package/angular/esm/components/interactive-viz-item.d.ts +0 -63
  436. package/angular/esm/components/interactive-viz-item.js +0 -188
  437. package/angular/esm/components/item-grid-item-actions-menu.d.ts +0 -45
  438. package/angular/esm/components/item-grid-item-actions-menu.js +0 -115
  439. package/angular/esm/components/item-grid.d.ts +0 -80
  440. package/angular/esm/components/item-grid.js +0 -245
  441. package/angular/esm/components/item-option-action-button-group.d.ts +0 -41
  442. package/angular/esm/components/item-option-action-button-group.js +0 -107
  443. package/angular/esm/components/item-option-color-palette-picker.d.ts +0 -48
  444. package/angular/esm/components/item-option-color-palette-picker.js +0 -131
  445. package/angular/esm/components/item-option-color-picker.d.ts +0 -51
  446. package/angular/esm/components/item-option-color-picker.js +0 -139
  447. package/angular/esm/components/item-option-color-range.d.ts +0 -66
  448. package/angular/esm/components/item-option-color-range.js +0 -179
  449. package/angular/esm/components/item-option-multi-language-field.d.ts +0 -50
  450. package/angular/esm/components/item-option-multi-language-field.js +0 -139
  451. package/angular/esm/components/item-option-number-field.d.ts +0 -58
  452. package/angular/esm/components/item-option-number-field.js +0 -171
  453. package/angular/esm/components/item-option-panel.d.ts +0 -54
  454. package/angular/esm/components/item-option-panel.js +0 -155
  455. package/angular/esm/components/item-option-picker.d.ts +0 -46
  456. package/angular/esm/components/item-option-picker.js +0 -123
  457. package/angular/esm/components/item-option-position-picker.d.ts +0 -39
  458. package/angular/esm/components/item-option-position-picker.js +0 -99
  459. package/angular/esm/components/item-option-positions-number-field.d.ts +0 -54
  460. package/angular/esm/components/item-option-positions-number-field.js +0 -147
  461. package/angular/esm/components/item-option-radio-button-group.d.ts +0 -45
  462. package/angular/esm/components/item-option-radio-button-group.js +0 -123
  463. package/angular/esm/components/item-option-slider.d.ts +0 -46
  464. package/angular/esm/components/item-option-slider.js +0 -131
  465. package/angular/esm/components/item-option-switch.d.ts +0 -40
  466. package/angular/esm/components/item-option-switch.js +0 -99
  467. package/angular/esm/components/item-option-text-field.d.ts +0 -44
  468. package/angular/esm/components/item-option-text-field.js +0 -115
  469. package/angular/esm/components/item-option.d.ts +0 -58
  470. package/angular/esm/components/item-option.js +0 -171
  471. package/angular/esm/components/item-slot-drop-panel.d.ts +0 -82
  472. package/angular/esm/components/item-slot-drop-panel.js +0 -249
  473. package/angular/esm/components/item-slot-drop.d.ts +0 -77
  474. package/angular/esm/components/item-slot-drop.js +0 -227
  475. package/angular/esm/components/item-slot-picker-panel.d.ts +0 -97
  476. package/angular/esm/components/item-slot-picker-panel.js +0 -309
  477. package/angular/esm/components/item-slot-picker.d.ts +0 -86
  478. package/angular/esm/components/item-slot-picker.js +0 -259
  479. package/angular/esm/components/slot-menu-list.d.ts +0 -46
  480. package/angular/esm/components/slot-menu-list.js +0 -123
  481. package/angular/esm/components/slot-menu.d.ts +0 -104
  482. package/angular/esm/components/slot-menu.js +0 -300
  483. package/angular/esm/components/viz-item-menu.d.ts +0 -42
  484. package/angular/esm/components/viz-item-menu.js +0 -111
  485. package/angular/esm/index.d.ts +0 -107
  486. package/angular/esm/index.js +0 -213
  487. package/angular/index.ts +0 -219
  488. package/angular/package.json +0 -40
  489. package/angular/tsconfig.json +0 -36
  490. package/angular/type-fallbacks.d.ts +0 -0
  491. package/angular/utils/ai-prompt/attachments.d.ts +0 -10
  492. package/angular/utils/ai-prompt/dictation.d.ts +0 -50
  493. package/angular/utils/ai-prompt/image-upload.d.ts +0 -12
  494. package/angular/utils/ai-prompt/index.d.ts +0 -6
  495. package/angular/utils/ai-prompt/tests/attachments.test.d.ts +0 -1
  496. package/angular/utils/ai-prompt/tests/dictation.test.d.ts +0 -1
  497. package/angular/utils/ai-prompt/tests/image-upload.test.d.ts +0 -1
  498. package/angular/utils/base/base.d.ts +0 -16
  499. package/angular/utils/base/focus-visible.d.ts +0 -29
  500. package/angular/utils/base/focusable.d.ts +0 -58
  501. package/angular/utils/base/index.d.ts +0 -5
  502. package/angular/utils/base/localized-mixin.d.ts +0 -22
  503. package/angular/utils/base/sized-mixin.d.ts +0 -17
  504. package/angular/utils/color/color-palettes.d.ts +0 -17
  505. package/angular/utils/color/extrapolate-color.d.ts +0 -1
  506. package/angular/utils/data/load-data-fields-for-datasets.d.ts +0 -22
  507. package/angular/utils/data-broker/index.d.ts +0 -257
  508. package/angular/utils/data-field-types/calculate-data-field-icon.d.ts +0 -12
  509. package/angular/utils/data-field-types/default-acceptable-data-field-types.d.ts +0 -1
  510. package/angular/utils/data-field-types/tests/calculate-data-field-icon.test.d.ts +0 -1
  511. package/angular/utils/drag/draggable.d.ts +0 -13
  512. package/angular/utils/drag/pragmatic-element-adapter.d.ts +0 -2
  513. package/angular/utils/drag/tests/pragmatic-element-adapter.first-import.test.d.ts +0 -1
  514. package/angular/utils/drag/tests/pragmatic-element-adapter.test.d.ts +0 -1
  515. package/angular/utils/filters/expressions.d.ts +0 -15
  516. package/angular/utils/filters/index.d.ts +0 -1
  517. package/angular/utils/formatter/calculate-duration.d.ts +0 -2
  518. package/angular/utils/formatter/decompose-numeric-format.d.ts +0 -11
  519. package/angular/utils/formatter/default-local-formats.d.ts +0 -20
  520. package/angular/utils/formatter/formats/cs.d.ts +0 -20
  521. package/angular/utils/formatter/formats/da.d.ts +0 -20
  522. package/angular/utils/formatter/formats/de.d.ts +0 -21
  523. package/angular/utils/formatter/formats/en-GB.d.ts +0 -21
  524. package/angular/utils/formatter/formats/en-US.d.ts +0 -1
  525. package/angular/utils/formatter/formats/en.d.ts +0 -1
  526. package/angular/utils/formatter/formats/es.d.ts +0 -54
  527. package/angular/utils/formatter/formats/fi.d.ts +0 -20
  528. package/angular/utils/formatter/formats/fr.d.ts +0 -54
  529. package/angular/utils/formatter/formats/he.d.ts +0 -20
  530. package/angular/utils/formatter/formats/hu.d.ts +0 -20
  531. package/angular/utils/formatter/formats/it.d.ts +0 -54
  532. package/angular/utils/formatter/formats/ja.d.ts +0 -20
  533. package/angular/utils/formatter/formats/ko.d.ts +0 -20
  534. package/angular/utils/formatter/formats/mk.d.ts +0 -20
  535. package/angular/utils/formatter/formats/nl.d.ts +0 -21
  536. package/angular/utils/formatter/formats/no.d.ts +0 -21
  537. package/angular/utils/formatter/formats/pl.d.ts +0 -20
  538. package/angular/utils/formatter/formats/pt.d.ts +0 -20
  539. package/angular/utils/formatter/formats/ru.d.ts +0 -20
  540. package/angular/utils/formatter/formats/sv.d.ts +0 -20
  541. package/angular/utils/formatter/formats/tr.d.ts +0 -21
  542. package/angular/utils/formatter/formats/zh-CN.d.ts +0 -20
  543. package/angular/utils/formatter/formats/zh-TW.d.ts +0 -20
  544. package/angular/utils/formatter/formatter.d.ts +0 -9
  545. package/angular/utils/formatter/get-dataset-name.d.ts +0 -2
  546. package/angular/utils/formatter/localize.d.ts +0 -3
  547. package/angular/utils/formatter/smart-datetime-formats.const.d.ts +0 -36
  548. package/angular/utils/formatter/tests/calculate-duration.test.d.ts +0 -1
  549. package/angular/utils/formatter/tests/decompose-numeric-format.test.d.ts +0 -1
  550. package/angular/utils/formatter/tests/default-local-formats.test.d.ts +0 -1
  551. package/angular/utils/formatter/tests/formatter.test.d.ts +0 -1
  552. package/angular/utils/formatter/tests/localize.test.d.ts +0 -1
  553. package/angular/utils/formula/base/formula-base.d.ts +0 -117
  554. package/angular/utils/formula/base/formula-input-base.d.ts +0 -62
  555. package/angular/utils/formula/codemirror/actions.d.ts +0 -47
  556. package/angular/utils/formula/codemirror/drop-cursor.d.ts +0 -15
  557. package/angular/utils/formula/codemirror/icon-element.d.ts +0 -7
  558. package/angular/utils/formula/codemirror/parser.d.ts +0 -16
  559. package/angular/utils/formula/codemirror/tests/actions.test.d.ts +0 -1
  560. package/angular/utils/formula/codemirror/theme.d.ts +0 -20
  561. package/angular/utils/formula/codemirror/widget.d.ts +0 -18
  562. package/angular/utils/formula/config/aggregations.d.ts +0 -9
  563. package/angular/utils/formula/config/build-datasets.d.ts +0 -10
  564. package/angular/utils/formula/config/expression-helpers.d.ts +0 -42
  565. package/angular/utils/formula/config/functions.d.ts +0 -3
  566. package/angular/utils/formula/config/groupings.d.ts +0 -9
  567. package/angular/utils/formula/config/regex.d.ts +0 -39
  568. package/angular/utils/formula/config/resolve-column-presentation.d.ts +0 -19
  569. package/angular/utils/formula/config/tests/build-datasets.test.d.ts +0 -1
  570. package/angular/utils/formula/config/validate-expression.d.ts +0 -19
  571. package/angular/utils/formula/load-formula-codemirror.d.ts +0 -4
  572. package/angular/utils/formula/render-explanation-tooltip.d.ts +0 -7
  573. package/angular/utils/formula/store/formula-display-store.d.ts +0 -87
  574. package/angular/utils/formula/store/formula-editor-context.d.ts +0 -8
  575. package/angular/utils/formula/store/formula-editor-store.d.ts +0 -46
  576. package/angular/utils/formula/store/tests/formula-editor-store.test.d.ts +0 -1
  577. package/angular/utils/formula/tests/validate-expression.test.d.ts +0 -1
  578. package/angular/utils/get-css-variable.d.ts +0 -1
  579. package/angular/utils/index.d.ts +0 -10
  580. package/angular/utils/localize/set-locale.d.ts +0 -7
  581. package/angular/utils/map-tile-providers/index.d.ts +0 -93
  582. package/angular/utils/slot-content/ad-hoc-slot-content.d.ts +0 -7
  583. package/angular/utils/slot-content/render-calculation-label.d.ts +0 -7
  584. package/angular/utils/slot-content/tests/ad-hoc-slot-content.test.d.ts +0 -1
  585. package/angular/utils/slot-state/slot-context.d.ts +0 -4
  586. package/angular/utils/slot-state/slot-store.d.ts +0 -39
  587. package/angular/utils/store/base-store.d.ts +0 -162
  588. package/angular/utils/store/dashboard-store.d.ts +0 -49
  589. package/angular/utils/store/index.d.ts +0 -135
  590. package/angular/utils/store/item-store.d.ts +0 -33
  591. package/angular/utils/store/store-registry.d.ts +0 -170
  592. package/angular/utils/store/tests/dashboard-store.test.d.ts +0 -1
  593. package/angular/utils/store/tests/item-store.test.d.ts +0 -1
  594. package/angular/utils/store/tests/store-registry.test.d.ts +0 -1
  595. package/angular/utils/store/types.d.ts +0 -270
  596. package/angular/utils/switch-item/index.d.ts +0 -34
  597. package/angular/utils/switch-item/slot-role-classification.d.ts +0 -31
  598. package/angular/utils/switch-item/stories/switch-item.stories.d.ts +0 -17
  599. package/angular/utils/switch-item/tests/slot-role-classification.test.d.ts +0 -1
  600. package/angular/utils/switch-item/tests/switch-item.test.d.ts +0 -1
  601. package/angular/utils/themes/bliss.d.ts +0 -2
  602. package/angular/utils/themes/classic-dark.d.ts +0 -2
  603. package/angular/utils/themes/classic.d.ts +0 -2
  604. package/angular/utils/themes/default-dark.d.ts +0 -2
  605. package/angular/utils/themes/default.d.ts +0 -2
  606. package/angular/utils/themes/index.d.ts +0 -4
  607. package/angular/utils/themes/orion.d.ts +0 -2
  608. package/angular/utils/themes/pinky.d.ts +0 -2
  609. package/angular/utils/themes/radiant.d.ts +0 -2
  610. package/angular/utils/themes/royale.d.ts +0 -2
  611. package/angular/utils/themes/seasonal.d.ts +0 -2
  612. package/angular/utils/themes/urban.d.ts +0 -2
  613. package/angular/utils/themes/vivid.d.ts +0 -2
  614. package/angular/utils/time/formats.const.d.ts +0 -4
  615. package/angular/utils/time/period-over-period-condition.const.d.ts +0 -8
  616. package/angular/utils/time/periods.const.d.ts +0 -15
  617. package/angular/utils/timezone/datetime-timezone.d.ts +0 -25
  618. package/angular/utils/timezone/tests/datetime-timezone.test.d.ts +0 -1
  619. package/angular/utils/transformations/convert-data-field-to-slot-content.d.ts +0 -9
  620. package/angular/utils/transformations/convert-datasets-to-data-fields.d.ts +0 -30
  621. package/angular/utils/transformations/tests/convert-data-field-to-slot-content.test.d.ts +0 -1
  622. package/angular/utils/transformations/tests/convert-datasets-to-data-fields.test.d.ts +0 -1
  623. package/angular/utils/types/tests/type-check.test.d.ts +0 -1
  624. package/angular/utils/types/type-check.d.ts +0 -28
  625. package/components/ad-hoc-slot-content-BwcFfXCV.cjs +0 -20
  626. package/components/ad-hoc-slot-content-hSlT62VS.js +0 -29
  627. package/components/ai-chat/ai-chat-events.d.ts +0 -123
  628. package/components/ai-chat/ai-chat-request.d.ts +0 -20
  629. package/components/ai-chat/ai-chat.d.ts +0 -318
  630. package/components/ai-chat/ai-prompt-types.d.ts +0 -118
  631. package/components/ai-chat/empty-state/ai-chat-empty-state.d.ts +0 -46
  632. package/components/ai-chat/empty-state/index.d.ts +0 -8
  633. package/components/ai-chat/empty-state/types.d.ts +0 -14
  634. package/components/ai-chat/index.cjs +0 -20
  635. package/components/ai-chat/index.d.ts +0 -23
  636. package/components/ai-chat/index.js +0 -29
  637. package/components/ai-chat/session/ai-chat-session-controller.d.ts +0 -57
  638. package/components/ai-chat/session/ai-chat-session-types.d.ts +0 -101
  639. package/components/ai-chat/session/ai-chat-session.d.ts +0 -102
  640. package/components/ai-chat/session/index.d.ts +0 -2
  641. package/components/ai-chat/stream/chunk-extractors.d.ts +0 -27
  642. package/components/ai-chat/stream/index.d.ts +0 -52
  643. package/components/ai-chat/stream/progress.d.ts +0 -3
  644. package/components/ai-chat/stream/registry.d.ts +0 -6
  645. package/components/ai-chat/stream/stream-processor.d.ts +0 -2
  646. package/components/ai-chat/stream/transport.d.ts +0 -26
  647. package/components/ai-chat/stream/types.d.ts +0 -55
  648. package/components/ai-chat-BtQaM37y.js +0 -3998
  649. package/components/ai-chat-CBLWbv9C.cjs +0 -319
  650. package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +0 -212
  651. package/components/ai-interaction-textarea/index.cjs +0 -20
  652. package/components/ai-interaction-textarea/index.d.ts +0 -8
  653. package/components/ai-interaction-textarea/index.js +0 -28
  654. package/components/ai-interaction-textarea/types.d.ts +0 -10
  655. package/components/ai-interaction-textarea-Bgd3y_cP.js +0 -785
  656. package/components/ai-interaction-textarea-CQBP9-DW.cjs +0 -93
  657. package/components/area-chart-options.config-Dc4P64YS.js +0 -229
  658. package/components/area-chart-positioning.config-1YVSxjRa.cjs +0 -20
  659. package/components/area-chart-positioning.config-QGEo5sr-.js +0 -55
  660. package/components/area-chart-slots.config-DdPO34_g.js +0 -55
  661. package/components/bar-chart-options.config-B7tknpxM.js +0 -300
  662. package/components/bar-chart-positioning.config-Cs56EAWY.cjs +0 -20
  663. package/components/bar-chart-positioning.config-KLzBnoCu.js +0 -59
  664. package/components/bar-chart-slots.config-BnbZRLIr.js +0 -50
  665. package/components/base-DMQUzJ4L.js +0 -249
  666. package/components/base-DRFleWoz.cjs +0 -20
  667. package/components/box-plot-options.config-D6Wvmx36.js +0 -356
  668. package/components/box-plot-positioning.config-BpDEb4Uo.cjs +0 -20
  669. package/components/box-plot-positioning.config-DKGY1Qqb.js +0 -48
  670. package/components/box-plot-slots.config-D6F2R2dw.js +0 -40
  671. package/components/bubble-chart-options.config-CDY6pFK6.js +0 -135
  672. package/components/bubble-chart-positioning.config-BZsvCSyT.cjs +0 -20
  673. package/components/bubble-chart-positioning.config-CL3mDsC-.js +0 -55
  674. package/components/bubble-chart-slots.config-BJdtdpS0.js +0 -47
  675. package/components/bullet-chart-options.config-B4vBSWrH.js +0 -75
  676. package/components/bullet-chart-positioning.config-DA-1zmsD.cjs +0 -20
  677. package/components/bullet-chart-positioning.config-DxXEGnbz.js +0 -56
  678. package/components/bullet-chart-slots.config-NeUTKgYI.js +0 -46
  679. package/components/choropleth-map-options.config-6-xaMCeR.js +0 -348
  680. package/components/choropleth-map-positioning.config-BicHLfN0.js +0 -55
  681. package/components/choropleth-map-positioning.config-D_1MCD5i.cjs +0 -20
  682. package/components/choropleth-map-slots.config-BbBwTeuw.js +0 -53
  683. package/components/circle-pack-chart-options.config-DWkyGqA_.js +0 -54
  684. package/components/circle-pack-chart-positioning.config-a_vo4VFg.js +0 -48
  685. package/components/circle-pack-chart-positioning.config-oTUkvFFJ.cjs +0 -20
  686. package/components/circle-pack-chart-slots.config-CJFjalBn.js +0 -38
  687. package/components/circular-gauge-options.config-D_xHWhBy.js +0 -188
  688. package/components/circular-gauge-positioning.config-BEM85XhO.js +0 -48
  689. package/components/circular-gauge-positioning.config-TG1wPyHz.cjs +0 -20
  690. package/components/circular-gauge-slots.config-DAKsa5Hq.js +0 -39
  691. package/components/column-chart-options.config-B_a7iN-c.js +0 -299
  692. package/components/column-chart-positioning.config-D1kXKreT.cjs +0 -20
  693. package/components/column-chart-positioning.config-x-wEIoTZ.js +0 -55
  694. package/components/column-chart-slots.config-Bpr-WaCi.js +0 -50
  695. package/components/combination-chart-options.config-l4szBpws.js +0 -150
  696. package/components/combination-chart-positioning.config-COksdK7F.cjs +0 -20
  697. package/components/combination-chart-positioning.config-DLyPa1Im.js +0 -48
  698. package/components/combination-chart-slots.config-u-QLoQQ-.js +0 -43
  699. package/components/conditional-number-options.config-DB4_BYN2.js +0 -205
  700. package/components/conditional-number-positioning.config-5SBhp4Kh.cjs +0 -20
  701. package/components/conditional-number-positioning.config-6ZQHIgAA.js +0 -48
  702. package/components/conditional-number-slots.config-CiLUXRSe.js +0 -39
  703. package/components/convert-data-field-to-slot-content-C6IIqU7G.js +0 -53
  704. package/components/convert-data-field-to-slot-content-DLzkk6dT.cjs +0 -20
  705. package/components/convert-datasets-to-data-fields-B13rl1an.cjs +0 -20
  706. package/components/convert-datasets-to-data-fields-PmQzeVLG.js +0 -68
  707. package/components/data-field-D050EJkx.cjs +0 -54
  708. package/components/data-field-D1lrRnLX.js +0 -121
  709. package/components/data-field-level/data-field-level.d.ts +0 -40
  710. package/components/data-field-level/helpers/generate-preview.d.ts +0 -9
  711. package/components/data-field-level/index.cjs +0 -20
  712. package/components/data-field-level/index.d.ts +0 -8
  713. package/components/data-field-level/index.js +0 -28
  714. package/components/data-field-level-CKlijSjc.cjs +0 -55
  715. package/components/data-field-level-Da8Pwva2.js +0 -247
  716. package/components/data-field-panel-47PGrrIi.cjs +0 -87
  717. package/components/data-field-panel-CgqJ1bLg.js +0 -385
  718. package/components/data-fields-select/data-fields-select.d.ts +0 -127
  719. package/components/data-fields-select/index.cjs +0 -20
  720. package/components/data-fields-select/index.d.ts +0 -9
  721. package/components/data-fields-select/index.js +0 -28
  722. package/components/data-fields-select/types.d.ts +0 -4
  723. package/components/data-fields-select-B40TXGd7.js +0 -262
  724. package/components/data-fields-select-CQVqxMCS.cjs +0 -41
  725. package/components/dataset-icon/dataset-icon.d.ts +0 -45
  726. package/components/dataset-icon/index.cjs +0 -20
  727. package/components/dataset-icon/index.d.ts +0 -8
  728. package/components/dataset-icon/index.js +0 -28
  729. package/components/dataset-icon/types.d.ts +0 -11
  730. package/components/dataset-icon-BAV0S4sZ.cjs +0 -64
  731. package/components/dataset-icon-CWT5Ju8w.js +0 -125
  732. package/components/dataset-selector-list/dataset-selector-list.d.ts +0 -102
  733. package/components/dataset-selector-list/index.cjs +0 -20
  734. package/components/dataset-selector-list/index.d.ts +0 -8
  735. package/components/dataset-selector-list/index.js +0 -28
  736. package/components/dataset-selector-list-C0dheupb.js +0 -313
  737. package/components/dataset-selector-list-CKQ7OgMN.cjs +0 -75
  738. package/components/dataset-selector-row/dataset-selector-row.d.ts +0 -89
  739. package/components/dataset-selector-row/index.cjs +0 -20
  740. package/components/dataset-selector-row/index.d.ts +0 -8
  741. package/components/dataset-selector-row/index.js +0 -28
  742. package/components/dataset-selector-row-DP6QUWYs.js +0 -273
  743. package/components/dataset-selector-row-_FZPTBE1.cjs +0 -79
  744. package/components/date-comparison-filter-options.config-BSzzAJPM.js +0 -126
  745. package/components/date-comparison-filter-slots.config-Cvze969w.js +0 -33
  746. package/components/date-filter-options.config-C6VvDjd8.js +0 -118
  747. package/components/date-filter-slots.config-Y8hmQh0S.js +0 -37
  748. package/components/decompose-numeric-format-DGJua3rU.cjs +0 -20
  749. package/components/decompose-numeric-format-DS0j2wa1.js +0 -36
  750. package/components/decorate-DCJt-2rt.cjs +0 -20
  751. package/components/decorate-DyMgX_Uh.js +0 -28
  752. package/components/display-settings/display-settings.d.ts +0 -117
  753. package/components/display-settings/index.cjs +0 -20
  754. package/components/display-settings/index.d.ts +0 -8
  755. package/components/display-settings/index.js +0 -28
  756. package/components/display-settings/types.d.ts +0 -9
  757. package/components/display-settings-1AdcENcv.cjs +0 -140
  758. package/components/display-settings-B-eamVdN.js +0 -313
  759. package/components/display-settings-binning/display-settings-binning.d.ts +0 -32
  760. package/components/display-settings-binning/index.cjs +0 -20
  761. package/components/display-settings-binning/index.d.ts +0 -8
  762. package/components/display-settings-binning/index.js +0 -28
  763. package/components/display-settings-binning-BGtp0Wvl.js +0 -110
  764. package/components/display-settings-binning-Cs8MS7BY.cjs +0 -56
  765. package/components/display-settings-datetime/display-settings-datetime.d.ts +0 -86
  766. package/components/display-settings-datetime/index.cjs +0 -20
  767. package/components/display-settings-datetime/index.d.ts +0 -8
  768. package/components/display-settings-datetime/index.js +0 -28
  769. package/components/display-settings-datetime-CbTnG486.js +0 -413
  770. package/components/display-settings-datetime-q20qbrOL.cjs +0 -217
  771. package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +0 -29
  772. package/components/display-settings-grand-totals/index.cjs +0 -20
  773. package/components/display-settings-grand-totals/index.d.ts +0 -8
  774. package/components/display-settings-grand-totals/index.js +0 -28
  775. package/components/display-settings-grand-totals-BDeeC6-h.js +0 -89
  776. package/components/display-settings-grand-totals-DdEXs_mA.cjs +0 -44
  777. package/components/display-settings-numeric/display-settings-numeric.d.ts +0 -82
  778. package/components/display-settings-numeric/helpers/constants.d.ts +0 -19
  779. package/components/display-settings-numeric/index.cjs +0 -20
  780. package/components/display-settings-numeric/index.d.ts +0 -8
  781. package/components/display-settings-numeric/index.js +0 -28
  782. package/components/display-settings-numeric-C5FlahN_.js +0 -479
  783. package/components/display-settings-numeric-PtcxP80Z.cjs +0 -190
  784. package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +0 -68
  785. package/components/display-settings-period-over-period/helpers/constants.d.ts +0 -44
  786. package/components/display-settings-period-over-period/index.cjs +0 -20
  787. package/components/display-settings-period-over-period/index.d.ts +0 -8
  788. package/components/display-settings-period-over-period/index.js +0 -28
  789. package/components/display-settings-period-over-period-CUlsSQZv.js +0 -433
  790. package/components/display-settings-period-over-period-Csv7Kwri.cjs +0 -229
  791. package/components/donut-chart-options.config-CjtEDiJI.js +0 -207
  792. package/components/donut-chart-positioning.config-EudGY45O.js +0 -48
  793. package/components/donut-chart-positioning.config-m_uVKoNn.cjs +0 -20
  794. package/components/donut-chart-slots.config-DilGk7ju.js +0 -39
  795. package/components/dropdown-filter-options.config-DFJKns3l.js +0 -153
  796. package/components/dropdown-filter-slots.config-7heZtoEY.js +0 -38
  797. package/components/en-CcLhGxIh.js +0 -21
  798. package/components/en-GB-DzkdeUQh.js +0 -28
  799. package/components/en-GB-uxY5qmIM.cjs +0 -20
  800. package/components/en-US-CcLhGxIh.js +0 -21
  801. package/components/en-US-q_Ruzags.cjs +0 -20
  802. package/components/en-q_Ruzags.cjs +0 -20
  803. package/components/evolution-number-options.config-C3tU650w.js +0 -228
  804. package/components/evolution-number-positioning.config-BcLsEydB.js +0 -48
  805. package/components/evolution-number-positioning.config-CJii0q3V.cjs +0 -20
  806. package/components/evolution-number-slots.config-noZzIHkT.js +0 -37
  807. package/components/filter-expression-picker/filter-expression-picker.d.ts +0 -73
  808. package/components/filter-expression-picker/index.cjs +0 -20
  809. package/components/filter-expression-picker/index.d.ts +0 -7
  810. package/components/filter-expression-picker/index.js +0 -28
  811. package/components/filter-expression-picker-D28THjzU.cjs +0 -38
  812. package/components/filter-expression-picker-nW1Hff7C.js +0 -425
  813. package/components/filter-item/filter-item.d.ts +0 -84
  814. package/components/filter-item/index.cjs +0 -20
  815. package/components/filter-item/index.d.ts +0 -7
  816. package/components/filter-item/index.js +0 -28
  817. package/components/filter-item-BirgEXGE.cjs +0 -58
  818. package/components/filter-item-BoYKU9tK.js +0 -242
  819. package/components/filter-parameter-picker/filter-parameter-picker.d.ts +0 -25
  820. package/components/filter-parameter-picker/index.cjs +0 -22
  821. package/components/filter-parameter-picker/index.d.ts +0 -7
  822. package/components/filter-parameter-picker/index.js +0 -58
  823. package/components/filter-value-picker/filter-value-picker.d.ts +0 -65
  824. package/components/filter-value-picker/index.cjs +0 -20
  825. package/components/filter-value-picker/index.d.ts +0 -7
  826. package/components/filter-value-picker/index.js +0 -28
  827. package/components/filter-value-picker-1kMJ9slB.js +0 -151
  828. package/components/filter-value-picker-D08bAAKt.cjs +0 -60
  829. package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +0 -42
  830. package/components/filter-value-picker-datetime/index.cjs +0 -20
  831. package/components/filter-value-picker-datetime/index.d.ts +0 -7
  832. package/components/filter-value-picker-datetime/index.js +0 -28
  833. package/components/filter-value-picker-datetime-Cnwlipah.js +0 -139
  834. package/components/filter-value-picker-datetime-OIgFSdU2.cjs +0 -42
  835. package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +0 -81
  836. package/components/filter-value-picker-hierarchy/index.cjs +0 -20
  837. package/components/filter-value-picker-hierarchy/index.d.ts +0 -7
  838. package/components/filter-value-picker-hierarchy/index.js +0 -28
  839. package/components/filter-value-picker-hierarchy-BGgHIji-.cjs +0 -47
  840. package/components/filter-value-picker-hierarchy-DdMLbCO3.js +0 -232
  841. package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +0 -82
  842. package/components/filter-value-picker-numeric/index.cjs +0 -20
  843. package/components/filter-value-picker-numeric/index.d.ts +0 -7
  844. package/components/filter-value-picker-numeric/index.js +0 -28
  845. package/components/filter-value-picker-numeric-BL2gD2ED.cjs +0 -48
  846. package/components/filter-value-picker-numeric-BqrsENh6.js +0 -219
  847. package/components/filters-BLss6wBx.js +0 -407
  848. package/components/filters-rjc5xsF_.cjs +0 -150
  849. package/components/formatter-BeXmurVe.cjs +0 -20
  850. package/components/formatter-Cq5dFCyU.js +0 -1473
  851. package/components/formula-CNzBOTRQ.js +0 -138
  852. package/components/formula-DeRjtboJ.cjs +0 -45
  853. package/components/formula-codemirror/formula-codemirror.d.ts +0 -79
  854. package/components/formula-codemirror/index.d.ts +0 -7
  855. package/components/formula-codemirror/pills/formula-aggregation/formula-aggregation.d.ts +0 -125
  856. package/components/formula-codemirror/pills/formula-aggregation/index.d.ts +0 -7
  857. package/components/formula-codemirror/pills/formula-empty-argument-pill/formula-empty-argument-pill.d.ts +0 -28
  858. package/components/formula-codemirror/pills/formula-empty-argument-pill/index.d.ts +0 -7
  859. package/components/formula-codemirror/pills/formula-include-exclude-panel.d.ts +0 -38
  860. package/components/formula-codemirror-D1hgPIW_.cjs +0 -215
  861. package/components/formula-codemirror-pnijOvXU.js +0 -12018
  862. package/components/formula-display-store-BBMmHCRp.js +0 -1090
  863. package/components/formula-display-store-Dn7r5kK8.cjs +0 -20
  864. package/components/formula-draggable-field/formula-draggable-field.d.ts +0 -53
  865. package/components/formula-draggable-field/index.d.ts +0 -8
  866. package/components/formula-draggable-field/types.d.ts +0 -24
  867. package/components/formula-editor-DvDB6JYI.js +0 -690
  868. package/components/formula-editor-Uejdzkm6.cjs +0 -224
  869. package/components/formula-field/formula-field.d.ts +0 -20
  870. package/components/formula-field/index.cjs +0 -20
  871. package/components/formula-field/index.d.ts +0 -7
  872. package/components/formula-field/index.js +0 -28
  873. package/components/formula-field-CNyKz9wY.cjs +0 -20
  874. package/components/formula-field-o_zZQACN.js +0 -40
  875. package/components/formula-input-base-DlVNZBUA.js +0 -236
  876. package/components/formula-input-base-fTF1KXpl.cjs +0 -49
  877. package/components/funnel-chart-options.config-6ifTq7Xh.js +0 -207
  878. package/components/funnel-chart-positioning.config-B_C8nr1y.js +0 -48
  879. package/components/funnel-chart-positioning.config-DhrMsuyt.cjs +0 -20
  880. package/components/funnel-chart-slots.config-BWszdEe8.js +0 -43
  881. package/components/get-css-variable-B8sJUuig.cjs +0 -20
  882. package/components/get-css-variable-r1spgqX0.js +0 -63
  883. package/components/get-dataset-name-DYLJB67F.js +0 -27
  884. package/components/get-dataset-name-DrTVBElb.cjs +0 -20
  885. package/components/groupings-BPlu4GFe.cjs +0 -20
  886. package/components/groupings-DAj2iFeA.js +0 -52
  887. package/components/heat-map-options.config-CezceVM3.js +0 -224
  888. package/components/heat-map-positioning.config-Bya2_TR8.cjs +0 -20
  889. package/components/heat-map-positioning.config-Cxembqle.js +0 -48
  890. package/components/heat-map-slots.config-Cwun49Qb.js +0 -37
  891. package/components/heat-table-options.config-C7kvRE10.js +0 -372
  892. package/components/heat-table-positioning.config-CNeTnuHy.js +0 -55
  893. package/components/heat-table-positioning.config-CYZr5ksc.cjs +0 -20
  894. package/components/heat-table-slots.config-nGB_B2mh.js +0 -49
  895. package/components/hexbin-map-options.config-8brGMkt_.js +0 -276
  896. package/components/hexbin-map-positioning.config-Dfdgub0y.js +0 -48
  897. package/components/hexbin-map-positioning.config-bXZEY4nP.cjs +0 -20
  898. package/components/hexbin-map-slots.config-BK-ftozd.js +0 -37
  899. package/components/image-options.config-Cz55iN7J.js +0 -153
  900. package/components/image-slots.config-kvHutBFK.js +0 -24
  901. package/components/interactive-viz-item/helpers/chart-helpers.d.ts +0 -7
  902. package/components/interactive-viz-item/index.cjs +0 -20
  903. package/components/interactive-viz-item/index.d.ts +0 -10
  904. package/components/interactive-viz-item/index.js +0 -28
  905. package/components/interactive-viz-item/interactive-viz-item.d.ts +0 -96
  906. package/components/interactive-viz-item/types.d.ts +0 -117
  907. package/components/interactive-viz-item-C3fzZq7j.js +0 -693
  908. package/components/interactive-viz-item-D-hR2G5x.cjs +0 -247
  909. package/components/item-grid-BruAZOla.cjs +0 -113
  910. package/components/item-grid-cyMiRw7P.js +0 -4559
  911. package/components/item-menu/item-list/item-list.d.ts +0 -37
  912. package/components/item-option-BclNWwdZ.cjs +0 -252
  913. package/components/item-option-CZb01VJb.js +0 -919
  914. package/components/item-option-action-button-group-AkMaJHuv.cjs +0 -53
  915. package/components/item-option-action-button-group-HfUtaTi9.js +0 -118
  916. package/components/item-option-base/item-option-base.d.ts +0 -23
  917. package/components/item-option-base-CZegYACf.cjs +0 -56
  918. package/components/item-option-base-DlHZAfWZ.js +0 -123
  919. package/components/item-option-color-palette-picker-B336qQRk.cjs +0 -40
  920. package/components/item-option-color-palette-picker-Dt4z0c4W.js +0 -2041
  921. package/components/item-option-color-picker-BRO416_T.js +0 -87
  922. package/components/item-option-color-picker-Hfu2fhRF.cjs +0 -34
  923. package/components/item-option-color-range-DWoaz57E.cjs +0 -98
  924. package/components/item-option-color-range-DgalNZ9b.js +0 -220
  925. package/components/item-option-multi-language-field-BvJXIFgu.js +0 -82
  926. package/components/item-option-multi-language-field-IQP6fbgB.cjs +0 -33
  927. package/components/item-option-number-field-B07NhNSm.cjs +0 -38
  928. package/components/item-option-number-field-CvGknDpu.js +0 -102
  929. package/components/item-option-panel-BWP9E8cW.cjs +0 -67
  930. package/components/item-option-panel-RYdx8Hfk.js +0 -183
  931. package/components/item-option-picker-C7SZfnLP.cjs +0 -37
  932. package/components/item-option-picker-DM1pU3w9.js +0 -77
  933. package/components/item-option-position-picker-BuDvx3SX.js +0 -117
  934. package/components/item-option-position-picker-M9CBH9NE.cjs +0 -32
  935. package/components/item-option-positions-number-field-C4zW5-Hc.cjs +0 -49
  936. package/components/item-option-positions-number-field-RN5AG-Ic.js +0 -164
  937. package/components/item-option-radio-button-group-Ce780UyR.js +0 -74
  938. package/components/item-option-radio-button-group-DRiwqorh.cjs +0 -37
  939. package/components/item-option-slider-BUdWMAzT.js +0 -81
  940. package/components/item-option-slider-CycHQFnr.cjs +0 -33
  941. package/components/item-option-switch-CM5R8wO_.cjs +0 -30
  942. package/components/item-option-switch-CvcZSytb.js +0 -69
  943. package/components/item-option-text-field-BZjOilSu.cjs +0 -33
  944. package/components/item-option-text-field-CyuYUITv.js +0 -80
  945. package/components/item-slot-drop-C6DO5mPk.js +0 -331
  946. package/components/item-slot-drop-CrzFRobc.cjs +0 -91
  947. package/components/item-slot-drop-panel-ChazcNSe.cjs +0 -57
  948. package/components/item-slot-drop-panel-DvmPk1pJ.js +0 -355
  949. package/components/item-slot-picker-CmG71mGy.js +0 -505
  950. package/components/item-slot-picker-DQkG3Lt7.cjs +0 -174
  951. package/components/item-slot-picker-panel-Bi2jXvQA.cjs +0 -81
  952. package/components/item-slot-picker-panel-DmGYI5YI.js +0 -448
  953. package/components/line-chart-options.config-OeRMkKMP.js +0 -248
  954. package/components/line-chart-positioning.config-CFHFq0wp.js +0 -55
  955. package/components/line-chart-positioning.config-Cqnfz4Lc.cjs +0 -20
  956. package/components/line-chart-slots.config-C6LEwEwh.js +0 -55
  957. package/components/load-data-fields-for-datasets-BNnr8x3m.js +0 -42
  958. package/components/load-data-fields-for-datasets-CW4Voiex.cjs +0 -20
  959. package/components/localized-mixin-B4fDdsF0.js +0 -45
  960. package/components/localized-mixin-CUuRZu9t.cjs +0 -20
  961. package/components/marker-map-options.config-CtW7nl1C.js +0 -117
  962. package/components/marker-map-positioning.config-BM-ZrmE9.cjs +0 -20
  963. package/components/marker-map-positioning.config-x3KUsgzD.js +0 -48
  964. package/components/marker-map-slots.config-Cyk-QFPT.js +0 -37
  965. package/components/ohlc-chart-options.config-Db40TXcB.js +0 -124
  966. package/components/ohlc-chart-positioning.config-C-vx6lt-.js +0 -78
  967. package/components/ohlc-chart-positioning.config-SIhJhFel.cjs +0 -20
  968. package/components/ohlc-chart-slots.config-CQFi8BIT.js +0 -68
  969. package/components/parallel-coordinates-plot-options.config-Bw8T5EE4.js +0 -42
  970. package/components/parallel-coordinates-plot-positioning.config-BaofZgit.js +0 -48
  971. package/components/parallel-coordinates-plot-positioning.config-Br1OGTEZ.cjs +0 -20
  972. package/components/parallel-coordinates-plot-slots.config-D5o-5y_j.js +0 -46
  973. package/components/period-over-period-condition.const-BZ7j5Z5t.js +0 -29
  974. package/components/period-over-period-condition.const-C1NZ9Bkp.cjs +0 -20
  975. package/components/pivot-table-options.config-gL2C_zvT.js +0 -245
  976. package/components/pivot-table-positioning.config-BaBkuXV0.cjs +0 -20
  977. package/components/pivot-table-positioning.config-DeeS1MaO.js +0 -55
  978. package/components/pivot-table-slots.config-Cl5z3IQo.js +0 -55
  979. package/components/pragmatic-element-adapter-C_7HSvGV.js +0 -1252
  980. package/components/pragmatic-element-adapter-DPWYJiW9.cjs +0 -24
  981. package/components/pyramid-chart-options.config-348RYXh8.js +0 -260
  982. package/components/pyramid-chart-positioning.config-D14NnyH1.js +0 -55
  983. package/components/pyramid-chart-positioning.config-g55mkotb.cjs +0 -20
  984. package/components/pyramid-chart-slots.config-DNzq2hMx.js +0 -50
  985. package/components/radar-chart-options.config-BeGjchnc.js +0 -150
  986. package/components/radar-chart-positioning.config-C9fiYOnB.js +0 -55
  987. package/components/radar-chart-positioning.config-CWGfQ7-j.cjs +0 -20
  988. package/components/radar-chart-slots.config-CXgfvAkt.js +0 -53
  989. package/components/regular-table-options.config-Bf0VAtT_.js +0 -148
  990. package/components/regular-table-slots.config-DCkw4Xkq.js +0 -35
  991. package/components/route-map-options.config-DWG5127-.js +0 -326
  992. package/components/route-map-positioning.config-Cd4azpuW.js +0 -66
  993. package/components/route-map-positioning.config-Dswq4pH_.cjs +0 -20
  994. package/components/route-map-slots.config-DJ76FOsJ.js +0 -59
  995. package/components/sankey-diagram-options.config-DW72WBKU.js +0 -126
  996. package/components/sankey-diagram-positioning.config-CAHzdKBq.cjs +0 -20
  997. package/components/sankey-diagram-positioning.config-CzGCvTeX.js +0 -66
  998. package/components/sankey-diagram-slots.config-BCc8P4j0.js +0 -61
  999. package/components/scatter-plot-options.config-CUyWy2xE.js +0 -322
  1000. package/components/scatter-plot-positioning.config-C7nu7quv.js +0 -77
  1001. package/components/scatter-plot-positioning.config-CrVJZ-X9.cjs +0 -20
  1002. package/components/scatter-plot-slots.config-BMTdhTZG.js +0 -74
  1003. package/components/search-filter-options.config-B_qQjr68.js +0 -103
  1004. package/components/search-filter-slots.config-qCILSYzs.js +0 -39
  1005. package/components/slicer-filter-options.config-DK62SCMp.js +0 -235
  1006. package/components/slicer-filter-positioning.config-7sucz3_y.js +0 -48
  1007. package/components/slicer-filter-positioning.config-D9Tehydc.cjs +0 -20
  1008. package/components/slicer-filter-slots.config-C9_NdJm4.js +0 -44
  1009. package/components/slider-filter-options.config-CP5bXdih.js +0 -72
  1010. package/components/slider-filter-slots.config-15eAAGVn.js +0 -43
  1011. package/components/slot-menu/index.cjs +0 -20
  1012. package/components/slot-menu/index.d.ts +0 -10
  1013. package/components/slot-menu/index.js +0 -28
  1014. package/components/slot-menu/slot-menu.d.ts +0 -148
  1015. package/components/slot-menu/types.d.ts +0 -24
  1016. package/components/slot-menu-AavTGkLk.cjs +0 -71
  1017. package/components/slot-menu-Dz-O1ypQ.js +0 -426
  1018. package/components/slot-menu-list/index.cjs +0 -20
  1019. package/components/slot-menu-list/index.d.ts +0 -8
  1020. package/components/slot-menu-list/index.js +0 -28
  1021. package/components/slot-menu-list/slot-menu-list.d.ts +0 -47
  1022. package/components/slot-menu-list-BegM0w8C.js +0 -347
  1023. package/components/slot-menu-list-Cahst0TY.cjs +0 -44
  1024. package/components/slot-role-classification-2wChhpcq.cjs +0 -20
  1025. package/components/slot-role-classification-B8bkGhQ_.js +0 -133
  1026. package/components/slots-config-Cd4xAG4H.cjs +0 -20
  1027. package/components/slots-config-D3ivNWtC.js +0 -76
  1028. package/components/speedometer-chart-options.config-CtWGujmb.js +0 -246
  1029. package/components/speedometer-chart-positioning.config-CZgXkEsG.cjs +0 -20
  1030. package/components/speedometer-chart-positioning.config-DiDSe44G.js +0 -48
  1031. package/components/speedometer-chart-slots.config-DfTw7JTF.js +0 -39
  1032. package/components/spike-map-options.config-Ch0p9Q5l.js +0 -413
  1033. package/components/spike-map-positioning.config-RExJASrJ.cjs +0 -20
  1034. package/components/spike-map-positioning.config-W-xJbchu.js +0 -55
  1035. package/components/spike-map-slots.config-i-c0F9QM.js +0 -47
  1036. package/components/strip-plot-options.config-WICS2rnK.js +0 -53
  1037. package/components/strip-plot-positioning.config-C70pTRqg.cjs +0 -20
  1038. package/components/strip-plot-positioning.config-DsKb9ton.js +0 -48
  1039. package/components/strip-plot-slots.config-BuF7X3xN.js +0 -38
  1040. package/components/sunburst-chart-options.config-Bz-jP-gZ.js +0 -180
  1041. package/components/sunburst-chart-positioning.config-BAhEnZtE.js +0 -48
  1042. package/components/sunburst-chart-positioning.config-BHvaDZCC.cjs +0 -20
  1043. package/components/sunburst-chart-slots.config-Cq-E6kyI.js +0 -38
  1044. package/components/symbol-map-options.config-I89tFJUU.js +0 -177
  1045. package/components/symbol-map-positioning.config-B2RZQPND.cjs +0 -20
  1046. package/components/symbol-map-positioning.config-DNPiG975.js +0 -55
  1047. package/components/symbol-map-slots.config-BfdBHkzN.js +0 -53
  1048. package/components/text-options.config-BUiRyi3L.js +0 -67
  1049. package/components/text-slots.config-CM_ZaW3p.js +0 -24
  1050. package/components/treemap-chart-options.config-i7BH9mNl.js +0 -204
  1051. package/components/treemap-chart-positioning.config-C0LbkC6B.js +0 -55
  1052. package/components/treemap-chart-positioning.config-CIYguC9V.cjs +0 -20
  1053. package/components/treemap-chart-slots.config-CHkGtIOa.js +0 -47
  1054. package/components/utils-C8ATDm66.js +0 -240
  1055. package/components/utils-Cx4X0PBr.cjs +0 -20
  1056. package/components/venn-diagram-options.config-Wi0dQsAu.js +0 -24
  1057. package/components/venn-diagram-positioning.config-CGmfYuoj.cjs +0 -20
  1058. package/components/venn-diagram-positioning.config-CPUT2LXS.js +0 -55
  1059. package/components/venn-diagram-slots.config-DY04aeYK.js +0 -47
  1060. package/components/video-options.config-B6pQUPB7.js +0 -127
  1061. package/components/video-slots.config-C-kXGzo3.js +0 -24
  1062. package/components/viz-item-menu/index.cjs +0 -20
  1063. package/components/viz-item-menu/index.d.ts +0 -8
  1064. package/components/viz-item-menu/index.js +0 -28
  1065. package/components/viz-item-menu/types.d.ts +0 -9
  1066. package/components/viz-item-menu/viz-item-menu.d.ts +0 -75
  1067. package/components/viz-item-menu-BKXdr3_Q.cjs +0 -55
  1068. package/components/viz-item-menu-XoCSn7z_.js +0 -170
  1069. package/components/wordcloud-chart-options.config-D_AhgZRs.js +0 -90
  1070. package/components/wordcloud-chart-positioning.config-CqCOWKL4.js +0 -55
  1071. package/components/wordcloud-chart-positioning.config-roHRUT_m.cjs +0 -20
  1072. package/components/wordcloud-chart-slots.config-Cc5F92Tv.js +0 -45
  1073. package/deprecated-react/components/ai-chat.component.cjs +0 -1
  1074. package/deprecated-react/components/ai-interaction-textarea.component.cjs +0 -1
  1075. package/deprecated-react/components/data-field-level.component.cjs +0 -1
  1076. package/deprecated-react/components/data-fields-select.component.cjs +0 -1
  1077. package/deprecated-react/components/dataset-icon.component.cjs +0 -1
  1078. package/deprecated-react/components/dataset-selector-list.component.cjs +0 -1
  1079. package/deprecated-react/components/dataset-selector-row.component.cjs +0 -1
  1080. package/deprecated-react/components/display-settings-binning.component.cjs +0 -1
  1081. package/deprecated-react/components/display-settings-datetime.component.cjs +0 -1
  1082. package/deprecated-react/components/display-settings-grand-totals.component.cjs +0 -1
  1083. package/deprecated-react/components/display-settings-numeric.component.cjs +0 -1
  1084. package/deprecated-react/components/display-settings-period-over-period.component.cjs +0 -1
  1085. package/deprecated-react/components/display-settings.component.cjs +0 -1
  1086. package/deprecated-react/components/filter-expression-picker.component.cjs +0 -1
  1087. package/deprecated-react/components/filter-item.component.cjs +0 -1
  1088. package/deprecated-react/components/filter-parameter-picker.component.cjs +0 -1
  1089. package/deprecated-react/components/filter-value-picker-datetime.component.cjs +0 -1
  1090. package/deprecated-react/components/filter-value-picker-hierarchy.component.cjs +0 -1
  1091. package/deprecated-react/components/filter-value-picker-numeric.component.cjs +0 -1
  1092. package/deprecated-react/components/filter-value-picker.component.cjs +0 -1
  1093. package/deprecated-react/components/formula-field.component.cjs +0 -1
  1094. package/deprecated-react/components/interactive-viz-item.component.cjs +0 -1
  1095. package/deprecated-react/components/slot-menu-list.component.cjs +0 -1
  1096. package/deprecated-react/components/slot-menu.component.cjs +0 -1
  1097. package/deprecated-react/components/viz-item-menu.component.cjs +0 -1
  1098. package/react/components/ai-chat.component.ts +0 -45
  1099. package/react/components/ai-interaction-textarea.component.ts +0 -30
  1100. package/react/components/data-field-level.component.ts +0 -30
  1101. package/react/components/data-fields-select.component.ts +0 -27
  1102. package/react/components/dataset-icon.component.ts +0 -22
  1103. package/react/components/dataset-selector-list.component.ts +0 -27
  1104. package/react/components/dataset-selector-row.component.ts +0 -30
  1105. package/react/components/display-settings-binning.component.ts +0 -27
  1106. package/react/components/display-settings-datetime.component.ts +0 -27
  1107. package/react/components/display-settings-grand-totals.component.ts +0 -27
  1108. package/react/components/display-settings-numeric.component.ts +0 -27
  1109. package/react/components/display-settings-period-over-period.component.ts +0 -27
  1110. package/react/components/display-settings.component.ts +0 -33
  1111. package/react/components/filter-expression-picker.component.ts +0 -27
  1112. package/react/components/filter-item.component.ts +0 -27
  1113. package/react/components/filter-parameter-picker.component.ts +0 -22
  1114. package/react/components/filter-value-picker-datetime.component.ts +0 -27
  1115. package/react/components/filter-value-picker-hierarchy.component.ts +0 -27
  1116. package/react/components/filter-value-picker-numeric.component.ts +0 -27
  1117. package/react/components/filter-value-picker.component.ts +0 -27
  1118. package/react/components/formula-field.component.ts +0 -30
  1119. package/react/components/interactive-viz-item.component.ts +0 -33
  1120. package/react/components/slot-menu-list.component.ts +0 -27
  1121. package/react/components/slot-menu.component.ts +0 -42
  1122. package/react/components/viz-item-menu.component.ts +0 -33
  1123. package/react/esm/components/ai-chat.component.d.ts +0 -24
  1124. package/react/esm/components/ai-chat.component.js +0 -29
  1125. package/react/esm/components/ai-interaction-textarea.component.d.ts +0 -14
  1126. package/react/esm/components/ai-interaction-textarea.component.js +0 -19
  1127. package/react/esm/components/data-field-level.component.d.ts +0 -14
  1128. package/react/esm/components/data-field-level.component.js +0 -19
  1129. package/react/esm/components/data-fields-select.component.d.ts +0 -12
  1130. package/react/esm/components/data-fields-select.component.js +0 -17
  1131. package/react/esm/components/dataset-icon.component.d.ts +0 -8
  1132. package/react/esm/components/dataset-icon.component.js +0 -13
  1133. package/react/esm/components/dataset-selector-list.component.d.ts +0 -12
  1134. package/react/esm/components/dataset-selector-list.component.js +0 -17
  1135. package/react/esm/components/dataset-selector-row.component.d.ts +0 -14
  1136. package/react/esm/components/dataset-selector-row.component.js +0 -19
  1137. package/react/esm/components/display-settings-binning.component.d.ts +0 -12
  1138. package/react/esm/components/display-settings-binning.component.js +0 -17
  1139. package/react/esm/components/display-settings-datetime.component.d.ts +0 -12
  1140. package/react/esm/components/display-settings-datetime.component.js +0 -17
  1141. package/react/esm/components/display-settings-grand-totals.component.d.ts +0 -12
  1142. package/react/esm/components/display-settings-grand-totals.component.js +0 -17
  1143. package/react/esm/components/display-settings-numeric.component.d.ts +0 -12
  1144. package/react/esm/components/display-settings-numeric.component.js +0 -17
  1145. package/react/esm/components/display-settings-period-over-period.component.d.ts +0 -12
  1146. package/react/esm/components/display-settings-period-over-period.component.js +0 -17
  1147. package/react/esm/components/display-settings.component.d.ts +0 -16
  1148. package/react/esm/components/display-settings.component.js +0 -21
  1149. package/react/esm/components/filter-expression-picker.component.d.ts +0 -12
  1150. package/react/esm/components/filter-expression-picker.component.js +0 -17
  1151. package/react/esm/components/filter-item.component.d.ts +0 -12
  1152. package/react/esm/components/filter-item.component.js +0 -17
  1153. package/react/esm/components/filter-parameter-picker.component.d.ts +0 -8
  1154. package/react/esm/components/filter-parameter-picker.component.js +0 -13
  1155. package/react/esm/components/filter-value-picker-datetime.component.d.ts +0 -12
  1156. package/react/esm/components/filter-value-picker-datetime.component.js +0 -17
  1157. package/react/esm/components/filter-value-picker-hierarchy.component.d.ts +0 -12
  1158. package/react/esm/components/filter-value-picker-hierarchy.component.js +0 -17
  1159. package/react/esm/components/filter-value-picker-numeric.component.d.ts +0 -12
  1160. package/react/esm/components/filter-value-picker-numeric.component.js +0 -17
  1161. package/react/esm/components/filter-value-picker.component.d.ts +0 -12
  1162. package/react/esm/components/filter-value-picker.component.js +0 -17
  1163. package/react/esm/components/formula-field.component.d.ts +0 -14
  1164. package/react/esm/components/formula-field.component.js +0 -19
  1165. package/react/esm/components/interactive-viz-item.component.d.ts +0 -16
  1166. package/react/esm/components/interactive-viz-item.component.js +0 -21
  1167. package/react/esm/components/slot-menu-list.component.d.ts +0 -12
  1168. package/react/esm/components/slot-menu-list.component.js +0 -17
  1169. package/react/esm/components/slot-menu.component.d.ts +0 -22
  1170. package/react/esm/components/slot-menu.component.js +0 -27
  1171. package/react/esm/components/viz-item-menu.component.d.ts +0 -16
  1172. package/react/esm/components/viz-item-menu.component.js +0 -21
  1173. package/storybook/inject-global-vars.d.ts +0 -1
  1174. package/storybook/register-components.d.ts +0 -51
  1175. package/types/ai-chat.types.d.ts +0 -95
  1176. package/types/data-field-events.types.d.ts +0 -7
@@ -1,3998 +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 { c as e, d as t, s as n, u as r } from "./ai-interaction-textarea-Bgd3y_cP.js";
21
- import { i } from "./base-DMQUzJ4L.js";
22
- import { t as a } from "./decorate-DyMgX_Uh.js";
23
- import { msg as o } from "@lit/localize/lit-localize";
24
- import { luzmoEllipsisVertical as s, luzmoIcon as c, luzmoSpin as l } 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 u, nothing as d, unsafeCSS as ee } from "lit";
32
- import { property as f, state as p } from "lit/decorators.js";
33
- import { unsafeHTML as te } from "lit/directives/unsafe-html.js";
34
- import "@luzmo/lucero/action-button";
35
- //#region node_modules/dompurify/dist/purify.es.mjs
36
- function m(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 ne(e) {
42
- if (Array.isArray(e)) return e;
43
- }
44
- function re(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 h() {
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 g(e, t) {
66
- return ne(e) || re(e, t) || _(e, t) || h();
67
- }
68
- function _(e, t) {
69
- if (e) {
70
- if (typeof e == "string") return m(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) ? m(e, t) : void 0;
73
- }
74
- }
75
- var ie = Object.entries, v = Object.setPrototypeOf, ae = Object.isFrozen, oe = Object.getPrototypeOf, se = Object.getOwnPropertyDescriptor, y = Object.freeze, b = Object.seal, ce = Object.create, le = typeof Reflect < "u" && Reflect, ue = le.apply, de = le.construct;
76
- y ||= function(e) {
77
- return e;
78
- }, b ||= function(e) {
79
- return e;
80
- }, ue ||= function(e, t) {
81
- var n = [...arguments].slice(2);
82
- return e.apply(t, n);
83
- }, de ||= function(e) {
84
- return new e(...[...arguments].slice(1));
85
- };
86
- var fe = C(Array.prototype.forEach), pe = C(Array.prototype.lastIndexOf), me = C(Array.prototype.pop), he = C(Array.prototype.push), ge = C(Array.prototype.splice), _e = Array.isArray, ve = C(String.prototype.toLowerCase), ye = C(String.prototype.toString), be = C(String.prototype.match), xe = C(String.prototype.replace), Se = C(String.prototype.indexOf), Ce = C(String.prototype.trim), we = C(Number.prototype.toString), Te = C(Boolean.prototype.toString), Ee = typeof BigInt > "u" ? null : C(BigInt.prototype.toString), De = typeof Symbol > "u" ? null : C(Symbol.prototype.toString), x = C(Object.prototype.hasOwnProperty), Oe = C(Object.prototype.toString), S = C(RegExp.prototype.test), ke = Ae(TypeError);
87
- function C(e) {
88
- return function(t) {
89
- t instanceof RegExp && (t.lastIndex = 0);
90
- var n = [...arguments].slice(1);
91
- return ue(e, t, n);
92
- };
93
- }
94
- function Ae(e) {
95
- return function() {
96
- return de(e, [...arguments]);
97
- };
98
- }
99
- function w(e, t) {
100
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ve;
101
- if (v && v(e, null), !_e(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 && (ae(t) || (t[r] = e), i = e);
108
- }
109
- e[i] = !0;
110
- }
111
- return e;
112
- }
113
- function T(e) {
114
- for (let t = 0; t < e.length; t++) x(e, t) || (e[t] = null);
115
- return e;
116
- }
117
- function E(e) {
118
- let t = ce(null);
119
- for (let r of ie(e)) {
120
- var n = g(r, 2);
121
- let i = n[0], a = n[1];
122
- x(e, i) && (_e(a) ? t[i] = T(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = E(a) : t[i] = a);
123
- }
124
- return t;
125
- }
126
- function je(e) {
127
- switch (typeof e) {
128
- case "string": return e;
129
- case "number": return we(e);
130
- case "boolean": return Te(e);
131
- case "bigint": return Ee ? Ee(e) : "0";
132
- case "symbol": return De ? De(e) : "Symbol()";
133
- case "undefined": return Oe(e);
134
- case "function":
135
- case "object": {
136
- if (e === null) return Oe(e);
137
- let t = e, n = D(t, "toString");
138
- if (typeof n == "function") {
139
- let e = n(t);
140
- return typeof e == "string" ? e : Oe(e);
141
- }
142
- return Oe(e);
143
- }
144
- default: return Oe(e);
145
- }
146
- }
147
- function D(e, t) {
148
- for (; e !== null;) {
149
- let n = se(e, t);
150
- if (n) {
151
- if (n.get) return C(n.get);
152
- if (typeof n.value == "function") return C(n.value);
153
- }
154
- e = oe(e);
155
- }
156
- function n() {
157
- return null;
158
- }
159
- return n;
160
- }
161
- function Me(e) {
162
- try {
163
- return S(e, ""), !0;
164
- } catch {
165
- return !1;
166
- }
167
- }
168
- var Ne = y(/* @__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(".")), Pe = y(/* @__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(".")), Fe = y([
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
- ]), Ie = y([
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
- ]), Le = y(/* @__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(".")), Re = y([
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
- ]), ze = y(["#text"]), Be = y(/* @__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(".")), Ve = y(/* @__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.dominant-baseline.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-orientation.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(".")), He = y(/* @__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(".")), Ue = y([
234
- "xlink:href",
235
- "xml:id",
236
- "xlink:title",
237
- "xml:space",
238
- "xmlns:xlink"
239
- ]), We = b(/{{[\w\W]*|^[\w\W]*}}/g), Ge = b(/<%[\w\W]*|^[\w\W]*%>/g), Ke = b(/\${[\w\W]*/g), qe = b(/^data-[\-\w.\u00B7-\uFFFF]+$/), Je = b(/^aria-[\-\w]+$/), Ye = b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Xe = b(/^(?:\w+script|data):/i), Ze = b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Qe = b(/^html$/i), $e = b(/^[a-z][.\w]*(-[.\w]+)+$/i), et = b(/<[/\w!]/g), tt = b(/<[/\w]/g), nt = b(/<\/no(script|embed|frames)/i), rt = b(/\/>/i), O = {
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
- }, it = function() {
253
- return typeof window > "u" ? null : window;
254
- }, at = 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
- }, ot = function() {
272
- return {
273
- afterSanitizeAttributes: [],
274
- afterSanitizeElements: [],
275
- afterSanitizeShadowDOM: [],
276
- beforeSanitizeAttributes: [],
277
- beforeSanitizeElements: [],
278
- beforeSanitizeShadowDOM: [],
279
- uponSanitizeAttribute: [],
280
- uponSanitizeElement: [],
281
- uponSanitizeShadowNode: []
282
- };
283
- }, st = function(e, t, n, r) {
284
- return x(e, t) && _e(e[t]) ? w(r.base ? E(r.base) : {}, e[t], r.transform) : n;
285
- };
286
- function ct() {
287
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : it(), t = (e) => ct(e);
288
- if (t.version = "3.4.12", t.removed = [], !e || !e.document || e.document.nodeType !== O.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 = D(d, "cloneNode"), f = D(d, "remove"), p = D(d, "nextSibling"), te = D(d, "childNodes"), m = D(d, "parentNode"), ne = D(d, "shadowRoot"), re = D(d, "attributes"), h = o && o.prototype ? D(o.prototype, "nodeType") : null, g = o && o.prototype ? D(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 _, v = "", ae, oe = !1, se = 0, le = function() {
299
- if (se > 0) throw ke("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
- }, ue = function(e) {
301
- le(), se++;
302
- try {
303
- return _.createHTML(e);
304
- } finally {
305
- se--;
306
- }
307
- }, de = function(e) {
308
- le(), se++;
309
- try {
310
- return _.createScriptURL(e);
311
- } finally {
312
- se--;
313
- }
314
- }, we = function() {
315
- return oe ||= (ae = at(u, i), !0), ae;
316
- }, Te = n, Ee = Te.implementation, De = Te.createNodeIterator, Oe = Te.createDocumentFragment, C = Te.getElementsByTagName, Ae = r.importNode, T = ot();
317
- t.isSupported = typeof ie == "function" && typeof m == "function" && Ee && Ee.createHTMLDocument !== void 0;
318
- let lt = We, ut = Ge, dt = Ke, ft = qe, pt = Je, mt = Xe, k = Ze, ht = $e, A = Ye, j = null, gt = w({}, [
319
- ...Ne,
320
- ...Pe,
321
- ...Fe,
322
- ...Le,
323
- ...ze
324
- ]), M = null, _t = w({}, [
325
- ...Be,
326
- ...Ve,
327
- ...He,
328
- ...Ue
329
- ]), N = 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
- })), P = 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, L = !0, R = !1, Ct = !1, wt = null, Tt = null, Et = !1, Dt = !1, Ot = !1, kt = !1, At = !0, jt = !1, Mt = "user-content-", Nt = !0, z = !1, B = {}, V = null, Pt = w({}, /* @__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(".")), Ft = null, It = w({}, [
362
- "audio",
363
- "video",
364
- "img",
365
- "source",
366
- "image",
367
- "track"
368
- ]), Lt = null, Rt = w({}, [
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
- ]), zt = "http://www.w3.org/1998/Math/MathML", Bt = "http://www.w3.org/2000/svg", H = "http://www.w3.org/1999/xhtml", Vt = H, Ht = !1, Ut = null, Wt = w({}, [
384
- zt,
385
- Bt,
386
- H
387
- ], ye), Gt = y([
388
- "mi",
389
- "mo",
390
- "mn",
391
- "ms",
392
- "mtext"
393
- ]), Kt = w({}, Gt), qt = y(["annotation-xml"]), Jt = w({}, qt), Yt = w({}, [
394
- "title",
395
- "style",
396
- "font",
397
- "a",
398
- "script"
399
- ]), Xt = null, Zt = ["application/xhtml+xml", "text/html"], U = null, Qt = null, $t = n.createElement("form"), en = function(e) {
400
- return e instanceof RegExp || e instanceof Function;
401
- }, tn = function() {
402
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
403
- if (Qt && Qt === e) return;
404
- (!e || typeof e != "object") && (e = {}), e = E(e), Xt = Zt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, U = Xt === "application/xhtml+xml" ? ye : ve, j = st(e, "ALLOWED_TAGS", gt, { transform: U }), M = st(e, "ALLOWED_ATTR", _t, { transform: U }), Ut = st(e, "ALLOWED_NAMESPACES", Wt, { transform: ye }), Lt = st(e, "ADD_URI_SAFE_ATTR", Rt, {
405
- transform: U,
406
- base: Rt
407
- }), Ft = st(e, "ADD_DATA_URI_TAGS", It, {
408
- transform: U,
409
- base: It
410
- }), V = st(e, "FORBID_CONTENTS", Pt, { transform: U }), P = st(e, "FORBID_TAGS", E({}), { transform: U }), vt = st(e, "FORBID_ATTR", E({}), { transform: U }), B = x(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? E(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, L = e.SAFE_FOR_XML !== !1, R = e.WHOLE_DOCUMENT || !1, Dt = e.RETURN_DOM || !1, Ot = e.RETURN_DOM_FRAGMENT || !1, kt = e.RETURN_TRUSTED_TYPE || !1, Et = e.FORCE_BODY || !1, At = e.SANITIZE_DOM !== !1, jt = e.SANITIZE_NAMED_PROPS || !1, Nt = e.KEEP_CONTENT !== !1, z = e.IN_PLACE || !1, A = Me(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ye, Vt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : H, Kt = x(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? E(e.MATHML_TEXT_INTEGRATION_POINTS) : w({}, Gt), Jt = x(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? E(e.HTML_INTEGRATION_POINTS) : w({}, qt);
411
- let t = x(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? E(e.CUSTOM_ELEMENT_HANDLING) : ce(null);
412
- if (N = ce(null), x(t, "tagNameCheck") && en(t.tagNameCheck) && (N.tagNameCheck = t.tagNameCheck), x(t, "attributeNameCheck") && en(t.attributeNameCheck) && (N.attributeNameCheck = t.attributeNameCheck), x(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), b(N), I && (bt = !1), Ot && (Dt = !0), B && (j = w({}, ze), M = ce(null), B.html === !0 && (w(j, Ne), w(M, Be)), B.svg === !0 && (w(j, Pe), w(M, Ve), w(M, Ue)), B.svgFilters === !0 && (w(j, Fe), w(M, Ve), w(M, Ue)), B.mathMl === !0 && (w(j, Le), w(M, He), w(M, Ue))), F.tagCheck = null, F.attributeCheck = null, x(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? F.tagCheck = e.ADD_TAGS : _e(e.ADD_TAGS) && (j === gt && (j = E(j)), w(j, e.ADD_TAGS, U))), x(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? F.attributeCheck = e.ADD_ATTR : _e(e.ADD_ATTR) && (M === _t && (M = E(M)), w(M, e.ADD_ATTR, U))), x(e, "ADD_URI_SAFE_ATTR") && _e(e.ADD_URI_SAFE_ATTR) && w(Lt, e.ADD_URI_SAFE_ATTR, U), x(e, "FORBID_CONTENTS") && _e(e.FORBID_CONTENTS) && (V === Pt && (V = E(V)), w(V, e.FORBID_CONTENTS, U)), x(e, "ADD_FORBID_CONTENTS") && _e(e.ADD_FORBID_CONTENTS) && (V === Pt && (V = E(V)), w(V, e.ADD_FORBID_CONTENTS, U)), Nt && (j["#text"] = !0), R && w(j, [
413
- "html",
414
- "head",
415
- "body"
416
- ]), j.table && (w(j, ["tbody"]), delete P.tbody), e.TRUSTED_TYPES_POLICY) {
417
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw ke("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
418
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw ke("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
419
- let t = _;
420
- _ = e.TRUSTED_TYPES_POLICY;
421
- try {
422
- v = ue("");
423
- } catch (e) {
424
- throw _ = t, e;
425
- }
426
- } else e.TRUSTED_TYPES_POLICY === null ? (_ = void 0, v = "") : (_ === void 0 && (_ = we()), _ && typeof v == "string" && (v = ue("")));
427
- y && y(e), Qt = e;
428
- }, nn = w({}, [
429
- ...Pe,
430
- ...Fe,
431
- ...Ie
432
- ]), rn = w({}, [...Le, ...Re]), an = function(e, t, n) {
433
- return t.namespaceURI === H ? e === "svg" : t.namespaceURI === zt ? e === "svg" && (n === "annotation-xml" || Kt[n]) : !!nn[e];
434
- }, on = function(e, t, n) {
435
- return t.namespaceURI === H ? e === "math" : t.namespaceURI === Bt ? e === "math" && Jt[n] : !!rn[e];
436
- }, sn = function(e, t, n) {
437
- return t.namespaceURI === Bt && !Jt[n] || t.namespaceURI === zt && !Kt[n] ? !1 : !rn[e] && (Yt[e] || !nn[e]);
438
- }, cn = function(e) {
439
- let t = m(e);
440
- (!t || !t.tagName) && (t = {
441
- namespaceURI: Vt,
442
- tagName: "template"
443
- });
444
- let n = ve(e.tagName), r = ve(t.tagName);
445
- return Ut[e.namespaceURI] ? e.namespaceURI === Bt ? an(n, t, r) : e.namespaceURI === zt ? on(n, t, r) : e.namespaceURI === H ? sn(n, t, r) : !!(Xt === "application/xhtml+xml" && Ut[e.namespaceURI]) : !1;
446
- }, ln = function(e) {
447
- he(t.removed, { element: e });
448
- try {
449
- m(e).removeChild(e);
450
- } catch {
451
- if (f(e), !m(e)) throw ke("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
452
- }
453
- }, un = function(e) {
454
- fn(e);
455
- let t = te(e);
456
- if (t) {
457
- let e = [];
458
- fe(t, (t) => {
459
- he(e, t);
460
- }), fe(e, (e) => {
461
- try {
462
- f(e);
463
- } catch {}
464
- });
465
- }
466
- let n = re(e);
467
- if (n) for (let t = n.length - 1; t >= 0; --t) {
468
- let r = n[t], i = r && r.name;
469
- if (typeof i == "string") try {
470
- e.removeAttribute(i);
471
- } catch {}
472
- }
473
- }, W = function(e, n) {
474
- try {
475
- he(t.removed, {
476
- attribute: n.getAttributeNode(e),
477
- from: n
478
- });
479
- } catch {
480
- he(t.removed, {
481
- attribute: null,
482
- from: n
483
- });
484
- }
485
- if (n.removeAttribute(e), e === "is") if (Dt || Ot) try {
486
- ln(n);
487
- } catch {}
488
- else try {
489
- n.setAttribute(e, "");
490
- } catch {}
491
- }, dn = function(e) {
492
- let t = re(e);
493
- if (t) for (let n = t.length - 1; n >= 0; --n) {
494
- let r = t[n], i = r && r.name;
495
- if (!(typeof i != "string" || M[U(i)])) try {
496
- e.removeAttribute(i);
497
- } catch {}
498
- }
499
- }, fn = function(e) {
500
- let t = [e];
501
- for (; t.length > 0;) {
502
- let e = t.pop();
503
- (h ? h(e) : e.nodeType) === O.element && dn(e);
504
- let n = te(e);
505
- if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
506
- }
507
- }, G = function(e) {
508
- if (!L) return;
509
- let t = [e];
510
- for (; t.length > 0;) {
511
- let e = t.pop(), n = h ? h(e) : e.nodeType;
512
- if (n === O.processingInstruction || n === O.comment && S(tt, e.data)) {
513
- try {
514
- f(e);
515
- } catch {}
516
- continue;
517
- }
518
- if (n === O.element) {
519
- let t = e, n = U(g ? g(e) : e.nodeName);
520
- try {
521
- t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
522
- } catch {}
523
- }
524
- let r = te(e);
525
- if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
526
- }
527
- }, pn = function(e) {
528
- let t = null, r = null;
529
- if (Et) e = "<remove></remove>" + e;
530
- else {
531
- let t = be(e, /^[\r\n\t ]+/);
532
- r = t && t[0];
533
- }
534
- Xt === "application/xhtml+xml" && Vt === H && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
535
- let i = _ ? ue(e) : e;
536
- if (Vt === H) try {
537
- t = new l().parseFromString(i, Xt);
538
- } catch {}
539
- if (!t || !t.documentElement) {
540
- t = Ee.createDocument(Vt, "template", null);
541
- try {
542
- t.documentElement.innerHTML = Ht ? v : i;
543
- } catch {}
544
- }
545
- let a = t.body || t.documentElement;
546
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Vt === H ? C.call(t, R ? "html" : "body")[0] : R ? t.documentElement : a;
547
- }, mn = function(e) {
548
- return De.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
549
- }, hn = function(e) {
550
- return e = xe(e, lt, " "), e = xe(e, ut, " "), e = xe(e, dt, " "), e;
551
- }, gn = function(e) {
552
- e.normalize();
553
- let t = De.call(e.ownerDocument || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
554
- for (; n;) n.data = hn(n.data), n = t.nextNode();
555
- let r = e.querySelectorAll?.call(e, "template");
556
- r && fe(r, (e) => {
557
- K(e.content) && gn(e.content);
558
- });
559
- }, _n = function(e) {
560
- let t = g ? g(e) : null;
561
- return typeof t != "string" || U(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== re(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== h(e) || e.childNodes !== te(e);
562
- }, K = function(e) {
563
- if (!h || typeof e != "object" || !e) return !1;
564
- try {
565
- return h(e) === O.documentFragment;
566
- } catch {
567
- return !1;
568
- }
569
- }, q = function(e) {
570
- if (!h || typeof e != "object" || !e) return !1;
571
- try {
572
- return typeof h(e) == "number";
573
- } catch {
574
- return !1;
575
- }
576
- };
577
- function J(e, n, r) {
578
- e.length !== 0 && fe(e, (e) => {
579
- e.call(t, n, r, Qt);
580
- });
581
- }
582
- let vn = function(e, t) {
583
- return !!(L && e.hasChildNodes() && !q(e.firstElementChild) && S(et, e.textContent) && S(et, e.innerHTML) || L && e.namespaceURI === H && t === "style" && q(e.firstElementChild) || e.nodeType === O.processingInstruction || L && e.nodeType === O.comment && S(tt, e.data));
584
- }, Y = function(e, t) {
585
- if (!P[t] && bn(t) && (N.tagNameCheck instanceof RegExp && S(N.tagNameCheck, t) || N.tagNameCheck instanceof Function && N.tagNameCheck(t))) return !1;
586
- if (Nt && !V[t]) {
587
- let t = m(e), n = te(e);
588
- if (n && t) {
589
- let r = n.length;
590
- for (let i = r - 1; i >= 0; --i) {
591
- let r = z ? n[i] : ee(n[i], !0);
592
- t.insertBefore(r, p(e));
593
- }
594
- }
595
- }
596
- return ln(e), !0;
597
- }, yn = function(e, n) {
598
- if (J(T.beforeSanitizeElements, e, null), e !== n && m(e) === null) return !0;
599
- if (_n(e)) return ln(e), !0;
600
- let r = U(g ? g(e) : e.nodeName);
601
- if (J(T.uponSanitizeElement, e, {
602
- tagName: r,
603
- allowedTags: j
604
- }), e !== n && m(e) === null) return !0;
605
- if (vn(e, r)) return ln(e), !0;
606
- if (P[r] || !(F.tagCheck instanceof Function && F.tagCheck(r)) && !j[r]) {
607
- let t = Y(e, r);
608
- return t === !1 && J(T.afterSanitizeElements, e, null), t;
609
- }
610
- if ((h ? h(e) : e.nodeType) === O.element && !cn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && S(nt, e.innerHTML)) return ln(e), !0;
611
- if (I && e.nodeType === O.text) {
612
- let n = hn(e.textContent);
613
- e.textContent !== n && (he(t.removed, { element: e.cloneNode() }), e.textContent = n);
614
- }
615
- return J(T.afterSanitizeElements, e, null), !1;
616
- }, X = function(e, t, r) {
617
- if (vt[t] || L && t === "patchsrc" || L && t === "for" && e !== "label" && e !== "output" || At && (t === "id" || t === "name") && (r in n || r in $t)) return !1;
618
- let i = M[t] || F.attributeCheck instanceof Function && F.attributeCheck(t, e);
619
- if (!(bt && S(ft, t)) && !(yt && S(pt, t))) {
620
- if (!i) {
621
- if (!(bn(e) && (N.tagNameCheck instanceof RegExp && S(N.tagNameCheck, e) || N.tagNameCheck instanceof Function && N.tagNameCheck(e)) && (N.attributeNameCheck instanceof RegExp && S(N.attributeNameCheck, t) || N.attributeNameCheck instanceof Function && N.attributeNameCheck(t, e)) || t === "is" && N.allowCustomizedBuiltInElements && (N.tagNameCheck instanceof RegExp && S(N.tagNameCheck, r) || N.tagNameCheck instanceof Function && N.tagNameCheck(r)))) return !1;
622
- } else if (!Lt[t] && !S(A, xe(r, k, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Se(r, "data:") === 0 && Ft[e]) && !(xt && !S(mt, xe(r, k, ""))) && r) return !1;
623
- }
624
- return !0;
625
- }, Z = w({}, [
626
- "annotation-xml",
627
- "color-profile",
628
- "font-face",
629
- "font-face-format",
630
- "font-face-name",
631
- "font-face-src",
632
- "font-face-uri",
633
- "missing-glyph"
634
- ]), bn = function(e) {
635
- return !Z[ve(e)] && S(ht, e);
636
- }, xn = function(e, t, n, r) {
637
- if (_ && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
638
- case "TrustedHTML": return ue(r);
639
- case "TrustedScriptURL": return de(r);
640
- }
641
- return r;
642
- }, Sn = function(e, n, r, i) {
643
- try {
644
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _n(e) ? ln(e) : me(t.removed);
645
- } catch {
646
- W(n, e);
647
- }
648
- }, Cn = function(e) {
649
- J(T.beforeSanitizeAttributes, e, null);
650
- let t = e.attributes;
651
- if (!t || _n(e)) return;
652
- let n = {
653
- attrName: "",
654
- attrValue: "",
655
- keepAttr: !0,
656
- allowedAttributes: M,
657
- forceKeepAttr: void 0
658
- }, r = t.length, i = U(e.nodeName);
659
- for (; r--;) {
660
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = U(o), u = c, d = o === "value" ? u : Ce(u);
661
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, J(T.uponSanitizeAttribute, e, n), d = n.attrValue, jt && (l === "id" || l === "name") && Se(d, Mt) !== 0 && (W(o, e), d = Mt + d), L && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
662
- W(o, e);
663
- continue;
664
- }
665
- if (l === "attributename" && be(d, "href")) {
666
- W(o, e);
667
- continue;
668
- }
669
- if (!n.forceKeepAttr) {
670
- if (!n.keepAttr) {
671
- W(o, e);
672
- continue;
673
- }
674
- if (!St && S(rt, d)) {
675
- W(o, e);
676
- continue;
677
- }
678
- if (I && (d = hn(d)), !X(i, l, d)) {
679
- W(o, e);
680
- continue;
681
- }
682
- d = xn(i, l, s, d), d !== u && Sn(e, o, s, d);
683
- }
684
- }
685
- J(T.afterSanitizeAttributes, e, null);
686
- }, wn = function(e) {
687
- let t = null, n = mn(e);
688
- for (J(T.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (J(T.uponSanitizeShadowNode, t, null), yn(t, e), Cn(t), K(t.content) && wn(t.content), (h ? h(t) : t.nodeType) === O.element) {
689
- let e = ne(t);
690
- K(e) && (Tn(e), wn(e));
691
- }
692
- J(T.afterSanitizeShadowDOM, e, null);
693
- }, Tn = function(e) {
694
- let t = [{
695
- node: e,
696
- shadow: null
697
- }];
698
- for (; t.length > 0;) {
699
- let e = t.pop();
700
- if (e.shadow) {
701
- wn(e.shadow);
702
- continue;
703
- }
704
- let n = e.node, r = (h ? h(n) : n.nodeType) === O.element, i = te(n);
705
- if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
706
- node: i[e],
707
- shadow: null
708
- });
709
- if (r) {
710
- let e = g ? g(n) : null;
711
- if (typeof e == "string" && U(e) === "template") {
712
- let e = n.content;
713
- K(e) && t.push({
714
- node: e,
715
- shadow: null
716
- });
717
- }
718
- }
719
- if (r) {
720
- let e = ne(n);
721
- K(e) && t.push({
722
- node: null,
723
- shadow: e
724
- }, {
725
- node: e,
726
- shadow: null
727
- });
728
- }
729
- }
730
- };
731
- return t.sanitize = function(e) {
732
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
733
- if (Ht = !e, Ht && (e = "<!-->"), typeof e != "string" && !q(e) && (e = je(e), typeof e != "string")) throw ke("dirty is not a string, aborting");
734
- if (!t.isSupported) return e;
735
- Ct ? (j = wt, M = Tt) : tn(n), (T.uponSanitizeElement.length > 0 || T.uponSanitizeAttribute.length > 0) && (j = E(j)), T.uponSanitizeAttribute.length > 0 && (M = E(M)), t.removed = [];
736
- let c = z && typeof e != "string" && q(e);
737
- if (c) {
738
- G(e);
739
- let t = g ? g(e) : e.nodeName;
740
- if (typeof t == "string") {
741
- let n = U(t);
742
- if (!j[n] || P[n]) throw un(e), ke("root node is forbidden and cannot be sanitized in-place");
743
- }
744
- if (_n(e)) throw un(e), ke("root node is clobbered and cannot be sanitized in-place");
745
- try {
746
- Tn(e);
747
- } catch (t) {
748
- throw un(e), t;
749
- }
750
- } else if (q(e)) i = pn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === O.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Tn(a);
751
- else {
752
- if (!Dt && !I && !R && e.indexOf("<") === -1) return _ && kt ? ue(e) : e;
753
- if (i = pn(e), !i) return Dt ? null : kt ? v : "";
754
- }
755
- i && Et && ln(i.firstChild);
756
- let l = c ? e : i, u = mn(l);
757
- try {
758
- for (; o = u.nextNode();) yn(o, l), Cn(o), K(o.content) && wn(o.content);
759
- } catch (n) {
760
- throw c && (un(e), fe(t.removed, (e) => {
761
- e.element && fn(e.element);
762
- })), n;
763
- }
764
- if (c) return fe(t.removed, (e) => {
765
- e.element && fn(e.element);
766
- }), I && gn(e), e;
767
- if (Dt) {
768
- if (I && gn(i), Ot) for (s = Oe.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
769
- else s = i;
770
- return (M.shadowroot || M.shadowrootmode) && (s = Ae.call(r, s, !0)), s;
771
- }
772
- let d = R ? i.outerHTML : i.innerHTML;
773
- return R && j["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && S(Qe, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), I && (d = hn(d)), _ && kt ? ue(d) : d;
774
- }, t.setConfig = function() {
775
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
776
- tn(e), Ct = !0, wt = j, Tt = M;
777
- }, t.clearConfig = function() {
778
- Qt = null, Ct = !1, wt = null, Tt = null, _ = ae, v = "";
779
- }, t.isValidAttribute = function(e, t, n) {
780
- Qt || tn({});
781
- let r = U(e), i = U(t);
782
- return X(r, i, n);
783
- }, t.addHook = function(e, t) {
784
- typeof t == "function" && x(T, e) && he(T[e], t);
785
- }, t.removeHook = function(e, t) {
786
- if (x(T, e)) {
787
- if (t !== void 0) {
788
- let n = pe(T[e], t);
789
- return n === -1 ? void 0 : ge(T[e], n, 1)[0];
790
- }
791
- return me(T[e]);
792
- }
793
- }, t.removeHooks = function(e) {
794
- x(T, e) && (T[e] = []);
795
- }, t.removeAllHooks = function() {
796
- T = ot();
797
- }, t;
798
- }
799
- var lt = ct();
800
- //#endregion
801
- //#region node_modules/marked/lib/marked.esm.js
802
- function ut() {
803
- return {
804
- async: !1,
805
- breaks: !1,
806
- extensions: null,
807
- gfm: !0,
808
- hooks: null,
809
- pedantic: !1,
810
- renderer: null,
811
- silent: !1,
812
- tokenizer: null,
813
- walkTokens: null
814
- };
815
- }
816
- var dt = ut();
817
- function ft(e) {
818
- dt = e;
819
- }
820
- var pt = { exec: () => null };
821
- function mt(e) {
822
- let t = [];
823
- return (n) => {
824
- let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
825
- return i || (i = e(r), t[r] = i), i;
826
- };
827
- }
828
- function k(e, t = "") {
829
- let n = typeof e == "string" ? e : e.source, r = {
830
- replace: (e, t) => {
831
- let i = typeof t == "string" ? t : t.source;
832
- return i = i.replace(A.caret, "$1"), n = n.replace(e, i), r;
833
- },
834
- getRegex: () => new RegExp(n, t)
835
- };
836
- return r;
837
- }
838
- var ht = ((e = "") => {
839
- try {
840
- return !!RegExp("(?<=1)(?<!1)" + e);
841
- } catch {
842
- return !1;
843
- }
844
- })(), A = {
845
- codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
846
- outputLinkReplace: /\\([\[\]])/g,
847
- indentCodeCompensation: /^(\s+)(?:```)/,
848
- beginningSpace: /^\s+/,
849
- endingHash: /#$/,
850
- startingSpaceChar: /^ /,
851
- endingSpaceChar: / $/,
852
- nonSpaceChar: /[^ ]/,
853
- newLineCharGlobal: /\n/g,
854
- tabCharGlobal: /\t/g,
855
- multipleSpaceGlobal: /\s+/g,
856
- blankLine: /^[ \t]*$/,
857
- doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
858
- blockquoteStart: /^ {0,3}>/,
859
- blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
860
- blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
861
- listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
862
- listIsTask: /^\[[ xX]\] +\S/,
863
- listReplaceTask: /^\[[ xX]\] +/,
864
- listTaskCheckbox: /\[[ xX]\]/,
865
- anyLine: /\n.*\n/,
866
- hrefBrackets: /^<(.*)>$/,
867
- tableDelimiter: /[:|]/,
868
- tableAlignChars: /^\||\| *$/g,
869
- tableRowBlankLine: /\n[ \t]*$/,
870
- tableAlignRight: /^ *-+: *$/,
871
- tableAlignCenter: /^ *:-+: *$/,
872
- tableAlignLeft: /^ *:-+ *$/,
873
- startATag: /^<a /i,
874
- endATag: /^<\/a>/i,
875
- startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
876
- endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
877
- startAngleBracket: /^</,
878
- endAngleBracket: />$/,
879
- pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
880
- unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
881
- escapeTest: /[&<>"']/,
882
- escapeReplace: /[&<>"']/g,
883
- escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
884
- escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
885
- caret: /(^|[^\[])\^/g,
886
- percentDecode: /%25/g,
887
- findPipe: /\|/g,
888
- splitPipe: / \|/,
889
- slashPipe: /\\\|/g,
890
- carriageReturn: /\r\n|\r/g,
891
- spaceLine: /^ +$/gm,
892
- notSpaceStart: /^\S*/,
893
- endingNewline: /\n$/,
894
- listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
895
- nextBulletRegex: mt((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
896
- hrRegex: mt((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
897
- fencesBeginRegex: mt((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
898
- headingBeginRegex: mt((e) => RegExp(`^ {0,${e}}#`)),
899
- htmlBeginRegex: mt((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
900
- blockquoteBeginRegex: mt((e) => RegExp(`^ {0,${e}}>`))
901
- }, j = /^(?:[ \t]*(?:\n|$))+/, gt = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, M = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, _t = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, N = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, P = / {0,3}(?:[*+-]|\d{1,9}[.)])/, vt = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, F = k(vt).replace(/bull/g, P).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(), yt = k(vt).replace(/bull/g, P).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(), bt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, xt = /^[^\n]+/, St = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, I = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", St).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), L = k(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, P).getRegex(), R = "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", Ct = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, wt = k("^ {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", Ct).replace("tag", R).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Tt = k(bt).replace("hr", _t).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", R).getRegex(), Et = {
902
- blockquote: k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Tt).getRegex(),
903
- code: gt,
904
- def: I,
905
- fences: M,
906
- heading: N,
907
- hr: _t,
908
- html: wt,
909
- lheading: F,
910
- list: L,
911
- newline: j,
912
- paragraph: Tt,
913
- table: pt,
914
- text: xt
915
- }, Dt = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", _t).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", R).getRegex(), Ot = {
916
- ...Et,
917
- lheading: yt,
918
- table: Dt,
919
- paragraph: k(bt).replace("hr", _t).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Dt).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", R).getRegex()
920
- }, kt = {
921
- ...Et,
922
- html: k("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Ct).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(),
923
- def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
924
- heading: /^(#{1,6})(.*)(?:\n+|$)/,
925
- fences: pt,
926
- lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
927
- paragraph: k(bt).replace("hr", _t).replace("heading", " *#{1,6} *[^\n]").replace("lheading", F).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
928
- }, At = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, jt = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Mt = /^( {2,}|\\)\n(?!\s*$)/, Nt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, z = /[\p{P}\p{S}]/u, B = /[\s\p{P}\p{S}]/u, V = /[^\s\p{P}\p{S}]/u, Pt = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, B).getRegex(), Ft = /(?!~)[\p{P}\p{S}]/u, It = /(?!~)[\s\p{P}\p{S}]/u, Lt = /(?:[^\s\p{P}\p{S}]|~)/u, Rt = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ht ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), zt = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Bt = k(zt, "u").replace(/punct/g, z).getRegex(), H = k(zt, "u").replace(/punct/g, Ft).getRegex(), Vt = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ht = k(Vt, "gu").replace(/notPunctSpace/g, V).replace(/punctSpace/g, B).replace(/punct/g, z).getRegex(), Ut = k(Vt, "gu").replace(/notPunctSpace/g, Lt).replace(/punctSpace/g, It).replace(/punct/g, Ft).getRegex(), Wt = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, V).replace(/punctSpace/g, B).replace(/punct/g, z).getRegex(), Gt = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex(), Kt = k("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, V).replace(/punctSpace/g, B).replace(/punct/g, z).getRegex(), qt = k(/\\(punct)/, "gu").replace(/punct/g, z).getRegex(), Jt = k(/^<(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(), Yt = k(Ct).replace("(?:-->|$)", "-->").getRegex(), Xt = k("^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", Yt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Zt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, U = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Zt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Qt = k(/^!?\[(label)\]\[(ref)\]/).replace("label", Zt).replace("ref", St).getRegex(), $t = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", St).getRegex(), en = k("reflink|nolink(?!\\()", "g").replace("reflink", Qt).replace("nolink", $t).getRegex(), tn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nn = {
929
- _backpedal: pt,
930
- anyPunctuation: qt,
931
- autolink: Jt,
932
- blockSkip: Rt,
933
- br: Mt,
934
- code: jt,
935
- del: pt,
936
- delLDelim: pt,
937
- delRDelim: pt,
938
- emStrongLDelim: Bt,
939
- emStrongRDelimAst: Ht,
940
- emStrongRDelimUnd: Wt,
941
- escape: At,
942
- link: U,
943
- nolink: $t,
944
- punctuation: Pt,
945
- reflink: Qt,
946
- reflinkSearch: en,
947
- tag: Xt,
948
- text: Nt,
949
- url: pt
950
- }, rn = {
951
- ...nn,
952
- link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", Zt).getRegex(),
953
- reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Zt).getRegex()
954
- }, an = {
955
- ...nn,
956
- emStrongRDelimAst: Ut,
957
- emStrongLDelim: H,
958
- delLDelim: Gt,
959
- delRDelim: Kt,
960
- url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", tn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
961
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
962
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
963
- text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", tn).getRegex()
964
- }, on = {
965
- ...an,
966
- br: k(Mt).replace("{2,}", "*").getRegex(),
967
- text: k(an.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
968
- }, sn = {
969
- normal: Et,
970
- gfm: Ot,
971
- pedantic: kt
972
- }, cn = {
973
- normal: nn,
974
- gfm: an,
975
- breaks: on,
976
- pedantic: rn
977
- }, ln = {
978
- "&": "&amp;",
979
- "<": "&lt;",
980
- ">": "&gt;",
981
- "\"": "&quot;",
982
- "'": "&#39;"
983
- }, un = (e) => ln[e];
984
- function W(e, t) {
985
- if (t) {
986
- if (A.escapeTest.test(e)) return e.replace(A.escapeReplace, un);
987
- } else if (A.escapeTestNoEncode.test(e)) return e.replace(A.escapeReplaceNoEncode, un);
988
- return e;
989
- }
990
- function dn(e) {
991
- try {
992
- e = encodeURI(e).replace(A.percentDecode, "%");
993
- } catch {
994
- return null;
995
- }
996
- return e;
997
- }
998
- function fn(e, t) {
999
- let n = e.replace(A.findPipe, (e, t, n) => {
1000
- let r = !1, i = t;
1001
- for (; --i >= 0 && n[i] === "\\";) r = !r;
1002
- return r ? "|" : " |";
1003
- }).split(A.splitPipe), r = 0;
1004
- if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
1005
- else for (; n.length < t;) n.push("");
1006
- for (; r < n.length; r++) n[r] = n[r].trim().replace(A.slashPipe, "|");
1007
- return n;
1008
- }
1009
- function G(e, t, n) {
1010
- let r = e.length;
1011
- if (r === 0) return "";
1012
- let i = 0;
1013
- for (; i < r;) {
1014
- let a = e.charAt(r - i - 1);
1015
- if (a === t && !n) i++;
1016
- else if (a !== t && n) i++;
1017
- else break;
1018
- }
1019
- return e.slice(0, r - i);
1020
- }
1021
- function pn(e) {
1022
- let t = e.split("\n"), n = t.length - 1;
1023
- for (; n >= 0 && A.blankLine.test(t[n]);) n--;
1024
- return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
1025
- }
1026
- function mn(e, t) {
1027
- if (e.indexOf(t[1]) === -1) return -1;
1028
- let n = 0;
1029
- for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
1030
- else if (e[r] === t[0]) n++;
1031
- else if (e[r] === t[1] && (n--, n < 0)) return r;
1032
- return n > 0 ? -2 : -1;
1033
- }
1034
- function hn(e, t = 0) {
1035
- let n = t, r = "";
1036
- for (let t of e) if (t === " ") {
1037
- let e = 4 - n % 4;
1038
- r += " ".repeat(e), n += e;
1039
- } else r += t, n++;
1040
- return r;
1041
- }
1042
- function gn(e, t, n, r, i) {
1043
- let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
1044
- r.state.inLink = !0;
1045
- let c = {
1046
- type: e[0].charAt(0) === "!" ? "image" : "link",
1047
- raw: n,
1048
- href: a,
1049
- title: o,
1050
- text: s,
1051
- tokens: r.inlineTokens(s)
1052
- };
1053
- return r.state.inLink = !1, c;
1054
- }
1055
- function _n(e, t, n) {
1056
- let r = e.match(n.other.indentCodeCompensation);
1057
- if (r === null) return t;
1058
- let i = r[1];
1059
- return t.split("\n").map((e) => {
1060
- let t = e.match(n.other.beginningSpace);
1061
- if (t === null) return e;
1062
- let [r] = t;
1063
- return r.length >= i.length ? e.slice(i.length) : e;
1064
- }).join("\n");
1065
- }
1066
- var K = class {
1067
- options;
1068
- rules;
1069
- lexer;
1070
- constructor(e) {
1071
- this.options = e || dt;
1072
- }
1073
- space(e) {
1074
- let t = this.rules.block.newline.exec(e);
1075
- if (t && t[0].length > 0) return {
1076
- type: "space",
1077
- raw: t[0]
1078
- };
1079
- }
1080
- code(e) {
1081
- let t = this.rules.block.code.exec(e);
1082
- if (t) {
1083
- let e = this.options.pedantic ? t[0] : pn(t[0]);
1084
- return {
1085
- type: "code",
1086
- raw: e,
1087
- codeBlockStyle: "indented",
1088
- text: e.replace(this.rules.other.codeRemoveIndent, "")
1089
- };
1090
- }
1091
- }
1092
- fences(e) {
1093
- let t = this.rules.block.fences.exec(e);
1094
- if (t) {
1095
- let e = t[0], n = _n(e, t[3] || "", this.rules);
1096
- return {
1097
- type: "code",
1098
- raw: e,
1099
- lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
1100
- text: n
1101
- };
1102
- }
1103
- }
1104
- heading(e) {
1105
- let t = this.rules.block.heading.exec(e);
1106
- if (t) {
1107
- let e = t[2].trim();
1108
- if (this.rules.other.endingHash.test(e)) {
1109
- let t = G(e, "#");
1110
- (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
1111
- }
1112
- return {
1113
- type: "heading",
1114
- raw: G(t[0], "\n"),
1115
- depth: t[1].length,
1116
- text: e,
1117
- tokens: this.lexer.inline(e)
1118
- };
1119
- }
1120
- }
1121
- hr(e) {
1122
- let t = this.rules.block.hr.exec(e);
1123
- if (t) return {
1124
- type: "hr",
1125
- raw: G(t[0], "\n")
1126
- };
1127
- }
1128
- blockquote(e) {
1129
- let t = this.rules.block.blockquote.exec(e);
1130
- if (t) {
1131
- let e = G(t[0], "\n").split("\n"), n = "", r = "", i = [];
1132
- for (; e.length > 0;) {
1133
- let t = !1, a = [], o;
1134
- for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1135
- else if (!t) a.push(e[o]);
1136
- else break;
1137
- e = e.slice(o);
1138
- let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1139
- n = n ? `${n}
1140
- ${s}` : s, r = r ? `${r}
1141
- ${c}` : c;
1142
- let l = this.lexer.state.top;
1143
- if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
1144
- let u = i.at(-1);
1145
- if (u?.type === "code") break;
1146
- if (u?.type === "blockquote") {
1147
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
1148
- 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;
1149
- break;
1150
- } else if (u?.type === "list") {
1151
- let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
1152
- 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");
1153
- continue;
1154
- }
1155
- }
1156
- return {
1157
- type: "blockquote",
1158
- raw: n,
1159
- tokens: i,
1160
- text: r
1161
- };
1162
- }
1163
- }
1164
- list(e) {
1165
- let t = this.rules.block.list.exec(e);
1166
- if (t) {
1167
- let n = t[1].trim(), r = n.length > 1, i = {
1168
- type: "list",
1169
- raw: "",
1170
- ordered: r,
1171
- start: r ? +n.slice(0, -1) : "",
1172
- loose: !1,
1173
- items: []
1174
- };
1175
- n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
1176
- let a = this.rules.other.listItemRegex(n), o = !1;
1177
- for (; e;) {
1178
- let n = !1, r = "", s = "";
1179
- if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
1180
- r = t[0], e = e.substring(r.length);
1181
- let c = hn(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
1182
- 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) {
1183
- 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);
1184
- for (; e;) {
1185
- let f = e.split("\n", 1)[0], p;
1186
- if (l = f, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), p = l) : p = 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;
1187
- if (p.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + p.slice(d);
1188
- else {
1189
- if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
1190
- s += "\n" + l;
1191
- }
1192
- u = !l.trim(), r += f + "\n", e = e.substring(f.length + 1), c = p.slice(d);
1193
- }
1194
- }
1195
- i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
1196
- type: "list_item",
1197
- raw: r,
1198
- task: !!this.options.gfm && this.rules.other.listIsTask.test(s),
1199
- loose: !1,
1200
- text: s,
1201
- tokens: []
1202
- }), i.raw += r;
1203
- }
1204
- let s = i.items.at(-1);
1205
- if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1206
- else return;
1207
- i.raw = i.raw.trimEnd();
1208
- for (let e of i.items) {
1209
- this.lexer.state.top = !1, e.tokens = this.lexer.blockTokens(e.text, []);
1210
- let t = e.tokens[0];
1211
- if (e.task && (t?.type === "text" || t?.type === "paragraph")) {
1212
- 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, "");
1213
- for (let e = this.lexer.inlineQueue.length - 1; e >= 0; e--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)) {
1214
- this.lexer.inlineQueue[e].src = this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask, "");
1215
- break;
1216
- }
1217
- let n = this.rules.other.listTaskCheckbox.exec(e.raw);
1218
- if (n) {
1219
- let t = {
1220
- type: "checkbox",
1221
- raw: n[0] + " ",
1222
- checked: n[0] !== "[ ]"
1223
- };
1224
- 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({
1225
- type: "paragraph",
1226
- raw: t.raw,
1227
- text: t.raw,
1228
- tokens: [t]
1229
- }) : e.tokens.unshift(t);
1230
- }
1231
- } else e.task &&= !1;
1232
- if (!i.loose) {
1233
- let t = e.tokens.filter((e) => e.type === "space");
1234
- i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
1235
- }
1236
- }
1237
- if (i.loose) for (let e of i.items) {
1238
- e.loose = !0;
1239
- for (let t of e.tokens) t.type === "text" && (t.type = "paragraph");
1240
- }
1241
- return i;
1242
- }
1243
- }
1244
- html(e) {
1245
- let t = this.rules.block.html.exec(e);
1246
- if (t) {
1247
- let e = pn(t[0]);
1248
- return {
1249
- type: "html",
1250
- block: !0,
1251
- raw: e,
1252
- pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
1253
- text: e
1254
- };
1255
- }
1256
- }
1257
- def(e) {
1258
- let t = this.rules.block.def.exec(e);
1259
- if (t) {
1260
- 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];
1261
- return {
1262
- type: "def",
1263
- tag: e,
1264
- raw: G(t[0], "\n"),
1265
- href: n,
1266
- title: r
1267
- };
1268
- }
1269
- }
1270
- table(e) {
1271
- let t = this.rules.block.table.exec(e);
1272
- if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1273
- let n = fn(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 = {
1274
- type: "table",
1275
- raw: G(t[0], "\n"),
1276
- header: [],
1277
- align: [],
1278
- rows: []
1279
- };
1280
- if (n.length === r.length) {
1281
- 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);
1282
- for (let e = 0; e < n.length; e++) a.header.push({
1283
- text: n[e],
1284
- tokens: this.lexer.inline(n[e]),
1285
- header: !0,
1286
- align: a.align[e]
1287
- });
1288
- for (let e of i) a.rows.push(fn(e, a.header.length).map((e, t) => ({
1289
- text: e,
1290
- tokens: this.lexer.inline(e),
1291
- header: !1,
1292
- align: a.align[t]
1293
- })));
1294
- return a;
1295
- }
1296
- }
1297
- lheading(e) {
1298
- let t = this.rules.block.lheading.exec(e);
1299
- if (t) {
1300
- let e = t[1].trim();
1301
- return {
1302
- type: "heading",
1303
- raw: G(t[0], "\n"),
1304
- depth: t[2].charAt(0) === "=" ? 1 : 2,
1305
- text: e,
1306
- tokens: this.lexer.inline(e)
1307
- };
1308
- }
1309
- }
1310
- paragraph(e) {
1311
- let t = this.rules.block.paragraph.exec(e);
1312
- if (t) {
1313
- let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
1314
- return {
1315
- type: "paragraph",
1316
- raw: t[0],
1317
- text: e,
1318
- tokens: this.lexer.inline(e)
1319
- };
1320
- }
1321
- }
1322
- text(e) {
1323
- let t = this.rules.block.text.exec(e);
1324
- if (t) return {
1325
- type: "text",
1326
- raw: t[0],
1327
- text: t[0],
1328
- tokens: this.lexer.inline(t[0])
1329
- };
1330
- }
1331
- escape(e) {
1332
- let t = this.rules.inline.escape.exec(e);
1333
- if (t) return {
1334
- type: "escape",
1335
- raw: t[0],
1336
- text: t[1]
1337
- };
1338
- }
1339
- tag(e) {
1340
- let t = this.rules.inline.tag.exec(e);
1341
- 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), {
1342
- type: "html",
1343
- raw: t[0],
1344
- inLink: this.lexer.state.inLink,
1345
- inRawBlock: this.lexer.state.inRawBlock,
1346
- block: !1,
1347
- text: t[0]
1348
- };
1349
- }
1350
- link(e) {
1351
- let t = this.rules.inline.link.exec(e);
1352
- if (t) {
1353
- let e = t[2].trim();
1354
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
1355
- if (!this.rules.other.endAngleBracket.test(e)) return;
1356
- let t = G(e.slice(0, -1), "\\");
1357
- if ((e.length - t.length) % 2 == 0) return;
1358
- } else {
1359
- let e = mn(t[2], "()");
1360
- if (e === -2) return;
1361
- if (e > -1) {
1362
- let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
1363
- t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
1364
- }
1365
- }
1366
- let n = t[2], r = "";
1367
- if (this.options.pedantic) {
1368
- let e = this.rules.other.pedanticHrefTitle.exec(n);
1369
- e && (n = e[1], r = e[3]);
1370
- } else r = t[3] ? t[3].slice(1, -1) : "";
1371
- 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)), gn(t, {
1372
- href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
1373
- title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
1374
- }, t[0], this.lexer, this.rules);
1375
- }
1376
- }
1377
- reflink(e, t) {
1378
- let n;
1379
- if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1380
- let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
1381
- if (!e) {
1382
- let e = n[0].charAt(0);
1383
- return {
1384
- type: "text",
1385
- raw: e,
1386
- text: e
1387
- };
1388
- }
1389
- return gn(n, e, n[0], this.lexer, this.rules);
1390
- }
1391
- }
1392
- emStrong(e, t, n = "") {
1393
- let r = this.rules.inline.emStrongLDelim.exec(e);
1394
- 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))) {
1395
- let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1396
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) !== null;) {
1397
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
1398
- if (a = [...i].length, r[3] || r[4]) {
1399
- o += a;
1400
- continue;
1401
- } else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
1402
- s += a;
1403
- continue;
1404
- }
1405
- if (o -= a, o > 0) continue;
1406
- a = Math.min(a, a + o + s);
1407
- let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
1408
- if (Math.min(n, a) % 2) {
1409
- let e = c.slice(1, -1);
1410
- return {
1411
- type: "em",
1412
- raw: c,
1413
- text: e,
1414
- tokens: this.lexer.inlineTokens(e)
1415
- };
1416
- }
1417
- let l = c.slice(2, -2);
1418
- return {
1419
- type: "strong",
1420
- raw: c,
1421
- text: l,
1422
- tokens: this.lexer.inlineTokens(l)
1423
- };
1424
- }
1425
- }
1426
- }
1427
- codespan(e) {
1428
- let t = this.rules.inline.code.exec(e);
1429
- if (t) {
1430
- 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);
1431
- return n && r && (e = e.substring(1, e.length - 1)), {
1432
- type: "codespan",
1433
- raw: t[0],
1434
- text: e
1435
- };
1436
- }
1437
- }
1438
- br(e) {
1439
- let t = this.rules.inline.br.exec(e);
1440
- if (t) return {
1441
- type: "br",
1442
- raw: t[0]
1443
- };
1444
- }
1445
- del(e, t, n = "") {
1446
- let r = this.rules.inline.delLDelim.exec(e);
1447
- if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
1448
- let n = [...r[0]].length - 1, i, a, o = n, s = this.rules.inline.delRDelim;
1449
- for (s.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = s.exec(t)) !== null;) {
1450
- if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i || (a = [...i].length, a !== n)) continue;
1451
- if (r[3] || r[4]) {
1452
- o += a;
1453
- continue;
1454
- }
1455
- if (o -= a, o > 0) continue;
1456
- a = Math.min(a, a + o);
1457
- let t = [...r[0]][0].length, s = e.slice(0, n + r.index + t + a), c = s.slice(n, -n);
1458
- return {
1459
- type: "del",
1460
- raw: s,
1461
- text: c,
1462
- tokens: this.lexer.inlineTokens(c)
1463
- };
1464
- }
1465
- }
1466
- }
1467
- autolink(e) {
1468
- let t = this.rules.inline.autolink.exec(e);
1469
- if (t) {
1470
- let e, n;
1471
- return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
1472
- type: "link",
1473
- raw: t[0],
1474
- text: e,
1475
- href: n,
1476
- tokens: [{
1477
- type: "text",
1478
- raw: e,
1479
- text: e
1480
- }]
1481
- };
1482
- }
1483
- }
1484
- url(e) {
1485
- let t;
1486
- if (t = this.rules.inline.url.exec(e)) {
1487
- let e, n;
1488
- if (t[2] === "@") e = t[0], n = "mailto:" + e;
1489
- else {
1490
- let r;
1491
- do
1492
- r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
1493
- while (r !== t[0]);
1494
- e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
1495
- }
1496
- return {
1497
- type: "link",
1498
- raw: t[0],
1499
- text: e,
1500
- href: n,
1501
- tokens: [{
1502
- type: "text",
1503
- raw: e,
1504
- text: e
1505
- }]
1506
- };
1507
- }
1508
- }
1509
- inlineText(e) {
1510
- let t = this.rules.inline.text.exec(e);
1511
- if (t) {
1512
- let e = this.lexer.state.inRawBlock;
1513
- return {
1514
- type: "text",
1515
- raw: t[0],
1516
- text: t[0],
1517
- escaped: e
1518
- };
1519
- }
1520
- }
1521
- }, q = class e {
1522
- tokens;
1523
- options;
1524
- state;
1525
- inlineQueue;
1526
- tokenizer;
1527
- constructor(e) {
1528
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || dt, this.options.tokenizer = this.options.tokenizer || new K(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1529
- inLink: !1,
1530
- inRawBlock: !1,
1531
- top: !0
1532
- };
1533
- let t = {
1534
- other: A,
1535
- block: sn.normal,
1536
- inline: cn.normal
1537
- };
1538
- this.options.pedantic ? (t.block = sn.pedantic, t.inline = cn.pedantic) : this.options.gfm && (t.block = sn.gfm, this.options.breaks ? t.inline = cn.breaks : t.inline = cn.gfm), this.tokenizer.rules = t;
1539
- }
1540
- static get rules() {
1541
- return {
1542
- block: sn,
1543
- inline: cn
1544
- };
1545
- }
1546
- static lex(t, n) {
1547
- return new e(n).lex(t);
1548
- }
1549
- static lexInline(t, n) {
1550
- return new e(n).inlineTokens(t);
1551
- }
1552
- lex(e) {
1553
- e = e.replace(A.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
1554
- for (let e = 0; e < this.inlineQueue.length; e++) {
1555
- let t = this.inlineQueue[e];
1556
- this.inlineTokens(t.src, t.tokens);
1557
- }
1558
- return this.inlineQueue = [], this.tokens;
1559
- }
1560
- blockTokens(e, t = [], n = !1) {
1561
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(A.tabCharGlobal, " ").replace(A.spaceLine, ""));
1562
- let r = Infinity;
1563
- for (; e;) {
1564
- if (e.length < r) r = e.length;
1565
- else {
1566
- this.infiniteLoopError(e.charCodeAt(0));
1567
- break;
1568
- }
1569
- let i;
1570
- 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;
1571
- if (i = this.tokenizer.space(e)) {
1572
- e = e.substring(i.raw.length);
1573
- let n = t.at(-1);
1574
- i.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(i);
1575
- continue;
1576
- }
1577
- if (i = this.tokenizer.code(e)) {
1578
- e = e.substring(i.raw.length);
1579
- let n = t.at(-1);
1580
- 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);
1581
- continue;
1582
- }
1583
- if (i = this.tokenizer.fences(e)) {
1584
- e = e.substring(i.raw.length), t.push(i);
1585
- continue;
1586
- }
1587
- if (i = this.tokenizer.heading(e)) {
1588
- e = e.substring(i.raw.length), t.push(i);
1589
- continue;
1590
- }
1591
- if (i = this.tokenizer.hr(e)) {
1592
- e = e.substring(i.raw.length), t.push(i);
1593
- continue;
1594
- }
1595
- if (i = this.tokenizer.blockquote(e)) {
1596
- e = e.substring(i.raw.length), t.push(i);
1597
- continue;
1598
- }
1599
- if (i = this.tokenizer.list(e)) {
1600
- e = e.substring(i.raw.length), t.push(i);
1601
- continue;
1602
- }
1603
- if (i = this.tokenizer.html(e)) {
1604
- e = e.substring(i.raw.length), t.push(i);
1605
- continue;
1606
- }
1607
- if (i = this.tokenizer.def(e)) {
1608
- e = e.substring(i.raw.length);
1609
- let n = t.at(-1);
1610
- 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] = {
1611
- href: i.href,
1612
- title: i.title
1613
- }, t.push(i));
1614
- continue;
1615
- }
1616
- if (i = this.tokenizer.table(e)) {
1617
- e = e.substring(i.raw.length), t.push(i);
1618
- continue;
1619
- }
1620
- if (i = this.tokenizer.lheading(e)) {
1621
- e = e.substring(i.raw.length), t.push(i);
1622
- continue;
1623
- }
1624
- let a = e;
1625
- if (this.options.extensions?.startBlock) {
1626
- let t = Infinity, n = e.slice(1), r;
1627
- this.options.extensions.startBlock.forEach((e) => {
1628
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1629
- }), t < Infinity && t >= 0 && (a = e.substring(0, t + 1));
1630
- }
1631
- if (this.state.top && (i = this.tokenizer.paragraph(a))) {
1632
- let r = t.at(-1);
1633
- 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);
1634
- continue;
1635
- }
1636
- if (i = this.tokenizer.text(e)) {
1637
- e = e.substring(i.raw.length);
1638
- let n = t.at(-1);
1639
- 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);
1640
- continue;
1641
- }
1642
- if (e) {
1643
- this.infiniteLoopError(e.charCodeAt(0));
1644
- break;
1645
- }
1646
- }
1647
- return this.state.top = !0, t;
1648
- }
1649
- inline(e, t = []) {
1650
- return this.inlineQueue.push({
1651
- src: e,
1652
- tokens: t
1653
- }), t;
1654
- }
1655
- inlineTokens(e, t = []) {
1656
- this.tokenizer.lexer = this;
1657
- let n = e, r = null;
1658
- if (this.tokens.links) {
1659
- let e = Object.keys(this.tokens.links);
1660
- 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));
1661
- }
1662
- for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1663
- let i;
1664
- 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);
1665
- n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
1666
- let a = !1, o = "", s = Infinity;
1667
- for (; e;) {
1668
- if (e.length < s) s = e.length;
1669
- else {
1670
- this.infiniteLoopError(e.charCodeAt(0));
1671
- break;
1672
- }
1673
- a || (o = ""), a = !1;
1674
- let r;
1675
- 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;
1676
- if (r = this.tokenizer.escape(e)) {
1677
- e = e.substring(r.raw.length), t.push(r);
1678
- continue;
1679
- }
1680
- if (r = this.tokenizer.tag(e)) {
1681
- e = e.substring(r.raw.length), t.push(r);
1682
- continue;
1683
- }
1684
- if (r = this.tokenizer.link(e)) {
1685
- e = e.substring(r.raw.length), t.push(r);
1686
- continue;
1687
- }
1688
- if (r = this.tokenizer.reflink(e, this.tokens.links)) {
1689
- e = e.substring(r.raw.length);
1690
- let n = t.at(-1);
1691
- r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1692
- continue;
1693
- }
1694
- if (r = this.tokenizer.emStrong(e, n, o)) {
1695
- e = e.substring(r.raw.length), t.push(r);
1696
- continue;
1697
- }
1698
- if (r = this.tokenizer.codespan(e)) {
1699
- e = e.substring(r.raw.length), t.push(r);
1700
- continue;
1701
- }
1702
- if (r = this.tokenizer.br(e)) {
1703
- e = e.substring(r.raw.length), t.push(r);
1704
- continue;
1705
- }
1706
- if (r = this.tokenizer.del(e, n, o)) {
1707
- e = e.substring(r.raw.length), t.push(r);
1708
- continue;
1709
- }
1710
- if (r = this.tokenizer.autolink(e)) {
1711
- e = e.substring(r.raw.length), t.push(r);
1712
- continue;
1713
- }
1714
- if (!this.state.inLink && (r = this.tokenizer.url(e))) {
1715
- e = e.substring(r.raw.length), t.push(r);
1716
- continue;
1717
- }
1718
- let i = e;
1719
- if (this.options.extensions?.startInline) {
1720
- let t = Infinity, n = e.slice(1), r;
1721
- this.options.extensions.startInline.forEach((e) => {
1722
- r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
1723
- }), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
1724
- }
1725
- if (r = this.tokenizer.inlineText(i)) {
1726
- e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
1727
- let n = t.at(-1);
1728
- n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
1729
- continue;
1730
- }
1731
- if (e) {
1732
- this.infiniteLoopError(e.charCodeAt(0));
1733
- break;
1734
- }
1735
- }
1736
- return t;
1737
- }
1738
- infiniteLoopError(e) {
1739
- let t = "Infinite loop on byte: " + e;
1740
- if (this.options.silent) console.error(t);
1741
- else throw Error(t);
1742
- }
1743
- }, J = class {
1744
- options;
1745
- parser;
1746
- constructor(e) {
1747
- this.options = e || dt;
1748
- }
1749
- space(e) {
1750
- return "";
1751
- }
1752
- code({ text: e, lang: t, escaped: n }) {
1753
- let r = (t || "").match(A.notSpaceStart)?.[0], i = e.replace(A.endingNewline, "") + "\n";
1754
- return r ? "<pre><code class=\"language-" + W(r) + "\">" + (n ? i : W(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : W(i, !0)) + "</code></pre>\n";
1755
- }
1756
- blockquote({ tokens: e }) {
1757
- return `<blockquote>
1758
- ${this.parser.parse(e)}</blockquote>
1759
- `;
1760
- }
1761
- html({ text: e }) {
1762
- return e;
1763
- }
1764
- def(e) {
1765
- return "";
1766
- }
1767
- heading({ tokens: e, depth: t }) {
1768
- return `<h${t}>${this.parser.parseInline(e)}</h${t}>
1769
- `;
1770
- }
1771
- hr(e) {
1772
- return "<hr>\n";
1773
- }
1774
- list(e) {
1775
- let t = e.ordered, n = e.start, r = "";
1776
- for (let t = 0; t < e.items.length; t++) {
1777
- let n = e.items[t];
1778
- r += this.listitem(n);
1779
- }
1780
- let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
1781
- return "<" + i + a + ">\n" + r + "</" + i + ">\n";
1782
- }
1783
- listitem(e) {
1784
- return `<li>${this.parser.parse(e.tokens)}</li>
1785
- `;
1786
- }
1787
- checkbox({ checked: e }) {
1788
- return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\"> ";
1789
- }
1790
- paragraph({ tokens: e }) {
1791
- return `<p>${this.parser.parseInline(e)}</p>
1792
- `;
1793
- }
1794
- table(e) {
1795
- let t = "", n = "";
1796
- for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
1797
- t += this.tablerow({ text: n });
1798
- let r = "";
1799
- for (let t = 0; t < e.rows.length; t++) {
1800
- let i = e.rows[t];
1801
- n = "";
1802
- for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
1803
- r += this.tablerow({ text: n });
1804
- }
1805
- return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
1806
- }
1807
- tablerow({ text: e }) {
1808
- return `<tr>
1809
- ${e}</tr>
1810
- `;
1811
- }
1812
- tablecell(e) {
1813
- let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
1814
- return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
1815
- `;
1816
- }
1817
- strong({ tokens: e }) {
1818
- return `<strong>${this.parser.parseInline(e)}</strong>`;
1819
- }
1820
- em({ tokens: e }) {
1821
- return `<em>${this.parser.parseInline(e)}</em>`;
1822
- }
1823
- codespan({ text: e }) {
1824
- return `<code>${W(e, !0)}</code>`;
1825
- }
1826
- br(e) {
1827
- return "<br>";
1828
- }
1829
- del({ tokens: e }) {
1830
- return `<del>${this.parser.parseInline(e)}</del>`;
1831
- }
1832
- link({ href: e, title: t, tokens: n }) {
1833
- let r = this.parser.parseInline(n), i = dn(e);
1834
- if (i === null) return r;
1835
- e = i;
1836
- let a = "<a href=\"" + e + "\"";
1837
- return t && (a += " title=\"" + W(t) + "\""), a += ">" + r + "</a>", a;
1838
- }
1839
- image({ href: e, title: t, text: n, tokens: r }) {
1840
- r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1841
- let i = dn(e);
1842
- if (i === null) return W(n);
1843
- e = i;
1844
- let a = `<img src="${e}" alt="${W(n)}"`;
1845
- return t && (a += ` title="${W(t)}"`), a += ">", a;
1846
- }
1847
- text(e) {
1848
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : W(e.text);
1849
- }
1850
- }, vn = class {
1851
- strong({ text: e }) {
1852
- return e;
1853
- }
1854
- em({ text: e }) {
1855
- return e;
1856
- }
1857
- codespan({ text: e }) {
1858
- return e;
1859
- }
1860
- del({ text: e }) {
1861
- return e;
1862
- }
1863
- html({ text: e }) {
1864
- return e;
1865
- }
1866
- text({ text: e }) {
1867
- return e;
1868
- }
1869
- link({ text: e }) {
1870
- return "" + e;
1871
- }
1872
- image({ text: e }) {
1873
- return "" + e;
1874
- }
1875
- br() {
1876
- return "";
1877
- }
1878
- checkbox({ raw: e }) {
1879
- return e;
1880
- }
1881
- }, Y = class e {
1882
- options;
1883
- renderer;
1884
- textRenderer;
1885
- constructor(e) {
1886
- this.options = e || dt, 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 vn();
1887
- }
1888
- static parse(t, n) {
1889
- return new e(n).parse(t);
1890
- }
1891
- static parseInline(t, n) {
1892
- return new e(n).parseInline(t);
1893
- }
1894
- parse(e) {
1895
- this.renderer.parser = this;
1896
- let t = "";
1897
- for (let n = 0; n < e.length; n++) {
1898
- let r = e[n];
1899
- if (this.options.extensions?.renderers?.[r.type]) {
1900
- let e = r, n = this.options.extensions.renderers[e.type].call({ parser: this }, e);
1901
- if (n !== !1 || ![
1902
- "space",
1903
- "hr",
1904
- "heading",
1905
- "code",
1906
- "table",
1907
- "blockquote",
1908
- "list",
1909
- "html",
1910
- "def",
1911
- "paragraph",
1912
- "text"
1913
- ].includes(e.type)) {
1914
- t += n || "";
1915
- continue;
1916
- }
1917
- }
1918
- let i = r;
1919
- switch (i.type) {
1920
- case "space":
1921
- t += this.renderer.space(i);
1922
- break;
1923
- case "hr":
1924
- t += this.renderer.hr(i);
1925
- break;
1926
- case "heading":
1927
- t += this.renderer.heading(i);
1928
- break;
1929
- case "code":
1930
- t += this.renderer.code(i);
1931
- break;
1932
- case "table":
1933
- t += this.renderer.table(i);
1934
- break;
1935
- case "blockquote":
1936
- t += this.renderer.blockquote(i);
1937
- break;
1938
- case "list":
1939
- t += this.renderer.list(i);
1940
- break;
1941
- case "checkbox":
1942
- t += this.renderer.checkbox(i);
1943
- break;
1944
- case "html":
1945
- t += this.renderer.html(i);
1946
- break;
1947
- case "def":
1948
- t += this.renderer.def(i);
1949
- break;
1950
- case "paragraph":
1951
- t += this.renderer.paragraph(i);
1952
- break;
1953
- case "text":
1954
- t += this.renderer.text(i);
1955
- break;
1956
- default: {
1957
- let e = "Token with \"" + i.type + "\" type was not found.";
1958
- if (this.options.silent) return console.error(e), "";
1959
- throw Error(e);
1960
- }
1961
- }
1962
- }
1963
- return t;
1964
- }
1965
- parseInline(e, t = this.renderer) {
1966
- this.renderer.parser = this;
1967
- let n = "";
1968
- for (let r = 0; r < e.length; r++) {
1969
- let i = e[r];
1970
- if (this.options.extensions?.renderers?.[i.type]) {
1971
- let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
1972
- if (e !== !1 || ![
1973
- "escape",
1974
- "html",
1975
- "link",
1976
- "image",
1977
- "strong",
1978
- "em",
1979
- "codespan",
1980
- "br",
1981
- "del",
1982
- "text"
1983
- ].includes(i.type)) {
1984
- n += e || "";
1985
- continue;
1986
- }
1987
- }
1988
- let a = i;
1989
- switch (a.type) {
1990
- case "escape":
1991
- n += t.text(a);
1992
- break;
1993
- case "html":
1994
- n += t.html(a);
1995
- break;
1996
- case "link":
1997
- n += t.link(a);
1998
- break;
1999
- case "image":
2000
- n += t.image(a);
2001
- break;
2002
- case "checkbox":
2003
- n += t.checkbox(a);
2004
- break;
2005
- case "strong":
2006
- n += t.strong(a);
2007
- break;
2008
- case "em":
2009
- n += t.em(a);
2010
- break;
2011
- case "codespan":
2012
- n += t.codespan(a);
2013
- break;
2014
- case "br":
2015
- n += t.br(a);
2016
- break;
2017
- case "del":
2018
- n += t.del(a);
2019
- break;
2020
- case "text":
2021
- n += t.text(a);
2022
- break;
2023
- default: {
2024
- let e = "Token with \"" + a.type + "\" type was not found.";
2025
- if (this.options.silent) return console.error(e), "";
2026
- throw Error(e);
2027
- }
2028
- }
2029
- }
2030
- return n;
2031
- }
2032
- }, yn = class {
2033
- options;
2034
- block;
2035
- constructor(e) {
2036
- this.options = e || dt;
2037
- }
2038
- static passThroughHooks = /* @__PURE__ */ new Set([
2039
- "preprocess",
2040
- "postprocess",
2041
- "processAllTokens",
2042
- "emStrongMask"
2043
- ]);
2044
- static passThroughHooksRespectAsync = /* @__PURE__ */ new Set([
2045
- "preprocess",
2046
- "postprocess",
2047
- "processAllTokens"
2048
- ]);
2049
- preprocess(e) {
2050
- return e;
2051
- }
2052
- postprocess(e) {
2053
- return e;
2054
- }
2055
- processAllTokens(e) {
2056
- return e;
2057
- }
2058
- emStrongMask(e) {
2059
- return e;
2060
- }
2061
- provideLexer(e = this.block) {
2062
- return e ? q.lex : q.lexInline;
2063
- }
2064
- provideParser(e = this.block) {
2065
- return e ? Y.parse : Y.parseInline;
2066
- }
2067
- }, X = new class {
2068
- defaults = ut();
2069
- options = this.setOptions;
2070
- parse = this.parseMarkdown(!0);
2071
- parseInline = this.parseMarkdown(!1);
2072
- Parser = Y;
2073
- Renderer = J;
2074
- TextRenderer = vn;
2075
- Lexer = q;
2076
- Tokenizer = K;
2077
- Hooks = yn;
2078
- constructor(...e) {
2079
- this.use(...e);
2080
- }
2081
- walkTokens(e, t) {
2082
- let n = [];
2083
- for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
2084
- case "table": {
2085
- let e = r;
2086
- for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
2087
- for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
2088
- break;
2089
- }
2090
- case "list": {
2091
- let e = r;
2092
- n = n.concat(this.walkTokens(e.items, t));
2093
- break;
2094
- }
2095
- default: {
2096
- let e = r;
2097
- this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2098
- let i = e[r].flat(Infinity);
2099
- n = n.concat(this.walkTokens(i, t));
2100
- }) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
2101
- }
2102
- }
2103
- return n;
2104
- }
2105
- use(...e) {
2106
- let t = this.defaults.extensions || {
2107
- renderers: {},
2108
- childTokens: {}
2109
- };
2110
- return e.forEach((e) => {
2111
- let n = { ...e };
2112
- if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
2113
- if (!e.name) throw Error("extension name required");
2114
- if ("renderer" in e) {
2115
- let n = t.renderers[e.name];
2116
- n ? t.renderers[e.name] = function(...t) {
2117
- let r = e.renderer.apply(this, t);
2118
- return r === !1 && (r = n.apply(this, t)), r;
2119
- } : t.renderers[e.name] = e.renderer;
2120
- }
2121
- if ("tokenizer" in e) {
2122
- if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
2123
- let n = t[e.level];
2124
- 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]));
2125
- }
2126
- "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2127
- }), n.extensions = t), e.renderer) {
2128
- let t = this.defaults.renderer || new J(this.defaults);
2129
- for (let n in e.renderer) {
2130
- if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2131
- if (["options", "parser"].includes(n)) continue;
2132
- let r = n, i = e.renderer[r], a = t[r];
2133
- t[r] = (...e) => {
2134
- let n = i.apply(t, e);
2135
- return n === !1 && (n = a.apply(t, e)), n || "";
2136
- };
2137
- }
2138
- n.renderer = t;
2139
- }
2140
- if (e.tokenizer) {
2141
- let t = this.defaults.tokenizer || new K(this.defaults);
2142
- for (let n in e.tokenizer) {
2143
- if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2144
- if ([
2145
- "options",
2146
- "rules",
2147
- "lexer"
2148
- ].includes(n)) continue;
2149
- let r = n, i = e.tokenizer[r], a = t[r];
2150
- t[r] = (...e) => {
2151
- let n = i.apply(t, e);
2152
- return n === !1 && (n = a.apply(t, e)), n;
2153
- };
2154
- }
2155
- n.tokenizer = t;
2156
- }
2157
- if (e.hooks) {
2158
- let t = this.defaults.hooks || new yn();
2159
- for (let n in e.hooks) {
2160
- if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2161
- if (["options", "block"].includes(n)) continue;
2162
- let r = n, i = e.hooks[r], a = t[r];
2163
- yn.passThroughHooks.has(n) ? t[r] = (e) => {
2164
- if (this.defaults.async && yn.passThroughHooksRespectAsync.has(n)) return (async () => {
2165
- let n = await i.call(t, e);
2166
- return a.call(t, n);
2167
- })();
2168
- let r = i.call(t, e);
2169
- return a.call(t, r);
2170
- } : t[r] = (...e) => {
2171
- if (this.defaults.async) return (async () => {
2172
- let n = await i.apply(t, e);
2173
- return n === !1 && (n = await a.apply(t, e)), n;
2174
- })();
2175
- let n = i.apply(t, e);
2176
- return n === !1 && (n = a.apply(t, e)), n;
2177
- };
2178
- }
2179
- n.hooks = t;
2180
- }
2181
- if (e.walkTokens) {
2182
- let t = this.defaults.walkTokens, r = e.walkTokens;
2183
- n.walkTokens = function(e) {
2184
- let n = [];
2185
- return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
2186
- };
2187
- }
2188
- this.defaults = {
2189
- ...this.defaults,
2190
- ...n
2191
- };
2192
- }), this;
2193
- }
2194
- setOptions(e) {
2195
- return this.defaults = {
2196
- ...this.defaults,
2197
- ...e
2198
- }, this;
2199
- }
2200
- lexer(e, t) {
2201
- return q.lex(e, t ?? this.defaults);
2202
- }
2203
- parser(e, t) {
2204
- return Y.parse(e, t ?? this.defaults);
2205
- }
2206
- parseMarkdown(e) {
2207
- return (t, n) => {
2208
- let r = { ...n }, i = {
2209
- ...this.defaults,
2210
- ...r
2211
- }, a = this.onError(!!i.silent, !!i.async);
2212
- 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."));
2213
- if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
2214
- if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
2215
- if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
2216
- 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;
2217
- i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
2218
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? Y.parse : Y.parseInline)(a, i);
2219
- return i.hooks ? await i.hooks.postprocess(o) : o;
2220
- })().catch(a);
2221
- try {
2222
- i.hooks && (t = i.hooks.preprocess(t));
2223
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? q.lex : q.lexInline)(t, i);
2224
- i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
2225
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? Y.parse : Y.parseInline)(n, i);
2226
- return i.hooks && (r = i.hooks.postprocess(r)), r;
2227
- } catch (e) {
2228
- return a(e);
2229
- }
2230
- };
2231
- }
2232
- onError(e, t) {
2233
- return (n) => {
2234
- if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
2235
- let e = "<p>An error occurred:</p><pre>" + W(n.message + "", !0) + "</pre>";
2236
- return t ? Promise.resolve(e) : e;
2237
- }
2238
- if (t) return Promise.reject(n);
2239
- throw n;
2240
- };
2241
- }
2242
- }();
2243
- function Z(e, t) {
2244
- return X.parse(e, t);
2245
- }
2246
- Z.options = Z.setOptions = function(e) {
2247
- return X.setOptions(e), Z.defaults = X.defaults, ft(Z.defaults), Z;
2248
- }, Z.getDefaults = ut, Z.defaults = dt, Z.use = function(...e) {
2249
- return X.use(...e), Z.defaults = X.defaults, ft(Z.defaults), Z;
2250
- }, Z.walkTokens = function(e, t) {
2251
- return X.walkTokens(e, t);
2252
- }, Z.parseInline = X.parseInline, Z.Parser = Y, Z.parser = Y.parse, Z.Renderer = J, Z.TextRenderer = vn, Z.Lexer = q, Z.lexer = q.lex, Z.Tokenizer = K, Z.Hooks = yn, Z.parse = Z, Z.options, Z.setOptions, Z.use, Z.walkTokens, Z.parseInline, Y.parse, q.lex;
2253
- //#endregion
2254
- //#region src/components/ai-chat/ai-chat.module.scss?inline
2255
- var bn = ":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 .user-message-content{gap:var(--luzmo-spacing-3,8px);flex-direction:column;display:flex}:host .user-message-attachments{gap:var(--luzmo-spacing-2,4px);flex-wrap:wrap;display:flex}:host .user-message-attachment{width:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));height:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));object-fit:cover;object-position:center;border-radius:var(--luzmo-border-radius-s,4px);pointer-events:none;display:block}:host .user-message-text{white-space:pre-wrap;overflow-wrap:anywhere}: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);--ai-chat-user-message-attachment-size:64px}", xn = ":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);--ai-chat-empty-state-title-line-height:1.4;--ai-chat-empty-state-title-color:var(--luzmo-font-color-hard);--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))}", Sn = class extends i {
2256
- constructor(...e) {
2257
- super(...e), this.title = o("What can I help you with?", { desc: "Title for the AI chat empty state" }), this.subtitle = "", this.suggestions = [], this.disabled = !1;
2258
- }
2259
- static {
2260
- this.styles = ee(xn);
2261
- }
2262
- static {
2263
- this.tagName = "luzmo-ai-chat-empty-state";
2264
- }
2265
- _handleSuggestionActivate(e) {
2266
- if (this.disabled) return;
2267
- let t = e.prompt ?? e.label;
2268
- this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
2269
- detail: {
2270
- label: e.label,
2271
- prompt: t,
2272
- selectedDatasets: e.selectedDatasets
2273
- },
2274
- bubbles: !0,
2275
- composed: !0
2276
- }));
2277
- }
2278
- render() {
2279
- let e = this.suggestions.length > 0;
2280
- return u`
2281
- <section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
2282
- <header class="header">
2283
- <h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
2284
- </header>
2285
-
2286
- ${e ? u`
2287
- <div class="actions">
2288
- ${this.subtitle ? u`<p class="subtitle">${this.subtitle}</p>` : d}
2289
- <div
2290
- class="suggestions"
2291
- role="group"
2292
- aria-label=${o("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
2293
- >
2294
- ${this.suggestions.map((e) => u`
2295
- <luzmo-action-button
2296
- variant="accent"
2297
- size="s"
2298
- ?disabled=${this.disabled}
2299
- @click=${() => this._handleSuggestionActivate(e)}
2300
- >
2301
- ${e.label}
2302
- </luzmo-action-button>
2303
- `)}
2304
- </div>
2305
- </div>
2306
- ` : d}
2307
- </section>
2308
- `;
2309
- }
2310
- };
2311
- //#endregion
2312
- //#region src/components/ai-chat/empty-state/index.ts
2313
- a([f({ type: String })], Sn.prototype, "title", void 0), a([f({ type: String })], Sn.prototype, "subtitle", void 0), a([f({ type: Array })], Sn.prototype, "suggestions", void 0), a([f({
2314
- type: Boolean,
2315
- reflect: !0
2316
- })], Sn.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", Sn);
2317
- //#endregion
2318
- //#region src/components/ai-chat/ai-chat-request.ts
2319
- function Cn(e, t) {
2320
- return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
2321
- }
2322
- function wn(e) {
2323
- return e.type === "placeholder" ? null : {
2324
- ...e,
2325
- version: e.version || "",
2326
- title: e.title || e.options?.title,
2327
- filters: e.filterGroups || [],
2328
- aichartId: e.aichartId || ""
2329
- };
2330
- }
2331
- function Tn(e, t, n = []) {
2332
- return [
2333
- {
2334
- type: "text",
2335
- text: e
2336
- },
2337
- ...t.map((e) => ({
2338
- type: "dataset",
2339
- id: e
2340
- })),
2341
- ...n.map((e) => ({
2342
- type: "image",
2343
- url: e
2344
- }))
2345
- ];
2346
- }
2347
- function En(e) {
2348
- return {
2349
- stream: e.stream ?? !0,
2350
- response_mode: "mixed",
2351
- ...e.conversationId ? { conversation_id: e.conversationId } : {},
2352
- ...e.localeId ? { locale_id: e.localeId } : {}
2353
- };
2354
- }
2355
- function Dn(e, t, n) {
2356
- return {
2357
- agent: e,
2358
- task: t,
2359
- ...En(n)
2360
- };
2361
- }
2362
- function On(e) {
2363
- let t = Tn(e.prompt, e.datasetIds, e.attachmentUrls), n = e.chart ? wn(e.chart) : null;
2364
- return n && t.push({
2365
- type: "item",
2366
- value: n
2367
- }), {
2368
- ...Dn("item", e.task ?? "generate", e),
2369
- input: t
2370
- };
2371
- }
2372
- function kn(e) {
2373
- let t = Tn(e.prompt, e.datasetIds, e.attachmentUrls);
2374
- return e.dashboard && t.push({
2375
- type: "dashboard",
2376
- value: e.dashboard,
2377
- ...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
2378
- }), {
2379
- ...Dn("dashboard", "generate", e),
2380
- timezone_id: e.timezoneId ?? "UTC",
2381
- input: t
2382
- };
2383
- }
2384
- function An(e) {
2385
- return {
2386
- ...Dn("analyst", "generate", e),
2387
- input: Tn(e.prompt, e.datasetIds, e.attachmentUrls)
2388
- };
2389
- }
2390
- function jn(e, t) {
2391
- let n = Tn(t.prompt, t.datasetIds, t.attachmentUrls), r = t.chart ? wn(t.chart) : null;
2392
- return r && n.push({
2393
- type: "item",
2394
- value: r
2395
- }), t.dashboard && n.push({
2396
- type: "dashboard",
2397
- value: t.dashboard,
2398
- ...t.currentScreenMode ? { current_screen_mode: t.currentScreenMode } : {}
2399
- }), {
2400
- agent_id: e,
2401
- ...En(t),
2402
- input: n
2403
- };
2404
- }
2405
- function Mn(e, t) {
2406
- if (t.agentId) return jn(t.agentId, t);
2407
- switch (e) {
2408
- case "dashboard": return kn(t);
2409
- case "analyst": return An(t);
2410
- default: return On(t);
2411
- }
2412
- }
2413
- function Nn(e, n) {
2414
- let { authKey: r, authToken: i, apiVersion: a = "0.1.0" } = n;
2415
- return n.attachmentUrls?.length && t(n.attachmentUrls), {
2416
- key: r,
2417
- token: i,
2418
- action: "create",
2419
- version: a,
2420
- properties: Mn(e, n)
2421
- };
2422
- }
2423
- function Pn(e, t, n, r = "0.1.0", i = null) {
2424
- return {
2425
- key: t,
2426
- token: n,
2427
- action: "delete",
2428
- version: r,
2429
- properties: {
2430
- agent: "item",
2431
- restore_to_message_id: e,
2432
- ...i ? { conversation_id: i } : {}
2433
- }
2434
- };
2435
- }
2436
- //#endregion
2437
- //#region src/components/ai-chat/stream/transport.ts
2438
- async function Fn(e) {
2439
- let t = await fetch(e.url, {
2440
- method: "POST",
2441
- headers: { "Content-Type": "application/json" },
2442
- mode: "cors",
2443
- body: JSON.stringify(e.body),
2444
- signal: e.signal
2445
- });
2446
- if (!t.ok) {
2447
- let e = await t.json().catch(() => null);
2448
- throw Error(e?.message || `API request failed with status ${t.status}`);
2449
- }
2450
- if (!t.body) throw Error("Response body is not readable");
2451
- return {
2452
- body: t.body,
2453
- conversationId: t.headers.get("x-conversation-id")
2454
- };
2455
- }
2456
- function In(e) {
2457
- let t = e.trim();
2458
- if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
2459
- let n = t;
2460
- return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
2461
- }
2462
- function Ln(e, t) {
2463
- try {
2464
- let n = In(e);
2465
- n && t(n);
2466
- } catch {
2467
- console.error("Failed to parse stream line");
2468
- }
2469
- }
2470
- async function Rn(e, t) {
2471
- let n = e.getReader(), r = new TextDecoder(), i = "";
2472
- try {
2473
- for (;;) {
2474
- let { done: e, value: a } = await n.read();
2475
- if (e) break;
2476
- i += r.decode(a, { stream: !0 });
2477
- let o = i.split(/\r?\n/);
2478
- i = o.pop() ?? "";
2479
- for (let e of o) Ln(e, t);
2480
- }
2481
- i += r.decode();
2482
- let e = i.trim();
2483
- e && Ln(e, t);
2484
- } finally {
2485
- n.releaseLock();
2486
- }
2487
- }
2488
- //#endregion
2489
- //#region src/components/ai-chat/stream/progress.ts
2490
- function zn() {
2491
- return {
2492
- id: "root",
2493
- step: "root",
2494
- status: "pending",
2495
- children: [{
2496
- id: "client-init",
2497
- step: "iqInit",
2498
- status: "inProgress",
2499
- description: o("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
2500
- }]
2501
- };
2502
- }
2503
- function Bn(e) {
2504
- let t = e.progress;
2505
- return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
2506
- }
2507
- //#endregion
2508
- //#region src/components/ai-chat/stream/chunk-extractors.ts
2509
- function Vn(e) {
2510
- if (!e || typeof e != "object") return "";
2511
- let t = e.assistant_message;
2512
- if (!t || typeof t != "object") return "";
2513
- if (typeof t.message == "string") return t.message;
2514
- if (typeof t.text == "string") return t.text;
2515
- if (typeof t.summary == "string") return t.summary;
2516
- let n = t.content;
2517
- return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
2518
- }
2519
- function Hn(e) {
2520
- 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 : "";
2521
- }
2522
- function Un(e) {
2523
- return Vn(e.result);
2524
- }
2525
- function Wn(e) {
2526
- return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
2527
- }
2528
- function Gn(e, t) {
2529
- let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
2530
- n && t.callbacks.onConversationIdChange(n);
2531
- }
2532
- function Kn(e) {
2533
- for (let t of e) if (t && typeof t == "object" && t.type === "item") {
2534
- let e = t.value;
2535
- if (e && typeof e == "object") return e;
2536
- }
2537
- return null;
2538
- }
2539
- function qn(e) {
2540
- let t = e.chart ?? e.generatedChart;
2541
- if (t && typeof t == "object") return t;
2542
- let n = e.aiMessageAssets ?? e.ai_message_assets;
2543
- if (Array.isArray(n)) {
2544
- let e = Kn(n);
2545
- if (e) return e;
2546
- }
2547
- let r = e.result;
2548
- if (r && typeof r == "object") {
2549
- let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2550
- if (Array.isArray(t)) return Kn(t);
2551
- }
2552
- return null;
2553
- }
2554
- function Jn(e) {
2555
- for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2556
- let e = t.value;
2557
- if (e && typeof e == "object" && Array.isArray(e.views)) return e;
2558
- }
2559
- return null;
2560
- }
2561
- function Yn(e) {
2562
- for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
2563
- let e = t.name;
2564
- if (e && typeof e == "object") return e;
2565
- }
2566
- }
2567
- function Xn(...e) {
2568
- return e.find(Array.isArray);
2569
- }
2570
- function Zn(e) {
2571
- if (e.views && Array.isArray(e.views)) return e;
2572
- let t = e.aiMessageAssets ?? e.ai_message_assets;
2573
- if (Array.isArray(t)) return Jn(t);
2574
- let n = e.result;
2575
- if (n && typeof n == "object") {
2576
- let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
2577
- if (Array.isArray(t)) return Jn(t);
2578
- }
2579
- return null;
2580
- }
2581
- function Qn(e) {
2582
- let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Xn(t, n?.aiMessageAssets ?? n?.ai_message_assets);
2583
- return r ? Yn(r) : void 0;
2584
- }
2585
- //#endregion
2586
- //#region src/components/ai-chat/stream/stream-processor.ts
2587
- var $n = /* @__PURE__ */ new Set([
2588
- "conversation-id",
2589
- "conversation_id",
2590
- "keepalive",
2591
- "ping",
2592
- "finish",
2593
- "done"
2594
- ]);
2595
- function er(e, t, n) {
2596
- return {
2597
- agent: n.agent,
2598
- conversationId: t.callbacks.getConversationId(),
2599
- ...typeof e.messageId == "string" ? { messageId: e.messageId } : {},
2600
- raw: e
2601
- };
2602
- }
2603
- function Q(e, t, n, r, i) {
2604
- let a = {
2605
- ...er(n, e, t),
2606
- recognized: !0,
2607
- type: r,
2608
- data: i
2609
- };
2610
- e.callbacks.onStep(a);
2611
- }
2612
- function tr(e, t, n, r, i) {
2613
- let a = {
2614
- ...er(n, e, t),
2615
- recognized: !1,
2616
- type: r,
2617
- data: i
2618
- };
2619
- e.callbacks.onStep(a);
2620
- }
2621
- function nr(e) {
2622
- e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
2623
- }
2624
- function rr(e, t) {
2625
- nr(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
2626
- }
2627
- function ir(e) {
2628
- if (!e) return null;
2629
- let t = e.descriptionMetadata?.decision;
2630
- if (t === "create" || t === "edit" || t === "question") return t;
2631
- for (let t of e.children ?? []) {
2632
- let e = ir(t);
2633
- if (e) return e;
2634
- }
2635
- return null;
2636
- }
2637
- function ar(e, t, n) {
2638
- if (!Bn(e)) return !1;
2639
- let r = e.progress;
2640
- if (t.callbacks.onProgress(r), Q(t, n, e, "progress", r), t.state.decision === null) {
2641
- let i = ir(r);
2642
- i && (t.state.decision = i, Q(t, n, e, "decision", { decision: i }));
2643
- }
2644
- return !0;
2645
- }
2646
- function or(e) {
2647
- return !!e.error || e.type === "error" || typeof e.error_text == "string";
2648
- }
2649
- function sr(e) {
2650
- return typeof e.error_text == "string" && e.error_text ? e.error_text : typeof e.error == "string" && e.error ? e.error : o("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" });
2651
- }
2652
- function cr(e, t, n) {
2653
- if (!or(e)) return !1;
2654
- let r = sr(e);
2655
- return t.aiMessage.message = r, t.aiMessage.isError = !0, t.callbacks.onMessageUpdate(t.aiMessage), kr(e, t, n, e.error ?? r), !0;
2656
- }
2657
- function lr(e) {
2658
- return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
2659
- }
2660
- function ur(e, t, n) {
2661
- if (e.type !== "interrupt") return !1;
2662
- let r = lr(e);
2663
- return r && (t.state.interruptQuestion = r, rr(t, r), Q(t, n, e, "interrupt", { question: r })), kr(e, t, n), !0;
2664
- }
2665
- function dr(e) {
2666
- return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
2667
- }
2668
- function fr(e) {
2669
- return typeof e.asset_type == "string" ? e.asset_type : "";
2670
- }
2671
- function pr(e) {
2672
- return {
2673
- assetType: fr(e),
2674
- snapshot: {}
2675
- };
2676
- }
2677
- function mr(e, t) {
2678
- return {
2679
- ...e,
2680
- ...t
2681
- };
2682
- }
2683
- function hr(e) {
2684
- let t = e.asset_delta ?? e.delta;
2685
- return t && typeof t == "object" ? t : null;
2686
- }
2687
- function gr(e, t) {
2688
- t.state.assets[dr(e)] = pr(e);
2689
- }
2690
- function _r(e, t) {
2691
- let n = dr(e), r = t.state.assets[n] ?? pr(e), i = hr(e);
2692
- i && (r.snapshot = mr(r.snapshot, i)), t.state.assets[n] = r;
2693
- }
2694
- function vr(e, t) {
2695
- let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
2696
- return n && typeof n == "object" ? mr(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
2697
- }
2698
- function yr(e, t, n) {
2699
- let r = dr(e), i = t.state.assets[r], a = i?.assetType || fr(e), o = vr(e, i);
2700
- delete t.state.assets[r], Sr(a, o, e, t, n);
2701
- }
2702
- function br(e, t, n) {
2703
- switch (e.type) {
2704
- case "asset_start": return gr(e, t), !0;
2705
- case "asset_delta": return _r(e, t), !0;
2706
- case "asset_end": return yr(e, t, n), !0;
2707
- default: return !1;
2708
- }
2709
- }
2710
- function xr(e, t, n, r) {
2711
- n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), Q(n, r, t, "chart", e);
2712
- }
2713
- function Sr(e, t, n, r, i) {
2714
- switch (e) {
2715
- case "dashboard-title": {
2716
- let e = t.name;
2717
- e && typeof e == "object" && (r.state.dashboardName = e, Q(r, i, n, "dashboard-title", { name: e }));
2718
- return;
2719
- }
2720
- case "dashboard-layout":
2721
- Q(r, i, n, "dashboard-layout", t);
2722
- return;
2723
- case "dashboard-item":
2724
- Q(r, i, n, "dashboard-item", {
2725
- slot: Number(t.slot),
2726
- chart: t.chart ?? t
2727
- });
2728
- return;
2729
- case "dashboard":
2730
- r.state.dashboardSnapshot = t;
2731
- return;
2732
- default: Cr(e, t, n, r, i);
2733
- }
2734
- }
2735
- function Cr(e, t, n, r, i) {
2736
- if (i.chartAssetType && e === i.chartAssetType) {
2737
- xr(t, n, r, i);
2738
- return;
2739
- }
2740
- if (i.dashboardAssetType && e === i.dashboardAssetType) {
2741
- r.state.dashboardSnapshot = t;
2742
- return;
2743
- }
2744
- tr(r, i, n, e || "asset", t);
2745
- }
2746
- function wr(e, t, n) {
2747
- let r = !1;
2748
- if (n.dashboardAssetType) {
2749
- let n = Zn(e);
2750
- if (n) {
2751
- t.state.dashboardSnapshot = n;
2752
- let i = Qn(e);
2753
- i && (t.state.dashboardName = i), r = !0;
2754
- }
2755
- }
2756
- if (n.chartAssetType && !t.state.chartSnapshot) {
2757
- let i = qn(e);
2758
- i && (xr(i, e, t, n), r = !0);
2759
- }
2760
- return r;
2761
- }
2762
- function Tr(e, t, n) {
2763
- return {
2764
- ...e,
2765
- generatedChart: t,
2766
- conversationId: n.callbacks.getConversationId()
2767
- };
2768
- }
2769
- function Er(e, t, n) {
2770
- for (let r of Object.keys(t.state.assets)) {
2771
- let i = t.state.assets[r];
2772
- delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot) && Sr(i.assetType, i.snapshot, e, t, n);
2773
- }
2774
- }
2775
- function Dr(e, t) {
2776
- let n = Un(e);
2777
- !n || t.aiMessage.message === n || (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
2778
- }
2779
- function Or(e, t, n) {
2780
- let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? Zn(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? qn(e) : null);
2781
- return {
2782
- agent: n.agent,
2783
- conversationId: t.callbacks.getConversationId(),
2784
- message: t.aiMessage,
2785
- ...r ? { dashboard: r } : {},
2786
- ...i ? { chart: Tr(e, i, t) } : {},
2787
- ...t.state.dashboardName ? { name: t.state.dashboardName } : {},
2788
- raw: e
2789
- };
2790
- }
2791
- function kr(e, t, n, r) {
2792
- if (!t.state.completed) {
2793
- if (t.state.completed = !0, Er(e, t, n), nr(t), r !== void 0) {
2794
- t.callbacks.onComplete({
2795
- agent: n.agent,
2796
- conversationId: t.callbacks.getConversationId(),
2797
- message: t.aiMessage,
2798
- error: r,
2799
- raw: e
2800
- });
2801
- return;
2802
- }
2803
- Dr(e, t), t.callbacks.onComplete(Or(e, t, n));
2804
- }
2805
- }
2806
- function Ar(e) {
2807
- return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
2808
- }
2809
- function jr(e, t, n) {
2810
- let r = Hn(e);
2811
- return r ? (t.state.accumulatedText += r, rr(t, r), Q(t, n, e, "text", {
2812
- delta: r,
2813
- text: t.state.accumulatedText
2814
- }), !0) : !1;
2815
- }
2816
- function Mr(e, t, n, r, i) {
2817
- if (r || i) return;
2818
- let a = Ar(e);
2819
- a && !$n.has(a) && tr(t, n, e, a, e);
2820
- }
2821
- function Nr(e, t, n) {
2822
- if (Gn(e, t), ar(e, t, n) || cr(e, t, n) || ur(e, t, n) || br(e, t, n)) return;
2823
- let r = jr(e, t, n), i = wr(e, t, n), a = r || i, o = Wn(e);
2824
- Mr(e, t, n, a, o), o && kr(e, t, n);
2825
- }
2826
- //#endregion
2827
- //#region src/components/ai-chat/stream/registry.ts
2828
- function Pr(e) {
2829
- switch (e) {
2830
- case "dashboard": return {
2831
- agent: e,
2832
- dashboardAssetType: "dashboard"
2833
- };
2834
- case "item": return {
2835
- agent: e,
2836
- chartAssetType: "item"
2837
- };
2838
- default: return { agent: e };
2839
- }
2840
- }
2841
- function Fr(e) {
2842
- let t = Pr(e);
2843
- return (e, n) => Nr(e, n, t);
2844
- }
2845
- function Ir() {
2846
- return {
2847
- progressCollapsed: !1,
2848
- accumulatedText: "",
2849
- decision: null,
2850
- assets: {},
2851
- dashboardSnapshot: null,
2852
- dashboardName: void 0,
2853
- chartSnapshot: null,
2854
- interruptQuestion: null,
2855
- completed: !1
2856
- };
2857
- }
2858
- //#endregion
2859
- //#region src/components/ai-chat/session/ai-chat-session.ts
2860
- function Lr() {
2861
- return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
2862
- }
2863
- var Rr = class {
2864
- constructor(e, t = {}) {
2865
- this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
2866
- messages: [],
2867
- selectedDatasets: [],
2868
- isGenerating: !1,
2869
- progress: null,
2870
- progressCollapsed: !1,
2871
- conversationId: null,
2872
- inflightMessage: null
2873
- }, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
2874
- apiUrl: "https://api.luzmo.com",
2875
- apiVersion: "0.1.0",
2876
- stream: !0,
2877
- ...e
2878
- }, this._hostCallbacks = t, this._state = {
2879
- ...this._state,
2880
- messages: e.messages ? [...e.messages] : [],
2881
- selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
2882
- conversationId: e.conversationId ?? null,
2883
- isGenerating: e.isGenerating ?? !1,
2884
- progress: e.progress ?? null,
2885
- progressCollapsed: e.progressCollapsed ?? !1
2886
- };
2887
- }
2888
- get state() {
2889
- return this._state;
2890
- }
2891
- get isGenerating() {
2892
- return this._state.isGenerating;
2893
- }
2894
- subscribe(e) {
2895
- return this._subscribers.add(e), e(this._state), () => {
2896
- this._subscribers.delete(e);
2897
- };
2898
- }
2899
- setUiBridge(e) {
2900
- this._uiBridgeCallbacks = e;
2901
- }
2902
- updateConfig(e) {
2903
- this._config = {
2904
- ...this._config,
2905
- ...e
2906
- };
2907
- let t = {};
2908
- if ("conversationId" in e) {
2909
- let n = e.conversationId ?? null;
2910
- n !== this._state.conversationId && (t.conversationId = n);
2911
- }
2912
- if ("selectedDatasets" in e && e.selectedDatasets) {
2913
- let n = [...e.selectedDatasets];
2914
- this._areSelectedDatasetsEqual(n, this._state.selectedDatasets) || (t.selectedDatasets = n);
2915
- }
2916
- if ("messages" in e && e.messages) {
2917
- let n = [...e.messages];
2918
- this._areChatMessagesEqual(n, this._state.messages) || (t.messages = n);
2919
- }
2920
- "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);
2921
- }
2922
- setSelectedDatasets(e) {
2923
- this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
2924
- }
2925
- addDataset(e) {
2926
- this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2927
- }
2928
- removeDataset(e) {
2929
- let t = this._state.selectedDatasets.filter((t) => t.id !== e);
2930
- t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
2931
- }
2932
- isDatasetRequirementMet() {
2933
- return !this._config.requireDataset || this._state.selectedDatasets.length > 0;
2934
- }
2935
- getAiPromptUrl() {
2936
- return Cn(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
2937
- }
2938
- buildRequestBody(e, t, n = []) {
2939
- return Nn(this._config.agent, {
2940
- prompt: e,
2941
- datasetIds: t,
2942
- authKey: this._config.authKey,
2943
- authToken: this._config.authToken,
2944
- conversationId: this._state.conversationId,
2945
- agentId: this._config.agentId,
2946
- chart: this._config.chart ?? null,
2947
- dashboard: this._config.dashboard ?? null,
2948
- currentScreenMode: this._config.currentScreenMode,
2949
- localeId: this._config.localeId,
2950
- timezoneId: this._config.timezoneId,
2951
- task: this._config.task,
2952
- modelPreference: this._config.modelPreference,
2953
- apiVersion: this._config.apiVersion,
2954
- stream: this._config.stream,
2955
- attachmentUrls: n
2956
- });
2957
- }
2958
- buildPromptSubmittedDetail(e) {
2959
- let t = e.attachmentUrls ?? [];
2960
- return {
2961
- prompt: e.prompt,
2962
- selectedDatasets: e.selectedDatasets,
2963
- datasetIds: e.datasetIds,
2964
- agent: this._config.agent,
2965
- request: this.buildRequestBody(e.prompt, e.datasetIds, t),
2966
- url: this.getAiPromptUrl(),
2967
- ...e.signal ? { signal: e.signal } : {},
2968
- ...e.attachments?.length ? { attachments: e.attachments } : {},
2969
- ...t.length ? { attachmentUrls: t } : {}
2970
- };
2971
- }
2972
- async _resolveAttachmentUrls(e, i) {
2973
- if (e.attachmentUrls?.length) return t(e.attachmentUrls), [...e.attachmentUrls];
2974
- let a = (e.attachments ?? []).map((e) => e.file).filter((e) => !!e);
2975
- if (a.length === 0) return [];
2976
- r(a);
2977
- let o = this._hostCallbacks.uploadAttachments ?? this._uiBridgeCallbacks.uploadAttachments;
2978
- if (typeof o == "function") return this._normalizeUploadedUrls(await o(a, { signal: i }), a.length);
2979
- let { authKey: s, authToken: c, apiUrl: l = "https://api.luzmo.com", apiVersion: u = "0.1.0" } = this._config;
2980
- if (!s || !c) {
2981
- if (this._hasCallback("onPromptSubmitted")) return [];
2982
- throw Error("Image attachments require authKey/authToken for built-in upload, or provide uploadAttachments / attachmentUrls.");
2983
- }
2984
- return this._normalizeUploadedUrls(await n({
2985
- files: a,
2986
- authKey: s,
2987
- authToken: c,
2988
- apiUrl: l,
2989
- apiVersion: u,
2990
- signal: i
2991
- }), a.length);
2992
- }
2993
- _normalizeUploadedUrls(e, n) {
2994
- let r = Array.isArray(e) ? e.filter((e) => typeof e == "string" && e.trim().length > 0) : [];
2995
- if (r.length !== n) throw Error(`Image upload returned ${r.length} URL(s) for ${n} file(s). Return one non-empty signed URL per file, in the same order.`);
2996
- return t(r), r;
2997
- }
2998
- async submit(e) {
2999
- let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
3000
- if (!this.isDatasetRequirementMet()) return;
3001
- this._abortInflight();
3002
- let n = new AbortController();
3003
- this._abortController = n;
3004
- let r;
3005
- try {
3006
- r = await this._resolveAttachmentUrls(e, n.signal);
3007
- } catch (e) {
3008
- if (this._abortController === n && (this._abortController = null), n.signal.aborted || e.name === "AbortError") return;
3009
- throw e;
3010
- }
3011
- if (n.signal.aborted || this._abortController !== n) return;
3012
- let i = {
3013
- id: e.aiMessageId ?? Lr(),
3014
- type: "ai",
3015
- message: ""
3016
- }, a = [...this._state.messages];
3017
- if (!e.skipUserMessage) {
3018
- let t = {
3019
- id: Lr(),
3020
- type: "user",
3021
- message: e.prompt,
3022
- ...r.length ? { attachmentUrls: r } : {}
3023
- };
3024
- a = [...a, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
3025
- }
3026
- a = [...a, i], this._inflightMessage = i, this._receivedProgress = !1, this._patchState({
3027
- messages: a,
3028
- isGenerating: !0,
3029
- progress: zn(),
3030
- progressCollapsed: !1,
3031
- inflightMessage: i
3032
- });
3033
- let o = t, s = [...this._state.selectedDatasets];
3034
- if (this._hasCallback("onPromptSubmitted")) {
3035
- let t = this.buildPromptSubmittedDetail({
3036
- prompt: e.prompt,
3037
- selectedDatasets: s,
3038
- datasetIds: o,
3039
- signal: n.signal,
3040
- attachments: e.attachments,
3041
- attachmentUrls: r
3042
- });
3043
- try {
3044
- await this._invokeCallback("onPromptSubmitted", t);
3045
- } catch (e) {
3046
- e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, i), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
3047
- }
3048
- return;
3049
- }
3050
- let c = this.buildRequestBody(e.prompt, t, r), l = Fr(this._config.agent), u = {
3051
- aiMessage: i,
3052
- callbacks: this._createStreamCallbacks(),
3053
- state: Ir()
3054
- }, d = this._config.fetchStreaming ?? Fn, ee = !1;
3055
- try {
3056
- let { body: e, conversationId: t } = await d({
3057
- url: this.getAiPromptUrl(),
3058
- body: c,
3059
- signal: n.signal
3060
- });
3061
- t && this._setConversationId(t), await Rn(e, (e) => l(e, u)), ee = !0;
3062
- } catch (e) {
3063
- e.name !== "AbortError" && (this._handleSubmitError(e, i), ee = !0);
3064
- } finally {
3065
- this._abortController === n && (ee ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
3066
- }
3067
- }
3068
- async restore(e) {
3069
- if (this._config.agent !== "item") return {};
3070
- let t = Pn(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3071
- if (this._patchState({
3072
- isGenerating: !0,
3073
- progress: null,
3074
- progressCollapsed: !1
3075
- }), this._hasCallback("onRestoreRequested")) {
3076
- let n = {
3077
- apiMessageId: e.restoreToMessageId,
3078
- messageIndex: e.messageIndex,
3079
- request: t,
3080
- url: this.getAiPromptUrl()
3081
- };
3082
- try {
3083
- await this._invokeCallback("onRestoreRequested", n);
3084
- } finally {
3085
- this._patchState({ isGenerating: !1 });
3086
- }
3087
- return {};
3088
- }
3089
- try {
3090
- let n = await fetch(this.getAiPromptUrl(), {
3091
- method: "POST",
3092
- headers: { "Content-Type": "application/json" },
3093
- mode: "cors",
3094
- body: JSON.stringify(t)
3095
- });
3096
- if (!n.ok) {
3097
- let e = await n.json().catch(() => null);
3098
- throw Error(e?.message || `API request failed with status ${n.status}`);
3099
- }
3100
- let r = await n.json().catch(() => null), i = r?.generatedChart ?? (r ? qn(r) : null), a = {
3101
- ...typeof r?.message == "string" ? { message: r.message } : {},
3102
- ...i ? { chart: {
3103
- ...r,
3104
- generatedChart: i
3105
- } } : {}
3106
- }, o = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
3107
- if (a.message && o[e.messageIndex]?.type === "ai" && (o[e.messageIndex] = {
3108
- ...o[e.messageIndex],
3109
- message: a.message
3110
- }), this._patchState({ messages: [...o] }), a.chart || a.message) {
3111
- let t = o[e.messageIndex], n = t?.type === "ai" ? t : {
3112
- id: Lr(),
3113
- type: "ai",
3114
- message: a.message ?? ""
3115
- };
3116
- this._emit("onComplete", {
3117
- agent: this._config.agent,
3118
- conversationId: this._state.conversationId,
3119
- message: n,
3120
- ...a.chart ? { chart: a.chart } : {},
3121
- ...r ? { raw: r } : {}
3122
- });
3123
- }
3124
- return a;
3125
- } finally {
3126
- this._patchState({ isGenerating: !1 });
3127
- }
3128
- }
3129
- buildRestoreRequest(e) {
3130
- return Pn(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
3131
- }
3132
- abort(e = {}) {
3133
- this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
3134
- isGenerating: !1,
3135
- progress: null,
3136
- progressCollapsed: !1
3137
- }), e.notify && this._emit("onPromptStopped");
3138
- }
3139
- _abortInflight() {
3140
- this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
3141
- }
3142
- _createStreamCallbacks() {
3143
- return {
3144
- onConversationIdChange: (e) => this._setConversationId(e),
3145
- onProgress: (e) => {
3146
- this._receivedProgress = !0, this._patchState({ progress: e });
3147
- },
3148
- onProgressCollapsed: (e) => {
3149
- this._patchState({ progressCollapsed: e });
3150
- },
3151
- onMessageUpdate: (e) => {
3152
- this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
3153
- },
3154
- getConversationId: () => this._state.conversationId,
3155
- onStep: (e) => {
3156
- this._emit("onStep", e);
3157
- },
3158
- onComplete: (e) => {
3159
- this._emit("onComplete", e);
3160
- }
3161
- };
3162
- }
3163
- _setConversationId(e) {
3164
- this._config = {
3165
- ...this._config,
3166
- conversationId: e
3167
- }, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
3168
- }
3169
- _upsertMessage(e) {
3170
- let t = this._state.messages.findIndex((t) => t.id === e.id);
3171
- if (t === -1) {
3172
- this._patchState({ messages: [...this._state.messages, { ...e }] });
3173
- return;
3174
- }
3175
- let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
3176
- this._patchState({ messages: n });
3177
- }
3178
- _finalizeInflightMessage() {
3179
- 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({
3180
- progress: null,
3181
- progressCollapsed: !1,
3182
- inflightMessage: null
3183
- }));
3184
- }
3185
- _removeInflightFromMessages() {
3186
- this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
3187
- }
3188
- _markInflightCancelled(e) {
3189
- this._inflightMessage && (this._inflightMessage.message = e ?? o("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 }));
3190
- }
3191
- _discardInflightMessage() {
3192
- let e = !!(this._inflightMessage || this._state.inflightMessage);
3193
- this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
3194
- }
3195
- _handleSubmitError(e, t) {
3196
- t.message = o("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({
3197
- inflightMessage: { ...t },
3198
- progress: null,
3199
- progressCollapsed: !1
3200
- }), this._emit("onComplete", {
3201
- agent: this._config.agent,
3202
- conversationId: this._state.conversationId,
3203
- message: t,
3204
- error: e
3205
- });
3206
- }
3207
- _hasCallback(e) {
3208
- return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
3209
- }
3210
- _emit(e, ...t) {
3211
- this._invokeCallback(e, ...t);
3212
- }
3213
- async _invokeCallback(e, ...t) {
3214
- let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
3215
- typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
3216
- }
3217
- _patchState(e) {
3218
- this._state = {
3219
- ...this._state,
3220
- ...e
3221
- }, this._emit("onStateChange", this._state);
3222
- for (let e of this._subscribers) e(this._state);
3223
- }
3224
- _areSelectedDatasetsEqual(e, t) {
3225
- return e.length === t.length && e.every((e, n) => e.id === t[n]?.id);
3226
- }
3227
- _areChatMessagesEqual(e, t) {
3228
- return e.length === t.length && e.every((e, n) => {
3229
- let r = t[n];
3230
- 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) && JSON.stringify(e.attachmentUrls ?? null) === JSON.stringify(r?.attachmentUrls ?? null);
3231
- });
3232
- }
3233
- };
3234
- function zr(e, t) {
3235
- return new Rr(e, t);
3236
- }
3237
- //#endregion
3238
- //#region src/components/ai-chat/session/ai-chat-session-controller.ts
3239
- var Br = class {
3240
- constructor(e) {
3241
- this.options = e, this._session = null, this._ownsSession = !1, this._seededFromProps = !1, this._unsubscribe = null;
3242
- }
3243
- get current() {
3244
- return this._session;
3245
- }
3246
- get state() {
3247
- if (this._session) return this._session.state;
3248
- let e = this.options.getSeed();
3249
- return {
3250
- messages: e.messages,
3251
- selectedDatasets: e.selectedDatasets,
3252
- isGenerating: !1,
3253
- progress: null,
3254
- progressCollapsed: !1,
3255
- conversationId: e.conversationId,
3256
- inflightMessage: null
3257
- };
3258
- }
3259
- get ownsCurrentSession() {
3260
- return this._ownsSession;
3261
- }
3262
- setSession(e) {
3263
- if (!e) {
3264
- this._clearSession();
3265
- return;
3266
- }
3267
- this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, this._mergeHostElementConfig(e), this._wire(e);
3268
- }
3269
- syncProperties(e) {
3270
- if (!e.has("chatSession")) {
3271
- if (this._createSessionIfMissing(), this._session) {
3272
- let t = this.options.getConfig();
3273
- Object.keys(t).some((t) => e.has(t)) && (this._ownsSession ? this._session.updateConfig(t) : this._mergeHostElementConfig(this._session));
3274
- }
3275
- (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3276
- }
3277
- }
3278
- requireSession() {
3279
- return this._createSessionIfMissing(), this._ownsSession ? this._session.updateConfig(this.options.getConfig()) : this._session && this._mergeHostElementConfig(this._session), this._session;
3280
- }
3281
- _mergeHostElementConfig(e) {
3282
- let t = this.options.getConfig(), n = {
3283
- authKey: t.authKey,
3284
- authToken: t.authToken,
3285
- apiUrl: t.apiUrl,
3286
- apiVersion: t.apiVersion,
3287
- stream: t.stream,
3288
- localeId: t.localeId,
3289
- timezoneId: t.timezoneId,
3290
- modelPreference: t.modelPreference,
3291
- requireDataset: t.requireDataset,
3292
- agent: t.agent
3293
- };
3294
- t.task !== void 0 && (n.task = t.task), t.chart != null && (n.chart = t.chart), t.dashboard != null && (n.dashboard = t.dashboard), t.currentScreenMode != null && (n.currentScreenMode = t.currentScreenMode), t.conversationId != null && (n.conversationId = t.conversationId), e.updateConfig(n);
3295
- }
3296
- connect() {
3297
- this._session && this._wire(this._session);
3298
- }
3299
- teardown() {
3300
- this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3301
- }
3302
- _createSessionIfMissing() {
3303
- if (this._session) return;
3304
- let e = this.options.getSeed();
3305
- this._session = zr({
3306
- ...this.options.getConfig(),
3307
- messages: e.messages.length > 0 ? [...e.messages] : void 0,
3308
- selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3309
- }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3310
- }
3311
- _clearSession() {
3312
- this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3313
- }
3314
- _seedFromPropsOnce() {
3315
- if (!this._ownsSession || this._seededFromProps) return;
3316
- let e = this.requireSession(), t = this.options.getSeed(), n = {};
3317
- 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);
3318
- }
3319
- _wire(e) {
3320
- this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3321
- this.options.onRenderNeeded();
3322
- });
3323
- }
3324
- _unwire() {
3325
- this._unsubscribe?.(), this._unsubscribe = null;
3326
- }
3327
- }, $ = class t extends i {
3328
- constructor(...e) {
3329
- 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.allowImages = !1, this.allowVoiceInput = !1, this.acceptedFileTypes = [], 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 Br({
3330
- getConfig: () => this._buildSessionConfig(),
3331
- getSeed: () => ({
3332
- messages: this.messages,
3333
- selectedDatasets: this.selectedDatasets,
3334
- conversationId: this.conversationId
3335
- }),
3336
- createDomBridge: () => this._createDomBridgeCallbacks(),
3337
- onRenderNeeded: () => {
3338
- this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
3339
- }
3340
- }), this._handleAssistantMessageActionsSlotChange = (e) => {
3341
- let t = e.target.assignedElements({ flatten: !0 }).length > 0;
3342
- this._setAssistantMessageActionsSlotHasContent(t);
3343
- }, this._handleAssistantMessageActionConfirmKeydown = (e) => {
3344
- e.key !== "Escape" || !this._pendingAssistantMessageAction || (e.preventDefault(), e.stopPropagation(), this._cancelAssistantMessageActionConfirm());
3345
- };
3346
- }
3347
- static {
3348
- this.styles = ee(bn);
3349
- }
3350
- static {
3351
- this.tagName = "luzmo-ai-chat";
3352
- }
3353
- static {
3354
- this.assistantMessageActionsSlot = "assistant-message-actions";
3355
- }
3356
- get session() {
3357
- return this._session.current;
3358
- }
3359
- _getRenderState() {
3360
- return this._session.state;
3361
- }
3362
- _createDomBridgeCallbacks() {
3363
- return {
3364
- onMessageSent: (e, t) => {
3365
- this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3366
- detail: {
3367
- message: e,
3368
- selectedDatasets: t
3369
- },
3370
- bubbles: !0,
3371
- composed: !0
3372
- }));
3373
- },
3374
- onDatasetsChanged: (e) => {
3375
- this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3376
- detail: { selectedDatasets: e },
3377
- bubbles: !0,
3378
- composed: !0
3379
- }));
3380
- },
3381
- onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3382
- onStep: (e) => {
3383
- this.dispatchEvent(new CustomEvent("luzmo-step", {
3384
- detail: e,
3385
- bubbles: !0,
3386
- composed: !0
3387
- }));
3388
- },
3389
- onComplete: (e) => {
3390
- this.dispatchEvent(new CustomEvent("luzmo-complete", {
3391
- detail: e,
3392
- bubbles: !0,
3393
- composed: !0
3394
- }));
3395
- },
3396
- onPromptStopped: () => {
3397
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3398
- bubbles: !0,
3399
- composed: !0
3400
- }));
3401
- },
3402
- ...typeof this.uploadAttachments == "function" ? { uploadAttachments: (e, t) => this.uploadAttachments(e, t) } : {}
3403
- };
3404
- }
3405
- get _resolvedAcceptedFileTypes() {
3406
- return this.acceptedFileTypes.length > 0 ? this.acceptedFileTypes : this.allowImages ? [...e] : [];
3407
- }
3408
- _buildSessionConfig() {
3409
- return {
3410
- agent: this.agent,
3411
- agentId: this.agentId,
3412
- authKey: this.authKey,
3413
- authToken: this.authToken,
3414
- apiUrl: this.apiUrl,
3415
- apiVersion: this.apiVersion,
3416
- stream: this.stream,
3417
- conversationId: this.conversationId,
3418
- chart: this.chart,
3419
- dashboard: this.dashboard,
3420
- currentScreenMode: this.currentScreenMode,
3421
- localeId: this.localeId,
3422
- timezoneId: this.timezoneId,
3423
- task: this.task,
3424
- modelPreference: this.modelPreference,
3425
- requireDataset: this.requireDataset
3426
- };
3427
- }
3428
- _emitConversationIdChanged(e) {
3429
- this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3430
- detail: { conversationId: e },
3431
- bubbles: !0,
3432
- composed: !0
3433
- }));
3434
- }
3435
- async _restoreViaSession(e, t) {
3436
- await this._session.requireSession().restore({
3437
- restoreToMessageId: e,
3438
- messageIndex: t
3439
- });
3440
- }
3441
- async _handleRestoreState(e, t) {
3442
- if (e.apiMessageId && this.agent === "item") try {
3443
- await this._restoreViaSession(e.apiMessageId, t);
3444
- } catch (e) {
3445
- console.error("AI restore error:", e);
3446
- }
3447
- }
3448
- _handleDatasetSelected(e) {
3449
- this._session.requireSession().addDataset(e.detail);
3450
- }
3451
- _handleDatasetRemoved(e) {
3452
- this._session.requireSession().removeDataset(e.detail.id);
3453
- }
3454
- async _submitViaSession(e, t = {}) {
3455
- let n = this._session.requireSession();
3456
- if (!n.isDatasetRequirementMet()) return !1;
3457
- this._textareaValue = "";
3458
- try {
3459
- return await n.submit({
3460
- prompt: e,
3461
- ...t
3462
- }), !0;
3463
- } catch (e) {
3464
- return e.name !== "AbortError" && console.error("AI prompt session error:", e), !1;
3465
- }
3466
- }
3467
- async _handlePromptSubmitted(e) {
3468
- let t = e.detail.prompt;
3469
- await this._submitViaSession(t, {
3470
- ...e.detail.attachments?.length ? { attachments: e.detail.attachments } : {},
3471
- ...e.detail.attachmentUrls?.length ? { attachmentUrls: e.detail.attachmentUrls } : {}
3472
- }) || (this._textareaValue = t);
3473
- }
3474
- _handlePromptStopped() {
3475
- let e = this._session.current;
3476
- if (this._textareaValue = "", e) {
3477
- e.abort({
3478
- notify: !0,
3479
- cancelledMessage: this.cancelledMessage ?? void 0
3480
- });
3481
- return;
3482
- }
3483
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3484
- bubbles: !0,
3485
- composed: !0
3486
- }));
3487
- }
3488
- async _handleEmptyStateSuggestionSelected(e) {
3489
- let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3490
- n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
3491
- }
3492
- async _processInitialPrompt() {
3493
- !this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
3494
- }
3495
- connectedCallback() {
3496
- super.connectedCallback(), this._session.connect();
3497
- }
3498
- disconnectedCallback() {
3499
- super.disconnectedCallback(), this._session.teardown();
3500
- }
3501
- _scrollToBottom() {
3502
- let e = this.shadowRoot?.querySelector(".chat-messages-container");
3503
- e && requestAnimationFrame(() => {
3504
- requestAnimationFrame(() => {
3505
- e.scrollTop = e.scrollHeight;
3506
- });
3507
- });
3508
- }
3509
- willUpdate(e) {
3510
- super.willUpdate?.(e), this._syncPendingAssistantMessageAction();
3511
- }
3512
- updated(e) {
3513
- super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), e.has("uploadAttachments") && this._session.current?.setUiBridge(this._createDomBridgeCallbacks()), this.updateComplete.then(() => {
3514
- this._syncAssistantMessageActionsVisibility(), this._focusPendingAssistantMessageActionConfirm();
3515
- });
3516
- }
3517
- _syncSession(e) {
3518
- if (e.has("chatSession")) {
3519
- this._session.setSession(this.chatSession);
3520
- return;
3521
- }
3522
- this._session.syncProperties(e);
3523
- }
3524
- _handleInitialPromptChange() {
3525
- this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3526
- }
3527
- _renderMarkdown(e) {
3528
- let t = String(Z.parse(e, { async: !1 }));
3529
- return lt.sanitize(t, {
3530
- 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("."),
3531
- ALLOWED_ATTR: [
3532
- "href",
3533
- "title",
3534
- "target",
3535
- "rel"
3536
- ],
3537
- ALLOW_DATA_ATTR: !1,
3538
- FORBID_TAGS: [
3539
- "script",
3540
- "style",
3541
- "iframe",
3542
- "object",
3543
- "embed",
3544
- "link",
3545
- "form",
3546
- "input",
3547
- "button"
3548
- ],
3549
- FORBID_ATTR: [
3550
- "onerror",
3551
- "onload",
3552
- "onclick",
3553
- "onmouseover",
3554
- "onfocus",
3555
- "onblur"
3556
- ]
3557
- });
3558
- }
3559
- _renderProgress() {
3560
- let { progress: e, progressCollapsed: t } = this._getRenderState();
3561
- return e?.children?.length ? u`
3562
- <luzmo-progress-steps
3563
- .progress=${e}
3564
- ?collapsed=${t}
3565
- size="s"
3566
- ></luzmo-progress-steps>
3567
- ` : d;
3568
- }
3569
- _isLastAiMessageWithProgress(e, t) {
3570
- 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;
3571
- return !1;
3572
- }
3573
- _syncAssistantMessageActionsVisibility() {
3574
- let e = ((this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`) ?? null)?.assignedElements({ flatten: !0 }).length ?? 0) > 0;
3575
- this._setAssistantMessageActionsSlotHasContent(e);
3576
- }
3577
- _setAssistantMessageActionsSlotHasContent(e) {
3578
- e !== this._assistantMessageActionsSlotHasContent && (this._assistantMessageActionsSlotHasContent = e);
3579
- }
3580
- _isLatestAssistantMessage(e, t) {
3581
- return !!(t && e === t);
3582
- }
3583
- _hasBuiltInAssistantMessageActions(e) {
3584
- return (e.actions?.length ?? 0) > 0;
3585
- }
3586
- _assistantMessageActionsFooterHasContent(e, t) {
3587
- return this._hasBuiltInAssistantMessageActions(e) || t && this._assistantMessageActionsSlotHasContent;
3588
- }
3589
- _syncPendingAssistantMessageAction() {
3590
- let e = this._pendingAssistantMessageAction;
3591
- if (!e) return;
3592
- let { messages: t } = this._getRenderState(), n = t.find((t) => t.id === e.messageId), r = n?.actions?.find((t) => t.id === e.actionId);
3593
- (!n || !r?.confirm) && (this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1);
3594
- }
3595
- _getDefaultAssistantMessageActionConfirmMessage() {
3596
- return o("Are you sure?", { desc: "Default assistant message action confirmation prompt" });
3597
- }
3598
- _isAssistantMessageActionConfirming(e) {
3599
- let t = this._pendingAssistantMessageAction, n = e.id;
3600
- return !!(t && n && t.messageId === n);
3601
- }
3602
- _getPendingAssistantMessageAction(e) {
3603
- let t = this._pendingAssistantMessageAction, n = e.id;
3604
- if (!(!t || !n || t.messageId !== n)) return e.actions?.find((e) => e.id === t.actionId);
3605
- }
3606
- _handleAssistantMessageAction(e, t) {
3607
- let n = e.id;
3608
- n && this.dispatchEvent(new CustomEvent("luzmo-assistant-message-action", {
3609
- detail: {
3610
- messageId: n,
3611
- actionId: t.id,
3612
- message: e
3613
- },
3614
- bubbles: !0,
3615
- composed: !0
3616
- }));
3617
- }
3618
- _handleAssistantMessageActionClick(e, t) {
3619
- let n = e.id;
3620
- if (n) {
3621
- if (t.confirm) {
3622
- this._pendingAssistantMessageAction = {
3623
- messageId: n,
3624
- actionId: t.id
3625
- }, this._shouldFocusAssistantMessageActionConfirm = !0;
3626
- return;
3627
- }
3628
- this._handleAssistantMessageAction(e, t);
3629
- }
3630
- }
3631
- _cancelAssistantMessageActionConfirm() {
3632
- this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1;
3633
- }
3634
- _confirmAssistantMessageAction(e, t) {
3635
- this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._handleAssistantMessageAction(e, t);
3636
- }
3637
- _focusPendingAssistantMessageActionConfirm() {
3638
- !this._shouldFocusAssistantMessageActionConfirm || !this._pendingAssistantMessageAction || (this._shouldFocusAssistantMessageActionConfirm = !1, (this.shadowRoot?.querySelector("luzmo-button.assistant-message-action-confirm-cancel"))?.focus?.());
3639
- }
3640
- _renderBuiltInAssistantMessageAction(e, t) {
3641
- return u`
3642
- <luzmo-button
3643
- class="assistant-message-action"
3644
- size="xs"
3645
- variant="neutral"
3646
- treatment="outline"
3647
- ?disabled=${this.disabled || t.disabled || !e.id}
3648
- @click=${() => this._handleAssistantMessageActionClick(e, t)}
3649
- >
3650
- ${t.icon ? u`<luzmo-icon slot="icon" .icon=${t.icon} size="xs"></luzmo-icon>` : d}
3651
- ${t.label}
3652
- </luzmo-button>
3653
- `;
3654
- }
3655
- _renderAssistantMessageActionConfirm(e) {
3656
- let t = this._getPendingAssistantMessageAction(e);
3657
- if (!t) return d;
3658
- let n = t.confirmMessage ?? this._getDefaultAssistantMessageActionConfirmMessage(), r = this.disabled || t.disabled || !e.id;
3659
- return u`
3660
- <span class="assistant-message-action-confirm-message" role="status" aria-live="polite">${n}</span>
3661
- <div class="assistant-message-action-confirm-controls">
3662
- <luzmo-button
3663
- class="assistant-message-action-confirm-cancel"
3664
- size="xs"
3665
- variant="neutral"
3666
- treatment="outline"
3667
- ?disabled=${this.disabled}
3668
- @click=${this._cancelAssistantMessageActionConfirm}
3669
- >
3670
- ${o("Cancel", { desc: "Cancel assistant message action confirmation" })}
3671
- </luzmo-button>
3672
- <luzmo-button
3673
- class="assistant-message-action-confirm-confirm"
3674
- size="xs"
3675
- variant=${t.confirmVariant ?? "negative"}
3676
- ?disabled=${r}
3677
- @click=${() => this._confirmAssistantMessageAction(e, t)}
3678
- >
3679
- ${t.label}
3680
- </luzmo-button>
3681
- </div>
3682
- `;
3683
- }
3684
- _renderAssistantMessageActions(e, n) {
3685
- let r = e.actions ?? [], i = r.length > 0, a = this._isLatestAssistantMessage(e, n), o = this._isAssistantMessageActionConfirming(e);
3686
- return !i && !a ? d : u`
3687
- <div
3688
- class="assistant-message-actions ${this._assistantMessageActionsFooterHasContent(e, a) ? "assistant-message-actions--has-content" : ""} ${o ? "assistant-message-actions--confirming" : ""}"
3689
- @keydown=${o ? this._handleAssistantMessageActionConfirmKeydown : d}
3690
- >
3691
- ${o ? this._renderAssistantMessageActionConfirm(e) : u`
3692
- ${r.map((t) => this._renderBuiltInAssistantMessageAction(e, t))}
3693
- ${a ? u`
3694
- <slot
3695
- name=${t.assistantMessageActionsSlot}
3696
- @slotchange=${this._handleAssistantMessageActionsSlotChange}
3697
- ></slot>
3698
- ` : d}
3699
- `}
3700
- </div>
3701
- `;
3702
- }
3703
- _renderRestoreMenu(e, t, n, r = !1) {
3704
- if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== n)) return d;
3705
- let i = `context-menu-trigger-${e.apiMessageId}`;
3706
- return u`
3707
- <div class="assistant-context-menu">
3708
- <button
3709
- id=${i}
3710
- class="assistant-context-menu-trigger"
3711
- type="button"
3712
- aria-label=${o("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
3713
- aria-haspopup="menu"
3714
- ?disabled=${r}
3715
- >
3716
- ${c(s)}
3717
- </button>
3718
- <luzmo-overlay
3719
- trigger="${i}@click"
3720
- placement="bottom-end"
3721
- >
3722
- <luzmo-popover>
3723
- <button
3724
- class="assistant-context-menu-item"
3725
- type="button"
3726
- ?disabled=${r}
3727
- @click=${() => this._handleRestoreState(e, t)}
3728
- >
3729
- ${o("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
3730
- </button>
3731
- </luzmo-popover>
3732
- </luzmo-overlay>
3733
- </div>
3734
- `;
3735
- }
3736
- _renderMessages() {
3737
- 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"), s = a?.id;
3738
- return i.map((t) => {
3739
- let c = !!t.progress?.children?.length, l = c && this._isLastAiMessageWithProgress(t, i), ee = c && (r || n || !l), f = c ? u`
3740
- <luzmo-progress-steps
3741
- .progress=${t.progress}
3742
- ?condensed=${ee}
3743
- collapsed
3744
- no-animate
3745
- size="s"
3746
- ></luzmo-progress-steps>
3747
- ` : d;
3748
- if (t.type === "user") {
3749
- let e = t.attachmentUrls ?? [];
3750
- return u`
3751
- <luzmo-chat-message
3752
- avatar-placement="bottom"
3753
- position="right"
3754
- variant="primary"
3755
- size="s"
3756
- >
3757
- <div class="user-message-content">
3758
- ${e.length > 0 ? u`
3759
- <div class="user-message-attachments">
3760
- ${e.map((e) => u`
3761
- <img
3762
- class="user-message-attachment"
3763
- src=${e}
3764
- alt=${o("Attached image", { desc: "Accessible label for an image attached to a user chat message" })}
3765
- width="64"
3766
- height="64"
3767
- />
3768
- `)}
3769
- </div>
3770
- ` : d}
3771
- <div class="user-message-text">${t.message}</div>
3772
- </div>
3773
- </luzmo-chat-message>
3774
- `;
3775
- }
3776
- let p = e.indexOf(t), m = t.isError ? "error" : t.isCancelled ? "cancelled" : "", ne = t.isCancelled ? t.message : u`<div class="markdown-content">${te(this._renderMarkdown(t.message))}</div>`;
3777
- return u`
3778
- ${f}
3779
- <div class="assistant-message-wrapper">
3780
- <div class="assistant-message-body">
3781
- <luzmo-chat-message
3782
- class=${m}
3783
- role=${t.isError ? "alert" : d}
3784
- avatar-placement="bottom"
3785
- position="left"
3786
- quiet
3787
- size="s"
3788
- >
3789
- ${ne}
3790
- </luzmo-chat-message>
3791
-
3792
- ${this._renderRestoreMenu(t, p, s, r)}
3793
- </div>
3794
-
3795
- ${this._renderAssistantMessageActions(t, a)}
3796
- </div>
3797
- `;
3798
- });
3799
- }
3800
- _renderStreamingResponse() {
3801
- let { inflightMessage: e } = this._getRenderState();
3802
- return e?.message ? u`
3803
- <luzmo-chat-message
3804
- avatar-placement="bottom"
3805
- position="left"
3806
- quiet
3807
- size="s"
3808
- >
3809
- <div class="markdown-content">${te(this._renderMarkdown(e.message))}</div>
3810
- </luzmo-chat-message>
3811
- ` : d;
3812
- }
3813
- _renderLoadingMessage() {
3814
- let { isGenerating: e, progress: t, inflightMessage: n } = this._getRenderState();
3815
- if (!e || t?.children?.length || n?.message) return d;
3816
- let r = this.agent === "dashboard" ? !this.dashboard : this.chart?.type === "placeholder", i = this.agent === "dashboard" ? r ? o("Creating dashboard...", { desc: "Label for ai chat creating dashboard message" }) : o("Updating dashboard...", { desc: "Label for ai chat updating dashboard message" }) : r ? o("Creating item...", { desc: "Label for ai chat creating item message" }) : o("Updating item...", { desc: "Label for ai chat updating item message" });
3817
- return u`
3818
- <luzmo-chat-message
3819
- avatar-placement="bottom"
3820
- position="left"
3821
- quiet
3822
- size="s"
3823
- >
3824
- <div class="loading-message" role="status" aria-live="polite">
3825
- <span class="icon-lg">${c(l, { className: "spin" })}</span>
3826
- <span class="loading-message-text">${this.loadingMessage || i}</span>
3827
- </div>
3828
- </luzmo-chat-message>
3829
- `;
3830
- }
3831
- _renderEmptyState() {
3832
- if (this._getRenderState().messages.length > 0) return d;
3833
- let e = o("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
3834
- return u`
3835
- <luzmo-ai-chat-empty-state
3836
- .title=${this.emptyStateTitle || e}
3837
- .subtitle=${t ? this.emptyStateSubtitle : ""}
3838
- .suggestions=${this.emptyStateSuggestions}
3839
- ?disabled=${this.disabled || this._getRenderState().isGenerating}
3840
- @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
3841
- ></luzmo-ai-chat-empty-state>
3842
- `;
3843
- }
3844
- render() {
3845
- let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
3846
- return u`
3847
- <div class="chat-container" role="region" aria-label=${o("AI Chat", { desc: "Accessible label for AI chat region" })}>
3848
- <div class="chat-messages-container" role="log" aria-live="polite">
3849
- ${this._renderEmptyState()}
3850
- ${this._renderMessages()}
3851
- ${this._renderProgress()}
3852
- ${this._renderStreamingResponse()}
3853
- ${this._renderLoadingMessage()}
3854
- </div>
3855
-
3856
- <luzmo-ai-interaction-textarea
3857
- role="group"
3858
- aria-label=${o("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
3859
- .value=${this._textareaValue}
3860
- .selectedDatasets=${e}
3861
- .placeholder=${this.placeholder}
3862
- ?disabled=${this.disabled}
3863
- ?is-generating=${t}
3864
- ?stoppable=${this.stoppable}
3865
- ?hide-dataset-button=${this.hideDatasetButton}
3866
- ?hide-dataset-icons=${this.hideDatasetIcons}
3867
- ?disable-dataset-modification=${this.disableDatasetModification}
3868
- ?hide-selected-datasets=${this.hideSelectedDatasets}
3869
- ?disable-column-mentions=${this.disableColumnMentions}
3870
- ?require-dataset=${this.requireDataset}
3871
- ?allow-images=${this.allowImages}
3872
- ?allow-voice-input=${this.allowVoiceInput}
3873
- .acceptedFileTypes=${this._resolvedAcceptedFileTypes}
3874
- .uploadAttachments=${this.uploadAttachments}
3875
- auth-key=${this.authKey}
3876
- auth-token=${this.authToken}
3877
- api-url=${this.apiUrl}
3878
- api-version=${this.apiVersion}
3879
- app-server=${this.appServer}
3880
- ?flag-opendata=${this.flagOpendata}
3881
- @prompt-submitted=${this._handlePromptSubmitted}
3882
- @prompt-stopped=${this._handlePromptStopped}
3883
- @dataset-selected=${this._handleDatasetSelected}
3884
- @dataset-removed=${this._handleDatasetRemoved}
3885
- ></luzmo-ai-interaction-textarea>
3886
- </div>
3887
- `;
3888
- }
3889
- };
3890
- a([f({ type: Array })], $.prototype, "messages", void 0), a([f({
3891
- type: Array,
3892
- attribute: "selected-datasets"
3893
- })], $.prototype, "selectedDatasets", void 0), a([f({ type: String })], $.prototype, "placeholder", void 0), a([f({
3894
- type: Boolean,
3895
- reflect: !0
3896
- })], $.prototype, "disabled", void 0), a([f({
3897
- type: Boolean,
3898
- reflect: !0
3899
- })], $.prototype, "stoppable", void 0), a([f({
3900
- type: Boolean,
3901
- attribute: "show-assistant-context-menu"
3902
- })], $.prototype, "showAssistantContextMenu", void 0), a([f({
3903
- type: String,
3904
- attribute: "auth-key"
3905
- })], $.prototype, "authKey", void 0), a([f({
3906
- type: String,
3907
- attribute: "auth-token"
3908
- })], $.prototype, "authToken", void 0), a([f({
3909
- type: String,
3910
- attribute: "api-url"
3911
- })], $.prototype, "apiUrl", void 0), a([f({
3912
- type: String,
3913
- attribute: "app-server"
3914
- })], $.prototype, "appServer", void 0), a([f({
3915
- type: Boolean,
3916
- attribute: "flag-opendata"
3917
- })], $.prototype, "flagOpendata", void 0), a([f({
3918
- type: Boolean,
3919
- attribute: "hide-dataset-button"
3920
- })], $.prototype, "hideDatasetButton", void 0), a([f({
3921
- type: Boolean,
3922
- attribute: "hide-dataset-icons"
3923
- })], $.prototype, "hideDatasetIcons", void 0), a([f({
3924
- type: Boolean,
3925
- attribute: "disable-dataset-modification"
3926
- })], $.prototype, "disableDatasetModification", void 0), a([f({
3927
- type: Boolean,
3928
- attribute: "hide-selected-datasets"
3929
- })], $.prototype, "hideSelectedDatasets", void 0), a([f({
3930
- type: Boolean,
3931
- attribute: "disable-column-mentions"
3932
- })], $.prototype, "disableColumnMentions", void 0), a([f({
3933
- type: Boolean,
3934
- attribute: "require-dataset"
3935
- })], $.prototype, "requireDataset", void 0), a([f({
3936
- type: Boolean,
3937
- reflect: !0,
3938
- attribute: "allow-images"
3939
- })], $.prototype, "allowImages", void 0), a([f({
3940
- type: Boolean,
3941
- reflect: !0,
3942
- attribute: "allow-voice-input"
3943
- })], $.prototype, "allowVoiceInput", void 0), a([f({
3944
- type: Array,
3945
- attribute: "accepted-file-types"
3946
- })], $.prototype, "acceptedFileTypes", void 0), a([f({ attribute: !1 })], $.prototype, "uploadAttachments", void 0), a([f({ type: String })], $.prototype, "agent", void 0), a([f({
3947
- type: String,
3948
- attribute: "agent-id"
3949
- })], $.prototype, "agentId", void 0), a([f({ type: String })], $.prototype, "task", void 0), a([f({
3950
- type: String,
3951
- attribute: "model-preference"
3952
- })], $.prototype, "modelPreference", void 0), a([f({ attribute: !1 })], $.prototype, "chatSession", void 0), a([f({
3953
- type: String,
3954
- attribute: "conversation-id"
3955
- })], $.prototype, "conversationId", void 0), a([f({
3956
- type: Object,
3957
- attribute: "chart"
3958
- })], $.prototype, "chart", void 0), a([f({ type: Object })], $.prototype, "dashboard", void 0), a([f({
3959
- type: String,
3960
- attribute: "current-screen-mode"
3961
- })], $.prototype, "currentScreenMode", void 0), a([f({
3962
- type: String,
3963
- attribute: "locale-id"
3964
- })], $.prototype, "localeId", void 0), a([f({
3965
- type: String,
3966
- attribute: "timezone-id"
3967
- })], $.prototype, "timezoneId", void 0), a([f({
3968
- type: String,
3969
- attribute: "api-version"
3970
- })], $.prototype, "apiVersion", void 0), a([f({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), a([f({
3971
- type: String,
3972
- attribute: "loading-message"
3973
- })], $.prototype, "loadingMessage", void 0), a([f({
3974
- type: String,
3975
- attribute: "cancelled-message"
3976
- })], $.prototype, "cancelledMessage", void 0), a([f({
3977
- type: String,
3978
- attribute: "initial-prompt"
3979
- })], $.prototype, "initialPrompt", void 0), a([f({
3980
- type: String,
3981
- attribute: "empty-state-title"
3982
- })], $.prototype, "emptyStateTitle", void 0), a([f({
3983
- type: String,
3984
- attribute: "empty-state-subtitle"
3985
- })], $.prototype, "emptyStateSubtitle", void 0), a([f({
3986
- type: Array,
3987
- attribute: !1
3988
- })], $.prototype, "emptyStateSuggestions", void 0), a([p()], $.prototype, "_textareaValue", void 0), a([p()], $.prototype, "_assistantMessageActionsSlotHasContent", void 0), a([p()], $.prototype, "_pendingAssistantMessageAction", void 0);
3989
- //#endregion
3990
- //#region src/components/ai-chat/ai-chat-events.ts
3991
- function Vr(e) {
3992
- return e.recognized === !0;
3993
- }
3994
- //#endregion
3995
- //#region src/components/ai-chat/index.ts
3996
- customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
3997
- //#endregion
3998
- export { jn as C, Sn as E, On as S, Cn as T, Pn as _, zr as a, An as b, Pr as c, Zn as d, zn as f, Rn as g, In as h, Rr as i, Nr as l, Fn as m, $ as n, Ir as o, Bn as p, Br as r, Fr as s, Vr as t, qn as u, Mn as v, wn as w, kn as x, Nn as y };