@haiilo/catalyst 11.0.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js +2 -2
- package/dist/catalyst/index.esm.js.map +1 -1
- package/dist/catalyst/loader.esm.js.map +1 -0
- package/dist/catalyst/p-6a54965a.entry.js +10 -0
- package/dist/catalyst/p-6a54965a.entry.js.map +1 -0
- package/dist/catalyst/p-B-m4GNf1.js +3 -0
- package/dist/catalyst/p-B-m4GNf1.js.map +1 -0
- package/dist/catalyst/p-DQuL1Twl.js +2 -0
- package/dist/catalyst/p-DQuL1Twl.js.map +1 -0
- package/dist/catalyst/p-LJZzaWFR.js +2 -0
- package/dist/catalyst/p-LJZzaWFR.js.map +1 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +1467 -1833
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +8 -7
- package/dist/cjs/catalyst.cjs.js.map +1 -1
- package/dist/cjs/index-DNLT6JC9.js +10178 -0
- package/dist/cjs/index-DNLT6JC9.js.map +1 -0
- package/dist/cjs/{index-1094f0fc.js → index-jGQAsDy6.js} +528 -358
- package/dist/cjs/index-jGQAsDy6.js.map +1 -0
- package/dist/cjs/index.cjs.js +461 -453
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +4 -5
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/cat-alert/cat-alert.js +15 -4
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.js +33 -14
- package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.js +45 -9
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.css +4 -2
- package/dist/collection/components/cat-button/cat-button.js +107 -35
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-button-group/cat-button-group.js +3 -2
- package/dist/collection/components/cat-button-group/cat-button-group.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +83 -24
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-date/cat-date.js +114 -39
- package/dist/collection/components/cat-date/cat-date.js.map +1 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.js +69 -19
- package/dist/collection/components/cat-date-inline/cat-date-inline.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.js +130 -42
- package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +37 -12
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +129 -17
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.js +19 -4
- package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.js +15 -7
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.js +143 -51
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.js +60 -10
- package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.js +65 -18
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +21 -8
- package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +32 -7
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.js +105 -34
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +22 -5
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js +15 -4
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.js +84 -17
- package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.css +29 -12
- package/dist/collection/components/cat-tabs/cat-tabs.js +189 -8
- package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
- package/dist/collection/components/cat-tag/cat-tag.js +84 -25
- package/dist/collection/components/cat-tag/cat-tag.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +90 -32
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-time/cat-time.js +120 -39
- package/dist/collection/components/cat-time/cat-time.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +71 -22
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +49 -8
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
- package/dist/components/cat-alert.js +8 -3
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-avatar.js +1 -0
- package/dist/components/cat-avatar2.js +11 -8
- package/dist/components/cat-avatar2.js.map +1 -1
- package/dist/components/cat-badge.js +23 -3
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button-group.js +2 -3
- package/dist/components/cat-button-group.js.map +1 -1
- package/dist/components/cat-button.js +1 -0
- package/dist/components/cat-button2.js +41 -17
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-card.js +2 -2
- package/dist/components/cat-card.js.map +1 -1
- package/dist/components/cat-checkbox.js +1 -0
- package/dist/components/cat-checkbox2.js +34 -10
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-date-inline.js +1 -0
- package/dist/components/cat-date-inline2.js +29 -7
- package/dist/components/cat-date-inline2.js.map +1 -1
- package/dist/components/cat-date.js +41 -17
- package/dist/components/cat-date.js.map +1 -1
- package/dist/components/cat-datepicker-inline.js +16 -8
- package/dist/components/cat-datepicker-inline.js.map +1 -1
- package/dist/components/cat-datepicker.js +50 -20
- package/dist/components/cat-datepicker.js.map +1 -1
- package/dist/components/cat-datepicker.locale.js +110 -99
- package/dist/components/cat-datepicker.locale.js.map +1 -1
- package/dist/components/cat-dropdown.js +1 -0
- package/dist/components/cat-dropdown2.js +70 -13
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-form-group.js +12 -3
- package/dist/components/cat-form-group.js.map +1 -1
- package/dist/components/cat-form-hint.js +1 -0
- package/dist/components/cat-form-hint.js.map +1 -1
- package/dist/components/cat-i18n-registry.js +1 -0
- package/dist/components/cat-i18n-registry.js.map +1 -1
- package/dist/components/cat-icon-registry.js +22 -21
- package/dist/components/cat-icon-registry.js.map +1 -1
- package/dist/components/cat-icon.js +1 -0
- package/dist/components/cat-icon2.js +5 -5
- package/dist/components/cat-icon2.js.map +1 -1
- package/dist/components/cat-input.js +1 -0
- package/dist/components/cat-input2.js +50 -25
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-pagination.js +32 -2
- package/dist/components/cat-pagination.js.map +1 -1
- package/dist/components/cat-radio-group.js +8 -5
- package/dist/components/cat-radio-group.js.map +1 -1
- package/dist/components/cat-radio.js +28 -8
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-scrollable.js +1 -0
- package/dist/components/cat-scrollable2.js +322 -542
- package/dist/components/cat-scrollable2.js.map +1 -1
- package/dist/components/cat-select-demo.js +27 -49
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/components/cat-select.js +1 -0
- package/dist/components/cat-select2.js +135 -316
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-skeleton.js +1 -0
- package/dist/components/cat-skeleton2.js +12 -3
- package/dist/components/cat-skeleton2.js.map +1 -1
- package/dist/components/cat-spinner.js +1 -0
- package/dist/components/cat-spinner2.js +8 -3
- package/dist/components/cat-spinner2.js.map +1 -1
- package/dist/components/cat-tab.js +34 -9
- package/dist/components/cat-tab.js.map +1 -1
- package/dist/components/cat-tabs.js +140 -11
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-tag.js +35 -13
- package/dist/components/cat-tag.js.map +1 -1
- package/dist/components/cat-textarea.js +33 -16
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-time.js +44 -16
- package/dist/components/cat-time.js.map +1 -1
- package/dist/components/cat-toggle.js +28 -10
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/cat-tooltip.js +28 -3
- package/dist/components/cat-tooltip.js.map +1 -1
- package/dist/components/coerce.js +1 -0
- package/dist/components/coerce.js.map +1 -1
- package/dist/components/first-tabbable.js +1 -0
- package/dist/components/first-tabbable.js.map +1 -1
- package/dist/components/{floating-ui.dom.esm.js → floating-ui.dom.js} +3 -492
- package/dist/components/floating-ui.dom.js.map +1 -0
- package/dist/components/index.js +460 -450
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +9456 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/loglevel.js +368 -356
- package/dist/components/loglevel.js.map +1 -1
- package/dist/components/media-matcher.js +1 -0
- package/dist/components/media-matcher.js.map +1 -1
- package/dist/esm/app-globals-DQuL1Twl.js +6 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/esm/cat-alert_30.entry.js +1428 -1792
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/esm/catalyst.js +7 -5
- package/dist/esm/catalyst.js.map +1 -1
- package/dist/esm/{index-e8c0ddf2.js → index-B-m4GNf1.js} +528 -338
- package/dist/esm/index-B-m4GNf1.js.map +1 -0
- package/dist/esm/index-LJZzaWFR.js +10057 -0
- package/dist/esm/index-LJZzaWFR.js.map +1 -0
- package/dist/esm/index.js +458 -448
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +5 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +11 -1
- package/dist/types/components/cat-tab/cat-tab.d.ts +6 -0
- package/dist/types/components/cat-tabs/cat-tabs.d.ts +18 -0
- package/dist/types/components.d.ts +46 -0
- package/dist/types/stencil-public-runtime.d.ts +28 -2
- package/loader/index.d.ts +3 -0
- package/package.json +3 -3
- package/dist/catalyst/p-59e2ada2.entry.js +0 -10
- package/dist/catalyst/p-59e2ada2.entry.js.map +0 -1
- package/dist/catalyst/p-7f3bcfb9.js +0 -3
- package/dist/catalyst/p-7f3bcfb9.js.map +0 -1
- package/dist/catalyst/p-9500d6fb.js +0 -2
- package/dist/catalyst/p-9500d6fb.js.map +0 -1
- package/dist/catalyst/p-e1255160.js +0 -2
- package/dist/catalyst/p-e1255160.js.map +0 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/index-1094f0fc.js.map +0 -1
- package/dist/cjs/of-958251e4.js +0 -1549
- package/dist/cjs/of-958251e4.js.map +0 -1
- package/dist/collection/components/cat-alert/cat-alert.e2e.js +0 -11
- package/dist/collection/components/cat-alert/cat-alert.e2e.js.map +0 -1
- package/dist/collection/components/cat-alert/cat-alert.spec.js +0 -14
- package/dist/collection/components/cat-alert/cat-alert.spec.js.map +0 -1
- package/dist/collection/components/cat-avatar/cat-avatar.e2e.js +0 -10
- package/dist/collection/components/cat-avatar/cat-avatar.e2e.js.map +0 -1
- package/dist/collection/components/cat-avatar/cat-avatar.spec.js +0 -14
- package/dist/collection/components/cat-avatar/cat-avatar.spec.js.map +0 -1
- package/dist/collection/components/cat-badge/cat-badge.e2e.js +0 -10
- package/dist/collection/components/cat-badge/cat-badge.e2e.js.map +0 -1
- package/dist/collection/components/cat-badge/cat-badge.spec.js +0 -14
- package/dist/collection/components/cat-badge/cat-badge.spec.js.map +0 -1
- package/dist/collection/components/cat-button/cat-button.e2e.js +0 -10
- package/dist/collection/components/cat-button/cat-button.e2e.js.map +0 -1
- package/dist/collection/components/cat-button/cat-button.spec.js +0 -20
- package/dist/collection/components/cat-button/cat-button.spec.js.map +0 -1
- package/dist/collection/components/cat-button-group/cat-button-group.e2e.js +0 -10
- package/dist/collection/components/cat-button-group/cat-button-group.e2e.js.map +0 -1
- package/dist/collection/components/cat-button-group/cat-button-group.spec.js +0 -14
- package/dist/collection/components/cat-button-group/cat-button-group.spec.js.map +0 -1
- package/dist/collection/components/cat-card/cat-card.e2e.js +0 -10
- package/dist/collection/components/cat-card/cat-card.e2e.js.map +0 -1
- package/dist/collection/components/cat-card/cat-card.spec.js +0 -14
- package/dist/collection/components/cat-card/cat-card.spec.js.map +0 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js +0 -10
- package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js.map +0 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js +0 -14
- package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js.map +0 -1
- package/dist/collection/components/cat-date/cat-date.e2e.js +0 -11
- package/dist/collection/components/cat-date/cat-date.e2e.js.map +0 -1
- package/dist/collection/components/cat-date/cat-date.spec.js +0 -17
- package/dist/collection/components/cat-date/cat-date.spec.js.map +0 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.e2e.js +0 -11
- package/dist/collection/components/cat-date-inline/cat-date-inline.e2e.js.map +0 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js +0 -16
- package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js.map +0 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js +0 -11
- package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js.map +0 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js +0 -15
- package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js.map +0 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js +0 -11
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js.map +0 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js +0 -15
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js.map +0 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js +0 -10
- package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js.map +0 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js +0 -21
- package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js.map +0 -1
- package/dist/collection/components/cat-form-group/cat-form-group.e2e.js +0 -10
- package/dist/collection/components/cat-form-group/cat-form-group.e2e.js.map +0 -1
- package/dist/collection/components/cat-form-group/cat-form-group.spec.js +0 -14
- package/dist/collection/components/cat-form-group/cat-form-group.spec.js.map +0 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js +0 -15
- package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js.map +0 -1
- package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js +0 -7
- package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js.map +0 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.spec.js +0 -7
- package/dist/collection/components/cat-icon/cat-icon-registry.spec.js.map +0 -1
- package/dist/collection/components/cat-icon/cat-icon.e2e.js +0 -11
- package/dist/collection/components/cat-icon/cat-icon.e2e.js.map +0 -1
- package/dist/collection/components/cat-icon/cat-icon.spec.js +0 -15
- package/dist/collection/components/cat-icon/cat-icon.spec.js.map +0 -1
- package/dist/collection/components/cat-input/cat-input.e2e.js +0 -11
- package/dist/collection/components/cat-input/cat-input.e2e.js.map +0 -1
- package/dist/collection/components/cat-input/cat-input.spec.js +0 -15
- package/dist/collection/components/cat-input/cat-input.spec.js.map +0 -1
- package/dist/collection/components/cat-notification/cat-notification.spec.js +0 -7
- package/dist/collection/components/cat-notification/cat-notification.spec.js.map +0 -1
- package/dist/collection/components/cat-pagination/cat-pagination.e2e.js +0 -14
- package/dist/collection/components/cat-pagination/cat-pagination.e2e.js.map +0 -1
- package/dist/collection/components/cat-pagination/cat-pagination.spec.js +0 -15
- package/dist/collection/components/cat-pagination/cat-pagination.spec.js.map +0 -1
- package/dist/collection/components/cat-radio/cat-radio.e2e.js +0 -10
- package/dist/collection/components/cat-radio/cat-radio.e2e.js.map +0 -1
- package/dist/collection/components/cat-radio/cat-radio.spec.js +0 -14
- package/dist/collection/components/cat-radio/cat-radio.spec.js.map +0 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js +0 -10
- package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js.map +0 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js +0 -14
- package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js.map +0 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js +0 -10
- package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js.map +0 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js +0 -14
- package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js.map +0 -1
- package/dist/collection/components/cat-select/cat-select.e2e.js +0 -14
- package/dist/collection/components/cat-select/cat-select.e2e.js.map +0 -1
- package/dist/collection/components/cat-select/cat-select.spec.js +0 -15
- package/dist/collection/components/cat-select/cat-select.spec.js.map +0 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js +0 -10
- package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js.map +0 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js +0 -14
- package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js.map +0 -1
- package/dist/collection/components/cat-spinner/cat-spinner.e2e.js +0 -10
- package/dist/collection/components/cat-spinner/cat-spinner.e2e.js.map +0 -1
- package/dist/collection/components/cat-spinner/cat-spinner.spec.js +0 -18
- package/dist/collection/components/cat-spinner/cat-spinner.spec.js.map +0 -1
- package/dist/collection/components/cat-tab/cat-tab.e2e.js +0 -10
- package/dist/collection/components/cat-tab/cat-tab.e2e.js.map +0 -1
- package/dist/collection/components/cat-tab/cat-tab.spec.js +0 -14
- package/dist/collection/components/cat-tab/cat-tab.spec.js.map +0 -1
- package/dist/collection/components/cat-tabs/cat-tabs.e2e.js +0 -10
- package/dist/collection/components/cat-tabs/cat-tabs.e2e.js.map +0 -1
- package/dist/collection/components/cat-tabs/cat-tabs.spec.js +0 -14
- package/dist/collection/components/cat-tabs/cat-tabs.spec.js.map +0 -1
- package/dist/collection/components/cat-tag/cat-tag.e2e.js +0 -14
- package/dist/collection/components/cat-tag/cat-tag.e2e.js.map +0 -1
- package/dist/collection/components/cat-tag/cat-tag.spec.js +0 -23
- package/dist/collection/components/cat-tag/cat-tag.spec.js.map +0 -1
- package/dist/collection/components/cat-textarea/cat-textarea.e2e.js +0 -11
- package/dist/collection/components/cat-textarea/cat-textarea.e2e.js.map +0 -1
- package/dist/collection/components/cat-textarea/cat-textarea.spec.js +0 -15
- package/dist/collection/components/cat-textarea/cat-textarea.spec.js.map +0 -1
- package/dist/collection/components/cat-time/cat-time.e2e.js +0 -11
- package/dist/collection/components/cat-time/cat-time.e2e.js.map +0 -1
- package/dist/collection/components/cat-time/cat-time.spec.js +0 -16
- package/dist/collection/components/cat-time/cat-time.spec.js.map +0 -1
- package/dist/collection/components/cat-toggle/cat-toggle.e2e.js +0 -10
- package/dist/collection/components/cat-toggle/cat-toggle.e2e.js.map +0 -1
- package/dist/collection/components/cat-toggle/cat-toggle.spec.js +0 -14
- package/dist/collection/components/cat-toggle/cat-toggle.spec.js.map +0 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js +0 -10
- package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js.map +0 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js +0 -20
- package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js.map +0 -1
- package/dist/collection/utils/media-matcher.spec.js +0 -39
- package/dist/collection/utils/media-matcher.spec.js.map +0 -1
- package/dist/components/floating-ui.dom.esm.js.map +0 -1
- package/dist/components/from.js +0 -928
- package/dist/components/from.js.map +0 -1
- package/dist/components/of.js +0 -10
- package/dist/components/of.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/index-e8c0ddf2.js.map +0 -1
- package/dist/esm/of-e4ec2eb4.js +0 -1523
- package/dist/esm/of-e4ec2eb4.js.map +0 -1
- package/loader/package.json +0 -11
package/dist/esm/of-e4ec2eb4.js
DELETED
|
@@ -1,1523 +0,0 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
-
|
|
3
|
-
var loglevel = {exports: {}};
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* loglevel - https://github.com/pimterry/loglevel
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) 2013 Tim Perry
|
|
9
|
-
* Licensed under the MIT license.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
(function (module) {
|
|
13
|
-
(function (root, definition) {
|
|
14
|
-
if (module.exports) {
|
|
15
|
-
module.exports = definition();
|
|
16
|
-
} else {
|
|
17
|
-
root.log = definition();
|
|
18
|
-
}
|
|
19
|
-
}(commonjsGlobal, function () {
|
|
20
|
-
|
|
21
|
-
// Slightly dubious tricks to cut down minimized file size
|
|
22
|
-
var noop = function() {};
|
|
23
|
-
var undefinedType = "undefined";
|
|
24
|
-
var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
|
|
25
|
-
/Trident\/|MSIE /.test(window.navigator.userAgent)
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
var logMethods = [
|
|
29
|
-
"trace",
|
|
30
|
-
"debug",
|
|
31
|
-
"info",
|
|
32
|
-
"warn",
|
|
33
|
-
"error"
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
var _loggersByName = {};
|
|
37
|
-
var defaultLogger = null;
|
|
38
|
-
|
|
39
|
-
// Cross-browser bind equivalent that works at least back to IE6
|
|
40
|
-
function bindMethod(obj, methodName) {
|
|
41
|
-
var method = obj[methodName];
|
|
42
|
-
if (typeof method.bind === 'function') {
|
|
43
|
-
return method.bind(obj);
|
|
44
|
-
} else {
|
|
45
|
-
try {
|
|
46
|
-
return Function.prototype.bind.call(method, obj);
|
|
47
|
-
} catch (e) {
|
|
48
|
-
// Missing bind shim or IE8 + Modernizr, fallback to wrapping
|
|
49
|
-
return function() {
|
|
50
|
-
return Function.prototype.apply.apply(method, [obj, arguments]);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Trace() doesn't print the message in IE, so for that case we need to wrap it
|
|
57
|
-
function traceForIE() {
|
|
58
|
-
if (console.log) {
|
|
59
|
-
if (console.log.apply) {
|
|
60
|
-
console.log.apply(console, arguments);
|
|
61
|
-
} else {
|
|
62
|
-
// In old IE, native console methods themselves don't have apply().
|
|
63
|
-
Function.prototype.apply.apply(console.log, [console, arguments]);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (console.trace) console.trace();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Build the best logging method possible for this env
|
|
70
|
-
// Wherever possible we want to bind, not wrap, to preserve stack traces
|
|
71
|
-
function realMethod(methodName) {
|
|
72
|
-
if (methodName === 'debug') {
|
|
73
|
-
methodName = 'log';
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (typeof console === undefinedType) {
|
|
77
|
-
return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
|
|
78
|
-
} else if (methodName === 'trace' && isIE) {
|
|
79
|
-
return traceForIE;
|
|
80
|
-
} else if (console[methodName] !== undefined) {
|
|
81
|
-
return bindMethod(console, methodName);
|
|
82
|
-
} else if (console.log !== undefined) {
|
|
83
|
-
return bindMethod(console, 'log');
|
|
84
|
-
} else {
|
|
85
|
-
return noop;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// These private functions always need `this` to be set properly
|
|
90
|
-
|
|
91
|
-
function replaceLoggingMethods() {
|
|
92
|
-
/*jshint validthis:true */
|
|
93
|
-
var level = this.getLevel();
|
|
94
|
-
|
|
95
|
-
// Replace the actual methods.
|
|
96
|
-
for (var i = 0; i < logMethods.length; i++) {
|
|
97
|
-
var methodName = logMethods[i];
|
|
98
|
-
this[methodName] = (i < level) ?
|
|
99
|
-
noop :
|
|
100
|
-
this.methodFactory(methodName, level, this.name);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Define log.log as an alias for log.debug
|
|
104
|
-
this.log = this.debug;
|
|
105
|
-
|
|
106
|
-
// Return any important warnings.
|
|
107
|
-
if (typeof console === undefinedType && level < this.levels.SILENT) {
|
|
108
|
-
return "No console available for logging";
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// In old IE versions, the console isn't present until you first open it.
|
|
113
|
-
// We build realMethod() replacements here that regenerate logging methods
|
|
114
|
-
function enableLoggingWhenConsoleArrives(methodName) {
|
|
115
|
-
return function () {
|
|
116
|
-
if (typeof console !== undefinedType) {
|
|
117
|
-
replaceLoggingMethods.call(this);
|
|
118
|
-
this[methodName].apply(this, arguments);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// By default, we use closely bound real methods wherever possible, and
|
|
124
|
-
// otherwise we wait for a console to appear, and then try again.
|
|
125
|
-
function defaultMethodFactory(methodName, _level, _loggerName) {
|
|
126
|
-
/*jshint validthis:true */
|
|
127
|
-
return realMethod(methodName) ||
|
|
128
|
-
enableLoggingWhenConsoleArrives.apply(this, arguments);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function Logger(name, factory) {
|
|
132
|
-
// Private instance variables.
|
|
133
|
-
var self = this;
|
|
134
|
-
/**
|
|
135
|
-
* The level inherited from a parent logger (or a global default). We
|
|
136
|
-
* cache this here rather than delegating to the parent so that it stays
|
|
137
|
-
* in sync with the actual logging methods that we have installed (the
|
|
138
|
-
* parent could change levels but we might not have rebuilt the loggers
|
|
139
|
-
* in this child yet).
|
|
140
|
-
* @type {number}
|
|
141
|
-
*/
|
|
142
|
-
var inheritedLevel;
|
|
143
|
-
/**
|
|
144
|
-
* The default level for this logger, if any. If set, this overrides
|
|
145
|
-
* `inheritedLevel`.
|
|
146
|
-
* @type {number|null}
|
|
147
|
-
*/
|
|
148
|
-
var defaultLevel;
|
|
149
|
-
/**
|
|
150
|
-
* A user-specific level for this logger. If set, this overrides
|
|
151
|
-
* `defaultLevel`.
|
|
152
|
-
* @type {number|null}
|
|
153
|
-
*/
|
|
154
|
-
var userLevel;
|
|
155
|
-
|
|
156
|
-
var storageKey = "loglevel";
|
|
157
|
-
if (typeof name === "string") {
|
|
158
|
-
storageKey += ":" + name;
|
|
159
|
-
} else if (typeof name === "symbol") {
|
|
160
|
-
storageKey = undefined;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function persistLevelIfPossible(levelNum) {
|
|
164
|
-
var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
|
|
165
|
-
|
|
166
|
-
if (typeof window === undefinedType || !storageKey) return;
|
|
167
|
-
|
|
168
|
-
// Use localStorage if available
|
|
169
|
-
try {
|
|
170
|
-
window.localStorage[storageKey] = levelName;
|
|
171
|
-
return;
|
|
172
|
-
} catch (ignore) {}
|
|
173
|
-
|
|
174
|
-
// Use session cookie as fallback
|
|
175
|
-
try {
|
|
176
|
-
window.document.cookie =
|
|
177
|
-
encodeURIComponent(storageKey) + "=" + levelName + ";";
|
|
178
|
-
} catch (ignore) {}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function getPersistedLevel() {
|
|
182
|
-
var storedLevel;
|
|
183
|
-
|
|
184
|
-
if (typeof window === undefinedType || !storageKey) return;
|
|
185
|
-
|
|
186
|
-
try {
|
|
187
|
-
storedLevel = window.localStorage[storageKey];
|
|
188
|
-
} catch (ignore) {}
|
|
189
|
-
|
|
190
|
-
// Fallback to cookies if local storage gives us nothing
|
|
191
|
-
if (typeof storedLevel === undefinedType) {
|
|
192
|
-
try {
|
|
193
|
-
var cookie = window.document.cookie;
|
|
194
|
-
var cookieName = encodeURIComponent(storageKey);
|
|
195
|
-
var location = cookie.indexOf(cookieName + "=");
|
|
196
|
-
if (location !== -1) {
|
|
197
|
-
storedLevel = /^([^;]+)/.exec(
|
|
198
|
-
cookie.slice(location + cookieName.length + 1)
|
|
199
|
-
)[1];
|
|
200
|
-
}
|
|
201
|
-
} catch (ignore) {}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// If the stored level is not valid, treat it as if nothing was stored.
|
|
205
|
-
if (self.levels[storedLevel] === undefined) {
|
|
206
|
-
storedLevel = undefined;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return storedLevel;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function clearPersistedLevel() {
|
|
213
|
-
if (typeof window === undefinedType || !storageKey) return;
|
|
214
|
-
|
|
215
|
-
// Use localStorage if available
|
|
216
|
-
try {
|
|
217
|
-
window.localStorage.removeItem(storageKey);
|
|
218
|
-
} catch (ignore) {}
|
|
219
|
-
|
|
220
|
-
// Use session cookie as fallback
|
|
221
|
-
try {
|
|
222
|
-
window.document.cookie =
|
|
223
|
-
encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
224
|
-
} catch (ignore) {}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
function normalizeLevel(input) {
|
|
228
|
-
var level = input;
|
|
229
|
-
if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
|
|
230
|
-
level = self.levels[level.toUpperCase()];
|
|
231
|
-
}
|
|
232
|
-
if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
|
|
233
|
-
return level;
|
|
234
|
-
} else {
|
|
235
|
-
throw new TypeError("log.setLevel() called with invalid level: " + input);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/*
|
|
240
|
-
*
|
|
241
|
-
* Public logger API - see https://github.com/pimterry/loglevel for details
|
|
242
|
-
*
|
|
243
|
-
*/
|
|
244
|
-
|
|
245
|
-
self.name = name;
|
|
246
|
-
|
|
247
|
-
self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
|
|
248
|
-
"ERROR": 4, "SILENT": 5};
|
|
249
|
-
|
|
250
|
-
self.methodFactory = factory || defaultMethodFactory;
|
|
251
|
-
|
|
252
|
-
self.getLevel = function () {
|
|
253
|
-
if (userLevel != null) {
|
|
254
|
-
return userLevel;
|
|
255
|
-
} else if (defaultLevel != null) {
|
|
256
|
-
return defaultLevel;
|
|
257
|
-
} else {
|
|
258
|
-
return inheritedLevel;
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
self.setLevel = function (level, persist) {
|
|
263
|
-
userLevel = normalizeLevel(level);
|
|
264
|
-
if (persist !== false) { // defaults to true
|
|
265
|
-
persistLevelIfPossible(userLevel);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
// NOTE: in v2, this should call rebuild(), which updates children.
|
|
269
|
-
return replaceLoggingMethods.call(self);
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
self.setDefaultLevel = function (level) {
|
|
273
|
-
defaultLevel = normalizeLevel(level);
|
|
274
|
-
if (!getPersistedLevel()) {
|
|
275
|
-
self.setLevel(level, false);
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
self.resetLevel = function () {
|
|
280
|
-
userLevel = null;
|
|
281
|
-
clearPersistedLevel();
|
|
282
|
-
replaceLoggingMethods.call(self);
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
self.enableAll = function(persist) {
|
|
286
|
-
self.setLevel(self.levels.TRACE, persist);
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
self.disableAll = function(persist) {
|
|
290
|
-
self.setLevel(self.levels.SILENT, persist);
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
self.rebuild = function () {
|
|
294
|
-
if (defaultLogger !== self) {
|
|
295
|
-
inheritedLevel = normalizeLevel(defaultLogger.getLevel());
|
|
296
|
-
}
|
|
297
|
-
replaceLoggingMethods.call(self);
|
|
298
|
-
|
|
299
|
-
if (defaultLogger === self) {
|
|
300
|
-
for (var childName in _loggersByName) {
|
|
301
|
-
_loggersByName[childName].rebuild();
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
// Initialize all the internal levels.
|
|
307
|
-
inheritedLevel = normalizeLevel(
|
|
308
|
-
defaultLogger ? defaultLogger.getLevel() : "WARN"
|
|
309
|
-
);
|
|
310
|
-
var initialLevel = getPersistedLevel();
|
|
311
|
-
if (initialLevel != null) {
|
|
312
|
-
userLevel = normalizeLevel(initialLevel);
|
|
313
|
-
}
|
|
314
|
-
replaceLoggingMethods.call(self);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/*
|
|
318
|
-
*
|
|
319
|
-
* Top-level API
|
|
320
|
-
*
|
|
321
|
-
*/
|
|
322
|
-
|
|
323
|
-
defaultLogger = new Logger();
|
|
324
|
-
|
|
325
|
-
defaultLogger.getLogger = function getLogger(name) {
|
|
326
|
-
if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
|
|
327
|
-
throw new TypeError("You must supply a name when creating a logger.");
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
var logger = _loggersByName[name];
|
|
331
|
-
if (!logger) {
|
|
332
|
-
logger = _loggersByName[name] = new Logger(
|
|
333
|
-
name,
|
|
334
|
-
defaultLogger.methodFactory
|
|
335
|
-
);
|
|
336
|
-
}
|
|
337
|
-
return logger;
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
// Grab the current global log variable in case of overwrite
|
|
341
|
-
var _log = (typeof window !== undefinedType) ? window.log : undefined;
|
|
342
|
-
defaultLogger.noConflict = function() {
|
|
343
|
-
if (typeof window !== undefinedType &&
|
|
344
|
-
window.log === defaultLogger) {
|
|
345
|
-
window.log = _log;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return defaultLogger;
|
|
349
|
-
};
|
|
350
|
-
|
|
351
|
-
defaultLogger.getLoggers = function getLoggers() {
|
|
352
|
-
return _loggersByName;
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
// ES6 default export, for compatibility
|
|
356
|
-
defaultLogger['default'] = defaultLogger;
|
|
357
|
-
|
|
358
|
-
return defaultLogger;
|
|
359
|
-
}));
|
|
360
|
-
}(loglevel));
|
|
361
|
-
|
|
362
|
-
const log = loglevel.exports;
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* A registry for lightweight internationalization (i18n) in applications using
|
|
366
|
-
* the Catalyst design system. The registry stores translations and provides
|
|
367
|
-
* methods for setting the locale, registering translations, and retrieving
|
|
368
|
-
* translated messages.
|
|
369
|
-
*/
|
|
370
|
-
class CatI18nRegistry {
|
|
371
|
-
constructor() {
|
|
372
|
-
// hide constructor
|
|
373
|
-
this.id = (Math.random() + 1).toString(36).substring(2);
|
|
374
|
-
this.i18n = new Map();
|
|
375
|
-
// In rare cases, the registry can be initialized twice. This can happen in
|
|
376
|
-
// a micro frontend architecture where the registry is initialized in the
|
|
377
|
-
// host application and in the micro frontend. To prevent the registry in
|
|
378
|
-
// one application from overwriting the registry in the other, we listen for
|
|
379
|
-
// events that are dispatched when messages are added or removed in other
|
|
380
|
-
// applications and add or remove messages if the event was not dispatched
|
|
381
|
-
// by this registry.
|
|
382
|
-
window.addEventListener('cat-i18n-setLocale', event => {
|
|
383
|
-
const { detail } = event || {};
|
|
384
|
-
if (detail && detail.id !== this.id) {
|
|
385
|
-
this.setLocale(detail.locale, true);
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
window.addEventListener('cat-i18n-set', event => {
|
|
389
|
-
const { detail } = event || {};
|
|
390
|
-
if (detail && detail.id !== this.id) {
|
|
391
|
-
this.set(detail.i18n, true);
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
window.addEventListener('cat-i18n-clear', event => {
|
|
395
|
-
const { detail } = event || {};
|
|
396
|
-
if (detail && detail.id !== this.id) {
|
|
397
|
-
this.clear(true);
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
static getInstance() {
|
|
402
|
-
if (!CatI18nRegistry.instance) {
|
|
403
|
-
CatI18nRegistry.instance = new CatI18nRegistry();
|
|
404
|
-
}
|
|
405
|
-
return CatI18nRegistry.instance;
|
|
406
|
-
}
|
|
407
|
-
getLocale() {
|
|
408
|
-
return this._locale ?? window?.navigator?.language ?? 'en';
|
|
409
|
-
}
|
|
410
|
-
setLocale(locale, silent = false) {
|
|
411
|
-
try {
|
|
412
|
-
this._locale = Intl.getCanonicalLocales(locale)[0];
|
|
413
|
-
log.info(`[CatI18nRegistry::${this.id}] Set locale: ${this._locale}`);
|
|
414
|
-
!silent && window.dispatchEvent(this.buildEvent('cat-i18n-setLocale', { locale, id: this.id }));
|
|
415
|
-
}
|
|
416
|
-
catch (err) {
|
|
417
|
-
log.error(`[CatI18nRegistry::${this.id}] Invalid locale: ${locale}`);
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
set(i18n, silent = false) {
|
|
421
|
-
if (typeof i18n === 'function') {
|
|
422
|
-
this._translator = i18n;
|
|
423
|
-
log.info(`[CatI18nRegistry::${this.id}] Registered translator`);
|
|
424
|
-
}
|
|
425
|
-
else {
|
|
426
|
-
const i18nEntries = Object.entries(i18n);
|
|
427
|
-
i18nEntries.forEach(([key, message]) => this.i18n.set(key, message));
|
|
428
|
-
log.info(`[CatI18nRegistry::${this.id}] Registered ${i18nEntries.length !== 1 ? 'messages' : 'message'}`);
|
|
429
|
-
}
|
|
430
|
-
!silent && window.dispatchEvent(this.buildEvent('cat-i18n-set', { i18n, id: this.id }));
|
|
431
|
-
}
|
|
432
|
-
clear(silent = false) {
|
|
433
|
-
this.i18n.clear();
|
|
434
|
-
log.info(`[CatI18nRegistry::${this.id}] Cleared messages`);
|
|
435
|
-
!silent && window.dispatchEvent(this.buildEvent('cat-i18n-clear'));
|
|
436
|
-
}
|
|
437
|
-
t(key, params) {
|
|
438
|
-
const message = this._translator?.(key, params) ??
|
|
439
|
-
this.i18n.get(key)?.replace(/{{\s*([-a-zA-Z._]+)\s*}}/g, (_match, key) => `${params?.[key] ?? ''}`);
|
|
440
|
-
if (message === undefined) {
|
|
441
|
-
log.error(`[CatI18nRegistry::${this.id}] Unknown message key: ${key}`);
|
|
442
|
-
return key;
|
|
443
|
-
}
|
|
444
|
-
return message;
|
|
445
|
-
}
|
|
446
|
-
buildEvent(name, detail) {
|
|
447
|
-
return new CustomEvent(name, {
|
|
448
|
-
bubbles: true,
|
|
449
|
-
composed: true,
|
|
450
|
-
detail
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
const catI18nRegistry = CatI18nRegistry.getInstance();
|
|
455
|
-
|
|
456
|
-
const chevronDoubleLeft16 = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M7.53 4.53a.75.75 0 0 0-1.06-1.06l-4 4a.75.75 0 0 0 0 1.06l4 4a.75.75 0 0 0 1.06-1.06L4.06 8z"/><path d="M12.53 4.53a.75.75 0 0 0-1.06-1.06l-4 4a.75.75 0 0 0 0 1.06l4 4a.75.75 0 1 0 1.06-1.06L9.06 8z"/></svg>`;
|
|
457
|
-
|
|
458
|
-
const chevronDoubleRight16 = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.53 3.47a.75.75 0 0 0-1.06 1.06L6.94 8l-3.47 3.47a.75.75 0 1 0 1.06 1.06l4-4a.75.75 0 0 0 0-1.06z"/><path d="M9.53 3.47a.75.75 0 0 0-1.06 1.06L11.94 8l-3.47 3.47a.75.75 0 1 0 1.06 1.06l4-4a.75.75 0 0 0 0-1.06z"/></svg>`;
|
|
459
|
-
|
|
460
|
-
const chevronLeft16 = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 1 0 1.06L7.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0" clip-rule="evenodd"/></svg>`;
|
|
461
|
-
|
|
462
|
-
const chevronRight16 = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg>`;
|
|
463
|
-
|
|
464
|
-
const cross16 = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.53 3.47a.75.75 0 0 0-1.06 1.06L6.94 8l-3.47 3.47a.75.75 0 1 0 1.06 1.06L8 9.06l3.47 3.47a.75.75 0 1 0 1.06-1.06L9.06 8l3.47-3.47a.75.75 0 0 0-1.06-1.06L8 6.94z"/></svg>`;
|
|
465
|
-
|
|
466
|
-
const alertCircleOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.25-8a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0z"/><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12M12 3.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5" clip-rule="evenodd"/></svg>`;
|
|
467
|
-
|
|
468
|
-
const calendarOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M17 2.25a.75.75 0 0 1 .75.75v.25H18A2.75 2.75 0 0 1 20.75 6v12A2.75 2.75 0 0 1 18 20.75H6A2.75 2.75 0 0 1 3.25 18V6A2.75 2.75 0 0 1 6 3.25h.25V3a.75.75 0 0 1 1.5 0v.25h8.5V3a.75.75 0 0 1 .75-.75M6 4.75c-.69 0-1.25.56-1.25 1.25v2.25h14.5V6c0-.69-.56-1.25-1.25-1.25zm-1.25 5V18c0 .69.56 1.25 1.25 1.25h12c.69 0 1.25-.56 1.25-1.25V9.75z" clip-rule="evenodd"/></svg>`;
|
|
469
|
-
|
|
470
|
-
const checkCircleFilled = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m4.768-12.36a1 1 0 1 0-1.536-1.28l-4.3 5.159-2.225-2.226a1 1 0 0 0-1.414 1.414l3 3a1 1 0 0 0 1.475-.067z" clip-rule="evenodd"/></svg>`;
|
|
471
|
-
|
|
472
|
-
const chevronDownOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M6.47 9.47a.75.75 0 0 1 1.06 0L12 13.94l4.47-4.47a.75.75 0 1 1 1.06 1.06l-5 5a.75.75 0 0 1-1.06 0l-5-5a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg>`;
|
|
473
|
-
|
|
474
|
-
const chevronLeftOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M14.53 6.47a.75.75 0 0 1 0 1.06L10.06 12l4.47 4.47a.75.75 0 1 1-1.06 1.06l-5-5a.75.75 0 0 1 0-1.06l5-5a.75.75 0 0 1 1.06 0" clip-rule="evenodd"/></svg>`;
|
|
475
|
-
|
|
476
|
-
const chevronRightOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M9.47 6.47a.75.75 0 0 1 1.06 0l5 5a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 1 1-1.06-1.06L13.94 12 9.47 7.53a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg>`;
|
|
477
|
-
|
|
478
|
-
const clockFilled = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m1-15a1 1 0 1 0-2 0v5a1 1 0 0 0 1 1h5a1 1 0 1 0 0-2h-4z" clip-rule="evenodd"/></svg>`;
|
|
479
|
-
|
|
480
|
-
const clockOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.75 7a.75.75 0 0 0-1.5 0v5c0 .414.336.75.75.75h5a.75.75 0 0 0 0-1.5h-4.25z"/><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25M3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0" clip-rule="evenodd"/></svg>`;
|
|
481
|
-
|
|
482
|
-
const crossCircleFilled = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414" clip-rule="evenodd"/></svg>`;
|
|
483
|
-
|
|
484
|
-
const crossCircleOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.47 8.47a.75.75 0 0 1 1.06 0L12 10.94l2.47-2.47a.75.75 0 1 1 1.06 1.06L13.06 12l2.47 2.47a.75.75 0 1 1-1.06 1.06L12 13.06l-2.47 2.47a.75.75 0 0 1-1.06-1.06L10.94 12 8.47 9.53a.75.75 0 0 1 0-1.06"/><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25M3.75 12a8.25 8.25 0 1 1 16.5 0 8.25 8.25 0 0 1-16.5 0" clip-rule="evenodd"/></svg>`;
|
|
485
|
-
|
|
486
|
-
const crossOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.53 6.47a.75.75 0 0 0-1.06 1.06L10.94 12l-4.47 4.47a.75.75 0 1 0 1.06 1.06L12 13.06l4.47 4.47a.75.75 0 1 0 1.06-1.06L13.06 12l4.47-4.47a.75.75 0 0 0-1.06-1.06L12 10.94z"/></svg>`;
|
|
487
|
-
|
|
488
|
-
const dangerFilled = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 3.25c-.429 0-.85.113-1.22.328a2.5 2.5 0 0 0-.899.891L2.577 16.981a2.55 2.55 0 0 0-.007 2.491c.212.381.519.7.891.926a2.44 2.44 0 0 0 1.234.352h14.61a2.44 2.44 0 0 0 1.233-.352 2.5 2.5 0 0 0 .892-.926 2.55 2.55 0 0 0-.007-2.491L14.119 4.469a2.5 2.5 0 0 0-.899-.891A2.44 2.44 0 0 0 12 3.25M12 8a1 1 0 0 1 1 1v3.5a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1m1 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0" clip-rule="evenodd"/></svg>`;
|
|
489
|
-
|
|
490
|
-
const eyeClosedOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.608 7.948a.75.75 0 1 0-1.234.853 12.4 12.4 0 0 0 2.255 2.438l-2.574 2.574a.75.75 0 0 0 1.061 1.06l2.738-2.737c1.283.824 2.777 1.433 4.396 1.58V17a.75.75 0 0 0 1.5 0v-3.284c1.618-.148 3.11-.76 4.392-1.584l2.742 2.742a.75.75 0 0 0 1.06-1.06l-2.579-2.58a12.5 12.5 0 0 0 2.251-2.432.75.75 0 0 0-1.232-.855C17.965 9.99 15.144 12.25 12 12.25c-3.153 0-5.978-2.255-7.392-4.302"/></svg>`;
|
|
491
|
-
|
|
492
|
-
const eyeOpenOutlined = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 8.25a3.75 3.75 0 1 0 0 7.5 3.75 3.75 0 0 0 0-7.5M9.75 12a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0" clip-rule="evenodd"/><path fill-rule="evenodd" d="M12 4.25c-2.735 0-5.158 1.37-6.872 2.948-.862.794-1.567 1.66-2.062 2.475-.479.79-.816 1.62-.816 2.327s.337 1.538.816 2.327c.495.815 1.2 1.68 2.062 2.475C6.842 18.38 9.265 19.75 12 19.75c2.737 0 5.16-1.379 6.873-2.96.861-.795 1.566-1.662 2.06-2.475.479-.786.817-1.614.817-2.315s-.338-1.529-.817-2.315c-.494-.813-1.199-1.68-2.06-2.475C17.16 5.629 14.737 4.25 12 4.25M3.75 12c0-.293.167-.837.598-1.548.416-.685 1.03-1.444 1.796-2.15C7.688 6.88 9.764 5.75 12 5.75c2.234 0 4.31 1.136 5.855 2.562.767.708 1.38 1.468 1.797 2.153.433.71.598 1.25.598 1.535s-.165.824-.598 1.535c-.416.685-1.03 1.445-1.797 2.153-1.544 1.426-3.621 2.562-5.855 2.562s-4.312-1.13-5.856-2.552c-.767-.706-1.38-1.465-1.796-2.15-.431-.71-.598-1.255-.598-1.548" clip-rule="evenodd"/></svg>`;
|
|
493
|
-
|
|
494
|
-
const infoCircleFilled = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12M13 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m0 3.5a1 1 0 1 0-2 0V16a1 1 0 1 0 2 0z" clip-rule="evenodd"/></svg>`;
|
|
495
|
-
|
|
496
|
-
const starCircleFilled = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10m-7.82-3.001L12 5 9.82 8.999l-4.477.838 3.129 3.31-.587 4.516L12 15.71l4.114 1.953-.586-4.517 3.13-3.31z" clip-rule="evenodd"/></svg>`;
|
|
497
|
-
|
|
498
|
-
class CatIconRegistry {
|
|
499
|
-
constructor() {
|
|
500
|
-
// hide constructor
|
|
501
|
-
this.id = (Math.random() + 1).toString(36).substring(2);
|
|
502
|
-
this.icons = new Map();
|
|
503
|
-
// ignore syncing in backwards compatible manner
|
|
504
|
-
this.syncIcons = true;
|
|
505
|
-
// register default icons that are used in the framework by other components
|
|
506
|
-
this.addIcons({
|
|
507
|
-
'alert-primary': starCircleFilled,
|
|
508
|
-
'alert-secondary': clockFilled,
|
|
509
|
-
'alert-info': infoCircleFilled,
|
|
510
|
-
'alert-success': checkCircleFilled,
|
|
511
|
-
'alert-warning': dangerFilled,
|
|
512
|
-
'alert-danger': crossCircleFilled,
|
|
513
|
-
'datepicker-month-prev': chevronLeft16,
|
|
514
|
-
'datepicker-month-next': chevronRight16,
|
|
515
|
-
'datepicker-year-prev': chevronDoubleLeft16,
|
|
516
|
-
'datepicker-year-next': chevronDoubleRight16,
|
|
517
|
-
'datepicker-calendar': calendarOutlined,
|
|
518
|
-
'timepicker-clock': clockOutlined,
|
|
519
|
-
'dialog-close': crossOutlined,
|
|
520
|
-
'input-close': crossCircleOutlined,
|
|
521
|
-
'input-error': alertCircleOutlined,
|
|
522
|
-
'input-password-show': eyeOpenOutlined,
|
|
523
|
-
'input-password-hide': eyeClosedOutlined,
|
|
524
|
-
'notification-close': crossCircleOutlined,
|
|
525
|
-
'pagination-left': chevronLeftOutlined,
|
|
526
|
-
'pagination-right': chevronRightOutlined,
|
|
527
|
-
'select-clear': cross16,
|
|
528
|
-
'select-open': chevronDownOutlined
|
|
529
|
-
}, '$cat', true);
|
|
530
|
-
// In rare cases, the registry can be initialized twice. This can happen in
|
|
531
|
-
// a micro frontend architecture where the registry is initialized in the
|
|
532
|
-
// host application and in the micro frontend. To prevent the registry in
|
|
533
|
-
// one application from overwriting the registry in the other, we listen for
|
|
534
|
-
// events that are dispatched when icons are added or removed in other
|
|
535
|
-
// applications and add or remove icons if the event was not dispatched by
|
|
536
|
-
// this registry.
|
|
537
|
-
window.addEventListener('cat-icons-added', event => {
|
|
538
|
-
const { detail } = event || {};
|
|
539
|
-
if (this.syncIcons && detail && detail.id !== this.id) {
|
|
540
|
-
this.addIcons(detail.icons, detail.setName, true);
|
|
541
|
-
}
|
|
542
|
-
});
|
|
543
|
-
window.addEventListener('cat-icons-removed', event => {
|
|
544
|
-
const { detail } = event || {};
|
|
545
|
-
if (this.syncIcons && detail && detail.id !== this.id) {
|
|
546
|
-
this.removeIcons(detail.names, detail.setName, true);
|
|
547
|
-
}
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
static getInstance() {
|
|
551
|
-
if (!CatIconRegistry.instance) {
|
|
552
|
-
CatIconRegistry.instance = new CatIconRegistry();
|
|
553
|
-
}
|
|
554
|
-
return CatIconRegistry.instance;
|
|
555
|
-
}
|
|
556
|
-
getIcon(name, setName) {
|
|
557
|
-
const icon = this.icons.get(this.buildName(name, setName));
|
|
558
|
-
if (!icon) {
|
|
559
|
-
log.error(`[CatIconRegistry::${this.id}] Unknown icon${setName ? ` in set ${setName}` : ''}: ${name}`);
|
|
560
|
-
}
|
|
561
|
-
return icon;
|
|
562
|
-
}
|
|
563
|
-
addIcons(icons, setName, silent = false) {
|
|
564
|
-
const iconEntries = Object.entries(icons);
|
|
565
|
-
const iconSize = iconEntries.length;
|
|
566
|
-
iconEntries.forEach(([name, data]) => this.icons.set(this.buildName(name, setName), data));
|
|
567
|
-
log.info(`[CatIconRegistry::${this.id}] Added ${iconSize !== 1 ? 'icons' : 'icon'}${setName ? ` to set ${setName}` : ''}`);
|
|
568
|
-
!silent && window.dispatchEvent(this.buildEvent('cat-icons-added', { id: this.id, icons, setName }));
|
|
569
|
-
return this;
|
|
570
|
-
}
|
|
571
|
-
removeIcons(names, setName, silent = false) {
|
|
572
|
-
const iconSize = names.length;
|
|
573
|
-
names.forEach(name => this.icons.delete(this.buildName(name, setName)));
|
|
574
|
-
log.info(`[CatIconRegistry::${this.id}] Removed ${iconSize !== 1 ? 'icons' : 'icon'}${setName ? ` from set ${setName}` : ''}`);
|
|
575
|
-
!silent && window.dispatchEvent(this.buildEvent('cat-icons-removed', { id: this.id, names, setName }));
|
|
576
|
-
return this;
|
|
577
|
-
}
|
|
578
|
-
buildName(name, setName) {
|
|
579
|
-
return setName ? `${setName}:${name}` : name;
|
|
580
|
-
}
|
|
581
|
-
buildEvent(name, detail) {
|
|
582
|
-
return new CustomEvent(name, {
|
|
583
|
-
bubbles: true,
|
|
584
|
-
composed: true,
|
|
585
|
-
detail
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
const catIconRegistry = CatIconRegistry.getInstance();
|
|
590
|
-
|
|
591
|
-
function isFunction(value) {
|
|
592
|
-
return typeof value === 'function';
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
function createErrorClass(createImpl) {
|
|
596
|
-
const _super = (instance) => {
|
|
597
|
-
Error.call(instance);
|
|
598
|
-
instance.stack = new Error().stack;
|
|
599
|
-
};
|
|
600
|
-
const ctorFunc = createImpl(_super);
|
|
601
|
-
ctorFunc.prototype = Object.create(Error.prototype);
|
|
602
|
-
ctorFunc.prototype.constructor = ctorFunc;
|
|
603
|
-
return ctorFunc;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {
|
|
607
|
-
_super(this);
|
|
608
|
-
this.message = errors
|
|
609
|
-
? `${errors.length} errors occurred during unsubscription:
|
|
610
|
-
${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}`
|
|
611
|
-
: '';
|
|
612
|
-
this.name = 'UnsubscriptionError';
|
|
613
|
-
this.errors = errors;
|
|
614
|
-
});
|
|
615
|
-
|
|
616
|
-
function arrRemove(arr, item) {
|
|
617
|
-
if (arr) {
|
|
618
|
-
const index = arr.indexOf(item);
|
|
619
|
-
0 <= index && arr.splice(index, 1);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
class Subscription {
|
|
624
|
-
constructor(initialTeardown) {
|
|
625
|
-
this.initialTeardown = initialTeardown;
|
|
626
|
-
this.closed = false;
|
|
627
|
-
this._parentage = null;
|
|
628
|
-
this._finalizers = null;
|
|
629
|
-
}
|
|
630
|
-
unsubscribe() {
|
|
631
|
-
let errors;
|
|
632
|
-
if (!this.closed) {
|
|
633
|
-
this.closed = true;
|
|
634
|
-
const { _parentage } = this;
|
|
635
|
-
if (_parentage) {
|
|
636
|
-
this._parentage = null;
|
|
637
|
-
if (Array.isArray(_parentage)) {
|
|
638
|
-
for (const parent of _parentage) {
|
|
639
|
-
parent.remove(this);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
else {
|
|
643
|
-
_parentage.remove(this);
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
const { initialTeardown: initialFinalizer } = this;
|
|
647
|
-
if (isFunction(initialFinalizer)) {
|
|
648
|
-
try {
|
|
649
|
-
initialFinalizer();
|
|
650
|
-
}
|
|
651
|
-
catch (e) {
|
|
652
|
-
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
const { _finalizers } = this;
|
|
656
|
-
if (_finalizers) {
|
|
657
|
-
this._finalizers = null;
|
|
658
|
-
for (const finalizer of _finalizers) {
|
|
659
|
-
try {
|
|
660
|
-
execFinalizer(finalizer);
|
|
661
|
-
}
|
|
662
|
-
catch (err) {
|
|
663
|
-
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
664
|
-
if (err instanceof UnsubscriptionError) {
|
|
665
|
-
errors = [...errors, ...err.errors];
|
|
666
|
-
}
|
|
667
|
-
else {
|
|
668
|
-
errors.push(err);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
if (errors) {
|
|
674
|
-
throw new UnsubscriptionError(errors);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
add(teardown) {
|
|
679
|
-
var _a;
|
|
680
|
-
if (teardown && teardown !== this) {
|
|
681
|
-
if (this.closed) {
|
|
682
|
-
execFinalizer(teardown);
|
|
683
|
-
}
|
|
684
|
-
else {
|
|
685
|
-
if (teardown instanceof Subscription) {
|
|
686
|
-
if (teardown.closed || teardown._hasParent(this)) {
|
|
687
|
-
return;
|
|
688
|
-
}
|
|
689
|
-
teardown._addParent(this);
|
|
690
|
-
}
|
|
691
|
-
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
_hasParent(parent) {
|
|
696
|
-
const { _parentage } = this;
|
|
697
|
-
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
|
|
698
|
-
}
|
|
699
|
-
_addParent(parent) {
|
|
700
|
-
const { _parentage } = this;
|
|
701
|
-
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
702
|
-
}
|
|
703
|
-
_removeParent(parent) {
|
|
704
|
-
const { _parentage } = this;
|
|
705
|
-
if (_parentage === parent) {
|
|
706
|
-
this._parentage = null;
|
|
707
|
-
}
|
|
708
|
-
else if (Array.isArray(_parentage)) {
|
|
709
|
-
arrRemove(_parentage, parent);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
remove(teardown) {
|
|
713
|
-
const { _finalizers } = this;
|
|
714
|
-
_finalizers && arrRemove(_finalizers, teardown);
|
|
715
|
-
if (teardown instanceof Subscription) {
|
|
716
|
-
teardown._removeParent(this);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
Subscription.EMPTY = (() => {
|
|
721
|
-
const empty = new Subscription();
|
|
722
|
-
empty.closed = true;
|
|
723
|
-
return empty;
|
|
724
|
-
})();
|
|
725
|
-
const EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
726
|
-
function isSubscription(value) {
|
|
727
|
-
return (value instanceof Subscription ||
|
|
728
|
-
(value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
|
|
729
|
-
}
|
|
730
|
-
function execFinalizer(finalizer) {
|
|
731
|
-
if (isFunction(finalizer)) {
|
|
732
|
-
finalizer();
|
|
733
|
-
}
|
|
734
|
-
else {
|
|
735
|
-
finalizer.unsubscribe();
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
const config = {
|
|
740
|
-
onUnhandledError: null,
|
|
741
|
-
onStoppedNotification: null,
|
|
742
|
-
Promise: undefined,
|
|
743
|
-
useDeprecatedSynchronousErrorHandling: false,
|
|
744
|
-
useDeprecatedNextContext: false,
|
|
745
|
-
};
|
|
746
|
-
|
|
747
|
-
const timeoutProvider = {
|
|
748
|
-
setTimeout(handler, timeout, ...args) {
|
|
749
|
-
const { delegate } = timeoutProvider;
|
|
750
|
-
if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
|
|
751
|
-
return delegate.setTimeout(handler, timeout, ...args);
|
|
752
|
-
}
|
|
753
|
-
return setTimeout(handler, timeout, ...args);
|
|
754
|
-
},
|
|
755
|
-
clearTimeout(handle) {
|
|
756
|
-
const { delegate } = timeoutProvider;
|
|
757
|
-
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
|
758
|
-
},
|
|
759
|
-
delegate: undefined,
|
|
760
|
-
};
|
|
761
|
-
|
|
762
|
-
function reportUnhandledError(err) {
|
|
763
|
-
timeoutProvider.setTimeout(() => {
|
|
764
|
-
const { onUnhandledError } = config;
|
|
765
|
-
if (onUnhandledError) {
|
|
766
|
-
onUnhandledError(err);
|
|
767
|
-
}
|
|
768
|
-
else {
|
|
769
|
-
throw err;
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
function noop() { }
|
|
775
|
-
|
|
776
|
-
const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();
|
|
777
|
-
function errorNotification(error) {
|
|
778
|
-
return createNotification('E', undefined, error);
|
|
779
|
-
}
|
|
780
|
-
function nextNotification(value) {
|
|
781
|
-
return createNotification('N', value, undefined);
|
|
782
|
-
}
|
|
783
|
-
function createNotification(kind, value, error) {
|
|
784
|
-
return {
|
|
785
|
-
kind,
|
|
786
|
-
value,
|
|
787
|
-
error,
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
let context = null;
|
|
792
|
-
function errorContext(cb) {
|
|
793
|
-
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
794
|
-
const isRoot = !context;
|
|
795
|
-
if (isRoot) {
|
|
796
|
-
context = { errorThrown: false, error: null };
|
|
797
|
-
}
|
|
798
|
-
cb();
|
|
799
|
-
if (isRoot) {
|
|
800
|
-
const { errorThrown, error } = context;
|
|
801
|
-
context = null;
|
|
802
|
-
if (errorThrown) {
|
|
803
|
-
throw error;
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
else {
|
|
808
|
-
cb();
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
class Subscriber extends Subscription {
|
|
813
|
-
constructor(destination) {
|
|
814
|
-
super();
|
|
815
|
-
this.isStopped = false;
|
|
816
|
-
if (destination) {
|
|
817
|
-
this.destination = destination;
|
|
818
|
-
if (isSubscription(destination)) {
|
|
819
|
-
destination.add(this);
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
else {
|
|
823
|
-
this.destination = EMPTY_OBSERVER;
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
static create(next, error, complete) {
|
|
827
|
-
return new SafeSubscriber(next, error, complete);
|
|
828
|
-
}
|
|
829
|
-
next(value) {
|
|
830
|
-
if (this.isStopped) {
|
|
831
|
-
handleStoppedNotification(nextNotification(value), this);
|
|
832
|
-
}
|
|
833
|
-
else {
|
|
834
|
-
this._next(value);
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
error(err) {
|
|
838
|
-
if (this.isStopped) {
|
|
839
|
-
handleStoppedNotification(errorNotification(err), this);
|
|
840
|
-
}
|
|
841
|
-
else {
|
|
842
|
-
this.isStopped = true;
|
|
843
|
-
this._error(err);
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
complete() {
|
|
847
|
-
if (this.isStopped) {
|
|
848
|
-
handleStoppedNotification(COMPLETE_NOTIFICATION, this);
|
|
849
|
-
}
|
|
850
|
-
else {
|
|
851
|
-
this.isStopped = true;
|
|
852
|
-
this._complete();
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
unsubscribe() {
|
|
856
|
-
if (!this.closed) {
|
|
857
|
-
this.isStopped = true;
|
|
858
|
-
super.unsubscribe();
|
|
859
|
-
this.destination = null;
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
_next(value) {
|
|
863
|
-
this.destination.next(value);
|
|
864
|
-
}
|
|
865
|
-
_error(err) {
|
|
866
|
-
try {
|
|
867
|
-
this.destination.error(err);
|
|
868
|
-
}
|
|
869
|
-
finally {
|
|
870
|
-
this.unsubscribe();
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
_complete() {
|
|
874
|
-
try {
|
|
875
|
-
this.destination.complete();
|
|
876
|
-
}
|
|
877
|
-
finally {
|
|
878
|
-
this.unsubscribe();
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
const _bind = Function.prototype.bind;
|
|
883
|
-
function bind(fn, thisArg) {
|
|
884
|
-
return _bind.call(fn, thisArg);
|
|
885
|
-
}
|
|
886
|
-
class ConsumerObserver {
|
|
887
|
-
constructor(partialObserver) {
|
|
888
|
-
this.partialObserver = partialObserver;
|
|
889
|
-
}
|
|
890
|
-
next(value) {
|
|
891
|
-
const { partialObserver } = this;
|
|
892
|
-
if (partialObserver.next) {
|
|
893
|
-
try {
|
|
894
|
-
partialObserver.next(value);
|
|
895
|
-
}
|
|
896
|
-
catch (error) {
|
|
897
|
-
handleUnhandledError(error);
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
error(err) {
|
|
902
|
-
const { partialObserver } = this;
|
|
903
|
-
if (partialObserver.error) {
|
|
904
|
-
try {
|
|
905
|
-
partialObserver.error(err);
|
|
906
|
-
}
|
|
907
|
-
catch (error) {
|
|
908
|
-
handleUnhandledError(error);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
else {
|
|
912
|
-
handleUnhandledError(err);
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
complete() {
|
|
916
|
-
const { partialObserver } = this;
|
|
917
|
-
if (partialObserver.complete) {
|
|
918
|
-
try {
|
|
919
|
-
partialObserver.complete();
|
|
920
|
-
}
|
|
921
|
-
catch (error) {
|
|
922
|
-
handleUnhandledError(error);
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
class SafeSubscriber extends Subscriber {
|
|
928
|
-
constructor(observerOrNext, error, complete) {
|
|
929
|
-
super();
|
|
930
|
-
let partialObserver;
|
|
931
|
-
if (isFunction(observerOrNext) || !observerOrNext) {
|
|
932
|
-
partialObserver = {
|
|
933
|
-
next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),
|
|
934
|
-
error: error !== null && error !== void 0 ? error : undefined,
|
|
935
|
-
complete: complete !== null && complete !== void 0 ? complete : undefined,
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
else {
|
|
939
|
-
let context;
|
|
940
|
-
if (this && config.useDeprecatedNextContext) {
|
|
941
|
-
context = Object.create(observerOrNext);
|
|
942
|
-
context.unsubscribe = () => this.unsubscribe();
|
|
943
|
-
partialObserver = {
|
|
944
|
-
next: observerOrNext.next && bind(observerOrNext.next, context),
|
|
945
|
-
error: observerOrNext.error && bind(observerOrNext.error, context),
|
|
946
|
-
complete: observerOrNext.complete && bind(observerOrNext.complete, context),
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
else {
|
|
950
|
-
partialObserver = observerOrNext;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
this.destination = new ConsumerObserver(partialObserver);
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
function handleUnhandledError(error) {
|
|
957
|
-
{
|
|
958
|
-
reportUnhandledError(error);
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
function defaultErrorHandler(err) {
|
|
962
|
-
throw err;
|
|
963
|
-
}
|
|
964
|
-
function handleStoppedNotification(notification, subscriber) {
|
|
965
|
-
const { onStoppedNotification } = config;
|
|
966
|
-
onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));
|
|
967
|
-
}
|
|
968
|
-
const EMPTY_OBSERVER = {
|
|
969
|
-
closed: true,
|
|
970
|
-
next: noop,
|
|
971
|
-
error: defaultErrorHandler,
|
|
972
|
-
complete: noop,
|
|
973
|
-
};
|
|
974
|
-
|
|
975
|
-
const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();
|
|
976
|
-
|
|
977
|
-
function identity(x) {
|
|
978
|
-
return x;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
function pipeFromArray(fns) {
|
|
982
|
-
if (fns.length === 0) {
|
|
983
|
-
return identity;
|
|
984
|
-
}
|
|
985
|
-
if (fns.length === 1) {
|
|
986
|
-
return fns[0];
|
|
987
|
-
}
|
|
988
|
-
return function piped(input) {
|
|
989
|
-
return fns.reduce((prev, fn) => fn(prev), input);
|
|
990
|
-
};
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
class Observable {
|
|
994
|
-
constructor(subscribe) {
|
|
995
|
-
if (subscribe) {
|
|
996
|
-
this._subscribe = subscribe;
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
lift(operator) {
|
|
1000
|
-
const observable = new Observable();
|
|
1001
|
-
observable.source = this;
|
|
1002
|
-
observable.operator = operator;
|
|
1003
|
-
return observable;
|
|
1004
|
-
}
|
|
1005
|
-
subscribe(observerOrNext, error, complete) {
|
|
1006
|
-
const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
|
1007
|
-
errorContext(() => {
|
|
1008
|
-
const { operator, source } = this;
|
|
1009
|
-
subscriber.add(operator
|
|
1010
|
-
?
|
|
1011
|
-
operator.call(subscriber, source)
|
|
1012
|
-
: source
|
|
1013
|
-
?
|
|
1014
|
-
this._subscribe(subscriber)
|
|
1015
|
-
:
|
|
1016
|
-
this._trySubscribe(subscriber));
|
|
1017
|
-
});
|
|
1018
|
-
return subscriber;
|
|
1019
|
-
}
|
|
1020
|
-
_trySubscribe(sink) {
|
|
1021
|
-
try {
|
|
1022
|
-
return this._subscribe(sink);
|
|
1023
|
-
}
|
|
1024
|
-
catch (err) {
|
|
1025
|
-
sink.error(err);
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
forEach(next, promiseCtor) {
|
|
1029
|
-
promiseCtor = getPromiseCtor(promiseCtor);
|
|
1030
|
-
return new promiseCtor((resolve, reject) => {
|
|
1031
|
-
const subscriber = new SafeSubscriber({
|
|
1032
|
-
next: (value) => {
|
|
1033
|
-
try {
|
|
1034
|
-
next(value);
|
|
1035
|
-
}
|
|
1036
|
-
catch (err) {
|
|
1037
|
-
reject(err);
|
|
1038
|
-
subscriber.unsubscribe();
|
|
1039
|
-
}
|
|
1040
|
-
},
|
|
1041
|
-
error: reject,
|
|
1042
|
-
complete: resolve,
|
|
1043
|
-
});
|
|
1044
|
-
this.subscribe(subscriber);
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
_subscribe(subscriber) {
|
|
1048
|
-
var _a;
|
|
1049
|
-
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
|
|
1050
|
-
}
|
|
1051
|
-
[observable]() {
|
|
1052
|
-
return this;
|
|
1053
|
-
}
|
|
1054
|
-
pipe(...operations) {
|
|
1055
|
-
return pipeFromArray(operations)(this);
|
|
1056
|
-
}
|
|
1057
|
-
toPromise(promiseCtor) {
|
|
1058
|
-
promiseCtor = getPromiseCtor(promiseCtor);
|
|
1059
|
-
return new promiseCtor((resolve, reject) => {
|
|
1060
|
-
let value;
|
|
1061
|
-
this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
Observable.create = (subscribe) => {
|
|
1066
|
-
return new Observable(subscribe);
|
|
1067
|
-
};
|
|
1068
|
-
function getPromiseCtor(promiseCtor) {
|
|
1069
|
-
var _a;
|
|
1070
|
-
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
1071
|
-
}
|
|
1072
|
-
function isObserver(value) {
|
|
1073
|
-
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
|
|
1074
|
-
}
|
|
1075
|
-
function isSubscriber(value) {
|
|
1076
|
-
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
function hasLift(source) {
|
|
1080
|
-
return isFunction(source === null || source === void 0 ? void 0 : source.lift);
|
|
1081
|
-
}
|
|
1082
|
-
function operate(init) {
|
|
1083
|
-
return (source) => {
|
|
1084
|
-
if (hasLift(source)) {
|
|
1085
|
-
return source.lift(function (liftedSource) {
|
|
1086
|
-
try {
|
|
1087
|
-
return init(liftedSource, this);
|
|
1088
|
-
}
|
|
1089
|
-
catch (err) {
|
|
1090
|
-
this.error(err);
|
|
1091
|
-
}
|
|
1092
|
-
});
|
|
1093
|
-
}
|
|
1094
|
-
throw new TypeError('Unable to lift unknown Observable type');
|
|
1095
|
-
};
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {
|
|
1099
|
-
return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);
|
|
1100
|
-
}
|
|
1101
|
-
class OperatorSubscriber extends Subscriber {
|
|
1102
|
-
constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
|
|
1103
|
-
super(destination);
|
|
1104
|
-
this.onFinalize = onFinalize;
|
|
1105
|
-
this.shouldUnsubscribe = shouldUnsubscribe;
|
|
1106
|
-
this._next = onNext
|
|
1107
|
-
? function (value) {
|
|
1108
|
-
try {
|
|
1109
|
-
onNext(value);
|
|
1110
|
-
}
|
|
1111
|
-
catch (err) {
|
|
1112
|
-
destination.error(err);
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
: super._next;
|
|
1116
|
-
this._error = onError
|
|
1117
|
-
? function (err) {
|
|
1118
|
-
try {
|
|
1119
|
-
onError(err);
|
|
1120
|
-
}
|
|
1121
|
-
catch (err) {
|
|
1122
|
-
destination.error(err);
|
|
1123
|
-
}
|
|
1124
|
-
finally {
|
|
1125
|
-
this.unsubscribe();
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
: super._error;
|
|
1129
|
-
this._complete = onComplete
|
|
1130
|
-
? function () {
|
|
1131
|
-
try {
|
|
1132
|
-
onComplete();
|
|
1133
|
-
}
|
|
1134
|
-
catch (err) {
|
|
1135
|
-
destination.error(err);
|
|
1136
|
-
}
|
|
1137
|
-
finally {
|
|
1138
|
-
this.unsubscribe();
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
: super._complete;
|
|
1142
|
-
}
|
|
1143
|
-
unsubscribe() {
|
|
1144
|
-
var _a;
|
|
1145
|
-
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
1146
|
-
const { closed } = this;
|
|
1147
|
-
super.unsubscribe();
|
|
1148
|
-
!closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
function isScheduler(value) {
|
|
1154
|
-
return value && isFunction(value.schedule);
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
function last(arr) {
|
|
1158
|
-
return arr[arr.length - 1];
|
|
1159
|
-
}
|
|
1160
|
-
function popScheduler(args) {
|
|
1161
|
-
return isScheduler(last(args)) ? args.pop() : undefined;
|
|
1162
|
-
}
|
|
1163
|
-
function popNumber(args, defaultValue) {
|
|
1164
|
-
return typeof last(args) === 'number' ? args.pop() : defaultValue;
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
/******************************************************************************
|
|
1168
|
-
Copyright (c) Microsoft Corporation.
|
|
1169
|
-
|
|
1170
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1171
|
-
purpose with or without fee is hereby granted.
|
|
1172
|
-
|
|
1173
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1174
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1175
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1176
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1177
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1178
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1179
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1180
|
-
***************************************************************************** */
|
|
1181
|
-
|
|
1182
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1183
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1184
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1185
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1186
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1187
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1188
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
function __values(o) {
|
|
1193
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1194
|
-
if (m) return m.call(o);
|
|
1195
|
-
if (o && typeof o.length === "number") return {
|
|
1196
|
-
next: function () {
|
|
1197
|
-
if (o && i >= o.length) o = void 0;
|
|
1198
|
-
return { value: o && o[i++], done: !o };
|
|
1199
|
-
}
|
|
1200
|
-
};
|
|
1201
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
function __await(v) {
|
|
1205
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
1209
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1210
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
1211
|
-
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
1212
|
-
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
1213
|
-
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
1214
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
1215
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
1216
|
-
function fulfill(value) { resume("next", value); }
|
|
1217
|
-
function reject(value) { resume("throw", value); }
|
|
1218
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
function __asyncValues(o) {
|
|
1222
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1223
|
-
var m = o[Symbol.asyncIterator], i;
|
|
1224
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
1225
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
1226
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1230
|
-
var e = new Error(message);
|
|
1231
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1232
|
-
};
|
|
1233
|
-
|
|
1234
|
-
const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');
|
|
1235
|
-
|
|
1236
|
-
function isPromise(value) {
|
|
1237
|
-
return isFunction(value === null || value === void 0 ? void 0 : value.then);
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
function isInteropObservable(input) {
|
|
1241
|
-
return isFunction(input[observable]);
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
function isAsyncIterable(obj) {
|
|
1245
|
-
return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
function createInvalidObservableTypeError(input) {
|
|
1249
|
-
return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
function getSymbolIterator() {
|
|
1253
|
-
if (typeof Symbol !== 'function' || !Symbol.iterator) {
|
|
1254
|
-
return '@@iterator';
|
|
1255
|
-
}
|
|
1256
|
-
return Symbol.iterator;
|
|
1257
|
-
}
|
|
1258
|
-
const iterator = getSymbolIterator();
|
|
1259
|
-
|
|
1260
|
-
function isIterable(input) {
|
|
1261
|
-
return isFunction(input === null || input === void 0 ? void 0 : input[iterator]);
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
function readableStreamLikeToAsyncGenerator(readableStream) {
|
|
1265
|
-
return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {
|
|
1266
|
-
const reader = readableStream.getReader();
|
|
1267
|
-
try {
|
|
1268
|
-
while (true) {
|
|
1269
|
-
const { value, done } = yield __await(reader.read());
|
|
1270
|
-
if (done) {
|
|
1271
|
-
return yield __await(void 0);
|
|
1272
|
-
}
|
|
1273
|
-
yield yield __await(value);
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
finally {
|
|
1277
|
-
reader.releaseLock();
|
|
1278
|
-
}
|
|
1279
|
-
});
|
|
1280
|
-
}
|
|
1281
|
-
function isReadableStreamLike(obj) {
|
|
1282
|
-
return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
function innerFrom(input) {
|
|
1286
|
-
if (input instanceof Observable) {
|
|
1287
|
-
return input;
|
|
1288
|
-
}
|
|
1289
|
-
if (input != null) {
|
|
1290
|
-
if (isInteropObservable(input)) {
|
|
1291
|
-
return fromInteropObservable(input);
|
|
1292
|
-
}
|
|
1293
|
-
if (isArrayLike(input)) {
|
|
1294
|
-
return fromArrayLike(input);
|
|
1295
|
-
}
|
|
1296
|
-
if (isPromise(input)) {
|
|
1297
|
-
return fromPromise(input);
|
|
1298
|
-
}
|
|
1299
|
-
if (isAsyncIterable(input)) {
|
|
1300
|
-
return fromAsyncIterable(input);
|
|
1301
|
-
}
|
|
1302
|
-
if (isIterable(input)) {
|
|
1303
|
-
return fromIterable(input);
|
|
1304
|
-
}
|
|
1305
|
-
if (isReadableStreamLike(input)) {
|
|
1306
|
-
return fromReadableStreamLike(input);
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
throw createInvalidObservableTypeError(input);
|
|
1310
|
-
}
|
|
1311
|
-
function fromInteropObservable(obj) {
|
|
1312
|
-
return new Observable((subscriber) => {
|
|
1313
|
-
const obs = obj[observable]();
|
|
1314
|
-
if (isFunction(obs.subscribe)) {
|
|
1315
|
-
return obs.subscribe(subscriber);
|
|
1316
|
-
}
|
|
1317
|
-
throw new TypeError('Provided object does not correctly implement Symbol.observable');
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
function fromArrayLike(array) {
|
|
1321
|
-
return new Observable((subscriber) => {
|
|
1322
|
-
for (let i = 0; i < array.length && !subscriber.closed; i++) {
|
|
1323
|
-
subscriber.next(array[i]);
|
|
1324
|
-
}
|
|
1325
|
-
subscriber.complete();
|
|
1326
|
-
});
|
|
1327
|
-
}
|
|
1328
|
-
function fromPromise(promise) {
|
|
1329
|
-
return new Observable((subscriber) => {
|
|
1330
|
-
promise
|
|
1331
|
-
.then((value) => {
|
|
1332
|
-
if (!subscriber.closed) {
|
|
1333
|
-
subscriber.next(value);
|
|
1334
|
-
subscriber.complete();
|
|
1335
|
-
}
|
|
1336
|
-
}, (err) => subscriber.error(err))
|
|
1337
|
-
.then(null, reportUnhandledError);
|
|
1338
|
-
});
|
|
1339
|
-
}
|
|
1340
|
-
function fromIterable(iterable) {
|
|
1341
|
-
return new Observable((subscriber) => {
|
|
1342
|
-
for (const value of iterable) {
|
|
1343
|
-
subscriber.next(value);
|
|
1344
|
-
if (subscriber.closed) {
|
|
1345
|
-
return;
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
subscriber.complete();
|
|
1349
|
-
});
|
|
1350
|
-
}
|
|
1351
|
-
function fromAsyncIterable(asyncIterable) {
|
|
1352
|
-
return new Observable((subscriber) => {
|
|
1353
|
-
process(asyncIterable, subscriber).catch((err) => subscriber.error(err));
|
|
1354
|
-
});
|
|
1355
|
-
}
|
|
1356
|
-
function fromReadableStreamLike(readableStream) {
|
|
1357
|
-
return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
|
|
1358
|
-
}
|
|
1359
|
-
function process(asyncIterable, subscriber) {
|
|
1360
|
-
var asyncIterable_1, asyncIterable_1_1;
|
|
1361
|
-
var e_1, _a;
|
|
1362
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1363
|
-
try {
|
|
1364
|
-
for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {
|
|
1365
|
-
const value = asyncIterable_1_1.value;
|
|
1366
|
-
subscriber.next(value);
|
|
1367
|
-
if (subscriber.closed) {
|
|
1368
|
-
return;
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1373
|
-
finally {
|
|
1374
|
-
try {
|
|
1375
|
-
if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);
|
|
1376
|
-
}
|
|
1377
|
-
finally { if (e_1) throw e_1.error; }
|
|
1378
|
-
}
|
|
1379
|
-
subscriber.complete();
|
|
1380
|
-
});
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {
|
|
1384
|
-
const scheduleSubscription = scheduler.schedule(function () {
|
|
1385
|
-
work();
|
|
1386
|
-
if (repeat) {
|
|
1387
|
-
parentSubscription.add(this.schedule(null, delay));
|
|
1388
|
-
}
|
|
1389
|
-
else {
|
|
1390
|
-
this.unsubscribe();
|
|
1391
|
-
}
|
|
1392
|
-
}, delay);
|
|
1393
|
-
parentSubscription.add(scheduleSubscription);
|
|
1394
|
-
if (!repeat) {
|
|
1395
|
-
return scheduleSubscription;
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
function observeOn(scheduler, delay = 0) {
|
|
1400
|
-
return operate((source, subscriber) => {
|
|
1401
|
-
source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));
|
|
1402
|
-
});
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
function subscribeOn(scheduler, delay = 0) {
|
|
1406
|
-
return operate((source, subscriber) => {
|
|
1407
|
-
subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
function scheduleObservable(input, scheduler) {
|
|
1412
|
-
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
function schedulePromise(input, scheduler) {
|
|
1416
|
-
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
function scheduleArray(input, scheduler) {
|
|
1420
|
-
return new Observable((subscriber) => {
|
|
1421
|
-
let i = 0;
|
|
1422
|
-
return scheduler.schedule(function () {
|
|
1423
|
-
if (i === input.length) {
|
|
1424
|
-
subscriber.complete();
|
|
1425
|
-
}
|
|
1426
|
-
else {
|
|
1427
|
-
subscriber.next(input[i++]);
|
|
1428
|
-
if (!subscriber.closed) {
|
|
1429
|
-
this.schedule();
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
});
|
|
1433
|
-
});
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
function scheduleIterable(input, scheduler) {
|
|
1437
|
-
return new Observable((subscriber) => {
|
|
1438
|
-
let iterator$1;
|
|
1439
|
-
executeSchedule(subscriber, scheduler, () => {
|
|
1440
|
-
iterator$1 = input[iterator]();
|
|
1441
|
-
executeSchedule(subscriber, scheduler, () => {
|
|
1442
|
-
let value;
|
|
1443
|
-
let done;
|
|
1444
|
-
try {
|
|
1445
|
-
({ value, done } = iterator$1.next());
|
|
1446
|
-
}
|
|
1447
|
-
catch (err) {
|
|
1448
|
-
subscriber.error(err);
|
|
1449
|
-
return;
|
|
1450
|
-
}
|
|
1451
|
-
if (done) {
|
|
1452
|
-
subscriber.complete();
|
|
1453
|
-
}
|
|
1454
|
-
else {
|
|
1455
|
-
subscriber.next(value);
|
|
1456
|
-
}
|
|
1457
|
-
}, 0, true);
|
|
1458
|
-
});
|
|
1459
|
-
return () => isFunction(iterator$1 === null || iterator$1 === void 0 ? void 0 : iterator$1.return) && iterator$1.return();
|
|
1460
|
-
});
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
function scheduleAsyncIterable(input, scheduler) {
|
|
1464
|
-
if (!input) {
|
|
1465
|
-
throw new Error('Iterable cannot be null');
|
|
1466
|
-
}
|
|
1467
|
-
return new Observable((subscriber) => {
|
|
1468
|
-
executeSchedule(subscriber, scheduler, () => {
|
|
1469
|
-
const iterator = input[Symbol.asyncIterator]();
|
|
1470
|
-
executeSchedule(subscriber, scheduler, () => {
|
|
1471
|
-
iterator.next().then((result) => {
|
|
1472
|
-
if (result.done) {
|
|
1473
|
-
subscriber.complete();
|
|
1474
|
-
}
|
|
1475
|
-
else {
|
|
1476
|
-
subscriber.next(result.value);
|
|
1477
|
-
}
|
|
1478
|
-
});
|
|
1479
|
-
}, 0, true);
|
|
1480
|
-
});
|
|
1481
|
-
});
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
function scheduleReadableStreamLike(input, scheduler) {
|
|
1485
|
-
return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
function scheduled(input, scheduler) {
|
|
1489
|
-
if (input != null) {
|
|
1490
|
-
if (isInteropObservable(input)) {
|
|
1491
|
-
return scheduleObservable(input, scheduler);
|
|
1492
|
-
}
|
|
1493
|
-
if (isArrayLike(input)) {
|
|
1494
|
-
return scheduleArray(input, scheduler);
|
|
1495
|
-
}
|
|
1496
|
-
if (isPromise(input)) {
|
|
1497
|
-
return schedulePromise(input, scheduler);
|
|
1498
|
-
}
|
|
1499
|
-
if (isAsyncIterable(input)) {
|
|
1500
|
-
return scheduleAsyncIterable(input, scheduler);
|
|
1501
|
-
}
|
|
1502
|
-
if (isIterable(input)) {
|
|
1503
|
-
return scheduleIterable(input, scheduler);
|
|
1504
|
-
}
|
|
1505
|
-
if (isReadableStreamLike(input)) {
|
|
1506
|
-
return scheduleReadableStreamLike(input, scheduler);
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
throw createInvalidObservableTypeError(input);
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
function from(input, scheduler) {
|
|
1513
|
-
return scheduler ? scheduled(input, scheduler) : innerFrom(input);
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
function of(...args) {
|
|
1517
|
-
const scheduler = popScheduler(args);
|
|
1518
|
-
return from(args, scheduler);
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
export { CatI18nRegistry as C, EMPTY_SUBSCRIPTION as E, Observable as O, Subscription as S, catI18nRegistry as a, CatIconRegistry as b, commonjsGlobal as c, catIconRegistry as d, createErrorClass as e, errorContext as f, arrRemove as g, operate as h, createOperatorSubscriber as i, innerFrom as j, executeSchedule as k, isFunction as l, identity as m, from as n, of as o, popScheduler as p, isArrayLike as q, isScheduler as r, popNumber as s, noop as t, log as u };
|
|
1522
|
-
|
|
1523
|
-
//# sourceMappingURL=of-e4ec2eb4.js.map
|