q2-tecton-elements 1.51.0 → 1.52.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/dist/cjs/click-elsewhere_2.cjs.entry.js +16 -5
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-9aa4a776.js → index-07285783.js} +86 -2
- package/dist/cjs/index-07285783.js.map +1 -0
- package/dist/cjs/{index-14c3693c.js → index-e7e68b1e.js} +40 -5
- package/dist/cjs/index-e7e68b1e.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-action-sheet.cjs.entry.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge_7.cjs.entry.js +49 -44
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +17 -20
- package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +4 -2
- package/dist/cjs/q2-card.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +4 -4
- package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-area.cjs.entry.js +16 -3
- package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +3 -3
- package/dist/cjs/q2-chart-donut.cjs.entry.js +19 -3
- package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -5
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/q2-currency.cjs.entry.js +14 -2
- package/dist/cjs/q2-currency.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +3 -3
- package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +3 -3
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +12 -14
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +7 -5
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +3 -3
- package/dist/cjs/q2-example.cjs.entry.js +145 -0
- package/dist/cjs/q2-example.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-formatted-text.cjs.entry.js +2 -2
- package/dist/cjs/q2-item.cjs.entry.js +3 -3
- package/dist/cjs/q2-legend.cjs.entry.js +2 -2
- package/dist/cjs/q2-link.cjs.entry.js +4 -4
- package/dist/cjs/q2-link.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-list.cjs.entry.js +6 -7
- package/dist/cjs/q2-list.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-loading-element.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +52 -3
- package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +3 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +4 -4
- package/dist/cjs/q2-optgroup.cjs.entry.js +5 -4
- package/dist/cjs/q2-optgroup.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-option.cjs.entry.js +50 -33
- package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +11 -7
- package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +19 -18
- package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +3 -3
- package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
- package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
- package/dist/cjs/q2-section.cjs.entry.js +8 -6
- package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +6 -5
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper-pane.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +16 -4
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +6 -4
- package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +6 -4
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +2 -2
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{shapes-be198cc0.js → shapes-5d45fc11.js} +2 -2
- package/dist/cjs/{shapes-be198cc0.js.map → shapes-5d45fc11.js.map} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar.js +16 -18
- package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +27 -0
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-card/q2-card.js +2 -0
- package/dist/collection/components/q2-card/q2-card.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +42 -1
- package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +15 -0
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +41 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +11 -0
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +30 -23
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +4 -3
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +37 -1
- package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +34 -23
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +6 -4
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.css +5 -0
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +10 -4
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +59 -14
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +29 -11
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +9 -11
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +108 -74
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
- package/dist/collection/components/q2-example/q2-example.css +66 -0
- package/dist/collection/components/q2-example/q2-example.js +312 -0
- package/dist/collection/components/q2-example/q2-example.js.map +1 -0
- package/dist/collection/components/q2-example/test/q2-example.e2e.js +27 -0
- package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -0
- package/dist/collection/components/q2-example/test/q2-example.spec.js +126 -0
- package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-input/formatting/alpha.spec.js +10 -0
- package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/currency.spec.js +20 -0
- package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/date.js +1 -1
- package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/date.spec.js +17 -0
- package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/numeric.spec.js +32 -0
- package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/phone.spec.js +16 -0
- package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/postal.js +1 -1
- package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/postal.spec.js +28 -0
- package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/ssn.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/tin.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -0
- package/dist/collection/components/q2-input/q2-input.js +58 -44
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +259 -2106
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js +4035 -0
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -0
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-link/q2-link.css +17 -20
- package/dist/collection/components/q2-link/q2-link.js +2 -2
- package/dist/collection/components/q2-link/q2-link.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +6 -6
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-list/q2-list.js +4 -5
- package/dist/collection/components/q2-list/q2-list.js.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +66 -4
- package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +19 -30
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +164 -0
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -0
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +3 -2
- package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.css +1 -1
- package/dist/collection/components/q2-option/q2-option.js +57 -34
- package/dist/collection/components/q2-option/q2-option.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +110 -106
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js +532 -0
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -0
- package/dist/collection/components/q2-pagination/q2-pagination.js +9 -5
- package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +18 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js +18 -17
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +128 -57
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +17 -4
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-radio/q2-radio.js +1 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +19 -9
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-section/q2-section.js +6 -4
- package/dist/collection/components/q2-section/q2-section.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.js +5 -3
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +123 -62
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +4 -2
- package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -2
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +46 -2
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +26 -0
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +4 -3
- package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +5 -2
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +55 -4
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/helpers.js +63 -41
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/index.js +83 -0
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +84 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.js +1 -1
- package/dist/components/q2-action-sheet.js +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-calendar.js +16 -18
- package/dist/components/q2-calendar.js.map +1 -1
- package/dist/components/q2-card.js +2 -0
- package/dist/components/q2-card.js.map +1 -1
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-chart-area.js +16 -2
- package/dist/components/q2-chart-area.js.map +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +19 -2
- package/dist/components/q2-chart-donut.js.map +1 -1
- package/dist/components/q2-checkbox-group.js +5 -4
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-currency.js +15 -2
- package/dist/components/q2-currency.js.map +1 -1
- package/dist/components/q2-data-table.js +1 -1
- package/dist/components/q2-data-table.js.map +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown-item2.js +12 -26
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +6 -3
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-example.d.ts +11 -0
- package/dist/components/q2-example.js +170 -0
- package/dist/components/q2-example.js.map +1 -0
- package/dist/components/q2-formatted-text.js +1 -1
- package/dist/components/q2-input2.js +41 -37
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-legend2.js +1 -1
- package/dist/components/q2-link.js +3 -3
- package/dist/components/q2-link.js.map +1 -1
- package/dist/components/q2-list.js +4 -5
- package/dist/components/q2-list.js.map +1 -1
- package/dist/components/q2-loc.js +55 -2
- package/dist/components/q2-loc.js.map +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +3 -2
- package/dist/components/q2-optgroup2.js.map +1 -1
- package/dist/components/q2-option-list2.js +1 -1
- package/dist/components/q2-option2.js +52 -33
- package/dist/components/q2-option2.js.map +1 -1
- package/dist/components/q2-pagination.js +9 -5
- package/dist/components/q2-pagination.js.map +1 -1
- package/dist/components/q2-pill.js +18 -17
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +16 -4
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +3 -3
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-radio.js +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-section.js +6 -4
- package/dist/components/q2-section.js.map +1 -1
- package/dist/components/q2-select2.js +6 -4
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-pane.js +3 -2
- package/dist/components/q2-stepper-pane.js.map +1 -1
- package/dist/components/q2-stepper-vertical.js +16 -3
- package/dist/components/q2-stepper-vertical.js.map +1 -1
- package/dist/components/q2-stepper.js +4 -2
- package/dist/components/q2-stepper.js.map +1 -1
- package/dist/components/q2-tab-container.js +4 -3
- package/dist/components/q2-tab-container.js.map +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +5 -2
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/q2-textarea.js +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +16 -5
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-1e1ce94e.js → index-7a5365e2.js} +40 -5
- package/dist/esm/index-7a5365e2.js.map +1 -0
- package/dist/esm/{index-844fc010.js → index-d18e2a20.js} +86 -3
- package/dist/esm/index-d18e2a20.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q2-action-group.entry.js +2 -2
- package/dist/esm/q2-action-sheet.entry.js +3 -3
- package/dist/esm/q2-avatar.entry.js +2 -2
- package/dist/esm/q2-badge_7.entry.js +49 -44
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +17 -20
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- package/dist/esm/q2-card.entry.js +4 -2
- package/dist/esm/q2-card.entry.js.map +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +4 -4
- package/dist/esm/q2-carousel.entry.js +2 -2
- package/dist/esm/q2-chart-area.entry.js +16 -3
- package/dist/esm/q2-chart-area.entry.js.map +1 -1
- package/dist/esm/q2-chart-bar.entry.js +3 -3
- package/dist/esm/q2-chart-donut.entry.js +19 -3
- package/dist/esm/q2-chart-donut.entry.js.map +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +6 -5
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +2 -2
- package/dist/esm/q2-currency.entry.js +14 -2
- package/dist/esm/q2-currency.entry.js.map +1 -1
- package/dist/esm/q2-data-table.entry.js +3 -3
- package/dist/esm/q2-data-table.entry.js.map +1 -1
- package/dist/esm/q2-detail.entry.js +3 -3
- package/dist/esm/q2-dropdown-item.entry.js +12 -14
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +7 -5
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +3 -3
- package/dist/esm/q2-example.entry.js +141 -0
- package/dist/esm/q2-example.entry.js.map +1 -0
- package/dist/esm/q2-formatted-text.entry.js +2 -2
- package/dist/esm/q2-item.entry.js +3 -3
- package/dist/esm/q2-legend.entry.js +2 -2
- package/dist/esm/q2-link.entry.js +4 -4
- package/dist/esm/q2-link.entry.js.map +1 -1
- package/dist/esm/q2-list.entry.js +6 -7
- package/dist/esm/q2-list.entry.js.map +1 -1
- package/dist/esm/q2-loading-element.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +52 -3
- package/dist/esm/q2-loc.entry.js.map +1 -1
- package/dist/esm/q2-message.entry.js +3 -3
- package/dist/esm/q2-month-picker.entry.js +4 -4
- package/dist/esm/q2-optgroup.entry.js +5 -4
- package/dist/esm/q2-optgroup.entry.js.map +1 -1
- package/dist/esm/q2-option-list.entry.js +2 -2
- package/dist/esm/q2-option.entry.js +50 -33
- package/dist/esm/q2-option.entry.js.map +1 -1
- package/dist/esm/q2-pagination.entry.js +11 -7
- package/dist/esm/q2-pagination.entry.js.map +1 -1
- package/dist/esm/q2-pill.entry.js +19 -18
- package/dist/esm/q2-pill.entry.js.map +1 -1
- package/dist/esm/q2-radio-group.entry.js +5 -5
- package/dist/esm/q2-radio-group.entry.js.map +1 -1
- package/dist/esm/q2-radio.entry.js +3 -3
- package/dist/esm/q2-relative-time.entry.js +3 -3
- package/dist/esm/q2-resize-observer.entry.js +2 -2
- package/dist/esm/q2-section.entry.js +8 -6
- package/dist/esm/q2-section.entry.js.map +1 -1
- package/dist/esm/q2-select.entry.js +6 -5
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +5 -4
- package/dist/esm/q2-stepper-pane.entry.js.map +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +16 -4
- package/dist/esm/q2-stepper-vertical.entry.js.map +1 -1
- package/dist/esm/q2-stepper.entry.js +6 -4
- package/dist/esm/q2-stepper.entry.js.map +1 -1
- package/dist/esm/q2-tag.entry.js +6 -4
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +3 -3
- package/dist/esm/q2-tooltip.entry.js +2 -2
- package/dist/esm/{shapes-36183b2a.js → shapes-c7e1a3fa.js} +2 -2
- package/dist/esm/{shapes-36183b2a.js.map → shapes-c7e1a3fa.js.map} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +3 -3
- package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js +77 -0
- package/dist/q2-tecton-elements/{p-b7554a79.js.map → action-sheet-e64cb6f7.js.map} +1 -1
- package/dist/q2-tecton-elements/app-globals-0f993ce5.js +4 -0
- package/dist/q2-tecton-elements/{p-e1255160.js.map → app-globals-0f993ce5.js.map} +1 -1
- package/dist/q2-tecton-elements/charting-1abfb877.js +34872 -0
- package/dist/q2-tecton-elements/{p-2941aafa.js.map → charting-1abfb877.js.map} +1 -1
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +410 -0
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -0
- package/dist/q2-tecton-elements/dataSample-7b62e101.js +2602 -0
- package/dist/q2-tecton-elements/{p-ad80aef0.js.map → dataSample-7b62e101.js.map} +1 -1
- package/dist/q2-tecton-elements/index-3184c760.js +18168 -0
- package/dist/q2-tecton-elements/{p-f1e887f5.js.map → index-3184c760.js.map} +1 -1
- package/dist/q2-tecton-elements/index-7a5365e2.js +1792 -0
- package/dist/q2-tecton-elements/index-7a5365e2.js.map +1 -0
- package/dist/q2-tecton-elements/index-d18e2a20.js +323 -0
- package/dist/q2-tecton-elements/index-d18e2a20.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +56 -0
- package/dist/q2-tecton-elements/{p-5637c486.entry.js.map → q2-action-group.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1480 -0
- package/dist/q2-tecton-elements/{p-188eb162.entry.js.map → q2-action-sheet.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js +101 -0
- package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js.map → q2-avatar.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +5449 -0
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-calendar.entry.js +1313 -0
- package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-card.entry.js +170 -0
- package/dist/q2-tecton-elements/q2-card.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +130 -0
- package/dist/q2-tecton-elements/{p-7aef0c08.entry.js.map → q2-carousel-pane.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-carousel.entry.js +4613 -0
- package/dist/q2-tecton-elements/{p-e216ef3f.entry.js.map → q2-carousel.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +4330 -0
- package/dist/q2-tecton-elements/q2-chart-area.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1479 -0
- package/dist/q2-tecton-elements/{p-7906f49e.entry.js.map → q2-chart-bar.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +4537 -0
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +166 -0
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +223 -0
- package/dist/q2-tecton-elements/{p-b7de110e.entry.js.map → q2-checkbox.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-currency.entry.js +153 -0
- package/dist/q2-tecton-elements/q2-currency.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-data-table.entry.js +622 -0
- package/dist/q2-tecton-elements/{p-7903cd15.entry.js.map → q2-data-table.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-detail.entry.js +128 -0
- package/dist/q2-tecton-elements/{p-f5f23659.entry.js.map → q2-detail.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +146 -0
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +432 -0
- package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +296 -0
- package/dist/q2-tecton-elements/{p-896c7008.entry.js.map → q2-editable-field.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-example.entry.js +152 -0
- package/dist/q2-tecton-elements/q2-example.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +73 -0
- package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js.map → q2-formatted-text.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +158 -0
- package/dist/q2-tecton-elements/{p-7c9a0122.entry.js.map → q2-item.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-legend.entry.js +146 -0
- package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js.map → q2-legend.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-link.entry.js +83 -0
- package/dist/q2-tecton-elements/q2-link.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-list.entry.js +100 -0
- package/dist/q2-tecton-elements/q2-list.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-loading-element.entry.js +36 -0
- package/dist/q2-tecton-elements/{p-a068c84c.entry.js.map → q2-loading-element.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-loc.entry.js +82 -0
- package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-message.entry.js +99 -0
- package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js.map → q2-message.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +198 -0
- package/dist/q2-tecton-elements/{p-8d07cf91.entry.js.map → q2-month-picker.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +88 -0
- package/dist/q2-tecton-elements/q2-optgroup.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-option-list.entry.js +585 -0
- package/dist/q2-tecton-elements/{p-a5d0e252.entry.js.map → q2-option-list.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +110 -0
- package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-pagination.entry.js +377 -0
- package/dist/q2-tecton-elements/q2-pagination.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-pill.entry.js +434 -0
- package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +227 -0
- package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-radio.entry.js +144 -0
- package/dist/q2-tecton-elements/{p-c235ab3f.entry.js.map → q2-radio.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +162 -0
- package/dist/q2-tecton-elements/{p-95a7c042.entry.js.map → q2-relative-time.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +100 -0
- package/dist/q2-tecton-elements/{p-e2c800ef.entry.js.map → q2-resize-observer.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +256 -0
- package/dist/q2-tecton-elements/q2-section.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-select.entry.js +684 -0
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +124 -0
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +356 -0
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper.entry.js +332 -0
- package/dist/q2-tecton-elements/q2-stepper.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tag.entry.js +213 -0
- package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +21 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +364 -0
- package/dist/q2-tecton-elements/{p-f135b265.entry.js.map → q2-textarea.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +105 -0
- package/dist/q2-tecton-elements/{p-c5667d5d.entry.js.map → q2-tooltip.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/sectorHelper-183cedd0.js +949 -0
- package/dist/q2-tecton-elements/{p-eea5aa01.js.map → sectorHelper-183cedd0.js.map} +1 -1
- package/dist/q2-tecton-elements/shapes-c7e1a3fa.js +132 -0
- package/dist/q2-tecton-elements/{p-50b425de.js.map → shapes-c7e1a3fa.js.map} +1 -1
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +134 -0
- package/dist/q2-tecton-elements/{p-96b1406c.entry.js.map → tecton-tab-pane.entry.js.map} +1 -1
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +4 -5
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +6 -0
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +6 -0
- package/dist/types/components/q2-currency/q2-currency.d.ts +7 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +1 -1
- package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +2 -2
- package/dist/types/components/q2-example/q2-example.d.ts +119 -0
- package/dist/types/components/q2-input/formatting/date.d.ts +22 -0
- package/dist/types/components/q2-input/formatting/postal.d.ts +197 -0
- package/dist/types/components/q2-input/q2-input.d.ts +15 -12
- package/dist/types/components/q2-loc/q2-loc.d.ts +15 -1
- package/dist/types/components/q2-option/q2-option.d.ts +11 -3
- package/dist/types/components/q2-pill/q2-pill.d.ts +3 -3
- package/dist/types/components/q2-popover/q2-popover.d.ts +1 -0
- package/dist/types/components/q2-select/q2-select.d.ts +1 -1
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +6 -0
- package/dist/types/components/q2-tag/q2-tag.d.ts +1 -1
- package/dist/types/components.d.ts +104 -14
- package/dist/types/utils/helpers.d.ts +13 -0
- package/dist/types/utils/index.d.ts +11 -0
- package/package.json +7 -7
- package/dist/cjs/index-14c3693c.js.map +0 -1
- package/dist/cjs/index-9aa4a776.js.map +0 -1
- package/dist/esm/index-1e1ce94e.js.map +0 -1
- package/dist/esm/index-844fc010.js.map +0 -1
- package/dist/q2-tecton-elements/p-06701928.entry.js +0 -2
- package/dist/q2-tecton-elements/p-06701928.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-07d1c3ae.entry.js +0 -2
- package/dist/q2-tecton-elements/p-15ac45d6.js +0 -2
- package/dist/q2-tecton-elements/p-15ac45d6.js.map +0 -1
- package/dist/q2-tecton-elements/p-16910682.entry.js +0 -2
- package/dist/q2-tecton-elements/p-16910682.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-188eb162.entry.js +0 -3
- package/dist/q2-tecton-elements/p-1c760a89.entry.js +0 -2
- package/dist/q2-tecton-elements/p-1c760a89.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-1c88d057.entry.js +0 -2
- package/dist/q2-tecton-elements/p-1c88d057.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js +0 -2
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2733583e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-2733583e.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2941aafa.js +0 -39
- package/dist/q2-tecton-elements/p-3e428290.entry.js +0 -2
- package/dist/q2-tecton-elements/p-3e428290.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4774e5b3.entry.js +0 -2
- package/dist/q2-tecton-elements/p-4774e5b3.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-490ef8e5.entry.js +0 -2
- package/dist/q2-tecton-elements/p-490ef8e5.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4e10550d.entry.js +0 -2
- package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-50b425de.js +0 -2
- package/dist/q2-tecton-elements/p-50f7328f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-50f7328f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5637c486.entry.js +0 -2
- package/dist/q2-tecton-elements/p-56df21b0.entry.js +0 -2
- package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5a834214.entry.js +0 -2
- package/dist/q2-tecton-elements/p-5a834214.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +0 -2
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-72d948b4.entry.js +0 -2
- package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-7903cd15.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7906f49e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7aef0c08.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7c9a0122.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +0 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js +0 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-896c7008.entry.js +0 -2
- package/dist/q2-tecton-elements/p-8d07cf91.entry.js +0 -2
- package/dist/q2-tecton-elements/p-8d2b02e1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-95a7c042.entry.js +0 -2
- package/dist/q2-tecton-elements/p-96b1406c.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a068c84c.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a5f18e27.js +0 -3
- package/dist/q2-tecton-elements/p-a5f18e27.js.map +0 -1
- package/dist/q2-tecton-elements/p-ac6aa392.entry.js +0 -2
- package/dist/q2-tecton-elements/p-ac6aa392.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad057d10.entry.js +0 -2
- package/dist/q2-tecton-elements/p-ad057d10.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad798287.entry.js +0 -2
- package/dist/q2-tecton-elements/p-ad798287.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad80aef0.js +0 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b1784be3.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b1784be3.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b7554a79.js +0 -2
- package/dist/q2-tecton-elements/p-b7de110e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c235ab3f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js +0 -2
- package/dist/q2-tecton-elements/p-e1255160.js +0 -2
- package/dist/q2-tecton-elements/p-e216ef3f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js +0 -2
- package/dist/q2-tecton-elements/p-eea5aa01.js +0 -2
- package/dist/q2-tecton-elements/p-f135b265.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f1e887f5.js +0 -2
- package/dist/q2-tecton-elements/p-f5f23659.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +0 -2
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +0 -1
|
@@ -0,0 +1,1480 @@
|
|
|
1
|
+
import { r as e, c as t, h as n, F as o, g as i } from "./index-7a5365e2.js";
|
|
2
|
+
|
|
3
|
+
import { l as a, w as r } from "./index-d18e2a20.js";
|
|
4
|
+
|
|
5
|
+
var s = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
6
|
+
|
|
7
|
+
var l = {
|
|
8
|
+
exports: {}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */ (function(e, t) {
|
|
12
|
+
(function(t, n) {
|
|
13
|
+
e.exports = n();
|
|
14
|
+
})(s, (function() {
|
|
15
|
+
const {entries: e, setPrototypeOf: t, isFrozen: n, getPrototypeOf: o, getOwnPropertyDescriptor: i} = Object;
|
|
16
|
+
let {freeze: a, seal: r, create: s} = Object;
|
|
17
|
+
// eslint-disable-line import/no-mutable-exports
|
|
18
|
+
let {apply: l, construct: c} = typeof Reflect !== "undefined" && Reflect;
|
|
19
|
+
if (!a) {
|
|
20
|
+
a = function freeze(e) {
|
|
21
|
+
return e;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (!r) {
|
|
25
|
+
r = function seal(e) {
|
|
26
|
+
return e;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (!l) {
|
|
30
|
+
l = function apply(e, t, n) {
|
|
31
|
+
return e.apply(t, n);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
if (!c) {
|
|
35
|
+
c = function construct(e, t) {
|
|
36
|
+
return new e(...t);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const d = unapply(Array.prototype.forEach);
|
|
40
|
+
const u = unapply(Array.prototype.lastIndexOf);
|
|
41
|
+
const f = unapply(Array.prototype.pop);
|
|
42
|
+
const p = unapply(Array.prototype.push);
|
|
43
|
+
const h = unapply(Array.prototype.splice);
|
|
44
|
+
const m = unapply(String.prototype.toLowerCase);
|
|
45
|
+
const g = unapply(String.prototype.toString);
|
|
46
|
+
const b = unapply(String.prototype.match);
|
|
47
|
+
const y = unapply(String.prototype.replace);
|
|
48
|
+
const v = unapply(String.prototype.indexOf);
|
|
49
|
+
const x = unapply(String.prototype.trim);
|
|
50
|
+
const w = unapply(Object.prototype.hasOwnProperty);
|
|
51
|
+
const k = unapply(RegExp.prototype.test);
|
|
52
|
+
const T = unconstruct(TypeError);
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
|
55
|
+
*
|
|
56
|
+
* @param func - The function to be wrapped and called.
|
|
57
|
+
* @returns A new function that calls the given function with a specified thisArg and arguments.
|
|
58
|
+
*/ function unapply(e) {
|
|
59
|
+
return function(t) {
|
|
60
|
+
for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++) {
|
|
61
|
+
o[i - 1] = arguments[i];
|
|
62
|
+
}
|
|
63
|
+
return l(e, t, o);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Creates a new function that constructs an instance of the given constructor function with the provided arguments.
|
|
68
|
+
*
|
|
69
|
+
* @param func - The constructor function to be wrapped and called.
|
|
70
|
+
* @returns A new function that constructs an instance of the given constructor function with the provided arguments.
|
|
71
|
+
*/ function unconstruct(e) {
|
|
72
|
+
return function() {
|
|
73
|
+
for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++) {
|
|
74
|
+
n[o] = arguments[o];
|
|
75
|
+
}
|
|
76
|
+
return c(e, n);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Add properties to a lookup table
|
|
81
|
+
*
|
|
82
|
+
* @param set - The set to which elements will be added.
|
|
83
|
+
* @param array - The array containing elements to be added to the set.
|
|
84
|
+
* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
|
|
85
|
+
* @returns The modified set with added elements.
|
|
86
|
+
*/ function addToSet(e, o) {
|
|
87
|
+
let i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : m;
|
|
88
|
+
if (t) {
|
|
89
|
+
// Make 'in' and truthy checks like Boolean(set.constructor)
|
|
90
|
+
// independent of any properties defined on Object.prototype.
|
|
91
|
+
// Prevent prototype setters from intercepting set as a this value.
|
|
92
|
+
t(e, null);
|
|
93
|
+
}
|
|
94
|
+
let a = o.length;
|
|
95
|
+
while (a--) {
|
|
96
|
+
let t = o[a];
|
|
97
|
+
if (typeof t === "string") {
|
|
98
|
+
const e = i(t);
|
|
99
|
+
if (e !== t) {
|
|
100
|
+
// Config presets (e.g. tags.js, attrs.js) are immutable.
|
|
101
|
+
if (!n(o)) {
|
|
102
|
+
o[a] = e;
|
|
103
|
+
}
|
|
104
|
+
t = e;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
e[t] = true;
|
|
108
|
+
}
|
|
109
|
+
return e;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Clean up an array to harden against CSPP
|
|
113
|
+
*
|
|
114
|
+
* @param array - The array to be cleaned.
|
|
115
|
+
* @returns The cleaned version of the array
|
|
116
|
+
*/ function cleanArray(e) {
|
|
117
|
+
for (let t = 0; t < e.length; t++) {
|
|
118
|
+
const n = w(e, t);
|
|
119
|
+
if (!n) {
|
|
120
|
+
e[t] = null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return e;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Shallow clone an object
|
|
127
|
+
*
|
|
128
|
+
* @param object - The object to be cloned.
|
|
129
|
+
* @returns A new object that copies the original.
|
|
130
|
+
*/ function clone(t) {
|
|
131
|
+
const n = s(null);
|
|
132
|
+
for (const [o, i] of e(t)) {
|
|
133
|
+
const e = w(t, o);
|
|
134
|
+
if (e) {
|
|
135
|
+
if (Array.isArray(i)) {
|
|
136
|
+
n[o] = cleanArray(i);
|
|
137
|
+
} else if (i && typeof i === "object" && i.constructor === Object) {
|
|
138
|
+
n[o] = clone(i);
|
|
139
|
+
} else {
|
|
140
|
+
n[o] = i;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return n;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* This method automatically checks if the prop is function or getter and behaves accordingly.
|
|
148
|
+
*
|
|
149
|
+
* @param object - The object to look up the getter function in its prototype chain.
|
|
150
|
+
* @param prop - The property name for which to find the getter function.
|
|
151
|
+
* @returns The getter function found in the prototype chain or a fallback function.
|
|
152
|
+
*/ function lookupGetter(e, t) {
|
|
153
|
+
while (e !== null) {
|
|
154
|
+
const n = i(e, t);
|
|
155
|
+
if (n) {
|
|
156
|
+
if (n.get) {
|
|
157
|
+
return unapply(n.get);
|
|
158
|
+
}
|
|
159
|
+
if (typeof n.value === "function") {
|
|
160
|
+
return unapply(n.value);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
e = o(e);
|
|
164
|
+
}
|
|
165
|
+
function fallbackValue() {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
return fallbackValue;
|
|
169
|
+
}
|
|
170
|
+
const S = a([ "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", "section", "select", "shadow", "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" ]);
|
|
171
|
+
const _ = a([ "svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern" ]);
|
|
172
|
+
const A = a([ "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence" ]);
|
|
173
|
+
// List of SVG elements that are disallowed by default.
|
|
174
|
+
// We still need to know them so that we can do namespace
|
|
175
|
+
// checks properly in case one wants to add them to
|
|
176
|
+
// allow-list.
|
|
177
|
+
const E = a([ "animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use" ]);
|
|
178
|
+
const z = a([ "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" ]);
|
|
179
|
+
// Similarly to SVG, we want to know all MathML elements,
|
|
180
|
+
// even those that we disallow by default.
|
|
181
|
+
const R = a([ "maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none" ]);
|
|
182
|
+
const O = a([ "#text" ]);
|
|
183
|
+
const M = a([ "accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot" ]);
|
|
184
|
+
const D = a([ "accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan" ]);
|
|
185
|
+
const L = a([ "accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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" ]);
|
|
186
|
+
const C = a([ "xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink" ]);
|
|
187
|
+
// eslint-disable-next-line unicorn/better-regex
|
|
188
|
+
const P = r(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
|
|
189
|
+
// Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
|
190
|
+
const I = r(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
191
|
+
const N = r(/\$\{[\w\W]*/gm);
|
|
192
|
+
// eslint-disable-line unicorn/better-regex
|
|
193
|
+
const H = r(/^data-[\-\w.\u00B7-\uFFFF]+$/);
|
|
194
|
+
// eslint-disable-line no-useless-escape
|
|
195
|
+
const F = r(/^aria-[\-\w]+$/);
|
|
196
|
+
// eslint-disable-line no-useless-escape
|
|
197
|
+
const j = r(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);
|
|
198
|
+
const B = r(/^(?:\w+script|data):/i);
|
|
199
|
+
const q = r(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
|
|
200
|
+
const U = r(/^html$/i);
|
|
201
|
+
const G = r(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
202
|
+
var W = Object.freeze({
|
|
203
|
+
__proto__: null,
|
|
204
|
+
ARIA_ATTR: F,
|
|
205
|
+
ATTR_WHITESPACE: q,
|
|
206
|
+
CUSTOM_ELEMENT: G,
|
|
207
|
+
DATA_ATTR: H,
|
|
208
|
+
DOCTYPE_NAME: U,
|
|
209
|
+
ERB_EXPR: I,
|
|
210
|
+
IS_ALLOWED_URI: j,
|
|
211
|
+
IS_SCRIPT_OR_DATA: B,
|
|
212
|
+
MUSTACHE_EXPR: P,
|
|
213
|
+
TMPLIT_EXPR: N
|
|
214
|
+
});
|
|
215
|
+
/* eslint-disable @typescript-eslint/indent */
|
|
216
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
217
|
+
const Y = {
|
|
218
|
+
element: 1,
|
|
219
|
+
attribute: 2,
|
|
220
|
+
text: 3,
|
|
221
|
+
cdataSection: 4,
|
|
222
|
+
entityReference: 5,
|
|
223
|
+
// Deprecated
|
|
224
|
+
entityNode: 6,
|
|
225
|
+
// Deprecated
|
|
226
|
+
progressingInstruction: 7,
|
|
227
|
+
comment: 8,
|
|
228
|
+
document: 9,
|
|
229
|
+
documentType: 10,
|
|
230
|
+
documentFragment: 11,
|
|
231
|
+
notation: 12
|
|
232
|
+
};
|
|
233
|
+
const $ = function getGlobal() {
|
|
234
|
+
return typeof window === "undefined" ? null : window;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Creates a no-op policy for internal use only.
|
|
238
|
+
* Don't export this function outside this module!
|
|
239
|
+
* @param trustedTypes The policy factory.
|
|
240
|
+
* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
|
|
241
|
+
* @return The policy created (or null, if Trusted Types
|
|
242
|
+
* are not supported or creating the policy failed).
|
|
243
|
+
*/ const V = function _createTrustedTypesPolicy(e, t) {
|
|
244
|
+
if (typeof e !== "object" || typeof e.createPolicy !== "function") {
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
// Allow the callers to control the unique policy name
|
|
248
|
+
// by adding a data-tt-policy-suffix to the script element with the DOMPurify.
|
|
249
|
+
// Policy creation with duplicate names throws in Trusted Types.
|
|
250
|
+
let n = null;
|
|
251
|
+
const o = "data-tt-policy-suffix";
|
|
252
|
+
if (t && t.hasAttribute(o)) {
|
|
253
|
+
n = t.getAttribute(o);
|
|
254
|
+
}
|
|
255
|
+
const i = "dompurify" + (n ? "#" + n : "");
|
|
256
|
+
try {
|
|
257
|
+
return e.createPolicy(i, {
|
|
258
|
+
createHTML(e) {
|
|
259
|
+
return e;
|
|
260
|
+
},
|
|
261
|
+
createScriptURL(e) {
|
|
262
|
+
return e;
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
} catch (e) {
|
|
266
|
+
// Policy creation failed (most likely another DOMPurify script has
|
|
267
|
+
// already run). Skip creating the policy, as this will only cause errors
|
|
268
|
+
// if TT are enforced.
|
|
269
|
+
console.warn("TrustedTypes policy " + i + " could not be created.");
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
const X = function _createHooksMap() {
|
|
274
|
+
return {
|
|
275
|
+
afterSanitizeAttributes: [],
|
|
276
|
+
afterSanitizeElements: [],
|
|
277
|
+
afterSanitizeShadowDOM: [],
|
|
278
|
+
beforeSanitizeAttributes: [],
|
|
279
|
+
beforeSanitizeElements: [],
|
|
280
|
+
beforeSanitizeShadowDOM: [],
|
|
281
|
+
uponSanitizeAttribute: [],
|
|
282
|
+
uponSanitizeElement: [],
|
|
283
|
+
uponSanitizeShadowNode: []
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
function createDOMPurify() {
|
|
287
|
+
let t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $();
|
|
288
|
+
const DOMPurify = e => createDOMPurify(e);
|
|
289
|
+
DOMPurify.version = "3.2.4";
|
|
290
|
+
DOMPurify.removed = [];
|
|
291
|
+
if (!t || !t.document || t.document.nodeType !== Y.document || !t.Element) {
|
|
292
|
+
// Not running in a browser, provide a factory function
|
|
293
|
+
// so that you can pass your own Window
|
|
294
|
+
DOMPurify.isSupported = false;
|
|
295
|
+
return DOMPurify;
|
|
296
|
+
}
|
|
297
|
+
let {document: n} = t;
|
|
298
|
+
const o = n;
|
|
299
|
+
const i = o.currentScript;
|
|
300
|
+
const {DocumentFragment: r, HTMLTemplateElement: l, Node: c, Element: P, NodeFilter: I, NamedNodeMap: N = t.NamedNodeMap || t.MozNamedAttrMap, HTMLFormElement: H, DOMParser: F, trustedTypes: B} = t;
|
|
301
|
+
const q = P.prototype;
|
|
302
|
+
const G = lookupGetter(q, "cloneNode");
|
|
303
|
+
const K = lookupGetter(q, "remove");
|
|
304
|
+
const J = lookupGetter(q, "nextSibling");
|
|
305
|
+
const Q = lookupGetter(q, "childNodes");
|
|
306
|
+
const Z = lookupGetter(q, "parentNode");
|
|
307
|
+
// As per issue #47, the web-components registry is inherited by a
|
|
308
|
+
// new document created via createHTMLDocument. As per the spec
|
|
309
|
+
// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
|
|
310
|
+
// a new empty registry is used when creating a template contents owner
|
|
311
|
+
// document, so we use that as our parent document to ensure nothing
|
|
312
|
+
// is inherited.
|
|
313
|
+
if (typeof l === "function") {
|
|
314
|
+
const e = n.createElement("template");
|
|
315
|
+
if (e.content && e.content.ownerDocument) {
|
|
316
|
+
n = e.content.ownerDocument;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
let ee;
|
|
320
|
+
let te = "";
|
|
321
|
+
const {implementation: ne, createNodeIterator: oe, createDocumentFragment: ie, getElementsByTagName: ae} = n;
|
|
322
|
+
const {importNode: re} = o;
|
|
323
|
+
let se = X();
|
|
324
|
+
/**
|
|
325
|
+
* Expose whether this browser supports running the full DOMPurify.
|
|
326
|
+
*/ DOMPurify.isSupported = typeof e === "function" && typeof Z === "function" && ne && ne.createHTMLDocument !== undefined;
|
|
327
|
+
const {MUSTACHE_EXPR: le, ERB_EXPR: ce, TMPLIT_EXPR: de, DATA_ATTR: ue, ARIA_ATTR: fe, IS_SCRIPT_OR_DATA: pe, ATTR_WHITESPACE: he, CUSTOM_ELEMENT: me} = W;
|
|
328
|
+
let {IS_ALLOWED_URI: ge} = W;
|
|
329
|
+
/**
|
|
330
|
+
* We consider the elements and attributes below to be safe. Ideally
|
|
331
|
+
* don't add any new ones but feel free to remove unwanted ones.
|
|
332
|
+
*/
|
|
333
|
+
/* allowed element names */ let be = null;
|
|
334
|
+
const ye = addToSet({}, [ ...S, ..._, ...A, ...z, ...O ]);
|
|
335
|
+
/* Allowed attribute names */ let ve = null;
|
|
336
|
+
const xe = addToSet({}, [ ...M, ...D, ...L, ...C ]);
|
|
337
|
+
/*
|
|
338
|
+
* Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
|
|
339
|
+
* @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
|
|
340
|
+
* @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
|
|
341
|
+
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
|
342
|
+
*/ let we = Object.seal(s(null, {
|
|
343
|
+
tagNameCheck: {
|
|
344
|
+
writable: true,
|
|
345
|
+
configurable: false,
|
|
346
|
+
enumerable: true,
|
|
347
|
+
value: null
|
|
348
|
+
},
|
|
349
|
+
attributeNameCheck: {
|
|
350
|
+
writable: true,
|
|
351
|
+
configurable: false,
|
|
352
|
+
enumerable: true,
|
|
353
|
+
value: null
|
|
354
|
+
},
|
|
355
|
+
allowCustomizedBuiltInElements: {
|
|
356
|
+
writable: true,
|
|
357
|
+
configurable: false,
|
|
358
|
+
enumerable: true,
|
|
359
|
+
value: false
|
|
360
|
+
}
|
|
361
|
+
}));
|
|
362
|
+
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ let ke = null;
|
|
363
|
+
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ let Te = null;
|
|
364
|
+
/* Decide if ARIA attributes are okay */ let Se = true;
|
|
365
|
+
/* Decide if custom data attributes are okay */ let _e = true;
|
|
366
|
+
/* Decide if unknown protocols are okay */ let Ae = false;
|
|
367
|
+
/* Decide if self-closing tags in attributes are allowed.
|
|
368
|
+
* Usually removed due to a mXSS issue in jQuery 3.0 */ let Ee = true;
|
|
369
|
+
/* Output should be safe for common template engines.
|
|
370
|
+
* This means, DOMPurify removes data attributes, mustaches and ERB
|
|
371
|
+
*/ let ze = false;
|
|
372
|
+
/* Output should be safe even for XML used within HTML and alike.
|
|
373
|
+
* This means, DOMPurify removes comments when containing risky content.
|
|
374
|
+
*/ let Re = true;
|
|
375
|
+
/* Decide if document with <html>... should be returned */ let Oe = false;
|
|
376
|
+
/* Track whether config is already set on this instance of DOMPurify. */ let Me = false;
|
|
377
|
+
/* Decide if all elements (e.g. style, script) must be children of
|
|
378
|
+
* document.body. By default, browsers might move them to document.head */ let De = false;
|
|
379
|
+
/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
|
|
380
|
+
* string (or a TrustedHTML object if Trusted Types are supported).
|
|
381
|
+
* If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
|
|
382
|
+
*/ let Le = false;
|
|
383
|
+
/* Decide if a DOM `DocumentFragment` should be returned, instead of a html
|
|
384
|
+
* string (or a TrustedHTML object if Trusted Types are supported) */ let Ce = false;
|
|
385
|
+
/* Try to return a Trusted Type object instead of a string, return a string in
|
|
386
|
+
* case Trusted Types are not supported */ let Pe = false;
|
|
387
|
+
/* Output should be free from DOM clobbering attacks?
|
|
388
|
+
* This sanitizes markups named with colliding, clobberable built-in DOM APIs.
|
|
389
|
+
*/ let Ie = true;
|
|
390
|
+
/* Achieve full DOM Clobbering protection by isolating the namespace of named
|
|
391
|
+
* properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
|
|
392
|
+
*
|
|
393
|
+
* HTML/DOM spec rules that enable DOM Clobbering:
|
|
394
|
+
* - Named Access on Window (§7.3.3)
|
|
395
|
+
* - DOM Tree Accessors (§3.1.5)
|
|
396
|
+
* - Form Element Parent-Child Relations (§4.10.3)
|
|
397
|
+
* - Iframe srcdoc / Nested WindowProxies (§4.8.5)
|
|
398
|
+
* - HTMLCollection (§4.2.10.2)
|
|
399
|
+
*
|
|
400
|
+
* Namespace isolation is implemented by prefixing `id` and `name` attributes
|
|
401
|
+
* with a constant string, i.e., `user-content-`
|
|
402
|
+
*/ let Ne = false;
|
|
403
|
+
const He = "user-content-";
|
|
404
|
+
/* Keep element content when removing element? */ let Fe = true;
|
|
405
|
+
/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
|
|
406
|
+
* of importing it into a new Document and returning a sanitized copy */ let je = false;
|
|
407
|
+
/* Allow usage of profiles like html, svg and mathMl */ let Be = {};
|
|
408
|
+
/* Tags to ignore content of when KEEP_CONTENT is true */ let qe = null;
|
|
409
|
+
const Ue = addToSet({}, [ "annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp" ]);
|
|
410
|
+
/* Tags that are safe for data: URIs */ let Ge = null;
|
|
411
|
+
const We = addToSet({}, [ "audio", "video", "img", "source", "image", "track" ]);
|
|
412
|
+
/* Attributes safe for values like "javascript:" */ let Ye = null;
|
|
413
|
+
const $e = addToSet({}, [ "alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns" ]);
|
|
414
|
+
const Ve = "http://www.w3.org/1998/Math/MathML";
|
|
415
|
+
const Xe = "http://www.w3.org/2000/svg";
|
|
416
|
+
const Ke = "http://www.w3.org/1999/xhtml";
|
|
417
|
+
/* Document namespace */ let Je = Ke;
|
|
418
|
+
let Qe = false;
|
|
419
|
+
/* Allowed XHTML+XML namespaces */ let Ze = null;
|
|
420
|
+
const et = addToSet({}, [ Ve, Xe, Ke ], g);
|
|
421
|
+
let tt = addToSet({}, [ "mi", "mo", "mn", "ms", "mtext" ]);
|
|
422
|
+
let nt = addToSet({}, [ "annotation-xml" ]);
|
|
423
|
+
// Certain elements are allowed in both SVG and HTML
|
|
424
|
+
// namespace. We need to specify them explicitly
|
|
425
|
+
// so that they don't get erroneously deleted from
|
|
426
|
+
// HTML namespace.
|
|
427
|
+
const ot = addToSet({}, [ "title", "style", "font", "a", "script" ]);
|
|
428
|
+
/* Parsing of strict XHTML documents */ let it = null;
|
|
429
|
+
const at = [ "application/xhtml+xml", "text/html" ];
|
|
430
|
+
const rt = "text/html";
|
|
431
|
+
let st = null;
|
|
432
|
+
/* Keep a reference to config to pass to hooks */ let lt = null;
|
|
433
|
+
/* Ideally, do not touch anything below this line */
|
|
434
|
+
/* ______________________________________________ */ const ct = n.createElement("form");
|
|
435
|
+
const dt = function isRegexOrFunction(e) {
|
|
436
|
+
return e instanceof RegExp || e instanceof Function;
|
|
437
|
+
};
|
|
438
|
+
/**
|
|
439
|
+
* _parseConfig
|
|
440
|
+
*
|
|
441
|
+
* @param cfg optional config literal
|
|
442
|
+
*/
|
|
443
|
+
// eslint-disable-next-line complexity
|
|
444
|
+
const ut = function _parseConfig() {
|
|
445
|
+
let e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
446
|
+
if (lt && lt === e) {
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
/* Shield configuration object from tampering */ if (!e || typeof e !== "object") {
|
|
450
|
+
e = {};
|
|
451
|
+
}
|
|
452
|
+
/* Shield configuration object from prototype pollution */ e = clone(e);
|
|
453
|
+
it =
|
|
454
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
|
455
|
+
at.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? rt : e.PARSER_MEDIA_TYPE;
|
|
456
|
+
// HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
|
457
|
+
st = it === "application/xhtml+xml" ? g : m;
|
|
458
|
+
/* Set configuration parameters */ be = w(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, st) : ye;
|
|
459
|
+
ve = w(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, st) : xe;
|
|
460
|
+
Ze = w(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, g) : et;
|
|
461
|
+
Ye = w(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone($e), e.ADD_URI_SAFE_ATTR, st) : $e;
|
|
462
|
+
Ge = w(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(We), e.ADD_DATA_URI_TAGS, st) : We;
|
|
463
|
+
qe = w(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, st) : Ue;
|
|
464
|
+
ke = w(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, st) : {};
|
|
465
|
+
Te = w(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, st) : {};
|
|
466
|
+
Be = w(e, "USE_PROFILES") ? e.USE_PROFILES : false;
|
|
467
|
+
Se = e.ALLOW_ARIA_ATTR !== false;
|
|
468
|
+
// Default true
|
|
469
|
+
_e = e.ALLOW_DATA_ATTR !== false;
|
|
470
|
+
// Default true
|
|
471
|
+
Ae = e.ALLOW_UNKNOWN_PROTOCOLS || false;
|
|
472
|
+
// Default false
|
|
473
|
+
Ee = e.ALLOW_SELF_CLOSE_IN_ATTR !== false;
|
|
474
|
+
// Default true
|
|
475
|
+
ze = e.SAFE_FOR_TEMPLATES || false;
|
|
476
|
+
// Default false
|
|
477
|
+
Re = e.SAFE_FOR_XML !== false;
|
|
478
|
+
// Default true
|
|
479
|
+
Oe = e.WHOLE_DOCUMENT || false;
|
|
480
|
+
// Default false
|
|
481
|
+
Le = e.RETURN_DOM || false;
|
|
482
|
+
// Default false
|
|
483
|
+
Ce = e.RETURN_DOM_FRAGMENT || false;
|
|
484
|
+
// Default false
|
|
485
|
+
Pe = e.RETURN_TRUSTED_TYPE || false;
|
|
486
|
+
// Default false
|
|
487
|
+
De = e.FORCE_BODY || false;
|
|
488
|
+
// Default false
|
|
489
|
+
Ie = e.SANITIZE_DOM !== false;
|
|
490
|
+
// Default true
|
|
491
|
+
Ne = e.SANITIZE_NAMED_PROPS || false;
|
|
492
|
+
// Default false
|
|
493
|
+
Fe = e.KEEP_CONTENT !== false;
|
|
494
|
+
// Default true
|
|
495
|
+
je = e.IN_PLACE || false;
|
|
496
|
+
// Default false
|
|
497
|
+
ge = e.ALLOWED_URI_REGEXP || j;
|
|
498
|
+
Je = e.NAMESPACE || Ke;
|
|
499
|
+
tt = e.MATHML_TEXT_INTEGRATION_POINTS || tt;
|
|
500
|
+
nt = e.HTML_INTEGRATION_POINTS || nt;
|
|
501
|
+
we = e.CUSTOM_ELEMENT_HANDLING || {};
|
|
502
|
+
if (e.CUSTOM_ELEMENT_HANDLING && dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
|
|
503
|
+
we.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
|
|
504
|
+
}
|
|
505
|
+
if (e.CUSTOM_ELEMENT_HANDLING && dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
|
|
506
|
+
we.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
|
|
507
|
+
}
|
|
508
|
+
if (e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
|
|
509
|
+
we.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
|
|
510
|
+
}
|
|
511
|
+
if (ze) {
|
|
512
|
+
_e = false;
|
|
513
|
+
}
|
|
514
|
+
if (Ce) {
|
|
515
|
+
Le = true;
|
|
516
|
+
}
|
|
517
|
+
/* Parse profile info */ if (Be) {
|
|
518
|
+
be = addToSet({}, O);
|
|
519
|
+
ve = [];
|
|
520
|
+
if (Be.html === true) {
|
|
521
|
+
addToSet(be, S);
|
|
522
|
+
addToSet(ve, M);
|
|
523
|
+
}
|
|
524
|
+
if (Be.svg === true) {
|
|
525
|
+
addToSet(be, _);
|
|
526
|
+
addToSet(ve, D);
|
|
527
|
+
addToSet(ve, C);
|
|
528
|
+
}
|
|
529
|
+
if (Be.svgFilters === true) {
|
|
530
|
+
addToSet(be, A);
|
|
531
|
+
addToSet(ve, D);
|
|
532
|
+
addToSet(ve, C);
|
|
533
|
+
}
|
|
534
|
+
if (Be.mathMl === true) {
|
|
535
|
+
addToSet(be, z);
|
|
536
|
+
addToSet(ve, L);
|
|
537
|
+
addToSet(ve, C);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
/* Merge configuration parameters */ if (e.ADD_TAGS) {
|
|
541
|
+
if (be === ye) {
|
|
542
|
+
be = clone(be);
|
|
543
|
+
}
|
|
544
|
+
addToSet(be, e.ADD_TAGS, st);
|
|
545
|
+
}
|
|
546
|
+
if (e.ADD_ATTR) {
|
|
547
|
+
if (ve === xe) {
|
|
548
|
+
ve = clone(ve);
|
|
549
|
+
}
|
|
550
|
+
addToSet(ve, e.ADD_ATTR, st);
|
|
551
|
+
}
|
|
552
|
+
if (e.ADD_URI_SAFE_ATTR) {
|
|
553
|
+
addToSet(Ye, e.ADD_URI_SAFE_ATTR, st);
|
|
554
|
+
}
|
|
555
|
+
if (e.FORBID_CONTENTS) {
|
|
556
|
+
if (qe === Ue) {
|
|
557
|
+
qe = clone(qe);
|
|
558
|
+
}
|
|
559
|
+
addToSet(qe, e.FORBID_CONTENTS, st);
|
|
560
|
+
}
|
|
561
|
+
/* Add #text in case KEEP_CONTENT is set to true */ if (Fe) {
|
|
562
|
+
be["#text"] = true;
|
|
563
|
+
}
|
|
564
|
+
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */ if (Oe) {
|
|
565
|
+
addToSet(be, [ "html", "head", "body" ]);
|
|
566
|
+
}
|
|
567
|
+
/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */ if (be.table) {
|
|
568
|
+
addToSet(be, [ "tbody" ]);
|
|
569
|
+
delete ke.tbody;
|
|
570
|
+
}
|
|
571
|
+
if (e.TRUSTED_TYPES_POLICY) {
|
|
572
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML !== "function") {
|
|
573
|
+
throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
574
|
+
}
|
|
575
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL !== "function") {
|
|
576
|
+
throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
577
|
+
}
|
|
578
|
+
// Overwrite existing TrustedTypes policy.
|
|
579
|
+
ee = e.TRUSTED_TYPES_POLICY;
|
|
580
|
+
// Sign local variables required by `sanitize`.
|
|
581
|
+
te = ee.createHTML("");
|
|
582
|
+
} else {
|
|
583
|
+
// Uninitialized policy, attempt to initialize the internal dompurify policy.
|
|
584
|
+
if (ee === undefined) {
|
|
585
|
+
ee = V(B, i);
|
|
586
|
+
}
|
|
587
|
+
// If creating the internal policy succeeded sign internal variables.
|
|
588
|
+
if (ee !== null && typeof te === "string") {
|
|
589
|
+
te = ee.createHTML("");
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
// Prevent further manipulation of configuration.
|
|
593
|
+
// Not available in IE8, Safari 5, etc.
|
|
594
|
+
if (a) {
|
|
595
|
+
a(e);
|
|
596
|
+
}
|
|
597
|
+
lt = e;
|
|
598
|
+
};
|
|
599
|
+
/* Keep track of all possible SVG and MathML tags
|
|
600
|
+
* so that we can perform the namespace checks
|
|
601
|
+
* correctly. */ const ft = addToSet({}, [ ..._, ...A, ...E ]);
|
|
602
|
+
const pt = addToSet({}, [ ...z, ...R ]);
|
|
603
|
+
/**
|
|
604
|
+
* @param element a DOM element whose namespace is being checked
|
|
605
|
+
* @returns Return false if the element has a
|
|
606
|
+
* namespace that a spec-compliant parser would never
|
|
607
|
+
* return. Return true otherwise.
|
|
608
|
+
*/ const ht = function _checkValidNamespace(e) {
|
|
609
|
+
let t = Z(e);
|
|
610
|
+
// In JSDOM, if we're inside shadow DOM, then parentNode
|
|
611
|
+
// can be null. We just simulate parent in this case.
|
|
612
|
+
if (!t || !t.tagName) {
|
|
613
|
+
t = {
|
|
614
|
+
namespaceURI: Je,
|
|
615
|
+
tagName: "template"
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
const n = m(e.tagName);
|
|
619
|
+
const o = m(t.tagName);
|
|
620
|
+
if (!Ze[e.namespaceURI]) {
|
|
621
|
+
return false;
|
|
622
|
+
}
|
|
623
|
+
if (e.namespaceURI === Xe) {
|
|
624
|
+
// The only way to switch from HTML namespace to SVG
|
|
625
|
+
// is via <svg>. If it happens via any other tag, then
|
|
626
|
+
// it should be killed.
|
|
627
|
+
if (t.namespaceURI === Ke) {
|
|
628
|
+
return n === "svg";
|
|
629
|
+
}
|
|
630
|
+
// The only way to switch from MathML to SVG is via`
|
|
631
|
+
// svg if parent is either <annotation-xml> or MathML
|
|
632
|
+
// text integration points.
|
|
633
|
+
if (t.namespaceURI === Ve) {
|
|
634
|
+
return n === "svg" && (o === "annotation-xml" || tt[o]);
|
|
635
|
+
}
|
|
636
|
+
// We only allow elements that are defined in SVG
|
|
637
|
+
// spec. All others are disallowed in SVG namespace.
|
|
638
|
+
return Boolean(ft[n]);
|
|
639
|
+
}
|
|
640
|
+
if (e.namespaceURI === Ve) {
|
|
641
|
+
// The only way to switch from HTML namespace to MathML
|
|
642
|
+
// is via <math>. If it happens via any other tag, then
|
|
643
|
+
// it should be killed.
|
|
644
|
+
if (t.namespaceURI === Ke) {
|
|
645
|
+
return n === "math";
|
|
646
|
+
}
|
|
647
|
+
// The only way to switch from SVG to MathML is via
|
|
648
|
+
// <math> and HTML integration points
|
|
649
|
+
if (t.namespaceURI === Xe) {
|
|
650
|
+
return n === "math" && nt[o];
|
|
651
|
+
}
|
|
652
|
+
// We only allow elements that are defined in MathML
|
|
653
|
+
// spec. All others are disallowed in MathML namespace.
|
|
654
|
+
return Boolean(pt[n]);
|
|
655
|
+
}
|
|
656
|
+
if (e.namespaceURI === Ke) {
|
|
657
|
+
// The only way to switch from SVG to HTML is via
|
|
658
|
+
// HTML integration points, and from MathML to HTML
|
|
659
|
+
// is via MathML text integration points
|
|
660
|
+
if (t.namespaceURI === Xe && !nt[o]) {
|
|
661
|
+
return false;
|
|
662
|
+
}
|
|
663
|
+
if (t.namespaceURI === Ve && !tt[o]) {
|
|
664
|
+
return false;
|
|
665
|
+
}
|
|
666
|
+
// We disallow tags that are specific for MathML
|
|
667
|
+
// or SVG and should never appear in HTML namespace
|
|
668
|
+
return !pt[n] && (ot[n] || !ft[n]);
|
|
669
|
+
}
|
|
670
|
+
// For XHTML and XML documents that support custom namespaces
|
|
671
|
+
if (it === "application/xhtml+xml" && Ze[e.namespaceURI]) {
|
|
672
|
+
return true;
|
|
673
|
+
}
|
|
674
|
+
// The code should never reach this place (this means
|
|
675
|
+
// that the element somehow got namespace that is not
|
|
676
|
+
// HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
|
|
677
|
+
// Return false just in case.
|
|
678
|
+
return false;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* _forceRemove
|
|
682
|
+
*
|
|
683
|
+
* @param node a DOM node
|
|
684
|
+
*/ const mt = function _forceRemove(e) {
|
|
685
|
+
p(DOMPurify.removed, {
|
|
686
|
+
element: e
|
|
687
|
+
});
|
|
688
|
+
try {
|
|
689
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
|
690
|
+
Z(e).removeChild(e);
|
|
691
|
+
} catch (t) {
|
|
692
|
+
K(e);
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
/**
|
|
696
|
+
* _removeAttribute
|
|
697
|
+
*
|
|
698
|
+
* @param name an Attribute name
|
|
699
|
+
* @param element a DOM node
|
|
700
|
+
*/ const gt = function _removeAttribute(e, t) {
|
|
701
|
+
try {
|
|
702
|
+
p(DOMPurify.removed, {
|
|
703
|
+
attribute: t.getAttributeNode(e),
|
|
704
|
+
from: t
|
|
705
|
+
});
|
|
706
|
+
} catch (e) {
|
|
707
|
+
p(DOMPurify.removed, {
|
|
708
|
+
attribute: null,
|
|
709
|
+
from: t
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
t.removeAttribute(e);
|
|
713
|
+
// We void attribute values for unremovable "is" attributes
|
|
714
|
+
if (e === "is") {
|
|
715
|
+
if (Le || Ce) {
|
|
716
|
+
try {
|
|
717
|
+
mt(t);
|
|
718
|
+
} catch (e) {}
|
|
719
|
+
} else {
|
|
720
|
+
try {
|
|
721
|
+
t.setAttribute(e, "");
|
|
722
|
+
} catch (e) {}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
/**
|
|
727
|
+
* _initDocument
|
|
728
|
+
*
|
|
729
|
+
* @param dirty - a string of dirty markup
|
|
730
|
+
* @return a DOM, filled with the dirty markup
|
|
731
|
+
*/ const bt = function _initDocument(e) {
|
|
732
|
+
/* Create a HTML document */
|
|
733
|
+
let t = null;
|
|
734
|
+
let o = null;
|
|
735
|
+
if (De) {
|
|
736
|
+
e = "<remove></remove>" + e;
|
|
737
|
+
} else {
|
|
738
|
+
/* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
|
|
739
|
+
const t = b(e, /^[\r\n\t ]+/);
|
|
740
|
+
o = t && t[0];
|
|
741
|
+
}
|
|
742
|
+
if (it === "application/xhtml+xml" && Je === Ke) {
|
|
743
|
+
// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
|
|
744
|
+
e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>";
|
|
745
|
+
}
|
|
746
|
+
const i = ee ? ee.createHTML(e) : e;
|
|
747
|
+
/*
|
|
748
|
+
* Use the DOMParser API by default, fallback later if needs be
|
|
749
|
+
* DOMParser not work for svg when has multiple root element.
|
|
750
|
+
*/ if (Je === Ke) {
|
|
751
|
+
try {
|
|
752
|
+
t = (new F).parseFromString(i, it);
|
|
753
|
+
} catch (e) {}
|
|
754
|
+
}
|
|
755
|
+
/* Use createHTMLDocument in case DOMParser is not available */ if (!t || !t.documentElement) {
|
|
756
|
+
t = ne.createDocument(Je, "template", null);
|
|
757
|
+
try {
|
|
758
|
+
t.documentElement.innerHTML = Qe ? te : i;
|
|
759
|
+
} catch (e) {
|
|
760
|
+
// Syntax error if dirtyPayload is invalid xml
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
const a = t.body || t.documentElement;
|
|
764
|
+
if (e && o) {
|
|
765
|
+
a.insertBefore(n.createTextNode(o), a.childNodes[0] || null);
|
|
766
|
+
}
|
|
767
|
+
/* Work on whole document or just its body */ if (Je === Ke) {
|
|
768
|
+
return ae.call(t, Oe ? "html" : "body")[0];
|
|
769
|
+
}
|
|
770
|
+
return Oe ? t.documentElement : a;
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
|
|
774
|
+
*
|
|
775
|
+
* @param root The root element or node to start traversing on.
|
|
776
|
+
* @return The created NodeIterator
|
|
777
|
+
*/ const yt = function _createNodeIterator(e) {
|
|
778
|
+
return oe.call(e.ownerDocument || e, e,
|
|
779
|
+
// eslint-disable-next-line no-bitwise
|
|
780
|
+
I.SHOW_ELEMENT | I.SHOW_COMMENT | I.SHOW_TEXT | I.SHOW_PROCESSING_INSTRUCTION | I.SHOW_CDATA_SECTION, null);
|
|
781
|
+
};
|
|
782
|
+
/**
|
|
783
|
+
* _isClobbered
|
|
784
|
+
*
|
|
785
|
+
* @param element element to check for clobbering attacks
|
|
786
|
+
* @return true if clobbered, false if safe
|
|
787
|
+
*/ const vt = function _isClobbered(e) {
|
|
788
|
+
return e instanceof H && (typeof e.nodeName !== "string" || typeof e.textContent !== "string" || typeof e.removeChild !== "function" || !(e.attributes instanceof N) || typeof e.removeAttribute !== "function" || typeof e.setAttribute !== "function" || typeof e.namespaceURI !== "string" || typeof e.insertBefore !== "function" || typeof e.hasChildNodes !== "function");
|
|
789
|
+
};
|
|
790
|
+
/**
|
|
791
|
+
* Checks whether the given object is a DOM node.
|
|
792
|
+
*
|
|
793
|
+
* @param value object to check whether it's a DOM node
|
|
794
|
+
* @return true is object is a DOM node
|
|
795
|
+
*/ const xt = function _isNode(e) {
|
|
796
|
+
return typeof c === "function" && e instanceof c;
|
|
797
|
+
};
|
|
798
|
+
function _executeHooks(e, t, n) {
|
|
799
|
+
d(e, (e => {
|
|
800
|
+
e.call(DOMPurify, t, n, lt);
|
|
801
|
+
}));
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* _sanitizeElements
|
|
805
|
+
*
|
|
806
|
+
* @protect nodeName
|
|
807
|
+
* @protect textContent
|
|
808
|
+
* @protect removeChild
|
|
809
|
+
* @param currentNode to check for permission to exist
|
|
810
|
+
* @return true if node was killed, false if left alive
|
|
811
|
+
*/ const wt = function _sanitizeElements(e) {
|
|
812
|
+
let t = null;
|
|
813
|
+
/* Execute a hook if present */ _executeHooks(se.beforeSanitizeElements, e, null);
|
|
814
|
+
/* Check if element is clobbered or can clobber */ if (vt(e)) {
|
|
815
|
+
mt(e);
|
|
816
|
+
return true;
|
|
817
|
+
}
|
|
818
|
+
/* Now let's check the element's type and name */ const n = st(e.nodeName);
|
|
819
|
+
/* Execute a hook if present */ _executeHooks(se.uponSanitizeElement, e, {
|
|
820
|
+
tagName: n,
|
|
821
|
+
allowedTags: be
|
|
822
|
+
});
|
|
823
|
+
/* Detect mXSS attempts abusing namespace confusion */ if (e.hasChildNodes() && !xt(e.firstElementChild) && k(/<[/\w]/g, e.innerHTML) && k(/<[/\w]/g, e.textContent)) {
|
|
824
|
+
mt(e);
|
|
825
|
+
return true;
|
|
826
|
+
}
|
|
827
|
+
/* Remove any occurrence of processing instructions */ if (e.nodeType === Y.progressingInstruction) {
|
|
828
|
+
mt(e);
|
|
829
|
+
return true;
|
|
830
|
+
}
|
|
831
|
+
/* Remove any kind of possibly harmful comments */ if (Re && e.nodeType === Y.comment && k(/<[/\w]/g, e.data)) {
|
|
832
|
+
mt(e);
|
|
833
|
+
return true;
|
|
834
|
+
}
|
|
835
|
+
/* Remove element if anything forbids its presence */ if (!be[n] || ke[n]) {
|
|
836
|
+
/* Check if we have a custom element to handle */
|
|
837
|
+
if (!ke[n] && Tt(n)) {
|
|
838
|
+
if (we.tagNameCheck instanceof RegExp && k(we.tagNameCheck, n)) {
|
|
839
|
+
return false;
|
|
840
|
+
}
|
|
841
|
+
if (we.tagNameCheck instanceof Function && we.tagNameCheck(n)) {
|
|
842
|
+
return false;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
/* Keep content except for bad-listed elements */ if (Fe && !qe[n]) {
|
|
846
|
+
const t = Z(e) || e.parentNode;
|
|
847
|
+
const n = Q(e) || e.childNodes;
|
|
848
|
+
if (n && t) {
|
|
849
|
+
const o = n.length;
|
|
850
|
+
for (let i = o - 1; i >= 0; --i) {
|
|
851
|
+
const o = G(n[i], true);
|
|
852
|
+
o.__removalCount = (e.__removalCount || 0) + 1;
|
|
853
|
+
t.insertBefore(o, J(e));
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
mt(e);
|
|
858
|
+
return true;
|
|
859
|
+
}
|
|
860
|
+
/* Check whether element has a valid namespace */ if (e instanceof P && !ht(e)) {
|
|
861
|
+
mt(e);
|
|
862
|
+
return true;
|
|
863
|
+
}
|
|
864
|
+
/* Make sure that older browsers don't get fallback-tag mXSS */ if ((n === "noscript" || n === "noembed" || n === "noframes") && k(/<\/no(script|embed|frames)/i, e.innerHTML)) {
|
|
865
|
+
mt(e);
|
|
866
|
+
return true;
|
|
867
|
+
}
|
|
868
|
+
/* Sanitize element content to be template-safe */ if (ze && e.nodeType === Y.text) {
|
|
869
|
+
/* Get the element's text content */
|
|
870
|
+
t = e.textContent;
|
|
871
|
+
d([ le, ce, de ], (e => {
|
|
872
|
+
t = y(t, e, " ");
|
|
873
|
+
}));
|
|
874
|
+
if (e.textContent !== t) {
|
|
875
|
+
p(DOMPurify.removed, {
|
|
876
|
+
element: e.cloneNode()
|
|
877
|
+
});
|
|
878
|
+
e.textContent = t;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
/* Execute a hook if present */ _executeHooks(se.afterSanitizeElements, e, null);
|
|
882
|
+
return false;
|
|
883
|
+
};
|
|
884
|
+
/**
|
|
885
|
+
* _isValidAttribute
|
|
886
|
+
*
|
|
887
|
+
* @param lcTag Lowercase tag name of containing element.
|
|
888
|
+
* @param lcName Lowercase attribute name.
|
|
889
|
+
* @param value Attribute value.
|
|
890
|
+
* @return Returns true if `value` is valid, otherwise false.
|
|
891
|
+
*/
|
|
892
|
+
// eslint-disable-next-line complexity
|
|
893
|
+
const kt = function _isValidAttribute(e, t, o) {
|
|
894
|
+
/* Make sure attribute cannot clobber */
|
|
895
|
+
if (Ie && (t === "id" || t === "name") && (o in n || o in ct)) {
|
|
896
|
+
return false;
|
|
897
|
+
}
|
|
898
|
+
/* Allow valid data-* attributes: At least one character after "-"
|
|
899
|
+
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
|
900
|
+
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
|
901
|
+
We don't need to check the value; it's always URI safe. */ if (_e && !Te[t] && k(ue, t)) ; else if (Se && k(fe, t)) ; else if (!ve[t] || Te[t]) {
|
|
902
|
+
if (
|
|
903
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
904
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
905
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
906
|
+
Tt(e) && (we.tagNameCheck instanceof RegExp && k(we.tagNameCheck, e) || we.tagNameCheck instanceof Function && we.tagNameCheck(e)) && (we.attributeNameCheck instanceof RegExp && k(we.attributeNameCheck, t) || we.attributeNameCheck instanceof Function && we.attributeNameCheck(t)) ||
|
|
907
|
+
// Alternative, second condition checks if it's an `is`-attribute, AND
|
|
908
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
909
|
+
t === "is" && we.allowCustomizedBuiltInElements && (we.tagNameCheck instanceof RegExp && k(we.tagNameCheck, o) || we.tagNameCheck instanceof Function && we.tagNameCheck(o))) ; else {
|
|
910
|
+
return false;
|
|
911
|
+
}
|
|
912
|
+
/* Check value is safe. First, is attr inert? If so, is safe */ } else if (Ye[t]) ; else if (k(ge, y(o, he, ""))) ; else if ((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && v(o, "data:") === 0 && Ge[e]) ; else if (Ae && !k(pe, y(o, he, ""))) ; else if (o) {
|
|
913
|
+
return false;
|
|
914
|
+
} else ;
|
|
915
|
+
return true;
|
|
916
|
+
};
|
|
917
|
+
/**
|
|
918
|
+
* _isBasicCustomElement
|
|
919
|
+
* checks if at least one dash is included in tagName, and it's not the first char
|
|
920
|
+
* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
|
|
921
|
+
*
|
|
922
|
+
* @param tagName name of the tag of the node to sanitize
|
|
923
|
+
* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
|
|
924
|
+
*/ const Tt = function _isBasicCustomElement(e) {
|
|
925
|
+
return e !== "annotation-xml" && b(e, me);
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* _sanitizeAttributes
|
|
929
|
+
*
|
|
930
|
+
* @protect attributes
|
|
931
|
+
* @protect nodeName
|
|
932
|
+
* @protect removeAttribute
|
|
933
|
+
* @protect setAttribute
|
|
934
|
+
*
|
|
935
|
+
* @param currentNode to sanitize
|
|
936
|
+
*/ const St = function _sanitizeAttributes(e) {
|
|
937
|
+
/* Execute a hook if present */
|
|
938
|
+
_executeHooks(se.beforeSanitizeAttributes, e, null);
|
|
939
|
+
const {attributes: t} = e;
|
|
940
|
+
/* Check if we have attributes; if not we might have a text node */ if (!t || vt(e)) {
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
const n = {
|
|
944
|
+
attrName: "",
|
|
945
|
+
attrValue: "",
|
|
946
|
+
keepAttr: true,
|
|
947
|
+
allowedAttributes: ve,
|
|
948
|
+
forceKeepAttr: undefined
|
|
949
|
+
};
|
|
950
|
+
let o = t.length;
|
|
951
|
+
/* Go backwards over all attributes; safely remove bad ones */ while (o--) {
|
|
952
|
+
const i = t[o];
|
|
953
|
+
const {name: a, namespaceURI: r, value: s} = i;
|
|
954
|
+
const l = st(a);
|
|
955
|
+
let c = a === "value" ? s : x(s);
|
|
956
|
+
/* Execute a hook if present */ n.attrName = l;
|
|
957
|
+
n.attrValue = c;
|
|
958
|
+
n.keepAttr = true;
|
|
959
|
+
n.forceKeepAttr = undefined;
|
|
960
|
+
// Allows developers to see this is a property they can set
|
|
961
|
+
_executeHooks(se.uponSanitizeAttribute, e, n);
|
|
962
|
+
c = n.attrValue;
|
|
963
|
+
/* Full DOM Clobbering protection via namespace isolation,
|
|
964
|
+
* Prefix id and name attributes with `user-content-`
|
|
965
|
+
*/ if (Ne && (l === "id" || l === "name")) {
|
|
966
|
+
// Remove the attribute with this value
|
|
967
|
+
gt(a, e);
|
|
968
|
+
// Prefix the value and later re-create the attribute with the sanitized value
|
|
969
|
+
c = He + c;
|
|
970
|
+
}
|
|
971
|
+
/* Work around a security issue with comments inside attributes */ if (Re && k(/((--!?|])>)|<\/(style|title)/i, c)) {
|
|
972
|
+
gt(a, e);
|
|
973
|
+
continue;
|
|
974
|
+
}
|
|
975
|
+
/* Did the hooks approve of the attribute? */ if (n.forceKeepAttr) {
|
|
976
|
+
continue;
|
|
977
|
+
}
|
|
978
|
+
/* Remove attribute */ gt(a, e);
|
|
979
|
+
/* Did the hooks approve of the attribute? */ if (!n.keepAttr) {
|
|
980
|
+
continue;
|
|
981
|
+
}
|
|
982
|
+
/* Work around a security issue in jQuery 3.0 */ if (!Ee && k(/\/>/i, c)) {
|
|
983
|
+
gt(a, e);
|
|
984
|
+
continue;
|
|
985
|
+
}
|
|
986
|
+
/* Sanitize attribute content to be template-safe */ if (ze) {
|
|
987
|
+
d([ le, ce, de ], (e => {
|
|
988
|
+
c = y(c, e, " ");
|
|
989
|
+
}));
|
|
990
|
+
}
|
|
991
|
+
/* Is `value` valid for this attribute? */ const u = st(e.nodeName);
|
|
992
|
+
if (!kt(u, l, c)) {
|
|
993
|
+
continue;
|
|
994
|
+
}
|
|
995
|
+
/* Handle attributes that require Trusted Types */ if (ee && typeof B === "object" && typeof B.getAttributeType === "function") {
|
|
996
|
+
if (r) ; else {
|
|
997
|
+
switch (B.getAttributeType(u, l)) {
|
|
998
|
+
case "TrustedHTML":
|
|
999
|
+
{
|
|
1000
|
+
c = ee.createHTML(c);
|
|
1001
|
+
break;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
case "TrustedScriptURL":
|
|
1005
|
+
{
|
|
1006
|
+
c = ee.createScriptURL(c);
|
|
1007
|
+
break;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
/* Handle invalid data-* attribute set by try-catching it */ try {
|
|
1013
|
+
if (r) {
|
|
1014
|
+
e.setAttributeNS(r, a, c);
|
|
1015
|
+
} else {
|
|
1016
|
+
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
1017
|
+
e.setAttribute(a, c);
|
|
1018
|
+
}
|
|
1019
|
+
if (vt(e)) {
|
|
1020
|
+
mt(e);
|
|
1021
|
+
} else {
|
|
1022
|
+
f(DOMPurify.removed);
|
|
1023
|
+
}
|
|
1024
|
+
} catch (e) {}
|
|
1025
|
+
}
|
|
1026
|
+
/* Execute a hook if present */ _executeHooks(se.afterSanitizeAttributes, e, null);
|
|
1027
|
+
};
|
|
1028
|
+
/**
|
|
1029
|
+
* _sanitizeShadowDOM
|
|
1030
|
+
*
|
|
1031
|
+
* @param fragment to iterate over recursively
|
|
1032
|
+
*/ const _t = function _sanitizeShadowDOM(e) {
|
|
1033
|
+
let t = null;
|
|
1034
|
+
const n = yt(e);
|
|
1035
|
+
/* Execute a hook if present */ _executeHooks(se.beforeSanitizeShadowDOM, e, null);
|
|
1036
|
+
while (t = n.nextNode()) {
|
|
1037
|
+
/* Execute a hook if present */
|
|
1038
|
+
_executeHooks(se.uponSanitizeShadowNode, t, null);
|
|
1039
|
+
/* Sanitize tags and elements */ wt(t);
|
|
1040
|
+
/* Check attributes next */ St(t);
|
|
1041
|
+
/* Deep shadow DOM detected */ if (t.content instanceof r) {
|
|
1042
|
+
_sanitizeShadowDOM(t.content);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
/* Execute a hook if present */ _executeHooks(se.afterSanitizeShadowDOM, e, null);
|
|
1046
|
+
};
|
|
1047
|
+
// eslint-disable-next-line complexity
|
|
1048
|
+
DOMPurify.sanitize = function(e) {
|
|
1049
|
+
let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1050
|
+
let n = null;
|
|
1051
|
+
let i = null;
|
|
1052
|
+
let a = null;
|
|
1053
|
+
let s = null;
|
|
1054
|
+
/* Make sure we have a string to sanitize.
|
|
1055
|
+
DO NOT return early, as this will return the wrong type if
|
|
1056
|
+
the user has requested a DOM object rather than a string */ Qe = !e;
|
|
1057
|
+
if (Qe) {
|
|
1058
|
+
e = "\x3c!--\x3e";
|
|
1059
|
+
}
|
|
1060
|
+
/* Stringify, in case dirty is an object */ if (typeof e !== "string" && !xt(e)) {
|
|
1061
|
+
if (typeof e.toString === "function") {
|
|
1062
|
+
e = e.toString();
|
|
1063
|
+
if (typeof e !== "string") {
|
|
1064
|
+
throw T("dirty is not a string, aborting");
|
|
1065
|
+
}
|
|
1066
|
+
} else {
|
|
1067
|
+
throw T("toString is not a function");
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
/* Return dirty HTML if DOMPurify cannot run */ if (!DOMPurify.isSupported) {
|
|
1071
|
+
return e;
|
|
1072
|
+
}
|
|
1073
|
+
/* Assign config vars */ if (!Me) {
|
|
1074
|
+
ut(t);
|
|
1075
|
+
}
|
|
1076
|
+
/* Clean up removed elements */ DOMPurify.removed = [];
|
|
1077
|
+
/* Check if dirty is correctly typed for IN_PLACE */ if (typeof e === "string") {
|
|
1078
|
+
je = false;
|
|
1079
|
+
}
|
|
1080
|
+
if (je) {
|
|
1081
|
+
/* Do some early pre-sanitization to avoid unsafe root nodes */
|
|
1082
|
+
if (e.nodeName) {
|
|
1083
|
+
const t = st(e.nodeName);
|
|
1084
|
+
if (!be[t] || ke[t]) {
|
|
1085
|
+
throw T("root node is forbidden and cannot be sanitized in-place");
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
} else if (e instanceof c) {
|
|
1089
|
+
/* If dirty is a DOM element, append to an empty document to avoid
|
|
1090
|
+
elements being stripped by the parser */
|
|
1091
|
+
n = bt("\x3c!----\x3e");
|
|
1092
|
+
i = n.ownerDocument.importNode(e, true);
|
|
1093
|
+
if (i.nodeType === Y.element && i.nodeName === "BODY") {
|
|
1094
|
+
/* Node is already a body, use as is */
|
|
1095
|
+
n = i;
|
|
1096
|
+
} else if (i.nodeName === "HTML") {
|
|
1097
|
+
n = i;
|
|
1098
|
+
} else {
|
|
1099
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
|
1100
|
+
n.appendChild(i);
|
|
1101
|
+
}
|
|
1102
|
+
} else {
|
|
1103
|
+
/* Exit directly if we have nothing to do */
|
|
1104
|
+
if (!Le && !ze && !Oe &&
|
|
1105
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
|
1106
|
+
e.indexOf("<") === -1) {
|
|
1107
|
+
return ee && Pe ? ee.createHTML(e) : e;
|
|
1108
|
+
}
|
|
1109
|
+
/* Initialize the document to work on */ n = bt(e);
|
|
1110
|
+
/* Check we have a DOM node from the data */ if (!n) {
|
|
1111
|
+
return Le ? null : Pe ? te : "";
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
/* Remove first element node (ours) if FORCE_BODY is set */ if (n && De) {
|
|
1115
|
+
mt(n.firstChild);
|
|
1116
|
+
}
|
|
1117
|
+
/* Get node iterator */ const l = yt(je ? e : n);
|
|
1118
|
+
/* Now start iterating over the created document */ while (a = l.nextNode()) {
|
|
1119
|
+
/* Sanitize tags and elements */
|
|
1120
|
+
wt(a);
|
|
1121
|
+
/* Check attributes next */ St(a);
|
|
1122
|
+
/* Shadow DOM detected, sanitize it */ if (a.content instanceof r) {
|
|
1123
|
+
_t(a.content);
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
/* If we sanitized `dirty` in-place, return it. */ if (je) {
|
|
1127
|
+
return e;
|
|
1128
|
+
}
|
|
1129
|
+
/* Return sanitized string or DOM */ if (Le) {
|
|
1130
|
+
if (Ce) {
|
|
1131
|
+
s = ie.call(n.ownerDocument);
|
|
1132
|
+
while (n.firstChild) {
|
|
1133
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
|
1134
|
+
s.appendChild(n.firstChild);
|
|
1135
|
+
}
|
|
1136
|
+
} else {
|
|
1137
|
+
s = n;
|
|
1138
|
+
}
|
|
1139
|
+
if (ve.shadowroot || ve.shadowrootmode) {
|
|
1140
|
+
/*
|
|
1141
|
+
AdoptNode() is not used because internal state is not reset
|
|
1142
|
+
(e.g. the past names map of a HTMLFormElement), this is safe
|
|
1143
|
+
in theory but we would rather not risk another attack vector.
|
|
1144
|
+
The state that is cloned by importNode() is explicitly defined
|
|
1145
|
+
by the specs.
|
|
1146
|
+
*/
|
|
1147
|
+
s = re.call(o, s, true);
|
|
1148
|
+
}
|
|
1149
|
+
return s;
|
|
1150
|
+
}
|
|
1151
|
+
let u = Oe ? n.outerHTML : n.innerHTML;
|
|
1152
|
+
/* Serialize doctype if allowed */ if (Oe && be["!doctype"] && n.ownerDocument && n.ownerDocument.doctype && n.ownerDocument.doctype.name && k(U, n.ownerDocument.doctype.name)) {
|
|
1153
|
+
u = "<!DOCTYPE " + n.ownerDocument.doctype.name + ">\n" + u;
|
|
1154
|
+
}
|
|
1155
|
+
/* Sanitize final string template-safe */ if (ze) {
|
|
1156
|
+
d([ le, ce, de ], (e => {
|
|
1157
|
+
u = y(u, e, " ");
|
|
1158
|
+
}));
|
|
1159
|
+
}
|
|
1160
|
+
return ee && Pe ? ee.createHTML(u) : u;
|
|
1161
|
+
};
|
|
1162
|
+
DOMPurify.setConfig = function() {
|
|
1163
|
+
let e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1164
|
+
ut(e);
|
|
1165
|
+
Me = true;
|
|
1166
|
+
};
|
|
1167
|
+
DOMPurify.clearConfig = function() {
|
|
1168
|
+
lt = null;
|
|
1169
|
+
Me = false;
|
|
1170
|
+
};
|
|
1171
|
+
DOMPurify.isValidAttribute = function(e, t, n) {
|
|
1172
|
+
/* Initialize shared config vars if necessary. */
|
|
1173
|
+
if (!lt) {
|
|
1174
|
+
ut({});
|
|
1175
|
+
}
|
|
1176
|
+
const o = st(e);
|
|
1177
|
+
const i = st(t);
|
|
1178
|
+
return kt(o, i, n);
|
|
1179
|
+
};
|
|
1180
|
+
DOMPurify.addHook = function(e, t) {
|
|
1181
|
+
if (typeof t !== "function") {
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
p(se[e], t);
|
|
1185
|
+
};
|
|
1186
|
+
DOMPurify.removeHook = function(e, t) {
|
|
1187
|
+
if (t !== undefined) {
|
|
1188
|
+
const n = u(se[e], t);
|
|
1189
|
+
return n === -1 ? undefined : h(se[e], n, 1)[0];
|
|
1190
|
+
}
|
|
1191
|
+
return f(se[e]);
|
|
1192
|
+
};
|
|
1193
|
+
DOMPurify.removeHooks = function(e) {
|
|
1194
|
+
se[e] = [];
|
|
1195
|
+
};
|
|
1196
|
+
DOMPurify.removeAllHooks = function() {
|
|
1197
|
+
se = X();
|
|
1198
|
+
};
|
|
1199
|
+
return DOMPurify;
|
|
1200
|
+
}
|
|
1201
|
+
var K = createDOMPurify();
|
|
1202
|
+
return K;
|
|
1203
|
+
}));
|
|
1204
|
+
})(l);
|
|
1205
|
+
|
|
1206
|
+
const c = l.exports;
|
|
1207
|
+
|
|
1208
|
+
function sanitizeHTMLString(e) {
|
|
1209
|
+
return c(window).sanitize(e, {
|
|
1210
|
+
FORBID_TAGS: [ "style" ],
|
|
1211
|
+
CUSTOM_ELEMENT_HANDLING: {
|
|
1212
|
+
tagNameCheck: /^q2-/
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
const d = '*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}@keyframes showBackdrop{from{opacity:0}}@keyframes hideBackdrop{to{opacity:0}}dialog{--comp-border-radius-default:var(--app-scale-3x, 15px) var(--app-scale-3x, 15px) 0 0;--comp-border-radius:var(--tct-action-sheet-border-radius, var(--comp-border-radius-default));--comp-desktop-border-radius:var(--tct-action-sheet-border-radius, var(--app-scale-3x, 15px));--comp-close-button-size:var(--tct-action-sheet-close-button-size, var(--t-a11y-min-size, 44px));--comp-header-height:var(--tct-action-sheet-header-height, var(--t-a11y-min-size, 44px));--comp-dialog-background:var(--tct-action-sheet-background, var(--t-base, #ffffff));--comp-dialog-color:var(--tct-action-sheet-color, var(--t-text, #4d4d4d));--comp-dialog-padding:var(--tct-action-sheet-padding, var(--app-scale-3x, 15px));--comp-content-gradient-height:var(--tct-action-sheet-content-gradient-height, var(--app-scale-2x, 10px));--comp-dialog-gap:var(--tct-action-sheet-gap, var(--app-scale-2x, 10px));--comp-dialog-max-width:var(--tct-action-sheet-max-width, 400px);--comp-dialog-max-height:var(--tct-action-sheet-max-height, var(--comp-action-sheet-computed-max-height, 75vh));--comp-dialog-min-height:var(--tct-action-sheet-min-height, var(--comp-action-sheet-computed-min-height, 20vh));--comp-dialog-box-shadow:var(--tct-action-sheet-box-shadow, var(--app-shadow-2, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 4px 8px rgba(0, 0, 0, 0.14)));position:fixed;top:100%;bottom:unset;color:var(--comp-dialog-color);background:var(--comp-dialog-background);transition:transform var(--tct-action-sheet-tween, var(--app-tween-2, 0.4s ease)), opacity var(--tct-action-sheet-tween, var(--app-tween-2, 0.4s ease));width:100%;max-width:var(--comp-dialog-max-width);border:0;border-radius:var(--comp-border-radius);box-shadow:var(--comp-dialog-box-shadow);padding:0;height:auto;overflow:hidden;min-height:var(--comp-dialog-min-height);max-height:var(--comp-dialog-max-height)}dialog::backdrop{opacity:0;background:var(--tct-action-sheet-backdrop-background, var(--t-top-a2, rgba(13, 13, 13, 0.6)))}dialog[open].is-opening,dialog[open].is-open{transform:translateY(-100%)}@media screen and (min-width: 1200px){dialog[open].is-opening,dialog[open].is-open{opacity:1;transform:translateY(0)}}dialog[open].is-opening::backdrop,dialog[open].is-open::backdrop{opacity:1;animation:showBackdrop var(--tct-action-sheet-tween, var(--app-tween-2, 0.4s ease))}dialog[open].is-closing{transform:translateY(10%)}dialog[open].is-closing::backdrop{animation:hideBackdrop var(--tct-action-sheet-tween, var(--app-tween-2, 0.4s ease))}@media screen and (min-width: 1200px){dialog{border-radius:var(--comp-desktop-border-radius);top:0px;bottom:0px;height:fit-content;transform:translateY(10%);opacity:0}}.content{overflow-y:auto;--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.content::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.content::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.content::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.interior{display:grid;grid-template-rows:44px 1fr auto;gap:var(--comp-dialog-gap);max-height:calc(var(--comp-dialog-max-height) - var(--comp-dialog-padding));padding:var(--comp-dialog-padding)}.interior.is-list header,.interior.is-list footer{position:relative}.interior.is-list header:before,.interior.is-list footer:before{content:"";display:block;position:absolute;left:0;height:var(--comp-content-gradient-height);width:100%;z-index:1}header{display:grid;grid-template-columns:var(--comp-close-button-size) 1fr var(--comp-close-button-size);grid-template-areas:". title close";gap:var(--comp-dialog-gap)}header .title{grid-area:title;text-align:center;line-height:var(--comp-header-height)}header .btn-close{grid-area:close;width:var(--comp-close-button-size);height:var(--comp-close-button-size)}footer{display:flex;justify-content:end}';
|
|
1218
|
+
|
|
1219
|
+
const u = d;
|
|
1220
|
+
|
|
1221
|
+
var f = undefined && undefined.__rest || function(e, t) {
|
|
1222
|
+
var n = {};
|
|
1223
|
+
for (var o in e) if (Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0) n[o] = e[o];
|
|
1224
|
+
if (e != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++) {
|
|
1225
|
+
if (t.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i])) n[o[i]] = e[o[i]];
|
|
1226
|
+
}
|
|
1227
|
+
return n;
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
const p = class {
|
|
1231
|
+
constructor(i) {
|
|
1232
|
+
e(this, i);
|
|
1233
|
+
this.close = t(this, "close", 7);
|
|
1234
|
+
this.ready = t(this, "ready", 3);
|
|
1235
|
+
this.initialSelectedOptions = [];
|
|
1236
|
+
this.maxHeight = .75;
|
|
1237
|
+
this.minHeight = .2;
|
|
1238
|
+
this.selectedOptions = {
|
|
1239
|
+
values: [],
|
|
1240
|
+
value: ""
|
|
1241
|
+
};
|
|
1242
|
+
this.generateOptgroup = e => {
|
|
1243
|
+
const t = document.createElement("q2-optgroup");
|
|
1244
|
+
if (e.label) t.setAttribute("label", e.label);
|
|
1245
|
+
if (e.disabled) t.setAttribute("disabled", "");
|
|
1246
|
+
if (!!e.options.length) e.options.forEach((e => t.appendChild(this.generateOption(e))));
|
|
1247
|
+
return t;
|
|
1248
|
+
};
|
|
1249
|
+
this.generateOption = e => {
|
|
1250
|
+
const t = document.createElement("q2-option");
|
|
1251
|
+
const {innerHTML: n} = e, o = f(e, [ "innerHTML" ]);
|
|
1252
|
+
if (n) t.innerHTML = sanitizeHTMLString(n);
|
|
1253
|
+
Object.entries(o).forEach((([e, n]) => {
|
|
1254
|
+
if (n === undefined) return;
|
|
1255
|
+
if (typeof n === "boolean") {
|
|
1256
|
+
if (n) t.setAttribute(e, "");
|
|
1257
|
+
} else {
|
|
1258
|
+
t.setAttribute(e, n);
|
|
1259
|
+
}
|
|
1260
|
+
}));
|
|
1261
|
+
return t;
|
|
1262
|
+
};
|
|
1263
|
+
this.onCancel = e => {
|
|
1264
|
+
var t, n;
|
|
1265
|
+
e.preventDefault();
|
|
1266
|
+
const {initialSelectedOptions: o} = this;
|
|
1267
|
+
this.hide({
|
|
1268
|
+
value: (n = (t = o === null || o === void 0 ? void 0 : o[0]) === null || t === void 0 ? void 0 : t.value) !== null && n !== void 0 ? n : "",
|
|
1269
|
+
values: o,
|
|
1270
|
+
type: "cancel"
|
|
1271
|
+
});
|
|
1272
|
+
};
|
|
1273
|
+
this.onClick = e => {
|
|
1274
|
+
const t = e.target;
|
|
1275
|
+
if (!(t instanceof HTMLElement)) return;
|
|
1276
|
+
const n = !!t.closest(".interior, q2-action-sheet");
|
|
1277
|
+
if (n) return;
|
|
1278
|
+
this.onCancel(e);
|
|
1279
|
+
};
|
|
1280
|
+
this.onListChange = e => {
|
|
1281
|
+
this.selectedOptions = e.detail;
|
|
1282
|
+
};
|
|
1283
|
+
this.onListDone = () => {
|
|
1284
|
+
this.hide(Object.assign(Object.assign({}, this.selectedOptions), {
|
|
1285
|
+
type: "confirm"
|
|
1286
|
+
}));
|
|
1287
|
+
};
|
|
1288
|
+
this.onListPopoverStateChange = e => {
|
|
1289
|
+
if (e.detail.open) return;
|
|
1290
|
+
if (e.detail.action === "close") {
|
|
1291
|
+
this.onCancel(e);
|
|
1292
|
+
} else {
|
|
1293
|
+
this.onListDone();
|
|
1294
|
+
}
|
|
1295
|
+
};
|
|
1296
|
+
// #endregion
|
|
1297
|
+
// #region Render Methods
|
|
1298
|
+
this.renderList = ({data: e}) => {
|
|
1299
|
+
const {listProps: t} = e;
|
|
1300
|
+
return n(o, null, n("div", {
|
|
1301
|
+
class: "content",
|
|
1302
|
+
ref: e => this.contentElement = e
|
|
1303
|
+
}, n("q2-option-list", {
|
|
1304
|
+
ref: e => this.optionListElement = e,
|
|
1305
|
+
multiple: t.multiple,
|
|
1306
|
+
noSelect: t.noSelect,
|
|
1307
|
+
onChange: this.onListChange,
|
|
1308
|
+
onPopoverState: this.onListPopoverStateChange,
|
|
1309
|
+
selectedOptions: t.selectedOptions
|
|
1310
|
+
}, n("slot", null))), n("footer", null, t.multiple && n("q2-btn", {
|
|
1311
|
+
"test-id": "btnDone",
|
|
1312
|
+
intent: "workflow-primary",
|
|
1313
|
+
onClick: this.onListDone
|
|
1314
|
+
}, a("tecton.element.actionSheet.done"))));
|
|
1315
|
+
};
|
|
1316
|
+
this.renderMessage = ({data: e}) => n("q2-message", {
|
|
1317
|
+
type: e.type
|
|
1318
|
+
}, e.title && n("h2", null, e.title), e.description && n("p", null, e.description));
|
|
1319
|
+
this.renderSlot = () => n("div", {
|
|
1320
|
+
class: "content",
|
|
1321
|
+
ref: e => this.contentElement = e
|
|
1322
|
+
}, n("slot", null));
|
|
1323
|
+
this.isScrollable = false;
|
|
1324
|
+
this.renderStatus = "is-closing";
|
|
1325
|
+
this.data = undefined;
|
|
1326
|
+
this.hideClose = undefined;
|
|
1327
|
+
this.title = undefined;
|
|
1328
|
+
}
|
|
1329
|
+
// #endregion
|
|
1330
|
+
// #region Component Lifecycle Events
|
|
1331
|
+
disconnectedCallback() {
|
|
1332
|
+
this.dialogElement.removeEventListener("cancel", this.onCancel);
|
|
1333
|
+
}
|
|
1334
|
+
componentDidLoad() {
|
|
1335
|
+
this.dialogElement.addEventListener("cancel", this.onCancel);
|
|
1336
|
+
this.ready.emit();
|
|
1337
|
+
}
|
|
1338
|
+
// #endregion
|
|
1339
|
+
// #region Public Methods API
|
|
1340
|
+
async hide(e = {
|
|
1341
|
+
value: "",
|
|
1342
|
+
values: [],
|
|
1343
|
+
type: "confirm"
|
|
1344
|
+
}) {
|
|
1345
|
+
this.close.emit(e);
|
|
1346
|
+
this.renderStatus = "is-closing";
|
|
1347
|
+
this.dialogElement.addEventListener("transitionend", (() => {
|
|
1348
|
+
if (this.renderStatus !== "is-closing") return;
|
|
1349
|
+
this.dialogElement.close();
|
|
1350
|
+
this.renderStatus = null;
|
|
1351
|
+
this.data = undefined;
|
|
1352
|
+
this.initialSelectedOptions = [];
|
|
1353
|
+
this.selectedOptions = {
|
|
1354
|
+
values: [],
|
|
1355
|
+
value: ""
|
|
1356
|
+
};
|
|
1357
|
+
this.hidePostHook();
|
|
1358
|
+
}), {
|
|
1359
|
+
once: true
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
async show() {
|
|
1363
|
+
this.showPreHook();
|
|
1364
|
+
await r();
|
|
1365
|
+
this.updateDialogMinMaxHeight();
|
|
1366
|
+
this.storeInitialValues();
|
|
1367
|
+
if (this.dialogElement.open) return;
|
|
1368
|
+
this.dialogElement.showModal();
|
|
1369
|
+
this.renderStatus = "is-opening";
|
|
1370
|
+
this.dialogElement.addEventListener("transitionend", (() => {
|
|
1371
|
+
if (this.renderStatus !== "is-opening") return;
|
|
1372
|
+
this.renderStatus = "is-open";
|
|
1373
|
+
this.focusContent();
|
|
1374
|
+
}), {
|
|
1375
|
+
once: true
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
// #endregion
|
|
1379
|
+
// #region Local Methods
|
|
1380
|
+
focusContent() {
|
|
1381
|
+
const {data: e} = this;
|
|
1382
|
+
if (!e) return;
|
|
1383
|
+
if (e.appearance === "list") {
|
|
1384
|
+
const {event: t} = e;
|
|
1385
|
+
if (t instanceof KeyboardEvent) {
|
|
1386
|
+
this.optionListElement.handleExternalKeydown(t);
|
|
1387
|
+
} else {
|
|
1388
|
+
this.optionListElement.focus();
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
hidePostHook() {
|
|
1393
|
+
const {data: e} = this;
|
|
1394
|
+
if (!e) return;
|
|
1395
|
+
if (e.appearance === "list") {
|
|
1396
|
+
this.hostElement.innerHTML = null;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
showPreHook() {
|
|
1400
|
+
const {data: e} = this;
|
|
1401
|
+
if (!e) return;
|
|
1402
|
+
if (e.appearance === "list") {
|
|
1403
|
+
this.hostElement.innerHTML = null;
|
|
1404
|
+
e.options.forEach((e => {
|
|
1405
|
+
this.hostElement.appendChild("options" in e ? this.generateOptgroup(e) : this.generateOption(e));
|
|
1406
|
+
}));
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
storeInitialValues() {
|
|
1410
|
+
const {data: e} = this;
|
|
1411
|
+
if (!e) return;
|
|
1412
|
+
if (e.appearance === "list") {
|
|
1413
|
+
this.initialSelectedOptions = e.listProps.selectedOptions;
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
updateDialogMinMaxHeight() {
|
|
1417
|
+
const e = window.innerHeight;
|
|
1418
|
+
this.dialogElement.style.setProperty("--comp-action-sheet-computed-min-height", `${Math.floor(e * this.minHeight)}px`);
|
|
1419
|
+
this.dialogElement.style.setProperty("--comp-action-sheet-computed-max-height", `${Math.floor(e * this.maxHeight)}px`);
|
|
1420
|
+
}
|
|
1421
|
+
render() {
|
|
1422
|
+
var e;
|
|
1423
|
+
const {data: t} = this;
|
|
1424
|
+
const o = (t === null || t === void 0 ? void 0 : t.title) || this.title || !this.hideClose;
|
|
1425
|
+
const i = this.renderStatus || "";
|
|
1426
|
+
let a = null;
|
|
1427
|
+
switch (t === null || t === void 0 ? void 0 : t.appearance) {
|
|
1428
|
+
case "message":
|
|
1429
|
+
a = this.renderMessage;
|
|
1430
|
+
break;
|
|
1431
|
+
|
|
1432
|
+
case "list":
|
|
1433
|
+
a = this.renderList;
|
|
1434
|
+
break;
|
|
1435
|
+
|
|
1436
|
+
default:
|
|
1437
|
+
a = this.renderSlot;
|
|
1438
|
+
break;
|
|
1439
|
+
}
|
|
1440
|
+
const r = (t === null || t === void 0 ? void 0 : t.appearance) || "slot";
|
|
1441
|
+
const s = `interior is-${r}`;
|
|
1442
|
+
return n("dialog", {
|
|
1443
|
+
key: "89438ac3af7a795d3b83a4171c74e0b1255ccb95",
|
|
1444
|
+
ref: e => this.dialogElement = e,
|
|
1445
|
+
class: i,
|
|
1446
|
+
onClick: this.onClick
|
|
1447
|
+
}, n("div", {
|
|
1448
|
+
key: "a17e57ba2693ee5dbd70ae888fde0d5df2837ccb",
|
|
1449
|
+
class: s
|
|
1450
|
+
}, o && n("header", {
|
|
1451
|
+
key: "7da7a414195ed0e3e3f8dbc1692adeabd4dee09b"
|
|
1452
|
+
}, n("div", {
|
|
1453
|
+
key: "f83976916359a1c9318086c486ab59e7f001e9ca",
|
|
1454
|
+
class: "title"
|
|
1455
|
+
}, (t === null || t === void 0 ? void 0 : t.title) || this.title), !this.hideClose && n("q2-btn", {
|
|
1456
|
+
key: "873a7f92f6103bb671594640c56786d3dcb389d8",
|
|
1457
|
+
class: "btn-close",
|
|
1458
|
+
"test-id": "btnClose",
|
|
1459
|
+
onClick: this.onCancel,
|
|
1460
|
+
label: "tecton.element.actionSheet.close",
|
|
1461
|
+
"hide-label": true
|
|
1462
|
+
}, n("q2-icon", {
|
|
1463
|
+
key: "bb5d5f0d92186171564b2fe74d7b95e98962ed9c",
|
|
1464
|
+
type: "close"
|
|
1465
|
+
}))), ((e = this.data) === null || e === void 0 ? void 0 : e.description) && n("p", {
|
|
1466
|
+
key: "2620549f6ca4b669011a4dbd2be0a470d65ee857"
|
|
1467
|
+
}, t.description), a && n(a, {
|
|
1468
|
+
key: "bf22c21f56b4551f4bf6ddbcc6385669ed02b66b",
|
|
1469
|
+
data: this.data
|
|
1470
|
+
})));
|
|
1471
|
+
}
|
|
1472
|
+
get hostElement() {
|
|
1473
|
+
return i(this);
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1476
|
+
|
|
1477
|
+
p.style = u;
|
|
1478
|
+
|
|
1479
|
+
export { p as q2_action_sheet };
|
|
1480
|
+
//# sourceMappingURL=q2-action-sheet.entry.js.map
|