@luzmo/analytics-components-kit 1.0.8-beta.1 → 1.0.8-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (946) hide show
  1. package/README.md +14 -1
  2. package/components/ai-chat/ai-chat.d.ts +6 -2
  3. package/components/ai-chat/index.cjs +1 -1
  4. package/components/ai-chat/index.js +2 -2
  5. package/components/ai-chat-CQtzaiZ_.cjs +319 -0
  6. package/components/ai-chat-CTr-dplW.js +4047 -0
  7. package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +6 -2
  8. package/components/ai-interaction-textarea/index.cjs +1 -1
  9. package/components/ai-interaction-textarea/index.js +1 -1
  10. package/components/ai-interaction-textarea-CMz5ixwt.cjs +95 -0
  11. package/components/ai-interaction-textarea-uc14Goa4.js +802 -0
  12. package/components/area-chart-options.config-CiPCKvh7.cjs +20 -0
  13. package/components/area-chart-options.config-HaYA8gPC.js +196 -0
  14. package/components/area-chart-options.de-_tPBzxvf.cjs +20 -0
  15. package/components/area-chart-options.de-pUCTG-s0.js +87 -0
  16. package/components/area-chart-options.en-AuSHs27k.cjs +20 -0
  17. package/components/area-chart-options.en-YNsUeMwN.js +87 -0
  18. package/components/area-chart-options.es-2styw_Fz.js +87 -0
  19. package/components/area-chart-options.es-BzRHGbo6.cjs +20 -0
  20. package/components/area-chart-options.fr--WzQVf2z.js +87 -0
  21. package/components/area-chart-options.fr-DYxUQE3x.cjs +20 -0
  22. package/components/area-chart-options.nl-BTEIqBtE.js +87 -0
  23. package/components/area-chart-options.nl-M0xQQ_la.cjs +20 -0
  24. package/components/area-chart-positioning.config-BstzDLRL.cjs +20 -0
  25. package/components/area-chart-positioning.config-DeMlkQZO.js +55 -0
  26. package/components/axis-options.config-BCP0Z8VI.js +270 -0
  27. package/components/axis-options.config-s-Js3ug-.cjs +20 -0
  28. package/components/axis-options.i18n-BOGRmWjp.js +486 -0
  29. package/components/axis-options.i18n-Cw-DmewV.cjs +20 -0
  30. package/components/bar-chart-options.config--F0KfZ5y.js +259 -0
  31. package/components/bar-chart-options.config-A5bcUHFc.cjs +20 -0
  32. package/components/bar-chart-options.de-3qSh2TNr.js +110 -0
  33. package/components/bar-chart-options.de-545XMRGl.cjs +20 -0
  34. package/components/bar-chart-options.en-DAee9yHp.cjs +20 -0
  35. package/components/bar-chart-options.en-DrhQe9rV.js +110 -0
  36. package/components/bar-chart-options.es-BZ1yNzUQ.js +110 -0
  37. package/components/bar-chart-options.es-CfoAEZ-0.cjs +20 -0
  38. package/components/bar-chart-options.fr-5i13R8bs.js +110 -0
  39. package/components/bar-chart-options.fr-C2Ic0Dq0.cjs +20 -0
  40. package/components/bar-chart-options.nl-Bb6XiSDH.cjs +20 -0
  41. package/components/bar-chart-options.nl-DLj-qucU.js +110 -0
  42. package/components/bar-chart-positioning.config-Cw4xXpaU.js +59 -0
  43. package/components/bar-chart-positioning.config-DDKGGZhU.cjs +20 -0
  44. package/components/base-store-BhGpnbqi.js +152 -0
  45. package/components/base-store-D5cDq6d4.cjs +20 -0
  46. package/components/box-plot-options.config-CT4_71tE.js +329 -0
  47. package/components/box-plot-options.config-ZZ_mvqGk.cjs +20 -0
  48. package/components/box-plot-positioning.config-BQf8CX15.js +48 -0
  49. package/components/box-plot-positioning.config-Cni8SYCB.cjs +20 -0
  50. package/components/bubble-chart-options.config-B_hTYgid.js +140 -0
  51. package/components/bubble-chart-options.config-BbB5dj43.cjs +20 -0
  52. package/components/bubble-chart-positioning.config-1Q2GxFJ4.cjs +20 -0
  53. package/components/bubble-chart-positioning.config-BYeXJRKW.js +55 -0
  54. package/components/bullet-chart-options.config-DdTBWTAF.js +76 -0
  55. package/components/bullet-chart-options.config-Drv0yQ4x.cjs +20 -0
  56. package/components/bullet-chart-positioning.config-D-fuuO8D.js +56 -0
  57. package/components/bullet-chart-positioning.config-NSHvsWAf.cjs +20 -0
  58. package/components/choropleth-map-options.config-CEGFnwKG.cjs +20 -0
  59. package/components/choropleth-map-options.config-CsJjKLVP.js +350 -0
  60. package/components/choropleth-map-positioning.config-Bk2lcbUF.js +55 -0
  61. package/components/choropleth-map-positioning.config-DZCuGwit.cjs +20 -0
  62. package/components/circle-pack-chart-options.config-Dobt6Q5A.cjs +20 -0
  63. package/components/circle-pack-chart-options.config-FcILD-Hi.js +55 -0
  64. package/components/circle-pack-chart-positioning.config-CuESD4oH.cjs +20 -0
  65. package/components/circle-pack-chart-positioning.config-pvlFSoeh.js +48 -0
  66. package/components/circular-gauge-options.config-CSIUw2VN.cjs +20 -0
  67. package/components/circular-gauge-options.config-DtNYelhq.js +193 -0
  68. package/components/circular-gauge-positioning.config-BI5_9VzK.js +48 -0
  69. package/components/circular-gauge-positioning.config-DIYxTFVO.cjs +20 -0
  70. package/components/column-chart-options.config-BzMjdyfp.js +258 -0
  71. package/components/column-chart-options.config-iKKyzY3j.cjs +20 -0
  72. package/components/column-chart-options.de-BX13JkAO.cjs +20 -0
  73. package/components/column-chart-options.de-CIYtauiG.js +110 -0
  74. package/components/column-chart-options.en-BkAsfXYV.js +110 -0
  75. package/components/column-chart-options.en-DAee9yHp.cjs +20 -0
  76. package/components/column-chart-options.es-CClMQLE-.cjs +20 -0
  77. package/components/column-chart-options.es-jWM7TxS7.js +110 -0
  78. package/components/column-chart-options.fr-BB6301nS.js +110 -0
  79. package/components/column-chart-options.fr-C2Ic0Dq0.cjs +20 -0
  80. package/components/column-chart-options.nl-Bb6XiSDH.cjs +20 -0
  81. package/components/column-chart-options.nl-HUMDgKdl.js +110 -0
  82. package/components/column-chart-positioning.config-CoekgrWc.js +55 -0
  83. package/components/column-chart-positioning.config-F5liDplz.cjs +20 -0
  84. package/components/combination-chart-options.config-BEMnrQdd.js +134 -0
  85. package/components/combination-chart-options.config-BqQlqnhf.cjs +20 -0
  86. package/components/combination-chart-options.de-BiGjuWUS.cjs +20 -0
  87. package/components/combination-chart-options.de-DVJ9sfLC.js +66 -0
  88. package/components/combination-chart-options.en-B5piXq82.js +66 -0
  89. package/components/combination-chart-options.en-e4XMalU0.cjs +20 -0
  90. package/components/combination-chart-options.es-BmuyyP32.js +66 -0
  91. package/components/combination-chart-options.es-OXb8nozF.cjs +20 -0
  92. package/components/combination-chart-options.fr-CIrnpWEu.js +66 -0
  93. package/components/combination-chart-options.fr-CYzANyZs.cjs +20 -0
  94. package/components/combination-chart-options.nl-BDJ7t0BY.js +66 -0
  95. package/components/combination-chart-options.nl-DyAUjvqC.cjs +20 -0
  96. package/components/combination-chart-positioning.config-BIqhiqPc.cjs +20 -0
  97. package/components/combination-chart-positioning.config-gfmXofUL.js +48 -0
  98. package/components/conditional-number-options.config-ZVtstIjn.cjs +20 -0
  99. package/components/conditional-number-options.config-qdX9T4zu.js +210 -0
  100. package/components/conditional-number-positioning.config-7xN8yNaC.cjs +20 -0
  101. package/components/conditional-number-positioning.config-DoA_qMvA.js +48 -0
  102. package/components/data-broker-B0uUO5er.js +1684 -0
  103. package/components/data-broker-CyMYR6w1.cjs +20 -0
  104. package/components/data-field-panel/index.cjs +1 -1
  105. package/components/data-field-panel/index.js +1 -1
  106. package/components/data-field-panel-B9aYsBfe.cjs +87 -0
  107. package/components/data-field-panel-COHppDw6.js +385 -0
  108. package/components/data-fields-select/index.cjs +1 -1
  109. package/components/data-fields-select/index.js +1 -1
  110. package/components/data-fields-select-BMDWXAMz.cjs +41 -0
  111. package/components/data-fields-select-CvdABHum.js +280 -0
  112. package/components/dataset-selector-list/dataset-selector-list.d.ts +6 -2
  113. package/components/dataset-selector-list/index.cjs +1 -1
  114. package/components/dataset-selector-list/index.js +1 -1
  115. package/components/dataset-selector-list-5y3eFlPa.js +323 -0
  116. package/components/dataset-selector-list-BWgvikkr.cjs +75 -0
  117. package/components/dataset-selector-row/dataset-selector-row.d.ts +6 -2
  118. package/components/dataset-selector-row/index.cjs +1 -1
  119. package/components/dataset-selector-row/index.js +1 -1
  120. package/components/dataset-selector-row-BjyeiTVy.cjs +90 -0
  121. package/components/dataset-selector-row-pEM8hLyJ.js +316 -0
  122. package/components/display-settings/index.cjs +1 -1
  123. package/components/display-settings/index.js +1 -1
  124. package/components/display-settings-B_sY5MXH.cjs +140 -0
  125. package/components/display-settings-DpPSk_da.js +313 -0
  126. package/components/donut-chart-options.config-D5Wkh0nh.js +212 -0
  127. package/components/donut-chart-options.config-DUIE-bdr.cjs +20 -0
  128. package/components/donut-chart-positioning.config-B-CWvQDP.js +48 -0
  129. package/components/donut-chart-positioning.config-DsHR-HET.cjs +20 -0
  130. package/components/evolution-number-options.config-CoGBgLLw.cjs +20 -0
  131. package/components/evolution-number-options.config-DT7iGQA8.js +230 -0
  132. package/components/evolution-number-positioning.config-DWJlecZ8.cjs +20 -0
  133. package/components/evolution-number-positioning.config-DogBtixy.js +48 -0
  134. package/components/filter-expression-picker/index.cjs +1 -1
  135. package/components/filter-expression-picker/index.js +1 -1
  136. package/components/filter-expression-picker-Dtd04YHa.cjs +38 -0
  137. package/components/filter-expression-picker-vZcmpdhp.js +425 -0
  138. package/components/filter-item/filter-item.d.ts +4 -0
  139. package/components/filter-item/index.cjs +1 -1
  140. package/components/filter-item/index.js +1 -1
  141. package/components/filter-item-DhWm1nZ2.js +316 -0
  142. package/components/filter-item-QGXrunyl.cjs +71 -0
  143. package/components/filter-value-picker/index.cjs +1 -1
  144. package/components/filter-value-picker/index.js +1 -1
  145. package/components/filter-value-picker-DL-XI9zN.js +151 -0
  146. package/components/filter-value-picker-DUPgUphE.cjs +60 -0
  147. package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +2 -1
  148. package/components/filter-value-picker-datetime/index.cjs +1 -1
  149. package/components/filter-value-picker-datetime/index.js +1 -1
  150. package/components/filter-value-picker-datetime-BYosmOVo.cjs +42 -0
  151. package/components/filter-value-picker-datetime-DrtBsmhk.js +139 -0
  152. package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +16 -0
  153. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  154. package/components/filter-value-picker-hierarchy/index.js +1 -1
  155. package/components/filter-value-picker-hierarchy-Co7tEAF0.cjs +48 -0
  156. package/components/filter-value-picker-hierarchy-D9HPNjXi.js +299 -0
  157. package/components/filter-value-picker-numeric/index.cjs +1 -1
  158. package/components/filter-value-picker-numeric/index.js +1 -1
  159. package/components/filter-value-picker-numeric-BCaSriJT.cjs +48 -0
  160. package/components/filter-value-picker-numeric-CLRBOcom.js +219 -0
  161. package/components/filters/index.cjs +1 -1
  162. package/components/filters/index.js +1 -1
  163. package/components/filters-DPh6G5_6.cjs +153 -0
  164. package/components/filters-hIID3Ol5.js +745 -0
  165. package/components/formula/index.cjs +1 -1
  166. package/components/formula/index.js +1 -1
  167. package/components/formula-D6fZk242.js +138 -0
  168. package/components/formula-DJa0m0vt.cjs +45 -0
  169. package/components/formula-codemirror-CS38irmY.js +12018 -0
  170. package/components/formula-codemirror-ClMjdWte.cjs +215 -0
  171. package/components/formula-display-store-BVCcrqMB.js +1093 -0
  172. package/components/formula-display-store-riWDbPmO.cjs +20 -0
  173. package/components/formula-editor/index.cjs +1 -1
  174. package/components/formula-editor/index.js +3 -3
  175. package/components/formula-editor-C63ifj9i.js +690 -0
  176. package/components/formula-editor-KuJjGn6h.cjs +224 -0
  177. package/components/formula-field/index.cjs +1 -1
  178. package/components/formula-field/index.js +1 -1
  179. package/components/formula-field-BIseRR26.cjs +20 -0
  180. package/components/formula-field-CZu-WBKI.js +40 -0
  181. package/components/formula-input-base-B1D56Klw.cjs +49 -0
  182. package/components/formula-input-base-DhhV4mbQ.js +236 -0
  183. package/components/funnel-chart-options.config-CMOM4QN2.cjs +20 -0
  184. package/components/funnel-chart-options.config-Ca5-W17F.js +209 -0
  185. package/components/funnel-chart-positioning.config-D7871iXX.js +48 -0
  186. package/components/funnel-chart-positioning.config-DswPJ8VG.cjs +20 -0
  187. package/components/groupings-BwzDflId.js +52 -0
  188. package/components/groupings-Dt2yC9fH.cjs +20 -0
  189. package/components/guidelines-options.config-D-ZuReR_.cjs +20 -0
  190. package/components/guidelines-options.config-DyedEeX2.js +48 -0
  191. package/components/heat-map-options.config-DkuYkbWu.js +226 -0
  192. package/components/heat-map-options.config-DtDh9Gpy.cjs +20 -0
  193. package/components/heat-map-positioning.config-C9xyxr1p.cjs +20 -0
  194. package/components/heat-map-positioning.config-sZTsAUnf.js +48 -0
  195. package/components/heat-table-options.config-DT3d8VS7.js +267 -0
  196. package/components/heat-table-options.config-Dl6GDA-m.cjs +20 -0
  197. package/components/heat-table-positioning.config-B5XgRMIn.cjs +20 -0
  198. package/components/heat-table-positioning.config-DSsD8apM.js +55 -0
  199. package/components/hexbin-map-options.config-BGmgxnMh.cjs +20 -0
  200. package/components/hexbin-map-options.config-Bqp3u2bH.js +278 -0
  201. package/components/hexbin-map-positioning.config-Dc9wAdAv.js +48 -0
  202. package/components/hexbin-map-positioning.config-Dq2TuFz1.cjs +20 -0
  203. package/components/index.cjs +1 -1
  204. package/components/index.js +38 -38
  205. package/components/info-tooltip-options.config-B9T0cwSM.cjs +20 -0
  206. package/components/info-tooltip-options.config-BmSMkirf.js +59 -0
  207. package/components/info-tooltip-options.i18n-B3u0H74j.cjs +20 -0
  208. package/components/info-tooltip-options.i18n-CDx47Py-.js +74 -0
  209. package/components/interactive-viz-item/index.cjs +1 -1
  210. package/components/interactive-viz-item/index.js +1 -1
  211. package/components/interactive-viz-item-CcIWn6Tz.cjs +247 -0
  212. package/components/interactive-viz-item-wZ0r8XHx.js +693 -0
  213. package/components/item-grid/index.cjs +1 -1
  214. package/components/item-grid/index.js +1 -1
  215. package/components/item-grid-B8tT6ztQ.cjs +113 -0
  216. package/components/item-grid-D7b0blK6.js +4559 -0
  217. package/components/item-option/index.cjs +1 -1
  218. package/components/item-option/index.js +1 -1
  219. package/components/item-option-B-Rgy3_8.cjs +269 -0
  220. package/components/item-option-B0EzSGTP.js +955 -0
  221. package/components/item-option-panel/index.cjs +1 -1
  222. package/components/item-option-panel/index.js +1 -1
  223. package/components/item-option-panel-DOOOOgfV.js +183 -0
  224. package/components/item-option-panel-mHwmWhJY.cjs +67 -0
  225. package/components/item-options-configs.cjs +1 -1
  226. package/components/item-options-configs.js +35 -35
  227. package/components/item-slot-drop/index.cjs +1 -1
  228. package/components/item-slot-drop/index.js +1 -1
  229. package/components/item-slot-drop-BL7DOudd.js +331 -0
  230. package/components/item-slot-drop-Ds06u_vn.cjs +91 -0
  231. package/components/item-slot-drop-panel/index.cjs +1 -1
  232. package/components/item-slot-drop-panel/index.js +1 -1
  233. package/components/item-slot-drop-panel-D_EFyM9J.cjs +57 -0
  234. package/components/item-slot-drop-panel-DkHylw7i.js +355 -0
  235. package/components/item-slot-picker/index.cjs +1 -1
  236. package/components/item-slot-picker/index.js +1 -1
  237. package/components/item-slot-picker-BbpPIoIq.cjs +174 -0
  238. package/components/item-slot-picker-CywUgvNX.js +505 -0
  239. package/components/item-slot-picker-panel/index.cjs +1 -1
  240. package/components/item-slot-picker-panel/index.js +1 -1
  241. package/components/item-slot-picker-panel-Bi8xZaYc.js +448 -0
  242. package/components/item-slot-picker-panel-DQLwQXdI.cjs +81 -0
  243. package/components/line-chart-options.config-BMT_e6dk.js +232 -0
  244. package/components/line-chart-options.config-CL8SCDgU.cjs +20 -0
  245. package/components/line-chart-options.de-CKbHARjX.cjs +20 -0
  246. package/components/line-chart-options.de-CtxTZ-Nx.js +81 -0
  247. package/components/line-chart-options.en-BgXtU92P.js +81 -0
  248. package/components/line-chart-options.en-DmtT3Hbw.cjs +20 -0
  249. package/components/line-chart-options.es--u7QlrhG.js +81 -0
  250. package/components/line-chart-options.es-BwyQviz-.cjs +20 -0
  251. package/components/line-chart-options.fr-BUwOFGR7.cjs +20 -0
  252. package/components/line-chart-options.fr-BaPc1M70.js +81 -0
  253. package/components/line-chart-options.nl-BkPXShNF.cjs +20 -0
  254. package/components/line-chart-options.nl-C86fSn7a.js +81 -0
  255. package/components/line-chart-positioning.config-CCsZMpp-.cjs +20 -0
  256. package/components/line-chart-positioning.config-q_XJiQBO.js +55 -0
  257. package/components/load-data-fields-for-datasets-B3XcFFfg.js +42 -0
  258. package/components/load-data-fields-for-datasets-rL24A68g.cjs +20 -0
  259. package/components/marker-map-options.config-BE8GnY_T.js +122 -0
  260. package/components/marker-map-options.config-SkhbtEh0.cjs +20 -0
  261. package/components/marker-map-positioning.config-B4GDDPUn.cjs +20 -0
  262. package/components/marker-map-positioning.config-qEo6YbOG.js +48 -0
  263. package/components/ohlc-chart-options.config-BAB4pyo9.js +89 -0
  264. package/components/ohlc-chart-options.config-BrcfGxDw.cjs +20 -0
  265. package/components/ohlc-chart-options.de-DtanuVcU.cjs +20 -0
  266. package/components/ohlc-chart-options.de-LnJmQjiR.js +63 -0
  267. package/components/ohlc-chart-options.en-B7TU8CK4.js +63 -0
  268. package/components/ohlc-chart-options.en-CStPyUia.cjs +20 -0
  269. package/components/ohlc-chart-options.es-B7m8-_pA.js +63 -0
  270. package/components/ohlc-chart-options.es-CfTI32Rg.cjs +20 -0
  271. package/components/ohlc-chart-options.fr-C53gRLh5.cjs +20 -0
  272. package/components/ohlc-chart-options.fr-u_Bi9raw.js +63 -0
  273. package/components/ohlc-chart-options.nl-BrpwjNGt.js +63 -0
  274. package/components/ohlc-chart-options.nl-Dh9iPIWB.cjs +20 -0
  275. package/components/ohlc-chart-positioning.config-CU7qaa8y.js +78 -0
  276. package/components/ohlc-chart-positioning.config-TquTA1gZ.cjs +20 -0
  277. package/components/parallel-coordinates-plot-options.config-BXsg-9wF.js +43 -0
  278. package/components/parallel-coordinates-plot-options.config-DFRL952-.cjs +20 -0
  279. package/components/parallel-coordinates-plot-positioning.config-C8_F3uzs.cjs +20 -0
  280. package/components/parallel-coordinates-plot-positioning.config-DuQWnPKv.js +48 -0
  281. package/components/pivot-table-options.config-B9ZfmFZH.cjs +20 -0
  282. package/components/pivot-table-options.config-tf8f5F-n.js +247 -0
  283. package/components/pivot-table-positioning.config-B6ra1dbJ.js +55 -0
  284. package/components/pivot-table-positioning.config-DhtDGn-Z.cjs +20 -0
  285. package/components/pyramid-chart-options.config-BnCfeT-K.js +218 -0
  286. package/components/pyramid-chart-options.config-LSOc6ALz.cjs +20 -0
  287. package/components/pyramid-chart-positioning.config-5bWhJBP_.cjs +20 -0
  288. package/components/pyramid-chart-positioning.config-C_KASxlG.js +55 -0
  289. package/components/radar-chart-options.config-B5WP2MPc.cjs +20 -0
  290. package/components/radar-chart-options.config-DrNyOkHq.js +152 -0
  291. package/components/radar-chart-positioning.config-D2NVgsg1.cjs +20 -0
  292. package/components/radar-chart-positioning.config-l6ioKbxT.js +55 -0
  293. package/components/regular-table-options.config-CweBtAvm.js +153 -0
  294. package/components/regular-table-options.config-nBBnO4ru.cjs +20 -0
  295. package/components/route-map-options.config-DS9cCAQK.cjs +20 -0
  296. package/components/route-map-options.config-DXHqb8Ve.js +328 -0
  297. package/components/route-map-positioning.config-5Xju6VM-.cjs +20 -0
  298. package/components/route-map-positioning.config-HDuhd3TI.js +66 -0
  299. package/components/sankey-diagram-options.config-CpNK2oK6.js +128 -0
  300. package/components/sankey-diagram-options.config-CuKQOPPW.cjs +20 -0
  301. package/components/sankey-diagram-positioning.config-BKeksOQ2.js +66 -0
  302. package/components/sankey-diagram-positioning.config-BXseVUED.cjs +20 -0
  303. package/components/scatter-plot-options.config-BA_hVuhw.js +128 -0
  304. package/components/scatter-plot-options.config-C-L2dJ2o.cjs +20 -0
  305. package/components/scatter-plot-options.de-3CPVK7Hi.cjs +20 -0
  306. package/components/scatter-plot-options.de-CNLrv6j3.js +99 -0
  307. package/components/scatter-plot-options.en-DigMzpQy.js +99 -0
  308. package/components/scatter-plot-options.en-Dzvigy8-.cjs +20 -0
  309. package/components/scatter-plot-options.es-C-IH7GVH.cjs +20 -0
  310. package/components/scatter-plot-options.es-CQm_VVqJ.js +99 -0
  311. package/components/scatter-plot-options.fr-Cdp6kPQi.cjs +20 -0
  312. package/components/scatter-plot-options.fr-s0M39VT4.js +99 -0
  313. package/components/scatter-plot-options.nl-CqpPIO03.js +99 -0
  314. package/components/scatter-plot-options.nl-DeINlMqc.cjs +20 -0
  315. package/components/scatter-plot-positioning.config-Ci_UFZZ7.cjs +20 -0
  316. package/components/scatter-plot-positioning.config-MFGPELRh.js +77 -0
  317. package/components/set-nested-value-B-4IelRl.cjs +20 -0
  318. package/components/set-nested-value-V1TdquO3.js +33 -0
  319. package/components/slicer-filter-positioning.config-C2w10p-X.cjs +20 -0
  320. package/components/slicer-filter-positioning.config-CKyzt_nF.js +48 -0
  321. package/components/slot-menu/index.cjs +1 -1
  322. package/components/slot-menu/index.js +1 -1
  323. package/components/slot-menu-7Lsnn5mp.cjs +71 -0
  324. package/components/slot-menu-JcmVjv2g.js +429 -0
  325. package/components/speedometer-chart-options.config-CEIZfeYG.cjs +20 -0
  326. package/components/speedometer-chart-options.config-dsUupCqm.js +251 -0
  327. package/components/speedometer-chart-positioning.config-BEWibjyH.js +48 -0
  328. package/components/speedometer-chart-positioning.config-Df5CIOwp.cjs +20 -0
  329. package/components/spike-map-options.config-BRwdTyrp.cjs +20 -0
  330. package/components/spike-map-options.config-Dh4Ky5ZP.js +415 -0
  331. package/components/spike-map-positioning.config-C6aRn7nn.cjs +20 -0
  332. package/components/spike-map-positioning.config-CdT1dVMG.js +55 -0
  333. package/components/strip-plot-options.config-DpRoR04b.cjs +20 -0
  334. package/components/strip-plot-options.config-Vw3GoLef.js +54 -0
  335. package/components/strip-plot-positioning.config-B8vN0A44.js +48 -0
  336. package/components/strip-plot-positioning.config-DXJci5zk.cjs +20 -0
  337. package/components/sunburst-chart-options.config-0GUoeJMb.js +182 -0
  338. package/components/sunburst-chart-options.config-CCNYG73m.cjs +20 -0
  339. package/components/sunburst-chart-positioning.config-D-qWT3sC.js +48 -0
  340. package/components/sunburst-chart-positioning.config-XfxGkqp6.cjs +20 -0
  341. package/components/symbol-map-options.config-Ce0Kv7N7.cjs +20 -0
  342. package/components/symbol-map-options.config-Dultd0tF.js +179 -0
  343. package/components/symbol-map-positioning.config-BB8-Feba.cjs +20 -0
  344. package/components/symbol-map-positioning.config-CAC8XCec.js +55 -0
  345. package/components/treemap-chart-options.config-CtpfX7hs.js +209 -0
  346. package/components/treemap-chart-options.config-pA93-9cX.cjs +20 -0
  347. package/components/treemap-chart-positioning.config-CJKe5rf1.js +55 -0
  348. package/components/treemap-chart-positioning.config-Daf9Kk3k.cjs +20 -0
  349. package/components/utils/store.cjs +1 -1
  350. package/components/utils/store.js +59 -58
  351. package/components/utils-BMmRy1Nn.js +240 -0
  352. package/components/utils-D9CBsoMV.cjs +20 -0
  353. package/components/utils.cjs +1 -1
  354. package/components/utils.js +2 -2
  355. package/components/venn-diagram-positioning.config-8pfbiReM.js +55 -0
  356. package/components/venn-diagram-positioning.config-DqxSgLGR.cjs +20 -0
  357. package/components/wordcloud-chart-options.config-ConV1s49.cjs +20 -0
  358. package/components/wordcloud-chart-options.config-Dxu7-YcG.js +95 -0
  359. package/components/wordcloud-chart-positioning.config-Cb7lzr9N.cjs +20 -0
  360. package/components/wordcloud-chart-positioning.config-DUazjx5M.js +55 -0
  361. package/custom-elements.json +117 -17
  362. package/package.json +2 -2
  363. package/react/package.json +2 -2
  364. package/utils/data-broker/index.d.ts +20 -14
  365. package/utils/set-nested-value.d.ts +6 -0
  366. package/utils/store/base-store.d.ts +0 -4
  367. package/angular/README.md +0 -40
  368. package/angular/components/ai-chat-empty-state.ts +0 -98
  369. package/angular/components/ai-chat.ts +0 -412
  370. package/angular/components/ai-interaction-textarea.ts +0 -263
  371. package/angular/components/data-field-level.ts +0 -130
  372. package/angular/components/data-field-panel.ts +0 -256
  373. package/angular/components/data-field.ts +0 -130
  374. package/angular/components/data-fields-select.ts +0 -212
  375. package/angular/components/dataset-icon.ts +0 -83
  376. package/angular/components/dataset-selector-list.ts +0 -140
  377. package/angular/components/dataset-selector-row.ts +0 -157
  378. package/angular/components/display-settings-binning.ts +0 -92
  379. package/angular/components/display-settings-datetime.ts +0 -100
  380. package/angular/components/display-settings-grand-totals.ts +0 -92
  381. package/angular/components/display-settings-numeric.ts +0 -113
  382. package/angular/components/display-settings-period-over-period.ts +0 -107
  383. package/angular/components/display-settings.ts +0 -227
  384. package/angular/components/filter-expression-picker.ts +0 -168
  385. package/angular/components/filter-item.ts +0 -175
  386. package/angular/components/filter-parameter-picker.ts +0 -155
  387. package/angular/components/filter-value-picker-datetime.ts +0 -125
  388. package/angular/components/filter-value-picker-hierarchy.ts +0 -146
  389. package/angular/components/filter-value-picker-numeric.ts +0 -146
  390. package/angular/components/filter-value-picker.ts +0 -160
  391. package/angular/components/filters.ts +0 -209
  392. package/angular/components/formula-editor.ts +0 -229
  393. package/angular/components/formula-field.ts +0 -198
  394. package/angular/components/formula.ts +0 -170
  395. package/angular/components/interactive-viz-item.ts +0 -186
  396. package/angular/components/item-grid-item-actions-menu.ts +0 -113
  397. package/angular/components/item-grid.ts +0 -242
  398. package/angular/components/item-option-action-button-group.ts +0 -105
  399. package/angular/components/item-option-color-palette-picker.ts +0 -126
  400. package/angular/components/item-option-color-picker.ts +0 -134
  401. package/angular/components/item-option-color-range.ts +0 -168
  402. package/angular/components/item-option-guidelines.ts +0 -84
  403. package/angular/components/item-option-multi-language-field.ts +0 -133
  404. package/angular/components/item-option-number-field.ts +0 -161
  405. package/angular/components/item-option-panel.ts +0 -149
  406. package/angular/components/item-option-picker.ts +0 -120
  407. package/angular/components/item-option-position-picker.ts +0 -98
  408. package/angular/components/item-option-positions-number-field.ts +0 -140
  409. package/angular/components/item-option-radio-button-group.ts +0 -119
  410. package/angular/components/item-option-slider.ts +0 -126
  411. package/angular/components/item-option-switch.ts +0 -98
  412. package/angular/components/item-option-text-field.ts +0 -112
  413. package/angular/components/item-option.ts +0 -163
  414. package/angular/components/item-slot-drop-panel.ts +0 -236
  415. package/angular/components/item-slot-drop.ts +0 -231
  416. package/angular/components/item-slot-picker-panel.ts +0 -299
  417. package/angular/components/item-slot-picker.ts +0 -241
  418. package/angular/components/slot-menu-list.ts +0 -121
  419. package/angular/components/slot-menu.ts +0 -304
  420. package/angular/components/viz-item-menu.ts +0 -118
  421. package/angular/esm/components/ai-chat-empty-state.d.ts +0 -39
  422. package/angular/esm/components/ai-chat-empty-state.js +0 -99
  423. package/angular/esm/components/ai-chat.d.ts +0 -137
  424. package/angular/esm/components/ai-chat.js +0 -423
  425. package/angular/esm/components/ai-interaction-textarea.d.ts +0 -99
  426. package/angular/esm/components/ai-interaction-textarea.js +0 -281
  427. package/angular/esm/components/data-field-level.d.ts +0 -50
  428. package/angular/esm/components/data-field-level.js +0 -129
  429. package/angular/esm/components/data-field-panel.d.ts +0 -86
  430. package/angular/esm/components/data-field-panel.js +0 -268
  431. package/angular/esm/components/data-field.d.ts +0 -50
  432. package/angular/esm/components/data-field.js +0 -129
  433. package/angular/esm/components/data-fields-select.d.ts +0 -81
  434. package/angular/esm/components/data-fields-select.js +0 -227
  435. package/angular/esm/components/dataset-icon.d.ts +0 -34
  436. package/angular/esm/components/dataset-icon.js +0 -86
  437. package/angular/esm/components/dataset-selector-list.d.ts +0 -53
  438. package/angular/esm/components/dataset-selector-list.js +0 -147
  439. package/angular/esm/components/dataset-selector-row.d.ts +0 -58
  440. package/angular/esm/components/dataset-selector-row.js +0 -161
  441. package/angular/esm/components/display-settings-binning.d.ts +0 -37
  442. package/angular/esm/components/display-settings-binning.js +0 -91
  443. package/angular/esm/components/display-settings-datetime.d.ts +0 -40
  444. package/angular/esm/components/display-settings-datetime.js +0 -99
  445. package/angular/esm/components/display-settings-grand-totals.d.ts +0 -37
  446. package/angular/esm/components/display-settings-grand-totals.js +0 -91
  447. package/angular/esm/components/display-settings-numeric.d.ts +0 -45
  448. package/angular/esm/components/display-settings-numeric.js +0 -115
  449. package/angular/esm/components/display-settings-period-over-period.d.ts +0 -44
  450. package/angular/esm/components/display-settings-period-over-period.js +0 -107
  451. package/angular/esm/components/display-settings.d.ts +0 -83
  452. package/angular/esm/components/display-settings.js +0 -231
  453. package/angular/esm/components/filter-expression-picker.d.ts +0 -64
  454. package/angular/esm/components/filter-expression-picker.js +0 -179
  455. package/angular/esm/components/filter-item.d.ts +0 -63
  456. package/angular/esm/components/filter-item.js +0 -187
  457. package/angular/esm/components/filter-parameter-picker.d.ts +0 -56
  458. package/angular/esm/components/filter-parameter-picker.js +0 -151
  459. package/angular/esm/components/filter-value-picker-datetime.d.ts +0 -47
  460. package/angular/esm/components/filter-value-picker-datetime.js +0 -131
  461. package/angular/esm/components/filter-value-picker-hierarchy.d.ts +0 -53
  462. package/angular/esm/components/filter-value-picker-hierarchy.js +0 -155
  463. package/angular/esm/components/filter-value-picker-numeric.d.ts +0 -53
  464. package/angular/esm/components/filter-value-picker-numeric.js +0 -155
  465. package/angular/esm/components/filter-value-picker.d.ts +0 -57
  466. package/angular/esm/components/filter-value-picker.js +0 -171
  467. package/angular/esm/components/filters.d.ts +0 -75
  468. package/angular/esm/components/filters.js +0 -215
  469. package/angular/esm/components/formula-editor.d.ts +0 -78
  470. package/angular/esm/components/formula-editor.js +0 -236
  471. package/angular/esm/components/formula-field.d.ts +0 -70
  472. package/angular/esm/components/formula-field.js +0 -209
  473. package/angular/esm/components/formula.d.ts +0 -60
  474. package/angular/esm/components/formula.js +0 -177
  475. package/angular/esm/components/interactive-viz-item.d.ts +0 -63
  476. package/angular/esm/components/interactive-viz-item.js +0 -188
  477. package/angular/esm/components/item-grid-item-actions-menu.d.ts +0 -45
  478. package/angular/esm/components/item-grid-item-actions-menu.js +0 -115
  479. package/angular/esm/components/item-grid.d.ts +0 -80
  480. package/angular/esm/components/item-grid.js +0 -245
  481. package/angular/esm/components/item-option-action-button-group.d.ts +0 -41
  482. package/angular/esm/components/item-option-action-button-group.js +0 -107
  483. package/angular/esm/components/item-option-color-palette-picker.d.ts +0 -48
  484. package/angular/esm/components/item-option-color-palette-picker.js +0 -131
  485. package/angular/esm/components/item-option-color-picker.d.ts +0 -51
  486. package/angular/esm/components/item-option-color-picker.js +0 -139
  487. package/angular/esm/components/item-option-color-range.d.ts +0 -66
  488. package/angular/esm/components/item-option-color-range.js +0 -179
  489. package/angular/esm/components/item-option-guidelines.d.ts +0 -34
  490. package/angular/esm/components/item-option-guidelines.js +0 -83
  491. package/angular/esm/components/item-option-multi-language-field.d.ts +0 -50
  492. package/angular/esm/components/item-option-multi-language-field.js +0 -139
  493. package/angular/esm/components/item-option-number-field.d.ts +0 -58
  494. package/angular/esm/components/item-option-number-field.js +0 -171
  495. package/angular/esm/components/item-option-panel.d.ts +0 -54
  496. package/angular/esm/components/item-option-panel.js +0 -155
  497. package/angular/esm/components/item-option-picker.d.ts +0 -46
  498. package/angular/esm/components/item-option-picker.js +0 -123
  499. package/angular/esm/components/item-option-position-picker.d.ts +0 -39
  500. package/angular/esm/components/item-option-position-picker.js +0 -99
  501. package/angular/esm/components/item-option-positions-number-field.d.ts +0 -54
  502. package/angular/esm/components/item-option-positions-number-field.js +0 -147
  503. package/angular/esm/components/item-option-radio-button-group.d.ts +0 -45
  504. package/angular/esm/components/item-option-radio-button-group.js +0 -123
  505. package/angular/esm/components/item-option-slider.d.ts +0 -46
  506. package/angular/esm/components/item-option-slider.js +0 -131
  507. package/angular/esm/components/item-option-switch.d.ts +0 -40
  508. package/angular/esm/components/item-option-switch.js +0 -99
  509. package/angular/esm/components/item-option-text-field.d.ts +0 -44
  510. package/angular/esm/components/item-option-text-field.js +0 -115
  511. package/angular/esm/components/item-option.d.ts +0 -58
  512. package/angular/esm/components/item-option.js +0 -171
  513. package/angular/esm/components/item-slot-drop-panel.d.ts +0 -82
  514. package/angular/esm/components/item-slot-drop-panel.js +0 -249
  515. package/angular/esm/components/item-slot-drop.d.ts +0 -77
  516. package/angular/esm/components/item-slot-drop.js +0 -227
  517. package/angular/esm/components/item-slot-picker-panel.d.ts +0 -97
  518. package/angular/esm/components/item-slot-picker-panel.js +0 -309
  519. package/angular/esm/components/item-slot-picker.d.ts +0 -86
  520. package/angular/esm/components/item-slot-picker.js +0 -259
  521. package/angular/esm/components/slot-menu-list.d.ts +0 -46
  522. package/angular/esm/components/slot-menu-list.js +0 -123
  523. package/angular/esm/components/slot-menu.d.ts +0 -104
  524. package/angular/esm/components/slot-menu.js +0 -300
  525. package/angular/esm/components/viz-item-menu.d.ts +0 -42
  526. package/angular/esm/components/viz-item-menu.js +0 -111
  527. package/angular/esm/index.d.ts +0 -109
  528. package/angular/esm/index.js +0 -217
  529. package/angular/index.ts +0 -223
  530. package/angular/package.json +0 -40
  531. package/angular/tsconfig.json +0 -36
  532. package/angular/type-fallbacks.d.ts +0 -0
  533. package/angular/utils/ai-prompt/attachments.d.ts +0 -10
  534. package/angular/utils/ai-prompt/dictation.d.ts +0 -50
  535. package/angular/utils/ai-prompt/image-upload.d.ts +0 -12
  536. package/angular/utils/ai-prompt/index.d.ts +0 -6
  537. package/angular/utils/ai-prompt/tests/dictation.test.d.ts +0 -1
  538. package/angular/utils/ai-prompt/tests/image-upload.test.d.ts +0 -1
  539. package/angular/utils/base/base.d.ts +0 -16
  540. package/angular/utils/base/focus-visible.d.ts +0 -29
  541. package/angular/utils/base/focusable.d.ts +0 -58
  542. package/angular/utils/base/index.d.ts +0 -5
  543. package/angular/utils/base/localized-mixin.d.ts +0 -22
  544. package/angular/utils/base/sized-mixin.d.ts +0 -17
  545. package/angular/utils/color/color-palettes.d.ts +0 -17
  546. package/angular/utils/color/extrapolate-color.d.ts +0 -1
  547. package/angular/utils/data/load-data-fields-for-datasets.d.ts +0 -22
  548. package/angular/utils/data-broker/index.d.ts +0 -257
  549. package/angular/utils/data-field-types/calculate-data-field-icon.d.ts +0 -12
  550. package/angular/utils/data-field-types/default-acceptable-data-field-types.d.ts +0 -1
  551. package/angular/utils/data-field-types/tests/calculate-data-field-icon.test.d.ts +0 -1
  552. package/angular/utils/drag/draggable.d.ts +0 -13
  553. package/angular/utils/drag/pragmatic-element-adapter.d.ts +0 -2
  554. package/angular/utils/drag/tests/pragmatic-element-adapter.first-import.test.d.ts +0 -1
  555. package/angular/utils/drag/tests/pragmatic-element-adapter.test.d.ts +0 -1
  556. package/angular/utils/filters/expressions.d.ts +0 -15
  557. package/angular/utils/filters/index.d.ts +0 -1
  558. package/angular/utils/formatter/calculate-duration.d.ts +0 -2
  559. package/angular/utils/formatter/decompose-numeric-format.d.ts +0 -11
  560. package/angular/utils/formatter/default-local-formats.d.ts +0 -20
  561. package/angular/utils/formatter/formats/cs.d.ts +0 -20
  562. package/angular/utils/formatter/formats/da.d.ts +0 -20
  563. package/angular/utils/formatter/formats/de.d.ts +0 -21
  564. package/angular/utils/formatter/formats/en-GB.d.ts +0 -21
  565. package/angular/utils/formatter/formats/en-US.d.ts +0 -1
  566. package/angular/utils/formatter/formats/en.d.ts +0 -1
  567. package/angular/utils/formatter/formats/es.d.ts +0 -54
  568. package/angular/utils/formatter/formats/fi.d.ts +0 -20
  569. package/angular/utils/formatter/formats/fr.d.ts +0 -54
  570. package/angular/utils/formatter/formats/he.d.ts +0 -20
  571. package/angular/utils/formatter/formats/hu.d.ts +0 -20
  572. package/angular/utils/formatter/formats/it.d.ts +0 -54
  573. package/angular/utils/formatter/formats/ja.d.ts +0 -20
  574. package/angular/utils/formatter/formats/ko.d.ts +0 -20
  575. package/angular/utils/formatter/formats/mk.d.ts +0 -20
  576. package/angular/utils/formatter/formats/nl.d.ts +0 -21
  577. package/angular/utils/formatter/formats/no.d.ts +0 -21
  578. package/angular/utils/formatter/formats/pl.d.ts +0 -20
  579. package/angular/utils/formatter/formats/pt.d.ts +0 -20
  580. package/angular/utils/formatter/formats/ru.d.ts +0 -20
  581. package/angular/utils/formatter/formats/sv.d.ts +0 -20
  582. package/angular/utils/formatter/formats/tr.d.ts +0 -21
  583. package/angular/utils/formatter/formats/zh-CN.d.ts +0 -20
  584. package/angular/utils/formatter/formats/zh-TW.d.ts +0 -20
  585. package/angular/utils/formatter/formatter.d.ts +0 -9
  586. package/angular/utils/formatter/get-dataset-name.d.ts +0 -2
  587. package/angular/utils/formatter/localize.d.ts +0 -3
  588. package/angular/utils/formatter/smart-datetime-formats.const.d.ts +0 -36
  589. package/angular/utils/formatter/tests/calculate-duration.test.d.ts +0 -1
  590. package/angular/utils/formatter/tests/decompose-numeric-format.test.d.ts +0 -1
  591. package/angular/utils/formatter/tests/default-local-formats.test.d.ts +0 -1
  592. package/angular/utils/formatter/tests/formatter.test.d.ts +0 -1
  593. package/angular/utils/formatter/tests/localize.test.d.ts +0 -1
  594. package/angular/utils/formula/base/formula-base.d.ts +0 -117
  595. package/angular/utils/formula/base/formula-input-base.d.ts +0 -62
  596. package/angular/utils/formula/codemirror/actions.d.ts +0 -47
  597. package/angular/utils/formula/codemirror/drop-cursor.d.ts +0 -15
  598. package/angular/utils/formula/codemirror/icon-element.d.ts +0 -7
  599. package/angular/utils/formula/codemirror/parser.d.ts +0 -16
  600. package/angular/utils/formula/codemirror/tests/actions.test.d.ts +0 -1
  601. package/angular/utils/formula/codemirror/theme.d.ts +0 -20
  602. package/angular/utils/formula/codemirror/widget.d.ts +0 -18
  603. package/angular/utils/formula/config/aggregations.d.ts +0 -9
  604. package/angular/utils/formula/config/build-datasets.d.ts +0 -10
  605. package/angular/utils/formula/config/expression-helpers.d.ts +0 -42
  606. package/angular/utils/formula/config/functions.d.ts +0 -3
  607. package/angular/utils/formula/config/groupings.d.ts +0 -9
  608. package/angular/utils/formula/config/regex.d.ts +0 -39
  609. package/angular/utils/formula/config/resolve-column-presentation.d.ts +0 -19
  610. package/angular/utils/formula/config/tests/build-datasets.test.d.ts +0 -1
  611. package/angular/utils/formula/config/validate-expression.d.ts +0 -19
  612. package/angular/utils/formula/load-formula-codemirror.d.ts +0 -4
  613. package/angular/utils/formula/render-explanation-tooltip.d.ts +0 -7
  614. package/angular/utils/formula/store/formula-display-store.d.ts +0 -93
  615. package/angular/utils/formula/store/formula-editor-context.d.ts +0 -8
  616. package/angular/utils/formula/store/formula-editor-store.d.ts +0 -46
  617. package/angular/utils/formula/store/tests/formula-editor-store.test.d.ts +0 -1
  618. package/angular/utils/formula/tests/validate-expression.test.d.ts +0 -1
  619. package/angular/utils/get-css-variable.d.ts +0 -1
  620. package/angular/utils/index.d.ts +0 -10
  621. package/angular/utils/localize/set-locale.d.ts +0 -7
  622. package/angular/utils/map-tile-providers/index.d.ts +0 -93
  623. package/angular/utils/slot-content/ad-hoc-slot-content.d.ts +0 -7
  624. package/angular/utils/slot-content/render-calculation-label.d.ts +0 -7
  625. package/angular/utils/slot-content/tests/ad-hoc-slot-content.test.d.ts +0 -1
  626. package/angular/utils/slot-state/slot-context.d.ts +0 -4
  627. package/angular/utils/slot-state/slot-store.d.ts +0 -39
  628. package/angular/utils/store/base-store.d.ts +0 -162
  629. package/angular/utils/store/dashboard-store.d.ts +0 -49
  630. package/angular/utils/store/index.d.ts +0 -135
  631. package/angular/utils/store/item-store.d.ts +0 -33
  632. package/angular/utils/store/store-registry.d.ts +0 -170
  633. package/angular/utils/store/tests/dashboard-store.test.d.ts +0 -1
  634. package/angular/utils/store/tests/item-store.test.d.ts +0 -1
  635. package/angular/utils/store/tests/store-registry.test.d.ts +0 -1
  636. package/angular/utils/store/types.d.ts +0 -270
  637. package/angular/utils/switch-item/index.d.ts +0 -34
  638. package/angular/utils/switch-item/slot-role-classification.d.ts +0 -31
  639. package/angular/utils/switch-item/stories/switch-item.stories.d.ts +0 -17
  640. package/angular/utils/switch-item/tests/slot-role-classification.test.d.ts +0 -1
  641. package/angular/utils/switch-item/tests/switch-item.test.d.ts +0 -1
  642. package/angular/utils/themes/bliss.d.ts +0 -2
  643. package/angular/utils/themes/classic-dark.d.ts +0 -2
  644. package/angular/utils/themes/classic.d.ts +0 -2
  645. package/angular/utils/themes/default-dark.d.ts +0 -2
  646. package/angular/utils/themes/default.d.ts +0 -2
  647. package/angular/utils/themes/index.d.ts +0 -4
  648. package/angular/utils/themes/orion.d.ts +0 -2
  649. package/angular/utils/themes/pinky.d.ts +0 -2
  650. package/angular/utils/themes/radiant.d.ts +0 -2
  651. package/angular/utils/themes/royale.d.ts +0 -2
  652. package/angular/utils/themes/seasonal.d.ts +0 -2
  653. package/angular/utils/themes/urban.d.ts +0 -2
  654. package/angular/utils/themes/vivid.d.ts +0 -2
  655. package/angular/utils/time/formats.const.d.ts +0 -4
  656. package/angular/utils/time/period-over-period-condition.const.d.ts +0 -8
  657. package/angular/utils/time/periods.const.d.ts +0 -15
  658. package/angular/utils/timezone/datetime-timezone.d.ts +0 -25
  659. package/angular/utils/timezone/tests/datetime-timezone.test.d.ts +0 -1
  660. package/angular/utils/transformations/convert-data-field-to-slot-content.d.ts +0 -9
  661. package/angular/utils/transformations/convert-datasets-to-data-fields.d.ts +0 -30
  662. package/angular/utils/transformations/tests/convert-data-field-to-slot-content.test.d.ts +0 -1
  663. package/angular/utils/transformations/tests/convert-datasets-to-data-fields.test.d.ts +0 -1
  664. package/angular/utils/types/tests/type-check.test.d.ts +0 -1
  665. package/angular/utils/types/type-check.d.ts +0 -28
  666. package/components/ai-chat-Bo0ELL9Z.cjs +0 -319
  667. package/components/ai-chat-hOxsY5sO.js +0 -4037
  668. package/components/ai-interaction-textarea-DvILxmFe.cjs +0 -95
  669. package/components/ai-interaction-textarea-r77TFOk6.js +0 -792
  670. package/components/area-chart-options.config-Dc4P64YS.js +0 -229
  671. package/components/area-chart-options.config-N24pwyqX.cjs +0 -20
  672. package/components/area-chart-options.de-C2WwBf7L.cjs +0 -20
  673. package/components/area-chart-options.de-DY-fWkTJ.js +0 -85
  674. package/components/area-chart-options.en-BwX3W0Rz.js +0 -85
  675. package/components/area-chart-options.en-Dnm4crib.cjs +0 -20
  676. package/components/area-chart-options.es-CMcI1TAb.cjs +0 -20
  677. package/components/area-chart-options.es-DcNoi7rP.js +0 -85
  678. package/components/area-chart-options.fr-CHeI4bKx.cjs +0 -20
  679. package/components/area-chart-options.fr-T_BWw6Rr.js +0 -85
  680. package/components/area-chart-options.nl-BM7u0iDj.cjs +0 -20
  681. package/components/area-chart-options.nl-CbumBws7.js +0 -85
  682. package/components/area-chart-positioning.config-BqKl3pFu.cjs +0 -20
  683. package/components/area-chart-positioning.config-Br2P8CiM.js +0 -55
  684. package/components/bar-chart-options.config-B7tknpxM.js +0 -300
  685. package/components/bar-chart-options.config-DnNGu3RV.cjs +0 -20
  686. package/components/bar-chart-options.de-B3Q1SKCO.js +0 -110
  687. package/components/bar-chart-options.de-BZ3uW1-o.cjs +0 -20
  688. package/components/bar-chart-options.en-DA7MLNpQ.js +0 -110
  689. package/components/bar-chart-options.en-YNlXBbD4.cjs +0 -20
  690. package/components/bar-chart-options.es-BNeN4ThD.cjs +0 -20
  691. package/components/bar-chart-options.es-Crk_EzMI.js +0 -110
  692. package/components/bar-chart-options.fr-CMr4fQqa.js +0 -110
  693. package/components/bar-chart-options.fr-Cib__mEv.cjs +0 -20
  694. package/components/bar-chart-options.nl-C396D-gg.js +0 -110
  695. package/components/bar-chart-options.nl-CmGjKNyC.cjs +0 -20
  696. package/components/bar-chart-positioning.config-BIIRV0eK.js +0 -59
  697. package/components/bar-chart-positioning.config-CuZ6-d9P.cjs +0 -20
  698. package/components/base-store-DHC2m2Os.cjs +0 -20
  699. package/components/base-store-DmDe0dTU.js +0 -160
  700. package/components/box-plot-options.config-D6Wvmx36.js +0 -356
  701. package/components/box-plot-options.config-DCDHZMGK.cjs +0 -20
  702. package/components/box-plot-positioning.config-AHLRC1d-.js +0 -48
  703. package/components/box-plot-positioning.config-DAYgLURB.cjs +0 -20
  704. package/components/bubble-chart-options.config-CDY6pFK6.js +0 -135
  705. package/components/bubble-chart-options.config-DjdxlwRr.cjs +0 -20
  706. package/components/bubble-chart-positioning.config-0rqhisQ0.cjs +0 -20
  707. package/components/bubble-chart-positioning.config-55OuqSo_.js +0 -55
  708. package/components/bullet-chart-options.config-B2afO5Xh.cjs +0 -20
  709. package/components/bullet-chart-options.config-B4vBSWrH.js +0 -75
  710. package/components/bullet-chart-positioning.config-CIkbLbi3.js +0 -56
  711. package/components/bullet-chart-positioning.config-COKnJxPm.cjs +0 -20
  712. package/components/choropleth-map-options.config-6-xaMCeR.js +0 -348
  713. package/components/choropleth-map-options.config-6DXYO5_E.cjs +0 -20
  714. package/components/choropleth-map-positioning.config-0EBrFMj-.cjs +0 -20
  715. package/components/choropleth-map-positioning.config-C9QGy6XL.js +0 -55
  716. package/components/circle-pack-chart-options.config-CD8MWMTw.cjs +0 -20
  717. package/components/circle-pack-chart-options.config-DWkyGqA_.js +0 -54
  718. package/components/circle-pack-chart-positioning.config-BtQ9KsU9.cjs +0 -20
  719. package/components/circle-pack-chart-positioning.config-vl4eZHhs.js +0 -48
  720. package/components/circular-gauge-options.config-C0T9GkZX.cjs +0 -20
  721. package/components/circular-gauge-options.config-D_xHWhBy.js +0 -188
  722. package/components/circular-gauge-positioning.config-B-65zgBL.js +0 -48
  723. package/components/circular-gauge-positioning.config-BjDwC0zc.cjs +0 -20
  724. package/components/column-chart-options.config-B_a7iN-c.js +0 -299
  725. package/components/column-chart-options.config-D6we1uLn.cjs +0 -20
  726. package/components/column-chart-options.de-vSfQkMVy.js +0 -110
  727. package/components/column-chart-options.de-wUcJvrrW.cjs +0 -20
  728. package/components/column-chart-options.en-C2DVLfDZ.js +0 -110
  729. package/components/column-chart-options.en-YNlXBbD4.cjs +0 -20
  730. package/components/column-chart-options.es-CmZmT22A.js +0 -110
  731. package/components/column-chart-options.es-YKftTtkL.cjs +0 -20
  732. package/components/column-chart-options.fr-Cib__mEv.cjs +0 -20
  733. package/components/column-chart-options.fr-UmB2ifIT.js +0 -110
  734. package/components/column-chart-options.nl-DRrIt7sx.js +0 -110
  735. package/components/column-chart-options.nl-Tg07PDkZ.cjs +0 -20
  736. package/components/column-chart-positioning.config-CDISLkz9.js +0 -55
  737. package/components/column-chart-positioning.config-hIAFqQkL.cjs +0 -20
  738. package/components/combination-chart-options.config-C4y9E0Gr.cjs +0 -20
  739. package/components/combination-chart-options.config-l4szBpws.js +0 -150
  740. package/components/combination-chart-options.de-BExnOCui.cjs +0 -20
  741. package/components/combination-chart-options.de-BdV-j9VK.js +0 -64
  742. package/components/combination-chart-options.en-DquyU8wD.js +0 -64
  743. package/components/combination-chart-options.en-iAkhHGFR.cjs +0 -20
  744. package/components/combination-chart-options.es-B2piaL6n.cjs +0 -20
  745. package/components/combination-chart-options.es-Oz29P_Vd.js +0 -64
  746. package/components/combination-chart-options.fr-BEA5mDGS.cjs +0 -20
  747. package/components/combination-chart-options.fr-L6m-7FiZ.js +0 -64
  748. package/components/combination-chart-options.nl-DDyajIyP.cjs +0 -20
  749. package/components/combination-chart-options.nl-DJDH3K_U.js +0 -64
  750. package/components/combination-chart-positioning.config-C0immu_Z.js +0 -48
  751. package/components/combination-chart-positioning.config-CFo18WDh.cjs +0 -20
  752. package/components/conditional-number-options.config-DB4_BYN2.js +0 -205
  753. package/components/conditional-number-options.config-T6oXXy14.cjs +0 -20
  754. package/components/conditional-number-positioning.config-BfOZxdI3.js +0 -48
  755. package/components/conditional-number-positioning.config-Bw0gHZ2o.cjs +0 -20
  756. package/components/data-broker-Bdv5V8Yp.js +0 -1680
  757. package/components/data-broker-DWEXs6-2.cjs +0 -20
  758. package/components/data-field-panel-Y8MKxsTL.js +0 -385
  759. package/components/data-field-panel-bka3sr4V.cjs +0 -87
  760. package/components/data-fields-select-2P9sGs_9.js +0 -280
  761. package/components/data-fields-select-CAyr7ju6.cjs +0 -41
  762. package/components/dataset-selector-list-DhiiMGU8.cjs +0 -75
  763. package/components/dataset-selector-list-qeYvQkeD.js +0 -313
  764. package/components/dataset-selector-row-C8_Hnlp5.js +0 -306
  765. package/components/dataset-selector-row-Cau2IKg2.cjs +0 -90
  766. package/components/display-settings-BShiJjYL.js +0 -313
  767. package/components/display-settings-C088VTeJ.cjs +0 -140
  768. package/components/donut-chart-options.config-BhKFa3dz.cjs +0 -20
  769. package/components/donut-chart-options.config-CjtEDiJI.js +0 -207
  770. package/components/donut-chart-positioning.config-BPY9_d1a.js +0 -48
  771. package/components/donut-chart-positioning.config-D1CzQ5Xn.cjs +0 -20
  772. package/components/evolution-number-options.config-C3tU650w.js +0 -228
  773. package/components/evolution-number-options.config-CKL01dAR.cjs +0 -20
  774. package/components/evolution-number-positioning.config-Cylb9kiq.js +0 -48
  775. package/components/evolution-number-positioning.config-DLO4M9Cs.cjs +0 -20
  776. package/components/filter-expression-picker-CGgLtygy.cjs +0 -38
  777. package/components/filter-expression-picker-DC_fSNw3.js +0 -425
  778. package/components/filter-item-DMerwomA.cjs +0 -71
  779. package/components/filter-item-xi4ViBw6.js +0 -301
  780. package/components/filter-value-picker-BhZ1btu2.cjs +0 -60
  781. package/components/filter-value-picker-CaMy7sgw.js +0 -151
  782. package/components/filter-value-picker-datetime-DeXo9m9J.cjs +0 -42
  783. package/components/filter-value-picker-datetime-swmPuya2.js +0 -139
  784. package/components/filter-value-picker-hierarchy-CUrCfFBg.js +0 -232
  785. package/components/filter-value-picker-hierarchy-DxluZMYy.cjs +0 -47
  786. package/components/filter-value-picker-numeric-LHFsFwHY.cjs +0 -48
  787. package/components/filter-value-picker-numeric-_7THOfQ3.js +0 -219
  788. package/components/filters-CGlwSB1c.js +0 -742
  789. package/components/filters-qljuVmv3.cjs +0 -153
  790. package/components/formula-Cs6dyuWv.js +0 -138
  791. package/components/formula-codemirror-DQjUbRXS.js +0 -12018
  792. package/components/formula-codemirror-DWNgYsVG.cjs +0 -215
  793. package/components/formula-display-store-B7NE3yk2.js +0 -1093
  794. package/components/formula-display-store-CIaihdJt.cjs +0 -20
  795. package/components/formula-editor-DHau0kyj.cjs +0 -224
  796. package/components/formula-editor-RrAmSugR.js +0 -690
  797. package/components/formula-fK-POHy0.cjs +0 -45
  798. package/components/formula-field-BU-tU8RC.js +0 -40
  799. package/components/formula-field-YNbqmroG.cjs +0 -20
  800. package/components/formula-input-base-BL7QCVYc.js +0 -236
  801. package/components/formula-input-base-DbJu89ug.cjs +0 -49
  802. package/components/funnel-chart-options.config-6ifTq7Xh.js +0 -207
  803. package/components/funnel-chart-options.config-BOI6bzbw.cjs +0 -20
  804. package/components/funnel-chart-positioning.config-BBNWT_VE.cjs +0 -20
  805. package/components/funnel-chart-positioning.config-si2pX2gx.js +0 -48
  806. package/components/groupings-4QHaRJAm.cjs +0 -20
  807. package/components/groupings-Xmt8wNT9.js +0 -52
  808. package/components/heat-map-options.config-C4lqg4Gf.cjs +0 -20
  809. package/components/heat-map-options.config-CezceVM3.js +0 -224
  810. package/components/heat-map-positioning.config-DI5FunDJ.cjs +0 -20
  811. package/components/heat-map-positioning.config-DOlrArXK.js +0 -48
  812. package/components/heat-table-options.config-C7kvRE10.js +0 -372
  813. package/components/heat-table-options.config-DiX5eL4B.cjs +0 -20
  814. package/components/heat-table-positioning.config-COaenQ4o.js +0 -55
  815. package/components/heat-table-positioning.config-iu4AP8qY.cjs +0 -20
  816. package/components/hexbin-map-options.config-8brGMkt_.js +0 -276
  817. package/components/hexbin-map-options.config-BVajY1MH.cjs +0 -20
  818. package/components/hexbin-map-positioning.config-BhuH9uzL.js +0 -48
  819. package/components/hexbin-map-positioning.config-CZGNbr60.cjs +0 -20
  820. package/components/interactive-viz-item-Ckksv6BC.cjs +0 -247
  821. package/components/interactive-viz-item-diknEJmH.js +0 -693
  822. package/components/item-grid-BxeW2lFX.js +0 -4559
  823. package/components/item-grid-Dv_KLkHv.cjs +0 -113
  824. package/components/item-option-B8J9IqkK.cjs +0 -269
  825. package/components/item-option-n8o2amMX.js +0 -945
  826. package/components/item-option-panel-h1z2MCbr.js +0 -183
  827. package/components/item-option-panel-m9BDbDRw.cjs +0 -67
  828. package/components/item-slot-drop-CViqm_N2.cjs +0 -91
  829. package/components/item-slot-drop-iXidsCW1.js +0 -331
  830. package/components/item-slot-drop-panel-BjOPdyYH.cjs +0 -57
  831. package/components/item-slot-drop-panel-DwNCcxm1.js +0 -355
  832. package/components/item-slot-picker-D8e1NtDd.cjs +0 -174
  833. package/components/item-slot-picker-DpnpGTvR.js +0 -505
  834. package/components/item-slot-picker-panel-DyP6Uls5.cjs +0 -81
  835. package/components/item-slot-picker-panel-l53YLi4e.js +0 -448
  836. package/components/line-chart-options.config-CVR_mb2z.cjs +0 -20
  837. package/components/line-chart-options.config-OeRMkKMP.js +0 -248
  838. package/components/line-chart-options.de-CihDXrQ4.js +0 -79
  839. package/components/line-chart-options.de-DMuN0E3y.cjs +0 -20
  840. package/components/line-chart-options.en-81dHDKJE.cjs +0 -20
  841. package/components/line-chart-options.en-CPWllKeE.js +0 -79
  842. package/components/line-chart-options.es-CshvnhMH.cjs +0 -20
  843. package/components/line-chart-options.es-IX7Hu1Jk.js +0 -79
  844. package/components/line-chart-options.fr-CkLIbP6Y.js +0 -79
  845. package/components/line-chart-options.fr-EMHHZpiy.cjs +0 -20
  846. package/components/line-chart-options.nl-C9FWbWJy.cjs +0 -20
  847. package/components/line-chart-options.nl-Du2kphsn.js +0 -79
  848. package/components/line-chart-positioning.config-A4TQKtrY.js +0 -55
  849. package/components/line-chart-positioning.config-BAt_nsVA.cjs +0 -20
  850. package/components/load-data-fields-for-datasets-BNnr8x3m.js +0 -42
  851. package/components/load-data-fields-for-datasets-CW4Voiex.cjs +0 -20
  852. package/components/marker-map-options.config-CtW7nl1C.js +0 -117
  853. package/components/marker-map-options.config-M9BvYinR.cjs +0 -20
  854. package/components/marker-map-positioning.config-B-EQ3Kdq.js +0 -48
  855. package/components/marker-map-positioning.config-Bt-iQQTT.cjs +0 -20
  856. package/components/ohlc-chart-options.config-DOqKN6ov.cjs +0 -20
  857. package/components/ohlc-chart-options.config-Db40TXcB.js +0 -124
  858. package/components/ohlc-chart-options.de-Brd2iN0B.js +0 -61
  859. package/components/ohlc-chart-options.de-DqGHkVNG.cjs +0 -20
  860. package/components/ohlc-chart-options.en-C3AWmo7s.js +0 -61
  861. package/components/ohlc-chart-options.en-DrWja-A6.cjs +0 -20
  862. package/components/ohlc-chart-options.es-Cac117z2.cjs +0 -20
  863. package/components/ohlc-chart-options.es-Cwl_vxNQ.js +0 -61
  864. package/components/ohlc-chart-options.fr-DJuaTjBf.cjs +0 -20
  865. package/components/ohlc-chart-options.fr-STOjKGOk.js +0 -61
  866. package/components/ohlc-chart-options.nl-C7_qhngI.cjs +0 -20
  867. package/components/ohlc-chart-options.nl-CV0A0J84.js +0 -61
  868. package/components/ohlc-chart-positioning.config-COj7yt6H.cjs +0 -20
  869. package/components/ohlc-chart-positioning.config-Shmm9MJf.js +0 -78
  870. package/components/parallel-coordinates-plot-options.config--6iJkURT.cjs +0 -20
  871. package/components/parallel-coordinates-plot-options.config-Bw8T5EE4.js +0 -42
  872. package/components/parallel-coordinates-plot-positioning.config-C05rBaKD.js +0 -48
  873. package/components/parallel-coordinates-plot-positioning.config-ClvpDIFu.cjs +0 -20
  874. package/components/pivot-table-options.config-DdbSCsRL.cjs +0 -20
  875. package/components/pivot-table-options.config-gL2C_zvT.js +0 -245
  876. package/components/pivot-table-positioning.config-BGlPvMyz.js +0 -55
  877. package/components/pivot-table-positioning.config-CDJ5gAfT.cjs +0 -20
  878. package/components/pyramid-chart-options.config-348RYXh8.js +0 -260
  879. package/components/pyramid-chart-options.config-I2ZIo_GV.cjs +0 -20
  880. package/components/pyramid-chart-positioning.config-BcqgH441.js +0 -55
  881. package/components/pyramid-chart-positioning.config-DvhVY2uQ.cjs +0 -20
  882. package/components/radar-chart-options.config-BeGjchnc.js +0 -150
  883. package/components/radar-chart-options.config-CCMh7qJG.cjs +0 -20
  884. package/components/radar-chart-positioning.config-C9tXOa0G.js +0 -55
  885. package/components/radar-chart-positioning.config-COMI8Da1.cjs +0 -20
  886. package/components/regular-table-options.config-Bf0VAtT_.js +0 -148
  887. package/components/regular-table-options.config-DqZD5P9l.cjs +0 -20
  888. package/components/route-map-options.config-DVo8FTke.cjs +0 -20
  889. package/components/route-map-options.config-DWG5127-.js +0 -326
  890. package/components/route-map-positioning.config-BUIlsZig.js +0 -66
  891. package/components/route-map-positioning.config-Bi8-Dmc4.cjs +0 -20
  892. package/components/sankey-diagram-options.config-C8Gm15Mi.cjs +0 -20
  893. package/components/sankey-diagram-options.config-DW72WBKU.js +0 -126
  894. package/components/sankey-diagram-positioning.config-DUAsNKP9.js +0 -66
  895. package/components/sankey-diagram-positioning.config-DgZpfj7d.cjs +0 -20
  896. package/components/scatter-plot-options.config-CUyWy2xE.js +0 -322
  897. package/components/scatter-plot-options.config-Cd4DvLoN.cjs +0 -20
  898. package/components/scatter-plot-options.de-BO73A_o5.js +0 -96
  899. package/components/scatter-plot-options.de-DO4ns5t0.cjs +0 -20
  900. package/components/scatter-plot-options.en-B6S8Yf66.js +0 -96
  901. package/components/scatter-plot-options.en-SuHaPKPZ.cjs +0 -20
  902. package/components/scatter-plot-options.es-B0alrlLR.cjs +0 -20
  903. package/components/scatter-plot-options.es-jbzKhq4S.js +0 -96
  904. package/components/scatter-plot-options.fr-CkJXV4Og.cjs +0 -20
  905. package/components/scatter-plot-options.fr-DMFP8FB4.js +0 -96
  906. package/components/scatter-plot-options.nl-BqN6XbnS.js +0 -96
  907. package/components/scatter-plot-options.nl-CuhZUABa.cjs +0 -20
  908. package/components/scatter-plot-positioning.config-8c9ToDBN.cjs +0 -20
  909. package/components/scatter-plot-positioning.config-D6dyNojk.js +0 -77
  910. package/components/slicer-filter-positioning.config-BnxE_Ac2.js +0 -48
  911. package/components/slicer-filter-positioning.config-CqPOeeeg.cjs +0 -20
  912. package/components/slot-menu-11KQJc_U.cjs +0 -71
  913. package/components/slot-menu-BsaFfMfl.js +0 -426
  914. package/components/speedometer-chart-options.config-CtWGujmb.js +0 -246
  915. package/components/speedometer-chart-options.config-e9Ktyajm.cjs +0 -20
  916. package/components/speedometer-chart-positioning.config-B6ydcNl1.js +0 -48
  917. package/components/speedometer-chart-positioning.config-CWVs9wdL.cjs +0 -20
  918. package/components/spike-map-options.config-Ch0p9Q5l.js +0 -413
  919. package/components/spike-map-options.config-D-T_kT1C.cjs +0 -20
  920. package/components/spike-map-positioning.config-BUDKv3D-.js +0 -55
  921. package/components/spike-map-positioning.config-CzTPhLvN.cjs +0 -20
  922. package/components/strip-plot-options.config-TB3rkoj2.cjs +0 -20
  923. package/components/strip-plot-options.config-WICS2rnK.js +0 -53
  924. package/components/strip-plot-positioning.config-C6-0AgIF.cjs +0 -20
  925. package/components/strip-plot-positioning.config-d8qB2u-P.js +0 -48
  926. package/components/sunburst-chart-options.config-BojxVGMu.cjs +0 -20
  927. package/components/sunburst-chart-options.config-Bz-jP-gZ.js +0 -180
  928. package/components/sunburst-chart-positioning.config-D_APT9mf.cjs +0 -20
  929. package/components/sunburst-chart-positioning.config-DcYT58kl.js +0 -48
  930. package/components/symbol-map-options.config-BmHEhC5t.cjs +0 -20
  931. package/components/symbol-map-options.config-I89tFJUU.js +0 -177
  932. package/components/symbol-map-positioning.config-CWkkURYU.cjs +0 -20
  933. package/components/symbol-map-positioning.config-D12TczYa.js +0 -55
  934. package/components/treemap-chart-options.config-i7BH9mNl.js +0 -204
  935. package/components/treemap-chart-options.config-xtu6J11C.cjs +0 -20
  936. package/components/treemap-chart-positioning.config-BS-BO3sD.cjs +0 -20
  937. package/components/treemap-chart-positioning.config-BmxLpNn2.js +0 -55
  938. package/components/utils-DUeh8VMp.js +0 -240
  939. package/components/utils-pKA3Rwn3.cjs +0 -20
  940. package/components/venn-diagram-positioning.config-B-4Uoe_o.js +0 -55
  941. package/components/venn-diagram-positioning.config-D4Zhdh2X.cjs +0 -20
  942. package/components/wordcloud-chart-options.config-BjLJyuyw.cjs +0 -20
  943. package/components/wordcloud-chart-options.config-D_AhgZRs.js +0 -90
  944. package/components/wordcloud-chart-positioning.config-Cr9lzAHP.js +0 -55
  945. package/components/wordcloud-chart-positioning.config-DTEauH2w.cjs +0 -20
  946. /package/{angular/utils/ai-prompt/tests/attachments.test.d.ts → utils/tests/set-nested-value.test.d.ts} +0 -0
