@luzmo/analytics-components-kit 1.0.6 → 1.0.7

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