@zonos/elements 1.3.204 → 1.3.206
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/{cart-0d91ad0b.js → cart-3d961c6e.js} +6 -5
- package/dist/cjs/{debounce-94e1b7ff.js → debounce-0b9c0f8a.js} +1 -1
- package/dist/cjs/{getBorderRadius-8d3b1049.js → getBorderRadius-c424eb05.js} +1 -1
- package/dist/cjs/{index-0993f42d.js → index-1c710d00.js} +455 -377
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{isDarkColor-bcf49625.js → isDarkColor-35e8daec.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-2f17c95f.js → localization-ff33875b.js} +421 -182
- package/dist/cjs/{paypal-9953115b.js → paypal-dee5c109.js} +4 -4
- package/dist/cjs/zonos-address_11.cjs.entry.js +273 -121
- package/dist/cjs/zonos-badge.cjs.entry.js +26 -4
- package/dist/cjs/zonos-banner.cjs.entry.js +6 -5
- package/dist/cjs/zonos-button_3.cjs.entry.js +89 -24
- package/dist/cjs/zonos-card.cjs.entry.js +10 -9
- package/dist/cjs/zonos-cart-items_14.cjs.entry.js +193 -74
- package/dist/cjs/zonos-checkout.cjs.entry.js +90 -35
- package/dist/cjs/zonos-collapse.cjs.entry.js +8 -2
- package/dist/cjs/zonos-component.cjs.entry.js +10 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -8
- package/dist/cjs/zonos-country-flag.cjs.entry.js +8 -4
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +52 -24
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +11 -10
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +102 -36
- package/dist/cjs/zonos-hello.cjs.entry.js +29 -17
- package/dist/cjs/zonos-input.cjs.entry.js +18 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +15 -4
- package/dist/cjs/zonos-link.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +8 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +8 -8
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +25 -9
- package/dist/cjs/zonos-text.cjs.entry.js +11 -4
- package/dist/cjs/zonos-toggle.cjs.entry.js +5 -3
- package/dist/cjs/zonos-tooltip.cjs.entry.js +7 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +6 -2
- package/dist/cjs/{zonosStore-9264749e.js → zonosStore-7c1e1bc1.js} +4 -5
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +0 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +24 -13
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +6 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +14 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +25 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +83 -28
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +54 -17
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +8 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +20 -12
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +24 -2
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +69 -18
- package/dist/collection/components/common/zonos-card/zonos-card.js +7 -6
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +15 -2
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +8 -2
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +6 -0
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +34 -9
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +5 -1
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +6 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +6 -0
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +48 -14
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +12 -1
- package/dist/collection/components/common/zonos-input/zonos-input.js +15 -1
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +5 -1
- package/dist/collection/components/common/zonos-link/zonos-link.js +3 -3
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +7 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +6 -0
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +4 -4
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +7 -0
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +5 -5
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +21 -5
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +19 -14
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +37 -12
- package/dist/collection/components/common/zonos-text/zonos-text.js +9 -2
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +3 -1
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +6 -0
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +4 -0
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -7
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +9 -0
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +25 -13
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +8 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +0 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +98 -32
- package/dist/collection/components/main/zonos-controller.js +0 -4
- package/dist/collection/components/store/checkout/stripe.js +2 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +21 -9
- package/dist/collection/components/store/translationStore/strings.base.js +21 -10
- package/dist/collection/components/store/translationStore/strings.chinese.js +21 -9
- package/dist/collection/components/store/translationStore/strings.danish.js +21 -9
- package/dist/collection/components/store/translationStore/strings.dutch.js +21 -9
- package/dist/collection/components/store/translationStore/strings.french.js +21 -9
- package/dist/collection/components/store/translationStore/strings.german.js +21 -9
- package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -9
- package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -9
- package/dist/collection/components/store/translationStore/strings.italian.js +21 -9
- package/dist/collection/components/store/translationStore/strings.japanese.js +21 -9
- package/dist/collection/components/store/translationStore/strings.korean.js +21 -9
- package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -9
- package/dist/collection/components/store/translationStore/strings.polish.js +21 -9
- package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -9
- package/dist/collection/components/store/translationStore/strings.russian.js +21 -9
- package/dist/collection/components/store/translationStore/strings.spanish.js +21 -9
- package/dist/collection/components/store/translationStore/strings.swedish.js +21 -9
- package/dist/collection/components/store/translationStore/strings.turkish.js +21 -9
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -9
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +21 -8
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +13 -5
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +73 -33
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +11 -6
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -2
- package/dist/esm/{cart-db61eb95.js → cart-5835676d.js} +7 -6
- package/dist/esm/{debounce-3a9f27a0.js → debounce-eaee3a94.js} +1 -1
- package/dist/esm/{getBorderRadius-78b28b4d.js → getBorderRadius-b18c924f.js} +1 -1
- package/dist/esm/{index-a457c60c.js → index-5ea9f81d.js} +455 -377
- package/dist/esm/index.js +7 -7
- package/dist/esm/{isDarkColor-31dd7dff.js → isDarkColor-d8bb8659.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{localization-bf7224aa.js → localization-4c7f64e8.js} +421 -182
- package/dist/esm/{paypal-2e0ffb07.js → paypal-b4f106be.js} +4 -4
- package/dist/esm/zonos-address_11.entry.js +273 -121
- package/dist/esm/zonos-badge.entry.js +26 -4
- package/dist/esm/zonos-banner.entry.js +6 -5
- package/dist/esm/zonos-button_3.entry.js +89 -24
- package/dist/esm/zonos-card.entry.js +10 -9
- package/dist/esm/zonos-cart-items_14.entry.js +193 -74
- package/dist/esm/zonos-checkout.entry.js +90 -35
- package/dist/esm/zonos-collapse.entry.js +8 -2
- package/dist/esm/zonos-component.entry.js +10 -1
- package/dist/esm/zonos-controller.entry.js +6 -8
- package/dist/esm/zonos-country-flag.entry.js +8 -4
- package/dist/esm/zonos-country-select_4.entry.js +52 -24
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-empty-state-payment_4.entry.js +11 -10
- package/dist/esm/zonos-hello-dialog.entry.js +102 -36
- package/dist/esm/zonos-hello.entry.js +29 -17
- package/dist/esm/zonos-input.entry.js +18 -4
- package/dist/esm/zonos-language-select_2.entry.js +15 -4
- package/dist/esm/zonos-link.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +8 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +8 -8
- package/dist/esm/zonos-stripe-input.entry.js +25 -9
- package/dist/esm/zonos-text.entry.js +11 -4
- package/dist/esm/zonos-toggle.entry.js +5 -3
- package/dist/esm/zonos-tooltip.entry.js +7 -1
- package/dist/esm/zonos-v-stack.entry.js +6 -2
- package/dist/esm/{zonosStore-d10a829f.js → zonosStore-1e015fa5.js} +4 -5
- package/dist/esm-es5/{cart-db61eb95.js → cart-5835676d.js} +1 -1
- package/dist/esm-es5/{debounce-3a9f27a0.js → debounce-eaee3a94.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-78b28b4d.js → getBorderRadius-b18c924f.js} +1 -1
- package/dist/esm-es5/index-5ea9f81d.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-31dd7dff.js → isDarkColor-d8bb8659.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-4c7f64e8.js +1 -0
- package/dist/esm-es5/{paypal-2e0ffb07.js → paypal-b4f106be.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-d10a829f.js → zonosStore-1e015fa5.js} +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.base.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.french.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.german.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -6
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -6
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-019f8637.entry.js +1 -0
- package/dist/zonos-elements/p-02da743b.system.js +2 -0
- package/dist/zonos-elements/p-051e0e48.entry.js +1 -0
- package/dist/zonos-elements/p-0c4c8d63.entry.js +1 -0
- package/dist/zonos-elements/p-12cd9d3a.entry.js +1 -0
- package/dist/zonos-elements/{p-d42dfd32.system.js → p-1327b935.system.js} +1 -1
- package/dist/zonos-elements/p-1640d77f.js +2 -0
- package/dist/zonos-elements/{p-3d82a352.js → p-16678764.js} +1 -1
- package/dist/zonos-elements/{p-c291bac1.entry.js → p-18149db1.entry.js} +1 -1
- package/dist/zonos-elements/{p-db025dfc.system.entry.js → p-1ad099ec.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c5fcbc92.system.entry.js → p-1bc09abe.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d46349d3.system.entry.js → p-22cb6880.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cdd3087f.system.entry.js → p-265af369.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9aa902e.system.entry.js → p-2866fd29.system.entry.js} +1 -1
- package/dist/zonos-elements/p-30778fde.system.entry.js +1 -0
- package/dist/zonos-elements/p-3196bf98.entry.js +1 -0
- package/dist/zonos-elements/p-3505e4c4.entry.js +1 -0
- package/dist/zonos-elements/p-3a50124e.entry.js +1 -0
- package/dist/zonos-elements/p-3afc27ef.entry.js +1 -0
- package/dist/zonos-elements/{p-ea6d87a1.system.js → p-3ee44728.system.js} +1 -1
- package/dist/zonos-elements/p-41c1d7c4.entry.js +1 -0
- package/dist/zonos-elements/p-42a9557f.entry.js +1 -0
- package/dist/zonos-elements/{p-f8d0d488.system.entry.js → p-469ccc66.system.entry.js} +1 -1
- package/dist/zonos-elements/p-47e2cd31.entry.js +1 -0
- package/dist/zonos-elements/p-4a3bb31d.entry.js +1 -0
- package/dist/zonos-elements/{p-26a634a5.system.entry.js → p-4cb8b87f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4e9c8f9e.system.js +1 -0
- package/dist/zonos-elements/{p-80bbd9c0.system.entry.js → p-4fb88ebc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-df4c46a6.entry.js → p-5616b304.entry.js} +1 -1
- package/dist/zonos-elements/{p-a9307caa.js → p-658936c9.js} +2 -2
- package/dist/zonos-elements/{p-6b6a9dd6.system.js → p-666164d9.system.js} +1 -1
- package/dist/zonos-elements/{p-3284f459.system.entry.js → p-719e14a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fbe36bc8.system.entry.js → p-7234f876.system.entry.js} +1 -1
- package/dist/zonos-elements/p-74bcb5cc.entry.js +1 -0
- package/dist/zonos-elements/{p-27987298.system.entry.js → p-7777d85f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aa1193bc.entry.js → p-848e08e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab176281.system.entry.js → p-858b7908.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0693422b.system.js → p-91c996d3.system.js} +1 -1
- package/dist/zonos-elements/{p-851c642e.system.entry.js → p-93aeba62.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9b8a5372.entry.js +1 -0
- package/dist/zonos-elements/{p-cb823c4d.system.js → p-9e9ac7a2.system.js} +1 -1
- package/dist/zonos-elements/p-9fa17353.js +1 -0
- package/dist/zonos-elements/{p-01987cb2.system.entry.js → p-a0f570ea.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a2b55d11.entry.js +1 -0
- package/dist/zonos-elements/p-aafcd40f.system.entry.js +1 -0
- package/dist/zonos-elements/p-abc83d01.entry.js +1 -0
- package/dist/zonos-elements/p-abe218ab.system.entry.js +1 -0
- package/dist/zonos-elements/{p-45ebc788.entry.js → p-b21b0330.entry.js} +1 -1
- package/dist/zonos-elements/{p-488ad646.system.entry.js → p-b50eaeac.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b922c441.system.js +1 -0
- package/dist/zonos-elements/p-ba027b70.system.entry.js +1 -0
- package/dist/zonos-elements/p-bab19e2a.entry.js +1 -0
- package/dist/zonos-elements/p-c4e0f49a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c50b3100.system.js → p-c666d557.system.js} +1 -1
- package/dist/zonos-elements/{p-f891d470.entry.js → p-c988cf84.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a71f76b.system.js → p-d5f7f7e6.system.js} +1 -1
- package/dist/zonos-elements/p-dbd23bea.entry.js +1 -0
- package/dist/zonos-elements/p-e0587eeb.entry.js +1 -0
- package/dist/zonos-elements/{p-72f37935.js → p-e337fa88.js} +1 -1
- package/dist/zonos-elements/{p-d6a10007.entry.js → p-e5152c04.entry.js} +1 -1
- package/dist/zonos-elements/p-ea88baa9.system.entry.js +1 -0
- package/dist/zonos-elements/p-eb2560b6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-452070af.system.entry.js → p-eca09508.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e26c9e83.js → p-ed20f2f7.js} +1 -1
- package/dist/zonos-elements/p-edcfb3a3.js +1 -0
- package/dist/zonos-elements/{p-be5afc91.system.entry.js → p-f4d741de.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5c74e5c9.system.entry.js → p-f8bfc320.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d99d9e00.js → p-f9664811.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +50 -40
- package/dist/esm-es5/index-a457c60c.js +0 -2
- package/dist/esm-es5/localization-bf7224aa.js +0 -1
- package/dist/zonos-elements/p-04b43dd5.entry.js +0 -1
- package/dist/zonos-elements/p-06f25f75.entry.js +0 -1
- package/dist/zonos-elements/p-0944fe64.entry.js +0 -1
- package/dist/zonos-elements/p-0c62cfb3.entry.js +0 -1
- package/dist/zonos-elements/p-1dcdb65f.system.entry.js +0 -1
- package/dist/zonos-elements/p-25970cb8.system.entry.js +0 -1
- package/dist/zonos-elements/p-43633269.system.js +0 -2
- package/dist/zonos-elements/p-4b5197e7.system.entry.js +0 -1
- package/dist/zonos-elements/p-4c81112f.entry.js +0 -1
- package/dist/zonos-elements/p-4efa8187.js +0 -1
- package/dist/zonos-elements/p-5170bc41.entry.js +0 -1
- package/dist/zonos-elements/p-5d0f7364.system.js +0 -1
- package/dist/zonos-elements/p-715d0f59.system.entry.js +0 -1
- package/dist/zonos-elements/p-7ae5cd60.entry.js +0 -1
- package/dist/zonos-elements/p-8d870d4c.entry.js +0 -1
- package/dist/zonos-elements/p-9af5e93a.entry.js +0 -1
- package/dist/zonos-elements/p-bc8bda92.entry.js +0 -1
- package/dist/zonos-elements/p-c137dc82.js +0 -2
- package/dist/zonos-elements/p-c3d2422e.entry.js +0 -1
- package/dist/zonos-elements/p-c66fc4e5.system.entry.js +0 -1
- package/dist/zonos-elements/p-c767242b.entry.js +0 -1
- package/dist/zonos-elements/p-cf6ae7dc.entry.js +0 -1
- package/dist/zonos-elements/p-d2165441.system.entry.js +0 -1
- package/dist/zonos-elements/p-dcd6acd4.system.entry.js +0 -1
- package/dist/zonos-elements/p-dd1cfa74.entry.js +0 -1
- package/dist/zonos-elements/p-dfd1ba1d.entry.js +0 -1
- package/dist/zonos-elements/p-e68d5219.entry.js +0 -1
- package/dist/zonos-elements/p-ef3e05e5.system.js +0 -1
- package/dist/zonos-elements/p-f255e822.js +0 -1
- package/dist/zonos-elements/p-f29edb65.entry.js +0 -1
- package/dist/zonos-elements/p-f655ec36.entry.js +0 -1
- package/dist/zonos-elements/p-fcc2e712.entry.js +0 -1
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
const NAMESPACE = 'zonos-elements';
|
|
2
|
-
const BUILD = /* zonos-elements */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false,
|
|
2
|
+
const BUILD = /* zonos-elements */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.27.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
12
|
+
|
|
13
|
+
// src/utils/constants.ts
|
|
14
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
15
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
+
|
|
17
|
+
// src/client/client-host-ref.ts
|
|
18
|
+
var getHostRef = (ref) => {
|
|
19
|
+
if (ref.__stencil__getHostRef) {
|
|
20
|
+
return ref.__stencil__getHostRef();
|
|
21
|
+
}
|
|
22
|
+
return void 0;
|
|
23
|
+
};
|
|
24
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
25
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
26
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
27
|
+
};
|
|
15
28
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
29
|
const hostRef = {
|
|
17
30
|
$flags$: 0,
|
|
@@ -27,7 +40,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
27
40
|
hostElement["s-p"] = [];
|
|
28
41
|
hostElement["s-rc"] = [];
|
|
29
42
|
}
|
|
30
|
-
|
|
43
|
+
const ref = hostRef;
|
|
44
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
45
|
+
return ref;
|
|
31
46
|
};
|
|
32
47
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
33
48
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -51,21 +66,26 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
51
66
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
52
67
|
/* webpackMode: "lazy" */
|
|
53
68
|
`./${bundleId}.entry.js${""}`
|
|
54
|
-
).then(
|
|
55
|
-
{
|
|
56
|
-
|
|
69
|
+
).then(
|
|
70
|
+
(importedModule) => {
|
|
71
|
+
{
|
|
72
|
+
cmpModules.set(bundleId, importedModule);
|
|
73
|
+
}
|
|
74
|
+
return importedModule[exportName];
|
|
75
|
+
},
|
|
76
|
+
(e) => {
|
|
77
|
+
consoleError(e, hostRef.$hostElement$);
|
|
57
78
|
}
|
|
58
|
-
|
|
59
|
-
}, consoleError);
|
|
79
|
+
);
|
|
60
80
|
};
|
|
61
81
|
|
|
62
82
|
// src/client/client-style.ts
|
|
63
83
|
var styles = /* @__PURE__ */ new Map();
|
|
84
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
64
85
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
65
86
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
66
87
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
67
88
|
var win = typeof window !== "undefined" ? window : {};
|
|
68
|
-
var doc = win.document || { head: {} };
|
|
69
89
|
var plt = {
|
|
70
90
|
$flags$: 0,
|
|
71
91
|
$resourcesUrl$: "",
|
|
@@ -76,9 +96,10 @@ var plt = {
|
|
|
76
96
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
77
97
|
};
|
|
78
98
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
99
|
+
var _a;
|
|
79
100
|
let supportsListenerOptions2 = false;
|
|
80
101
|
try {
|
|
81
|
-
|
|
102
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
82
103
|
"e",
|
|
83
104
|
null,
|
|
84
105
|
Object.defineProperty({}, "passive", {
|
|
@@ -142,22 +163,17 @@ var getAssetPath = (path) => {
|
|
|
142
163
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
143
164
|
};
|
|
144
165
|
|
|
145
|
-
// src/utils/constants.ts
|
|
146
|
-
var EMPTY_OBJ = {};
|
|
147
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
148
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
149
|
-
|
|
150
166
|
// src/utils/helpers.ts
|
|
151
|
-
var isDef = (v) => v != null;
|
|
167
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
152
168
|
var isComplexType = (o) => {
|
|
153
169
|
o = typeof o;
|
|
154
170
|
return o === "object" || o === "function";
|
|
155
171
|
};
|
|
156
172
|
|
|
157
173
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
158
|
-
function queryNonceMetaTagContent(
|
|
174
|
+
function queryNonceMetaTagContent(doc) {
|
|
159
175
|
var _a, _b, _c;
|
|
160
|
-
return (_c = (_b = (_a =
|
|
176
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
161
177
|
}
|
|
162
178
|
|
|
163
179
|
// src/utils/result.ts
|
|
@@ -208,6 +224,20 @@ var unwrapErr = (result) => {
|
|
|
208
224
|
throw result.value;
|
|
209
225
|
}
|
|
210
226
|
};
|
|
227
|
+
var createTime = (fnName, tagName = "") => {
|
|
228
|
+
{
|
|
229
|
+
return () => {
|
|
230
|
+
return;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
var uniqueTime = (key, measureText) => {
|
|
235
|
+
{
|
|
236
|
+
return () => {
|
|
237
|
+
return;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
};
|
|
211
241
|
var h = (nodeName, vnodeData, ...children) => {
|
|
212
242
|
let child = null;
|
|
213
243
|
let key = null;
|
|
@@ -309,128 +339,280 @@ var convertToPrivate = (node) => {
|
|
|
309
339
|
vnode.$name$ = node.vname;
|
|
310
340
|
return vnode;
|
|
311
341
|
};
|
|
312
|
-
var
|
|
313
|
-
if (
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
342
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
343
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
344
|
+
if (propType & 4 /* Boolean */) {
|
|
345
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
346
|
+
}
|
|
347
|
+
if (propType & 2 /* Number */) {
|
|
348
|
+
return parseFloat(propValue);
|
|
349
|
+
}
|
|
350
|
+
if (propType & 1 /* String */) {
|
|
351
|
+
return String(propValue);
|
|
352
|
+
}
|
|
353
|
+
return propValue;
|
|
354
|
+
}
|
|
355
|
+
return propValue;
|
|
356
|
+
};
|
|
357
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
358
|
+
|
|
359
|
+
// src/runtime/event-emitter.ts
|
|
360
|
+
var createEvent = (ref, name, flags) => {
|
|
361
|
+
const elm = getElement(ref);
|
|
362
|
+
return {
|
|
363
|
+
emit: (detail) => {
|
|
364
|
+
return emitEvent(elm, name, {
|
|
365
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
366
|
+
composed: !!(flags & 2 /* Composed */),
|
|
367
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
368
|
+
detail
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
var emitEvent = (elm, name, opts) => {
|
|
374
|
+
const ev = plt.ce(name, opts);
|
|
375
|
+
elm.dispatchEvent(ev);
|
|
376
|
+
return ev;
|
|
377
|
+
};
|
|
378
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
379
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
380
|
+
let style = styles.get(scopeId2);
|
|
381
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
382
|
+
style = style || new CSSStyleSheet();
|
|
383
|
+
if (typeof style === "string") {
|
|
384
|
+
style = cssText;
|
|
385
|
+
} else {
|
|
386
|
+
style.replaceSync(cssText);
|
|
387
|
+
}
|
|
388
|
+
} else {
|
|
389
|
+
style = cssText;
|
|
390
|
+
}
|
|
391
|
+
styles.set(scopeId2, style);
|
|
392
|
+
};
|
|
393
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
394
|
+
var _a;
|
|
395
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
396
|
+
const style = styles.get(scopeId2);
|
|
397
|
+
if (!win.document) {
|
|
398
|
+
return scopeId2;
|
|
399
|
+
}
|
|
400
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
401
|
+
if (style) {
|
|
402
|
+
if (typeof style === "string") {
|
|
403
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
404
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
405
|
+
let styleElm;
|
|
406
|
+
if (!appliedStyles) {
|
|
407
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
322
408
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
if (
|
|
329
|
-
|
|
330
|
-
|
|
409
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
410
|
+
{
|
|
411
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
412
|
+
styleElm.innerHTML = style;
|
|
413
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
414
|
+
if (nonce != null) {
|
|
415
|
+
styleElm.setAttribute("nonce", nonce);
|
|
416
|
+
}
|
|
417
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
418
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
419
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
420
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
421
|
+
styleContainerNode.insertBefore(
|
|
422
|
+
styleElm,
|
|
423
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
424
|
+
);
|
|
425
|
+
} else if ("host" in styleContainerNode) {
|
|
426
|
+
if (supportsConstructableStylesheets) {
|
|
427
|
+
const stylesheet = new CSSStyleSheet();
|
|
428
|
+
stylesheet.replaceSync(style);
|
|
429
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
430
|
+
} else {
|
|
431
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
432
|
+
if (existingStyleContainer) {
|
|
433
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
434
|
+
} else {
|
|
435
|
+
styleContainerNode.prepend(styleElm);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
331
438
|
} else {
|
|
332
|
-
|
|
439
|
+
styleContainerNode.append(styleElm);
|
|
333
440
|
}
|
|
334
441
|
}
|
|
442
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
443
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
447
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
448
|
+
}
|
|
449
|
+
if (appliedStyles) {
|
|
450
|
+
appliedStyles.add(scopeId2);
|
|
335
451
|
}
|
|
336
452
|
}
|
|
337
|
-
|
|
338
|
-
|
|
453
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
454
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return scopeId2;
|
|
458
|
+
};
|
|
459
|
+
var attachStyles = (hostRef) => {
|
|
460
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
461
|
+
const elm = hostRef.$hostElement$;
|
|
462
|
+
const flags = cmpMeta.$flags$;
|
|
463
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
464
|
+
const scopeId2 = addStyle(
|
|
465
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
466
|
+
cmpMeta);
|
|
467
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
468
|
+
elm["s-sc"] = scopeId2;
|
|
469
|
+
elm.classList.add(scopeId2 + "-h");
|
|
470
|
+
}
|
|
471
|
+
endAttachStyles();
|
|
472
|
+
};
|
|
473
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
474
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
475
|
+
if (oldValue === newValue) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
479
|
+
let ln = memberName.toLowerCase();
|
|
480
|
+
if (memberName === "class") {
|
|
481
|
+
const classList = elm.classList;
|
|
482
|
+
const oldClasses = parseClassList(oldValue);
|
|
483
|
+
let newClasses = parseClassList(newValue);
|
|
484
|
+
{
|
|
485
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
486
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
487
|
+
}
|
|
488
|
+
} else if (memberName === "style") {
|
|
489
|
+
{
|
|
490
|
+
for (const prop in oldValue) {
|
|
491
|
+
if (!newValue || newValue[prop] == null) {
|
|
339
492
|
if (prop.includes("-")) {
|
|
340
|
-
elm.style.
|
|
493
|
+
elm.style.removeProperty(prop);
|
|
341
494
|
} else {
|
|
342
|
-
elm.style[prop] =
|
|
495
|
+
elm.style[prop] = "";
|
|
343
496
|
}
|
|
344
497
|
}
|
|
345
498
|
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
} else if (isMemberInElement(win, ln)) {
|
|
354
|
-
memberName = ln.slice(2);
|
|
355
|
-
} else {
|
|
356
|
-
memberName = ln[2] + memberName.slice(3);
|
|
357
|
-
}
|
|
358
|
-
if (oldValue || newValue) {
|
|
359
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
360
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
361
|
-
if (oldValue) {
|
|
362
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
363
|
-
}
|
|
364
|
-
if (newValue) {
|
|
365
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
499
|
+
}
|
|
500
|
+
for (const prop in newValue) {
|
|
501
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
502
|
+
if (prop.includes("-")) {
|
|
503
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
504
|
+
} else {
|
|
505
|
+
elm.style[prop] = newValue[prop];
|
|
366
506
|
}
|
|
367
507
|
}
|
|
508
|
+
}
|
|
509
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
510
|
+
if (newValue) {
|
|
511
|
+
newValue(elm);
|
|
512
|
+
}
|
|
513
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
514
|
+
if (memberName[2] === "-") {
|
|
515
|
+
memberName = memberName.slice(3);
|
|
516
|
+
} else if (isMemberInElement(win, ln)) {
|
|
517
|
+
memberName = ln.slice(2);
|
|
368
518
|
} else {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
519
|
+
memberName = ln[2] + memberName.slice(3);
|
|
520
|
+
}
|
|
521
|
+
if (oldValue || newValue) {
|
|
522
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
523
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
524
|
+
if (oldValue) {
|
|
525
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
526
|
+
}
|
|
527
|
+
if (newValue) {
|
|
528
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
} else {
|
|
532
|
+
const isComplex = isComplexType(newValue);
|
|
533
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
534
|
+
try {
|
|
535
|
+
if (!elm.tagName.includes("-")) {
|
|
536
|
+
const n = newValue == null ? "" : newValue;
|
|
537
|
+
if (memberName === "list") {
|
|
538
|
+
isProp = false;
|
|
539
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
540
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
541
|
+
elm[memberName] = n;
|
|
542
|
+
} else {
|
|
543
|
+
elm.setAttribute(memberName, n);
|
|
382
544
|
}
|
|
383
|
-
} else {
|
|
384
|
-
elm[memberName] = newValue;
|
|
385
545
|
}
|
|
386
|
-
}
|
|
546
|
+
} else if (elm[memberName] !== newValue) {
|
|
547
|
+
elm[memberName] = newValue;
|
|
387
548
|
}
|
|
549
|
+
} catch (e) {
|
|
388
550
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
551
|
+
}
|
|
552
|
+
let xlink = false;
|
|
553
|
+
{
|
|
554
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
555
|
+
memberName = ln;
|
|
556
|
+
xlink = true;
|
|
395
557
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
400
|
-
} else {
|
|
401
|
-
elm.removeAttribute(memberName);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
405
|
-
newValue = newValue === true ? "" : newValue;
|
|
558
|
+
}
|
|
559
|
+
if (newValue == null || newValue === false) {
|
|
560
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
406
561
|
if (xlink) {
|
|
407
|
-
elm.
|
|
562
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
408
563
|
} else {
|
|
409
|
-
elm.
|
|
564
|
+
elm.removeAttribute(memberName);
|
|
410
565
|
}
|
|
411
566
|
}
|
|
567
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
568
|
+
newValue = newValue === true ? "" : newValue;
|
|
569
|
+
if (xlink) {
|
|
570
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
571
|
+
} else {
|
|
572
|
+
elm.setAttribute(memberName, newValue);
|
|
573
|
+
}
|
|
412
574
|
}
|
|
413
575
|
}
|
|
414
576
|
};
|
|
415
577
|
var parseClassListRegex = /\s/;
|
|
416
|
-
var parseClassList = (value) =>
|
|
578
|
+
var parseClassList = (value) => {
|
|
579
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
580
|
+
value = value.baseVal;
|
|
581
|
+
}
|
|
582
|
+
if (!value || typeof value !== "string") {
|
|
583
|
+
return [];
|
|
584
|
+
}
|
|
585
|
+
return value.split(parseClassListRegex);
|
|
586
|
+
};
|
|
417
587
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
418
588
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
419
589
|
|
|
420
590
|
// src/runtime/vdom/update-element.ts
|
|
421
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
591
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
422
592
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
423
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
424
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
593
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
594
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
425
595
|
{
|
|
426
596
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
427
597
|
if (!(memberName in newVnodeAttrs)) {
|
|
428
|
-
setAccessor(
|
|
598
|
+
setAccessor(
|
|
599
|
+
elm,
|
|
600
|
+
memberName,
|
|
601
|
+
oldVnodeAttrs[memberName],
|
|
602
|
+
void 0,
|
|
603
|
+
isSvgMode2,
|
|
604
|
+
newVnode.$flags$);
|
|
429
605
|
}
|
|
430
606
|
}
|
|
431
607
|
}
|
|
432
608
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
433
|
-
setAccessor(
|
|
609
|
+
setAccessor(
|
|
610
|
+
elm,
|
|
611
|
+
memberName,
|
|
612
|
+
oldVnodeAttrs[memberName],
|
|
613
|
+
newVnodeAttrs[memberName],
|
|
614
|
+
isSvgMode2,
|
|
615
|
+
newVnode.$flags$);
|
|
434
616
|
}
|
|
435
617
|
};
|
|
436
618
|
function sortedAttrNames(attrNames) {
|
|
@@ -448,18 +630,23 @@ var scopeId;
|
|
|
448
630
|
var hostTagName;
|
|
449
631
|
var useNativeShadowDom = false;
|
|
450
632
|
var isSvgMode = false;
|
|
451
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
633
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
452
634
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
453
635
|
let i2 = 0;
|
|
454
636
|
let elm;
|
|
455
637
|
let childNode;
|
|
456
638
|
if (newVNode2.$text$ !== null) {
|
|
457
|
-
elm = newVNode2.$elm$ =
|
|
639
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
458
640
|
} else {
|
|
459
641
|
if (!isSvgMode) {
|
|
460
642
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
461
643
|
}
|
|
462
|
-
|
|
644
|
+
if (!win.document) {
|
|
645
|
+
throw new Error(
|
|
646
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
463
650
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
464
651
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
465
652
|
) ;
|
|
@@ -469,17 +656,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
469
656
|
{
|
|
470
657
|
updateElement(null, newVNode2, isSvgMode);
|
|
471
658
|
}
|
|
472
|
-
|
|
473
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
474
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
659
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
475
660
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
476
661
|
}
|
|
477
|
-
{
|
|
478
|
-
updateElementScopeIds(elm, parentElm);
|
|
479
|
-
}
|
|
480
662
|
if (newVNode2.$children$) {
|
|
481
663
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
482
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
664
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
483
665
|
if (childNode) {
|
|
484
666
|
elm.appendChild(childNode);
|
|
485
667
|
}
|
|
@@ -504,7 +686,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
504
686
|
}
|
|
505
687
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
506
688
|
if (vnodes[startIdx]) {
|
|
507
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
689
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
508
690
|
if (childNode) {
|
|
509
691
|
vnodes[startIdx].$elm$ = childNode;
|
|
510
692
|
insertBefore(containerElm, childNode, before);
|
|
@@ -577,7 +759,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
577
759
|
if (idxInOld >= 0) {
|
|
578
760
|
elmToMove = oldCh[idxInOld];
|
|
579
761
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
580
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
762
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
581
763
|
} else {
|
|
582
764
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
583
765
|
oldCh[idxInOld] = void 0;
|
|
@@ -585,7 +767,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
585
767
|
}
|
|
586
768
|
newStartVnode = newCh[++newStartIdx];
|
|
587
769
|
} else {
|
|
588
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
770
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
589
771
|
newStartVnode = newCh[++newStartIdx];
|
|
590
772
|
}
|
|
591
773
|
if (node) {
|
|
@@ -613,6 +795,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
613
795
|
if (!isInitialRender) {
|
|
614
796
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
615
797
|
}
|
|
798
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
799
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
800
|
+
}
|
|
616
801
|
return true;
|
|
617
802
|
}
|
|
618
803
|
return false;
|
|
@@ -628,9 +813,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
628
813
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
629
814
|
}
|
|
630
815
|
{
|
|
631
|
-
|
|
632
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
633
|
-
}
|
|
816
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
634
817
|
}
|
|
635
818
|
if (oldChildren !== null && newChildren !== null) {
|
|
636
819
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -659,38 +842,34 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
659
842
|
}
|
|
660
843
|
};
|
|
661
844
|
var insertBefore = (parent, newNode, reference) => {
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
updateElementScopeIds(newNode, parent);
|
|
845
|
+
if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
846
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
665
847
|
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
var findScopeIds = (element) => {
|
|
669
|
-
const scopeIds = [];
|
|
670
|
-
if (element) {
|
|
671
|
-
scopeIds.push(
|
|
672
|
-
...element["s-scs"] || [],
|
|
673
|
-
element["s-si"],
|
|
674
|
-
element["s-sc"],
|
|
675
|
-
...findScopeIds(element.parentElement)
|
|
676
|
-
);
|
|
848
|
+
{
|
|
849
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
677
850
|
}
|
|
678
|
-
return scopeIds;
|
|
679
851
|
};
|
|
680
|
-
|
|
681
|
-
var _a;
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
852
|
+
function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
853
|
+
var _a, _b;
|
|
854
|
+
let scopeId2;
|
|
855
|
+
if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
|
|
856
|
+
const scopeName = slotNode["s-sn"];
|
|
857
|
+
const hostName = slotNode["s-hn"];
|
|
858
|
+
(_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
|
|
859
|
+
if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
|
|
860
|
+
let child = (oldParent.__childNodes || oldParent.childNodes)[0];
|
|
861
|
+
let found = false;
|
|
862
|
+
while (child) {
|
|
863
|
+
if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
|
|
864
|
+
found = true;
|
|
865
|
+
break;
|
|
689
866
|
}
|
|
867
|
+
child = child.nextSibling;
|
|
690
868
|
}
|
|
869
|
+
if (!found) oldParent.classList.remove(scopeId2 + "-s");
|
|
691
870
|
}
|
|
692
871
|
}
|
|
693
|
-
}
|
|
872
|
+
}
|
|
694
873
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
695
874
|
const hostElm = hostRef.$hostElement$;
|
|
696
875
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -711,157 +890,21 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
711
890
|
{
|
|
712
891
|
scopeId = hostElm["s-sc"];
|
|
713
892
|
}
|
|
714
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)
|
|
893
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
715
894
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
716
895
|
};
|
|
717
|
-
var createTime = (fnName, tagName = "") => {
|
|
718
|
-
{
|
|
719
|
-
return () => {
|
|
720
|
-
return;
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
var uniqueTime = (key, measureText) => {
|
|
725
|
-
{
|
|
726
|
-
return () => {
|
|
727
|
-
return;
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
};
|
|
731
|
-
var parsePropertyValue = (propValue, propType) => {
|
|
732
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
733
|
-
if (propType & 4 /* Boolean */) {
|
|
734
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
735
|
-
}
|
|
736
|
-
if (propType & 2 /* Number */) {
|
|
737
|
-
return parseFloat(propValue);
|
|
738
|
-
}
|
|
739
|
-
if (propType & 1 /* String */) {
|
|
740
|
-
return String(propValue);
|
|
741
|
-
}
|
|
742
|
-
return propValue;
|
|
743
|
-
}
|
|
744
|
-
return propValue;
|
|
745
|
-
};
|
|
746
|
-
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
747
|
-
|
|
748
|
-
// src/runtime/event-emitter.ts
|
|
749
|
-
var createEvent = (ref, name, flags) => {
|
|
750
|
-
const elm = getElement(ref);
|
|
751
|
-
return {
|
|
752
|
-
emit: (detail) => {
|
|
753
|
-
return emitEvent(elm, name, {
|
|
754
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
755
|
-
composed: !!(flags & 2 /* Composed */),
|
|
756
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
757
|
-
detail
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
};
|
|
761
|
-
};
|
|
762
|
-
var emitEvent = (elm, name, opts) => {
|
|
763
|
-
const ev = plt.ce(name, opts);
|
|
764
|
-
elm.dispatchEvent(ev);
|
|
765
|
-
return ev;
|
|
766
|
-
};
|
|
767
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
768
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
769
|
-
let style = styles.get(scopeId2);
|
|
770
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
771
|
-
style = style || new CSSStyleSheet();
|
|
772
|
-
if (typeof style === "string") {
|
|
773
|
-
style = cssText;
|
|
774
|
-
} else {
|
|
775
|
-
style.replaceSync(cssText);
|
|
776
|
-
}
|
|
777
|
-
} else {
|
|
778
|
-
style = cssText;
|
|
779
|
-
}
|
|
780
|
-
styles.set(scopeId2, style);
|
|
781
|
-
};
|
|
782
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
783
|
-
var _a;
|
|
784
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
785
|
-
const style = styles.get(scopeId2);
|
|
786
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
787
|
-
if (style) {
|
|
788
|
-
if (typeof style === "string") {
|
|
789
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
790
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
791
|
-
let styleElm;
|
|
792
|
-
if (!appliedStyles) {
|
|
793
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
794
|
-
}
|
|
795
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
796
|
-
{
|
|
797
|
-
styleElm = doc.createElement("style");
|
|
798
|
-
styleElm.innerHTML = style;
|
|
799
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
800
|
-
if (nonce != null) {
|
|
801
|
-
styleElm.setAttribute("nonce", nonce);
|
|
802
|
-
}
|
|
803
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
804
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
805
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
806
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
807
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
808
|
-
} else if ("host" in styleContainerNode) {
|
|
809
|
-
if (supportsConstructableStylesheets) {
|
|
810
|
-
const stylesheet = new CSSStyleSheet();
|
|
811
|
-
stylesheet.replaceSync(style);
|
|
812
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
813
|
-
} else {
|
|
814
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
815
|
-
if (existingStyleContainer) {
|
|
816
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
817
|
-
} else {
|
|
818
|
-
styleContainerNode.prepend(styleElm);
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
} else {
|
|
822
|
-
styleContainerNode.append(styleElm);
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
826
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
830
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
831
|
-
}
|
|
832
|
-
if (appliedStyles) {
|
|
833
|
-
appliedStyles.add(scopeId2);
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
837
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
return scopeId2;
|
|
841
|
-
};
|
|
842
|
-
var attachStyles = (hostRef) => {
|
|
843
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
844
|
-
const elm = hostRef.$hostElement$;
|
|
845
|
-
const flags = cmpMeta.$flags$;
|
|
846
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
847
|
-
const scopeId2 = addStyle(
|
|
848
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
849
|
-
cmpMeta);
|
|
850
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
851
|
-
elm["s-sc"] = scopeId2;
|
|
852
|
-
elm.classList.add(scopeId2 + "-h");
|
|
853
|
-
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
854
|
-
elm.classList.add(scopeId2 + "-s");
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
endAttachStyles();
|
|
858
|
-
};
|
|
859
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
860
896
|
|
|
861
897
|
// src/runtime/update-component.ts
|
|
862
898
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
863
899
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
864
|
-
ancestorComponent["s-p"].push(
|
|
900
|
+
const index = ancestorComponent["s-p"].push(
|
|
901
|
+
new Promise(
|
|
902
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
903
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
904
|
+
r();
|
|
905
|
+
}
|
|
906
|
+
)
|
|
907
|
+
);
|
|
865
908
|
}
|
|
866
909
|
};
|
|
867
910
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -890,14 +933,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
890
933
|
{
|
|
891
934
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
892
935
|
if (hostRef.$queuedListeners$) {
|
|
893
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
936
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
894
937
|
hostRef.$queuedListeners$ = void 0;
|
|
895
938
|
}
|
|
896
939
|
}
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
940
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
941
|
+
} else {
|
|
942
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
900
943
|
}
|
|
944
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
901
945
|
endSchedule();
|
|
902
946
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
903
947
|
};
|
|
@@ -967,17 +1011,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
967
1011
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
968
1012
|
const instance = hostRef.$lazyInstance$ ;
|
|
969
1013
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
970
|
-
|
|
971
|
-
safeCall(instance, "componentDidRender");
|
|
972
|
-
}
|
|
1014
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
973
1015
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
974
1016
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
975
1017
|
{
|
|
976
1018
|
addHydratedFlag(elm);
|
|
977
1019
|
}
|
|
978
|
-
|
|
979
|
-
safeCall(instance, "componentDidLoad");
|
|
980
|
-
}
|
|
1020
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
981
1021
|
endPostUpdate();
|
|
982
1022
|
{
|
|
983
1023
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -986,6 +1026,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
986
1026
|
}
|
|
987
1027
|
}
|
|
988
1028
|
} else {
|
|
1029
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
989
1030
|
endPostUpdate();
|
|
990
1031
|
}
|
|
991
1032
|
{
|
|
@@ -1013,17 +1054,14 @@ var forceUpdate = (ref) => {
|
|
|
1013
1054
|
}
|
|
1014
1055
|
};
|
|
1015
1056
|
var appDidLoad = (who) => {
|
|
1016
|
-
{
|
|
1017
|
-
addHydratedFlag(doc.documentElement);
|
|
1018
|
-
}
|
|
1019
1057
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1020
1058
|
};
|
|
1021
|
-
var safeCall = (instance, method, arg) => {
|
|
1059
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1022
1060
|
if (instance && instance[method]) {
|
|
1023
1061
|
try {
|
|
1024
1062
|
return instance[method](arg);
|
|
1025
1063
|
} catch (e) {
|
|
1026
|
-
consoleError(e);
|
|
1064
|
+
consoleError(e, elm);
|
|
1027
1065
|
}
|
|
1028
1066
|
}
|
|
1029
1067
|
return void 0;
|
|
@@ -1039,7 +1077,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1039
1077
|
const hostRef = getHostRef(ref);
|
|
1040
1078
|
if (!hostRef) {
|
|
1041
1079
|
throw new Error(
|
|
1042
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/
|
|
1080
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
1043
1081
|
);
|
|
1044
1082
|
}
|
|
1045
1083
|
const elm = hostRef.$hostElement$ ;
|
|
@@ -1065,6 +1103,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1065
1103
|
}
|
|
1066
1104
|
}
|
|
1067
1105
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1106
|
+
if (instance.componentShouldUpdate) {
|
|
1107
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1108
|
+
return;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1068
1111
|
scheduleUpdate(hostRef, false);
|
|
1069
1112
|
}
|
|
1070
1113
|
}
|
|
@@ -1082,62 +1125,69 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1082
1125
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1083
1126
|
members.map(([memberName, [memberFlags]]) => {
|
|
1084
1127
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1085
|
-
|
|
1128
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1129
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1130
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1131
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1086
1132
|
Object.defineProperty(prototype, memberName, {
|
|
1087
1133
|
get() {
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
},
|
|
1093
|
-
configurable: true,
|
|
1094
|
-
enumerable: true
|
|
1095
|
-
});
|
|
1096
|
-
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
|
|
1097
|
-
{
|
|
1098
|
-
Object.defineProperty(prototype, memberName, {
|
|
1099
|
-
get() {
|
|
1134
|
+
{
|
|
1135
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1136
|
+
return getValue(this, memberName);
|
|
1137
|
+
}
|
|
1100
1138
|
const ref = getHostRef(this);
|
|
1101
1139
|
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1102
1140
|
if (!instance) return;
|
|
1103
1141
|
return instance[memberName];
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
configurable: true,
|
|
1145
|
+
enumerable: true
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
Object.defineProperty(prototype, memberName, {
|
|
1149
|
+
set(newValue) {
|
|
1150
|
+
const ref = getHostRef(this);
|
|
1151
|
+
if (origSetter) {
|
|
1152
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1153
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1154
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1155
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1156
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1157
|
+
}
|
|
1158
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1159
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1160
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
{
|
|
1164
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1165
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1166
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1167
|
+
ref.$onReadyPromise$.then(() => {
|
|
1168
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1169
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1122
1172
|
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
|
|
1130
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1131
|
-
};
|
|
1132
|
-
if (ref.$lazyInstance$) {
|
|
1133
|
-
setterSetVal();
|
|
1134
|
-
} else {
|
|
1135
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
const setterSetVal = () => {
|
|
1176
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1177
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1178
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1136
1179
|
}
|
|
1180
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1181
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1182
|
+
};
|
|
1183
|
+
if (ref.$lazyInstance$) {
|
|
1184
|
+
setterSetVal();
|
|
1185
|
+
} else {
|
|
1186
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1137
1187
|
}
|
|
1138
|
-
}
|
|
1188
|
+
}
|
|
1139
1189
|
}
|
|
1140
|
-
}
|
|
1190
|
+
});
|
|
1141
1191
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1142
1192
|
Object.defineProperty(prototype, memberName, {
|
|
1143
1193
|
value(...args) {
|
|
@@ -1157,7 +1207,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1157
1207
|
plt.jmp(() => {
|
|
1158
1208
|
var _a2;
|
|
1159
1209
|
const propName = attrNameToPropName.get(attrName);
|
|
1160
|
-
if (this.hasOwnProperty(propName)) {
|
|
1210
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1161
1211
|
newValue = this[propName];
|
|
1162
1212
|
delete this[propName];
|
|
1163
1213
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1178,8 +1228,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1178
1228
|
return;
|
|
1179
1229
|
}
|
|
1180
1230
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1181
|
-
|
|
1182
|
-
|
|
1231
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1232
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1233
|
+
this[propName] = newValue;
|
|
1183
1234
|
}
|
|
1184
1235
|
});
|
|
1185
1236
|
};
|
|
@@ -1205,7 +1256,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1205
1256
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1206
1257
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1207
1258
|
if (bundleId) {
|
|
1208
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1259
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1209
1260
|
if (CstrImport && "then" in CstrImport) {
|
|
1210
1261
|
const endLoad = uniqueTime();
|
|
1211
1262
|
Cstr = await CstrImport;
|
|
@@ -1230,7 +1281,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1230
1281
|
try {
|
|
1231
1282
|
new Cstr(hostRef);
|
|
1232
1283
|
} catch (e) {
|
|
1233
|
-
consoleError(e);
|
|
1284
|
+
consoleError(e, elm);
|
|
1234
1285
|
}
|
|
1235
1286
|
{
|
|
1236
1287
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1239,7 +1290,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1239
1290
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1240
1291
|
}
|
|
1241
1292
|
endNewInstance();
|
|
1242
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1293
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1243
1294
|
} else {
|
|
1244
1295
|
Cstr = elm.constructor;
|
|
1245
1296
|
const cmpTag = elm.localName;
|
|
@@ -1266,9 +1317,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1266
1317
|
schedule();
|
|
1267
1318
|
}
|
|
1268
1319
|
};
|
|
1269
|
-
var fireConnectedCallback = (instance) => {
|
|
1320
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1270
1321
|
{
|
|
1271
|
-
safeCall(instance, "connectedCallback");
|
|
1322
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1272
1323
|
}
|
|
1273
1324
|
};
|
|
1274
1325
|
|
|
@@ -1304,17 +1355,17 @@ var connectedCallback = (elm) => {
|
|
|
1304
1355
|
} else {
|
|
1305
1356
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1306
1357
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1307
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1358
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1308
1359
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1309
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1360
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1310
1361
|
}
|
|
1311
1362
|
}
|
|
1312
1363
|
endConnected();
|
|
1313
1364
|
}
|
|
1314
1365
|
};
|
|
1315
|
-
var disconnectInstance = (instance) => {
|
|
1366
|
+
var disconnectInstance = (instance, elm) => {
|
|
1316
1367
|
{
|
|
1317
|
-
safeCall(instance, "disconnectedCallback");
|
|
1368
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1318
1369
|
}
|
|
1319
1370
|
};
|
|
1320
1371
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1327,28 +1378,38 @@ var disconnectedCallback = async (elm) => {
|
|
|
1327
1378
|
}
|
|
1328
1379
|
}
|
|
1329
1380
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1330
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1381
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1331
1382
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1332
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1383
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1333
1384
|
}
|
|
1334
1385
|
}
|
|
1386
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1387
|
+
rootAppliedStyles.delete(elm);
|
|
1388
|
+
}
|
|
1389
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1390
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1391
|
+
}
|
|
1335
1392
|
};
|
|
1336
1393
|
|
|
1337
1394
|
// src/runtime/bootstrap-lazy.ts
|
|
1338
1395
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1339
1396
|
var _a;
|
|
1397
|
+
if (!win.document) {
|
|
1398
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1340
1401
|
const endBootstrap = createTime();
|
|
1341
1402
|
const cmpTags = [];
|
|
1342
1403
|
const exclude = options.exclude || [];
|
|
1343
1404
|
const customElements2 = win.customElements;
|
|
1344
|
-
const head =
|
|
1405
|
+
const head = win.document.head;
|
|
1345
1406
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1346
|
-
const dataStyles = /* @__PURE__ */
|
|
1407
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1347
1408
|
const deferredConnectedCallbacks = [];
|
|
1348
1409
|
let appLoadFallback;
|
|
1349
1410
|
let isBootstrapping = true;
|
|
1350
1411
|
Object.assign(plt, options);
|
|
1351
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
1412
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1352
1413
|
let hasSlotRelocation = false;
|
|
1353
1414
|
lazyBundles.map((lazyBundle) => {
|
|
1354
1415
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1416,6 +1477,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1416
1477
|
}
|
|
1417
1478
|
disconnectedCallback() {
|
|
1418
1479
|
plt.jmp(() => disconnectedCallback(this));
|
|
1480
|
+
plt.raf(() => {
|
|
1481
|
+
var _a3;
|
|
1482
|
+
const hostRef = getHostRef(this);
|
|
1483
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1484
|
+
if (i2 > -1) {
|
|
1485
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1486
|
+
}
|
|
1487
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1488
|
+
delete hostRef.$vnode$.$elm$;
|
|
1489
|
+
}
|
|
1490
|
+
});
|
|
1419
1491
|
}
|
|
1420
1492
|
componentOnReady() {
|
|
1421
1493
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1440,7 +1512,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1440
1512
|
}
|
|
1441
1513
|
if (dataStyles.innerHTML.length) {
|
|
1442
1514
|
dataStyles.setAttribute("data-styles", "");
|
|
1443
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1515
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1444
1516
|
if (nonce != null) {
|
|
1445
1517
|
dataStyles.setAttribute("nonce", nonce);
|
|
1446
1518
|
}
|
|
@@ -1461,9 +1533,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1461
1533
|
// src/runtime/fragment.ts
|
|
1462
1534
|
var Fragment = (_, children) => children;
|
|
1463
1535
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1464
|
-
if (listeners) {
|
|
1536
|
+
if (listeners && win.document) {
|
|
1465
1537
|
listeners.map(([flags, name, method]) => {
|
|
1466
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
1538
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
1467
1539
|
const handler = hostListenerProxy(hostRef, method);
|
|
1468
1540
|
const opts = hostListenerOpts(flags);
|
|
1469
1541
|
plt.ael(target, name, handler, opts);
|
|
@@ -1482,13 +1554,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1482
1554
|
}
|
|
1483
1555
|
}
|
|
1484
1556
|
} catch (e) {
|
|
1485
|
-
consoleError(e);
|
|
1557
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1486
1558
|
}
|
|
1487
1559
|
};
|
|
1488
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
1489
|
-
if (flags & 4 /* TargetDocument */)
|
|
1490
|
-
|
|
1491
|
-
|
|
1560
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
1561
|
+
if (flags & 4 /* TargetDocument */) {
|
|
1562
|
+
return doc;
|
|
1563
|
+
}
|
|
1564
|
+
if (flags & 8 /* TargetWindow */) {
|
|
1565
|
+
return win;
|
|
1566
|
+
}
|
|
1567
|
+
if (flags & 16 /* TargetBody */) {
|
|
1568
|
+
return doc.body;
|
|
1569
|
+
}
|
|
1492
1570
|
return elm;
|
|
1493
1571
|
};
|
|
1494
1572
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|