@@ -1,4037 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2026 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- import { c as e, d as t, s as n, u as r } from "./ai-interaction-textarea-r77TFOk6.js";
21
- import { i } from "./base-DPqRkMth.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
- if (Object.keys(t).some((t) => e.has(t)) && (this._ownsSession ? this._session.updateConfig(t) : this._mergeHostElementConfig(this._session)), e.has("selectedDatasets") && this._ownsSession) {
3310
- let e = this.options.getSeed().selectedDatasets, t = this._session.state.selectedDatasets;
3311
- (e.length !== t.length || e.some((e, n) => e.id !== t[n]?.id)) && this._session.updateConfig({ selectedDatasets: e });
3312
- }
3313
- }
3314
- (e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
3315
- }
3316
- }
3317
- requireSession() {
3318
- return this._createSessionIfMissing(), this._ownsSession ? this._session.updateConfig(this.options.getConfig()) : this._session && this._mergeHostElementConfig(this._session), this._session;
3319
- }
3320
- _mergeHostElementConfig(e) {
3321
- let t = this.options.getConfig(), n = {
3322
- authKey: t.authKey,
3323
- authToken: t.authToken,
3324
- apiUrl: t.apiUrl,
3325
- apiVersion: t.apiVersion,
3326
- stream: t.stream,
3327
- localeId: t.localeId,
3328
- timezoneId: t.timezoneId,
3329
- modelPreference: t.modelPreference,
3330
- requireDataset: t.requireDataset,
3331
- agent: t.agent
3332
- };
3333
- 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);
3334
- }
3335
- connect() {
3336
- this._session && this._wire(this._session);
3337
- }
3338
- teardown() {
3339
- this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
3340
- }
3341
- _createSessionIfMissing() {
3342
- if (this._session) return;
3343
- let e = this.options.getSeed();
3344
- this._session = Ur({
3345
- ...this.options.getConfig(),
3346
- messages: e.messages.length > 0 ? [...e.messages] : void 0,
3347
- selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
3348
- }), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
3349
- }
3350
- _clearSession() {
3351
- this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
3352
- }
3353
- _seedFromPropsOnce() {
3354
- if (!this._ownsSession || this._seededFromProps) return;
3355
- let e = this.requireSession(), t = this.options.getSeed(), n = {};
3356
- 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);
3357
- }
3358
- _wire(e) {
3359
- this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
3360
- this.options.onRenderNeeded();
3361
- });
3362
- }
3363
- _unwire() {
3364
- this._unsubscribe?.(), this._unsubscribe = null;
3365
- }
3366
- }, $ = class t extends i {
3367
- constructor(...e) {
3368
- 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({
3369
- getConfig: () => this._buildSessionConfig(),
3370
- getSeed: () => ({
3371
- messages: this.messages,
3372
- selectedDatasets: Array.isArray(this.selectedDatasets) ? this.selectedDatasets : [],
3373
- conversationId: this.conversationId
3374
- }),
3375
- createDomBridge: () => this._createDomBridgeCallbacks(),
3376
- onRenderNeeded: () => {
3377
- this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
3378
- }
3379
- }), this._handleAssistantMessageActionsSlotChange = (e) => {
3380
- let t = e.target.assignedElements({ flatten: !0 }).length > 0;
3381
- this._setAssistantMessageActionsSlotHasContent(t);
3382
- }, this._handleAssistantMessageActionConfirmKeydown = (e) => {
3383
- e.key !== "Escape" || !this._pendingAssistantMessageAction || (e.preventDefault(), e.stopPropagation(), this._cancelAssistantMessageActionConfirm());
3384
- };
3385
- }
3386
- static {
3387
- this.styles = f(Cn);
3388
- }
3389
- static {
3390
- this.tagName = "luzmo-ai-chat";
3391
- }
3392
- static {
3393
- this.assistantMessageActionsSlot = "assistant-message-actions";
3394
- }
3395
- get session() {
3396
- return this._session.current;
3397
- }
3398
- _getRenderState() {
3399
- return this._session.state;
3400
- }
3401
- _createDomBridgeCallbacks() {
3402
- return {
3403
- onMessageSent: (e, t) => {
3404
- this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
3405
- detail: {
3406
- message: e,
3407
- selectedDatasets: t
3408
- },
3409
- bubbles: !0,
3410
- composed: !0
3411
- }));
3412
- },
3413
- onDatasetsChanged: (e) => {
3414
- this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
3415
- detail: { selectedDatasets: e },
3416
- bubbles: !0,
3417
- composed: !0
3418
- }));
3419
- },
3420
- onConversationIdChange: (e) => this._emitConversationIdChanged(e),
3421
- onStep: (e) => {
3422
- this.dispatchEvent(new CustomEvent("luzmo-step", {
3423
- detail: e,
3424
- bubbles: !0,
3425
- composed: !0
3426
- }));
3427
- },
3428
- onComplete: (e) => {
3429
- this.dispatchEvent(new CustomEvent("luzmo-complete", {
3430
- detail: e,
3431
- bubbles: !0,
3432
- composed: !0
3433
- }));
3434
- },
3435
- onPromptStopped: () => {
3436
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3437
- bubbles: !0,
3438
- composed: !0
3439
- }));
3440
- },
3441
- ...typeof this.uploadAttachments == "function" ? { uploadAttachments: (e, t) => this.uploadAttachments(e, t) } : {}
3442
- };
3443
- }
3444
- get _resolvedAcceptedFileTypes() {
3445
- return this.acceptedFileTypes.length > 0 ? this.acceptedFileTypes : this.allowImages ? [...e] : [];
3446
- }
3447
- _buildSessionConfig() {
3448
- return {
3449
- agent: this.agent,
3450
- agentId: this.agentId,
3451
- authKey: this.authKey,
3452
- authToken: this.authToken,
3453
- apiUrl: this.apiUrl,
3454
- apiVersion: this.apiVersion,
3455
- stream: this.stream,
3456
- conversationId: this.conversationId,
3457
- chart: this.chart,
3458
- dashboard: this.dashboard,
3459
- currentScreenMode: this.currentScreenMode,
3460
- localeId: this.localeId,
3461
- timezoneId: this.timezoneId,
3462
- task: this.task,
3463
- modelPreference: this.modelPreference,
3464
- requireDataset: this.requireDataset
3465
- };
3466
- }
3467
- _emitConversationIdChanged(e) {
3468
- this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
3469
- detail: { conversationId: e },
3470
- bubbles: !0,
3471
- composed: !0
3472
- }));
3473
- }
3474
- async _restoreViaSession(e, t) {
3475
- await this._session.requireSession().restore({
3476
- restoreToMessageId: e,
3477
- messageIndex: t
3478
- });
3479
- }
3480
- async _handleRestoreState(e, t) {
3481
- if (e.apiMessageId && this.agent === "item") try {
3482
- await this._restoreViaSession(e.apiMessageId, t);
3483
- } catch (e) {
3484
- console.error("AI restore error:", e);
3485
- }
3486
- }
3487
- _handleDatasetSelected(e) {
3488
- this._session.requireSession().addDataset(e.detail);
3489
- }
3490
- _handleDatasetRemoved(e) {
3491
- this._session.requireSession().removeDataset(e.detail.id);
3492
- }
3493
- async _submitViaSession(e, t = {}) {
3494
- let n = this._session.requireSession();
3495
- if (!n.isDatasetRequirementMet()) return !1;
3496
- this._textareaValue = "";
3497
- try {
3498
- return await n.submit({
3499
- prompt: e,
3500
- ...t
3501
- }), !0;
3502
- } catch (e) {
3503
- return e.name !== "AbortError" && console.error("AI prompt session error:", e), !1;
3504
- }
3505
- }
3506
- async _handlePromptSubmitted(e) {
3507
- let t = e.detail.prompt;
3508
- await this._submitViaSession(t, {
3509
- ...e.detail.attachments?.length ? { attachments: e.detail.attachments } : {},
3510
- ...e.detail.attachmentUrls?.length ? { attachmentUrls: e.detail.attachmentUrls } : {}
3511
- }) || (this._textareaValue = t);
3512
- }
3513
- _handlePromptStopped() {
3514
- let e = this._session.current;
3515
- if (this._textareaValue = "", e) {
3516
- e.abort({
3517
- notify: !0,
3518
- cancelledMessage: this.cancelledMessage ?? void 0
3519
- });
3520
- return;
3521
- }
3522
- this.dispatchEvent(new CustomEvent("luzmo-stop", {
3523
- bubbles: !0,
3524
- composed: !0
3525
- }));
3526
- }
3527
- async _handleEmptyStateSuggestionSelected(e) {
3528
- let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
3529
- n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
3530
- }
3531
- async _processInitialPrompt() {
3532
- !this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
3533
- }
3534
- connectedCallback() {
3535
- super.connectedCallback(), this._session.connect();
3536
- }
3537
- disconnectedCallback() {
3538
- super.disconnectedCallback(), this._session.teardown();
3539
- }
3540
- _scrollToBottom() {
3541
- let e = this.shadowRoot?.querySelector(".chat-messages-container");
3542
- e && requestAnimationFrame(() => {
3543
- requestAnimationFrame(() => {
3544
- e.scrollTop = e.scrollHeight;
3545
- });
3546
- });
3547
- }
3548
- willUpdate(e) {
3549
- super.willUpdate?.(e), this._syncPendingAssistantMessageAction();
3550
- }
3551
- updated(e) {
3552
- super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange(), e.has("uploadAttachments") && this._session.current?.setUiBridge(this._createDomBridgeCallbacks()), this.updateComplete.then(() => {
3553
- this._syncAssistantMessageActionsVisibility(), this._focusPendingAssistantMessageActionConfirm();
3554
- });
3555
- }
3556
- _syncSession(e) {
3557
- if (e.has("chatSession")) {
3558
- this._session.setSession(this.chatSession);
3559
- return;
3560
- }
3561
- this._session.syncProperties(e);
3562
- }
3563
- _handleInitialPromptChange() {
3564
- this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
3565
- }
3566
- _renderMarkdown(e) {
3567
- let t = String(Q.parse(e, { async: !1 }));
3568
- return pt.sanitize(t, {
3569
- 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("."),
3570
- ALLOWED_ATTR: [
3571
- "href",
3572
- "title",
3573
- "target",
3574
- "rel"
3575
- ],
3576
- ALLOW_DATA_ATTR: !1,
3577
- FORBID_TAGS: [
3578
- "script",
3579
- "style",
3580
- "iframe",
3581
- "object",
3582
- "embed",
3583
- "link",
3584
- "form",
3585
- "input",
3586
- "button"
3587
- ],
3588
- FORBID_ATTR: [
3589
- "onerror",
3590
- "onload",
3591
- "onclick",
3592
- "onmouseover",
3593
- "onfocus",
3594
- "onblur"
3595
- ]
3596
- });
3597
- }
3598
- _renderProgress() {
3599
- let { progress: e, progressCollapsed: t } = this._getRenderState();
3600
- return e?.children?.length ? u`
3601
- <luzmo-progress-steps
3602
- .progress=${e}
3603
- ?collapsed=${t}
3604
- size="s"
3605
- ></luzmo-progress-steps>
3606
- ` : d;
3607
- }
3608
- _isLastAiMessageWithProgress(e, t) {
3609
- 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;
3610
- return !1;
3611
- }
3612
- _syncAssistantMessageActionsVisibility() {
3613
- let e = ((this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`) ?? null)?.assignedElements({ flatten: !0 }).length ?? 0) > 0;
3614
- this._setAssistantMessageActionsSlotHasContent(e);
3615
- }
3616
- _setAssistantMessageActionsSlotHasContent(e) {
3617
- e !== this._assistantMessageActionsSlotHasContent && (this._assistantMessageActionsSlotHasContent = e);
3618
- }
3619
- _isLatestAssistantMessage(e, t) {
3620
- return !!(t && e === t);
3621
- }
3622
- _hasBuiltInAssistantMessageActions(e) {
3623
- return (e.actions?.length ?? 0) > 0;
3624
- }
3625
- _assistantMessageActionsFooterHasContent(e, t) {
3626
- return this._hasBuiltInAssistantMessageActions(e) || t && this._assistantMessageActionsSlotHasContent;
3627
- }
3628
- _syncPendingAssistantMessageAction() {
3629
- let e = this._pendingAssistantMessageAction;
3630
- if (!e) return;
3631
- let { messages: t } = this._getRenderState(), n = t.find((t) => t.id === e.messageId), r = n?.actions?.find((t) => t.id === e.actionId);
3632
- (!n || !r?.confirm) && (this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1);
3633
- }
3634
- _getDefaultAssistantMessageActionConfirmMessage() {
3635
- return o("Are you sure?", { desc: "Default assistant message action confirmation prompt" });
3636
- }
3637
- _isAssistantMessageActionConfirming(e) {
3638
- let t = this._pendingAssistantMessageAction, n = e.id;
3639
- return !!(t && n && t.messageId === n);
3640
- }
3641
- _getPendingAssistantMessageAction(e) {
3642
- let t = this._pendingAssistantMessageAction, n = e.id;
3643
- if (!(!t || !n || t.messageId !== n)) return e.actions?.find((e) => e.id === t.actionId);
3644
- }
3645
- _handleAssistantMessageAction(e, t) {
3646
- let n = e.id;
3647
- n && this.dispatchEvent(new CustomEvent("luzmo-assistant-message-action", {
3648
- detail: {
3649
- messageId: n,
3650
- actionId: t.id,
3651
- message: e
3652
- },
3653
- bubbles: !0,
3654
- composed: !0
3655
- }));
3656
- }
3657
- _handleAssistantMessageActionClick(e, t) {
3658
- let n = e.id;
3659
- if (n) {
3660
- if (t.confirm) {
3661
- this._pendingAssistantMessageAction = {
3662
- messageId: n,
3663
- actionId: t.id
3664
- }, this._shouldFocusAssistantMessageActionConfirm = !0;
3665
- return;
3666
- }
3667
- this._handleAssistantMessageAction(e, t);
3668
- }
3669
- }
3670
- _cancelAssistantMessageActionConfirm() {
3671
- this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1;
3672
- }
3673
- _confirmAssistantMessageAction(e, t) {
3674
- this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._handleAssistantMessageAction(e, t);
3675
- }
3676
- _focusPendingAssistantMessageActionConfirm() {
3677
- !this._shouldFocusAssistantMessageActionConfirm || !this._pendingAssistantMessageAction || (this._shouldFocusAssistantMessageActionConfirm = !1, (this.shadowRoot?.querySelector("luzmo-button.assistant-message-action-confirm-cancel"))?.focus?.());
3678
- }
3679
- _renderBuiltInAssistantMessageAction(e, t) {
3680
- return u`
3681
- <luzmo-button
3682
- class="assistant-message-action"
3683
- size="xs"
3684
- variant="neutral"
3685
- treatment="outline"
3686
- ?disabled=${this.disabled || t.disabled || !e.id}
3687
- @click=${() => this._handleAssistantMessageActionClick(e, t)}
3688
- >
3689
- ${t.icon ? u`<luzmo-icon slot="icon" .icon=${t.icon} size="xs"></luzmo-icon>` : d}
3690
- ${t.label}
3691
- </luzmo-button>
3692
- `;
3693
- }
3694
- _renderAssistantMessageActionConfirm(e) {
3695
- let t = this._getPendingAssistantMessageAction(e);
3696
- if (!t) return d;
3697
- let n = t.confirmMessage ?? this._getDefaultAssistantMessageActionConfirmMessage(), r = this.disabled || t.disabled || !e.id;
3698
- return u`
3699
- <span class="assistant-message-action-confirm-message" role="status" aria-live="polite">${n}</span>
3700
- <div class="assistant-message-action-confirm-controls">
3701
- <luzmo-button
3702
- class="assistant-message-action-confirm-cancel"
3703
- size="xs"
3704
- variant="neutral"
3705
- treatment="outline"
3706
- ?disabled=${this.disabled}
3707
- @click=${this._cancelAssistantMessageActionConfirm}
3708
- >
3709
- ${o("Cancel", { desc: "Cancel assistant message action confirmation" })}
3710
- </luzmo-button>
3711
- <luzmo-button
3712
- class="assistant-message-action-confirm-confirm"
3713
- size="xs"
3714
- variant=${t.confirmVariant ?? "negative"}
3715
- ?disabled=${r}
3716
- @click=${() => this._confirmAssistantMessageAction(e, t)}
3717
- >
3718
- ${t.label}
3719
- </luzmo-button>
3720
- </div>
3721
- `;
3722
- }
3723
- _renderAssistantMessageActions(e, n) {
3724
- let r = e.actions ?? [], i = r.length > 0, a = this._isLatestAssistantMessage(e, n), o = this._isAssistantMessageActionConfirming(e);
3725
- return !i && !a ? d : u`
3726
- <div
3727
- class="assistant-message-actions ${this._assistantMessageActionsFooterHasContent(e, a) ? "assistant-message-actions--has-content" : ""} ${o ? "assistant-message-actions--confirming" : ""}"
3728
- @keydown=${o ? this._handleAssistantMessageActionConfirmKeydown : d}
3729
- >
3730
- ${o ? this._renderAssistantMessageActionConfirm(e) : u`
3731
- ${r.map((t) => this._renderBuiltInAssistantMessageAction(e, t))}
3732
- ${a ? u`
3733
- <slot
3734
- name=${t.assistantMessageActionsSlot}
3735
- @slotchange=${this._handleAssistantMessageActionsSlotChange}
3736
- ></slot>
3737
- ` : d}
3738
- `}
3739
- </div>
3740
- `;
3741
- }
3742
- _renderRestoreMenu(e, t, n, r = !1) {
3743
- if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== n)) return d;
3744
- let i = `context-menu-trigger-${e.apiMessageId}`;
3745
- return u`
3746
- <div class="assistant-context-menu">
3747
- <button
3748
- id=${i}
3749
- class="assistant-context-menu-trigger"
3750
- type="button"
3751
- aria-label=${o("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
3752
- aria-haspopup="menu"
3753
- ?disabled=${r}
3754
- >
3755
- ${c(s)}
3756
- </button>
3757
- <luzmo-overlay
3758
- trigger="${i}@click"
3759
- placement="bottom-end"
3760
- >
3761
- <luzmo-popover>
3762
- <button
3763
- class="assistant-context-menu-item"
3764
- type="button"
3765
- ?disabled=${r}
3766
- @click=${() => this._handleRestoreState(e, t)}
3767
- >
3768
- ${o("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
3769
- </button>
3770
- </luzmo-popover>
3771
- </luzmo-overlay>
3772
- </div>
3773
- `;
3774
- }
3775
- _renderMessages() {
3776
- 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;
3777
- return i.map((t) => {
3778
- let c = !!t.progress?.children?.length, l = c && this._isLastAiMessageWithProgress(t, i), f = c && (r || n || !l), p = c ? u`
3779
- <luzmo-progress-steps
3780
- .progress=${t.progress}
3781
- ?condensed=${f}
3782
- collapsed
3783
- no-animate
3784
- size="s"
3785
- ></luzmo-progress-steps>
3786
- ` : d;
3787
- if (t.type === "user") {
3788
- let e = t.attachmentUrls ?? [];
3789
- return u`
3790
- <luzmo-chat-message
3791
- avatar-placement="bottom"
3792
- position="right"
3793
- variant="primary"
3794
- size="s"
3795
- >
3796
- <div class="user-message-content">
3797
- ${e.length > 0 ? u`
3798
- <div class="user-message-attachments">
3799
- ${e.map((e) => u`
3800
- <img
3801
- class="user-message-attachment"
3802
- src=${e}
3803
- alt=${o("Attached image", { desc: "Accessible label for an image attached to a user chat message" })}
3804
- width="64"
3805
- height="64"
3806
- />
3807
- `)}
3808
- </div>
3809
- ` : d}
3810
- <div class="user-message-text">${t.message}</div>
3811
- </div>
3812
- </luzmo-chat-message>
3813
- `;
3814
- }
3815
- 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>`;
3816
- return u`
3817
- ${p}
3818
- <div class="assistant-message-wrapper">
3819
- <div class="assistant-message-body">
3820
- <luzmo-chat-message
3821
- class=${h}
3822
- role=${t.isError ? "alert" : d}
3823
- avatar-placement="bottom"
3824
- position="left"
3825
- quiet
3826
- size="s"
3827
- >
3828
- ${g}
3829
- </luzmo-chat-message>
3830
-
3831
- ${this._renderRestoreMenu(t, m, s, r)}
3832
- </div>
3833
-
3834
- ${this._renderAssistantMessageActions(t, a)}
3835
- </div>
3836
- `;
3837
- });
3838
- }
3839
- _renderStreamingResponse() {
3840
- let { inflightMessage: e } = this._getRenderState();
3841
- return e?.message ? u`
3842
- <luzmo-chat-message
3843
- avatar-placement="bottom"
3844
- position="left"
3845
- quiet
3846
- size="s"
3847
- >
3848
- <div class="markdown-content">${ee(this._renderMarkdown(e.message))}</div>
3849
- </luzmo-chat-message>
3850
- ` : d;
3851
- }
3852
- _renderLoadingMessage() {
3853
- let { isGenerating: e, progress: t, inflightMessage: n } = this._getRenderState();
3854
- if (!e || t?.children?.length || n?.message) return d;
3855
- 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" });
3856
- return u`
3857
- <luzmo-chat-message
3858
- avatar-placement="bottom"
3859
- position="left"
3860
- quiet
3861
- size="s"
3862
- >
3863
- <div class="loading-message" role="status" aria-live="polite">
3864
- <span class="icon-lg">${c(l, { className: "spin" })}</span>
3865
- <span class="loading-message-text">${this.loadingMessage || i}</span>
3866
- </div>
3867
- </luzmo-chat-message>
3868
- `;
3869
- }
3870
- _renderEmptyState() {
3871
- if (this._getRenderState().messages.length > 0) return d;
3872
- let e = o("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
3873
- return u`
3874
- <luzmo-ai-chat-empty-state
3875
- .title=${this.emptyStateTitle || e}
3876
- .subtitle=${t ? this.emptyStateSubtitle : ""}
3877
- .suggestions=${this.emptyStateSuggestions}
3878
- ?disabled=${this.disabled || this._getRenderState().isGenerating}
3879
- @luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
3880
- ></luzmo-ai-chat-empty-state>
3881
- `;
3882
- }
3883
- render() {
3884
- let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
3885
- return u`
3886
- <div class="chat-container" role="region" aria-label=${o("AI Chat", { desc: "Accessible label for AI chat region" })}>
3887
- <div class="chat-messages-container" role="log" aria-live="polite">
3888
- ${this._renderEmptyState()}
3889
- ${this._renderMessages()}
3890
- ${this._renderProgress()}
3891
- ${this._renderStreamingResponse()}
3892
- ${this._renderLoadingMessage()}
3893
- </div>
3894
-
3895
- <luzmo-ai-interaction-textarea
3896
- role="group"
3897
- aria-label=${o("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
3898
- .value=${this._textareaValue}
3899
- .selectedDatasets=${e}
3900
- .placeholder=${this.placeholder}
3901
- ?disabled=${this.disabled}
3902
- ?is-generating=${t}
3903
- ?stoppable=${this.stoppable}
3904
- ?hide-dataset-button=${this.hideDatasetButton}
3905
- ?hide-dataset-icons=${this.hideDatasetIcons}
3906
- ?disable-dataset-modification=${this.disableDatasetModification}
3907
- ?hide-selected-datasets=${this.hideSelectedDatasets}
3908
- ?disable-column-mentions=${this.disableColumnMentions}
3909
- ?require-dataset=${this.requireDataset}
3910
- ?allow-images=${this.allowImages}
3911
- ?allow-voice-input=${this.allowVoiceInput}
3912
- .acceptedFileTypes=${this._resolvedAcceptedFileTypes}
3913
- .uploadAttachments=${this.uploadAttachments}
3914
- auth-key=${this.authKey}
3915
- auth-token=${this.authToken}
3916
- api-url=${this.apiUrl}
3917
- api-version=${this.apiVersion}
3918
- app-server=${this.appServer}
3919
- ?flag-opendata=${this.flagOpendata}
3920
- @prompt-submitted=${this._handlePromptSubmitted}
3921
- @prompt-stopped=${this._handlePromptStopped}
3922
- @dataset-selected=${this._handleDatasetSelected}
3923
- @dataset-removed=${this._handleDatasetRemoved}
3924
- ></luzmo-ai-interaction-textarea>
3925
- </div>
3926
- `;
3927
- }
3928
- };
3929
- a([p({ type: Array })], $.prototype, "messages", void 0), a([p({
3930
- type: Array,
3931
- attribute: "selected-datasets"
3932
- })], $.prototype, "selectedDatasets", void 0), a([p({ type: String })], $.prototype, "placeholder", void 0), a([p({
3933
- type: Boolean,
3934
- reflect: !0
3935
- })], $.prototype, "disabled", void 0), a([p({
3936
- type: Boolean,
3937
- reflect: !0
3938
- })], $.prototype, "stoppable", void 0), a([p({
3939
- type: Boolean,
3940
- attribute: "show-assistant-context-menu"
3941
- })], $.prototype, "showAssistantContextMenu", void 0), a([p({
3942
- type: String,
3943
- attribute: "auth-key"
3944
- })], $.prototype, "authKey", void 0), a([p({
3945
- type: String,
3946
- attribute: "auth-token"
3947
- })], $.prototype, "authToken", void 0), a([p({
3948
- type: String,
3949
- attribute: "api-url"
3950
- })], $.prototype, "apiUrl", void 0), a([p({
3951
- type: String,
3952
- attribute: "app-server"
3953
- })], $.prototype, "appServer", void 0), a([p({
3954
- type: Boolean,
3955
- attribute: "flag-opendata"
3956
- })], $.prototype, "flagOpendata", void 0), a([p({
3957
- type: Boolean,
3958
- attribute: "hide-dataset-button"
3959
- })], $.prototype, "hideDatasetButton", void 0), a([p({
3960
- type: Boolean,
3961
- attribute: "hide-dataset-icons"
3962
- })], $.prototype, "hideDatasetIcons", void 0), a([p({
3963
- type: Boolean,
3964
- attribute: "disable-dataset-modification"
3965
- })], $.prototype, "disableDatasetModification", void 0), a([p({
3966
- type: Boolean,
3967
- attribute: "hide-selected-datasets"
3968
- })], $.prototype, "hideSelectedDatasets", void 0), a([p({
3969
- type: Boolean,
3970
- attribute: "disable-column-mentions"
3971
- })], $.prototype, "disableColumnMentions", void 0), a([p({
3972
- type: Boolean,
3973
- attribute: "require-dataset"
3974
- })], $.prototype, "requireDataset", void 0), a([p({
3975
- type: Boolean,
3976
- reflect: !0,
3977
- attribute: "allow-images"
3978
- })], $.prototype, "allowImages", void 0), a([p({
3979
- type: Boolean,
3980
- reflect: !0,
3981
- attribute: "allow-voice-input"
3982
- })], $.prototype, "allowVoiceInput", void 0), a([p({
3983
- type: Array,
3984
- attribute: "accepted-file-types"
3985
- })], $.prototype, "acceptedFileTypes", void 0), a([p({ attribute: !1 })], $.prototype, "uploadAttachments", void 0), a([p({ type: String })], $.prototype, "agent", void 0), a([p({
3986
- type: String,
3987
- attribute: "agent-id"
3988
- })], $.prototype, "agentId", void 0), a([p({ type: String })], $.prototype, "task", void 0), a([p({
3989
- type: String,
3990
- attribute: "model-preference"
3991
- })], $.prototype, "modelPreference", void 0), a([p({ attribute: !1 })], $.prototype, "chatSession", void 0), a([p({
3992
- type: String,
3993
- attribute: "conversation-id"
3994
- })], $.prototype, "conversationId", void 0), a([p({
3995
- type: Object,
3996
- attribute: "chart"
3997
- })], $.prototype, "chart", void 0), a([p({ type: Object })], $.prototype, "dashboard", void 0), a([p({
3998
- type: String,
3999
- attribute: "current-screen-mode"
4000
- })], $.prototype, "currentScreenMode", void 0), a([p({
4001
- type: String,
4002
- attribute: "locale-id"
4003
- })], $.prototype, "localeId", void 0), a([p({
4004
- type: String,
4005
- attribute: "timezone-id"
4006
- })], $.prototype, "timezoneId", void 0), a([p({
4007
- type: String,
4008
- attribute: "api-version"
4009
- })], $.prototype, "apiVersion", void 0), a([p({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), a([p({
4010
- type: String,
4011
- attribute: "loading-message"
4012
- })], $.prototype, "loadingMessage", void 0), a([p({
4013
- type: String,
4014
- attribute: "cancelled-message"
4015
- })], $.prototype, "cancelledMessage", void 0), a([p({
4016
- type: String,
4017
- attribute: "initial-prompt"
4018
- })], $.prototype, "initialPrompt", void 0), a([p({
4019
- type: String,
4020
- attribute: "empty-state-title"
4021
- })], $.prototype, "emptyStateTitle", void 0), a([p({
4022
- type: String,
4023
- attribute: "empty-state-subtitle"
4024
- })], $.prototype, "emptyStateSubtitle", void 0), a([p({
4025
- type: Array,
4026
- attribute: !1
4027
- })], $.prototype, "emptyStateSuggestions", void 0), a([m()], $.prototype, "_textareaValue", void 0), a([m()], $.prototype, "_assistantMessageActionsSlotHasContent", void 0), a([m()], $.prototype, "_pendingAssistantMessageAction", void 0);
4028
- //#endregion
4029
- //#region src/components/ai-chat/ai-chat-events.ts
4030
- function Gr(e) {
4031
- return e.recognized === !0;
4032
- }
4033
- //#endregion
4034
- //#region src/components/ai-chat/index.ts
4035
- customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
4036
- //#endregion
4037
- 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 };