@swisspost/design-system-components 10.0.0-next.55 → 10.0.0-next.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components/react/p-CJ80BZ06.js → cjs/breakpoints-Df03Ct7n.js} +103 -5
- package/dist/cjs/debounce-BsIBi_-2.js +13 -0
- package/dist/cjs/environment-BQE9Unf_.js +52 -0
- package/dist/cjs/{event-from-CLvtSUKf.js → event-from-CwMw19f8.js} +2 -2
- package/dist/cjs/fade-CPQhl1fP.js +26 -0
- package/dist/cjs/fade-slide-dPhQa-I1.js +38 -0
- package/dist/cjs/{get-focusable-children-Bx63XUQg.js → get-focusable-children-ChETM1wK.js} +29 -21
- package/dist/cjs/{get-root-CyMf3Vsd.js → get-root-CUAv4k4C.js} +2 -2
- package/dist/cjs/{index-B4gYpuJF.js → index-B4rc1pqu.js} +2150 -292
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-DkJrv93P.js → package-uQ5oiSiN.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +19 -15
- package/dist/cjs/post-avatar.cjs.entry.js +27 -17
- package/dist/cjs/post-back-to-top.cjs.entry.js +23 -43
- package/dist/cjs/post-banner.cjs.entry.js +15 -12
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +14 -12
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +33 -34
- package/dist/cjs/post-card-control.cjs.entry.js +42 -26
- package/dist/cjs/{post-closebutton_15.cjs.entry.js → post-closebutton_13.cjs.entry.js} +618 -531
- package/dist/cjs/post-collapsible_2.cjs.entry.js +41 -37
- package/dist/cjs/post-components.cjs.js +3 -3
- package/dist/cjs/post-env-test.cjs.entry.js +15 -0
- package/dist/cjs/post-footer.cjs.entry.js +24 -20
- package/dist/cjs/post-linkarea.cjs.entry.js +5 -5
- package/dist/cjs/post-pagination.cjs.entry.js +615 -0
- package/dist/cjs/post-popover-trigger.cjs.entry.js +54 -34
- package/dist/cjs/post-popover.cjs.entry.js +26 -17
- package/dist/cjs/post-rating.cjs.entry.js +24 -18
- package/dist/cjs/post-stepper-item.cjs.entry.js +5 -5
- package/dist/cjs/post-stepper.cjs.entry.js +40 -29
- package/dist/cjs/post-tab-item.cjs.entry.js +51 -0
- package/dist/cjs/post-tab-panel.cjs.entry.js +13 -11
- package/dist/cjs/post-tabs.cjs.entry.js +195 -40
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +13 -11
- package/dist/cjs/post-tooltip.cjs.entry.js +14 -12
- package/dist/cjs/utils-s05L2ulk.js +26 -0
- package/dist/collection/animations/collapse.js +3 -3
- package/dist/collection/animations/fade-slide.js +33 -0
- package/dist/collection/animations/fade.js +19 -7
- package/dist/collection/animations/index.js +2 -0
- package/dist/collection/animations/slide.js +25 -21
- package/dist/collection/animations/types.js +14 -0
- package/dist/collection/animations/utils.js +8 -0
- package/dist/collection/collection-manifest.json +8 -8
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +5 -4
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +9 -8
- package/dist/collection/components/post-avatar/post-avatar.js +11 -11
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +15 -15
- package/dist/collection/components/post-banner/post-banner.css +4 -1
- package/dist/collection/components/post-banner/post-banner.js +6 -5
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +3 -3
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +29 -29
- package/dist/collection/components/post-card-control/post-card-control.js +18 -18
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.js +4 -3
- package/dist/collection/components/post-collapsible/post-collapsible.js +28 -28
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +3 -3
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +18 -16
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +144 -82
- package/dist/collection/components/post-icon/post-icon.js +18 -16
- package/dist/collection/components/post-language-menu/post-language-menu.css +1 -0
- package/dist/collection/components/{post-language-switch/post-language-switch.js → post-language-menu/post-language-menu.js} +45 -36
- package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -0
- package/dist/collection/components/{post-language-option/post-language-option.js → post-language-menu-item/post-language-menu-item.js} +24 -23
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-logo/post-logo.css +3 -1
- package/dist/collection/components/post-logo/post-logo.js +3 -3
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +41 -29
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +183 -74
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +81 -75
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +39 -38
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +3 -3
- package/dist/collection/components/post-pagination/post-pagination.css +1 -0
- package/dist/collection/components/post-pagination/post-pagination.js +838 -0
- package/dist/collection/components/post-popover/post-popover.js +22 -16
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +45 -29
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +82 -131
- package/dist/collection/components/post-rating/post-rating.js +7 -7
- package/dist/collection/components/post-stepper/post-stepper.js +38 -35
- package/dist/collection/components/post-stepper-item/post-stepper-item.css +2 -2
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.css +1 -0
- package/dist/collection/components/post-tab-item/post-tab-item.js +86 -0
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +10 -10
- package/dist/collection/components/post-tabs/post-tabs.js +232 -59
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +2 -2
- package/dist/collection/components/post-tooltip/post-tooltip.js +9 -27
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +4 -4
- package/dist/collection/utils/environment.js +47 -2
- package/dist/collection/utils/event-from.js +2 -2
- package/dist/collection/utils/get-focusable-children.js +29 -21
- package/dist/collection/utils/is-motion-reduced.js +1 -1
- package/dist/collection/utils/tests/environment/hydrate-app-helper.js +16 -0
- package/dist/collection/utils/tests/environment/post-env-test.js +9 -0
- package/dist/component-names.json +4 -5
- package/dist/components/breakpoints.js +1 -178
- package/dist/components/debounce.js +1 -0
- package/dist/components/environment.js +1 -0
- package/dist/components/event-from.js +1 -119
- package/dist/components/fade-slide.js +1 -0
- package/dist/components/fade.js +1 -11
- package/dist/components/focusable.js +1 -5018
- package/dist/components/get-focusable-children.js +1 -64
- package/dist/components/get-root.js +1 -15
- package/dist/components/heading-levels.js +1 -3
- package/dist/components/index.browser.js +1 -14
- package/dist/components/index.d.ts +11 -10
- package/dist/components/index.js +1 -39
- package/dist/components/long-press-event.js +1 -257
- package/dist/components/package.js +1 -3
- package/dist/components/post-accordion-item.js +1 -6
- package/dist/components/post-accordion-item2.js +1 -113
- package/dist/components/post-accordion.js +1 -6
- package/dist/components/post-accordion2.js +1 -138
- package/dist/components/post-avatar.js +1 -217
- package/dist/components/post-back-to-top.js +1 -144
- package/dist/components/post-banner.js +1 -98
- package/dist/components/post-breadcrumb-item.js +1 -6
- package/dist/components/post-breadcrumb-item2.js +1 -79
- package/dist/components/post-breadcrumbs.js +1 -196
- package/dist/components/post-card-control.js +1 -326
- package/dist/components/post-closebutton.js +1 -6
- package/dist/components/post-closebutton2.js +1 -77
- package/dist/components/post-collapsible-trigger.js +1 -6
- package/dist/components/post-collapsible-trigger2.js +1 -136
- package/dist/components/post-collapsible.js +1 -6
- package/dist/components/post-collapsible2.js +1 -110
- package/dist/components/{post-list.d.ts → post-env-test.d.ts} +4 -4
- package/dist/components/post-env-test.js +1 -0
- package/dist/components/post-footer.js +1 -116
- package/dist/components/post-header.js +1 -372
- package/dist/components/post-icon.js +1 -6
- package/dist/components/post-icon2.js +1 -159
- package/dist/components/post-language-menu-item.d.ts +11 -0
- package/dist/components/post-language-menu-item.js +1 -0
- package/dist/components/{post-language-switch.d.ts → post-language-menu.d.ts} +4 -4
- package/dist/components/post-language-menu.js +1 -0
- package/dist/components/post-linkarea.js +1 -58
- package/dist/components/post-logo.js +1 -58
- package/dist/components/post-mainnavigation.js +1 -180
- package/dist/components/post-megadropdown-trigger.js +1 -136
- package/dist/components/post-megadropdown.js +1 -267
- package/dist/components/post-menu-item.js +1 -6
- package/dist/components/post-menu-item2.js +1 -30
- package/dist/components/post-menu-trigger.js +1 -6
- package/dist/components/post-menu-trigger2.js +1 -110
- package/dist/components/post-menu.js +1 -6
- package/dist/components/post-menu2.js +1 -242
- package/dist/components/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
- package/dist/components/post-pagination.js +1 -0
- package/dist/components/post-popover-trigger.js +1 -132
- package/dist/components/post-popover.js +1 -118
- package/dist/components/post-popovercontainer.js +1 -6
- package/dist/components/post-popovercontainer2.js +1 -3127
- package/dist/components/post-rating.js +1 -148
- package/dist/components/post-stepper-item.js +1 -33
- package/dist/components/post-stepper.js +1 -134
- package/dist/components/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
- package/dist/components/post-tab-item.js +1 -0
- package/dist/components/post-tab-panel.js +1 -54
- package/dist/components/post-tabs.js +1 -196
- package/dist/components/post-togglebutton.js +1 -56
- package/dist/components/post-togglebutton2.js +1 -0
- package/dist/components/post-tooltip-trigger.js +1 -206
- package/dist/components/post-tooltip.js +1 -114
- package/dist/components/react/index.d.ts +2 -0
- package/dist/components/react/index.js +1 -2315
- package/dist/components/react/p-B8YiQ3mz.js +1 -0
- package/dist/components/react/p-BC5nlBvn.js +1 -0
- package/dist/components/react/p-BLchVpF6.js +1 -14
- package/dist/components/react/p-BVCjnh6Q.js +1 -0
- package/dist/{post-components/p-CBFgkSgY.js → components/react/p-BVGcVycs.js} +1 -1
- package/dist/components/react/p-B_XPj2c8.js +1 -0
- package/dist/components/react/p-BllOMLDs.js +1 -0
- package/dist/components/react/p-BmRNjQUZ.js +1 -0
- package/dist/components/react/p-ByFh05IW.js +1 -0
- package/dist/components/react/p-C9hMpmsD.js +1 -0
- package/dist/components/react/p-CJ13r5fi.js +1 -0
- package/dist/components/react/p-CZvbetqX.js +1 -0
- package/dist/components/react/p-C_2k3G1c.js +1 -257
- package/dist/components/react/p-CoDiS_Ik.js +1 -0
- package/dist/components/react/p-Cou17ld8.js +1 -0
- package/dist/components/react/p-D5knoiyy.js +1 -0
- package/dist/components/react/p-D9DDtvFM.js +1 -0
- package/dist/components/react/p-DY2U5CQt.js +1 -0
- package/dist/components/react/p-DjIHLduJ.js +1 -3
- package/dist/components/react/p-DpATRD2W.js +1 -0
- package/dist/components/react/p-FxUVQ4Tx.js +1 -0
- package/dist/components/react/p-HygIVKXC.js +1 -5018
- package/dist/components/react/p-YR7U0Z_g.js +1 -0
- package/dist/components/react/p-ZeKXASQs.js +1 -0
- package/dist/components/react/p-r4txK0AC.js +1 -3
- package/dist/components/react/p-sSn0kXFi.js +1 -0
- package/dist/components/react/post-accordion-item.js +1 -6
- package/dist/components/react/post-accordion.js +1 -6
- package/dist/components/react/post-avatar.js +1 -218
- package/dist/components/react/post-back-to-top.js +1 -145
- package/dist/components/react/post-banner.js +1 -99
- package/dist/components/react/post-breadcrumb-item.js +1 -6
- package/dist/components/react/post-breadcrumbs.js +1 -197
- package/dist/components/react/post-card-control.js +1 -327
- package/dist/components/react/post-closebutton.js +1 -6
- package/dist/components/react/post-collapsible-trigger.js +1 -6
- package/dist/components/react/post-collapsible.js +1 -6
- package/dist/components/react/{post-list.d.ts → post-env-test.d.ts} +4 -4
- package/dist/components/react/post-env-test.js +1 -0
- package/dist/components/react/post-footer.js +1 -117
- package/dist/components/react/post-header.js +1 -373
- package/dist/components/react/post-icon.js +1 -6
- package/dist/components/react/post-language-menu-item.d.ts +11 -0
- package/dist/components/react/post-language-menu-item.js +1 -0
- package/dist/components/react/{post-language-option.d.ts → post-language-menu.d.ts} +4 -4
- package/dist/components/react/post-language-menu.js +1 -0
- package/dist/components/react/post-linkarea.js +1 -59
- package/dist/components/react/post-logo.js +1 -59
- package/dist/components/react/post-mainnavigation.js +1 -181
- package/dist/components/react/post-megadropdown-trigger.js +1 -137
- package/dist/components/react/post-megadropdown.js +1 -268
- package/dist/components/react/post-menu-item.js +1 -6
- package/dist/components/react/post-menu-trigger.js +1 -6
- package/dist/components/react/post-menu.js +1 -6
- package/dist/components/react/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
- package/dist/components/react/post-pagination.js +1 -0
- package/dist/components/react/post-popover-trigger.js +1 -133
- package/dist/components/react/post-popover.js +1 -119
- package/dist/components/react/post-popovercontainer.js +1 -6
- package/dist/components/react/post-rating.js +1 -149
- package/dist/components/react/post-stepper-item.js +1 -34
- package/dist/components/react/post-stepper.js +1 -135
- package/dist/components/react/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
- package/dist/components/react/post-tab-item.js +1 -0
- package/dist/components/react/post-tab-panel.js +1 -55
- package/dist/components/react/post-tabs.js +1 -197
- package/dist/components/react/post-togglebutton.js +1 -57
- package/dist/components/react/post-tooltip-trigger.js +1 -207
- package/dist/components/react/post-tooltip.js +1 -115
- package/dist/components/switch-variants.js +1 -3
- package/dist/components/utils.js +1 -0
- package/dist/docs.d.ts +11 -0
- package/dist/docs.json +873 -631
- package/dist/{cjs/breakpoints-CEkeixld.js → esm/breakpoints-DYoSKGHO.js} +89 -6
- package/dist/esm/debounce-C9hMpmsD.js +11 -0
- package/dist/esm/environment-CEmnRoA6.js +49 -0
- package/dist/{components/react/p-CzIKqBrS.js → esm/event-from-rEfV4v4a.js} +2 -2
- package/dist/esm/fade-DsgPYmAa.js +24 -0
- package/dist/esm/fade-slide-CvOvauo9.js +36 -0
- package/dist/esm/{get-focusable-children-D9ZHp2FP.js → get-focusable-children-BXNs2_sw.js} +29 -21
- package/dist/{components/react/p-CBFgkSgY.js → esm/get-root-CXfAA093.js} +1 -1
- package/dist/esm/{index-wEFJ-c34.js → index-CDZBzSdV.js} +2150 -292
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-CZvbetqX.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +17 -13
- package/dist/esm/post-avatar.entry.js +22 -12
- package/dist/esm/post-back-to-top.entry.js +23 -43
- package/dist/esm/post-banner.entry.js +14 -11
- package/dist/esm/post-breadcrumb-item_2.entry.js +13 -11
- package/dist/esm/post-breadcrumbs.entry.js +31 -32
- package/dist/esm/post-card-control.entry.js +32 -16
- package/dist/esm/{post-closebutton_15.entry.js → post-closebutton_13.entry.js} +599 -510
- package/dist/esm/post-collapsible_2.entry.js +38 -34
- package/dist/esm/post-components.js +4 -4
- package/dist/esm/post-env-test.entry.js +13 -0
- package/dist/esm/post-footer.entry.js +21 -17
- package/dist/esm/post-linkarea.entry.js +5 -5
- package/dist/esm/post-pagination.entry.js +613 -0
- package/dist/esm/post-popover-trigger.entry.js +52 -32
- package/dist/esm/post-popover.entry.js +25 -16
- package/dist/esm/post-rating.entry.js +16 -10
- package/dist/esm/post-stepper-item.entry.js +5 -5
- package/dist/esm/post-stepper.entry.js +39 -28
- package/dist/esm/post-tab-item.entry.js +49 -0
- package/dist/esm/post-tab-panel.entry.js +13 -11
- package/dist/esm/post-tabs.entry.js +195 -40
- package/dist/esm/post-tooltip-trigger.entry.js +10 -8
- package/dist/esm/post-tooltip.entry.js +13 -11
- package/dist/esm/utils-CoDiS_Ik.js +24 -0
- package/dist/post-components/p-09ba7cf9.entry.js +1 -0
- package/dist/post-components/p-0c091898.entry.js +1 -0
- package/dist/post-components/{p-cd03e6f2.entry.js → p-0e97fcfd.entry.js} +1 -1
- package/dist/post-components/p-296f1dd5.entry.js +1 -0
- package/dist/post-components/p-32ad2b21.entry.js +1 -0
- package/dist/post-components/p-366c28cb.entry.js +1 -0
- package/dist/post-components/p-41ae68d5.entry.js +1 -0
- package/dist/post-components/p-448e7265.entry.js +1 -0
- package/dist/post-components/p-554da188.entry.js +1 -0
- package/dist/post-components/p-5912f8f1.entry.js +1 -0
- package/dist/post-components/p-790f300d.entry.js +1 -0
- package/dist/post-components/p-7ed5a493.entry.js +1 -0
- package/dist/post-components/p-85bea1b6.entry.js +1 -0
- package/dist/post-components/p-8bcff4d2.entry.js +1 -0
- package/dist/post-components/p-9dc9c245.entry.js +1 -0
- package/dist/post-components/p-B7ebLhHc.js +1 -0
- package/dist/post-components/p-BVCjnh6Q.js +1 -0
- package/dist/post-components/p-BXNs2_sw.js +1 -0
- package/dist/post-components/p-C9hMpmsD.js +1 -0
- package/dist/post-components/p-CDZBzSdV.js +2 -0
- package/dist/post-components/p-CEmnRoA6.js +1 -0
- package/dist/post-components/p-CZvbetqX.js +1 -0
- package/dist/post-components/p-CoDiS_Ik.js +1 -0
- package/dist/post-components/p-D5knoiyy.js +1 -0
- package/dist/post-components/p-DI-h_mEL.js +1 -0
- package/dist/post-components/p-a06f9695.entry.js +1 -0
- package/dist/post-components/p-a191f1df.entry.js +1 -0
- package/dist/post-components/p-c5d19d62.entry.js +1 -0
- package/dist/post-components/{p-24dc54d1.entry.js → p-c8c4d05b.entry.js} +1 -1
- package/dist/post-components/{p-57288cb2.entry.js → p-d1a5c980.entry.js} +1 -1
- package/dist/post-components/p-d4e2c556.entry.js +1 -0
- package/dist/post-components/p-f96a310c.entry.js +1 -0
- package/dist/post-components/p-fab2327d.entry.js +1 -0
- package/dist/post-components/p-rEfV4v4a.js +1 -0
- package/dist/post-components/post-components.css +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/prebuild.js +46 -0
- package/dist/types/animations/collapse.d.ts +1 -0
- package/dist/types/animations/fade-slide.d.ts +11 -0
- package/dist/types/animations/fade.d.ts +2 -2
- package/dist/types/animations/index.d.ts +2 -0
- package/dist/types/animations/slide.d.ts +9 -2
- package/dist/types/animations/types.d.ts +13 -0
- package/dist/types/animations/utils.d.ts +2 -0
- package/dist/types/components/post-accordion-item/heading-levels.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -2
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -2
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +6 -6
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -5
- package/dist/types/components/post-footer/post-footer.d.ts +4 -4
- package/dist/types/components/post-header/post-header.d.ts +23 -13
- package/dist/types/components/{post-language-switch/post-language-switch.d.ts → post-language-menu/post-language-menu.d.ts} +12 -11
- package/dist/types/components/{post-language-option/post-language-option.d.ts → post-language-menu-item/post-language-menu-item.d.ts} +5 -5
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +6 -5
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +20 -2
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +17 -23
- package/dist/types/components/post-menu/post-menu.d.ts +4 -4
- package/dist/types/components/post-pagination/post-pagination.d.ts +224 -0
- package/dist/types/components/post-popover/post-popover.d.ts +4 -3
- package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +2 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +23 -21
- package/dist/types/components/post-rating/post-rating.d.ts +1 -1
- package/dist/types/components/post-stepper/post-stepper.d.ts +9 -8
- package/dist/types/components/post-tab-item/post-tab-item.d.ts +19 -0
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -3
- package/dist/types/components/post-tabs/post-tabs.d.ts +33 -12
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -5
- package/dist/types/components.d.ts +322 -219
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +9 -0
- package/dist/types/stencil-public-runtime.d.ts +147 -10
- package/dist/types/types/heading-levels.d.ts +1 -1
- package/dist/types/utils/environment.d.ts +25 -1
- package/dist/types/utils/get-focusable-children.d.ts +2 -2
- package/dist/types/utils/tests/environment/hydrate-app-helper.d.ts +5 -0
- package/dist/types/utils/tests/environment/post-env-test.d.ts +3 -0
- package/hydrate/index.d.ts +14 -0
- package/hydrate/index.js +7494 -2714
- package/hydrate/index.mjs +7493 -2715
- package/package.json +7 -8
- package/dist/cjs/fade-nS5zzDQS.js +0 -14
- package/dist/cjs/index-UFKR6Ok0.js +0 -98
- package/dist/cjs/post-tab-header.cjs.entry.js +0 -31
- package/dist/collection/animations/slide-and-fade.js +0 -25
- package/dist/collection/components/post-language-option/post-language-option.css +0 -1
- package/dist/collection/components/post-language-switch/post-language-switch.css +0 -1
- package/dist/collection/components/post-list/post-list.css +0 -1
- package/dist/collection/components/post-list/post-list.js +0 -97
- package/dist/collection/components/post-list-item/post-list-item.css +0 -1
- package/dist/collection/components/post-list-item/post-list-item.js +0 -26
- package/dist/collection/components/post-tab-header/post-tab-header.css +0 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +0 -65
- package/dist/components/index2.js +0 -89
- package/dist/components/post-language-option.d.ts +0 -11
- package/dist/components/post-language-option.js +0 -99
- package/dist/components/post-language-switch.js +0 -157
- package/dist/components/post-list-item.js +0 -38
- package/dist/components/post-list.js +0 -61
- package/dist/components/post-tab-header.js +0 -52
- package/dist/components/react/p-BVXiQdHq.js +0 -64
- package/dist/components/react/p-BhxZzOEC.js +0 -3
- package/dist/components/react/p-CSAMO7iJ.js +0 -243
- package/dist/components/react/p-CYkf_7Y5.js +0 -89
- package/dist/components/react/p-Ccrl2AQn.js +0 -111
- package/dist/components/react/p-CewRvBtg.js +0 -139
- package/dist/components/react/p-Cwiv86_f.js +0 -111
- package/dist/components/react/p-D2waO0Zc.js +0 -31
- package/dist/components/react/p-DBPOV12C.js +0 -160
- package/dist/components/react/p-DVGEExot.js +0 -3128
- package/dist/components/react/p-Djvj8fd2.js +0 -80
- package/dist/components/react/p-LtiDhYis.js +0 -137
- package/dist/components/react/p-SbIC4aZX.js +0 -11
- package/dist/components/react/p-XrZzCOKT.js +0 -78
- package/dist/components/react/p-v3pOrMNQ.js +0 -114
- package/dist/components/react/post-language-option.js +0 -100
- package/dist/components/react/post-language-switch.d.ts +0 -11
- package/dist/components/react/post-language-switch.js +0 -158
- package/dist/components/react/post-list-item.js +0 -39
- package/dist/components/react/post-list.js +0 -62
- package/dist/components/react/post-tab-header.js +0 -53
- package/dist/esm/breakpoints-CJ80BZ06.js +0 -178
- package/dist/esm/event-from-CzIKqBrS.js +0 -119
- package/dist/esm/fade-SbIC4aZX.js +0 -11
- package/dist/esm/get-root-BkQ3CrLq.js +0 -15
- package/dist/esm/index-Beaz8wEe.js +0 -89
- package/dist/esm/package-BhxZzOEC.js +0 -3
- package/dist/esm/post-tab-header.entry.js +0 -29
- package/dist/post-components/p-01e678c9.entry.js +0 -1
- package/dist/post-components/p-034a453f.entry.js +0 -1
- package/dist/post-components/p-15a4cdbf.entry.js +0 -1
- package/dist/post-components/p-2a2030bf.entry.js +0 -1
- package/dist/post-components/p-2ed84cc3.entry.js +0 -1
- package/dist/post-components/p-3228968f.entry.js +0 -1
- package/dist/post-components/p-3c01ddfe.entry.js +0 -1
- package/dist/post-components/p-748b1f01.entry.js +0 -1
- package/dist/post-components/p-7745e46e.entry.js +0 -1
- package/dist/post-components/p-7f635728.entry.js +0 -1
- package/dist/post-components/p-82c178a3.entry.js +0 -1
- package/dist/post-components/p-9b5f8319.entry.js +0 -1
- package/dist/post-components/p-Beaz8wEe.js +0 -1
- package/dist/post-components/p-BhxZzOEC.js +0 -1
- package/dist/post-components/p-CJ80BZ06.js +0 -1
- package/dist/post-components/p-D9ZHp2FP.js +0 -1
- package/dist/post-components/p-SbIC4aZX.js +0 -1
- package/dist/post-components/p-a9644e54.entry.js +0 -1
- package/dist/post-components/p-af030a3a.entry.js +0 -1
- package/dist/post-components/p-b8ba8139.entry.js +0 -1
- package/dist/post-components/p-db935e8e.entry.js +0 -1
- package/dist/post-components/p-e62e1f57.entry.js +0 -1
- package/dist/post-components/p-fb4b1641.entry.js +0 -1
- package/dist/post-components/p-wEFJ-c34.js +0 -2
- package/dist/types/animations/slide-and-fade.d.ts +0 -2
- package/dist/types/components/post-list/post-list.d.ts +0 -24
- package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +0 -14
- /package/dist/collection/components/{post-language-switch → post-language-menu}/switch-variants.js +0 -0
- /package/dist/{post-components/p-CzIKqBrS.js → components/react/p-rEfV4v4a.js} +0 -0
- /package/dist/types/components/{post-language-switch → post-language-menu}/switch-variants.d.ts +0 -0
|
@@ -1,17 +1,258 @@
|
|
|
1
1
|
const NAMESPACE = 'post-components';
|
|
2
|
-
const BUILD = /* post-components */ { hydratedSelectorName: "data-hydrated", lazyLoad: true, slotRelocation: true, updatable: true};
|
|
2
|
+
const BUILD = /* post-components */ { hotModuleReplacement: false, hydratedSelectorName: "data-hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
const globalScripts = () => {};
|
|
5
|
-
const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-
|
|
5
|
+
const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-menu,post-language-menu-item,post-linkarea,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-pagination,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-item,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.41.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
|
+
var __create = Object.create;
|
|
10
11
|
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __typeError = (msg) => {
|
|
17
|
+
throw TypeError(msg);
|
|
18
|
+
};
|
|
19
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
21
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
22
|
+
};
|
|
11
23
|
var __export = (target, all) => {
|
|
12
24
|
for (var name in all)
|
|
13
25
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
26
|
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
36
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
37
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
38
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
39
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
40
|
+
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
41
|
+
mod
|
|
42
|
+
));
|
|
43
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
44
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
45
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
46
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
47
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
48
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
49
|
+
|
|
50
|
+
// node_modules/balanced-match/index.js
|
|
51
|
+
var require_balanced_match = __commonJS({
|
|
52
|
+
"node_modules/balanced-match/index.js"(exports, module) {
|
|
53
|
+
module.exports = balanced;
|
|
54
|
+
function balanced(a, b, str) {
|
|
55
|
+
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
56
|
+
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
57
|
+
var r = range(a, b, str);
|
|
58
|
+
return r && {
|
|
59
|
+
start: r[0],
|
|
60
|
+
end: r[1],
|
|
61
|
+
pre: str.slice(0, r[0]),
|
|
62
|
+
body: str.slice(r[0] + a.length, r[1]),
|
|
63
|
+
post: str.slice(r[1] + b.length)
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function maybeMatch(reg, str) {
|
|
67
|
+
var m = str.match(reg);
|
|
68
|
+
return m ? m[0] : null;
|
|
69
|
+
}
|
|
70
|
+
balanced.range = range;
|
|
71
|
+
function range(a, b, str) {
|
|
72
|
+
var begs, beg, left, right, result;
|
|
73
|
+
var ai = str.indexOf(a);
|
|
74
|
+
var bi = str.indexOf(b, ai + 1);
|
|
75
|
+
var i2 = ai;
|
|
76
|
+
if (ai >= 0 && bi > 0) {
|
|
77
|
+
if (a === b) {
|
|
78
|
+
return [ai, bi];
|
|
79
|
+
}
|
|
80
|
+
begs = [];
|
|
81
|
+
left = str.length;
|
|
82
|
+
while (i2 >= 0 && !result) {
|
|
83
|
+
if (i2 == ai) {
|
|
84
|
+
begs.push(i2);
|
|
85
|
+
ai = str.indexOf(a, i2 + 1);
|
|
86
|
+
} else if (begs.length == 1) {
|
|
87
|
+
result = [begs.pop(), bi];
|
|
88
|
+
} else {
|
|
89
|
+
beg = begs.pop();
|
|
90
|
+
if (beg < left) {
|
|
91
|
+
left = beg;
|
|
92
|
+
right = bi;
|
|
93
|
+
}
|
|
94
|
+
bi = str.indexOf(b, i2 + 1);
|
|
95
|
+
}
|
|
96
|
+
i2 = ai < bi && ai >= 0 ? ai : bi;
|
|
97
|
+
}
|
|
98
|
+
if (begs.length) {
|
|
99
|
+
result = [left, right];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return result;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// node_modules/brace-expansion/index.js
|
|
108
|
+
var require_brace_expansion = __commonJS({
|
|
109
|
+
"node_modules/brace-expansion/index.js"(exports, module) {
|
|
110
|
+
var balanced = require_balanced_match();
|
|
111
|
+
module.exports = expandTop;
|
|
112
|
+
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
113
|
+
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
114
|
+
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
115
|
+
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
116
|
+
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
117
|
+
function numeric(str) {
|
|
118
|
+
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
119
|
+
}
|
|
120
|
+
function escapeBraces(str) {
|
|
121
|
+
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
122
|
+
}
|
|
123
|
+
function unescapeBraces(str) {
|
|
124
|
+
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
125
|
+
}
|
|
126
|
+
function parseCommaParts(str) {
|
|
127
|
+
if (!str)
|
|
128
|
+
return [""];
|
|
129
|
+
var parts = [];
|
|
130
|
+
var m = balanced("{", "}", str);
|
|
131
|
+
if (!m)
|
|
132
|
+
return str.split(",");
|
|
133
|
+
var pre = m.pre;
|
|
134
|
+
var body = m.body;
|
|
135
|
+
var post = m.post;
|
|
136
|
+
var p = pre.split(",");
|
|
137
|
+
p[p.length - 1] += "{" + body + "}";
|
|
138
|
+
var postParts = parseCommaParts(post);
|
|
139
|
+
if (post.length) {
|
|
140
|
+
p[p.length - 1] += postParts.shift();
|
|
141
|
+
p.push.apply(p, postParts);
|
|
142
|
+
}
|
|
143
|
+
parts.push.apply(parts, p);
|
|
144
|
+
return parts;
|
|
145
|
+
}
|
|
146
|
+
function expandTop(str) {
|
|
147
|
+
if (!str)
|
|
148
|
+
return [];
|
|
149
|
+
if (str.substr(0, 2) === "{}") {
|
|
150
|
+
str = "\\{\\}" + str.substr(2);
|
|
151
|
+
}
|
|
152
|
+
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
153
|
+
}
|
|
154
|
+
function embrace(str) {
|
|
155
|
+
return "{" + str + "}";
|
|
156
|
+
}
|
|
157
|
+
function isPadded(el) {
|
|
158
|
+
return /^-?0\d/.test(el);
|
|
159
|
+
}
|
|
160
|
+
function lte(i2, y) {
|
|
161
|
+
return i2 <= y;
|
|
162
|
+
}
|
|
163
|
+
function gte(i2, y) {
|
|
164
|
+
return i2 >= y;
|
|
165
|
+
}
|
|
166
|
+
function expand2(str, isTop) {
|
|
167
|
+
var expansions = [];
|
|
168
|
+
var m = balanced("{", "}", str);
|
|
169
|
+
if (!m) return [str];
|
|
170
|
+
var pre = m.pre;
|
|
171
|
+
var post = m.post.length ? expand2(m.post, false) : [""];
|
|
172
|
+
if (/\$$/.test(m.pre)) {
|
|
173
|
+
for (var k = 0; k < post.length; k++) {
|
|
174
|
+
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
175
|
+
expansions.push(expansion);
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
179
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
180
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
|
181
|
+
var isOptions = m.body.indexOf(",") >= 0;
|
|
182
|
+
if (!isSequence && !isOptions) {
|
|
183
|
+
if (m.post.match(/,(?!,).*\}/)) {
|
|
184
|
+
str = m.pre + "{" + m.body + escClose + m.post;
|
|
185
|
+
return expand2(str);
|
|
186
|
+
}
|
|
187
|
+
return [str];
|
|
188
|
+
}
|
|
189
|
+
var n;
|
|
190
|
+
if (isSequence) {
|
|
191
|
+
n = m.body.split(/\.\./);
|
|
192
|
+
} else {
|
|
193
|
+
n = parseCommaParts(m.body);
|
|
194
|
+
if (n.length === 1) {
|
|
195
|
+
n = expand2(n[0], false).map(embrace);
|
|
196
|
+
if (n.length === 1) {
|
|
197
|
+
return post.map(function(p) {
|
|
198
|
+
return m.pre + n[0] + p;
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
var N;
|
|
204
|
+
if (isSequence) {
|
|
205
|
+
var x = numeric(n[0]);
|
|
206
|
+
var y = numeric(n[1]);
|
|
207
|
+
var width = Math.max(n[0].length, n[1].length);
|
|
208
|
+
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
209
|
+
var test = lte;
|
|
210
|
+
var reverse = y < x;
|
|
211
|
+
if (reverse) {
|
|
212
|
+
incr *= -1;
|
|
213
|
+
test = gte;
|
|
214
|
+
}
|
|
215
|
+
var pad = n.some(isPadded);
|
|
216
|
+
N = [];
|
|
217
|
+
for (var i2 = x; test(i2, y); i2 += incr) {
|
|
218
|
+
var c;
|
|
219
|
+
if (isAlphaSequence) {
|
|
220
|
+
c = String.fromCharCode(i2);
|
|
221
|
+
if (c === "\\")
|
|
222
|
+
c = "";
|
|
223
|
+
} else {
|
|
224
|
+
c = String(i2);
|
|
225
|
+
if (pad) {
|
|
226
|
+
var need = width - c.length;
|
|
227
|
+
if (need > 0) {
|
|
228
|
+
var z = new Array(need + 1).join("0");
|
|
229
|
+
if (i2 < 0)
|
|
230
|
+
c = "-" + z + c.slice(1);
|
|
231
|
+
else
|
|
232
|
+
c = z + c;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
N.push(c);
|
|
237
|
+
}
|
|
238
|
+
} else {
|
|
239
|
+
N = [];
|
|
240
|
+
for (var j = 0; j < n.length; j++) {
|
|
241
|
+
N.push.apply(N, expand2(n[j], false));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
for (var j = 0; j < N.length; j++) {
|
|
245
|
+
for (var k = 0; k < post.length; k++) {
|
|
246
|
+
var expansion = pre + N[j] + post[k];
|
|
247
|
+
if (!isTop || isSequence || expansion)
|
|
248
|
+
expansions.push(expansion);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return expansions;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
15
256
|
|
|
16
257
|
// src/utils/constants.ts
|
|
17
258
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
@@ -40,6 +281,38 @@ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
|
40
281
|
var TYPE_CONSTANT = "type";
|
|
41
282
|
var VALUE_CONSTANT = "value";
|
|
42
283
|
var SERIALIZED_PREFIX = "serialized:";
|
|
284
|
+
var reWireGetterSetter = (instance, hostRef) => {
|
|
285
|
+
var _a;
|
|
286
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
287
|
+
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
288
|
+
members.map(([memberName, [memberFlags]]) => {
|
|
289
|
+
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
290
|
+
const ogValue = instance[memberName];
|
|
291
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
292
|
+
if (ogDescriptor) {
|
|
293
|
+
Object.defineProperty(instance, memberName, {
|
|
294
|
+
get() {
|
|
295
|
+
return ogDescriptor.get.call(this);
|
|
296
|
+
},
|
|
297
|
+
set(newValue) {
|
|
298
|
+
ogDescriptor.set.call(this, newValue);
|
|
299
|
+
},
|
|
300
|
+
configurable: true,
|
|
301
|
+
enumerable: true
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
function getPropertyDescriptor(obj, memberName) {
|
|
309
|
+
while (obj) {
|
|
310
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
311
|
+
if (desc == null ? void 0 : desc.get) return desc;
|
|
312
|
+
obj = Object.getPrototypeOf(obj);
|
|
313
|
+
}
|
|
314
|
+
return void 0;
|
|
315
|
+
}
|
|
43
316
|
|
|
44
317
|
// src/client/client-host-ref.ts
|
|
45
318
|
var getHostRef = (ref) => {
|
|
@@ -49,15 +322,20 @@ var getHostRef = (ref) => {
|
|
|
49
322
|
return void 0;
|
|
50
323
|
};
|
|
51
324
|
var registerInstance = (lazyInstance, hostRef) => {
|
|
325
|
+
if (!hostRef) return;
|
|
52
326
|
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
53
327
|
hostRef.$lazyInstance$ = lazyInstance;
|
|
328
|
+
if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
|
|
329
|
+
reWireGetterSetter(lazyInstance, hostRef);
|
|
330
|
+
}
|
|
54
331
|
};
|
|
55
332
|
var registerHost = (hostElement, cmpMeta) => {
|
|
56
333
|
const hostRef = {
|
|
57
334
|
$flags$: 0,
|
|
58
335
|
$hostElement$: hostElement,
|
|
59
336
|
$cmpMeta$: cmpMeta,
|
|
60
|
-
$instanceValues$: /* @__PURE__ */ new Map()
|
|
337
|
+
$instanceValues$: /* @__PURE__ */ new Map(),
|
|
338
|
+
$serializerValues$: /* @__PURE__ */ new Map()
|
|
61
339
|
};
|
|
62
340
|
{
|
|
63
341
|
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
@@ -67,6 +345,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
67
345
|
hostElement["s-p"] = [];
|
|
68
346
|
hostElement["s-rc"] = [];
|
|
69
347
|
}
|
|
348
|
+
{
|
|
349
|
+
hostRef.$fetchedCbList$ = [];
|
|
350
|
+
}
|
|
70
351
|
const ref = hostRef;
|
|
71
352
|
hostElement.__stencil__getHostRef = () => ref;
|
|
72
353
|
return ref;
|
|
@@ -94,6 +375,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
94
375
|
}
|
|
95
376
|
switch(bundleId) {
|
|
96
377
|
|
|
378
|
+
case 'post-env-test':
|
|
379
|
+
return import(
|
|
380
|
+
/* webpackMode: "lazy" */
|
|
381
|
+
'./post-env-test.entry.js').then(processMod, consoleError);
|
|
382
|
+
case 'post-back-to-top':
|
|
383
|
+
return import(
|
|
384
|
+
/* webpackMode: "lazy" */
|
|
385
|
+
'./post-back-to-top.entry.js').then(processMod, consoleError);
|
|
386
|
+
case 'post-breadcrumbs':
|
|
387
|
+
return import(
|
|
388
|
+
/* webpackMode: "lazy" */
|
|
389
|
+
'./post-breadcrumbs.entry.js').then(processMod, consoleError);
|
|
97
390
|
case 'post-card-control':
|
|
98
391
|
return import(
|
|
99
392
|
/* webpackMode: "lazy" */
|
|
@@ -106,6 +399,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
106
399
|
return import(
|
|
107
400
|
/* webpackMode: "lazy" */
|
|
108
401
|
'./post-linkarea.entry.js').then(processMod, consoleError);
|
|
402
|
+
case 'post-pagination':
|
|
403
|
+
return import(
|
|
404
|
+
/* webpackMode: "lazy" */
|
|
405
|
+
'./post-pagination.entry.js').then(processMod, consoleError);
|
|
109
406
|
case 'post-popover':
|
|
110
407
|
return import(
|
|
111
408
|
/* webpackMode: "lazy" */
|
|
@@ -126,10 +423,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
126
423
|
return import(
|
|
127
424
|
/* webpackMode: "lazy" */
|
|
128
425
|
'./post-stepper-item.entry.js').then(processMod, consoleError);
|
|
129
|
-
case 'post-tab-
|
|
426
|
+
case 'post-tab-item':
|
|
130
427
|
return import(
|
|
131
428
|
/* webpackMode: "lazy" */
|
|
132
|
-
'./post-tab-
|
|
429
|
+
'./post-tab-item.entry.js').then(processMod, consoleError);
|
|
133
430
|
case 'post-tab-panel':
|
|
134
431
|
return import(
|
|
135
432
|
/* webpackMode: "lazy" */
|
|
@@ -146,18 +443,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
146
443
|
return import(
|
|
147
444
|
/* webpackMode: "lazy" */
|
|
148
445
|
'./post-avatar.entry.js').then(processMod, consoleError);
|
|
149
|
-
case 'post-back-to-top':
|
|
150
|
-
return import(
|
|
151
|
-
/* webpackMode: "lazy" */
|
|
152
|
-
'./post-back-to-top.entry.js').then(processMod, consoleError);
|
|
153
446
|
case 'post-banner':
|
|
154
447
|
return import(
|
|
155
448
|
/* webpackMode: "lazy" */
|
|
156
449
|
'./post-banner.entry.js').then(processMod, consoleError);
|
|
157
|
-
case 'post-breadcrumbs':
|
|
158
|
-
return import(
|
|
159
|
-
/* webpackMode: "lazy" */
|
|
160
|
-
'./post-breadcrumbs.entry.js').then(processMod, consoleError);
|
|
161
450
|
case 'post-tabs':
|
|
162
451
|
return import(
|
|
163
452
|
/* webpackMode: "lazy" */
|
|
@@ -174,10 +463,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
174
463
|
return import(
|
|
175
464
|
/* webpackMode: "lazy" */
|
|
176
465
|
'./post-collapsible_2.entry.js').then(processMod, consoleError);
|
|
177
|
-
case 'post-
|
|
466
|
+
case 'post-closebutton_13':
|
|
178
467
|
return import(
|
|
179
468
|
/* webpackMode: "lazy" */
|
|
180
|
-
'./post-
|
|
469
|
+
'./post-closebutton_13.entry.js').then(processMod, consoleError);
|
|
181
470
|
}
|
|
182
471
|
}
|
|
183
472
|
return import(
|
|
@@ -249,12 +538,16 @@ var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
|
249
538
|
var promiseResolve = (v) => Promise.resolve(v);
|
|
250
539
|
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
251
540
|
try {
|
|
541
|
+
if (!win.document.adoptedStyleSheets) {
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
252
544
|
new CSSStyleSheet();
|
|
253
545
|
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
254
546
|
} catch (e) {
|
|
255
547
|
}
|
|
256
548
|
return false;
|
|
257
549
|
})() ;
|
|
550
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
258
551
|
var queuePending = false;
|
|
259
552
|
var queueDomReads = [];
|
|
260
553
|
var queueDomWrites = [];
|
|
@@ -295,6 +588,1359 @@ var isComplexType = (o) => {
|
|
|
295
588
|
return o === "object" || o === "function";
|
|
296
589
|
};
|
|
297
590
|
|
|
591
|
+
// node_modules/minimatch/dist/esm/index.js
|
|
592
|
+
var import_brace_expansion = __toESM(require_brace_expansion());
|
|
593
|
+
|
|
594
|
+
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
595
|
+
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
596
|
+
var assertValidPattern = (pattern) => {
|
|
597
|
+
if (typeof pattern !== "string") {
|
|
598
|
+
throw new TypeError("invalid pattern");
|
|
599
|
+
}
|
|
600
|
+
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
601
|
+
throw new TypeError("pattern is too long");
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
606
|
+
var posixClasses = {
|
|
607
|
+
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
608
|
+
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
609
|
+
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
610
|
+
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
611
|
+
"[:cntrl:]": ["\\p{Cc}", true],
|
|
612
|
+
"[:digit:]": ["\\p{Nd}", true],
|
|
613
|
+
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
614
|
+
"[:lower:]": ["\\p{Ll}", true],
|
|
615
|
+
"[:print:]": ["\\p{C}", true],
|
|
616
|
+
"[:punct:]": ["\\p{P}", true],
|
|
617
|
+
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
618
|
+
"[:upper:]": ["\\p{Lu}", true],
|
|
619
|
+
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
620
|
+
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
621
|
+
};
|
|
622
|
+
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
623
|
+
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
624
|
+
var rangesToString = (ranges) => ranges.join("");
|
|
625
|
+
var parseClass = (glob, position) => {
|
|
626
|
+
const pos = position;
|
|
627
|
+
if (glob.charAt(pos) !== "[") {
|
|
628
|
+
throw new Error("not in a brace expression");
|
|
629
|
+
}
|
|
630
|
+
const ranges = [];
|
|
631
|
+
const negs = [];
|
|
632
|
+
let i2 = pos + 1;
|
|
633
|
+
let sawStart = false;
|
|
634
|
+
let uflag = false;
|
|
635
|
+
let escaping = false;
|
|
636
|
+
let negate = false;
|
|
637
|
+
let endPos = pos;
|
|
638
|
+
let rangeStart = "";
|
|
639
|
+
WHILE: while (i2 < glob.length) {
|
|
640
|
+
const c = glob.charAt(i2);
|
|
641
|
+
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
642
|
+
negate = true;
|
|
643
|
+
i2++;
|
|
644
|
+
continue;
|
|
645
|
+
}
|
|
646
|
+
if (c === "]" && sawStart && !escaping) {
|
|
647
|
+
endPos = i2 + 1;
|
|
648
|
+
break;
|
|
649
|
+
}
|
|
650
|
+
sawStart = true;
|
|
651
|
+
if (c === "\\") {
|
|
652
|
+
if (!escaping) {
|
|
653
|
+
escaping = true;
|
|
654
|
+
i2++;
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
if (c === "[" && !escaping) {
|
|
659
|
+
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
660
|
+
if (glob.startsWith(cls, i2)) {
|
|
661
|
+
if (rangeStart) {
|
|
662
|
+
return ["$.", false, glob.length - pos, true];
|
|
663
|
+
}
|
|
664
|
+
i2 += cls.length;
|
|
665
|
+
if (neg)
|
|
666
|
+
negs.push(unip);
|
|
667
|
+
else
|
|
668
|
+
ranges.push(unip);
|
|
669
|
+
uflag = uflag || u;
|
|
670
|
+
continue WHILE;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
escaping = false;
|
|
675
|
+
if (rangeStart) {
|
|
676
|
+
if (c > rangeStart) {
|
|
677
|
+
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
678
|
+
} else if (c === rangeStart) {
|
|
679
|
+
ranges.push(braceEscape(c));
|
|
680
|
+
}
|
|
681
|
+
rangeStart = "";
|
|
682
|
+
i2++;
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
if (glob.startsWith("-]", i2 + 1)) {
|
|
686
|
+
ranges.push(braceEscape(c + "-"));
|
|
687
|
+
i2 += 2;
|
|
688
|
+
continue;
|
|
689
|
+
}
|
|
690
|
+
if (glob.startsWith("-", i2 + 1)) {
|
|
691
|
+
rangeStart = c;
|
|
692
|
+
i2 += 2;
|
|
693
|
+
continue;
|
|
694
|
+
}
|
|
695
|
+
ranges.push(braceEscape(c));
|
|
696
|
+
i2++;
|
|
697
|
+
}
|
|
698
|
+
if (endPos < i2) {
|
|
699
|
+
return ["", false, 0, false];
|
|
700
|
+
}
|
|
701
|
+
if (!ranges.length && !negs.length) {
|
|
702
|
+
return ["$.", false, glob.length - pos, true];
|
|
703
|
+
}
|
|
704
|
+
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
705
|
+
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
706
|
+
return [regexpEscape(r), false, endPos - pos, false];
|
|
707
|
+
}
|
|
708
|
+
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
709
|
+
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
710
|
+
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
711
|
+
return [comb, uflag, endPos - pos, true];
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
// node_modules/minimatch/dist/esm/unescape.js
|
|
715
|
+
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
716
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
// node_modules/minimatch/dist/esm/ast.js
|
|
720
|
+
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
721
|
+
var isExtglobType = (c) => types.has(c);
|
|
722
|
+
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
723
|
+
var startNoDot = "(?!\\.)";
|
|
724
|
+
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
725
|
+
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
726
|
+
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
727
|
+
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
728
|
+
var qmark = "[^/]";
|
|
729
|
+
var star = qmark + "*?";
|
|
730
|
+
var starNoEmpty = qmark + "+?";
|
|
731
|
+
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
732
|
+
var _AST = class _AST {
|
|
733
|
+
constructor(type, parent, options = {}) {
|
|
734
|
+
__privateAdd(this, _AST_instances);
|
|
735
|
+
__publicField(this, "type");
|
|
736
|
+
__privateAdd(this, _root);
|
|
737
|
+
__privateAdd(this, _hasMagic);
|
|
738
|
+
__privateAdd(this, _uflag, false);
|
|
739
|
+
__privateAdd(this, _parts, []);
|
|
740
|
+
__privateAdd(this, _parent);
|
|
741
|
+
__privateAdd(this, _parentIndex);
|
|
742
|
+
__privateAdd(this, _negs);
|
|
743
|
+
__privateAdd(this, _filledNegs, false);
|
|
744
|
+
__privateAdd(this, _options);
|
|
745
|
+
__privateAdd(this, _toString);
|
|
746
|
+
// set to true if it's an extglob with no children
|
|
747
|
+
// (which really means one child of '')
|
|
748
|
+
__privateAdd(this, _emptyExt, false);
|
|
749
|
+
this.type = type;
|
|
750
|
+
if (type)
|
|
751
|
+
__privateSet(this, _hasMagic, true);
|
|
752
|
+
__privateSet(this, _parent, parent);
|
|
753
|
+
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
754
|
+
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
755
|
+
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
756
|
+
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
757
|
+
__privateGet(this, _negs).push(this);
|
|
758
|
+
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
759
|
+
}
|
|
760
|
+
get hasMagic() {
|
|
761
|
+
if (__privateGet(this, _hasMagic) !== void 0)
|
|
762
|
+
return __privateGet(this, _hasMagic);
|
|
763
|
+
for (const p of __privateGet(this, _parts)) {
|
|
764
|
+
if (typeof p === "string")
|
|
765
|
+
continue;
|
|
766
|
+
if (p.type || p.hasMagic)
|
|
767
|
+
return __privateSet(this, _hasMagic, true);
|
|
768
|
+
}
|
|
769
|
+
return __privateGet(this, _hasMagic);
|
|
770
|
+
}
|
|
771
|
+
// reconstructs the pattern
|
|
772
|
+
toString() {
|
|
773
|
+
if (__privateGet(this, _toString) !== void 0)
|
|
774
|
+
return __privateGet(this, _toString);
|
|
775
|
+
if (!this.type) {
|
|
776
|
+
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
777
|
+
} else {
|
|
778
|
+
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
push(...parts) {
|
|
782
|
+
for (const p of parts) {
|
|
783
|
+
if (p === "")
|
|
784
|
+
continue;
|
|
785
|
+
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
786
|
+
throw new Error("invalid part: " + p);
|
|
787
|
+
}
|
|
788
|
+
__privateGet(this, _parts).push(p);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
toJSON() {
|
|
792
|
+
var _a;
|
|
793
|
+
const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
|
|
794
|
+
if (this.isStart() && !this.type)
|
|
795
|
+
ret.unshift([]);
|
|
796
|
+
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
797
|
+
ret.push({});
|
|
798
|
+
}
|
|
799
|
+
return ret;
|
|
800
|
+
}
|
|
801
|
+
isStart() {
|
|
802
|
+
var _a;
|
|
803
|
+
if (__privateGet(this, _root) === this)
|
|
804
|
+
return true;
|
|
805
|
+
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
806
|
+
return false;
|
|
807
|
+
if (__privateGet(this, _parentIndex) === 0)
|
|
808
|
+
return true;
|
|
809
|
+
const p = __privateGet(this, _parent);
|
|
810
|
+
for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
|
|
811
|
+
const pp = __privateGet(p, _parts)[i2];
|
|
812
|
+
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
813
|
+
return false;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
return true;
|
|
817
|
+
}
|
|
818
|
+
isEnd() {
|
|
819
|
+
var _a, _b, _c;
|
|
820
|
+
if (__privateGet(this, _root) === this)
|
|
821
|
+
return true;
|
|
822
|
+
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
823
|
+
return true;
|
|
824
|
+
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
825
|
+
return false;
|
|
826
|
+
if (!this.type)
|
|
827
|
+
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
828
|
+
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
829
|
+
return __privateGet(this, _parentIndex) === pl - 1;
|
|
830
|
+
}
|
|
831
|
+
copyIn(part) {
|
|
832
|
+
if (typeof part === "string")
|
|
833
|
+
this.push(part);
|
|
834
|
+
else
|
|
835
|
+
this.push(part.clone(this));
|
|
836
|
+
}
|
|
837
|
+
clone(parent) {
|
|
838
|
+
const c = new _AST(this.type, parent);
|
|
839
|
+
for (const p of __privateGet(this, _parts)) {
|
|
840
|
+
c.copyIn(p);
|
|
841
|
+
}
|
|
842
|
+
return c;
|
|
843
|
+
}
|
|
844
|
+
static fromGlob(pattern, options = {}) {
|
|
845
|
+
var _a;
|
|
846
|
+
const ast = new _AST(null, void 0, options);
|
|
847
|
+
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
848
|
+
return ast;
|
|
849
|
+
}
|
|
850
|
+
// returns the regular expression if there's magic, or the unescaped
|
|
851
|
+
// string if not.
|
|
852
|
+
toMMPattern() {
|
|
853
|
+
if (this !== __privateGet(this, _root))
|
|
854
|
+
return __privateGet(this, _root).toMMPattern();
|
|
855
|
+
const glob = this.toString();
|
|
856
|
+
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
857
|
+
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
858
|
+
if (!anyMagic) {
|
|
859
|
+
return body;
|
|
860
|
+
}
|
|
861
|
+
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
862
|
+
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
863
|
+
_src: re,
|
|
864
|
+
_glob: glob
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
get options() {
|
|
868
|
+
return __privateGet(this, _options);
|
|
869
|
+
}
|
|
870
|
+
// returns the string match, the regexp source, whether there's magic
|
|
871
|
+
// in the regexp (so a regular expression is required) and whether or
|
|
872
|
+
// not the uflag is needed for the regular expression (for posix classes)
|
|
873
|
+
// TODO: instead of injecting the start/end at this point, just return
|
|
874
|
+
// the BODY of the regexp, along with the start/end portions suitable
|
|
875
|
+
// for binding the start/end in either a joined full-path makeRe context
|
|
876
|
+
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
877
|
+
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
878
|
+
//
|
|
879
|
+
// In part-matching mode, the start is:
|
|
880
|
+
// - if not isStart: nothing
|
|
881
|
+
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
882
|
+
// - if dots allowed or not possible: ^
|
|
883
|
+
// - if dots possible and not allowed: ^(?!\.)
|
|
884
|
+
// end is:
|
|
885
|
+
// - if not isEnd(): nothing
|
|
886
|
+
// - else: $
|
|
887
|
+
//
|
|
888
|
+
// In full-path matching mode, we put the slash at the START of the
|
|
889
|
+
// pattern, so start is:
|
|
890
|
+
// - if first pattern: same as part-matching mode
|
|
891
|
+
// - if not isStart(): nothing
|
|
892
|
+
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
893
|
+
// - if dots allowed or not possible: /
|
|
894
|
+
// - if dots possible and not allowed: /(?!\.)
|
|
895
|
+
// end is:
|
|
896
|
+
// - if last pattern, same as part-matching mode
|
|
897
|
+
// - else nothing
|
|
898
|
+
//
|
|
899
|
+
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
900
|
+
// there to bind the end of the negated pattern portion, and it's easier to
|
|
901
|
+
// just stick it in now rather than try to inject it later in the middle of
|
|
902
|
+
// the pattern.
|
|
903
|
+
//
|
|
904
|
+
// We can just always return the same end, and leave it up to the caller
|
|
905
|
+
// to know whether it's going to be used joined or in parts.
|
|
906
|
+
// And, if the start is adjusted slightly, can do the same there:
|
|
907
|
+
// - if not isStart: nothing
|
|
908
|
+
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
909
|
+
// - if dots allowed or not possible: (?:/|^)
|
|
910
|
+
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
911
|
+
//
|
|
912
|
+
// But it's better to have a simpler binding without a conditional, for
|
|
913
|
+
// performance, so probably better to return both start options.
|
|
914
|
+
//
|
|
915
|
+
// Then the caller just ignores the end if it's not the first pattern,
|
|
916
|
+
// and the start always gets applied.
|
|
917
|
+
//
|
|
918
|
+
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
919
|
+
// so the caller can just attach $ at the end of the pattern when building.
|
|
920
|
+
//
|
|
921
|
+
// So the todo is:
|
|
922
|
+
// - better detect what kind of start is needed
|
|
923
|
+
// - return both flavors of starting pattern
|
|
924
|
+
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
925
|
+
//
|
|
926
|
+
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
927
|
+
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
928
|
+
// that dot prevention biz to live in the extglob portions, because eg
|
|
929
|
+
// +(*|.x*) can match .xy but not .yx.
|
|
930
|
+
//
|
|
931
|
+
// So, return the two flavors if it's #root and the first child is not an
|
|
932
|
+
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
933
|
+
// use the (?:^|/) style of start binding.
|
|
934
|
+
//
|
|
935
|
+
// Even simplified further:
|
|
936
|
+
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
937
|
+
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
938
|
+
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
939
|
+
toRegExpSource(allowDot) {
|
|
940
|
+
var _a;
|
|
941
|
+
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
942
|
+
if (__privateGet(this, _root) === this)
|
|
943
|
+
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
944
|
+
if (!this.type) {
|
|
945
|
+
const noEmpty = this.isStart() && this.isEnd();
|
|
946
|
+
const src = __privateGet(this, _parts).map((p) => {
|
|
947
|
+
var _a2;
|
|
948
|
+
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
949
|
+
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
950
|
+
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
951
|
+
return re;
|
|
952
|
+
}).join("");
|
|
953
|
+
let start2 = "";
|
|
954
|
+
if (this.isStart()) {
|
|
955
|
+
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
956
|
+
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
957
|
+
if (!dotTravAllowed) {
|
|
958
|
+
const aps = addPatternStart;
|
|
959
|
+
const needNoTrav = (
|
|
960
|
+
// dots are allowed, and the pattern starts with [ or .
|
|
961
|
+
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
962
|
+
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
963
|
+
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
964
|
+
);
|
|
965
|
+
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
966
|
+
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
let end = "";
|
|
971
|
+
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
972
|
+
end = "(?:$|\\/)";
|
|
973
|
+
}
|
|
974
|
+
const final2 = start2 + src + end;
|
|
975
|
+
return [
|
|
976
|
+
final2,
|
|
977
|
+
unescape(src),
|
|
978
|
+
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
979
|
+
__privateGet(this, _uflag)
|
|
980
|
+
];
|
|
981
|
+
}
|
|
982
|
+
const repeated = this.type === "*" || this.type === "+";
|
|
983
|
+
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
984
|
+
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
985
|
+
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
986
|
+
const s = this.toString();
|
|
987
|
+
__privateSet(this, _parts, [s]);
|
|
988
|
+
this.type = null;
|
|
989
|
+
__privateSet(this, _hasMagic, void 0);
|
|
990
|
+
return [s, unescape(this.toString()), false, false];
|
|
991
|
+
}
|
|
992
|
+
let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
993
|
+
if (bodyDotAllowed === body) {
|
|
994
|
+
bodyDotAllowed = "";
|
|
995
|
+
}
|
|
996
|
+
if (bodyDotAllowed) {
|
|
997
|
+
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
998
|
+
}
|
|
999
|
+
let final = "";
|
|
1000
|
+
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
1001
|
+
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
1002
|
+
} else {
|
|
1003
|
+
const close = this.type === "!" ? (
|
|
1004
|
+
// !() must match something,but !(x) can match ''
|
|
1005
|
+
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
1006
|
+
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
1007
|
+
final = start + body + close;
|
|
1008
|
+
}
|
|
1009
|
+
return [
|
|
1010
|
+
final,
|
|
1011
|
+
unescape(body),
|
|
1012
|
+
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
1013
|
+
__privateGet(this, _uflag)
|
|
1014
|
+
];
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
_root = new WeakMap();
|
|
1018
|
+
_hasMagic = new WeakMap();
|
|
1019
|
+
_uflag = new WeakMap();
|
|
1020
|
+
_parts = new WeakMap();
|
|
1021
|
+
_parent = new WeakMap();
|
|
1022
|
+
_parentIndex = new WeakMap();
|
|
1023
|
+
_negs = new WeakMap();
|
|
1024
|
+
_filledNegs = new WeakMap();
|
|
1025
|
+
_options = new WeakMap();
|
|
1026
|
+
_toString = new WeakMap();
|
|
1027
|
+
_emptyExt = new WeakMap();
|
|
1028
|
+
_AST_instances = new WeakSet();
|
|
1029
|
+
fillNegs_fn = function() {
|
|
1030
|
+
if (this !== __privateGet(this, _root))
|
|
1031
|
+
throw new Error("should only call on root");
|
|
1032
|
+
if (__privateGet(this, _filledNegs))
|
|
1033
|
+
return this;
|
|
1034
|
+
this.toString();
|
|
1035
|
+
__privateSet(this, _filledNegs, true);
|
|
1036
|
+
let n;
|
|
1037
|
+
while (n = __privateGet(this, _negs).pop()) {
|
|
1038
|
+
if (n.type !== "!")
|
|
1039
|
+
continue;
|
|
1040
|
+
let p = n;
|
|
1041
|
+
let pp = __privateGet(p, _parent);
|
|
1042
|
+
while (pp) {
|
|
1043
|
+
for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
|
|
1044
|
+
for (const part of __privateGet(n, _parts)) {
|
|
1045
|
+
if (typeof part === "string") {
|
|
1046
|
+
throw new Error("string part in extglob AST??");
|
|
1047
|
+
}
|
|
1048
|
+
part.copyIn(__privateGet(pp, _parts)[i2]);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
p = pp;
|
|
1052
|
+
pp = __privateGet(p, _parent);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
return this;
|
|
1056
|
+
};
|
|
1057
|
+
_AST_static = new WeakSet();
|
|
1058
|
+
parseAST_fn = function(str, ast, pos, opt) {
|
|
1059
|
+
var _a, _b;
|
|
1060
|
+
let escaping = false;
|
|
1061
|
+
let inBrace = false;
|
|
1062
|
+
let braceStart = -1;
|
|
1063
|
+
let braceNeg = false;
|
|
1064
|
+
if (ast.type === null) {
|
|
1065
|
+
let i3 = pos;
|
|
1066
|
+
let acc2 = "";
|
|
1067
|
+
while (i3 < str.length) {
|
|
1068
|
+
const c = str.charAt(i3++);
|
|
1069
|
+
if (escaping || c === "\\") {
|
|
1070
|
+
escaping = !escaping;
|
|
1071
|
+
acc2 += c;
|
|
1072
|
+
continue;
|
|
1073
|
+
}
|
|
1074
|
+
if (inBrace) {
|
|
1075
|
+
if (i3 === braceStart + 1) {
|
|
1076
|
+
if (c === "^" || c === "!") {
|
|
1077
|
+
braceNeg = true;
|
|
1078
|
+
}
|
|
1079
|
+
} else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
|
|
1080
|
+
inBrace = false;
|
|
1081
|
+
}
|
|
1082
|
+
acc2 += c;
|
|
1083
|
+
continue;
|
|
1084
|
+
} else if (c === "[") {
|
|
1085
|
+
inBrace = true;
|
|
1086
|
+
braceStart = i3;
|
|
1087
|
+
braceNeg = false;
|
|
1088
|
+
acc2 += c;
|
|
1089
|
+
continue;
|
|
1090
|
+
}
|
|
1091
|
+
if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
|
|
1092
|
+
ast.push(acc2);
|
|
1093
|
+
acc2 = "";
|
|
1094
|
+
const ext2 = new _AST(c, ast);
|
|
1095
|
+
i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
|
|
1096
|
+
ast.push(ext2);
|
|
1097
|
+
continue;
|
|
1098
|
+
}
|
|
1099
|
+
acc2 += c;
|
|
1100
|
+
}
|
|
1101
|
+
ast.push(acc2);
|
|
1102
|
+
return i3;
|
|
1103
|
+
}
|
|
1104
|
+
let i2 = pos + 1;
|
|
1105
|
+
let part = new _AST(null, ast);
|
|
1106
|
+
const parts = [];
|
|
1107
|
+
let acc = "";
|
|
1108
|
+
while (i2 < str.length) {
|
|
1109
|
+
const c = str.charAt(i2++);
|
|
1110
|
+
if (escaping || c === "\\") {
|
|
1111
|
+
escaping = !escaping;
|
|
1112
|
+
acc += c;
|
|
1113
|
+
continue;
|
|
1114
|
+
}
|
|
1115
|
+
if (inBrace) {
|
|
1116
|
+
if (i2 === braceStart + 1) {
|
|
1117
|
+
if (c === "^" || c === "!") {
|
|
1118
|
+
braceNeg = true;
|
|
1119
|
+
}
|
|
1120
|
+
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
1121
|
+
inBrace = false;
|
|
1122
|
+
}
|
|
1123
|
+
acc += c;
|
|
1124
|
+
continue;
|
|
1125
|
+
} else if (c === "[") {
|
|
1126
|
+
inBrace = true;
|
|
1127
|
+
braceStart = i2;
|
|
1128
|
+
braceNeg = false;
|
|
1129
|
+
acc += c;
|
|
1130
|
+
continue;
|
|
1131
|
+
}
|
|
1132
|
+
if (isExtglobType(c) && str.charAt(i2) === "(") {
|
|
1133
|
+
part.push(acc);
|
|
1134
|
+
acc = "";
|
|
1135
|
+
const ext2 = new _AST(c, part);
|
|
1136
|
+
part.push(ext2);
|
|
1137
|
+
i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
|
|
1138
|
+
continue;
|
|
1139
|
+
}
|
|
1140
|
+
if (c === "|") {
|
|
1141
|
+
part.push(acc);
|
|
1142
|
+
acc = "";
|
|
1143
|
+
parts.push(part);
|
|
1144
|
+
part = new _AST(null, ast);
|
|
1145
|
+
continue;
|
|
1146
|
+
}
|
|
1147
|
+
if (c === ")") {
|
|
1148
|
+
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
1149
|
+
__privateSet(ast, _emptyExt, true);
|
|
1150
|
+
}
|
|
1151
|
+
part.push(acc);
|
|
1152
|
+
acc = "";
|
|
1153
|
+
ast.push(...parts, part);
|
|
1154
|
+
return i2;
|
|
1155
|
+
}
|
|
1156
|
+
acc += c;
|
|
1157
|
+
}
|
|
1158
|
+
ast.type = null;
|
|
1159
|
+
__privateSet(ast, _hasMagic, void 0);
|
|
1160
|
+
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
1161
|
+
return i2;
|
|
1162
|
+
};
|
|
1163
|
+
partsToRegExp_fn = function(dot) {
|
|
1164
|
+
return __privateGet(this, _parts).map((p) => {
|
|
1165
|
+
if (typeof p === "string") {
|
|
1166
|
+
throw new Error("string type in extglob ast??");
|
|
1167
|
+
}
|
|
1168
|
+
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
1169
|
+
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1170
|
+
return re;
|
|
1171
|
+
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
1172
|
+
};
|
|
1173
|
+
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
1174
|
+
let escaping = false;
|
|
1175
|
+
let re = "";
|
|
1176
|
+
let uflag = false;
|
|
1177
|
+
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
1178
|
+
const c = glob.charAt(i2);
|
|
1179
|
+
if (escaping) {
|
|
1180
|
+
escaping = false;
|
|
1181
|
+
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
1182
|
+
continue;
|
|
1183
|
+
}
|
|
1184
|
+
if (c === "\\") {
|
|
1185
|
+
if (i2 === glob.length - 1) {
|
|
1186
|
+
re += "\\\\";
|
|
1187
|
+
} else {
|
|
1188
|
+
escaping = true;
|
|
1189
|
+
}
|
|
1190
|
+
continue;
|
|
1191
|
+
}
|
|
1192
|
+
if (c === "[") {
|
|
1193
|
+
const [src, needUflag, consumed, magic] = parseClass(glob, i2);
|
|
1194
|
+
if (consumed) {
|
|
1195
|
+
re += src;
|
|
1196
|
+
uflag = uflag || needUflag;
|
|
1197
|
+
i2 += consumed - 1;
|
|
1198
|
+
hasMagic = hasMagic || magic;
|
|
1199
|
+
continue;
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
if (c === "*") {
|
|
1203
|
+
if (noEmpty && glob === "*")
|
|
1204
|
+
re += starNoEmpty;
|
|
1205
|
+
else
|
|
1206
|
+
re += star;
|
|
1207
|
+
hasMagic = true;
|
|
1208
|
+
continue;
|
|
1209
|
+
}
|
|
1210
|
+
if (c === "?") {
|
|
1211
|
+
re += qmark;
|
|
1212
|
+
hasMagic = true;
|
|
1213
|
+
continue;
|
|
1214
|
+
}
|
|
1215
|
+
re += regExpEscape(c);
|
|
1216
|
+
}
|
|
1217
|
+
return [re, unescape(glob), !!hasMagic, uflag];
|
|
1218
|
+
};
|
|
1219
|
+
__privateAdd(_AST, _AST_static);
|
|
1220
|
+
var AST = _AST;
|
|
1221
|
+
|
|
1222
|
+
// node_modules/minimatch/dist/esm/escape.js
|
|
1223
|
+
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
1224
|
+
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
// node_modules/minimatch/dist/esm/index.js
|
|
1228
|
+
var minimatch = (p, pattern, options = {}) => {
|
|
1229
|
+
assertValidPattern(pattern);
|
|
1230
|
+
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1231
|
+
return false;
|
|
1232
|
+
}
|
|
1233
|
+
return new Minimatch(pattern, options).match(p);
|
|
1234
|
+
};
|
|
1235
|
+
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1236
|
+
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
1237
|
+
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
1238
|
+
var starDotExtTestNocase = (ext2) => {
|
|
1239
|
+
ext2 = ext2.toLowerCase();
|
|
1240
|
+
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
1241
|
+
};
|
|
1242
|
+
var starDotExtTestNocaseDot = (ext2) => {
|
|
1243
|
+
ext2 = ext2.toLowerCase();
|
|
1244
|
+
return (f) => f.toLowerCase().endsWith(ext2);
|
|
1245
|
+
};
|
|
1246
|
+
var starDotStarRE = /^\*+\.\*+$/;
|
|
1247
|
+
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
1248
|
+
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
1249
|
+
var dotStarRE = /^\.\*+$/;
|
|
1250
|
+
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
1251
|
+
var starRE = /^\*+$/;
|
|
1252
|
+
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
1253
|
+
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
1254
|
+
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
1255
|
+
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
1256
|
+
const noext = qmarksTestNoExt([$0]);
|
|
1257
|
+
if (!ext2)
|
|
1258
|
+
return noext;
|
|
1259
|
+
ext2 = ext2.toLowerCase();
|
|
1260
|
+
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1261
|
+
};
|
|
1262
|
+
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
1263
|
+
const noext = qmarksTestNoExtDot([$0]);
|
|
1264
|
+
if (!ext2)
|
|
1265
|
+
return noext;
|
|
1266
|
+
ext2 = ext2.toLowerCase();
|
|
1267
|
+
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1268
|
+
};
|
|
1269
|
+
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
1270
|
+
const noext = qmarksTestNoExtDot([$0]);
|
|
1271
|
+
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1272
|
+
};
|
|
1273
|
+
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
1274
|
+
const noext = qmarksTestNoExt([$0]);
|
|
1275
|
+
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1276
|
+
};
|
|
1277
|
+
var qmarksTestNoExt = ([$0]) => {
|
|
1278
|
+
const len = $0.length;
|
|
1279
|
+
return (f) => f.length === len && !f.startsWith(".");
|
|
1280
|
+
};
|
|
1281
|
+
var qmarksTestNoExtDot = ([$0]) => {
|
|
1282
|
+
const len = $0.length;
|
|
1283
|
+
return (f) => f.length === len && f !== "." && f !== "..";
|
|
1284
|
+
};
|
|
1285
|
+
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
1286
|
+
var path = {
|
|
1287
|
+
win32: { sep: "\\" },
|
|
1288
|
+
posix: { sep: "/" }
|
|
1289
|
+
};
|
|
1290
|
+
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
1291
|
+
minimatch.sep = sep;
|
|
1292
|
+
var GLOBSTAR = Symbol("globstar **");
|
|
1293
|
+
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1294
|
+
var qmark2 = "[^/]";
|
|
1295
|
+
var star2 = qmark2 + "*?";
|
|
1296
|
+
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1297
|
+
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1298
|
+
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
1299
|
+
minimatch.filter = filter;
|
|
1300
|
+
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1301
|
+
var defaults = (def) => {
|
|
1302
|
+
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1303
|
+
return minimatch;
|
|
1304
|
+
}
|
|
1305
|
+
const orig = minimatch;
|
|
1306
|
+
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
1307
|
+
return Object.assign(m, {
|
|
1308
|
+
Minimatch: class Minimatch extends orig.Minimatch {
|
|
1309
|
+
constructor(pattern, options = {}) {
|
|
1310
|
+
super(pattern, ext(def, options));
|
|
1311
|
+
}
|
|
1312
|
+
static defaults(options) {
|
|
1313
|
+
return orig.defaults(ext(def, options)).Minimatch;
|
|
1314
|
+
}
|
|
1315
|
+
},
|
|
1316
|
+
AST: class AST extends orig.AST {
|
|
1317
|
+
/* c8 ignore start */
|
|
1318
|
+
constructor(type, parent, options = {}) {
|
|
1319
|
+
super(type, parent, ext(def, options));
|
|
1320
|
+
}
|
|
1321
|
+
/* c8 ignore stop */
|
|
1322
|
+
static fromGlob(pattern, options = {}) {
|
|
1323
|
+
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
1324
|
+
}
|
|
1325
|
+
},
|
|
1326
|
+
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
1327
|
+
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
1328
|
+
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
1329
|
+
defaults: (options) => orig.defaults(ext(def, options)),
|
|
1330
|
+
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
1331
|
+
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
1332
|
+
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
1333
|
+
sep: orig.sep,
|
|
1334
|
+
GLOBSTAR
|
|
1335
|
+
});
|
|
1336
|
+
};
|
|
1337
|
+
minimatch.defaults = defaults;
|
|
1338
|
+
var braceExpand = (pattern, options = {}) => {
|
|
1339
|
+
assertValidPattern(pattern);
|
|
1340
|
+
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1341
|
+
return [pattern];
|
|
1342
|
+
}
|
|
1343
|
+
return (0, import_brace_expansion.default)(pattern);
|
|
1344
|
+
};
|
|
1345
|
+
minimatch.braceExpand = braceExpand;
|
|
1346
|
+
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
1347
|
+
minimatch.makeRe = makeRe;
|
|
1348
|
+
var match = (list, pattern, options = {}) => {
|
|
1349
|
+
const mm = new Minimatch(pattern, options);
|
|
1350
|
+
list = list.filter((f) => mm.match(f));
|
|
1351
|
+
if (mm.options.nonull && !list.length) {
|
|
1352
|
+
list.push(pattern);
|
|
1353
|
+
}
|
|
1354
|
+
return list;
|
|
1355
|
+
};
|
|
1356
|
+
minimatch.match = match;
|
|
1357
|
+
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1358
|
+
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1359
|
+
var Minimatch = class {
|
|
1360
|
+
options;
|
|
1361
|
+
set;
|
|
1362
|
+
pattern;
|
|
1363
|
+
windowsPathsNoEscape;
|
|
1364
|
+
nonegate;
|
|
1365
|
+
negate;
|
|
1366
|
+
comment;
|
|
1367
|
+
empty;
|
|
1368
|
+
preserveMultipleSlashes;
|
|
1369
|
+
partial;
|
|
1370
|
+
globSet;
|
|
1371
|
+
globParts;
|
|
1372
|
+
nocase;
|
|
1373
|
+
isWindows;
|
|
1374
|
+
platform;
|
|
1375
|
+
windowsNoMagicRoot;
|
|
1376
|
+
regexp;
|
|
1377
|
+
constructor(pattern, options = {}) {
|
|
1378
|
+
assertValidPattern(pattern);
|
|
1379
|
+
options = options || {};
|
|
1380
|
+
this.options = options;
|
|
1381
|
+
this.pattern = pattern;
|
|
1382
|
+
this.platform = options.platform || defaultPlatform;
|
|
1383
|
+
this.isWindows = this.platform === "win32";
|
|
1384
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
1385
|
+
if (this.windowsPathsNoEscape) {
|
|
1386
|
+
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1387
|
+
}
|
|
1388
|
+
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
1389
|
+
this.regexp = null;
|
|
1390
|
+
this.negate = false;
|
|
1391
|
+
this.nonegate = !!options.nonegate;
|
|
1392
|
+
this.comment = false;
|
|
1393
|
+
this.empty = false;
|
|
1394
|
+
this.partial = !!options.partial;
|
|
1395
|
+
this.nocase = !!this.options.nocase;
|
|
1396
|
+
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
1397
|
+
this.globSet = [];
|
|
1398
|
+
this.globParts = [];
|
|
1399
|
+
this.set = [];
|
|
1400
|
+
this.make();
|
|
1401
|
+
}
|
|
1402
|
+
hasMagic() {
|
|
1403
|
+
if (this.options.magicalBraces && this.set.length > 1) {
|
|
1404
|
+
return true;
|
|
1405
|
+
}
|
|
1406
|
+
for (const pattern of this.set) {
|
|
1407
|
+
for (const part of pattern) {
|
|
1408
|
+
if (typeof part !== "string")
|
|
1409
|
+
return true;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
return false;
|
|
1413
|
+
}
|
|
1414
|
+
debug(..._) {
|
|
1415
|
+
}
|
|
1416
|
+
make() {
|
|
1417
|
+
const pattern = this.pattern;
|
|
1418
|
+
const options = this.options;
|
|
1419
|
+
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1420
|
+
this.comment = true;
|
|
1421
|
+
return;
|
|
1422
|
+
}
|
|
1423
|
+
if (!pattern) {
|
|
1424
|
+
this.empty = true;
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1427
|
+
this.parseNegate();
|
|
1428
|
+
this.globSet = [...new Set(this.braceExpand())];
|
|
1429
|
+
if (options.debug) {
|
|
1430
|
+
this.debug = (...args) => console.error(...args);
|
|
1431
|
+
}
|
|
1432
|
+
this.debug(this.pattern, this.globSet);
|
|
1433
|
+
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
1434
|
+
this.globParts = this.preprocess(rawGlobParts);
|
|
1435
|
+
this.debug(this.pattern, this.globParts);
|
|
1436
|
+
let set = this.globParts.map((s, _, __) => {
|
|
1437
|
+
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
1438
|
+
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
1439
|
+
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
1440
|
+
if (isUNC) {
|
|
1441
|
+
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
1442
|
+
} else if (isDrive) {
|
|
1443
|
+
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
return s.map((ss) => this.parse(ss));
|
|
1447
|
+
});
|
|
1448
|
+
this.debug(this.pattern, set);
|
|
1449
|
+
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
1450
|
+
if (this.isWindows) {
|
|
1451
|
+
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
1452
|
+
const p = this.set[i2];
|
|
1453
|
+
if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
1454
|
+
p[2] = "?";
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
this.debug(this.pattern, this.set);
|
|
1459
|
+
}
|
|
1460
|
+
// various transforms to equivalent pattern sets that are
|
|
1461
|
+
// faster to process in a filesystem walk. The goal is to
|
|
1462
|
+
// eliminate what we can, and push all ** patterns as far
|
|
1463
|
+
// to the right as possible, even if it increases the number
|
|
1464
|
+
// of patterns that we have to process.
|
|
1465
|
+
preprocess(globParts) {
|
|
1466
|
+
if (this.options.noglobstar) {
|
|
1467
|
+
for (let i2 = 0; i2 < globParts.length; i2++) {
|
|
1468
|
+
for (let j = 0; j < globParts[i2].length; j++) {
|
|
1469
|
+
if (globParts[i2][j] === "**") {
|
|
1470
|
+
globParts[i2][j] = "*";
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
const { optimizationLevel = 1 } = this.options;
|
|
1476
|
+
if (optimizationLevel >= 2) {
|
|
1477
|
+
globParts = this.firstPhasePreProcess(globParts);
|
|
1478
|
+
globParts = this.secondPhasePreProcess(globParts);
|
|
1479
|
+
} else if (optimizationLevel >= 1) {
|
|
1480
|
+
globParts = this.levelOneOptimize(globParts);
|
|
1481
|
+
} else {
|
|
1482
|
+
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
1483
|
+
}
|
|
1484
|
+
return globParts;
|
|
1485
|
+
}
|
|
1486
|
+
// just get rid of adjascent ** portions
|
|
1487
|
+
adjascentGlobstarOptimize(globParts) {
|
|
1488
|
+
return globParts.map((parts) => {
|
|
1489
|
+
let gs = -1;
|
|
1490
|
+
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1491
|
+
let i2 = gs;
|
|
1492
|
+
while (parts[i2 + 1] === "**") {
|
|
1493
|
+
i2++;
|
|
1494
|
+
}
|
|
1495
|
+
if (i2 !== gs) {
|
|
1496
|
+
parts.splice(gs, i2 - gs);
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
return parts;
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
// get rid of adjascent ** and resolve .. portions
|
|
1503
|
+
levelOneOptimize(globParts) {
|
|
1504
|
+
return globParts.map((parts) => {
|
|
1505
|
+
parts = parts.reduce((set, part) => {
|
|
1506
|
+
const prev = set[set.length - 1];
|
|
1507
|
+
if (part === "**" && prev === "**") {
|
|
1508
|
+
return set;
|
|
1509
|
+
}
|
|
1510
|
+
if (part === "..") {
|
|
1511
|
+
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
1512
|
+
set.pop();
|
|
1513
|
+
return set;
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
set.push(part);
|
|
1517
|
+
return set;
|
|
1518
|
+
}, []);
|
|
1519
|
+
return parts.length === 0 ? [""] : parts;
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
levelTwoFileOptimize(parts) {
|
|
1523
|
+
if (!Array.isArray(parts)) {
|
|
1524
|
+
parts = this.slashSplit(parts);
|
|
1525
|
+
}
|
|
1526
|
+
let didSomething = false;
|
|
1527
|
+
do {
|
|
1528
|
+
didSomething = false;
|
|
1529
|
+
if (!this.preserveMultipleSlashes) {
|
|
1530
|
+
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1531
|
+
const p = parts[i2];
|
|
1532
|
+
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1533
|
+
continue;
|
|
1534
|
+
if (p === "." || p === "") {
|
|
1535
|
+
didSomething = true;
|
|
1536
|
+
parts.splice(i2, 1);
|
|
1537
|
+
i2--;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1541
|
+
didSomething = true;
|
|
1542
|
+
parts.pop();
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
let dd = 0;
|
|
1546
|
+
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1547
|
+
const p = parts[dd - 1];
|
|
1548
|
+
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1549
|
+
didSomething = true;
|
|
1550
|
+
parts.splice(dd - 1, 2);
|
|
1551
|
+
dd -= 2;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
} while (didSomething);
|
|
1555
|
+
return parts.length === 0 ? [""] : parts;
|
|
1556
|
+
}
|
|
1557
|
+
// First phase: single-pattern processing
|
|
1558
|
+
// <pre> is 1 or more portions
|
|
1559
|
+
// <rest> is 1 or more portions
|
|
1560
|
+
// <p> is any portion other than ., .., '', or **
|
|
1561
|
+
// <e> is . or ''
|
|
1562
|
+
//
|
|
1563
|
+
// **/.. is *brutal* for filesystem walking performance, because
|
|
1564
|
+
// it effectively resets the recursive walk each time it occurs,
|
|
1565
|
+
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
1566
|
+
// or most strings (other than .., ., and '') can be.
|
|
1567
|
+
//
|
|
1568
|
+
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
1569
|
+
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
1570
|
+
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
1571
|
+
// **/**/<rest> -> **/<rest>
|
|
1572
|
+
//
|
|
1573
|
+
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
1574
|
+
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
1575
|
+
firstPhasePreProcess(globParts) {
|
|
1576
|
+
let didSomething = false;
|
|
1577
|
+
do {
|
|
1578
|
+
didSomething = false;
|
|
1579
|
+
for (let parts of globParts) {
|
|
1580
|
+
let gs = -1;
|
|
1581
|
+
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1582
|
+
let gss = gs;
|
|
1583
|
+
while (parts[gss + 1] === "**") {
|
|
1584
|
+
gss++;
|
|
1585
|
+
}
|
|
1586
|
+
if (gss > gs) {
|
|
1587
|
+
parts.splice(gs + 1, gss - gs);
|
|
1588
|
+
}
|
|
1589
|
+
let next = parts[gs + 1];
|
|
1590
|
+
const p = parts[gs + 2];
|
|
1591
|
+
const p2 = parts[gs + 3];
|
|
1592
|
+
if (next !== "..")
|
|
1593
|
+
continue;
|
|
1594
|
+
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
1595
|
+
continue;
|
|
1596
|
+
}
|
|
1597
|
+
didSomething = true;
|
|
1598
|
+
parts.splice(gs, 1);
|
|
1599
|
+
const other = parts.slice(0);
|
|
1600
|
+
other[gs] = "**";
|
|
1601
|
+
globParts.push(other);
|
|
1602
|
+
gs--;
|
|
1603
|
+
}
|
|
1604
|
+
if (!this.preserveMultipleSlashes) {
|
|
1605
|
+
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1606
|
+
const p = parts[i2];
|
|
1607
|
+
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1608
|
+
continue;
|
|
1609
|
+
if (p === "." || p === "") {
|
|
1610
|
+
didSomething = true;
|
|
1611
|
+
parts.splice(i2, 1);
|
|
1612
|
+
i2--;
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1616
|
+
didSomething = true;
|
|
1617
|
+
parts.pop();
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
let dd = 0;
|
|
1621
|
+
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1622
|
+
const p = parts[dd - 1];
|
|
1623
|
+
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1624
|
+
didSomething = true;
|
|
1625
|
+
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
1626
|
+
const splin = needDot ? ["."] : [];
|
|
1627
|
+
parts.splice(dd - 1, 2, ...splin);
|
|
1628
|
+
if (parts.length === 0)
|
|
1629
|
+
parts.push("");
|
|
1630
|
+
dd -= 2;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
} while (didSomething);
|
|
1635
|
+
return globParts;
|
|
1636
|
+
}
|
|
1637
|
+
// second phase: multi-pattern dedupes
|
|
1638
|
+
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
1639
|
+
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
1640
|
+
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
1641
|
+
//
|
|
1642
|
+
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
1643
|
+
// ^-- not valid because ** doens't follow symlinks
|
|
1644
|
+
secondPhasePreProcess(globParts) {
|
|
1645
|
+
for (let i2 = 0; i2 < globParts.length - 1; i2++) {
|
|
1646
|
+
for (let j = i2 + 1; j < globParts.length; j++) {
|
|
1647
|
+
const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
|
|
1648
|
+
if (!matched)
|
|
1649
|
+
continue;
|
|
1650
|
+
globParts[i2] = matched;
|
|
1651
|
+
globParts[j] = [];
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
return globParts.filter((gs) => gs.length);
|
|
1655
|
+
}
|
|
1656
|
+
partsMatch(a, b, emptyGSMatch = false) {
|
|
1657
|
+
let ai = 0;
|
|
1658
|
+
let bi = 0;
|
|
1659
|
+
let result = [];
|
|
1660
|
+
let which = "";
|
|
1661
|
+
while (ai < a.length && bi < b.length) {
|
|
1662
|
+
if (a[ai] === b[bi]) {
|
|
1663
|
+
result.push(which === "b" ? b[bi] : a[ai]);
|
|
1664
|
+
ai++;
|
|
1665
|
+
bi++;
|
|
1666
|
+
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
1667
|
+
result.push(a[ai]);
|
|
1668
|
+
ai++;
|
|
1669
|
+
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
1670
|
+
result.push(b[bi]);
|
|
1671
|
+
bi++;
|
|
1672
|
+
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
1673
|
+
if (which === "b")
|
|
1674
|
+
return false;
|
|
1675
|
+
which = "a";
|
|
1676
|
+
result.push(a[ai]);
|
|
1677
|
+
ai++;
|
|
1678
|
+
bi++;
|
|
1679
|
+
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
1680
|
+
if (which === "a")
|
|
1681
|
+
return false;
|
|
1682
|
+
which = "b";
|
|
1683
|
+
result.push(b[bi]);
|
|
1684
|
+
ai++;
|
|
1685
|
+
bi++;
|
|
1686
|
+
} else {
|
|
1687
|
+
return false;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
return a.length === b.length && result;
|
|
1691
|
+
}
|
|
1692
|
+
parseNegate() {
|
|
1693
|
+
if (this.nonegate)
|
|
1694
|
+
return;
|
|
1695
|
+
const pattern = this.pattern;
|
|
1696
|
+
let negate = false;
|
|
1697
|
+
let negateOffset = 0;
|
|
1698
|
+
for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
|
|
1699
|
+
negate = !negate;
|
|
1700
|
+
negateOffset++;
|
|
1701
|
+
}
|
|
1702
|
+
if (negateOffset)
|
|
1703
|
+
this.pattern = pattern.slice(negateOffset);
|
|
1704
|
+
this.negate = negate;
|
|
1705
|
+
}
|
|
1706
|
+
// set partial to true to test if, for example,
|
|
1707
|
+
// "/a/b" matches the start of "/*/b/*/d"
|
|
1708
|
+
// Partial means, if you run out of file before you run
|
|
1709
|
+
// out of pattern, then that's fine, as long as all
|
|
1710
|
+
// the parts match.
|
|
1711
|
+
matchOne(file, pattern, partial = false) {
|
|
1712
|
+
const options = this.options;
|
|
1713
|
+
if (this.isWindows) {
|
|
1714
|
+
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
1715
|
+
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
1716
|
+
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
1717
|
+
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
1718
|
+
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
1719
|
+
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
1720
|
+
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
1721
|
+
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
1722
|
+
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
1723
|
+
pattern[pdi] = fd;
|
|
1724
|
+
if (pdi > fdi) {
|
|
1725
|
+
pattern = pattern.slice(pdi);
|
|
1726
|
+
} else if (fdi > pdi) {
|
|
1727
|
+
file = file.slice(fdi);
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
const { optimizationLevel = 1 } = this.options;
|
|
1733
|
+
if (optimizationLevel >= 2) {
|
|
1734
|
+
file = this.levelTwoFileOptimize(file);
|
|
1735
|
+
}
|
|
1736
|
+
this.debug("matchOne", this, { file, pattern });
|
|
1737
|
+
this.debug("matchOne", file.length, pattern.length);
|
|
1738
|
+
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
1739
|
+
this.debug("matchOne loop");
|
|
1740
|
+
var p = pattern[pi];
|
|
1741
|
+
var f = file[fi];
|
|
1742
|
+
this.debug(pattern, p, f);
|
|
1743
|
+
if (p === false) {
|
|
1744
|
+
return false;
|
|
1745
|
+
}
|
|
1746
|
+
if (p === GLOBSTAR) {
|
|
1747
|
+
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
1748
|
+
var fr = fi;
|
|
1749
|
+
var pr = pi + 1;
|
|
1750
|
+
if (pr === pl) {
|
|
1751
|
+
this.debug("** at the end");
|
|
1752
|
+
for (; fi < fl; fi++) {
|
|
1753
|
+
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
1754
|
+
return false;
|
|
1755
|
+
}
|
|
1756
|
+
return true;
|
|
1757
|
+
}
|
|
1758
|
+
while (fr < fl) {
|
|
1759
|
+
var swallowee = file[fr];
|
|
1760
|
+
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
1761
|
+
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
1762
|
+
this.debug("globstar found match!", fr, fl, swallowee);
|
|
1763
|
+
return true;
|
|
1764
|
+
} else {
|
|
1765
|
+
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
1766
|
+
this.debug("dot detected!", file, fr, pattern, pr);
|
|
1767
|
+
break;
|
|
1768
|
+
}
|
|
1769
|
+
this.debug("globstar swallow a segment, and continue");
|
|
1770
|
+
fr++;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
if (partial) {
|
|
1774
|
+
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
1775
|
+
if (fr === fl) {
|
|
1776
|
+
return true;
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
return false;
|
|
1780
|
+
}
|
|
1781
|
+
let hit;
|
|
1782
|
+
if (typeof p === "string") {
|
|
1783
|
+
hit = f === p;
|
|
1784
|
+
this.debug("string match", p, f, hit);
|
|
1785
|
+
} else {
|
|
1786
|
+
hit = p.test(f);
|
|
1787
|
+
this.debug("pattern match", p, f, hit);
|
|
1788
|
+
}
|
|
1789
|
+
if (!hit)
|
|
1790
|
+
return false;
|
|
1791
|
+
}
|
|
1792
|
+
if (fi === fl && pi === pl) {
|
|
1793
|
+
return true;
|
|
1794
|
+
} else if (fi === fl) {
|
|
1795
|
+
return partial;
|
|
1796
|
+
} else if (pi === pl) {
|
|
1797
|
+
return fi === fl - 1 && file[fi] === "";
|
|
1798
|
+
} else {
|
|
1799
|
+
throw new Error("wtf?");
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
braceExpand() {
|
|
1803
|
+
return braceExpand(this.pattern, this.options);
|
|
1804
|
+
}
|
|
1805
|
+
parse(pattern) {
|
|
1806
|
+
assertValidPattern(pattern);
|
|
1807
|
+
const options = this.options;
|
|
1808
|
+
if (pattern === "**")
|
|
1809
|
+
return GLOBSTAR;
|
|
1810
|
+
if (pattern === "")
|
|
1811
|
+
return "";
|
|
1812
|
+
let m;
|
|
1813
|
+
let fastTest = null;
|
|
1814
|
+
if (m = pattern.match(starRE)) {
|
|
1815
|
+
fastTest = options.dot ? starTestDot : starTest;
|
|
1816
|
+
} else if (m = pattern.match(starDotExtRE)) {
|
|
1817
|
+
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
1818
|
+
} else if (m = pattern.match(qmarksRE)) {
|
|
1819
|
+
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
1820
|
+
} else if (m = pattern.match(starDotStarRE)) {
|
|
1821
|
+
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
1822
|
+
} else if (m = pattern.match(dotStarRE)) {
|
|
1823
|
+
fastTest = dotStarTest;
|
|
1824
|
+
}
|
|
1825
|
+
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
1826
|
+
if (fastTest && typeof re === "object") {
|
|
1827
|
+
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
1828
|
+
}
|
|
1829
|
+
return re;
|
|
1830
|
+
}
|
|
1831
|
+
makeRe() {
|
|
1832
|
+
if (this.regexp || this.regexp === false)
|
|
1833
|
+
return this.regexp;
|
|
1834
|
+
const set = this.set;
|
|
1835
|
+
if (!set.length) {
|
|
1836
|
+
this.regexp = false;
|
|
1837
|
+
return this.regexp;
|
|
1838
|
+
}
|
|
1839
|
+
const options = this.options;
|
|
1840
|
+
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
1841
|
+
const flags = new Set(options.nocase ? ["i"] : []);
|
|
1842
|
+
let re = set.map((pattern) => {
|
|
1843
|
+
const pp = pattern.map((p) => {
|
|
1844
|
+
if (p instanceof RegExp) {
|
|
1845
|
+
for (const f of p.flags.split(""))
|
|
1846
|
+
flags.add(f);
|
|
1847
|
+
}
|
|
1848
|
+
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
1849
|
+
});
|
|
1850
|
+
pp.forEach((p, i2) => {
|
|
1851
|
+
const next = pp[i2 + 1];
|
|
1852
|
+
const prev = pp[i2 - 1];
|
|
1853
|
+
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
1854
|
+
return;
|
|
1855
|
+
}
|
|
1856
|
+
if (prev === void 0) {
|
|
1857
|
+
if (next !== void 0 && next !== GLOBSTAR) {
|
|
1858
|
+
pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1859
|
+
} else {
|
|
1860
|
+
pp[i2] = twoStar;
|
|
1861
|
+
}
|
|
1862
|
+
} else if (next === void 0) {
|
|
1863
|
+
pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
1864
|
+
} else if (next !== GLOBSTAR) {
|
|
1865
|
+
pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1866
|
+
pp[i2 + 1] = GLOBSTAR;
|
|
1867
|
+
}
|
|
1868
|
+
});
|
|
1869
|
+
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
1870
|
+
}).join("|");
|
|
1871
|
+
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1872
|
+
re = "^" + open + re + close + "$";
|
|
1873
|
+
if (this.negate)
|
|
1874
|
+
re = "^(?!" + re + ").+$";
|
|
1875
|
+
try {
|
|
1876
|
+
this.regexp = new RegExp(re, [...flags].join(""));
|
|
1877
|
+
} catch (ex) {
|
|
1878
|
+
this.regexp = false;
|
|
1879
|
+
}
|
|
1880
|
+
return this.regexp;
|
|
1881
|
+
}
|
|
1882
|
+
slashSplit(p) {
|
|
1883
|
+
if (this.preserveMultipleSlashes) {
|
|
1884
|
+
return p.split("/");
|
|
1885
|
+
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
1886
|
+
return ["", ...p.split(/\/+/)];
|
|
1887
|
+
} else {
|
|
1888
|
+
return p.split(/\/+/);
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
match(f, partial = this.partial) {
|
|
1892
|
+
this.debug("match", f, this.pattern);
|
|
1893
|
+
if (this.comment) {
|
|
1894
|
+
return false;
|
|
1895
|
+
}
|
|
1896
|
+
if (this.empty) {
|
|
1897
|
+
return f === "";
|
|
1898
|
+
}
|
|
1899
|
+
if (f === "/" && partial) {
|
|
1900
|
+
return true;
|
|
1901
|
+
}
|
|
1902
|
+
const options = this.options;
|
|
1903
|
+
if (this.isWindows) {
|
|
1904
|
+
f = f.split("\\").join("/");
|
|
1905
|
+
}
|
|
1906
|
+
const ff = this.slashSplit(f);
|
|
1907
|
+
this.debug(this.pattern, "split", ff);
|
|
1908
|
+
const set = this.set;
|
|
1909
|
+
this.debug(this.pattern, "set", set);
|
|
1910
|
+
let filename = ff[ff.length - 1];
|
|
1911
|
+
if (!filename) {
|
|
1912
|
+
for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
|
|
1913
|
+
filename = ff[i2];
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
for (let i2 = 0; i2 < set.length; i2++) {
|
|
1917
|
+
const pattern = set[i2];
|
|
1918
|
+
let file = ff;
|
|
1919
|
+
if (options.matchBase && pattern.length === 1) {
|
|
1920
|
+
file = [filename];
|
|
1921
|
+
}
|
|
1922
|
+
const hit = this.matchOne(file, pattern, partial);
|
|
1923
|
+
if (hit) {
|
|
1924
|
+
if (options.flipNegate) {
|
|
1925
|
+
return true;
|
|
1926
|
+
}
|
|
1927
|
+
return !this.negate;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
if (options.flipNegate) {
|
|
1931
|
+
return false;
|
|
1932
|
+
}
|
|
1933
|
+
return this.negate;
|
|
1934
|
+
}
|
|
1935
|
+
static defaults(def) {
|
|
1936
|
+
return minimatch.defaults(def).Minimatch;
|
|
1937
|
+
}
|
|
1938
|
+
};
|
|
1939
|
+
minimatch.AST = AST;
|
|
1940
|
+
minimatch.Minimatch = Minimatch;
|
|
1941
|
+
minimatch.escape = escape;
|
|
1942
|
+
minimatch.unescape = unescape;
|
|
1943
|
+
|
|
298
1944
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
299
1945
|
function queryNonceMetaTagContent(doc) {
|
|
300
1946
|
var _a, _b, _c;
|
|
@@ -457,12 +2103,32 @@ function deserializeProperty(value) {
|
|
|
457
2103
|
}
|
|
458
2104
|
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
459
2105
|
}
|
|
2106
|
+
|
|
2107
|
+
// src/utils/style.ts
|
|
2108
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
2109
|
+
if (!supportsConstructableStylesheets) return void 0;
|
|
2110
|
+
const sheet = new CSSStyleSheet();
|
|
2111
|
+
sheet.replaceSync(styles2);
|
|
2112
|
+
return sheet;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
// src/utils/shadow-root.ts
|
|
2116
|
+
var globalStyleSheet;
|
|
460
2117
|
function createShadowRoot(cmpMeta) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
2118
|
+
var _a;
|
|
2119
|
+
const opts = { mode: "open" };
|
|
2120
|
+
const shadowRoot = this.attachShadow(opts);
|
|
2121
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
|
|
2122
|
+
if (globalStyleSheet) {
|
|
2123
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
2124
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
2125
|
+
} else {
|
|
2126
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
2127
|
+
}
|
|
2128
|
+
} else if (!supportsConstructableStylesheets) {
|
|
2129
|
+
const styleElm = document.createElement("style");
|
|
2130
|
+
styleElm.innerHTML = globalStyles;
|
|
2131
|
+
shadowRoot.prepend(styleElm);
|
|
466
2132
|
}
|
|
467
2133
|
}
|
|
468
2134
|
var updateFallbackSlotVisibility = (elm) => {
|
|
@@ -502,8 +2168,9 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
502
2168
|
let childNode;
|
|
503
2169
|
for (; i2 < childNodes.length; i2++) {
|
|
504
2170
|
childNode = childNodes[i2];
|
|
505
|
-
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
2171
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
506
2172
|
slottedNodes.push(childNode);
|
|
2173
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
507
2174
|
}
|
|
508
2175
|
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
509
2176
|
}
|
|
@@ -580,40 +2247,189 @@ function patchSlotNode(node) {
|
|
|
580
2247
|
if (slotName === getSlotName(n)) {
|
|
581
2248
|
toReturn.push(n);
|
|
582
2249
|
}
|
|
583
|
-
});
|
|
584
|
-
if (elementsOnly) {
|
|
585
|
-
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
2250
|
+
});
|
|
2251
|
+
if (elementsOnly) {
|
|
2252
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
2253
|
+
}
|
|
2254
|
+
return toReturn;
|
|
2255
|
+
}).bind(node);
|
|
2256
|
+
node.assignedElements = assignedFactory(true);
|
|
2257
|
+
node.assignedNodes = assignedFactory(false);
|
|
2258
|
+
}
|
|
2259
|
+
function dispatchSlotChangeEvent(elm) {
|
|
2260
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
2261
|
+
}
|
|
2262
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
2263
|
+
var _a;
|
|
2264
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
2265
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
2266
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
2267
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
2268
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
2269
|
+
return { slotNode, slotName };
|
|
2270
|
+
}
|
|
2271
|
+
function internalCall(node, method) {
|
|
2272
|
+
if ("__" + method in node) {
|
|
2273
|
+
const toReturn = node["__" + method];
|
|
2274
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
2275
|
+
return toReturn.bind(node);
|
|
2276
|
+
} else {
|
|
2277
|
+
if (typeof node[method] !== "function") return node[method];
|
|
2278
|
+
return node[method].bind(node);
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
var createTime = (fnName, tagName = "") => {
|
|
2282
|
+
{
|
|
2283
|
+
return () => {
|
|
2284
|
+
return;
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
2287
|
+
};
|
|
2288
|
+
var uniqueTime = (key, measureText) => {
|
|
2289
|
+
{
|
|
2290
|
+
return () => {
|
|
2291
|
+
return;
|
|
2292
|
+
};
|
|
2293
|
+
}
|
|
2294
|
+
};
|
|
2295
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2296
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2297
|
+
let style = styles.get(scopeId2);
|
|
2298
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
2299
|
+
style = style || new CSSStyleSheet();
|
|
2300
|
+
if (typeof style === "string") {
|
|
2301
|
+
style = cssText;
|
|
2302
|
+
} else {
|
|
2303
|
+
style.replaceSync(cssText);
|
|
2304
|
+
}
|
|
2305
|
+
} else {
|
|
2306
|
+
style = cssText;
|
|
2307
|
+
}
|
|
2308
|
+
styles.set(scopeId2, style);
|
|
2309
|
+
};
|
|
2310
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
2311
|
+
var _a, _b, _c;
|
|
2312
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
2313
|
+
const style = styles.get(scopeId2);
|
|
2314
|
+
if (!win.document) {
|
|
2315
|
+
return scopeId2;
|
|
2316
|
+
}
|
|
2317
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
2318
|
+
if (style) {
|
|
2319
|
+
if (typeof style === "string") {
|
|
2320
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
2321
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
2322
|
+
let styleElm;
|
|
2323
|
+
if (!appliedStyles) {
|
|
2324
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
2325
|
+
}
|
|
2326
|
+
const existingStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
2327
|
+
if (existingStyleElm) {
|
|
2328
|
+
existingStyleElm.innerHTML = style;
|
|
2329
|
+
} else if (!appliedStyles.has(scopeId2)) {
|
|
2330
|
+
styleElm = win.document.createElement("style");
|
|
2331
|
+
styleElm.innerHTML = style;
|
|
2332
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2333
|
+
if (nonce != null) {
|
|
2334
|
+
styleElm.setAttribute("nonce", nonce);
|
|
2335
|
+
}
|
|
2336
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
2337
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
2338
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
2339
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
2340
|
+
styleContainerNode.insertBefore(
|
|
2341
|
+
styleElm,
|
|
2342
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
2343
|
+
);
|
|
2344
|
+
} else if ("host" in styleContainerNode) {
|
|
2345
|
+
if (supportsConstructableStylesheets) {
|
|
2346
|
+
const currentWindow = (_b = styleContainerNode.defaultView) != null ? _b : styleContainerNode.ownerDocument.defaultView;
|
|
2347
|
+
const stylesheet = new currentWindow.CSSStyleSheet();
|
|
2348
|
+
stylesheet.replaceSync(style);
|
|
2349
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
2350
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
2351
|
+
} else {
|
|
2352
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
2353
|
+
}
|
|
2354
|
+
} else {
|
|
2355
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
2356
|
+
if (existingStyleContainer) {
|
|
2357
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
2358
|
+
} else {
|
|
2359
|
+
styleContainerNode.prepend(styleElm);
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
} else {
|
|
2363
|
+
styleContainerNode.append(styleElm);
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2367
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
2368
|
+
}
|
|
2369
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2370
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
2371
|
+
}
|
|
2372
|
+
if (appliedStyles) {
|
|
2373
|
+
appliedStyles.add(scopeId2);
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
} else {
|
|
2377
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
2378
|
+
if (!appliedStyles) {
|
|
2379
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
2380
|
+
}
|
|
2381
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
2382
|
+
const currentWindow = (_c = styleContainerNode.defaultView) != null ? _c : styleContainerNode.ownerDocument.defaultView;
|
|
2383
|
+
let stylesheet;
|
|
2384
|
+
if (style.constructor === currentWindow.CSSStyleSheet) {
|
|
2385
|
+
stylesheet = style;
|
|
2386
|
+
} else {
|
|
2387
|
+
stylesheet = new currentWindow.CSSStyleSheet();
|
|
2388
|
+
for (let i2 = 0; i2 < style.cssRules.length; i2++) {
|
|
2389
|
+
stylesheet.insertRule(style.cssRules[i2].cssText, i2);
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
2393
|
+
styleContainerNode.adoptedStyleSheets.push(stylesheet);
|
|
2394
|
+
} else {
|
|
2395
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
|
|
2396
|
+
}
|
|
2397
|
+
appliedStyles.add(scopeId2);
|
|
2398
|
+
}
|
|
586
2399
|
}
|
|
587
|
-
return toReturn;
|
|
588
|
-
}).bind(node);
|
|
589
|
-
node.assignedElements = assignedFactory(true);
|
|
590
|
-
node.assignedNodes = assignedFactory(false);
|
|
591
|
-
}
|
|
592
|
-
function internalCall(node, method) {
|
|
593
|
-
if ("__" + method in node) {
|
|
594
|
-
const toReturn = node["__" + method];
|
|
595
|
-
if (typeof toReturn !== "function") return toReturn;
|
|
596
|
-
return toReturn.bind(node);
|
|
597
|
-
} else {
|
|
598
|
-
if (typeof node[method] !== "function") return node[method];
|
|
599
|
-
return node[method].bind(node);
|
|
600
2400
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
2401
|
+
return scopeId2;
|
|
2402
|
+
};
|
|
2403
|
+
var attachStyles = (hostRef) => {
|
|
2404
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
2405
|
+
const elm = hostRef.$hostElement$;
|
|
2406
|
+
const flags = cmpMeta.$flags$;
|
|
2407
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
2408
|
+
const scopeId2 = addStyle(
|
|
2409
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
2410
|
+
cmpMeta);
|
|
2411
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
2412
|
+
elm["s-sc"] = scopeId2;
|
|
2413
|
+
elm.classList.add(scopeId2 + "-h");
|
|
607
2414
|
}
|
|
2415
|
+
endAttachStyles();
|
|
608
2416
|
};
|
|
609
|
-
var
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
2417
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
2418
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
2419
|
+
var hydrateScopedToShadow = () => {
|
|
2420
|
+
if (!win.document) {
|
|
2421
|
+
return;
|
|
2422
|
+
}
|
|
2423
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2424
|
+
let i2 = 0;
|
|
2425
|
+
for (; i2 < styles2.length; i2++) {
|
|
2426
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
614
2427
|
}
|
|
615
2428
|
};
|
|
616
2429
|
var h = (nodeName, vnodeData, ...children) => {
|
|
2430
|
+
if (typeof nodeName === "string") {
|
|
2431
|
+
nodeName = transformTag(nodeName);
|
|
2432
|
+
}
|
|
617
2433
|
let child = null;
|
|
618
2434
|
let key = null;
|
|
619
2435
|
let slotName = null;
|
|
@@ -727,7 +2543,7 @@ var convertToPrivate = (node) => {
|
|
|
727
2543
|
|
|
728
2544
|
// src/runtime/client-hydrate.ts
|
|
729
2545
|
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
730
|
-
var _a;
|
|
2546
|
+
var _a, _b, _c, _d;
|
|
731
2547
|
const endHydrate = createTime("hydrateClient", tagName);
|
|
732
2548
|
const shadowRoot = hostElm.shadowRoot;
|
|
733
2549
|
const childRenderNodes = [];
|
|
@@ -736,23 +2552,6 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
736
2552
|
const shadowRootNodes = shadowRoot ? [] : null;
|
|
737
2553
|
const vnode = newVNode(tagName, null);
|
|
738
2554
|
vnode.$elm$ = hostElm;
|
|
739
|
-
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
740
|
-
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
741
|
-
var _a2, _b;
|
|
742
|
-
if (!(memberFlags & 31 /* Prop */)) {
|
|
743
|
-
return;
|
|
744
|
-
}
|
|
745
|
-
const attributeName = metaAttributeName || memberName;
|
|
746
|
-
const attrVal = hostElm.getAttribute(attributeName);
|
|
747
|
-
if (attrVal !== null) {
|
|
748
|
-
const attrPropVal = parsePropertyValue(
|
|
749
|
-
attrVal,
|
|
750
|
-
memberFlags,
|
|
751
|
-
!!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
|
|
752
|
-
);
|
|
753
|
-
(_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
2555
|
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
757
2556
|
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
758
2557
|
}
|
|
@@ -777,10 +2576,20 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
777
2576
|
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
778
2577
|
const node = childRenderNode.$elm$;
|
|
779
2578
|
if (!shadowRoot) {
|
|
780
|
-
node["s-hn"] = tagName.toUpperCase();
|
|
2579
|
+
node["s-hn"] = transformTag(tagName).toUpperCase();
|
|
781
2580
|
if (childRenderNode.$tag$ === "slot") {
|
|
782
2581
|
node["s-cr"] = hostElm["s-cr"];
|
|
783
2582
|
}
|
|
2583
|
+
} else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
|
|
2584
|
+
const cmpMeta = getHostRef(childRenderNode.$elm$);
|
|
2585
|
+
if (cmpMeta) {
|
|
2586
|
+
const scopeId3 = getScopeId(
|
|
2587
|
+
cmpMeta.$cmpMeta$);
|
|
2588
|
+
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
2589
|
+
if (styleSheet) {
|
|
2590
|
+
hostElm.shadowRoot.append(styleSheet.cloneNode(true));
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
784
2593
|
}
|
|
785
2594
|
if (childRenderNode.$tag$ === "slot") {
|
|
786
2595
|
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
@@ -796,7 +2605,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
796
2605
|
}
|
|
797
2606
|
}
|
|
798
2607
|
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
799
|
-
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
2608
|
+
if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
|
|
800
2609
|
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
801
2610
|
}
|
|
802
2611
|
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
@@ -804,7 +2613,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
804
2613
|
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
805
2614
|
}
|
|
806
2615
|
}
|
|
807
|
-
|
|
2616
|
+
if (orgLocationNode && !orgLocationNode["s-id"]) {
|
|
2617
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
2618
|
+
}
|
|
808
2619
|
}
|
|
809
2620
|
const hosts = [];
|
|
810
2621
|
const snLen = slottedNodes.length;
|
|
@@ -813,6 +2624,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
813
2624
|
let snGroupIdx;
|
|
814
2625
|
let snGroupLen;
|
|
815
2626
|
let slottedItem;
|
|
2627
|
+
let currentPos = 0;
|
|
816
2628
|
for (snIndex; snIndex < snLen; snIndex++) {
|
|
817
2629
|
slotGroup = slottedNodes[snIndex];
|
|
818
2630
|
if (!slotGroup || !slotGroup.length) continue;
|
|
@@ -825,39 +2637,47 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
825
2637
|
}
|
|
826
2638
|
if (!hosts[slottedItem.hostId]) continue;
|
|
827
2639
|
const hostEle = hosts[slottedItem.hostId];
|
|
2640
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
2641
|
+
hostEle.insertBefore(slottedItem.node, (_c = (_b = slotGroup[snGroupIdx - 1]) == null ? void 0 : _b.node) == null ? void 0 : _c.nextSibling);
|
|
2642
|
+
}
|
|
828
2643
|
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
829
|
-
slottedItem.slot["s-cr"]
|
|
830
|
-
|
|
831
|
-
slottedItem.slot["s-cr"]
|
|
832
|
-
|
|
833
|
-
|
|
2644
|
+
if (!slottedItem.slot["s-cr"]) {
|
|
2645
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
2646
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
2647
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
2648
|
+
} else {
|
|
2649
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"] || currentPos);
|
|
2653
|
+
if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
|
|
2654
|
+
slottedItem.node.removeAttribute("slot");
|
|
834
2655
|
}
|
|
835
|
-
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
836
|
-
}
|
|
837
|
-
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
838
|
-
hostEle.appendChild(slottedItem.node);
|
|
839
2656
|
}
|
|
2657
|
+
currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
|
|
840
2658
|
}
|
|
841
2659
|
}
|
|
842
|
-
if (shadowRoot
|
|
2660
|
+
if (shadowRoot) {
|
|
843
2661
|
let rnIdex = 0;
|
|
844
2662
|
const rnLen = shadowRootNodes.length;
|
|
845
2663
|
if (rnLen) {
|
|
846
2664
|
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
847
|
-
|
|
2665
|
+
const node = shadowRootNodes[rnIdex];
|
|
2666
|
+
if (node) {
|
|
2667
|
+
shadowRoot.appendChild(node);
|
|
2668
|
+
}
|
|
848
2669
|
}
|
|
849
2670
|
Array.from(hostElm.childNodes).forEach((node) => {
|
|
850
2671
|
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
851
2672
|
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
852
2673
|
node.removeAttribute("hidden");
|
|
853
|
-
} else if (node.nodeType === 8 /* CommentNode */
|
|
2674
|
+
} else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
|
|
854
2675
|
node.parentNode.removeChild(node);
|
|
855
2676
|
}
|
|
856
2677
|
}
|
|
857
2678
|
});
|
|
858
2679
|
}
|
|
859
2680
|
}
|
|
860
|
-
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
861
2681
|
hostRef.$hostElement$ = hostElm;
|
|
862
2682
|
endHydrate();
|
|
863
2683
|
};
|
|
@@ -1010,10 +2830,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
1010
2830
|
vnode.$elm$ = node;
|
|
1011
2831
|
vnode.$index$ = "0";
|
|
1012
2832
|
parentVNode.$children$ = [vnode];
|
|
1013
|
-
} else {
|
|
1014
|
-
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1015
|
-
node.remove();
|
|
1016
|
-
}
|
|
1017
2833
|
}
|
|
1018
2834
|
return parentVNode;
|
|
1019
2835
|
};
|
|
@@ -1069,10 +2885,10 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1069
2885
|
if (childVNode.$name$) {
|
|
1070
2886
|
childVNode.$elm$.setAttribute("name", slotName);
|
|
1071
2887
|
}
|
|
1072
|
-
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1073
|
-
parentVNode.$elm
|
|
2888
|
+
if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
2889
|
+
internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
|
|
1074
2890
|
} else {
|
|
1075
|
-
node
|
|
2891
|
+
internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
|
|
1076
2892
|
}
|
|
1077
2893
|
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1078
2894
|
node.remove();
|
|
@@ -1087,8 +2903,8 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1087
2903
|
if (shouldMove) {
|
|
1088
2904
|
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1089
2905
|
}
|
|
1090
|
-
childRenderNodes.push(childVNode);
|
|
1091
2906
|
}
|
|
2907
|
+
childRenderNodes.push(childVNode);
|
|
1092
2908
|
slotNodes.push(childVNode);
|
|
1093
2909
|
if (!parentVNode.$children$) {
|
|
1094
2910
|
parentVNode.$children$ = [];
|
|
@@ -1096,13 +2912,17 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1096
2912
|
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1097
2913
|
}
|
|
1098
2914
|
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
2915
|
+
var _a, _b;
|
|
1099
2916
|
let slottedNode = slotNode.nextSibling;
|
|
1100
2917
|
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
2918
|
+
if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
|
|
2919
|
+
do {
|
|
2920
|
+
if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
2921
|
+
slottedNode["s-sn"] = slotName;
|
|
2922
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
2923
|
+
}
|
|
2924
|
+
slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
|
|
2925
|
+
} while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
|
|
1106
2926
|
};
|
|
1107
2927
|
var findCorrespondingNode = (node, type) => {
|
|
1108
2928
|
let sibling = node;
|
|
@@ -1124,13 +2944,6 @@ createSupportsRuleRe("::slotted");
|
|
|
1124
2944
|
createSupportsRuleRe(":host");
|
|
1125
2945
|
createSupportsRuleRe(":host-context");
|
|
1126
2946
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
1127
|
-
if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
1128
|
-
try {
|
|
1129
|
-
propValue = JSON.parse(propValue);
|
|
1130
|
-
return propValue;
|
|
1131
|
-
} catch (e) {
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
2947
|
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
1135
2948
|
propValue = deserializeProperty(propValue);
|
|
1136
2949
|
return propValue;
|
|
@@ -1153,7 +2966,10 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
|
1153
2966
|
}
|
|
1154
2967
|
return propValue;
|
|
1155
2968
|
};
|
|
1156
|
-
var getElement = (ref) =>
|
|
2969
|
+
var getElement = (ref) => {
|
|
2970
|
+
var _a;
|
|
2971
|
+
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
|
|
2972
|
+
};
|
|
1157
2973
|
|
|
1158
2974
|
// src/runtime/event-emitter.ts
|
|
1159
2975
|
var createEvent = (ref, name, flags) => {
|
|
@@ -1174,115 +2990,6 @@ var emitEvent = (elm, name, opts) => {
|
|
|
1174
2990
|
elm.dispatchEvent(ev);
|
|
1175
2991
|
return ev;
|
|
1176
2992
|
};
|
|
1177
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1178
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1179
|
-
let style = styles.get(scopeId2);
|
|
1180
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
1181
|
-
style = style || new CSSStyleSheet();
|
|
1182
|
-
if (typeof style === "string") {
|
|
1183
|
-
style = cssText;
|
|
1184
|
-
} else {
|
|
1185
|
-
style.replaceSync(cssText);
|
|
1186
|
-
}
|
|
1187
|
-
} else {
|
|
1188
|
-
style = cssText;
|
|
1189
|
-
}
|
|
1190
|
-
styles.set(scopeId2, style);
|
|
1191
|
-
};
|
|
1192
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1193
|
-
var _a;
|
|
1194
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
1195
|
-
const style = styles.get(scopeId2);
|
|
1196
|
-
if (!win.document) {
|
|
1197
|
-
return scopeId2;
|
|
1198
|
-
}
|
|
1199
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1200
|
-
if (style) {
|
|
1201
|
-
if (typeof style === "string") {
|
|
1202
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1203
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1204
|
-
let styleElm;
|
|
1205
|
-
if (!appliedStyles) {
|
|
1206
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1207
|
-
}
|
|
1208
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
1209
|
-
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1210
|
-
styleElm.innerHTML = style;
|
|
1211
|
-
} else {
|
|
1212
|
-
styleElm = win.document.createElement("style");
|
|
1213
|
-
styleElm.innerHTML = style;
|
|
1214
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1215
|
-
if (nonce != null) {
|
|
1216
|
-
styleElm.setAttribute("nonce", nonce);
|
|
1217
|
-
}
|
|
1218
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1219
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
1220
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1221
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1222
|
-
styleContainerNode.insertBefore(
|
|
1223
|
-
styleElm,
|
|
1224
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1225
|
-
);
|
|
1226
|
-
} else if ("host" in styleContainerNode) {
|
|
1227
|
-
if (supportsConstructableStylesheets) {
|
|
1228
|
-
const stylesheet = new CSSStyleSheet();
|
|
1229
|
-
stylesheet.replaceSync(style);
|
|
1230
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1231
|
-
} else {
|
|
1232
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1233
|
-
if (existingStyleContainer) {
|
|
1234
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1235
|
-
} else {
|
|
1236
|
-
styleContainerNode.prepend(styleElm);
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
} else {
|
|
1240
|
-
styleContainerNode.append(styleElm);
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1244
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1248
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1249
|
-
}
|
|
1250
|
-
if (appliedStyles) {
|
|
1251
|
-
appliedStyles.add(scopeId2);
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1255
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
return scopeId2;
|
|
1259
|
-
};
|
|
1260
|
-
var attachStyles = (hostRef) => {
|
|
1261
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1262
|
-
const elm = hostRef.$hostElement$;
|
|
1263
|
-
const flags = cmpMeta.$flags$;
|
|
1264
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1265
|
-
const scopeId2 = addStyle(
|
|
1266
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
1267
|
-
cmpMeta);
|
|
1268
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
1269
|
-
elm["s-sc"] = scopeId2;
|
|
1270
|
-
elm.classList.add(scopeId2 + "-h");
|
|
1271
|
-
}
|
|
1272
|
-
endAttachStyles();
|
|
1273
|
-
};
|
|
1274
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1275
|
-
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1276
|
-
var hydrateScopedToShadow = () => {
|
|
1277
|
-
if (!win.document) {
|
|
1278
|
-
return;
|
|
1279
|
-
}
|
|
1280
|
-
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1281
|
-
let i2 = 0;
|
|
1282
|
-
for (; i2 < styles2.length; i2++) {
|
|
1283
|
-
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1284
|
-
}
|
|
1285
|
-
};
|
|
1286
2993
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1287
2994
|
if (oldValue === newValue) {
|
|
1288
2995
|
return;
|
|
@@ -1293,12 +3000,13 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
1293
3000
|
const classList = elm.classList;
|
|
1294
3001
|
const oldClasses = parseClassList(oldValue);
|
|
1295
3002
|
let newClasses = parseClassList(newValue);
|
|
1296
|
-
if (elm["s-si"] && initialRender) {
|
|
1297
|
-
|
|
3003
|
+
if ((elm["s-si"] || elm["s-sc"]) && initialRender) {
|
|
3004
|
+
const scopeId2 = elm["s-sc"] || elm["s-si"];
|
|
3005
|
+
newClasses.push(scopeId2);
|
|
1298
3006
|
oldClasses.forEach((c) => {
|
|
1299
|
-
if (c.startsWith(
|
|
3007
|
+
if (c.startsWith(scopeId2)) newClasses.push(c);
|
|
1300
3008
|
});
|
|
1301
|
-
newClasses = [...new Set(newClasses)];
|
|
3009
|
+
newClasses = [...new Set(newClasses)].filter((c) => c);
|
|
1302
3010
|
classList.add(...newClasses);
|
|
1303
3011
|
} else {
|
|
1304
3012
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
@@ -1502,10 +3210,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
1502
3210
|
updateElement(null, newVNode2, isSvgMode);
|
|
1503
3211
|
}
|
|
1504
3212
|
if (newVNode2.$children$) {
|
|
3213
|
+
const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
|
|
1505
3214
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
1506
3215
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
1507
3216
|
if (childNode) {
|
|
1508
|
-
|
|
3217
|
+
appendTarget.appendChild(childNode);
|
|
1509
3218
|
}
|
|
1510
3219
|
}
|
|
1511
3220
|
}
|
|
@@ -1527,17 +3236,43 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
1527
3236
|
patchSlotNode(elm);
|
|
1528
3237
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
1529
3238
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
1530
|
-
|
|
1531
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
1532
|
-
}
|
|
3239
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
1533
3240
|
}
|
|
1534
3241
|
}
|
|
1535
3242
|
}
|
|
1536
3243
|
return elm;
|
|
1537
3244
|
};
|
|
3245
|
+
var relocateToHostRoot = (parentElm) => {
|
|
3246
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
3247
|
+
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
3248
|
+
if (host != null) {
|
|
3249
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
3250
|
+
(ref) => ref["s-cr"]
|
|
3251
|
+
);
|
|
3252
|
+
const childNodeArray = Array.from(
|
|
3253
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
3254
|
+
);
|
|
3255
|
+
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
3256
|
+
if (childNode["s-sh"] != null) {
|
|
3257
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
3258
|
+
childNode["s-sh"] = void 0;
|
|
3259
|
+
checkSlotRelocate = true;
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
3264
|
+
};
|
|
1538
3265
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
1539
3266
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1540
3267
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
3268
|
+
if (parentElm["s-sr"]) {
|
|
3269
|
+
let node = parentElm;
|
|
3270
|
+
while (node = node.nextSibling) {
|
|
3271
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
3272
|
+
oldSlotChildNodes.push(node);
|
|
3273
|
+
}
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
1541
3276
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
1542
3277
|
const childNode = oldSlotChildNodes[i2];
|
|
1543
3278
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
@@ -1559,6 +3294,9 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
1559
3294
|
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
1560
3295
|
containerElm = containerElm.shadowRoot;
|
|
1561
3296
|
}
|
|
3297
|
+
if (parentVNode.$tag$ === "template") {
|
|
3298
|
+
containerElm = containerElm.content;
|
|
3299
|
+
}
|
|
1562
3300
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
1563
3301
|
if (vnodes[startIdx]) {
|
|
1564
3302
|
childNode = createElm(null, parentVNode, startIdx);
|
|
@@ -1602,6 +3340,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1602
3340
|
let newEndVnode = newCh[newEndIdx];
|
|
1603
3341
|
let node;
|
|
1604
3342
|
let elmToMove;
|
|
3343
|
+
const containerElm = newVNode2.$tag$ === "template" ? parentElm.content : parentElm;
|
|
1605
3344
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
1606
3345
|
if (oldStartVnode == null) {
|
|
1607
3346
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
@@ -1624,7 +3363,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1624
3363
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1625
3364
|
}
|
|
1626
3365
|
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1627
|
-
insertBefore(
|
|
3366
|
+
insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
1628
3367
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1629
3368
|
newEndVnode = newCh[--newEndIdx];
|
|
1630
3369
|
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
@@ -1632,7 +3371,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1632
3371
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1633
3372
|
}
|
|
1634
3373
|
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1635
|
-
insertBefore(
|
|
3374
|
+
insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
1636
3375
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
1637
3376
|
newStartVnode = newCh[++newStartIdx];
|
|
1638
3377
|
} else {
|
|
@@ -1711,6 +3450,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1711
3450
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
1712
3451
|
}
|
|
1713
3452
|
{
|
|
3453
|
+
if (tag === "slot" && !useNativeShadowDom) {
|
|
3454
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
3455
|
+
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
3456
|
+
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
1714
3459
|
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
1715
3460
|
}
|
|
1716
3461
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -1725,6 +3470,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1725
3470
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1726
3471
|
) {
|
|
1727
3472
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
3473
|
+
} else if (isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
|
|
3474
|
+
newVNode2.$children$ = oldChildren;
|
|
1728
3475
|
}
|
|
1729
3476
|
if (isSvgMode && tag === "svg") {
|
|
1730
3477
|
isSvgMode = false;
|
|
@@ -1747,7 +3494,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1747
3494
|
const slotName = childNode["s-sn"];
|
|
1748
3495
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1749
3496
|
node = hostContentNodes[j];
|
|
1750
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (
|
|
3497
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
1751
3498
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1752
3499
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1753
3500
|
checkSlotFallbackVisibility = true;
|
|
@@ -1791,13 +3538,21 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1791
3538
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1792
3539
|
}
|
|
1793
3540
|
};
|
|
1794
|
-
var insertBefore = (parent, newNode, reference) => {
|
|
1795
|
-
{
|
|
3541
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
3542
|
+
if (typeof newNode["s-sn"] === "string") {
|
|
3543
|
+
parent.insertBefore(newNode, reference);
|
|
3544
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
3545
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
3546
|
+
return newNode;
|
|
3547
|
+
}
|
|
3548
|
+
if (parent.__insertBefore) {
|
|
3549
|
+
return parent.__insertBefore(newNode, reference);
|
|
3550
|
+
} else {
|
|
1796
3551
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1797
3552
|
}
|
|
1798
3553
|
};
|
|
1799
3554
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1800
|
-
var _a, _b, _c, _d;
|
|
3555
|
+
var _a, _b, _c, _d, _e;
|
|
1801
3556
|
const hostElm = hostRef.$hostElement$;
|
|
1802
3557
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1803
3558
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -1806,9 +3561,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1806
3561
|
hostTagName = hostElm.tagName;
|
|
1807
3562
|
if (cmpMeta.$attrsToReflect$) {
|
|
1808
3563
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1809
|
-
cmpMeta.$attrsToReflect$.
|
|
1810
|
-
|
|
1811
|
-
|
|
3564
|
+
cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
|
|
3565
|
+
{
|
|
3566
|
+
rootVnode.$attrs$[attribute] = hostElm[propName];
|
|
3567
|
+
}
|
|
3568
|
+
});
|
|
1812
3569
|
}
|
|
1813
3570
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1814
3571
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
@@ -1836,19 +3593,27 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1836
3593
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
1837
3594
|
const orgLocationNode = win.document.createTextNode("");
|
|
1838
3595
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1839
|
-
insertBefore(
|
|
3596
|
+
insertBefore(
|
|
3597
|
+
nodeToRelocate.parentNode,
|
|
3598
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
3599
|
+
nodeToRelocate,
|
|
3600
|
+
isInitialLoad
|
|
3601
|
+
);
|
|
1840
3602
|
}
|
|
1841
3603
|
}
|
|
1842
3604
|
for (const relocateData of relocateNodes) {
|
|
1843
3605
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1844
3606
|
const slotRefNode = relocateData.$slotRefNode$;
|
|
3607
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && isInitialLoad) {
|
|
3608
|
+
nodeToRelocate["s-ih"] = (_a = nodeToRelocate.hidden) != null ? _a : false;
|
|
3609
|
+
}
|
|
1845
3610
|
if (slotRefNode) {
|
|
1846
3611
|
const parentNodeRef = slotRefNode.parentNode;
|
|
1847
3612
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1848
|
-
{
|
|
1849
|
-
let orgLocationNode = (
|
|
3613
|
+
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
3614
|
+
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
1850
3615
|
while (orgLocationNode) {
|
|
1851
|
-
let refNode = (
|
|
3616
|
+
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
1852
3617
|
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1853
3618
|
refNode = refNode.nextSibling;
|
|
1854
3619
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
@@ -1866,23 +3631,26 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1866
3631
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1867
3632
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1868
3633
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1869
|
-
|
|
1870
|
-
|
|
3634
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
3635
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
3636
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
3637
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
3638
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
3639
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
3640
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
3641
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
3642
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
3643
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
3644
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
1871
3645
|
}
|
|
1872
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1873
3646
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1874
|
-
nodeToRelocate.hidden = (
|
|
3647
|
+
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
1875
3648
|
}
|
|
1876
3649
|
}
|
|
1877
3650
|
}
|
|
1878
3651
|
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1879
|
-
} else {
|
|
1880
|
-
|
|
1881
|
-
if (isInitialLoad) {
|
|
1882
|
-
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1883
|
-
}
|
|
1884
|
-
nodeToRelocate.hidden = true;
|
|
1885
|
-
}
|
|
3652
|
+
} else if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
3653
|
+
nodeToRelocate.hidden = true;
|
|
1886
3654
|
}
|
|
1887
3655
|
}
|
|
1888
3656
|
}
|
|
@@ -1892,6 +3660,24 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1892
3660
|
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1893
3661
|
relocateNodes.length = 0;
|
|
1894
3662
|
}
|
|
3663
|
+
if (!useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
3664
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
3665
|
+
for (const childNode of children) {
|
|
3666
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
3667
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
3668
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
3669
|
+
}
|
|
3670
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
3671
|
+
childNode.hidden = true;
|
|
3672
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
3673
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
3674
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
3675
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
3676
|
+
childNode.parentNode.removeChild(childNode);
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
1895
3681
|
contentRef = void 0;
|
|
1896
3682
|
};
|
|
1897
3683
|
|
|
@@ -1918,6 +3704,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1918
3704
|
}
|
|
1919
3705
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
1920
3706
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
3707
|
+
if (isInitialLoad) {
|
|
3708
|
+
queueMicrotask(() => {
|
|
3709
|
+
dispatch();
|
|
3710
|
+
});
|
|
3711
|
+
return;
|
|
3712
|
+
}
|
|
1921
3713
|
return writeTask(dispatch) ;
|
|
1922
3714
|
};
|
|
1923
3715
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -1932,10 +3724,19 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1932
3724
|
let maybePromise;
|
|
1933
3725
|
if (isInitialLoad) {
|
|
1934
3726
|
{
|
|
1935
|
-
hostRef.$
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
3727
|
+
if (hostRef.$deferredConnectedCallback$) {
|
|
3728
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
3729
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
3730
|
+
}
|
|
3731
|
+
{
|
|
3732
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
3733
|
+
if (hostRef.$queuedListeners$) {
|
|
3734
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
3735
|
+
hostRef.$queuedListeners$ = void 0;
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
if (hostRef.$fetchedCbList$.length) {
|
|
3739
|
+
hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
|
|
1939
3740
|
}
|
|
1940
3741
|
}
|
|
1941
3742
|
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
@@ -2041,7 +3842,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2041
3842
|
}
|
|
2042
3843
|
};
|
|
2043
3844
|
var appDidLoad = (who) => {
|
|
3845
|
+
var _a;
|
|
2044
3846
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
3847
|
+
{
|
|
3848
|
+
if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
|
|
3849
|
+
plt.$orgLocNodes$.clear();
|
|
3850
|
+
}
|
|
3851
|
+
}
|
|
2045
3852
|
};
|
|
2046
3853
|
var safeCall = (instance, method, arg, elm) => {
|
|
2047
3854
|
if (instance && instance[method]) {
|
|
@@ -2062,6 +3869,9 @@ var addHydratedFlag = (elm) => {
|
|
|
2062
3869
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
2063
3870
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
2064
3871
|
const hostRef = getHostRef(ref);
|
|
3872
|
+
if (!hostRef) {
|
|
3873
|
+
return;
|
|
3874
|
+
}
|
|
2065
3875
|
if (!hostRef) {
|
|
2066
3876
|
throw new Error(
|
|
2067
3877
|
`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).`
|
|
@@ -2080,27 +3890,34 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
2080
3890
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
2081
3891
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
2082
3892
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
2083
|
-
if (
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
3893
|
+
if (cmpMeta.$watchers$) {
|
|
3894
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
3895
|
+
if (watchMethods) {
|
|
3896
|
+
watchMethods.map((watcher) => {
|
|
3897
|
+
try {
|
|
3898
|
+
const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
|
|
3899
|
+
if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
|
|
3900
|
+
if (!instance) {
|
|
3901
|
+
hostRef.$fetchedCbList$.push(() => {
|
|
3902
|
+
hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
|
|
3903
|
+
});
|
|
3904
|
+
} else {
|
|
3905
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
3906
|
+
}
|
|
2092
3907
|
}
|
|
2093
|
-
})
|
|
2094
|
-
|
|
2095
|
-
}
|
|
2096
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
2097
|
-
if (instance.componentShouldUpdate) {
|
|
2098
|
-
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
2099
|
-
return;
|
|
3908
|
+
} catch (e) {
|
|
3909
|
+
consoleError(e, elm);
|
|
2100
3910
|
}
|
|
3911
|
+
});
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3914
|
+
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
3915
|
+
if (instance.componentShouldUpdate) {
|
|
3916
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
3917
|
+
return;
|
|
2101
3918
|
}
|
|
2102
|
-
scheduleUpdate(hostRef, false);
|
|
2103
3919
|
}
|
|
3920
|
+
scheduleUpdate(hostRef, false);
|
|
2104
3921
|
}
|
|
2105
3922
|
}
|
|
2106
3923
|
};
|
|
@@ -2113,10 +3930,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2113
3930
|
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
2114
3931
|
Object.defineProperty(prototype, cbName, {
|
|
2115
3932
|
value(...args) {
|
|
3933
|
+
var _a2;
|
|
2116
3934
|
const hostRef = getHostRef(this);
|
|
2117
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
3935
|
+
const instance = hostRef == null ? void 0 : hostRef.$lazyInstance$ ;
|
|
2118
3936
|
if (!instance) {
|
|
2119
|
-
hostRef.$onReadyPromise
|
|
3937
|
+
(_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
|
|
2120
3938
|
const cb = asyncInstance[cbName];
|
|
2121
3939
|
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
2122
3940
|
});
|
|
@@ -2128,9 +3946,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2128
3946
|
});
|
|
2129
3947
|
});
|
|
2130
3948
|
}
|
|
2131
|
-
if (cmpMeta.$members$ ||
|
|
2132
|
-
|
|
2133
|
-
cmpMeta.$watchers$
|
|
3949
|
+
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
3950
|
+
{
|
|
3951
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3952
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
3953
|
+
}
|
|
3954
|
+
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
3955
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
3956
|
+
}
|
|
3957
|
+
if (Cstr.serializers && !cmpMeta.$serializers$) {
|
|
3958
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3959
|
+
}
|
|
2134
3960
|
}
|
|
2135
3961
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
2136
3962
|
members.map(([memberName, [memberFlags]]) => {
|
|
@@ -2158,12 +3984,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2158
3984
|
Object.defineProperty(prototype, memberName, {
|
|
2159
3985
|
set(newValue) {
|
|
2160
3986
|
const ref = getHostRef(this);
|
|
3987
|
+
if (!ref) {
|
|
3988
|
+
return;
|
|
3989
|
+
}
|
|
2161
3990
|
if (origSetter) {
|
|
2162
3991
|
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2163
3992
|
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
2164
3993
|
newValue = ref.$instanceValues$.get(memberName);
|
|
2165
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2166
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
2167
3994
|
}
|
|
2168
3995
|
origSetter.apply(this, [
|
|
2169
3996
|
parsePropertyValue(
|
|
@@ -2180,7 +4007,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2180
4007
|
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
2181
4008
|
setValue(this, memberName, newValue, cmpMeta);
|
|
2182
4009
|
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
2183
|
-
ref.$
|
|
4010
|
+
ref.$fetchedCbList$.push(() => {
|
|
2184
4011
|
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
2185
4012
|
ref.$lazyInstance$[memberName] = newValue;
|
|
2186
4013
|
}
|
|
@@ -2203,7 +4030,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2203
4030
|
if (ref.$lazyInstance$) {
|
|
2204
4031
|
setterSetVal();
|
|
2205
4032
|
} else {
|
|
2206
|
-
ref.$
|
|
4033
|
+
ref.$fetchedCbList$.push(() => {
|
|
4034
|
+
setterSetVal();
|
|
4035
|
+
});
|
|
2207
4036
|
}
|
|
2208
4037
|
}
|
|
2209
4038
|
}
|
|
@@ -2227,29 +4056,34 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2227
4056
|
plt.jmp(() => {
|
|
2228
4057
|
var _a2;
|
|
2229
4058
|
const propName = attrNameToPropName.get(attrName);
|
|
4059
|
+
const hostRef = getHostRef(this);
|
|
2230
4060
|
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
2231
4061
|
newValue = this[propName];
|
|
2232
4062
|
delete this[propName];
|
|
2233
|
-
}
|
|
4063
|
+
}
|
|
4064
|
+
if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
2234
4065
|
this[propName] == newValue) {
|
|
2235
4066
|
return;
|
|
2236
4067
|
} else if (propName == null) {
|
|
2237
|
-
const hostRef = getHostRef(this);
|
|
2238
4068
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
2239
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) &&
|
|
4069
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && newValue !== oldValue) {
|
|
2240
4070
|
const instance = hostRef.$lazyInstance$ ;
|
|
2241
4071
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
2242
|
-
entry == null ? void 0 : entry.forEach((
|
|
2243
|
-
|
|
2244
|
-
|
|
4072
|
+
entry == null ? void 0 : entry.forEach((watcher) => {
|
|
4073
|
+
const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
|
|
4074
|
+
if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
|
|
4075
|
+
instance[watchMethodName].call(instance, newValue, oldValue, attrName);
|
|
2245
4076
|
}
|
|
2246
4077
|
});
|
|
2247
4078
|
}
|
|
2248
4079
|
return;
|
|
2249
4080
|
}
|
|
4081
|
+
const propFlags = members.find(([m]) => m === propName);
|
|
4082
|
+
if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
|
|
4083
|
+
newValue = newValue === null || newValue === "false" ? false : true;
|
|
4084
|
+
}
|
|
2250
4085
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
2251
|
-
|
|
2252
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
4086
|
+
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
2253
4087
|
this[propName] = newValue;
|
|
2254
4088
|
}
|
|
2255
4089
|
});
|
|
@@ -2257,7 +4091,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2257
4091
|
Cstr.observedAttributes = Array.from(
|
|
2258
4092
|
/* @__PURE__ */ new Set([
|
|
2259
4093
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
2260
|
-
...members.filter(([_, m]) => m[0] &
|
|
4094
|
+
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
2261
4095
|
var _a2;
|
|
2262
4096
|
const attrName = m[1] || propName;
|
|
2263
4097
|
attrNameToPropName.set(attrName, propName);
|
|
@@ -2294,6 +4128,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2294
4128
|
if (!Cstr.isProxied) {
|
|
2295
4129
|
{
|
|
2296
4130
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
4131
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
4132
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
2297
4133
|
}
|
|
2298
4134
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
2299
4135
|
Cstr.isProxied = true;
|
|
@@ -2314,7 +4150,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2314
4150
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
2315
4151
|
}
|
|
2316
4152
|
endNewInstance();
|
|
2317
|
-
|
|
4153
|
+
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
4154
|
+
if (!needsDeferredCallback) {
|
|
4155
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
4156
|
+
} else {
|
|
4157
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
4158
|
+
}
|
|
2318
4159
|
} else {
|
|
2319
4160
|
Cstr = elm.constructor;
|
|
2320
4161
|
const cmpTag = elm.localName;
|
|
@@ -2326,7 +4167,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2326
4167
|
style = Cstr.style;
|
|
2327
4168
|
}
|
|
2328
4169
|
const scopeId2 = getScopeId(cmpMeta);
|
|
2329
|
-
if (!styles.has(scopeId2)) {
|
|
4170
|
+
if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
|
|
2330
4171
|
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
2331
4172
|
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
2332
4173
|
endRegisterStyles();
|
|
@@ -2351,6 +4192,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
|
2351
4192
|
var connectedCallback = (elm) => {
|
|
2352
4193
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
2353
4194
|
const hostRef = getHostRef(elm);
|
|
4195
|
+
if (!hostRef) {
|
|
4196
|
+
return;
|
|
4197
|
+
}
|
|
2354
4198
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2355
4199
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
2356
4200
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
@@ -2383,7 +4227,7 @@ var connectedCallback = (elm) => {
|
|
|
2383
4227
|
}
|
|
2384
4228
|
if (cmpMeta.$members$) {
|
|
2385
4229
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
2386
|
-
if (memberFlags & 31 /* Prop */ && elm.
|
|
4230
|
+
if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
|
|
2387
4231
|
const value = elm[memberName];
|
|
2388
4232
|
delete elm[memberName];
|
|
2389
4233
|
elm[memberName] = value;
|
|
@@ -2423,7 +4267,7 @@ var disconnectedCallback = async (elm) => {
|
|
|
2423
4267
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
2424
4268
|
const hostRef = getHostRef(elm);
|
|
2425
4269
|
{
|
|
2426
|
-
if (hostRef.$rmListeners$) {
|
|
4270
|
+
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
2427
4271
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
2428
4272
|
hostRef.$rmListeners$ = void 0;
|
|
2429
4273
|
}
|
|
@@ -2470,7 +4314,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2470
4314
|
let hasSlotRelocation = false;
|
|
2471
4315
|
lazyBundles.map((lazyBundle) => {
|
|
2472
4316
|
lazyBundle[1].map((compactMeta) => {
|
|
2473
|
-
var _a2;
|
|
4317
|
+
var _a2, _b, _c;
|
|
2474
4318
|
const cmpMeta = {
|
|
2475
4319
|
$flags$: compactMeta[0],
|
|
2476
4320
|
$tagName$: compactMeta[1],
|
|
@@ -2491,13 +4335,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2491
4335
|
}
|
|
2492
4336
|
{
|
|
2493
4337
|
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
4338
|
+
cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
|
|
4339
|
+
cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
|
|
2494
4340
|
}
|
|
2495
|
-
const tagName = cmpMeta.$tagName
|
|
4341
|
+
const tagName = transformTag(cmpMeta.$tagName$);
|
|
2496
4342
|
const HostElement = class extends HTMLElement {
|
|
4343
|
+
["s-p"];
|
|
4344
|
+
["s-rc"];
|
|
4345
|
+
hasRegisteredEventListeners = false;
|
|
2497
4346
|
// StencilLazyHost
|
|
2498
4347
|
constructor(self) {
|
|
2499
4348
|
super(self);
|
|
2500
|
-
this.hasRegisteredEventListeners = false;
|
|
2501
4349
|
self = this;
|
|
2502
4350
|
registerHost(self, cmpMeta);
|
|
2503
4351
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
@@ -2516,6 +4364,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2516
4364
|
}
|
|
2517
4365
|
connectedCallback() {
|
|
2518
4366
|
const hostRef = getHostRef(this);
|
|
4367
|
+
if (!hostRef) {
|
|
4368
|
+
return;
|
|
4369
|
+
}
|
|
2519
4370
|
if (!this.hasRegisteredEventListeners) {
|
|
2520
4371
|
this.hasRegisteredEventListeners = true;
|
|
2521
4372
|
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
@@ -2535,6 +4386,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2535
4386
|
plt.raf(() => {
|
|
2536
4387
|
var _a3;
|
|
2537
4388
|
const hostRef = getHostRef(this);
|
|
4389
|
+
if (!hostRef) {
|
|
4390
|
+
return;
|
|
4391
|
+
}
|
|
2538
4392
|
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2539
4393
|
if (i2 > -1) {
|
|
2540
4394
|
deferredConnectedCallbacks.splice(i2, 1);
|
|
@@ -2545,7 +4399,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2545
4399
|
});
|
|
2546
4400
|
}
|
|
2547
4401
|
componentOnReady() {
|
|
2548
|
-
|
|
4402
|
+
var _a3;
|
|
4403
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
2549
4404
|
}
|
|
2550
4405
|
};
|
|
2551
4406
|
if (cmpMeta.$flags$ & 64 /* formAssociated */) {
|
|
@@ -2622,5 +4477,8 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
2622
4477
|
|
|
2623
4478
|
// src/runtime/nonce.ts
|
|
2624
4479
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
4480
|
+
function transformTag(tag) {
|
|
4481
|
+
return tag;
|
|
4482
|
+
}
|
|
2625
4483
|
|
|
2626
4484
|
export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|