@luzmo/analytics-components-kit 1.0.3-beta.12 → 1.0.3-beta.14
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.
- package/components/ai-chat/ai-chat.d.ts +19 -6
- package/components/ai-chat/empty-state/ai-chat-empty-state.d.ts +3 -3
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.js +2 -2
- package/components/ai-chat-B0pW6kHf.js +3670 -0
- package/components/ai-chat-BMsg63kL.cjs +245 -0
- package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +2 -2
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +2 -2
- package/components/{ai-interaction-textarea-BK25Gh9y.cjs → ai-interaction-textarea-BdwiRaLH.cjs} +1 -1
- package/components/{ai-interaction-textarea-KVfak9dJ.js → ai-interaction-textarea-BrIlb9n1.js} +3 -3
- package/components/{area-chart-positioning.config-CluRgySg.cjs → area-chart-positioning.config-Clvr_Aan.cjs} +1 -1
- package/components/{area-chart-positioning.config-BQ3W781c.js → area-chart-positioning.config-CuPvdTc_.js} +1 -1
- package/components/{bar-chart-positioning.config-bjKRYhyf.js → bar-chart-positioning.config-CqOU-wdj.js} +1 -1
- package/components/{bar-chart-positioning.config-DWoRFpau.cjs → bar-chart-positioning.config-Crwcy-yr.cjs} +1 -1
- package/components/{base-Cz8X1AUZ.js → base-BwKUauGs.js} +1 -1
- package/components/{base-CHERUz8a.cjs → base-ZuhO2UZd.cjs} +1 -1
- package/components/{box-plot-positioning.config-BkbkePNB.cjs → box-plot-positioning.config-Buxfxl5u.cjs} +1 -1
- package/components/{box-plot-positioning.config-D1L4YnVo.js → box-plot-positioning.config-CJi0zuFg.js} +1 -1
- package/components/{bubble-chart-positioning.config-sr_USUKd.js → bubble-chart-positioning.config-3iE4D0XL.js} +1 -1
- package/components/{bubble-chart-positioning.config-BmYsMt4g.cjs → bubble-chart-positioning.config-DpR9mwIF.cjs} +1 -1
- package/components/{bullet-chart-positioning.config-Bt0wTYY8.cjs → bullet-chart-positioning.config-4dG5YGWS.cjs} +1 -1
- package/components/{bullet-chart-positioning.config-ssxudOXU.js → bullet-chart-positioning.config-O7IS72VB.js} +1 -1
- package/components/{choropleth-map-positioning.config-BgCM0Nn0.cjs → choropleth-map-positioning.config-BvKjYfiU.cjs} +1 -1
- package/components/{choropleth-map-positioning.config-mLRtpeR3.js → choropleth-map-positioning.config-Dlqf-3-f.js} +1 -1
- package/components/{circle-pack-chart-positioning.config-BgCs5R92.cjs → circle-pack-chart-positioning.config-B6_Onx6i.cjs} +1 -1
- package/components/{circle-pack-chart-positioning.config-Bn4sFin7.js → circle-pack-chart-positioning.config-DNpMU7Z-.js} +1 -1
- package/components/{circular-gauge-positioning.config-Cy5CjLIk.cjs → circular-gauge-positioning.config-CX0pSRGc.cjs} +1 -1
- package/components/{circular-gauge-positioning.config-D2U5NmLq.js → circular-gauge-positioning.config-DMHwidbv.js} +1 -1
- package/components/{column-chart-positioning.config-b18vDVsz.cjs → column-chart-positioning.config-5K8NNZ1J.cjs} +1 -1
- package/components/{column-chart-positioning.config-iS4x5dCV.js → column-chart-positioning.config-CWqxK8FS.js} +1 -1
- package/components/{combination-chart-positioning.config-DaKmP7Kh.js → combination-chart-positioning.config-6Jw9GWdP.js} +1 -1
- package/components/{combination-chart-positioning.config-pT4a4ILl.cjs → combination-chart-positioning.config-BRU6ecRd.cjs} +1 -1
- package/components/{conditional-number-positioning.config-CPu4skJn.cjs → conditional-number-positioning.config-BnuBruTt.cjs} +1 -1
- package/components/{conditional-number-positioning.config-CtboUqkS.js → conditional-number-positioning.config-BpWa0OTR.js} +1 -1
- package/components/data-field/data-field.d.ts +7 -2
- package/components/data-field/index.cjs +1 -1
- package/components/data-field/index.js +2 -2
- package/components/{data-field-Dllzzk51.js → data-field-TXDuIrVY.js} +4 -4
- package/components/{data-field-CK5mg8ov.cjs → data-field-hLReNkXW.cjs} +1 -1
- package/components/data-field-level/data-field-level.d.ts +8 -2
- package/components/data-field-level/index.cjs +1 -1
- package/components/data-field-level/index.js +2 -2
- package/components/{data-field-level-DuMJGtLR.cjs → data-field-level-BsmyaMeC.cjs} +1 -1
- package/components/{data-field-level-oQY5cKmY.js → data-field-level-HHH9hMmb.js} +1 -1
- package/components/data-field-panel/data-field-panel.d.ts +2 -2
- package/components/data-field-panel/index.cjs +1 -1
- package/components/data-field-panel/index.js +2 -2
- package/components/{data-field-panel-vy8_v5PR.cjs → data-field-panel-DxbDbMKy.cjs} +1 -1
- package/components/{data-field-panel-26OP024i.js → data-field-panel-DyNtkiMX.js} +3 -3
- package/components/data-fields-select/data-fields-select.d.ts +2 -2
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +2 -2
- package/components/{data-fields-select-BKDJq_se.js → data-fields-select-CPAUibFD.js} +2 -2
- package/components/{data-fields-select-BqO9U_fB.cjs → data-fields-select-tOKVkjkh.cjs} +1 -1
- package/components/dataset-icon/dataset-icon.d.ts +2 -2
- package/components/dataset-icon/index.js +1 -1
- package/components/dataset-selector-list/dataset-selector-list.d.ts +2 -2
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +2 -2
- package/components/{dataset-selector-list-C4w3pJAF.js → dataset-selector-list-B3pSpE_Y.js} +1 -1
- package/components/{dataset-selector-list-BX3hM0p5.cjs → dataset-selector-list-MO9cYlwk.cjs} +1 -1
- package/components/dataset-selector-row/dataset-selector-row.d.ts +2 -2
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +2 -2
- package/components/{dataset-selector-row-C_epl89V.cjs → dataset-selector-row-BIuDsjRv.cjs} +1 -1
- package/components/{dataset-selector-row-63ER0c_P.js → dataset-selector-row-Dve-Xb5j.js} +1 -1
- package/components/de-CFeKdBZ_.cjs +20 -0
- package/components/de-bxx-Ya_Y.js +464 -0
- package/components/display-settings/display-settings.d.ts +4 -3
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +2 -2
- package/components/{display-settings-B2CNf_4m.js → display-settings-BtLYNbeD.js} +1 -1
- package/components/{display-settings-COST2fVX.cjs → display-settings-DNwcbq4m.cjs} +1 -1
- package/components/display-settings-binning/display-settings-binning.d.ts +2 -1
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +2 -2
- package/components/{display-settings-binning-DlmnLcxO.js → display-settings-binning-6PvcJnfm.js} +2 -2
- package/components/{display-settings-binning-ByYez8lF.cjs → display-settings-binning-UqBDqKHg.cjs} +1 -1
- package/components/display-settings-datetime/display-settings-datetime.d.ts +3 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +2 -2
- package/components/{display-settings-datetime-psWGvnDN.cjs → display-settings-datetime-BHjfhUcN.cjs} +2 -2
- package/components/{display-settings-datetime-_Q5En-Id.js → display-settings-datetime-D7VTKM4O.js} +4 -4
- package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +1 -1
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +2 -2
- package/components/{display-settings-grand-totals-B6U0qZsW.cjs → display-settings-grand-totals-Bg1bAe4Y.cjs} +1 -1
- package/components/{display-settings-grand-totals-BS4LAKpj.js → display-settings-grand-totals-N8z2xbbZ.js} +2 -2
- package/components/display-settings-numeric/display-settings-numeric.d.ts +1 -1
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +2 -2
- package/components/{display-settings-numeric-BgjYHCkN.js → display-settings-numeric-BtXC1gPj.js} +12 -12
- package/components/{display-settings-numeric-BWdO2rGj.cjs → display-settings-numeric-D5hQU-sd.cjs} +1 -1
- package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +5 -3
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +2 -2
- package/components/{display-settings-period-over-period-BEFyH0yI.js → display-settings-period-over-period-CSLfTV7e.js} +2 -2
- package/components/{display-settings-period-over-period-C3f23PVH.cjs → display-settings-period-over-period-DzSsF1nw.cjs} +1 -1
- package/components/{donut-chart-positioning.config-HfFYDF5j.cjs → donut-chart-positioning.config-BSb68HFR.cjs} +1 -1
- package/components/{donut-chart-positioning.config-0vaHRSc2.js → donut-chart-positioning.config-Dx3jt1n_.js} +1 -1
- package/components/es-DelFOUQS.js +464 -0
- package/components/es-fAEaQEhg.cjs +20 -0
- package/components/{evolution-number-positioning.config-ut9UHsCD.js → evolution-number-positioning.config-BA8aL9iJ.js} +1 -1
- package/components/{evolution-number-positioning.config-CEPjMM87.cjs → evolution-number-positioning.config-DQbhwiGv.cjs} +1 -1
- package/components/filter-expression-picker/filter-expression-picker.d.ts +2 -1
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +2 -2
- package/components/{filter-expression-picker-C_LCUIow.js → filter-expression-picker-BlzebHtT.js} +1 -1
- package/components/{filter-expression-picker-CtfEW0z9.cjs → filter-expression-picker-Co7iUnwo.cjs} +1 -1
- package/components/filter-item/filter-item.d.ts +2 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +2 -2
- package/components/{filter-item-B8xgxpHy.js → filter-item-BIa9Y1TU.js} +4 -4
- package/components/{filter-item-DOBYOfTH.cjs → filter-item-DiuMzccR.cjs} +1 -1
- package/components/filter-parameter-picker/filter-parameter-picker.d.ts +1 -1
- package/components/filter-parameter-picker/index.js +1 -1
- package/components/filter-value-picker/filter-value-picker.d.ts +2 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +2 -2
- package/components/{filter-value-picker-DTlwSC__.cjs → filter-value-picker-BdsGUgBl.cjs} +1 -1
- package/components/{filter-value-picker-B8494YGt.js → filter-value-picker-DV4IRVag.js} +4 -4
- package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +2 -1
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +2 -2
- package/components/{filter-value-picker-datetime-Ab0vZLuW.cjs → filter-value-picker-datetime-DvV2PR3B.cjs} +1 -1
- package/components/{filter-value-picker-datetime-C__dbLwJ.js → filter-value-picker-datetime-_EDhhzr_.js} +2 -2
- package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +2 -1
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +2 -2
- package/components/{filter-value-picker-hierarchy-Dv5qF762.js → filter-value-picker-hierarchy-CgYAWQ-g.js} +2 -2
- package/components/{filter-value-picker-hierarchy-CQfDao3J.cjs → filter-value-picker-hierarchy-CqZXOE2D.cjs} +1 -1
- package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +2 -1
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +2 -2
- package/components/{filter-value-picker-numeric-CPor-VLy.js → filter-value-picker-numeric-C4VF0Kot.js} +1 -1
- package/components/{filter-value-picker-numeric-DNCCxdwh.cjs → filter-value-picker-numeric-t24bCjgg.cjs} +1 -1
- package/components/filters/filters.d.ts +1 -1
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +2 -2
- package/components/{filters-D1vuRGRC.cjs → filters-C10dtogk.cjs} +1 -1
- package/components/{filters-BymXxTXZ.js → filters-DJ9eq7Xq.js} +2 -2
- package/components/formula/formula.d.ts +5 -4
- package/components/formula/index.cjs +1 -1
- package/components/formula/index.js +2 -2
- package/components/{formula-BZuUMeUb.js → formula-BgvJ0GQ4.js} +2 -2
- package/components/{formula-u4CxsVki.cjs → formula-DHQae3tc.cjs} +1 -1
- package/components/formula-codemirror/formula-codemirror.d.ts +4 -4
- package/components/formula-codemirror/pills/formula-aggregation/formula-aggregation.d.ts +4 -4
- package/components/formula-codemirror/pills/formula-empty-argument-pill/formula-empty-argument-pill.d.ts +4 -4
- package/components/formula-codemirror/pills/formula-include-exclude-panel.d.ts +2 -2
- package/components/{formula-codemirror-p7ssM_dZ.cjs → formula-codemirror-BZTsmrYL.cjs} +3 -3
- package/components/{formula-codemirror-CYBD_5bC.js → formula-codemirror-iySUHkZq.js} +6 -6
- package/components/formula-display-store-CTXbAK2f.cjs +20 -0
- package/components/{formula-display-store-BtD83k2x.js → formula-display-store-CcBMayNE.js} +22 -19
- package/components/formula-draggable-field/formula-draggable-field.d.ts +2 -2
- package/components/formula-editor/formula-aggregations-list.d.ts +3 -3
- package/components/formula-editor/formula-datasets-list.d.ts +3 -3
- package/components/formula-editor/formula-description.d.ts +2 -2
- package/components/formula-editor/formula-editor.d.ts +3 -3
- package/components/formula-editor/formula-functions-list.d.ts +3 -3
- package/components/formula-editor/index.cjs +1 -1
- package/components/formula-editor/index.d.ts +3 -3
- package/components/formula-editor/index.js +4 -4
- package/components/{formula-editor-DfTDtGC4.cjs → formula-editor-L1af23DU.cjs} +2 -2
- package/components/{formula-editor-C1zz5pEL.js → formula-editor-YtSlmUwM.js} +9 -6
- package/components/formula-field/formula-field.d.ts +3 -3
- package/components/formula-field/index.cjs +1 -1
- package/components/formula-field/index.js +2 -2
- package/components/{formula-field-Dd1vnGZA.cjs → formula-field-CpKC6bbr.cjs} +1 -1
- package/components/{formula-field-B2TQe1Z_.js → formula-field-DdZ4ll8e.js} +1 -1
- package/components/{formula-input-base-B-Li9TP4.js → formula-input-base-B18f5b5l.js} +1 -1
- package/components/{formula-input-base-DjJ2Q4gu.cjs → formula-input-base-BlHhsmsp.cjs} +1 -1
- package/components/fr-5jK3qviC.cjs +20 -0
- package/components/fr-DjXcKdWm.js +464 -0
- package/components/{funnel-chart-positioning.config-D7Xlk3FE.js → funnel-chart-positioning.config-DtUWAc7T.js} +1 -1
- package/components/{funnel-chart-positioning.config-BrzmZ7am.cjs → funnel-chart-positioning.config-w2JdWOJK.cjs} +1 -1
- package/components/{get-dataset-name-CQ6DnC9l.cjs → get-dataset-name-CZU5eeyo.cjs} +1 -1
- package/components/{get-dataset-name-DqnY_mgB.js → get-dataset-name-gEWlDRD5.js} +1 -1
- package/components/{groupings-JilcSOEe.js → groupings-Txqk_wHs.js} +1 -1
- package/components/{groupings-BdNTQMKX.cjs → groupings-n-soRcZA.cjs} +1 -1
- package/components/{heat-map-positioning.config-I3Ug3uV1.cjs → heat-map-positioning.config-BCsBYI1C.cjs} +1 -1
- package/components/{heat-map-positioning.config-CRIig7j8.js → heat-map-positioning.config-DIQNlbm1.js} +1 -1
- package/components/{heat-table-positioning.config-ScLRznks.js → heat-table-positioning.config-B6OntYKu.js} +1 -1
- package/components/{heat-table-positioning.config-ovhEUbVq.cjs → heat-table-positioning.config-DKMu_7fQ.cjs} +1 -1
- package/components/{hexbin-map-positioning.config-kkKW5lhz.cjs → hexbin-map-positioning.config-BtxDUhio.cjs} +1 -1
- package/components/{hexbin-map-positioning.config-9QZqjbYe.js → hexbin-map-positioning.config-D9jHfncD.js} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +52 -52
- package/components/item-grid/helpers/grid-item-popover.d.ts +1 -1
- package/components/item-grid/helpers/grid-rendering.d.ts +2 -2
- package/components/item-grid/index.cjs +1 -1
- package/components/item-grid/index.js +2 -2
- package/components/item-grid/item-grid-item-actions-menu.d.ts +2 -1
- package/components/item-grid/item-grid.d.ts +1 -1
- package/components/item-grid/types.d.ts +1 -1
- package/components/{item-grid-CN26hp77.cjs → item-grid-Hcahqw8V.cjs} +1 -1
- package/components/{item-grid-Cg2weB0_.js → item-grid-bjpi9sSB.js} +1 -1
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.js +2 -2
- package/components/item-option/item-option.d.ts +11 -1
- package/components/{item-option-irtdsy-C.js → item-option-B7cG4nHM.js} +1 -1
- package/components/{item-option-BiYr_Mq6.cjs → item-option-CiMdtMdo.cjs} +1 -1
- package/components/item-option-action-button-group/index.cjs +1 -1
- package/components/item-option-action-button-group/index.js +2 -2
- package/components/item-option-action-button-group/item-option-action-button-group.d.ts +7 -2
- package/components/{item-option-action-button-group-Dx3xkGD_.cjs → item-option-action-button-group-BtS9Ho3y.cjs} +1 -1
- package/components/{item-option-action-button-group-Brzy-Bfe.js → item-option-action-button-group-CvT79MQj.js} +1 -1
- package/components/item-option-base/item-option-base.d.ts +1 -1
- package/components/{item-option-base-dBn9Kbg0.js → item-option-base-CWK-MoDz.js} +1 -1
- package/components/{item-option-base-Cv8StwBp.cjs → item-option-base-vrkMCFHF.cjs} +1 -1
- package/components/item-option-color-palette-picker/index.cjs +1 -1
- package/components/item-option-color-palette-picker/index.js +2 -2
- package/components/item-option-color-palette-picker/item-option-color-palette-picker.d.ts +2 -2
- package/components/{item-option-color-palette-picker-orXAN_x8.cjs → item-option-color-palette-picker-BlhO3Kri.cjs} +1 -1
- package/components/{item-option-color-palette-picker-dE6IJWsA.js → item-option-color-palette-picker-CbtgwN1J.js} +1 -1
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.js +2 -2
- package/components/item-option-color-picker/item-option-color-picker.d.ts +10 -4
- package/components/{item-option-color-picker-BIe2BdWA.cjs → item-option-color-picker-C-D1vohW.cjs} +1 -1
- package/components/{item-option-color-picker-S0N7EfsT.js → item-option-color-picker-CccU9Lry.js} +1 -1
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.js +2 -2
- package/components/item-option-color-range/item-option-color-range.d.ts +2 -2
- package/components/{item-option-color-range-CxUXZVKY.cjs → item-option-color-range-CbKK4m6t.cjs} +1 -1
- package/components/{item-option-color-range-n3UXaYBl.js → item-option-color-range-DwP4zb0q.js} +1 -1
- package/components/item-option-multi-language-field/index.cjs +1 -1
- package/components/item-option-multi-language-field/index.js +2 -2
- package/components/item-option-multi-language-field/item-option-multi-language-field.d.ts +10 -1
- package/components/{item-option-multi-language-field-DywcCJYW.js → item-option-multi-language-field-C71-iMVr.js} +1 -1
- package/components/{item-option-multi-language-field-DqHtYV3B.cjs → item-option-multi-language-field-CfPtLuVH.cjs} +1 -1
- package/components/item-option-number-field/index.cjs +1 -1
- package/components/item-option-number-field/index.js +2 -2
- package/components/item-option-number-field/item-option-number-field.d.ts +14 -1
- package/components/{item-option-number-field-Dk7HZ4qV.cjs → item-option-number-field-0XRgAD5B.cjs} +1 -1
- package/components/{item-option-number-field-CTCKepM3.js → item-option-number-field-CP8SMZMR.js} +1 -1
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.js +2 -2
- package/components/item-option-panel/item-option-panel.d.ts +2 -2
- package/components/{item-option-panel-veSHsj_H.js → item-option-panel-BwYSwYSj.js} +2 -2
- package/components/{item-option-panel-D3FQZete.cjs → item-option-panel-JQ26EogB.cjs} +1 -1
- package/components/item-option-picker/index.cjs +1 -1
- package/components/item-option-picker/index.js +2 -2
- package/components/item-option-picker/item-option-picker.d.ts +9 -5
- package/components/{item-option-picker-BpJmk1Zt.cjs → item-option-picker-BJsgcTnE.cjs} +1 -1
- package/components/{item-option-picker-BMBG1JUf.js → item-option-picker-DIWqO_S7.js} +1 -1
- package/components/item-option-position-picker/index.cjs +1 -1
- package/components/item-option-position-picker/index.js +2 -2
- package/components/item-option-position-picker/item-option-position-picker.d.ts +5 -1
- package/components/{item-option-position-picker-CfSJvTYq.cjs → item-option-position-picker-BdT0UnEB.cjs} +1 -1
- package/components/{item-option-position-picker-Cla-sN0D.js → item-option-position-picker-DidnyN7_.js} +1 -1
- package/components/item-option-positions-number-field/index.cjs +1 -1
- package/components/item-option-positions-number-field/index.js +2 -2
- package/components/item-option-positions-number-field/item-option-positions-number-field.d.ts +11 -1
- package/components/{item-option-positions-number-field-92fppVXW.js → item-option-positions-number-field-B3ZRQ-GZ.js} +1 -1
- package/components/{item-option-positions-number-field-Dy_61Be2.cjs → item-option-positions-number-field-DPMVuUMn.cjs} +1 -1
- package/components/item-option-radio-button-group/index.cjs +1 -1
- package/components/item-option-radio-button-group/index.js +2 -2
- package/components/item-option-radio-button-group/item-option-radio-button-group.d.ts +9 -2
- package/components/{item-option-radio-button-group-maNKpXym.js → item-option-radio-button-group-BpAYKUcc.js} +1 -1
- package/components/{item-option-radio-button-group-CC_3O8pS.cjs → item-option-radio-button-group-D_tAaLOQ.cjs} +1 -1
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.js +2 -2
- package/components/item-option-slider/item-option-slider.d.ts +9 -1
- package/components/{item-option-slider-DEWWO09h.js → item-option-slider-CQI88p3O.js} +1 -1
- package/components/{item-option-slider-VX1pqQ_8.cjs → item-option-slider-DQx3yabJ.cjs} +1 -1
- package/components/item-option-switch/index.cjs +1 -1
- package/components/item-option-switch/index.js +2 -2
- package/components/item-option-switch/item-option-switch.d.ts +5 -1
- package/components/{item-option-switch-BZaacV9H.cjs → item-option-switch-BZ9JDF_Q.cjs} +1 -1
- package/components/{item-option-switch-BUuGrKEd.js → item-option-switch-CZ00Bd-L.js} +1 -1
- package/components/item-option-text-field/index.cjs +1 -1
- package/components/item-option-text-field/index.js +2 -2
- package/components/item-option-text-field/item-option-text-field.d.ts +7 -1
- package/components/{item-option-text-field-Bq6wbGL6.cjs → item-option-text-field-BbxPFuHZ.cjs} +1 -1
- package/components/{item-option-text-field-t9b0Oh5Q.js → item-option-text-field-C8VTaY4N.js} +1 -1
- package/components/item-slot-drop/index.cjs +1 -1
- package/components/item-slot-drop/index.js +2 -2
- package/components/item-slot-drop/item-slot-drop.d.ts +12 -2
- package/components/{item-slot-drop-BAugbTP7.cjs → item-slot-drop-BhCP8AHW.cjs} +1 -1
- package/components/{item-slot-drop-Dk0qmzUO.js → item-slot-drop-C3R8PW1h.js} +4 -4
- package/components/item-slot-drop-panel/index.cjs +1 -1
- package/components/item-slot-drop-panel/index.js +2 -2
- package/components/item-slot-drop-panel/item-slot-drop-panel.d.ts +2 -2
- package/components/{item-slot-drop-panel-VPpjeFrw.cjs → item-slot-drop-panel-DF5odPJm.cjs} +1 -1
- package/components/{item-slot-drop-panel-C_UUROsO.js → item-slot-drop-panel-jKBmZxM0.js} +39 -39
- package/components/item-slot-picker/index.cjs +1 -1
- package/components/item-slot-picker/index.js +2 -2
- package/components/item-slot-picker/item-slot-picker.d.ts +3 -6
- package/components/{item-slot-picker-C0jGWuEH.js → item-slot-picker-CPz4v6dj.js} +5 -5
- package/components/{item-slot-picker-BMhGEWPB.cjs → item-slot-picker-DQJ-lnZM.cjs} +1 -1
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +2 -2
- package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +2 -2
- package/components/{item-slot-picker-panel-DaSpTAdY.js → item-slot-picker-panel-CML1pMrC.js} +3 -3
- package/components/{item-slot-picker-panel-CNcTxMIr.cjs → item-slot-picker-panel-sdxrlk9Z.cjs} +1 -1
- package/components/{line-chart-positioning.config-guGEmG8P.cjs → line-chart-positioning.config-CIj2s14W.cjs} +1 -1
- package/components/{line-chart-positioning.config-RmlM3nO1.js → line-chart-positioning.config-DyWkf5Op.js} +1 -1
- package/components/{localized-mixin-D-vS5BnD.js → localized-mixin-BOaeCN9a.js} +1 -1
- package/components/{localized-mixin-2FpAMHwf.cjs → localized-mixin-BPOcHne5.cjs} +1 -1
- package/components/{marker-map-positioning.config-ClYn1SUX.js → marker-map-positioning.config-BlaqR84i.js} +1 -1
- package/components/{marker-map-positioning.config-HuFFsD3K.cjs → marker-map-positioning.config-DyPBnrcf.cjs} +1 -1
- package/components/nl-CnJ7GWFR.js +464 -0
- package/components/nl-DWGcdw3F.cjs +20 -0
- package/components/{ohlc-chart-positioning.config-CtZP5MS0.js → ohlc-chart-positioning.config-C1Ib-YRX.js} +1 -1
- package/components/{ohlc-chart-positioning.config-BPdr7Si5.cjs → ohlc-chart-positioning.config-nhYy7sdP.cjs} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-CA5h7KJv.cjs → parallel-coordinates-plot-positioning.config-B7iWes6n.cjs} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-BOZEluCJ.js → parallel-coordinates-plot-positioning.config-DzkH_hSg.js} +1 -1
- package/components/periods.const-Db0nXrwr.cjs +20 -0
- package/components/{periods.const-HrIWnjuj.js → periods.const-NCTkxnvG.js} +7 -7
- package/components/{pivot-table-positioning.config-04nWPY5F.cjs → pivot-table-positioning.config-BAeF1Wr5.cjs} +1 -1
- package/components/{pivot-table-positioning.config-BzR_GjPq.js → pivot-table-positioning.config-QmdQVsVL.js} +1 -1
- package/components/{pyramid-chart-positioning.config-BSHvolbF.cjs → pyramid-chart-positioning.config-Cwme_V9D.cjs} +1 -1
- package/components/{pyramid-chart-positioning.config-Dab07G57.js → pyramid-chart-positioning.config-n6MctfWS.js} +1 -1
- package/components/{radar-chart-positioning.config-Dot-ihEX.js → radar-chart-positioning.config-CK4dsAUh.js} +1 -1
- package/components/{radar-chart-positioning.config-lWNoL_ti.cjs → radar-chart-positioning.config-DKMjOOy9.cjs} +1 -1
- package/components/{route-map-positioning.config-CpyaFMpy.js → route-map-positioning.config-CwXaSsNt.js} +1 -1
- package/components/{route-map-positioning.config-BMBpp8hz.cjs → route-map-positioning.config-VnefcNLZ.cjs} +1 -1
- package/components/{sankey-diagram-positioning.config-uEZJdbL1.cjs → sankey-diagram-positioning.config-C8r1HXKi.cjs} +1 -1
- package/components/{sankey-diagram-positioning.config-B2qMdRR_.js → sankey-diagram-positioning.config-M7BTpPC-.js} +1 -1
- package/components/{scatter-plot-positioning.config-A15kkfVw.cjs → scatter-plot-positioning.config-CGlwev2w.cjs} +1 -1
- package/components/{scatter-plot-positioning.config-DuMse9Q0.js → scatter-plot-positioning.config-TW95PU_c.js} +1 -1
- package/components/{set-locale-jZiDepO3.cjs → set-locale-C67nRXJu.cjs} +1 -1
- package/components/{set-locale-Cs_8MmRC.js → set-locale-DA368j-c.js} +4 -4
- package/components/{slicer-filter-positioning.config-D5Y7aMbf.cjs → slicer-filter-positioning.config-B3HV3P5V.cjs} +1 -1
- package/components/{slicer-filter-positioning.config-YYnMg11W.js → slicer-filter-positioning.config-SW3t4sXb.js} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +2 -2
- package/components/slot-menu/slot-menu.d.ts +14 -1
- package/components/slot-menu/types.d.ts +1 -1
- package/components/{slot-menu-B8Ea429p.cjs → slot-menu-BX_79i8j.cjs} +1 -1
- package/components/{slot-menu-CeLuEEBz.js → slot-menu-D5ZpNhRn.js} +3 -3
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +2 -2
- package/components/slot-menu-list/slot-menu-list.d.ts +3 -1
- package/components/{slot-menu-list-IZWcfcmg.js → slot-menu-list--vSUiSqX.js} +1 -1
- package/components/{slot-menu-list-CWkK2C36.cjs → slot-menu-list-Fs6XHhqt.cjs} +1 -1
- package/components/{speedometer-chart-positioning.config-B7c-6ne3.cjs → speedometer-chart-positioning.config-CTgIInxK.cjs} +1 -1
- package/components/{speedometer-chart-positioning.config-DhlZ31Du.js → speedometer-chart-positioning.config-Cf7VkFvv.js} +1 -1
- package/components/{spike-map-positioning.config-Bx5e0pta.cjs → spike-map-positioning.config-BDWoRvI1.cjs} +1 -1
- package/components/{spike-map-positioning.config-DRTGpAGE.js → spike-map-positioning.config-tMMqD_L6.js} +1 -1
- package/components/{strip-plot-positioning.config-BsUrhFUU.cjs → strip-plot-positioning.config-CflwBF0n.cjs} +1 -1
- package/components/{strip-plot-positioning.config-BCq3Obcq.js → strip-plot-positioning.config-cyY2RoOQ.js} +1 -1
- package/components/{sunburst-chart-positioning.config-DsUpWjsv.cjs → sunburst-chart-positioning.config-BrkN0iSP.cjs} +1 -1
- package/components/{sunburst-chart-positioning.config-CEw-7DlR.js → sunburst-chart-positioning.config-CXqQ3rZw.js} +1 -1
- package/components/{symbol-map-positioning.config-F1KEG07X.cjs → symbol-map-positioning.config-B4yTOZ45.cjs} +1 -1
- package/components/{symbol-map-positioning.config-DukiOU1b.js → symbol-map-positioning.config-BhZjksQ9.js} +1 -1
- package/components/{treemap-chart-positioning.config-Dt_82T4Z.js → treemap-chart-positioning.config-BTOpuIyU.js} +1 -1
- package/components/{treemap-chart-positioning.config-ChJIaI2Y.cjs → treemap-chart-positioning.config-Cbu39jHd.cjs} +1 -1
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/{utils-DA-SRzw2.cjs → utils-Ab_wibuA.cjs} +1 -1
- package/components/{utils-BJDK6vjC.js → utils-CO7Bx0Nw.js} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +2 -2
- package/components/{venn-diagram-positioning.config-Bbbtw4NL.cjs → venn-diagram-positioning.config-G91Md8yt.cjs} +1 -1
- package/components/{venn-diagram-positioning.config-TNx0fkeZ.js → venn-diagram-positioning.config-xddK9cxF.js} +1 -1
- package/components/viz-item-menu/index.cjs +1 -1
- package/components/viz-item-menu/index.js +2 -2
- package/components/viz-item-menu/viz-item-menu.d.ts +2 -2
- package/components/{viz-item-menu-BAJGKail.cjs → viz-item-menu-B2pAY_Jv.cjs} +1 -1
- package/components/{viz-item-menu-B-fDL_91.js → viz-item-menu-D09pw6dZ.js} +1 -1
- package/components/{wordcloud-chart-positioning.config-BFiq-yn7.cjs → wordcloud-chart-positioning.config-DAYAximq.cjs} +1 -1
- package/components/{wordcloud-chart-positioning.config-DnNXKglL.js → wordcloud-chart-positioning.config-DjUW_gBa.js} +1 -1
- package/custom-elements.json +9909 -4701
- package/package.json +4 -3
- package/react/components/filter-expression-picker.component.ts +2 -0
- package/react/components/filter-item.component.ts +2 -0
- package/react/components/filter-value-picker-datetime.component.ts +2 -0
- package/react/components/filter-value-picker-hierarchy.component.ts +2 -0
- package/react/components/filter-value-picker-numeric.component.ts +2 -0
- package/react/components/filter-value-picker.component.ts +2 -0
- package/react/components/formula-editor.component.ts +5 -5
- package/react/components/formula-field.component.ts +5 -5
- package/react/components/formula.component.ts +6 -3
- package/react/components/item-slot-drop.component.ts +1 -0
- package/react/components/slot-menu.component.ts +1 -0
- package/react/esm/components/filter-expression-picker.component.d.ts +2 -0
- package/react/esm/components/filter-expression-picker.component.js +2 -0
- package/react/esm/components/filter-item.component.d.ts +2 -0
- package/react/esm/components/filter-item.component.js +2 -0
- package/react/esm/components/filter-value-picker-datetime.component.d.ts +2 -0
- package/react/esm/components/filter-value-picker-datetime.component.js +2 -0
- package/react/esm/components/filter-value-picker-hierarchy.component.d.ts +2 -0
- package/react/esm/components/filter-value-picker-hierarchy.component.js +2 -0
- package/react/esm/components/filter-value-picker-numeric.component.d.ts +2 -0
- package/react/esm/components/filter-value-picker-numeric.component.js +2 -0
- package/react/esm/components/filter-value-picker.component.d.ts +2 -0
- package/react/esm/components/filter-value-picker.component.js +2 -0
- package/react/esm/components/formula-editor.component.d.ts +3 -3
- package/react/esm/components/formula-field.component.d.ts +3 -3
- package/react/esm/components/formula.component.d.ts +4 -2
- package/react/esm/components/formula.component.js +2 -0
- package/react/esm/components/item-slot-drop.component.d.ts +1 -0
- package/react/esm/components/item-slot-drop.component.js +1 -0
- package/react/esm/components/slot-menu.component.d.ts +1 -0
- package/react/esm/components/slot-menu.component.js +1 -0
- package/react/luzmo-stub.d.ts +2 -5
- package/react/utils/base/base.d.ts +1 -1
- package/react/utils/base/focusable.d.ts +1 -1
- package/react/utils/base/localized-mixin.d.ts +1 -1
- package/react/utils/base/sized-mixin.d.ts +1 -1
- package/react/utils/formula/base/formula-base.d.ts +3 -3
- package/react/utils/formula/base/formula-input-base.d.ts +1 -1
- package/react/utils/formula/config/build-datasets.d.ts +2 -2
- package/react/utils/formula/render-explanation-tooltip.d.ts +1 -1
- package/react/utils/formula/store/formula-display-store.d.ts +1 -1
- package/react/utils/store/index.d.ts +5 -5
- package/react/utils/store/store-registry.d.ts +1 -1
- package/utils/base/base.d.ts +1 -1
- package/utils/base/focusable.d.ts +1 -1
- package/utils/base/localized-mixin.d.ts +1 -1
- package/utils/base/sized-mixin.d.ts +1 -1
- package/utils/formula/base/formula-base.d.ts +3 -3
- package/utils/formula/base/formula-input-base.d.ts +1 -1
- package/utils/formula/config/build-datasets.d.ts +2 -2
- package/utils/formula/render-explanation-tooltip.d.ts +1 -1
- package/utils/formula/store/formula-display-store.d.ts +1 -1
- package/utils/store/index.d.ts +5 -5
- package/utils/store/store-registry.d.ts +1 -1
- package/components/ai-chat-8O_eA0_D.cjs +0 -182
- package/components/ai-chat-BYlVFmdP.js +0 -2227
- package/components/de-CVvgeZTs.cjs +0 -20
- package/components/de-DVZUfIYZ.js +0 -462
- package/components/es-Bky9FlQy.cjs +0 -20
- package/components/es-DOdKwPbt.js +0 -462
- package/components/formula-display-store-_432SuSV.cjs +0 -20
- package/components/fr-BoQOc12J.cjs +0 -20
- package/components/fr-CFvQqjGj.js +0 -462
- package/components/nl-DWIG_M9v.cjs +0 -20
- package/components/nl-j7E4XtgO.js +0 -462
- package/components/periods.const-BZNdPqwm.cjs +0 -20
|
@@ -1,2227 +0,0 @@
|
|
|
1
|
-
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2026 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
-
* must be used according to the Luzmo Terms of Service.
|
|
7
|
-
* This license allows users with a current active Luzmo account
|
|
8
|
-
* to use the Luzmo Web Components. This license terminates
|
|
9
|
-
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
-
*
|
|
12
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
* SOFTWARE.
|
|
19
|
-
* */
|
|
20
|
-
import { i as e } from "./base-Cz8X1AUZ.js";
|
|
21
|
-
import { t } from "./decorate-CaYbmmmm.js";
|
|
22
|
-
import "./ai-interaction-textarea-KVfak9dJ.js";
|
|
23
|
-
import { msg as n } from "@lit/localize/lit-localize";
|
|
24
|
-
import { luzmoEllipsisVertical as r, luzmoIcon as i, luzmoSpin as a } from "@luzmo/icons";
|
|
25
|
-
import "@luzmo/lucero/chat-message";
|
|
26
|
-
import "@luzmo/lucero/overlay";
|
|
27
|
-
import "@luzmo/lucero/popover";
|
|
28
|
-
import "@luzmo/lucero/progress-steps";
|
|
29
|
-
import { html as o, nothing as s, unsafeCSS as c } from "lit";
|
|
30
|
-
import { property as l, state as u } from "lit/decorators.js";
|
|
31
|
-
import { unsafeHTML as d } from "lit/directives/unsafe-html.js";
|
|
32
|
-
import "@luzmo/lucero/action-button";
|
|
33
|
-
//#region node_modules/dompurify/dist/purify.es.mjs
|
|
34
|
-
function ee(e, t) {
|
|
35
|
-
(t == null || t > e.length) && (t = e.length);
|
|
36
|
-
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
37
|
-
return r;
|
|
38
|
-
}
|
|
39
|
-
function te(e) {
|
|
40
|
-
if (Array.isArray(e)) return e;
|
|
41
|
-
}
|
|
42
|
-
function ne(e, t) {
|
|
43
|
-
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
44
|
-
if (n != null) {
|
|
45
|
-
var r, i, a, o, s = [], c = !0, l = !1;
|
|
46
|
-
try {
|
|
47
|
-
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);
|
|
48
|
-
} catch (e) {
|
|
49
|
-
l = !0, i = e;
|
|
50
|
-
} finally {
|
|
51
|
-
try {
|
|
52
|
-
if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
|
|
53
|
-
} finally {
|
|
54
|
-
if (l) throw i;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return s;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function f() {
|
|
61
|
-
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
62
|
-
}
|
|
63
|
-
function re(e, t) {
|
|
64
|
-
return te(e) || ne(e, t) || ie(e, t) || f();
|
|
65
|
-
}
|
|
66
|
-
function ie(e, t) {
|
|
67
|
-
if (e) {
|
|
68
|
-
if (typeof e == "string") return ee(e, t);
|
|
69
|
-
var n = {}.toString.call(e).slice(8, -1);
|
|
70
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ee(e, t) : void 0;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
var ae = Object.entries, oe = Object.setPrototypeOf, p = Object.isFrozen, m = Object.getPrototypeOf, h = Object.getOwnPropertyDescriptor, g = Object.freeze, _ = Object.seal, v = Object.create, y = typeof Reflect < "u" && Reflect, se = y.apply, ce = y.construct;
|
|
74
|
-
g ||= function(e) {
|
|
75
|
-
return e;
|
|
76
|
-
}, _ ||= function(e) {
|
|
77
|
-
return e;
|
|
78
|
-
}, se ||= function(e, t) {
|
|
79
|
-
var n = [...arguments].slice(2);
|
|
80
|
-
return e.apply(t, n);
|
|
81
|
-
}, ce ||= function(e) {
|
|
82
|
-
return new e(...[...arguments].slice(1));
|
|
83
|
-
};
|
|
84
|
-
var le = E(Array.prototype.forEach), ue = E(Array.prototype.lastIndexOf), de = E(Array.prototype.pop), fe = E(Array.prototype.push), pe = E(Array.prototype.splice), b = Array.isArray, me = E(String.prototype.toLowerCase), he = E(String.prototype.toString), ge = E(String.prototype.match), _e = E(String.prototype.replace), ve = E(String.prototype.indexOf), ye = E(String.prototype.trim), be = E(Number.prototype.toString), xe = E(Boolean.prototype.toString), x = typeof BigInt > "u" ? null : E(BigInt.prototype.toString), Se = typeof Symbol > "u" ? null : E(Symbol.prototype.toString), S = E(Object.prototype.hasOwnProperty), C = E(Object.prototype.toString), w = E(RegExp.prototype.test), T = Ce(TypeError);
|
|
85
|
-
function E(e) {
|
|
86
|
-
return function(t) {
|
|
87
|
-
t instanceof RegExp && (t.lastIndex = 0);
|
|
88
|
-
var n = [...arguments].slice(1);
|
|
89
|
-
return se(e, t, n);
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function Ce(e) {
|
|
93
|
-
return function() {
|
|
94
|
-
return ce(e, [...arguments]);
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
function D(e, t) {
|
|
98
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : me;
|
|
99
|
-
if (oe && oe(e, null), !b(t)) return e;
|
|
100
|
-
let r = t.length;
|
|
101
|
-
for (; r--;) {
|
|
102
|
-
let i = t[r];
|
|
103
|
-
if (typeof i == "string") {
|
|
104
|
-
let e = n(i);
|
|
105
|
-
e !== i && (p(t) || (t[r] = e), i = e);
|
|
106
|
-
}
|
|
107
|
-
e[i] = !0;
|
|
108
|
-
}
|
|
109
|
-
return e;
|
|
110
|
-
}
|
|
111
|
-
function we(e) {
|
|
112
|
-
for (let t = 0; t < e.length; t++) S(e, t) || (e[t] = null);
|
|
113
|
-
return e;
|
|
114
|
-
}
|
|
115
|
-
function O(e) {
|
|
116
|
-
let t = v(null);
|
|
117
|
-
for (let r of ae(e)) {
|
|
118
|
-
var n = re(r, 2);
|
|
119
|
-
let i = n[0], a = n[1];
|
|
120
|
-
S(e, i) && (b(a) ? t[i] = we(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = O(a) : t[i] = a);
|
|
121
|
-
}
|
|
122
|
-
return t;
|
|
123
|
-
}
|
|
124
|
-
function Te(e) {
|
|
125
|
-
switch (typeof e) {
|
|
126
|
-
case "string": return e;
|
|
127
|
-
case "number": return be(e);
|
|
128
|
-
case "boolean": return xe(e);
|
|
129
|
-
case "bigint": return x ? x(e) : "0";
|
|
130
|
-
case "symbol": return Se ? Se(e) : "Symbol()";
|
|
131
|
-
case "undefined": return C(e);
|
|
132
|
-
case "function":
|
|
133
|
-
case "object": {
|
|
134
|
-
if (e === null) return C(e);
|
|
135
|
-
let t = e, n = k(t, "toString");
|
|
136
|
-
if (typeof n == "function") {
|
|
137
|
-
let e = n(t);
|
|
138
|
-
return typeof e == "string" ? e : C(e);
|
|
139
|
-
}
|
|
140
|
-
return C(e);
|
|
141
|
-
}
|
|
142
|
-
default: return C(e);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function k(e, t) {
|
|
146
|
-
for (; e !== null;) {
|
|
147
|
-
let n = h(e, t);
|
|
148
|
-
if (n) {
|
|
149
|
-
if (n.get) return E(n.get);
|
|
150
|
-
if (typeof n.value == "function") return E(n.value);
|
|
151
|
-
}
|
|
152
|
-
e = m(e);
|
|
153
|
-
}
|
|
154
|
-
function n() {
|
|
155
|
-
return null;
|
|
156
|
-
}
|
|
157
|
-
return n;
|
|
158
|
-
}
|
|
159
|
-
function Ee(e) {
|
|
160
|
-
try {
|
|
161
|
-
return w(e, ""), !0;
|
|
162
|
-
} catch {
|
|
163
|
-
return !1;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
var De = g(/* @__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(".")), Oe = g(/* @__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(".")), ke = g([
|
|
167
|
-
"feBlend",
|
|
168
|
-
"feColorMatrix",
|
|
169
|
-
"feComponentTransfer",
|
|
170
|
-
"feComposite",
|
|
171
|
-
"feConvolveMatrix",
|
|
172
|
-
"feDiffuseLighting",
|
|
173
|
-
"feDisplacementMap",
|
|
174
|
-
"feDistantLight",
|
|
175
|
-
"feDropShadow",
|
|
176
|
-
"feFlood",
|
|
177
|
-
"feFuncA",
|
|
178
|
-
"feFuncB",
|
|
179
|
-
"feFuncG",
|
|
180
|
-
"feFuncR",
|
|
181
|
-
"feGaussianBlur",
|
|
182
|
-
"feImage",
|
|
183
|
-
"feMerge",
|
|
184
|
-
"feMergeNode",
|
|
185
|
-
"feMorphology",
|
|
186
|
-
"feOffset",
|
|
187
|
-
"fePointLight",
|
|
188
|
-
"feSpecularLighting",
|
|
189
|
-
"feSpotLight",
|
|
190
|
-
"feTile",
|
|
191
|
-
"feTurbulence"
|
|
192
|
-
]), Ae = g([
|
|
193
|
-
"animate",
|
|
194
|
-
"color-profile",
|
|
195
|
-
"cursor",
|
|
196
|
-
"discard",
|
|
197
|
-
"font-face",
|
|
198
|
-
"font-face-format",
|
|
199
|
-
"font-face-name",
|
|
200
|
-
"font-face-src",
|
|
201
|
-
"font-face-uri",
|
|
202
|
-
"foreignobject",
|
|
203
|
-
"hatch",
|
|
204
|
-
"hatchpath",
|
|
205
|
-
"mesh",
|
|
206
|
-
"meshgradient",
|
|
207
|
-
"meshpatch",
|
|
208
|
-
"meshrow",
|
|
209
|
-
"missing-glyph",
|
|
210
|
-
"script",
|
|
211
|
-
"set",
|
|
212
|
-
"solidcolor",
|
|
213
|
-
"unknown",
|
|
214
|
-
"use"
|
|
215
|
-
]), je = g(/* @__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(".")), Me = g([
|
|
216
|
-
"maction",
|
|
217
|
-
"maligngroup",
|
|
218
|
-
"malignmark",
|
|
219
|
-
"mlongdiv",
|
|
220
|
-
"mscarries",
|
|
221
|
-
"mscarry",
|
|
222
|
-
"msgroup",
|
|
223
|
-
"mstack",
|
|
224
|
-
"msline",
|
|
225
|
-
"msrow",
|
|
226
|
-
"semantics",
|
|
227
|
-
"annotation",
|
|
228
|
-
"annotation-xml",
|
|
229
|
-
"mprescripts",
|
|
230
|
-
"none"
|
|
231
|
-
]), Ne = g(["#text"]), Pe = g(/* @__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(".")), Fe = g(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ie = g(/* @__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(".")), Le = g([
|
|
232
|
-
"xlink:href",
|
|
233
|
-
"xml:id",
|
|
234
|
-
"xlink:title",
|
|
235
|
-
"xml:space",
|
|
236
|
-
"xmlns:xlink"
|
|
237
|
-
]), Re = _(/{{[\w\W]*|^[\w\W]*}}/g), ze = _(/<%[\w\W]*|^[\w\W]*%>/g), Be = _(/\${[\w\W]*/g), Ve = _(/^data-[\-\w.\u00B7-\uFFFF]+$/), He = _(/^aria-[\-\w]+$/), Ue = _(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), We = _(/^(?:\w+script|data):/i), Ge = _(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ke = _(/^html$/i), qe = _(/^[a-z][.\w]*(-[.\w]+)+$/i), Je = _(/<[/\w!]/g), Ye = _(/<[/\w]/g), Xe = _(/<\/no(script|embed|frames)/i), Ze = _(/\/>/i), A = {
|
|
238
|
-
element: 1,
|
|
239
|
-
attribute: 2,
|
|
240
|
-
text: 3,
|
|
241
|
-
cdataSection: 4,
|
|
242
|
-
entityReference: 5,
|
|
243
|
-
entityNode: 6,
|
|
244
|
-
processingInstruction: 7,
|
|
245
|
-
comment: 8,
|
|
246
|
-
document: 9,
|
|
247
|
-
documentType: 10,
|
|
248
|
-
documentFragment: 11,
|
|
249
|
-
notation: 12
|
|
250
|
-
}, Qe = function() {
|
|
251
|
-
return typeof window > "u" ? null : window;
|
|
252
|
-
}, $e = function(e, t) {
|
|
253
|
-
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
254
|
-
let n = null, r = "data-tt-policy-suffix";
|
|
255
|
-
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
256
|
-
let i = "dompurify" + (n ? "#" + n : "");
|
|
257
|
-
try {
|
|
258
|
-
return e.createPolicy(i, {
|
|
259
|
-
createHTML(e) {
|
|
260
|
-
return e;
|
|
261
|
-
},
|
|
262
|
-
createScriptURL(e) {
|
|
263
|
-
return e;
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
} catch {
|
|
267
|
-
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
268
|
-
}
|
|
269
|
-
}, et = function() {
|
|
270
|
-
return {
|
|
271
|
-
afterSanitizeAttributes: [],
|
|
272
|
-
afterSanitizeElements: [],
|
|
273
|
-
afterSanitizeShadowDOM: [],
|
|
274
|
-
beforeSanitizeAttributes: [],
|
|
275
|
-
beforeSanitizeElements: [],
|
|
276
|
-
beforeSanitizeShadowDOM: [],
|
|
277
|
-
uponSanitizeAttribute: [],
|
|
278
|
-
uponSanitizeElement: [],
|
|
279
|
-
uponSanitizeShadowNode: []
|
|
280
|
-
};
|
|
281
|
-
}, j = function(e, t, n, r) {
|
|
282
|
-
return S(e, t) && b(e[t]) ? D(r.base ? O(r.base) : {}, e[t], r.transform) : n;
|
|
283
|
-
};
|
|
284
|
-
function tt() {
|
|
285
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qe(), t = (e) => tt(e);
|
|
286
|
-
if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== A.document || !e.Element) return t.isSupported = !1, t;
|
|
287
|
-
let n = e.document, r = n, i = r.currentScript;
|
|
288
|
-
e.DocumentFragment;
|
|
289
|
-
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
290
|
-
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
291
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, ee = k(d, "cloneNode"), te = k(d, "remove"), ne = k(d, "nextSibling"), f = k(d, "childNodes"), re = k(d, "parentNode"), ie = k(d, "shadowRoot"), oe = k(d, "attributes"), p = o && o.prototype ? k(o.prototype, "nodeType") : null, m = o && o.prototype ? k(o.prototype, "nodeName") : null;
|
|
292
|
-
if (typeof a == "function") {
|
|
293
|
-
let e = n.createElement("template");
|
|
294
|
-
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
295
|
-
}
|
|
296
|
-
let h, y = "", se, ce = !1, be = 0, xe = function() {
|
|
297
|
-
if (be > 0) throw T("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.");
|
|
298
|
-
}, x = function(e) {
|
|
299
|
-
xe(), be++;
|
|
300
|
-
try {
|
|
301
|
-
return h.createHTML(e);
|
|
302
|
-
} finally {
|
|
303
|
-
be--;
|
|
304
|
-
}
|
|
305
|
-
}, Se = function(e) {
|
|
306
|
-
xe(), be++;
|
|
307
|
-
try {
|
|
308
|
-
return h.createScriptURL(e);
|
|
309
|
-
} finally {
|
|
310
|
-
be--;
|
|
311
|
-
}
|
|
312
|
-
}, C = function() {
|
|
313
|
-
return ce ||= (se = $e(u, i), !0), se;
|
|
314
|
-
}, E = n, Ce = E.implementation, we = E.createNodeIterator, nt = E.createDocumentFragment, rt = E.getElementsByTagName, M = r.importNode, N = et();
|
|
315
|
-
t.isSupported = typeof ae == "function" && typeof re == "function" && Ce && Ce.createHTMLDocument !== void 0;
|
|
316
|
-
let it = Re, at = ze, ot = Be, st = Ve, ct = He, lt = We, ut = Ge, dt = qe, ft = Ue, P = null, pt = D({}, [
|
|
317
|
-
...De,
|
|
318
|
-
...Oe,
|
|
319
|
-
...ke,
|
|
320
|
-
...je,
|
|
321
|
-
...Ne
|
|
322
|
-
]), F = null, mt = D({}, [
|
|
323
|
-
...Pe,
|
|
324
|
-
...Fe,
|
|
325
|
-
...Ie,
|
|
326
|
-
...Le
|
|
327
|
-
]), I = Object.seal(v(null, {
|
|
328
|
-
tagNameCheck: {
|
|
329
|
-
writable: !0,
|
|
330
|
-
configurable: !1,
|
|
331
|
-
enumerable: !0,
|
|
332
|
-
value: null
|
|
333
|
-
},
|
|
334
|
-
attributeNameCheck: {
|
|
335
|
-
writable: !0,
|
|
336
|
-
configurable: !1,
|
|
337
|
-
enumerable: !0,
|
|
338
|
-
value: null
|
|
339
|
-
},
|
|
340
|
-
allowCustomizedBuiltInElements: {
|
|
341
|
-
writable: !0,
|
|
342
|
-
configurable: !1,
|
|
343
|
-
enumerable: !0,
|
|
344
|
-
value: !1
|
|
345
|
-
}
|
|
346
|
-
})), L = null, ht = null, R = Object.seal(v(null, {
|
|
347
|
-
tagCheck: {
|
|
348
|
-
writable: !0,
|
|
349
|
-
configurable: !1,
|
|
350
|
-
enumerable: !0,
|
|
351
|
-
value: null
|
|
352
|
-
},
|
|
353
|
-
attributeCheck: {
|
|
354
|
-
writable: !0,
|
|
355
|
-
configurable: !1,
|
|
356
|
-
enumerable: !0,
|
|
357
|
-
value: null
|
|
358
|
-
}
|
|
359
|
-
})), gt = !0, _t = !0, vt = !1, yt = !0, z = !1, B = !0, V = !1, bt = !1, H = null, xt = null, St = !1, U = !1, W = !1, Ct = !1, wt = !0, Tt = !1, Et = "user-content-", Dt = !0, Ot = !1, G = {}, K = null, kt = D({}, /* @__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(".")), At = null, jt = D({}, [
|
|
360
|
-
"audio",
|
|
361
|
-
"video",
|
|
362
|
-
"img",
|
|
363
|
-
"source",
|
|
364
|
-
"image",
|
|
365
|
-
"track"
|
|
366
|
-
]), Mt = null, Nt = D({}, [
|
|
367
|
-
"alt",
|
|
368
|
-
"class",
|
|
369
|
-
"for",
|
|
370
|
-
"id",
|
|
371
|
-
"label",
|
|
372
|
-
"name",
|
|
373
|
-
"pattern",
|
|
374
|
-
"placeholder",
|
|
375
|
-
"role",
|
|
376
|
-
"summary",
|
|
377
|
-
"title",
|
|
378
|
-
"value",
|
|
379
|
-
"style",
|
|
380
|
-
"xmlns"
|
|
381
|
-
]), Pt = "http://www.w3.org/1998/Math/MathML", Ft = "http://www.w3.org/2000/svg", q = "http://www.w3.org/1999/xhtml", J = q, It = !1, Lt = null, Rt = D({}, [
|
|
382
|
-
Pt,
|
|
383
|
-
Ft,
|
|
384
|
-
q
|
|
385
|
-
], he), zt = g([
|
|
386
|
-
"mi",
|
|
387
|
-
"mo",
|
|
388
|
-
"mn",
|
|
389
|
-
"ms",
|
|
390
|
-
"mtext"
|
|
391
|
-
]), Bt = D({}, zt), Vt = g(["annotation-xml"]), Ht = D({}, Vt), Ut = D({}, [
|
|
392
|
-
"title",
|
|
393
|
-
"style",
|
|
394
|
-
"font",
|
|
395
|
-
"a",
|
|
396
|
-
"script"
|
|
397
|
-
]), Wt = null, Gt = ["application/xhtml+xml", "text/html"], Y = null, X = null, Kt = n.createElement("form"), qt = function(e) {
|
|
398
|
-
return e instanceof RegExp || e instanceof Function;
|
|
399
|
-
}, Jt = function() {
|
|
400
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
401
|
-
if (X && X === e) return;
|
|
402
|
-
(!e || typeof e != "object") && (e = {}), e = O(e), Wt = Gt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = Wt === "application/xhtml+xml" ? he : me, P = j(e, "ALLOWED_TAGS", pt, { transform: Y }), F = j(e, "ALLOWED_ATTR", mt, { transform: Y }), Lt = j(e, "ALLOWED_NAMESPACES", Rt, { transform: he }), Mt = j(e, "ADD_URI_SAFE_ATTR", Nt, {
|
|
403
|
-
transform: Y,
|
|
404
|
-
base: Nt
|
|
405
|
-
}), At = j(e, "ADD_DATA_URI_TAGS", jt, {
|
|
406
|
-
transform: Y,
|
|
407
|
-
base: jt
|
|
408
|
-
}), K = j(e, "FORBID_CONTENTS", kt, { transform: Y }), L = j(e, "FORBID_TAGS", O({}), { transform: Y }), ht = j(e, "FORBID_ATTR", O({}), { transform: Y }), G = S(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? O(e.USE_PROFILES) : e.USE_PROFILES : !1, gt = e.ALLOW_ARIA_ATTR !== !1, _t = e.ALLOW_DATA_ATTR !== !1, vt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, yt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, z = e.SAFE_FOR_TEMPLATES || !1, B = e.SAFE_FOR_XML !== !1, V = e.WHOLE_DOCUMENT || !1, U = e.RETURN_DOM || !1, W = e.RETURN_DOM_FRAGMENT || !1, Ct = e.RETURN_TRUSTED_TYPE || !1, St = e.FORCE_BODY || !1, wt = e.SANITIZE_DOM !== !1, Tt = e.SANITIZE_NAMED_PROPS || !1, Dt = e.KEEP_CONTENT !== !1, Ot = e.IN_PLACE || !1, ft = Ee(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ue, J = typeof e.NAMESPACE == "string" ? e.NAMESPACE : q, Bt = S(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? O(e.MATHML_TEXT_INTEGRATION_POINTS) : D({}, zt), Ht = S(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? O(e.HTML_INTEGRATION_POINTS) : D({}, Vt);
|
|
409
|
-
let t = S(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? O(e.CUSTOM_ELEMENT_HANDLING) : v(null);
|
|
410
|
-
if (I = v(null), S(t, "tagNameCheck") && qt(t.tagNameCheck) && (I.tagNameCheck = t.tagNameCheck), S(t, "attributeNameCheck") && qt(t.attributeNameCheck) && (I.attributeNameCheck = t.attributeNameCheck), S(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (I.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), _(I), z && (_t = !1), W && (U = !0), G && (P = D({}, Ne), F = v(null), G.html === !0 && (D(P, De), D(F, Pe)), G.svg === !0 && (D(P, Oe), D(F, Fe), D(F, Le)), G.svgFilters === !0 && (D(P, ke), D(F, Fe), D(F, Le)), G.mathMl === !0 && (D(P, je), D(F, Ie), D(F, Le))), R.tagCheck = null, R.attributeCheck = null, S(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? R.tagCheck = e.ADD_TAGS : b(e.ADD_TAGS) && (P === pt && (P = O(P)), D(P, e.ADD_TAGS, Y))), S(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? R.attributeCheck = e.ADD_ATTR : b(e.ADD_ATTR) && (F === mt && (F = O(F)), D(F, e.ADD_ATTR, Y))), S(e, "ADD_URI_SAFE_ATTR") && b(e.ADD_URI_SAFE_ATTR) && D(Mt, e.ADD_URI_SAFE_ATTR, Y), S(e, "FORBID_CONTENTS") && b(e.FORBID_CONTENTS) && (K === kt && (K = O(K)), D(K, e.FORBID_CONTENTS, Y)), S(e, "ADD_FORBID_CONTENTS") && b(e.ADD_FORBID_CONTENTS) && (K === kt && (K = O(K)), D(K, e.ADD_FORBID_CONTENTS, Y)), Dt && (P["#text"] = !0), V && D(P, [
|
|
411
|
-
"html",
|
|
412
|
-
"head",
|
|
413
|
-
"body"
|
|
414
|
-
]), P.table && (D(P, ["tbody"]), delete L.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
415
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw T("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
416
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw T("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
417
|
-
let t = h;
|
|
418
|
-
h = e.TRUSTED_TYPES_POLICY;
|
|
419
|
-
try {
|
|
420
|
-
y = x("");
|
|
421
|
-
} catch (e) {
|
|
422
|
-
throw h = t, e;
|
|
423
|
-
}
|
|
424
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (h = void 0, y = "") : (h === void 0 && (h = C()), h && typeof y == "string" && (y = x("")));
|
|
425
|
-
g && g(e), X = e;
|
|
426
|
-
}, Yt = D({}, [
|
|
427
|
-
...Oe,
|
|
428
|
-
...ke,
|
|
429
|
-
...Ae
|
|
430
|
-
]), Xt = D({}, [...je, ...Me]), Zt = function(e, t, n) {
|
|
431
|
-
return t.namespaceURI === q ? e === "svg" : t.namespaceURI === Pt ? e === "svg" && (n === "annotation-xml" || Bt[n]) : !!Yt[e];
|
|
432
|
-
}, Qt = function(e, t, n) {
|
|
433
|
-
return t.namespaceURI === q ? e === "math" : t.namespaceURI === Ft ? e === "math" && Ht[n] : !!Xt[e];
|
|
434
|
-
}, $t = function(e, t, n) {
|
|
435
|
-
return t.namespaceURI === Ft && !Ht[n] || t.namespaceURI === Pt && !Bt[n] ? !1 : !Xt[e] && (Ut[e] || !Yt[e]);
|
|
436
|
-
}, en = function(e) {
|
|
437
|
-
let t = re(e);
|
|
438
|
-
(!t || !t.tagName) && (t = {
|
|
439
|
-
namespaceURI: J,
|
|
440
|
-
tagName: "template"
|
|
441
|
-
});
|
|
442
|
-
let n = me(e.tagName), r = me(t.tagName);
|
|
443
|
-
return Lt[e.namespaceURI] ? e.namespaceURI === Ft ? Zt(n, t, r) : e.namespaceURI === Pt ? Qt(n, t, r) : e.namespaceURI === q ? $t(n, t, r) : !!(Wt === "application/xhtml+xml" && Lt[e.namespaceURI]) : !1;
|
|
444
|
-
}, Z = function(e) {
|
|
445
|
-
fe(t.removed, { element: e });
|
|
446
|
-
try {
|
|
447
|
-
re(e).removeChild(e);
|
|
448
|
-
} catch {
|
|
449
|
-
if (te(e), !re(e)) throw T("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
450
|
-
}
|
|
451
|
-
}, tn = function(e) {
|
|
452
|
-
let t = f(e);
|
|
453
|
-
if (t) {
|
|
454
|
-
let e = [];
|
|
455
|
-
le(t, (t) => {
|
|
456
|
-
fe(e, t);
|
|
457
|
-
}), le(e, (e) => {
|
|
458
|
-
try {
|
|
459
|
-
te(e);
|
|
460
|
-
} catch {}
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
let n = oe(e);
|
|
464
|
-
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
465
|
-
let r = n[t], i = r && r.name;
|
|
466
|
-
if (typeof i == "string") try {
|
|
467
|
-
e.removeAttribute(i);
|
|
468
|
-
} catch {}
|
|
469
|
-
}
|
|
470
|
-
}, Q = function(e, n) {
|
|
471
|
-
try {
|
|
472
|
-
fe(t.removed, {
|
|
473
|
-
attribute: n.getAttributeNode(e),
|
|
474
|
-
from: n
|
|
475
|
-
});
|
|
476
|
-
} catch {
|
|
477
|
-
fe(t.removed, {
|
|
478
|
-
attribute: null,
|
|
479
|
-
from: n
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
if (n.removeAttribute(e), e === "is") if (U || W) try {
|
|
483
|
-
Z(n);
|
|
484
|
-
} catch {}
|
|
485
|
-
else try {
|
|
486
|
-
n.setAttribute(e, "");
|
|
487
|
-
} catch {}
|
|
488
|
-
}, nn = function(e) {
|
|
489
|
-
let t = oe(e);
|
|
490
|
-
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
491
|
-
let r = t[n], i = r && r.name;
|
|
492
|
-
if (!(typeof i != "string" || F[Y(i)])) try {
|
|
493
|
-
e.removeAttribute(i);
|
|
494
|
-
} catch {}
|
|
495
|
-
}
|
|
496
|
-
}, rn = function(e) {
|
|
497
|
-
let t = [e];
|
|
498
|
-
for (; t.length > 0;) {
|
|
499
|
-
let e = t.pop();
|
|
500
|
-
(p ? p(e) : e.nodeType) === A.element && nn(e);
|
|
501
|
-
let n = f(e);
|
|
502
|
-
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
503
|
-
}
|
|
504
|
-
}, an = function(e) {
|
|
505
|
-
let t = null, r = null;
|
|
506
|
-
if (St) e = "<remove></remove>" + e;
|
|
507
|
-
else {
|
|
508
|
-
let t = ge(e, /^[\r\n\t ]+/);
|
|
509
|
-
r = t && t[0];
|
|
510
|
-
}
|
|
511
|
-
Wt === "application/xhtml+xml" && J === q && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
512
|
-
let i = h ? x(e) : e;
|
|
513
|
-
if (J === q) try {
|
|
514
|
-
t = new l().parseFromString(i, Wt);
|
|
515
|
-
} catch {}
|
|
516
|
-
if (!t || !t.documentElement) {
|
|
517
|
-
t = Ce.createDocument(J, "template", null);
|
|
518
|
-
try {
|
|
519
|
-
t.documentElement.innerHTML = It ? y : i;
|
|
520
|
-
} catch {}
|
|
521
|
-
}
|
|
522
|
-
let a = t.body || t.documentElement;
|
|
523
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), J === q ? rt.call(t, V ? "html" : "body")[0] : V ? t.documentElement : a;
|
|
524
|
-
}, on = function(e) {
|
|
525
|
-
return we.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
526
|
-
}, sn = function(e) {
|
|
527
|
-
return e = _e(e, it, " "), e = _e(e, at, " "), e = _e(e, ot, " "), e;
|
|
528
|
-
}, cn = function(e) {
|
|
529
|
-
e.normalize();
|
|
530
|
-
let t = we.call(e.ownerDocument || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
|
|
531
|
-
for (; n;) n.data = sn(n.data), n = t.nextNode();
|
|
532
|
-
let r = e.querySelectorAll?.call(e, "template");
|
|
533
|
-
r && le(r, (e) => {
|
|
534
|
-
un(e.content) && cn(e.content);
|
|
535
|
-
});
|
|
536
|
-
}, ln = function(e) {
|
|
537
|
-
let t = m ? m(e) : null;
|
|
538
|
-
return typeof t != "string" || Y(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== oe(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== p(e) || e.childNodes !== f(e);
|
|
539
|
-
}, un = function(e) {
|
|
540
|
-
if (!p || typeof e != "object" || !e) return !1;
|
|
541
|
-
try {
|
|
542
|
-
return p(e) === A.documentFragment;
|
|
543
|
-
} catch {
|
|
544
|
-
return !1;
|
|
545
|
-
}
|
|
546
|
-
}, dn = function(e) {
|
|
547
|
-
if (!p || typeof e != "object" || !e) return !1;
|
|
548
|
-
try {
|
|
549
|
-
return typeof p(e) == "number";
|
|
550
|
-
} catch {
|
|
551
|
-
return !1;
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
function $(e, n, r) {
|
|
555
|
-
e.length !== 0 && le(e, (e) => {
|
|
556
|
-
e.call(t, n, r, X);
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
let fn = function(e, t) {
|
|
560
|
-
return !!(B && e.hasChildNodes() && !dn(e.firstElementChild) && w(Je, e.textContent) && w(Je, e.innerHTML) || B && e.namespaceURI === q && t === "style" && dn(e.firstElementChild) || e.nodeType === A.processingInstruction || B && e.nodeType === A.comment && w(Ye, e.data));
|
|
561
|
-
}, pn = function(e, t) {
|
|
562
|
-
if (!L[t] && _n(t) && (I.tagNameCheck instanceof RegExp && w(I.tagNameCheck, t) || I.tagNameCheck instanceof Function && I.tagNameCheck(t))) return !1;
|
|
563
|
-
if (Dt && !K[t]) {
|
|
564
|
-
let t = re(e), n = f(e);
|
|
565
|
-
if (n && t) {
|
|
566
|
-
let r = n.length;
|
|
567
|
-
for (let i = r - 1; i >= 0; --i) {
|
|
568
|
-
let r = Ot ? n[i] : ee(n[i], !0);
|
|
569
|
-
t.insertBefore(r, ne(e));
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
return Z(e), !0;
|
|
574
|
-
}, mn = function(e) {
|
|
575
|
-
if ($(N.beforeSanitizeElements, e, null), ln(e)) return Z(e), !0;
|
|
576
|
-
let n = Y(m ? m(e) : e.nodeName);
|
|
577
|
-
if ($(N.uponSanitizeElement, e, {
|
|
578
|
-
tagName: n,
|
|
579
|
-
allowedTags: P
|
|
580
|
-
}), fn(e, n)) return Z(e), !0;
|
|
581
|
-
if (L[n] || !(R.tagCheck instanceof Function && R.tagCheck(n)) && !P[n]) return pn(e, n);
|
|
582
|
-
if ((p ? p(e) : e.nodeType) === A.element && !en(e) || (n === "noscript" || n === "noembed" || n === "noframes") && w(Xe, e.innerHTML)) return Z(e), !0;
|
|
583
|
-
if (z && e.nodeType === A.text) {
|
|
584
|
-
let n = sn(e.textContent);
|
|
585
|
-
e.textContent !== n && (fe(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
586
|
-
}
|
|
587
|
-
return $(N.afterSanitizeElements, e, null), !1;
|
|
588
|
-
}, hn = function(e, t, r) {
|
|
589
|
-
if (ht[t] || wt && (t === "id" || t === "name") && (r in n || r in Kt)) return !1;
|
|
590
|
-
let i = F[t] || R.attributeCheck instanceof Function && R.attributeCheck(t, e);
|
|
591
|
-
if (!(_t && w(st, t)) && !(gt && w(ct, t))) {
|
|
592
|
-
if (!i) {
|
|
593
|
-
if (!(_n(e) && (I.tagNameCheck instanceof RegExp && w(I.tagNameCheck, e) || I.tagNameCheck instanceof Function && I.tagNameCheck(e)) && (I.attributeNameCheck instanceof RegExp && w(I.attributeNameCheck, t) || I.attributeNameCheck instanceof Function && I.attributeNameCheck(t, e)) || t === "is" && I.allowCustomizedBuiltInElements && (I.tagNameCheck instanceof RegExp && w(I.tagNameCheck, r) || I.tagNameCheck instanceof Function && I.tagNameCheck(r)))) return !1;
|
|
594
|
-
} else if (!Mt[t] && !w(ft, _e(r, ut, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ve(r, "data:") === 0 && At[e]) && !(vt && !w(lt, _e(r, ut, ""))) && r) return !1;
|
|
595
|
-
}
|
|
596
|
-
return !0;
|
|
597
|
-
}, gn = D({}, [
|
|
598
|
-
"annotation-xml",
|
|
599
|
-
"color-profile",
|
|
600
|
-
"font-face",
|
|
601
|
-
"font-face-format",
|
|
602
|
-
"font-face-name",
|
|
603
|
-
"font-face-src",
|
|
604
|
-
"font-face-uri",
|
|
605
|
-
"missing-glyph"
|
|
606
|
-
]), _n = function(e) {
|
|
607
|
-
return !gn[me(e)] && w(dt, e);
|
|
608
|
-
}, vn = function(e, t, n, r) {
|
|
609
|
-
if (h && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
610
|
-
case "TrustedHTML": return x(r);
|
|
611
|
-
case "TrustedScriptURL": return Se(r);
|
|
612
|
-
}
|
|
613
|
-
return r;
|
|
614
|
-
}, yn = function(e, n, r, i) {
|
|
615
|
-
try {
|
|
616
|
-
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), ln(e) ? Z(e) : de(t.removed);
|
|
617
|
-
} catch {
|
|
618
|
-
Q(n, e);
|
|
619
|
-
}
|
|
620
|
-
}, bn = function(e) {
|
|
621
|
-
$(N.beforeSanitizeAttributes, e, null);
|
|
622
|
-
let t = e.attributes;
|
|
623
|
-
if (!t || ln(e)) return;
|
|
624
|
-
let n = {
|
|
625
|
-
attrName: "",
|
|
626
|
-
attrValue: "",
|
|
627
|
-
keepAttr: !0,
|
|
628
|
-
allowedAttributes: F,
|
|
629
|
-
forceKeepAttr: void 0
|
|
630
|
-
}, r = t.length, i = Y(e.nodeName);
|
|
631
|
-
for (; r--;) {
|
|
632
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Y(o), u = c, d = o === "value" ? u : ye(u);
|
|
633
|
-
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, $(N.uponSanitizeAttribute, e, n), d = n.attrValue, Tt && (l === "id" || l === "name") && ve(d, Et) !== 0 && (Q(o, e), d = Et + d), B && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
|
|
634
|
-
Q(o, e);
|
|
635
|
-
continue;
|
|
636
|
-
}
|
|
637
|
-
if (l === "attributename" && ge(d, "href")) {
|
|
638
|
-
Q(o, e);
|
|
639
|
-
continue;
|
|
640
|
-
}
|
|
641
|
-
if (!n.forceKeepAttr) {
|
|
642
|
-
if (!n.keepAttr) {
|
|
643
|
-
Q(o, e);
|
|
644
|
-
continue;
|
|
645
|
-
}
|
|
646
|
-
if (!yt && w(Ze, d)) {
|
|
647
|
-
Q(o, e);
|
|
648
|
-
continue;
|
|
649
|
-
}
|
|
650
|
-
if (z && (d = sn(d)), !hn(i, l, d)) {
|
|
651
|
-
Q(o, e);
|
|
652
|
-
continue;
|
|
653
|
-
}
|
|
654
|
-
d = vn(i, l, s, d), d !== u && yn(e, o, s, d);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
$(N.afterSanitizeAttributes, e, null);
|
|
658
|
-
}, xn = function(e) {
|
|
659
|
-
let t = null, n = on(e);
|
|
660
|
-
for ($(N.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(N.uponSanitizeShadowNode, t, null), mn(t), bn(t), un(t.content) && xn(t.content), (p ? p(t) : t.nodeType) === A.element) {
|
|
661
|
-
let e = ie(t);
|
|
662
|
-
un(e) && (Sn(e), xn(e));
|
|
663
|
-
}
|
|
664
|
-
$(N.afterSanitizeShadowDOM, e, null);
|
|
665
|
-
}, Sn = function(e) {
|
|
666
|
-
let t = [{
|
|
667
|
-
node: e,
|
|
668
|
-
shadow: null
|
|
669
|
-
}];
|
|
670
|
-
for (; t.length > 0;) {
|
|
671
|
-
let e = t.pop();
|
|
672
|
-
if (e.shadow) {
|
|
673
|
-
xn(e.shadow);
|
|
674
|
-
continue;
|
|
675
|
-
}
|
|
676
|
-
let n = e.node, r = (p ? p(n) : n.nodeType) === A.element, i = f(n);
|
|
677
|
-
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
678
|
-
node: i[e],
|
|
679
|
-
shadow: null
|
|
680
|
-
});
|
|
681
|
-
if (r) {
|
|
682
|
-
let e = m ? m(n) : null;
|
|
683
|
-
if (typeof e == "string" && Y(e) === "template") {
|
|
684
|
-
let e = n.content;
|
|
685
|
-
un(e) && t.push({
|
|
686
|
-
node: e,
|
|
687
|
-
shadow: null
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
if (r) {
|
|
692
|
-
let e = ie(n);
|
|
693
|
-
un(e) && t.push({
|
|
694
|
-
node: null,
|
|
695
|
-
shadow: e
|
|
696
|
-
}, {
|
|
697
|
-
node: e,
|
|
698
|
-
shadow: null
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
};
|
|
703
|
-
return t.sanitize = function(e) {
|
|
704
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
705
|
-
if (It = !e, It && (e = "<!-->"), typeof e != "string" && !dn(e) && (e = Te(e), typeof e != "string")) throw T("dirty is not a string, aborting");
|
|
706
|
-
if (!t.isSupported) return e;
|
|
707
|
-
bt ? (P = H, F = xt) : Jt(n), (N.uponSanitizeElement.length > 0 || N.uponSanitizeAttribute.length > 0) && (P = O(P)), N.uponSanitizeAttribute.length > 0 && (F = O(F)), t.removed = [];
|
|
708
|
-
let c = Ot && typeof e != "string" && dn(e);
|
|
709
|
-
if (c) {
|
|
710
|
-
let t = m ? m(e) : e.nodeName;
|
|
711
|
-
if (typeof t == "string") {
|
|
712
|
-
let e = Y(t);
|
|
713
|
-
if (!P[e] || L[e]) throw T("root node is forbidden and cannot be sanitized in-place");
|
|
714
|
-
}
|
|
715
|
-
if (ln(e)) throw T("root node is clobbered and cannot be sanitized in-place");
|
|
716
|
-
try {
|
|
717
|
-
Sn(e);
|
|
718
|
-
} catch (t) {
|
|
719
|
-
throw tn(e), t;
|
|
720
|
-
}
|
|
721
|
-
} else if (dn(e)) i = an("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === A.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Sn(a);
|
|
722
|
-
else {
|
|
723
|
-
if (!U && !z && !V && e.indexOf("<") === -1) return h && Ct ? x(e) : e;
|
|
724
|
-
if (i = an(e), !i) return U ? null : Ct ? y : "";
|
|
725
|
-
}
|
|
726
|
-
i && St && Z(i.firstChild);
|
|
727
|
-
let l = on(c ? e : i);
|
|
728
|
-
try {
|
|
729
|
-
for (; o = l.nextNode();) mn(o), bn(o), un(o.content) && xn(o.content);
|
|
730
|
-
} catch (t) {
|
|
731
|
-
throw c && tn(e), t;
|
|
732
|
-
}
|
|
733
|
-
if (c) return le(t.removed, (e) => {
|
|
734
|
-
e.element && rn(e.element);
|
|
735
|
-
}), z && cn(e), e;
|
|
736
|
-
if (U) {
|
|
737
|
-
if (z && cn(i), W) for (s = nt.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
738
|
-
else s = i;
|
|
739
|
-
return (F.shadowroot || F.shadowrootmode) && (s = M.call(r, s, !0)), s;
|
|
740
|
-
}
|
|
741
|
-
let u = V ? i.outerHTML : i.innerHTML;
|
|
742
|
-
return V && P["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && w(Ke, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), z && (u = sn(u)), h && Ct ? x(u) : u;
|
|
743
|
-
}, t.setConfig = function() {
|
|
744
|
-
Jt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), bt = !0, H = P, xt = F;
|
|
745
|
-
}, t.clearConfig = function() {
|
|
746
|
-
X = null, bt = !1, H = null, xt = null, h = se, y = "";
|
|
747
|
-
}, t.isValidAttribute = function(e, t, n) {
|
|
748
|
-
return X || Jt({}), hn(Y(e), Y(t), n);
|
|
749
|
-
}, t.addHook = function(e, t) {
|
|
750
|
-
typeof t == "function" && S(N, e) && fe(N[e], t);
|
|
751
|
-
}, t.removeHook = function(e, t) {
|
|
752
|
-
if (S(N, e)) {
|
|
753
|
-
if (t !== void 0) {
|
|
754
|
-
let n = ue(N[e], t);
|
|
755
|
-
return n === -1 ? void 0 : pe(N[e], n, 1)[0];
|
|
756
|
-
}
|
|
757
|
-
return de(N[e]);
|
|
758
|
-
}
|
|
759
|
-
}, t.removeHooks = function(e) {
|
|
760
|
-
S(N, e) && (N[e] = []);
|
|
761
|
-
}, t.removeAllHooks = function() {
|
|
762
|
-
N = et();
|
|
763
|
-
}, t;
|
|
764
|
-
}
|
|
765
|
-
var nt = tt(), rt = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(--luzmo-ai-chat-empty-state-padding-block,var(--ai-chat-empty-state-padding-block));padding-inline:var(--luzmo-ai-chat-empty-state-padding-inline,var(--ai-chat-empty-state-padding-inline));flex:1;justify-content:center;align-items:center;display:flex}.empty-state{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-header-actions-gap,var(--ai-chat-empty-state-header-actions-gap));width:100%;max-width:var(--luzmo-ai-chat-empty-state-max-width,var(--ai-chat-empty-state-max-width));text-align:center;flex-direction:column;display:flex}.header{flex-direction:column;align-items:center;width:100%;display:flex}.actions{align-items:center;gap:var(--luzmo-ai-chat-empty-state-actions-gap,var(--ai-chat-empty-state-actions-gap));flex-direction:column;width:100%;display:flex}.title{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-title-font-size,var(--ai-chat-empty-state-title-font-size));font-weight:var(--luzmo-ai-chat-empty-state-title-font-weight,var(--ai-chat-empty-state-title-font-weight));line-height:var(--luzmo-ai-chat-empty-state-title-line-height,var(--ai-chat-empty-state-title-line-height));color:var(--luzmo-ai-chat-empty-state-title-color,var(--ai-chat-empty-state-title-color));text-wrap:balance;margin:0}.subtitle{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-subtitle-font-size,var(--ai-chat-empty-state-subtitle-font-size));font-weight:var(--luzmo-ai-chat-empty-state-subtitle-font-weight,var(--ai-chat-empty-state-subtitle-font-weight));line-height:var(--luzmo-ai-chat-empty-state-subtitle-line-height,var(--ai-chat-empty-state-subtitle-line-height));color:var(--luzmo-ai-chat-empty-state-subtitle-color,var(--ai-chat-empty-state-subtitle-color));margin:0}.suggestions{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-suggestions-gap,var(--ai-chat-empty-state-suggestions-gap));flex-wrap:wrap;width:100%;display:flex}luzmo-action-button{max-width:100%}:host{--ai-chat-empty-state-header-actions-gap:1.5rem;--ai-chat-empty-state-actions-gap:var(--luzmo-spacing-4);--ai-chat-empty-state-suggestions-gap:var(--luzmo-spacing-3);--ai-chat-empty-state-max-width:22.5rem;--ai-chat-empty-state-padding-block:2rem;--ai-chat-empty-state-padding-inline:var(--luzmo-spacing-5);--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-l);--ai-chat-empty-state-title-font-weight:var(--luzmo-font-weight-strong,600);--ai-chat-empty-state-title-line-height:1.4;--ai-chat-empty-state-title-color:var(--luzmo-font-color);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-s);--ai-chat-empty-state-subtitle-font-weight:var(--luzmo-font-weight);--ai-chat-empty-state-subtitle-line-height:var(--luzmo-line-height);--ai-chat-empty-state-subtitle-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed))}", M = class extends e {
|
|
766
|
-
constructor(...e) {
|
|
767
|
-
super(...e), this.title = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), this.subtitle = "", this.suggestions = [], this.disabled = !1;
|
|
768
|
-
}
|
|
769
|
-
static {
|
|
770
|
-
this.styles = c(rt);
|
|
771
|
-
}
|
|
772
|
-
static {
|
|
773
|
-
this.tagName = "luzmo-ai-chat-empty-state";
|
|
774
|
-
}
|
|
775
|
-
_handleSuggestionActivate(e) {
|
|
776
|
-
if (this.disabled) return;
|
|
777
|
-
let t = e.prompt ?? e.label;
|
|
778
|
-
this.dispatchEvent(new CustomEvent("luzmo-suggestion-selected", {
|
|
779
|
-
detail: {
|
|
780
|
-
label: e.label,
|
|
781
|
-
prompt: t,
|
|
782
|
-
selectedDatasets: e.selectedDatasets
|
|
783
|
-
},
|
|
784
|
-
bubbles: !0,
|
|
785
|
-
composed: !0
|
|
786
|
-
}));
|
|
787
|
-
}
|
|
788
|
-
render() {
|
|
789
|
-
let e = this.suggestions.length > 0;
|
|
790
|
-
return o`
|
|
791
|
-
<section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
|
|
792
|
-
<header class="header">
|
|
793
|
-
<h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
|
|
794
|
-
</header>
|
|
795
|
-
|
|
796
|
-
${e ? o`
|
|
797
|
-
<div class="actions">
|
|
798
|
-
${this.subtitle ? o`<p class="subtitle">${this.subtitle}</p>` : s}
|
|
799
|
-
<div
|
|
800
|
-
class="suggestions"
|
|
801
|
-
role="group"
|
|
802
|
-
aria-label=${n("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
|
|
803
|
-
>
|
|
804
|
-
${this.suggestions.map((e) => o`
|
|
805
|
-
<luzmo-action-button
|
|
806
|
-
variant="accent"
|
|
807
|
-
size="s"
|
|
808
|
-
?disabled=${this.disabled}
|
|
809
|
-
@click=${() => this._handleSuggestionActivate(e)}
|
|
810
|
-
>
|
|
811
|
-
${e.label}
|
|
812
|
-
</luzmo-action-button>
|
|
813
|
-
`)}
|
|
814
|
-
</div>
|
|
815
|
-
</div>
|
|
816
|
-
` : s}
|
|
817
|
-
</section>
|
|
818
|
-
`;
|
|
819
|
-
}
|
|
820
|
-
};
|
|
821
|
-
//#endregion
|
|
822
|
-
//#region src/components/ai-chat/empty-state/index.ts
|
|
823
|
-
t([l({ type: String })], M.prototype, "title", void 0), t([l({ type: String })], M.prototype, "subtitle", void 0), t([l({ type: Array })], M.prototype, "suggestions", void 0), t([l({
|
|
824
|
-
type: Boolean,
|
|
825
|
-
reflect: !0
|
|
826
|
-
})], M.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", M);
|
|
827
|
-
//#endregion
|
|
828
|
-
//#region src/components/ai-chat/ai-chat-request.ts
|
|
829
|
-
function N(e, t) {
|
|
830
|
-
return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
|
|
831
|
-
}
|
|
832
|
-
function it(e) {
|
|
833
|
-
return e.type === "placeholder" ? null : {
|
|
834
|
-
...e,
|
|
835
|
-
version: e.version || "",
|
|
836
|
-
title: e.title || e.options?.title,
|
|
837
|
-
filters: e.filterGroups || [],
|
|
838
|
-
aichartId: e.aichartId || ""
|
|
839
|
-
};
|
|
840
|
-
}
|
|
841
|
-
function at(e, t) {
|
|
842
|
-
return [{
|
|
843
|
-
type: "text",
|
|
844
|
-
text: e
|
|
845
|
-
}, ...t.map((e) => ({
|
|
846
|
-
type: "dataset",
|
|
847
|
-
id: e
|
|
848
|
-
}))];
|
|
849
|
-
}
|
|
850
|
-
function ot(e, t, n) {
|
|
851
|
-
return {
|
|
852
|
-
agent: e,
|
|
853
|
-
task: t,
|
|
854
|
-
stream: n.stream ?? !0,
|
|
855
|
-
response_mode: "mixed",
|
|
856
|
-
...n.conversationId ? { conversation_id: n.conversationId } : {},
|
|
857
|
-
...n.localeId ? { locale_id: n.localeId } : {}
|
|
858
|
-
};
|
|
859
|
-
}
|
|
860
|
-
function st(e) {
|
|
861
|
-
let t = at(e.prompt, e.datasetIds), n = e.chart ? it(e.chart) : null;
|
|
862
|
-
return n && t.push({
|
|
863
|
-
type: "item",
|
|
864
|
-
value: n
|
|
865
|
-
}), {
|
|
866
|
-
...ot("item", e.task ?? "generate", e),
|
|
867
|
-
input: t
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
function ct(e) {
|
|
871
|
-
let t = at(e.prompt, e.datasetIds);
|
|
872
|
-
return e.dashboard && t.push({
|
|
873
|
-
type: "dashboard",
|
|
874
|
-
value: e.dashboard,
|
|
875
|
-
...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
|
|
876
|
-
}), {
|
|
877
|
-
...ot("dashboard", "generate", e),
|
|
878
|
-
timezone_id: e.timezoneId ?? "UTC",
|
|
879
|
-
input: t
|
|
880
|
-
};
|
|
881
|
-
}
|
|
882
|
-
function lt(e) {
|
|
883
|
-
return {
|
|
884
|
-
...ot("analyst", "generate", e),
|
|
885
|
-
input: at(e.prompt, e.datasetIds)
|
|
886
|
-
};
|
|
887
|
-
}
|
|
888
|
-
function ut(e, t) {
|
|
889
|
-
switch (e) {
|
|
890
|
-
case "dashboard": return ct(t);
|
|
891
|
-
case "analyst": return lt(t);
|
|
892
|
-
default: return st(t);
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
function dt(e, t) {
|
|
896
|
-
let { authKey: n, authToken: r, apiVersion: i = "0.1.0" } = t;
|
|
897
|
-
return {
|
|
898
|
-
key: n,
|
|
899
|
-
token: r,
|
|
900
|
-
action: "create",
|
|
901
|
-
version: i,
|
|
902
|
-
properties: ut(e, t)
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
function ft(e, t, n, r = "0.1.0", i = null) {
|
|
906
|
-
return {
|
|
907
|
-
key: t,
|
|
908
|
-
token: n,
|
|
909
|
-
action: "delete",
|
|
910
|
-
version: r,
|
|
911
|
-
properties: {
|
|
912
|
-
agent: "item",
|
|
913
|
-
restore_to_message_id: e,
|
|
914
|
-
...i ? { conversation_id: i } : {}
|
|
915
|
-
}
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
//#endregion
|
|
919
|
-
//#region src/components/ai-chat/stream/transport.ts
|
|
920
|
-
async function P(e) {
|
|
921
|
-
let t = await fetch(e.url, {
|
|
922
|
-
method: "POST",
|
|
923
|
-
headers: { "Content-Type": "application/json" },
|
|
924
|
-
mode: "cors",
|
|
925
|
-
body: JSON.stringify(e.body),
|
|
926
|
-
signal: e.signal
|
|
927
|
-
});
|
|
928
|
-
if (!t.ok) {
|
|
929
|
-
let e = await t.json().catch(() => null);
|
|
930
|
-
throw Error(e?.message || `API request failed with status ${t.status}`);
|
|
931
|
-
}
|
|
932
|
-
if (!t.body) throw Error("Response body is not readable");
|
|
933
|
-
return {
|
|
934
|
-
body: t.body,
|
|
935
|
-
conversationId: t.headers.get("x-conversation-id")
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
function pt(e) {
|
|
939
|
-
let t = e.trim();
|
|
940
|
-
if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
|
|
941
|
-
let n = t;
|
|
942
|
-
return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
|
|
943
|
-
}
|
|
944
|
-
function F(e, t) {
|
|
945
|
-
try {
|
|
946
|
-
let n = pt(e);
|
|
947
|
-
n && t(n);
|
|
948
|
-
} catch {
|
|
949
|
-
console.error("Failed to parse stream line");
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
async function mt(e, t) {
|
|
953
|
-
let n = e.getReader(), r = new TextDecoder(), i = "";
|
|
954
|
-
try {
|
|
955
|
-
for (;;) {
|
|
956
|
-
let { done: e, value: a } = await n.read();
|
|
957
|
-
if (e) break;
|
|
958
|
-
i += r.decode(a, { stream: !0 });
|
|
959
|
-
let o = i.split(/\r?\n/);
|
|
960
|
-
i = o.pop() ?? "";
|
|
961
|
-
for (let e of o) F(e, t);
|
|
962
|
-
}
|
|
963
|
-
i += r.decode();
|
|
964
|
-
let e = i.trim();
|
|
965
|
-
e && F(e, t);
|
|
966
|
-
} finally {
|
|
967
|
-
n.releaseLock();
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
//#endregion
|
|
971
|
-
//#region src/components/ai-chat/stream/progress.ts
|
|
972
|
-
function I() {
|
|
973
|
-
return {
|
|
974
|
-
id: "root",
|
|
975
|
-
step: "root",
|
|
976
|
-
status: "pending",
|
|
977
|
-
children: [{
|
|
978
|
-
id: "client-init",
|
|
979
|
-
step: "iqInit",
|
|
980
|
-
status: "inProgress",
|
|
981
|
-
description: n("Thinking", { desc: "Label shown in the AI chat progress tree while the assistant starts processing a prompt" })
|
|
982
|
-
}]
|
|
983
|
-
};
|
|
984
|
-
}
|
|
985
|
-
function L(e) {
|
|
986
|
-
let t = e.progress;
|
|
987
|
-
return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
|
|
988
|
-
}
|
|
989
|
-
//#endregion
|
|
990
|
-
//#region src/components/ai-chat/stream/chunk-extractors.ts
|
|
991
|
-
function ht(e) {
|
|
992
|
-
if (!e || typeof e != "object") return "";
|
|
993
|
-
let t = e.assistant_message;
|
|
994
|
-
if (!t || typeof t != "object") return "";
|
|
995
|
-
if (typeof t.message == "string") return t.message;
|
|
996
|
-
if (typeof t.text == "string") return t.text;
|
|
997
|
-
if (typeof t.summary == "string") return t.summary;
|
|
998
|
-
let n = t.content;
|
|
999
|
-
return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
|
|
1000
|
-
}
|
|
1001
|
-
function R(e) {
|
|
1002
|
-
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 : "";
|
|
1003
|
-
}
|
|
1004
|
-
function gt(e) {
|
|
1005
|
-
return R(e) || ht(e.result);
|
|
1006
|
-
}
|
|
1007
|
-
function _t(e) {
|
|
1008
|
-
return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
|
|
1009
|
-
}
|
|
1010
|
-
function vt(e, t) {
|
|
1011
|
-
let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
|
|
1012
|
-
n && t.callbacks.onConversationIdChange(n);
|
|
1013
|
-
}
|
|
1014
|
-
function yt(e) {
|
|
1015
|
-
for (let t of e) if (t && typeof t == "object" && t.type === "item") {
|
|
1016
|
-
let e = t.value;
|
|
1017
|
-
if (e && typeof e == "object") return e;
|
|
1018
|
-
}
|
|
1019
|
-
return null;
|
|
1020
|
-
}
|
|
1021
|
-
function z(e) {
|
|
1022
|
-
let t = e.chart ?? e.generatedChart;
|
|
1023
|
-
if (t && typeof t == "object") return t;
|
|
1024
|
-
let n = e.aiMessageAssets ?? e.ai_message_assets;
|
|
1025
|
-
if (Array.isArray(n)) {
|
|
1026
|
-
let e = yt(n);
|
|
1027
|
-
if (e) return e;
|
|
1028
|
-
}
|
|
1029
|
-
let r = e.result;
|
|
1030
|
-
if (r && typeof r == "object") {
|
|
1031
|
-
let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
|
|
1032
|
-
if (Array.isArray(t)) return yt(t);
|
|
1033
|
-
}
|
|
1034
|
-
return null;
|
|
1035
|
-
}
|
|
1036
|
-
function B(e) {
|
|
1037
|
-
for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
|
|
1038
|
-
let e = t.value;
|
|
1039
|
-
if (e && typeof e == "object" && Array.isArray(e.views)) return e;
|
|
1040
|
-
}
|
|
1041
|
-
return null;
|
|
1042
|
-
}
|
|
1043
|
-
function V(e) {
|
|
1044
|
-
for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
|
|
1045
|
-
let e = t.name;
|
|
1046
|
-
if (e && typeof e == "object") return e;
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
function bt(...e) {
|
|
1050
|
-
return e.find(Array.isArray);
|
|
1051
|
-
}
|
|
1052
|
-
function H(e) {
|
|
1053
|
-
if (e.views && Array.isArray(e.views)) return e;
|
|
1054
|
-
let t = e.aiMessageAssets ?? e.ai_message_assets;
|
|
1055
|
-
if (Array.isArray(t)) return B(t);
|
|
1056
|
-
let n = e.result;
|
|
1057
|
-
if (n && typeof n == "object") {
|
|
1058
|
-
let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
|
|
1059
|
-
if (Array.isArray(t)) return B(t);
|
|
1060
|
-
}
|
|
1061
|
-
return null;
|
|
1062
|
-
}
|
|
1063
|
-
function xt(e) {
|
|
1064
|
-
let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = bt(t, n?.aiMessageAssets ?? n?.ai_message_assets);
|
|
1065
|
-
return r ? V(r) : void 0;
|
|
1066
|
-
}
|
|
1067
|
-
//#endregion
|
|
1068
|
-
//#region src/components/ai-chat/stream/stream-processor.ts
|
|
1069
|
-
var St = new Set([
|
|
1070
|
-
"conversation-id",
|
|
1071
|
-
"conversation_id",
|
|
1072
|
-
"keepalive",
|
|
1073
|
-
"ping",
|
|
1074
|
-
"finish",
|
|
1075
|
-
"done"
|
|
1076
|
-
]);
|
|
1077
|
-
function U(e, t, n) {
|
|
1078
|
-
return {
|
|
1079
|
-
agent: n.agent,
|
|
1080
|
-
conversationId: t.callbacks.getConversationId(),
|
|
1081
|
-
...typeof e.messageId == "string" ? { messageId: e.messageId } : {},
|
|
1082
|
-
raw: e
|
|
1083
|
-
};
|
|
1084
|
-
}
|
|
1085
|
-
function W(e, t, n, r, i) {
|
|
1086
|
-
let a = {
|
|
1087
|
-
...U(n, e, t),
|
|
1088
|
-
recognized: !0,
|
|
1089
|
-
type: r,
|
|
1090
|
-
data: i
|
|
1091
|
-
};
|
|
1092
|
-
e.callbacks.onStep(a);
|
|
1093
|
-
}
|
|
1094
|
-
function Ct(e, t, n, r, i) {
|
|
1095
|
-
let a = {
|
|
1096
|
-
...U(n, e, t),
|
|
1097
|
-
recognized: !1,
|
|
1098
|
-
type: r,
|
|
1099
|
-
data: i
|
|
1100
|
-
};
|
|
1101
|
-
e.callbacks.onStep(a);
|
|
1102
|
-
}
|
|
1103
|
-
function wt(e) {
|
|
1104
|
-
e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
|
|
1105
|
-
}
|
|
1106
|
-
function Tt(e, t) {
|
|
1107
|
-
wt(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
|
|
1108
|
-
}
|
|
1109
|
-
function Et(e) {
|
|
1110
|
-
if (!e) return null;
|
|
1111
|
-
let t = e.descriptionMetadata?.decision;
|
|
1112
|
-
if (t === "create" || t === "edit" || t === "question") return t;
|
|
1113
|
-
for (let t of e.children ?? []) {
|
|
1114
|
-
let e = Et(t);
|
|
1115
|
-
if (e) return e;
|
|
1116
|
-
}
|
|
1117
|
-
return null;
|
|
1118
|
-
}
|
|
1119
|
-
function Dt(e, t, n) {
|
|
1120
|
-
if (!L(e)) return !1;
|
|
1121
|
-
let r = e.progress;
|
|
1122
|
-
if (t.callbacks.onProgress(r), W(t, n, e, "progress", r), t.state.decision === null) {
|
|
1123
|
-
let i = Et(r);
|
|
1124
|
-
i && (t.state.decision = i, W(t, n, e, "decision", { decision: i }));
|
|
1125
|
-
}
|
|
1126
|
-
return !0;
|
|
1127
|
-
}
|
|
1128
|
-
function Ot(e) {
|
|
1129
|
-
return !!e.error || e.type === "error" || typeof e.error_text == "string";
|
|
1130
|
-
}
|
|
1131
|
-
function G(e) {
|
|
1132
|
-
return typeof e.error_text == "string" && e.error_text ? e.error_text : typeof e.error == "string" && e.error ? e.error : n("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" });
|
|
1133
|
-
}
|
|
1134
|
-
function K(e, t, n) {
|
|
1135
|
-
if (!Ot(e)) return !1;
|
|
1136
|
-
let r = G(e);
|
|
1137
|
-
return t.aiMessage.message = r, t.aiMessage.isError = !0, t.callbacks.onMessageUpdate(t.aiMessage), Y(e, t, n, e.error ?? r), !0;
|
|
1138
|
-
}
|
|
1139
|
-
function kt(e) {
|
|
1140
|
-
return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
|
|
1141
|
-
}
|
|
1142
|
-
function At(e, t, n) {
|
|
1143
|
-
if (e.type !== "interrupt") return !1;
|
|
1144
|
-
let r = kt(e);
|
|
1145
|
-
return r && (t.state.interruptQuestion = r, Tt(t, r), W(t, n, e, "interrupt", { question: r })), Y(e, t, n), !0;
|
|
1146
|
-
}
|
|
1147
|
-
function jt(e) {
|
|
1148
|
-
return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
|
|
1149
|
-
}
|
|
1150
|
-
function Mt(e) {
|
|
1151
|
-
return typeof e.asset_type == "string" ? e.asset_type : "";
|
|
1152
|
-
}
|
|
1153
|
-
function Nt(e) {
|
|
1154
|
-
return {
|
|
1155
|
-
assetType: Mt(e),
|
|
1156
|
-
snapshot: {}
|
|
1157
|
-
};
|
|
1158
|
-
}
|
|
1159
|
-
function Pt(e, t) {
|
|
1160
|
-
return {
|
|
1161
|
-
...e,
|
|
1162
|
-
...t
|
|
1163
|
-
};
|
|
1164
|
-
}
|
|
1165
|
-
function Ft(e) {
|
|
1166
|
-
let t = e.asset_delta ?? e.delta;
|
|
1167
|
-
return t && typeof t == "object" ? t : null;
|
|
1168
|
-
}
|
|
1169
|
-
function q(e, t) {
|
|
1170
|
-
t.state.assets[jt(e)] = Nt(e);
|
|
1171
|
-
}
|
|
1172
|
-
function J(e, t) {
|
|
1173
|
-
let n = jt(e), r = t.state.assets[n] ?? Nt(e), i = Ft(e);
|
|
1174
|
-
i && (r.snapshot = Pt(r.snapshot, i)), t.state.assets[n] = r;
|
|
1175
|
-
}
|
|
1176
|
-
function It(e, t) {
|
|
1177
|
-
let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
|
|
1178
|
-
return n && typeof n == "object" ? Pt(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
|
|
1179
|
-
}
|
|
1180
|
-
function Lt(e, t, n) {
|
|
1181
|
-
let r = jt(e), i = t.state.assets[r], a = i?.assetType || Mt(e), o = It(e, i);
|
|
1182
|
-
delete t.state.assets[r], Bt(a, o, e, t, n);
|
|
1183
|
-
}
|
|
1184
|
-
function Rt(e, t, n) {
|
|
1185
|
-
switch (e.type) {
|
|
1186
|
-
case "asset_start": return q(e, t), !0;
|
|
1187
|
-
case "asset_delta": return J(e, t), !0;
|
|
1188
|
-
case "asset_end": return Lt(e, t, n), !0;
|
|
1189
|
-
default: return !1;
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
function zt(e, t, n, r) {
|
|
1193
|
-
n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), W(n, r, t, "chart", e);
|
|
1194
|
-
}
|
|
1195
|
-
function Bt(e, t, n, r, i) {
|
|
1196
|
-
switch (e) {
|
|
1197
|
-
case "dashboard-title": {
|
|
1198
|
-
let e = t.name;
|
|
1199
|
-
e && typeof e == "object" && (r.state.dashboardName = e, W(r, i, n, "dashboard-title", { name: e }));
|
|
1200
|
-
return;
|
|
1201
|
-
}
|
|
1202
|
-
case "dashboard-layout":
|
|
1203
|
-
W(r, i, n, "dashboard-layout", t);
|
|
1204
|
-
return;
|
|
1205
|
-
case "dashboard-item":
|
|
1206
|
-
W(r, i, n, "dashboard-item", {
|
|
1207
|
-
slot: Number(t.slot),
|
|
1208
|
-
chart: t.chart ?? t
|
|
1209
|
-
});
|
|
1210
|
-
return;
|
|
1211
|
-
case "dashboard":
|
|
1212
|
-
r.state.dashboardSnapshot = t;
|
|
1213
|
-
return;
|
|
1214
|
-
default: Vt(e, t, n, r, i);
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
function Vt(e, t, n, r, i) {
|
|
1218
|
-
if (i.chartAssetType && e === i.chartAssetType) {
|
|
1219
|
-
zt(t, n, r, i);
|
|
1220
|
-
return;
|
|
1221
|
-
}
|
|
1222
|
-
if (i.dashboardAssetType && e === i.dashboardAssetType) {
|
|
1223
|
-
r.state.dashboardSnapshot = t;
|
|
1224
|
-
return;
|
|
1225
|
-
}
|
|
1226
|
-
Ct(r, i, n, e || "asset", t);
|
|
1227
|
-
}
|
|
1228
|
-
function Ht(e, t, n) {
|
|
1229
|
-
let r = !1;
|
|
1230
|
-
if (n.dashboardAssetType) {
|
|
1231
|
-
let n = H(e);
|
|
1232
|
-
if (n) {
|
|
1233
|
-
t.state.dashboardSnapshot = n;
|
|
1234
|
-
let i = xt(e);
|
|
1235
|
-
i && (t.state.dashboardName = i), r = !0;
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
if (n.chartAssetType && !t.state.chartSnapshot) {
|
|
1239
|
-
let i = z(e);
|
|
1240
|
-
i && (zt(i, e, t, n), r = !0);
|
|
1241
|
-
}
|
|
1242
|
-
return r;
|
|
1243
|
-
}
|
|
1244
|
-
function Ut(e, t, n) {
|
|
1245
|
-
return {
|
|
1246
|
-
...e,
|
|
1247
|
-
generatedChart: t,
|
|
1248
|
-
conversationId: n.callbacks.getConversationId()
|
|
1249
|
-
};
|
|
1250
|
-
}
|
|
1251
|
-
function Wt(e, t, n) {
|
|
1252
|
-
for (let r of Object.keys(t.state.assets)) {
|
|
1253
|
-
let i = t.state.assets[r];
|
|
1254
|
-
delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot) && Bt(i.assetType, i.snapshot, e, t, n);
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
function Gt(e, t, n) {
|
|
1258
|
-
let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? H(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? z(e) : null);
|
|
1259
|
-
return {
|
|
1260
|
-
agent: n.agent,
|
|
1261
|
-
conversationId: t.callbacks.getConversationId(),
|
|
1262
|
-
message: t.aiMessage,
|
|
1263
|
-
...r ? { dashboard: r } : {},
|
|
1264
|
-
...i ? { chart: Ut(e, i, t) } : {},
|
|
1265
|
-
...t.state.dashboardName ? { name: t.state.dashboardName } : {},
|
|
1266
|
-
raw: e
|
|
1267
|
-
};
|
|
1268
|
-
}
|
|
1269
|
-
function Y(e, t, n, r) {
|
|
1270
|
-
if (!t.state.completed) {
|
|
1271
|
-
if (t.state.completed = !0, Wt(e, t, n), wt(t), r !== void 0) {
|
|
1272
|
-
t.callbacks.onComplete({
|
|
1273
|
-
agent: n.agent,
|
|
1274
|
-
conversationId: t.callbacks.getConversationId(),
|
|
1275
|
-
message: t.aiMessage,
|
|
1276
|
-
error: r,
|
|
1277
|
-
raw: e
|
|
1278
|
-
});
|
|
1279
|
-
return;
|
|
1280
|
-
}
|
|
1281
|
-
t.callbacks.onComplete(Gt(e, t, n));
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
function X(e) {
|
|
1285
|
-
return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
|
|
1286
|
-
}
|
|
1287
|
-
function Kt(e, t, n) {
|
|
1288
|
-
let r = gt(e);
|
|
1289
|
-
return r ? (t.state.accumulatedText += r, Tt(t, r), W(t, n, e, "text", {
|
|
1290
|
-
delta: r,
|
|
1291
|
-
text: t.state.accumulatedText
|
|
1292
|
-
}), !0) : !1;
|
|
1293
|
-
}
|
|
1294
|
-
function qt(e, t, n, r, i) {
|
|
1295
|
-
if (r || i) return;
|
|
1296
|
-
let a = X(e);
|
|
1297
|
-
a && !St.has(a) && Ct(t, n, e, a, e);
|
|
1298
|
-
}
|
|
1299
|
-
function Jt(e, t, n) {
|
|
1300
|
-
if (vt(e, t), Dt(e, t, n) || K(e, t, n) || At(e, t, n) || Rt(e, t, n)) return;
|
|
1301
|
-
let r = Kt(e, t, n), i = Ht(e, t, n), a = r || i, o = _t(e);
|
|
1302
|
-
qt(e, t, n, a, o), o && Y(e, t, n);
|
|
1303
|
-
}
|
|
1304
|
-
//#endregion
|
|
1305
|
-
//#region src/components/ai-chat/stream/registry.ts
|
|
1306
|
-
function Yt(e) {
|
|
1307
|
-
switch (e) {
|
|
1308
|
-
case "dashboard": return {
|
|
1309
|
-
agent: e,
|
|
1310
|
-
dashboardAssetType: "dashboard"
|
|
1311
|
-
};
|
|
1312
|
-
case "item": return {
|
|
1313
|
-
agent: e,
|
|
1314
|
-
chartAssetType: "item"
|
|
1315
|
-
};
|
|
1316
|
-
default: return { agent: e };
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
function Xt(e) {
|
|
1320
|
-
let t = Yt(e);
|
|
1321
|
-
return (e, n) => Jt(e, n, t);
|
|
1322
|
-
}
|
|
1323
|
-
function Zt() {
|
|
1324
|
-
return {
|
|
1325
|
-
progressCollapsed: !1,
|
|
1326
|
-
accumulatedText: "",
|
|
1327
|
-
decision: null,
|
|
1328
|
-
assets: {},
|
|
1329
|
-
dashboardSnapshot: null,
|
|
1330
|
-
dashboardName: void 0,
|
|
1331
|
-
chartSnapshot: null,
|
|
1332
|
-
interruptQuestion: null,
|
|
1333
|
-
completed: !1
|
|
1334
|
-
};
|
|
1335
|
-
}
|
|
1336
|
-
//#endregion
|
|
1337
|
-
//#region src/components/ai-chat/session/ai-chat-session.ts
|
|
1338
|
-
function Qt() {
|
|
1339
|
-
return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
1340
|
-
}
|
|
1341
|
-
var $t = class {
|
|
1342
|
-
constructor(e, t = {}) {
|
|
1343
|
-
this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
|
|
1344
|
-
messages: [],
|
|
1345
|
-
selectedDatasets: [],
|
|
1346
|
-
isGenerating: !1,
|
|
1347
|
-
progress: null,
|
|
1348
|
-
progressCollapsed: !1,
|
|
1349
|
-
conversationId: null,
|
|
1350
|
-
inflightMessage: null
|
|
1351
|
-
}, this._abortController = null, this._inflightMessage = null, this._receivedProgress = !1, this._config = {
|
|
1352
|
-
apiUrl: "https://api.luzmo.com",
|
|
1353
|
-
apiVersion: "0.1.0",
|
|
1354
|
-
stream: !0,
|
|
1355
|
-
...e
|
|
1356
|
-
}, this._hostCallbacks = t, this._state = {
|
|
1357
|
-
...this._state,
|
|
1358
|
-
messages: e.messages ? [...e.messages] : [],
|
|
1359
|
-
selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
|
|
1360
|
-
conversationId: e.conversationId ?? null,
|
|
1361
|
-
isGenerating: e.isGenerating ?? !1,
|
|
1362
|
-
progress: e.progress ?? null,
|
|
1363
|
-
progressCollapsed: e.progressCollapsed ?? !1
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1366
|
-
get state() {
|
|
1367
|
-
return this._state;
|
|
1368
|
-
}
|
|
1369
|
-
get isGenerating() {
|
|
1370
|
-
return this._state.isGenerating;
|
|
1371
|
-
}
|
|
1372
|
-
subscribe(e) {
|
|
1373
|
-
return this._subscribers.add(e), e(this._state), () => {
|
|
1374
|
-
this._subscribers.delete(e);
|
|
1375
|
-
};
|
|
1376
|
-
}
|
|
1377
|
-
setUiBridge(e) {
|
|
1378
|
-
this._uiBridgeCallbacks = e;
|
|
1379
|
-
}
|
|
1380
|
-
updateConfig(e) {
|
|
1381
|
-
this._config = {
|
|
1382
|
-
...this._config,
|
|
1383
|
-
...e
|
|
1384
|
-
};
|
|
1385
|
-
let t = {};
|
|
1386
|
-
if ("conversationId" in e) {
|
|
1387
|
-
let n = e.conversationId ?? null;
|
|
1388
|
-
n !== this._state.conversationId && (t.conversationId = n);
|
|
1389
|
-
}
|
|
1390
|
-
if ("selectedDatasets" in e && e.selectedDatasets) {
|
|
1391
|
-
let n = [...e.selectedDatasets];
|
|
1392
|
-
this._areSelectedDatasetsEqual(n, this._state.selectedDatasets) || (t.selectedDatasets = n);
|
|
1393
|
-
}
|
|
1394
|
-
if ("messages" in e && e.messages) {
|
|
1395
|
-
let n = [...e.messages];
|
|
1396
|
-
this._areChatMessagesEqual(n, this._state.messages) || (t.messages = n);
|
|
1397
|
-
}
|
|
1398
|
-
"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);
|
|
1399
|
-
}
|
|
1400
|
-
setSelectedDatasets(e) {
|
|
1401
|
-
this._patchState({ selectedDatasets: [...e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets);
|
|
1402
|
-
}
|
|
1403
|
-
addDataset(e) {
|
|
1404
|
-
this._state.selectedDatasets.some((t) => t.id === e.id) || (this._patchState({ selectedDatasets: [...this._state.selectedDatasets, e] }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
|
|
1405
|
-
}
|
|
1406
|
-
removeDataset(e) {
|
|
1407
|
-
let t = this._state.selectedDatasets.filter((t) => t.id !== e);
|
|
1408
|
-
t.length !== this._state.selectedDatasets.length && (this._patchState({ selectedDatasets: t }), this._emit("onDatasetsChanged", this._state.selectedDatasets));
|
|
1409
|
-
}
|
|
1410
|
-
isDatasetRequirementMet() {
|
|
1411
|
-
return !this._config.requireDataset || this._state.selectedDatasets.length > 0;
|
|
1412
|
-
}
|
|
1413
|
-
getAiPromptUrl() {
|
|
1414
|
-
return N(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
|
|
1415
|
-
}
|
|
1416
|
-
buildRequestBody(e, t) {
|
|
1417
|
-
return dt(this._config.agent, {
|
|
1418
|
-
prompt: e,
|
|
1419
|
-
datasetIds: t,
|
|
1420
|
-
authKey: this._config.authKey,
|
|
1421
|
-
authToken: this._config.authToken,
|
|
1422
|
-
conversationId: this._state.conversationId,
|
|
1423
|
-
chart: this._config.chart ?? null,
|
|
1424
|
-
dashboard: this._config.dashboard ?? null,
|
|
1425
|
-
currentScreenMode: this._config.currentScreenMode,
|
|
1426
|
-
localeId: this._config.localeId,
|
|
1427
|
-
timezoneId: this._config.timezoneId,
|
|
1428
|
-
task: this._config.task,
|
|
1429
|
-
modelPreference: this._config.modelPreference,
|
|
1430
|
-
apiVersion: this._config.apiVersion,
|
|
1431
|
-
stream: this._config.stream
|
|
1432
|
-
});
|
|
1433
|
-
}
|
|
1434
|
-
buildPromptSubmittedDetail(e, t, n, r) {
|
|
1435
|
-
return {
|
|
1436
|
-
prompt: e,
|
|
1437
|
-
selectedDatasets: t,
|
|
1438
|
-
datasetIds: n,
|
|
1439
|
-
agent: this._config.agent,
|
|
1440
|
-
request: this.buildRequestBody(e, n),
|
|
1441
|
-
url: this.getAiPromptUrl(),
|
|
1442
|
-
...r ? { signal: r } : {}
|
|
1443
|
-
};
|
|
1444
|
-
}
|
|
1445
|
-
async submit(e) {
|
|
1446
|
-
let t = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
|
|
1447
|
-
if (!this.isDatasetRequirementMet()) return;
|
|
1448
|
-
this._abortInflight();
|
|
1449
|
-
let n = {
|
|
1450
|
-
id: e.aiMessageId ?? Qt(),
|
|
1451
|
-
type: "ai",
|
|
1452
|
-
message: ""
|
|
1453
|
-
}, r = [...this._state.messages];
|
|
1454
|
-
if (!e.skipUserMessage) {
|
|
1455
|
-
let t = {
|
|
1456
|
-
id: Qt(),
|
|
1457
|
-
type: "user",
|
|
1458
|
-
message: e.prompt
|
|
1459
|
-
};
|
|
1460
|
-
r = [...r, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
|
|
1461
|
-
}
|
|
1462
|
-
r = [...r, n], this._inflightMessage = n, this._receivedProgress = !1;
|
|
1463
|
-
let i = new AbortController();
|
|
1464
|
-
this._abortController = i, this._patchState({
|
|
1465
|
-
messages: r,
|
|
1466
|
-
isGenerating: !0,
|
|
1467
|
-
progress: I(),
|
|
1468
|
-
progressCollapsed: !1,
|
|
1469
|
-
inflightMessage: n
|
|
1470
|
-
});
|
|
1471
|
-
let a = t, o = [...this._state.selectedDatasets];
|
|
1472
|
-
if (this._hasCallback("onPromptSubmitted")) {
|
|
1473
|
-
let t = this.buildPromptSubmittedDetail(e.prompt, o, a, i.signal);
|
|
1474
|
-
try {
|
|
1475
|
-
await this._invokeCallback("onPromptSubmitted", t);
|
|
1476
|
-
} catch (e) {
|
|
1477
|
-
e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, n), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
|
|
1478
|
-
}
|
|
1479
|
-
return;
|
|
1480
|
-
}
|
|
1481
|
-
let s = this.buildRequestBody(e.prompt, t), c = Xt(this._config.agent), l = {
|
|
1482
|
-
aiMessage: n,
|
|
1483
|
-
callbacks: this._createStreamCallbacks(),
|
|
1484
|
-
state: Zt()
|
|
1485
|
-
}, u = this._config.fetchStreaming ?? P, d = !1;
|
|
1486
|
-
try {
|
|
1487
|
-
let { body: e, conversationId: t } = await u({
|
|
1488
|
-
url: this.getAiPromptUrl(),
|
|
1489
|
-
body: s,
|
|
1490
|
-
signal: i.signal
|
|
1491
|
-
});
|
|
1492
|
-
t && this._setConversationId(t), await mt(e, (e) => c(e, l)), d = !0;
|
|
1493
|
-
} catch (e) {
|
|
1494
|
-
e.name !== "AbortError" && (this._handleSubmitError(e, n), d = !0);
|
|
1495
|
-
} finally {
|
|
1496
|
-
this._abortController === i && (d ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
async restore(e) {
|
|
1500
|
-
if (this._config.agent !== "item") return {};
|
|
1501
|
-
let t = ft(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
|
|
1502
|
-
if (this._patchState({
|
|
1503
|
-
isGenerating: !0,
|
|
1504
|
-
progress: null,
|
|
1505
|
-
progressCollapsed: !1
|
|
1506
|
-
}), this._hasCallback("onRestoreRequested")) {
|
|
1507
|
-
let n = {
|
|
1508
|
-
apiMessageId: e.restoreToMessageId,
|
|
1509
|
-
messageIndex: e.messageIndex,
|
|
1510
|
-
request: t,
|
|
1511
|
-
url: this.getAiPromptUrl()
|
|
1512
|
-
};
|
|
1513
|
-
try {
|
|
1514
|
-
await this._invokeCallback("onRestoreRequested", n);
|
|
1515
|
-
} finally {
|
|
1516
|
-
this._patchState({ isGenerating: !1 });
|
|
1517
|
-
}
|
|
1518
|
-
return {};
|
|
1519
|
-
}
|
|
1520
|
-
try {
|
|
1521
|
-
let n = await fetch(this.getAiPromptUrl(), {
|
|
1522
|
-
method: "POST",
|
|
1523
|
-
headers: { "Content-Type": "application/json" },
|
|
1524
|
-
mode: "cors",
|
|
1525
|
-
body: JSON.stringify(t)
|
|
1526
|
-
});
|
|
1527
|
-
if (!n.ok) {
|
|
1528
|
-
let e = await n.json().catch(() => null);
|
|
1529
|
-
throw Error(e?.message || `API request failed with status ${n.status}`);
|
|
1530
|
-
}
|
|
1531
|
-
let r = await n.json().catch(() => null), i = r?.generatedChart ?? (r ? z(r) : null), a = {
|
|
1532
|
-
...typeof r?.message == "string" ? { message: r.message } : {},
|
|
1533
|
-
...i ? { chart: {
|
|
1534
|
-
...r,
|
|
1535
|
-
generatedChart: i
|
|
1536
|
-
} } : {}
|
|
1537
|
-
}, o = e.messageIndex >= 0 && e.messageIndex < this._state.messages.length ? this._state.messages.slice(0, e.messageIndex + 1) : this._state.messages;
|
|
1538
|
-
if (a.message && o[e.messageIndex]?.type === "ai" && (o[e.messageIndex] = {
|
|
1539
|
-
...o[e.messageIndex],
|
|
1540
|
-
message: a.message
|
|
1541
|
-
}), this._patchState({ messages: [...o] }), a.chart || a.message) {
|
|
1542
|
-
let t = o[e.messageIndex], n = t?.type === "ai" ? t : {
|
|
1543
|
-
id: Qt(),
|
|
1544
|
-
type: "ai",
|
|
1545
|
-
message: a.message ?? ""
|
|
1546
|
-
};
|
|
1547
|
-
this._emit("onComplete", {
|
|
1548
|
-
agent: this._config.agent,
|
|
1549
|
-
conversationId: this._state.conversationId,
|
|
1550
|
-
message: n,
|
|
1551
|
-
...a.chart ? { chart: a.chart } : {},
|
|
1552
|
-
...r ? { raw: r } : {}
|
|
1553
|
-
});
|
|
1554
|
-
}
|
|
1555
|
-
return a;
|
|
1556
|
-
} finally {
|
|
1557
|
-
this._patchState({ isGenerating: !1 });
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
buildRestoreRequest(e) {
|
|
1561
|
-
return ft(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
|
|
1562
|
-
}
|
|
1563
|
-
abort(e = {}) {
|
|
1564
|
-
this._abortInflight(), this._patchState({
|
|
1565
|
-
isGenerating: !1,
|
|
1566
|
-
progress: null,
|
|
1567
|
-
progressCollapsed: !1,
|
|
1568
|
-
inflightMessage: null
|
|
1569
|
-
}), e.notify && this._emit("onPromptStopped");
|
|
1570
|
-
}
|
|
1571
|
-
_abortInflight() {
|
|
1572
|
-
this._abortController?.abort(), this._abortController = null, this._discardInflightMessage();
|
|
1573
|
-
}
|
|
1574
|
-
_createStreamCallbacks() {
|
|
1575
|
-
return {
|
|
1576
|
-
onConversationIdChange: (e) => this._setConversationId(e),
|
|
1577
|
-
onProgress: (e) => {
|
|
1578
|
-
this._receivedProgress = !0, this._patchState({ progress: e });
|
|
1579
|
-
},
|
|
1580
|
-
onProgressCollapsed: (e) => {
|
|
1581
|
-
this._patchState({ progressCollapsed: e });
|
|
1582
|
-
},
|
|
1583
|
-
onMessageUpdate: (e) => {
|
|
1584
|
-
this._inflightMessage = e, this._upsertMessage(e), this._patchState({ inflightMessage: { ...e } });
|
|
1585
|
-
},
|
|
1586
|
-
getConversationId: () => this._state.conversationId,
|
|
1587
|
-
onStep: (e) => {
|
|
1588
|
-
this._emit("onStep", e);
|
|
1589
|
-
},
|
|
1590
|
-
onComplete: (e) => {
|
|
1591
|
-
this._emit("onComplete", e);
|
|
1592
|
-
}
|
|
1593
|
-
};
|
|
1594
|
-
}
|
|
1595
|
-
_setConversationId(e) {
|
|
1596
|
-
this._config = {
|
|
1597
|
-
...this._config,
|
|
1598
|
-
conversationId: e
|
|
1599
|
-
}, this._patchState({ conversationId: e }), this._emit("onConversationIdChange", e);
|
|
1600
|
-
}
|
|
1601
|
-
_upsertMessage(e) {
|
|
1602
|
-
let t = this._state.messages.findIndex((t) => t.id === e.id);
|
|
1603
|
-
if (t === -1) {
|
|
1604
|
-
this._patchState({ messages: [...this._state.messages, { ...e }] });
|
|
1605
|
-
return;
|
|
1606
|
-
}
|
|
1607
|
-
let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
|
|
1608
|
-
this._patchState({ messages: n });
|
|
1609
|
-
}
|
|
1610
|
-
_finalizeInflightMessage() {
|
|
1611
|
-
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({
|
|
1612
|
-
progress: null,
|
|
1613
|
-
progressCollapsed: !1,
|
|
1614
|
-
inflightMessage: null
|
|
1615
|
-
}));
|
|
1616
|
-
}
|
|
1617
|
-
_removeInflightFromMessages() {
|
|
1618
|
-
this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
|
|
1619
|
-
}
|
|
1620
|
-
_discardInflightMessage() {
|
|
1621
|
-
let e = !!(this._inflightMessage || this._state.inflightMessage);
|
|
1622
|
-
this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
|
|
1623
|
-
}
|
|
1624
|
-
_handleSubmitError(e, t) {
|
|
1625
|
-
t.message = n("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" }), t.isError = !0, delete t.progress, this._inflightMessage = t, this._upsertMessage(t), this._patchState({
|
|
1626
|
-
inflightMessage: { ...t },
|
|
1627
|
-
progress: null,
|
|
1628
|
-
progressCollapsed: !1
|
|
1629
|
-
}), this._emit("onComplete", {
|
|
1630
|
-
agent: this._config.agent,
|
|
1631
|
-
conversationId: this._state.conversationId,
|
|
1632
|
-
message: t,
|
|
1633
|
-
error: e
|
|
1634
|
-
});
|
|
1635
|
-
}
|
|
1636
|
-
_hasCallback(e) {
|
|
1637
|
-
return typeof this._hostCallbacks[e] == "function" || typeof this._uiBridgeCallbacks[e] == "function";
|
|
1638
|
-
}
|
|
1639
|
-
_emit(e, ...t) {
|
|
1640
|
-
this._invokeCallback(e, ...t);
|
|
1641
|
-
}
|
|
1642
|
-
async _invokeCallback(e, ...t) {
|
|
1643
|
-
let n = this._hostCallbacks[e], r = this._uiBridgeCallbacks[e];
|
|
1644
|
-
typeof n == "function" && await n(...t), typeof r == "function" && await r(...t);
|
|
1645
|
-
}
|
|
1646
|
-
_patchState(e) {
|
|
1647
|
-
this._state = {
|
|
1648
|
-
...this._state,
|
|
1649
|
-
...e
|
|
1650
|
-
}, this._emit("onStateChange", this._state);
|
|
1651
|
-
for (let e of this._subscribers) e(this._state);
|
|
1652
|
-
}
|
|
1653
|
-
_areSelectedDatasetsEqual(e, t) {
|
|
1654
|
-
return e.length === t.length ? e.every((e, n) => e.id === t[n]?.id) : !1;
|
|
1655
|
-
}
|
|
1656
|
-
_areChatMessagesEqual(e, t) {
|
|
1657
|
-
return e.length === t.length ? e.every((e, n) => {
|
|
1658
|
-
let r = t[n];
|
|
1659
|
-
return e.id === r?.id && e.apiMessageId === r?.apiMessageId && e.type === r?.type && e.message === r?.message && e.isError === r?.isError && e.hasChart === r?.hasChart && JSON.stringify(e.progress ?? null) === JSON.stringify(r?.progress ?? null);
|
|
1660
|
-
}) : !1;
|
|
1661
|
-
}
|
|
1662
|
-
};
|
|
1663
|
-
function en(e, t) {
|
|
1664
|
-
return new $t(e, t);
|
|
1665
|
-
}
|
|
1666
|
-
//#endregion
|
|
1667
|
-
//#region src/components/ai-chat/session/ai-chat-session-controller.ts
|
|
1668
|
-
var Z = class {
|
|
1669
|
-
constructor(e) {
|
|
1670
|
-
this.options = e, this._session = null, this._ownsSession = !1, this._seededFromProps = !1, this._unsubscribe = null;
|
|
1671
|
-
}
|
|
1672
|
-
get current() {
|
|
1673
|
-
return this._session;
|
|
1674
|
-
}
|
|
1675
|
-
get state() {
|
|
1676
|
-
if (this._session) return this._session.state;
|
|
1677
|
-
let e = this.options.getSeed();
|
|
1678
|
-
return {
|
|
1679
|
-
messages: e.messages,
|
|
1680
|
-
selectedDatasets: e.selectedDatasets,
|
|
1681
|
-
isGenerating: !1,
|
|
1682
|
-
progress: null,
|
|
1683
|
-
progressCollapsed: !1,
|
|
1684
|
-
conversationId: e.conversationId,
|
|
1685
|
-
inflightMessage: null
|
|
1686
|
-
};
|
|
1687
|
-
}
|
|
1688
|
-
get ownsCurrentSession() {
|
|
1689
|
-
return this._ownsSession;
|
|
1690
|
-
}
|
|
1691
|
-
setSession(e) {
|
|
1692
|
-
if (!e) {
|
|
1693
|
-
this._clearSession();
|
|
1694
|
-
return;
|
|
1695
|
-
}
|
|
1696
|
-
this._ownsSession && this._session !== e && this._session?.abort(), this._ownsSession = !1, this._session = e, e.updateConfig(this.options.getConfig()), this._wire(e);
|
|
1697
|
-
}
|
|
1698
|
-
syncProperties(e) {
|
|
1699
|
-
if (!e.has("chatSession")) {
|
|
1700
|
-
if (this._createSessionIfMissing(), this._session) {
|
|
1701
|
-
let t = this.options.getConfig();
|
|
1702
|
-
Object.keys(t).some((t) => e.has(t)) && this._session.updateConfig(t);
|
|
1703
|
-
}
|
|
1704
|
-
(e.has("messages") || e.has("selectedDatasets")) && this._seedFromPropsOnce();
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
requireSession() {
|
|
1708
|
-
return this._createSessionIfMissing(), this._session.updateConfig(this.options.getConfig()), this._session;
|
|
1709
|
-
}
|
|
1710
|
-
connect() {
|
|
1711
|
-
this._session && this._wire(this._session);
|
|
1712
|
-
}
|
|
1713
|
-
teardown() {
|
|
1714
|
-
this._unwire(), this._ownsSession &&= (this._session?.abort(), this._session = null, !1), this._seededFromProps = !1;
|
|
1715
|
-
}
|
|
1716
|
-
_createSessionIfMissing() {
|
|
1717
|
-
if (this._session) return;
|
|
1718
|
-
let e = this.options.getSeed();
|
|
1719
|
-
this._session = en({
|
|
1720
|
-
...this.options.getConfig(),
|
|
1721
|
-
messages: e.messages.length > 0 ? [...e.messages] : void 0,
|
|
1722
|
-
selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
|
|
1723
|
-
}), this._ownsSession = !0, this._seededFromProps = e.messages.length > 0 || e.selectedDatasets.length > 0, this._wire(this._session);
|
|
1724
|
-
}
|
|
1725
|
-
_clearSession() {
|
|
1726
|
-
this._unwire(), this._ownsSession && this._session?.abort(), this._session = null, this._ownsSession = !1;
|
|
1727
|
-
}
|
|
1728
|
-
_seedFromPropsOnce() {
|
|
1729
|
-
if (!this._ownsSession || this._seededFromProps) return;
|
|
1730
|
-
let e = this.requireSession(), t = this.options.getSeed(), n = {};
|
|
1731
|
-
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);
|
|
1732
|
-
}
|
|
1733
|
-
_wire(e) {
|
|
1734
|
-
this._unwire(), e.setUiBridge(this.options.createDomBridge()), this._unsubscribe = e.subscribe(() => {
|
|
1735
|
-
this.options.onRenderNeeded();
|
|
1736
|
-
});
|
|
1737
|
-
}
|
|
1738
|
-
_unwire() {
|
|
1739
|
-
this._unsubscribe?.(), this._unsubscribe = null;
|
|
1740
|
-
}
|
|
1741
|
-
}, tn = ":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 .assistant-message-wrapper{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-wrapper luzmo-chat-message{width:fit-content;display:contents}: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-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)}", Q = class extends e {
|
|
1742
|
-
constructor(...e) {
|
|
1743
|
-
super(...e), this.messages = [], this.selectedDatasets = [], this.placeholder = "Describe your change", this.disabled = !1, this.stoppable = !1, this.showAssistantContextMenu = !1, this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.flagOpendata = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = null, this.timezoneId = "UTC", this.apiVersion = "0.1.0", this.stream = !0, this.loadingMessage = null, this.initialPrompt = null, this.emptyStateTitle = "", this.emptyStateSubtitle = "", this.emptyStateSuggestions = [], this._textareaValue = "", this._lastProcessedInitialPrompt = null, this._session = new Z({
|
|
1744
|
-
getConfig: () => this._buildSessionConfig(),
|
|
1745
|
-
getSeed: () => ({
|
|
1746
|
-
messages: this.messages,
|
|
1747
|
-
selectedDatasets: this.selectedDatasets,
|
|
1748
|
-
conversationId: this.conversationId
|
|
1749
|
-
}),
|
|
1750
|
-
createDomBridge: () => this._createDomBridgeCallbacks(),
|
|
1751
|
-
onRenderNeeded: () => {
|
|
1752
|
-
this.requestUpdate(), this.updateComplete.then(() => this._scrollToBottom());
|
|
1753
|
-
}
|
|
1754
|
-
});
|
|
1755
|
-
}
|
|
1756
|
-
static {
|
|
1757
|
-
this.styles = c(tn);
|
|
1758
|
-
}
|
|
1759
|
-
static {
|
|
1760
|
-
this.tagName = "luzmo-ai-chat";
|
|
1761
|
-
}
|
|
1762
|
-
get session() {
|
|
1763
|
-
return this._session.current;
|
|
1764
|
-
}
|
|
1765
|
-
_getRenderState() {
|
|
1766
|
-
return this._session.state;
|
|
1767
|
-
}
|
|
1768
|
-
_createDomBridgeCallbacks() {
|
|
1769
|
-
return {
|
|
1770
|
-
onMessageSent: (e, t) => {
|
|
1771
|
-
this.dispatchEvent(new CustomEvent("luzmo-message-sent", {
|
|
1772
|
-
detail: {
|
|
1773
|
-
message: e,
|
|
1774
|
-
selectedDatasets: t
|
|
1775
|
-
},
|
|
1776
|
-
bubbles: !0,
|
|
1777
|
-
composed: !0
|
|
1778
|
-
}));
|
|
1779
|
-
},
|
|
1780
|
-
onDatasetsChanged: (e) => {
|
|
1781
|
-
this.dispatchEvent(new CustomEvent("luzmo-datasets-changed", {
|
|
1782
|
-
detail: { selectedDatasets: e },
|
|
1783
|
-
bubbles: !0,
|
|
1784
|
-
composed: !0
|
|
1785
|
-
}));
|
|
1786
|
-
},
|
|
1787
|
-
onConversationIdChange: (e) => this._emitConversationIdChanged(e),
|
|
1788
|
-
onStep: (e) => {
|
|
1789
|
-
this.dispatchEvent(new CustomEvent("luzmo-step", {
|
|
1790
|
-
detail: e,
|
|
1791
|
-
bubbles: !0,
|
|
1792
|
-
composed: !0
|
|
1793
|
-
}));
|
|
1794
|
-
},
|
|
1795
|
-
onComplete: (e) => {
|
|
1796
|
-
this.dispatchEvent(new CustomEvent("luzmo-complete", {
|
|
1797
|
-
detail: e,
|
|
1798
|
-
bubbles: !0,
|
|
1799
|
-
composed: !0
|
|
1800
|
-
}));
|
|
1801
|
-
},
|
|
1802
|
-
onPromptStopped: () => {
|
|
1803
|
-
this.dispatchEvent(new CustomEvent("luzmo-stop", {
|
|
1804
|
-
bubbles: !0,
|
|
1805
|
-
composed: !0
|
|
1806
|
-
}));
|
|
1807
|
-
}
|
|
1808
|
-
};
|
|
1809
|
-
}
|
|
1810
|
-
_buildSessionConfig() {
|
|
1811
|
-
return {
|
|
1812
|
-
agent: this.agent,
|
|
1813
|
-
authKey: this.authKey,
|
|
1814
|
-
authToken: this.authToken,
|
|
1815
|
-
apiUrl: this.apiUrl,
|
|
1816
|
-
apiVersion: this.apiVersion,
|
|
1817
|
-
stream: this.stream,
|
|
1818
|
-
conversationId: this.conversationId,
|
|
1819
|
-
chart: this.chart,
|
|
1820
|
-
dashboard: this.dashboard,
|
|
1821
|
-
currentScreenMode: this.currentScreenMode,
|
|
1822
|
-
localeId: this.localeId,
|
|
1823
|
-
timezoneId: this.timezoneId,
|
|
1824
|
-
task: this.task,
|
|
1825
|
-
modelPreference: this.modelPreference,
|
|
1826
|
-
requireDataset: this.requireDataset
|
|
1827
|
-
};
|
|
1828
|
-
}
|
|
1829
|
-
_emitConversationIdChanged(e) {
|
|
1830
|
-
this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
|
|
1831
|
-
detail: { conversationId: e },
|
|
1832
|
-
bubbles: !0,
|
|
1833
|
-
composed: !0
|
|
1834
|
-
}));
|
|
1835
|
-
}
|
|
1836
|
-
async _restoreViaSession(e, t) {
|
|
1837
|
-
await this._session.requireSession().restore({
|
|
1838
|
-
restoreToMessageId: e,
|
|
1839
|
-
messageIndex: t
|
|
1840
|
-
});
|
|
1841
|
-
}
|
|
1842
|
-
async _handleRestoreState(e, t) {
|
|
1843
|
-
if (e.apiMessageId && this.agent === "item") try {
|
|
1844
|
-
await this._restoreViaSession(e.apiMessageId, t);
|
|
1845
|
-
} catch (e) {
|
|
1846
|
-
console.error("AI restore error:", e);
|
|
1847
|
-
}
|
|
1848
|
-
}
|
|
1849
|
-
_handleDatasetSelected(e) {
|
|
1850
|
-
this._session.requireSession().addDataset(e.detail);
|
|
1851
|
-
}
|
|
1852
|
-
_handleDatasetRemoved(e) {
|
|
1853
|
-
this._session.requireSession().removeDataset(e.detail.id);
|
|
1854
|
-
}
|
|
1855
|
-
async _submitViaSession(e, t = {}) {
|
|
1856
|
-
let n = this._session.requireSession();
|
|
1857
|
-
if (n.isDatasetRequirementMet()) {
|
|
1858
|
-
this._textareaValue = "";
|
|
1859
|
-
try {
|
|
1860
|
-
await n.submit({
|
|
1861
|
-
prompt: e,
|
|
1862
|
-
...t
|
|
1863
|
-
});
|
|
1864
|
-
} catch (e) {
|
|
1865
|
-
e.name !== "AbortError" && console.error("AI prompt session error:", e);
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
async _handlePromptSubmitted(e) {
|
|
1870
|
-
await this._submitViaSession(e.detail.prompt);
|
|
1871
|
-
}
|
|
1872
|
-
_handlePromptStopped() {
|
|
1873
|
-
let e = this._session.current;
|
|
1874
|
-
if (this._textareaValue = "", e) {
|
|
1875
|
-
e.abort({ notify: !0 });
|
|
1876
|
-
return;
|
|
1877
|
-
}
|
|
1878
|
-
this.dispatchEvent(new CustomEvent("luzmo-stop", {
|
|
1879
|
-
bubbles: !0,
|
|
1880
|
-
composed: !0
|
|
1881
|
-
}));
|
|
1882
|
-
}
|
|
1883
|
-
async _handleEmptyStateSuggestionSelected(e) {
|
|
1884
|
-
let { prompt: t, selectedDatasets: n } = e.detail, r = this._session.requireSession();
|
|
1885
|
-
n?.length && r.setSelectedDatasets(n), await this._submitViaSession(t);
|
|
1886
|
-
}
|
|
1887
|
-
async _processInitialPrompt() {
|
|
1888
|
-
!this.initialPrompt || this.initialPrompt === this._lastProcessedInitialPrompt || this._session.requireSession().isDatasetRequirementMet() && (this._lastProcessedInitialPrompt = this.initialPrompt, await this._submitViaSession(this.initialPrompt, { skipUserMessage: !0 }));
|
|
1889
|
-
}
|
|
1890
|
-
connectedCallback() {
|
|
1891
|
-
super.connectedCallback(), this._session.connect();
|
|
1892
|
-
}
|
|
1893
|
-
disconnectedCallback() {
|
|
1894
|
-
super.disconnectedCallback(), this._session.teardown();
|
|
1895
|
-
}
|
|
1896
|
-
_scrollToBottom() {
|
|
1897
|
-
let e = this.shadowRoot?.querySelector(".chat-messages-container");
|
|
1898
|
-
e && requestAnimationFrame(() => {
|
|
1899
|
-
requestAnimationFrame(() => {
|
|
1900
|
-
e.scrollTop = e.scrollHeight;
|
|
1901
|
-
});
|
|
1902
|
-
});
|
|
1903
|
-
}
|
|
1904
|
-
updated(e) {
|
|
1905
|
-
super.updated?.(e), this._syncSession(e), this._handleInitialPromptChange();
|
|
1906
|
-
}
|
|
1907
|
-
_syncSession(e) {
|
|
1908
|
-
if (e.has("chatSession")) {
|
|
1909
|
-
this._session.setSession(this.chatSession);
|
|
1910
|
-
return;
|
|
1911
|
-
}
|
|
1912
|
-
this._session.syncProperties(e);
|
|
1913
|
-
}
|
|
1914
|
-
_handleInitialPromptChange() {
|
|
1915
|
-
this.initialPrompt && this.initialPrompt !== this._lastProcessedInitialPrompt ? this._processInitialPrompt() : this.initialPrompt || (this._lastProcessedInitialPrompt = null);
|
|
1916
|
-
}
|
|
1917
|
-
_sanitizeMessage(e) {
|
|
1918
|
-
return nt.sanitize(e, {
|
|
1919
|
-
ALLOWED_TAGS: [
|
|
1920
|
-
"p",
|
|
1921
|
-
"br",
|
|
1922
|
-
"strong",
|
|
1923
|
-
"em",
|
|
1924
|
-
"b",
|
|
1925
|
-
"i",
|
|
1926
|
-
"u",
|
|
1927
|
-
"s",
|
|
1928
|
-
"code",
|
|
1929
|
-
"pre",
|
|
1930
|
-
"blockquote",
|
|
1931
|
-
"ul",
|
|
1932
|
-
"ol",
|
|
1933
|
-
"li",
|
|
1934
|
-
"a"
|
|
1935
|
-
],
|
|
1936
|
-
ALLOWED_ATTR: [
|
|
1937
|
-
"href",
|
|
1938
|
-
"title",
|
|
1939
|
-
"target",
|
|
1940
|
-
"rel"
|
|
1941
|
-
],
|
|
1942
|
-
ALLOW_DATA_ATTR: !1,
|
|
1943
|
-
FORBID_TAGS: [
|
|
1944
|
-
"script",
|
|
1945
|
-
"iframe",
|
|
1946
|
-
"object",
|
|
1947
|
-
"embed",
|
|
1948
|
-
"form",
|
|
1949
|
-
"input",
|
|
1950
|
-
"button"
|
|
1951
|
-
],
|
|
1952
|
-
FORBID_ATTR: [
|
|
1953
|
-
"onerror",
|
|
1954
|
-
"onload",
|
|
1955
|
-
"onclick",
|
|
1956
|
-
"onmouseover",
|
|
1957
|
-
"onfocus",
|
|
1958
|
-
"onblur"
|
|
1959
|
-
]
|
|
1960
|
-
});
|
|
1961
|
-
}
|
|
1962
|
-
_renderProgress() {
|
|
1963
|
-
let { progress: e, progressCollapsed: t } = this._getRenderState();
|
|
1964
|
-
return e?.children?.length ? o`
|
|
1965
|
-
<luzmo-progress-steps
|
|
1966
|
-
.progress=${e}
|
|
1967
|
-
?collapsed=${t}
|
|
1968
|
-
size="s"
|
|
1969
|
-
></luzmo-progress-steps>
|
|
1970
|
-
` : s;
|
|
1971
|
-
}
|
|
1972
|
-
_isLastAiMessageWithProgress(e, t) {
|
|
1973
|
-
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;
|
|
1974
|
-
return !1;
|
|
1975
|
-
}
|
|
1976
|
-
_renderRestoreMenu(e, t, a, c = !1) {
|
|
1977
|
-
if (!(this.agent === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== a)) return s;
|
|
1978
|
-
let l = `context-menu-trigger-${e.apiMessageId}`;
|
|
1979
|
-
return o`
|
|
1980
|
-
<div class="assistant-context-menu">
|
|
1981
|
-
<button
|
|
1982
|
-
id=${l}
|
|
1983
|
-
class="assistant-context-menu-trigger"
|
|
1984
|
-
type="button"
|
|
1985
|
-
aria-label=${n("Open restore menu", { desc: "Accessible label for the ai chat restore menu trigger" })}
|
|
1986
|
-
aria-haspopup="menu"
|
|
1987
|
-
?disabled=${c}
|
|
1988
|
-
>
|
|
1989
|
-
${i(r)}
|
|
1990
|
-
</button>
|
|
1991
|
-
<luzmo-overlay
|
|
1992
|
-
trigger="${l}@click"
|
|
1993
|
-
placement="bottom-end"
|
|
1994
|
-
>
|
|
1995
|
-
<luzmo-popover>
|
|
1996
|
-
<button
|
|
1997
|
-
class="assistant-context-menu-item"
|
|
1998
|
-
type="button"
|
|
1999
|
-
?disabled=${c}
|
|
2000
|
-
@click=${() => this._handleRestoreState(e, t)}
|
|
2001
|
-
>
|
|
2002
|
-
${n("Restore state", { desc: "Context menu action that restores the chart to this message state" })}
|
|
2003
|
-
</button>
|
|
2004
|
-
</luzmo-popover>
|
|
2005
|
-
</luzmo-overlay>
|
|
2006
|
-
</div>
|
|
2007
|
-
`;
|
|
2008
|
-
}
|
|
2009
|
-
_renderMessages() {
|
|
2010
|
-
let { messages: e, inflightMessage: t, isGenerating: n } = this._getRenderState(), r = t !== null, i = [...e].reverse().find((e) => e.type === "ai")?.id, a = e.filter((e) => !t || e.id !== t.id);
|
|
2011
|
-
return a.map((t) => {
|
|
2012
|
-
let c = !!t.progress?.children?.length, l = c && this._isLastAiMessageWithProgress(t, a), u = c && (r || n || !l), ee = c ? o`
|
|
2013
|
-
<luzmo-progress-steps
|
|
2014
|
-
.progress=${t.progress}
|
|
2015
|
-
?condensed=${u}
|
|
2016
|
-
collapsed
|
|
2017
|
-
no-animate
|
|
2018
|
-
size="s"
|
|
2019
|
-
></luzmo-progress-steps>
|
|
2020
|
-
` : s;
|
|
2021
|
-
if (t.type === "user") return o`
|
|
2022
|
-
<luzmo-chat-message
|
|
2023
|
-
avatar-placement="bottom"
|
|
2024
|
-
position="right"
|
|
2025
|
-
variant="primary"
|
|
2026
|
-
size="s"
|
|
2027
|
-
>
|
|
2028
|
-
${t.message}
|
|
2029
|
-
</luzmo-chat-message>
|
|
2030
|
-
`;
|
|
2031
|
-
let te = e.indexOf(t);
|
|
2032
|
-
return o`
|
|
2033
|
-
${ee}
|
|
2034
|
-
<div class="assistant-message-wrapper">
|
|
2035
|
-
<luzmo-chat-message
|
|
2036
|
-
class=${t.isError ? "error" : ""}
|
|
2037
|
-
role=${t.isError ? "alert" : s}
|
|
2038
|
-
avatar-placement="bottom"
|
|
2039
|
-
position="left"
|
|
2040
|
-
quiet
|
|
2041
|
-
size="s"
|
|
2042
|
-
>
|
|
2043
|
-
${d(this._sanitizeMessage(t.message))}
|
|
2044
|
-
</luzmo-chat-message>
|
|
2045
|
-
|
|
2046
|
-
${this._renderRestoreMenu(t, te, i, r)}
|
|
2047
|
-
</div>
|
|
2048
|
-
`;
|
|
2049
|
-
});
|
|
2050
|
-
}
|
|
2051
|
-
_renderStreamingResponse() {
|
|
2052
|
-
let { inflightMessage: e } = this._getRenderState();
|
|
2053
|
-
return e?.message ? o`
|
|
2054
|
-
<luzmo-chat-message
|
|
2055
|
-
avatar-placement="bottom"
|
|
2056
|
-
position="left"
|
|
2057
|
-
quiet
|
|
2058
|
-
size="s"
|
|
2059
|
-
>
|
|
2060
|
-
${d(this._sanitizeMessage(e.message))}
|
|
2061
|
-
</luzmo-chat-message>
|
|
2062
|
-
` : s;
|
|
2063
|
-
}
|
|
2064
|
-
_renderLoadingMessage() {
|
|
2065
|
-
let { isGenerating: e, progress: t, inflightMessage: r } = this._getRenderState();
|
|
2066
|
-
if (!e || t?.children?.length || r?.message) return s;
|
|
2067
|
-
let c = this.agent === "dashboard" ? !this.dashboard : this.chart?.type === "placeholder", l = this.agent === "dashboard" ? c ? n("Creating dashboard...", { desc: "Label for ai chat creating dashboard message" }) : n("Updating dashboard...", { desc: "Label for ai chat updating dashboard message" }) : c ? n("Creating item...", { desc: "Label for ai chat creating item message" }) : n("Updating item...", { desc: "Label for ai chat updating item message" });
|
|
2068
|
-
return o`
|
|
2069
|
-
<luzmo-chat-message
|
|
2070
|
-
avatar-placement="bottom"
|
|
2071
|
-
position="left"
|
|
2072
|
-
quiet
|
|
2073
|
-
size="s"
|
|
2074
|
-
>
|
|
2075
|
-
<div class="loading-message" role="status" aria-live="polite">
|
|
2076
|
-
<span class="icon-lg">${i(a, { className: "spin" })}</span>
|
|
2077
|
-
<span class="loading-message-text">${this.loadingMessage || l}</span>
|
|
2078
|
-
</div>
|
|
2079
|
-
</luzmo-chat-message>
|
|
2080
|
-
`;
|
|
2081
|
-
}
|
|
2082
|
-
_renderEmptyState() {
|
|
2083
|
-
if (this._getRenderState().messages.length > 0) return s;
|
|
2084
|
-
let e = n("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
|
|
2085
|
-
return o`
|
|
2086
|
-
<luzmo-ai-chat-empty-state
|
|
2087
|
-
.title=${this.emptyStateTitle || e}
|
|
2088
|
-
.subtitle=${t ? this.emptyStateSubtitle : ""}
|
|
2089
|
-
.suggestions=${this.emptyStateSuggestions}
|
|
2090
|
-
?disabled=${this.disabled || this._getRenderState().isGenerating}
|
|
2091
|
-
@luzmo-suggestion-selected=${this._handleEmptyStateSuggestionSelected}
|
|
2092
|
-
></luzmo-ai-chat-empty-state>
|
|
2093
|
-
`;
|
|
2094
|
-
}
|
|
2095
|
-
render() {
|
|
2096
|
-
let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
|
|
2097
|
-
return o`
|
|
2098
|
-
<div class="chat-container" role="region" aria-label=${n("AI Chat", { desc: "Accessible label for AI chat region" })}>
|
|
2099
|
-
<div class="chat-messages-container" role="log" aria-live="polite">
|
|
2100
|
-
${this._renderEmptyState()}
|
|
2101
|
-
${this._renderMessages()}
|
|
2102
|
-
${this._renderProgress()}
|
|
2103
|
-
${this._renderStreamingResponse()}
|
|
2104
|
-
${this._renderLoadingMessage()}
|
|
2105
|
-
</div>
|
|
2106
|
-
|
|
2107
|
-
<luzmo-ai-interaction-textarea
|
|
2108
|
-
role="group"
|
|
2109
|
-
aria-label=${n("AI prompt input", { desc: "Accessible label for the ai chat prompt input area" })}
|
|
2110
|
-
.value=${this._textareaValue}
|
|
2111
|
-
.selectedDatasets=${e}
|
|
2112
|
-
.placeholder=${this.placeholder}
|
|
2113
|
-
?disabled=${this.disabled}
|
|
2114
|
-
?is-generating=${t}
|
|
2115
|
-
?stoppable=${this.stoppable}
|
|
2116
|
-
?hide-dataset-button=${this.hideDatasetButton}
|
|
2117
|
-
?hide-dataset-icons=${this.hideDatasetIcons}
|
|
2118
|
-
?disable-dataset-modification=${this.disableDatasetModification}
|
|
2119
|
-
?hide-selected-datasets=${this.hideSelectedDatasets}
|
|
2120
|
-
?disable-column-mentions=${this.disableColumnMentions}
|
|
2121
|
-
?require-dataset=${this.requireDataset}
|
|
2122
|
-
auth-key=${this.authKey}
|
|
2123
|
-
auth-token=${this.authToken}
|
|
2124
|
-
api-url=${this.apiUrl}
|
|
2125
|
-
app-server=${this.appServer}
|
|
2126
|
-
?flag-opendata=${this.flagOpendata}
|
|
2127
|
-
@prompt-submitted=${this._handlePromptSubmitted}
|
|
2128
|
-
@prompt-stopped=${this._handlePromptStopped}
|
|
2129
|
-
@dataset-selected=${this._handleDatasetSelected}
|
|
2130
|
-
@dataset-removed=${this._handleDatasetRemoved}
|
|
2131
|
-
></luzmo-ai-interaction-textarea>
|
|
2132
|
-
</div>
|
|
2133
|
-
`;
|
|
2134
|
-
}
|
|
2135
|
-
};
|
|
2136
|
-
t([l({ type: Array })], Q.prototype, "messages", void 0), t([l({
|
|
2137
|
-
type: Array,
|
|
2138
|
-
attribute: "selected-datasets"
|
|
2139
|
-
})], Q.prototype, "selectedDatasets", void 0), t([l({ type: String })], Q.prototype, "placeholder", void 0), t([l({
|
|
2140
|
-
type: Boolean,
|
|
2141
|
-
reflect: !0
|
|
2142
|
-
})], Q.prototype, "disabled", void 0), t([l({
|
|
2143
|
-
type: Boolean,
|
|
2144
|
-
reflect: !0
|
|
2145
|
-
})], Q.prototype, "stoppable", void 0), t([l({
|
|
2146
|
-
type: Boolean,
|
|
2147
|
-
attribute: "show-assistant-context-menu"
|
|
2148
|
-
})], Q.prototype, "showAssistantContextMenu", void 0), t([l({
|
|
2149
|
-
type: String,
|
|
2150
|
-
attribute: "auth-key"
|
|
2151
|
-
})], Q.prototype, "authKey", void 0), t([l({
|
|
2152
|
-
type: String,
|
|
2153
|
-
attribute: "auth-token"
|
|
2154
|
-
})], Q.prototype, "authToken", void 0), t([l({
|
|
2155
|
-
type: String,
|
|
2156
|
-
attribute: "api-url"
|
|
2157
|
-
})], Q.prototype, "apiUrl", void 0), t([l({
|
|
2158
|
-
type: String,
|
|
2159
|
-
attribute: "app-server"
|
|
2160
|
-
})], Q.prototype, "appServer", void 0), t([l({
|
|
2161
|
-
type: Boolean,
|
|
2162
|
-
attribute: "flag-opendata"
|
|
2163
|
-
})], Q.prototype, "flagOpendata", void 0), t([l({
|
|
2164
|
-
type: Boolean,
|
|
2165
|
-
attribute: "hide-dataset-button"
|
|
2166
|
-
})], Q.prototype, "hideDatasetButton", void 0), t([l({
|
|
2167
|
-
type: Boolean,
|
|
2168
|
-
attribute: "hide-dataset-icons"
|
|
2169
|
-
})], Q.prototype, "hideDatasetIcons", void 0), t([l({
|
|
2170
|
-
type: Boolean,
|
|
2171
|
-
attribute: "disable-dataset-modification"
|
|
2172
|
-
})], Q.prototype, "disableDatasetModification", void 0), t([l({
|
|
2173
|
-
type: Boolean,
|
|
2174
|
-
attribute: "hide-selected-datasets"
|
|
2175
|
-
})], Q.prototype, "hideSelectedDatasets", void 0), t([l({
|
|
2176
|
-
type: Boolean,
|
|
2177
|
-
attribute: "disable-column-mentions"
|
|
2178
|
-
})], Q.prototype, "disableColumnMentions", void 0), t([l({
|
|
2179
|
-
type: Boolean,
|
|
2180
|
-
attribute: "require-dataset"
|
|
2181
|
-
})], Q.prototype, "requireDataset", void 0), t([l({ type: String })], Q.prototype, "agent", void 0), t([l({ type: String })], Q.prototype, "task", void 0), t([l({
|
|
2182
|
-
type: String,
|
|
2183
|
-
attribute: "model-preference"
|
|
2184
|
-
})], Q.prototype, "modelPreference", void 0), t([l({ attribute: !1 })], Q.prototype, "chatSession", void 0), t([l({
|
|
2185
|
-
type: String,
|
|
2186
|
-
attribute: "conversation-id"
|
|
2187
|
-
})], Q.prototype, "conversationId", void 0), t([l({
|
|
2188
|
-
type: Object,
|
|
2189
|
-
attribute: "chart"
|
|
2190
|
-
})], Q.prototype, "chart", void 0), t([l({ type: Object })], Q.prototype, "dashboard", void 0), t([l({
|
|
2191
|
-
type: String,
|
|
2192
|
-
attribute: "current-screen-mode"
|
|
2193
|
-
})], Q.prototype, "currentScreenMode", void 0), t([l({
|
|
2194
|
-
type: String,
|
|
2195
|
-
attribute: "locale-id"
|
|
2196
|
-
})], Q.prototype, "localeId", void 0), t([l({
|
|
2197
|
-
type: String,
|
|
2198
|
-
attribute: "timezone-id"
|
|
2199
|
-
})], Q.prototype, "timezoneId", void 0), t([l({
|
|
2200
|
-
type: String,
|
|
2201
|
-
attribute: "api-version"
|
|
2202
|
-
})], Q.prototype, "apiVersion", void 0), t([l({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], Q.prototype, "stream", void 0), t([l({
|
|
2203
|
-
type: String,
|
|
2204
|
-
attribute: "loading-message"
|
|
2205
|
-
})], Q.prototype, "loadingMessage", void 0), t([l({
|
|
2206
|
-
type: String,
|
|
2207
|
-
attribute: "initial-prompt"
|
|
2208
|
-
})], Q.prototype, "initialPrompt", void 0), t([l({
|
|
2209
|
-
type: String,
|
|
2210
|
-
attribute: "empty-state-title"
|
|
2211
|
-
})], Q.prototype, "emptyStateTitle", void 0), t([l({
|
|
2212
|
-
type: String,
|
|
2213
|
-
attribute: "empty-state-subtitle"
|
|
2214
|
-
})], Q.prototype, "emptyStateSubtitle", void 0), t([l({
|
|
2215
|
-
type: Array,
|
|
2216
|
-
attribute: !1
|
|
2217
|
-
})], Q.prototype, "emptyStateSuggestions", void 0), t([u()], Q.prototype, "_textareaValue", void 0);
|
|
2218
|
-
//#endregion
|
|
2219
|
-
//#region src/components/ai-chat/ai-chat-events.ts
|
|
2220
|
-
function nn(e) {
|
|
2221
|
-
return e.recognized === !0;
|
|
2222
|
-
}
|
|
2223
|
-
//#endregion
|
|
2224
|
-
//#region src/components/ai-chat/index.ts
|
|
2225
|
-
customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", Q);
|
|
2226
|
-
//#endregion
|
|
2227
|
-
export { it as C, st as S, M as T, ft as _, en as a, lt as b, Yt as c, H as d, I as f, mt as g, pt as h, $t as i, Jt as l, P as m, Q as n, Zt as o, L as p, Z as r, Xt as s, nn as t, z as u, ut as v, N as w, ct as x, dt as y };
|