@ionic/core 8.5.7-dev.11746042265.1dbc2f10 → 8.5.7-dev.11747094257.1dd7476b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/action-sheet.js +37 -23
- package/components/alert.js +42 -26
- package/components/animation.js +2 -2
- package/components/backdrop.js +11 -4
- package/components/button-active.js +1 -1
- package/components/button.js +30 -24
- package/components/buttons.js +14 -4
- package/components/capacitor.js +1 -1
- package/components/checkbox.js +43 -26
- package/components/config.js +1 -1
- package/components/content.js +24 -5
- package/components/data.js +31 -6
- package/components/gesture-controller.js +1 -1
- package/components/haptic.js +1 -1
- package/components/hardware-back-button.js +2 -2
- package/components/header.js +12 -7
- package/components/helpers.js +3 -6
- package/components/icon.js +1 -2
- package/components/index2.js +1 -1
- package/components/index3.js +3 -5
- package/components/index4.js +1 -1
- package/components/index5.js +2 -2
- package/components/index6.js +28 -3
- package/components/index7.js +163 -27
- package/components/index8.js +1 -1
- package/components/index9.js +3 -163
- package/components/input-shims.js +2 -2
- package/components/input.utils.js +2 -2
- package/components/ion-accordion-group.js +20 -7
- package/components/ion-accordion.js +32 -14
- package/components/ion-app.js +4 -5
- package/components/ion-avatar.js +2 -4
- package/components/ion-back-button.js +12 -13
- package/components/ion-badge.js +2 -5
- package/components/ion-breadcrumb.js +22 -20
- package/components/ion-breadcrumbs.js +14 -10
- package/components/ion-card-content.js +2 -4
- package/components/ion-card-header.js +7 -5
- package/components/ion-card-subtitle.js +2 -5
- package/components/ion-card-title.js +2 -5
- package/components/ion-card.js +16 -11
- package/components/ion-chip.js +8 -5
- package/components/ion-col.js +1 -26
- package/components/ion-datetime-button.js +16 -14
- package/components/ion-datetime.js +197 -82
- package/components/ion-fab-button.js +37 -20
- package/components/ion-fab-list.js +7 -2
- package/components/ion-fab.js +10 -4
- package/components/ion-footer.js +13 -8
- package/components/ion-grid.js +4 -2
- package/components/ion-img.js +1 -6
- package/components/ion-infinite-scroll-content.js +2 -6
- package/components/ion-infinite-scroll.js +27 -6
- package/components/ion-input-otp.d.ts +11 -0
- package/components/ion-input-otp.js +611 -0
- package/components/ion-input-password-toggle.js +11 -13
- package/components/ion-input.js +80 -55
- package/components/ion-item-divider.js +11 -7
- package/components/ion-item-group.js +3 -5
- package/components/ion-item-option.js +16 -14
- package/components/ion-item-options.js +7 -5
- package/components/ion-item-sliding.js +6 -4
- package/components/ion-loading.js +38 -21
- package/components/ion-menu-button.js +17 -12
- package/components/ion-menu-toggle.js +11 -7
- package/components/ion-menu.js +28 -12
- package/components/ion-nav-link.js +7 -7
- package/components/ion-nav.js +9 -12
- package/components/ion-note.js +4 -7
- package/components/ion-picker-legacy.js +47 -27
- package/components/ion-progress-bar.js +20 -7
- package/components/ion-range.js +69 -29
- package/components/ion-refresher-content.js +2 -6
- package/components/ion-refresher.js +56 -8
- package/components/ion-reorder-group.js +7 -5
- package/components/ion-reorder.js +4 -6
- package/components/ion-route-redirect.js +0 -2
- package/components/ion-route.js +9 -7
- package/components/ion-router-link.js +9 -11
- package/components/ion-router-outlet.js +12 -10
- package/components/ion-router.js +19 -1
- package/components/ion-row.js +2 -3
- package/components/ion-searchbar.js +82 -33
- package/components/ion-segment-button.js +22 -13
- package/components/ion-segment-content.js +2 -3
- package/components/ion-segment-view.js +7 -7
- package/components/ion-segment.js +24 -13
- package/components/ion-select-option.js +5 -4
- package/components/ion-select.js +68 -45
- package/components/ion-skeleton-text.js +6 -4
- package/components/ion-split-pane.js +13 -8
- package/components/ion-tab-bar.js +9 -8
- package/components/ion-tab-button.js +12 -14
- package/components/ion-tab.js +5 -8
- package/components/ion-tabs.js +5 -6
- package/components/ion-text.js +3 -5
- package/components/ion-textarea.js +72 -47
- package/components/ion-thumbnail.js +2 -3
- package/components/ion-toast.js +58 -35
- package/components/ion-toggle.js +55 -31
- package/components/ionic-global.js +1 -1
- package/components/item.js +20 -14
- package/components/keyboard-controller.js +2 -2
- package/components/keyboard.js +134 -69
- package/components/keyboard2.js +69 -134
- package/components/label.js +4 -8
- package/components/list-header.js +4 -8
- package/components/list.js +6 -6
- package/components/modal.js +122 -44
- package/components/notch-controller.js +1 -1
- package/components/overlays.js +3 -3
- package/components/picker-column-option.js +20 -7
- package/components/picker-column.js +25 -10
- package/components/picker-column2.js +7 -10
- package/components/picker.js +2 -4
- package/components/popover.js +132 -40
- package/components/radio-group.js +11 -11
- package/components/radio.js +30 -16
- package/components/refresher.utils.js +2 -2
- package/components/ripple-effect.js +11 -3
- package/components/select-modal.js +4 -9
- package/components/select-popover.js +6 -9
- package/components/spinner.js +5 -6
- package/components/swipe-back.js +1 -1
- package/components/title.js +4 -8
- package/components/toolbar.js +4 -7
- package/css/global.bundle.css +1 -1
- package/css/global.bundle.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/structure.css +1 -1
- package/css/structure.css.map +1 -1
- package/dist/cjs/{animation-ab2d3449.js → animation-CIZtxug4.js} +2 -2
- package/dist/cjs/{app-globals-ddceb1f4.js → app-globals-DvwumQAI.js} +1 -1
- package/dist/cjs/{button-active-43e2b419.js → button-active-Du_YCFSd.js} +3 -3
- package/dist/cjs/{capacitor-c04564bf.js → capacitor-DmA66EwP.js} +1 -1
- package/dist/cjs/{config-f6225ae7.js → config-ByqNVsV-.js} +1 -1
- package/dist/cjs/{data-94e8d392.js → data-BOIdk4ZX.js} +30 -5
- package/dist/cjs/{framework-delegate-862d9d00.js → framework-delegate-BZr8Dger.js} +1 -1
- package/dist/cjs/{gesture-controller-9436f482.js → gesture-controller-dtqlP_q4.js} +1 -1
- package/dist/cjs/{haptic-f6b37aa3.js → haptic-ClPPQ_PS.js} +1 -1
- package/dist/cjs/{hardware-back-button-3d2b1004.js → hardware-back-button-BhLS9ov9.js} +2 -2
- package/dist/cjs/{helpers-8a48fdea.js → helpers-BWWnt1yc.js} +2 -5
- package/dist/cjs/{index-2e236a04.js → index-B6-BlKCh.js} +1398 -670
- package/dist/cjs/{index-ee07ed59.js → index-CAvQ7Tka.js} +3 -4
- package/dist/cjs/{index-073c7cdc.js → index-CPbAsnJK.js} +1 -0
- package/dist/cjs/{index-31b07b9c.js → index-CfS4TqIo.js} +3 -3
- package/dist/cjs/{index-dbe01e08.js → index-CrVjA49i.js} +3 -3
- package/dist/cjs/{index-a96d31ae.js → index-DCB2XSaQ.js} +9 -9
- package/dist/cjs/{index-1eff7149.js → index-QuFS9UpQ.js} +5 -5
- package/dist/cjs/index.cjs.js +20 -24
- package/dist/cjs/{input-shims-415be7ee.js → input-shims-DGvxKeWy.js} +6 -6
- package/dist/cjs/{input.utils-a7957fd6.js → input.utils-DQKGaXXm.js} +3 -3
- package/dist/cjs/ion-accordion_2.cjs.entry.js +56 -27
- package/dist/cjs/ion-action-sheet.cjs.entry.js +50 -38
- package/dist/cjs/ion-alert.cjs.entry.js +55 -41
- package/dist/cjs/ion-app_8.cjs.entry.js +101 -70
- package/dist/cjs/ion-avatar_3.cjs.entry.js +10 -18
- package/dist/cjs/ion-back-button.cjs.entry.js +16 -19
- package/dist/cjs/ion-backdrop.cjs.entry.js +14 -9
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +39 -35
- package/dist/cjs/ion-button_2.cjs.entry.js +33 -30
- package/dist/cjs/ion-card_5.cjs.entry.js +33 -36
- package/dist/cjs/ion-checkbox.cjs.entry.js +48 -33
- package/dist/cjs/ion-chip.cjs.entry.js +12 -11
- package/dist/cjs/ion-col_3.cjs.entry.js +10 -36
- package/dist/cjs/ion-datetime-button.cjs.entry.js +20 -20
- package/dist/cjs/ion-datetime_3.cjs.entry.js +255 -126
- package/dist/cjs/ion-fab_3.cjs.entry.js +58 -32
- package/dist/cjs/ion-img.cjs.entry.js +5 -12
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +35 -20
- package/dist/cjs/ion-input-otp.cjs.entry.js +574 -0
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +14 -18
- package/dist/cjs/ion-input.cjs.entry.js +87 -64
- package/dist/cjs/ion-item-option_3.cjs.entry.js +36 -32
- package/dist/cjs/ion-item_8.cjs.entry.js +62 -65
- package/dist/cjs/ion-loading.cjs.entry.js +48 -33
- package/dist/cjs/ion-menu_3.cjs.entry.js +68 -45
- package/dist/cjs/ion-modal.cjs.entry.js +132 -56
- package/dist/cjs/ion-nav_2.cjs.entry.js +19 -24
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +25 -14
- package/dist/cjs/ion-picker-column.cjs.entry.js +31 -18
- package/dist/cjs/ion-picker.cjs.entry.js +5 -9
- package/dist/cjs/ion-popover.cjs.entry.js +139 -49
- package/dist/cjs/ion-progress-bar.cjs.entry.js +24 -13
- package/dist/cjs/ion-radio_2.cjs.entry.js +47 -35
- package/dist/cjs/ion-range.cjs.entry.js +74 -36
- package/dist/cjs/ion-refresher_2.cjs.entry.js +70 -28
- package/dist/cjs/ion-reorder_2.cjs.entry.js +19 -21
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +14 -8
- package/dist/cjs/ion-route_4.cjs.entry.js +37 -23
- package/dist/cjs/ion-searchbar.cjs.entry.js +88 -41
- package/dist/cjs/ion-segment-content.cjs.entry.js +3 -6
- package/dist/cjs/ion-segment-view.cjs.entry.js +8 -10
- package/dist/cjs/ion-segment_2.cjs.entry.js +52 -34
- package/dist/cjs/ion-select-modal.cjs.entry.js +14 -21
- package/dist/cjs/ion-select_3.cjs.entry.js +90 -71
- package/dist/cjs/ion-spinner.cjs.entry.js +10 -13
- package/dist/cjs/ion-split-pane.cjs.entry.js +15 -12
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +30 -33
- package/dist/cjs/ion-tab_2.cjs.entry.js +12 -18
- package/dist/cjs/ion-text.cjs.entry.js +7 -11
- package/dist/cjs/ion-textarea.cjs.entry.js +79 -56
- package/dist/cjs/ion-toast.cjs.entry.js +67 -46
- package/dist/cjs/ion-toggle.cjs.entry.js +66 -44
- package/dist/cjs/{ionic-global-6dea5a96.js → ionic-global-C3I6b0Is.js} +2 -2
- package/dist/cjs/ionic.cjs.js +9 -9
- package/dist/cjs/{ios.transition-a131cd4d.js → ios.transition-CL8Q2_Bi.js} +6 -6
- package/dist/cjs/{keyboard-0272231f.js → keyboard-UuAS4D_9.js} +1 -1
- package/dist/cjs/{keyboard-controller-c05e747a.js → keyboard-controller-GXBiBRKS.js} +2 -2
- package/dist/cjs/{keyboard-af1bb365.js → keyboard-hHzlEQpk.js} +3 -3
- package/dist/cjs/loader.cjs.js +5 -7
- package/dist/cjs/{md.transition-e018ebe5.js → md.transition-D1Ast6la.js} +6 -6
- package/dist/cjs/{notch-controller-09b7f358.js → notch-controller-CARhSI1k.js} +2 -2
- package/dist/cjs/{overlays-4c291a05.js → overlays-Ci3nLg5M.js} +7 -7
- package/dist/cjs/{status-tap-f1acefac.js → status-tap-Bx_wzOTo.js} +4 -4
- package/dist/cjs/{swipe-back-4918e56b.js → swipe-back-N5-bJv4m.js} +5 -5
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/accordion/accordion.js +43 -13
- package/dist/collection/components/accordion-group/accordion-group.js +35 -8
- package/dist/collection/components/action-sheet/action-sheet.js +84 -31
- package/dist/collection/components/alert/alert.js +94 -34
- package/dist/collection/components/back-button/back-button.js +30 -14
- package/dist/collection/components/backdrop/backdrop.js +18 -3
- package/dist/collection/components/badge/badge.js +3 -4
- package/dist/collection/components/breadcrumb/breadcrumb.js +57 -26
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +24 -10
- package/dist/collection/components/button/button.js +74 -33
- package/dist/collection/components/buttons/buttons.js +15 -1
- package/dist/collection/components/card/card.js +44 -16
- package/dist/collection/components/card-header/card-header.js +11 -3
- package/dist/collection/components/card-subtitle/card-subtitle.js +3 -4
- package/dist/collection/components/card-title/card-title.js +3 -4
- package/dist/collection/components/checkbox/checkbox.js +77 -34
- package/dist/collection/components/chip/chip.js +15 -4
- package/dist/collection/components/col/col.js +72 -50
- package/dist/collection/components/content/content.js +43 -9
- package/dist/collection/components/datetime/datetime.ios.css +7 -2
- package/dist/collection/components/datetime/datetime.js +298 -98
- package/dist/collection/components/datetime/datetime.md.css +9 -3
- package/dist/collection/components/datetime/utils/data.js +29 -4
- package/dist/collection/components/datetime-button/datetime-button.js +21 -11
- package/dist/collection/components/fab/fab.js +21 -6
- package/dist/collection/components/fab-button/fab-button.js +76 -28
- package/dist/collection/components/fab-list/fab-list.js +12 -2
- package/dist/collection/components/footer/footer.js +16 -5
- package/dist/collection/components/grid/grid.js +6 -1
- package/dist/collection/components/header/header.js +15 -4
- package/dist/collection/components/img/img.js +6 -6
- package/dist/collection/components/infinite-scroll/infinite-scroll.js +35 -7
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +6 -4
- package/dist/collection/components/input/input.js +179 -83
- package/dist/collection/components/input-otp/input-otp-interface.js +1 -0
- package/dist/collection/components/input-otp/input-otp.ios.css +377 -0
- package/dist/collection/components/input-otp/input-otp.js +999 -0
- package/dist/collection/components/input-otp/input-otp.md.css +377 -0
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +19 -11
- package/dist/collection/components/item/item.js +56 -21
- package/dist/collection/components/item-divider/item-divider.js +15 -5
- package/dist/collection/components/item-group/item-group.js +1 -1
- package/dist/collection/components/item-option/item-option.js +38 -18
- package/dist/collection/components/item-options/item-options.js +8 -2
- package/dist/collection/components/item-sliding/item-sliding.js +7 -2
- package/dist/collection/components/label/label.js +8 -6
- package/dist/collection/components/list/list.js +10 -4
- package/dist/collection/components/list-header/list-header.js +8 -8
- package/dist/collection/components/loading/loading.js +88 -31
- package/dist/collection/components/menu/menu.js +44 -12
- package/dist/collection/components/menu-button/menu-button.js +29 -12
- package/dist/collection/components/menu-toggle/menu-toggle.js +16 -7
- package/dist/collection/components/modal/modal.js +192 -55
- package/dist/collection/components/nav/nav.js +25 -12
- package/dist/collection/components/nav-link/nav-link.js +19 -9
- package/dist/collection/components/note/note.js +5 -6
- package/dist/collection/components/picker-column/picker-column.js +34 -10
- package/dist/collection/components/picker-column-option/picker-column-option.js +27 -6
- package/dist/collection/components/picker-legacy/picker.js +93 -33
- package/dist/collection/components/picker-legacy-column/picker-column.js +6 -4
- package/dist/collection/components/popover/popover.js +210 -57
- package/dist/collection/components/progress-bar/progress-bar.js +32 -7
- package/dist/collection/components/radio/radio.js +49 -19
- package/dist/collection/components/radio-group/radio-group.js +27 -13
- package/dist/collection/components/range/range.js +112 -37
- package/dist/collection/components/refresher/refresher.js +69 -7
- package/dist/collection/components/refresher-content/refresher-content.js +13 -9
- package/dist/collection/components/reorder/reorder.js +1 -1
- package/dist/collection/components/reorder-group/reorder-group.js +7 -2
- package/dist/collection/components/ripple-effect/ripple-effect.js +13 -2
- package/dist/collection/components/route/route.js +24 -9
- package/dist/collection/components/route-redirect/route-redirect.js +6 -6
- package/dist/collection/components/router/router.js +24 -2
- package/dist/collection/components/router-link/router-link.js +26 -14
- package/dist/collection/components/router-outlet/router-outlet.js +25 -9
- package/dist/collection/components/row/row.js +1 -1
- package/dist/collection/components/searchbar/searchbar.js +145 -50
- package/dist/collection/components/segment/segment.js +40 -15
- package/dist/collection/components/segment-button/segment-button.js +34 -13
- package/dist/collection/components/segment-content/segment-content.js +1 -1
- package/dist/collection/components/segment-view/segment-view.js +8 -4
- package/dist/collection/components/select/select.js +128 -59
- package/dist/collection/components/select-modal/select-modal.js +10 -5
- package/dist/collection/components/select-option/select-option.js +10 -4
- package/dist/collection/components/select-popover/select-popover.js +19 -9
- package/dist/collection/components/skeleton-text/skeleton-text.js +8 -3
- package/dist/collection/components/spinner/spinner.js +16 -8
- package/dist/collection/components/split-pane/split-pane.js +19 -6
- package/dist/collection/components/tab/tab.js +16 -9
- package/dist/collection/components/tab-bar/tab-bar.js +16 -7
- package/dist/collection/components/tab-button/tab-button.js +34 -18
- package/dist/collection/components/tabs/tabs.js +6 -4
- package/dist/collection/components/text/text.js +5 -6
- package/dist/collection/components/textarea/textarea.js +154 -70
- package/dist/collection/components/thumbnail/thumbnail.js +1 -1
- package/dist/collection/components/title/title.js +8 -8
- package/dist/collection/components/toast/toast.js +121 -47
- package/dist/collection/components/toggle/toggle.js +86 -35
- package/dist/collection/components/toolbar/toolbar.js +5 -4
- package/dist/docs.d.ts +8 -0
- package/dist/docs.json +2808 -663
- package/dist/esm/{animation-8b25e105.js → animation-D4bve5rR.js} +2 -2
- package/dist/esm/{app-globals-dbdbb3df.js → app-globals-C74-VMUb.js} +1 -1
- package/dist/esm/{button-active-90f1dbc4.js → button-active-DRCPpzqj.js} +3 -3
- package/dist/esm/{capacitor-59395cbd.js → capacitor-CFERIeaU.js} +1 -1
- package/dist/esm/{config-9898ed97.js → config-DTWRsyX5.js} +1 -1
- package/dist/esm/{data-0d7ea6eb.js → data-Iz8JZ8Jy.js} +31 -6
- package/dist/esm/{framework-delegate-56b467ad.js → framework-delegate-BEwxd9AM.js} +1 -1
- package/dist/esm/{gesture-controller-314a54f6.js → gesture-controller-BTEOs1at.js} +1 -1
- package/dist/esm/{haptic-ac164e4c.js → haptic-DzAMWJuk.js} +2 -2
- package/dist/esm/{hardware-back-button-a7eb8233.js → hardware-back-button-pnZ0X1YR.js} +2 -2
- package/dist/esm/{helpers-d94bc8ad.js → helpers-CzIihwFO.js} +3 -6
- package/dist/esm/{index-527b9e34.js → index-3GtB1kQI.js} +1397 -650
- package/dist/esm/{index-e2cf2ceb.js → index-BLV6ykCk.js} +2 -1
- package/dist/esm/{index-be190feb.js → index-BjwCqtOY.js} +3 -3
- package/dist/esm/{index-cfd9c1f2.js → index-CEo1SqXS.js} +1 -1
- package/dist/esm/{index-39782642.js → index-CfgBF1SE.js} +4 -6
- package/dist/esm/{index-9a17db3d.js → index-M5ufqlzF.js} +3 -3
- package/dist/esm/{index-68c0d151.js → index-lgeUQ6qY.js} +5 -5
- package/dist/esm/{index-18f31305.js → index-lp0kQfoC.js} +6 -6
- package/dist/esm/index.js +18 -18
- package/dist/esm/{input-shims-279903e2.js → input-shims-qlIPzMSm.js} +6 -6
- package/dist/esm/{input.utils-40504d6d.js → input.utils-CWgOv5Mm.js} +3 -3
- package/dist/esm/ion-accordion_2.entry.js +54 -23
- package/dist/esm/ion-action-sheet.entry.js +50 -36
- package/dist/esm/ion-alert.entry.js +55 -39
- package/dist/esm/ion-app_8.entry.js +101 -68
- package/dist/esm/ion-avatar_3.entry.js +10 -16
- package/dist/esm/ion-back-button.entry.js +16 -17
- package/dist/esm/ion-backdrop.entry.js +14 -7
- package/dist/esm/ion-breadcrumb_2.entry.js +39 -33
- package/dist/esm/ion-button_2.entry.js +33 -28
- package/dist/esm/ion-card_5.entry.js +33 -34
- package/dist/esm/ion-checkbox.entry.js +48 -31
- package/dist/esm/ion-chip.entry.js +12 -9
- package/dist/esm/ion-col_3.entry.js +10 -34
- package/dist/esm/ion-datetime-button.entry.js +20 -18
- package/dist/esm/ion-datetime_3.entry.js +255 -124
- package/dist/esm/ion-fab_3.entry.js +58 -30
- package/dist/esm/ion-img.entry.js +5 -10
- package/dist/esm/ion-infinite-scroll_2.entry.js +35 -18
- package/dist/esm/ion-input-otp.entry.js +572 -0
- package/dist/esm/ion-input-password-toggle.entry.js +14 -16
- package/dist/esm/ion-input.entry.js +87 -62
- package/dist/esm/ion-item-option_3.entry.js +36 -30
- package/dist/esm/ion-item_8.entry.js +62 -63
- package/dist/esm/ion-loading.entry.js +48 -31
- package/dist/esm/ion-menu_3.entry.js +68 -43
- package/dist/esm/ion-modal.entry.js +132 -54
- package/dist/esm/ion-nav_2.entry.js +19 -22
- package/dist/esm/ion-picker-column-option.entry.js +25 -12
- package/dist/esm/ion-picker-column.entry.js +31 -16
- package/dist/esm/ion-picker.entry.js +5 -7
- package/dist/esm/ion-popover.entry.js +139 -47
- package/dist/esm/ion-progress-bar.entry.js +24 -11
- package/dist/esm/ion-radio_2.entry.js +47 -33
- package/dist/esm/ion-range.entry.js +74 -34
- package/dist/esm/ion-refresher_2.entry.js +70 -26
- package/dist/esm/ion-reorder_2.entry.js +19 -19
- package/dist/esm/ion-ripple-effect.entry.js +14 -6
- package/dist/esm/ion-route_4.entry.js +37 -21
- package/dist/esm/ion-searchbar.entry.js +88 -39
- package/dist/esm/ion-segment-content.entry.js +3 -4
- package/dist/esm/ion-segment-view.entry.js +8 -8
- package/dist/esm/ion-segment_2.entry.js +52 -32
- package/dist/esm/ion-select-modal.entry.js +14 -19
- package/dist/esm/ion-select_3.entry.js +90 -69
- package/dist/esm/ion-spinner.entry.js +10 -11
- package/dist/esm/ion-split-pane.entry.js +15 -10
- package/dist/esm/ion-tab-bar_2.entry.js +30 -31
- package/dist/esm/ion-tab_2.entry.js +12 -16
- package/dist/esm/ion-text.entry.js +7 -9
- package/dist/esm/ion-textarea.entry.js +79 -54
- package/dist/esm/ion-toast.entry.js +67 -44
- package/dist/esm/ion-toggle.entry.js +64 -40
- package/dist/esm/{ionic-global-b26f573e.js → ionic-global-Dw-MNnQB.js} +2 -2
- package/dist/esm/ionic.js +8 -7
- package/dist/esm/{ios.transition-4047cb68.js → ios.transition-Doo_7Vid.js} +6 -6
- package/dist/esm/{keyboard-73175e24.js → keyboard-CUw4ekVy.js} +1 -1
- package/dist/esm/{keyboard-controller-ec5c2bfa.js → keyboard-controller-BaaVITYt.js} +2 -2
- package/dist/esm/{keyboard-52278bd7.js → keyboard-ywgs5efA.js} +3 -3
- package/dist/esm/loader.js +6 -6
- package/dist/esm/{md.transition-30ce8d1b.js → md.transition-BbcCfRk9.js} +6 -6
- package/dist/esm/{notch-controller-1a1f7183.js → notch-controller-B3wZOqJe.js} +2 -2
- package/dist/esm/{overlays-d99dcb0a.js → overlays-Pn0MyOv4.js} +7 -7
- package/dist/esm/{status-tap-42a8af65.js → status-tap-Cn5uETrs.js} +4 -4
- package/dist/esm/{swipe-back-0184f6b3.js → swipe-back-DKV4csu9.js} +5 -5
- package/dist/html.html-data.json +376 -0
- package/dist/index.js +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-05427be9.entry.js +4 -0
- package/dist/ionic/p-0bc3d6d0.entry.js +4 -0
- package/dist/ionic/p-0bcd3299.entry.js +4 -0
- package/dist/ionic/p-14d26301.entry.js +4 -0
- package/dist/ionic/p-178084cb.entry.js +4 -0
- package/dist/ionic/{p-b445ff65.entry.js → p-1da92348.entry.js} +1 -1
- package/dist/ionic/{p-2469240b.entry.js → p-1e9ea564.entry.js} +1 -1
- package/dist/ionic/p-1fe35f29.entry.js +4 -0
- package/dist/ionic/p-2438054c.entry.js +4 -0
- package/dist/ionic/p-250c972f.entry.js +4 -0
- package/dist/ionic/p-2517fcdf.entry.js +4 -0
- package/dist/ionic/p-29186993.entry.js +4 -0
- package/dist/ionic/p-2c6931ed.entry.js +4 -0
- package/dist/ionic/p-2e42fa68.entry.js +4 -0
- package/dist/ionic/p-3GtB1kQI.js +5 -0
- package/dist/ionic/p-3ca63859.entry.js +4 -0
- package/dist/ionic/p-3fa87259.entry.js +4 -0
- package/dist/ionic/p-43f012a4.entry.js +4 -0
- package/dist/ionic/{p-481e0885.entry.js → p-5756b724.entry.js} +1 -1
- package/dist/ionic/p-592db4a8.entry.js +4 -0
- package/dist/ionic/p-5a09e572.entry.js +4 -0
- package/dist/ionic/p-691fa8c7.entry.js +4 -0
- package/dist/ionic/p-6bd192d8.entry.js +4 -0
- package/dist/ionic/{p-0f5e6225.js → p-7QgQi64o.js} +1 -1
- package/dist/ionic/p-7a6c96ca.entry.js +4 -0
- package/dist/ionic/p-832b6c90.entry.js +4 -0
- package/dist/ionic/p-8c496d65.entry.js +4 -0
- package/dist/ionic/p-8d7afec5.entry.js +4 -0
- package/dist/ionic/p-920540c6.entry.js +4 -0
- package/dist/ionic/p-9262223a.entry.js +4 -0
- package/dist/ionic/p-96d912f5.entry.js +4 -0
- package/dist/ionic/p-98f759e4.entry.js +4 -0
- package/dist/ionic/p-99cc16fb.entry.js +4 -0
- package/dist/ionic/p-9c7d7711.entry.js +4 -0
- package/dist/ionic/p-9eeaBrnk.js +4 -0
- package/dist/ionic/p-B0af2jd_.js +4 -0
- package/dist/ionic/{p-dabe3bd4.js → p-B7Khsp7D.js} +1 -1
- package/dist/ionic/{p-809483ac.js → p-BBMlbfDQ.js} +1 -1
- package/dist/ionic/{p-95001a19.js → p-BC2IYr2c.js} +1 -1
- package/dist/ionic/{p-da2b833b.js → p-BLV6ykCk.js} +1 -1
- package/dist/ionic/p-BNIA2meb.js +4 -0
- package/dist/ionic/{p-2bb55ebc.js → p-Bj2C9kIj.js} +1 -1
- package/dist/ionic/{p-b6d324f0.js → p-BoW9sZxI.js} +1 -1
- package/dist/ionic/{p-10a1bddc.js → p-C719rkLH.js} +1 -1
- package/dist/ionic/{p-17e21141.js → p-CEo1SqXS.js} +1 -1
- package/dist/ionic/p-CG4wBMWx.js +4 -0
- package/dist/ionic/p-CGDL9pFJ.js +4 -0
- package/dist/ionic/p-CGyDG2ar.js +4 -0
- package/dist/ionic/p-CIGNaXM1.js +4 -0
- package/dist/ionic/{p-89b61afc.js → p-CKvCXMs9.js} +1 -1
- package/dist/ionic/{p-6636a436.js → p-CO_y91jJ.js} +1 -1
- package/dist/ionic/p-CjUUcfjC.js +4 -0
- package/dist/ionic/{p-ed005d9c.js → p-Ck7uSZOL.js} +1 -1
- package/dist/ionic/p-Cl0B-RWe.js +4 -0
- package/dist/ionic/p-CtWGkNnJ.js +4 -0
- package/dist/ionic/{p-5b67b447.js → p-CuVupNFU.js} +1 -1
- package/dist/ionic/{p-f08a92cc.js → p-D-bDfEy0.js} +1 -1
- package/dist/ionic/{p-27281edd.js → p-D13Eaw-8.js} +1 -1
- package/dist/ionic/{p-aded71ec.js → p-DYqTiW2v.js} +1 -1
- package/dist/ionic/p-DjV8cNim.js +4 -0
- package/dist/ionic/{p-b7b1d91a.js → p-RuOFleJd.js} +1 -1
- package/dist/ionic/p-a20a15cc.entry.js +4 -0
- package/dist/ionic/{p-12914457.entry.js → p-a22fe54d.entry.js} +1 -1
- package/dist/ionic/p-b18a4590.entry.js +4 -0
- package/dist/ionic/p-bc84650a.entry.js +4 -0
- package/dist/ionic/p-bf6b00ab.entry.js +4 -0
- package/dist/ionic/p-c1b0e3b6.entry.js +4 -0
- package/dist/ionic/p-cde545fa.entry.js +4 -0
- package/dist/ionic/p-d4742f5c.entry.js +4 -0
- package/dist/ionic/p-da105dce.entry.js +4 -0
- package/dist/ionic/p-e2d9c488.entry.js +4 -0
- package/dist/ionic/p-e5495b3b.entry.js +4 -0
- package/dist/ionic/p-e83ead65.entry.js +4 -0
- package/dist/ionic/p-ed36aee8.entry.js +4 -0
- package/dist/ionic/p-ee504ce4.entry.js +4 -0
- package/dist/ionic/p-eec040ff.entry.js +4 -0
- package/dist/ionic/p-f331dda5.entry.js +4 -0
- package/dist/ionic/p-f35cb090.entry.js +4 -0
- package/dist/ionic/p-fb714eec.entry.js +4 -0
- package/dist/ionic/p-fd156864.entry.js +4 -0
- package/dist/ionic/{p-393ffcc2.entry.js → p-ff88b250.entry.js} +1 -1
- package/dist/ionic/{p-8d2d39d0.js → p-wsLGfiE0.js} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +0 -5
- package/dist/types/components/datetime/datetime-interface.d.ts +1 -0
- package/dist/types/components/datetime/datetime.d.ts +6 -0
- package/dist/types/components/datetime/utils/data.d.ts +3 -1
- package/dist/types/components/datetime/utils/manipulation.d.ts +1 -0
- package/dist/types/components/input/input.d.ts +0 -5
- package/dist/types/components/input-otp/input-otp-interface.d.ts +21 -0
- package/dist/types/components/input-otp/input-otp.d.ts +268 -0
- package/dist/types/components/select/select.d.ts +0 -5
- package/dist/types/components/textarea/textarea.d.ts +0 -5
- package/dist/types/components/toggle/toggle.d.ts +0 -5
- package/dist/types/components.d.ts +175 -0
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +9 -0
- package/hydrate/index.d.ts +40 -5
- package/hydrate/index.js +5437 -2404
- package/hydrate/index.mjs +5436 -2403
- package/loader/cdn.js +1 -2
- package/loader/index.cjs.js +1 -2
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +1 -2
- package/package.json +2 -2
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm-es5/animation-8b25e105.js +0 -4
- package/dist/esm-es5/app-globals-dbdbb3df.js +0 -4
- package/dist/esm-es5/button-active-90f1dbc4.js +0 -4
- package/dist/esm-es5/capacitor-59395cbd.js +0 -4
- package/dist/esm-es5/compare-with-utils-a96ff2ea.js +0 -4
- package/dist/esm-es5/config-9898ed97.js +0 -4
- package/dist/esm-es5/cubic-bezier-fe2083dc.js +0 -4
- package/dist/esm-es5/data-0d7ea6eb.js +0 -4
- package/dist/esm-es5/dir-babeabeb.js +0 -4
- package/dist/esm-es5/focus-visible-dd40d69f.js +0 -4
- package/dist/esm-es5/framework-delegate-56b467ad.js +0 -4
- package/dist/esm-es5/gesture-controller-314a54f6.js +0 -4
- package/dist/esm-es5/haptic-ac164e4c.js +0 -4
- package/dist/esm-es5/hardware-back-button-a7eb8233.js +0 -4
- package/dist/esm-es5/helpers-d94bc8ad.js +0 -4
- package/dist/esm-es5/index-18f31305.js +0 -4
- package/dist/esm-es5/index-39782642.js +0 -4
- package/dist/esm-es5/index-527b9e34.js +0 -5
- package/dist/esm-es5/index-68c0d151.js +0 -4
- package/dist/esm-es5/index-9a17db3d.js +0 -4
- package/dist/esm-es5/index-a5d50daf.js +0 -4
- package/dist/esm-es5/index-be190feb.js +0 -4
- package/dist/esm-es5/index-cfd9c1f2.js +0 -5
- package/dist/esm-es5/index-e2cf2ceb.js +0 -4
- package/dist/esm-es5/index.js +0 -4
- package/dist/esm-es5/input-shims-279903e2.js +0 -4
- package/dist/esm-es5/input.utils-40504d6d.js +0 -4
- package/dist/esm-es5/ion-accordion_2.entry.js +0 -4
- package/dist/esm-es5/ion-action-sheet.entry.js +0 -4
- package/dist/esm-es5/ion-alert.entry.js +0 -4
- package/dist/esm-es5/ion-app_8.entry.js +0 -4
- package/dist/esm-es5/ion-avatar_3.entry.js +0 -4
- package/dist/esm-es5/ion-back-button.entry.js +0 -4
- package/dist/esm-es5/ion-backdrop.entry.js +0 -4
- package/dist/esm-es5/ion-breadcrumb_2.entry.js +0 -4
- package/dist/esm-es5/ion-button_2.entry.js +0 -4
- package/dist/esm-es5/ion-card_5.entry.js +0 -4
- package/dist/esm-es5/ion-checkbox.entry.js +0 -4
- package/dist/esm-es5/ion-chip.entry.js +0 -4
- package/dist/esm-es5/ion-col_3.entry.js +0 -4
- package/dist/esm-es5/ion-datetime-button.entry.js +0 -4
- package/dist/esm-es5/ion-datetime_3.entry.js +0 -4
- package/dist/esm-es5/ion-fab_3.entry.js +0 -4
- package/dist/esm-es5/ion-img.entry.js +0 -4
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +0 -4
- package/dist/esm-es5/ion-input-password-toggle.entry.js +0 -4
- package/dist/esm-es5/ion-input.entry.js +0 -4
- package/dist/esm-es5/ion-item-option_3.entry.js +0 -4
- package/dist/esm-es5/ion-item_8.entry.js +0 -4
- package/dist/esm-es5/ion-loading.entry.js +0 -4
- package/dist/esm-es5/ion-menu_3.entry.js +0 -4
- package/dist/esm-es5/ion-modal.entry.js +0 -4
- package/dist/esm-es5/ion-nav_2.entry.js +0 -4
- package/dist/esm-es5/ion-picker-column-option.entry.js +0 -4
- package/dist/esm-es5/ion-picker-column.entry.js +0 -4
- package/dist/esm-es5/ion-picker.entry.js +0 -4
- package/dist/esm-es5/ion-popover.entry.js +0 -4
- package/dist/esm-es5/ion-progress-bar.entry.js +0 -4
- package/dist/esm-es5/ion-radio_2.entry.js +0 -4
- package/dist/esm-es5/ion-range.entry.js +0 -4
- package/dist/esm-es5/ion-refresher_2.entry.js +0 -4
- package/dist/esm-es5/ion-reorder_2.entry.js +0 -4
- package/dist/esm-es5/ion-ripple-effect.entry.js +0 -4
- package/dist/esm-es5/ion-route_4.entry.js +0 -4
- package/dist/esm-es5/ion-searchbar.entry.js +0 -4
- package/dist/esm-es5/ion-segment-content.entry.js +0 -4
- package/dist/esm-es5/ion-segment-view.entry.js +0 -4
- package/dist/esm-es5/ion-segment_2.entry.js +0 -4
- package/dist/esm-es5/ion-select-modal.entry.js +0 -4
- package/dist/esm-es5/ion-select_3.entry.js +0 -4
- package/dist/esm-es5/ion-spinner.entry.js +0 -4
- package/dist/esm-es5/ion-split-pane.entry.js +0 -4
- package/dist/esm-es5/ion-tab-bar_2.entry.js +0 -4
- package/dist/esm-es5/ion-tab_2.entry.js +0 -4
- package/dist/esm-es5/ion-text.entry.js +0 -4
- package/dist/esm-es5/ion-textarea.entry.js +0 -4
- package/dist/esm-es5/ion-toast.entry.js +0 -4
- package/dist/esm-es5/ion-toggle.entry.js +0 -4
- package/dist/esm-es5/ionic-global-b26f573e.js +0 -4
- package/dist/esm-es5/ionic.js +0 -4
- package/dist/esm-es5/ios.transition-4047cb68.js +0 -4
- package/dist/esm-es5/keyboard-52278bd7.js +0 -4
- package/dist/esm-es5/keyboard-73175e24.js +0 -4
- package/dist/esm-es5/keyboard-controller-ec5c2bfa.js +0 -4
- package/dist/esm-es5/loader.js +0 -4
- package/dist/esm-es5/lock-controller-316928be.js +0 -4
- package/dist/esm-es5/md.transition-30ce8d1b.js +0 -4
- package/dist/esm-es5/notch-controller-1a1f7183.js +0 -4
- package/dist/esm-es5/overlays-d99dcb0a.js +0 -4
- package/dist/esm-es5/spinner-configs-964f7cf3.js +0 -4
- package/dist/esm-es5/status-tap-42a8af65.js +0 -4
- package/dist/esm-es5/swipe-back-0184f6b3.js +0 -4
- package/dist/esm-es5/theme-01f3f29c.js +0 -4
- package/dist/esm-es5/watch-options-c2911ace.js +0 -4
- package/dist/ionic/ionic.js +0 -127
- package/dist/ionic/p-00023f5a.system.js +0 -4
- package/dist/ionic/p-012c3ceb.system.js +0 -4
- package/dist/ionic/p-019e30a3.system.entry.js +0 -4
- package/dist/ionic/p-03480b95.system.entry.js +0 -4
- package/dist/ionic/p-08cef0b1.entry.js +0 -4
- package/dist/ionic/p-08e01816.system.js +0 -4
- package/dist/ionic/p-105b2e8b.entry.js +0 -4
- package/dist/ionic/p-117d0013.system.entry.js +0 -4
- package/dist/ionic/p-11dca959.entry.js +0 -4
- package/dist/ionic/p-12193821.system.js +0 -4
- package/dist/ionic/p-12830298.system.entry.js +0 -4
- package/dist/ionic/p-14154301.system.entry.js +0 -4
- package/dist/ionic/p-14bdb5aa.entry.js +0 -4
- package/dist/ionic/p-1706b406.system.entry.js +0 -4
- package/dist/ionic/p-171ca87d.system.js +0 -4
- package/dist/ionic/p-19494658.system.entry.js +0 -4
- package/dist/ionic/p-1966a13c.system.js +0 -4
- package/dist/ionic/p-1974d5b2.system.js +0 -4
- package/dist/ionic/p-1a81ac09.system.js +0 -4
- package/dist/ionic/p-1b9c59ab.js +0 -4
- package/dist/ionic/p-1d307396.system.js +0 -4
- package/dist/ionic/p-1dfc11b3.system.js +0 -4
- package/dist/ionic/p-1e4371bd.js +0 -4
- package/dist/ionic/p-1e955a45.system.js +0 -4
- package/dist/ionic/p-20d469d0.system.js +0 -4
- package/dist/ionic/p-21891ead.js +0 -4
- package/dist/ionic/p-2233344a.system.js +0 -4
- package/dist/ionic/p-24a6c8a3.system.entry.js +0 -4
- package/dist/ionic/p-257fb777.entry.js +0 -4
- package/dist/ionic/p-25b10f81.js +0 -4
- package/dist/ionic/p-2b7827c7.js +0 -4
- package/dist/ionic/p-2bff0e69.system.entry.js +0 -4
- package/dist/ionic/p-2c7a230a.entry.js +0 -4
- package/dist/ionic/p-31dc303d.entry.js +0 -4
- package/dist/ionic/p-3535d6b5.entry.js +0 -4
- package/dist/ionic/p-35cdfd77.system.entry.js +0 -4
- package/dist/ionic/p-39fa7dd1.system.entry.js +0 -4
- package/dist/ionic/p-3a30f31b.system.entry.js +0 -4
- package/dist/ionic/p-3e1e14d9.system.js +0 -4
- package/dist/ionic/p-42f08b26.system.entry.js +0 -4
- package/dist/ionic/p-4609d030.system.js +0 -4
- package/dist/ionic/p-4a5be299.system.entry.js +0 -4
- package/dist/ionic/p-4c667fce.js +0 -4
- package/dist/ionic/p-4cf4172e.entry.js +0 -4
- package/dist/ionic/p-4da92dac.entry.js +0 -4
- package/dist/ionic/p-4ed5db19.system.js +0 -4
- package/dist/ionic/p-4f255d5a.system.js +0 -4
- package/dist/ionic/p-50cb2e8b.system.entry.js +0 -4
- package/dist/ionic/p-57957c0f.entry.js +0 -4
- package/dist/ionic/p-57e55ecb.system.js +0 -4
- package/dist/ionic/p-5c9feddc.system.entry.js +0 -4
- package/dist/ionic/p-5fac20aa.system.entry.js +0 -4
- package/dist/ionic/p-612096e6.system.entry.js +0 -4
- package/dist/ionic/p-6201c4ba.entry.js +0 -4
- package/dist/ionic/p-625248d0.system.js +0 -4
- package/dist/ionic/p-663413be.system.js +0 -4
- package/dist/ionic/p-66a5d6a8.js +0 -5
- package/dist/ionic/p-66df5468.system.entry.js +0 -4
- package/dist/ionic/p-67077d48.entry.js +0 -4
- package/dist/ionic/p-6835ebdd.system.entry.js +0 -4
- package/dist/ionic/p-6a03fc0f.entry.js +0 -4
- package/dist/ionic/p-6b8530f5.system.entry.js +0 -4
- package/dist/ionic/p-6c474e87.entry.js +0 -4
- package/dist/ionic/p-6dd86ff5.system.entry.js +0 -4
- package/dist/ionic/p-6ec0c94a.entry.js +0 -4
- package/dist/ionic/p-6f832afe.system.entry.js +0 -4
- package/dist/ionic/p-707408c5.system.entry.js +0 -4
- package/dist/ionic/p-712c0131.entry.js +0 -4
- package/dist/ionic/p-721f43f9.entry.js +0 -4
- package/dist/ionic/p-72b3050b.system.entry.js +0 -4
- package/dist/ionic/p-7445a2e5.system.js +0 -4
- package/dist/ionic/p-7611ede3.system.entry.js +0 -4
- package/dist/ionic/p-781e2dbb.system.js +0 -4
- package/dist/ionic/p-792919fd.system.js +0 -4
- package/dist/ionic/p-7b8c12c3.entry.js +0 -4
- package/dist/ionic/p-7c5c7ae1.system.entry.js +0 -4
- package/dist/ionic/p-7e3e6ed2.entry.js +0 -4
- package/dist/ionic/p-7ffedf77.system.entry.js +0 -4
- package/dist/ionic/p-81904a80.entry.js +0 -4
- package/dist/ionic/p-84096b45.system.js +0 -4
- package/dist/ionic/p-8450f761.entry.js +0 -4
- package/dist/ionic/p-8460d95a.entry.js +0 -4
- package/dist/ionic/p-85b01465.js +0 -4
- package/dist/ionic/p-865fe95c.entry.js +0 -4
- package/dist/ionic/p-8674af94.entry.js +0 -4
- package/dist/ionic/p-890a4ee2.entry.js +0 -4
- package/dist/ionic/p-891553d8.entry.js +0 -4
- package/dist/ionic/p-8985cdb6.system.js +0 -4
- package/dist/ionic/p-8ab2f7a4.system.entry.js +0 -4
- package/dist/ionic/p-8b050e84.system.js +0 -4
- package/dist/ionic/p-8dacf4e2.entry.js +0 -4
- package/dist/ionic/p-8ededb41.js +0 -4
- package/dist/ionic/p-94551927.js +0 -4
- package/dist/ionic/p-965287fb.system.entry.js +0 -4
- package/dist/ionic/p-979d4f5c.system.js +0 -4
- package/dist/ionic/p-98fd942b.system.entry.js +0 -4
- package/dist/ionic/p-9df5043e.system.entry.js +0 -4
- package/dist/ionic/p-a0fd2fe5.system.entry.js +0 -4
- package/dist/ionic/p-a4866e3e.system.js +0 -4
- package/dist/ionic/p-a5dbe0ff.system.entry.js +0 -4
- package/dist/ionic/p-a835aca8.entry.js +0 -4
- package/dist/ionic/p-a83e3290.system.js +0 -4
- package/dist/ionic/p-a93873de.system.js +0 -4
- package/dist/ionic/p-aad57e35.entry.js +0 -4
- package/dist/ionic/p-ab7337e1.entry.js +0 -4
- package/dist/ionic/p-abe101da.system.js +0 -4
- package/dist/ionic/p-ad592db9.entry.js +0 -4
- package/dist/ionic/p-ae039072.entry.js +0 -4
- package/dist/ionic/p-aebfab05.system.entry.js +0 -4
- package/dist/ionic/p-b06ac4a5.system.js +0 -4
- package/dist/ionic/p-b22ab9f4.js +0 -4
- package/dist/ionic/p-b2e7eda0.system.entry.js +0 -4
- package/dist/ionic/p-b4d17da0.system.entry.js +0 -4
- package/dist/ionic/p-b5432d15.entry.js +0 -4
- package/dist/ionic/p-b8050298.system.entry.js +0 -4
- package/dist/ionic/p-b904cfe2.system.entry.js +0 -4
- package/dist/ionic/p-b9c793d4.entry.js +0 -4
- package/dist/ionic/p-bafc3eae.system.entry.js +0 -4
- package/dist/ionic/p-bf184319.system.entry.js +0 -4
- package/dist/ionic/p-c16443a8.system.js +0 -4
- package/dist/ionic/p-c1b7d311.system.entry.js +0 -4
- package/dist/ionic/p-c2160d8c.entry.js +0 -4
- package/dist/ionic/p-c468af8a.system.js +0 -4
- package/dist/ionic/p-c5b77054.entry.js +0 -4
- package/dist/ionic/p-c5bfa3e9.entry.js +0 -4
- package/dist/ionic/p-c61cc894.js +0 -4
- package/dist/ionic/p-cad82569.entry.js +0 -4
- package/dist/ionic/p-cec902a0.system.entry.js +0 -4
- package/dist/ionic/p-d16fab3f.entry.js +0 -4
- package/dist/ionic/p-d1eb2d7f.entry.js +0 -4
- package/dist/ionic/p-d382f09c.system.js +0 -4
- package/dist/ionic/p-d8d84afa.system.js +0 -4
- package/dist/ionic/p-d984c1ab.system.entry.js +0 -4
- package/dist/ionic/p-df069a0d.entry.js +0 -4
- package/dist/ionic/p-e0eb08e1.system.entry.js +0 -4
- package/dist/ionic/p-e1678e42.entry.js +0 -4
- package/dist/ionic/p-e673a0a2.system.js +0 -4
- package/dist/ionic/p-e727e32d.system.entry.js +0 -4
- package/dist/ionic/p-e8245753.entry.js +0 -4
- package/dist/ionic/p-e887b6a9.system.js +0 -4
- package/dist/ionic/p-edd2e3c7.entry.js +0 -4
- package/dist/ionic/p-f0c9f8e3.system.entry.js +0 -4
- package/dist/ionic/p-f0ef39ab.entry.js +0 -4
- package/dist/ionic/p-f11a9436.system.js +0 -5
- package/dist/ionic/p-f22490a7.system.entry.js +0 -4
- package/dist/ionic/p-f6bb9be7.system.entry.js +0 -4
- package/dist/ionic/p-f6e7d104.system.js +0 -4
- package/dist/ionic/p-f725bf9e.system.js +0 -4
- package/dist/ionic/p-f9a87db2.system.entry.js +0 -4
- package/dist/ionic/p-fa3f4b96.system.js +0 -4
- package/dist/ionic/p-fe063952.system.entry.js +0 -4
- package/loader/package.json +0 -11
- /package/dist/cjs/{compare-with-utils-df1001d7.js → compare-with-utils-DSicavqM.js} +0 -0
- /package/dist/cjs/{cubic-bezier-f2dccc53.js → cubic-bezier-DAjy1V-e.js} +0 -0
- /package/dist/cjs/{dir-94c21456.js → dir-Cn0z1rJH.js} +0 -0
- /package/dist/cjs/{focus-visible-7a0ce04f.js → focus-visible-CCvKiLh3.js} +0 -0
- /package/dist/cjs/{index-cc858e97.js → index-CAT7dkq1.js} +0 -0
- /package/dist/cjs/{index-c8d52405.js → index-DkNv4J_i.js} +0 -0
- /package/dist/cjs/{lock-controller-6585a42a.js → lock-controller-aDB9wrEf.js} +0 -0
- /package/dist/cjs/{spinner-configs-282fd50a.js → spinner-configs-DxHKnd3-.js} +0 -0
- /package/dist/cjs/{theme-d1c573d2.js → theme-CeDs6Hcv.js} +0 -0
- /package/dist/cjs/{watch-options-f5f3e158.js → watch-options-CviOsrTS.js} +0 -0
- /package/dist/esm/{compare-with-utils-a96ff2ea.js → compare-with-utils-sObYyvOy.js} +0 -0
- /package/dist/esm/{cubic-bezier-fe2083dc.js → cubic-bezier-hHmYLOfE.js} +0 -0
- /package/dist/esm/{dir-babeabeb.js → dir-C53feagD.js} +0 -0
- /package/dist/esm/{focus-visible-dd40d69f.js → focus-visible-BmVRXR1y.js} +0 -0
- /package/dist/esm/{index-a5d50daf.js → index-ZjP4CjeZ.js} +0 -0
- /package/dist/esm/{lock-controller-316928be.js → lock-controller-B-hirT0v.js} +0 -0
- /package/dist/esm/{spinner-configs-964f7cf3.js → spinner-configs-D4RIp70E.js} +0 -0
- /package/dist/esm/{theme-01f3f29c.js → theme-DiVJyqlX.js} +0 -0
- /package/dist/esm/{watch-options-c2911ace.js → watch-options-Dtdm8lKC.js} +0 -0
- /package/dist/ionic/{p-ccd02320.js → p-B-hirT0v.js} +0 -0
- /package/dist/ionic/{p-9b97df10.js → p-BTEOs1at.js} +0 -0
- /package/dist/ionic/{p-d47265c8.js → p-BmVRXR1y.js} +0 -0
- /package/dist/ionic/{p-fb813dab.js → p-C53feagD.js} +0 -0
- /package/dist/ionic/{p-f0c2a614.js → p-D4RIp70E.js} +0 -0
- /package/dist/ionic/{p-47794def.js → p-DiVJyqlX.js} +0 -0
- /package/dist/ionic/{p-459d13d5.js → p-Dtdm8lKC.js} +0 -0
- /package/dist/ionic/{p-7b30edcc.js → p-ZjP4CjeZ.js} +0 -0
- /package/dist/ionic/{p-2408c236.js → p-hHmYLOfE.js} +0 -0
- /package/dist/ionic/{p-de756e5c.js → p-sObYyvOy.js} +0 -0
|
@@ -3,31 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
function _interopNamespace(e) {
|
|
7
|
-
if (e && e.__esModule) return e;
|
|
8
|
-
var n = Object.create(null);
|
|
9
|
-
if (e) {
|
|
10
|
-
Object.keys(e).forEach(function (k) {
|
|
11
|
-
if (k !== 'default') {
|
|
12
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return e[k];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
n['default'] = e;
|
|
23
|
-
return Object.freeze(n);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
6
|
const NAMESPACE = 'ionic';
|
|
27
|
-
const BUILD = /* ionic */ {
|
|
7
|
+
const BUILD = /* ionic */ { experimentalSlotFixes: true, hydratedSelectorName: "hydrated", lazyLoad: true, shadowDom: true, slotRelocation: true, updatable: true};
|
|
28
8
|
|
|
29
9
|
/*
|
|
30
|
-
Stencil Client Platform v4.
|
|
10
|
+
Stencil Client Platform v4.29.3 | MIT Licensed | https://stenciljs.com
|
|
31
11
|
*/
|
|
32
12
|
var __defProp = Object.defineProperty;
|
|
33
13
|
var __export = (target, all) => {
|
|
@@ -35,14 +15,47 @@ var __export = (target, all) => {
|
|
|
35
15
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
36
16
|
};
|
|
37
17
|
var Build = {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
isBrowser: true};
|
|
19
|
+
|
|
20
|
+
// src/utils/constants.ts
|
|
21
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
22
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
23
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
24
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
25
|
+
PrimitiveType2["Null"] = "null";
|
|
26
|
+
PrimitiveType2["String"] = "string";
|
|
27
|
+
PrimitiveType2["Number"] = "number";
|
|
28
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
29
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
30
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
31
|
+
return PrimitiveType2;
|
|
32
|
+
})(PrimitiveType || {});
|
|
33
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
34
|
+
NonPrimitiveType2["Array"] = "array";
|
|
35
|
+
NonPrimitiveType2["Date"] = "date";
|
|
36
|
+
NonPrimitiveType2["Map"] = "map";
|
|
37
|
+
NonPrimitiveType2["Object"] = "object";
|
|
38
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
39
|
+
NonPrimitiveType2["Set"] = "set";
|
|
40
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
41
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
42
|
+
return NonPrimitiveType2;
|
|
43
|
+
})(NonPrimitiveType || {});
|
|
44
|
+
var TYPE_CONSTANT = "type";
|
|
45
|
+
var VALUE_CONSTANT = "value";
|
|
46
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
47
|
+
|
|
48
|
+
// src/client/client-host-ref.ts
|
|
49
|
+
var getHostRef = (ref) => {
|
|
50
|
+
if (ref.__stencil__getHostRef) {
|
|
51
|
+
return ref.__stencil__getHostRef();
|
|
52
|
+
}
|
|
53
|
+
return void 0;
|
|
54
|
+
};
|
|
55
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
56
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
57
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
58
|
+
};
|
|
46
59
|
var registerHost = (hostElement, cmpMeta) => {
|
|
47
60
|
const hostRef = {
|
|
48
61
|
$flags$: 0,
|
|
@@ -58,7 +71,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
58
71
|
hostElement["s-p"] = [];
|
|
59
72
|
hostElement["s-rc"] = [];
|
|
60
73
|
}
|
|
61
|
-
|
|
74
|
+
const ref = hostRef;
|
|
75
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
76
|
+
return ref;
|
|
62
77
|
};
|
|
63
78
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
64
79
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -76,18 +91,23 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
76
91
|
return module[exportName];
|
|
77
92
|
}
|
|
78
93
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
79
|
-
return
|
|
94
|
+
return import(
|
|
80
95
|
/* @vite-ignore */
|
|
81
96
|
/* webpackInclude: /\.entry\.js$/ */
|
|
82
97
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
83
98
|
/* webpackMode: "lazy" */
|
|
84
99
|
`./${bundleId}.entry.js${""}`
|
|
85
|
-
)
|
|
86
|
-
{
|
|
87
|
-
|
|
100
|
+
).then(
|
|
101
|
+
(importedModule) => {
|
|
102
|
+
{
|
|
103
|
+
cmpModules.set(bundleId, importedModule);
|
|
104
|
+
}
|
|
105
|
+
return importedModule[exportName];
|
|
106
|
+
},
|
|
107
|
+
(e) => {
|
|
108
|
+
consoleError(e, hostRef.$hostElement$);
|
|
88
109
|
}
|
|
89
|
-
|
|
90
|
-
}, consoleError);
|
|
110
|
+
);
|
|
91
111
|
};
|
|
92
112
|
|
|
93
113
|
// src/client/client-style.ts
|
|
@@ -99,6 +119,7 @@ var CONTENT_REF_ID = "r";
|
|
|
99
119
|
var ORG_LOCATION_ID = "o";
|
|
100
120
|
var SLOT_NODE_ID = "s";
|
|
101
121
|
var TEXT_NODE_ID = "t";
|
|
122
|
+
var COMMENT_NODE_ID = "c";
|
|
102
123
|
var HYDRATE_ID = "s-id";
|
|
103
124
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
104
125
|
var HYDRATE_CHILD_ID = "c-id";
|
|
@@ -106,7 +127,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
|
106
127
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
107
128
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
108
129
|
var win = typeof window !== "undefined" ? window : {};
|
|
109
|
-
var doc = win.document || { head: {} };
|
|
110
130
|
var H = win.HTMLElement || class {
|
|
111
131
|
};
|
|
112
132
|
var plt = {
|
|
@@ -120,9 +140,10 @@ var plt = {
|
|
|
120
140
|
};
|
|
121
141
|
var supportsShadow = BUILD.shadowDom;
|
|
122
142
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
143
|
+
var _a;
|
|
123
144
|
let supportsListenerOptions2 = false;
|
|
124
145
|
try {
|
|
125
|
-
|
|
146
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
126
147
|
"e",
|
|
127
148
|
null,
|
|
128
149
|
Object.defineProperty({}, "passive", {
|
|
@@ -187,24 +208,119 @@ var getAssetPath = (path) => {
|
|
|
187
208
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
188
209
|
};
|
|
189
210
|
|
|
190
|
-
// src/utils/constants.ts
|
|
191
|
-
var EMPTY_OBJ = {};
|
|
192
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
193
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
194
|
-
|
|
195
211
|
// src/utils/helpers.ts
|
|
196
|
-
var isDef = (v) => v != null;
|
|
212
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
197
213
|
var isComplexType = (o) => {
|
|
198
214
|
o = typeof o;
|
|
199
215
|
return o === "object" || o === "function";
|
|
200
216
|
};
|
|
201
217
|
|
|
202
218
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
203
|
-
function queryNonceMetaTagContent(
|
|
219
|
+
function queryNonceMetaTagContent(doc) {
|
|
204
220
|
var _a, _b, _c;
|
|
205
|
-
return (_c = (_b = (_a =
|
|
221
|
+
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;
|
|
206
222
|
}
|
|
207
223
|
|
|
224
|
+
// src/utils/regular-expression.ts
|
|
225
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
226
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
// src/utils/remote-value.ts
|
|
230
|
+
var RemoteValue = class _RemoteValue {
|
|
231
|
+
/**
|
|
232
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
233
|
+
*
|
|
234
|
+
* @param serialized The serialized LocalValue object
|
|
235
|
+
* @returns The original JavaScript value/object
|
|
236
|
+
*/
|
|
237
|
+
static fromLocalValue(serialized) {
|
|
238
|
+
const type = serialized[TYPE_CONSTANT];
|
|
239
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
240
|
+
switch (type) {
|
|
241
|
+
case "string" /* String */:
|
|
242
|
+
return value;
|
|
243
|
+
case "boolean" /* Boolean */:
|
|
244
|
+
return value;
|
|
245
|
+
case "bigint" /* BigInt */:
|
|
246
|
+
return BigInt(value);
|
|
247
|
+
case "undefined" /* Undefined */:
|
|
248
|
+
return void 0;
|
|
249
|
+
case "null" /* Null */:
|
|
250
|
+
return null;
|
|
251
|
+
case "number" /* Number */:
|
|
252
|
+
if (value === "NaN") return NaN;
|
|
253
|
+
if (value === "-0") return -0;
|
|
254
|
+
if (value === "Infinity") return Infinity;
|
|
255
|
+
if (value === "-Infinity") return -Infinity;
|
|
256
|
+
return value;
|
|
257
|
+
case "array" /* Array */:
|
|
258
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
259
|
+
case "date" /* Date */:
|
|
260
|
+
return new Date(value);
|
|
261
|
+
case "map" /* Map */:
|
|
262
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
263
|
+
for (const [key, val] of value) {
|
|
264
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
265
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
266
|
+
map2.set(deserializedKey, deserializedValue);
|
|
267
|
+
}
|
|
268
|
+
return map2;
|
|
269
|
+
case "object" /* Object */:
|
|
270
|
+
const obj = {};
|
|
271
|
+
for (const [key, val] of value) {
|
|
272
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
273
|
+
}
|
|
274
|
+
return obj;
|
|
275
|
+
case "regexp" /* RegularExpression */:
|
|
276
|
+
const { pattern, flags } = value;
|
|
277
|
+
return new RegExp(pattern, flags);
|
|
278
|
+
case "set" /* Set */:
|
|
279
|
+
const set = /* @__PURE__ */ new Set();
|
|
280
|
+
for (const item of value) {
|
|
281
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
282
|
+
}
|
|
283
|
+
return set;
|
|
284
|
+
case "symbol" /* Symbol */:
|
|
285
|
+
return Symbol(value);
|
|
286
|
+
default:
|
|
287
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
292
|
+
*
|
|
293
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
294
|
+
* @returns Array of deserialized JavaScript values
|
|
295
|
+
*/
|
|
296
|
+
static fromLocalValueArray(serializedValues) {
|
|
297
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
301
|
+
*
|
|
302
|
+
* @param obj Object to verify
|
|
303
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
304
|
+
*/
|
|
305
|
+
static isLocalValueObject(obj) {
|
|
306
|
+
if (typeof obj !== "object" || obj === null) {
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
const type = obj[TYPE_CONSTANT];
|
|
313
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
314
|
+
if (!hasTypeProperty) {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
318
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
319
|
+
}
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
|
|
208
324
|
// src/utils/result.ts
|
|
209
325
|
var result_exports = {};
|
|
210
326
|
__export(result_exports, {
|
|
@@ -253,6 +369,527 @@ var unwrapErr = (result) => {
|
|
|
253
369
|
throw result.value;
|
|
254
370
|
}
|
|
255
371
|
};
|
|
372
|
+
|
|
373
|
+
// src/utils/serialize.ts
|
|
374
|
+
function deserializeProperty(value) {
|
|
375
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
376
|
+
return value;
|
|
377
|
+
}
|
|
378
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
379
|
+
}
|
|
380
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
381
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
382
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
383
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
384
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
385
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
386
|
+
slotNode.hidden = true;
|
|
387
|
+
} else {
|
|
388
|
+
slotNode.hidden = false;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
let i2 = 0;
|
|
394
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
395
|
+
const childNode = childNodes[i2];
|
|
396
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
397
|
+
updateFallbackSlotVisibility(childNode);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
402
|
+
const result = [];
|
|
403
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
404
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
405
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
406
|
+
result.push(slottedNode);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return result;
|
|
410
|
+
};
|
|
411
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
412
|
+
let i2 = 0;
|
|
413
|
+
let slottedNodes = [];
|
|
414
|
+
let childNode;
|
|
415
|
+
for (; i2 < childNodes.length; i2++) {
|
|
416
|
+
childNode = childNodes[i2];
|
|
417
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
418
|
+
slottedNodes.push(childNode);
|
|
419
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
420
|
+
}
|
|
421
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
422
|
+
}
|
|
423
|
+
return slottedNodes;
|
|
424
|
+
}
|
|
425
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
426
|
+
const childNodes = [];
|
|
427
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
428
|
+
let node = slot;
|
|
429
|
+
while (node = node.nextSibling) {
|
|
430
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
431
|
+
}
|
|
432
|
+
return childNodes;
|
|
433
|
+
};
|
|
434
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
435
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
436
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
437
|
+
return true;
|
|
438
|
+
}
|
|
439
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
440
|
+
return true;
|
|
441
|
+
}
|
|
442
|
+
return false;
|
|
443
|
+
}
|
|
444
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
445
|
+
return true;
|
|
446
|
+
}
|
|
447
|
+
return slotName === "";
|
|
448
|
+
};
|
|
449
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
450
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
454
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
455
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
456
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
457
|
+
const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
|
|
458
|
+
if (typeof position !== "undefined") {
|
|
459
|
+
slottedNodeLocation["s-oo"] = position;
|
|
460
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
461
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
462
|
+
childNodes.forEach((n) => {
|
|
463
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
464
|
+
});
|
|
465
|
+
slotRelocateNodes.sort((a, b) => {
|
|
466
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
467
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
468
|
+
return 0;
|
|
469
|
+
});
|
|
470
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
471
|
+
} else {
|
|
472
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
473
|
+
}
|
|
474
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
475
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
476
|
+
};
|
|
477
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
478
|
+
function patchSlotNode(node) {
|
|
479
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
480
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
481
|
+
const toReturn = [];
|
|
482
|
+
const slotName = this["s-sn"];
|
|
483
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
484
|
+
console.error(`
|
|
485
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
486
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
487
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
488
|
+
`);
|
|
489
|
+
}
|
|
490
|
+
const parent = this["s-cr"].parentElement;
|
|
491
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
492
|
+
slottedNodes.forEach((n) => {
|
|
493
|
+
if (slotName === getSlotName(n)) {
|
|
494
|
+
toReturn.push(n);
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
if (elementsOnly) {
|
|
498
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
499
|
+
}
|
|
500
|
+
return toReturn;
|
|
501
|
+
}).bind(node);
|
|
502
|
+
node.assignedElements = assignedFactory(true);
|
|
503
|
+
node.assignedNodes = assignedFactory(false);
|
|
504
|
+
}
|
|
505
|
+
function dispatchSlotChangeEvent(elm) {
|
|
506
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
507
|
+
}
|
|
508
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
509
|
+
var _a;
|
|
510
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
511
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
512
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
513
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
514
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
515
|
+
return { slotNode, slotName };
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// src/runtime/dom-extras.ts
|
|
519
|
+
var patchPseudoShadowDom = (hostElementPrototype) => {
|
|
520
|
+
patchCloneNode(hostElementPrototype);
|
|
521
|
+
patchSlotAppendChild(hostElementPrototype);
|
|
522
|
+
patchSlotAppend(hostElementPrototype);
|
|
523
|
+
patchSlotPrepend(hostElementPrototype);
|
|
524
|
+
patchSlotInsertAdjacentElement(hostElementPrototype);
|
|
525
|
+
patchSlotInsertAdjacentHTML(hostElementPrototype);
|
|
526
|
+
patchSlotInsertAdjacentText(hostElementPrototype);
|
|
527
|
+
patchInsertBefore(hostElementPrototype);
|
|
528
|
+
patchTextContent(hostElementPrototype);
|
|
529
|
+
patchChildSlotNodes(hostElementPrototype);
|
|
530
|
+
patchSlotRemoveChild(hostElementPrototype);
|
|
531
|
+
};
|
|
532
|
+
var patchCloneNode = (HostElementPrototype) => {
|
|
533
|
+
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
534
|
+
HostElementPrototype.cloneNode = function(deep) {
|
|
535
|
+
const srcNode = this;
|
|
536
|
+
const isShadowDom = srcNode.shadowRoot && supportsShadow ;
|
|
537
|
+
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
538
|
+
if (!isShadowDom && deep) {
|
|
539
|
+
let i2 = 0;
|
|
540
|
+
let slotted, nonStencilNode;
|
|
541
|
+
const stencilPrivates = [
|
|
542
|
+
"s-id",
|
|
543
|
+
"s-cr",
|
|
544
|
+
"s-lr",
|
|
545
|
+
"s-rc",
|
|
546
|
+
"s-sc",
|
|
547
|
+
"s-p",
|
|
548
|
+
"s-cn",
|
|
549
|
+
"s-sr",
|
|
550
|
+
"s-sn",
|
|
551
|
+
"s-hn",
|
|
552
|
+
"s-ol",
|
|
553
|
+
"s-nr",
|
|
554
|
+
"s-si",
|
|
555
|
+
"s-rf",
|
|
556
|
+
"s-scs"
|
|
557
|
+
];
|
|
558
|
+
const childNodes = this.__childNodes || this.childNodes;
|
|
559
|
+
for (; i2 < childNodes.length; i2++) {
|
|
560
|
+
slotted = childNodes[i2]["s-nr"];
|
|
561
|
+
nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
|
|
562
|
+
if (slotted) {
|
|
563
|
+
if (clonedNode.__appendChild) {
|
|
564
|
+
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
565
|
+
} else {
|
|
566
|
+
clonedNode.appendChild(slotted.cloneNode(true));
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
if (nonStencilNode) {
|
|
570
|
+
clonedNode.appendChild(childNodes[i2].cloneNode(true));
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
return clonedNode;
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
var patchSlotAppendChild = (HostElementPrototype) => {
|
|
578
|
+
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
579
|
+
HostElementPrototype.appendChild = function(newChild) {
|
|
580
|
+
const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
|
|
581
|
+
if (slotNode) {
|
|
582
|
+
addSlotRelocateNode(newChild, slotNode);
|
|
583
|
+
const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
|
|
584
|
+
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
585
|
+
const parent = internalCall(appendAfter, "parentNode");
|
|
586
|
+
const insertedNode = internalCall(parent, "insertBefore")(newChild, appendAfter.nextSibling);
|
|
587
|
+
dispatchSlotChangeEvent(slotNode);
|
|
588
|
+
updateFallbackSlotVisibility(this);
|
|
589
|
+
return insertedNode;
|
|
590
|
+
}
|
|
591
|
+
return this.__appendChild(newChild);
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
var patchSlotRemoveChild = (ElementPrototype) => {
|
|
595
|
+
ElementPrototype.__removeChild = ElementPrototype.removeChild;
|
|
596
|
+
ElementPrototype.removeChild = function(toRemove) {
|
|
597
|
+
if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
|
|
598
|
+
const childNodes = this.__childNodes || this.childNodes;
|
|
599
|
+
const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
|
|
600
|
+
if (slotNode && toRemove.isConnected) {
|
|
601
|
+
toRemove.remove();
|
|
602
|
+
updateFallbackSlotVisibility(this);
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return this.__removeChild(toRemove);
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
var patchSlotPrepend = (HostElementPrototype) => {
|
|
610
|
+
HostElementPrototype.__prepend = HostElementPrototype.prepend;
|
|
611
|
+
HostElementPrototype.prepend = function(...newChildren) {
|
|
612
|
+
newChildren.forEach((newChild) => {
|
|
613
|
+
if (typeof newChild === "string") {
|
|
614
|
+
newChild = this.ownerDocument.createTextNode(newChild);
|
|
615
|
+
}
|
|
616
|
+
const slotName = (newChild["s-sn"] = getSlotName(newChild)) || "";
|
|
617
|
+
const childNodes = internalCall(this, "childNodes");
|
|
618
|
+
const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
|
|
619
|
+
if (slotNode) {
|
|
620
|
+
addSlotRelocateNode(newChild, slotNode, true);
|
|
621
|
+
const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
|
|
622
|
+
const appendAfter = slotChildNodes[0];
|
|
623
|
+
const parent = internalCall(appendAfter, "parentNode");
|
|
624
|
+
const toReturn = internalCall(parent, "insertBefore")(newChild, internalCall(appendAfter, "nextSibling"));
|
|
625
|
+
dispatchSlotChangeEvent(slotNode);
|
|
626
|
+
return toReturn;
|
|
627
|
+
}
|
|
628
|
+
if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
|
|
629
|
+
newChild.hidden = true;
|
|
630
|
+
}
|
|
631
|
+
return HostElementPrototype.__prepend(newChild);
|
|
632
|
+
});
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
var patchSlotAppend = (HostElementPrototype) => {
|
|
636
|
+
HostElementPrototype.__append = HostElementPrototype.append;
|
|
637
|
+
HostElementPrototype.append = function(...newChildren) {
|
|
638
|
+
newChildren.forEach((newChild) => {
|
|
639
|
+
if (typeof newChild === "string") {
|
|
640
|
+
newChild = this.ownerDocument.createTextNode(newChild);
|
|
641
|
+
}
|
|
642
|
+
this.appendChild(newChild);
|
|
643
|
+
});
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
|
|
647
|
+
const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
|
|
648
|
+
HostElementPrototype.insertAdjacentHTML = function(position, text) {
|
|
649
|
+
if (position !== "afterbegin" && position !== "beforeend") {
|
|
650
|
+
return originalInsertAdjacentHtml.call(this, position, text);
|
|
651
|
+
}
|
|
652
|
+
const container = this.ownerDocument.createElement("_");
|
|
653
|
+
let node;
|
|
654
|
+
container.innerHTML = text;
|
|
655
|
+
if (position === "afterbegin") {
|
|
656
|
+
while (node = container.firstChild) {
|
|
657
|
+
this.prepend(node);
|
|
658
|
+
}
|
|
659
|
+
} else if (position === "beforeend") {
|
|
660
|
+
while (node = container.firstChild) {
|
|
661
|
+
this.append(node);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
var patchSlotInsertAdjacentText = (HostElementPrototype) => {
|
|
667
|
+
HostElementPrototype.insertAdjacentText = function(position, text) {
|
|
668
|
+
this.insertAdjacentHTML(position, text);
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
var patchInsertBefore = (HostElementPrototype) => {
|
|
672
|
+
const eleProto = HostElementPrototype;
|
|
673
|
+
if (eleProto.__insertBefore) return;
|
|
674
|
+
eleProto.__insertBefore = HostElementPrototype.insertBefore;
|
|
675
|
+
HostElementPrototype.insertBefore = function(newChild, currentChild) {
|
|
676
|
+
const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
|
|
677
|
+
const slottedNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
678
|
+
if (slotNode) {
|
|
679
|
+
let found = false;
|
|
680
|
+
slottedNodes.forEach((childNode) => {
|
|
681
|
+
if (childNode === currentChild || currentChild === null) {
|
|
682
|
+
found = true;
|
|
683
|
+
if (currentChild === null || slotName !== currentChild["s-sn"]) {
|
|
684
|
+
this.appendChild(newChild);
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
if (slotName === currentChild["s-sn"]) {
|
|
688
|
+
addSlotRelocateNode(newChild, slotNode);
|
|
689
|
+
const parent = internalCall(currentChild, "parentNode");
|
|
690
|
+
internalCall(parent, "insertBefore")(newChild, currentChild);
|
|
691
|
+
dispatchSlotChangeEvent(slotNode);
|
|
692
|
+
}
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
if (found) return newChild;
|
|
697
|
+
}
|
|
698
|
+
const parentNode = currentChild == null ? void 0 : currentChild.__parentNode;
|
|
699
|
+
if (parentNode && !this.isSameNode(parentNode)) {
|
|
700
|
+
return this.appendChild(newChild);
|
|
701
|
+
}
|
|
702
|
+
return this.__insertBefore(newChild, currentChild);
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
706
|
+
const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
|
|
707
|
+
HostElementPrototype.insertAdjacentElement = function(position, element) {
|
|
708
|
+
if (position !== "afterbegin" && position !== "beforeend") {
|
|
709
|
+
return originalInsertAdjacentElement.call(this, position, element);
|
|
710
|
+
}
|
|
711
|
+
if (position === "afterbegin") {
|
|
712
|
+
this.prepend(element);
|
|
713
|
+
return element;
|
|
714
|
+
} else if (position === "beforeend") {
|
|
715
|
+
this.append(element);
|
|
716
|
+
return element;
|
|
717
|
+
}
|
|
718
|
+
return element;
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
var patchTextContent = (hostElementPrototype) => {
|
|
722
|
+
patchHostOriginalAccessor("textContent", hostElementPrototype);
|
|
723
|
+
Object.defineProperty(hostElementPrototype, "textContent", {
|
|
724
|
+
get: function() {
|
|
725
|
+
let text = "";
|
|
726
|
+
const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
727
|
+
childNodes.forEach((node) => text += node.textContent || "");
|
|
728
|
+
return text;
|
|
729
|
+
},
|
|
730
|
+
set: function(value) {
|
|
731
|
+
const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
732
|
+
childNodes.forEach((node) => {
|
|
733
|
+
if (node["s-ol"]) node["s-ol"].remove();
|
|
734
|
+
node.remove();
|
|
735
|
+
});
|
|
736
|
+
this.insertAdjacentHTML("beforeend", value);
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
};
|
|
740
|
+
var patchChildSlotNodes = (elm) => {
|
|
741
|
+
class FakeNodeList extends Array {
|
|
742
|
+
item(n) {
|
|
743
|
+
return this[n];
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
patchHostOriginalAccessor("children", elm);
|
|
747
|
+
Object.defineProperty(elm, "children", {
|
|
748
|
+
get() {
|
|
749
|
+
return this.childNodes.filter((n) => n.nodeType === 1);
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
Object.defineProperty(elm, "childElementCount", {
|
|
753
|
+
get() {
|
|
754
|
+
return this.children.length;
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
patchHostOriginalAccessor("firstChild", elm);
|
|
758
|
+
Object.defineProperty(elm, "firstChild", {
|
|
759
|
+
get() {
|
|
760
|
+
return this.childNodes[0];
|
|
761
|
+
}
|
|
762
|
+
});
|
|
763
|
+
patchHostOriginalAccessor("lastChild", elm);
|
|
764
|
+
Object.defineProperty(elm, "lastChild", {
|
|
765
|
+
get() {
|
|
766
|
+
return this.childNodes[this.childNodes.length - 1];
|
|
767
|
+
}
|
|
768
|
+
});
|
|
769
|
+
patchHostOriginalAccessor("childNodes", elm);
|
|
770
|
+
Object.defineProperty(elm, "childNodes", {
|
|
771
|
+
get() {
|
|
772
|
+
const result = new FakeNodeList();
|
|
773
|
+
result.push(...getSlottedChildNodes(this.__childNodes));
|
|
774
|
+
return result;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
};
|
|
778
|
+
var patchSlottedNode = (node) => {
|
|
779
|
+
if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
|
|
780
|
+
patchNextSibling(node);
|
|
781
|
+
patchPreviousSibling(node);
|
|
782
|
+
patchParentNode(node);
|
|
783
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
784
|
+
patchNextElementSibling(node);
|
|
785
|
+
patchPreviousElementSibling(node);
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
var patchNextSibling = (node) => {
|
|
789
|
+
if (!node || node.__nextSibling) return;
|
|
790
|
+
patchHostOriginalAccessor("nextSibling", node);
|
|
791
|
+
Object.defineProperty(node, "nextSibling", {
|
|
792
|
+
get: function() {
|
|
793
|
+
var _a;
|
|
794
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
795
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
796
|
+
if (parentNodes && index > -1) {
|
|
797
|
+
return parentNodes[index + 1];
|
|
798
|
+
}
|
|
799
|
+
return this.__nextSibling;
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
};
|
|
803
|
+
var patchNextElementSibling = (element) => {
|
|
804
|
+
if (!element || element.__nextElementSibling) return;
|
|
805
|
+
patchHostOriginalAccessor("nextElementSibling", element);
|
|
806
|
+
Object.defineProperty(element, "nextElementSibling", {
|
|
807
|
+
get: function() {
|
|
808
|
+
var _a;
|
|
809
|
+
const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
810
|
+
const index = parentEles == null ? void 0 : parentEles.indexOf(this);
|
|
811
|
+
if (parentEles && index > -1) {
|
|
812
|
+
return parentEles[index + 1];
|
|
813
|
+
}
|
|
814
|
+
return this.__nextElementSibling;
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
};
|
|
818
|
+
var patchPreviousSibling = (node) => {
|
|
819
|
+
if (!node || node.__previousSibling) return;
|
|
820
|
+
patchHostOriginalAccessor("previousSibling", node);
|
|
821
|
+
Object.defineProperty(node, "previousSibling", {
|
|
822
|
+
get: function() {
|
|
823
|
+
var _a;
|
|
824
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
825
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
826
|
+
if (parentNodes && index > -1) {
|
|
827
|
+
return parentNodes[index - 1];
|
|
828
|
+
}
|
|
829
|
+
return this.__previousSibling;
|
|
830
|
+
}
|
|
831
|
+
});
|
|
832
|
+
};
|
|
833
|
+
var patchPreviousElementSibling = (element) => {
|
|
834
|
+
if (!element || element.__previousElementSibling) return;
|
|
835
|
+
patchHostOriginalAccessor("previousElementSibling", element);
|
|
836
|
+
Object.defineProperty(element, "previousElementSibling", {
|
|
837
|
+
get: function() {
|
|
838
|
+
var _a;
|
|
839
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
840
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
841
|
+
if (parentNodes && index > -1) {
|
|
842
|
+
return parentNodes[index - 1];
|
|
843
|
+
}
|
|
844
|
+
return this.__previousElementSibling;
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
};
|
|
848
|
+
var patchParentNode = (node) => {
|
|
849
|
+
if (!node || node.__parentNode) return;
|
|
850
|
+
patchHostOriginalAccessor("parentNode", node);
|
|
851
|
+
Object.defineProperty(node, "parentNode", {
|
|
852
|
+
get: function() {
|
|
853
|
+
var _a;
|
|
854
|
+
return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
|
|
855
|
+
},
|
|
856
|
+
set: function(value) {
|
|
857
|
+
this.__parentNode = value;
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
};
|
|
861
|
+
var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
|
|
862
|
+
var validNodesPatches = [
|
|
863
|
+
"childNodes",
|
|
864
|
+
"firstChild",
|
|
865
|
+
"lastChild",
|
|
866
|
+
"nextSibling",
|
|
867
|
+
"previousSibling",
|
|
868
|
+
"textContent",
|
|
869
|
+
"parentNode"
|
|
870
|
+
];
|
|
871
|
+
function patchHostOriginalAccessor(accessorName, node) {
|
|
872
|
+
let accessor;
|
|
873
|
+
if (validElementPatches.includes(accessorName)) {
|
|
874
|
+
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
875
|
+
} else if (validNodesPatches.includes(accessorName)) {
|
|
876
|
+
accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
|
|
877
|
+
}
|
|
878
|
+
if (!accessor) {
|
|
879
|
+
accessor = Object.getOwnPropertyDescriptor(node, accessorName);
|
|
880
|
+
}
|
|
881
|
+
if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
|
|
882
|
+
}
|
|
883
|
+
function internalCall(node, method) {
|
|
884
|
+
if ("__" + method in node) {
|
|
885
|
+
const toReturn = node["__" + method];
|
|
886
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
887
|
+
return toReturn.bind(node);
|
|
888
|
+
} else {
|
|
889
|
+
if (typeof node[method] !== "function") return node[method];
|
|
890
|
+
return node[method].bind(node);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
256
893
|
var createTime = (fnName, tagName = "") => {
|
|
257
894
|
{
|
|
258
895
|
return () => {
|
|
@@ -381,54 +1018,166 @@ var convertToPrivate = (node) => {
|
|
|
381
1018
|
|
|
382
1019
|
// src/runtime/client-hydrate.ts
|
|
383
1020
|
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1021
|
+
var _a;
|
|
384
1022
|
const endHydrate = createTime("hydrateClient", tagName);
|
|
385
1023
|
const shadowRoot = hostElm.shadowRoot;
|
|
386
1024
|
const childRenderNodes = [];
|
|
387
1025
|
const slotNodes = [];
|
|
1026
|
+
const slottedNodes = [];
|
|
388
1027
|
const shadowRootNodes = shadowRoot ? [] : null;
|
|
389
|
-
const vnode =
|
|
390
|
-
|
|
391
|
-
|
|
1028
|
+
const vnode = newVNode(tagName, null);
|
|
1029
|
+
vnode.$elm$ = hostElm;
|
|
1030
|
+
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
1031
|
+
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
1032
|
+
var _a2;
|
|
1033
|
+
if (!(memberFlags & 31 /* Prop */)) {
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
const attributeName = metaAttributeName || memberName;
|
|
1037
|
+
const attrVal = hostElm.getAttribute(attributeName);
|
|
1038
|
+
if (attrVal !== null) {
|
|
1039
|
+
const attrPropVal = parsePropertyValue(attrVal, memberFlags);
|
|
1040
|
+
(_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
|
|
1041
|
+
}
|
|
1042
|
+
});
|
|
1043
|
+
let scopeId2;
|
|
1044
|
+
{
|
|
1045
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1046
|
+
if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
|
|
1047
|
+
scopeId2 = hostElm["s-sc"];
|
|
1048
|
+
hostElm.classList.add(scopeId2 + "-h");
|
|
1049
|
+
} else if (hostElm["s-sc"]) {
|
|
1050
|
+
delete hostElm["s-sc"];
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
1054
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
392
1055
|
}
|
|
393
1056
|
hostElm[HYDRATE_ID] = hostId;
|
|
394
1057
|
hostElm.removeAttribute(HYDRATE_ID);
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
1058
|
+
hostRef.$vnode$ = clientHydrate(
|
|
1059
|
+
vnode,
|
|
1060
|
+
childRenderNodes,
|
|
1061
|
+
slotNodes,
|
|
1062
|
+
shadowRootNodes,
|
|
1063
|
+
hostElm,
|
|
1064
|
+
hostElm,
|
|
1065
|
+
hostId,
|
|
1066
|
+
slottedNodes
|
|
1067
|
+
);
|
|
1068
|
+
let crIndex = 0;
|
|
1069
|
+
const crLength = childRenderNodes.length;
|
|
1070
|
+
let childRenderNode;
|
|
1071
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
1072
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
1073
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
398
1074
|
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
399
|
-
const node =
|
|
400
|
-
if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
|
|
401
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
402
|
-
}
|
|
1075
|
+
const node = childRenderNode.$elm$;
|
|
403
1076
|
if (!shadowRoot) {
|
|
404
|
-
node["s-hn"] = tagName;
|
|
405
|
-
if (
|
|
406
|
-
node["s-
|
|
407
|
-
|
|
1077
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
1078
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1079
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1083
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
1084
|
+
if (childRenderNode.$children$) {
|
|
1085
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
1086
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
1087
|
+
childRenderNode.$children$.forEach((c) => {
|
|
1088
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
} else {
|
|
1092
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
1096
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1097
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1098
|
+
}
|
|
1099
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
1100
|
+
if (!shadowRoot) {
|
|
1101
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
408
1102
|
}
|
|
409
1103
|
}
|
|
410
1104
|
plt.$orgLocNodes$.delete(orgLocationId);
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
1105
|
+
}
|
|
1106
|
+
const hosts = [];
|
|
1107
|
+
const snLen = slottedNodes.length;
|
|
1108
|
+
let snIndex = 0;
|
|
1109
|
+
let slotGroup;
|
|
1110
|
+
let snGroupIdx;
|
|
1111
|
+
let snGroupLen;
|
|
1112
|
+
let slottedItem;
|
|
1113
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
1114
|
+
slotGroup = slottedNodes[snIndex];
|
|
1115
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
1116
|
+
snGroupLen = slotGroup.length;
|
|
1117
|
+
snGroupIdx = 0;
|
|
1118
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1119
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
1120
|
+
if (!hosts[slottedItem.hostId]) {
|
|
1121
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1122
|
+
}
|
|
1123
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
1124
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
1125
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1126
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1127
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1128
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
1129
|
+
} else {
|
|
1130
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1131
|
+
}
|
|
1132
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1133
|
+
{
|
|
1134
|
+
patchSlottedNode(slottedItem.node);
|
|
1135
|
+
}
|
|
416
1136
|
}
|
|
1137
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1138
|
+
hostEle.appendChild(slottedItem.node);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
if (scopeId2 && slotNodes.length) {
|
|
1143
|
+
slotNodes.forEach((slot) => {
|
|
1144
|
+
slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
|
|
417
1145
|
});
|
|
418
1146
|
}
|
|
1147
|
+
if (shadowRoot && !shadowRoot.childNodes.length) {
|
|
1148
|
+
let rnIdex = 0;
|
|
1149
|
+
const rnLen = shadowRootNodes.length;
|
|
1150
|
+
if (rnLen) {
|
|
1151
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1152
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
1153
|
+
}
|
|
1154
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1155
|
+
if (typeof node["s-sn"] !== "string") {
|
|
1156
|
+
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
1157
|
+
node.removeAttribute("hidden");
|
|
1158
|
+
} else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1159
|
+
node.parentNode.removeChild(node);
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
1166
|
+
hostRef.$hostElement$ = hostElm;
|
|
419
1167
|
endHydrate();
|
|
420
1168
|
};
|
|
421
|
-
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
1169
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
422
1170
|
let childNodeType;
|
|
423
1171
|
let childIdSplt;
|
|
424
1172
|
let childVNode;
|
|
425
1173
|
let i2;
|
|
1174
|
+
const scopeId2 = hostElm["s-sc"];
|
|
426
1175
|
if (node.nodeType === 1 /* ElementNode */) {
|
|
427
1176
|
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
428
1177
|
if (childNodeType) {
|
|
429
1178
|
childIdSplt = childNodeType.split(".");
|
|
430
1179
|
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
431
|
-
childVNode = {
|
|
1180
|
+
childVNode = createSimpleVNode({
|
|
432
1181
|
$flags$: 0,
|
|
433
1182
|
$hostId$: childIdSplt[0],
|
|
434
1183
|
$nodeId$: childIdSplt[1],
|
|
@@ -436,18 +1185,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
436
1185
|
$index$: childIdSplt[3],
|
|
437
1186
|
$tag$: node.tagName.toLowerCase(),
|
|
438
1187
|
$elm$: node,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
$
|
|
442
|
-
|
|
443
|
-
$text$: null
|
|
444
|
-
};
|
|
1188
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
1189
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
1190
|
+
$attrs$: { class: node.className || "" }
|
|
1191
|
+
});
|
|
445
1192
|
childRenderNodes.push(childVNode);
|
|
446
1193
|
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
447
1194
|
if (!parentVNode.$children$) {
|
|
448
1195
|
parentVNode.$children$ = [];
|
|
449
1196
|
}
|
|
450
|
-
|
|
1197
|
+
if (scopeId2) {
|
|
1198
|
+
node["s-si"] = scopeId2;
|
|
1199
|
+
childVNode.$attrs$.class += " " + scopeId2;
|
|
1200
|
+
}
|
|
1201
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1202
|
+
if (typeof slotName === "string") {
|
|
1203
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
1204
|
+
addSlot(
|
|
1205
|
+
slotName,
|
|
1206
|
+
childIdSplt[2],
|
|
1207
|
+
childVNode,
|
|
1208
|
+
node,
|
|
1209
|
+
parentVNode,
|
|
1210
|
+
childRenderNodes,
|
|
1211
|
+
slotNodes,
|
|
1212
|
+
shadowRootNodes,
|
|
1213
|
+
slottedNodes
|
|
1214
|
+
);
|
|
1215
|
+
if (scopeId2) {
|
|
1216
|
+
node.classList.add(scopeId2);
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
1220
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
1221
|
+
}
|
|
1222
|
+
if (childVNode.$index$ !== void 0) {
|
|
1223
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1224
|
+
}
|
|
451
1225
|
parentVNode = childVNode;
|
|
452
1226
|
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
453
1227
|
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
@@ -463,31 +1237,33 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
463
1237
|
shadowRootNodes,
|
|
464
1238
|
hostElm,
|
|
465
1239
|
node.shadowRoot.childNodes[i2],
|
|
466
|
-
hostId
|
|
1240
|
+
hostId,
|
|
1241
|
+
slottedNodes
|
|
467
1242
|
);
|
|
468
1243
|
}
|
|
469
1244
|
}
|
|
470
|
-
|
|
1245
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1246
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
471
1247
|
clientHydrate(
|
|
472
1248
|
parentVNode,
|
|
473
1249
|
childRenderNodes,
|
|
474
1250
|
slotNodes,
|
|
475
1251
|
shadowRootNodes,
|
|
476
1252
|
hostElm,
|
|
477
|
-
|
|
478
|
-
hostId
|
|
1253
|
+
nonShadowNodes[i2],
|
|
1254
|
+
hostId,
|
|
1255
|
+
slottedNodes
|
|
479
1256
|
);
|
|
480
1257
|
}
|
|
481
1258
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
482
1259
|
childIdSplt = node.nodeValue.split(".");
|
|
483
1260
|
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
484
1261
|
childNodeType = childIdSplt[0];
|
|
485
|
-
childVNode = {
|
|
486
|
-
$flags$: 0,
|
|
1262
|
+
childVNode = createSimpleVNode({
|
|
487
1263
|
$hostId$: childIdSplt[1],
|
|
488
1264
|
$nodeId$: childIdSplt[2],
|
|
489
1265
|
$depth$: childIdSplt[3],
|
|
490
|
-
$index$: childIdSplt[4],
|
|
1266
|
+
$index$: childIdSplt[4] || "0",
|
|
491
1267
|
$elm$: node,
|
|
492
1268
|
$attrs$: null,
|
|
493
1269
|
$children$: null,
|
|
@@ -495,46 +1271,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
495
1271
|
$name$: null,
|
|
496
1272
|
$tag$: null,
|
|
497
1273
|
$text$: null
|
|
498
|
-
};
|
|
1274
|
+
});
|
|
499
1275
|
if (childNodeType === TEXT_NODE_ID) {
|
|
500
|
-
childVNode.$elm$ = node
|
|
1276
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
501
1277
|
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
502
1278
|
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
503
1279
|
childRenderNodes.push(childVNode);
|
|
504
1280
|
node.remove();
|
|
505
|
-
if (
|
|
506
|
-
parentVNode.$children$
|
|
1281
|
+
if (hostId === childVNode.$hostId$) {
|
|
1282
|
+
if (!parentVNode.$children$) {
|
|
1283
|
+
parentVNode.$children$ = [];
|
|
1284
|
+
}
|
|
1285
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
507
1286
|
}
|
|
508
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
509
1287
|
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
510
1288
|
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
511
1289
|
}
|
|
512
1290
|
}
|
|
1291
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
1292
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
1293
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
1294
|
+
childRenderNodes.push(childVNode);
|
|
1295
|
+
node.remove();
|
|
1296
|
+
}
|
|
513
1297
|
} else if (childVNode.$hostId$ === hostId) {
|
|
514
1298
|
if (childNodeType === SLOT_NODE_ID) {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
528
|
-
node.remove();
|
|
529
|
-
if (childVNode.$depth$ === "0") {
|
|
530
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
slotNodes.push(childVNode);
|
|
534
|
-
if (!parentVNode.$children$) {
|
|
535
|
-
parentVNode.$children$ = [];
|
|
536
|
-
}
|
|
537
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1299
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
1300
|
+
addSlot(
|
|
1301
|
+
slotName,
|
|
1302
|
+
childIdSplt[2],
|
|
1303
|
+
childVNode,
|
|
1304
|
+
node,
|
|
1305
|
+
parentVNode,
|
|
1306
|
+
childRenderNodes,
|
|
1307
|
+
slotNodes,
|
|
1308
|
+
shadowRootNodes,
|
|
1309
|
+
slottedNodes
|
|
1310
|
+
);
|
|
538
1311
|
} else if (childNodeType === CONTENT_REF_ID) {
|
|
539
1312
|
if (shadowRootNodes) {
|
|
540
1313
|
node.remove();
|
|
@@ -550,18 +1323,28 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
550
1323
|
vnode.$elm$ = node;
|
|
551
1324
|
vnode.$index$ = "0";
|
|
552
1325
|
parentVNode.$children$ = [vnode];
|
|
1326
|
+
} else {
|
|
1327
|
+
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1328
|
+
node.remove();
|
|
1329
|
+
}
|
|
553
1330
|
}
|
|
1331
|
+
return parentVNode;
|
|
554
1332
|
};
|
|
555
1333
|
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
556
1334
|
if (node.nodeType === 1 /* ElementNode */) {
|
|
1335
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1336
|
+
if (componentId) {
|
|
1337
|
+
orgLocNodes.set(componentId, node);
|
|
1338
|
+
}
|
|
557
1339
|
let i2 = 0;
|
|
558
1340
|
if (node.shadowRoot) {
|
|
559
1341
|
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
560
1342
|
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
561
1343
|
}
|
|
562
1344
|
}
|
|
563
|
-
|
|
564
|
-
|
|
1345
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1346
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1347
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
565
1348
|
}
|
|
566
1349
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
567
1350
|
const childIdSplt = node.nodeValue.split(".");
|
|
@@ -572,18 +1355,110 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
|
572
1355
|
}
|
|
573
1356
|
}
|
|
574
1357
|
};
|
|
1358
|
+
var createSimpleVNode = (vnode) => {
|
|
1359
|
+
const defaultVNode = {
|
|
1360
|
+
$flags$: 0,
|
|
1361
|
+
$hostId$: null,
|
|
1362
|
+
$nodeId$: null,
|
|
1363
|
+
$depth$: null,
|
|
1364
|
+
$index$: "0",
|
|
1365
|
+
$elm$: null,
|
|
1366
|
+
$attrs$: null,
|
|
1367
|
+
$children$: null,
|
|
1368
|
+
$key$: null,
|
|
1369
|
+
$name$: null,
|
|
1370
|
+
$tag$: null,
|
|
1371
|
+
$text$: null
|
|
1372
|
+
};
|
|
1373
|
+
return { ...defaultVNode, ...vnode };
|
|
1374
|
+
};
|
|
1375
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1376
|
+
node["s-sr"] = true;
|
|
1377
|
+
childVNode.$name$ = slotName || null;
|
|
1378
|
+
childVNode.$tag$ = "slot";
|
|
1379
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1380
|
+
if (shadowRootNodes && win.document) {
|
|
1381
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1382
|
+
if (childVNode.$name$) {
|
|
1383
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
1384
|
+
}
|
|
1385
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1386
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1387
|
+
} else {
|
|
1388
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
1389
|
+
}
|
|
1390
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1391
|
+
node.remove();
|
|
1392
|
+
if (childVNode.$depth$ === "0") {
|
|
1393
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1394
|
+
}
|
|
1395
|
+
} else {
|
|
1396
|
+
const slot = childVNode.$elm$;
|
|
1397
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1398
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1399
|
+
patchSlotNode(node);
|
|
1400
|
+
if (shouldMove) {
|
|
1401
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1402
|
+
}
|
|
1403
|
+
childRenderNodes.push(childVNode);
|
|
1404
|
+
}
|
|
1405
|
+
slotNodes.push(childVNode);
|
|
1406
|
+
if (!parentVNode.$children$) {
|
|
1407
|
+
parentVNode.$children$ = [];
|
|
1408
|
+
}
|
|
1409
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1410
|
+
}
|
|
1411
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1412
|
+
let slottedNode = slotNode.nextSibling;
|
|
1413
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1414
|
+
while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
1415
|
+
slottedNode["s-sn"] = slotName;
|
|
1416
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1417
|
+
slottedNode = slottedNode.nextSibling;
|
|
1418
|
+
}
|
|
1419
|
+
};
|
|
1420
|
+
var findCorrespondingNode = (node, type) => {
|
|
1421
|
+
let sibling = node;
|
|
1422
|
+
do {
|
|
1423
|
+
sibling = sibling.nextSibling;
|
|
1424
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1425
|
+
return sibling;
|
|
1426
|
+
};
|
|
1427
|
+
var createSupportsRuleRe = (selector) => {
|
|
1428
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
1429
|
+
return new RegExp(
|
|
1430
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
1431
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
1432
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
1433
|
+
"g"
|
|
1434
|
+
);
|
|
1435
|
+
};
|
|
1436
|
+
createSupportsRuleRe("::slotted");
|
|
1437
|
+
createSupportsRuleRe(":host");
|
|
1438
|
+
createSupportsRuleRe(":host-context");
|
|
575
1439
|
|
|
576
1440
|
// src/runtime/mode.ts
|
|
577
1441
|
var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
|
|
578
1442
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
579
1443
|
var getMode = (ref) => getHostRef(ref).$modeName$;
|
|
580
1444
|
var parsePropertyValue = (propValue, propType) => {
|
|
1445
|
+
if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
1446
|
+
try {
|
|
1447
|
+
propValue = JSON.parse(propValue);
|
|
1448
|
+
return propValue;
|
|
1449
|
+
} catch (e) {
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
1453
|
+
propValue = deserializeProperty(propValue);
|
|
1454
|
+
return propValue;
|
|
1455
|
+
}
|
|
581
1456
|
if (propValue != null && !isComplexType(propValue)) {
|
|
582
1457
|
if (propType & 4 /* Boolean */) {
|
|
583
1458
|
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
584
1459
|
}
|
|
585
1460
|
if (propType & 2 /* Number */) {
|
|
586
|
-
return parseFloat(propValue);
|
|
1461
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
587
1462
|
}
|
|
588
1463
|
if (propType & 1 /* String */) {
|
|
589
1464
|
return String(propValue);
|
|
@@ -632,7 +1507,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
632
1507
|
var _a;
|
|
633
1508
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
634
1509
|
const style = styles.get(scopeId2);
|
|
635
|
-
|
|
1510
|
+
if (!win.document) {
|
|
1511
|
+
return scopeId2;
|
|
1512
|
+
}
|
|
1513
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
636
1514
|
if (style) {
|
|
637
1515
|
if (typeof style === "string") {
|
|
638
1516
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -645,23 +1523,39 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
645
1523
|
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
646
1524
|
styleElm.innerHTML = style;
|
|
647
1525
|
} else {
|
|
648
|
-
styleElm =
|
|
1526
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
649
1527
|
styleElm.innerHTML = style;
|
|
650
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1528
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
651
1529
|
if (nonce != null) {
|
|
652
1530
|
styleElm.setAttribute("nonce", nonce);
|
|
653
1531
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
1532
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1533
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1534
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1535
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1536
|
+
styleContainerNode.insertBefore(
|
|
1537
|
+
styleElm,
|
|
1538
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1539
|
+
);
|
|
1540
|
+
} else if ("host" in styleContainerNode) {
|
|
1541
|
+
if (supportsConstructableStylesheets) {
|
|
1542
|
+
const stylesheet = new CSSStyleSheet();
|
|
1543
|
+
stylesheet.replaceSync(style);
|
|
1544
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1545
|
+
} else {
|
|
1546
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1547
|
+
if (existingStyleContainer) {
|
|
1548
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1549
|
+
} else {
|
|
1550
|
+
styleContainerNode.prepend(styleElm);
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
} else {
|
|
1554
|
+
styleContainerNode.append(styleElm);
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1558
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
665
1559
|
}
|
|
666
1560
|
}
|
|
667
1561
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
@@ -687,131 +1581,177 @@ var attachStyles = (hostRef) => {
|
|
|
687
1581
|
cmpMeta,
|
|
688
1582
|
hostRef.$modeName$
|
|
689
1583
|
);
|
|
690
|
-
if (flags & 10 /* needsScopedEncapsulation */
|
|
1584
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
691
1585
|
elm["s-sc"] = scopeId2;
|
|
692
1586
|
elm.classList.add(scopeId2 + "-h");
|
|
693
|
-
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
694
|
-
elm.classList.add(scopeId2 + "-s");
|
|
695
|
-
}
|
|
696
1587
|
}
|
|
697
1588
|
endAttachStyles();
|
|
698
1589
|
};
|
|
699
1590
|
var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
700
|
-
var
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
1591
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1592
|
+
var hydrateScopedToShadow = () => {
|
|
1593
|
+
if (!win.document) {
|
|
1594
|
+
return;
|
|
1595
|
+
}
|
|
1596
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1597
|
+
let i2 = 0;
|
|
1598
|
+
for (; i2 < styles2.length; i2++) {
|
|
1599
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1600
|
+
}
|
|
1601
|
+
};
|
|
1602
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1603
|
+
if (oldValue === newValue) {
|
|
1604
|
+
return;
|
|
1605
|
+
}
|
|
1606
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1607
|
+
let ln = memberName.toLowerCase();
|
|
1608
|
+
if (memberName === "class") {
|
|
1609
|
+
const classList = elm.classList;
|
|
1610
|
+
const oldClasses = parseClassList(oldValue);
|
|
1611
|
+
let newClasses = parseClassList(newValue);
|
|
1612
|
+
if (elm["s-si"] && initialRender) {
|
|
1613
|
+
newClasses.push(elm["s-si"]);
|
|
1614
|
+
oldClasses.forEach((c) => {
|
|
1615
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
1616
|
+
});
|
|
1617
|
+
newClasses = [...new Set(newClasses)];
|
|
1618
|
+
classList.add(...newClasses);
|
|
1619
|
+
} else {
|
|
708
1620
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
709
1621
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
elm.style.removeProperty(prop);
|
|
716
|
-
} else {
|
|
717
|
-
elm.style[prop] = "";
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
for (const prop in newValue) {
|
|
723
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1622
|
+
}
|
|
1623
|
+
} else if (memberName === "style") {
|
|
1624
|
+
{
|
|
1625
|
+
for (const prop in oldValue) {
|
|
1626
|
+
if (!newValue || newValue[prop] == null) {
|
|
724
1627
|
if (prop.includes("-")) {
|
|
725
|
-
elm.style.
|
|
1628
|
+
elm.style.removeProperty(prop);
|
|
726
1629
|
} else {
|
|
727
|
-
elm.style[prop] =
|
|
1630
|
+
elm.style[prop] = "";
|
|
728
1631
|
}
|
|
729
1632
|
}
|
|
730
1633
|
}
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
} else if (isMemberInElement(win, ln)) {
|
|
739
|
-
memberName = ln.slice(2);
|
|
740
|
-
} else {
|
|
741
|
-
memberName = ln[2] + memberName.slice(3);
|
|
742
|
-
}
|
|
743
|
-
if (oldValue || newValue) {
|
|
744
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
745
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
746
|
-
if (oldValue) {
|
|
747
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
748
|
-
}
|
|
749
|
-
if (newValue) {
|
|
750
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
1634
|
+
}
|
|
1635
|
+
for (const prop in newValue) {
|
|
1636
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1637
|
+
if (prop.includes("-")) {
|
|
1638
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
1639
|
+
} else {
|
|
1640
|
+
elm.style[prop] = newValue[prop];
|
|
751
1641
|
}
|
|
752
1642
|
}
|
|
1643
|
+
}
|
|
1644
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1645
|
+
if (newValue) {
|
|
1646
|
+
newValue(elm);
|
|
1647
|
+
}
|
|
1648
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1649
|
+
if (memberName[2] === "-") {
|
|
1650
|
+
memberName = memberName.slice(3);
|
|
1651
|
+
} else if (isMemberInElement(win, ln)) {
|
|
1652
|
+
memberName = ln.slice(2);
|
|
753
1653
|
} else {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
1654
|
+
memberName = ln[2] + memberName.slice(3);
|
|
1655
|
+
}
|
|
1656
|
+
if (oldValue || newValue) {
|
|
1657
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1658
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1659
|
+
if (oldValue) {
|
|
1660
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
1661
|
+
}
|
|
1662
|
+
if (newValue) {
|
|
1663
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
} else {
|
|
1667
|
+
const isComplex = isComplexType(newValue);
|
|
1668
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
1669
|
+
try {
|
|
1670
|
+
if (!elm.tagName.includes("-")) {
|
|
1671
|
+
const n = newValue == null ? "" : newValue;
|
|
1672
|
+
if (memberName === "list") {
|
|
1673
|
+
isProp = false;
|
|
1674
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
1675
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
762
1676
|
elm[memberName] = n;
|
|
1677
|
+
} else {
|
|
1678
|
+
elm.setAttribute(memberName, n);
|
|
763
1679
|
}
|
|
764
|
-
} else {
|
|
765
|
-
elm[memberName] = newValue;
|
|
766
1680
|
}
|
|
767
|
-
}
|
|
1681
|
+
} else if (elm[memberName] !== newValue) {
|
|
1682
|
+
elm[memberName] = newValue;
|
|
768
1683
|
}
|
|
1684
|
+
} catch (e) {
|
|
769
1685
|
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
1686
|
+
}
|
|
1687
|
+
let xlink = false;
|
|
1688
|
+
{
|
|
1689
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
1690
|
+
memberName = ln;
|
|
1691
|
+
xlink = true;
|
|
776
1692
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
781
|
-
} else {
|
|
782
|
-
elm.removeAttribute(memberName);
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
786
|
-
newValue = newValue === true ? "" : newValue;
|
|
1693
|
+
}
|
|
1694
|
+
if (newValue == null || newValue === false) {
|
|
1695
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
787
1696
|
if (xlink) {
|
|
788
|
-
elm.
|
|
1697
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
789
1698
|
} else {
|
|
790
|
-
elm.
|
|
1699
|
+
elm.removeAttribute(memberName);
|
|
791
1700
|
}
|
|
792
1701
|
}
|
|
1702
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1703
|
+
newValue = newValue === true ? "" : newValue;
|
|
1704
|
+
if (xlink) {
|
|
1705
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
1706
|
+
} else {
|
|
1707
|
+
elm.setAttribute(memberName, newValue);
|
|
1708
|
+
}
|
|
793
1709
|
}
|
|
794
1710
|
}
|
|
795
1711
|
};
|
|
796
1712
|
var parseClassListRegex = /\s/;
|
|
797
|
-
var parseClassList = (value) =>
|
|
1713
|
+
var parseClassList = (value) => {
|
|
1714
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1715
|
+
value = value.baseVal;
|
|
1716
|
+
}
|
|
1717
|
+
if (!value || typeof value !== "string") {
|
|
1718
|
+
return [];
|
|
1719
|
+
}
|
|
1720
|
+
return value.split(parseClassListRegex);
|
|
1721
|
+
};
|
|
798
1722
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
799
1723
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
800
1724
|
|
|
801
1725
|
// src/runtime/vdom/update-element.ts
|
|
802
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
1726
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
803
1727
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
804
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
805
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
1728
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1729
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
806
1730
|
{
|
|
807
1731
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
808
1732
|
if (!(memberName in newVnodeAttrs)) {
|
|
809
|
-
setAccessor(
|
|
1733
|
+
setAccessor(
|
|
1734
|
+
elm,
|
|
1735
|
+
memberName,
|
|
1736
|
+
oldVnodeAttrs[memberName],
|
|
1737
|
+
void 0,
|
|
1738
|
+
isSvgMode2,
|
|
1739
|
+
newVnode.$flags$,
|
|
1740
|
+
isInitialRender
|
|
1741
|
+
);
|
|
810
1742
|
}
|
|
811
1743
|
}
|
|
812
1744
|
}
|
|
813
1745
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
814
|
-
setAccessor(
|
|
1746
|
+
setAccessor(
|
|
1747
|
+
elm,
|
|
1748
|
+
memberName,
|
|
1749
|
+
oldVnodeAttrs[memberName],
|
|
1750
|
+
newVnodeAttrs[memberName],
|
|
1751
|
+
isSvgMode2,
|
|
1752
|
+
newVnode.$flags$,
|
|
1753
|
+
isInitialRender
|
|
1754
|
+
);
|
|
815
1755
|
}
|
|
816
1756
|
};
|
|
817
1757
|
function sortedAttrNames(attrNames) {
|
|
@@ -832,7 +1772,7 @@ var useNativeShadowDom = false;
|
|
|
832
1772
|
var checkSlotFallbackVisibility = false;
|
|
833
1773
|
var checkSlotRelocate = false;
|
|
834
1774
|
var isSvgMode = false;
|
|
835
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
1775
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
836
1776
|
var _a;
|
|
837
1777
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
838
1778
|
let i2 = 0;
|
|
@@ -842,9 +1782,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
842
1782
|
if (!useNativeShadowDom) {
|
|
843
1783
|
checkSlotRelocate = true;
|
|
844
1784
|
if (newVNode2.$tag$ === "slot") {
|
|
845
|
-
if (scopeId) {
|
|
846
|
-
parentElm.classList.add(scopeId + "-s");
|
|
847
|
-
}
|
|
848
1785
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
849
1786
|
// slot element has fallback content
|
|
850
1787
|
// still create an element that "mocks" the slot element
|
|
@@ -858,14 +1795,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
858
1795
|
}
|
|
859
1796
|
}
|
|
860
1797
|
if (newVNode2.$text$ !== null) {
|
|
861
|
-
elm = newVNode2.$elm$ =
|
|
1798
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
862
1799
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
863
|
-
elm = newVNode2.$elm$ =
|
|
1800
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
1801
|
+
{
|
|
1802
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1803
|
+
}
|
|
864
1804
|
} else {
|
|
865
1805
|
if (!isSvgMode) {
|
|
866
1806
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
867
1807
|
}
|
|
868
|
-
|
|
1808
|
+
if (!win.document) {
|
|
1809
|
+
throw new Error(
|
|
1810
|
+
"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."
|
|
1811
|
+
);
|
|
1812
|
+
}
|
|
1813
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
869
1814
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
870
1815
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
871
1816
|
) ;
|
|
@@ -875,17 +1820,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
875
1820
|
{
|
|
876
1821
|
updateElement(null, newVNode2, isSvgMode);
|
|
877
1822
|
}
|
|
878
|
-
|
|
879
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
880
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
1823
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
881
1824
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
882
1825
|
}
|
|
883
|
-
{
|
|
884
|
-
updateElementScopeIds(elm, parentElm);
|
|
885
|
-
}
|
|
886
1826
|
if (newVNode2.$children$) {
|
|
887
1827
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
888
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
1828
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
889
1829
|
if (childNode) {
|
|
890
1830
|
elm.appendChild(childNode);
|
|
891
1831
|
}
|
|
@@ -906,12 +1846,16 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
906
1846
|
elm["s-cr"] = contentRef;
|
|
907
1847
|
elm["s-sn"] = newVNode2.$name$ || "";
|
|
908
1848
|
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1849
|
+
patchSlotNode(elm);
|
|
909
1850
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
910
1851
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
911
1852
|
{
|
|
912
1853
|
relocateToHostRoot(oldParentVNode.$elm$);
|
|
913
1854
|
}
|
|
914
1855
|
}
|
|
1856
|
+
{
|
|
1857
|
+
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
1858
|
+
}
|
|
915
1859
|
}
|
|
916
1860
|
}
|
|
917
1861
|
return elm;
|
|
@@ -920,8 +1864,12 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
920
1864
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
921
1865
|
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
922
1866
|
if (host != null) {
|
|
923
|
-
const contentRefNode = Array.from(host.childNodes).find(
|
|
924
|
-
|
|
1867
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
1868
|
+
(ref) => ref["s-cr"]
|
|
1869
|
+
);
|
|
1870
|
+
const childNodeArray = Array.from(
|
|
1871
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
1872
|
+
);
|
|
925
1873
|
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
926
1874
|
if (childNode["s-sh"] != null) {
|
|
927
1875
|
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
@@ -930,11 +1878,11 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
930
1878
|
}
|
|
931
1879
|
}
|
|
932
1880
|
}
|
|
933
|
-
plt.$flags$ &=
|
|
1881
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
934
1882
|
};
|
|
935
1883
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
936
1884
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
937
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
1885
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
938
1886
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
939
1887
|
let node = parentElm;
|
|
940
1888
|
while (node = node.nextSibling) {
|
|
@@ -946,7 +1894,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
946
1894
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
947
1895
|
const childNode = oldSlotChildNodes[i2];
|
|
948
1896
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
949
|
-
insertBefore(
|
|
1897
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
950
1898
|
childNode["s-ol"].remove();
|
|
951
1899
|
childNode["s-ol"] = void 0;
|
|
952
1900
|
childNode["s-sh"] = void 0;
|
|
@@ -956,7 +1904,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
956
1904
|
putBackInOriginalLocation(childNode, recursive);
|
|
957
1905
|
}
|
|
958
1906
|
}
|
|
959
|
-
plt.$flags$ &=
|
|
1907
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
960
1908
|
};
|
|
961
1909
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
962
1910
|
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
@@ -966,7 +1914,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
966
1914
|
}
|
|
967
1915
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
968
1916
|
if (vnodes[startIdx]) {
|
|
969
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
1917
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
970
1918
|
if (childNode) {
|
|
971
1919
|
vnodes[startIdx].$elm$ = childNode;
|
|
972
1920
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -1053,7 +2001,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1053
2001
|
if (idxInOld >= 0) {
|
|
1054
2002
|
elmToMove = oldCh[idxInOld];
|
|
1055
2003
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1056
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
2004
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
1057
2005
|
} else {
|
|
1058
2006
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1059
2007
|
oldCh[idxInOld] = void 0;
|
|
@@ -1061,12 +2009,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1061
2009
|
}
|
|
1062
2010
|
newStartVnode = newCh[++newStartIdx];
|
|
1063
2011
|
} else {
|
|
1064
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
2012
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
1065
2013
|
newStartVnode = newCh[++newStartIdx];
|
|
1066
2014
|
}
|
|
1067
2015
|
if (node) {
|
|
1068
2016
|
{
|
|
1069
|
-
insertBefore(
|
|
2017
|
+
insertBefore(
|
|
2018
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
2019
|
+
node,
|
|
2020
|
+
referenceNode(oldStartVnode.$elm$)
|
|
2021
|
+
);
|
|
1070
2022
|
}
|
|
1071
2023
|
}
|
|
1072
2024
|
}
|
|
@@ -1087,28 +2039,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1087
2039
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1088
2040
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1089
2041
|
if (leftVNode.$tag$ === "slot") {
|
|
1090
|
-
if (
|
|
1091
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
1092
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
1093
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
1094
|
-
// hydration comments to be removed
|
|
1095
|
-
leftVNode.$elm$.nodeType !== 8
|
|
1096
|
-
) {
|
|
1097
|
-
return false;
|
|
1098
|
-
}
|
|
1099
2042
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1100
2043
|
}
|
|
1101
2044
|
if (!isInitialRender) {
|
|
1102
2045
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
1103
2046
|
}
|
|
2047
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
2048
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
2049
|
+
}
|
|
1104
2050
|
return true;
|
|
1105
2051
|
}
|
|
1106
2052
|
return false;
|
|
1107
2053
|
};
|
|
1108
|
-
var referenceNode = (node) =>
|
|
1109
|
-
return node && node["s-ol"] || node;
|
|
1110
|
-
};
|
|
1111
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
2054
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
1112
2055
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1113
2056
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
1114
2057
|
const oldChildren = oldVNode.$children$;
|
|
@@ -1126,9 +2069,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1126
2069
|
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1127
2070
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1128
2071
|
}
|
|
1129
|
-
} else {
|
|
1130
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1131
2072
|
}
|
|
2073
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
1132
2074
|
}
|
|
1133
2075
|
if (oldChildren !== null && newChildren !== null) {
|
|
1134
2076
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -1148,35 +2090,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1148
2090
|
}
|
|
1149
2091
|
} else if ((defaultHolder = elm["s-cr"])) {
|
|
1150
2092
|
defaultHolder.parentNode.textContent = text;
|
|
1151
|
-
} else if (oldVNode.$text$ !== text) {
|
|
1152
|
-
elm.data = text;
|
|
1153
|
-
}
|
|
1154
|
-
};
|
|
1155
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
1156
|
-
const childNodes = elm.childNodes;
|
|
1157
|
-
for (const childNode of childNodes) {
|
|
1158
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1159
|
-
if (childNode["s-sr"]) {
|
|
1160
|
-
const slotName = childNode["s-sn"];
|
|
1161
|
-
childNode.hidden = false;
|
|
1162
|
-
for (const siblingNode of childNodes) {
|
|
1163
|
-
if (siblingNode !== childNode) {
|
|
1164
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
1165
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
1166
|
-
childNode.hidden = true;
|
|
1167
|
-
break;
|
|
1168
|
-
}
|
|
1169
|
-
} else {
|
|
1170
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
1171
|
-
childNode.hidden = true;
|
|
1172
|
-
break;
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
updateFallbackSlotVisibility(childNode);
|
|
1179
|
-
}
|
|
2093
|
+
} else if (oldVNode.$text$ !== text) {
|
|
2094
|
+
elm.data = text;
|
|
1180
2095
|
}
|
|
1181
2096
|
};
|
|
1182
2097
|
var relocateNodes = [];
|
|
@@ -1184,9 +2099,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1184
2099
|
let node;
|
|
1185
2100
|
let hostContentNodes;
|
|
1186
2101
|
let j;
|
|
1187
|
-
|
|
2102
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
2103
|
+
for (const childNode of children) {
|
|
1188
2104
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1189
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
2105
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1190
2106
|
const slotName = childNode["s-sn"];
|
|
1191
2107
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1192
2108
|
node = hostContentNodes[j];
|
|
@@ -1228,21 +2144,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1228
2144
|
}
|
|
1229
2145
|
}
|
|
1230
2146
|
};
|
|
1231
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1232
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1233
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
1234
|
-
return true;
|
|
1235
|
-
}
|
|
1236
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
1237
|
-
return true;
|
|
1238
|
-
}
|
|
1239
|
-
return false;
|
|
1240
|
-
}
|
|
1241
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
1242
|
-
return true;
|
|
1243
|
-
}
|
|
1244
|
-
return slotName === "";
|
|
1245
|
-
};
|
|
1246
2147
|
var nullifyVNodeRefs = (vNode) => {
|
|
1247
2148
|
{
|
|
1248
2149
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -1250,44 +2151,51 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1250
2151
|
}
|
|
1251
2152
|
};
|
|
1252
2153
|
var insertBefore = (parent, newNode, reference) => {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
);
|
|
2154
|
+
if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
2155
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
2156
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
2157
|
+
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
2158
|
+
patchParentNode(newNode);
|
|
2159
|
+
}
|
|
2160
|
+
parent.insertBefore(newNode, reference);
|
|
2161
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
2162
|
+
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
2163
|
+
return newNode;
|
|
2164
|
+
}
|
|
2165
|
+
if (parent.__insertBefore) {
|
|
2166
|
+
return parent.__insertBefore(newNode, reference);
|
|
2167
|
+
} else {
|
|
2168
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1268
2169
|
}
|
|
1269
|
-
return scopeIds;
|
|
1270
2170
|
};
|
|
1271
|
-
|
|
1272
|
-
var _a;
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
2171
|
+
function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
2172
|
+
var _a, _b;
|
|
2173
|
+
let scopeId2;
|
|
2174
|
+
if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
|
|
2175
|
+
const scopeName = slotNode["s-sn"];
|
|
2176
|
+
const hostName = slotNode["s-hn"];
|
|
2177
|
+
(_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
|
|
2178
|
+
if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
|
|
2179
|
+
let child = (oldParent.__childNodes || oldParent.childNodes)[0];
|
|
2180
|
+
let found = false;
|
|
2181
|
+
while (child) {
|
|
2182
|
+
if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
|
|
2183
|
+
found = true;
|
|
2184
|
+
break;
|
|
1280
2185
|
}
|
|
2186
|
+
child = child.nextSibling;
|
|
1281
2187
|
}
|
|
2188
|
+
if (!found) oldParent.classList.remove(scopeId2 + "-s");
|
|
1282
2189
|
}
|
|
1283
2190
|
}
|
|
1284
|
-
}
|
|
2191
|
+
}
|
|
1285
2192
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1286
2193
|
var _a, _b, _c, _d, _e;
|
|
1287
2194
|
const hostElm = hostRef.$hostElement$;
|
|
1288
2195
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1289
2196
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1290
|
-
const
|
|
2197
|
+
const isHostElement = isHost(renderFnResults);
|
|
2198
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
1291
2199
|
hostTagName = hostElm.tagName;
|
|
1292
2200
|
if (cmpMeta.$attrsToReflect$) {
|
|
1293
2201
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
@@ -1309,7 +2217,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1309
2217
|
{
|
|
1310
2218
|
scopeId = hostElm["s-sc"];
|
|
1311
2219
|
}
|
|
1312
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)
|
|
2220
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1313
2221
|
{
|
|
1314
2222
|
contentRef = hostElm["s-cr"];
|
|
1315
2223
|
checkSlotFallbackVisibility = false;
|
|
@@ -1321,8 +2229,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1321
2229
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1322
2230
|
for (const relocateData of relocateNodes) {
|
|
1323
2231
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1324
|
-
if (!nodeToRelocate["s-ol"]) {
|
|
1325
|
-
const orgLocationNode =
|
|
2232
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2233
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1326
2234
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1327
2235
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1328
2236
|
}
|
|
@@ -1333,11 +2241,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1333
2241
|
if (slotRefNode) {
|
|
1334
2242
|
const parentNodeRef = slotRefNode.parentNode;
|
|
1335
2243
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1336
|
-
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
2244
|
+
if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
|
|
1337
2245
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1338
2246
|
while (orgLocationNode) {
|
|
1339
2247
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1340
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
2248
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1341
2249
|
refNode = refNode.nextSibling;
|
|
1342
2250
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1343
2251
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1350,15 +2258,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1350
2258
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1351
2259
|
}
|
|
1352
2260
|
}
|
|
1353
|
-
|
|
2261
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
2262
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2263
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1354
2264
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1355
2265
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1356
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
2266
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1357
2267
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1358
2268
|
}
|
|
1359
2269
|
}
|
|
1360
2270
|
}
|
|
1361
|
-
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](
|
|
2271
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1362
2272
|
} else {
|
|
1363
2273
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1364
2274
|
if (isInitialLoad) {
|
|
@@ -1372,11 +2282,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1372
2282
|
if (checkSlotFallbackVisibility) {
|
|
1373
2283
|
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1374
2284
|
}
|
|
1375
|
-
plt.$flags$ &=
|
|
2285
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1376
2286
|
relocateNodes.length = 0;
|
|
1377
2287
|
}
|
|
1378
2288
|
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1379
|
-
|
|
2289
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
2290
|
+
for (const childNode of children) {
|
|
1380
2291
|
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1381
2292
|
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1382
2293
|
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
@@ -1391,7 +2302,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1391
2302
|
// src/runtime/update-component.ts
|
|
1392
2303
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1393
2304
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1394
|
-
ancestorComponent["s-p"].push(
|
|
2305
|
+
const index = ancestorComponent["s-p"].push(
|
|
2306
|
+
new Promise(
|
|
2307
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
2308
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
2309
|
+
r();
|
|
2310
|
+
}
|
|
2311
|
+
)
|
|
2312
|
+
);
|
|
1395
2313
|
}
|
|
1396
2314
|
};
|
|
1397
2315
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1420,17 +2338,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1420
2338
|
{
|
|
1421
2339
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1422
2340
|
if (hostRef.$queuedListeners$) {
|
|
1423
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
2341
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1424
2342
|
hostRef.$queuedListeners$ = void 0;
|
|
1425
2343
|
}
|
|
1426
2344
|
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
}
|
|
1431
|
-
{
|
|
1432
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
2345
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
2346
|
+
} else {
|
|
2347
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1433
2348
|
}
|
|
2349
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1434
2350
|
endSchedule();
|
|
1435
2351
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1436
2352
|
};
|
|
@@ -1473,7 +2389,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
1473
2389
|
try {
|
|
1474
2390
|
instance = instance.render && instance.render();
|
|
1475
2391
|
{
|
|
1476
|
-
hostRef.$flags$ &=
|
|
2392
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
1477
2393
|
}
|
|
1478
2394
|
{
|
|
1479
2395
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -1496,17 +2412,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1496
2412
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1497
2413
|
const instance = hostRef.$lazyInstance$ ;
|
|
1498
2414
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1499
|
-
|
|
1500
|
-
safeCall(instance, "componentDidRender");
|
|
1501
|
-
}
|
|
2415
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1502
2416
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1503
2417
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1504
2418
|
{
|
|
1505
2419
|
addHydratedFlag(elm);
|
|
1506
2420
|
}
|
|
1507
|
-
|
|
1508
|
-
safeCall(instance, "componentDidLoad");
|
|
1509
|
-
}
|
|
2421
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1510
2422
|
endPostUpdate();
|
|
1511
2423
|
{
|
|
1512
2424
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1515,9 +2427,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1515
2427
|
}
|
|
1516
2428
|
}
|
|
1517
2429
|
} else {
|
|
1518
|
-
|
|
1519
|
-
safeCall(instance, "componentDidUpdate");
|
|
1520
|
-
}
|
|
2430
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1521
2431
|
endPostUpdate();
|
|
1522
2432
|
}
|
|
1523
2433
|
{
|
|
@@ -1531,7 +2441,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1531
2441
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1532
2442
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1533
2443
|
}
|
|
1534
|
-
hostRef.$flags$ &=
|
|
2444
|
+
hostRef.$flags$ &= -517;
|
|
1535
2445
|
}
|
|
1536
2446
|
};
|
|
1537
2447
|
var forceUpdate = (ref) => {
|
|
@@ -1545,17 +2455,14 @@ var forceUpdate = (ref) => {
|
|
|
1545
2455
|
}
|
|
1546
2456
|
};
|
|
1547
2457
|
var appDidLoad = (who) => {
|
|
1548
|
-
{
|
|
1549
|
-
addHydratedFlag(doc.documentElement);
|
|
1550
|
-
}
|
|
1551
2458
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1552
2459
|
};
|
|
1553
|
-
var safeCall = (instance, method, arg) => {
|
|
2460
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1554
2461
|
if (instance && instance[method]) {
|
|
1555
2462
|
try {
|
|
1556
2463
|
return instance[method](arg);
|
|
1557
2464
|
} catch (e) {
|
|
1558
|
-
consoleError(e);
|
|
2465
|
+
consoleError(e, elm);
|
|
1559
2466
|
}
|
|
1560
2467
|
}
|
|
1561
2468
|
return void 0;
|
|
@@ -1571,7 +2478,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1571
2478
|
const hostRef = getHostRef(ref);
|
|
1572
2479
|
if (!hostRef) {
|
|
1573
2480
|
throw new Error(
|
|
1574
|
-
`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/
|
|
2481
|
+
`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).`
|
|
1575
2482
|
);
|
|
1576
2483
|
}
|
|
1577
2484
|
const elm = hostRef.$hostElement$ ;
|
|
@@ -1597,6 +2504,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1597
2504
|
}
|
|
1598
2505
|
}
|
|
1599
2506
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
2507
|
+
if (instance.componentShouldUpdate) {
|
|
2508
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
2509
|
+
return;
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
1600
2512
|
scheduleUpdate(hostRef, false);
|
|
1601
2513
|
}
|
|
1602
2514
|
}
|
|
@@ -1614,15 +2526,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1614
2526
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1615
2527
|
members.map(([memberName, [memberFlags]]) => {
|
|
1616
2528
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
2529
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
2530
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
2531
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
2532
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
2533
|
+
Object.defineProperty(prototype, memberName, {
|
|
2534
|
+
get() {
|
|
2535
|
+
{
|
|
2536
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
2537
|
+
return getValue(this, memberName);
|
|
2538
|
+
}
|
|
2539
|
+
const ref = getHostRef(this);
|
|
2540
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
2541
|
+
if (!instance) return;
|
|
2542
|
+
return instance[memberName];
|
|
2543
|
+
}
|
|
2544
|
+
},
|
|
2545
|
+
configurable: true,
|
|
2546
|
+
enumerable: true
|
|
2547
|
+
});
|
|
2548
|
+
}
|
|
1617
2549
|
Object.defineProperty(prototype, memberName, {
|
|
1618
|
-
get() {
|
|
1619
|
-
return getValue(this, memberName);
|
|
1620
|
-
},
|
|
1621
2550
|
set(newValue) {
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
2551
|
+
const ref = getHostRef(this);
|
|
2552
|
+
if (origSetter) {
|
|
2553
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2554
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
2555
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
2556
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2557
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2558
|
+
}
|
|
2559
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
2560
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2561
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2562
|
+
return;
|
|
2563
|
+
}
|
|
2564
|
+
{
|
|
2565
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
2566
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2567
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
2568
|
+
ref.$onReadyPromise$.then(() => {
|
|
2569
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
2570
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
2571
|
+
}
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
return;
|
|
2575
|
+
}
|
|
2576
|
+
const setterSetVal = () => {
|
|
2577
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
2578
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2579
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2580
|
+
}
|
|
2581
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
2582
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
2583
|
+
};
|
|
2584
|
+
if (ref.$lazyInstance$) {
|
|
2585
|
+
setterSetVal();
|
|
2586
|
+
} else {
|
|
2587
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
1626
2591
|
});
|
|
1627
2592
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1628
2593
|
Object.defineProperty(prototype, memberName, {
|
|
@@ -1643,7 +2608,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1643
2608
|
plt.jmp(() => {
|
|
1644
2609
|
var _a2;
|
|
1645
2610
|
const propName = attrNameToPropName.get(attrName);
|
|
1646
|
-
if (this.hasOwnProperty(propName)) {
|
|
2611
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1647
2612
|
newValue = this[propName];
|
|
1648
2613
|
delete this[propName];
|
|
1649
2614
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1663,7 +2628,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1663
2628
|
}
|
|
1664
2629
|
return;
|
|
1665
2630
|
}
|
|
1666
|
-
|
|
2631
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
2632
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
2633
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
2634
|
+
this[propName] = newValue;
|
|
2635
|
+
}
|
|
1667
2636
|
});
|
|
1668
2637
|
};
|
|
1669
2638
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1692,7 +2661,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1692
2661
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1693
2662
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1694
2663
|
if (bundleId) {
|
|
1695
|
-
const CstrImport = loadModule(cmpMeta);
|
|
2664
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1696
2665
|
if (CstrImport && "then" in CstrImport) {
|
|
1697
2666
|
const endLoad = uniqueTime();
|
|
1698
2667
|
Cstr = await CstrImport;
|
|
@@ -1717,16 +2686,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1717
2686
|
try {
|
|
1718
2687
|
new Cstr(hostRef);
|
|
1719
2688
|
} catch (e) {
|
|
1720
|
-
consoleError(e);
|
|
2689
|
+
consoleError(e, elm);
|
|
1721
2690
|
}
|
|
1722
2691
|
{
|
|
1723
|
-
hostRef.$flags$ &=
|
|
2692
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1724
2693
|
}
|
|
1725
2694
|
{
|
|
1726
2695
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1727
2696
|
}
|
|
1728
2697
|
endNewInstance();
|
|
1729
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2698
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1730
2699
|
} else {
|
|
1731
2700
|
Cstr = elm.constructor;
|
|
1732
2701
|
const cmpTag = elm.localName;
|
|
@@ -1758,9 +2727,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1758
2727
|
schedule();
|
|
1759
2728
|
}
|
|
1760
2729
|
};
|
|
1761
|
-
var fireConnectedCallback = (instance) => {
|
|
2730
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1762
2731
|
{
|
|
1763
|
-
safeCall(instance, "connectedCallback");
|
|
2732
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1764
2733
|
}
|
|
1765
2734
|
};
|
|
1766
2735
|
|
|
@@ -1779,6 +2748,9 @@ var connectedCallback = (elm) => {
|
|
|
1779
2748
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1780
2749
|
const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
|
|
1781
2750
|
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
2751
|
+
} else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2752
|
+
const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
|
|
2753
|
+
elm["s-sc"] = scopeId2;
|
|
1782
2754
|
}
|
|
1783
2755
|
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1784
2756
|
}
|
|
@@ -1813,24 +2785,27 @@ var connectedCallback = (elm) => {
|
|
|
1813
2785
|
} else {
|
|
1814
2786
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1815
2787
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1816
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2788
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1817
2789
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1818
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
2790
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1819
2791
|
}
|
|
1820
2792
|
}
|
|
1821
2793
|
endConnected();
|
|
1822
2794
|
}
|
|
1823
2795
|
};
|
|
1824
2796
|
var setContentReference = (elm) => {
|
|
1825
|
-
|
|
2797
|
+
if (!win.document) {
|
|
2798
|
+
return;
|
|
2799
|
+
}
|
|
2800
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
1826
2801
|
""
|
|
1827
2802
|
);
|
|
1828
2803
|
contentRefElm["s-cn"] = true;
|
|
1829
2804
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1830
2805
|
};
|
|
1831
|
-
var disconnectInstance = (instance) => {
|
|
2806
|
+
var disconnectInstance = (instance, elm) => {
|
|
1832
2807
|
{
|
|
1833
|
-
safeCall(instance, "disconnectedCallback");
|
|
2808
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1834
2809
|
}
|
|
1835
2810
|
};
|
|
1836
2811
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1843,312 +2818,44 @@ var disconnectedCallback = async (elm) => {
|
|
|
1843
2818
|
}
|
|
1844
2819
|
}
|
|
1845
2820
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1846
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
2821
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1847
2822
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1848
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
};
|
|
1852
|
-
var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
|
|
1853
|
-
patchCloneNode(hostElementPrototype);
|
|
1854
|
-
patchSlotAppendChild(hostElementPrototype);
|
|
1855
|
-
patchSlotAppend(hostElementPrototype);
|
|
1856
|
-
patchSlotPrepend(hostElementPrototype);
|
|
1857
|
-
patchSlotInsertAdjacentElement(hostElementPrototype);
|
|
1858
|
-
patchSlotInsertAdjacentHTML(hostElementPrototype);
|
|
1859
|
-
patchSlotInsertAdjacentText(hostElementPrototype);
|
|
1860
|
-
patchTextContent(hostElementPrototype);
|
|
1861
|
-
patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
|
|
1862
|
-
patchSlotRemoveChild(hostElementPrototype);
|
|
1863
|
-
};
|
|
1864
|
-
var patchCloneNode = (HostElementPrototype) => {
|
|
1865
|
-
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
1866
|
-
HostElementPrototype.cloneNode = function(deep) {
|
|
1867
|
-
const srcNode = this;
|
|
1868
|
-
const isShadowDom = srcNode.shadowRoot && supportsShadow ;
|
|
1869
|
-
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
1870
|
-
if (!isShadowDom && deep) {
|
|
1871
|
-
let i2 = 0;
|
|
1872
|
-
let slotted, nonStencilNode;
|
|
1873
|
-
const stencilPrivates = [
|
|
1874
|
-
"s-id",
|
|
1875
|
-
"s-cr",
|
|
1876
|
-
"s-lr",
|
|
1877
|
-
"s-rc",
|
|
1878
|
-
"s-sc",
|
|
1879
|
-
"s-p",
|
|
1880
|
-
"s-cn",
|
|
1881
|
-
"s-sr",
|
|
1882
|
-
"s-sn",
|
|
1883
|
-
"s-hn",
|
|
1884
|
-
"s-ol",
|
|
1885
|
-
"s-nr",
|
|
1886
|
-
"s-si",
|
|
1887
|
-
"s-rf",
|
|
1888
|
-
"s-scs"
|
|
1889
|
-
];
|
|
1890
|
-
for (; i2 < srcNode.childNodes.length; i2++) {
|
|
1891
|
-
slotted = srcNode.childNodes[i2]["s-nr"];
|
|
1892
|
-
nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
|
|
1893
|
-
if (slotted) {
|
|
1894
|
-
if (clonedNode.__appendChild) {
|
|
1895
|
-
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
1896
|
-
} else {
|
|
1897
|
-
clonedNode.appendChild(slotted.cloneNode(true));
|
|
1898
|
-
}
|
|
1899
|
-
}
|
|
1900
|
-
if (nonStencilNode) {
|
|
1901
|
-
clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
}
|
|
1905
|
-
return clonedNode;
|
|
1906
|
-
};
|
|
1907
|
-
};
|
|
1908
|
-
var patchSlotAppendChild = (HostElementPrototype) => {
|
|
1909
|
-
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
1910
|
-
HostElementPrototype.appendChild = function(newChild) {
|
|
1911
|
-
const slotName = newChild["s-sn"] = getSlotName(newChild);
|
|
1912
|
-
const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
|
|
1913
|
-
if (slotNode) {
|
|
1914
|
-
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
1915
|
-
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
1916
|
-
const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
1917
|
-
updateFallbackSlotVisibility(this);
|
|
1918
|
-
return insertedNode;
|
|
1919
|
-
}
|
|
1920
|
-
return this.__appendChild(newChild);
|
|
1921
|
-
};
|
|
1922
|
-
};
|
|
1923
|
-
var patchSlotRemoveChild = (ElementPrototype) => {
|
|
1924
|
-
ElementPrototype.__removeChild = ElementPrototype.removeChild;
|
|
1925
|
-
ElementPrototype.removeChild = function(toRemove) {
|
|
1926
|
-
if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
|
|
1927
|
-
const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
|
|
1928
|
-
if (slotNode) {
|
|
1929
|
-
const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
|
|
1930
|
-
const existingNode = slotChildNodes.find((n) => n === toRemove);
|
|
1931
|
-
if (existingNode) {
|
|
1932
|
-
existingNode.remove();
|
|
1933
|
-
updateFallbackSlotVisibility(this);
|
|
1934
|
-
return;
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
return this.__removeChild(toRemove);
|
|
1939
|
-
};
|
|
1940
|
-
};
|
|
1941
|
-
var patchSlotPrepend = (HostElementPrototype) => {
|
|
1942
|
-
const originalPrepend = HostElementPrototype.prepend;
|
|
1943
|
-
HostElementPrototype.prepend = function(...newChildren) {
|
|
1944
|
-
newChildren.forEach((newChild) => {
|
|
1945
|
-
if (typeof newChild === "string") {
|
|
1946
|
-
newChild = this.ownerDocument.createTextNode(newChild);
|
|
1947
|
-
}
|
|
1948
|
-
const slotName = newChild["s-sn"] = getSlotName(newChild);
|
|
1949
|
-
const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
|
|
1950
|
-
if (slotNode) {
|
|
1951
|
-
const slotPlaceholder = document.createTextNode("");
|
|
1952
|
-
slotPlaceholder["s-nr"] = newChild;
|
|
1953
|
-
slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
|
|
1954
|
-
newChild["s-ol"] = slotPlaceholder;
|
|
1955
|
-
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
1956
|
-
const appendAfter = slotChildNodes[0];
|
|
1957
|
-
return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
1958
|
-
}
|
|
1959
|
-
if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
|
|
1960
|
-
newChild.hidden = true;
|
|
1961
|
-
}
|
|
1962
|
-
return originalPrepend.call(this, newChild);
|
|
1963
|
-
});
|
|
1964
|
-
};
|
|
1965
|
-
};
|
|
1966
|
-
var patchSlotAppend = (HostElementPrototype) => {
|
|
1967
|
-
HostElementPrototype.append = function(...newChildren) {
|
|
1968
|
-
newChildren.forEach((newChild) => {
|
|
1969
|
-
if (typeof newChild === "string") {
|
|
1970
|
-
newChild = this.ownerDocument.createTextNode(newChild);
|
|
1971
|
-
}
|
|
1972
|
-
this.appendChild(newChild);
|
|
1973
|
-
});
|
|
1974
|
-
};
|
|
1975
|
-
};
|
|
1976
|
-
var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
|
|
1977
|
-
const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
|
|
1978
|
-
HostElementPrototype.insertAdjacentHTML = function(position, text) {
|
|
1979
|
-
if (position !== "afterbegin" && position !== "beforeend") {
|
|
1980
|
-
return originalInsertAdjacentHtml.call(this, position, text);
|
|
1981
|
-
}
|
|
1982
|
-
const container = this.ownerDocument.createElement("_");
|
|
1983
|
-
let node;
|
|
1984
|
-
container.innerHTML = text;
|
|
1985
|
-
if (position === "afterbegin") {
|
|
1986
|
-
while (node = container.firstChild) {
|
|
1987
|
-
this.prepend(node);
|
|
1988
|
-
}
|
|
1989
|
-
} else if (position === "beforeend") {
|
|
1990
|
-
while (node = container.firstChild) {
|
|
1991
|
-
this.append(node);
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
};
|
|
1995
|
-
};
|
|
1996
|
-
var patchSlotInsertAdjacentText = (HostElementPrototype) => {
|
|
1997
|
-
HostElementPrototype.insertAdjacentText = function(position, text) {
|
|
1998
|
-
this.insertAdjacentHTML(position, text);
|
|
1999
|
-
};
|
|
2000
|
-
};
|
|
2001
|
-
var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
2002
|
-
const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
|
|
2003
|
-
HostElementPrototype.insertAdjacentElement = function(position, element) {
|
|
2004
|
-
if (position !== "afterbegin" && position !== "beforeend") {
|
|
2005
|
-
return originalInsertAdjacentElement.call(this, position, element);
|
|
2006
|
-
}
|
|
2007
|
-
if (position === "afterbegin") {
|
|
2008
|
-
this.prepend(element);
|
|
2009
|
-
return element;
|
|
2010
|
-
} else if (position === "beforeend") {
|
|
2011
|
-
this.append(element);
|
|
2012
|
-
return element;
|
|
2013
|
-
}
|
|
2014
|
-
return element;
|
|
2015
|
-
};
|
|
2016
|
-
};
|
|
2017
|
-
var patchTextContent = (hostElementPrototype) => {
|
|
2018
|
-
const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
|
|
2019
|
-
Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
|
|
2020
|
-
{
|
|
2021
|
-
Object.defineProperty(hostElementPrototype, "textContent", {
|
|
2022
|
-
// To mimic shadow root behavior, we need to return the text content of all
|
|
2023
|
-
// nodes in a slot reference node
|
|
2024
|
-
get() {
|
|
2025
|
-
const slotRefNodes = getAllChildSlotNodes(this.childNodes);
|
|
2026
|
-
const textContent = slotRefNodes.map((node) => {
|
|
2027
|
-
var _a, _b;
|
|
2028
|
-
const text = [];
|
|
2029
|
-
let slotContent = node.nextSibling;
|
|
2030
|
-
while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
|
|
2031
|
-
if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
|
|
2032
|
-
text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
|
|
2033
|
-
}
|
|
2034
|
-
slotContent = slotContent.nextSibling;
|
|
2035
|
-
}
|
|
2036
|
-
return text.filter((ref) => ref !== "").join(" ");
|
|
2037
|
-
}).filter((text) => text !== "").join(" ");
|
|
2038
|
-
return " " + textContent + " ";
|
|
2039
|
-
},
|
|
2040
|
-
// To mimic shadow root behavior, we need to overwrite all nodes in a slot
|
|
2041
|
-
// reference node. If a default slot reference node exists, the text content will be
|
|
2042
|
-
// placed there. Otherwise, the new text node will be hidden
|
|
2043
|
-
set(value) {
|
|
2044
|
-
const slotRefNodes = getAllChildSlotNodes(this.childNodes);
|
|
2045
|
-
slotRefNodes.forEach((node) => {
|
|
2046
|
-
let slotContent = node.nextSibling;
|
|
2047
|
-
while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
|
|
2048
|
-
const tmp = slotContent;
|
|
2049
|
-
slotContent = slotContent.nextSibling;
|
|
2050
|
-
tmp.remove();
|
|
2051
|
-
}
|
|
2052
|
-
if (node["s-sn"] === "") {
|
|
2053
|
-
const textNode = this.ownerDocument.createTextNode(value);
|
|
2054
|
-
textNode["s-sn"] = "";
|
|
2055
|
-
insertBefore(node.parentElement, textNode, node.nextSibling);
|
|
2056
|
-
} else {
|
|
2057
|
-
node.remove();
|
|
2058
|
-
}
|
|
2059
|
-
});
|
|
2060
|
-
}
|
|
2061
|
-
});
|
|
2062
|
-
}
|
|
2063
|
-
};
|
|
2064
|
-
var patchChildSlotNodes = (elm, cmpMeta) => {
|
|
2065
|
-
class FakeNodeList extends Array {
|
|
2066
|
-
item(n) {
|
|
2067
|
-
return this[n];
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
2071
|
-
const childNodesFn = elm.__lookupGetter__("childNodes");
|
|
2072
|
-
Object.defineProperty(elm, "children", {
|
|
2073
|
-
get() {
|
|
2074
|
-
return this.childNodes.map((n) => n.nodeType === 1);
|
|
2075
|
-
}
|
|
2076
|
-
});
|
|
2077
|
-
Object.defineProperty(elm, "childElementCount", {
|
|
2078
|
-
get() {
|
|
2079
|
-
return elm.children.length;
|
|
2080
|
-
}
|
|
2081
|
-
});
|
|
2082
|
-
Object.defineProperty(elm, "childNodes", {
|
|
2083
|
-
get() {
|
|
2084
|
-
const childNodes = childNodesFn.call(this);
|
|
2085
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
|
|
2086
|
-
const result = new FakeNodeList();
|
|
2087
|
-
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
2088
|
-
const slot = childNodes[i2]["s-nr"];
|
|
2089
|
-
if (slot) {
|
|
2090
|
-
result.push(slot);
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
return result;
|
|
2094
|
-
}
|
|
2095
|
-
return FakeNodeList.from(childNodes);
|
|
2096
|
-
}
|
|
2097
|
-
});
|
|
2098
|
-
}
|
|
2099
|
-
};
|
|
2100
|
-
var getAllChildSlotNodes = (childNodes) => {
|
|
2101
|
-
const slotRefNodes = [];
|
|
2102
|
-
for (const childNode of Array.from(childNodes)) {
|
|
2103
|
-
if (childNode["s-sr"]) {
|
|
2104
|
-
slotRefNodes.push(childNode);
|
|
2823
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
2105
2824
|
}
|
|
2106
|
-
slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
|
|
2107
2825
|
}
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
|
|
2111
|
-
var getHostSlotNode = (childNodes, slotName, hostName) => {
|
|
2112
|
-
let i2 = 0;
|
|
2113
|
-
let childNode;
|
|
2114
|
-
for (; i2 < childNodes.length; i2++) {
|
|
2115
|
-
childNode = childNodes[i2];
|
|
2116
|
-
if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
|
|
2117
|
-
return childNode;
|
|
2118
|
-
}
|
|
2119
|
-
childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
|
|
2120
|
-
if (childNode) {
|
|
2121
|
-
return childNode;
|
|
2122
|
-
}
|
|
2826
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2827
|
+
rootAppliedStyles.delete(elm);
|
|
2123
2828
|
}
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
var getHostSlotChildNodes = (n, slotName) => {
|
|
2127
|
-
const childNodes = [n];
|
|
2128
|
-
while ((n = n.nextSibling) && n["s-sn"] === slotName) {
|
|
2129
|
-
childNodes.push(n);
|
|
2829
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2830
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2130
2831
|
}
|
|
2131
|
-
return childNodes;
|
|
2132
2832
|
};
|
|
2133
2833
|
|
|
2134
2834
|
// src/runtime/bootstrap-lazy.ts
|
|
2135
2835
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
2136
2836
|
var _a;
|
|
2837
|
+
if (!win.document) {
|
|
2838
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2839
|
+
return;
|
|
2840
|
+
}
|
|
2137
2841
|
const endBootstrap = createTime();
|
|
2138
2842
|
const cmpTags = [];
|
|
2139
2843
|
const exclude = options.exclude || [];
|
|
2140
2844
|
const customElements2 = win.customElements;
|
|
2141
|
-
const head =
|
|
2845
|
+
const head = win.document.head;
|
|
2142
2846
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
2143
|
-
const dataStyles = /* @__PURE__ */
|
|
2847
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
2144
2848
|
const deferredConnectedCallbacks = [];
|
|
2145
2849
|
let appLoadFallback;
|
|
2146
2850
|
let isBootstrapping = true;
|
|
2147
2851
|
Object.assign(plt, options);
|
|
2148
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2852
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
2149
2853
|
{
|
|
2150
2854
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2151
2855
|
}
|
|
2856
|
+
{
|
|
2857
|
+
hydrateScopedToShadow();
|
|
2858
|
+
}
|
|
2152
2859
|
let hasSlotRelocation = false;
|
|
2153
2860
|
lazyBundles.map((lazyBundle) => {
|
|
2154
2861
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -2219,6 +2926,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2219
2926
|
}
|
|
2220
2927
|
disconnectedCallback() {
|
|
2221
2928
|
plt.jmp(() => disconnectedCallback(this));
|
|
2929
|
+
plt.raf(() => {
|
|
2930
|
+
var _a3;
|
|
2931
|
+
const hostRef = getHostRef(this);
|
|
2932
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2933
|
+
if (i2 > -1) {
|
|
2934
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2935
|
+
}
|
|
2936
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2937
|
+
delete hostRef.$vnode$.$elm$;
|
|
2938
|
+
}
|
|
2939
|
+
});
|
|
2222
2940
|
}
|
|
2223
2941
|
componentOnReady() {
|
|
2224
2942
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -2226,7 +2944,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2226
2944
|
};
|
|
2227
2945
|
{
|
|
2228
2946
|
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2229
|
-
patchPseudoShadowDom(HostElement.prototype
|
|
2947
|
+
patchPseudoShadowDom(HostElement.prototype);
|
|
2230
2948
|
}
|
|
2231
2949
|
}
|
|
2232
2950
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
@@ -2248,7 +2966,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2248
2966
|
}
|
|
2249
2967
|
if (dataStyles.innerHTML.length) {
|
|
2250
2968
|
dataStyles.setAttribute("data-styles", "");
|
|
2251
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2969
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2252
2970
|
if (nonce != null) {
|
|
2253
2971
|
dataStyles.setAttribute("nonce", nonce);
|
|
2254
2972
|
}
|
|
@@ -2265,10 +2983,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2265
2983
|
}
|
|
2266
2984
|
endBootstrap();
|
|
2267
2985
|
};
|
|
2986
|
+
|
|
2987
|
+
// src/runtime/fragment.ts
|
|
2988
|
+
var Fragment = (_, children) => children;
|
|
2268
2989
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2269
|
-
if (listeners) {
|
|
2990
|
+
if (listeners && win.document) {
|
|
2270
2991
|
listeners.map(([flags, name, method]) => {
|
|
2271
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2992
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
2272
2993
|
const handler = hostListenerProxy(hostRef, method);
|
|
2273
2994
|
const opts = hostListenerOpts(flags);
|
|
2274
2995
|
plt.ael(target, name, handler, opts);
|
|
@@ -2287,13 +3008,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
2287
3008
|
}
|
|
2288
3009
|
}
|
|
2289
3010
|
} catch (e) {
|
|
2290
|
-
consoleError(e);
|
|
3011
|
+
consoleError(e, hostRef.$hostElement$);
|
|
2291
3012
|
}
|
|
2292
3013
|
};
|
|
2293
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
2294
|
-
if (flags & 4 /* TargetDocument */)
|
|
2295
|
-
|
|
2296
|
-
|
|
3014
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
3015
|
+
if (flags & 4 /* TargetDocument */) {
|
|
3016
|
+
return doc;
|
|
3017
|
+
}
|
|
3018
|
+
if (flags & 8 /* TargetWindow */) {
|
|
3019
|
+
return win;
|
|
3020
|
+
}
|
|
3021
|
+
if (flags & 16 /* TargetBody */) {
|
|
3022
|
+
return doc.body;
|
|
3023
|
+
}
|
|
2297
3024
|
return elm;
|
|
2298
3025
|
};
|
|
2299
3026
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -2305,6 +3032,7 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
2305
3032
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
2306
3033
|
|
|
2307
3034
|
exports.Build = Build;
|
|
3035
|
+
exports.Fragment = Fragment;
|
|
2308
3036
|
exports.H = H;
|
|
2309
3037
|
exports.Host = Host;
|
|
2310
3038
|
exports.bootstrapLazy = bootstrapLazy;
|