@luzmo/analytics-components-kit 1.0.5-beta.1 → 1.0.5-beta.2

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