@luzmo/analytics-components-kit 1.3.0 → 2.0.0
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/README.md +18 -5
- package/angular/components/add-to-dashboard.ts +20 -6
- package/angular/components/ai-chat-empty-state.ts +1 -1
- package/angular/components/ai-chat.ts +10 -3
- package/angular/components/data-fields-select.ts +5 -0
- package/angular/components/display-settings-period-over-period.ts +25 -4
- package/angular/components/display-settings.ts +24 -3
- package/angular/components/interactive-viz-item.ts +87 -22
- package/angular/components/item-grid-item-actions-menu.ts +5 -0
- package/angular/components/item-grid.ts +7 -0
- package/angular/components/item-option-color-picker.ts +28 -28
- package/angular/components/item-option-guidelines.ts +22 -1
- package/angular/components/item-option-multi-language-field.ts +7 -7
- package/angular/components/item-option-number-field.ts +14 -14
- package/angular/components/item-option-positions-number-field.ts +14 -14
- package/angular/components/item-option-radio-button-group.ts +7 -7
- package/angular/components/item-option-text-field.ts +7 -7
- package/angular/components/item-slot-drop-panel.ts +7 -0
- package/angular/components/item-slot-drop.ts +7 -0
- package/angular/components/item-slot-picker-panel.ts +8 -1
- package/angular/components/item-slot-picker.ts +22 -8
- package/angular/components/slot-menu.ts +15 -1
- package/angular/esm/components/add-to-dashboard.d.ts +8 -4
- package/angular/esm/components/add-to-dashboard.js +23 -7
- package/angular/esm/components/ai-chat-empty-state.d.ts +1 -1
- package/angular/esm/components/ai-chat.d.ts +6 -4
- package/angular/esm/components/ai-chat.js +10 -2
- package/angular/esm/components/data-fields-select.d.ts +2 -0
- package/angular/esm/components/data-fields-select.js +4 -0
- package/angular/esm/components/display-settings-period-over-period.d.ts +12 -5
- package/angular/esm/components/display-settings-period-over-period.js +29 -5
- package/angular/esm/components/display-settings.d.ts +11 -4
- package/angular/esm/components/display-settings.js +28 -4
- package/angular/esm/components/interactive-viz-item.d.ts +30 -9
- package/angular/esm/components/interactive-viz-item.js +98 -27
- package/angular/esm/components/item-grid-item-actions-menu.d.ts +2 -0
- package/angular/esm/components/item-grid-item-actions-menu.js +4 -0
- package/angular/esm/components/item-grid.d.ts +3 -1
- package/angular/esm/components/item-grid.js +9 -1
- package/angular/esm/components/item-option-color-picker.d.ts +10 -10
- package/angular/esm/components/item-option-color-picker.js +34 -34
- package/angular/esm/components/item-option-guidelines.d.ts +8 -2
- package/angular/esm/components/item-option-guidelines.js +26 -2
- package/angular/esm/components/item-option-multi-language-field.d.ts +3 -3
- package/angular/esm/components/item-option-multi-language-field.js +10 -10
- package/angular/esm/components/item-option-number-field.d.ts +5 -5
- package/angular/esm/components/item-option-number-field.js +18 -18
- package/angular/esm/components/item-option-positions-number-field.d.ts +5 -5
- package/angular/esm/components/item-option-positions-number-field.js +18 -18
- package/angular/esm/components/item-option-radio-button-group.d.ts +3 -3
- package/angular/esm/components/item-option-radio-button-group.js +10 -10
- package/angular/esm/components/item-option-text-field.d.ts +3 -3
- package/angular/esm/components/item-option-text-field.js +10 -10
- package/angular/esm/components/item-slot-drop-panel.d.ts +4 -1
- package/angular/esm/components/item-slot-drop-panel.js +10 -2
- package/angular/esm/components/item-slot-drop.d.ts +4 -1
- package/angular/esm/components/item-slot-drop.js +10 -2
- package/angular/esm/components/item-slot-picker-panel.d.ts +5 -2
- package/angular/esm/components/item-slot-picker-panel.js +11 -3
- package/angular/esm/components/item-slot-picker.d.ts +9 -4
- package/angular/esm/components/item-slot-picker.js +26 -10
- package/angular/esm/components/slot-menu.d.ts +7 -2
- package/angular/esm/components/slot-menu.js +18 -2
- package/angular/package.json +2 -2
- package/angular/utils/filters/expressions.d.ts +2 -0
- package/angular/utils/slot-state/slot-store.d.ts +3 -8
- package/angular/utils/time/period-over-period-condition.const.d.ts +0 -1
- package/angular/utils/time/period-over-period-context.d.ts +75 -0
- package/angular/utils/time/tests/period-over-period-context.test.d.ts +1 -0
- package/components/add-to-dashboard/dashboard-actions.d.ts +2 -1
- package/components/add-to-dashboard/index.cjs +1 -1
- package/components/add-to-dashboard/index.js +1 -1
- package/components/{add-to-dashboard-DGC0_hRB.js → add-to-dashboard-B5egTFre.js} +127 -122
- package/components/{add-to-dashboard-CzIuDtAq.cjs → add-to-dashboard-BC5SObl9.cjs} +1 -1
- package/components/advanced-options.i18n-CyfRP6Jc.js +43 -0
- package/components/advanced-options.i18n-DPTCLyPj.cjs +20 -0
- package/components/ai-chat/ai-chat-events.d.ts +6 -2
- package/components/ai-chat/ai-chat-request.d.ts +1 -1
- package/components/ai-chat/ai-chat.d.ts +9 -2
- package/components/ai-chat/ai-prompt-types.d.ts +19 -1
- package/components/ai-chat/helpers/interaction-assets.d.ts +9 -0
- package/components/ai-chat/helpers/question-template.d.ts +13 -0
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.d.ts +2 -1
- package/components/ai-chat/index.js +3 -3
- package/components/ai-chat/session/ai-chat-session-types.d.ts +6 -1
- package/components/ai-chat/session/ai-chat-session.d.ts +14 -3
- package/components/{ai-chat-CL894viH.js → ai-chat-CZz60W04.js} +1152 -837
- package/components/ai-chat-CkN95EAz.cjs +414 -0
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +1 -1
- package/components/{ai-interaction-textarea-BmvVVCmL.cjs → ai-interaction-textarea-NGtzhkEU.cjs} +1 -1
- package/components/{ai-interaction-textarea-CnQ2FBc7.js → ai-interaction-textarea-zpSYvzWC.js} +4 -4
- package/components/{area-chart-options.config-D99tvt_H.cjs → area-chart-options.config-DkaWRgGR.cjs} +1 -1
- package/components/{area-chart-options.config-Dnw8v2CA.js → area-chart-options.config-E5T5GaAt.js} +3 -3
- package/components/{area-chart-positioning.config-ygE3-JQW.js → area-chart-positioning.config-CF5TQdQM.js} +1 -1
- package/components/{area-chart-positioning.config-BwEs73dl.cjs → area-chart-positioning.config-D3v03RF2.cjs} +1 -1
- package/components/{bar-chart-options.config-DHO8grQN.js → bar-chart-options.config-BmuNCcVu.js} +3 -3
- package/components/{bar-chart-options.config-BQ-PbucR.cjs → bar-chart-options.config-DujzIJ03.cjs} +1 -1
- package/components/{bar-chart-positioning.config-CPdIIPp0.cjs → bar-chart-positioning.config-B2cBwfjg.cjs} +1 -1
- package/components/{bar-chart-positioning.config-GjqSe7CO.js → bar-chart-positioning.config-DD3FsbpL.js} +1 -1
- package/components/{base-rAte-QzM.js → base-BqwRKT4V.js} +1 -1
- package/components/{base-CGDNY_7v.cjs → base-D-bJhYbS.cjs} +1 -1
- package/components/{box-plot-options.config-BgiiwSrU.js → box-plot-options.config-BldiKc1W.js} +1 -1
- package/components/{box-plot-options.config-BcGisybi.cjs → box-plot-options.config-CTHQiE0y.cjs} +1 -1
- package/components/{box-plot-positioning.config-DDUgau2U.js → box-plot-positioning.config-D7dak0lQ.js} +1 -1
- package/components/{box-plot-positioning.config-mSIgw923.cjs → box-plot-positioning.config-DyDjp1GB.cjs} +1 -1
- package/components/{bubble-chart-options.config-DMk8Yjfk.cjs → bubble-chart-options.config-CIQV2-nD.cjs} +1 -1
- package/components/{bubble-chart-options.config-UM9w5tBs.js → bubble-chart-options.config-DfUueHwL.js} +1 -1
- package/components/{bubble-chart-positioning.config-CuOxvXYf.cjs → bubble-chart-positioning.config-CBVdzO-2.cjs} +1 -1
- package/components/{bubble-chart-positioning.config-C3UubNLh.js → bubble-chart-positioning.config-DjYnqcoE.js} +1 -1
- package/components/{bullet-chart-positioning.config-DB1Fmx1d.cjs → bullet-chart-positioning.config-B1tyFrKD.cjs} +1 -1
- package/components/{bullet-chart-positioning.config-BuFhsRMP.js → bullet-chart-positioning.config-C1Fy_8N4.js} +1 -1
- package/components/chart-helpers-BHxQbLBw.cjs +20 -0
- package/components/{chart-helpers-Cbl3sRra.js → chart-helpers-BKeMLhov.js} +51 -38
- package/components/{choropleth-map-options.config-Blu0Z2tR.js → choropleth-map-options.config-BPwJyWoW.js} +1 -1
- package/components/{choropleth-map-options.config-DwFJ00CS.cjs → choropleth-map-options.config-mBZ3__hO.cjs} +1 -1
- package/components/{choropleth-map-positioning.config-6PsCyhsn.js → choropleth-map-positioning.config-BJ4TNZiP.js} +1 -1
- package/components/{choropleth-map-positioning.config-fc5IcNoB.cjs → choropleth-map-positioning.config-DaN1GsN7.cjs} +1 -1
- package/components/{circle-pack-chart-options.config-DQs-uitJ.js → circle-pack-chart-options.config-BbTBvJRt.js} +1 -1
- package/components/{circle-pack-chart-options.config-DMNMYWZX.cjs → circle-pack-chart-options.config-Cz9c2Oxt.cjs} +1 -1
- package/components/{circle-pack-chart-positioning.config-DvQfzJ_Z.cjs → circle-pack-chart-positioning.config-C0iRGjcn.cjs} +1 -1
- package/components/{circle-pack-chart-positioning.config-DRHNE10H.js → circle-pack-chart-positioning.config-sm_d4gNL.js} +1 -1
- package/components/{circular-gauge-positioning.config-CGOX-Vyn.js → circular-gauge-positioning.config-CP_Ihfyd.js} +1 -1
- package/components/{circular-gauge-positioning.config-OX1-mPls.cjs → circular-gauge-positioning.config-GgkU8ivx.cjs} +1 -1
- package/components/{column-chart-options.config-BYDJTVx6.js → column-chart-options.config-BoIqFqBu.js} +3 -3
- package/components/{column-chart-options.config-CyD8V7j4.cjs → column-chart-options.config-fsV6tk3-.cjs} +1 -1
- package/components/{column-chart-positioning.config-BVYa1A42.js → column-chart-positioning.config-B4OsEyKU.js} +1 -1
- package/components/{column-chart-positioning.config-NbQbSa8P.cjs → column-chart-positioning.config-oub804lP.cjs} +1 -1
- package/components/{combination-chart-options.config-Cg3ZEKMe.cjs → combination-chart-options.config-C_fwwZvd.cjs} +1 -1
- package/components/{combination-chart-options.config-B3zsSUFx.js → combination-chart-options.config-Oks0enDz.js} +3 -3
- package/components/{combination-chart-positioning.config-B7DtfzCV.cjs → combination-chart-positioning.config-BeEC_NMJ.cjs} +1 -1
- package/components/{combination-chart-positioning.config-yHAgveni.js → combination-chart-positioning.config-BxNKTTby.js} +1 -1
- package/components/{conditional-number-positioning.config-BZS99jTT.cjs → conditional-number-positioning.config-B7F96ylg.cjs} +1 -1
- package/components/{conditional-number-positioning.config-DhixJEpv.js → conditional-number-positioning.config-xMGIw6c7.js} +1 -1
- package/components/data-field/index.cjs +1 -1
- package/components/data-field/index.js +1 -1
- package/components/{data-field-BORlpZZk.cjs → data-field-BxIuPFX_.cjs} +1 -1
- package/components/{data-field-B9466d0w.js → data-field-D03w2T6D.js} +3 -3
- package/components/data-field-level/index.cjs +1 -1
- package/components/data-field-level/index.js +1 -1
- package/components/{data-field-level-DOEYwcvM.cjs → data-field-level-BdWZsIny.cjs} +1 -1
- package/components/{data-field-level-GrX6yhPV.js → data-field-level-C-C9RCNf.js} +1 -1
- package/components/data-field-panel/index.cjs +1 -1
- package/components/data-field-panel/index.js +1 -1
- package/components/{data-field-panel-BedJ9V2r.js → data-field-panel-DLe4FvTg.js} +3 -3
- package/components/{data-field-panel-DmMkAYAz.cjs → data-field-panel-kGncuIuq.cjs} +1 -1
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +1 -1
- package/components/{data-fields-select-BOqmoE7n.cjs → data-fields-select-CSP6pX9J.cjs} +1 -1
- package/components/{data-fields-select-af1HZLWS.js → data-fields-select-DP80Miah.js} +1 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +1 -1
- package/components/{dataset-selector-list-BzI8n_dB.js → dataset-selector-list-D2UcUaOx.js} +1 -1
- package/components/{dataset-selector-list-CmZaj20L.cjs → dataset-selector-list-DGWiCqpf.cjs} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +1 -1
- package/components/{dataset-selector-row-D_7iBmdm.js → dataset-selector-row-7WNwyR9L.js} +3 -3
- package/components/{dataset-selector-row-mOGioXLM.cjs → dataset-selector-row-Vfh7jDjW.cjs} +1 -1
- package/components/{de-AOtjGNGZ.js → de-BbXtB6N5.js} +19 -4
- package/components/de-BfHCg6-Y.cjs +20 -0
- package/components/display-settings/display-settings.d.ts +11 -3
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +1 -1
- package/components/{display-settings-Qwp9oJo6.js → display-settings-Bqq9iJ3L.js} +86 -62
- package/components/display-settings-CG-qtz9m.cjs +146 -0
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +1 -1
- package/components/{display-settings-binning-IPVCvx8a.js → display-settings-binning-C2Jlf18P.js} +2 -2
- package/components/{display-settings-binning-D5zhoC7D.cjs → display-settings-binning-Dx9zEbDo.cjs} +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +1 -1
- package/components/{display-settings-datetime-t70VEfHe.cjs → display-settings-datetime-B6LMQZOW.cjs} +1 -1
- package/components/{display-settings-datetime-DgBBSYfC.js → display-settings-datetime-B6okY4hC.js} +2 -2
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +1 -1
- package/components/{display-settings-grand-totals-C_Fzk7oV.cjs → display-settings-grand-totals-D1Fi1qIx.cjs} +1 -1
- package/components/{display-settings-grand-totals-AFtKeeeG.js → display-settings-grand-totals-_v0iGpHZ.js} +2 -2
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +1 -1
- package/components/{display-settings-numeric-BF8BA5MH.cjs → display-settings-numeric-DbcsMeEN.cjs} +1 -1
- package/components/{display-settings-numeric-DeuXT1UR.js → display-settings-numeric-G2avidxv.js} +2 -2
- package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +18 -10
- package/components/display-settings-period-over-period/helpers/constants.d.ts +0 -23
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +1 -1
- package/components/display-settings-period-over-period-86oxRHhk.cjs +151 -0
- package/components/{display-settings-period-over-period-CzxnyVF7.js → display-settings-period-over-period-DqeKcvdD.js} +101 -164
- package/components/donut-chart-options.config-B47Y1jhM.cjs +20 -0
- package/components/{donut-chart-options.config-B2vxfMyh.js → donut-chart-options.config-C__JfD3B.js} +32 -45
- package/components/{donut-chart-options.de-AXRfsiXW.cjs → donut-chart-options.de-Bsze2Gb5.cjs} +1 -1
- package/components/{donut-chart-options.de-DgNmBJiQ.js → donut-chart-options.de-Cft1Ppg0.js} +1 -2
- package/components/{donut-chart-options.en-aZqu2oEV.cjs → donut-chart-options.en-D3F9v0nN.cjs} +1 -1
- package/components/{donut-chart-options.en-BXwxTVpB.js → donut-chart-options.en-DZbap5Oi.js} +1 -2
- package/components/{donut-chart-options.es-7WgxuaDe.cjs → donut-chart-options.es-Cm0HGP62.cjs} +1 -1
- package/components/{donut-chart-options.es-DW_q5HeE.js → donut-chart-options.es-gM85ij3W.js} +1 -2
- package/components/{donut-chart-options.fr-QU3pGELZ.js → donut-chart-options.fr-Tgs8r0XZ.js} +1 -2
- package/components/{donut-chart-options.fr-C0Z8xEyF.cjs → donut-chart-options.fr-VSZoCY5q.cjs} +1 -1
- package/components/{donut-chart-options.nl-aKVLbRJY.cjs → donut-chart-options.nl-BkwPxEkq.cjs} +1 -1
- package/components/{donut-chart-options.nl-D_cgYVAQ.js → donut-chart-options.nl-SfAF0ycW.js} +1 -2
- package/components/{donut-chart-positioning.config-Bu1jZwtJ.cjs → donut-chart-positioning.config-BxJLjvJI.cjs} +1 -1
- package/components/{donut-chart-positioning.config-C0jkFWni.js → donut-chart-positioning.config-Doti4TgR.js} +1 -1
- package/components/{es-CYhv03uu.js → es-DRdklNAj.js} +19 -4
- package/components/es-Djk6AXOA.cjs +20 -0
- package/components/{evolution-number-positioning.config-DD8HBFtv.js → evolution-number-positioning.config-DHgkhRjt.js} +1 -1
- package/components/{evolution-number-positioning.config-DbH1-ODd.cjs → evolution-number-positioning.config-DeJkgT2e.cjs} +1 -1
- package/components/expressions-B4TetNaL.js +314 -0
- package/components/expressions-_KjBCqb6.cjs +20 -0
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/filter-expression-picker-BuXFbOXQ.js +146 -0
- package/components/filter-expression-picker-Cta3MMId.cjs +40 -0
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +1 -1
- package/components/filter-item-DENHWF-1.cjs +111 -0
- package/components/{filter-item-QJ3sDlmG.js → filter-item-DXkoGth1.js} +170 -169
- package/components/filter-parameter-picker/index.cjs +1 -1
- package/components/filter-parameter-picker/index.js +1 -1
- package/components/{filter-parameter-picker-DjQVFIfg.cjs → filter-parameter-picker-CYb_At4A.cjs} +1 -1
- package/components/{filter-parameter-picker-C8qwIo_H.js → filter-parameter-picker-Dhdrwokt.js} +1 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +1 -1
- package/components/{filter-value-picker-DIYyMymr.js → filter-value-picker-Df2otXtB.js} +4 -4
- package/components/{filter-value-picker-CMNxLzj7.cjs → filter-value-picker-IBplK-ue.cjs} +1 -1
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +1 -1
- package/components/{filter-value-picker-datetime-DKblyQrs.js → filter-value-picker-datetime-Cxj-X50F.js} +34 -28
- package/components/filter-value-picker-datetime-DmJ6vrr8.cjs +53 -0
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +1 -1
- package/components/{filter-value-picker-hierarchy-CXPC_4MU.cjs → filter-value-picker-hierarchy-BAK4urti.cjs} +1 -1
- package/components/{filter-value-picker-hierarchy-IswtY6Qa.js → filter-value-picker-hierarchy-JUxA6aOK.js} +2 -2
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +1 -1
- package/components/{filter-value-picker-numeric-C7_-Fpol.cjs → filter-value-picker-numeric-Bf7iFwmp.cjs} +1 -1
- package/components/{filter-value-picker-numeric-DlFnGZ2O.js → filter-value-picker-numeric-MEFZbKsF.js} +1 -1
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/filters-BLd6si6W.cjs +187 -0
- package/components/{filters-CxIzuI5q.js → filters-CYSKF57z.js} +115 -104
- package/components/formula/index.cjs +1 -1
- package/components/formula/index.js +1 -1
- package/components/{formula-WqOlEQ5o.js → formula-DPYHw2sr.js} +2 -2
- package/components/{formula-codemirror-BTYlGSxE.cjs → formula-codemirror-CZpISqCT.cjs} +1 -1
- package/components/{formula-codemirror-bpEb3M2G.js → formula-codemirror-DrcDvAal.js} +4 -4
- package/components/{formula-display-store-QU-B6xp9.js → formula-display-store-fFSd4okF.js} +3 -3
- package/components/{formula-display-store-D7fzKNfW.cjs → formula-display-store-zZIC2bm-.cjs} +1 -1
- package/components/formula-editor/index.cjs +1 -1
- package/components/formula-editor/index.js +3 -3
- package/components/{formula-editor-BbyDf0vM.js → formula-editor-C9ECzSM6.js} +5 -5
- package/components/{formula-editor-D_NRhjUI.cjs → formula-editor-CDx-sZrG.cjs} +1 -1
- package/components/formula-field/index.cjs +1 -1
- package/components/formula-field/index.js +1 -1
- package/components/{formula-field-DSSpI8LB.cjs → formula-field-CV3FLzM2.cjs} +1 -1
- package/components/{formula-field-BT9K_W6Q.js → formula-field-DZLfK3cs.js} +1 -1
- package/components/{formula-input-base-CQc1OU9G.js → formula-input-base-CTuUw8IY.js} +1 -1
- package/components/{formula-input-base-BoWiH97v.cjs → formula-input-base-DN9aVHrY.cjs} +1 -1
- package/components/{formula-CXrr9wJZ.cjs → formula-x9mA6jDv.cjs} +1 -1
- package/components/{fr-DKAoGI_6.js → fr-C6af3ed2.js} +19 -4
- package/components/fr-cuXTTJ19.cjs +20 -0
- package/components/{funnel-chart-options.config-W83a8ukL.js → funnel-chart-options.config-AupTvjpk.js} +27 -84
- package/components/funnel-chart-options.config-DLRKgBpU.cjs +20 -0
- package/components/{funnel-chart-options.de-B2f_xxvV.cjs → funnel-chart-options.de-BXnQCtlb.cjs} +1 -1
- package/components/{funnel-chart-options.de-CLMiAr0m.js → funnel-chart-options.de-CRjaoeDf.js} +0 -1
- package/components/{funnel-chart-options.en-Pu8yU7Yz.js → funnel-chart-options.en-B0moabZE.js} +0 -1
- package/components/{funnel-chart-options.en-Cdvkged9.cjs → funnel-chart-options.en-BxEAM67L.cjs} +1 -1
- package/components/{funnel-chart-options.es-CrAp7hOK.cjs → funnel-chart-options.es-B88ZJAvI.cjs} +1 -1
- package/components/{funnel-chart-options.es-BPjGIJ7s.js → funnel-chart-options.es-DVVoRoYc.js} +0 -1
- package/components/{funnel-chart-options.fr-0RxiqeZg.cjs → funnel-chart-options.fr-B79JhoL2.cjs} +1 -1
- package/components/{funnel-chart-options.fr-CtWjGa4q.js → funnel-chart-options.fr-DvQC8k_c.js} +0 -1
- package/components/{funnel-chart-options.nl-r_wRg5qR.cjs → funnel-chart-options.nl-CnHVcvGk.cjs} +1 -1
- package/components/{funnel-chart-options.nl-2TPEy_CB.js → funnel-chart-options.nl-DJhjX1Pw.js} +0 -1
- package/components/{funnel-chart-positioning.config-Dx9E5eiW.cjs → funnel-chart-positioning.config-BZJ5g_XG.cjs} +1 -1
- package/components/{funnel-chart-positioning.config-Dbex7egf.js → funnel-chart-positioning.config-y6yFY7jd.js} +1 -1
- package/components/{get-dataset-name-C3Sc0hZ0.cjs → get-dataset-name-DddRDGDV.cjs} +1 -1
- package/components/{get-dataset-name-BArAzBu2.js → get-dataset-name-OPlPwcJU.js} +1 -1
- package/components/{groupings-DMWmtE5F.cjs → groupings-BnI5_4A1.cjs} +1 -1
- package/components/{groupings-DXJS4XIU.js → groupings-D_Ri_Z-t.js} +1 -1
- package/components/{guidelines-options.config-D-ZuReR_.cjs → guidelines-options.config-BgARZ-fs.cjs} +1 -1
- package/components/{guidelines-options.config-DVZrOa3v.js → guidelines-options.config-BqAYiMSF.js} +1 -1
- package/components/{heat-map-positioning.config-Bzg0DG60.cjs → heat-map-positioning.config-Cgg-qkcr.cjs} +1 -1
- package/components/{heat-map-positioning.config-D4T7PQzN.js → heat-map-positioning.config-DN75-r9r.js} +1 -1
- package/components/{heat-table-options.config-CMWWTeyo.js → heat-table-options.config-BL8x1qwt.js} +20 -7
- package/components/heat-table-options.config-iEHucwDf.cjs +20 -0
- package/components/{heat-table-positioning.config-Cj6LlLe3.cjs → heat-table-positioning.config-C2QPQURh.cjs} +1 -1
- package/components/{heat-table-positioning.config-DVQiJfC4.js → heat-table-positioning.config-CHxtZe-0.js} +1 -1
- package/components/{hexbin-map-positioning.config-csNrvMwp.js → hexbin-map-positioning.config-B1H1Z6Os.js} +1 -1
- package/components/{hexbin-map-positioning.config-ChoCCure.cjs → hexbin-map-positioning.config-BI-RVV35.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +69 -69
- package/components/interactive-viz-item/helpers/chart-helpers.d.ts +2 -1
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.js +3 -3
- package/components/interactive-viz-item/interactive-viz-item.d.ts +44 -0
- package/components/{interactive-viz-item-BKLOmawA.js → interactive-viz-item-CngeQ579.js} +153 -112
- package/components/interactive-viz-item-qrC0vC2O.cjs +269 -0
- package/components/interactivity-options.config-AKgaj2vC.js +131 -0
- package/components/interactivity-options.config-CkRDoCWd.cjs +20 -0
- package/components/interactivity-options.i18n-Cv5w1nSS.cjs +20 -0
- package/components/{interactivity-options.i18n-DY947PNz.js → interactivity-options.i18n-DmrqdhYW.js} +35 -5
- package/components/item-grid/index.cjs +1 -1
- package/components/item-grid/index.js +2 -2
- package/components/item-grid/item-grid.d.ts +1 -0
- package/components/{item-grid-DveTRc7D.cjs → item-grid-C-v9kDvq.cjs} +1 -1
- package/components/{item-grid-DscQOFMu.js → item-grid-DzR5sfDM.js} +1 -1
- package/components/item-grid-item-actions-menu/index.cjs +1 -1
- package/components/item-grid-item-actions-menu/index.js +1 -1
- package/components/{item-grid-item-actions-menu-B1bKfagj.js → item-grid-item-actions-menu-DJJESWL6.js} +1 -1
- package/components/{item-grid-item-actions-menu-xRrT9dkY.cjs → item-grid-item-actions-menu-HIlcOhJA.cjs} +1 -1
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.js +1 -1
- package/components/{item-option-DKLRnicU.js → item-option-B6h4E5qR.js} +49 -43
- package/components/item-option-action-button-group/index.cjs +1 -1
- package/components/item-option-action-button-group/index.js +1 -1
- package/components/{item-option-action-button-group-Cpd_CNn-.js → item-option-action-button-group-Bc3bJQUS.js} +1 -1
- package/components/{item-option-action-button-group-BMgUwveA.cjs → item-option-action-button-group-CQHpvC5O.cjs} +1 -1
- package/components/{item-option-base-BMy6dWbc.cjs → item-option-base-6msESUhx.cjs} +1 -1
- package/components/{item-option-base-BfHciede.js → item-option-base-XB_1V6QM.js} +1 -1
- package/components/item-option-color-palette-picker/index.cjs +1 -1
- package/components/item-option-color-palette-picker/index.js +1 -1
- package/components/{item-option-color-palette-picker-8KFuRU1D.js → item-option-color-palette-picker-BYjb4ygk.js} +1 -1
- package/components/{item-option-color-palette-picker-CnM1Gi6o.cjs → item-option-color-palette-picker-MhFJgurt.cjs} +1 -1
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.js +1 -1
- package/components/{item-option-color-picker-CNW7GsCO.cjs → item-option-color-picker-CLLWV2M-.cjs} +1 -1
- package/components/{item-option-color-picker-DDvsY7hV.js → item-option-color-picker-Dq_NwAn1.js} +1 -1
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.js +1 -1
- package/components/{item-option-color-range-BqSbuSZh.cjs → item-option-color-range-DlCi_o72.cjs} +1 -1
- package/components/{item-option-color-range-FQduqtz3.js → item-option-color-range-abi_vblh.js} +1 -1
- package/components/item-option-guidelines/index.cjs +1 -1
- package/components/item-option-guidelines/index.js +1 -1
- package/components/{item-option-guidelines-k5DwMONo.js → item-option-guidelines-8LmcJ04U.js} +3 -3
- package/components/{item-option-guidelines-z9BsGR-l.cjs → item-option-guidelines-Q2M8xSYS.cjs} +1 -1
- package/components/item-option-multi-language-field/index.cjs +1 -1
- package/components/item-option-multi-language-field/index.js +1 -1
- package/components/{item-option-multi-language-field-CqtBl3gM.js → item-option-multi-language-field-6FBm3Xr3.js} +1 -1
- package/components/{item-option-multi-language-field-DM2PENxV.cjs → item-option-multi-language-field-Dq3j7XYw.cjs} +1 -1
- package/components/item-option-number-field/index.cjs +1 -1
- package/components/item-option-number-field/index.js +1 -1
- package/components/{item-option-number-field-BgQRhFj3.js → item-option-number-field-CPgwUGTR.js} +1 -1
- package/components/{item-option-number-field-Cw2ofJL7.cjs → item-option-number-field-CZSVb9wv.cjs} +1 -1
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.js +1 -1
- package/components/{item-option-panel-CU51qvgV.cjs → item-option-panel-B5ZKbaLl.cjs} +1 -1
- package/components/{item-option-panel-BLXWIbjX.js → item-option-panel-BZRyyc-9.js} +2 -2
- package/components/item-option-picker/index.cjs +1 -1
- package/components/item-option-picker/index.js +1 -1
- package/components/{item-option-picker-EJlc0bmj.cjs → item-option-picker-DMLk4Uq_.cjs} +1 -1
- package/components/{item-option-picker-DkAENDES.js → item-option-picker-mU6X3bbk.js} +1 -1
- package/components/item-option-position-picker/index.cjs +1 -1
- package/components/item-option-position-picker/index.js +1 -1
- package/components/{item-option-position-picker-DX7lLZKO.js → item-option-position-picker-B4AuC_73.js} +1 -1
- package/components/{item-option-position-picker-Ba7cBvlL.cjs → item-option-position-picker-BTH6KixE.cjs} +1 -1
- package/components/item-option-positions-number-field/index.cjs +1 -1
- package/components/item-option-positions-number-field/index.js +1 -1
- package/components/{item-option-positions-number-field-Bqfg0MJm.js → item-option-positions-number-field-BTFGhhrb.js} +1 -1
- package/components/{item-option-positions-number-field-BQ8gFOAn.cjs → item-option-positions-number-field-Dz0mpPSk.cjs} +1 -1
- package/components/item-option-radio-button-group/index.cjs +1 -1
- package/components/item-option-radio-button-group/index.js +1 -1
- package/components/{item-option-radio-button-group-Bk7VQlpx.js → item-option-radio-button-group-CmYFScry.js} +1 -1
- package/components/{item-option-radio-button-group-2hX-E2WV.cjs → item-option-radio-button-group-EBLjtMVd.cjs} +1 -1
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.js +1 -1
- package/components/{item-option-slider-BKtJfL3D.js → item-option-slider-C7RfBary.js} +1 -1
- package/components/{item-option-slider-Kz2eFBql.cjs → item-option-slider-DRXTGW9W.cjs} +1 -1
- package/components/item-option-switch/index.cjs +1 -1
- package/components/item-option-switch/index.js +1 -1
- package/components/{item-option-switch-BUteU1mc.cjs → item-option-switch-D-FbXXRl.cjs} +1 -1
- package/components/{item-option-switch-cGWccE79.js → item-option-switch-D-MY6Uqv.js} +1 -1
- package/components/{item-option-DpLdospV.cjs → item-option-t_LsqjoR.cjs} +1 -1
- package/components/item-option-text-field/index.cjs +1 -1
- package/components/item-option-text-field/index.js +1 -1
- package/components/{item-option-text-field-Dy8pqVKJ.js → item-option-text-field-BR2V4ro2.js} +1 -1
- package/components/{item-option-text-field-BC9fR-yW.cjs → item-option-text-field-Cn-9lblu.cjs} +1 -1
- package/components/item-options-configs.cjs +1 -1
- package/components/item-options-configs.js +21 -21
- package/components/item-slot-drop/index.cjs +1 -1
- package/components/item-slot-drop/index.js +1 -1
- package/components/item-slot-drop/item-slot-drop.d.ts +2 -0
- package/components/item-slot-drop-7v-n-e1y.cjs +93 -0
- package/components/{item-slot-drop-CwZT8bTP.js → item-slot-drop-Db-tVAud.js} +69 -60
- package/components/item-slot-drop-panel/index.cjs +1 -1
- package/components/item-slot-drop-panel/index.js +1 -1
- package/components/item-slot-drop-panel/item-slot-drop-panel.d.ts +2 -0
- package/components/{item-slot-drop-panel-o5UdVrY_.js → item-slot-drop-panel-D-g4H1Rp.js} +117 -107
- package/components/item-slot-drop-panel-D2_1yWHs.cjs +58 -0
- package/components/item-slot-picker/index.cjs +1 -1
- package/components/item-slot-picker/index.js +1 -1
- package/components/item-slot-picker/item-slot-picker.d.ts +5 -0
- package/components/item-slot-picker-9afJORSK.cjs +160 -0
- package/components/{item-slot-picker-ilmmb0-8.js → item-slot-picker-BHtj0dRB.js} +109 -101
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +1 -1
- package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +21 -1
- package/components/{item-slot-picker-panel-fJqEmxeD.js → item-slot-picker-panel-CIxGfaz3.js} +111 -69
- package/components/item-slot-picker-panel-CeOtdtMc.cjs +86 -0
- package/components/{kpi-positioning.config-mQuxf1ke.js → kpi-positioning.config-DDTfIZ_h.js} +1 -1
- package/components/{kpi-positioning.config-DIYWUwID.cjs → kpi-positioning.config-t9SxIqga.cjs} +1 -1
- package/components/legend-options.i18n-0hyeyskh.js +78 -0
- package/components/legend-options.i18n-CUZeW5rR.cjs +20 -0
- package/components/{line-chart-options.config-Opoz2jPk.js → line-chart-options.config-BdhyECMS.js} +2 -2
- package/components/{line-chart-options.config-DOGbeJhy.cjs → line-chart-options.config-CVtYVap1.cjs} +1 -1
- package/components/{line-chart-positioning.config-DqjrWmxJ.js → line-chart-positioning.config-BZoKaJVO.js} +1 -1
- package/components/{line-chart-positioning.config-DK9PycZ_.cjs → line-chart-positioning.config-DfTMlBBL.cjs} +1 -1
- package/components/{localized-mixin-EoNvtTBG.cjs → localized-mixin-BQowFGQK.cjs} +1 -1
- package/components/{localized-mixin-FPDNaZhb.js → localized-mixin-BdXrQldH.js} +1 -1
- package/components/{marker-map-positioning.config-BB51kE8O.cjs → marker-map-positioning.config-BsPUa8Ui.cjs} +1 -1
- package/components/{marker-map-positioning.config-CA08hZcp.js → marker-map-positioning.config-BtuIUPHT.js} +1 -1
- package/components/nl-B4gqLp1F.cjs +20 -0
- package/components/{nl-DNWGcGqO.js → nl-Chzh7kM2.js} +19 -4
- package/components/{ohlc-chart-options.config-CvlHm6hy.cjs → ohlc-chart-options.config-BQJWhXv7.cjs} +1 -1
- package/components/{ohlc-chart-options.config-C-TCUtOt.js → ohlc-chart-options.config-MYqetK62.js} +3 -3
- package/components/{ohlc-chart-positioning.config-CDL2vGsl.cjs → ohlc-chart-positioning.config-D1X1U96F.cjs} +1 -1
- package/components/{ohlc-chart-positioning.config-BqFHD1oj.js → ohlc-chart-positioning.config-Ny3U8zgV.js} +1 -1
- package/components/{parallel-coordinates-plot-options.config-UHrCS9q5.cjs → parallel-coordinates-plot-options.config-B4v6BtAz.cjs} +1 -1
- package/components/{parallel-coordinates-plot-options.config-C3HTFBTl.js → parallel-coordinates-plot-options.config-CN4p7QDD.js} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-Cc-ooVxV.cjs → parallel-coordinates-plot-positioning.config-BI6JMiBT.cjs} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-D6IuAk_K.js → parallel-coordinates-plot-positioning.config-Curf1XoL.js} +1 -1
- package/components/{period-over-period-condition.const-C1NZ9Bkp.cjs → period-over-period-condition.const-BOI8gxO1.cjs} +1 -1
- package/components/{period-over-period-condition.const-AE_2h-9O.js → period-over-period-condition.const-C9cn5m-o.js} +1 -2
- package/components/period-over-period-context-CeZHXSs0.js +84 -0
- package/components/period-over-period-context-Cx4pRKBn.cjs +20 -0
- package/components/{pivot-table-options.config-5pYvqc35.cjs → pivot-table-options.config-1DApg-wg.cjs} +1 -1
- package/components/{pivot-table-options.config-BlrguysB.js → pivot-table-options.config-DhzyxHTP.js} +1 -1
- package/components/{pivot-table-positioning.config-DDwXH70O.js → pivot-table-positioning.config-BoN7P8bs.js} +1 -1
- package/components/{pivot-table-positioning.config-DvwKNjoD.cjs → pivot-table-positioning.config-BsyGrzvX.cjs} +1 -1
- package/components/{pyramid-chart-options.config-CAC6cMmt.cjs → pyramid-chart-options.config-CNOOucJE.cjs} +1 -1
- package/components/{pyramid-chart-options.config-0Qf1naIx.js → pyramid-chart-options.config-DVBuswjg.js} +1 -1
- package/components/{pyramid-chart-positioning.config-DWou2jnm.js → pyramid-chart-positioning.config-D9Z40IzT.js} +1 -1
- package/components/{pyramid-chart-positioning.config-10BYkgv8.cjs → pyramid-chart-positioning.config-DdjlJjFb.cjs} +1 -1
- package/components/{radar-chart-positioning.config-B0O8vn-B.js → radar-chart-positioning.config-C16aywvy.js} +1 -1
- package/components/{radar-chart-positioning.config-Dg41uYWY.cjs → radar-chart-positioning.config-DARMkDIv.cjs} +1 -1
- package/components/{route-map-positioning.config-C1iUodTh.js → route-map-positioning.config-BmuPL5DK.js} +1 -1
- package/components/{route-map-positioning.config-DlM6xJTP.cjs → route-map-positioning.config-CTtpis1h.cjs} +1 -1
- package/components/{sankey-diagram-options.config-Y6jRK3wk.js → sankey-diagram-options.config-B86iq8pI.js} +1 -1
- package/components/{sankey-diagram-options.config-B8aHKfFt.cjs → sankey-diagram-options.config-mIgABANw.cjs} +1 -1
- package/components/{sankey-diagram-positioning.config-5EXNleL5.js → sankey-diagram-positioning.config-BhvJe1IX.js} +1 -1
- package/components/{sankey-diagram-positioning.config-BSu02GJ1.cjs → sankey-diagram-positioning.config-aLwXoVGA.cjs} +1 -1
- package/components/{scatter-plot-options.config-DhOGahRc.cjs → scatter-plot-options.config-BZVF4r3f.cjs} +1 -1
- package/components/{scatter-plot-options.config-DvGofFzR.js → scatter-plot-options.config-ChqZzslY.js} +2 -2
- package/components/{scatter-plot-positioning.config-CuyJUmiV.cjs → scatter-plot-positioning.config-CYy1jfz5.cjs} +1 -1
- package/components/{scatter-plot-positioning.config-nDbkUUqa.js → scatter-plot-positioning.config-twVc5wWl.js} +1 -1
- package/components/{set-locale-m257lVi3.js → set-locale-BeAF7qn4.js} +4 -4
- package/components/{set-locale-BkMmLcm6.cjs → set-locale-DvJ1yA4S.cjs} +1 -1
- package/components/{slicer-filter-positioning.config-BT5aNPHe.js → slicer-filter-positioning.config-WofHaYJx.js} +1 -1
- package/components/{slicer-filter-positioning.config-D7ZLoaGu.cjs → slicer-filter-positioning.config-_frD2LDr.cjs} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +1 -1
- package/components/slot-menu/slot-menu.d.ts +6 -0
- package/components/slot-menu-B-7MzAd6.cjs +71 -0
- package/components/{slot-menu-BB_nJWZx.js → slot-menu-DhGC4yoA.js} +88 -97
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +1 -1
- package/components/{slot-menu-list-C2nLODML.cjs → slot-menu-list-CiJK2fNu.cjs} +1 -1
- package/components/{slot-menu-list-3QkrOWgG.js → slot-menu-list-SoDeiZE1.js} +1 -1
- package/components/sort-options.config-CiPFyoxx.cjs +20 -0
- package/components/sort-options.config-CiZo1AEh.js +104 -0
- package/components/{speedometer-chart-positioning.config-CO1MtdU3.js → speedometer-chart-positioning.config-BLXUOOc_.js} +1 -1
- package/components/{speedometer-chart-positioning.config-BtDD3TiP.cjs → speedometer-chart-positioning.config-CkTqU3qn.cjs} +1 -1
- package/components/{spike-map-positioning.config-BhKVutm1.cjs → spike-map-positioning.config-DmLlz8ZD.cjs} +1 -1
- package/components/{spike-map-positioning.config-CQkcCdHD.js → spike-map-positioning.config-pgedE0nh.js} +1 -1
- package/components/{strip-plot-positioning.config-DEyOR-yS.js → strip-plot-positioning.config-B4sVlI82.js} +1 -1
- package/components/{strip-plot-positioning.config-CEYgtT13.cjs → strip-plot-positioning.config-CtctjJwh.cjs} +1 -1
- package/components/sunburst-chart-options.config-DNkL0pN4.cjs +20 -0
- package/components/{sunburst-chart-options.config-DVETeZFc.js → sunburst-chart-options.config-Zg42LwmT.js} +26 -83
- package/components/{sunburst-chart-options.de-DO65RQI_.cjs → sunburst-chart-options.de-BIJ2Njvn.cjs} +1 -1
- package/components/{sunburst-chart-options.de-B0mIITIx.js → sunburst-chart-options.de-BaLziTTh.js} +2 -2
- package/components/{sunburst-chart-options.en-C3IkkUBW.cjs → sunburst-chart-options.en-C2P4VIQq.cjs} +1 -1
- package/components/{sunburst-chart-options.en-LoUPN34r.js → sunburst-chart-options.en-CxWuNug0.js} +2 -2
- package/components/{sunburst-chart-options.es-BV_4fN10.cjs → sunburst-chart-options.es-eGoOC0h2.cjs} +1 -1
- package/components/{sunburst-chart-options.es-DBje7CMN.js → sunburst-chart-options.es-nqpK13rB.js} +2 -2
- package/components/{sunburst-chart-options.fr-Cnbpsj6t.js → sunburst-chart-options.fr-Dtfoz1Z-.js} +2 -2
- package/components/{sunburst-chart-options.fr-DO7-oeNe.cjs → sunburst-chart-options.fr-wdaTbc-I.cjs} +1 -1
- package/components/{sunburst-chart-options.nl-DsecjcfE.cjs → sunburst-chart-options.nl-2U3YQ6aP.cjs} +1 -1
- package/components/{sunburst-chart-options.nl-CluctKYY.js → sunburst-chart-options.nl-BljrFLha.js} +2 -2
- package/components/{sunburst-chart-positioning.config-DP-ifsmn.js → sunburst-chart-positioning.config-BJpphNBF.js} +1 -1
- package/components/{sunburst-chart-positioning.config-DNtHXpHg.cjs → sunburst-chart-positioning.config-BaQsxbr9.cjs} +1 -1
- package/components/{symbol-map-positioning.config-CoLDPgYM.cjs → symbol-map-positioning.config-657GZ7GZ.cjs} +1 -1
- package/components/{symbol-map-positioning.config-Nj7pDOAu.js → symbol-map-positioning.config-DEMmnp7J.js} +1 -1
- package/components/theme-options.config-CnSIfTf6.js +47 -0
- package/components/theme-options.config-DZJos9OK.cjs +20 -0
- package/components/theme-options.i18n-7V690gi-.cjs +20 -0
- package/components/theme-options.i18n-DtQoYxRz.js +43 -0
- package/components/{treemap-chart-options.config-DLEY6YuI.cjs → treemap-chart-options.config-B-bY4pOq.cjs} +1 -1
- package/components/{treemap-chart-options.config-DsqsX9So.js → treemap-chart-options.config-BYbW8htL.js} +1 -1
- package/components/{treemap-chart-positioning.config-B_R_cmFs.js → treemap-chart-positioning.config-CLKsuS0b.js} +1 -1
- package/components/{treemap-chart-positioning.config-BVOqj2V1.cjs → treemap-chart-positioning.config-DnY0Gnz7.cjs} +1 -1
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/{utils-DIKmx9O1.cjs → utils-BGtDiw5k.cjs} +1 -1
- package/components/{utils-DS6Pthr4.js → utils-ZVgZ4EFf.js} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +8 -8
- package/components/{venn-diagram-positioning.config-DOsSkJYl.js → venn-diagram-positioning.config-BjiidwmG.js} +1 -1
- package/components/{venn-diagram-positioning.config-8JCVpYOt.cjs → venn-diagram-positioning.config-OBLHpLAK.cjs} +1 -1
- package/components/{wordcloud-chart-options.config-DiyF596X.cjs → wordcloud-chart-options.config-COTlsOrG.cjs} +1 -1
- package/components/{wordcloud-chart-options.config-UAl2hfU7.js → wordcloud-chart-options.config-vKHxHgLh.js} +1 -1
- package/components/{wordcloud-chart-positioning.config-DSVw_z7Y.js → wordcloud-chart-positioning.config-68AyKLI2.js} +1 -1
- package/components/{wordcloud-chart-positioning.config-D13iPEEg.cjs → wordcloud-chart-positioning.config-B_pohQK5.cjs} +1 -1
- package/custom-elements.json +3411 -2436
- package/grid-core/item-grid-base.d.ts +5 -4
- package/package.json +3 -3
- package/react/components/ai-chat.component.ts +1 -1
- package/react/esm/components/ai-chat.component.d.ts +1 -1
- package/react/esm/components/ai-chat.component.js +1 -1
- package/react/package.json +2 -2
- package/standalone/add-to-dashboard.js +1 -1
- package/standalone/chunks/advanced-options.i18n-BDqAAkCh.js +2 -0
- package/standalone/chunks/{area-chart-options.config-BMvUma_d.js → area-chart-options.config-MSCX7GCC.js} +1 -1
- package/standalone/chunks/{bar-chart-options.config-BpHqXBFq.js → bar-chart-options.config-C-kawBg1.js} +1 -1
- package/standalone/chunks/{box-plot-options.config-DDWb_KmV.js → box-plot-options.config-EeKqXIKW.js} +1 -1
- package/standalone/chunks/{bubble-chart-options.config-BKPTymfC.js → bubble-chart-options.config-BEP0haal.js} +1 -1
- package/standalone/chunks/{chart-helpers-CR-EUEPf.js → chart-helpers-CKlLA7d7.js} +2 -2
- package/standalone/chunks/{choropleth-map-options.config-CDMjKnJD.js → choropleth-map-options.config-C9iAp9Kx.js} +1 -1
- package/standalone/chunks/{circle-pack-chart-options.config-CjDkh4DG.js → circle-pack-chart-options.config-Ch67WcjC.js} +1 -1
- package/standalone/chunks/{color-range-utils-BVyHBRiq.js → color-range-utils-D2amn7jf.js} +1 -1
- package/standalone/chunks/{column-chart-options.config-YIe6cMV5.js → column-chart-options.config-kXBPyFRG.js} +1 -1
- package/standalone/chunks/{combination-chart-options.config-Bf7cNmpc.js → combination-chart-options.config-CvVDQmwB.js} +1 -1
- package/standalone/chunks/data-broker-CUCszU0S.js +2 -0
- package/standalone/chunks/de-CBvR-tEX.js +2 -0
- package/standalone/chunks/{display-settings-binning-BeLLxd3i.js → display-settings-binning-5gaYqJVT.js} +1 -1
- package/standalone/chunks/display-settings-datetime-DhmVs5jK.js +199 -0
- package/standalone/chunks/{display-settings-grand-totals-BuhpQKJ6.js → display-settings-grand-totals-B83suS2N.js} +1 -1
- package/standalone/chunks/{display-settings-numeric-m30IYI7I.js → display-settings-numeric-CnKNRgjc.js} +1 -1
- package/standalone/chunks/display-settings-period-over-period-Di_2_DDX.js +133 -0
- package/standalone/chunks/donut-chart-options.config-re9dbce1.js +2 -0
- package/standalone/chunks/donut-chart-options.de-C1yjMc7p.js +2 -0
- package/standalone/chunks/donut-chart-options.en-CJSA_qMs.js +2 -0
- package/standalone/chunks/donut-chart-options.es-9wl-kU6W.js +2 -0
- package/standalone/chunks/donut-chart-options.fr-FewVJ9oP.js +2 -0
- package/standalone/chunks/donut-chart-options.nl-BA31OsN3.js +2 -0
- package/standalone/chunks/{embed-Bv1ps-EM.js → embed-BL4OOcIV.js} +1 -1
- package/standalone/chunks/en-Cu0ra3lJ.js +2 -0
- package/standalone/chunks/en-GB-B575630r.js +2 -0
- package/standalone/chunks/en-US-Cu0ra3lJ.js +2 -0
- package/standalone/chunks/es-CJnRT1YI.js +2 -0
- package/standalone/chunks/{filters-CxgBXUF1.js → filters-Dk7oDe_z.js} +75 -73
- package/standalone/chunks/{formula-codemirror-Cq94j3-f.js → formula-codemirror-Dn_LEpVx.js} +8 -8
- package/standalone/chunks/fr-DqE0NP1j.js +2 -0
- package/standalone/chunks/funnel-chart-options.config-CW0RAyLR.js +2 -0
- package/standalone/chunks/{funnel-chart-options.de-u5OrFyng.js → funnel-chart-options.de-D2UImO-s.js} +1 -1
- package/standalone/chunks/{funnel-chart-options.en-BEGSBn35.js → funnel-chart-options.en-BJr4frpT.js} +1 -1
- package/standalone/chunks/{funnel-chart-options.es-CxWkEgMs.js → funnel-chart-options.es-DkAYtLaS.js} +1 -1
- package/standalone/chunks/{funnel-chart-options.fr-DZmmgK2t.js → funnel-chart-options.fr-BD3VKHzw.js} +1 -1
- package/standalone/chunks/{funnel-chart-options.nl-C6BitaEJ.js → funnel-chart-options.nl-CubJLSq7.js} +1 -1
- package/standalone/chunks/{guidelines-options.config-CS29_J9M.js → guidelines-options.config-CrJ_haaO.js} +1 -1
- package/standalone/chunks/{heat-map-options.config-DDQMD38W.js → heat-map-options.config-_1TkgBVb.js} +1 -1
- package/standalone/chunks/heat-table-options.config-tgVKW_7X.js +2 -0
- package/standalone/chunks/interactivity-options.config-CG_ZbLS5.js +2 -0
- package/standalone/chunks/interactivity-options.i18n-V1RAn6Ue.js +2 -0
- package/standalone/chunks/{is-same-option-value-7kXNF4st.js → is-same-option-value-CfxEd5pG.js} +1 -1
- package/standalone/chunks/{item-option-action-button-group-BoyqF9vt.js → item-option-action-button-group-C1ke6Jb3.js} +1 -1
- package/standalone/chunks/{item-option-base-CBcDT8MX.js → item-option-base-DSAq8pgm.js} +1 -1
- package/standalone/chunks/{item-option-color-palette-picker-C9PGAv4V.js → item-option-color-palette-picker-waW4sAIj.js} +1 -1
- package/standalone/chunks/{item-option-color-picker-D4fVJlqF.js → item-option-color-picker-9e_3aSen.js} +1 -1
- package/standalone/chunks/{item-option-color-range-BlAdTguE.js → item-option-color-range-CWmg4Tdk.js} +1 -1
- package/standalone/chunks/{item-option-guidelines-DMsYsHDu.js → item-option-guidelines-BnLLvaFI.js} +1 -1
- package/standalone/chunks/{item-option-multi-language-field-NUbm1drg.js → item-option-multi-language-field-BN9u0rGs.js} +1 -1
- package/standalone/chunks/{item-option-number-field-DRp7kbHL.js → item-option-number-field-D2gvKQN_.js} +1 -1
- package/standalone/chunks/{item-option-panel-cXrRclzM.js → item-option-panel-BWQpttWc.js} +2 -2
- package/standalone/chunks/{item-option-picker-Ba09L4Cs.js → item-option-picker-BElgjysX.js} +1 -1
- package/standalone/chunks/{item-option-position-picker-GEGTnhjw.js → item-option-position-picker-B7FGJPTv.js} +1 -1
- package/standalone/chunks/{item-option-positions-number-field-n44s1k5v.js → item-option-positions-number-field-CyCWqMby.js} +1 -1
- package/standalone/chunks/{item-option-radio-button-group-3s_b1NvR.js → item-option-radio-button-group-DjMjG9W3.js} +1 -1
- package/standalone/chunks/{item-option-slider-DtY65Gxk.js → item-option-slider-CJrobai6.js} +1 -1
- package/standalone/chunks/{item-option-switch-4sJaI0mx.js → item-option-switch-DTK0eRzd.js} +1 -1
- package/standalone/chunks/{item-option-text-field-Bt6Lj6kh.js → item-option-text-field-B4-wMWpQ.js} +1 -1
- package/standalone/chunks/item-slot-picker-panel-BZsTEDns.js +438 -0
- package/standalone/chunks/legend-options.i18n-Dr6XmdZs.js +2 -0
- package/standalone/chunks/line-chart-options.config-VgcDr1j6.js +2 -0
- package/standalone/chunks/load-data-fields-for-datasets-Df6IGwne.js +25 -0
- package/standalone/chunks/localize-DIWFho02.js +2 -0
- package/standalone/chunks/{localized-decorator-DosMCCQo.js → localized-decorator-C2ufmkVS.js} +1 -1
- package/standalone/chunks/{localized-mixin-BWJj88bd.js → localized-mixin-CLvEZO1g.js} +1 -1
- package/standalone/chunks/{luzmo-icon-markup-ByaNI6dg.js → luzmo-icon-markup-C1Wzxt4b.js} +1 -1
- package/standalone/chunks/nl-DBD8_AIO.js +2 -0
- package/standalone/chunks/{ohlc-chart-options.config-kyYOgBtR.js → ohlc-chart-options.config-DoFcORQY.js} +1 -1
- package/standalone/chunks/{option-interaction-controller-BuwRr21c.js → option-interaction-controller-BfHSkomY.js} +1 -1
- package/standalone/chunks/{parallel-coordinates-plot-options.config-BcIYCRdF.js → parallel-coordinates-plot-options.config-JmTkwzbf.js} +1 -1
- package/standalone/chunks/{pivot-table-options.config-BZpId1ju.js → pivot-table-options.config-mk1a9meE.js} +1 -1
- package/standalone/chunks/{pyramid-chart-options.config-xYIVE_ib.js → pyramid-chart-options.config-DuCSp-ss.js} +1 -1
- package/standalone/chunks/{route-map-options.config-CGBkHnhM.js → route-map-options.config-B73cNABj.js} +1 -1
- package/standalone/chunks/{sankey-diagram-options.config-Curc2-If.js → sankey-diagram-options.config-BsFxRYGh.js} +1 -1
- package/standalone/chunks/scatter-plot-options.config-DiO2UduI.js +2 -0
- package/standalone/chunks/sort-options.config-fFAfPcSI.js +2 -0
- package/standalone/chunks/{spike-map-options.config-CSenlJ_F.js → spike-map-options.config-BpRwiS7U.js} +1 -1
- package/standalone/chunks/sunburst-chart-options.config-TCXdodS8.js +2 -0
- package/standalone/chunks/sunburst-chart-options.de-DabJH9rY.js +2 -0
- package/standalone/chunks/sunburst-chart-options.en-BNJlsmSV.js +2 -0
- package/standalone/chunks/sunburst-chart-options.es-xn2E_v17.js +2 -0
- package/standalone/chunks/sunburst-chart-options.fr-DQR4oaiY.js +2 -0
- package/standalone/chunks/sunburst-chart-options.nl-BZGlfl67.js +2 -0
- package/standalone/chunks/{task-BlhDPTQS.js → task-B6C9QMNJ.js} +1 -1
- package/standalone/chunks/theme-options.config-W0JNb9nG.js +2 -0
- package/standalone/chunks/theme-options.i18n-DtI0eOJ4.js +2 -0
- package/standalone/chunks/{treemap-chart-options.config-DxkumoYq.js → treemap-chart-options.config-CLpDBIB5.js} +1 -1
- package/standalone/chunks/{wordcloud-chart-options.config-b-ibtRWp.js → wordcloud-chart-options.config-Bjw10jRd.js} +1 -1
- package/standalone/interactive-viz-item.js +54 -53
- package/standalone/item-grid.js +1 -1
- package/standalone/manifest.json +92 -87
- package/types/ai-chat.types.d.ts +60 -0
- package/types.d.ts +1 -1
- package/utils/filters/expressions.d.ts +2 -0
- package/utils/slot-state/slot-store.d.ts +3 -8
- package/utils/time/period-over-period-condition.const.d.ts +0 -1
- package/utils/time/period-over-period-context.d.ts +75 -0
- package/utils/time/tests/period-over-period-context.test.d.ts +1 -0
- package/components/ai-chat-BNcSadGI.cjs +0 -393
- package/components/chart-helpers-fMnqHRzC.cjs +0 -20
- package/components/de-KvAhLsm8.cjs +0 -20
- package/components/display-settings-DaZ3CiKB.cjs +0 -143
- package/components/display-settings-period-over-period-B8Ne3lq-.cjs +0 -227
- package/components/donut-chart-options.config-DX-spmaZ.cjs +0 -20
- package/components/es-DVISHTAz.cjs +0 -20
- package/components/filter-expression-picker-Cc3xfiGT.js +0 -432
- package/components/filter-expression-picker-DDSI9bYq.cjs +0 -40
- package/components/filter-item-DQNbp7Qn.cjs +0 -111
- package/components/filter-value-picker-datetime-BVDQ-og5.cjs +0 -51
- package/components/filters-BPbPFOu5.cjs +0 -187
- package/components/fr-BCxcMVQV.cjs +0 -20
- package/components/funnel-chart-options.config-CKp94nx7.cjs +0 -20
- package/components/heat-table-options.config-D21xtaIk.cjs +0 -20
- package/components/interactive-viz-item-ojdH1uk0.cjs +0 -268
- package/components/interactivity-options.config-Bzk2L-qh.cjs +0 -20
- package/components/interactivity-options.config-MuEP5vSt.js +0 -72
- package/components/interactivity-options.i18n-BsYv4Rh9.cjs +0 -20
- package/components/item-slot-drop-DLzi4Dik.cjs +0 -91
- package/components/item-slot-drop-panel-Oh8zdKJH.cjs +0 -57
- package/components/item-slot-picker-O9HKr3mv.cjs +0 -158
- package/components/item-slot-picker-panel-BhhN54IM.cjs +0 -82
- package/components/nl-XotE1MQq.cjs +0 -20
- package/components/slot-menu-C8p0nkVS.cjs +0 -71
- package/components/sunburst-chart-options.config-CZdd6qx0.cjs +0 -20
- package/standalone/chunks/data-broker-DXDyIrj_.js +0 -2
- package/standalone/chunks/de-BkB0q1Eg.js +0 -2
- package/standalone/chunks/display-settings-datetime-BkeiKIVV.js +0 -199
- package/standalone/chunks/display-settings-period-over-period-CqDlOSRn.js +0 -209
- package/standalone/chunks/donut-chart-options.config-DWpePR5V.js +0 -2
- package/standalone/chunks/donut-chart-options.de-IKGJRoDL.js +0 -2
- package/standalone/chunks/donut-chart-options.en-O2IK3YiS.js +0 -2
- package/standalone/chunks/donut-chart-options.es-gKAHuFAU.js +0 -2
- package/standalone/chunks/donut-chart-options.fr-Q-uMrtQG.js +0 -2
- package/standalone/chunks/donut-chart-options.nl-B6v6jK4l.js +0 -2
- package/standalone/chunks/en-63f7j4v7.js +0 -2
- package/standalone/chunks/en-GB-QAmXQf8W.js +0 -2
- package/standalone/chunks/en-US-63f7j4v7.js +0 -2
- package/standalone/chunks/es-Bo0jStZn.js +0 -2
- package/standalone/chunks/fr-Co_qVhhV.js +0 -2
- package/standalone/chunks/funnel-chart-options.config-S1yxc6IG.js +0 -2
- package/standalone/chunks/heat-table-options.config-B4K0Ygug.js +0 -2
- package/standalone/chunks/interactivity-options.config-09eXx6k6.js +0 -2
- package/standalone/chunks/interactivity-options.i18n-BLDCmZkC.js +0 -2
- package/standalone/chunks/item-slot-picker-panel-BOSVFBIy.js +0 -429
- package/standalone/chunks/line-chart-options.config--_LXaPbB.js +0 -2
- package/standalone/chunks/load-data-fields-for-datasets-CDlut-6S.js +0 -25
- package/standalone/chunks/localize-DXRmGRe-.js +0 -2
- package/standalone/chunks/nl-CQz2jrVx.js +0 -2
- package/standalone/chunks/scatter-plot-options.config-DG9Ki-mt.js +0 -2
- package/standalone/chunks/sunburst-chart-options.config-DOBSe3i5.js +0 -2
- package/standalone/chunks/sunburst-chart-options.de-D3iq4Q-m.js +0 -2
- package/standalone/chunks/sunburst-chart-options.en-BUJ_Pr9C.js +0 -2
- package/standalone/chunks/sunburst-chart-options.es-stKrKGz2.js +0 -2
- package/standalone/chunks/sunburst-chart-options.fr-RkBtlMNp.js +0 -2
- package/standalone/chunks/sunburst-chart-options.nl-BUeDNot_.js +0 -2
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
20
|
import "./tokens-6HmQYnEP.js";
|
|
21
|
-
import { c as e, d as t, s as n, u as r } from "./ai-interaction-textarea-
|
|
22
|
-
import { i, n as a } from "./base-
|
|
21
|
+
import { c as e, d as t, s as n, u as r } from "./ai-interaction-textarea-zpSYvzWC.js";
|
|
22
|
+
import { i, n as a } from "./base-BqwRKT4V.js";
|
|
23
23
|
import { t as o } from "./decorate-B2TzfnLZ.js";
|
|
24
24
|
import { t as s } from "./defineProperty-DIhE-wKn.js";
|
|
25
|
-
import { msg as c } from "@lit/localize/lit-localize";
|
|
26
|
-
import { luzmoArrowRotateLeft as
|
|
25
|
+
import { msg as c, str as l } from "@lit/localize/lit-localize";
|
|
26
|
+
import { luzmoArrowRotateLeft as u, luzmoEllipsisVertical as d, luzmoIcon as f, luzmoSpin as p, luzmoThumbsDown as m, luzmoThumbsUp as ee } from "@luzmo/icons";
|
|
27
27
|
import "@luzmo/lucero/action-button";
|
|
28
28
|
import "@luzmo/lucero/button";
|
|
29
29
|
import "@luzmo/lucero/chat-message";
|
|
@@ -32,25 +32,25 @@ import "@luzmo/lucero/overlay";
|
|
|
32
32
|
import "@luzmo/lucero/popover";
|
|
33
33
|
import "@luzmo/lucero/progress-steps";
|
|
34
34
|
import "@luzmo/lucero/tooltip";
|
|
35
|
-
import { html as
|
|
36
|
-
import { property as
|
|
37
|
-
import { unsafeHTML as
|
|
38
|
-
import "@luzmo/lucero/question-box";
|
|
39
|
-
import { guard as
|
|
40
|
-
import { keyed as
|
|
35
|
+
import { html as h, nothing as g, unsafeCSS as te } from "lit";
|
|
36
|
+
import { property as _, state as v } from "lit/decorators.js";
|
|
37
|
+
import { unsafeHTML as ne } from "lit/directives/unsafe-html.js";
|
|
38
|
+
import { QUESTION_BOX_OTHER_VALUE as re, questionBoxOtherKey as y } from "@luzmo/lucero/question-box";
|
|
39
|
+
import { guard as ie } from "lit/directives/guard.js";
|
|
40
|
+
import { keyed as ae } from "lit/directives/keyed.js";
|
|
41
41
|
// node_modules/dompurify/dist/purify.es.mjs
|
|
42
|
-
function
|
|
42
|
+
function oe(e, t) {
|
|
43
43
|
this.v = e, this.k = t;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function b(e, t) {
|
|
46
46
|
(t == null || t > e.length) && (t = e.length);
|
|
47
47
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
48
48
|
return r;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function se(e) {
|
|
51
51
|
if (Array.isArray(e)) return e;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function ce(e, t) {
|
|
54
54
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
55
55
|
if (n != null) {
|
|
56
56
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -71,24 +71,24 @@ function se(e, t) {
|
|
|
71
71
|
return s;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function le() {
|
|
75
75
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function ue(e, t) {
|
|
78
|
+
return se(e) || ce(e, t) || de(e, t) || le();
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function de(e, t) {
|
|
81
81
|
if (e) {
|
|
82
|
-
if (typeof e == "string") return
|
|
82
|
+
if (typeof e == "string") return b(e, t);
|
|
83
83
|
var n = {}.toString.call(e).slice(8, -1);
|
|
84
|
-
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) ?
|
|
84
|
+
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) ? b(e, t) : void 0;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function x(e) {
|
|
88
88
|
var t, n;
|
|
89
89
|
function r(t, n) {
|
|
90
90
|
try {
|
|
91
|
-
var a = e[t](n), o = a.value, s = o instanceof
|
|
91
|
+
var a = e[t](n), o = a.value, s = o instanceof oe;
|
|
92
92
|
Promise.resolve(s ? o.v : o).then(function(n) {
|
|
93
93
|
if (s) {
|
|
94
94
|
var c = t === "return" && o.k ? t : "next";
|
|
@@ -122,119 +122,119 @@ function ue(e) {
|
|
|
122
122
|
});
|
|
123
123
|
}, typeof e.return != "function" && (this.return = void 0);
|
|
124
124
|
}
|
|
125
|
-
|
|
125
|
+
x.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
|
|
126
126
|
return this;
|
|
127
|
-
},
|
|
127
|
+
}, x.prototype.next = function(e) {
|
|
128
128
|
return this._invoke("next", e);
|
|
129
|
-
},
|
|
129
|
+
}, x.prototype.throw = function(e) {
|
|
130
130
|
return this._invoke("throw", e);
|
|
131
|
-
},
|
|
131
|
+
}, x.prototype.return = function(e) {
|
|
132
132
|
return this._invoke("return", e);
|
|
133
133
|
};
|
|
134
|
-
var
|
|
135
|
-
|
|
134
|
+
var fe = Object.entries, pe = Object.setPrototypeOf, me = Object.isFrozen, he = Object.getPrototypeOf, ge = Object.getOwnPropertyDescriptor, S = Object.freeze, C = Object.seal, _e = Object.create, ve = typeof Reflect < "u" && Reflect, ye = ve.apply, be = ve.construct;
|
|
135
|
+
S ||= function(e) {
|
|
136
136
|
return e;
|
|
137
|
-
},
|
|
137
|
+
}, C ||= function(e) {
|
|
138
138
|
return e;
|
|
139
|
-
},
|
|
139
|
+
}, ye ||= function(e, t) {
|
|
140
140
|
var n = [...arguments].slice(2);
|
|
141
141
|
return e.apply(t, n);
|
|
142
|
-
},
|
|
142
|
+
}, be ||= function(e) {
|
|
143
143
|
return new e(...[...arguments].slice(1));
|
|
144
144
|
};
|
|
145
|
-
var
|
|
145
|
+
var w = O(Array.prototype.forEach);
|
|
146
146
|
Array.prototype.indexOf;
|
|
147
|
-
var
|
|
148
|
-
function
|
|
147
|
+
var xe = O(Array.prototype.lastIndexOf), Se = O(Array.prototype.pop), Ce = O(Array.prototype.push), we = O(Array.prototype.slice), Te = O(Array.prototype.splice), Ee = Array.isArray, De = Ve(Set), Oe = O(Set.prototype.add), ke = O(Set.prototype.has), Ae = O(String.prototype.toLowerCase), je = O(String.prototype.toString), Me = O(String.prototype.match), Ne = O(String.prototype.replace), Pe = O(String.prototype.indexOf), Fe = O(String.prototype.trim), Ie = O(Number.prototype.toString), T = O(Boolean.prototype.toString), Le = typeof BigInt > "u" ? null : O(BigInt.prototype.toString), Re = typeof Symbol > "u" ? null : O(Symbol.prototype.toString), E = O(Object.prototype.hasOwnProperty), ze = O(Object.prototype.toString), D = O(RegExp.prototype.test), Be = Ve(TypeError);
|
|
148
|
+
function O(e) {
|
|
149
149
|
return function(t) {
|
|
150
150
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
151
151
|
var n = [...arguments].slice(1);
|
|
152
|
-
return
|
|
152
|
+
return ye(e, t, n);
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ve(e) {
|
|
156
156
|
return function() {
|
|
157
|
-
return
|
|
157
|
+
return be(e, [...arguments]);
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
162
|
-
if (
|
|
160
|
+
function k(e, t) {
|
|
161
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ae;
|
|
162
|
+
if (pe && pe(e, null), !Ee(t)) return e;
|
|
163
163
|
let r = t.length;
|
|
164
164
|
for (; r--;) {
|
|
165
165
|
let i = t[r];
|
|
166
166
|
if (typeof i == "string") {
|
|
167
167
|
let e = n(i);
|
|
168
|
-
e !== i && (
|
|
168
|
+
e !== i && (me(t) || (t[r] = e), i = e);
|
|
169
169
|
}
|
|
170
170
|
e[i] = !0;
|
|
171
171
|
}
|
|
172
172
|
return e;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
for (let t = 0; t < e.length; t++)
|
|
174
|
+
function He(e) {
|
|
175
|
+
for (let t = 0; t < e.length; t++) E(e, t) || (e[t] = null);
|
|
176
176
|
return e;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
let t =
|
|
180
|
-
for (let r of
|
|
181
|
-
var n =
|
|
178
|
+
function A(e) {
|
|
179
|
+
let t = _e(null);
|
|
180
|
+
for (let r of fe(e)) {
|
|
181
|
+
var n = ue(r, 2);
|
|
182
182
|
let i = n[0], a = n[1];
|
|
183
|
-
|
|
183
|
+
E(e, i) && (t[i] = Ee(a) ? He(a) : a && typeof a == "object" && a.constructor === Object ? A(a) : a);
|
|
184
184
|
}
|
|
185
185
|
return t;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Ue(e) {
|
|
188
188
|
switch (typeof e) {
|
|
189
189
|
case "string": return e;
|
|
190
|
-
case "number": return
|
|
191
|
-
case "boolean": return
|
|
190
|
+
case "number": return Ie(e);
|
|
191
|
+
case "boolean": return T(e);
|
|
192
192
|
case "bigint": return Le ? Le(e) : "0";
|
|
193
193
|
case "symbol": return Re ? Re(e) : "Symbol()";
|
|
194
|
-
case "undefined": return
|
|
194
|
+
case "undefined": return ze(e);
|
|
195
195
|
case "function":
|
|
196
196
|
case "object": {
|
|
197
|
-
if (e === null) return
|
|
198
|
-
let t = e, n =
|
|
197
|
+
if (e === null) return ze(e);
|
|
198
|
+
let t = e, n = j(t, "toString");
|
|
199
199
|
if (typeof n == "function") {
|
|
200
200
|
let e = n(t);
|
|
201
|
-
return typeof e == "string" ? e :
|
|
201
|
+
return typeof e == "string" ? e : ze(e);
|
|
202
202
|
}
|
|
203
|
-
return
|
|
203
|
+
return ze(e);
|
|
204
204
|
}
|
|
205
|
-
default: return
|
|
205
|
+
default: return ze(e);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function j(e, t) {
|
|
209
209
|
for (; e !== null;) {
|
|
210
|
-
let n =
|
|
210
|
+
let n = ge(e, t);
|
|
211
211
|
if (n) {
|
|
212
|
-
if (n.get) return
|
|
213
|
-
if (typeof n.value == "function") return
|
|
212
|
+
if (n.get) return O(n.get);
|
|
213
|
+
if (typeof n.value == "function") return O(n.value);
|
|
214
214
|
}
|
|
215
|
-
e =
|
|
215
|
+
e = he(e);
|
|
216
216
|
}
|
|
217
217
|
function n() {
|
|
218
218
|
return null;
|
|
219
219
|
}
|
|
220
220
|
return n;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function We(e, t) {
|
|
223
223
|
for (; e !== null;) {
|
|
224
|
-
let n =
|
|
225
|
-
if (n) return n.get ?
|
|
226
|
-
e =
|
|
224
|
+
let n = ge(e, t);
|
|
225
|
+
if (n) return n.get ? O(n.get) : null;
|
|
226
|
+
e = he(e);
|
|
227
227
|
}
|
|
228
228
|
return null;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Ge(e) {
|
|
231
231
|
try {
|
|
232
|
-
return
|
|
232
|
+
return D(e, ""), !0;
|
|
233
233
|
} catch {
|
|
234
234
|
return !1;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
var
|
|
237
|
+
var Ke = S(/* @__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(".")), qe = S(/* @__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(".")), Je = S([
|
|
238
238
|
"feBlend",
|
|
239
239
|
"feColorMatrix",
|
|
240
240
|
"feComponentTransfer",
|
|
@@ -260,7 +260,7 @@ var We = b(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
260
260
|
"feSpotLight",
|
|
261
261
|
"feTile",
|
|
262
262
|
"feTurbulence"
|
|
263
|
-
]),
|
|
263
|
+
]), Ye = S([
|
|
264
264
|
"animate",
|
|
265
265
|
"color-profile",
|
|
266
266
|
"cursor",
|
|
@@ -283,7 +283,7 @@ var We = b(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
283
283
|
"solidcolor",
|
|
284
284
|
"unknown",
|
|
285
285
|
"use"
|
|
286
|
-
]),
|
|
286
|
+
]), Xe = S(/* @__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(".")), Ze = S([
|
|
287
287
|
"maction",
|
|
288
288
|
"maligngroup",
|
|
289
289
|
"malignmark",
|
|
@@ -299,13 +299,13 @@ var We = b(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
299
299
|
"annotation-xml",
|
|
300
300
|
"mprescripts",
|
|
301
301
|
"none"
|
|
302
|
-
]),
|
|
302
|
+
]), Qe = S(["#text"]), $e = S(/* @__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(".")), et = S(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), tt = S(/* @__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(".")), nt = S([
|
|
303
303
|
"xlink:href",
|
|
304
304
|
"xml:id",
|
|
305
305
|
"xlink:title",
|
|
306
306
|
"xml:space",
|
|
307
307
|
"xmlns:xlink"
|
|
308
|
-
]),
|
|
308
|
+
]), rt = C(/{{[\w\W]*|^[\w\W]*}}/g), it = C(/<%[\w\W]*|^[\w\W]*%>/g), at = C(/\${[\w\W]*/g), ot = C(/^data-[\-\w.\u00B7-\uFFFF]+$/), st = C(/^aria-[\-\w]+$/), ct = C(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), lt = C(/^(?:\w+script|data):/i), ut = C(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), dt = C(/^html$/i), ft = C(/^[a-z][.\w]*(-[.\w]+)+$/i), pt = C(/<[/\w!]/g), mt = C(/<[/\w]/g), ht = C(/<\/no(script|embed|frames)/i), gt = C(/\/>/i), M = {
|
|
309
309
|
element: 1,
|
|
310
310
|
attribute: 2,
|
|
311
311
|
text: 3,
|
|
@@ -318,7 +318,7 @@ var We = b(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
318
318
|
documentType: 10,
|
|
319
319
|
documentFragment: 11,
|
|
320
320
|
notation: 12
|
|
321
|
-
},
|
|
321
|
+
}, _t = S(k({}, [
|
|
322
322
|
"style",
|
|
323
323
|
"script",
|
|
324
324
|
"xmp",
|
|
@@ -327,9 +327,9 @@ var We = b(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
327
327
|
"noframes",
|
|
328
328
|
"plaintext",
|
|
329
329
|
"noscript"
|
|
330
|
-
])),
|
|
330
|
+
])), vt = function() {
|
|
331
331
|
return typeof window > "u" ? null : window;
|
|
332
|
-
},
|
|
332
|
+
}, yt = function(e, t) {
|
|
333
333
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
334
334
|
let n = null, r = "data-tt-policy-suffix";
|
|
335
335
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -346,7 +346,7 @@ var We = b(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
346
346
|
} catch {
|
|
347
347
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
348
348
|
}
|
|
349
|
-
},
|
|
349
|
+
}, bt = function() {
|
|
350
350
|
return {
|
|
351
351
|
afterSanitizeAttributes: [],
|
|
352
352
|
afterSanitizeElements: [],
|
|
@@ -358,62 +358,62 @@ var We = b(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
358
358
|
uponSanitizeElement: [],
|
|
359
359
|
uponSanitizeShadowNode: []
|
|
360
360
|
};
|
|
361
|
-
},
|
|
362
|
-
return
|
|
363
|
-
},
|
|
364
|
-
let r =
|
|
365
|
-
return r && typeof r == "object" ?
|
|
361
|
+
}, xt = function(e, t, n, r) {
|
|
362
|
+
return E(e, t) && Ee(e[t]) ? k(r.base ? A(r.base) : {}, e[t], r.transform) : n;
|
|
363
|
+
}, St = function(e, t, n) {
|
|
364
|
+
let r = E(e, t) ? e[t] : void 0;
|
|
365
|
+
return r && typeof r == "object" ? A(r) : n();
|
|
366
366
|
};
|
|
367
|
-
function
|
|
368
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
369
|
-
if (t.version = "3.4.17", t.removed = [], !e || !e.document || e.document.nodeType !==
|
|
367
|
+
function Ct() {
|
|
368
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : vt(), t = (e) => Ct(e);
|
|
369
|
+
if (t.version = "3.4.17", t.removed = [], !e || !e.document || e.document.nodeType !== M.document || !e.Element) return t.isSupported = !1, t;
|
|
370
370
|
let n = e.document, r = n, i = r.currentScript;
|
|
371
371
|
e.DocumentFragment;
|
|
372
372
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
373
373
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
374
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f =
|
|
375
|
-
return
|
|
376
|
-
},
|
|
377
|
-
return
|
|
378
|
-
},
|
|
379
|
-
return
|
|
374
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = j(d, "cloneNode"), p = j(d, "remove"), m = j(d, "removeAttributeNode"), ee = j(d, "nextSibling"), h = j(d, "childNodes"), g = j(d, "parentNode"), te = j(d, "shadowRoot"), _ = j(d, "attributes"), v = o && o.prototype ? j(o.prototype, "nodeType") : null, ne = o && o.prototype ? j(o.prototype, "nodeName") : null, re = o && o.prototype ? j(o.prototype, "ownerDocument") : null, y = function(e) {
|
|
375
|
+
return v ? v(e) : e.nodeType;
|
|
376
|
+
}, ie = function(e) {
|
|
377
|
+
return ne ? ne(e) : e.nodeName;
|
|
378
|
+
}, ae = We(d, "namespaceURI"), oe = function(e) {
|
|
379
|
+
return ae ? ae(e) : e.namespaceURI;
|
|
380
380
|
};
|
|
381
381
|
if (typeof a == "function") {
|
|
382
382
|
let e = n.createElement("template");
|
|
383
383
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
384
384
|
}
|
|
385
|
-
let
|
|
386
|
-
if (
|
|
387
|
-
},
|
|
388
|
-
|
|
385
|
+
let b, se = "", ce, le = !1, ue = 0, de = function() {
|
|
386
|
+
if (ue > 0) throw Be("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.");
|
|
387
|
+
}, x = function(e) {
|
|
388
|
+
de(), ue++;
|
|
389
389
|
try {
|
|
390
|
-
return
|
|
390
|
+
return b.createHTML(e);
|
|
391
391
|
} finally {
|
|
392
|
-
|
|
392
|
+
ue--;
|
|
393
393
|
}
|
|
394
|
-
},
|
|
395
|
-
|
|
394
|
+
}, pe = function(e) {
|
|
395
|
+
de(), ue++;
|
|
396
396
|
try {
|
|
397
|
-
return
|
|
397
|
+
return b.createScriptURL(e);
|
|
398
398
|
} finally {
|
|
399
|
-
|
|
399
|
+
ue--;
|
|
400
400
|
}
|
|
401
|
-
},
|
|
402
|
-
return
|
|
403
|
-
},
|
|
404
|
-
t.isSupported = typeof
|
|
405
|
-
let
|
|
406
|
-
...We,
|
|
407
|
-
...Ge,
|
|
401
|
+
}, me = function() {
|
|
402
|
+
return le ||= (ce = yt(u, i), !0), ce;
|
|
403
|
+
}, he = n, ge = he.implementation, ve = he.createNodeIterator, ye = he.createDocumentFragment, be = he.getElementsByTagName, Ie = r.importNode, T = bt();
|
|
404
|
+
t.isSupported = typeof fe == "function" && typeof g == "function" && ge && ge.createHTMLDocument !== void 0;
|
|
405
|
+
let Le = rt, Re = it, ze = at, O = ot, Ve = st, He = lt, wt = ut, Tt = ft, Et = ct, N = null, Dt = k({}, [
|
|
408
406
|
...Ke,
|
|
407
|
+
...qe,
|
|
409
408
|
...Je,
|
|
410
|
-
...Xe
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
...Qe,
|
|
409
|
+
...Xe,
|
|
410
|
+
...Qe
|
|
411
|
+
]), P = null, F = k({}, [
|
|
414
412
|
...$e,
|
|
415
|
-
...et
|
|
416
|
-
|
|
413
|
+
...et,
|
|
414
|
+
...tt,
|
|
415
|
+
...nt
|
|
416
|
+
]), I = Object.seal(_e(null, {
|
|
417
417
|
tagNameCheck: {
|
|
418
418
|
writable: !0,
|
|
419
419
|
configurable: !1,
|
|
@@ -432,7 +432,7 @@ function xt() {
|
|
|
432
432
|
enumerable: !0,
|
|
433
433
|
value: !1
|
|
434
434
|
}
|
|
435
|
-
})),
|
|
435
|
+
})), Ot = null, L = null, R = Object.seal(_e(null, {
|
|
436
436
|
tagCheck: {
|
|
437
437
|
writable: !0,
|
|
438
438
|
configurable: !1,
|
|
@@ -445,14 +445,14 @@ function xt() {
|
|
|
445
445
|
enumerable: !0,
|
|
446
446
|
value: null
|
|
447
447
|
}
|
|
448
|
-
})),
|
|
448
|
+
})), kt = !0, At = !0, jt = !1, Mt = !0, z = !1, B = !0, V = !1, Nt = !1, Pt = null, Ft = null, It = !1, Lt = !1, Rt = !1, zt = !1, Bt = !0, Vt = !1, Ht = "user-content-", Ut = !0, Wt = !1, Gt = null, Kt = {}, qt = null, Jt = k({}, /* @__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(".")), Yt = null, Xt = k({}, [
|
|
449
449
|
"audio",
|
|
450
450
|
"video",
|
|
451
451
|
"img",
|
|
452
452
|
"source",
|
|
453
453
|
"image",
|
|
454
454
|
"track"
|
|
455
|
-
]),
|
|
455
|
+
]), Zt = null, Qt = k({}, [
|
|
456
456
|
"alt",
|
|
457
457
|
"class",
|
|
458
458
|
"for",
|
|
@@ -467,88 +467,88 @@ function xt() {
|
|
|
467
467
|
"value",
|
|
468
468
|
"style",
|
|
469
469
|
"xmlns"
|
|
470
|
-
]),
|
|
471
|
-
Qt,
|
|
470
|
+
]), $t = "http://www.w3.org/1998/Math/MathML", en = "http://www.w3.org/2000/svg", H = "http://www.w3.org/1999/xhtml", tn = H, nn = !1, rn = null, an = k({}, [
|
|
472
471
|
$t,
|
|
473
|
-
|
|
474
|
-
|
|
472
|
+
en,
|
|
473
|
+
H
|
|
474
|
+
], je), on = S([
|
|
475
475
|
"mi",
|
|
476
476
|
"mo",
|
|
477
477
|
"mn",
|
|
478
478
|
"ms",
|
|
479
479
|
"mtext"
|
|
480
|
-
]),
|
|
480
|
+
]), sn = k({}, on), cn = S(["annotation-xml"]), ln = k({}, cn), un = k({}, [
|
|
481
481
|
"title",
|
|
482
482
|
"style",
|
|
483
483
|
"font",
|
|
484
484
|
"a",
|
|
485
485
|
"script"
|
|
486
|
-
]),
|
|
486
|
+
]), dn = null, fn = ["application/xhtml+xml", "text/html"], U = null, pn = null, mn = n.createElement("form"), hn = function(e) {
|
|
487
487
|
return e instanceof RegExp || e instanceof Function;
|
|
488
|
-
},
|
|
488
|
+
}, gn = function() {
|
|
489
489
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
490
|
-
if (
|
|
491
|
-
e && typeof e == "object" || (e = {}), e =
|
|
492
|
-
transform:
|
|
493
|
-
base:
|
|
494
|
-
}),
|
|
495
|
-
transform:
|
|
496
|
-
base:
|
|
497
|
-
}),
|
|
498
|
-
let t =
|
|
499
|
-
if (
|
|
490
|
+
if (pn && pn === e) return;
|
|
491
|
+
e && typeof e == "object" || (e = {}), e = A(e), dn = fn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, U = dn === "application/xhtml+xml" ? je : Ae, N = xt(e, "ALLOWED_TAGS", Dt, { transform: U }), P = xt(e, "ALLOWED_ATTR", F, { transform: U }), rn = xt(e, "ALLOWED_NAMESPACES", an, { transform: je }), Zt = xt(e, "ADD_URI_SAFE_ATTR", Qt, {
|
|
492
|
+
transform: U,
|
|
493
|
+
base: Qt
|
|
494
|
+
}), Yt = xt(e, "ADD_DATA_URI_TAGS", Xt, {
|
|
495
|
+
transform: U,
|
|
496
|
+
base: Xt
|
|
497
|
+
}), qt = xt(e, "FORBID_CONTENTS", Jt, { transform: U }), Ot = xt(e, "FORBID_TAGS", A({}), { transform: U }), L = xt(e, "FORBID_ATTR", A({}), { transform: U }), Kt = E(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? A(e.USE_PROFILES) : e.USE_PROFILES : !1, kt = e.ALLOW_ARIA_ATTR !== !1, At = e.ALLOW_DATA_ATTR !== !1, jt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Mt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, z = e.SAFE_FOR_TEMPLATES || !1, B = e.SAFE_FOR_XML !== !1, V = e.WHOLE_DOCUMENT || !1, Lt = e.RETURN_DOM || !1, Rt = e.RETURN_DOM_FRAGMENT || !1, zt = e.RETURN_TRUSTED_TYPE || !1, It = e.FORCE_BODY || !1, Bt = e.SANITIZE_DOM !== !1, Vt = e.SANITIZE_NAMED_PROPS || !1, Ut = e.KEEP_CONTENT !== !1, Wt = e.IN_PLACE || !1, Et = Ge(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : ct, tn = typeof e.NAMESPACE == "string" ? e.NAMESPACE : H, sn = St(e, "MATHML_TEXT_INTEGRATION_POINTS", () => k({}, on)), ln = St(e, "HTML_INTEGRATION_POINTS", () => k({}, cn));
|
|
498
|
+
let t = St(e, "CUSTOM_ELEMENT_HANDLING", () => _e(null));
|
|
499
|
+
if (I = _e(null), E(t, "tagNameCheck") && hn(t.tagNameCheck) && (I.tagNameCheck = t.tagNameCheck), E(t, "attributeNameCheck") && hn(t.attributeNameCheck) && (I.attributeNameCheck = t.attributeNameCheck), E(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (I.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), C(I), z && (At = !1), Rt && (Lt = !0), Kt && (N = k({}, Qe), P = _e(null), Kt.html === !0 && (k(N, Ke), k(P, $e)), Kt.svg === !0 && (k(N, qe), k(P, et), k(P, nt)), Kt.svgFilters === !0 && (k(N, Je), k(P, et), k(P, nt)), Kt.mathMl === !0 && (k(N, Xe), k(P, tt), k(P, nt))), R.tagCheck = null, R.attributeCheck = null, E(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? R.tagCheck = e.ADD_TAGS : Ee(e.ADD_TAGS) && (N === Dt && (N = A(N)), k(N, e.ADD_TAGS, U))), E(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? R.attributeCheck = e.ADD_ATTR : Ee(e.ADD_ATTR) && (P === F && (P = A(P)), k(P, e.ADD_ATTR, U))), E(e, "ADD_FORBID_CONTENTS") && Ee(e.ADD_FORBID_CONTENTS) && (qt === Jt && (qt = A(qt)), k(qt, e.ADD_FORBID_CONTENTS, U)), Ut && (N["#text"] = !0), V && k(N, [
|
|
500
500
|
"html",
|
|
501
501
|
"head",
|
|
502
502
|
"body"
|
|
503
|
-
]),
|
|
504
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
505
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
506
|
-
let t =
|
|
507
|
-
|
|
503
|
+
]), N.table && (k(N, ["tbody"]), delete Ot.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
504
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Be("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
505
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Be("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
506
|
+
let t = b;
|
|
507
|
+
b = e.TRUSTED_TYPES_POLICY;
|
|
508
508
|
try {
|
|
509
|
-
|
|
509
|
+
se = x("");
|
|
510
510
|
} catch (e) {
|
|
511
|
-
throw
|
|
511
|
+
throw b = t, e;
|
|
512
512
|
}
|
|
513
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (
|
|
514
|
-
|
|
515
|
-
},
|
|
516
|
-
...
|
|
517
|
-
...
|
|
518
|
-
...
|
|
519
|
-
]),
|
|
520
|
-
return t.namespaceURI ===
|
|
521
|
-
}, yn = function(e, t, n) {
|
|
522
|
-
return t.namespaceURI === U ? e === "math" : t.namespaceURI === $t ? e === "math" && cn[n] : !!_n[e];
|
|
513
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (b = void 0, se = "") : (b === void 0 && (b = me()), b && typeof se == "string" && (se = x("")));
|
|
514
|
+
S && S(e), pn = e;
|
|
515
|
+
}, _n = k({}, [
|
|
516
|
+
...qe,
|
|
517
|
+
...Je,
|
|
518
|
+
...Ye
|
|
519
|
+
]), vn = k({}, [...Xe, ...Ze]), yn = function(e, t, n) {
|
|
520
|
+
return t.namespaceURI === H ? e === "svg" : t.namespaceURI === $t ? e === "svg" && (n === "annotation-xml" || sn[n]) : !!_n[e];
|
|
523
521
|
}, bn = function(e, t, n) {
|
|
524
|
-
return t.namespaceURI ===
|
|
525
|
-
}, xn = function(e) {
|
|
526
|
-
|
|
527
|
-
return r && v(r) === j.element ? (i = { namespaceURI: se(r) }, a = ke(ae(r))) : (i = { namespaceURI: en }, a = "template"), nn[t] ? t === $t ? vn(n, i, a) : t === Qt ? yn(n, i, a) : t === U ? bn(n, i, a) : !!(un === "application/xhtml+xml" && nn[t]) : !1;
|
|
522
|
+
return t.namespaceURI === H ? e === "math" : t.namespaceURI === en ? e === "math" && ln[n] : !!vn[e];
|
|
523
|
+
}, xn = function(e, t, n) {
|
|
524
|
+
return t.namespaceURI === en && !ln[n] || t.namespaceURI === $t && !sn[n] ? !1 : !vn[e] && (un[e] || !_n[e]);
|
|
528
525
|
}, Sn = function(e) {
|
|
529
|
-
|
|
526
|
+
let t = oe(e), n = Ae(ie(e)), r = g(e), i, a;
|
|
527
|
+
return r && y(r) === M.element ? (i = { namespaceURI: oe(r) }, a = Ae(ie(r))) : (i = { namespaceURI: tn }, a = "template"), rn[t] ? t === en ? yn(n, i, a) : t === $t ? bn(n, i, a) : t === H ? xn(n, i, a) : !!(dn === "application/xhtml+xml" && rn[t]) : !1;
|
|
528
|
+
}, W = function(e) {
|
|
529
|
+
Ce(t.removed, { element: e });
|
|
530
530
|
try {
|
|
531
|
-
|
|
531
|
+
g(e).removeChild(e);
|
|
532
532
|
} catch {
|
|
533
|
-
if (p(e), !
|
|
533
|
+
if (p(e), !g(e)) throw Be("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
534
534
|
}
|
|
535
535
|
}, Cn = function(e, t, n) {
|
|
536
536
|
try {
|
|
537
|
-
|
|
537
|
+
m(e, t);
|
|
538
538
|
} catch {
|
|
539
539
|
try {
|
|
540
540
|
e.removeAttribute(n);
|
|
541
541
|
} catch {}
|
|
542
542
|
}
|
|
543
543
|
}, wn = function(e) {
|
|
544
|
-
|
|
544
|
+
On(e);
|
|
545
545
|
let t = h(e);
|
|
546
|
-
t &&
|
|
546
|
+
t && w(we(t), (e) => {
|
|
547
547
|
try {
|
|
548
548
|
p(e);
|
|
549
549
|
} catch {}
|
|
550
550
|
});
|
|
551
|
-
let n =
|
|
551
|
+
let n = y(e) === M.element ? _(e) : null;
|
|
552
552
|
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
553
553
|
let r = n[t], i = r && r.name;
|
|
554
554
|
typeof i == "string" && Cn(e, r, i);
|
|
@@ -559,205 +559,205 @@ function xt() {
|
|
|
559
559
|
} catch {
|
|
560
560
|
r = null;
|
|
561
561
|
}
|
|
562
|
-
|
|
562
|
+
Ce(t.removed, {
|
|
563
563
|
attribute: r || null,
|
|
564
564
|
from: n
|
|
565
565
|
});
|
|
566
566
|
try {
|
|
567
|
-
r ?
|
|
567
|
+
r ? m(n, r) : n.removeAttribute(e);
|
|
568
568
|
} catch {
|
|
569
569
|
try {
|
|
570
570
|
n.removeAttribute(e);
|
|
571
571
|
} catch {}
|
|
572
572
|
}
|
|
573
573
|
if (e === "is") {
|
|
574
|
-
if (
|
|
575
|
-
|
|
574
|
+
if (Lt || Rt) try {
|
|
575
|
+
W(n);
|
|
576
576
|
} catch {}
|
|
577
577
|
else try {
|
|
578
578
|
n.setAttribute(e, "");
|
|
579
579
|
} catch {}
|
|
580
580
|
}
|
|
581
581
|
}, En = function(e) {
|
|
582
|
-
let t =
|
|
582
|
+
let t = _(e);
|
|
583
583
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
584
584
|
let r = t[n], i = r && r.name;
|
|
585
|
-
typeof i != "string" ||
|
|
585
|
+
typeof i != "string" || P[U(i)] || Cn(e, r, i);
|
|
586
586
|
}
|
|
587
|
-
},
|
|
587
|
+
}, Dn = function(e, t) {
|
|
588
588
|
let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = [e];
|
|
589
589
|
for (; r.length > 0;) {
|
|
590
590
|
let e = r.pop();
|
|
591
591
|
if (t(e) === !1) continue;
|
|
592
|
-
if (n &&
|
|
593
|
-
let t =
|
|
594
|
-
|
|
592
|
+
if (n && y(e) === M.element) {
|
|
593
|
+
let t = te(e);
|
|
594
|
+
q(t) && r.push(t);
|
|
595
595
|
}
|
|
596
596
|
let i = h(e);
|
|
597
597
|
if (i) for (let e = i.length - 1; e >= 0; --e) r.push(i[e]);
|
|
598
598
|
}
|
|
599
|
-
}, Dn = function(e) {
|
|
600
|
-
G(e, (e) => {
|
|
601
|
-
v(e) === j.element && En(e);
|
|
602
|
-
});
|
|
603
599
|
}, On = function(e) {
|
|
600
|
+
Dn(e, (e) => {
|
|
601
|
+
y(e) === M.element && En(e);
|
|
602
|
+
});
|
|
603
|
+
}, kn = function(e) {
|
|
604
604
|
let t = [];
|
|
605
|
-
return
|
|
605
|
+
return Dn(e, (e) => {
|
|
606
606
|
t.push(e);
|
|
607
607
|
}, !0), t;
|
|
608
|
-
},
|
|
609
|
-
let n =
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}),
|
|
613
|
-
|
|
608
|
+
}, G = function(e, t) {
|
|
609
|
+
let n = De();
|
|
610
|
+
w(kn(e), (e) => {
|
|
611
|
+
y(e) === M.element && Oe(n, e);
|
|
612
|
+
}), w(t, (e) => {
|
|
613
|
+
y(e) === M.element && !ke(n, e) && En(e);
|
|
614
614
|
});
|
|
615
|
-
},
|
|
615
|
+
}, An = function(e, n) {
|
|
616
616
|
let r = !1;
|
|
617
|
-
return
|
|
618
|
-
t.element && (r ||= t.element === e,
|
|
619
|
-
}),
|
|
620
|
-
},
|
|
621
|
-
let n =
|
|
622
|
-
|
|
617
|
+
return w(t.removed, (t) => {
|
|
618
|
+
t.element && (r ||= t.element === e, On(t.element));
|
|
619
|
+
}), G(e, n), r;
|
|
620
|
+
}, jn = function(e, t) {
|
|
621
|
+
let n = Gt, r = null, i = () => (r || (r = De(), w(t, (e) => {
|
|
622
|
+
Oe(r, e);
|
|
623
623
|
})), r);
|
|
624
624
|
for (let t = 0;; t++) {
|
|
625
|
-
let r =
|
|
626
|
-
if (
|
|
627
|
-
|
|
625
|
+
let r = kn(e), a = [e], o = !1;
|
|
626
|
+
if (w(r, (e) => {
|
|
627
|
+
y(e) === M.documentFragment ? Ce(a, e) : !o && !ke(n, e) && (o = ke(i(), e));
|
|
628
628
|
}), !o) return;
|
|
629
|
-
if (t >= 8) throw
|
|
630
|
-
|
|
631
|
-
|
|
629
|
+
if (t >= 8) throw Be("the tree kept changing during in-place sanitization; refusing to return it");
|
|
630
|
+
w(a, (t, n) => {
|
|
631
|
+
Mn(t, n > 0, e, i());
|
|
632
632
|
});
|
|
633
633
|
}
|
|
634
|
-
},
|
|
635
|
-
let i =
|
|
636
|
-
for (; a = i.nextNode();)
|
|
637
|
-
},
|
|
638
|
-
|
|
639
|
-
},
|
|
640
|
-
return
|
|
641
|
-
},
|
|
642
|
-
|
|
643
|
-
let t =
|
|
644
|
-
if (t ===
|
|
634
|
+
}, Mn = function(e, t, n, r) {
|
|
635
|
+
let i = Ln(e), a;
|
|
636
|
+
for (; a = i.nextNode();) ke(r, a) && !ke(Gt, a) && (t && Y(T.uponSanitizeShadowNode, a, null), Gn(a, n), Zn(a, n), q(a.content) && Qn(a.content));
|
|
637
|
+
}, Nn = function(e) {
|
|
638
|
+
Gt && Oe(Gt, e);
|
|
639
|
+
}, Pn = function(e, t) {
|
|
640
|
+
return B ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
|
|
641
|
+
}, Fn = function(e) {
|
|
642
|
+
B && Dn(e, (e) => {
|
|
643
|
+
let t = y(e);
|
|
644
|
+
if (t === M.processingInstruction || t === M.comment && D(mt, e.data)) {
|
|
645
645
|
try {
|
|
646
646
|
p(e);
|
|
647
647
|
} catch {}
|
|
648
648
|
return !1;
|
|
649
649
|
}
|
|
650
|
-
if (t ===
|
|
651
|
-
let t = e, n =
|
|
650
|
+
if (t === M.element) {
|
|
651
|
+
let t = e, n = U(ie(e));
|
|
652
652
|
try {
|
|
653
|
-
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") &&
|
|
653
|
+
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Pn("for", n) && t.removeAttribute("for");
|
|
654
654
|
} catch {}
|
|
655
655
|
}
|
|
656
656
|
return !0;
|
|
657
657
|
});
|
|
658
|
-
},
|
|
658
|
+
}, In = function(e) {
|
|
659
659
|
let t = null, r = null;
|
|
660
660
|
if (It) e = "<remove></remove>" + e;
|
|
661
661
|
else {
|
|
662
|
-
let t =
|
|
662
|
+
let t = Me(e, /^[\r\n\t ]+/);
|
|
663
663
|
r = t && t[0];
|
|
664
664
|
}
|
|
665
|
-
|
|
666
|
-
let i =
|
|
667
|
-
if (
|
|
668
|
-
t = new l().parseFromString(i,
|
|
665
|
+
dn === "application/xhtml+xml" && tn === H && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
666
|
+
let i = b ? x(e) : e;
|
|
667
|
+
if (tn === H) try {
|
|
668
|
+
t = new l().parseFromString(i, dn);
|
|
669
669
|
} catch {}
|
|
670
670
|
if (!t || !t.documentElement) {
|
|
671
|
-
t =
|
|
671
|
+
t = ge.createDocument(tn, "template", null);
|
|
672
672
|
try {
|
|
673
|
-
t.documentElement.innerHTML =
|
|
673
|
+
t.documentElement.innerHTML = nn ? se : i;
|
|
674
674
|
} catch {}
|
|
675
675
|
}
|
|
676
676
|
let a = t.body || t.documentElement;
|
|
677
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
678
|
-
},
|
|
679
|
-
let t =
|
|
680
|
-
return
|
|
681
|
-
},
|
|
682
|
-
return e =
|
|
683
|
-
},
|
|
684
|
-
|
|
677
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), tn === H ? be.call(t, V ? "html" : "body")[0] : V ? t.documentElement : a;
|
|
678
|
+
}, Ln = function(e) {
|
|
679
|
+
let t = re ? re(e) : e.ownerDocument;
|
|
680
|
+
return ve.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
681
|
+
}, Rn = function(e) {
|
|
682
|
+
return e = Ne(e, Le, " "), e = Ne(e, Re, " "), e = Ne(e, ze, " "), e;
|
|
683
|
+
}, K = function(e) {
|
|
684
|
+
zn(e);
|
|
685
685
|
let t = e.querySelectorAll?.call(e, "template");
|
|
686
|
-
t &&
|
|
687
|
-
|
|
686
|
+
t && w(t, (e) => {
|
|
687
|
+
q(e.content) && K(e.content);
|
|
688
688
|
});
|
|
689
|
-
},
|
|
689
|
+
}, zn = function(e) {
|
|
690
690
|
e.normalize();
|
|
691
|
-
let t =
|
|
692
|
-
for (; r;) r.data =
|
|
693
|
-
},
|
|
694
|
-
let t =
|
|
695
|
-
return typeof t != "string" ||
|
|
696
|
-
},
|
|
697
|
-
if (!
|
|
691
|
+
let t = re ? re(e) : e.ownerDocument, n = ve.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
692
|
+
for (; r;) r.data = Rn(r.data), r = n.nextNode();
|
|
693
|
+
}, Bn = function(e) {
|
|
694
|
+
let t = ne ? ne(e) : null;
|
|
695
|
+
return typeof t != "string" || U(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== _(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== v(e) || e.childNodes !== h(e);
|
|
696
|
+
}, q = function(e) {
|
|
697
|
+
if (!v || typeof e != "object" || !e) return !1;
|
|
698
698
|
try {
|
|
699
|
-
return
|
|
699
|
+
return v(e) === M.documentFragment;
|
|
700
700
|
} catch {
|
|
701
701
|
return !1;
|
|
702
702
|
}
|
|
703
|
-
},
|
|
704
|
-
if (!
|
|
703
|
+
}, J = function(e) {
|
|
704
|
+
if (!v || typeof e != "object" || !e) return !1;
|
|
705
705
|
try {
|
|
706
|
-
return typeof
|
|
706
|
+
return typeof v(e) == "number";
|
|
707
707
|
} catch {
|
|
708
708
|
return !1;
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
|
-
function
|
|
712
|
-
e.length !== 0 &&
|
|
713
|
-
e.call(t, n, r,
|
|
711
|
+
function Y(e, n, r) {
|
|
712
|
+
e.length !== 0 && w(e, (e) => {
|
|
713
|
+
e.call(t, n, r, pn);
|
|
714
714
|
});
|
|
715
715
|
}
|
|
716
|
-
let
|
|
717
|
-
return !!(
|
|
718
|
-
},
|
|
719
|
-
return e instanceof RegExp ?
|
|
720
|
-
},
|
|
721
|
-
if (!
|
|
722
|
-
if (
|
|
723
|
-
let t =
|
|
716
|
+
let X = function(e, t) {
|
|
717
|
+
return !!(B && e.hasChildNodes() && !J(e.firstElementChild) && D(pt, e.textContent) && D(pt, e.innerHTML) || B && _t[t] && y(e) === M.element && oe(e) === H && (J(e.firstElementChild) || typeof e.textContent == "string" && D(pt, e.textContent)) || e.nodeType === M.processingInstruction || B && e.nodeType === M.comment && D(mt, e.data));
|
|
718
|
+
}, Vn = function(e, t) {
|
|
719
|
+
return e instanceof RegExp ? D(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
|
|
720
|
+
}, Hn = function(e, t, n) {
|
|
721
|
+
if (!Ot[t] && Jn(t) && Vn(I.tagNameCheck, t)) return !1;
|
|
722
|
+
if (Ut && !qt[t] && !qt[Ae(t)]) {
|
|
723
|
+
let t = g(e), r = h(e);
|
|
724
724
|
if (r && t) {
|
|
725
725
|
let i = r.length;
|
|
726
726
|
for (let a = i - 1; a >= 0; --a) {
|
|
727
727
|
let i = e === n ? f(r[a], !0) : r[a];
|
|
728
|
-
t.insertBefore(i,
|
|
728
|
+
t.insertBefore(i, ee(e));
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
|
-
return
|
|
733
|
-
},
|
|
734
|
-
return e.length === 0 ? t : t === n || t === r ?
|
|
735
|
-
},
|
|
736
|
-
return e === t ||
|
|
737
|
-
},
|
|
738
|
-
if (
|
|
739
|
-
if (
|
|
740
|
-
let r =
|
|
741
|
-
if (
|
|
732
|
+
return W(e), !0;
|
|
733
|
+
}, Un = function(e, t, n, r) {
|
|
734
|
+
return e.length === 0 ? t : t === n || t === r ? A(t) : t;
|
|
735
|
+
}, Wn = function(e, t) {
|
|
736
|
+
return e === t || g(e) !== null ? !1 : (Wt && On(e), !0);
|
|
737
|
+
}, Gn = function(e, n) {
|
|
738
|
+
if (Nn(e), Y(T.beforeSanitizeElements, e, null), Wn(e, n)) return !0;
|
|
739
|
+
if (Bn(e)) return W(e), !0;
|
|
740
|
+
let r = U(ie(e));
|
|
741
|
+
if (N = Un(T.uponSanitizeElement, N, Dt, Pt), Y(T.uponSanitizeElement, e, {
|
|
742
742
|
tagName: r,
|
|
743
|
-
allowedTags:
|
|
744
|
-
}),
|
|
745
|
-
if (
|
|
746
|
-
if (
|
|
747
|
-
let t =
|
|
748
|
-
return t === !1 && (
|
|
743
|
+
allowedTags: N
|
|
744
|
+
}), Wn(e, n)) return !0;
|
|
745
|
+
if (X(e, r)) return W(e), !0;
|
|
746
|
+
if (Ot[r] || !(R.tagCheck instanceof Function && R.tagCheck(r)) && !N[r]) {
|
|
747
|
+
let t = Hn(e, r, n);
|
|
748
|
+
return t === !1 && (Y(T.afterSanitizeElements, e, null), Wn(e, n)) ? !0 : t;
|
|
749
749
|
}
|
|
750
|
-
if (
|
|
751
|
-
if (
|
|
752
|
-
let n =
|
|
753
|
-
e.textContent !== n && (
|
|
750
|
+
if (y(e) === M.element && !Sn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && D(ht, e.innerHTML)) return W(e), !0;
|
|
751
|
+
if (z && e.nodeType === M.text) {
|
|
752
|
+
let n = Rn(e.textContent);
|
|
753
|
+
e.textContent !== n && (Ce(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
754
754
|
}
|
|
755
|
-
return
|
|
756
|
-
},
|
|
757
|
-
if (
|
|
758
|
-
let i =
|
|
759
|
-
return
|
|
760
|
-
},
|
|
755
|
+
return Y(T.afterSanitizeElements, e, null), Wn(e, n);
|
|
756
|
+
}, Kn = function(e, t, r) {
|
|
757
|
+
if (L[t] || Pn(t, e) || Bt && (t === "id" || t === "name") && (r in n || r in mn)) return !1;
|
|
758
|
+
let i = P[t] || R.attributeCheck instanceof Function && R.attributeCheck(t, e);
|
|
759
|
+
return At && D(O, t) || kt && D(Ve, t) ? !0 : i ? Zt[t] || D(Et, Ne(r, wt, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Pe(r, "data:") === 0 && Yt[e] || jt && !D(He, Ne(r, wt, "")) ? !0 : !r : Jn(e) && Vn(I.tagNameCheck, e) && Vn(I.attributeNameCheck, t, e) || t === "is" && I.allowCustomizedBuiltInElements && Vn(I.tagNameCheck, r);
|
|
760
|
+
}, qn = k({}, [
|
|
761
761
|
"annotation-xml",
|
|
762
762
|
"color-profile",
|
|
763
763
|
"font-face",
|
|
@@ -766,46 +766,46 @@ function xt() {
|
|
|
766
766
|
"font-face-src",
|
|
767
767
|
"font-face-uri",
|
|
768
768
|
"missing-glyph"
|
|
769
|
-
]),
|
|
770
|
-
return !
|
|
771
|
-
},
|
|
772
|
-
if (
|
|
773
|
-
case "TrustedHTML": return
|
|
774
|
-
case "TrustedScriptURL": return
|
|
769
|
+
]), Jn = function(e) {
|
|
770
|
+
return !qn[Ae(e)] && D(Tt, e);
|
|
771
|
+
}, Yn = function(e, t, n, r) {
|
|
772
|
+
if (b && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
773
|
+
case "TrustedHTML": return x(r);
|
|
774
|
+
case "TrustedScriptURL": return pe(r);
|
|
775
775
|
}
|
|
776
776
|
return r;
|
|
777
|
-
},
|
|
777
|
+
}, Xn = function(e, t, n, r) {
|
|
778
778
|
try {
|
|
779
|
-
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !
|
|
779
|
+
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Bn(e) || (W(e), !1);
|
|
780
780
|
} catch {
|
|
781
781
|
return Tn(t, e), !1;
|
|
782
782
|
}
|
|
783
|
-
},
|
|
784
|
-
return
|
|
783
|
+
}, Z = function(e, t) {
|
|
784
|
+
return B && D(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : Ae(e) === "attributename" && Me(t, "href") !== null;
|
|
785
785
|
}, Zn = function(e, n) {
|
|
786
|
-
if (
|
|
786
|
+
if (Y(T.beforeSanitizeAttributes, e, null), Wn(e, n)) return;
|
|
787
787
|
let r = e.attributes;
|
|
788
|
-
if (!r ||
|
|
789
|
-
|
|
788
|
+
if (!r || Bn(e)) return;
|
|
789
|
+
P = Un(T.uponSanitizeAttribute, P, F, Ft);
|
|
790
790
|
let i = {
|
|
791
791
|
attrName: "",
|
|
792
792
|
attrValue: "",
|
|
793
793
|
keepAttr: !0,
|
|
794
|
-
allowedAttributes:
|
|
794
|
+
allowedAttributes: P,
|
|
795
795
|
forceKeepAttr: void 0
|
|
796
|
-
}, a = r.length, o =
|
|
796
|
+
}, a = r.length, o = U(e.nodeName);
|
|
797
797
|
for (; a--;) {
|
|
798
|
-
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u =
|
|
799
|
-
i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0,
|
|
798
|
+
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = U(s), d = l, f = s === "value" ? d : Fe(d), p = !1;
|
|
799
|
+
i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, Y(T.uponSanitizeAttribute, e, i), f = i.attrValue, Vt && (u === "id" || u === "name") && Pe(f, Ht) !== 0 && (Tn(s, e, n), f = Ht + f, p = !0), Z(s, f) ? Tn(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Mt && D(gt, f) ? Tn(s, e, n) : (z && (f = Rn(f)), Kn(o, u, f) ? (f = Yn(o, u, c, f), f !== d && Xn(e, s, c, f) && p && Se(t.removed)) : Tn(s, e, n)) : Tn(s, e, n));
|
|
800
800
|
}
|
|
801
|
-
|
|
801
|
+
Y(T.afterSanitizeAttributes, e, null), Wn(e, n);
|
|
802
802
|
}, Qn = function(e) {
|
|
803
|
-
let t = null, n =
|
|
804
|
-
for (
|
|
805
|
-
let e =
|
|
806
|
-
|
|
803
|
+
let t = null, n = Ln(e);
|
|
804
|
+
for (Y(T.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Y(T.uponSanitizeShadowNode, t, null), Gn(t, e), Zn(t, e), q(t.content) && Qn(t.content), y(t) === M.element) {
|
|
805
|
+
let e = te(t);
|
|
806
|
+
q(e) && ($n(e), Qn(e));
|
|
807
807
|
}
|
|
808
|
-
|
|
808
|
+
z && zn(e), Y(T.afterSanitizeShadowDOM, e, null);
|
|
809
809
|
}, $n = function(e) {
|
|
810
810
|
let t = [{
|
|
811
811
|
node: e,
|
|
@@ -817,24 +817,24 @@ function xt() {
|
|
|
817
817
|
Qn(e.shadow);
|
|
818
818
|
continue;
|
|
819
819
|
}
|
|
820
|
-
let n = e.node, r =
|
|
820
|
+
let n = e.node, r = y(n) === M.element, i = h(n);
|
|
821
821
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
822
822
|
node: i[e],
|
|
823
823
|
shadow: null
|
|
824
824
|
});
|
|
825
825
|
if (r) {
|
|
826
|
-
let e =
|
|
827
|
-
if (typeof e == "string" &&
|
|
826
|
+
let e = ne ? ne(n) : null;
|
|
827
|
+
if (typeof e == "string" && U(e) === "template") {
|
|
828
828
|
let e = n.content;
|
|
829
|
-
|
|
829
|
+
q(e) && t.push({
|
|
830
830
|
node: e,
|
|
831
831
|
shadow: null
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
835
|
if (r) {
|
|
836
|
-
let e =
|
|
837
|
-
|
|
836
|
+
let e = te(n);
|
|
837
|
+
q(e) && t.push({
|
|
838
838
|
node: null,
|
|
839
839
|
shadow: e
|
|
840
840
|
}, {
|
|
@@ -846,74 +846,74 @@ function xt() {
|
|
|
846
846
|
};
|
|
847
847
|
return t.sanitize = function(e) {
|
|
848
848
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
849
|
-
if (
|
|
849
|
+
if (nn = !e, nn && (e = "<!-->"), typeof e != "string" && !J(e) && (e = Ue(e), typeof e != "string")) throw Be("dirty is not a string, aborting");
|
|
850
850
|
if (!t.isSupported) return e;
|
|
851
|
-
Nt ? (
|
|
852
|
-
let c =
|
|
851
|
+
Nt ? (N = Pt, P = Ft) : gn(n), (T.uponSanitizeElement.length > 0 || T.uponSanitizeAttribute.length > 0) && (N = A(N)), T.uponSanitizeAttribute.length > 0 && (P = A(P)), t.removed = [];
|
|
852
|
+
let c = Wt && typeof e != "string" && J(e), l = [], u = Gt;
|
|
853
853
|
if (c) {
|
|
854
|
-
|
|
855
|
-
let t =
|
|
854
|
+
Fn(e);
|
|
855
|
+
let t = ie(e);
|
|
856
856
|
if (typeof t == "string") {
|
|
857
|
-
let n =
|
|
858
|
-
if (!
|
|
857
|
+
let n = U(t);
|
|
858
|
+
if (!N[n] || Ot[n]) throw wn(e), Be("root node is forbidden and cannot be sanitized in-place");
|
|
859
859
|
}
|
|
860
|
-
if (
|
|
861
|
-
l =
|
|
862
|
-
} else if (
|
|
860
|
+
if (Bn(e)) throw wn(e), Be("root node is clobbered and cannot be sanitized in-place");
|
|
861
|
+
l = kn(e), Gt = De();
|
|
862
|
+
} else if (J(e)) i = In("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === M.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), $n(i);
|
|
863
863
|
else {
|
|
864
|
-
if (!
|
|
865
|
-
if (i =
|
|
864
|
+
if (!Lt && !z && !V && e.indexOf("<") === -1) return b && zt ? x(e) : e;
|
|
865
|
+
if (i = In(e), !i) return Lt ? null : zt ? se : "";
|
|
866
866
|
}
|
|
867
|
-
i && It &&
|
|
867
|
+
i && It && W(i.firstChild);
|
|
868
868
|
let d = c ? e : i;
|
|
869
869
|
try {
|
|
870
870
|
c && $n(e);
|
|
871
|
-
let t =
|
|
872
|
-
for (; o = t.nextNode();)
|
|
873
|
-
c &&
|
|
871
|
+
let t = Ln(d);
|
|
872
|
+
for (; o = t.nextNode();) Gn(o, d), Zn(o, d), q(o.content) && Qn(o.content);
|
|
873
|
+
c && jn(e, l);
|
|
874
874
|
} catch (t) {
|
|
875
|
-
throw c && (wn(e),
|
|
875
|
+
throw c && (wn(e), An(e, l)), t;
|
|
876
876
|
} finally {
|
|
877
|
-
|
|
877
|
+
Gt = u;
|
|
878
878
|
}
|
|
879
879
|
if (c) {
|
|
880
|
-
if (
|
|
881
|
-
return
|
|
880
|
+
if (An(e, l)) throw Be("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
881
|
+
return z && K(e), e;
|
|
882
882
|
}
|
|
883
|
-
if (
|
|
884
|
-
if (
|
|
883
|
+
if (Lt) {
|
|
884
|
+
if (z && K(i), Rt) for (s = ye.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
885
885
|
else s = i;
|
|
886
|
-
return (
|
|
886
|
+
return (P.shadowroot || P.shadowrootmode) && (s = Ie.call(r, s, !0)), s;
|
|
887
887
|
}
|
|
888
|
-
let f =
|
|
889
|
-
return
|
|
888
|
+
let f = V ? i.outerHTML : i.innerHTML;
|
|
889
|
+
return V && N["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && D(dt, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), z && (f = Rn(f)), b && zt ? x(f) : f;
|
|
890
890
|
}, t.setConfig = function() {
|
|
891
891
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
892
|
-
|
|
892
|
+
gn(e), Nt = !0, Pt = N, Ft = P;
|
|
893
893
|
}, t.clearConfig = function() {
|
|
894
|
-
|
|
894
|
+
pn = null, Nt = !1, Pt = null, Ft = null, b = ce, se = "";
|
|
895
895
|
}, t.isValidAttribute = function(e, t, n) {
|
|
896
|
-
|
|
897
|
-
let r =
|
|
898
|
-
return typeof n == "string" && (
|
|
896
|
+
pn || gn({});
|
|
897
|
+
let r = U(e), i = U(t);
|
|
898
|
+
return typeof n == "string" && (Z(t, n) || !Mt && D(gt, n)) ? !1 : Kn(r, i, n);
|
|
899
899
|
}, t.addHook = function(e, t) {
|
|
900
|
-
typeof t == "function" &&
|
|
900
|
+
typeof t == "function" && E(T, e) && Ce(T[e], t);
|
|
901
901
|
}, t.removeHook = function(e, t) {
|
|
902
|
-
if (
|
|
902
|
+
if (E(T, e)) {
|
|
903
903
|
if (t !== void 0) {
|
|
904
|
-
let n =
|
|
905
|
-
return n === -1 ? void 0 :
|
|
904
|
+
let n = xe(T[e], t);
|
|
905
|
+
return n === -1 ? void 0 : Te(T[e], n, 1)[0];
|
|
906
906
|
}
|
|
907
|
-
return
|
|
907
|
+
return Se(T[e]);
|
|
908
908
|
}
|
|
909
909
|
}, t.removeHooks = function(e) {
|
|
910
|
-
|
|
910
|
+
E(T, e) && (T[e] = []);
|
|
911
911
|
}, t.removeAllHooks = function() {
|
|
912
|
-
|
|
912
|
+
T = bt();
|
|
913
913
|
}, t;
|
|
914
914
|
}
|
|
915
|
-
var
|
|
916
|
-
function
|
|
915
|
+
var wt = Ct(), Tt;
|
|
916
|
+
function Et() {
|
|
917
917
|
return {
|
|
918
918
|
async: !1,
|
|
919
919
|
breaks: !1,
|
|
@@ -927,19 +927,19 @@ function wt() {
|
|
|
927
927
|
walkTokens: null
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
|
-
var
|
|
931
|
-
function
|
|
932
|
-
|
|
930
|
+
var N = Et();
|
|
931
|
+
function Dt(e) {
|
|
932
|
+
N = e;
|
|
933
933
|
}
|
|
934
|
-
var
|
|
935
|
-
function
|
|
934
|
+
var P = { exec: () => null };
|
|
935
|
+
function F(e) {
|
|
936
936
|
let t = [];
|
|
937
937
|
return (n) => {
|
|
938
938
|
let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
|
|
939
939
|
return i || (i = e(r), t[r] = i), i;
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function I(e, t = "") {
|
|
943
943
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
944
944
|
replace: (e, t) => {
|
|
945
945
|
let i = typeof t == "string" ? t : t.source;
|
|
@@ -949,7 +949,7 @@ function F(e, t = "") {
|
|
|
949
949
|
};
|
|
950
950
|
return r;
|
|
951
951
|
}
|
|
952
|
-
var
|
|
952
|
+
var Ot = ((e = "") => {
|
|
953
953
|
try {
|
|
954
954
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
955
955
|
} catch {
|
|
@@ -1006,102 +1006,102 @@ var I = ((e = "") => {
|
|
|
1006
1006
|
notSpaceStart: /^\S*/,
|
|
1007
1007
|
endingNewline: /\n$/,
|
|
1008
1008
|
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
1009
|
-
nextBulletRegex:
|
|
1010
|
-
hrRegex:
|
|
1011
|
-
fencesBeginRegex:
|
|
1012
|
-
headingBeginRegex:
|
|
1013
|
-
htmlBeginRegex:
|
|
1014
|
-
blockquoteBeginRegex:
|
|
1015
|
-
}, R = /^(?:[ \t]*(?:\n|$))+/,
|
|
1016
|
-
blockquote:
|
|
1017
|
-
code:
|
|
1018
|
-
def:
|
|
1019
|
-
fences:
|
|
1020
|
-
heading:
|
|
1021
|
-
hr:
|
|
1022
|
-
html:
|
|
1023
|
-
lheading:
|
|
1024
|
-
list:
|
|
1009
|
+
nextBulletRegex: F((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
|
|
1010
|
+
hrRegex: F((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
|
|
1011
|
+
fencesBeginRegex: F((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
|
|
1012
|
+
headingBeginRegex: F((e) => RegExp(`^ {0,${e}}#`)),
|
|
1013
|
+
htmlBeginRegex: F((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
1014
|
+
blockquoteBeginRegex: F((e) => RegExp(`^ {0,${e}}>`))
|
|
1015
|
+
}, R = /^(?:[ \t]*(?:\n|$))+/, kt = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, At = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, jt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Mt = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, z = / {0,3}(?:[*+-]|\d{1,9}[.)])/, B = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, V = I(B).replace(/bull/g, z).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Nt = I(B).replace(/bull/g, z).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Pt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ft = /^[^\n]+/, It = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Lt = I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", It).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Rt = I(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, z).getRegex(), zt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Bt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Vt = I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Bt).replace("tag", zt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ht = I(Pt).replace("hr", jt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), Ut = {
|
|
1016
|
+
blockquote: I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ht).getRegex(),
|
|
1017
|
+
code: kt,
|
|
1018
|
+
def: Lt,
|
|
1019
|
+
fences: At,
|
|
1020
|
+
heading: Mt,
|
|
1021
|
+
hr: jt,
|
|
1022
|
+
html: Vt,
|
|
1023
|
+
lheading: V,
|
|
1024
|
+
list: Rt,
|
|
1025
1025
|
newline: R,
|
|
1026
|
-
paragraph:
|
|
1027
|
-
table:
|
|
1028
|
-
text:
|
|
1029
|
-
},
|
|
1030
|
-
...
|
|
1031
|
-
lheading:
|
|
1032
|
-
table:
|
|
1033
|
-
paragraph:
|
|
1034
|
-
},
|
|
1035
|
-
...
|
|
1036
|
-
html:
|
|
1026
|
+
paragraph: Ht,
|
|
1027
|
+
table: P,
|
|
1028
|
+
text: Ft
|
|
1029
|
+
}, Wt = I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", jt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), Gt = {
|
|
1030
|
+
...Ut,
|
|
1031
|
+
lheading: Nt,
|
|
1032
|
+
table: Wt,
|
|
1033
|
+
paragraph: I(Pt).replace("hr", jt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Wt).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex()
|
|
1034
|
+
}, Kt = {
|
|
1035
|
+
...Ut,
|
|
1036
|
+
html: I("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Bt).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
1037
1037
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
1038
1038
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
1039
|
-
fences:
|
|
1039
|
+
fences: P,
|
|
1040
1040
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
1041
|
-
paragraph:
|
|
1042
|
-
},
|
|
1043
|
-
_backpedal:
|
|
1044
|
-
anyPunctuation:
|
|
1045
|
-
autolink:
|
|
1046
|
-
blockSkip:
|
|
1047
|
-
br:
|
|
1048
|
-
code:
|
|
1049
|
-
del:
|
|
1050
|
-
delLDelim:
|
|
1051
|
-
delRDelim:
|
|
1052
|
-
emStrongLDelim:
|
|
1053
|
-
emStrongRDelimAst:
|
|
1054
|
-
emStrongRDelimUnd:
|
|
1055
|
-
escape:
|
|
1056
|
-
link:
|
|
1057
|
-
nolink:
|
|
1058
|
-
punctuation:
|
|
1059
|
-
reflink:
|
|
1060
|
-
reflinkSearch:
|
|
1061
|
-
tag:
|
|
1062
|
-
text:
|
|
1063
|
-
url:
|
|
1064
|
-
}, bn = {
|
|
1065
|
-
...yn,
|
|
1066
|
-
link: F(/^!?\[(label)\]\((.*?)\)/).replace("label", pn).getRegex(),
|
|
1067
|
-
reflink: F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", pn).getRegex()
|
|
1068
|
-
}, xn = {
|
|
1069
|
-
...yn,
|
|
1070
|
-
emStrongRDelimAst: on,
|
|
1071
|
-
emStrongLDelim: nn,
|
|
1072
|
-
delLDelim: cn,
|
|
1073
|
-
delRDelim: ln,
|
|
1074
|
-
url: F(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", vn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
1075
|
-
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
1076
|
-
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
1077
|
-
text: F(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", vn).getRegex()
|
|
1078
|
-
}, Sn = {
|
|
1079
|
-
...xn,
|
|
1080
|
-
br: F(Gt).replace("{2,}", "*").getRegex(),
|
|
1081
|
-
text: F(xn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
1041
|
+
paragraph: I(Pt).replace("hr", jt).replace("heading", " *#{1,6} *[^\n]").replace("lheading", V).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
1042
|
+
}, qt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Jt = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Yt = /^( {2,}|\\)\n(?!\s*$)/, Xt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Zt = /[\p{P}\p{S}]/u, Qt = /[\s\p{P}\p{S}]/u, $t = /[^\s\p{P}\p{S}]/u, en = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Qt).getRegex(), H = /(?!~)[\p{P}\p{S}]/u, tn = /(?!~)[\s\p{P}\p{S}]/u, nn = /(?:[^\s\p{P}\p{S}]|~)/u, rn = I(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Ot ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), an = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, on = I(an, "u").replace(/punct/g, Zt).getRegex(), sn = I(an, "u").replace(/punct/g, H).getRegex(), cn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ln = I(cn, "gu").replace(/notPunctSpace/g, $t).replace(/punctSpace/g, Qt).replace(/punct/g, Zt).getRegex(), un = I(cn, "gu").replace(/notPunctSpace/g, nn).replace(/punctSpace/g, tn).replace(/punct/g, H).getRegex(), dn = I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, $t).replace(/punctSpace/g, Qt).replace(/punct/g, Zt).getRegex(), fn = I(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Zt).getRegex(), U = I("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, $t).replace(/punctSpace/g, Qt).replace(/punct/g, Zt).getRegex(), pn = I(/\\(punct)/, "gu").replace(/punct/g, Zt).getRegex(), mn = I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), hn = I(Bt).replace("(?:-->|$)", "-->").getRegex(), gn = I("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", hn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), _n = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, vn = I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", _n).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), yn = I(/^!?\[(label)\]\[(ref)\]/).replace("label", _n).replace("ref", It).getRegex(), bn = I(/^!?\[(ref)\](?:\[\])?/).replace("ref", It).getRegex(), xn = I("reflink|nolink(?!\\()", "g").replace("reflink", yn).replace("nolink", bn).getRegex(), Sn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, W = {
|
|
1043
|
+
_backpedal: P,
|
|
1044
|
+
anyPunctuation: pn,
|
|
1045
|
+
autolink: mn,
|
|
1046
|
+
blockSkip: rn,
|
|
1047
|
+
br: Yt,
|
|
1048
|
+
code: Jt,
|
|
1049
|
+
del: P,
|
|
1050
|
+
delLDelim: P,
|
|
1051
|
+
delRDelim: P,
|
|
1052
|
+
emStrongLDelim: on,
|
|
1053
|
+
emStrongRDelimAst: ln,
|
|
1054
|
+
emStrongRDelimUnd: dn,
|
|
1055
|
+
escape: qt,
|
|
1056
|
+
link: vn,
|
|
1057
|
+
nolink: bn,
|
|
1058
|
+
punctuation: en,
|
|
1059
|
+
reflink: yn,
|
|
1060
|
+
reflinkSearch: xn,
|
|
1061
|
+
tag: gn,
|
|
1062
|
+
text: Xt,
|
|
1063
|
+
url: P
|
|
1082
1064
|
}, Cn = {
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1065
|
+
...W,
|
|
1066
|
+
link: I(/^!?\[(label)\]\((.*?)\)/).replace("label", _n).getRegex(),
|
|
1067
|
+
reflink: I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", _n).getRegex()
|
|
1086
1068
|
}, wn = {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1069
|
+
...W,
|
|
1070
|
+
emStrongRDelimAst: un,
|
|
1071
|
+
emStrongLDelim: sn,
|
|
1072
|
+
delLDelim: fn,
|
|
1073
|
+
delRDelim: U,
|
|
1074
|
+
url: I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Sn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
1075
|
+
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
1076
|
+
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
1077
|
+
text: I(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Sn).getRegex()
|
|
1091
1078
|
}, Tn = {
|
|
1079
|
+
...wn,
|
|
1080
|
+
br: I(Yt).replace("{2,}", "*").getRegex(),
|
|
1081
|
+
text: I(wn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
1082
|
+
}, En = {
|
|
1083
|
+
normal: Ut,
|
|
1084
|
+
gfm: Gt,
|
|
1085
|
+
pedantic: Kt
|
|
1086
|
+
}, Dn = {
|
|
1087
|
+
normal: W,
|
|
1088
|
+
gfm: wn,
|
|
1089
|
+
breaks: Tn,
|
|
1090
|
+
pedantic: Cn
|
|
1091
|
+
}, On = {
|
|
1092
1092
|
"&": "&",
|
|
1093
1093
|
"<": "<",
|
|
1094
1094
|
">": ">",
|
|
1095
1095
|
"\"": """,
|
|
1096
1096
|
"'": "'"
|
|
1097
|
-
},
|
|
1097
|
+
}, kn = (e) => On[e];
|
|
1098
1098
|
function G(e, t) {
|
|
1099
1099
|
if (t) {
|
|
1100
|
-
if (L.escapeTest.test(e)) return e.replace(L.escapeReplace,
|
|
1101
|
-
} else if (L.escapeTestNoEncode.test(e)) return e.replace(L.escapeReplaceNoEncode,
|
|
1100
|
+
if (L.escapeTest.test(e)) return e.replace(L.escapeReplace, kn);
|
|
1101
|
+
} else if (L.escapeTestNoEncode.test(e)) return e.replace(L.escapeReplaceNoEncode, kn);
|
|
1102
1102
|
return e;
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function An(e) {
|
|
1105
1105
|
try {
|
|
1106
1106
|
e = encodeURI(e).replace(L.percentDecode, "%");
|
|
1107
1107
|
} catch {
|
|
@@ -1109,7 +1109,7 @@ function Dn(e) {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
return e;
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function jn(e, t) {
|
|
1113
1113
|
let n = e.replace(L.findPipe, (e, t, n) => {
|
|
1114
1114
|
let r = !1, i = t;
|
|
1115
1115
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
@@ -1122,7 +1122,7 @@ function On(e, t) {
|
|
|
1122
1122
|
for (; r < n.length; r++) n[r] = n[r].trim().replace(L.slashPipe, "|");
|
|
1123
1123
|
return n;
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function Mn(e, t, n) {
|
|
1126
1126
|
let r = e.length;
|
|
1127
1127
|
if (r === 0) return "";
|
|
1128
1128
|
let i = 0;
|
|
@@ -1134,12 +1134,12 @@ function K(e, t, n) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
return e.slice(0, r - i);
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function Nn(e) {
|
|
1138
1138
|
let t = e.split("\n"), n = t.length - 1;
|
|
1139
1139
|
for (; n >= 0 && L.blankLine.test(t[n]);) n--;
|
|
1140
1140
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function Pn(e, t) {
|
|
1143
1143
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
1144
1144
|
let n = 0;
|
|
1145
1145
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -1147,7 +1147,7 @@ function An(e, t) {
|
|
|
1147
1147
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
1148
1148
|
return n > 0 ? -2 : -1;
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function Fn(e, t = 0) {
|
|
1151
1151
|
let n = t, r = "";
|
|
1152
1152
|
for (let t of e) if (t === " ") {
|
|
1153
1153
|
let e = 4 - n % 4;
|
|
@@ -1155,7 +1155,7 @@ function jn(e, t = 0) {
|
|
|
1155
1155
|
} else r += t, n++;
|
|
1156
1156
|
return r;
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function In(e, t, n, r, i) {
|
|
1159
1159
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
1160
1160
|
r.state.inLink = !0;
|
|
1161
1161
|
let c = {
|
|
@@ -1168,7 +1168,7 @@ function Mn(e, t, n, r, i) {
|
|
|
1168
1168
|
};
|
|
1169
1169
|
return r.state.inLink = !1, c;
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function Ln(e, t, n) {
|
|
1172
1172
|
let r = e.match(n.other.indentCodeCompensation);
|
|
1173
1173
|
if (r === null) return t;
|
|
1174
1174
|
let i = r[1];
|
|
@@ -1179,9 +1179,9 @@ function Nn(e, t, n) {
|
|
|
1179
1179
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
1180
1180
|
}).join("\n");
|
|
1181
1181
|
}
|
|
1182
|
-
var
|
|
1182
|
+
var Rn = class {
|
|
1183
1183
|
constructor(e) {
|
|
1184
|
-
s(this, "options", void 0), s(this, "rules", void 0), s(this, "lexer", void 0), this.options = e ||
|
|
1184
|
+
s(this, "options", void 0), s(this, "rules", void 0), s(this, "lexer", void 0), this.options = e || N;
|
|
1185
1185
|
}
|
|
1186
1186
|
space(e) {
|
|
1187
1187
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -1193,7 +1193,7 @@ var Pn = class {
|
|
|
1193
1193
|
code(e) {
|
|
1194
1194
|
let t = this.rules.block.code.exec(e);
|
|
1195
1195
|
if (t) {
|
|
1196
|
-
let e = this.options.pedantic ? t[0] :
|
|
1196
|
+
let e = this.options.pedantic ? t[0] : Nn(t[0]);
|
|
1197
1197
|
return {
|
|
1198
1198
|
type: "code",
|
|
1199
1199
|
raw: e,
|
|
@@ -1205,7 +1205,7 @@ var Pn = class {
|
|
|
1205
1205
|
fences(e) {
|
|
1206
1206
|
let t = this.rules.block.fences.exec(e);
|
|
1207
1207
|
if (t) {
|
|
1208
|
-
let e = t[0], n =
|
|
1208
|
+
let e = t[0], n = Ln(e, t[3] || "", this.rules);
|
|
1209
1209
|
return {
|
|
1210
1210
|
type: "code",
|
|
1211
1211
|
raw: e,
|
|
@@ -1219,12 +1219,12 @@ var Pn = class {
|
|
|
1219
1219
|
if (t) {
|
|
1220
1220
|
let e = t[2].trim();
|
|
1221
1221
|
if (this.rules.other.endingHash.test(e)) {
|
|
1222
|
-
let t =
|
|
1222
|
+
let t = Mn(e, "#");
|
|
1223
1223
|
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
1224
1224
|
}
|
|
1225
1225
|
return {
|
|
1226
1226
|
type: "heading",
|
|
1227
|
-
raw:
|
|
1227
|
+
raw: Mn(t[0], "\n"),
|
|
1228
1228
|
depth: t[1].length,
|
|
1229
1229
|
text: e,
|
|
1230
1230
|
tokens: this.lexer.inline(e)
|
|
@@ -1235,13 +1235,13 @@ var Pn = class {
|
|
|
1235
1235
|
let t = this.rules.block.hr.exec(e);
|
|
1236
1236
|
if (t) return {
|
|
1237
1237
|
type: "hr",
|
|
1238
|
-
raw:
|
|
1238
|
+
raw: Mn(t[0], "\n")
|
|
1239
1239
|
};
|
|
1240
1240
|
}
|
|
1241
1241
|
blockquote(e) {
|
|
1242
1242
|
let t = this.rules.block.blockquote.exec(e);
|
|
1243
1243
|
if (t) {
|
|
1244
|
-
let e =
|
|
1244
|
+
let e = Mn(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
1245
1245
|
for (; e.length > 0;) {
|
|
1246
1246
|
let t = !1, a = [], o = 0;
|
|
1247
1247
|
for (; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -1291,18 +1291,18 @@ ${c}` : c;
|
|
|
1291
1291
|
let n = !1, r = "", s = "";
|
|
1292
1292
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
1293
1293
|
r = t[0], e = e.substring(r.length);
|
|
1294
|
-
let c =
|
|
1294
|
+
let c = Fn(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
1295
1295
|
if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
1296
1296
|
let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), f = this.rules.other.blockquoteBeginRegex(d);
|
|
1297
1297
|
for (; e;) {
|
|
1298
|
-
let p = e.split("\n", 1)[0],
|
|
1299
|
-
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "),
|
|
1300
|
-
if (
|
|
1298
|
+
let p = e.split("\n", 1)[0], m;
|
|
1299
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), m = l) : m = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || f.test(l) || t.test(l) || n.test(l)) break;
|
|
1300
|
+
if (m.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + m.slice(d);
|
|
1301
1301
|
else {
|
|
1302
1302
|
if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
|
|
1303
1303
|
s += "\n" + l;
|
|
1304
1304
|
}
|
|
1305
|
-
u = !l.trim(), r += p + "\n", e = e.substring(p.length + 1), c =
|
|
1305
|
+
u = !l.trim(), r += p + "\n", e = e.substring(p.length + 1), c = m.slice(d);
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
1308
|
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
|
|
@@ -1357,7 +1357,7 @@ ${c}` : c;
|
|
|
1357
1357
|
html(e) {
|
|
1358
1358
|
let t = this.rules.block.html.exec(e);
|
|
1359
1359
|
if (t) {
|
|
1360
|
-
let e =
|
|
1360
|
+
let e = Nn(t[0]);
|
|
1361
1361
|
return {
|
|
1362
1362
|
type: "html",
|
|
1363
1363
|
block: !0,
|
|
@@ -1374,7 +1374,7 @@ ${c}` : c;
|
|
|
1374
1374
|
return {
|
|
1375
1375
|
type: "def",
|
|
1376
1376
|
tag: e,
|
|
1377
|
-
raw:
|
|
1377
|
+
raw: Mn(t[0], "\n"),
|
|
1378
1378
|
href: n,
|
|
1379
1379
|
title: r
|
|
1380
1380
|
};
|
|
@@ -1383,9 +1383,9 @@ ${c}` : c;
|
|
|
1383
1383
|
table(e) {
|
|
1384
1384
|
let t = this.rules.block.table.exec(e);
|
|
1385
1385
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
1386
|
-
let n =
|
|
1386
|
+
let n = jn(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
1387
1387
|
type: "table",
|
|
1388
|
-
raw:
|
|
1388
|
+
raw: Mn(t[0], "\n"),
|
|
1389
1389
|
header: [],
|
|
1390
1390
|
align: [],
|
|
1391
1391
|
rows: []
|
|
@@ -1398,7 +1398,7 @@ ${c}` : c;
|
|
|
1398
1398
|
header: !0,
|
|
1399
1399
|
align: a.align[e]
|
|
1400
1400
|
});
|
|
1401
|
-
for (let e of i) a.rows.push(
|
|
1401
|
+
for (let e of i) a.rows.push(jn(e, a.header.length).map((e, t) => ({
|
|
1402
1402
|
text: e,
|
|
1403
1403
|
tokens: this.lexer.inline(e),
|
|
1404
1404
|
header: !1,
|
|
@@ -1413,7 +1413,7 @@ ${c}` : c;
|
|
|
1413
1413
|
let e = t[1].trim();
|
|
1414
1414
|
return {
|
|
1415
1415
|
type: "heading",
|
|
1416
|
-
raw:
|
|
1416
|
+
raw: Mn(t[0], "\n"),
|
|
1417
1417
|
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
1418
1418
|
text: e,
|
|
1419
1419
|
tokens: this.lexer.inline(e)
|
|
@@ -1466,10 +1466,10 @@ ${c}` : c;
|
|
|
1466
1466
|
let e = t[2].trim();
|
|
1467
1467
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
1468
1468
|
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
1469
|
-
let t =
|
|
1469
|
+
let t = Mn(e.slice(0, -1), "\\");
|
|
1470
1470
|
if ((e.length - t.length) % 2 == 0) return;
|
|
1471
1471
|
} else {
|
|
1472
|
-
let e =
|
|
1472
|
+
let e = Pn(t[2], "()");
|
|
1473
1473
|
if (e === -2) return;
|
|
1474
1474
|
if (e > -1) {
|
|
1475
1475
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -1481,7 +1481,7 @@ ${c}` : c;
|
|
|
1481
1481
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
1482
1482
|
e && (n = e[1], r = e[3]);
|
|
1483
1483
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
1484
|
-
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)),
|
|
1484
|
+
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), In(t, {
|
|
1485
1485
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
1486
1486
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
1487
1487
|
}, t[0], this.lexer, this.rules);
|
|
@@ -1499,7 +1499,7 @@ ${c}` : c;
|
|
|
1499
1499
|
text: e
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
1502
|
-
return
|
|
1502
|
+
return In(n, e, n[0], this.lexer, this.rules);
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
emStrong(e, t, n = "") {
|
|
@@ -1632,24 +1632,24 @@ ${c}` : c;
|
|
|
1632
1632
|
};
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|
|
1635
|
-
},
|
|
1635
|
+
}, K = class e {
|
|
1636
1636
|
constructor(e) {
|
|
1637
|
-
s(this, "tokens", void 0), s(this, "options", void 0), s(this, "state", void 0), s(this, "inlineQueue", void 0), s(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
1637
|
+
s(this, "tokens", void 0), s(this, "options", void 0), s(this, "state", void 0), s(this, "inlineQueue", void 0), s(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || N, this.options.tokenizer = this.options.tokenizer || new Rn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
1638
1638
|
inLink: !1,
|
|
1639
1639
|
inRawBlock: !1,
|
|
1640
1640
|
top: !0
|
|
1641
1641
|
};
|
|
1642
1642
|
let t = {
|
|
1643
1643
|
other: L,
|
|
1644
|
-
block:
|
|
1645
|
-
inline:
|
|
1644
|
+
block: En.normal,
|
|
1645
|
+
inline: Dn.normal
|
|
1646
1646
|
};
|
|
1647
|
-
this.options.pedantic ? (t.block =
|
|
1647
|
+
this.options.pedantic ? (t.block = En.pedantic, t.inline = Dn.pedantic) : this.options.gfm && (t.block = En.gfm, t.inline = this.options.breaks ? Dn.breaks : Dn.gfm), this.tokenizer.rules = t;
|
|
1648
1648
|
}
|
|
1649
1649
|
static get rules() {
|
|
1650
1650
|
return {
|
|
1651
|
-
block:
|
|
1652
|
-
inline:
|
|
1651
|
+
block: En,
|
|
1652
|
+
inline: Dn
|
|
1653
1653
|
};
|
|
1654
1654
|
}
|
|
1655
1655
|
static lex(t, n) {
|
|
@@ -1791,9 +1791,9 @@ ${c}` : c;
|
|
|
1791
1791
|
if (this.options.silent) console.error(t);
|
|
1792
1792
|
else throw Error(t);
|
|
1793
1793
|
}
|
|
1794
|
-
},
|
|
1794
|
+
}, zn = class {
|
|
1795
1795
|
constructor(e) {
|
|
1796
|
-
s(this, "options", void 0), s(this, "parser", void 0), this.options = e ||
|
|
1796
|
+
s(this, "options", void 0), s(this, "parser", void 0), this.options = e || N;
|
|
1797
1797
|
}
|
|
1798
1798
|
space(e) {
|
|
1799
1799
|
return "";
|
|
@@ -1879,7 +1879,7 @@ ${e}</tr>
|
|
|
1879
1879
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1880
1880
|
}
|
|
1881
1881
|
link({ href: e, title: t, tokens: n }) {
|
|
1882
|
-
let r = this.parser.parseInline(n), i =
|
|
1882
|
+
let r = this.parser.parseInline(n), i = An(e);
|
|
1883
1883
|
if (i === null) return r;
|
|
1884
1884
|
e = i;
|
|
1885
1885
|
let a = "<a href=\"" + e + "\"";
|
|
@@ -1887,7 +1887,7 @@ ${e}</tr>
|
|
|
1887
1887
|
}
|
|
1888
1888
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
1889
1889
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1890
|
-
let i =
|
|
1890
|
+
let i = An(e);
|
|
1891
1891
|
if (i === null) return G(n);
|
|
1892
1892
|
e = i;
|
|
1893
1893
|
let a = `<img src="${e}" alt="${G(n)}"`;
|
|
@@ -1896,7 +1896,7 @@ ${e}</tr>
|
|
|
1896
1896
|
text(e) {
|
|
1897
1897
|
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : G(e.text);
|
|
1898
1898
|
}
|
|
1899
|
-
},
|
|
1899
|
+
}, Bn = class {
|
|
1900
1900
|
strong({ text: e }) {
|
|
1901
1901
|
return e;
|
|
1902
1902
|
}
|
|
@@ -1927,9 +1927,9 @@ ${e}</tr>
|
|
|
1927
1927
|
checkbox({ raw: e }) {
|
|
1928
1928
|
return e;
|
|
1929
1929
|
}
|
|
1930
|
-
},
|
|
1930
|
+
}, q = class e {
|
|
1931
1931
|
constructor(e) {
|
|
1932
|
-
s(this, "options", void 0), s(this, "renderer", void 0), s(this, "textRenderer", void 0), this.options = e ||
|
|
1932
|
+
s(this, "options", void 0), s(this, "renderer", void 0), s(this, "textRenderer", void 0), this.options = e || N, this.options.renderer = this.options.renderer || new zn(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Bn();
|
|
1933
1933
|
}
|
|
1934
1934
|
static parse(t, n) {
|
|
1935
1935
|
return new e(n).parse(t);
|
|
@@ -2075,9 +2075,9 @@ ${e}</tr>
|
|
|
2075
2075
|
}
|
|
2076
2076
|
return n;
|
|
2077
2077
|
}
|
|
2078
|
-
},
|
|
2078
|
+
}, J = (Tt = class {
|
|
2079
2079
|
constructor(e) {
|
|
2080
|
-
s(this, "options", void 0), s(this, "block", void 0), this.options = e ||
|
|
2080
|
+
s(this, "options", void 0), s(this, "block", void 0), this.options = e || N;
|
|
2081
2081
|
}
|
|
2082
2082
|
preprocess(e) {
|
|
2083
2083
|
return e;
|
|
@@ -2092,23 +2092,23 @@ ${e}</tr>
|
|
|
2092
2092
|
return e;
|
|
2093
2093
|
}
|
|
2094
2094
|
provideLexer(e = this.block) {
|
|
2095
|
-
return e ?
|
|
2095
|
+
return e ? K.lex : K.lexInline;
|
|
2096
2096
|
}
|
|
2097
2097
|
provideParser(e = this.block) {
|
|
2098
|
-
return e ?
|
|
2098
|
+
return e ? q.parse : q.parseInline;
|
|
2099
2099
|
}
|
|
2100
|
-
}, s(
|
|
2100
|
+
}, s(Tt, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
2101
2101
|
"preprocess",
|
|
2102
2102
|
"postprocess",
|
|
2103
2103
|
"processAllTokens",
|
|
2104
2104
|
"emStrongMask"
|
|
2105
|
-
])), s(
|
|
2105
|
+
])), s(Tt, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set([
|
|
2106
2106
|
"preprocess",
|
|
2107
2107
|
"postprocess",
|
|
2108
2108
|
"processAllTokens"
|
|
2109
|
-
])),
|
|
2109
|
+
])), Tt), Y = new class {
|
|
2110
2110
|
constructor(...e) {
|
|
2111
|
-
s(this, "defaults",
|
|
2111
|
+
s(this, "defaults", Et()), s(this, "options", this.setOptions), s(this, "parse", this.parseMarkdown(!0)), s(this, "parseInline", this.parseMarkdown(!1)), s(this, "Parser", q), s(this, "Renderer", zn), s(this, "TextRenderer", Bn), s(this, "Lexer", K), s(this, "Tokenizer", Rn), s(this, "Hooks", J), this.use(...e);
|
|
2112
2112
|
}
|
|
2113
2113
|
walkTokens(e, t) {
|
|
2114
2114
|
let n = [];
|
|
@@ -2157,7 +2157,7 @@ ${e}</tr>
|
|
|
2157
2157
|
}
|
|
2158
2158
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
2159
2159
|
}), n.extensions = t), e.renderer) {
|
|
2160
|
-
let t = this.defaults.renderer || new
|
|
2160
|
+
let t = this.defaults.renderer || new zn(this.defaults);
|
|
2161
2161
|
for (let n in e.renderer) {
|
|
2162
2162
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
2163
2163
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -2170,7 +2170,7 @@ ${e}</tr>
|
|
|
2170
2170
|
n.renderer = t;
|
|
2171
2171
|
}
|
|
2172
2172
|
if (e.tokenizer) {
|
|
2173
|
-
let t = this.defaults.tokenizer || new
|
|
2173
|
+
let t = this.defaults.tokenizer || new Rn(this.defaults);
|
|
2174
2174
|
for (let n in e.tokenizer) {
|
|
2175
2175
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
2176
2176
|
if ([
|
|
@@ -2187,13 +2187,13 @@ ${e}</tr>
|
|
|
2187
2187
|
n.tokenizer = t;
|
|
2188
2188
|
}
|
|
2189
2189
|
if (e.hooks) {
|
|
2190
|
-
let t = this.defaults.hooks || new
|
|
2190
|
+
let t = this.defaults.hooks || new J();
|
|
2191
2191
|
for (let n in e.hooks) {
|
|
2192
2192
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
2193
2193
|
if (["options", "block"].includes(n)) continue;
|
|
2194
2194
|
let r = n, i = e.hooks[r], a = t[r];
|
|
2195
|
-
t[r] =
|
|
2196
|
-
if (this.defaults.async &&
|
|
2195
|
+
t[r] = J.passThroughHooks.has(n) ? (e) => {
|
|
2196
|
+
if (this.defaults.async && J.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
2197
2197
|
let n = await i.call(t, e);
|
|
2198
2198
|
return a.call(t, n);
|
|
2199
2199
|
})();
|
|
@@ -2230,10 +2230,10 @@ ${e}</tr>
|
|
|
2230
2230
|
}, this;
|
|
2231
2231
|
}
|
|
2232
2232
|
lexer(e, t) {
|
|
2233
|
-
return
|
|
2233
|
+
return K.lex(e, t ?? this.defaults);
|
|
2234
2234
|
}
|
|
2235
2235
|
parser(e, t) {
|
|
2236
|
-
return
|
|
2236
|
+
return q.parse(e, t ?? this.defaults);
|
|
2237
2237
|
}
|
|
2238
2238
|
parseMarkdown(e) {
|
|
2239
2239
|
return (t, n) => {
|
|
@@ -2245,16 +2245,16 @@ ${e}</tr>
|
|
|
2245
2245
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
2246
2246
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
2247
2247
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
2248
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
2248
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? K.lex : K.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
2249
2249
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
2250
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
2250
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? q.parse : q.parseInline)(a, i);
|
|
2251
2251
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
2252
2252
|
})().catch(a);
|
|
2253
2253
|
try {
|
|
2254
2254
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
2255
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
2255
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? K.lex : K.lexInline)(t, i);
|
|
2256
2256
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
2257
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
2257
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? q.parse : q.parseInline)(n, i);
|
|
2258
2258
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
2259
2259
|
} catch (e) {
|
|
2260
2260
|
return a(e);
|
|
@@ -2276,18 +2276,18 @@ function X(e, t) {
|
|
|
2276
2276
|
return Y.parse(e, t);
|
|
2277
2277
|
}
|
|
2278
2278
|
X.options = X.setOptions = function(e) {
|
|
2279
|
-
return Y.setOptions(e), X.defaults = Y.defaults,
|
|
2280
|
-
}, X.getDefaults =
|
|
2281
|
-
return Y.use(...e), X.defaults = Y.defaults,
|
|
2279
|
+
return Y.setOptions(e), X.defaults = Y.defaults, Dt(X.defaults), X;
|
|
2280
|
+
}, X.getDefaults = Et, X.defaults = N, X.use = function(...e) {
|
|
2281
|
+
return Y.use(...e), X.defaults = Y.defaults, Dt(X.defaults), X;
|
|
2282
2282
|
}, X.walkTokens = function(e, t) {
|
|
2283
2283
|
return Y.walkTokens(e, t);
|
|
2284
|
-
}, X.parseInline = Y.parseInline, X.Parser =
|
|
2284
|
+
}, X.parseInline = Y.parseInline, X.Parser = q, X.parser = q.parse, X.Renderer = zn, X.TextRenderer = Bn, X.Lexer = K, X.lexer = K.lex, X.Tokenizer = Rn, X.Hooks = J, X.parse = X, X.options, X.setOptions, X.use, X.walkTokens, X.parseInline, q.parse, K.lex;
|
|
2285
2285
|
// src/components/ai-chat/ai-chat.module.scss?inline
|
|
2286
|
-
var Rn = ":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:var(--ai-chat-user-message-background);--chat-message-primary-text-color:var(--luzmo-font-color);--chat-message-primary-border-color:transparent}:host luzmo-chat-message.error{color:var(--luzmo-ai-chat-error-message-color,var(--ai-chat-error-message-color))}:host luzmo-chat-message.cancelled{color:var(--luzmo-ai-chat-cancelled-message-color,var(--ai-chat-cancelled-message-color));font-style:italic}:host .user-message-content{gap:var(--luzmo-spacing-3,8px);flex-direction:column;display:flex}:host .user-message-attachments{gap:var(--luzmo-spacing-2,4px);flex-wrap:wrap;display:flex}:host .user-message-attachment{width:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));height:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));object-fit:cover;object-position:center;border-radius:var(--luzmo-border-radius-s,4px);pointer-events:none;display:block}:host .user-message-text{white-space:pre-wrap;overflow-wrap:anywhere}:host .markdown-content{line-height:var(--luzmo-ai-chat-markdown-line-height,var(--ai-chat-markdown-line-height))}:host .markdown-content>:first-child{margin-top:0}:host .markdown-content>:last-child{margin-bottom:0}:host .markdown-content p,:host .markdown-content ul,:host .markdown-content ol,:host .markdown-content blockquote,:host .markdown-content pre,:host .markdown-content table{margin:0 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing))}:host .markdown-content h1,:host .markdown-content h2,:host .markdown-content h3,:host .markdown-content h4,:host .markdown-content h5,:host .markdown-content h6{margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing));font-weight:var(--luzmo-ai-chat-markdown-heading-font-weight,var(--ai-chat-markdown-heading-font-weight))}:host .markdown-content ul,:host .markdown-content ol{padding-inline-start:var(--luzmo-ai-chat-markdown-list-indent,var(--ai-chat-markdown-list-indent))}:host .markdown-content a{color:var(--luzmo-ai-chat-markdown-link-color,var(--ai-chat-markdown-link-color))}:host .markdown-content code{font-family:var(--luzmo-ai-chat-markdown-code-font-family,var(--ai-chat-markdown-code-font-family));font-size:var(--luzmo-ai-chat-markdown-code-font-size,var(--ai-chat-markdown-code-font-size));background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.1em .3em}:host .markdown-content pre{background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.75em 1em;overflow-x:auto}:host .markdown-content pre code{background:0 0;padding:0}:host .markdown-content blockquote{border-inline-start:.1875rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));padding-inline-start:.75rem}:host .markdown-content hr{border:0;border-top:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0}:host .markdown-content table{border-collapse:collapse;width:100%}:host .markdown-content th,:host .markdown-content td{border:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));text-align:start;padding:.375rem .625rem}:host .markdown-content th{background:var(--luzmo-ai-chat-markdown-table-header-background,var(--ai-chat-markdown-table-header-background));font-weight:600}:host .assistant-message-wrapper{gap:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));flex-direction:column;display:flex}:host luzmo-chat-message[position=left]{--luzmo-chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--luzmo-chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--luzmo-chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height))}:host .assistant-message-body{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-feedback{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));display:flex}:host .assistant-message-feedback luzmo-action-button{--luzmo-action-button-background-color-default-selected:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-hover:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-focus-selected:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-down-selected:var(--ai-chat-user-message-background)}:host .assistant-message-feedback luzmo-action-button[value=up]{--luzmo-action-button-content-color-default-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-hover-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-focus-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-down-selected:var(--luzmo-positive-color)}:host .assistant-message-feedback luzmo-action-button[value=down]{--luzmo-action-button-content-color-default-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-hover-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-focus-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-down-selected:var(--luzmo-negative-color)}:host .assistant-message-footer{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:none}:host .assistant-message-footer.assistant-message-footer--has-content{margin-block-start:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));display:flex}:host luzmo-action-button.assistant-message-action{--luzmo-action-button-background-color-hover:var(--ai-chat-user-message-background)}:host .assistant-message-actions{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:none}:host .assistant-message-actions.assistant-message-actions--has-content{display:contents}:host .assistant-message-actions.assistant-message-actions--confirming{flex-direction:column;flex-basis:100%;align-items:flex-start;display:flex}:host .assistant-message-actions .assistant-message-action-confirm-message{font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style));color:var(--luzmo-ai-chat-assistant-message-actions-color,var(--ai-chat-assistant-message-actions-color));white-space:pre-line}:host .assistant-message-actions .assistant-message-action-confirm-controls{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:flex}:host .assistant-message-actions luzmo-button.assistant-message-action,:host .assistant-message-actions slot::slotted(luzmo-button),:host .assistant-message-actions slot::slotted(button),:host .assistant-message-actions slot::slotted(a),:host .assistant-message-actions slot::slotted(input),:host .assistant-message-actions slot::slotted(select),:host .assistant-message-actions slot::slotted(textarea){font-style:normal}:host .assistant-message-actions slot::slotted(:not(luzmo-button):not(button):not(a):not(input):not(select):not(textarea)){font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style));color:var(--luzmo-ai-chat-assistant-message-actions-color,var(--ai-chat-assistant-message-actions-color))}:host .assistant-context-menu-trigger{width:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));height:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));border:.0625rem solid var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));border-radius:var(--luzmo-ai-chat-context-menu-trigger-border-radius,var(--ai-chat-context-menu-trigger-border-radius));background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color));cursor:pointer;font-size:var(--ai-chat-context-menu-trigger-icon-size);justify-content:center;align-items:center;padding:0;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 .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));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([dir=rtl]) .assistant-message-footer{direction:rtl}:host{--ai-chat-background:var(--luzmo-background-color);--ai-chat-border-radius:0;--ai-chat-padding:0;--ai-chat-gap:var(--luzmo-spacing-5);--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-m);--ai-chat-error-message-color:var(--luzmo-danger,#dc3545);--ai-chat-cancelled-message-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed));--ai-chat-scrollbar-width:var(--luzmo-scrollbar-size);--ai-chat-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--ai-chat-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--ai-chat-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--ai-chat-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--ai-chat-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height-xs);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-s);--ai-chat-context-menu-trigger-border-color:var(--luzmo-border-color);--ai-chat-context-menu-trigger-border-radius:.375rem;--ai-chat-context-menu-trigger-background:var(--luzmo-background-color,transparent);--ai-chat-context-menu-trigger-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-trigger-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-trigger-hover-border-color:var(--luzmo-border-color-hover,var(--luzmo-border-color));--ai-chat-context-menu-trigger-hover-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-item-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-item-font-family:var(--luzmo-font-family);--ai-chat-markdown-line-height:1.5;--ai-chat-markdown-spacing:var(--luzmo-spacing-3);--ai-chat-markdown-heading-spacing:var(--luzmo-spacing-4);--ai-chat-markdown-heading-font-weight:var(--luzmo-font-weight-bold);--ai-chat-markdown-list-indent:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-markdown-link-color:var(--luzmo-primary);--ai-chat-markdown-code-font-family:var(--luzmo-font-family-mono,ui-monospace, monospace);--ai-chat-markdown-code-font-size:.875em;--ai-chat-markdown-code-background:var(--luzmo-background-color-highlight);--ai-chat-markdown-code-border-radius:var(--luzmo-border-radius-s);--ai-chat-markdown-border-color:var(--luzmo-border-color);--ai-chat-markdown-table-header-background:var(--luzmo-background-color-highlight);--ai-chat-assistant-message-actions-gap:var(--luzmo-spacing-2);--ai-chat-assistant-message-actions-margin-top:var(--luzmo-spacing-3);--ai-chat-assistant-message-actions-color:var(--luzmo-font-color-extra-dimmed);--ai-chat-assistant-message-actions-font-style:italic;--ai-chat-assistant-message-font-family:var(--luzmo-font-family);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-m);--ai-chat-assistant-message-line-height:var(--ai-chat-markdown-line-height);--ai-chat-user-message-background:rgba(var(--luzmo-primary-rgb), .08);--ai-chat-user-message-attachment-size:64px}:host([size=s]){--ai-chat-gap:var(--luzmo-spacing-4);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-xs);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-s)}:host([size=l]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-l);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-m);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-xl);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-l);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-xl)}";
|
|
2286
|
+
var Vn = ":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:var(--ai-chat-user-message-background);--chat-message-primary-text-color:var(--luzmo-font-color);--chat-message-primary-border-color:transparent}:host luzmo-chat-message.error{color:var(--luzmo-ai-chat-error-message-color,var(--ai-chat-error-message-color))}:host luzmo-chat-message.cancelled{color:var(--luzmo-ai-chat-cancelled-message-color,var(--ai-chat-cancelled-message-color));font-style:italic}:host .user-message-content{gap:var(--luzmo-spacing-3,8px);flex-direction:column;display:flex}:host .user-message-attachments{gap:var(--luzmo-spacing-2,4px);flex-wrap:wrap;display:flex}:host .user-message-attachment{width:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));height:var(--luzmo-ai-chat-user-message-attachment-size,var(--ai-chat-user-message-attachment-size));object-fit:cover;object-position:center;border-radius:var(--luzmo-border-radius-s,4px);pointer-events:none;display:block}:host .user-message-text{white-space:pre-wrap;overflow-wrap:anywhere}:host .markdown-content{line-height:var(--luzmo-ai-chat-markdown-line-height,var(--ai-chat-markdown-line-height))}:host .markdown-content>:first-child{margin-top:0}:host .markdown-content>:last-child{margin-bottom:0}:host .markdown-content p,:host .markdown-content ul,:host .markdown-content ol,:host .markdown-content blockquote,:host .markdown-content pre,:host .markdown-content table{margin:0 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing))}:host .markdown-content h1,:host .markdown-content h2,:host .markdown-content h3,:host .markdown-content h4,:host .markdown-content h5,:host .markdown-content h6{margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0 var(--luzmo-ai-chat-markdown-spacing,var(--ai-chat-markdown-spacing));font-weight:var(--luzmo-ai-chat-markdown-heading-font-weight,var(--ai-chat-markdown-heading-font-weight))}:host .markdown-content ul,:host .markdown-content ol{padding-inline-start:var(--luzmo-ai-chat-markdown-list-indent,var(--ai-chat-markdown-list-indent))}:host .markdown-content a{color:var(--luzmo-ai-chat-markdown-link-color,var(--ai-chat-markdown-link-color))}:host .markdown-content code{font-family:var(--luzmo-ai-chat-markdown-code-font-family,var(--ai-chat-markdown-code-font-family));font-size:var(--luzmo-ai-chat-markdown-code-font-size,var(--ai-chat-markdown-code-font-size));background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.1em .3em}:host .markdown-content pre{background:var(--luzmo-ai-chat-markdown-code-background,var(--ai-chat-markdown-code-background));border-radius:var(--luzmo-ai-chat-markdown-code-border-radius,var(--ai-chat-markdown-code-border-radius));padding:.75em 1em;overflow-x:auto}:host .markdown-content pre code{background:0 0;padding:0}:host .markdown-content blockquote{border-inline-start:.1875rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));padding-inline-start:.75rem}:host .markdown-content hr{border:0;border-top:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));margin:var(--luzmo-ai-chat-markdown-heading-spacing,var(--ai-chat-markdown-heading-spacing)) 0}:host .markdown-content table{border-collapse:collapse;width:100%}:host .markdown-content th,:host .markdown-content td{border:.0625rem solid var(--luzmo-ai-chat-markdown-border-color,var(--ai-chat-markdown-border-color));text-align:start;padding:.375rem .625rem}:host .markdown-content th{background:var(--luzmo-ai-chat-markdown-table-header-background,var(--ai-chat-markdown-table-header-background));font-weight:600}:host .agent-question{--luzmo-primary:rgb(var(--luzmo-primary-rgb))}:host .interaction-error{margin:0;color:var(--luzmo-negative-color);margin-block-start:var(--luzmo-spacing-2,4px)}:host .interaction-status{margin:0;margin-block-start:var(--luzmo-spacing-2,4px)}:host .interaction-status:empty{margin:0}:host .interaction-status{font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style))}:host .assistant-message-wrapper{gap:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height));flex-direction:column;display:flex}:host luzmo-chat-message[position=left]{--luzmo-chat-message-font-family:var(--luzmo-ai-chat-assistant-message-font-family,var(--ai-chat-assistant-message-font-family));--luzmo-chat-message-font-size:var(--luzmo-ai-chat-assistant-message-font-size,var(--ai-chat-assistant-message-font-size));--luzmo-chat-message-line-height:var(--luzmo-ai-chat-assistant-message-line-height,var(--ai-chat-assistant-message-line-height))}:host .assistant-message-body{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-feedback{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));display:flex}:host .assistant-message-feedback luzmo-action-button{--luzmo-action-button-background-color-default-selected:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-hover:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-focus-selected:var(--ai-chat-user-message-background);--luzmo-action-button-background-color-down-selected:var(--ai-chat-user-message-background)}:host .assistant-message-feedback luzmo-action-button[value=up]{--luzmo-action-button-content-color-default-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-hover-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-focus-selected:var(--luzmo-positive-color);--luzmo-action-button-content-color-down-selected:var(--luzmo-positive-color)}:host .assistant-message-feedback luzmo-action-button[value=down]{--luzmo-action-button-content-color-default-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-hover-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-focus-selected:var(--luzmo-negative-color);--luzmo-action-button-content-color-down-selected:var(--luzmo-negative-color)}:host .assistant-message-footer{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:none}:host .assistant-message-footer.assistant-message-footer--has-content{margin-block-start:var(--luzmo-ai-chat-assistant-message-actions-margin-top,var(--ai-chat-assistant-message-actions-margin-top));display:flex}:host luzmo-action-button.assistant-message-action{--luzmo-action-button-background-color-hover:var(--ai-chat-user-message-background)}:host .assistant-message-actions{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:none}:host .assistant-message-actions.assistant-message-actions--has-content{display:contents}:host .assistant-message-actions.assistant-message-actions--confirming{flex-direction:column;flex-basis:100%;align-items:flex-start;display:flex}:host .assistant-message-actions .assistant-message-action-confirm-message{font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style));color:var(--luzmo-ai-chat-assistant-message-actions-color,var(--ai-chat-assistant-message-actions-color));white-space:pre-line}:host .assistant-message-actions .assistant-message-action-confirm-controls{align-items:center;gap:var(--luzmo-ai-chat-assistant-message-actions-gap,var(--ai-chat-assistant-message-actions-gap));flex-wrap:wrap;display:flex}:host .assistant-message-actions luzmo-button.assistant-message-action,:host .assistant-message-actions slot::slotted(luzmo-button),:host .assistant-message-actions slot::slotted(button),:host .assistant-message-actions slot::slotted(a),:host .assistant-message-actions slot::slotted(input),:host .assistant-message-actions slot::slotted(select),:host .assistant-message-actions slot::slotted(textarea){font-style:normal}:host .assistant-message-actions slot::slotted(:not(luzmo-button):not(button):not(a):not(input):not(select):not(textarea)){font-style:var(--luzmo-ai-chat-assistant-message-actions-font-style,var(--ai-chat-assistant-message-actions-font-style));color:var(--luzmo-ai-chat-assistant-message-actions-color,var(--ai-chat-assistant-message-actions-color))}:host .assistant-context-menu-trigger{width:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));height:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));border:.0625rem solid var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));border-radius:var(--luzmo-ai-chat-context-menu-trigger-border-radius,var(--ai-chat-context-menu-trigger-border-radius));background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color));cursor:pointer;font-size:var(--ai-chat-context-menu-trigger-icon-size);justify-content:center;align-items:center;padding:0;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 .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));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([dir=rtl]) .assistant-message-footer{direction:rtl}:host{--ai-chat-background:var(--luzmo-background-color);--ai-chat-border-radius:0;--ai-chat-padding:0;--ai-chat-gap:var(--luzmo-spacing-5);--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-m);--ai-chat-error-message-color:var(--luzmo-danger,#dc3545);--ai-chat-cancelled-message-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed));--ai-chat-scrollbar-width:var(--luzmo-scrollbar-size);--ai-chat-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--ai-chat-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--ai-chat-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--ai-chat-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--ai-chat-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height-xs);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-s);--ai-chat-context-menu-trigger-border-color:var(--luzmo-border-color);--ai-chat-context-menu-trigger-border-radius:.375rem;--ai-chat-context-menu-trigger-background:var(--luzmo-background-color,transparent);--ai-chat-context-menu-trigger-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-trigger-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-trigger-hover-border-color:var(--luzmo-border-color-hover,var(--luzmo-border-color));--ai-chat-context-menu-trigger-hover-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-item-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-item-font-family:var(--luzmo-font-family);--ai-chat-markdown-line-height:1.5;--ai-chat-markdown-spacing:var(--luzmo-spacing-3);--ai-chat-markdown-heading-spacing:var(--luzmo-spacing-4);--ai-chat-markdown-heading-font-weight:var(--luzmo-font-weight-bold);--ai-chat-markdown-list-indent:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-markdown-link-color:var(--luzmo-primary);--ai-chat-markdown-code-font-family:var(--luzmo-font-family-mono,ui-monospace, monospace);--ai-chat-markdown-code-font-size:.875em;--ai-chat-markdown-code-background:var(--luzmo-background-color-highlight);--ai-chat-markdown-code-border-radius:var(--luzmo-border-radius-s);--ai-chat-markdown-border-color:var(--luzmo-border-color);--ai-chat-markdown-table-header-background:var(--luzmo-background-color-highlight);--ai-chat-assistant-message-actions-gap:var(--luzmo-spacing-2);--ai-chat-assistant-message-actions-margin-top:var(--luzmo-spacing-3);--ai-chat-assistant-message-actions-color:var(--luzmo-font-color-extra-dimmed);--ai-chat-assistant-message-actions-font-style:italic;--ai-chat-assistant-message-font-family:var(--luzmo-font-family);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-m);--ai-chat-assistant-message-line-height:var(--ai-chat-markdown-line-height);--ai-chat-user-message-background:rgba(var(--luzmo-primary-rgb), .08);--ai-chat-user-message-attachment-size:64px}:host([size=s]){--ai-chat-gap:var(--luzmo-spacing-4);--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-xs);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-s)}:host([size=l]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-l);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height-s);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-m);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--ai-chat-gap:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-3));--ai-chat-loading-message-icon-font-size:var(--luzmo-icon-size-xl);--ai-chat-context-menu-trigger-size:var(--luzmo-component-height);--ai-chat-context-menu-trigger-icon-size:var(--luzmo-icon-size-l);--ai-chat-assistant-message-font-size:var(--luzmo-font-size-xl)}";
|
|
2287
2287
|
// src/components/ai-chat/helpers/agent-config.ts
|
|
2288
|
-
function
|
|
2288
|
+
function Hn(e, t) {
|
|
2289
2289
|
if (e.agentConfig) {
|
|
2290
|
-
let n = e.agentConfig, r = t ??
|
|
2290
|
+
let n = e.agentConfig, r = t ?? Hn({
|
|
2291
2291
|
...e,
|
|
2292
2292
|
agentConfig: void 0
|
|
2293
2293
|
});
|
|
@@ -2323,7 +2323,7 @@ function Z(e, t) {
|
|
|
2323
2323
|
case "analyst": return { type: "analyst" };
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function Un(e) {
|
|
2327
2327
|
return {
|
|
2328
2328
|
chart: null,
|
|
2329
2329
|
dashboard: null,
|
|
@@ -2334,21 +2334,21 @@ function zn(e) {
|
|
|
2334
2334
|
};
|
|
2335
2335
|
}
|
|
2336
2336
|
// src/components/ai-chat/helpers/assistant-message-feedback.ts
|
|
2337
|
-
function
|
|
2337
|
+
function Wn(e, t) {
|
|
2338
2338
|
return e === t ? 0 : t;
|
|
2339
2339
|
}
|
|
2340
|
-
var
|
|
2341
|
-
function
|
|
2342
|
-
return e === t || [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((n) =>
|
|
2340
|
+
var Gn = /* @__PURE__ */ new Set(["feedback", "hideFeedback"]);
|
|
2341
|
+
function Kn(e, t) {
|
|
2342
|
+
return e === t || [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((n) => Gn.has(n) || e[n] === t[n] || JSON.stringify(e[n] ?? null) === JSON.stringify(t[n] ?? null));
|
|
2343
2343
|
}
|
|
2344
|
-
function
|
|
2345
|
-
return !e || e === t || e.messages === t.messages || e.messages.length !== t.messages.length ? !1 : [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((n) => n === "messages" || e[n] === t[n]) && e.messages.every((e, n) =>
|
|
2344
|
+
function qn(e, t) {
|
|
2345
|
+
return !e || e === t || e.messages === t.messages || e.messages.length !== t.messages.length ? !1 : [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((n) => n === "messages" || e[n] === t[n]) && e.messages.every((e, n) => Kn(e, t.messages[n]));
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function Jn({ labelId: e, rating: t, size: n, disabled: r, onRate: i }) {
|
|
2348
2348
|
let a = (e) => (t) => {
|
|
2349
2349
|
t.preventDefault(), t.stopPropagation(), i(e);
|
|
2350
2350
|
};
|
|
2351
|
-
return
|
|
2351
|
+
return h`
|
|
2352
2352
|
<div
|
|
2353
2353
|
class="assistant-message-feedback"
|
|
2354
2354
|
role="group"
|
|
@@ -2382,13 +2382,13 @@ function Wn({ labelId: e, rating: t, size: n, disabled: r, onRate: i }) {
|
|
|
2382
2382
|
?disabled=${r}
|
|
2383
2383
|
@change=${a(-1)}
|
|
2384
2384
|
>
|
|
2385
|
-
<luzmo-icon slot="icon" .icon=${
|
|
2385
|
+
<luzmo-icon slot="icon" .icon=${m} .size=${n}></luzmo-icon>
|
|
2386
2386
|
</luzmo-action-button>
|
|
2387
2387
|
</div>
|
|
2388
2388
|
`;
|
|
2389
2389
|
}
|
|
2390
2390
|
// src/components/ai-chat/empty-state/ai-chat-empty-state.module.scss?inline
|
|
2391
|
-
var
|
|
2391
|
+
var Yn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(--luzmo-ai-chat-empty-state-padding-block,var(--ai-chat-empty-state-padding-block));padding-inline:var(--luzmo-ai-chat-empty-state-padding-inline,var(--ai-chat-empty-state-padding-inline));flex:1;justify-content:center;align-items:center;display:flex}.empty-state{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-header-actions-gap,var(--ai-chat-empty-state-header-actions-gap));width:100%;max-width:var(--luzmo-ai-chat-empty-state-max-width,var(--ai-chat-empty-state-max-width));text-align:center;flex-direction:column;display:flex}.header{flex-direction:column;align-items:center;width:100%;display:flex}.actions{align-items:center;gap:var(--luzmo-ai-chat-empty-state-actions-gap,var(--ai-chat-empty-state-actions-gap));flex-direction:column;width:100%;display:flex}.title{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-title-font-size,var(--ai-chat-empty-state-title-font-size));font-weight:var(--luzmo-ai-chat-empty-state-title-font-weight,var(--ai-chat-empty-state-title-font-weight));line-height:var(--luzmo-ai-chat-empty-state-title-line-height,var(--ai-chat-empty-state-title-line-height));color:var(--luzmo-ai-chat-empty-state-title-color,var(--ai-chat-empty-state-title-color));text-wrap:balance;margin:0}.subtitle{font-family:var(--luzmo-font-family);font-size:var(--luzmo-ai-chat-empty-state-subtitle-font-size,var(--ai-chat-empty-state-subtitle-font-size));font-weight:var(--luzmo-ai-chat-empty-state-subtitle-font-weight,var(--ai-chat-empty-state-subtitle-font-weight));line-height:var(--luzmo-ai-chat-empty-state-subtitle-line-height,var(--ai-chat-empty-state-subtitle-line-height));color:var(--luzmo-ai-chat-empty-state-subtitle-color,var(--ai-chat-empty-state-subtitle-color));margin:0}.suggestions{justify-content:center;align-items:center;gap:var(--luzmo-ai-chat-empty-state-suggestions-gap,var(--ai-chat-empty-state-suggestions-gap));flex-wrap:wrap;width:100%;display:flex}luzmo-action-button{max-width:100%}:host{--ai-chat-empty-state-header-actions-gap:1.5rem;--ai-chat-empty-state-actions-gap:var(--luzmo-spacing-4);--ai-chat-empty-state-suggestions-gap:var(--luzmo-spacing-3);--ai-chat-empty-state-max-width:22.5rem;--ai-chat-empty-state-padding-block:2rem;--ai-chat-empty-state-padding-inline:var(--luzmo-spacing-5);--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-l);--ai-chat-empty-state-title-font-weight:var(--luzmo-font-weight);--ai-chat-empty-state-title-line-height:1.4;--ai-chat-empty-state-title-color:var(--luzmo-font-color-hard);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-s);--ai-chat-empty-state-subtitle-font-weight:var(--luzmo-font-weight);--ai-chat-empty-state-subtitle-line-height:var(--luzmo-line-height);--ai-chat-empty-state-subtitle-color:var(--luzmo-font-color-dimmed,var(--luzmo-font-color-extra-dimmed))}:host([size=s]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-m)}:host([size=l]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-xl);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-m)}:host([size=xl]){--ai-chat-empty-state-title-font-size:var(--luzmo-font-size-xxl);--ai-chat-empty-state-subtitle-font-size:var(--luzmo-font-size-l)}", Xn, Z = class extends a(i, { validSizes: [
|
|
2392
2392
|
"s",
|
|
2393
2393
|
"m",
|
|
2394
2394
|
"l",
|
|
@@ -2412,21 +2412,21 @@ var Gn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(
|
|
|
2412
2412
|
}
|
|
2413
2413
|
render() {
|
|
2414
2414
|
let e = this.suggestions.length > 0;
|
|
2415
|
-
return
|
|
2415
|
+
return h`
|
|
2416
2416
|
<section class="empty-state" aria-labelledby="ai-chat-empty-state-title">
|
|
2417
2417
|
<header class="header">
|
|
2418
2418
|
<h2 id="ai-chat-empty-state-title" class="title">${this.title}</h2>
|
|
2419
2419
|
</header>
|
|
2420
2420
|
|
|
2421
|
-
${e ?
|
|
2421
|
+
${e ? h`
|
|
2422
2422
|
<div class="actions">
|
|
2423
|
-
${this.subtitle ?
|
|
2423
|
+
${this.subtitle ? h`<p class="subtitle">${this.subtitle}</p>` : g}
|
|
2424
2424
|
<div
|
|
2425
2425
|
class="suggestions"
|
|
2426
2426
|
role="group"
|
|
2427
2427
|
aria-label=${c("Prompt suggestions", { desc: "Accessible label for the AI chat empty state suggestion list" })}
|
|
2428
2428
|
>
|
|
2429
|
-
${this.suggestions.map((e) =>
|
|
2429
|
+
${this.suggestions.map((e) => h`
|
|
2430
2430
|
<luzmo-action-button
|
|
2431
2431
|
variant="accent"
|
|
2432
2432
|
.size=${this.size}
|
|
@@ -2438,32 +2438,32 @@ var Gn = ":host{box-sizing:border-box;width:100%;min-height:0;padding-block:var(
|
|
|
2438
2438
|
`)}
|
|
2439
2439
|
</div>
|
|
2440
2440
|
</div>
|
|
2441
|
-
` :
|
|
2441
|
+
` : g}
|
|
2442
2442
|
</section>
|
|
2443
2443
|
`;
|
|
2444
2444
|
}
|
|
2445
2445
|
};
|
|
2446
2446
|
// src/components/ai-chat/empty-state/index.ts
|
|
2447
|
-
|
|
2447
|
+
Xn = Z, Xn.styles = te(Yn), Xn.tagName = "luzmo-ai-chat-empty-state", o([_({ type: String })], Z.prototype, "title", void 0), o([_({ type: String })], Z.prototype, "subtitle", void 0), o([_({ type: Array })], Z.prototype, "suggestions", void 0), o([_({
|
|
2448
2448
|
type: Boolean,
|
|
2449
2449
|
reflect: !0
|
|
2450
|
-
})],
|
|
2450
|
+
})], Z.prototype, "disabled", void 0), customElements.get("luzmo-ai-chat-empty-state") || customElements.define("luzmo-ai-chat-empty-state", Z);
|
|
2451
2451
|
// src/components/ai-chat/helpers/elicitation-template.ts
|
|
2452
|
-
var
|
|
2453
|
-
function
|
|
2454
|
-
let t = e.content?.[
|
|
2452
|
+
var Zn = "answer", Qn = (e) => e.stopPropagation();
|
|
2453
|
+
function $n(e) {
|
|
2454
|
+
let t = e.content?.[Zn];
|
|
2455
2455
|
return typeof t == "string" ? t : void 0;
|
|
2456
2456
|
}
|
|
2457
|
-
async function
|
|
2457
|
+
async function er(e) {
|
|
2458
2458
|
e.stopPropagation();
|
|
2459
2459
|
let t = e.currentTarget;
|
|
2460
2460
|
await t.updateComplete, t.submit();
|
|
2461
2461
|
}
|
|
2462
|
-
function
|
|
2462
|
+
function tr({ message: e, state: t, size: n, onSubmit: r }) {
|
|
2463
2463
|
let i = e.elicitation;
|
|
2464
|
-
if (!i) return
|
|
2464
|
+
if (!i) return g;
|
|
2465
2465
|
let a = [{
|
|
2466
|
-
id:
|
|
2466
|
+
id: Zn,
|
|
2467
2467
|
type: "single",
|
|
2468
2468
|
title: i.question,
|
|
2469
2469
|
required: !0,
|
|
@@ -2472,11 +2472,11 @@ function Qn({ message: e, state: t, size: n, onSubmit: r }) {
|
|
|
2472
2472
|
label: e
|
|
2473
2473
|
}))
|
|
2474
2474
|
}];
|
|
2475
|
-
return
|
|
2475
|
+
return ae(`${e.id}:${t}`, h`
|
|
2476
2476
|
<luzmo-question-box
|
|
2477
2477
|
.size=${n}
|
|
2478
2478
|
.questions=${a}
|
|
2479
|
-
.value=${
|
|
2479
|
+
.value=${ie([i.answer], () => i.answer ? { [Zn]: i.answer } : {})}
|
|
2480
2480
|
.labels=${{
|
|
2481
2481
|
submit: c("Submit", { desc: "Button that sends the chosen answer to an AI agent question" }),
|
|
2482
2482
|
answerTitle: c("Answer", { desc: "Heading above the answer chosen for an AI agent question" }),
|
|
@@ -2487,17 +2487,130 @@ function Qn({ message: e, state: t, size: n, onSubmit: r }) {
|
|
|
2487
2487
|
hide-close
|
|
2488
2488
|
hide-skip
|
|
2489
2489
|
@luzmo-submit=${r}
|
|
2490
|
-
@input=${
|
|
2491
|
-
@change=${
|
|
2492
|
-
@luzmo-cancel=${
|
|
2490
|
+
@input=${Qn}
|
|
2491
|
+
@change=${er}
|
|
2492
|
+
@luzmo-cancel=${Qn}
|
|
2493
2493
|
></luzmo-question-box>
|
|
2494
2494
|
`);
|
|
2495
2495
|
}
|
|
2496
|
+
// src/components/ai-chat/helpers/question-template.ts
|
|
2497
|
+
var nr = (e) => e.stopPropagation();
|
|
2498
|
+
function rr(e) {
|
|
2499
|
+
return e.questions.map((e) => ({
|
|
2500
|
+
id: e.id,
|
|
2501
|
+
type: e.type,
|
|
2502
|
+
title: e.title,
|
|
2503
|
+
description: e.description,
|
|
2504
|
+
required: !0,
|
|
2505
|
+
...e.type === "multiple" ? {
|
|
2506
|
+
minSelected: e.minSelected,
|
|
2507
|
+
maxSelected: e.maxSelected
|
|
2508
|
+
} : {},
|
|
2509
|
+
options: e.options.map((e) => ({
|
|
2510
|
+
value: e.id,
|
|
2511
|
+
label: e.label,
|
|
2512
|
+
description: e.description,
|
|
2513
|
+
...e.recommended ? { recommended: !0 } : {}
|
|
2514
|
+
})),
|
|
2515
|
+
other: !0
|
|
2516
|
+
}));
|
|
2517
|
+
}
|
|
2518
|
+
function ir(e, t) {
|
|
2519
|
+
let n = {};
|
|
2520
|
+
if (!t) return n;
|
|
2521
|
+
for (let r of e) {
|
|
2522
|
+
let e = t[r.id], i = [...e?.options ?? [], ...e?.other ? [re] : []];
|
|
2523
|
+
n[r.id] = r.type === "single" ? i[0] : i, e?.other && (n[y(r.id)] = e.other);
|
|
2524
|
+
}
|
|
2525
|
+
return n;
|
|
2526
|
+
}
|
|
2527
|
+
function ar(e, t) {
|
|
2528
|
+
if (t.action === "decline") return {
|
|
2529
|
+
type: "question",
|
|
2530
|
+
action: "skip"
|
|
2531
|
+
};
|
|
2532
|
+
if (t.action !== "accept" || !t.content) return null;
|
|
2533
|
+
let n = {};
|
|
2534
|
+
for (let r of e.questions) {
|
|
2535
|
+
let e = t.content[r.id], i = (Array.isArray(e) ? e : e ? [e] : []).filter((e) => typeof e == "string"), a = t.content[y(r.id)], o = i.includes(re) && typeof a == "string" ? a.trim() : "";
|
|
2536
|
+
n[r.id] = {
|
|
2537
|
+
options: i.filter((e) => e !== re),
|
|
2538
|
+
...o ? { other: o } : {}
|
|
2539
|
+
};
|
|
2540
|
+
}
|
|
2541
|
+
return {
|
|
2542
|
+
type: "question",
|
|
2543
|
+
action: "submit",
|
|
2544
|
+
answers: n
|
|
2545
|
+
};
|
|
2546
|
+
}
|
|
2547
|
+
function or() {
|
|
2548
|
+
return {
|
|
2549
|
+
continue: c("Continue", { desc: "Button that moves to the next AI agent question" }),
|
|
2550
|
+
back: c("Back", {
|
|
2551
|
+
id: "ai-chat-question-back",
|
|
2552
|
+
desc: "Button that returns to the previous AI agent question"
|
|
2553
|
+
}),
|
|
2554
|
+
submit: c("Submit", { desc: "Button that sends the chosen answer to an AI agent question" }),
|
|
2555
|
+
skip: c("Skip", { desc: "Button that skips AI agent questions; the agent uses the recommended options or chooses itself" }),
|
|
2556
|
+
change: c("Change", { desc: "Button that goes back to pick another answer for an AI agent question" }),
|
|
2557
|
+
other: c("Other", { desc: "Choice that lets the user type their own answer to an AI agent question" }),
|
|
2558
|
+
otherPlaceholder: c("Type your answer", { desc: "Placeholder of the free-text answer to an AI agent question" }),
|
|
2559
|
+
recommended: c("Recommended", { desc: "Badge on the option of an AI agent question that the agent would pick and assumes on Skip" }),
|
|
2560
|
+
recommendedSuffix: c("{label} ({recommended})", { desc: "An answer to an AI agent question that is the recommended option. Keep {label} and {recommended} unchanged; they are replaced with the option and the Recommended label." }),
|
|
2561
|
+
answerTitle: c("Answer", { desc: "Heading above the answer chosen for an AI agent question" }),
|
|
2562
|
+
answersTitle: c("Answers", { desc: "Heading above the answers chosen for several AI agent questions" }),
|
|
2563
|
+
progress: c("Question {current} of {total}", { desc: "Progress through AI agent questions. Keep {current} and {total} unchanged; they are replaced with numbers." }),
|
|
2564
|
+
selectedCount: c("{count} selected", {
|
|
2565
|
+
id: "ai-chat-question-selected-count",
|
|
2566
|
+
desc: "Number of chosen options for an AI agent question. Keep {count} unchanged; it is replaced with a number."
|
|
2567
|
+
}),
|
|
2568
|
+
selectedCountOne: c("1 selected", { desc: "Shown when exactly one option is chosen for an AI agent question" }),
|
|
2569
|
+
requiredSelectionDescription: c("Choose at least one option.", { desc: "Screen reader guidance for an AI agent question that needs at least one choice" }),
|
|
2570
|
+
selectionRangeDescription: c("Choose {min} to {max} options.", { desc: "Screen reader guidance for an AI agent question. Keep {min} and {max} unchanged; they are replaced with numbers." }),
|
|
2571
|
+
minSelectedError: c("Choose at least {min} options.", { desc: "Error when too few options are chosen for an AI agent question. Keep {min} unchanged; it is replaced with a number." }),
|
|
2572
|
+
maxSelectedError: c("Choose at most {max} options.", { desc: "Error when too many options are chosen for an AI agent question. Keep {max} unchanged; it is replaced with a number." }),
|
|
2573
|
+
otherRequiredError: c("Type your answer or pick another option.", { desc: "Error when Other is chosen for an AI agent question without typing an answer" })
|
|
2574
|
+
};
|
|
2575
|
+
}
|
|
2576
|
+
function sr(e) {
|
|
2577
|
+
switch (e) {
|
|
2578
|
+
case "skipped": return c("Skipped", { desc: "Status under AI agent questions the user skipped" });
|
|
2579
|
+
case "superseded": return c("No longer available", { desc: "Status under AI agent questions the user did not answer before sending another message" });
|
|
2580
|
+
default: return null;
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
function cr({ message: e, state: t, size: n, onAnswer: r }) {
|
|
2584
|
+
let i = e.question;
|
|
2585
|
+
if (!i) return g;
|
|
2586
|
+
let a = sr(t), o = i.status === "answered" ? i.response.answers : void 0;
|
|
2587
|
+
return h`
|
|
2588
|
+
${ae(`${e.id}:${i.assetId}:${t}`, h`
|
|
2589
|
+
<luzmo-question-box
|
|
2590
|
+
class="agent-question"
|
|
2591
|
+
.size=${n}
|
|
2592
|
+
.questions=${ie([i], () => rr(i))}
|
|
2593
|
+
.value=${ie([o], () => ir(i.questions, o))}
|
|
2594
|
+
.labels=${or()}
|
|
2595
|
+
?readonly=${t === "answered"}
|
|
2596
|
+
?disabled=${t !== "open" && t !== "answered"}
|
|
2597
|
+
hide-close
|
|
2598
|
+
@luzmo-submit=${r}
|
|
2599
|
+
@luzmo-decline=${r}
|
|
2600
|
+
@input=${nr}
|
|
2601
|
+
@change=${nr}
|
|
2602
|
+
@luzmo-cancel=${nr}
|
|
2603
|
+
></luzmo-question-box>
|
|
2604
|
+
`)}
|
|
2605
|
+
${t === "open" && i.error ? h`<p class="interaction-error" role="alert">${i.error}</p>` : g}
|
|
2606
|
+
${a ? h`<p class="interaction-status" role="status" tabindex="-1">${a}</p>` : g}
|
|
2607
|
+
`;
|
|
2608
|
+
}
|
|
2496
2609
|
// src/components/ai-chat/ai-chat-request.ts
|
|
2497
|
-
function
|
|
2610
|
+
function lr(e, t) {
|
|
2498
2611
|
return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+|\/+$/g, "")}/aiprompt`;
|
|
2499
2612
|
}
|
|
2500
|
-
function
|
|
2613
|
+
function ur(e) {
|
|
2501
2614
|
return e.type === "placeholder" ? null : {
|
|
2502
2615
|
...e,
|
|
2503
2616
|
version: e.version || "",
|
|
@@ -2506,12 +2619,13 @@ function er(e) {
|
|
|
2506
2619
|
aichartId: e.aichartId || ""
|
|
2507
2620
|
};
|
|
2508
2621
|
}
|
|
2509
|
-
function
|
|
2622
|
+
function dr(e, t = e.datasetIds) {
|
|
2623
|
+
let n = e.attachmentUrls ?? [];
|
|
2510
2624
|
return [
|
|
2511
|
-
{
|
|
2625
|
+
...e.answer && !e.prompt ? [] : [{
|
|
2512
2626
|
type: "text",
|
|
2513
|
-
text: e
|
|
2514
|
-
},
|
|
2627
|
+
text: e.prompt
|
|
2628
|
+
}],
|
|
2515
2629
|
...t.map((e) => ({
|
|
2516
2630
|
type: "dataset",
|
|
2517
2631
|
id: e
|
|
@@ -2522,63 +2636,65 @@ function tr(e, t, n = []) {
|
|
|
2522
2636
|
}))
|
|
2523
2637
|
];
|
|
2524
2638
|
}
|
|
2525
|
-
function
|
|
2639
|
+
function fr(e) {
|
|
2526
2640
|
return {
|
|
2527
2641
|
stream: e.stream ?? !0,
|
|
2528
2642
|
response_mode: "mixed",
|
|
2529
2643
|
...e.conversationId ? { conversation_id: e.conversationId } : {},
|
|
2530
|
-
...e.localeId ? { locale_id: e.localeId } : {}
|
|
2644
|
+
...e.localeId ? { locale_id: e.localeId } : {},
|
|
2645
|
+
...e.interactions?.length ? { client_capabilities: { interactions: e.interactions } } : {},
|
|
2646
|
+
...e.answer ? { answer: e.answer } : {}
|
|
2531
2647
|
};
|
|
2532
2648
|
}
|
|
2533
|
-
function
|
|
2649
|
+
function pr(e, t, n) {
|
|
2534
2650
|
return {
|
|
2535
2651
|
agent: e,
|
|
2536
2652
|
task: t,
|
|
2537
|
-
...
|
|
2653
|
+
...fr(n)
|
|
2538
2654
|
};
|
|
2539
2655
|
}
|
|
2540
|
-
function
|
|
2541
|
-
let t =
|
|
2656
|
+
function mr(e) {
|
|
2657
|
+
let t = dr(e), n = e.chart ? ur(e.chart) : null;
|
|
2542
2658
|
return n && t.push({
|
|
2543
2659
|
type: "item",
|
|
2544
2660
|
value: n
|
|
2545
2661
|
}), {
|
|
2546
|
-
...
|
|
2662
|
+
...pr("item", e.task ?? "generate", e),
|
|
2547
2663
|
input: t
|
|
2548
2664
|
};
|
|
2549
2665
|
}
|
|
2550
|
-
function
|
|
2551
|
-
let t =
|
|
2666
|
+
function hr(e) {
|
|
2667
|
+
let t = dr(e);
|
|
2552
2668
|
return e.dashboard && t.push({
|
|
2553
2669
|
type: "dashboard",
|
|
2554
2670
|
value: e.dashboard,
|
|
2555
2671
|
...e.currentScreenMode ? { current_screen_mode: e.currentScreenMode } : {}
|
|
2556
2672
|
}), {
|
|
2557
|
-
...
|
|
2673
|
+
...pr("dashboard", "generate", e),
|
|
2558
2674
|
timezone_id: e.timezoneId ?? "UTC",
|
|
2559
2675
|
input: t
|
|
2560
2676
|
};
|
|
2561
2677
|
}
|
|
2562
|
-
function
|
|
2678
|
+
function gr(e) {
|
|
2563
2679
|
return {
|
|
2564
|
-
...
|
|
2565
|
-
input:
|
|
2680
|
+
...pr("analyst", "generate", e),
|
|
2681
|
+
input: dr(e)
|
|
2566
2682
|
};
|
|
2567
2683
|
}
|
|
2568
|
-
function
|
|
2569
|
-
let t =
|
|
2684
|
+
function _r(e) {
|
|
2685
|
+
let t = dr(e, []);
|
|
2570
2686
|
return e.customItem && t.push({
|
|
2571
2687
|
type: "custom-item",
|
|
2572
2688
|
value: e.customItem
|
|
2573
2689
|
}), {
|
|
2574
|
-
...
|
|
2690
|
+
...pr("custom-item", "generate", e),
|
|
2575
2691
|
text_format: "markdown",
|
|
2576
2692
|
...e.internal ? { internal: !0 } : {},
|
|
2577
2693
|
input: t
|
|
2578
2694
|
};
|
|
2579
2695
|
}
|
|
2580
|
-
function
|
|
2581
|
-
let n =
|
|
2696
|
+
function vr(e, t) {
|
|
2697
|
+
let n = dr(t), r = t.chart ? ur(t.chart) : null;
|
|
2582
2698
|
return r && n.push({
|
|
2583
2699
|
type: "item",
|
|
2584
2700
|
value: r
|
|
@@ -2588,30 +2704,30 @@ function cr(e, t) {
|
|
|
2588
2704
|
...t.currentScreenMode ? { current_screen_mode: t.currentScreenMode } : {}
|
|
2589
2705
|
}), {
|
|
2590
2706
|
agent_id: e,
|
|
2591
|
-
...
|
|
2707
|
+
...fr(t),
|
|
2592
2708
|
input: n
|
|
2593
2709
|
};
|
|
2594
2710
|
}
|
|
2595
|
-
function
|
|
2596
|
-
if (t.agentId) return
|
|
2711
|
+
function yr(e, t) {
|
|
2712
|
+
if (t.agentId) return vr(t.agentId, t);
|
|
2597
2713
|
switch (e) {
|
|
2598
|
-
case "dashboard": return
|
|
2599
|
-
case "analyst": return
|
|
2600
|
-
case "custom-item": return
|
|
2601
|
-
default: return
|
|
2714
|
+
case "dashboard": return hr(t);
|
|
2715
|
+
case "analyst": return gr(t);
|
|
2716
|
+
case "custom-item": return _r(t);
|
|
2717
|
+
default: return mr(t);
|
|
2602
2718
|
}
|
|
2603
2719
|
}
|
|
2604
|
-
function
|
|
2720
|
+
function br(e, n) {
|
|
2605
2721
|
let { authKey: r, authToken: i, apiVersion: a = "0.1.0" } = n;
|
|
2606
2722
|
return n.attachmentUrls?.length && t(n.attachmentUrls), {
|
|
2607
2723
|
key: r,
|
|
2608
2724
|
token: i,
|
|
2609
2725
|
action: "create",
|
|
2610
2726
|
version: a,
|
|
2611
|
-
properties:
|
|
2727
|
+
properties: yr(e, n)
|
|
2612
2728
|
};
|
|
2613
2729
|
}
|
|
2614
|
-
function
|
|
2730
|
+
function xr(e, t, n, r = "0.1.0", i = null) {
|
|
2615
2731
|
return {
|
|
2616
2732
|
key: t,
|
|
2617
2733
|
token: n,
|
|
@@ -2625,7 +2741,7 @@ function dr(e, t, n, r = "0.1.0", i = null) {
|
|
|
2625
2741
|
};
|
|
2626
2742
|
}
|
|
2627
2743
|
// src/components/ai-chat/stream/transport.ts
|
|
2628
|
-
async function
|
|
2744
|
+
async function Sr(e) {
|
|
2629
2745
|
let t = await fetch(e.url, {
|
|
2630
2746
|
method: "POST",
|
|
2631
2747
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2643,21 +2759,21 @@ async function fr(e) {
|
|
|
2643
2759
|
conversationId: t.headers.get("x-conversation-id")
|
|
2644
2760
|
};
|
|
2645
2761
|
}
|
|
2646
|
-
function
|
|
2762
|
+
function Cr(e) {
|
|
2647
2763
|
let t = e.trim();
|
|
2648
2764
|
if (!t || t.startsWith(":") || t.startsWith("event:") || t.startsWith("id:")) return null;
|
|
2649
2765
|
let n = t;
|
|
2650
2766
|
return n.startsWith("data:") && (n = n.slice(5).trimStart()), !n || n === "[DONE]" ? null : JSON.parse(n);
|
|
2651
2767
|
}
|
|
2652
|
-
function
|
|
2768
|
+
function wr(e, t) {
|
|
2653
2769
|
try {
|
|
2654
|
-
let n =
|
|
2770
|
+
let n = Cr(e);
|
|
2655
2771
|
n && t(n);
|
|
2656
2772
|
} catch {
|
|
2657
2773
|
console.error("Failed to parse stream line");
|
|
2658
2774
|
}
|
|
2659
2775
|
}
|
|
2660
|
-
async function
|
|
2776
|
+
async function Tr(e, t) {
|
|
2661
2777
|
let n = e.getReader(), r = new TextDecoder(), i = "";
|
|
2662
2778
|
try {
|
|
2663
2779
|
for (;;) {
|
|
@@ -2666,17 +2782,17 @@ async function hr(e, t) {
|
|
|
2666
2782
|
i += r.decode(a, { stream: !0 });
|
|
2667
2783
|
let o = i.split(/\r?\n/);
|
|
2668
2784
|
i = o.pop() ?? "";
|
|
2669
|
-
for (let e of o)
|
|
2785
|
+
for (let e of o) wr(e, t);
|
|
2670
2786
|
}
|
|
2671
2787
|
i += r.decode();
|
|
2672
2788
|
let e = i.trim();
|
|
2673
|
-
e &&
|
|
2789
|
+
e && wr(e, t);
|
|
2674
2790
|
} finally {
|
|
2675
2791
|
n.releaseLock();
|
|
2676
2792
|
}
|
|
2677
2793
|
}
|
|
2678
2794
|
// src/components/ai-chat/stream/progress.ts
|
|
2679
|
-
function
|
|
2795
|
+
function Er() {
|
|
2680
2796
|
return {
|
|
2681
2797
|
id: "root",
|
|
2682
2798
|
step: "root",
|
|
@@ -2689,12 +2805,113 @@ function gr() {
|
|
|
2689
2805
|
}]
|
|
2690
2806
|
};
|
|
2691
2807
|
}
|
|
2692
|
-
function
|
|
2808
|
+
function Dr(e) {
|
|
2693
2809
|
let t = e.progress;
|
|
2694
2810
|
return typeof t != "object" || !t ? !1 : "id" in t && "step" in t && "status" in t;
|
|
2695
2811
|
}
|
|
2812
|
+
// src/components/ai-chat/helpers/interaction-assets.ts
|
|
2813
|
+
var Or = (e) => typeof e == "object" && !!e && !Array.isArray(e), kr = (e) => typeof e == "string" && e.length > 0, Ar = (e) => kr(e) ? e : void 0, jr = (e) => Number.isInteger(e) ? e : void 0;
|
|
2814
|
+
function Mr(e) {
|
|
2815
|
+
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
2816
|
+
}
|
|
2817
|
+
function Nr(e) {
|
|
2818
|
+
return !Or(e) || !kr(e.id) || !kr(e.label) ? null : Mr({
|
|
2819
|
+
id: e.id,
|
|
2820
|
+
label: e.label,
|
|
2821
|
+
description: Ar(e.description),
|
|
2822
|
+
recommended: e.recommended === !0 || void 0
|
|
2823
|
+
});
|
|
2824
|
+
}
|
|
2825
|
+
function Pr(e) {
|
|
2826
|
+
if (!Or(e) || !kr(e.id) || !kr(e.title) || !Array.isArray(e.options) || e.type !== "single" && e.type !== "multiple") return null;
|
|
2827
|
+
let t = e.options.map(Nr);
|
|
2828
|
+
return t.length < 2 || t.some((e) => e === null) ? null : Mr({
|
|
2829
|
+
id: e.id,
|
|
2830
|
+
type: e.type,
|
|
2831
|
+
title: e.title,
|
|
2832
|
+
description: Ar(e.description),
|
|
2833
|
+
options: t,
|
|
2834
|
+
minSelected: jr(e.minSelected),
|
|
2835
|
+
maxSelected: jr(e.maxSelected)
|
|
2836
|
+
});
|
|
2837
|
+
}
|
|
2838
|
+
function Fr(e) {
|
|
2839
|
+
if (!Or(e)) return null;
|
|
2840
|
+
let t = {};
|
|
2841
|
+
for (let [n, r] of Object.entries(e)) {
|
|
2842
|
+
if (!Or(r) || !Array.isArray(r.options) || !r.options.every(kr)) return null;
|
|
2843
|
+
t[n] = Mr({
|
|
2844
|
+
options: [...r.options],
|
|
2845
|
+
other: Ar(r.other)
|
|
2846
|
+
});
|
|
2847
|
+
}
|
|
2848
|
+
return t;
|
|
2849
|
+
}
|
|
2850
|
+
function Ir(e, t) {
|
|
2851
|
+
if (!Or(t) || !Array.isArray(t.questions)) return null;
|
|
2852
|
+
let n = t.questions.map(Pr);
|
|
2853
|
+
if (n.length < 1 || n.length > 3 || n.some((e) => e === null)) return null;
|
|
2854
|
+
let r = {
|
|
2855
|
+
assetId: e,
|
|
2856
|
+
questions: n
|
|
2857
|
+
}, i = Or(t.answer) && Or(t.answer.response) ? t.answer.response : null;
|
|
2858
|
+
switch (t.status) {
|
|
2859
|
+
case "open":
|
|
2860
|
+
case "superseded": return {
|
|
2861
|
+
...r,
|
|
2862
|
+
status: t.status
|
|
2863
|
+
};
|
|
2864
|
+
case "answered": {
|
|
2865
|
+
let e = i?.action === "submit" ? Fr(i.answers) : null;
|
|
2866
|
+
return e ? {
|
|
2867
|
+
...r,
|
|
2868
|
+
status: "answered",
|
|
2869
|
+
response: {
|
|
2870
|
+
type: "question",
|
|
2871
|
+
action: "submit",
|
|
2872
|
+
answers: e
|
|
2873
|
+
}
|
|
2874
|
+
} : null;
|
|
2875
|
+
}
|
|
2876
|
+
case "skipped": return i?.action === "skip" ? {
|
|
2877
|
+
...r,
|
|
2878
|
+
status: "skipped",
|
|
2879
|
+
response: {
|
|
2880
|
+
type: "question",
|
|
2881
|
+
action: "skip"
|
|
2882
|
+
}
|
|
2883
|
+
} : null;
|
|
2884
|
+
default: return null;
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
function Lr(e) {
|
|
2888
|
+
let t = {};
|
|
2889
|
+
for (let n of e) {
|
|
2890
|
+
let e = Or(n) && kr(n.id) && n.type === "question" ? Ir(n.id, n.value) : null;
|
|
2891
|
+
e && (t.question = e);
|
|
2892
|
+
}
|
|
2893
|
+
return t;
|
|
2894
|
+
}
|
|
2895
|
+
var Rr = 300;
|
|
2896
|
+
function zr(e) {
|
|
2897
|
+
return e.action === "submit" && Object.values(e.answers).some((e) => (e.other?.trim().length ?? 0) > Rr) ? c(l`Keep your own answer to ${Rr} characters or fewer.`, { desc: "Error under AI agent questions when the text typed under Other is too long. The number is a character count." }) : null;
|
|
2898
|
+
}
|
|
2899
|
+
function Br(e) {
|
|
2900
|
+
return {
|
|
2901
|
+
min: e.minSelected ?? 1,
|
|
2902
|
+
max: e.maxSelected ?? (e.type === "single" ? 1 : e.options.length + 1)
|
|
2903
|
+
};
|
|
2904
|
+
}
|
|
2905
|
+
function Vr(e, t) {
|
|
2906
|
+
return t.action === "skip" || Object.keys(t.answers).length === e.length && e.every((e) => {
|
|
2907
|
+
let n = t.answers[e.id];
|
|
2908
|
+
if (!n) return !1;
|
|
2909
|
+
let r = new Set(e.options.map((e) => e.id)), i = n.other?.trim(), a = n.options.length + +!!i, { min: o, max: s } = Br(e);
|
|
2910
|
+
return new Set(n.options).size === n.options.length && n.options.every((e) => r.has(e)) && (n.other === void 0 || i !== void 0 && i.length > 0 && i.length <= Rr) && a >= o && a <= s;
|
|
2911
|
+
});
|
|
2912
|
+
}
|
|
2696
2913
|
// src/components/ai-chat/stream/chunk-extractors.ts
|
|
2697
|
-
function
|
|
2914
|
+
function Hr(e) {
|
|
2698
2915
|
if (!e || typeof e != "object") return "";
|
|
2699
2916
|
let t = e.assistant_message;
|
|
2700
2917
|
if (!t || typeof t != "object") return "";
|
|
@@ -2704,76 +2921,76 @@ function vr(e) {
|
|
|
2704
2921
|
let n = t.content;
|
|
2705
2922
|
return typeof n == "string" ? n : n && typeof n == "object" && typeof n.text == "string" ? n.text : "";
|
|
2706
2923
|
}
|
|
2707
|
-
function
|
|
2924
|
+
function Ur(e) {
|
|
2708
2925
|
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 : "";
|
|
2709
2926
|
}
|
|
2710
|
-
function
|
|
2711
|
-
return
|
|
2927
|
+
function Wr(e) {
|
|
2928
|
+
return Hr(e.result);
|
|
2712
2929
|
}
|
|
2713
|
-
function
|
|
2930
|
+
function Gr(e) {
|
|
2714
2931
|
return !!e.done || e.type === "finish" || e.type === "done" || "question" in e;
|
|
2715
2932
|
}
|
|
2716
|
-
function
|
|
2933
|
+
function Kr(e, t) {
|
|
2717
2934
|
let n = typeof e.conversation_id == "string" && e.conversation_id || typeof e.conversationId == "string" && e.conversationId;
|
|
2718
2935
|
n && t.callbacks.onConversationIdChange(n);
|
|
2719
2936
|
}
|
|
2720
|
-
function
|
|
2937
|
+
function qr(e) {
|
|
2721
2938
|
return typeof e.assistant_message_id == "string" && e.assistant_message_id ? e.assistant_message_id : null;
|
|
2722
2939
|
}
|
|
2723
|
-
function
|
|
2940
|
+
function Jr(e) {
|
|
2724
2941
|
for (let t of e) if (t && typeof t == "object" && t.type === "item") {
|
|
2725
2942
|
let e = t.value;
|
|
2726
2943
|
if (e && typeof e == "object") return e;
|
|
2727
2944
|
}
|
|
2728
2945
|
return null;
|
|
2729
2946
|
}
|
|
2730
|
-
function
|
|
2947
|
+
function Yr(e) {
|
|
2731
2948
|
let t = e.chart ?? e.generatedChart;
|
|
2732
2949
|
if (t && typeof t == "object") return t;
|
|
2733
2950
|
let n = e.aiMessageAssets ?? e.ai_message_assets;
|
|
2734
2951
|
if (Array.isArray(n)) {
|
|
2735
|
-
let e =
|
|
2952
|
+
let e = Jr(n);
|
|
2736
2953
|
if (e) return e;
|
|
2737
2954
|
}
|
|
2738
2955
|
let r = e.result;
|
|
2739
2956
|
if (r && typeof r == "object") {
|
|
2740
2957
|
let e = r.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
|
|
2741
|
-
if (Array.isArray(t)) return
|
|
2958
|
+
if (Array.isArray(t)) return Jr(t);
|
|
2742
2959
|
}
|
|
2743
2960
|
return null;
|
|
2744
2961
|
}
|
|
2745
|
-
function
|
|
2962
|
+
function Xr(e) {
|
|
2746
2963
|
for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
|
|
2747
2964
|
let e = t.value;
|
|
2748
2965
|
if (e && typeof e == "object" && Array.isArray(e.views)) return e;
|
|
2749
2966
|
}
|
|
2750
2967
|
return null;
|
|
2751
2968
|
}
|
|
2752
|
-
function
|
|
2969
|
+
function Zr(e) {
|
|
2753
2970
|
for (let t of e) if (t && typeof t == "object" && t.type === "dashboard") {
|
|
2754
2971
|
let e = t.name;
|
|
2755
2972
|
if (e && typeof e == "object") return e;
|
|
2756
2973
|
}
|
|
2757
2974
|
}
|
|
2758
|
-
function
|
|
2975
|
+
function Qr(...e) {
|
|
2759
2976
|
return e.find(Array.isArray);
|
|
2760
2977
|
}
|
|
2761
|
-
function
|
|
2978
|
+
function $r(e) {
|
|
2762
2979
|
if (e.views && Array.isArray(e.views)) return e;
|
|
2763
2980
|
let t = e.aiMessageAssets ?? e.ai_message_assets;
|
|
2764
|
-
if (Array.isArray(t)) return
|
|
2981
|
+
if (Array.isArray(t)) return Xr(t);
|
|
2765
2982
|
let n = e.result;
|
|
2766
2983
|
if (n && typeof n == "object") {
|
|
2767
2984
|
let e = n.assistant_message, t = e?.aiMessageAssets ?? e?.ai_message_assets;
|
|
2768
|
-
if (Array.isArray(t)) return
|
|
2985
|
+
if (Array.isArray(t)) return Xr(t);
|
|
2769
2986
|
}
|
|
2770
2987
|
return null;
|
|
2771
2988
|
}
|
|
2772
|
-
function
|
|
2773
|
-
let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r =
|
|
2774
|
-
return r ?
|
|
2989
|
+
function ei(e) {
|
|
2990
|
+
let t = e.aiMessageAssets ?? e.ai_message_assets, n = e.result?.assistant_message, r = Qr(t, n?.aiMessageAssets ?? n?.ai_message_assets);
|
|
2991
|
+
return r ? Zr(r) : void 0;
|
|
2775
2992
|
}
|
|
2776
|
-
function
|
|
2993
|
+
function ti(e) {
|
|
2777
2994
|
let t = e.result?.assistant_message;
|
|
2778
2995
|
for (let n of [e.aiMessageAssets ?? e.ai_message_assets, t?.aiMessageAssets ?? t?.ai_message_assets]) if (Array.isArray(n)) {
|
|
2779
2996
|
for (let e of n) if (e && typeof e == "object" && e.type === "custom-item" && e.value && typeof e.value == "object" && !Array.isArray(e.value)) return e.value;
|
|
@@ -2781,7 +2998,7 @@ function jr(e) {
|
|
|
2781
2998
|
return null;
|
|
2782
2999
|
}
|
|
2783
3000
|
// src/components/ai-chat/stream/stream-processor.ts
|
|
2784
|
-
var
|
|
3001
|
+
var ni = /* @__PURE__ */ new Set([
|
|
2785
3002
|
"conversation-id",
|
|
2786
3003
|
"conversation_id",
|
|
2787
3004
|
"keepalive",
|
|
@@ -2789,11 +3006,11 @@ var Mr = /* @__PURE__ */ new Set([
|
|
|
2789
3006
|
"finish",
|
|
2790
3007
|
"done"
|
|
2791
3008
|
]);
|
|
2792
|
-
function
|
|
2793
|
-
return (
|
|
3009
|
+
function ri(e, t) {
|
|
3010
|
+
return (qr(e) ?? t.state.assistantMessageId) || (typeof e.messageId == "string" ? e.messageId : void 0);
|
|
2794
3011
|
}
|
|
2795
|
-
function
|
|
2796
|
-
let r =
|
|
3012
|
+
function ii(e, t, n) {
|
|
3013
|
+
let r = ri(e, t);
|
|
2797
3014
|
return {
|
|
2798
3015
|
agent: n.agent,
|
|
2799
3016
|
conversationId: t.callbacks.getConversationId(),
|
|
@@ -2803,71 +3020,71 @@ function Pr(e, t, n) {
|
|
|
2803
3020
|
}
|
|
2804
3021
|
function Q(e, t, n, r, i) {
|
|
2805
3022
|
let a = {
|
|
2806
|
-
...
|
|
3023
|
+
...ii(n, e, t),
|
|
2807
3024
|
recognized: !0,
|
|
2808
3025
|
type: r,
|
|
2809
3026
|
data: i
|
|
2810
3027
|
};
|
|
2811
3028
|
e.callbacks.onStep(a);
|
|
2812
3029
|
}
|
|
2813
|
-
function
|
|
3030
|
+
function ai(e, t, n, r, i) {
|
|
2814
3031
|
let a = {
|
|
2815
|
-
...
|
|
3032
|
+
...ii(n, e, t),
|
|
2816
3033
|
recognized: !1,
|
|
2817
3034
|
type: r,
|
|
2818
3035
|
data: i
|
|
2819
3036
|
};
|
|
2820
3037
|
e.callbacks.onStep(a);
|
|
2821
3038
|
}
|
|
2822
|
-
function
|
|
2823
|
-
let n =
|
|
3039
|
+
function oi(e, t) {
|
|
3040
|
+
let n = qr(e);
|
|
2824
3041
|
n && (t.state.assistantMessageId = n, t.aiMessage.apiMessageId !== n && (t.aiMessage.apiMessageId = n, t.callbacks.onMessageUpdate(t.aiMessage)));
|
|
2825
3042
|
}
|
|
2826
|
-
function
|
|
3043
|
+
function si(e) {
|
|
2827
3044
|
e.state.progressCollapsed || (e.state.progressCollapsed = !0, e.callbacks.onProgressCollapsed(!0));
|
|
2828
3045
|
}
|
|
2829
|
-
function
|
|
2830
|
-
|
|
3046
|
+
function ci(e, t) {
|
|
3047
|
+
si(e), e.aiMessage.message = (e.aiMessage.message || "") + t, e.callbacks.onMessageUpdate(e.aiMessage);
|
|
2831
3048
|
}
|
|
2832
|
-
function
|
|
3049
|
+
function li(e) {
|
|
2833
3050
|
if (!e) return null;
|
|
2834
3051
|
let t = e.descriptionMetadata?.decision;
|
|
2835
3052
|
if (t === "create" || t === "edit" || t === "question") return t;
|
|
2836
3053
|
for (let t of e.children ?? []) {
|
|
2837
|
-
let e =
|
|
3054
|
+
let e = li(t);
|
|
2838
3055
|
if (e) return e;
|
|
2839
3056
|
}
|
|
2840
3057
|
return null;
|
|
2841
3058
|
}
|
|
2842
|
-
function
|
|
2843
|
-
if (!
|
|
3059
|
+
function ui(e, t, n) {
|
|
3060
|
+
if (!Dr(e)) return !1;
|
|
2844
3061
|
let r = e.progress;
|
|
2845
3062
|
if (t.callbacks.onProgress(r), Q(t, n, e, "progress", r), t.state.decision === null) {
|
|
2846
|
-
let i =
|
|
3063
|
+
let i = li(r);
|
|
2847
3064
|
i && (t.state.decision = i, Q(t, n, e, "decision", { decision: i }));
|
|
2848
3065
|
}
|
|
2849
3066
|
return !0;
|
|
2850
3067
|
}
|
|
2851
|
-
function
|
|
3068
|
+
function di(e) {
|
|
2852
3069
|
return !!e.error || e.type === "error" || typeof e.error_text == "string";
|
|
2853
3070
|
}
|
|
2854
|
-
function
|
|
3071
|
+
function fi(e) {
|
|
2855
3072
|
return typeof e.error_text == "string" && e.error_text ? e.error_text : typeof e.error == "string" && e.error ? e.error : c("Something went wrong. Please try again.", { desc: "Generic error message shown in ai chat when the API request fails" });
|
|
2856
3073
|
}
|
|
2857
|
-
function
|
|
2858
|
-
if (!
|
|
2859
|
-
let r =
|
|
2860
|
-
return t.aiMessage.message = r, t.aiMessage.isError = !0, delete t.aiMessage.elicitation, t.callbacks.onMessageUpdate(t.aiMessage),
|
|
3074
|
+
function pi(e, t, n) {
|
|
3075
|
+
if (!di(e)) return !1;
|
|
3076
|
+
let r = fi(e);
|
|
3077
|
+
return t.aiMessage.message = r, t.aiMessage.isError = !0, delete t.aiMessage.elicitation, delete t.aiMessage.question, t.callbacks.onMessageUpdate(t.aiMessage), Ri(e, t, n, e.error ?? r), !0;
|
|
2861
3078
|
}
|
|
2862
|
-
function
|
|
3079
|
+
function mi(e) {
|
|
2863
3080
|
return typeof e.question == "string" && e.question ? e.question : typeof e.text == "string" && e.text ? e.text : "";
|
|
2864
3081
|
}
|
|
2865
|
-
function
|
|
3082
|
+
function hi(e, t, n) {
|
|
2866
3083
|
if (e.type !== "interrupt") return !1;
|
|
2867
|
-
let r =
|
|
2868
|
-
return r && (t.state.interruptQuestion = r,
|
|
3084
|
+
let r = mi(e);
|
|
3085
|
+
return r && (t.state.interruptQuestion = r, ci(t, r), Q(t, n, e, "interrupt", { question: r })), Ri(e, t, n), !0;
|
|
2869
3086
|
}
|
|
2870
|
-
function
|
|
3087
|
+
function gi(e) {
|
|
2871
3088
|
let t = e.elicitation;
|
|
2872
3089
|
if (!t || typeof t != "object") return null;
|
|
2873
3090
|
let { question: n, options: r } = t, i = typeof n == "string" ? n.trim() : "", a = Array.isArray(r) ? [...new Set(r.filter((e) => typeof e == "string").map((e) => e.trim()))].filter(Boolean) : [];
|
|
@@ -2876,66 +3093,70 @@ function Kr(e) {
|
|
|
2876
3093
|
options: a
|
|
2877
3094
|
} : null;
|
|
2878
3095
|
}
|
|
2879
|
-
function
|
|
3096
|
+
function _i(e, t, n) {
|
|
2880
3097
|
if (e.type !== "elicitation") return !1;
|
|
2881
|
-
let r =
|
|
2882
|
-
return r ? (
|
|
3098
|
+
let r = gi(e);
|
|
3099
|
+
return r ? (si(t), t.aiMessage.elicitation = r, t.callbacks.onMessageUpdate(t.aiMessage), Q(t, n, e, "elicitation", {
|
|
2883
3100
|
question: r.question,
|
|
2884
3101
|
options: r.options
|
|
2885
|
-
}), !0) : (
|
|
3102
|
+
}), !0) : (ai(t, n, e, "elicitation", e), !0);
|
|
2886
3103
|
}
|
|
2887
|
-
function
|
|
3104
|
+
function vi(e) {
|
|
2888
3105
|
return typeof e.asset_id == "string" ? e.asset_id : typeof e.asset_type == "string" ? e.asset_type : "default";
|
|
2889
3106
|
}
|
|
2890
|
-
function
|
|
3107
|
+
function yi(e) {
|
|
2891
3108
|
return typeof e.asset_type == "string" ? e.asset_type : "";
|
|
2892
3109
|
}
|
|
2893
|
-
function
|
|
3110
|
+
function bi(e) {
|
|
2894
3111
|
return {
|
|
2895
|
-
assetType:
|
|
3112
|
+
assetType: yi(e),
|
|
2896
3113
|
snapshot: {}
|
|
2897
3114
|
};
|
|
2898
3115
|
}
|
|
2899
|
-
function
|
|
3116
|
+
function xi(e, t) {
|
|
2900
3117
|
return {
|
|
2901
3118
|
...e,
|
|
2902
3119
|
...t
|
|
2903
3120
|
};
|
|
2904
3121
|
}
|
|
2905
|
-
function
|
|
3122
|
+
function Si(e) {
|
|
2906
3123
|
let t = e.asset_delta ?? e.delta;
|
|
2907
3124
|
return t && typeof t == "object" ? t : null;
|
|
2908
3125
|
}
|
|
2909
|
-
function
|
|
2910
|
-
t.state.assets[
|
|
3126
|
+
function Ci(e, t) {
|
|
3127
|
+
t.state.assets[vi(e)] = bi(e);
|
|
2911
3128
|
}
|
|
2912
|
-
function
|
|
2913
|
-
let n =
|
|
2914
|
-
i && (r.snapshot =
|
|
3129
|
+
function wi(e, t) {
|
|
3130
|
+
let n = vi(e), r = t.state.assets[n] ?? bi(e), i = Si(e);
|
|
3131
|
+
i && (r.snapshot = xi(r.snapshot, i)), t.state.assets[n] = r;
|
|
2915
3132
|
}
|
|
2916
|
-
function
|
|
3133
|
+
function Ti(e, t) {
|
|
2917
3134
|
let n = e.asset ?? e.value ?? e.asset_delta ?? e.delta;
|
|
2918
|
-
return n && typeof n == "object" ?
|
|
3135
|
+
return n && typeof n == "object" ? xi(t?.snapshot ?? {}, n) : t?.snapshot ?? {};
|
|
2919
3136
|
}
|
|
2920
|
-
function
|
|
2921
|
-
let r =
|
|
2922
|
-
delete t.state.assets[r],
|
|
3137
|
+
function Ei(e, t, n) {
|
|
3138
|
+
let r = vi(e), i = t.state.assets[r], a = i?.assetType || yi(e), o = Ti(e, i);
|
|
3139
|
+
delete t.state.assets[r], ji(a, o, e, t, n);
|
|
2923
3140
|
}
|
|
2924
|
-
function
|
|
3141
|
+
function Di(e, t, n) {
|
|
2925
3142
|
switch (e.type) {
|
|
2926
|
-
case "asset_start": return
|
|
2927
|
-
case "asset_delta": return
|
|
2928
|
-
case "asset_end": return
|
|
3143
|
+
case "asset_start": return Ci(e, t), !0;
|
|
3144
|
+
case "asset_delta": return wi(e, t), !0;
|
|
3145
|
+
case "asset_end": return Ei(e, t, n), !0;
|
|
2929
3146
|
default: return !1;
|
|
2930
3147
|
}
|
|
2931
3148
|
}
|
|
2932
|
-
function
|
|
3149
|
+
function Oi(e, t, n, r) {
|
|
2933
3150
|
n.state.chartSnapshot = e, n.aiMessage.hasChart = !0, !n.state.assistantMessageId && typeof t.messageId == "string" && (n.aiMessage.apiMessageId = t.messageId), n.callbacks.onMessageUpdate(n.aiMessage), Q(n, r, t, "chart", e);
|
|
2934
3151
|
}
|
|
2935
|
-
function
|
|
3152
|
+
function ki(e, t, n, r) {
|
|
2936
3153
|
n.state.customItemSnapshot = e, Q(n, r, t, "custom-item", e);
|
|
2937
3154
|
}
|
|
2938
|
-
function
|
|
3155
|
+
function Ai(e, t, n, r) {
|
|
3156
|
+
let i = typeof t.asset_id == "string" && t.asset_id ? Ir(t.asset_id, e) : null;
|
|
3157
|
+
i ? (si(n), n.aiMessage.question = i, n.callbacks.onMessageUpdate(n.aiMessage), Q(n, r, t, "question", i)) : ai(n, r, t, "question", e);
|
|
3158
|
+
}
|
|
3159
|
+
function ji(e, t, n, r, i) {
|
|
2939
3160
|
switch (e) {
|
|
2940
3161
|
case "dashboard-title": {
|
|
2941
3162
|
let e = t.name;
|
|
@@ -2954,64 +3175,67 @@ function oi(e, t, n, r, i) {
|
|
|
2954
3175
|
case "dashboard":
|
|
2955
3176
|
r.state.dashboardSnapshot = t;
|
|
2956
3177
|
return;
|
|
2957
|
-
|
|
3178
|
+
case "question":
|
|
3179
|
+
Ai(t, n, r, i);
|
|
3180
|
+
return;
|
|
3181
|
+
default: Mi(e, t, n, r, i);
|
|
2958
3182
|
}
|
|
2959
3183
|
}
|
|
2960
|
-
function
|
|
2961
|
-
i.chartAssetType && e === i.chartAssetType ?
|
|
3184
|
+
function Mi(e, t, n, r, i) {
|
|
3185
|
+
i.chartAssetType && e === i.chartAssetType ? Oi(t, n, r, i) : i.dashboardAssetType && e === i.dashboardAssetType ? r.state.dashboardSnapshot = t : i.customItemAssetType && e === i.customItemAssetType ? ki(t, n, r, i) : ai(r, i, n, e || "asset", t);
|
|
2962
3186
|
}
|
|
2963
|
-
function
|
|
3187
|
+
function Ni(e, t, n) {
|
|
2964
3188
|
let r = !1;
|
|
2965
3189
|
if (n.dashboardAssetType) {
|
|
2966
|
-
let n =
|
|
3190
|
+
let n = $r(e);
|
|
2967
3191
|
if (n) {
|
|
2968
3192
|
t.state.dashboardSnapshot = n;
|
|
2969
|
-
let i =
|
|
3193
|
+
let i = ei(e);
|
|
2970
3194
|
i && (t.state.dashboardName = i), r = !0;
|
|
2971
3195
|
}
|
|
2972
3196
|
}
|
|
2973
3197
|
if (n.chartAssetType && !t.state.chartSnapshot) {
|
|
2974
|
-
let i =
|
|
2975
|
-
i && (
|
|
3198
|
+
let i = Yr(e);
|
|
3199
|
+
i && (Oi(i, e, t, n), r = !0);
|
|
2976
3200
|
}
|
|
2977
3201
|
if (n.customItemAssetType && !t.state.customItemSnapshot) {
|
|
2978
|
-
let i =
|
|
2979
|
-
i && (
|
|
3202
|
+
let i = ti(e);
|
|
3203
|
+
i && (ki(i, e, t, n), r = !0);
|
|
2980
3204
|
}
|
|
2981
3205
|
return r;
|
|
2982
3206
|
}
|
|
2983
|
-
function
|
|
3207
|
+
function Pi(e, t, n) {
|
|
2984
3208
|
return {
|
|
2985
3209
|
...e,
|
|
2986
3210
|
generatedChart: t,
|
|
2987
3211
|
conversationId: n.callbacks.getConversationId()
|
|
2988
3212
|
};
|
|
2989
3213
|
}
|
|
2990
|
-
function
|
|
3214
|
+
function Fi(e, t, n) {
|
|
2991
3215
|
for (let r of Object.keys(t.state.assets)) {
|
|
2992
3216
|
let i = t.state.assets[r];
|
|
2993
|
-
delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot || n.customItemAssetType && i.assetType === n.customItemAssetType && t.state.customItemSnapshot) &&
|
|
3217
|
+
delete t.state.assets[r], !(n.chartAssetType && i.assetType === n.chartAssetType && t.state.chartSnapshot || n.dashboardAssetType && i.assetType === n.dashboardAssetType && t.state.dashboardSnapshot || n.customItemAssetType && i.assetType === n.customItemAssetType && t.state.customItemSnapshot) && ji(i.assetType, i.snapshot, e, t, n);
|
|
2994
3218
|
}
|
|
2995
3219
|
}
|
|
2996
|
-
function
|
|
2997
|
-
let n =
|
|
3220
|
+
function Ii(e, t) {
|
|
3221
|
+
let n = Wr(e);
|
|
2998
3222
|
n && t.aiMessage.message !== n && (t.aiMessage.message = n, t.callbacks.onMessageUpdate(t.aiMessage));
|
|
2999
3223
|
}
|
|
3000
|
-
function
|
|
3001
|
-
let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ?
|
|
3224
|
+
function Li(e, t, n) {
|
|
3225
|
+
let r = t.state.dashboardSnapshot ?? (n.dashboardAssetType ? $r(e) : null), i = t.state.chartSnapshot ?? (n.chartAssetType ? Yr(e) : null);
|
|
3002
3226
|
return {
|
|
3003
3227
|
agent: n.agent,
|
|
3004
3228
|
conversationId: t.callbacks.getConversationId(),
|
|
3005
3229
|
message: t.aiMessage,
|
|
3006
3230
|
...r ? { dashboard: r } : {},
|
|
3007
|
-
...i ? { chart:
|
|
3231
|
+
...i ? { chart: Pi(e, i, t) } : {},
|
|
3008
3232
|
...t.state.customItemSnapshot ? { customItem: t.state.customItemSnapshot } : {},
|
|
3009
3233
|
...t.state.dashboardName ? { name: t.state.dashboardName } : {},
|
|
3010
3234
|
raw: e
|
|
3011
3235
|
};
|
|
3012
3236
|
}
|
|
3013
|
-
function
|
|
3014
|
-
t.state.completed || (t.state.completed = !0,
|
|
3237
|
+
function Ri(e, t, n, r) {
|
|
3238
|
+
t.state.completed || (t.state.completed = !0, Fi(e, t, n), si(t), r === void 0 ? (Ii(e, t), t.callbacks.onComplete(Li(e, t, n))) : t.callbacks.onComplete({
|
|
3015
3239
|
agent: n.agent,
|
|
3016
3240
|
conversationId: t.callbacks.getConversationId(),
|
|
3017
3241
|
message: t.aiMessage,
|
|
@@ -3019,28 +3243,28 @@ function pi(e, t, n, r) {
|
|
|
3019
3243
|
raw: e
|
|
3020
3244
|
}));
|
|
3021
3245
|
}
|
|
3022
|
-
function
|
|
3246
|
+
function zi(e) {
|
|
3023
3247
|
return typeof e.type == "string" && e.type ? e.type : typeof e.asset_type == "string" && e.asset_type ? e.asset_type : "";
|
|
3024
3248
|
}
|
|
3025
|
-
function
|
|
3026
|
-
let r =
|
|
3027
|
-
return r ? (t.state.accumulatedText += r,
|
|
3249
|
+
function Bi(e, t, n) {
|
|
3250
|
+
let r = Ur(e);
|
|
3251
|
+
return r ? (t.state.accumulatedText += r, ci(t, r), Q(t, n, e, "text", {
|
|
3028
3252
|
delta: r,
|
|
3029
3253
|
text: t.state.accumulatedText
|
|
3030
3254
|
}), !0) : !1;
|
|
3031
3255
|
}
|
|
3032
|
-
function
|
|
3256
|
+
function Vi(e, t, n, r, i) {
|
|
3033
3257
|
if (r || i) return;
|
|
3034
|
-
let a =
|
|
3035
|
-
a && !
|
|
3258
|
+
let a = zi(e);
|
|
3259
|
+
a && !ni.has(a) && ai(t, n, e, a, e);
|
|
3036
3260
|
}
|
|
3037
|
-
function
|
|
3038
|
-
if (
|
|
3039
|
-
let r =
|
|
3040
|
-
|
|
3261
|
+
function Hi(e, t, n) {
|
|
3262
|
+
if (Kr(e, t), oi(e, t), ui(e, t, n) || pi(e, t, n) || hi(e, t, n) || _i(e, t, n) || Di(e, t, n)) return;
|
|
3263
|
+
let r = Bi(e, t, n), i = Ni(e, t, n), a = r || i, o = Gr(e);
|
|
3264
|
+
Vi(e, t, n, a, o), o && Ri(e, t, n);
|
|
3041
3265
|
}
|
|
3042
3266
|
// src/components/ai-chat/stream/registry.ts
|
|
3043
|
-
function
|
|
3267
|
+
function Ui(e) {
|
|
3044
3268
|
switch (e) {
|
|
3045
3269
|
case "dashboard": return {
|
|
3046
3270
|
agent: e,
|
|
@@ -3057,11 +3281,11 @@ function vi(e) {
|
|
|
3057
3281
|
default: return { agent: e };
|
|
3058
3282
|
}
|
|
3059
3283
|
}
|
|
3060
|
-
function
|
|
3061
|
-
let t =
|
|
3062
|
-
return (e, n) =>
|
|
3284
|
+
function Wi(e) {
|
|
3285
|
+
let t = Ui(e);
|
|
3286
|
+
return (e, n) => Hi(e, n, t);
|
|
3063
3287
|
}
|
|
3064
|
-
function
|
|
3288
|
+
function Gi() {
|
|
3065
3289
|
return {
|
|
3066
3290
|
progressCollapsed: !1,
|
|
3067
3291
|
accumulatedText: "",
|
|
@@ -3076,10 +3300,13 @@ function bi() {
|
|
|
3076
3300
|
};
|
|
3077
3301
|
}
|
|
3078
3302
|
// src/components/ai-chat/session/ai-chat-session.ts
|
|
3079
|
-
function
|
|
3303
|
+
function Ki() {
|
|
3080
3304
|
return `msg-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
3081
3305
|
}
|
|
3082
|
-
|
|
3306
|
+
function qi(e) {
|
|
3307
|
+
return !(!e?.isError || e.apiMessageId);
|
|
3308
|
+
}
|
|
3309
|
+
var Ji = class {
|
|
3083
3310
|
constructor(e, t = {}) {
|
|
3084
3311
|
this._uiBridgeCallbacks = {}, this._subscribers = /* @__PURE__ */ new Set(), this._state = {
|
|
3085
3312
|
messages: [],
|
|
@@ -3094,7 +3321,7 @@ var Si = class {
|
|
|
3094
3321
|
apiVersion: "0.1.0",
|
|
3095
3322
|
stream: !0,
|
|
3096
3323
|
...e
|
|
3097
|
-
}, e.agentConfig && (this._config.agentConfig =
|
|
3324
|
+
}, e.agentConfig && (this._config.agentConfig = Hn(e)), this._hostCallbacks = t, this._state = {
|
|
3098
3325
|
...this._state,
|
|
3099
3326
|
messages: e.messages ? [...e.messages] : [],
|
|
3100
3327
|
selectedDatasets: e.selectedDatasets ? [...e.selectedDatasets] : [],
|
|
@@ -3111,7 +3338,7 @@ var Si = class {
|
|
|
3111
3338
|
return this._state.isGenerating;
|
|
3112
3339
|
}
|
|
3113
3340
|
get agentConfig() {
|
|
3114
|
-
return
|
|
3341
|
+
return Hn(this._config);
|
|
3115
3342
|
}
|
|
3116
3343
|
subscribe(e) {
|
|
3117
3344
|
return this._subscribers.add(e), e(this._state), () => {
|
|
@@ -3126,7 +3353,7 @@ var Si = class {
|
|
|
3126
3353
|
this._config = {
|
|
3127
3354
|
...this._config,
|
|
3128
3355
|
...e
|
|
3129
|
-
}, e.agentConfig && (this._config.agentConfig =
|
|
3356
|
+
}, e.agentConfig && (this._config.agentConfig = Hn(this._config, t));
|
|
3130
3357
|
let r = {};
|
|
3131
3358
|
if ("conversationId" in e) {
|
|
3132
3359
|
let t = e.conversationId ?? null;
|
|
@@ -3160,10 +3387,10 @@ var Si = class {
|
|
|
3160
3387
|
return !this._config.requireDataset || this._state.selectedDatasets.length > 0 || !!e;
|
|
3161
3388
|
}
|
|
3162
3389
|
getAiPromptUrl() {
|
|
3163
|
-
return
|
|
3390
|
+
return lr(this._config.apiUrl ?? "https://api.luzmo.com", this._config.apiVersion ?? "0.1.0");
|
|
3164
3391
|
}
|
|
3165
3392
|
buildRequestBody(e, t, n = [], r = this._config.agentId, i = {}) {
|
|
3166
|
-
return
|
|
3393
|
+
return br(this.agentConfig.type, {
|
|
3167
3394
|
prompt: e,
|
|
3168
3395
|
datasetIds: t,
|
|
3169
3396
|
authKey: this._config.authKey,
|
|
@@ -3177,12 +3404,14 @@ var Si = class {
|
|
|
3177
3404
|
localeId: this._config.localeId,
|
|
3178
3405
|
timezoneId: this._config.timezoneId,
|
|
3179
3406
|
task: this._config.task,
|
|
3180
|
-
...this._config.agentConfig ?
|
|
3407
|
+
...this._config.agentConfig ? Un(this.agentConfig) : {},
|
|
3181
3408
|
modelPreference: this._config.modelPreference,
|
|
3182
3409
|
apiVersion: this._config.apiVersion,
|
|
3183
3410
|
stream: this._config.stream,
|
|
3184
3411
|
attachmentUrls: n,
|
|
3185
|
-
internal: i.internal
|
|
3412
|
+
internal: i.internal,
|
|
3413
|
+
answer: i.answer,
|
|
3414
|
+
interactions: this._config.interactions
|
|
3186
3415
|
});
|
|
3187
3416
|
}
|
|
3188
3417
|
buildPromptSubmittedDetail(e) {
|
|
@@ -3192,7 +3421,10 @@ var Si = class {
|
|
|
3192
3421
|
selectedDatasets: e.selectedDatasets,
|
|
3193
3422
|
datasetIds: e.datasetIds,
|
|
3194
3423
|
agent: this.agentConfig.type,
|
|
3195
|
-
request: this.buildRequestBody(e.prompt, e.datasetIds, t, e.agentId, {
|
|
3424
|
+
request: this.buildRequestBody(e.prompt, e.datasetIds, t, e.agentId, {
|
|
3425
|
+
internal: e.internal,
|
|
3426
|
+
answer: e.answer
|
|
3427
|
+
}),
|
|
3196
3428
|
url: this.getAiPromptUrl(),
|
|
3197
3429
|
...e.signal ? { signal: e.signal } : {},
|
|
3198
3430
|
...e.attachments?.length ? { attachments: e.attachments } : {},
|
|
@@ -3228,78 +3460,82 @@ var Si = class {
|
|
|
3228
3460
|
async submit(e) {
|
|
3229
3461
|
await this._submit(e);
|
|
3230
3462
|
}
|
|
3231
|
-
async _submit(e) {
|
|
3232
|
-
let
|
|
3233
|
-
if (!this.isDatasetRequirementMet(e.agentId)) return
|
|
3463
|
+
async _submit(e, t) {
|
|
3464
|
+
let n = e.datasetIds ?? this._state.selectedDatasets.map((e) => e.id);
|
|
3465
|
+
if (!this.isDatasetRequirementMet(e.agentId)) return null;
|
|
3234
3466
|
this._abortInflight();
|
|
3235
|
-
let
|
|
3236
|
-
this._abortController =
|
|
3237
|
-
let
|
|
3467
|
+
let r = new AbortController();
|
|
3468
|
+
this._abortController = r;
|
|
3469
|
+
let i;
|
|
3238
3470
|
try {
|
|
3239
|
-
|
|
3471
|
+
i = await this._resolveAttachmentUrls(e, r.signal);
|
|
3240
3472
|
} catch (e) {
|
|
3241
|
-
if (this._abortController ===
|
|
3473
|
+
if (this._abortController === r && (this._abortController = null), r.signal.aborted || e.name === "AbortError") return null;
|
|
3242
3474
|
throw e;
|
|
3243
3475
|
}
|
|
3244
|
-
if (
|
|
3245
|
-
let
|
|
3246
|
-
id: e.aiMessageId ??
|
|
3476
|
+
if (r.signal.aborted || this._abortController !== r) return null;
|
|
3477
|
+
let a = {
|
|
3478
|
+
id: e.aiMessageId ?? Ki(),
|
|
3247
3479
|
type: "ai",
|
|
3248
3480
|
message: ""
|
|
3249
|
-
},
|
|
3481
|
+
}, o = [...this._state.messages];
|
|
3250
3482
|
if (!e.skipUserMessage) {
|
|
3251
3483
|
let t = {
|
|
3252
|
-
id:
|
|
3484
|
+
id: Ki(),
|
|
3253
3485
|
type: "user",
|
|
3254
3486
|
message: e.prompt,
|
|
3255
|
-
...
|
|
3487
|
+
...i.length ? { attachmentUrls: i } : {}
|
|
3256
3488
|
};
|
|
3257
|
-
|
|
3489
|
+
o = [...o, t], this._emit("onMessageSent", t, [...this._state.selectedDatasets]);
|
|
3258
3490
|
}
|
|
3259
|
-
|
|
3260
|
-
messages:
|
|
3491
|
+
o = [...o, a], this._inflightMessage = a, this._receivedProgress = !1, this._patchState({
|
|
3492
|
+
messages: o,
|
|
3261
3493
|
isGenerating: !0,
|
|
3262
|
-
progress:
|
|
3494
|
+
progress: Er(),
|
|
3263
3495
|
progressCollapsed: !1,
|
|
3264
|
-
inflightMessage:
|
|
3496
|
+
inflightMessage: a
|
|
3265
3497
|
});
|
|
3266
|
-
let
|
|
3498
|
+
let s = n, c = [...this._state.selectedDatasets];
|
|
3267
3499
|
if (this._hasCallback("onPromptSubmitted")) {
|
|
3268
|
-
let
|
|
3500
|
+
let n = this.buildPromptSubmittedDetail({
|
|
3269
3501
|
prompt: e.prompt,
|
|
3270
|
-
selectedDatasets:
|
|
3271
|
-
datasetIds:
|
|
3272
|
-
signal:
|
|
3502
|
+
selectedDatasets: c,
|
|
3503
|
+
datasetIds: s,
|
|
3504
|
+
signal: r.signal,
|
|
3273
3505
|
attachments: e.attachments,
|
|
3274
|
-
attachmentUrls:
|
|
3506
|
+
attachmentUrls: i,
|
|
3275
3507
|
agentId: e.agentId,
|
|
3276
|
-
internal: e.internal
|
|
3508
|
+
internal: e.internal,
|
|
3509
|
+
answer: t
|
|
3277
3510
|
});
|
|
3278
3511
|
try {
|
|
3279
|
-
await this._invokeCallback("onPromptSubmitted",
|
|
3512
|
+
await this._invokeCallback("onPromptSubmitted", n);
|
|
3280
3513
|
} catch (e) {
|
|
3281
|
-
e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e,
|
|
3514
|
+
e.name === "AbortError" ? this.abort() : (this._handleSubmitError(e, a, n.agent), this._finalizeInflightMessage()), this._patchState({ isGenerating: !1 });
|
|
3282
3515
|
}
|
|
3283
|
-
return
|
|
3516
|
+
return a;
|
|
3284
3517
|
}
|
|
3285
|
-
let
|
|
3286
|
-
|
|
3518
|
+
let l = this.buildRequestBody(e.prompt, n, i, e.agentId, {
|
|
3519
|
+
internal: e.internal,
|
|
3520
|
+
answer: t
|
|
3521
|
+
}), u = this.agentConfig.type, d = Wi(u), f = {
|
|
3522
|
+
aiMessage: a,
|
|
3287
3523
|
callbacks: this._createStreamCallbacks(),
|
|
3288
|
-
state:
|
|
3289
|
-
},
|
|
3524
|
+
state: Gi()
|
|
3525
|
+
}, p = this._config.fetchStreaming ?? Sr, m = !1;
|
|
3290
3526
|
try {
|
|
3291
|
-
let { body: e, conversationId: t } = await
|
|
3527
|
+
let { body: e, conversationId: t } = await p({
|
|
3292
3528
|
url: this.getAiPromptUrl(),
|
|
3293
|
-
body:
|
|
3294
|
-
signal:
|
|
3529
|
+
body: l,
|
|
3530
|
+
signal: r.signal
|
|
3295
3531
|
});
|
|
3296
|
-
t && this._setConversationId(t), await
|
|
3532
|
+
t && this._setConversationId(t), await Tr(e, (e) => d(e, f)), m = !0;
|
|
3297
3533
|
} catch (e) {
|
|
3298
|
-
e.name !== "AbortError" && (this._handleSubmitError(e,
|
|
3534
|
+
e.name !== "AbortError" && (this._handleSubmitError(e, a, u), m = !0);
|
|
3299
3535
|
} finally {
|
|
3300
|
-
this._abortController ===
|
|
3536
|
+
this._abortController === r && (m ? this._finalizeInflightMessage() : this._discardInflightMessage(), this._patchState({ isGenerating: !1 }), this._abortController = null);
|
|
3301
3537
|
}
|
|
3302
|
-
return
|
|
3538
|
+
return a;
|
|
3303
3539
|
}
|
|
3304
3540
|
async answerElicitation(e, t, n = {}) {
|
|
3305
3541
|
let r = this._state.messages.at(-1), i = r?.id === e ? r.elicitation : void 0;
|
|
@@ -3319,12 +3555,59 @@ var Si = class {
|
|
|
3319
3555
|
o = await this._submit({
|
|
3320
3556
|
...n,
|
|
3321
3557
|
prompt: t
|
|
3322
|
-
});
|
|
3558
|
+
}) !== null;
|
|
3323
3559
|
} finally {
|
|
3324
3560
|
o || a(void 0);
|
|
3325
3561
|
}
|
|
3326
3562
|
return o;
|
|
3327
3563
|
}
|
|
3564
|
+
async answerQuestion(e, t, n = {}) {
|
|
3565
|
+
let r = this._state.messages.at(-1), i = r?.id === e ? r.question : void 0;
|
|
3566
|
+
if (this._state.isGenerating || i?.status !== "open") return !1;
|
|
3567
|
+
let a = (t) => {
|
|
3568
|
+
this._patchState({ messages: this._state.messages.map((n) => n.id === e ? {
|
|
3569
|
+
...n,
|
|
3570
|
+
question: t
|
|
3571
|
+
} : n) });
|
|
3572
|
+
}, o = zr(t);
|
|
3573
|
+
if (o) return a({
|
|
3574
|
+
...i,
|
|
3575
|
+
error: o
|
|
3576
|
+
}), !1;
|
|
3577
|
+
if (!Vr(i.questions, t) || !this.isDatasetRequirementMet(n.agentId)) return !1;
|
|
3578
|
+
a(t.action === "skip" ? {
|
|
3579
|
+
assetId: i.assetId,
|
|
3580
|
+
questions: i.questions,
|
|
3581
|
+
status: "skipped",
|
|
3582
|
+
response: t
|
|
3583
|
+
} : {
|
|
3584
|
+
assetId: i.assetId,
|
|
3585
|
+
questions: i.questions,
|
|
3586
|
+
status: "answered",
|
|
3587
|
+
response: t
|
|
3588
|
+
});
|
|
3589
|
+
let s = {
|
|
3590
|
+
assetId: i.assetId,
|
|
3591
|
+
questions: i.questions,
|
|
3592
|
+
status: "open"
|
|
3593
|
+
}, c = null;
|
|
3594
|
+
try {
|
|
3595
|
+
c = await this._submit({
|
|
3596
|
+
...n,
|
|
3597
|
+
prompt: "",
|
|
3598
|
+
skipUserMessage: !0
|
|
3599
|
+
}, {
|
|
3600
|
+
asset_id: i.assetId,
|
|
3601
|
+
response: t
|
|
3602
|
+
});
|
|
3603
|
+
} finally {
|
|
3604
|
+
c || a(s);
|
|
3605
|
+
}
|
|
3606
|
+
return qi(c) ? (this._dropMessage(c), a({
|
|
3607
|
+
...s,
|
|
3608
|
+
error: c.message
|
|
3609
|
+
}), !1) : c !== null;
|
|
3610
|
+
}
|
|
3328
3611
|
setMessageFeedback(e, t) {
|
|
3329
3612
|
if (t !== -1 && t !== 0 && t !== 1 || e === this._inflightMessage?.id || e === this._state.inflightMessage?.id) return !1;
|
|
3330
3613
|
let n = this._state.messages.find((t) => t.id === e);
|
|
@@ -3336,7 +3619,7 @@ var Si = class {
|
|
|
3336
3619
|
async restore(e) {
|
|
3337
3620
|
let t = this.agentConfig.type;
|
|
3338
3621
|
if (t !== "item") return {};
|
|
3339
|
-
let n =
|
|
3622
|
+
let n = xr(e.restoreToMessageId, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
|
|
3340
3623
|
if (this._patchState({
|
|
3341
3624
|
isGenerating: !0,
|
|
3342
3625
|
progress: null,
|
|
@@ -3366,7 +3649,7 @@ var Si = class {
|
|
|
3366
3649
|
let e = await r.json().catch(() => null);
|
|
3367
3650
|
throw Error(e?.message || `API request failed with status ${r.status}`);
|
|
3368
3651
|
}
|
|
3369
|
-
let i = await r.json().catch(() => null), a = i?.generatedChart ?? (i ?
|
|
3652
|
+
let i = await r.json().catch(() => null), a = i?.generatedChart ?? (i ? Yr(i) : null), o = {
|
|
3370
3653
|
...typeof i?.message == "string" ? { message: i.message } : {},
|
|
3371
3654
|
...a ? { chart: {
|
|
3372
3655
|
...i,
|
|
@@ -3378,7 +3661,7 @@ var Si = class {
|
|
|
3378
3661
|
message: o.message
|
|
3379
3662
|
}), this._patchState({ messages: [...s] }), o.chart || o.message) {
|
|
3380
3663
|
let n = s[e.messageIndex], r = n?.type === "ai" ? n : {
|
|
3381
|
-
id:
|
|
3664
|
+
id: Ki(),
|
|
3382
3665
|
type: "ai",
|
|
3383
3666
|
message: o.message ?? ""
|
|
3384
3667
|
};
|
|
@@ -3396,7 +3679,7 @@ var Si = class {
|
|
|
3396
3679
|
}
|
|
3397
3680
|
}
|
|
3398
3681
|
buildRestoreRequest(e) {
|
|
3399
|
-
return
|
|
3682
|
+
return xr(e, this._config.authKey, this._config.authToken, this._config.apiVersion, this._state.conversationId);
|
|
3400
3683
|
}
|
|
3401
3684
|
abort(e = {}) {
|
|
3402
3685
|
this._abortController?.abort(), this._abortController = null, e.notify && this._inflightMessage ? this._markInflightCancelled(e.cancelledMessage) : this._discardInflightMessage(), this._patchState({
|
|
@@ -3444,6 +3727,9 @@ var Si = class {
|
|
|
3444
3727
|
let n = this._state.messages.map((n, r) => r === t ? { ...e } : n);
|
|
3445
3728
|
this._patchState({ messages: n });
|
|
3446
3729
|
}
|
|
3730
|
+
_dropMessage(e) {
|
|
3731
|
+
this._patchState({ messages: this._state.messages.filter((t) => t.id !== e.id) });
|
|
3732
|
+
}
|
|
3447
3733
|
_finalizeInflightMessage() {
|
|
3448
3734
|
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({
|
|
3449
3735
|
progress: null,
|
|
@@ -3455,14 +3741,14 @@ var Si = class {
|
|
|
3455
3741
|
this._inflightMessage && this._patchState({ messages: this._state.messages.filter((e) => e.id !== this._inflightMessage.id) });
|
|
3456
3742
|
}
|
|
3457
3743
|
_markInflightCancelled(e) {
|
|
3458
|
-
this._inflightMessage && (this._inflightMessage.message = e ?? c("Response cancelled.", { desc: "Placeholder shown in ai chat where the assistant reply would appear when the user stops an in-flight response" }), this._inflightMessage.isCancelled = !0, this._inflightMessage.hasChart = !1, delete this._inflightMessage.progress, delete this._inflightMessage.elicitation, this._upsertMessage(this._inflightMessage), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({ inflightMessage: null }));
|
|
3744
|
+
this._inflightMessage && (this._inflightMessage.message = e ?? c("Response cancelled.", { desc: "Placeholder shown in ai chat where the assistant reply would appear when the user stops an in-flight response" }), this._inflightMessage.isCancelled = !0, this._inflightMessage.hasChart = !1, delete this._inflightMessage.progress, delete this._inflightMessage.elicitation, delete this._inflightMessage.question, this._upsertMessage(this._inflightMessage), this._inflightMessage = null, this._receivedProgress = !1, this._patchState({ inflightMessage: null }));
|
|
3459
3745
|
}
|
|
3460
3746
|
_discardInflightMessage() {
|
|
3461
3747
|
let e = !!(this._inflightMessage || this._state.inflightMessage);
|
|
3462
3748
|
this._removeInflightFromMessages(), this._inflightMessage = null, this._receivedProgress = !1, e && this._patchState({ inflightMessage: null });
|
|
3463
3749
|
}
|
|
3464
3750
|
_handleSubmitError(e, t, n) {
|
|
3465
|
-
t.message = c("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, delete t.elicitation, this._inflightMessage = t, this._upsertMessage(t), this._patchState({
|
|
3751
|
+
t.message = c("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, delete t.elicitation, delete t.question, this._inflightMessage = t, this._upsertMessage(t), this._patchState({
|
|
3466
3752
|
inflightMessage: { ...t },
|
|
3467
3753
|
progress: null,
|
|
3468
3754
|
progressCollapsed: !1
|
|
@@ -3498,15 +3784,15 @@ var Si = class {
|
|
|
3498
3784
|
_areChatMessagesEqual(e, t) {
|
|
3499
3785
|
return e.length === t.length && e.every((e, n) => {
|
|
3500
3786
|
let r = t[n];
|
|
3501
|
-
return e.id === r?.id && e.apiMessageId === r?.apiMessageId && e.type === r?.type && e.message === r?.message && e.isError === r?.isError && e.isCancelled === r?.isCancelled && e.hasChart === r?.hasChart && e.feedback === r?.feedback && e.hideFeedback === r?.hideFeedback && JSON.stringify(e.progress ?? null) === JSON.stringify(r?.progress ?? null) && JSON.stringify(e.actions ?? null) === JSON.stringify(r?.actions ?? null) && JSON.stringify(e.attachmentUrls ?? null) === JSON.stringify(r?.attachmentUrls ?? null) && JSON.stringify(e.elicitation ?? null) === JSON.stringify(r?.elicitation ?? null);
|
|
3787
|
+
return e.id === r?.id && e.apiMessageId === r?.apiMessageId && e.type === r?.type && e.message === r?.message && e.isError === r?.isError && e.isCancelled === r?.isCancelled && e.hasChart === r?.hasChart && e.feedback === r?.feedback && e.hideFeedback === r?.hideFeedback && JSON.stringify(e.progress ?? null) === JSON.stringify(r?.progress ?? null) && JSON.stringify(e.actions ?? null) === JSON.stringify(r?.actions ?? null) && JSON.stringify(e.attachmentUrls ?? null) === JSON.stringify(r?.attachmentUrls ?? null) && JSON.stringify(e.elicitation ?? null) === JSON.stringify(r?.elicitation ?? null) && JSON.stringify(e.question ?? null) === JSON.stringify(r?.question ?? null);
|
|
3502
3788
|
});
|
|
3503
3789
|
}
|
|
3504
3790
|
};
|
|
3505
|
-
function
|
|
3506
|
-
return new
|
|
3791
|
+
function Yi(e, t) {
|
|
3792
|
+
return new Ji(e, t);
|
|
3507
3793
|
}
|
|
3508
3794
|
// src/components/ai-chat/session/ai-chat-session-controller.ts
|
|
3509
|
-
var
|
|
3795
|
+
var Xi = class {
|
|
3510
3796
|
constructor(e) {
|
|
3511
3797
|
this.options = e, this._session = null, this._ownsSession = !1, this._customItemFromProps = !1, this._seededFromProps = !1, this._unsubscribe = null;
|
|
3512
3798
|
}
|
|
@@ -3571,7 +3857,7 @@ var wi = class {
|
|
|
3571
3857
|
_createSessionIfMissing() {
|
|
3572
3858
|
if (this._session) return;
|
|
3573
3859
|
let e = this.options.getSeed();
|
|
3574
|
-
this._session =
|
|
3860
|
+
this._session = Yi({
|
|
3575
3861
|
...this.options.getConfig(),
|
|
3576
3862
|
messages: e.messages.length > 0 ? [...e.messages] : void 0,
|
|
3577
3863
|
selectedDatasets: e.selectedDatasets.length > 0 ? [...e.selectedDatasets] : void 0
|
|
@@ -3593,14 +3879,14 @@ var wi = class {
|
|
|
3593
3879
|
_unwire() {
|
|
3594
3880
|
this._unsubscribe?.(), this._unsubscribe = null;
|
|
3595
3881
|
}
|
|
3596
|
-
},
|
|
3882
|
+
}, Zi, $ = class t extends a(i, { validSizes: [
|
|
3597
3883
|
"s",
|
|
3598
3884
|
"m",
|
|
3599
3885
|
"l",
|
|
3600
3886
|
"xl"
|
|
3601
3887
|
] }) {
|
|
3602
3888
|
constructor(...e) {
|
|
3603
|
-
super(...e), this.messages = [], this.selectedDatasets = [], this.placeholder = "Describe your change", this.disabled = !1, this.stoppable = !1, this.showAssistantContextMenu = !1, this.showAssistantMessageFeedback = !1, this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.includePublicDatasets = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.hideAgents = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.allowImages = !1, this.allowVoiceInput = !1, this.acceptedFileTypes = [], this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = null, this.customItem = null, this.timezoneId = "UTC", this.apiVersion = "0.1.0", this.stream = !0, this.loadingMessage = null, this.cancelledMessage = null, this.initialPrompt = null, this.emptyStateTitle = "", this.emptyStateSubtitle = "", this.emptyStateSuggestions = [], this._textareaValue = "", this._assistantMessageActionsSlotHasContent = !1, this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._focusedFeedbackWrapper = null, this._lastProcessedInitialPrompt = null, this._lastNotifiedState = null, this._session = new
|
|
3889
|
+
super(...e), this.messages = [], this.selectedDatasets = [], this.placeholder = "Describe your change", this.disabled = !1, this.stoppable = !1, this.showAssistantContextMenu = !1, this.showAssistantMessageFeedback = !1, this.authKey = "", this.authToken = "", this.apiUrl = "https://api.luzmo.com", this.appServer = "https://app.luzmo.com", this.includePublicDatasets = !1, this.hideDatasetButton = !1, this.hideDatasetIcons = !1, this.disableDatasetModification = !1, this.hideSelectedDatasets = !1, this.hideAgents = !1, this.disableColumnMentions = !1, this.requireDataset = !1, this.allowImages = !1, this.allowVoiceInput = !1, this.acceptedFileTypes = [], this.agent = "item", this.task = "generate", this.modelPreference = "performance", this.chatSession = null, this.conversationId = null, this.chart = null, this.dashboard = null, this.customItem = null, this.timezoneId = "UTC", this.apiVersion = "0.1.0", this.stream = !0, this.loadingMessage = null, this.cancelledMessage = null, this.initialPrompt = null, this.emptyStateTitle = "", this.emptyStateSubtitle = "", this.emptyStateSuggestions = [], this._textareaValue = "", this._assistantMessageActionsSlotHasContent = !1, this._pendingAssistantMessageAction = null, this._shouldFocusAssistantMessageActionConfirm = !1, this._focusedFeedbackWrapper = null, this._lastProcessedInitialPrompt = null, this._lastNotifiedState = null, this._session = new Xi({
|
|
3604
3890
|
getConfig: () => this._buildSessionConfig(),
|
|
3605
3891
|
getSeed: () => ({
|
|
3606
3892
|
messages: this.messages,
|
|
@@ -3609,7 +3895,7 @@ var wi = class {
|
|
|
3609
3895
|
}),
|
|
3610
3896
|
createDomBridge: () => this._createDomBridgeCallbacks(),
|
|
3611
3897
|
onRenderNeeded: () => {
|
|
3612
|
-
let e = this._session.state, t =
|
|
3898
|
+
let e = this._session.state, t = qn(this._lastNotifiedState, e);
|
|
3613
3899
|
this._lastNotifiedState = e, this.requestUpdate(), t || this.updateComplete.then(() => this._scrollToBottom());
|
|
3614
3900
|
}
|
|
3615
3901
|
}), this._handleAssistantMessageActionsSlotChange = (e) => {
|
|
@@ -3707,12 +3993,13 @@ var wi = class {
|
|
|
3707
3993
|
timezoneId: this.timezoneId,
|
|
3708
3994
|
task: this.task,
|
|
3709
3995
|
modelPreference: this.modelPreference,
|
|
3710
|
-
requireDataset: this.requireDataset
|
|
3996
|
+
requireDataset: this.requireDataset,
|
|
3997
|
+
interactions: this.interactions
|
|
3711
3998
|
};
|
|
3712
3999
|
}
|
|
3713
4000
|
_getAgentConfig() {
|
|
3714
4001
|
let e = this._session.current?.agentConfig;
|
|
3715
|
-
return this.agentConfig === void 0 && this.chatSession && e ? e :
|
|
4002
|
+
return this.agentConfig === void 0 && this.chatSession && e ? e : Hn(this._buildSessionConfig(), e);
|
|
3716
4003
|
}
|
|
3717
4004
|
_emitConversationIdChanged(e) {
|
|
3718
4005
|
this.conversationId = e, this.dispatchEvent(new CustomEvent("luzmo-conversation-id-changed", {
|
|
@@ -3816,7 +4103,7 @@ var wi = class {
|
|
|
3816
4103
|
}
|
|
3817
4104
|
_renderMarkdown(e) {
|
|
3818
4105
|
let t = String(X.parse(e, { async: !1 }));
|
|
3819
|
-
return
|
|
4106
|
+
return wt.sanitize(t, {
|
|
3820
4107
|
ALLOWED_TAGS: /* @__PURE__ */ "p.br.strong.em.b.i.u.s.code.pre.blockquote.hr.ul.ol.li.h1.h2.h3.h4.h5.h6.table.thead.tbody.tr.th.td.a".split("."),
|
|
3821
4108
|
ALLOWED_ATTR: [
|
|
3822
4109
|
"href",
|
|
@@ -3848,13 +4135,13 @@ var wi = class {
|
|
|
3848
4135
|
}
|
|
3849
4136
|
_renderProgress() {
|
|
3850
4137
|
let { progress: e, progressCollapsed: t } = this._getRenderState();
|
|
3851
|
-
return e?.children?.length ?
|
|
4138
|
+
return e?.children?.length ? h`
|
|
3852
4139
|
<luzmo-progress-steps
|
|
3853
4140
|
.progress=${e}
|
|
3854
4141
|
?collapsed=${t}
|
|
3855
4142
|
.size=${this.size}
|
|
3856
4143
|
></luzmo-progress-steps>
|
|
3857
|
-
` :
|
|
4144
|
+
` : g;
|
|
3858
4145
|
}
|
|
3859
4146
|
_syncAssistantMessageActionsVisibility() {
|
|
3860
4147
|
let e = ((this.shadowRoot?.querySelector(`slot[name="${t.assistantMessageActionsSlot}"]`) ?? null)?.assignedElements({ flatten: !0 }).length ?? 0) > 0;
|
|
@@ -3930,8 +4217,8 @@ var wi = class {
|
|
|
3930
4217
|
});
|
|
3931
4218
|
}
|
|
3932
4219
|
_renderBuiltInAssistantMessageAction(e, t) {
|
|
3933
|
-
let n = this.disabled || t.disabled || !e.id, r = t.icon ?? (t.id === "undo" ?
|
|
3934
|
-
return r ?
|
|
4220
|
+
let n = this.disabled || t.disabled || !e.id, r = t.icon ?? (t.id === "undo" ? u : void 0);
|
|
4221
|
+
return r ? h`
|
|
3935
4222
|
<luzmo-action-button
|
|
3936
4223
|
class="assistant-message-action"
|
|
3937
4224
|
quiet
|
|
@@ -3949,7 +4236,7 @@ var wi = class {
|
|
|
3949
4236
|
${t.label}
|
|
3950
4237
|
</luzmo-tooltip>
|
|
3951
4238
|
</luzmo-action-button>
|
|
3952
|
-
` :
|
|
4239
|
+
` : h`
|
|
3953
4240
|
<luzmo-button
|
|
3954
4241
|
class="assistant-message-action"
|
|
3955
4242
|
.size=${this._oneSizeSmaller}
|
|
@@ -3964,9 +4251,9 @@ var wi = class {
|
|
|
3964
4251
|
}
|
|
3965
4252
|
_renderAssistantMessageActionConfirm(e) {
|
|
3966
4253
|
let t = this._getPendingAssistantMessageAction(e);
|
|
3967
|
-
if (!t) return
|
|
4254
|
+
if (!t) return g;
|
|
3968
4255
|
let n = t.confirmMessage ?? this._getDefaultAssistantMessageActionConfirmMessage(), r = this.disabled || t.disabled || !e.id;
|
|
3969
|
-
return
|
|
4256
|
+
return h`
|
|
3970
4257
|
<span class="assistant-message-action-confirm-message" role="status" aria-live="polite">${n}</span>
|
|
3971
4258
|
<div class="assistant-message-action-confirm-controls">
|
|
3972
4259
|
<luzmo-button
|
|
@@ -3993,35 +4280,35 @@ var wi = class {
|
|
|
3993
4280
|
}
|
|
3994
4281
|
_renderAssistantMessageActions(e, n) {
|
|
3995
4282
|
let r = e.actions ?? [], i = r.length > 0, a = this._isLatestAssistantMessage(e, n), o = this._isAssistantMessageActionConfirming(e);
|
|
3996
|
-
return !i && !a ?
|
|
4283
|
+
return !i && !a ? g : h`
|
|
3997
4284
|
<div
|
|
3998
4285
|
class="assistant-message-actions ${this._assistantMessageActionsFooterHasContent(e, a) ? "assistant-message-actions--has-content" : ""} ${o ? "assistant-message-actions--confirming" : ""}"
|
|
3999
|
-
@keydown=${o ? this._handleAssistantMessageActionConfirmKeydown :
|
|
4286
|
+
@keydown=${o ? this._handleAssistantMessageActionConfirmKeydown : g}
|
|
4000
4287
|
>
|
|
4001
|
-
${o ? this._renderAssistantMessageActionConfirm(e) :
|
|
4288
|
+
${o ? this._renderAssistantMessageActionConfirm(e) : h`
|
|
4002
4289
|
${r.map((t) => this._renderBuiltInAssistantMessageAction(e, t))}
|
|
4003
|
-
${a ?
|
|
4290
|
+
${a ? h`
|
|
4004
4291
|
<slot
|
|
4005
4292
|
name=${t.assistantMessageActionsSlot}
|
|
4006
4293
|
@slotchange=${this._handleAssistantMessageActionsSlotChange}
|
|
4007
4294
|
></slot>
|
|
4008
|
-
` :
|
|
4295
|
+
` : g}
|
|
4009
4296
|
`}
|
|
4010
4297
|
</div>
|
|
4011
4298
|
`;
|
|
4012
4299
|
}
|
|
4013
4300
|
_renderAssistantMessageFooter(e, t, n) {
|
|
4014
4301
|
let r = this._renderAssistantMessageFeedback(e, t), i = this._renderAssistantMessageActions(e, n);
|
|
4015
|
-
if (r ===
|
|
4016
|
-
let a = r !==
|
|
4017
|
-
return
|
|
4302
|
+
if (r === g && i === g) return g;
|
|
4303
|
+
let a = r !== g || this._assistantMessageActionsFooterHasContent(e, this._isLatestAssistantMessage(e, n));
|
|
4304
|
+
return h`
|
|
4018
4305
|
<div class="assistant-message-footer ${a ? "assistant-message-footer--has-content" : ""}">${r} ${i}</div>
|
|
4019
4306
|
`;
|
|
4020
4307
|
}
|
|
4021
4308
|
_handleAssistantMessageFeedback(e, t) {
|
|
4022
4309
|
let n = e.id;
|
|
4023
4310
|
if (!n || this.disabled) return;
|
|
4024
|
-
let r = this._session.requireSession(), i =
|
|
4311
|
+
let r = this._session.requireSession(), i = Wn(r.state.messages.find((e) => e.id === n)?.feedback, t);
|
|
4025
4312
|
if (!r.setMessageFeedback(n, i)) return;
|
|
4026
4313
|
let a = r.state.messages.find((e) => e.id === n);
|
|
4027
4314
|
this.dispatchEvent(new CustomEvent("luzmo-assistant-message-feedback", {
|
|
@@ -4035,7 +4322,7 @@ var wi = class {
|
|
|
4035
4322
|
}));
|
|
4036
4323
|
}
|
|
4037
4324
|
_renderAssistantMessageFeedback(e, t) {
|
|
4038
|
-
return !this.showAssistantMessageFeedback || e.hideFeedback ?
|
|
4325
|
+
return !this.showAssistantMessageFeedback || e.hideFeedback ? g : Jn({
|
|
4039
4326
|
labelId: `assistant-message-feedback-label-${t}`,
|
|
4040
4327
|
rating: e.feedback ?? 0,
|
|
4041
4328
|
size: this._oneSizeSmaller,
|
|
@@ -4044,9 +4331,9 @@ var wi = class {
|
|
|
4044
4331
|
});
|
|
4045
4332
|
}
|
|
4046
4333
|
_renderRestoreMenu(e, t, n, r = !1) {
|
|
4047
|
-
if (!(this._getAgentConfig().type === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== n)) return
|
|
4334
|
+
if (!(this._getAgentConfig().type === "item" && this.showAssistantContextMenu && e.hasChart && e.apiMessageId && !e.isError && e.id !== n)) return g;
|
|
4048
4335
|
let i = `context-menu-trigger-${e.apiMessageId}`;
|
|
4049
|
-
return
|
|
4336
|
+
return h`
|
|
4050
4337
|
<div class="assistant-context-menu">
|
|
4051
4338
|
<button
|
|
4052
4339
|
id=${i}
|
|
@@ -4056,7 +4343,7 @@ var wi = class {
|
|
|
4056
4343
|
aria-haspopup="menu"
|
|
4057
4344
|
?disabled=${r}
|
|
4058
4345
|
>
|
|
4059
|
-
${d
|
|
4346
|
+
${f(d)}
|
|
4060
4347
|
</button>
|
|
4061
4348
|
<luzmo-overlay
|
|
4062
4349
|
trigger="${i}@click"
|
|
@@ -4079,17 +4366,17 @@ var wi = class {
|
|
|
4079
4366
|
_renderMessages() {
|
|
4080
4367
|
let { messages: e, inflightMessage: t, isGenerating: n } = this._getRenderState(), r = t !== null, i = e.filter((e) => !t || e.id !== t.id), a = [...i].reverse().find((e) => e.type === "ai"), o = a?.id;
|
|
4081
4368
|
return i.map((t) => {
|
|
4082
|
-
let s = t.progress?.children?.length ?
|
|
4369
|
+
let s = t.progress?.children?.length ? h`
|
|
4083
4370
|
<luzmo-progress-steps
|
|
4084
4371
|
.progress=${t.progress}
|
|
4085
4372
|
collapsed
|
|
4086
4373
|
no-animate
|
|
4087
4374
|
.size=${this.size}
|
|
4088
4375
|
></luzmo-progress-steps>
|
|
4089
|
-
` :
|
|
4376
|
+
` : g;
|
|
4090
4377
|
if (t.type === "user") {
|
|
4091
4378
|
let e = t.attachmentUrls ?? [];
|
|
4092
|
-
return
|
|
4379
|
+
return h`
|
|
4093
4380
|
<luzmo-chat-message
|
|
4094
4381
|
avatar-placement="bottom"
|
|
4095
4382
|
position="right"
|
|
@@ -4097,9 +4384,9 @@ var wi = class {
|
|
|
4097
4384
|
.size=${this.size}
|
|
4098
4385
|
>
|
|
4099
4386
|
<div class="user-message-content">
|
|
4100
|
-
${e.length > 0 ?
|
|
4387
|
+
${e.length > 0 ? h`
|
|
4101
4388
|
<div class="user-message-attachments">
|
|
4102
|
-
${e.map((e) =>
|
|
4389
|
+
${e.map((e) => h`
|
|
4103
4390
|
<img
|
|
4104
4391
|
class="user-message-attachment"
|
|
4105
4392
|
src=${e}
|
|
@@ -4109,32 +4396,38 @@ var wi = class {
|
|
|
4109
4396
|
/>
|
|
4110
4397
|
`)}
|
|
4111
4398
|
</div>
|
|
4112
|
-
` :
|
|
4399
|
+
` : g}
|
|
4113
4400
|
<div class="user-message-text">${t.message}</div>
|
|
4114
4401
|
</div>
|
|
4115
4402
|
</luzmo-chat-message>
|
|
4116
4403
|
`;
|
|
4117
4404
|
}
|
|
4118
|
-
let l = e.indexOf(t), u = t.isError ? "error" : t.isCancelled ? "cancelled" : "", d = !!t.elicitation && (!t.message.trim() || t.message.trim() === t.elicitation?.question), f = t.isCancelled ? t.message : d ?
|
|
4119
|
-
return
|
|
4405
|
+
let l = e.indexOf(t), u = t.isError ? "error" : t.isCancelled ? "cancelled" : "", d = !!t.elicitation && (!t.message.trim() || t.message.trim() === t.elicitation?.question) || !!t.question && !t.message.trim(), f = !!t.id && t === i.at(-1) && !n && !this.disabled, p = t.isCancelled ? t.message : d ? g : h`<div class="markdown-content">${ne(this._renderMarkdown(t.message))}</div>`;
|
|
4406
|
+
return h`
|
|
4120
4407
|
${s}
|
|
4121
4408
|
<div class="assistant-message-wrapper">
|
|
4122
4409
|
<div class="assistant-message-body">
|
|
4123
4410
|
<luzmo-chat-message
|
|
4124
4411
|
class=${u}
|
|
4125
|
-
role=${t.isError ? "alert" :
|
|
4412
|
+
role=${t.isError ? "alert" : g}
|
|
4126
4413
|
avatar-placement="bottom"
|
|
4127
4414
|
position="left"
|
|
4128
4415
|
quiet
|
|
4129
4416
|
.size=${this.size}
|
|
4130
4417
|
>
|
|
4131
|
-
${
|
|
4132
|
-
${
|
|
4418
|
+
${p}
|
|
4419
|
+
${tr({
|
|
4133
4420
|
message: t,
|
|
4134
4421
|
size: this.size,
|
|
4135
4422
|
state: t.elicitation?.answer ? "answered" : t.id && t === i.at(-1) && !n && !this.disabled ? "open" : "closed",
|
|
4136
4423
|
onSubmit: (e) => this._handleElicitationSubmit(t, e)
|
|
4137
4424
|
})}
|
|
4425
|
+
${cr({
|
|
4426
|
+
message: t,
|
|
4427
|
+
size: this.size,
|
|
4428
|
+
state: this._questionState(t, t === i.at(-1), f),
|
|
4429
|
+
onAnswer: (e) => this._handleQuestionAnswer(t, e)
|
|
4430
|
+
})}
|
|
4138
4431
|
${this._renderAssistantMessageFooter(t, l, a)}
|
|
4139
4432
|
</luzmo-chat-message>
|
|
4140
4433
|
|
|
@@ -4144,9 +4437,31 @@ var wi = class {
|
|
|
4144
4437
|
`;
|
|
4145
4438
|
});
|
|
4146
4439
|
}
|
|
4440
|
+
_questionState(e, t, n) {
|
|
4441
|
+
let r = e.question?.status;
|
|
4442
|
+
return r === "open" ? t ? n ? "open" : "closed" : "superseded" : r ?? "closed";
|
|
4443
|
+
}
|
|
4444
|
+
async _handleQuestionAnswer(e, t) {
|
|
4445
|
+
t.stopPropagation();
|
|
4446
|
+
let n = t.currentTarget, r = n.parentElement, i = n.value, a = e.question ? ar(e.question, t.detail) : null, o = !1;
|
|
4447
|
+
if (e.id && a) try {
|
|
4448
|
+
await n.updateComplete;
|
|
4449
|
+
let t = this._session.requireSession().answerQuestion(e.id, a, { agentId: this._pickedAgentId });
|
|
4450
|
+
await this.updateComplete;
|
|
4451
|
+
let i = r?.querySelector("luzmo-question-box[readonly]");
|
|
4452
|
+
await i?.updateComplete, (i ?? r?.querySelector(".interaction-status"))?.focus(), o = await t;
|
|
4453
|
+
} catch (e) {
|
|
4454
|
+
e.name !== "AbortError" && console.error("AI prompt session error:", e);
|
|
4455
|
+
}
|
|
4456
|
+
if (!o) {
|
|
4457
|
+
await this.updateComplete;
|
|
4458
|
+
let e = r?.querySelector("luzmo-question-box.agent-question") ?? n;
|
|
4459
|
+
e.reset(), e.value = i, await e.updateComplete, e.focus();
|
|
4460
|
+
}
|
|
4461
|
+
}
|
|
4147
4462
|
async _handleElicitationSubmit(e, t) {
|
|
4148
4463
|
t.stopPropagation();
|
|
4149
|
-
let n = t.currentTarget, r = n.parentElement, i =
|
|
4464
|
+
let n = t.currentTarget, r = n.parentElement, i = $n(t.detail), a = !1;
|
|
4150
4465
|
if (e.id && i) try {
|
|
4151
4466
|
let t = this._session.requireSession().answerElicitation(e.id, i, { agentId: this._pickedAgentId });
|
|
4152
4467
|
await this.updateComplete;
|
|
@@ -4159,22 +4474,22 @@ var wi = class {
|
|
|
4159
4474
|
}
|
|
4160
4475
|
_renderStreamingResponse() {
|
|
4161
4476
|
let { inflightMessage: e } = this._getRenderState();
|
|
4162
|
-
return e?.message ?
|
|
4477
|
+
return e?.message ? h`
|
|
4163
4478
|
<luzmo-chat-message
|
|
4164
4479
|
avatar-placement="bottom"
|
|
4165
4480
|
position="left"
|
|
4166
4481
|
quiet
|
|
4167
4482
|
.size=${this.size}
|
|
4168
4483
|
>
|
|
4169
|
-
<div class="markdown-content">${
|
|
4484
|
+
<div class="markdown-content">${ne(this._renderMarkdown(e.message))}</div>
|
|
4170
4485
|
</luzmo-chat-message>
|
|
4171
|
-
` :
|
|
4486
|
+
` : g;
|
|
4172
4487
|
}
|
|
4173
4488
|
_renderLoadingMessage() {
|
|
4174
4489
|
let { isGenerating: e, progress: t, inflightMessage: n } = this._getRenderState();
|
|
4175
|
-
if (!e || t?.children?.length || n?.message) return
|
|
4176
|
-
let r = this._getAgentConfig(), i =
|
|
4177
|
-
return
|
|
4490
|
+
if (!e || t?.children?.length || n?.message) return g;
|
|
4491
|
+
let r = this._getAgentConfig(), i = Un(r), a = r.type === "dashboard" ? !i.dashboard : i.chart?.type === "placeholder", o = r.type === "dashboard" ? a ? c("Creating dashboard...", { desc: "Label for ai chat creating dashboard message" }) : c("Updating dashboard...", { desc: "Label for ai chat updating dashboard message" }) : a ? c("Creating item...", { desc: "Label for ai chat creating item message" }) : c("Updating item...", { desc: "Label for ai chat updating item message" });
|
|
4492
|
+
return h`
|
|
4178
4493
|
<luzmo-chat-message
|
|
4179
4494
|
avatar-placement="bottom"
|
|
4180
4495
|
position="left"
|
|
@@ -4182,16 +4497,16 @@ var wi = class {
|
|
|
4182
4497
|
.size=${this.size}
|
|
4183
4498
|
>
|
|
4184
4499
|
<div class="loading-message" role="status" aria-live="polite">
|
|
4185
|
-
<span class="icon-lg">${
|
|
4500
|
+
<span class="icon-lg">${f(p, { className: "spin" })}</span>
|
|
4186
4501
|
<span class="loading-message-text">${this.loadingMessage || o}</span>
|
|
4187
4502
|
</div>
|
|
4188
4503
|
</luzmo-chat-message>
|
|
4189
4504
|
`;
|
|
4190
4505
|
}
|
|
4191
4506
|
_renderEmptyState() {
|
|
4192
|
-
if (this._getRenderState().messages.length > 0) return
|
|
4507
|
+
if (this._getRenderState().messages.length > 0) return g;
|
|
4193
4508
|
let e = c("What can I help you with?", { desc: "Title for the AI chat empty state" }), t = this.emptyStateSuggestions.length > 0;
|
|
4194
|
-
return
|
|
4509
|
+
return h`
|
|
4195
4510
|
<luzmo-ai-chat-empty-state
|
|
4196
4511
|
.title=${this.emptyStateTitle || e}
|
|
4197
4512
|
.subtitle=${t ? this.emptyStateSubtitle : ""}
|
|
@@ -4204,7 +4519,7 @@ var wi = class {
|
|
|
4204
4519
|
}
|
|
4205
4520
|
render() {
|
|
4206
4521
|
let { selectedDatasets: e, isGenerating: t } = this._getRenderState();
|
|
4207
|
-
return
|
|
4522
|
+
return h`
|
|
4208
4523
|
<div class="chat-container" role="region" aria-label=${c("AI Chat", { desc: "Accessible label for AI chat region" })}>
|
|
4209
4524
|
<div class="chat-messages-container" role="log" aria-live="polite">
|
|
4210
4525
|
${this._renderEmptyState()}
|
|
@@ -4251,121 +4566,121 @@ var wi = class {
|
|
|
4251
4566
|
`;
|
|
4252
4567
|
}
|
|
4253
4568
|
};
|
|
4254
|
-
|
|
4569
|
+
Zi = $, Zi.styles = te(Vn), Zi.tagName = "luzmo-ai-chat", Zi.assistantMessageActionsSlot = "assistant-message-actions", o([_({ type: Array })], $.prototype, "messages", void 0), o([_({
|
|
4255
4570
|
type: Array,
|
|
4256
4571
|
attribute: "selected-datasets"
|
|
4257
|
-
})], $.prototype, "selectedDatasets", void 0), o([
|
|
4572
|
+
})], $.prototype, "selectedDatasets", void 0), o([_({ type: String })], $.prototype, "placeholder", void 0), o([_({
|
|
4258
4573
|
type: Boolean,
|
|
4259
4574
|
reflect: !0
|
|
4260
|
-
})], $.prototype, "disabled", void 0), o([
|
|
4575
|
+
})], $.prototype, "disabled", void 0), o([_({
|
|
4261
4576
|
type: Boolean,
|
|
4262
4577
|
reflect: !0
|
|
4263
|
-
})], $.prototype, "stoppable", void 0), o([
|
|
4578
|
+
})], $.prototype, "stoppable", void 0), o([_({
|
|
4264
4579
|
type: Boolean,
|
|
4265
4580
|
attribute: "show-assistant-context-menu"
|
|
4266
|
-
})], $.prototype, "showAssistantContextMenu", void 0), o([
|
|
4581
|
+
})], $.prototype, "showAssistantContextMenu", void 0), o([_({
|
|
4267
4582
|
type: Boolean,
|
|
4268
4583
|
reflect: !0,
|
|
4269
4584
|
attribute: "show-assistant-message-feedback"
|
|
4270
|
-
})], $.prototype, "showAssistantMessageFeedback", void 0), o([
|
|
4585
|
+
})], $.prototype, "showAssistantMessageFeedback", void 0), o([_({
|
|
4271
4586
|
type: String,
|
|
4272
4587
|
attribute: "auth-key"
|
|
4273
|
-
})], $.prototype, "authKey", void 0), o([
|
|
4588
|
+
})], $.prototype, "authKey", void 0), o([_({
|
|
4274
4589
|
type: String,
|
|
4275
4590
|
attribute: "auth-token"
|
|
4276
|
-
})], $.prototype, "authToken", void 0), o([
|
|
4591
|
+
})], $.prototype, "authToken", void 0), o([_({
|
|
4277
4592
|
type: String,
|
|
4278
4593
|
attribute: "api-url"
|
|
4279
|
-
})], $.prototype, "apiUrl", void 0), o([
|
|
4594
|
+
})], $.prototype, "apiUrl", void 0), o([_({
|
|
4280
4595
|
type: String,
|
|
4281
4596
|
attribute: "app-server"
|
|
4282
|
-
})], $.prototype, "appServer", void 0), o([
|
|
4597
|
+
})], $.prototype, "appServer", void 0), o([_({
|
|
4283
4598
|
type: Boolean,
|
|
4284
4599
|
reflect: !0,
|
|
4285
4600
|
attribute: "include-public-datasets"
|
|
4286
|
-
})], $.prototype, "includePublicDatasets", void 0), o([
|
|
4601
|
+
})], $.prototype, "includePublicDatasets", void 0), o([_({
|
|
4287
4602
|
type: Boolean,
|
|
4288
4603
|
attribute: "flag-opendata"
|
|
4289
|
-
})], $.prototype, "flagOpendata", null), o([
|
|
4604
|
+
})], $.prototype, "flagOpendata", null), o([_({
|
|
4290
4605
|
type: Boolean,
|
|
4291
4606
|
attribute: "hide-dataset-button"
|
|
4292
|
-
})], $.prototype, "hideDatasetButton", void 0), o([
|
|
4607
|
+
})], $.prototype, "hideDatasetButton", void 0), o([_({
|
|
4293
4608
|
type: Boolean,
|
|
4294
4609
|
attribute: "hide-dataset-icons"
|
|
4295
|
-
})], $.prototype, "hideDatasetIcons", void 0), o([
|
|
4610
|
+
})], $.prototype, "hideDatasetIcons", void 0), o([_({
|
|
4296
4611
|
type: Boolean,
|
|
4297
4612
|
attribute: "disable-dataset-modification"
|
|
4298
|
-
})], $.prototype, "disableDatasetModification", void 0), o([
|
|
4613
|
+
})], $.prototype, "disableDatasetModification", void 0), o([_({
|
|
4299
4614
|
type: Boolean,
|
|
4300
4615
|
attribute: "hide-selected-datasets"
|
|
4301
|
-
})], $.prototype, "hideSelectedDatasets", void 0), o([
|
|
4616
|
+
})], $.prototype, "hideSelectedDatasets", void 0), o([_({
|
|
4302
4617
|
type: Boolean,
|
|
4303
4618
|
reflect: !0,
|
|
4304
4619
|
attribute: "hide-agents"
|
|
4305
|
-
})], $.prototype, "hideAgents", void 0), o([
|
|
4620
|
+
})], $.prototype, "hideAgents", void 0), o([_({
|
|
4306
4621
|
type: Boolean,
|
|
4307
4622
|
attribute: "disable-column-mentions"
|
|
4308
|
-
})], $.prototype, "disableColumnMentions", void 0), o([
|
|
4623
|
+
})], $.prototype, "disableColumnMentions", void 0), o([_({
|
|
4309
4624
|
type: Boolean,
|
|
4310
4625
|
attribute: "require-dataset"
|
|
4311
|
-
})], $.prototype, "requireDataset", void 0), o([
|
|
4626
|
+
})], $.prototype, "requireDataset", void 0), o([_({
|
|
4312
4627
|
type: Boolean,
|
|
4313
4628
|
reflect: !0,
|
|
4314
4629
|
attribute: "allow-images"
|
|
4315
|
-
})], $.prototype, "allowImages", void 0), o([
|
|
4630
|
+
})], $.prototype, "allowImages", void 0), o([_({
|
|
4316
4631
|
type: Boolean,
|
|
4317
4632
|
reflect: !0,
|
|
4318
4633
|
attribute: "allow-voice-input"
|
|
4319
|
-
})], $.prototype, "allowVoiceInput", void 0), o([
|
|
4634
|
+
})], $.prototype, "allowVoiceInput", void 0), o([_({
|
|
4320
4635
|
type: Array,
|
|
4321
4636
|
attribute: "accepted-file-types"
|
|
4322
|
-
})], $.prototype, "acceptedFileTypes", void 0), o([
|
|
4637
|
+
})], $.prototype, "acceptedFileTypes", void 0), o([_({ attribute: !1 })], $.prototype, "uploadAttachments", void 0), o([_({ type: String })], $.prototype, "agent", void 0), o([_({ attribute: !1 })], $.prototype, "agentConfig", void 0), o([_({
|
|
4323
4638
|
type: String,
|
|
4324
4639
|
attribute: "agent-id"
|
|
4325
|
-
})], $.prototype, "agentId", void 0), o([
|
|
4640
|
+
})], $.prototype, "agentId", void 0), o([_({ type: String })], $.prototype, "task", void 0), o([_({
|
|
4326
4641
|
type: String,
|
|
4327
4642
|
attribute: "model-preference"
|
|
4328
|
-
})], $.prototype, "modelPreference", void 0), o([
|
|
4643
|
+
})], $.prototype, "modelPreference", void 0), o([_({ type: Array })], $.prototype, "interactions", void 0), o([_({ attribute: !1 })], $.prototype, "chatSession", void 0), o([_({
|
|
4329
4644
|
type: String,
|
|
4330
4645
|
attribute: "conversation-id"
|
|
4331
|
-
})], $.prototype, "conversationId", void 0), o([
|
|
4646
|
+
})], $.prototype, "conversationId", void 0), o([_({
|
|
4332
4647
|
type: Object,
|
|
4333
4648
|
attribute: "chart"
|
|
4334
|
-
})], $.prototype, "chart", void 0), o([
|
|
4649
|
+
})], $.prototype, "chart", void 0), o([_({ type: Object })], $.prototype, "dashboard", void 0), o([_({ attribute: !1 })], $.prototype, "customItem", void 0), o([_({
|
|
4335
4650
|
type: String,
|
|
4336
4651
|
attribute: "current-screen-mode"
|
|
4337
|
-
})], $.prototype, "currentScreenMode", void 0), o([
|
|
4652
|
+
})], $.prototype, "currentScreenMode", void 0), o([_({
|
|
4338
4653
|
type: String,
|
|
4339
4654
|
attribute: "locale-id"
|
|
4340
|
-
})], $.prototype, "localeId", void 0), o([
|
|
4655
|
+
})], $.prototype, "localeId", void 0), o([_({
|
|
4341
4656
|
type: String,
|
|
4342
4657
|
attribute: "timezone-id"
|
|
4343
|
-
})], $.prototype, "timezoneId", void 0), o([
|
|
4658
|
+
})], $.prototype, "timezoneId", void 0), o([_({
|
|
4344
4659
|
type: String,
|
|
4345
4660
|
attribute: "api-version"
|
|
4346
|
-
})], $.prototype, "apiVersion", void 0), o([
|
|
4661
|
+
})], $.prototype, "apiVersion", void 0), o([_({ converter: { fromAttribute: (e) => e !== "false" && e !== null } })], $.prototype, "stream", void 0), o([_({
|
|
4347
4662
|
type: String,
|
|
4348
4663
|
attribute: "loading-message"
|
|
4349
|
-
})], $.prototype, "loadingMessage", void 0), o([
|
|
4664
|
+
})], $.prototype, "loadingMessage", void 0), o([_({
|
|
4350
4665
|
type: String,
|
|
4351
4666
|
attribute: "cancelled-message"
|
|
4352
|
-
})], $.prototype, "cancelledMessage", void 0), o([
|
|
4667
|
+
})], $.prototype, "cancelledMessage", void 0), o([_({
|
|
4353
4668
|
type: String,
|
|
4354
4669
|
attribute: "initial-prompt"
|
|
4355
|
-
})], $.prototype, "initialPrompt", void 0), o([
|
|
4670
|
+
})], $.prototype, "initialPrompt", void 0), o([_({
|
|
4356
4671
|
type: String,
|
|
4357
4672
|
attribute: "empty-state-title"
|
|
4358
|
-
})], $.prototype, "emptyStateTitle", void 0), o([
|
|
4673
|
+
})], $.prototype, "emptyStateTitle", void 0), o([_({
|
|
4359
4674
|
type: String,
|
|
4360
4675
|
attribute: "empty-state-subtitle"
|
|
4361
|
-
})], $.prototype, "emptyStateSubtitle", void 0), o([
|
|
4676
|
+
})], $.prototype, "emptyStateSubtitle", void 0), o([_({
|
|
4362
4677
|
type: Array,
|
|
4363
4678
|
attribute: !1
|
|
4364
|
-
})], $.prototype, "emptyStateSuggestions", void 0), o([
|
|
4679
|
+
})], $.prototype, "emptyStateSuggestions", void 0), o([v()], $.prototype, "_textareaValue", void 0), o([v()], $.prototype, "_assistantMessageActionsSlotHasContent", void 0), o([v()], $.prototype, "_pendingAssistantMessageAction", void 0);
|
|
4365
4680
|
// src/components/ai-chat/ai-chat-events.ts
|
|
4366
|
-
function
|
|
4681
|
+
function Qi(e) {
|
|
4367
4682
|
return e.recognized === !0;
|
|
4368
4683
|
}
|
|
4369
4684
|
// src/components/ai-chat/index.ts
|
|
4370
4685
|
customElements.get("luzmo-ai-chat") || customElements.define("luzmo-ai-chat", $);
|
|
4371
|
-
export {
|
|
4686
|
+
export { hr as C, lr as D, ur as E, Z as O, _r as S, vr as T, Tr as _, Yi as a, br as b, Ui as c, $r as d, Lr as f, Cr as g, Sr as h, Ji as i, Hi as l, Dr as m, $ as n, Gi as o, Er as p, Xi as r, Wi as s, Qi as t, Yr as u, xr as v, mr as w, gr as x, yr as y };
|